@php-wasm/cli 3.0.8 → 3.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/main.js +17 -17
  2. package/main.js.map +1 -1
  3. package/package.json +9 -6
package/main.js CHANGED
@@ -17,7 +17,7 @@ import Ye from"os";import{readFileSync as Oe,writeFile as mn,statSync as yn,read
17
17
  * @license
18
18
  * Copyright (c) 2016, Contributors
19
19
  * SPDX-License-Identifier: ISC
20
- */let pt;class Jn{constructor(n){pt=n}parse(n,c){const a=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},c),f=Qn(n),o=typeof n=="string",t=Zn(Object.assign(Object.create(null),a.alias)),i=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},a.configuration),m=Object.assign(Object.create(null),a.default),N=a.configObjects||[],w=a.envPrefix,g=i["populate--"],b=g?"--":"_",x=Object.create(null),O=Object.create(null),_=a.__||pt.format,E={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},D=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,T=new RegExp("^--"+i["negation-prefix"]+"(.+)");[].concat(a.array||[]).filter(Boolean).forEach(function(C){const s=typeof C=="object"?C.key:C,e=Object.keys(C).map(function(r){return{boolean:"bools",string:"strings",number:"numbers"}[r]}).filter(Boolean).pop();e&&(E[e][s]=!0),E.arrays[s]=!0,E.keys.push(s)}),[].concat(a.boolean||[]).filter(Boolean).forEach(function(C){E.bools[C]=!0,E.keys.push(C)}),[].concat(a.string||[]).filter(Boolean).forEach(function(C){E.strings[C]=!0,E.keys.push(C)}),[].concat(a.number||[]).filter(Boolean).forEach(function(C){E.numbers[C]=!0,E.keys.push(C)}),[].concat(a.count||[]).filter(Boolean).forEach(function(C){E.counts[C]=!0,E.keys.push(C)}),[].concat(a.normalize||[]).filter(Boolean).forEach(function(C){E.normalize[C]=!0,E.keys.push(C)}),typeof a.narg=="object"&&Object.entries(a.narg).forEach(([C,s])=>{typeof s=="number"&&(E.nargs[C]=s,E.keys.push(C))}),typeof a.coerce=="object"&&Object.entries(a.coerce).forEach(([C,s])=>{typeof s=="function"&&(E.coercions[C]=s,E.keys.push(C))}),typeof a.config<"u"&&(Array.isArray(a.config)||typeof a.config=="string"?[].concat(a.config).filter(Boolean).forEach(function(C){E.configs[C]=!0}):typeof a.config=="object"&&Object.entries(a.config).forEach(([C,s])=>{(typeof s=="boolean"||typeof s=="function")&&(E.configs[C]=s)})),Tt(a.key,t,a.default,E.arrays),Object.keys(m).forEach(function(C){(E.aliases[C]||[]).forEach(function(s){m[s]=m[C]})});let p=null;it();let I=[];const A=Object.assign(Object.create(null),{_:[]}),j={};for(let C=0;C<f.length;C++){const s=f[C],e=s.replace(/^-{3,}/,"---");let r,l,v,M,P,q;if(s!=="--"&&/^-/.test(s)&&d(s))U(s);else if(e.match(/^---+(=|$)/)){U(s);continue}else if(s.match(/^--.+=/)||!i["short-option-groups"]&&s.match(/^-.+=/))M=s.match(/^--?([^=]+)=([\s\S]*)$/),M!==null&&Array.isArray(M)&&M.length>=3&&(k(M[1],E.arrays)?C=h(C,M[1],f,M[2]):k(M[1],E.nargs)!==!1?C=B(C,M[1],f,M[2]):F(M[1],M[2],!0));else if(s.match(T)&&i["boolean-negation"])M=s.match(T),M!==null&&Array.isArray(M)&&M.length>=2&&(l=M[1],F(l,k(l,E.arrays)?[!1]:!1));else if(s.match(/^--.+/)||!i["short-option-groups"]&&s.match(/^-[^-]+/))M=s.match(/^--?(.+)/),M!==null&&Array.isArray(M)&&M.length>=2&&(l=M[1],k(l,E.arrays)?C=h(C,l,f):k(l,E.nargs)!==!1?C=B(C,l,f):(P=f[C+1],P!==void 0&&(!P.match(/^-/)||P.match(D))&&!k(l,E.bools)&&!k(l,E.counts)||/^(true|false)$/.test(P)?(F(l,P),C++):F(l,L(l))));else if(s.match(/^-.\..+=/))M=s.match(/^-([^=]+)=([\s\S]*)$/),M!==null&&Array.isArray(M)&&M.length>=3&&F(M[1],M[2]);else if(s.match(/^-.\..+/)&&!s.match(D))P=f[C+1],M=s.match(/^-(.\..+)/),M!==null&&Array.isArray(M)&&M.length>=2&&(l=M[1],P!==void 0&&!P.match(/^-/)&&!k(l,E.bools)&&!k(l,E.counts)?(F(l,P),C++):F(l,L(l)));else if(s.match(/^-[^-]+/)&&!s.match(D)){v=s.slice(1,-1).split(""),r=!1;for(let V=0;V<v.length;V++){if(P=s.slice(V+2),v[V+1]&&v[V+1]==="="){q=s.slice(V+3),l=v[V],k(l,E.arrays)?C=h(C,l,f,q):k(l,E.nargs)!==!1?C=B(C,l,f,q):F(l,q),r=!0;break}if(P==="-"){F(v[V],P);continue}if(/[A-Za-z]/.test(v[V])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(P)&&k(P,E.bools)===!1){F(v[V],P),r=!0;break}if(v[V+1]&&v[V+1].match(/\W/)){F(v[V],P),r=!0;break}else F(v[V],L(v[V]))}l=s.slice(-1)[0],!r&&l!=="-"&&(k(l,E.arrays)?C=h(C,l,f):k(l,E.nargs)!==!1?C=B(C,l,f):(P=f[C+1],P!==void 0&&(!/^(-|--)[^-]/.test(P)||P.match(D))&&!k(l,E.bools)&&!k(l,E.counts)||/^(true|false)$/.test(P)?(F(l,P),C++):F(l,L(l))))}else if(s.match(/^-[0-9]$/)&&s.match(D)&&k(s.slice(1),E.bools))l=s.slice(1),F(l,L(l));else if(s==="--"){I=f.slice(C+1);break}else if(i["halt-at-non-option"]){I=f.slice(C);break}else U(s)}W(A,!0),W(A,!1),Y(A),z(),gt(A,E.aliases,m,!0),vt(A),i["set-placeholder-key"]&&bt(A),Object.keys(E.counts).forEach(function(C){Q(A,C.split("."))||F(C,0)}),g&&I.length&&(A[b]=[]),I.forEach(function(C){A[b].push(C)}),i["camel-case-expansion"]&&i["strip-dashed"]&&Object.keys(A).filter(C=>C!=="--"&&C.includes("-")).forEach(C=>{delete A[C]}),i["strip-aliased"]&&[].concat(...Object.keys(t).map(C=>t[C])).forEach(C=>{i["camel-case-expansion"]&&C.includes("-")&&delete A[C.split(".").map(s=>At(s)).join(".")],delete A[C]});function U(C){const s=$("_",C);(typeof s=="string"||typeof s=="number")&&A._.push(s)}function B(C,s,e,r){let l,v=k(s,E.nargs);if(v=typeof v!="number"||isNaN(v)?1:v,v===0)return H(r)||(p=Error(_("Argument unexpected for: %s",s))),F(s,L(s)),C;let M=H(r)?0:1;if(i["nargs-eats-options"])e.length-(C+1)+M<v&&(p=Error(_("Not enough arguments following: %s",s))),M=v;else{for(l=C+1;l<e.length&&(!e[l].match(/^-[^0-9]/)||e[l].match(D)||d(e[l]));l++)M++;M<v&&(p=Error(_("Not enough arguments following: %s",s)))}let P=Math.min(M,v);for(!H(r)&&P>0&&(F(s,r),P--),l=C+1;l<P+C+1;l++)F(s,e[l]);return C+P}function h(C,s,e,r){let l=[],v=r||e[C+1];const M=k(s,E.nargs);if(k(s,E.bools)&&!/^(true|false)$/.test(v))l.push(!0);else if(H(v)||H(r)&&/^-/.test(v)&&!D.test(v)&&!d(v)){if(m[s]!==void 0){const P=m[s];l=Array.isArray(P)?P:[P]}}else{H(r)||l.push(X(s,r,!0));for(let P=C+1;P<e.length&&!(!i["greedy-arrays"]&&l.length>0||M&&typeof M=="number"&&l.length>=M||(v=e[P],/^-/.test(v)&&!D.test(v)&&!d(v)));P++)C=P,l.push(X(s,v,o))}return typeof M=="number"&&(M&&l.length<M||isNaN(M)&&l.length===0)&&(p=Error(_("Not enough arguments following: %s",s))),F(s,l),C}function F(C,s,e=o){if(/-/.test(C)&&i["camel-case-expansion"]){const v=C.split(".").map(function(M){return At(M)}).join(".");R(C,v)}const r=X(C,s,e),l=C.split(".");et(A,l,r),E.aliases[C]&&E.aliases[C].forEach(function(v){const M=v.split(".");et(A,M,r)}),l.length>1&&i["dot-notation"]&&(E.aliases[l[0]]||[]).forEach(function(v){let M=v.split(".");const P=[].concat(l);P.shift(),M=M.concat(P),(E.aliases[C]||[]).includes(M.join("."))||et(A,M,r)}),k(C,E.normalize)&&!k(C,E.arrays)&&[C].concat(E.aliases[C]||[]).forEach(function(M){Object.defineProperty(j,M,{enumerable:!0,get(){return s},set(P){s=typeof P=="string"?pt.normalize(P):P}})})}function R(C,s){E.aliases[C]&&E.aliases[C].length||(E.aliases[C]=[s],x[s]=!0),E.aliases[s]&&E.aliases[s].length||R(s,C)}function X(C,s,e){e&&(s=ti(s)),(k(C,E.bools)||k(C,E.counts))&&typeof s=="string"&&(s=s==="true");let r=Array.isArray(s)?s.map(function(l){return $(C,l)}):$(C,s);return k(C,E.counts)&&(H(r)||typeof r=="boolean")&&(r=Rt()),k(C,E.normalize)&&k(C,E.arrays)&&(Array.isArray(s)?r=s.map(l=>pt.normalize(l)):r=pt.normalize(s)),r}function $(C,s){return!i["parse-positional-numbers"]&&C==="_"||!k(C,E.strings)&&!k(C,E.bools)&&!Array.isArray(s)&&(Kn(s)&&i["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${s}`)))||!H(s)&&k(C,E.numbers))&&(s=Number(s)),s}function Y(C){const s=Object.create(null);gt(s,E.aliases,m),Object.keys(E.configs).forEach(function(e){const r=C[e]||s[e];if(r)try{let l=null;const v=pt.resolve(pt.cwd(),r),M=E.configs[e];if(typeof M=="function"){try{l=M(v)}catch(P){l=P}if(l instanceof Error){p=l;return}}else l=pt.require(v);J(l)}catch(l){l.name==="PermissionDenied"?p=l:C[e]&&(p=Error(_("Invalid JSON config file: %s",r)))}})}function J(C,s){Object.keys(C).forEach(function(e){const r=C[e],l=s?s+"."+e:e;typeof r=="object"&&r!==null&&!Array.isArray(r)&&i["dot-notation"]?J(r,l):(!Q(A,l.split("."))||k(l,E.arrays)&&i["combine-arrays"])&&F(l,r)})}function z(){typeof N<"u"&&N.forEach(function(C){J(C)})}function W(C,s){if(typeof w>"u")return;const e=typeof w=="string"?w:"",r=pt.env();Object.keys(r).forEach(function(l){if(e===""||l.lastIndexOf(e,0)===0){const v=l.split("__").map(function(M,P){return P===0&&(M=M.substring(e.length)),At(M)});(s&&E.configs[v.join(".")]||!s)&&!Q(C,v)&&F(v.join("."),r[l])}})}function vt(C){let s;const e=new Set;Object.keys(C).forEach(function(r){if(!e.has(r)&&(s=k(r,E.coercions),typeof s=="function"))try{const l=$(r,s(C[r]));[].concat(E.aliases[r]||[],r).forEach(v=>{e.add(v),C[v]=l})}catch(l){p=l}})}function bt(C){return E.keys.forEach(s=>{~s.indexOf(".")||typeof C[s]>"u"&&(C[s]=void 0)}),C}function gt(C,s,e,r=!1){Object.keys(e).forEach(function(l){Q(C,l.split("."))||(et(C,l.split("."),e[l]),r&&(O[l]=!0),(s[l]||[]).forEach(function(v){Q(C,v.split("."))||et(C,v.split("."),e[l])}))})}function Q(C,s){let e=C;i["dot-notation"]||(s=[s.join(".")]),s.slice(0,-1).forEach(function(l){e=e[l]||{}});const r=s[s.length-1];return typeof e!="object"?!1:r in e}function et(C,s,e){let r=C;i["dot-notation"]||(s=[s.join(".")]),s.slice(0,-1).forEach(function(q){q=Ze(q),typeof r=="object"&&r[q]===void 0&&(r[q]={}),typeof r[q]!="object"||Array.isArray(r[q])?(Array.isArray(r[q])?r[q].push({}):r[q]=[r[q],{}],r=r[q][r[q].length-1]):r=r[q]});const l=Ze(s[s.length-1]),v=k(s.join("."),E.arrays),M=Array.isArray(e);let P=i["duplicate-arguments-array"];!P&&k(l,E.nargs)&&(P=!0,(!H(r[l])&&E.nargs[l]===1||Array.isArray(r[l])&&r[l].length===E.nargs[l])&&(r[l]=void 0)),e===Rt()?r[l]=Rt(r[l]):Array.isArray(r[l])?P&&v&&M?r[l]=i["flatten-duplicate-arrays"]?r[l].concat(e):(Array.isArray(r[l][0])?r[l]:[r[l]]).concat([e]):!P&&!!v==!!M?r[l]=e:r[l]=r[l].concat([e]):r[l]===void 0&&v?r[l]=M?e:[e]:P&&!(r[l]===void 0||k(l,E.counts)||k(l,E.bools))?r[l]=[r[l],e]:r[l]=e}function Tt(...C){C.forEach(function(s){Object.keys(s||{}).forEach(function(e){E.aliases[e]||(E.aliases[e]=[].concat(t[e]||[]),E.aliases[e].concat(e).forEach(function(r){if(/-/.test(r)&&i["camel-case-expansion"]){const l=At(r);l!==e&&E.aliases[e].indexOf(l)===-1&&(E.aliases[e].push(l),x[l]=!0)}}),E.aliases[e].concat(e).forEach(function(r){if(r.length>1&&/[A-Z]/.test(r)&&i["camel-case-expansion"]){const l=zn(r,"-");l!==e&&E.aliases[e].indexOf(l)===-1&&(E.aliases[e].push(l),x[l]=!0)}}),E.aliases[e].forEach(function(r){E.aliases[r]=[e].concat(E.aliases[e].filter(function(l){return r!==l}))}))})})}function k(C,s){const e=[].concat(E.aliases[C]||[],C),r=Object.keys(s),l=e.find(v=>r.includes(v));return l?s[l]:!1}function wt(C){const s=Object.keys(E);return[].concat(s.map(r=>E[r])).some(function(r){return Array.isArray(r)?r.includes(C):r[C]})}function It(C,...s){return[].concat(...s).some(function(r){const l=C.match(r);return l&&wt(l[1])})}function y(C){if(C.match(D)||!C.match(/^-[^-]+/))return!1;let s=!0,e;const r=C.slice(1).split("");for(let l=0;l<r.length;l++){if(e=C.slice(l+2),!wt(r[l])){s=!1;break}if(r[l+1]&&r[l+1]==="="||e==="-"||/[A-Za-z]/.test(r[l])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(e)||r[l+1]&&r[l+1].match(/\W/))break}return s}function d(C){return i["unknown-options-as-args"]&&S(C)}function S(C){return C=C.replace(/^-{3,}/,"--"),C.match(D)||y(C)?!1:!It(C,/^-+([^=]+?)=[\s\S]*$/,T,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function L(C){return!k(C,E.bools)&&!k(C,E.counts)&&`${C}`in m?m[C]:K(tt(C))}function K(C){return{[ft.BOOLEAN]:!0,[ft.STRING]:"",[ft.NUMBER]:void 0,[ft.ARRAY]:[]}[C]}function tt(C){let s=ft.BOOLEAN;return k(C,E.strings)?s=ft.STRING:k(C,E.numbers)?s=ft.NUMBER:k(C,E.bools)?s=ft.BOOLEAN:k(C,E.arrays)&&(s=ft.ARRAY),s}function H(C){return C===void 0}function it(){Object.keys(E.counts).find(C=>k(C,E.arrays)?(p=Error(_("Invalid configuration: %s, opts.count excludes opts.array.",C)),!0):k(C,E.nargs)?(p=Error(_("Invalid configuration: %s, opts.count excludes opts.narg.",C)),!0):!1)}return{aliases:Object.assign({},E.aliases),argv:Object.assign(j,A),configuration:i,defaulted:Object.assign({},O),error:p,newAliases:Object.assign({},x)}}}function Zn(u){const n=[],c=Object.create(null);let a=!0;for(Object.keys(u).forEach(function(f){n.push([].concat(u[f],f))});a;){a=!1;for(let f=0;f<n.length;f++)for(let o=f+1;o<n.length;o++)if(n[f].filter(function(i){return n[o].indexOf(i)!==-1}).length){n[f]=n[f].concat(n[o]),n.splice(o,1),a=!0;break}}return n.forEach(function(f){f=f.filter(function(t,i,m){return m.indexOf(t)===i});const o=f.pop();o!==void 0&&typeof o=="string"&&(c[o]=f)}),c}function Rt(u){return u!==void 0?u+1:1}function Ze(u){return u==="__proto__"?"___proto___":u}function ti(u){return typeof u=="string"&&(u[0]==="'"||u[0]==='"')&&u[u.length-1]===u[0]?u.substring(1,u.length-1):u}/**
20
+ */let pt;class Jn{constructor(n){pt=n}parse(n,c){const a=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},c),f=Qn(n),o=typeof n=="string",t=Zn(Object.assign(Object.create(null),a.alias)),i=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},a.configuration),m=Object.assign(Object.create(null),a.default),N=a.configObjects||[],w=a.envPrefix,y=i["populate--"],b=y?"--":"_",x=Object.create(null),O=Object.create(null),_=a.__||pt.format,E={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},D=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,T=new RegExp("^--"+i["negation-prefix"]+"(.+)");[].concat(a.array||[]).filter(Boolean).forEach(function(C){const s=typeof C=="object"?C.key:C,e=Object.keys(C).map(function(r){return{boolean:"bools",string:"strings",number:"numbers"}[r]}).filter(Boolean).pop();e&&(E[e][s]=!0),E.arrays[s]=!0,E.keys.push(s)}),[].concat(a.boolean||[]).filter(Boolean).forEach(function(C){E.bools[C]=!0,E.keys.push(C)}),[].concat(a.string||[]).filter(Boolean).forEach(function(C){E.strings[C]=!0,E.keys.push(C)}),[].concat(a.number||[]).filter(Boolean).forEach(function(C){E.numbers[C]=!0,E.keys.push(C)}),[].concat(a.count||[]).filter(Boolean).forEach(function(C){E.counts[C]=!0,E.keys.push(C)}),[].concat(a.normalize||[]).filter(Boolean).forEach(function(C){E.normalize[C]=!0,E.keys.push(C)}),typeof a.narg=="object"&&Object.entries(a.narg).forEach(([C,s])=>{typeof s=="number"&&(E.nargs[C]=s,E.keys.push(C))}),typeof a.coerce=="object"&&Object.entries(a.coerce).forEach(([C,s])=>{typeof s=="function"&&(E.coercions[C]=s,E.keys.push(C))}),typeof a.config<"u"&&(Array.isArray(a.config)||typeof a.config=="string"?[].concat(a.config).filter(Boolean).forEach(function(C){E.configs[C]=!0}):typeof a.config=="object"&&Object.entries(a.config).forEach(([C,s])=>{(typeof s=="boolean"||typeof s=="function")&&(E.configs[C]=s)})),Tt(a.key,t,a.default,E.arrays),Object.keys(m).forEach(function(C){(E.aliases[C]||[]).forEach(function(s){m[s]=m[C]})});let p=null;it();let I=[];const A=Object.assign(Object.create(null),{_:[]}),j={};for(let C=0;C<f.length;C++){const s=f[C],e=s.replace(/^-{3,}/,"---");let r,l,v,M,P,q;if(s!=="--"&&/^-/.test(s)&&d(s))U(s);else if(e.match(/^---+(=|$)/)){U(s);continue}else if(s.match(/^--.+=/)||!i["short-option-groups"]&&s.match(/^-.+=/))M=s.match(/^--?([^=]+)=([\s\S]*)$/),M!==null&&Array.isArray(M)&&M.length>=3&&(k(M[1],E.arrays)?C=h(C,M[1],f,M[2]):k(M[1],E.nargs)!==!1?C=B(C,M[1],f,M[2]):F(M[1],M[2],!0));else if(s.match(T)&&i["boolean-negation"])M=s.match(T),M!==null&&Array.isArray(M)&&M.length>=2&&(l=M[1],F(l,k(l,E.arrays)?[!1]:!1));else if(s.match(/^--.+/)||!i["short-option-groups"]&&s.match(/^-[^-]+/))M=s.match(/^--?(.+)/),M!==null&&Array.isArray(M)&&M.length>=2&&(l=M[1],k(l,E.arrays)?C=h(C,l,f):k(l,E.nargs)!==!1?C=B(C,l,f):(P=f[C+1],P!==void 0&&(!P.match(/^-/)||P.match(D))&&!k(l,E.bools)&&!k(l,E.counts)||/^(true|false)$/.test(P)?(F(l,P),C++):F(l,L(l))));else if(s.match(/^-.\..+=/))M=s.match(/^-([^=]+)=([\s\S]*)$/),M!==null&&Array.isArray(M)&&M.length>=3&&F(M[1],M[2]);else if(s.match(/^-.\..+/)&&!s.match(D))P=f[C+1],M=s.match(/^-(.\..+)/),M!==null&&Array.isArray(M)&&M.length>=2&&(l=M[1],P!==void 0&&!P.match(/^-/)&&!k(l,E.bools)&&!k(l,E.counts)?(F(l,P),C++):F(l,L(l)));else if(s.match(/^-[^-]+/)&&!s.match(D)){v=s.slice(1,-1).split(""),r=!1;for(let V=0;V<v.length;V++){if(P=s.slice(V+2),v[V+1]&&v[V+1]==="="){q=s.slice(V+3),l=v[V],k(l,E.arrays)?C=h(C,l,f,q):k(l,E.nargs)!==!1?C=B(C,l,f,q):F(l,q),r=!0;break}if(P==="-"){F(v[V],P);continue}if(/[A-Za-z]/.test(v[V])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(P)&&k(P,E.bools)===!1){F(v[V],P),r=!0;break}if(v[V+1]&&v[V+1].match(/\W/)){F(v[V],P),r=!0;break}else F(v[V],L(v[V]))}l=s.slice(-1)[0],!r&&l!=="-"&&(k(l,E.arrays)?C=h(C,l,f):k(l,E.nargs)!==!1?C=B(C,l,f):(P=f[C+1],P!==void 0&&(!/^(-|--)[^-]/.test(P)||P.match(D))&&!k(l,E.bools)&&!k(l,E.counts)||/^(true|false)$/.test(P)?(F(l,P),C++):F(l,L(l))))}else if(s.match(/^-[0-9]$/)&&s.match(D)&&k(s.slice(1),E.bools))l=s.slice(1),F(l,L(l));else if(s==="--"){I=f.slice(C+1);break}else if(i["halt-at-non-option"]){I=f.slice(C);break}else U(s)}W(A,!0),W(A,!1),Y(A),z(),gt(A,E.aliases,m,!0),vt(A),i["set-placeholder-key"]&&bt(A),Object.keys(E.counts).forEach(function(C){Q(A,C.split("."))||F(C,0)}),y&&I.length&&(A[b]=[]),I.forEach(function(C){A[b].push(C)}),i["camel-case-expansion"]&&i["strip-dashed"]&&Object.keys(A).filter(C=>C!=="--"&&C.includes("-")).forEach(C=>{delete A[C]}),i["strip-aliased"]&&[].concat(...Object.keys(t).map(C=>t[C])).forEach(C=>{i["camel-case-expansion"]&&C.includes("-")&&delete A[C.split(".").map(s=>At(s)).join(".")],delete A[C]});function U(C){const s=$("_",C);(typeof s=="string"||typeof s=="number")&&A._.push(s)}function B(C,s,e,r){let l,v=k(s,E.nargs);if(v=typeof v!="number"||isNaN(v)?1:v,v===0)return H(r)||(p=Error(_("Argument unexpected for: %s",s))),F(s,L(s)),C;let M=H(r)?0:1;if(i["nargs-eats-options"])e.length-(C+1)+M<v&&(p=Error(_("Not enough arguments following: %s",s))),M=v;else{for(l=C+1;l<e.length&&(!e[l].match(/^-[^0-9]/)||e[l].match(D)||d(e[l]));l++)M++;M<v&&(p=Error(_("Not enough arguments following: %s",s)))}let P=Math.min(M,v);for(!H(r)&&P>0&&(F(s,r),P--),l=C+1;l<P+C+1;l++)F(s,e[l]);return C+P}function h(C,s,e,r){let l=[],v=r||e[C+1];const M=k(s,E.nargs);if(k(s,E.bools)&&!/^(true|false)$/.test(v))l.push(!0);else if(H(v)||H(r)&&/^-/.test(v)&&!D.test(v)&&!d(v)){if(m[s]!==void 0){const P=m[s];l=Array.isArray(P)?P:[P]}}else{H(r)||l.push(X(s,r,!0));for(let P=C+1;P<e.length&&!(!i["greedy-arrays"]&&l.length>0||M&&typeof M=="number"&&l.length>=M||(v=e[P],/^-/.test(v)&&!D.test(v)&&!d(v)));P++)C=P,l.push(X(s,v,o))}return typeof M=="number"&&(M&&l.length<M||isNaN(M)&&l.length===0)&&(p=Error(_("Not enough arguments following: %s",s))),F(s,l),C}function F(C,s,e=o){if(/-/.test(C)&&i["camel-case-expansion"]){const v=C.split(".").map(function(M){return At(M)}).join(".");R(C,v)}const r=X(C,s,e),l=C.split(".");et(A,l,r),E.aliases[C]&&E.aliases[C].forEach(function(v){const M=v.split(".");et(A,M,r)}),l.length>1&&i["dot-notation"]&&(E.aliases[l[0]]||[]).forEach(function(v){let M=v.split(".");const P=[].concat(l);P.shift(),M=M.concat(P),(E.aliases[C]||[]).includes(M.join("."))||et(A,M,r)}),k(C,E.normalize)&&!k(C,E.arrays)&&[C].concat(E.aliases[C]||[]).forEach(function(M){Object.defineProperty(j,M,{enumerable:!0,get(){return s},set(P){s=typeof P=="string"?pt.normalize(P):P}})})}function R(C,s){E.aliases[C]&&E.aliases[C].length||(E.aliases[C]=[s],x[s]=!0),E.aliases[s]&&E.aliases[s].length||R(s,C)}function X(C,s,e){e&&(s=ti(s)),(k(C,E.bools)||k(C,E.counts))&&typeof s=="string"&&(s=s==="true");let r=Array.isArray(s)?s.map(function(l){return $(C,l)}):$(C,s);return k(C,E.counts)&&(H(r)||typeof r=="boolean")&&(r=Rt()),k(C,E.normalize)&&k(C,E.arrays)&&(Array.isArray(s)?r=s.map(l=>pt.normalize(l)):r=pt.normalize(s)),r}function $(C,s){return!i["parse-positional-numbers"]&&C==="_"||!k(C,E.strings)&&!k(C,E.bools)&&!Array.isArray(s)&&(Kn(s)&&i["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${s}`)))||!H(s)&&k(C,E.numbers))&&(s=Number(s)),s}function Y(C){const s=Object.create(null);gt(s,E.aliases,m),Object.keys(E.configs).forEach(function(e){const r=C[e]||s[e];if(r)try{let l=null;const v=pt.resolve(pt.cwd(),r),M=E.configs[e];if(typeof M=="function"){try{l=M(v)}catch(P){l=P}if(l instanceof Error){p=l;return}}else l=pt.require(v);J(l)}catch(l){l.name==="PermissionDenied"?p=l:C[e]&&(p=Error(_("Invalid JSON config file: %s",r)))}})}function J(C,s){Object.keys(C).forEach(function(e){const r=C[e],l=s?s+"."+e:e;typeof r=="object"&&r!==null&&!Array.isArray(r)&&i["dot-notation"]?J(r,l):(!Q(A,l.split("."))||k(l,E.arrays)&&i["combine-arrays"])&&F(l,r)})}function z(){typeof N<"u"&&N.forEach(function(C){J(C)})}function W(C,s){if(typeof w>"u")return;const e=typeof w=="string"?w:"",r=pt.env();Object.keys(r).forEach(function(l){if(e===""||l.lastIndexOf(e,0)===0){const v=l.split("__").map(function(M,P){return P===0&&(M=M.substring(e.length)),At(M)});(s&&E.configs[v.join(".")]||!s)&&!Q(C,v)&&F(v.join("."),r[l])}})}function vt(C){let s;const e=new Set;Object.keys(C).forEach(function(r){if(!e.has(r)&&(s=k(r,E.coercions),typeof s=="function"))try{const l=$(r,s(C[r]));[].concat(E.aliases[r]||[],r).forEach(v=>{e.add(v),C[v]=l})}catch(l){p=l}})}function bt(C){return E.keys.forEach(s=>{~s.indexOf(".")||typeof C[s]>"u"&&(C[s]=void 0)}),C}function gt(C,s,e,r=!1){Object.keys(e).forEach(function(l){Q(C,l.split("."))||(et(C,l.split("."),e[l]),r&&(O[l]=!0),(s[l]||[]).forEach(function(v){Q(C,v.split("."))||et(C,v.split("."),e[l])}))})}function Q(C,s){let e=C;i["dot-notation"]||(s=[s.join(".")]),s.slice(0,-1).forEach(function(l){e=e[l]||{}});const r=s[s.length-1];return typeof e!="object"?!1:r in e}function et(C,s,e){let r=C;i["dot-notation"]||(s=[s.join(".")]),s.slice(0,-1).forEach(function(q){q=Ze(q),typeof r=="object"&&r[q]===void 0&&(r[q]={}),typeof r[q]!="object"||Array.isArray(r[q])?(Array.isArray(r[q])?r[q].push({}):r[q]=[r[q],{}],r=r[q][r[q].length-1]):r=r[q]});const l=Ze(s[s.length-1]),v=k(s.join("."),E.arrays),M=Array.isArray(e);let P=i["duplicate-arguments-array"];!P&&k(l,E.nargs)&&(P=!0,(!H(r[l])&&E.nargs[l]===1||Array.isArray(r[l])&&r[l].length===E.nargs[l])&&(r[l]=void 0)),e===Rt()?r[l]=Rt(r[l]):Array.isArray(r[l])?P&&v&&M?r[l]=i["flatten-duplicate-arrays"]?r[l].concat(e):(Array.isArray(r[l][0])?r[l]:[r[l]]).concat([e]):!P&&!!v==!!M?r[l]=e:r[l]=r[l].concat([e]):r[l]===void 0&&v?r[l]=M?e:[e]:P&&!(r[l]===void 0||k(l,E.counts)||k(l,E.bools))?r[l]=[r[l],e]:r[l]=e}function Tt(...C){C.forEach(function(s){Object.keys(s||{}).forEach(function(e){E.aliases[e]||(E.aliases[e]=[].concat(t[e]||[]),E.aliases[e].concat(e).forEach(function(r){if(/-/.test(r)&&i["camel-case-expansion"]){const l=At(r);l!==e&&E.aliases[e].indexOf(l)===-1&&(E.aliases[e].push(l),x[l]=!0)}}),E.aliases[e].concat(e).forEach(function(r){if(r.length>1&&/[A-Z]/.test(r)&&i["camel-case-expansion"]){const l=zn(r,"-");l!==e&&E.aliases[e].indexOf(l)===-1&&(E.aliases[e].push(l),x[l]=!0)}}),E.aliases[e].forEach(function(r){E.aliases[r]=[e].concat(E.aliases[e].filter(function(l){return r!==l}))}))})})}function k(C,s){const e=[].concat(E.aliases[C]||[],C),r=Object.keys(s),l=e.find(v=>r.includes(v));return l?s[l]:!1}function wt(C){const s=Object.keys(E);return[].concat(s.map(r=>E[r])).some(function(r){return Array.isArray(r)?r.includes(C):r[C]})}function It(C,...s){return[].concat(...s).some(function(r){const l=C.match(r);return l&&wt(l[1])})}function g(C){if(C.match(D)||!C.match(/^-[^-]+/))return!1;let s=!0,e;const r=C.slice(1).split("");for(let l=0;l<r.length;l++){if(e=C.slice(l+2),!wt(r[l])){s=!1;break}if(r[l+1]&&r[l+1]==="="||e==="-"||/[A-Za-z]/.test(r[l])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(e)||r[l+1]&&r[l+1].match(/\W/))break}return s}function d(C){return i["unknown-options-as-args"]&&S(C)}function S(C){return C=C.replace(/^-{3,}/,"--"),C.match(D)||g(C)?!1:!It(C,/^-+([^=]+?)=[\s\S]*$/,T,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function L(C){return!k(C,E.bools)&&!k(C,E.counts)&&`${C}`in m?m[C]:K(tt(C))}function K(C){return{[ft.BOOLEAN]:!0,[ft.STRING]:"",[ft.NUMBER]:void 0,[ft.ARRAY]:[]}[C]}function tt(C){let s=ft.BOOLEAN;return k(C,E.strings)?s=ft.STRING:k(C,E.numbers)?s=ft.NUMBER:k(C,E.bools)?s=ft.BOOLEAN:k(C,E.arrays)&&(s=ft.ARRAY),s}function H(C){return C===void 0}function it(){Object.keys(E.counts).find(C=>k(C,E.arrays)?(p=Error(_("Invalid configuration: %s, opts.count excludes opts.array.",C)),!0):k(C,E.nargs)?(p=Error(_("Invalid configuration: %s, opts.count excludes opts.narg.",C)),!0):!1)}return{aliases:Object.assign({},E.aliases),argv:Object.assign(j,A),configuration:i,defaulted:Object.assign({},O),error:p,newAliases:Object.assign({},x)}}}function Zn(u){const n=[],c=Object.create(null);let a=!0;for(Object.keys(u).forEach(function(f){n.push([].concat(u[f],f))});a;){a=!1;for(let f=0;f<n.length;f++)for(let o=f+1;o<n.length;o++)if(n[f].filter(function(i){return n[o].indexOf(i)!==-1}).length){n[f]=n[f].concat(n[o]),n.splice(o,1),a=!0;break}}return n.forEach(function(f){f=f.filter(function(t,i,m){return m.indexOf(t)===i});const o=f.pop();o!==void 0&&typeof o=="string"&&(c[o]=f)}),c}function Rt(u){return u!==void 0?u+1:1}function Ze(u){return u==="__proto__"?"___proto___":u}function ti(u){return typeof u=="string"&&(u[0]==="'"||u[0]==='"')&&u[u.length-1]===u[0]?u.substring(1,u.length-1):u}/**
21
21
  * @fileoverview Main entrypoint for libraries using yargs-parser in Node.js
22
22
  * CJS and ESM environments.
23
23
  *
@@ -25,21 +25,21 @@ import Ye from"os";import{readFileSync as Oe,writeFile as mn,statSync as yn,read
25
25
  * Copyright (c) 2016, Contributors
26
26
  * SPDX-License-Identifier: ISC
27
27
  */var jt,Ut,Xt;const tr=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,er=(Ut=(jt=process==null?void 0:process.versions)===null||jt===void 0?void 0:jt.node)!==null&&Ut!==void 0?Ut:(Xt=process==null?void 0:process.version)===null||Xt===void 0?void 0:Xt.slice(1);if(er&&Number(er.match(/^([^.]+)/)[1])<tr)throw Error(`yargs parser supports a minimum Node.js version of ${tr}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);const ei=process?process.env:{};new Jn({cwd:process.cwd,env:()=>ei,format:Gr,normalize:Ln,resolve:Ce,require:u=>{if(typeof require<"u")return require(u);if(u.match(/\.json$/))return JSON.parse(Oe(u,"utf8"));throw Error("only .json config files are supported in ESM")}});const ri={fs:{readFileSync:Oe,writeFile:mn},format:Gr,resolve:Ce,exists:u=>{try{return yn(u).isFile()}catch{return!1}}};let lt;class ni{constructor(n){n=n||{},this.directory=n.directory||"./locales",this.updateFiles=typeof n.updateFiles=="boolean"?n.updateFiles:!0,this.locale=n.locale||"en",this.fallbackToLanguage=typeof n.fallbackToLanguage=="boolean"?n.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...n){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);const c=n.shift();let a=function(){};return typeof n[n.length-1]=="function"&&(a=n.pop()),a=a||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][c]&&this.updateFiles?(this.cache[this.locale][c]=c,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:a})):a(),lt.format.apply(lt.format,[this.cache[this.locale][c]||c].concat(n))}__n(){const n=Array.prototype.slice.call(arguments),c=n.shift(),a=n.shift(),f=n.shift();let o=function(){};typeof n[n.length-1]=="function"&&(o=n.pop()),this.cache[this.locale]||this._readLocaleFile();let t=f===1?c:a;this.cache[this.locale][c]&&(t=this.cache[this.locale][c][f===1?"one":"other"]),!this.cache[this.locale][c]&&this.updateFiles?(this.cache[this.locale][c]={one:c,other:a},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:o})):o();const i=[t];return~t.indexOf("%d")&&i.push(f),lt.format.apply(lt.format,i.concat(n))}setLocale(n){this.locale=n}getLocale(){return this.locale}updateLocale(n){this.cache[this.locale]||this._readLocaleFile();for(const c in n)Object.prototype.hasOwnProperty.call(n,c)&&(this.cache[this.locale][c]=n[c])}_taggedLiteral(n,...c){let a="";return n.forEach(function(f,o){const t=c[o+1];a+=f,typeof t<"u"&&(a+="%s")}),this.__.apply(this,[a].concat([].slice.call(c,1)))}_enqueueWrite(n){this.writeQueue.push(n),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){const n=this,c=this.writeQueue[0],a=c.directory,f=c.locale,o=c.cb,t=this._resolveLocaleFile(a,f),i=JSON.stringify(this.cache[f],null,2);lt.fs.writeFile(t,i,"utf-8",function(m){n.writeQueue.shift(),n.writeQueue.length>0&&n._processWriteQueue(),o(m)})}_readLocaleFile(){let n={};const c=this._resolveLocaleFile(this.directory,this.locale);try{lt.fs.readFileSync&&(n=JSON.parse(lt.fs.readFileSync(c,"utf-8")))}catch(a){if(a instanceof SyntaxError&&(a.message="syntax error in "+c),a.code==="ENOENT")n={};else throw a}this.cache[this.locale]=n}_resolveLocaleFile(n,c){let a=lt.resolve(n,"./",c+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(a)&&~c.lastIndexOf("_")){const f=lt.resolve(n,"./",c.split("_")[0]+".json");this._fileExistsSync(f)&&(a=f)}return a}_fileExistsSync(n){return lt.exists(n)}}function ii(u,n){lt=n;const c=new ni(u);return{__:c.__.bind(c),__n:c.__n.bind(c),setLocale:c.setLocale.bind(c),getLocale:c.getLocale.bind(c),updateLocale:c.updateLocale.bind(c),locale:c.locale}}const oi=u=>ii(u,ri);let Ot;try{Ot=_n(import.meta.url)}catch{Ot=process.cwd()}const si=Ot.substring(0,Ot.lastIndexOf("node_modules"));si||process.cwd(),process.cwd,process.exit,process.nextTick,typeof process.stdout.columns<"u"&&process.stdout.columns,oi({directory:Ce(Ot,"../../../locales"),updateFiles:!1});var qt={},rr;function _e(){return rr||(rr=1,function(){qt.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
28
- `},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}.call(G)),qt}var kt={},dt={},mt={},nr;function yt(){return nr||(nr=1,function(){var u,n,c,a,f,o,t,i=[].slice,m={}.hasOwnProperty;u=function(){var N,w,g,b,x,O;if(O=arguments[0],x=2<=arguments.length?i.call(arguments,1):[],f(Object.assign))Object.assign.apply(null,arguments);else for(N=0,g=x.length;N<g;N++)if(b=x[N],b!=null)for(w in b)m.call(b,w)&&(O[w]=b[w]);return O},f=function(N){return!!N&&Object.prototype.toString.call(N)==="[object Function]"},o=function(N){var w;return!!N&&((w=typeof N)=="function"||w==="object")},c=function(N){return f(Array.isArray)?Array.isArray(N):Object.prototype.toString.call(N)==="[object Array]"},a=function(N){var w;if(c(N))return!N.length;for(w in N)if(m.call(N,w))return!1;return!0},t=function(N){var w,g;return o(N)&&(g=Object.getPrototypeOf(N))&&(w=g.constructor)&&typeof w=="function"&&w instanceof w&&Function.prototype.toString.call(w)===Function.prototype.toString.call(Object)},n=function(N){return f(N.valueOf)?N.valueOf():N},mt.assign=u,mt.isFunction=f,mt.isObject=o,mt.isArray=c,mt.isEmpty=a,mt.isPlainObject=t,mt.getValue=n}.call(G)),mt}var Vt={exports:{}},ir;function sn(){return ir||(ir=1,function(){Vt.exports=function(){function u(){}return u.prototype.hasFeature=function(n,c){return!0},u.prototype.createDocumentType=function(n,c,a){throw new Error("This DOM method is not implemented.")},u.prototype.createDocument=function(n,c,a){throw new Error("This DOM method is not implemented.")},u.prototype.createHTMLDocument=function(n){throw new Error("This DOM method is not implemented.")},u.prototype.getFeature=function(n,c){throw new Error("This DOM method is not implemented.")},u}()}.call(G)),Vt.exports}var $t={exports:{}},Wt={exports:{}},Ht={exports:{}},or;function ai(){return or||(or=1,function(){Ht.exports=function(){function u(){}return u.prototype.handleError=function(n){throw new Error(n)},u}()}.call(G)),Ht.exports}var Gt={exports:{}},sr;function ui(){return sr||(sr=1,function(){Gt.exports=function(){function u(n){this.arr=n||[]}return Object.defineProperty(u.prototype,"length",{get:function(){return this.arr.length}}),u.prototype.item=function(n){return this.arr[n]||null},u.prototype.contains=function(n){return this.arr.indexOf(n)!==-1},u}()}.call(G)),Gt.exports}var ar;function ci(){return ar||(ar=1,function(){var u,n;u=ai(),n=ui(),Wt.exports=function(){function c(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new u,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Object.create(this.defaultParams)}return Object.defineProperty(c.prototype,"parameterNames",{get:function(){return new n(Object.keys(this.defaultParams))}}),c.prototype.getParameter=function(a){return this.params.hasOwnProperty(a)?this.params[a]:null},c.prototype.canSetParameter=function(a,f){return!0},c.prototype.setParameter=function(a,f){return f!=null?this.params[a]=f:delete this.params[a]},c}()}.call(G)),Wt.exports}var Yt={exports:{}},zt={exports:{}},Kt={exports:{}},ur;function ot(){return ur||(ur=1,function(){Kt.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}.call(G)),Kt.exports}var Qt={exports:{}},cr;function an(){return cr||(cr=1,function(){var u;u=ot(),ct(),Qt.exports=function(){function n(c,a,f){if(this.parent=c,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),a==null)throw new Error("Missing attribute name. "+this.debugInfo(a));this.name=this.stringify.name(a),this.value=this.stringify.attValue(f),this.type=u.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(n.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(n.prototype,"textContent",{get:function(){return this.value},set:function(c){return this.value=c||""}}),Object.defineProperty(n.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(n.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(n.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(n.prototype,"specified",{get:function(){return!0}}),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(c){return this.options.writer.attribute(this,this.options.writer.filterOptions(c))},n.prototype.debugInfo=function(c){return c=c||this.name,c==null?"parent: <"+this.parent.name+">":"attribute: {"+c+"}, parent: <"+this.parent.name+">"},n.prototype.isEqualNode=function(c){return!(c.namespaceURI!==this.namespaceURI||c.prefix!==this.prefix||c.localName!==this.localName||c.value!==this.value)},n}()}.call(G)),Qt.exports}var Jt={exports:{}},lr;function Me(){return lr||(lr=1,function(){Jt.exports=function(){function u(n){this.nodes=n}return Object.defineProperty(u.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),u.prototype.clone=function(){return this.nodes=null},u.prototype.getNamedItem=function(n){return this.nodes[n]},u.prototype.setNamedItem=function(n){var c;return c=this.nodes[n.nodeName],this.nodes[n.nodeName]=n,c||null},u.prototype.removeNamedItem=function(n){var c;return c=this.nodes[n],delete this.nodes[n],c||null},u.prototype.item=function(n){return this.nodes[Object.keys(this.nodes)[n]]||null},u.prototype.getNamedItemNS=function(n,c){throw new Error("This DOM method is not implemented.")},u.prototype.setNamedItemNS=function(n){throw new Error("This DOM method is not implemented.")},u.prototype.removeNamedItemNS=function(n,c){throw new Error("This DOM method is not implemented.")},u}()}.call(G)),Jt.exports}var fr;function Pe(){return fr||(fr=1,function(){var u,n,c,a,f,o,t,i,m=function(w,g){for(var b in g)N.call(g,b)&&(w[b]=g[b]);function x(){this.constructor=w}return x.prototype=g.prototype,w.prototype=new x,w.__super__=g.prototype,w},N={}.hasOwnProperty;i=yt(),t=i.isObject,o=i.isFunction,f=i.getValue,a=ct(),u=ot(),n=an(),c=Me(),zt.exports=function(w){m(g,w);function g(b,x,O){var _,E,D,T;if(g.__super__.constructor.call(this,b),x==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(x),this.type=u.Element,this.attribs={},this.schemaTypeInfo=null,O!=null&&this.attribute(O),b.type===u.Document&&(this.isRoot=!0,this.documentObject=b,b.rootObject=this,b.children)){for(T=b.children,E=0,D=T.length;E<D;E++)if(_=T[E],_.type===u.DocType){_.name=this.name;break}}}return Object.defineProperty(g.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(g.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(g.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(g.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(g.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(g.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(g.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(g.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new c(this.attribs)),this.attributeMap}}),g.prototype.clone=function(){var b,x,O,_;O=Object.create(this),O.isRoot&&(O.documentObject=null),O.attribs={},_=this.attribs;for(x in _)N.call(_,x)&&(b=_[x],O.attribs[x]=b.clone());return O.children=[],this.children.forEach(function(E){var D;return D=E.clone(),D.parent=O,O.children.push(D)}),O},g.prototype.attribute=function(b,x){var O,_;if(b!=null&&(b=f(b)),t(b))for(O in b)N.call(b,O)&&(_=b[O],this.attribute(O,_));else o(x)&&(x=x.apply()),this.options.keepNullAttributes&&x==null?this.attribs[b]=new n(this,b,""):x!=null&&(this.attribs[b]=new n(this,b,x));return this},g.prototype.removeAttribute=function(b){var x,O,_;if(b==null)throw new Error("Missing attribute name. "+this.debugInfo());if(b=f(b),Array.isArray(b))for(O=0,_=b.length;O<_;O++)x=b[O],delete this.attribs[x];else delete this.attribs[b];return this},g.prototype.toString=function(b){return this.options.writer.element(this,this.options.writer.filterOptions(b))},g.prototype.att=function(b,x){return this.attribute(b,x)},g.prototype.a=function(b,x){return this.attribute(b,x)},g.prototype.getAttribute=function(b){return this.attribs.hasOwnProperty(b)?this.attribs[b].value:null},g.prototype.setAttribute=function(b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNode=function(b){return this.attribs.hasOwnProperty(b)?this.attribs[b]:null},g.prototype.setAttributeNode=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.removeAttributeNode=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagName=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNS=function(b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setAttributeNS=function(b,x,O){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.removeAttributeNS=function(b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNodeNS=function(b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setAttributeNodeNS=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagNameNS=function(b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.hasAttribute=function(b){return this.attribs.hasOwnProperty(b)},g.prototype.hasAttributeNS=function(b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setIdAttribute=function(b,x){return this.attribs.hasOwnProperty(b)?this.attribs[b].isId:x},g.prototype.setIdAttributeNS=function(b,x,O){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setIdAttributeNode=function(b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagName=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagNameNS=function(b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByClassName=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.isEqualNode=function(b){var x,O,_;if(!g.__super__.isEqualNode.apply(this,arguments).isEqualNode(b)||b.namespaceURI!==this.namespaceURI||b.prefix!==this.prefix||b.localName!==this.localName||b.attribs.length!==this.attribs.length)return!1;for(x=O=0,_=this.attribs.length-1;0<=_?O<=_:O>=_;x=0<=_?++O:--O)if(!this.attribs[x].isEqualNode(b.attribs[x]))return!1;return!0},g}(a)}.call(G)),zt.exports}var Zt={exports:{}},te={exports:{}},hr;function St(){return hr||(hr=1,function(){var u,n=function(a,f){for(var o in f)c.call(f,o)&&(a[o]=f[o]);function t(){this.constructor=a}return t.prototype=f.prototype,a.prototype=new t,a.__super__=f.prototype,a},c={}.hasOwnProperty;u=ct(),te.exports=function(a){n(f,a);function f(o){f.__super__.constructor.call(this,o),this.value=""}return Object.defineProperty(f.prototype,"data",{get:function(){return this.value},set:function(o){return this.value=o||""}}),Object.defineProperty(f.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(f.prototype,"textContent",{get:function(){return this.value},set:function(o){return this.value=o||""}}),f.prototype.clone=function(){return Object.create(this)},f.prototype.substringData=function(o,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.appendData=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.insertData=function(o,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.deleteData=function(o,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.replaceData=function(o,t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.isEqualNode=function(o){return!(!f.__super__.isEqualNode.apply(this,arguments).isEqualNode(o)||o.data!==this.data)},f}(u)}.call(G)),te.exports}var pr;function Fe(){return pr||(pr=1,function(){var u,n,c=function(f,o){for(var t in o)a.call(o,t)&&(f[t]=o[t]);function i(){this.constructor=f}return i.prototype=o.prototype,f.prototype=new i,f.__super__=o.prototype,f},a={}.hasOwnProperty;u=ot(),n=St(),Zt.exports=function(f){c(o,f);function o(t,i){if(o.__super__.constructor.call(this,t),i==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=u.CData,this.value=this.stringify.cdata(i)}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(t){return this.options.writer.cdata(this,this.options.writer.filterOptions(t))},o}(n)}.call(G)),Zt.exports}var ee={exports:{}},dr;function Se(){return dr||(dr=1,function(){var u,n,c=function(f,o){for(var t in o)a.call(o,t)&&(f[t]=o[t]);function i(){this.constructor=f}return i.prototype=o.prototype,f.prototype=new i,f.__super__=o.prototype,f},a={}.hasOwnProperty;u=ot(),n=St(),ee.exports=function(f){c(o,f);function o(t,i){if(o.__super__.constructor.call(this,t),i==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=u.Comment,this.value=this.stringify.comment(i)}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(t){return this.options.writer.comment(this,this.options.writer.filterOptions(t))},o}(n)}.call(G)),ee.exports}var re={exports:{}},mr;function Be(){return mr||(mr=1,function(){var u,n,c,a=function(o,t){for(var i in t)f.call(t,i)&&(o[i]=t[i]);function m(){this.constructor=o}return m.prototype=t.prototype,o.prototype=new m,o.__super__=t.prototype,o},f={}.hasOwnProperty;c=yt().isObject,n=ct(),u=ot(),re.exports=function(o){a(t,o);function t(i,m,N,w){var g;t.__super__.constructor.call(this,i),c(m)&&(g=m,m=g.version,N=g.encoding,w=g.standalone),m||(m="1.0"),this.type=u.Declaration,this.version=this.stringify.xmlVersion(m),N!=null&&(this.encoding=this.stringify.xmlEncoding(N)),w!=null&&(this.standalone=this.stringify.xmlStandalone(w))}return t.prototype.toString=function(i){return this.options.writer.declaration(this,this.options.writer.filterOptions(i))},t}(n)}.call(G)),re.exports}var ne={exports:{}},ie={exports:{}},yr;function Re(){return yr||(yr=1,function(){var u,n,c=function(f,o){for(var t in o)a.call(o,t)&&(f[t]=o[t]);function i(){this.constructor=f}return i.prototype=o.prototype,f.prototype=new i,f.__super__=o.prototype,f},a={}.hasOwnProperty;n=ct(),u=ot(),ie.exports=function(f){c(o,f);function o(t,i,m,N,w,g){if(o.__super__.constructor.call(this,t),i==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(m==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(i));if(!N)throw new Error("Missing DTD attribute type. "+this.debugInfo(i));if(!w)throw new Error("Missing DTD attribute default. "+this.debugInfo(i));if(w.indexOf("#")!==0&&(w="#"+w),!w.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(i));if(g&&!w.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(i));this.elementName=this.stringify.name(i),this.type=u.AttributeDeclaration,this.attributeName=this.stringify.name(m),this.attributeType=this.stringify.dtdAttType(N),g&&(this.defaultValue=this.stringify.dtdAttDefault(g)),this.defaultValueType=w}return o.prototype.toString=function(t){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(t))},o}(n)}.call(G)),ie.exports}var oe={exports:{}},gr;function je(){return gr||(gr=1,function(){var u,n,c,a=function(o,t){for(var i in t)f.call(t,i)&&(o[i]=t[i]);function m(){this.constructor=o}return m.prototype=t.prototype,o.prototype=new m,o.__super__=t.prototype,o},f={}.hasOwnProperty;c=yt().isObject,n=ct(),u=ot(),oe.exports=function(o){a(t,o);function t(i,m,N,w){if(t.__super__.constructor.call(this,i),N==null)throw new Error("Missing DTD entity name. "+this.debugInfo(N));if(w==null)throw new Error("Missing DTD entity value. "+this.debugInfo(N));if(this.pe=!!m,this.name=this.stringify.name(N),this.type=u.EntityDeclaration,!c(w))this.value=this.stringify.dtdEntityValue(w),this.internal=!0;else{if(!w.pubID&&!w.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(N));if(w.pubID&&!w.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(N));if(this.internal=!1,w.pubID!=null&&(this.pubID=this.stringify.dtdPubID(w.pubID)),w.sysID!=null&&(this.sysID=this.stringify.dtdSysID(w.sysID)),w.nData!=null&&(this.nData=this.stringify.dtdNData(w.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(N))}}return Object.defineProperty(t.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(t.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(t.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(t.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(t.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(t.prototype,"xmlVersion",{get:function(){return null}}),t.prototype.toString=function(i){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(i))},t}(n)}.call(G)),oe.exports}var se={exports:{}},wr;function Ue(){return wr||(wr=1,function(){var u,n,c=function(f,o){for(var t in o)a.call(o,t)&&(f[t]=o[t]);function i(){this.constructor=f}return i.prototype=o.prototype,f.prototype=new i,f.__super__=o.prototype,f},a={}.hasOwnProperty;n=ct(),u=ot(),se.exports=function(f){c(o,f);function o(t,i,m){if(o.__super__.constructor.call(this,t),i==null)throw new Error("Missing DTD element name. "+this.debugInfo());m||(m="(#PCDATA)"),Array.isArray(m)&&(m="("+m.join(",")+")"),this.name=this.stringify.name(i),this.type=u.ElementDeclaration,this.value=this.stringify.dtdElementValue(m)}return o.prototype.toString=function(t){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(t))},o}(n)}.call(G)),se.exports}var ae={exports:{}},br;function Xe(){return br||(br=1,function(){var u,n,c=function(f,o){for(var t in o)a.call(o,t)&&(f[t]=o[t]);function i(){this.constructor=f}return i.prototype=o.prototype,f.prototype=new i,f.__super__=o.prototype,f},a={}.hasOwnProperty;n=ct(),u=ot(),ae.exports=function(f){c(o,f);function o(t,i,m){if(o.__super__.constructor.call(this,t),i==null)throw new Error("Missing DTD notation name. "+this.debugInfo(i));if(!m.pubID&&!m.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(i));this.name=this.stringify.name(i),this.type=u.NotationDeclaration,m.pubID!=null&&(this.pubID=this.stringify.dtdPubID(m.pubID)),m.sysID!=null&&(this.sysID=this.stringify.dtdSysID(m.sysID))}return Object.defineProperty(o.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(o.prototype,"systemId",{get:function(){return this.sysID}}),o.prototype.toString=function(t){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(t))},o}(n)}.call(G)),ae.exports}var Er;function qe(){return Er||(Er=1,function(){var u,n,c,a,f,o,t,i,m=function(w,g){for(var b in g)N.call(g,b)&&(w[b]=g[b]);function x(){this.constructor=w}return x.prototype=g.prototype,w.prototype=new x,w.__super__=g.prototype,w},N={}.hasOwnProperty;i=yt().isObject,t=ct(),u=ot(),n=Re(),a=je(),c=Ue(),f=Xe(),o=Me(),ne.exports=function(w){m(g,w);function g(b,x,O){var _,E,D,T,p,I;if(g.__super__.constructor.call(this,b),this.type=u.DocType,b.children){for(T=b.children,E=0,D=T.length;E<D;E++)if(_=T[E],_.type===u.Element){this.name=_.name;break}}this.documentObject=b,i(x)&&(p=x,x=p.pubID,O=p.sysID),O==null&&(I=[x,O],O=I[0],x=I[1]),x!=null&&(this.pubID=this.stringify.dtdPubID(x)),O!=null&&(this.sysID=this.stringify.dtdSysID(O))}return Object.defineProperty(g.prototype,"entities",{get:function(){var b,x,O,_,E;for(_={},E=this.children,x=0,O=E.length;x<O;x++)b=E[x],b.type===u.EntityDeclaration&&!b.pe&&(_[b.name]=b);return new o(_)}}),Object.defineProperty(g.prototype,"notations",{get:function(){var b,x,O,_,E;for(_={},E=this.children,x=0,O=E.length;x<O;x++)b=E[x],b.type===u.NotationDeclaration&&(_[b.name]=b);return new o(_)}}),Object.defineProperty(g.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(g.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(g.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),g.prototype.element=function(b,x){var O;return O=new c(this,b,x),this.children.push(O),this},g.prototype.attList=function(b,x,O,_,E){var D;return D=new n(this,b,x,O,_,E),this.children.push(D),this},g.prototype.entity=function(b,x){var O;return O=new a(this,!1,b,x),this.children.push(O),this},g.prototype.pEntity=function(b,x){var O;return O=new a(this,!0,b,x),this.children.push(O),this},g.prototype.notation=function(b,x){var O;return O=new f(this,b,x),this.children.push(O),this},g.prototype.toString=function(b){return this.options.writer.docType(this,this.options.writer.filterOptions(b))},g.prototype.ele=function(b,x){return this.element(b,x)},g.prototype.att=function(b,x,O,_,E){return this.attList(b,x,O,_,E)},g.prototype.ent=function(b,x){return this.entity(b,x)},g.prototype.pent=function(b,x){return this.pEntity(b,x)},g.prototype.not=function(b,x){return this.notation(b,x)},g.prototype.up=function(){return this.root()||this.documentObject},g.prototype.isEqualNode=function(b){return!(!g.__super__.isEqualNode.apply(this,arguments).isEqualNode(b)||b.name!==this.name||b.publicId!==this.publicId||b.systemId!==this.systemId)},g}(t)}.call(G)),ne.exports}var ue={exports:{}},Tr;function ke(){return Tr||(Tr=1,function(){var u,n,c=function(f,o){for(var t in o)a.call(o,t)&&(f[t]=o[t]);function i(){this.constructor=f}return i.prototype=o.prototype,f.prototype=new i,f.__super__=o.prototype,f},a={}.hasOwnProperty;u=ot(),n=ct(),ue.exports=function(f){c(o,f);function o(t,i){if(o.__super__.constructor.call(this,t),i==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=u.Raw,this.value=this.stringify.raw(i)}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(t){return this.options.writer.raw(this,this.options.writer.filterOptions(t))},o}(n)}.call(G)),ue.exports}var ce={exports:{}},xr;function Ve(){return xr||(xr=1,function(){var u,n,c=function(f,o){for(var t in o)a.call(o,t)&&(f[t]=o[t]);function i(){this.constructor=f}return i.prototype=o.prototype,f.prototype=new i,f.__super__=o.prototype,f},a={}.hasOwnProperty;u=ot(),n=St(),ce.exports=function(f){c(o,f);function o(t,i){if(o.__super__.constructor.call(this,t),i==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=u.Text,this.value=this.stringify.text(i)}return Object.defineProperty(o.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(o.prototype,"wholeText",{get:function(){var t,i,m;for(m="",i=this.previousSibling;i;)m=i.data+m,i=i.previousSibling;for(m+=this.data,t=this.nextSibling;t;)m=m+t.data,t=t.nextSibling;return m}}),o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(t){return this.options.writer.text(this,this.options.writer.filterOptions(t))},o.prototype.splitText=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.replaceWholeText=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o}(n)}.call(G)),ce.exports}var le={exports:{}},Dr;function $e(){return Dr||(Dr=1,function(){var u,n,c=function(f,o){for(var t in o)a.call(o,t)&&(f[t]=o[t]);function i(){this.constructor=f}return i.prototype=o.prototype,f.prototype=new i,f.__super__=o.prototype,f},a={}.hasOwnProperty;u=ot(),n=St(),le.exports=function(f){c(o,f);function o(t,i,m){if(o.__super__.constructor.call(this,t),i==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=u.ProcessingInstruction,this.target=this.stringify.insTarget(i),this.name=this.target,m&&(this.value=this.stringify.insValue(m))}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(t){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(t))},o.prototype.isEqualNode=function(t){return!(!o.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)||t.target!==this.target)},o}(n)}.call(G)),le.exports}var fe={exports:{}},vr;function un(){return vr||(vr=1,function(){var u,n,c=function(f,o){for(var t in o)a.call(o,t)&&(f[t]=o[t]);function i(){this.constructor=f}return i.prototype=o.prototype,f.prototype=new i,f.__super__=o.prototype,f},a={}.hasOwnProperty;n=ct(),u=ot(),fe.exports=function(f){c(o,f);function o(t){o.__super__.constructor.call(this,t),this.type=u.Dummy}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(t){return""},o}(n)}.call(G)),fe.exports}var he={exports:{}},Ir;function li(){return Ir||(Ir=1,function(){he.exports=function(){function u(n){this.nodes=n}return Object.defineProperty(u.prototype,"length",{get:function(){return this.nodes.length||0}}),u.prototype.clone=function(){return this.nodes=null},u.prototype.item=function(n){return this.nodes[n]||null},u}()}.call(G)),he.exports}var pe={exports:{}},Nr;function fi(){return Nr||(Nr=1,function(){pe.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}.call(G)),pe.exports}var Or;function ct(){return Or||(Or=1,function(){var u,n,c,a,f,o,t,i,m,N,w,g,b,x,O,_,E,D={}.hasOwnProperty;E=yt(),_=E.isObject,O=E.isFunction,x=E.isEmpty,b=E.getValue,i=null,c=null,a=null,f=null,o=null,w=null,g=null,N=null,t=null,n=null,m=null,u=null,Yt.exports=function(){function T(p){this.parent=p,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,i||(i=Pe(),c=Fe(),a=Se(),f=Be(),o=qe(),w=ke(),g=Ve(),N=$e(),t=un(),n=ot(),m=li(),Me(),u=fi())}return Object.defineProperty(T.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(T.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(T.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(T.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(T.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new m(this.children)),this.childNodeList}}),Object.defineProperty(T.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(T.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(T.prototype,"previousSibling",{get:function(){var p;return p=this.parent.children.indexOf(this),this.parent.children[p-1]||null}}),Object.defineProperty(T.prototype,"nextSibling",{get:function(){var p;return p=this.parent.children.indexOf(this),this.parent.children[p+1]||null}}),Object.defineProperty(T.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(T.prototype,"textContent",{get:function(){var p,I,A,j,U;if(this.nodeType===n.Element||this.nodeType===n.DocumentFragment){for(U="",j=this.children,I=0,A=j.length;I<A;I++)p=j[I],p.textContent&&(U+=p.textContent);return U}else return null},set:function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),T.prototype.setParent=function(p){var I,A,j,U,B;for(this.parent=p,p&&(this.options=p.options,this.stringify=p.stringify),U=this.children,B=[],A=0,j=U.length;A<j;A++)I=U[A],B.push(I.setParent(this));return B},T.prototype.element=function(p,I,A){var j,U,B,h,F,R,X,$,Y,J,z;if(R=null,I===null&&A==null&&(Y=[{},null],I=Y[0],A=Y[1]),I==null&&(I={}),I=b(I),_(I)||(J=[I,A],A=J[0],I=J[1]),p!=null&&(p=b(p)),Array.isArray(p))for(B=0,X=p.length;B<X;B++)U=p[B],R=this.element(U);else if(O(p))R=this.element(p.apply());else if(_(p)){for(F in p)if(D.call(p,F))if(z=p[F],O(z)&&(z=z.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&F.indexOf(this.stringify.convertAttKey)===0)R=this.attribute(F.substr(this.stringify.convertAttKey.length),z);else if(!this.options.separateArrayItems&&Array.isArray(z)&&x(z))R=this.dummy();else if(_(z)&&x(z))R=this.element(F);else if(!this.options.keepNullNodes&&z==null)R=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(z))for(h=0,$=z.length;h<$;h++)U=z[h],j={},j[F]=U,R=this.element(j);else _(z)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&F.indexOf(this.stringify.convertTextKey)===0?R=this.element(z):(R=this.element(F),R.element(z)):R=this.element(F,z)}else!this.options.keepNullNodes&&A===null?R=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&p.indexOf(this.stringify.convertTextKey)===0?R=this.text(A):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&p.indexOf(this.stringify.convertCDataKey)===0?R=this.cdata(A):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&p.indexOf(this.stringify.convertCommentKey)===0?R=this.comment(A):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&p.indexOf(this.stringify.convertRawKey)===0?R=this.raw(A):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&p.indexOf(this.stringify.convertPIKey)===0?R=this.instruction(p.substr(this.stringify.convertPIKey.length),A):R=this.node(p,I,A);if(R==null)throw new Error("Could not create any elements with: "+p+". "+this.debugInfo());return R},T.prototype.insertBefore=function(p,I,A){var j,U,B,h,F;if(p?.type)return B=p,h=I,B.setParent(this),h?(U=children.indexOf(h),F=children.splice(U),children.push(B),Array.prototype.push.apply(children,F)):children.push(B),B;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(p));return U=this.parent.children.indexOf(this),F=this.parent.children.splice(U),j=this.parent.element(p,I,A),Array.prototype.push.apply(this.parent.children,F),j},T.prototype.insertAfter=function(p,I,A){var j,U,B;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(p));return U=this.parent.children.indexOf(this),B=this.parent.children.splice(U+1),j=this.parent.element(p,I,A),Array.prototype.push.apply(this.parent.children,B),j},T.prototype.remove=function(){var p;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return p=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[p,p-p+1].concat([])),this.parent},T.prototype.node=function(p,I,A){var j,U;return p!=null&&(p=b(p)),I||(I={}),I=b(I),_(I)||(U=[I,A],A=U[0],I=U[1]),j=new i(this,p,I),A!=null&&j.text(A),this.children.push(j),j},T.prototype.text=function(p){var I;return _(p)&&this.element(p),I=new g(this,p),this.children.push(I),this},T.prototype.cdata=function(p){var I;return I=new c(this,p),this.children.push(I),this},T.prototype.comment=function(p){var I;return I=new a(this,p),this.children.push(I),this},T.prototype.commentBefore=function(p){var I,A;return I=this.parent.children.indexOf(this),A=this.parent.children.splice(I),this.parent.comment(p),Array.prototype.push.apply(this.parent.children,A),this},T.prototype.commentAfter=function(p){var I,A;return I=this.parent.children.indexOf(this),A=this.parent.children.splice(I+1),this.parent.comment(p),Array.prototype.push.apply(this.parent.children,A),this},T.prototype.raw=function(p){var I;return I=new w(this,p),this.children.push(I),this},T.prototype.dummy=function(){var p;return p=new t(this),p},T.prototype.instruction=function(p,I){var A,j,U,B,h;if(p!=null&&(p=b(p)),I!=null&&(I=b(I)),Array.isArray(p))for(B=0,h=p.length;B<h;B++)A=p[B],this.instruction(A);else if(_(p))for(A in p)D.call(p,A)&&(j=p[A],this.instruction(A,j));else O(I)&&(I=I.apply()),U=new N(this,p,I),this.children.push(U);return this},T.prototype.instructionBefore=function(p,I){var A,j;return A=this.parent.children.indexOf(this),j=this.parent.children.splice(A),this.parent.instruction(p,I),Array.prototype.push.apply(this.parent.children,j),this},T.prototype.instructionAfter=function(p,I){var A,j;return A=this.parent.children.indexOf(this),j=this.parent.children.splice(A+1),this.parent.instruction(p,I),Array.prototype.push.apply(this.parent.children,j),this},T.prototype.declaration=function(p,I,A){var j,U;return j=this.document(),U=new f(j,p,I,A),j.children.length===0?j.children.unshift(U):j.children[0].type===n.Declaration?j.children[0]=U:j.children.unshift(U),j.root()||j},T.prototype.dtd=function(p,I){var A,j,U,B,h,F,R,X,$,Y;for(j=this.document(),U=new o(j,p,I),$=j.children,B=h=0,R=$.length;h<R;B=++h)if(A=$[B],A.type===n.DocType)return j.children[B]=U,U;for(Y=j.children,B=F=0,X=Y.length;F<X;B=++F)if(A=Y[B],A.isRoot)return j.children.splice(B,0,U),U;return j.children.push(U),U},T.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},T.prototype.root=function(){var p;for(p=this;p;){if(p.type===n.Document)return p.rootObject;if(p.isRoot)return p;p=p.parent}},T.prototype.document=function(){var p;for(p=this;p;){if(p.type===n.Document)return p;p=p.parent}},T.prototype.end=function(p){return this.document().end(p)},T.prototype.prev=function(){var p;if(p=this.parent.children.indexOf(this),p<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[p-1]},T.prototype.next=function(){var p;if(p=this.parent.children.indexOf(this),p===-1||p===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[p+1]},T.prototype.importDocument=function(p){var I;return I=p.root().clone(),I.parent=this,I.isRoot=!1,this.children.push(I),this},T.prototype.debugInfo=function(p){var I,A;return p=p||this.name,p==null&&!((I=this.parent)!=null&&I.name)?"":p==null?"parent: <"+this.parent.name+">":(A=this.parent)!=null&&A.name?"node: <"+p+">, parent: <"+this.parent.name+">":"node: <"+p+">"},T.prototype.ele=function(p,I,A){return this.element(p,I,A)},T.prototype.nod=function(p,I,A){return this.node(p,I,A)},T.prototype.txt=function(p){return this.text(p)},T.prototype.dat=function(p){return this.cdata(p)},T.prototype.com=function(p){return this.comment(p)},T.prototype.ins=function(p,I){return this.instruction(p,I)},T.prototype.doc=function(){return this.document()},T.prototype.dec=function(p,I,A){return this.declaration(p,I,A)},T.prototype.e=function(p,I,A){return this.element(p,I,A)},T.prototype.n=function(p,I,A){return this.node(p,I,A)},T.prototype.t=function(p){return this.text(p)},T.prototype.d=function(p){return this.cdata(p)},T.prototype.c=function(p){return this.comment(p)},T.prototype.r=function(p){return this.raw(p)},T.prototype.i=function(p,I){return this.instruction(p,I)},T.prototype.u=function(){return this.up()},T.prototype.importXMLBuilder=function(p){return this.importDocument(p)},T.prototype.replaceChild=function(p,I){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.removeChild=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.appendChild=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.hasChildNodes=function(){return this.children.length!==0},T.prototype.cloneNode=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.isSupported=function(p,I){return!0},T.prototype.hasAttributes=function(){return this.attribs.length!==0},T.prototype.compareDocumentPosition=function(p){var I,A;return I=this,I===p?0:this.document()!==p.document()?(A=u.Disconnected|u.ImplementationSpecific,Math.random()<.5?A|=u.Preceding:A|=u.Following,A):I.isAncestor(p)?u.Contains|u.Preceding:I.isDescendant(p)?u.Contains|u.Following:I.isPreceding(p)?u.Preceding:u.Following},T.prototype.isSameNode=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.lookupPrefix=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.isDefaultNamespace=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.lookupNamespaceURI=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.isEqualNode=function(p){var I,A,j;if(p.nodeType!==this.nodeType||p.children.length!==this.children.length)return!1;for(I=A=0,j=this.children.length-1;0<=j?A<=j:A>=j;I=0<=j?++A:--A)if(!this.children[I].isEqualNode(p.children[I]))return!1;return!0},T.prototype.getFeature=function(p,I){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.setUserData=function(p,I,A){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getUserData=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.contains=function(p){return p?p===this||this.isDescendant(p):!1},T.prototype.isDescendant=function(p){var I,A,j,U,B;for(B=this.children,j=0,U=B.length;j<U;j++)if(I=B[j],p===I||(A=I.isDescendant(p),A))return!0;return!1},T.prototype.isAncestor=function(p){return p.isDescendant(this)},T.prototype.isPreceding=function(p){var I,A;return I=this.treePosition(p),A=this.treePosition(this),I===-1||A===-1?!1:I<A},T.prototype.isFollowing=function(p){var I,A;return I=this.treePosition(p),A=this.treePosition(this),I===-1||A===-1?!1:I>A},T.prototype.treePosition=function(p){var I,A;return A=0,I=!1,this.foreachTreeNode(this.document(),function(j){if(A++,!I&&j===p)return I=!0}),I?A:-1},T.prototype.foreachTreeNode=function(p,I){var A,j,U,B,h;for(p||(p=this.document()),B=p.children,j=0,U=B.length;j<U;j++){if(A=B[j],h=I(A))return h;if(h=this.foreachTreeNode(A,I),h)return h}},T}()}.call(G)),Yt.exports}var de={exports:{}},Cr;function cn(){return Cr||(Cr=1,function(){var u=function(c,a){return function(){return c.apply(a,arguments)}},n={}.hasOwnProperty;de.exports=function(){function c(a){this.assertLegalName=u(this.assertLegalName,this),this.assertLegalChar=u(this.assertLegalChar,this);var f,o,t;a||(a={}),this.options=a,this.options.version||(this.options.version="1.0"),o=a.stringify||{};for(f in o)n.call(o,f)&&(t=o[f],this[f]=t)}return c.prototype.name=function(a){return this.options.noValidation?a:this.assertLegalName(""+a||"")},c.prototype.text=function(a){return this.options.noValidation?a:this.assertLegalChar(this.textEscape(""+a||""))},c.prototype.cdata=function(a){return this.options.noValidation?a:(a=""+a||"",a=a.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(a))},c.prototype.comment=function(a){if(this.options.noValidation)return a;if(a=""+a||"",a.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+a);return this.assertLegalChar(a)},c.prototype.raw=function(a){return this.options.noValidation?a:""+a||""},c.prototype.attValue=function(a){return this.options.noValidation?a:this.assertLegalChar(this.attEscape(a=""+a||""))},c.prototype.insTarget=function(a){return this.options.noValidation?a:this.assertLegalChar(""+a||"")},c.prototype.insValue=function(a){if(this.options.noValidation)return a;if(a=""+a||"",a.match(/\?>/))throw new Error("Invalid processing instruction value: "+a);return this.assertLegalChar(a)},c.prototype.xmlVersion=function(a){if(this.options.noValidation)return a;if(a=""+a||"",!a.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+a);return a},c.prototype.xmlEncoding=function(a){if(this.options.noValidation)return a;if(a=""+a||"",!a.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+a);return this.assertLegalChar(a)},c.prototype.xmlStandalone=function(a){return this.options.noValidation?a:a?"yes":"no"},c.prototype.dtdPubID=function(a){return this.options.noValidation?a:this.assertLegalChar(""+a||"")},c.prototype.dtdSysID=function(a){return this.options.noValidation?a:this.assertLegalChar(""+a||"")},c.prototype.dtdElementValue=function(a){return this.options.noValidation?a:this.assertLegalChar(""+a||"")},c.prototype.dtdAttType=function(a){return this.options.noValidation?a:this.assertLegalChar(""+a||"")},c.prototype.dtdAttDefault=function(a){return this.options.noValidation?a:this.assertLegalChar(""+a||"")},c.prototype.dtdEntityValue=function(a){return this.options.noValidation?a:this.assertLegalChar(""+a||"")},c.prototype.dtdNData=function(a){return this.options.noValidation?a:this.assertLegalChar(""+a||"")},c.prototype.convertAttKey="@",c.prototype.convertPIKey="?",c.prototype.convertTextKey="#text",c.prototype.convertCDataKey="#cdata",c.prototype.convertCommentKey="#comment",c.prototype.convertRawKey="#raw",c.prototype.assertLegalChar=function(a){var f,o;if(this.options.noValidation)return a;if(f="",this.options.version==="1.0"){if(f=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,o=a.match(f))throw new Error("Invalid character in string: "+a+" at index "+o.index)}else if(this.options.version==="1.1"&&(f=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,o=a.match(f)))throw new Error("Invalid character in string: "+a+" at index "+o.index);return a},c.prototype.assertLegalName=function(a){var f;if(this.options.noValidation)return a;if(this.assertLegalChar(a),f=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!a.match(f))throw new Error("Invalid character in name");return a},c.prototype.textEscape=function(a){var f;return this.options.noValidation?a:(f=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,a.replace(f,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},c.prototype.attEscape=function(a){var f;return this.options.noValidation?a:(f=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,a.replace(f,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},c}()}.call(G)),de.exports}var me={exports:{}},ye={exports:{}},ge={exports:{}},Ar;function Bt(){return Ar||(Ar=1,function(){ge.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}.call(G)),ge.exports}var Lr;function ln(){return Lr||(Lr=1,function(){var u,n,c,a={}.hasOwnProperty;c=yt().assign,u=ot(),Be(),qe(),Fe(),Se(),Pe(),ke(),Ve(),$e(),un(),Re(),Ue(),je(),Xe(),n=Bt(),ye.exports=function(){function f(o){var t,i,m;o||(o={}),this.options=o,i=o.writer||{};for(t in i)a.call(i,t)&&(m=i[t],this["_"+t]=this[t],this[t]=m)}return f.prototype.filterOptions=function(o){var t,i,m,N,w,g,b,x;return o||(o={}),o=c({},this.options,o),t={writer:this},t.pretty=o.pretty||!1,t.allowEmpty=o.allowEmpty||!1,t.indent=(i=o.indent)!=null?i:" ",t.newline=(m=o.newline)!=null?m:`
29
- `,t.offset=(N=o.offset)!=null?N:0,t.dontPrettyTextNodes=(w=(g=o.dontPrettyTextNodes)!=null?g:o.dontprettytextnodes)!=null?w:0,t.spaceBeforeSlash=(b=(x=o.spaceBeforeSlash)!=null?x:o.spacebeforeslash)!=null?b:"",t.spaceBeforeSlash===!0&&(t.spaceBeforeSlash=" "),t.suppressPrettyCount=0,t.user={},t.state=n.None,t},f.prototype.indent=function(o,t,i){var m;return!t.pretty||t.suppressPrettyCount?"":t.pretty&&(m=(i||0)+t.offset+1,m>0)?new Array(m).join(t.indent):""},f.prototype.endline=function(o,t,i){return!t.pretty||t.suppressPrettyCount?"":t.newline},f.prototype.attribute=function(o,t,i){var m;return this.openAttribute(o,t,i),m=" "+o.name+'="'+o.value+'"',this.closeAttribute(o,t,i),m},f.prototype.cdata=function(o,t,i){var m;return this.openNode(o,t,i),t.state=n.OpenTag,m=this.indent(o,t,i)+"<![CDATA[",t.state=n.InsideTag,m+=o.value,t.state=n.CloseTag,m+="]]>"+this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),m},f.prototype.comment=function(o,t,i){var m;return this.openNode(o,t,i),t.state=n.OpenTag,m=this.indent(o,t,i)+"<!-- ",t.state=n.InsideTag,m+=o.value,t.state=n.CloseTag,m+=" -->"+this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),m},f.prototype.declaration=function(o,t,i){var m;return this.openNode(o,t,i),t.state=n.OpenTag,m=this.indent(o,t,i)+"<?xml",t.state=n.InsideTag,m+=' version="'+o.version+'"',o.encoding!=null&&(m+=' encoding="'+o.encoding+'"'),o.standalone!=null&&(m+=' standalone="'+o.standalone+'"'),t.state=n.CloseTag,m+=t.spaceBeforeSlash+"?>",m+=this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),m},f.prototype.docType=function(o,t,i){var m,N,w,g,b;if(i||(i=0),this.openNode(o,t,i),t.state=n.OpenTag,g=this.indent(o,t,i),g+="<!DOCTYPE "+o.root().name,o.pubID&&o.sysID?g+=' PUBLIC "'+o.pubID+'" "'+o.sysID+'"':o.sysID&&(g+=' SYSTEM "'+o.sysID+'"'),o.children.length>0){for(g+=" [",g+=this.endline(o,t,i),t.state=n.InsideTag,b=o.children,N=0,w=b.length;N<w;N++)m=b[N],g+=this.writeChildNode(m,t,i+1);t.state=n.CloseTag,g+="]"}return t.state=n.CloseTag,g+=t.spaceBeforeSlash+">",g+=this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),g},f.prototype.element=function(o,t,i){var m,N,w,g,b,x,O,_,E,D,T,p,I,A;i||(i=0),D=!1,T="",this.openNode(o,t,i),t.state=n.OpenTag,T+=this.indent(o,t,i)+"<"+o.name,p=o.attribs;for(E in p)a.call(p,E)&&(m=p[E],T+=this.attribute(m,t,i));if(w=o.children.length,g=w===0?null:o.children[0],w===0||o.children.every(function(j){return(j.type===u.Text||j.type===u.Raw)&&j.value===""}))t.allowEmpty?(T+=">",t.state=n.CloseTag,T+="</"+o.name+">"+this.endline(o,t,i)):(t.state=n.CloseTag,T+=t.spaceBeforeSlash+"/>"+this.endline(o,t,i));else if(t.pretty&&w===1&&(g.type===u.Text||g.type===u.Raw)&&g.value!=null)T+=">",t.state=n.InsideTag,t.suppressPrettyCount++,D=!0,T+=this.writeChildNode(g,t,i+1),t.suppressPrettyCount--,D=!1,t.state=n.CloseTag,T+="</"+o.name+">"+this.endline(o,t,i);else{if(t.dontPrettyTextNodes){for(I=o.children,b=0,O=I.length;b<O;b++)if(N=I[b],(N.type===u.Text||N.type===u.Raw)&&N.value!=null){t.suppressPrettyCount++,D=!0;break}}for(T+=">"+this.endline(o,t,i),t.state=n.InsideTag,A=o.children,x=0,_=A.length;x<_;x++)N=A[x],T+=this.writeChildNode(N,t,i+1);t.state=n.CloseTag,T+=this.indent(o,t,i)+"</"+o.name+">",D&&t.suppressPrettyCount--,T+=this.endline(o,t,i),t.state=n.None}return this.closeNode(o,t,i),T},f.prototype.writeChildNode=function(o,t,i){switch(o.type){case u.CData:return this.cdata(o,t,i);case u.Comment:return this.comment(o,t,i);case u.Element:return this.element(o,t,i);case u.Raw:return this.raw(o,t,i);case u.Text:return this.text(o,t,i);case u.ProcessingInstruction:return this.processingInstruction(o,t,i);case u.Dummy:return"";case u.Declaration:return this.declaration(o,t,i);case u.DocType:return this.docType(o,t,i);case u.AttributeDeclaration:return this.dtdAttList(o,t,i);case u.ElementDeclaration:return this.dtdElement(o,t,i);case u.EntityDeclaration:return this.dtdEntity(o,t,i);case u.NotationDeclaration:return this.dtdNotation(o,t,i);default:throw new Error("Unknown XML node type: "+o.constructor.name)}},f.prototype.processingInstruction=function(o,t,i){var m;return this.openNode(o,t,i),t.state=n.OpenTag,m=this.indent(o,t,i)+"<?",t.state=n.InsideTag,m+=o.target,o.value&&(m+=" "+o.value),t.state=n.CloseTag,m+=t.spaceBeforeSlash+"?>",m+=this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),m},f.prototype.raw=function(o,t,i){var m;return this.openNode(o,t,i),t.state=n.OpenTag,m=this.indent(o,t,i),t.state=n.InsideTag,m+=o.value,t.state=n.CloseTag,m+=this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),m},f.prototype.text=function(o,t,i){var m;return this.openNode(o,t,i),t.state=n.OpenTag,m=this.indent(o,t,i),t.state=n.InsideTag,m+=o.value,t.state=n.CloseTag,m+=this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),m},f.prototype.dtdAttList=function(o,t,i){var m;return this.openNode(o,t,i),t.state=n.OpenTag,m=this.indent(o,t,i)+"<!ATTLIST",t.state=n.InsideTag,m+=" "+o.elementName+" "+o.attributeName+" "+o.attributeType,o.defaultValueType!=="#DEFAULT"&&(m+=" "+o.defaultValueType),o.defaultValue&&(m+=' "'+o.defaultValue+'"'),t.state=n.CloseTag,m+=t.spaceBeforeSlash+">"+this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),m},f.prototype.dtdElement=function(o,t,i){var m;return this.openNode(o,t,i),t.state=n.OpenTag,m=this.indent(o,t,i)+"<!ELEMENT",t.state=n.InsideTag,m+=" "+o.name+" "+o.value,t.state=n.CloseTag,m+=t.spaceBeforeSlash+">"+this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),m},f.prototype.dtdEntity=function(o,t,i){var m;return this.openNode(o,t,i),t.state=n.OpenTag,m=this.indent(o,t,i)+"<!ENTITY",t.state=n.InsideTag,o.pe&&(m+=" %"),m+=" "+o.name,o.value?m+=' "'+o.value+'"':(o.pubID&&o.sysID?m+=' PUBLIC "'+o.pubID+'" "'+o.sysID+'"':o.sysID&&(m+=' SYSTEM "'+o.sysID+'"'),o.nData&&(m+=" NDATA "+o.nData)),t.state=n.CloseTag,m+=t.spaceBeforeSlash+">"+this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),m},f.prototype.dtdNotation=function(o,t,i){var m;return this.openNode(o,t,i),t.state=n.OpenTag,m=this.indent(o,t,i)+"<!NOTATION",t.state=n.InsideTag,m+=" "+o.name,o.pubID&&o.sysID?m+=' PUBLIC "'+o.pubID+'" "'+o.sysID+'"':o.pubID?m+=' PUBLIC "'+o.pubID+'"':o.sysID&&(m+=' SYSTEM "'+o.sysID+'"'),t.state=n.CloseTag,m+=t.spaceBeforeSlash+">"+this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),m},f.prototype.openNode=function(o,t,i){},f.prototype.closeNode=function(o,t,i){},f.prototype.openAttribute=function(o,t,i){},f.prototype.closeAttribute=function(o,t,i){},f}()}.call(G)),ye.exports}var _r;function We(){return _r||(_r=1,function(){var u,n=function(a,f){for(var o in f)c.call(f,o)&&(a[o]=f[o]);function t(){this.constructor=a}return t.prototype=f.prototype,a.prototype=new t,a.__super__=f.prototype,a},c={}.hasOwnProperty;u=ln(),me.exports=function(a){n(f,a);function f(o){f.__super__.constructor.call(this,o)}return f.prototype.document=function(o,t){var i,m,N,w,g;for(t=this.filterOptions(t),w="",g=o.children,m=0,N=g.length;m<N;m++)i=g[m],w+=this.writeChildNode(i,t,0);return t.pretty&&w.slice(-t.newline.length)===t.newline&&(w=w.slice(0,-t.newline.length)),w},f}(u)}.call(G)),me.exports}var Mr;function fn(){return Mr||(Mr=1,function(){var u,n,c,a,f,o,t,i=function(N,w){for(var g in w)m.call(w,g)&&(N[g]=w[g]);function b(){this.constructor=N}return b.prototype=w.prototype,N.prototype=new b,N.__super__=w.prototype,N},m={}.hasOwnProperty;t=yt().isPlainObject,c=sn(),n=ci(),a=ct(),u=ot(),o=cn(),f=We(),$t.exports=function(N){i(w,N);function w(g){w.__super__.constructor.call(this,null),this.name="#document",this.type=u.Document,this.documentURI=null,this.domConfig=new n,g||(g={}),g.writer||(g.writer=new f),this.options=g,this.stringify=new o(g)}return Object.defineProperty(w.prototype,"implementation",{value:new c}),Object.defineProperty(w.prototype,"doctype",{get:function(){var g,b,x,O;for(O=this.children,b=0,x=O.length;b<x;b++)if(g=O[b],g.type===u.DocType)return g;return null}}),Object.defineProperty(w.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(w.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(w.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(w.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===u.Declaration?this.children[0].encoding:null}}),Object.defineProperty(w.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===u.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(w.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===u.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(w.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(w.prototype,"origin",{get:function(){return null}}),Object.defineProperty(w.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(w.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(w.prototype,"contentType",{get:function(){return null}}),w.prototype.end=function(g){var b;return b={},g?t(g)&&(b=g,g=this.options.writer):g=this.options.writer,g.document(this,g.filterOptions(b))},w.prototype.toString=function(g){return this.options.writer.document(this,this.options.writer.filterOptions(g))},w.prototype.createElement=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createTextNode=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createComment=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createCDATASection=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createProcessingInstruction=function(g,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createAttribute=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createEntityReference=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.getElementsByTagName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.importNode=function(g,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createElementNS=function(g,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createAttributeNS=function(g,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.getElementsByTagNameNS=function(g,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.getElementById=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.adoptNode=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.renameNode=function(g,b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.getElementsByClassName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createEvent=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createNodeIterator=function(g,b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createTreeWalker=function(g,b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},w}(a)}.call(G)),$t.exports}var we={exports:{}},Pr;function hi(){return Pr||(Pr=1,function(){var u,n,c,a,f,o,t,i,m,N,w,g,b,x,O,_,E,D,T,p,I,A,j,U={}.hasOwnProperty;j=yt(),I=j.isObject,p=j.isFunction,A=j.isPlainObject,T=j.getValue,u=ot(),g=fn(),b=Pe(),a=Fe(),f=Se(),O=ke(),D=Ve(),x=$e(),N=Be(),w=qe(),o=Re(),i=je(),t=Ue(),m=Xe(),c=an(),E=cn(),_=We(),n=Bt(),we.exports=function(){function B(h,F,R){var X;this.name="?xml",this.type=u.Document,h||(h={}),X={},h.writer?A(h.writer)&&(X=h.writer,h.writer=new _):h.writer=new _,this.options=h,this.writer=h.writer,this.writerOptions=this.writer.filterOptions(X),this.stringify=new E(h),this.onDataCallback=F||function(){},this.onEndCallback=R||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return B.prototype.createChildNode=function(h){var F,R,X,$,Y,J,z,W;switch(h.type){case u.CData:this.cdata(h.value);break;case u.Comment:this.comment(h.value);break;case u.Element:X={},z=h.attribs;for(R in z)U.call(z,R)&&(F=z[R],X[R]=F.value);this.node(h.name,X);break;case u.Dummy:this.dummy();break;case u.Raw:this.raw(h.value);break;case u.Text:this.text(h.value);break;case u.ProcessingInstruction:this.instruction(h.target,h.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+h.constructor.name)}for(W=h.children,Y=0,J=W.length;Y<J;Y++)$=W[Y],this.createChildNode($),$.type===u.Element&&this.up();return this},B.prototype.dummy=function(){return this},B.prototype.node=function(h,F,R){var X;if(h==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(h));return this.openCurrent(),h=T(h),F==null&&(F={}),F=T(F),I(F)||(X=[F,R],R=X[0],F=X[1]),this.currentNode=new b(this,h,F),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,R!=null&&this.text(R),this},B.prototype.element=function(h,F,R){var X,$,Y,J,z,W;if(this.currentNode&&this.currentNode.type===u.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(h)||I(h)||p(h))for(J=this.options.noValidation,this.options.noValidation=!0,W=new g(this.options).element("TEMP_ROOT"),W.element(h),this.options.noValidation=J,z=W.children,$=0,Y=z.length;$<Y;$++)X=z[$],this.createChildNode(X),X.type===u.Element&&this.up();else this.node(h,F,R);return this},B.prototype.attribute=function(h,F){var R,X;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(h));if(h!=null&&(h=T(h)),I(h))for(R in h)U.call(h,R)&&(X=h[R],this.attribute(R,X));else p(F)&&(F=F.apply()),this.options.keepNullAttributes&&F==null?this.currentNode.attribs[h]=new c(this,h,""):F!=null&&(this.currentNode.attribs[h]=new c(this,h,F));return this},B.prototype.text=function(h){var F;return this.openCurrent(),F=new D(this,h),this.onData(this.writer.text(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},B.prototype.cdata=function(h){var F;return this.openCurrent(),F=new a(this,h),this.onData(this.writer.cdata(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},B.prototype.comment=function(h){var F;return this.openCurrent(),F=new f(this,h),this.onData(this.writer.comment(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},B.prototype.raw=function(h){var F;return this.openCurrent(),F=new O(this,h),this.onData(this.writer.raw(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},B.prototype.instruction=function(h,F){var R,X,$,Y,J;if(this.openCurrent(),h!=null&&(h=T(h)),F!=null&&(F=T(F)),Array.isArray(h))for(R=0,Y=h.length;R<Y;R++)X=h[R],this.instruction(X);else if(I(h))for(X in h)U.call(h,X)&&($=h[X],this.instruction(X,$));else p(F)&&(F=F.apply()),J=new x(this,h,F),this.onData(this.writer.processingInstruction(J,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},B.prototype.declaration=function(h,F,R){var X;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return X=new N(this,h,F,R),this.onData(this.writer.declaration(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},B.prototype.doctype=function(h,F,R){if(this.openCurrent(),h==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new w(this,F,R),this.currentNode.rootNodeName=h,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},B.prototype.dtdElement=function(h,F){var R;return this.openCurrent(),R=new t(this,h,F),this.onData(this.writer.dtdElement(R,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},B.prototype.attList=function(h,F,R,X,$){var Y;return this.openCurrent(),Y=new o(this,h,F,R,X,$),this.onData(this.writer.dtdAttList(Y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},B.prototype.entity=function(h,F){var R;return this.openCurrent(),R=new i(this,!1,h,F),this.onData(this.writer.dtdEntity(R,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},B.prototype.pEntity=function(h,F){var R;return this.openCurrent(),R=new i(this,!0,h,F),this.onData(this.writer.dtdEntity(R,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},B.prototype.notation=function(h,F){var R;return this.openCurrent(),R=new m(this,h,F),this.onData(this.writer.dtdNotation(R,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},B.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},B.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},B.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},B.prototype.openNode=function(h){var F,R,X,$;if(!h.isOpen){if(!this.root&&this.currentLevel===0&&h.type===u.Element&&(this.root=h),R="",h.type===u.Element){this.writerOptions.state=n.OpenTag,R=this.writer.indent(h,this.writerOptions,this.currentLevel)+"<"+h.name,$=h.attribs;for(X in $)U.call($,X)&&(F=$[X],R+=this.writer.attribute(F,this.writerOptions,this.currentLevel));R+=(h.children?">":"/>")+this.writer.endline(h,this.writerOptions,this.currentLevel),this.writerOptions.state=n.InsideTag}else this.writerOptions.state=n.OpenTag,R=this.writer.indent(h,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+h.rootNodeName,h.pubID&&h.sysID?R+=' PUBLIC "'+h.pubID+'" "'+h.sysID+'"':h.sysID&&(R+=' SYSTEM "'+h.sysID+'"'),h.children?(R+=" [",this.writerOptions.state=n.InsideTag):(this.writerOptions.state=n.CloseTag,R+=">"),R+=this.writer.endline(h,this.writerOptions,this.currentLevel);return this.onData(R,this.currentLevel),h.isOpen=!0}},B.prototype.closeNode=function(h){var F;if(!h.isClosed)return F="",this.writerOptions.state=n.CloseTag,h.type===u.Element?F=this.writer.indent(h,this.writerOptions,this.currentLevel)+"</"+h.name+">"+this.writer.endline(h,this.writerOptions,this.currentLevel):F=this.writer.indent(h,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(h,this.writerOptions,this.currentLevel),this.writerOptions.state=n.None,this.onData(F,this.currentLevel),h.isClosed=!0},B.prototype.onData=function(h,F){return this.documentStarted=!0,this.onDataCallback(h,F+1)},B.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},B.prototype.debugInfo=function(h){return h==null?"":"node: <"+h+">"},B.prototype.ele=function(){return this.element.apply(this,arguments)},B.prototype.nod=function(h,F,R){return this.node(h,F,R)},B.prototype.txt=function(h){return this.text(h)},B.prototype.dat=function(h){return this.cdata(h)},B.prototype.com=function(h){return this.comment(h)},B.prototype.ins=function(h,F){return this.instruction(h,F)},B.prototype.dec=function(h,F,R){return this.declaration(h,F,R)},B.prototype.dtd=function(h,F,R){return this.doctype(h,F,R)},B.prototype.e=function(h,F,R){return this.element(h,F,R)},B.prototype.n=function(h,F,R){return this.node(h,F,R)},B.prototype.t=function(h){return this.text(h)},B.prototype.d=function(h){return this.cdata(h)},B.prototype.c=function(h){return this.comment(h)},B.prototype.r=function(h){return this.raw(h)},B.prototype.i=function(h,F){return this.instruction(h,F)},B.prototype.att=function(){return this.currentNode&&this.currentNode.type===u.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},B.prototype.a=function(){return this.currentNode&&this.currentNode.type===u.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},B.prototype.ent=function(h,F){return this.entity(h,F)},B.prototype.pent=function(h,F){return this.pEntity(h,F)},B.prototype.not=function(h,F){return this.notation(h,F)},B}()}.call(G)),we.exports}var be={exports:{}},Fr;function pi(){return Fr||(Fr=1,function(){var u,n,c,a=function(o,t){for(var i in t)f.call(t,i)&&(o[i]=t[i]);function m(){this.constructor=o}return m.prototype=t.prototype,o.prototype=new m,o.__super__=t.prototype,o},f={}.hasOwnProperty;u=ot(),c=ln(),n=Bt(),be.exports=function(o){a(t,o);function t(i,m){this.stream=i,t.__super__.constructor.call(this,m)}return t.prototype.endline=function(i,m,N){return i.isLastRootNode&&m.state===n.CloseTag?"":t.__super__.endline.call(this,i,m,N)},t.prototype.document=function(i,m){var N,w,g,b,x,O,_,E,D;for(_=i.children,w=g=0,x=_.length;g<x;w=++g)N=_[w],N.isLastRootNode=w===i.children.length-1;for(m=this.filterOptions(m),E=i.children,D=[],b=0,O=E.length;b<O;b++)N=E[b],D.push(this.writeChildNode(N,m,0));return D},t.prototype.attribute=function(i,m,N){return this.stream.write(t.__super__.attribute.call(this,i,m,N))},t.prototype.cdata=function(i,m,N){return this.stream.write(t.__super__.cdata.call(this,i,m,N))},t.prototype.comment=function(i,m,N){return this.stream.write(t.__super__.comment.call(this,i,m,N))},t.prototype.declaration=function(i,m,N){return this.stream.write(t.__super__.declaration.call(this,i,m,N))},t.prototype.docType=function(i,m,N){var w,g,b,x;if(N||(N=0),this.openNode(i,m,N),m.state=n.OpenTag,this.stream.write(this.indent(i,m,N)),this.stream.write("<!DOCTYPE "+i.root().name),i.pubID&&i.sysID?this.stream.write(' PUBLIC "'+i.pubID+'" "'+i.sysID+'"'):i.sysID&&this.stream.write(' SYSTEM "'+i.sysID+'"'),i.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(i,m,N)),m.state=n.InsideTag,x=i.children,g=0,b=x.length;g<b;g++)w=x[g],this.writeChildNode(w,m,N+1);m.state=n.CloseTag,this.stream.write("]")}return m.state=n.CloseTag,this.stream.write(m.spaceBeforeSlash+">"),this.stream.write(this.endline(i,m,N)),m.state=n.None,this.closeNode(i,m,N)},t.prototype.element=function(i,m,N){var w,g,b,x,O,_,E,D,T;N||(N=0),this.openNode(i,m,N),m.state=n.OpenTag,this.stream.write(this.indent(i,m,N)+"<"+i.name),D=i.attribs;for(E in D)f.call(D,E)&&(w=D[E],this.attribute(w,m,N));if(b=i.children.length,x=b===0?null:i.children[0],b===0||i.children.every(function(p){return(p.type===u.Text||p.type===u.Raw)&&p.value===""}))m.allowEmpty?(this.stream.write(">"),m.state=n.CloseTag,this.stream.write("</"+i.name+">")):(m.state=n.CloseTag,this.stream.write(m.spaceBeforeSlash+"/>"));else if(m.pretty&&b===1&&(x.type===u.Text||x.type===u.Raw)&&x.value!=null)this.stream.write(">"),m.state=n.InsideTag,m.suppressPrettyCount++,this.writeChildNode(x,m,N+1),m.suppressPrettyCount--,m.state=n.CloseTag,this.stream.write("</"+i.name+">");else{for(this.stream.write(">"+this.endline(i,m,N)),m.state=n.InsideTag,T=i.children,O=0,_=T.length;O<_;O++)g=T[O],this.writeChildNode(g,m,N+1);m.state=n.CloseTag,this.stream.write(this.indent(i,m,N)+"</"+i.name+">")}return this.stream.write(this.endline(i,m,N)),m.state=n.None,this.closeNode(i,m,N)},t.prototype.processingInstruction=function(i,m,N){return this.stream.write(t.__super__.processingInstruction.call(this,i,m,N))},t.prototype.raw=function(i,m,N){return this.stream.write(t.__super__.raw.call(this,i,m,N))},t.prototype.text=function(i,m,N){return this.stream.write(t.__super__.text.call(this,i,m,N))},t.prototype.dtdAttList=function(i,m,N){return this.stream.write(t.__super__.dtdAttList.call(this,i,m,N))},t.prototype.dtdElement=function(i,m,N){return this.stream.write(t.__super__.dtdElement.call(this,i,m,N))},t.prototype.dtdEntity=function(i,m,N){return this.stream.write(t.__super__.dtdEntity.call(this,i,m,N))},t.prototype.dtdNotation=function(i,m,N){return this.stream.write(t.__super__.dtdNotation.call(this,i,m,N))},t}(c)}.call(G)),be.exports}var Sr;function di(){return Sr||(Sr=1,function(){var u,n,c,a,f,o,t,i,m,N;N=yt(),i=N.assign,m=N.isFunction,c=sn(),a=fn(),f=hi(),t=We(),o=pi(),u=ot(),n=Bt(),dt.create=function(w,g,b,x){var O,_;if(w==null)throw new Error("Root element needs a name.");return x=i({},g,b,x),O=new a(x),_=O.element(w),x.headless||(O.declaration(x),(x.pubID!=null||x.sysID!=null)&&O.dtd(x)),_},dt.begin=function(w,g,b){var x;return m(w)&&(x=[w,g],g=x[0],b=x[1],w={}),g?new f(w,g,b):new a(w)},dt.stringWriter=function(w){return new t(w)},dt.streamWriter=function(w,g){return new o(w,g)},dt.implementation=new c,dt.nodeType=u,dt.writerState=n}.call(G)),dt}var Br;function mi(){return Br||(Br=1,function(){var u,n,c,a,f,o={}.hasOwnProperty;u=di(),n=_e().defaults,a=function(t){return typeof t=="string"&&(t.indexOf("&")>=0||t.indexOf(">")>=0||t.indexOf("<")>=0)},f=function(t){return"<![CDATA["+c(t)+"]]>"},c=function(t){return t.replace("]]>","]]]]><![CDATA[>")},kt.Builder=function(){function t(i){var m,N,w;this.options={},N=n["0.2"];for(m in N)o.call(N,m)&&(w=N[m],this.options[m]=w);for(m in i)o.call(i,m)&&(w=i[m],this.options[m]=w)}return t.prototype.buildObject=function(i){var m,N,w,g,b;return m=this.options.attrkey,N=this.options.charkey,Object.keys(i).length===1&&this.options.rootName===n["0.2"].rootName?(b=Object.keys(i)[0],i=i[b]):b=this.options.rootName,w=function(x){return function(O,_){var E,D,T,p,I,A;if(typeof _!="object")x.options.cdata&&a(_)?O.raw(f(_)):O.txt(_);else if(Array.isArray(_)){for(p in _)if(o.call(_,p)){D=_[p];for(I in D)T=D[I],O=w(O.ele(I),T).up()}}else for(I in _)if(o.call(_,I))if(D=_[I],I===m){if(typeof D=="object")for(E in D)A=D[E],O=O.att(E,A)}else if(I===N)x.options.cdata&&a(D)?O=O.raw(f(D)):O=O.txt(D);else if(Array.isArray(D))for(p in D)o.call(D,p)&&(T=D[p],typeof T=="string"?x.options.cdata&&a(T)?O=O.ele(I).raw(f(T)).up():O=O.ele(I,T).up():O=w(O.ele(I),T).up());else typeof D=="object"?O=w(O.ele(I),D).up():typeof D=="string"&&x.options.cdata&&a(D)?O=O.ele(I).raw(f(D)).up():(D==null&&(D=""),O=O.ele(I,D.toString()).up());return O}}(this),g=u.create(b,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),w(g,i).end(this.options.renderOpts)},t}()}.call(G)),kt}var Ee={},Te={},xe={},Lt={exports:{}},De={},Nt={},Rr;function yi(){if(Rr)return Nt;Rr=1,Nt.byteLength=i,Nt.toByteArray=N,Nt.fromByteArray=b;for(var u=[],n=[],c=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,o=a.length;f<o;++f)u[f]=a[f],n[a.charCodeAt(f)]=f;n[45]=62,n[95]=63;function t(x){var O=x.length;if(O%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=x.indexOf("=");_===-1&&(_=O);var E=_===O?0:4-_%4;return[_,E]}function i(x){var O=t(x),_=O[0],E=O[1];return(_+E)*3/4-E}function m(x,O,_){return(O+_)*3/4-_}function N(x){var O,_=t(x),E=_[0],D=_[1],T=new c(m(x,E,D)),p=0,I=D>0?E-4:E,A;for(A=0;A<I;A+=4)O=n[x.charCodeAt(A)]<<18|n[x.charCodeAt(A+1)]<<12|n[x.charCodeAt(A+2)]<<6|n[x.charCodeAt(A+3)],T[p++]=O>>16&255,T[p++]=O>>8&255,T[p++]=O&255;return D===2&&(O=n[x.charCodeAt(A)]<<2|n[x.charCodeAt(A+1)]>>4,T[p++]=O&255),D===1&&(O=n[x.charCodeAt(A)]<<10|n[x.charCodeAt(A+1)]<<4|n[x.charCodeAt(A+2)]>>2,T[p++]=O>>8&255,T[p++]=O&255),T}function w(x){return u[x>>18&63]+u[x>>12&63]+u[x>>6&63]+u[x&63]}function g(x,O,_){for(var E,D=[],T=O;T<_;T+=3)E=(x[T]<<16&16711680)+(x[T+1]<<8&65280)+(x[T+2]&255),D.push(w(E));return D.join("")}function b(x){for(var O,_=x.length,E=_%3,D=[],T=16383,p=0,I=_-E;p<I;p+=T)D.push(g(x,p,p+T>I?I:p+T));return E===1?(O=x[_-1],D.push(u[O>>2]+u[O<<4&63]+"==")):E===2&&(O=(x[_-2]<<8)+x[_-1],D.push(u[O>>10]+u[O>>4&63]+u[O<<2&63]+"=")),D.join("")}return Nt}var _t={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var jr;function gi(){return jr||(jr=1,_t.read=function(u,n,c,a,f){var o,t,i=f*8-a-1,m=(1<<i)-1,N=m>>1,w=-7,g=c?f-1:0,b=c?-1:1,x=u[n+g];for(g+=b,o=x&(1<<-w)-1,x>>=-w,w+=i;w>0;o=o*256+u[n+g],g+=b,w-=8);for(t=o&(1<<-w)-1,o>>=-w,w+=a;w>0;t=t*256+u[n+g],g+=b,w-=8);if(o===0)o=1-N;else{if(o===m)return t?NaN:(x?-1:1)*(1/0);t=t+Math.pow(2,a),o=o-N}return(x?-1:1)*t*Math.pow(2,o-a)},_t.write=function(u,n,c,a,f,o){var t,i,m,N=o*8-f-1,w=(1<<N)-1,g=w>>1,b=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=a?0:o-1,O=a?1:-1,_=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(i=isNaN(n)?1:0,t=w):(t=Math.floor(Math.log(n)/Math.LN2),n*(m=Math.pow(2,-t))<1&&(t--,m*=2),t+g>=1?n+=b/m:n+=b*Math.pow(2,1-g),n*m>=2&&(t++,m/=2),t+g>=w?(i=0,t=w):t+g>=1?(i=(n*m-1)*Math.pow(2,f),t=t+g):(i=n*Math.pow(2,g-1)*Math.pow(2,f),t=0));f>=8;u[c+x]=i&255,x+=O,i/=256,f-=8);for(t=t<<f|i,N+=f;N>0;u[c+x]=t&255,x+=O,t/=256,N-=8);u[c+x-O]|=_*128}),_t}/*!
28
+ `},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}.call(G)),qt}var kt={},dt={},mt={},nr;function yt(){return nr||(nr=1,function(){var u,n,c,a,f,o,t,i=[].slice,m={}.hasOwnProperty;u=function(){var N,w,y,b,x,O;if(O=arguments[0],x=2<=arguments.length?i.call(arguments,1):[],f(Object.assign))Object.assign.apply(null,arguments);else for(N=0,y=x.length;N<y;N++)if(b=x[N],b!=null)for(w in b)m.call(b,w)&&(O[w]=b[w]);return O},f=function(N){return!!N&&Object.prototype.toString.call(N)==="[object Function]"},o=function(N){var w;return!!N&&((w=typeof N)=="function"||w==="object")},c=function(N){return f(Array.isArray)?Array.isArray(N):Object.prototype.toString.call(N)==="[object Array]"},a=function(N){var w;if(c(N))return!N.length;for(w in N)if(m.call(N,w))return!1;return!0},t=function(N){var w,y;return o(N)&&(y=Object.getPrototypeOf(N))&&(w=y.constructor)&&typeof w=="function"&&w instanceof w&&Function.prototype.toString.call(w)===Function.prototype.toString.call(Object)},n=function(N){return f(N.valueOf)?N.valueOf():N},mt.assign=u,mt.isFunction=f,mt.isObject=o,mt.isArray=c,mt.isEmpty=a,mt.isPlainObject=t,mt.getValue=n}.call(G)),mt}var Vt={exports:{}},ir;function sn(){return ir||(ir=1,function(){Vt.exports=function(){function u(){}return u.prototype.hasFeature=function(n,c){return!0},u.prototype.createDocumentType=function(n,c,a){throw new Error("This DOM method is not implemented.")},u.prototype.createDocument=function(n,c,a){throw new Error("This DOM method is not implemented.")},u.prototype.createHTMLDocument=function(n){throw new Error("This DOM method is not implemented.")},u.prototype.getFeature=function(n,c){throw new Error("This DOM method is not implemented.")},u}()}.call(G)),Vt.exports}var $t={exports:{}},Wt={exports:{}},Ht={exports:{}},or;function ai(){return or||(or=1,function(){Ht.exports=function(){function u(){}return u.prototype.handleError=function(n){throw new Error(n)},u}()}.call(G)),Ht.exports}var Gt={exports:{}},sr;function ui(){return sr||(sr=1,function(){Gt.exports=function(){function u(n){this.arr=n||[]}return Object.defineProperty(u.prototype,"length",{get:function(){return this.arr.length}}),u.prototype.item=function(n){return this.arr[n]||null},u.prototype.contains=function(n){return this.arr.indexOf(n)!==-1},u}()}.call(G)),Gt.exports}var ar;function ci(){return ar||(ar=1,function(){var u,n;u=ai(),n=ui(),Wt.exports=function(){function c(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new u,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Object.create(this.defaultParams)}return Object.defineProperty(c.prototype,"parameterNames",{get:function(){return new n(Object.keys(this.defaultParams))}}),c.prototype.getParameter=function(a){return this.params.hasOwnProperty(a)?this.params[a]:null},c.prototype.canSetParameter=function(a,f){return!0},c.prototype.setParameter=function(a,f){return f!=null?this.params[a]=f:delete this.params[a]},c}()}.call(G)),Wt.exports}var Yt={exports:{}},zt={exports:{}},Kt={exports:{}},ur;function ot(){return ur||(ur=1,function(){Kt.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}.call(G)),Kt.exports}var Qt={exports:{}},cr;function an(){return cr||(cr=1,function(){var u;u=ot(),ct(),Qt.exports=function(){function n(c,a,f){if(this.parent=c,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),a==null)throw new Error("Missing attribute name. "+this.debugInfo(a));this.name=this.stringify.name(a),this.value=this.stringify.attValue(f),this.type=u.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(n.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(n.prototype,"textContent",{get:function(){return this.value},set:function(c){return this.value=c||""}}),Object.defineProperty(n.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(n.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(n.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(n.prototype,"specified",{get:function(){return!0}}),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(c){return this.options.writer.attribute(this,this.options.writer.filterOptions(c))},n.prototype.debugInfo=function(c){return c=c||this.name,c==null?"parent: <"+this.parent.name+">":"attribute: {"+c+"}, parent: <"+this.parent.name+">"},n.prototype.isEqualNode=function(c){return!(c.namespaceURI!==this.namespaceURI||c.prefix!==this.prefix||c.localName!==this.localName||c.value!==this.value)},n}()}.call(G)),Qt.exports}var Jt={exports:{}},lr;function Me(){return lr||(lr=1,function(){Jt.exports=function(){function u(n){this.nodes=n}return Object.defineProperty(u.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),u.prototype.clone=function(){return this.nodes=null},u.prototype.getNamedItem=function(n){return this.nodes[n]},u.prototype.setNamedItem=function(n){var c;return c=this.nodes[n.nodeName],this.nodes[n.nodeName]=n,c||null},u.prototype.removeNamedItem=function(n){var c;return c=this.nodes[n],delete this.nodes[n],c||null},u.prototype.item=function(n){return this.nodes[Object.keys(this.nodes)[n]]||null},u.prototype.getNamedItemNS=function(n,c){throw new Error("This DOM method is not implemented.")},u.prototype.setNamedItemNS=function(n){throw new Error("This DOM method is not implemented.")},u.prototype.removeNamedItemNS=function(n,c){throw new Error("This DOM method is not implemented.")},u}()}.call(G)),Jt.exports}var fr;function Pe(){return fr||(fr=1,function(){var u,n,c,a,f,o,t,i,m=function(w,y){for(var b in y)N.call(y,b)&&(w[b]=y[b]);function x(){this.constructor=w}return x.prototype=y.prototype,w.prototype=new x,w.__super__=y.prototype,w},N={}.hasOwnProperty;i=yt(),t=i.isObject,o=i.isFunction,f=i.getValue,a=ct(),u=ot(),n=an(),c=Me(),zt.exports=function(w){m(y,w);function y(b,x,O){var _,E,D,T;if(y.__super__.constructor.call(this,b),x==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(x),this.type=u.Element,this.attribs={},this.schemaTypeInfo=null,O!=null&&this.attribute(O),b.type===u.Document&&(this.isRoot=!0,this.documentObject=b,b.rootObject=this,b.children)){for(T=b.children,E=0,D=T.length;E<D;E++)if(_=T[E],_.type===u.DocType){_.name=this.name;break}}}return Object.defineProperty(y.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(y.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(y.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(y.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(y.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(y.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(y.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(y.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new c(this.attribs)),this.attributeMap}}),y.prototype.clone=function(){var b,x,O,_;O=Object.create(this),O.isRoot&&(O.documentObject=null),O.attribs={},_=this.attribs;for(x in _)N.call(_,x)&&(b=_[x],O.attribs[x]=b.clone());return O.children=[],this.children.forEach(function(E){var D;return D=E.clone(),D.parent=O,O.children.push(D)}),O},y.prototype.attribute=function(b,x){var O,_;if(b!=null&&(b=f(b)),t(b))for(O in b)N.call(b,O)&&(_=b[O],this.attribute(O,_));else o(x)&&(x=x.apply()),this.options.keepNullAttributes&&x==null?this.attribs[b]=new n(this,b,""):x!=null&&(this.attribs[b]=new n(this,b,x));return this},y.prototype.removeAttribute=function(b){var x,O,_;if(b==null)throw new Error("Missing attribute name. "+this.debugInfo());if(b=f(b),Array.isArray(b))for(O=0,_=b.length;O<_;O++)x=b[O],delete this.attribs[x];else delete this.attribs[b];return this},y.prototype.toString=function(b){return this.options.writer.element(this,this.options.writer.filterOptions(b))},y.prototype.att=function(b,x){return this.attribute(b,x)},y.prototype.a=function(b,x){return this.attribute(b,x)},y.prototype.getAttribute=function(b){return this.attribs.hasOwnProperty(b)?this.attribs[b].value:null},y.prototype.setAttribute=function(b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getAttributeNode=function(b){return this.attribs.hasOwnProperty(b)?this.attribs[b]:null},y.prototype.setAttributeNode=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.removeAttributeNode=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagName=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getAttributeNS=function(b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setAttributeNS=function(b,x,O){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.removeAttributeNS=function(b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getAttributeNodeNS=function(b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setAttributeNodeNS=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagNameNS=function(b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.hasAttribute=function(b){return this.attribs.hasOwnProperty(b)},y.prototype.hasAttributeNS=function(b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setIdAttribute=function(b,x){return this.attribs.hasOwnProperty(b)?this.attribs[b].isId:x},y.prototype.setIdAttributeNS=function(b,x,O){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setIdAttributeNode=function(b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagName=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagNameNS=function(b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByClassName=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.isEqualNode=function(b){var x,O,_;if(!y.__super__.isEqualNode.apply(this,arguments).isEqualNode(b)||b.namespaceURI!==this.namespaceURI||b.prefix!==this.prefix||b.localName!==this.localName||b.attribs.length!==this.attribs.length)return!1;for(x=O=0,_=this.attribs.length-1;0<=_?O<=_:O>=_;x=0<=_?++O:--O)if(!this.attribs[x].isEqualNode(b.attribs[x]))return!1;return!0},y}(a)}.call(G)),zt.exports}var Zt={exports:{}},te={exports:{}},hr;function St(){return hr||(hr=1,function(){var u,n=function(a,f){for(var o in f)c.call(f,o)&&(a[o]=f[o]);function t(){this.constructor=a}return t.prototype=f.prototype,a.prototype=new t,a.__super__=f.prototype,a},c={}.hasOwnProperty;u=ct(),te.exports=function(a){n(f,a);function f(o){f.__super__.constructor.call(this,o),this.value=""}return Object.defineProperty(f.prototype,"data",{get:function(){return this.value},set:function(o){return this.value=o||""}}),Object.defineProperty(f.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(f.prototype,"textContent",{get:function(){return this.value},set:function(o){return this.value=o||""}}),f.prototype.clone=function(){return Object.create(this)},f.prototype.substringData=function(o,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.appendData=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.insertData=function(o,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.deleteData=function(o,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.replaceData=function(o,t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.isEqualNode=function(o){return!(!f.__super__.isEqualNode.apply(this,arguments).isEqualNode(o)||o.data!==this.data)},f}(u)}.call(G)),te.exports}var pr;function Fe(){return pr||(pr=1,function(){var u,n,c=function(f,o){for(var t in o)a.call(o,t)&&(f[t]=o[t]);function i(){this.constructor=f}return i.prototype=o.prototype,f.prototype=new i,f.__super__=o.prototype,f},a={}.hasOwnProperty;u=ot(),n=St(),Zt.exports=function(f){c(o,f);function o(t,i){if(o.__super__.constructor.call(this,t),i==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=u.CData,this.value=this.stringify.cdata(i)}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(t){return this.options.writer.cdata(this,this.options.writer.filterOptions(t))},o}(n)}.call(G)),Zt.exports}var ee={exports:{}},dr;function Se(){return dr||(dr=1,function(){var u,n,c=function(f,o){for(var t in o)a.call(o,t)&&(f[t]=o[t]);function i(){this.constructor=f}return i.prototype=o.prototype,f.prototype=new i,f.__super__=o.prototype,f},a={}.hasOwnProperty;u=ot(),n=St(),ee.exports=function(f){c(o,f);function o(t,i){if(o.__super__.constructor.call(this,t),i==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=u.Comment,this.value=this.stringify.comment(i)}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(t){return this.options.writer.comment(this,this.options.writer.filterOptions(t))},o}(n)}.call(G)),ee.exports}var re={exports:{}},mr;function Be(){return mr||(mr=1,function(){var u,n,c,a=function(o,t){for(var i in t)f.call(t,i)&&(o[i]=t[i]);function m(){this.constructor=o}return m.prototype=t.prototype,o.prototype=new m,o.__super__=t.prototype,o},f={}.hasOwnProperty;c=yt().isObject,n=ct(),u=ot(),re.exports=function(o){a(t,o);function t(i,m,N,w){var y;t.__super__.constructor.call(this,i),c(m)&&(y=m,m=y.version,N=y.encoding,w=y.standalone),m||(m="1.0"),this.type=u.Declaration,this.version=this.stringify.xmlVersion(m),N!=null&&(this.encoding=this.stringify.xmlEncoding(N)),w!=null&&(this.standalone=this.stringify.xmlStandalone(w))}return t.prototype.toString=function(i){return this.options.writer.declaration(this,this.options.writer.filterOptions(i))},t}(n)}.call(G)),re.exports}var ne={exports:{}},ie={exports:{}},yr;function Re(){return yr||(yr=1,function(){var u,n,c=function(f,o){for(var t in o)a.call(o,t)&&(f[t]=o[t]);function i(){this.constructor=f}return i.prototype=o.prototype,f.prototype=new i,f.__super__=o.prototype,f},a={}.hasOwnProperty;n=ct(),u=ot(),ie.exports=function(f){c(o,f);function o(t,i,m,N,w,y){if(o.__super__.constructor.call(this,t),i==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(m==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(i));if(!N)throw new Error("Missing DTD attribute type. "+this.debugInfo(i));if(!w)throw new Error("Missing DTD attribute default. "+this.debugInfo(i));if(w.indexOf("#")!==0&&(w="#"+w),!w.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(i));if(y&&!w.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(i));this.elementName=this.stringify.name(i),this.type=u.AttributeDeclaration,this.attributeName=this.stringify.name(m),this.attributeType=this.stringify.dtdAttType(N),y&&(this.defaultValue=this.stringify.dtdAttDefault(y)),this.defaultValueType=w}return o.prototype.toString=function(t){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(t))},o}(n)}.call(G)),ie.exports}var oe={exports:{}},gr;function je(){return gr||(gr=1,function(){var u,n,c,a=function(o,t){for(var i in t)f.call(t,i)&&(o[i]=t[i]);function m(){this.constructor=o}return m.prototype=t.prototype,o.prototype=new m,o.__super__=t.prototype,o},f={}.hasOwnProperty;c=yt().isObject,n=ct(),u=ot(),oe.exports=function(o){a(t,o);function t(i,m,N,w){if(t.__super__.constructor.call(this,i),N==null)throw new Error("Missing DTD entity name. "+this.debugInfo(N));if(w==null)throw new Error("Missing DTD entity value. "+this.debugInfo(N));if(this.pe=!!m,this.name=this.stringify.name(N),this.type=u.EntityDeclaration,!c(w))this.value=this.stringify.dtdEntityValue(w),this.internal=!0;else{if(!w.pubID&&!w.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(N));if(w.pubID&&!w.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(N));if(this.internal=!1,w.pubID!=null&&(this.pubID=this.stringify.dtdPubID(w.pubID)),w.sysID!=null&&(this.sysID=this.stringify.dtdSysID(w.sysID)),w.nData!=null&&(this.nData=this.stringify.dtdNData(w.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(N))}}return Object.defineProperty(t.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(t.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(t.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(t.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(t.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(t.prototype,"xmlVersion",{get:function(){return null}}),t.prototype.toString=function(i){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(i))},t}(n)}.call(G)),oe.exports}var se={exports:{}},wr;function Ue(){return wr||(wr=1,function(){var u,n,c=function(f,o){for(var t in o)a.call(o,t)&&(f[t]=o[t]);function i(){this.constructor=f}return i.prototype=o.prototype,f.prototype=new i,f.__super__=o.prototype,f},a={}.hasOwnProperty;n=ct(),u=ot(),se.exports=function(f){c(o,f);function o(t,i,m){if(o.__super__.constructor.call(this,t),i==null)throw new Error("Missing DTD element name. "+this.debugInfo());m||(m="(#PCDATA)"),Array.isArray(m)&&(m="("+m.join(",")+")"),this.name=this.stringify.name(i),this.type=u.ElementDeclaration,this.value=this.stringify.dtdElementValue(m)}return o.prototype.toString=function(t){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(t))},o}(n)}.call(G)),se.exports}var ae={exports:{}},br;function Xe(){return br||(br=1,function(){var u,n,c=function(f,o){for(var t in o)a.call(o,t)&&(f[t]=o[t]);function i(){this.constructor=f}return i.prototype=o.prototype,f.prototype=new i,f.__super__=o.prototype,f},a={}.hasOwnProperty;n=ct(),u=ot(),ae.exports=function(f){c(o,f);function o(t,i,m){if(o.__super__.constructor.call(this,t),i==null)throw new Error("Missing DTD notation name. "+this.debugInfo(i));if(!m.pubID&&!m.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(i));this.name=this.stringify.name(i),this.type=u.NotationDeclaration,m.pubID!=null&&(this.pubID=this.stringify.dtdPubID(m.pubID)),m.sysID!=null&&(this.sysID=this.stringify.dtdSysID(m.sysID))}return Object.defineProperty(o.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(o.prototype,"systemId",{get:function(){return this.sysID}}),o.prototype.toString=function(t){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(t))},o}(n)}.call(G)),ae.exports}var Er;function qe(){return Er||(Er=1,function(){var u,n,c,a,f,o,t,i,m=function(w,y){for(var b in y)N.call(y,b)&&(w[b]=y[b]);function x(){this.constructor=w}return x.prototype=y.prototype,w.prototype=new x,w.__super__=y.prototype,w},N={}.hasOwnProperty;i=yt().isObject,t=ct(),u=ot(),n=Re(),a=je(),c=Ue(),f=Xe(),o=Me(),ne.exports=function(w){m(y,w);function y(b,x,O){var _,E,D,T,p,I;if(y.__super__.constructor.call(this,b),this.type=u.DocType,b.children){for(T=b.children,E=0,D=T.length;E<D;E++)if(_=T[E],_.type===u.Element){this.name=_.name;break}}this.documentObject=b,i(x)&&(p=x,x=p.pubID,O=p.sysID),O==null&&(I=[x,O],O=I[0],x=I[1]),x!=null&&(this.pubID=this.stringify.dtdPubID(x)),O!=null&&(this.sysID=this.stringify.dtdSysID(O))}return Object.defineProperty(y.prototype,"entities",{get:function(){var b,x,O,_,E;for(_={},E=this.children,x=0,O=E.length;x<O;x++)b=E[x],b.type===u.EntityDeclaration&&!b.pe&&(_[b.name]=b);return new o(_)}}),Object.defineProperty(y.prototype,"notations",{get:function(){var b,x,O,_,E;for(_={},E=this.children,x=0,O=E.length;x<O;x++)b=E[x],b.type===u.NotationDeclaration&&(_[b.name]=b);return new o(_)}}),Object.defineProperty(y.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(y.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(y.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),y.prototype.element=function(b,x){var O;return O=new c(this,b,x),this.children.push(O),this},y.prototype.attList=function(b,x,O,_,E){var D;return D=new n(this,b,x,O,_,E),this.children.push(D),this},y.prototype.entity=function(b,x){var O;return O=new a(this,!1,b,x),this.children.push(O),this},y.prototype.pEntity=function(b,x){var O;return O=new a(this,!0,b,x),this.children.push(O),this},y.prototype.notation=function(b,x){var O;return O=new f(this,b,x),this.children.push(O),this},y.prototype.toString=function(b){return this.options.writer.docType(this,this.options.writer.filterOptions(b))},y.prototype.ele=function(b,x){return this.element(b,x)},y.prototype.att=function(b,x,O,_,E){return this.attList(b,x,O,_,E)},y.prototype.ent=function(b,x){return this.entity(b,x)},y.prototype.pent=function(b,x){return this.pEntity(b,x)},y.prototype.not=function(b,x){return this.notation(b,x)},y.prototype.up=function(){return this.root()||this.documentObject},y.prototype.isEqualNode=function(b){return!(!y.__super__.isEqualNode.apply(this,arguments).isEqualNode(b)||b.name!==this.name||b.publicId!==this.publicId||b.systemId!==this.systemId)},y}(t)}.call(G)),ne.exports}var ue={exports:{}},Tr;function ke(){return Tr||(Tr=1,function(){var u,n,c=function(f,o){for(var t in o)a.call(o,t)&&(f[t]=o[t]);function i(){this.constructor=f}return i.prototype=o.prototype,f.prototype=new i,f.__super__=o.prototype,f},a={}.hasOwnProperty;u=ot(),n=ct(),ue.exports=function(f){c(o,f);function o(t,i){if(o.__super__.constructor.call(this,t),i==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=u.Raw,this.value=this.stringify.raw(i)}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(t){return this.options.writer.raw(this,this.options.writer.filterOptions(t))},o}(n)}.call(G)),ue.exports}var ce={exports:{}},xr;function Ve(){return xr||(xr=1,function(){var u,n,c=function(f,o){for(var t in o)a.call(o,t)&&(f[t]=o[t]);function i(){this.constructor=f}return i.prototype=o.prototype,f.prototype=new i,f.__super__=o.prototype,f},a={}.hasOwnProperty;u=ot(),n=St(),ce.exports=function(f){c(o,f);function o(t,i){if(o.__super__.constructor.call(this,t),i==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=u.Text,this.value=this.stringify.text(i)}return Object.defineProperty(o.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(o.prototype,"wholeText",{get:function(){var t,i,m;for(m="",i=this.previousSibling;i;)m=i.data+m,i=i.previousSibling;for(m+=this.data,t=this.nextSibling;t;)m=m+t.data,t=t.nextSibling;return m}}),o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(t){return this.options.writer.text(this,this.options.writer.filterOptions(t))},o.prototype.splitText=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.replaceWholeText=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o}(n)}.call(G)),ce.exports}var le={exports:{}},Dr;function $e(){return Dr||(Dr=1,function(){var u,n,c=function(f,o){for(var t in o)a.call(o,t)&&(f[t]=o[t]);function i(){this.constructor=f}return i.prototype=o.prototype,f.prototype=new i,f.__super__=o.prototype,f},a={}.hasOwnProperty;u=ot(),n=St(),le.exports=function(f){c(o,f);function o(t,i,m){if(o.__super__.constructor.call(this,t),i==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=u.ProcessingInstruction,this.target=this.stringify.insTarget(i),this.name=this.target,m&&(this.value=this.stringify.insValue(m))}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(t){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(t))},o.prototype.isEqualNode=function(t){return!(!o.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)||t.target!==this.target)},o}(n)}.call(G)),le.exports}var fe={exports:{}},vr;function un(){return vr||(vr=1,function(){var u,n,c=function(f,o){for(var t in o)a.call(o,t)&&(f[t]=o[t]);function i(){this.constructor=f}return i.prototype=o.prototype,f.prototype=new i,f.__super__=o.prototype,f},a={}.hasOwnProperty;n=ct(),u=ot(),fe.exports=function(f){c(o,f);function o(t){o.__super__.constructor.call(this,t),this.type=u.Dummy}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(t){return""},o}(n)}.call(G)),fe.exports}var he={exports:{}},Ir;function li(){return Ir||(Ir=1,function(){he.exports=function(){function u(n){this.nodes=n}return Object.defineProperty(u.prototype,"length",{get:function(){return this.nodes.length||0}}),u.prototype.clone=function(){return this.nodes=null},u.prototype.item=function(n){return this.nodes[n]||null},u}()}.call(G)),he.exports}var pe={exports:{}},Nr;function fi(){return Nr||(Nr=1,function(){pe.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}.call(G)),pe.exports}var Or;function ct(){return Or||(Or=1,function(){var u,n,c,a,f,o,t,i,m,N,w,y,b,x,O,_,E,D={}.hasOwnProperty;E=yt(),_=E.isObject,O=E.isFunction,x=E.isEmpty,b=E.getValue,i=null,c=null,a=null,f=null,o=null,w=null,y=null,N=null,t=null,n=null,m=null,u=null,Yt.exports=function(){function T(p){this.parent=p,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,i||(i=Pe(),c=Fe(),a=Se(),f=Be(),o=qe(),w=ke(),y=Ve(),N=$e(),t=un(),n=ot(),m=li(),Me(),u=fi())}return Object.defineProperty(T.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(T.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(T.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(T.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(T.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new m(this.children)),this.childNodeList}}),Object.defineProperty(T.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(T.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(T.prototype,"previousSibling",{get:function(){var p;return p=this.parent.children.indexOf(this),this.parent.children[p-1]||null}}),Object.defineProperty(T.prototype,"nextSibling",{get:function(){var p;return p=this.parent.children.indexOf(this),this.parent.children[p+1]||null}}),Object.defineProperty(T.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(T.prototype,"textContent",{get:function(){var p,I,A,j,U;if(this.nodeType===n.Element||this.nodeType===n.DocumentFragment){for(U="",j=this.children,I=0,A=j.length;I<A;I++)p=j[I],p.textContent&&(U+=p.textContent);return U}else return null},set:function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),T.prototype.setParent=function(p){var I,A,j,U,B;for(this.parent=p,p&&(this.options=p.options,this.stringify=p.stringify),U=this.children,B=[],A=0,j=U.length;A<j;A++)I=U[A],B.push(I.setParent(this));return B},T.prototype.element=function(p,I,A){var j,U,B,h,F,R,X,$,Y,J,z;if(R=null,I===null&&A==null&&(Y=[{},null],I=Y[0],A=Y[1]),I==null&&(I={}),I=b(I),_(I)||(J=[I,A],A=J[0],I=J[1]),p!=null&&(p=b(p)),Array.isArray(p))for(B=0,X=p.length;B<X;B++)U=p[B],R=this.element(U);else if(O(p))R=this.element(p.apply());else if(_(p)){for(F in p)if(D.call(p,F))if(z=p[F],O(z)&&(z=z.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&F.indexOf(this.stringify.convertAttKey)===0)R=this.attribute(F.substr(this.stringify.convertAttKey.length),z);else if(!this.options.separateArrayItems&&Array.isArray(z)&&x(z))R=this.dummy();else if(_(z)&&x(z))R=this.element(F);else if(!this.options.keepNullNodes&&z==null)R=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(z))for(h=0,$=z.length;h<$;h++)U=z[h],j={},j[F]=U,R=this.element(j);else _(z)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&F.indexOf(this.stringify.convertTextKey)===0?R=this.element(z):(R=this.element(F),R.element(z)):R=this.element(F,z)}else!this.options.keepNullNodes&&A===null?R=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&p.indexOf(this.stringify.convertTextKey)===0?R=this.text(A):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&p.indexOf(this.stringify.convertCDataKey)===0?R=this.cdata(A):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&p.indexOf(this.stringify.convertCommentKey)===0?R=this.comment(A):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&p.indexOf(this.stringify.convertRawKey)===0?R=this.raw(A):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&p.indexOf(this.stringify.convertPIKey)===0?R=this.instruction(p.substr(this.stringify.convertPIKey.length),A):R=this.node(p,I,A);if(R==null)throw new Error("Could not create any elements with: "+p+". "+this.debugInfo());return R},T.prototype.insertBefore=function(p,I,A){var j,U,B,h,F;if(p?.type)return B=p,h=I,B.setParent(this),h?(U=children.indexOf(h),F=children.splice(U),children.push(B),Array.prototype.push.apply(children,F)):children.push(B),B;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(p));return U=this.parent.children.indexOf(this),F=this.parent.children.splice(U),j=this.parent.element(p,I,A),Array.prototype.push.apply(this.parent.children,F),j},T.prototype.insertAfter=function(p,I,A){var j,U,B;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(p));return U=this.parent.children.indexOf(this),B=this.parent.children.splice(U+1),j=this.parent.element(p,I,A),Array.prototype.push.apply(this.parent.children,B),j},T.prototype.remove=function(){var p;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return p=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[p,p-p+1].concat([])),this.parent},T.prototype.node=function(p,I,A){var j,U;return p!=null&&(p=b(p)),I||(I={}),I=b(I),_(I)||(U=[I,A],A=U[0],I=U[1]),j=new i(this,p,I),A!=null&&j.text(A),this.children.push(j),j},T.prototype.text=function(p){var I;return _(p)&&this.element(p),I=new y(this,p),this.children.push(I),this},T.prototype.cdata=function(p){var I;return I=new c(this,p),this.children.push(I),this},T.prototype.comment=function(p){var I;return I=new a(this,p),this.children.push(I),this},T.prototype.commentBefore=function(p){var I,A;return I=this.parent.children.indexOf(this),A=this.parent.children.splice(I),this.parent.comment(p),Array.prototype.push.apply(this.parent.children,A),this},T.prototype.commentAfter=function(p){var I,A;return I=this.parent.children.indexOf(this),A=this.parent.children.splice(I+1),this.parent.comment(p),Array.prototype.push.apply(this.parent.children,A),this},T.prototype.raw=function(p){var I;return I=new w(this,p),this.children.push(I),this},T.prototype.dummy=function(){var p;return p=new t(this),p},T.prototype.instruction=function(p,I){var A,j,U,B,h;if(p!=null&&(p=b(p)),I!=null&&(I=b(I)),Array.isArray(p))for(B=0,h=p.length;B<h;B++)A=p[B],this.instruction(A);else if(_(p))for(A in p)D.call(p,A)&&(j=p[A],this.instruction(A,j));else O(I)&&(I=I.apply()),U=new N(this,p,I),this.children.push(U);return this},T.prototype.instructionBefore=function(p,I){var A,j;return A=this.parent.children.indexOf(this),j=this.parent.children.splice(A),this.parent.instruction(p,I),Array.prototype.push.apply(this.parent.children,j),this},T.prototype.instructionAfter=function(p,I){var A,j;return A=this.parent.children.indexOf(this),j=this.parent.children.splice(A+1),this.parent.instruction(p,I),Array.prototype.push.apply(this.parent.children,j),this},T.prototype.declaration=function(p,I,A){var j,U;return j=this.document(),U=new f(j,p,I,A),j.children.length===0?j.children.unshift(U):j.children[0].type===n.Declaration?j.children[0]=U:j.children.unshift(U),j.root()||j},T.prototype.dtd=function(p,I){var A,j,U,B,h,F,R,X,$,Y;for(j=this.document(),U=new o(j,p,I),$=j.children,B=h=0,R=$.length;h<R;B=++h)if(A=$[B],A.type===n.DocType)return j.children[B]=U,U;for(Y=j.children,B=F=0,X=Y.length;F<X;B=++F)if(A=Y[B],A.isRoot)return j.children.splice(B,0,U),U;return j.children.push(U),U},T.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},T.prototype.root=function(){var p;for(p=this;p;){if(p.type===n.Document)return p.rootObject;if(p.isRoot)return p;p=p.parent}},T.prototype.document=function(){var p;for(p=this;p;){if(p.type===n.Document)return p;p=p.parent}},T.prototype.end=function(p){return this.document().end(p)},T.prototype.prev=function(){var p;if(p=this.parent.children.indexOf(this),p<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[p-1]},T.prototype.next=function(){var p;if(p=this.parent.children.indexOf(this),p===-1||p===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[p+1]},T.prototype.importDocument=function(p){var I;return I=p.root().clone(),I.parent=this,I.isRoot=!1,this.children.push(I),this},T.prototype.debugInfo=function(p){var I,A;return p=p||this.name,p==null&&!((I=this.parent)!=null&&I.name)?"":p==null?"parent: <"+this.parent.name+">":(A=this.parent)!=null&&A.name?"node: <"+p+">, parent: <"+this.parent.name+">":"node: <"+p+">"},T.prototype.ele=function(p,I,A){return this.element(p,I,A)},T.prototype.nod=function(p,I,A){return this.node(p,I,A)},T.prototype.txt=function(p){return this.text(p)},T.prototype.dat=function(p){return this.cdata(p)},T.prototype.com=function(p){return this.comment(p)},T.prototype.ins=function(p,I){return this.instruction(p,I)},T.prototype.doc=function(){return this.document()},T.prototype.dec=function(p,I,A){return this.declaration(p,I,A)},T.prototype.e=function(p,I,A){return this.element(p,I,A)},T.prototype.n=function(p,I,A){return this.node(p,I,A)},T.prototype.t=function(p){return this.text(p)},T.prototype.d=function(p){return this.cdata(p)},T.prototype.c=function(p){return this.comment(p)},T.prototype.r=function(p){return this.raw(p)},T.prototype.i=function(p,I){return this.instruction(p,I)},T.prototype.u=function(){return this.up()},T.prototype.importXMLBuilder=function(p){return this.importDocument(p)},T.prototype.replaceChild=function(p,I){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.removeChild=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.appendChild=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.hasChildNodes=function(){return this.children.length!==0},T.prototype.cloneNode=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.isSupported=function(p,I){return!0},T.prototype.hasAttributes=function(){return this.attribs.length!==0},T.prototype.compareDocumentPosition=function(p){var I,A;return I=this,I===p?0:this.document()!==p.document()?(A=u.Disconnected|u.ImplementationSpecific,Math.random()<.5?A|=u.Preceding:A|=u.Following,A):I.isAncestor(p)?u.Contains|u.Preceding:I.isDescendant(p)?u.Contains|u.Following:I.isPreceding(p)?u.Preceding:u.Following},T.prototype.isSameNode=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.lookupPrefix=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.isDefaultNamespace=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.lookupNamespaceURI=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.isEqualNode=function(p){var I,A,j;if(p.nodeType!==this.nodeType||p.children.length!==this.children.length)return!1;for(I=A=0,j=this.children.length-1;0<=j?A<=j:A>=j;I=0<=j?++A:--A)if(!this.children[I].isEqualNode(p.children[I]))return!1;return!0},T.prototype.getFeature=function(p,I){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.setUserData=function(p,I,A){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getUserData=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.contains=function(p){return p?p===this||this.isDescendant(p):!1},T.prototype.isDescendant=function(p){var I,A,j,U,B;for(B=this.children,j=0,U=B.length;j<U;j++)if(I=B[j],p===I||(A=I.isDescendant(p),A))return!0;return!1},T.prototype.isAncestor=function(p){return p.isDescendant(this)},T.prototype.isPreceding=function(p){var I,A;return I=this.treePosition(p),A=this.treePosition(this),I===-1||A===-1?!1:I<A},T.prototype.isFollowing=function(p){var I,A;return I=this.treePosition(p),A=this.treePosition(this),I===-1||A===-1?!1:I>A},T.prototype.treePosition=function(p){var I,A;return A=0,I=!1,this.foreachTreeNode(this.document(),function(j){if(A++,!I&&j===p)return I=!0}),I?A:-1},T.prototype.foreachTreeNode=function(p,I){var A,j,U,B,h;for(p||(p=this.document()),B=p.children,j=0,U=B.length;j<U;j++){if(A=B[j],h=I(A))return h;if(h=this.foreachTreeNode(A,I),h)return h}},T}()}.call(G)),Yt.exports}var de={exports:{}},Cr;function cn(){return Cr||(Cr=1,function(){var u=function(c,a){return function(){return c.apply(a,arguments)}},n={}.hasOwnProperty;de.exports=function(){function c(a){this.assertLegalName=u(this.assertLegalName,this),this.assertLegalChar=u(this.assertLegalChar,this);var f,o,t;a||(a={}),this.options=a,this.options.version||(this.options.version="1.0"),o=a.stringify||{};for(f in o)n.call(o,f)&&(t=o[f],this[f]=t)}return c.prototype.name=function(a){return this.options.noValidation?a:this.assertLegalName(""+a||"")},c.prototype.text=function(a){return this.options.noValidation?a:this.assertLegalChar(this.textEscape(""+a||""))},c.prototype.cdata=function(a){return this.options.noValidation?a:(a=""+a||"",a=a.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(a))},c.prototype.comment=function(a){if(this.options.noValidation)return a;if(a=""+a||"",a.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+a);return this.assertLegalChar(a)},c.prototype.raw=function(a){return this.options.noValidation?a:""+a||""},c.prototype.attValue=function(a){return this.options.noValidation?a:this.assertLegalChar(this.attEscape(a=""+a||""))},c.prototype.insTarget=function(a){return this.options.noValidation?a:this.assertLegalChar(""+a||"")},c.prototype.insValue=function(a){if(this.options.noValidation)return a;if(a=""+a||"",a.match(/\?>/))throw new Error("Invalid processing instruction value: "+a);return this.assertLegalChar(a)},c.prototype.xmlVersion=function(a){if(this.options.noValidation)return a;if(a=""+a||"",!a.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+a);return a},c.prototype.xmlEncoding=function(a){if(this.options.noValidation)return a;if(a=""+a||"",!a.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+a);return this.assertLegalChar(a)},c.prototype.xmlStandalone=function(a){return this.options.noValidation?a:a?"yes":"no"},c.prototype.dtdPubID=function(a){return this.options.noValidation?a:this.assertLegalChar(""+a||"")},c.prototype.dtdSysID=function(a){return this.options.noValidation?a:this.assertLegalChar(""+a||"")},c.prototype.dtdElementValue=function(a){return this.options.noValidation?a:this.assertLegalChar(""+a||"")},c.prototype.dtdAttType=function(a){return this.options.noValidation?a:this.assertLegalChar(""+a||"")},c.prototype.dtdAttDefault=function(a){return this.options.noValidation?a:this.assertLegalChar(""+a||"")},c.prototype.dtdEntityValue=function(a){return this.options.noValidation?a:this.assertLegalChar(""+a||"")},c.prototype.dtdNData=function(a){return this.options.noValidation?a:this.assertLegalChar(""+a||"")},c.prototype.convertAttKey="@",c.prototype.convertPIKey="?",c.prototype.convertTextKey="#text",c.prototype.convertCDataKey="#cdata",c.prototype.convertCommentKey="#comment",c.prototype.convertRawKey="#raw",c.prototype.assertLegalChar=function(a){var f,o;if(this.options.noValidation)return a;if(f="",this.options.version==="1.0"){if(f=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,o=a.match(f))throw new Error("Invalid character in string: "+a+" at index "+o.index)}else if(this.options.version==="1.1"&&(f=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,o=a.match(f)))throw new Error("Invalid character in string: "+a+" at index "+o.index);return a},c.prototype.assertLegalName=function(a){var f;if(this.options.noValidation)return a;if(this.assertLegalChar(a),f=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!a.match(f))throw new Error("Invalid character in name");return a},c.prototype.textEscape=function(a){var f;return this.options.noValidation?a:(f=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,a.replace(f,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},c.prototype.attEscape=function(a){var f;return this.options.noValidation?a:(f=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,a.replace(f,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},c}()}.call(G)),de.exports}var me={exports:{}},ye={exports:{}},ge={exports:{}},Ar;function Bt(){return Ar||(Ar=1,function(){ge.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}.call(G)),ge.exports}var Lr;function ln(){return Lr||(Lr=1,function(){var u,n,c,a={}.hasOwnProperty;c=yt().assign,u=ot(),Be(),qe(),Fe(),Se(),Pe(),ke(),Ve(),$e(),un(),Re(),Ue(),je(),Xe(),n=Bt(),ye.exports=function(){function f(o){var t,i,m;o||(o={}),this.options=o,i=o.writer||{};for(t in i)a.call(i,t)&&(m=i[t],this["_"+t]=this[t],this[t]=m)}return f.prototype.filterOptions=function(o){var t,i,m,N,w,y,b,x;return o||(o={}),o=c({},this.options,o),t={writer:this},t.pretty=o.pretty||!1,t.allowEmpty=o.allowEmpty||!1,t.indent=(i=o.indent)!=null?i:" ",t.newline=(m=o.newline)!=null?m:`
29
+ `,t.offset=(N=o.offset)!=null?N:0,t.dontPrettyTextNodes=(w=(y=o.dontPrettyTextNodes)!=null?y:o.dontprettytextnodes)!=null?w:0,t.spaceBeforeSlash=(b=(x=o.spaceBeforeSlash)!=null?x:o.spacebeforeslash)!=null?b:"",t.spaceBeforeSlash===!0&&(t.spaceBeforeSlash=" "),t.suppressPrettyCount=0,t.user={},t.state=n.None,t},f.prototype.indent=function(o,t,i){var m;return!t.pretty||t.suppressPrettyCount?"":t.pretty&&(m=(i||0)+t.offset+1,m>0)?new Array(m).join(t.indent):""},f.prototype.endline=function(o,t,i){return!t.pretty||t.suppressPrettyCount?"":t.newline},f.prototype.attribute=function(o,t,i){var m;return this.openAttribute(o,t,i),m=" "+o.name+'="'+o.value+'"',this.closeAttribute(o,t,i),m},f.prototype.cdata=function(o,t,i){var m;return this.openNode(o,t,i),t.state=n.OpenTag,m=this.indent(o,t,i)+"<![CDATA[",t.state=n.InsideTag,m+=o.value,t.state=n.CloseTag,m+="]]>"+this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),m},f.prototype.comment=function(o,t,i){var m;return this.openNode(o,t,i),t.state=n.OpenTag,m=this.indent(o,t,i)+"<!-- ",t.state=n.InsideTag,m+=o.value,t.state=n.CloseTag,m+=" -->"+this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),m},f.prototype.declaration=function(o,t,i){var m;return this.openNode(o,t,i),t.state=n.OpenTag,m=this.indent(o,t,i)+"<?xml",t.state=n.InsideTag,m+=' version="'+o.version+'"',o.encoding!=null&&(m+=' encoding="'+o.encoding+'"'),o.standalone!=null&&(m+=' standalone="'+o.standalone+'"'),t.state=n.CloseTag,m+=t.spaceBeforeSlash+"?>",m+=this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),m},f.prototype.docType=function(o,t,i){var m,N,w,y,b;if(i||(i=0),this.openNode(o,t,i),t.state=n.OpenTag,y=this.indent(o,t,i),y+="<!DOCTYPE "+o.root().name,o.pubID&&o.sysID?y+=' PUBLIC "'+o.pubID+'" "'+o.sysID+'"':o.sysID&&(y+=' SYSTEM "'+o.sysID+'"'),o.children.length>0){for(y+=" [",y+=this.endline(o,t,i),t.state=n.InsideTag,b=o.children,N=0,w=b.length;N<w;N++)m=b[N],y+=this.writeChildNode(m,t,i+1);t.state=n.CloseTag,y+="]"}return t.state=n.CloseTag,y+=t.spaceBeforeSlash+">",y+=this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),y},f.prototype.element=function(o,t,i){var m,N,w,y,b,x,O,_,E,D,T,p,I,A;i||(i=0),D=!1,T="",this.openNode(o,t,i),t.state=n.OpenTag,T+=this.indent(o,t,i)+"<"+o.name,p=o.attribs;for(E in p)a.call(p,E)&&(m=p[E],T+=this.attribute(m,t,i));if(w=o.children.length,y=w===0?null:o.children[0],w===0||o.children.every(function(j){return(j.type===u.Text||j.type===u.Raw)&&j.value===""}))t.allowEmpty?(T+=">",t.state=n.CloseTag,T+="</"+o.name+">"+this.endline(o,t,i)):(t.state=n.CloseTag,T+=t.spaceBeforeSlash+"/>"+this.endline(o,t,i));else if(t.pretty&&w===1&&(y.type===u.Text||y.type===u.Raw)&&y.value!=null)T+=">",t.state=n.InsideTag,t.suppressPrettyCount++,D=!0,T+=this.writeChildNode(y,t,i+1),t.suppressPrettyCount--,D=!1,t.state=n.CloseTag,T+="</"+o.name+">"+this.endline(o,t,i);else{if(t.dontPrettyTextNodes){for(I=o.children,b=0,O=I.length;b<O;b++)if(N=I[b],(N.type===u.Text||N.type===u.Raw)&&N.value!=null){t.suppressPrettyCount++,D=!0;break}}for(T+=">"+this.endline(o,t,i),t.state=n.InsideTag,A=o.children,x=0,_=A.length;x<_;x++)N=A[x],T+=this.writeChildNode(N,t,i+1);t.state=n.CloseTag,T+=this.indent(o,t,i)+"</"+o.name+">",D&&t.suppressPrettyCount--,T+=this.endline(o,t,i),t.state=n.None}return this.closeNode(o,t,i),T},f.prototype.writeChildNode=function(o,t,i){switch(o.type){case u.CData:return this.cdata(o,t,i);case u.Comment:return this.comment(o,t,i);case u.Element:return this.element(o,t,i);case u.Raw:return this.raw(o,t,i);case u.Text:return this.text(o,t,i);case u.ProcessingInstruction:return this.processingInstruction(o,t,i);case u.Dummy:return"";case u.Declaration:return this.declaration(o,t,i);case u.DocType:return this.docType(o,t,i);case u.AttributeDeclaration:return this.dtdAttList(o,t,i);case u.ElementDeclaration:return this.dtdElement(o,t,i);case u.EntityDeclaration:return this.dtdEntity(o,t,i);case u.NotationDeclaration:return this.dtdNotation(o,t,i);default:throw new Error("Unknown XML node type: "+o.constructor.name)}},f.prototype.processingInstruction=function(o,t,i){var m;return this.openNode(o,t,i),t.state=n.OpenTag,m=this.indent(o,t,i)+"<?",t.state=n.InsideTag,m+=o.target,o.value&&(m+=" "+o.value),t.state=n.CloseTag,m+=t.spaceBeforeSlash+"?>",m+=this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),m},f.prototype.raw=function(o,t,i){var m;return this.openNode(o,t,i),t.state=n.OpenTag,m=this.indent(o,t,i),t.state=n.InsideTag,m+=o.value,t.state=n.CloseTag,m+=this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),m},f.prototype.text=function(o,t,i){var m;return this.openNode(o,t,i),t.state=n.OpenTag,m=this.indent(o,t,i),t.state=n.InsideTag,m+=o.value,t.state=n.CloseTag,m+=this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),m},f.prototype.dtdAttList=function(o,t,i){var m;return this.openNode(o,t,i),t.state=n.OpenTag,m=this.indent(o,t,i)+"<!ATTLIST",t.state=n.InsideTag,m+=" "+o.elementName+" "+o.attributeName+" "+o.attributeType,o.defaultValueType!=="#DEFAULT"&&(m+=" "+o.defaultValueType),o.defaultValue&&(m+=' "'+o.defaultValue+'"'),t.state=n.CloseTag,m+=t.spaceBeforeSlash+">"+this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),m},f.prototype.dtdElement=function(o,t,i){var m;return this.openNode(o,t,i),t.state=n.OpenTag,m=this.indent(o,t,i)+"<!ELEMENT",t.state=n.InsideTag,m+=" "+o.name+" "+o.value,t.state=n.CloseTag,m+=t.spaceBeforeSlash+">"+this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),m},f.prototype.dtdEntity=function(o,t,i){var m;return this.openNode(o,t,i),t.state=n.OpenTag,m=this.indent(o,t,i)+"<!ENTITY",t.state=n.InsideTag,o.pe&&(m+=" %"),m+=" "+o.name,o.value?m+=' "'+o.value+'"':(o.pubID&&o.sysID?m+=' PUBLIC "'+o.pubID+'" "'+o.sysID+'"':o.sysID&&(m+=' SYSTEM "'+o.sysID+'"'),o.nData&&(m+=" NDATA "+o.nData)),t.state=n.CloseTag,m+=t.spaceBeforeSlash+">"+this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),m},f.prototype.dtdNotation=function(o,t,i){var m;return this.openNode(o,t,i),t.state=n.OpenTag,m=this.indent(o,t,i)+"<!NOTATION",t.state=n.InsideTag,m+=" "+o.name,o.pubID&&o.sysID?m+=' PUBLIC "'+o.pubID+'" "'+o.sysID+'"':o.pubID?m+=' PUBLIC "'+o.pubID+'"':o.sysID&&(m+=' SYSTEM "'+o.sysID+'"'),t.state=n.CloseTag,m+=t.spaceBeforeSlash+">"+this.endline(o,t,i),t.state=n.None,this.closeNode(o,t,i),m},f.prototype.openNode=function(o,t,i){},f.prototype.closeNode=function(o,t,i){},f.prototype.openAttribute=function(o,t,i){},f.prototype.closeAttribute=function(o,t,i){},f}()}.call(G)),ye.exports}var _r;function We(){return _r||(_r=1,function(){var u,n=function(a,f){for(var o in f)c.call(f,o)&&(a[o]=f[o]);function t(){this.constructor=a}return t.prototype=f.prototype,a.prototype=new t,a.__super__=f.prototype,a},c={}.hasOwnProperty;u=ln(),me.exports=function(a){n(f,a);function f(o){f.__super__.constructor.call(this,o)}return f.prototype.document=function(o,t){var i,m,N,w,y;for(t=this.filterOptions(t),w="",y=o.children,m=0,N=y.length;m<N;m++)i=y[m],w+=this.writeChildNode(i,t,0);return t.pretty&&w.slice(-t.newline.length)===t.newline&&(w=w.slice(0,-t.newline.length)),w},f}(u)}.call(G)),me.exports}var Mr;function fn(){return Mr||(Mr=1,function(){var u,n,c,a,f,o,t,i=function(N,w){for(var y in w)m.call(w,y)&&(N[y]=w[y]);function b(){this.constructor=N}return b.prototype=w.prototype,N.prototype=new b,N.__super__=w.prototype,N},m={}.hasOwnProperty;t=yt().isPlainObject,c=sn(),n=ci(),a=ct(),u=ot(),o=cn(),f=We(),$t.exports=function(N){i(w,N);function w(y){w.__super__.constructor.call(this,null),this.name="#document",this.type=u.Document,this.documentURI=null,this.domConfig=new n,y||(y={}),y.writer||(y.writer=new f),this.options=y,this.stringify=new o(y)}return Object.defineProperty(w.prototype,"implementation",{value:new c}),Object.defineProperty(w.prototype,"doctype",{get:function(){var y,b,x,O;for(O=this.children,b=0,x=O.length;b<x;b++)if(y=O[b],y.type===u.DocType)return y;return null}}),Object.defineProperty(w.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(w.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(w.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(w.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===u.Declaration?this.children[0].encoding:null}}),Object.defineProperty(w.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===u.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(w.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===u.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(w.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(w.prototype,"origin",{get:function(){return null}}),Object.defineProperty(w.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(w.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(w.prototype,"contentType",{get:function(){return null}}),w.prototype.end=function(y){var b;return b={},y?t(y)&&(b=y,y=this.options.writer):y=this.options.writer,y.document(this,y.filterOptions(b))},w.prototype.toString=function(y){return this.options.writer.document(this,this.options.writer.filterOptions(y))},w.prototype.createElement=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createTextNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createComment=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createCDATASection=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createProcessingInstruction=function(y,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createAttribute=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createEntityReference=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.getElementsByTagName=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.importNode=function(y,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createElementNS=function(y,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createAttributeNS=function(y,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.getElementsByTagNameNS=function(y,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.getElementById=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.adoptNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.renameNode=function(y,b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.getElementsByClassName=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createEvent=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createNodeIterator=function(y,b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.createTreeWalker=function(y,b,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},w}(a)}.call(G)),$t.exports}var we={exports:{}},Pr;function hi(){return Pr||(Pr=1,function(){var u,n,c,a,f,o,t,i,m,N,w,y,b,x,O,_,E,D,T,p,I,A,j,U={}.hasOwnProperty;j=yt(),I=j.isObject,p=j.isFunction,A=j.isPlainObject,T=j.getValue,u=ot(),y=fn(),b=Pe(),a=Fe(),f=Se(),O=ke(),D=Ve(),x=$e(),N=Be(),w=qe(),o=Re(),i=je(),t=Ue(),m=Xe(),c=an(),E=cn(),_=We(),n=Bt(),we.exports=function(){function B(h,F,R){var X;this.name="?xml",this.type=u.Document,h||(h={}),X={},h.writer?A(h.writer)&&(X=h.writer,h.writer=new _):h.writer=new _,this.options=h,this.writer=h.writer,this.writerOptions=this.writer.filterOptions(X),this.stringify=new E(h),this.onDataCallback=F||function(){},this.onEndCallback=R||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return B.prototype.createChildNode=function(h){var F,R,X,$,Y,J,z,W;switch(h.type){case u.CData:this.cdata(h.value);break;case u.Comment:this.comment(h.value);break;case u.Element:X={},z=h.attribs;for(R in z)U.call(z,R)&&(F=z[R],X[R]=F.value);this.node(h.name,X);break;case u.Dummy:this.dummy();break;case u.Raw:this.raw(h.value);break;case u.Text:this.text(h.value);break;case u.ProcessingInstruction:this.instruction(h.target,h.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+h.constructor.name)}for(W=h.children,Y=0,J=W.length;Y<J;Y++)$=W[Y],this.createChildNode($),$.type===u.Element&&this.up();return this},B.prototype.dummy=function(){return this},B.prototype.node=function(h,F,R){var X;if(h==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(h));return this.openCurrent(),h=T(h),F==null&&(F={}),F=T(F),I(F)||(X=[F,R],R=X[0],F=X[1]),this.currentNode=new b(this,h,F),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,R!=null&&this.text(R),this},B.prototype.element=function(h,F,R){var X,$,Y,J,z,W;if(this.currentNode&&this.currentNode.type===u.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(h)||I(h)||p(h))for(J=this.options.noValidation,this.options.noValidation=!0,W=new y(this.options).element("TEMP_ROOT"),W.element(h),this.options.noValidation=J,z=W.children,$=0,Y=z.length;$<Y;$++)X=z[$],this.createChildNode(X),X.type===u.Element&&this.up();else this.node(h,F,R);return this},B.prototype.attribute=function(h,F){var R,X;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(h));if(h!=null&&(h=T(h)),I(h))for(R in h)U.call(h,R)&&(X=h[R],this.attribute(R,X));else p(F)&&(F=F.apply()),this.options.keepNullAttributes&&F==null?this.currentNode.attribs[h]=new c(this,h,""):F!=null&&(this.currentNode.attribs[h]=new c(this,h,F));return this},B.prototype.text=function(h){var F;return this.openCurrent(),F=new D(this,h),this.onData(this.writer.text(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},B.prototype.cdata=function(h){var F;return this.openCurrent(),F=new a(this,h),this.onData(this.writer.cdata(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},B.prototype.comment=function(h){var F;return this.openCurrent(),F=new f(this,h),this.onData(this.writer.comment(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},B.prototype.raw=function(h){var F;return this.openCurrent(),F=new O(this,h),this.onData(this.writer.raw(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},B.prototype.instruction=function(h,F){var R,X,$,Y,J;if(this.openCurrent(),h!=null&&(h=T(h)),F!=null&&(F=T(F)),Array.isArray(h))for(R=0,Y=h.length;R<Y;R++)X=h[R],this.instruction(X);else if(I(h))for(X in h)U.call(h,X)&&($=h[X],this.instruction(X,$));else p(F)&&(F=F.apply()),J=new x(this,h,F),this.onData(this.writer.processingInstruction(J,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},B.prototype.declaration=function(h,F,R){var X;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return X=new N(this,h,F,R),this.onData(this.writer.declaration(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},B.prototype.doctype=function(h,F,R){if(this.openCurrent(),h==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new w(this,F,R),this.currentNode.rootNodeName=h,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},B.prototype.dtdElement=function(h,F){var R;return this.openCurrent(),R=new t(this,h,F),this.onData(this.writer.dtdElement(R,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},B.prototype.attList=function(h,F,R,X,$){var Y;return this.openCurrent(),Y=new o(this,h,F,R,X,$),this.onData(this.writer.dtdAttList(Y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},B.prototype.entity=function(h,F){var R;return this.openCurrent(),R=new i(this,!1,h,F),this.onData(this.writer.dtdEntity(R,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},B.prototype.pEntity=function(h,F){var R;return this.openCurrent(),R=new i(this,!0,h,F),this.onData(this.writer.dtdEntity(R,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},B.prototype.notation=function(h,F){var R;return this.openCurrent(),R=new m(this,h,F),this.onData(this.writer.dtdNotation(R,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},B.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},B.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},B.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},B.prototype.openNode=function(h){var F,R,X,$;if(!h.isOpen){if(!this.root&&this.currentLevel===0&&h.type===u.Element&&(this.root=h),R="",h.type===u.Element){this.writerOptions.state=n.OpenTag,R=this.writer.indent(h,this.writerOptions,this.currentLevel)+"<"+h.name,$=h.attribs;for(X in $)U.call($,X)&&(F=$[X],R+=this.writer.attribute(F,this.writerOptions,this.currentLevel));R+=(h.children?">":"/>")+this.writer.endline(h,this.writerOptions,this.currentLevel),this.writerOptions.state=n.InsideTag}else this.writerOptions.state=n.OpenTag,R=this.writer.indent(h,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+h.rootNodeName,h.pubID&&h.sysID?R+=' PUBLIC "'+h.pubID+'" "'+h.sysID+'"':h.sysID&&(R+=' SYSTEM "'+h.sysID+'"'),h.children?(R+=" [",this.writerOptions.state=n.InsideTag):(this.writerOptions.state=n.CloseTag,R+=">"),R+=this.writer.endline(h,this.writerOptions,this.currentLevel);return this.onData(R,this.currentLevel),h.isOpen=!0}},B.prototype.closeNode=function(h){var F;if(!h.isClosed)return F="",this.writerOptions.state=n.CloseTag,h.type===u.Element?F=this.writer.indent(h,this.writerOptions,this.currentLevel)+"</"+h.name+">"+this.writer.endline(h,this.writerOptions,this.currentLevel):F=this.writer.indent(h,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(h,this.writerOptions,this.currentLevel),this.writerOptions.state=n.None,this.onData(F,this.currentLevel),h.isClosed=!0},B.prototype.onData=function(h,F){return this.documentStarted=!0,this.onDataCallback(h,F+1)},B.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},B.prototype.debugInfo=function(h){return h==null?"":"node: <"+h+">"},B.prototype.ele=function(){return this.element.apply(this,arguments)},B.prototype.nod=function(h,F,R){return this.node(h,F,R)},B.prototype.txt=function(h){return this.text(h)},B.prototype.dat=function(h){return this.cdata(h)},B.prototype.com=function(h){return this.comment(h)},B.prototype.ins=function(h,F){return this.instruction(h,F)},B.prototype.dec=function(h,F,R){return this.declaration(h,F,R)},B.prototype.dtd=function(h,F,R){return this.doctype(h,F,R)},B.prototype.e=function(h,F,R){return this.element(h,F,R)},B.prototype.n=function(h,F,R){return this.node(h,F,R)},B.prototype.t=function(h){return this.text(h)},B.prototype.d=function(h){return this.cdata(h)},B.prototype.c=function(h){return this.comment(h)},B.prototype.r=function(h){return this.raw(h)},B.prototype.i=function(h,F){return this.instruction(h,F)},B.prototype.att=function(){return this.currentNode&&this.currentNode.type===u.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},B.prototype.a=function(){return this.currentNode&&this.currentNode.type===u.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},B.prototype.ent=function(h,F){return this.entity(h,F)},B.prototype.pent=function(h,F){return this.pEntity(h,F)},B.prototype.not=function(h,F){return this.notation(h,F)},B}()}.call(G)),we.exports}var be={exports:{}},Fr;function pi(){return Fr||(Fr=1,function(){var u,n,c,a=function(o,t){for(var i in t)f.call(t,i)&&(o[i]=t[i]);function m(){this.constructor=o}return m.prototype=t.prototype,o.prototype=new m,o.__super__=t.prototype,o},f={}.hasOwnProperty;u=ot(),c=ln(),n=Bt(),be.exports=function(o){a(t,o);function t(i,m){this.stream=i,t.__super__.constructor.call(this,m)}return t.prototype.endline=function(i,m,N){return i.isLastRootNode&&m.state===n.CloseTag?"":t.__super__.endline.call(this,i,m,N)},t.prototype.document=function(i,m){var N,w,y,b,x,O,_,E,D;for(_=i.children,w=y=0,x=_.length;y<x;w=++y)N=_[w],N.isLastRootNode=w===i.children.length-1;for(m=this.filterOptions(m),E=i.children,D=[],b=0,O=E.length;b<O;b++)N=E[b],D.push(this.writeChildNode(N,m,0));return D},t.prototype.attribute=function(i,m,N){return this.stream.write(t.__super__.attribute.call(this,i,m,N))},t.prototype.cdata=function(i,m,N){return this.stream.write(t.__super__.cdata.call(this,i,m,N))},t.prototype.comment=function(i,m,N){return this.stream.write(t.__super__.comment.call(this,i,m,N))},t.prototype.declaration=function(i,m,N){return this.stream.write(t.__super__.declaration.call(this,i,m,N))},t.prototype.docType=function(i,m,N){var w,y,b,x;if(N||(N=0),this.openNode(i,m,N),m.state=n.OpenTag,this.stream.write(this.indent(i,m,N)),this.stream.write("<!DOCTYPE "+i.root().name),i.pubID&&i.sysID?this.stream.write(' PUBLIC "'+i.pubID+'" "'+i.sysID+'"'):i.sysID&&this.stream.write(' SYSTEM "'+i.sysID+'"'),i.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(i,m,N)),m.state=n.InsideTag,x=i.children,y=0,b=x.length;y<b;y++)w=x[y],this.writeChildNode(w,m,N+1);m.state=n.CloseTag,this.stream.write("]")}return m.state=n.CloseTag,this.stream.write(m.spaceBeforeSlash+">"),this.stream.write(this.endline(i,m,N)),m.state=n.None,this.closeNode(i,m,N)},t.prototype.element=function(i,m,N){var w,y,b,x,O,_,E,D,T;N||(N=0),this.openNode(i,m,N),m.state=n.OpenTag,this.stream.write(this.indent(i,m,N)+"<"+i.name),D=i.attribs;for(E in D)f.call(D,E)&&(w=D[E],this.attribute(w,m,N));if(b=i.children.length,x=b===0?null:i.children[0],b===0||i.children.every(function(p){return(p.type===u.Text||p.type===u.Raw)&&p.value===""}))m.allowEmpty?(this.stream.write(">"),m.state=n.CloseTag,this.stream.write("</"+i.name+">")):(m.state=n.CloseTag,this.stream.write(m.spaceBeforeSlash+"/>"));else if(m.pretty&&b===1&&(x.type===u.Text||x.type===u.Raw)&&x.value!=null)this.stream.write(">"),m.state=n.InsideTag,m.suppressPrettyCount++,this.writeChildNode(x,m,N+1),m.suppressPrettyCount--,m.state=n.CloseTag,this.stream.write("</"+i.name+">");else{for(this.stream.write(">"+this.endline(i,m,N)),m.state=n.InsideTag,T=i.children,O=0,_=T.length;O<_;O++)y=T[O],this.writeChildNode(y,m,N+1);m.state=n.CloseTag,this.stream.write(this.indent(i,m,N)+"</"+i.name+">")}return this.stream.write(this.endline(i,m,N)),m.state=n.None,this.closeNode(i,m,N)},t.prototype.processingInstruction=function(i,m,N){return this.stream.write(t.__super__.processingInstruction.call(this,i,m,N))},t.prototype.raw=function(i,m,N){return this.stream.write(t.__super__.raw.call(this,i,m,N))},t.prototype.text=function(i,m,N){return this.stream.write(t.__super__.text.call(this,i,m,N))},t.prototype.dtdAttList=function(i,m,N){return this.stream.write(t.__super__.dtdAttList.call(this,i,m,N))},t.prototype.dtdElement=function(i,m,N){return this.stream.write(t.__super__.dtdElement.call(this,i,m,N))},t.prototype.dtdEntity=function(i,m,N){return this.stream.write(t.__super__.dtdEntity.call(this,i,m,N))},t.prototype.dtdNotation=function(i,m,N){return this.stream.write(t.__super__.dtdNotation.call(this,i,m,N))},t}(c)}.call(G)),be.exports}var Sr;function di(){return Sr||(Sr=1,function(){var u,n,c,a,f,o,t,i,m,N;N=yt(),i=N.assign,m=N.isFunction,c=sn(),a=fn(),f=hi(),t=We(),o=pi(),u=ot(),n=Bt(),dt.create=function(w,y,b,x){var O,_;if(w==null)throw new Error("Root element needs a name.");return x=i({},y,b,x),O=new a(x),_=O.element(w),x.headless||(O.declaration(x),(x.pubID!=null||x.sysID!=null)&&O.dtd(x)),_},dt.begin=function(w,y,b){var x;return m(w)&&(x=[w,y],y=x[0],b=x[1],w={}),y?new f(w,y,b):new a(w)},dt.stringWriter=function(w){return new t(w)},dt.streamWriter=function(w,y){return new o(w,y)},dt.implementation=new c,dt.nodeType=u,dt.writerState=n}.call(G)),dt}var Br;function mi(){return Br||(Br=1,function(){var u,n,c,a,f,o={}.hasOwnProperty;u=di(),n=_e().defaults,a=function(t){return typeof t=="string"&&(t.indexOf("&")>=0||t.indexOf(">")>=0||t.indexOf("<")>=0)},f=function(t){return"<![CDATA["+c(t)+"]]>"},c=function(t){return t.replace("]]>","]]]]><![CDATA[>")},kt.Builder=function(){function t(i){var m,N,w;this.options={},N=n["0.2"];for(m in N)o.call(N,m)&&(w=N[m],this.options[m]=w);for(m in i)o.call(i,m)&&(w=i[m],this.options[m]=w)}return t.prototype.buildObject=function(i){var m,N,w,y,b;return m=this.options.attrkey,N=this.options.charkey,Object.keys(i).length===1&&this.options.rootName===n["0.2"].rootName?(b=Object.keys(i)[0],i=i[b]):b=this.options.rootName,w=function(x){return function(O,_){var E,D,T,p,I,A;if(typeof _!="object")x.options.cdata&&a(_)?O.raw(f(_)):O.txt(_);else if(Array.isArray(_)){for(p in _)if(o.call(_,p)){D=_[p];for(I in D)T=D[I],O=w(O.ele(I),T).up()}}else for(I in _)if(o.call(_,I))if(D=_[I],I===m){if(typeof D=="object")for(E in D)A=D[E],O=O.att(E,A)}else if(I===N)x.options.cdata&&a(D)?O=O.raw(f(D)):O=O.txt(D);else if(Array.isArray(D))for(p in D)o.call(D,p)&&(T=D[p],typeof T=="string"?x.options.cdata&&a(T)?O=O.ele(I).raw(f(T)).up():O=O.ele(I,T).up():O=w(O.ele(I),T).up());else typeof D=="object"?O=w(O.ele(I),D).up():typeof D=="string"&&x.options.cdata&&a(D)?O=O.ele(I).raw(f(D)).up():(D==null&&(D=""),O=O.ele(I,D.toString()).up());return O}}(this),y=u.create(b,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),w(y,i).end(this.options.renderOpts)},t}()}.call(G)),kt}var Ee={},Te={},xe={},Lt={exports:{}},De={},Nt={},Rr;function yi(){if(Rr)return Nt;Rr=1,Nt.byteLength=i,Nt.toByteArray=N,Nt.fromByteArray=b;for(var u=[],n=[],c=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,o=a.length;f<o;++f)u[f]=a[f],n[a.charCodeAt(f)]=f;n[45]=62,n[95]=63;function t(x){var O=x.length;if(O%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=x.indexOf("=");_===-1&&(_=O);var E=_===O?0:4-_%4;return[_,E]}function i(x){var O=t(x),_=O[0],E=O[1];return(_+E)*3/4-E}function m(x,O,_){return(O+_)*3/4-_}function N(x){var O,_=t(x),E=_[0],D=_[1],T=new c(m(x,E,D)),p=0,I=D>0?E-4:E,A;for(A=0;A<I;A+=4)O=n[x.charCodeAt(A)]<<18|n[x.charCodeAt(A+1)]<<12|n[x.charCodeAt(A+2)]<<6|n[x.charCodeAt(A+3)],T[p++]=O>>16&255,T[p++]=O>>8&255,T[p++]=O&255;return D===2&&(O=n[x.charCodeAt(A)]<<2|n[x.charCodeAt(A+1)]>>4,T[p++]=O&255),D===1&&(O=n[x.charCodeAt(A)]<<10|n[x.charCodeAt(A+1)]<<4|n[x.charCodeAt(A+2)]>>2,T[p++]=O>>8&255,T[p++]=O&255),T}function w(x){return u[x>>18&63]+u[x>>12&63]+u[x>>6&63]+u[x&63]}function y(x,O,_){for(var E,D=[],T=O;T<_;T+=3)E=(x[T]<<16&16711680)+(x[T+1]<<8&65280)+(x[T+2]&255),D.push(w(E));return D.join("")}function b(x){for(var O,_=x.length,E=_%3,D=[],T=16383,p=0,I=_-E;p<I;p+=T)D.push(y(x,p,p+T>I?I:p+T));return E===1?(O=x[_-1],D.push(u[O>>2]+u[O<<4&63]+"==")):E===2&&(O=(x[_-2]<<8)+x[_-1],D.push(u[O>>10]+u[O>>4&63]+u[O<<2&63]+"=")),D.join("")}return Nt}var _t={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var jr;function gi(){return jr||(jr=1,_t.read=function(u,n,c,a,f){var o,t,i=f*8-a-1,m=(1<<i)-1,N=m>>1,w=-7,y=c?f-1:0,b=c?-1:1,x=u[n+y];for(y+=b,o=x&(1<<-w)-1,x>>=-w,w+=i;w>0;o=o*256+u[n+y],y+=b,w-=8);for(t=o&(1<<-w)-1,o>>=-w,w+=a;w>0;t=t*256+u[n+y],y+=b,w-=8);if(o===0)o=1-N;else{if(o===m)return t?NaN:(x?-1:1)*(1/0);t=t+Math.pow(2,a),o=o-N}return(x?-1:1)*t*Math.pow(2,o-a)},_t.write=function(u,n,c,a,f,o){var t,i,m,N=o*8-f-1,w=(1<<N)-1,y=w>>1,b=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=a?0:o-1,O=a?1:-1,_=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(i=isNaN(n)?1:0,t=w):(t=Math.floor(Math.log(n)/Math.LN2),n*(m=Math.pow(2,-t))<1&&(t--,m*=2),t+y>=1?n+=b/m:n+=b*Math.pow(2,1-y),n*m>=2&&(t++,m/=2),t+y>=w?(i=0,t=w):t+y>=1?(i=(n*m-1)*Math.pow(2,f),t=t+y):(i=n*Math.pow(2,y-1)*Math.pow(2,f),t=0));f>=8;u[c+x]=i&255,x+=O,i/=256,f-=8);for(t=t<<f|i,N+=f;N>0;u[c+x]=t&255,x+=O,t/=256,N-=8);u[c+x-O]|=_*128}),_t}/*!
30
30
  * The buffer module from node.js, for the browser.
31
31
  *
32
32
  * @author Feross Aboukhadijeh <https://feross.org>
33
33
  * @license MIT
34
- */var Ur;function wi(){return Ur||(Ur=1,function(u){var n=yi(),c=gi(),a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;u.Buffer=i,u.SlowBuffer=T,u.INSPECT_MAX_BYTES=50;var f=2147483647;u.kMaxLength=f,i.TYPED_ARRAY_SUPPORT=o(),!i.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{var s=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(s,e),s.foo()===42}catch{return!1}}Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}});function t(s){if(s>f)throw new RangeError('The value "'+s+'" is invalid for option "size"');var e=new Uint8Array(s);return Object.setPrototypeOf(e,i.prototype),e}function i(s,e,r){if(typeof s=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(s)}return m(s,e,r)}i.poolSize=8192;function m(s,e,r){if(typeof s=="string")return b(s,e);if(ArrayBuffer.isView(s))return O(s);if(s==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof s);if(H(s,ArrayBuffer)||s&&H(s.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(H(s,SharedArrayBuffer)||s&&H(s.buffer,SharedArrayBuffer)))return _(s,e,r);if(typeof s=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var l=s.valueOf&&s.valueOf();if(l!=null&&l!==s)return i.from(l,e,r);var v=E(s);if(v)return v;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof s[Symbol.toPrimitive]=="function")return i.from(s[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof s)}i.from=function(s,e,r){return m(s,e,r)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array);function N(s){if(typeof s!="number")throw new TypeError('"size" argument must be of type number');if(s<0)throw new RangeError('The value "'+s+'" is invalid for option "size"')}function w(s,e,r){return N(s),s<=0?t(s):e!==void 0?typeof r=="string"?t(s).fill(e,r):t(s).fill(e):t(s)}i.alloc=function(s,e,r){return w(s,e,r)};function g(s){return N(s),t(s<0?0:D(s)|0)}i.allocUnsafe=function(s){return g(s)},i.allocUnsafeSlow=function(s){return g(s)};function b(s,e){if((typeof e!="string"||e==="")&&(e="utf8"),!i.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=p(s,e)|0,l=t(r),v=l.write(s,e);return v!==r&&(l=l.slice(0,v)),l}function x(s){for(var e=s.length<0?0:D(s.length)|0,r=t(e),l=0;l<e;l+=1)r[l]=s[l]&255;return r}function O(s){if(H(s,Uint8Array)){var e=new Uint8Array(s);return _(e.buffer,e.byteOffset,e.byteLength)}return x(s)}function _(s,e,r){if(e<0||s.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(s.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var l;return e===void 0&&r===void 0?l=new Uint8Array(s):r===void 0?l=new Uint8Array(s,e):l=new Uint8Array(s,e,r),Object.setPrototypeOf(l,i.prototype),l}function E(s){if(i.isBuffer(s)){var e=D(s.length)|0,r=t(e);return r.length===0||s.copy(r,0,0,e),r}if(s.length!==void 0)return typeof s.length!="number"||it(s.length)?t(0):x(s);if(s.type==="Buffer"&&Array.isArray(s.data))return x(s.data)}function D(s){if(s>=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return s|0}function T(s){return+s!=s&&(s=0),i.alloc(+s)}i.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==i.prototype},i.compare=function(e,r){if(H(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),H(r,Uint8Array)&&(r=i.from(r,r.offset,r.byteLength)),!i.isBuffer(e)||!i.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;for(var l=e.length,v=r.length,M=0,P=Math.min(l,v);M<P;++M)if(e[M]!==r[M]){l=e[M],v=r[M];break}return l<v?-1:v<l?1:0},i.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return i.alloc(0);var l;if(r===void 0)for(r=0,l=0;l<e.length;++l)r+=e[l].length;var v=i.allocUnsafe(r),M=0;for(l=0;l<e.length;++l){var P=e[l];if(H(P,Uint8Array))M+P.length>v.length?i.from(P).copy(v,M):Uint8Array.prototype.set.call(v,P,M);else if(i.isBuffer(P))P.copy(v,M);else throw new TypeError('"list" argument must be an Array of Buffers');M+=P.length}return v};function p(s,e){if(i.isBuffer(s))return s.length;if(ArrayBuffer.isView(s)||H(s,ArrayBuffer))return s.byteLength;if(typeof s!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof s);var r=s.length,l=arguments.length>2&&arguments[2]===!0;if(!l&&r===0)return 0;for(var v=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return d(s).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return K(s).length;default:if(v)return l?-1:d(s).length;e=(""+e).toLowerCase(),v=!0}}i.byteLength=p;function I(s,e,r){var l=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(s||(s="utf8");;)switch(s){case"hex":return bt(this,e,r);case"utf8":case"utf-8":return Y(this,e,r);case"ascii":return W(this,e,r);case"latin1":case"binary":return vt(this,e,r);case"base64":return $(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gt(this,e,r);default:if(l)throw new TypeError("Unknown encoding: "+s);s=(s+"").toLowerCase(),l=!0}}i.prototype._isBuffer=!0;function A(s,e,r){var l=s[e];s[e]=s[r],s[r]=l}i.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<e;r+=2)A(this,r,r+1);return this},i.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<e;r+=4)A(this,r,r+3),A(this,r+1,r+2);return this},i.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<e;r+=8)A(this,r,r+7),A(this,r+1,r+6),A(this,r+2,r+5),A(this,r+3,r+4);return this},i.prototype.toString=function(){var e=this.length;return e===0?"":arguments.length===0?Y(this,0,e):I.apply(this,arguments)},i.prototype.toLocaleString=i.prototype.toString,i.prototype.equals=function(e){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:i.compare(this,e)===0},i.prototype.inspect=function(){var e="",r=u.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},a&&(i.prototype[a]=i.prototype.inspect),i.prototype.compare=function(e,r,l,v,M){if(H(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),!i.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),l===void 0&&(l=e?e.length:0),v===void 0&&(v=0),M===void 0&&(M=this.length),r<0||l>e.length||v<0||M>this.length)throw new RangeError("out of range index");if(v>=M&&r>=l)return 0;if(v>=M)return-1;if(r>=l)return 1;if(r>>>=0,l>>>=0,v>>>=0,M>>>=0,this===e)return 0;for(var P=M-v,q=l-r,V=Math.min(P,q),rt=this.slice(v,M),st=e.slice(r,l),nt=0;nt<V;++nt)if(rt[nt]!==st[nt]){P=rt[nt],q=st[nt];break}return P<q?-1:q<P?1:0};function j(s,e,r,l,v){if(s.length===0)return-1;if(typeof r=="string"?(l=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,it(r)&&(r=v?0:s.length-1),r<0&&(r=s.length+r),r>=s.length){if(v)return-1;r=s.length-1}else if(r<0)if(v)r=0;else return-1;if(typeof e=="string"&&(e=i.from(e,l)),i.isBuffer(e))return e.length===0?-1:U(s,e,r,l,v);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?v?Uint8Array.prototype.indexOf.call(s,e,r):Uint8Array.prototype.lastIndexOf.call(s,e,r):U(s,[e],r,l,v);throw new TypeError("val must be string, number or Buffer")}function U(s,e,r,l,v){var M=1,P=s.length,q=e.length;if(l!==void 0&&(l=String(l).toLowerCase(),l==="ucs2"||l==="ucs-2"||l==="utf16le"||l==="utf-16le")){if(s.length<2||e.length<2)return-1;M=2,P/=2,q/=2,r/=2}function V(He,Ge){return M===1?He[Ge]:He.readUInt16BE(Ge*M)}var rt;if(v){var st=-1;for(rt=r;rt<P;rt++)if(V(s,rt)===V(e,st===-1?0:rt-st)){if(st===-1&&(st=rt),rt-st+1===q)return st*M}else st!==-1&&(rt-=rt-st),st=-1}else for(r+q>P&&(r=P-q),rt=r;rt>=0;rt--){for(var nt=!0,Ct=0;Ct<q;Ct++)if(V(s,rt+Ct)!==V(e,Ct)){nt=!1;break}if(nt)return rt}return-1}i.prototype.includes=function(e,r,l){return this.indexOf(e,r,l)!==-1},i.prototype.indexOf=function(e,r,l){return j(this,e,r,l,!0)},i.prototype.lastIndexOf=function(e,r,l){return j(this,e,r,l,!1)};function B(s,e,r,l){r=Number(r)||0;var v=s.length-r;l?(l=Number(l),l>v&&(l=v)):l=v;var M=e.length;l>M/2&&(l=M/2);for(var P=0;P<l;++P){var q=parseInt(e.substr(P*2,2),16);if(it(q))return P;s[r+P]=q}return P}function h(s,e,r,l){return tt(d(e,s.length-r),s,r,l)}function F(s,e,r,l){return tt(S(e),s,r,l)}function R(s,e,r,l){return tt(K(e),s,r,l)}function X(s,e,r,l){return tt(L(e,s.length-r),s,r,l)}i.prototype.write=function(e,r,l,v){if(r===void 0)v="utf8",l=this.length,r=0;else if(l===void 0&&typeof r=="string")v=r,l=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(l)?(l=l>>>0,v===void 0&&(v="utf8")):(v=l,l=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var M=this.length-r;if((l===void 0||l>M)&&(l=M),e.length>0&&(l<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");v||(v="utf8");for(var P=!1;;)switch(v){case"hex":return B(this,e,r,l);case"utf8":case"utf-8":return h(this,e,r,l);case"ascii":case"latin1":case"binary":return F(this,e,r,l);case"base64":return R(this,e,r,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,e,r,l);default:if(P)throw new TypeError("Unknown encoding: "+v);v=(""+v).toLowerCase(),P=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function $(s,e,r){return e===0&&r===s.length?n.fromByteArray(s):n.fromByteArray(s.slice(e,r))}function Y(s,e,r){r=Math.min(s.length,r);for(var l=[],v=e;v<r;){var M=s[v],P=null,q=M>239?4:M>223?3:M>191?2:1;if(v+q<=r){var V,rt,st,nt;switch(q){case 1:M<128&&(P=M);break;case 2:V=s[v+1],(V&192)===128&&(nt=(M&31)<<6|V&63,nt>127&&(P=nt));break;case 3:V=s[v+1],rt=s[v+2],(V&192)===128&&(rt&192)===128&&(nt=(M&15)<<12|(V&63)<<6|rt&63,nt>2047&&(nt<55296||nt>57343)&&(P=nt));break;case 4:V=s[v+1],rt=s[v+2],st=s[v+3],(V&192)===128&&(rt&192)===128&&(st&192)===128&&(nt=(M&15)<<18|(V&63)<<12|(rt&63)<<6|st&63,nt>65535&&nt<1114112&&(P=nt))}}P===null?(P=65533,q=1):P>65535&&(P-=65536,l.push(P>>>10&1023|55296),P=56320|P&1023),l.push(P),v+=q}return z(l)}var J=4096;function z(s){var e=s.length;if(e<=J)return String.fromCharCode.apply(String,s);for(var r="",l=0;l<e;)r+=String.fromCharCode.apply(String,s.slice(l,l+=J));return r}function W(s,e,r){var l="";r=Math.min(s.length,r);for(var v=e;v<r;++v)l+=String.fromCharCode(s[v]&127);return l}function vt(s,e,r){var l="";r=Math.min(s.length,r);for(var v=e;v<r;++v)l+=String.fromCharCode(s[v]);return l}function bt(s,e,r){var l=s.length;(!e||e<0)&&(e=0),(!r||r<0||r>l)&&(r=l);for(var v="",M=e;M<r;++M)v+=C[s[M]];return v}function gt(s,e,r){for(var l=s.slice(e,r),v="",M=0;M<l.length-1;M+=2)v+=String.fromCharCode(l[M]+l[M+1]*256);return v}i.prototype.slice=function(e,r){var l=this.length;e=~~e,r=r===void 0?l:~~r,e<0?(e+=l,e<0&&(e=0)):e>l&&(e=l),r<0?(r+=l,r<0&&(r=0)):r>l&&(r=l),r<e&&(r=e);var v=this.subarray(e,r);return Object.setPrototypeOf(v,i.prototype),v};function Q(s,e,r){if(s%1!==0||s<0)throw new RangeError("offset is not uint");if(s+e>r)throw new RangeError("Trying to access beyond buffer length")}i.prototype.readUintLE=i.prototype.readUIntLE=function(e,r,l){e=e>>>0,r=r>>>0,l||Q(e,r,this.length);for(var v=this[e],M=1,P=0;++P<r&&(M*=256);)v+=this[e+P]*M;return v},i.prototype.readUintBE=i.prototype.readUIntBE=function(e,r,l){e=e>>>0,r=r>>>0,l||Q(e,r,this.length);for(var v=this[e+--r],M=1;r>0&&(M*=256);)v+=this[e+--r]*M;return v},i.prototype.readUint8=i.prototype.readUInt8=function(e,r){return e=e>>>0,r||Q(e,1,this.length),this[e]},i.prototype.readUint16LE=i.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||Q(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUint16BE=i.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||Q(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUint32LE=i.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||Q(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},i.prototype.readUint32BE=i.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||Q(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,r,l){e=e>>>0,r=r>>>0,l||Q(e,r,this.length);for(var v=this[e],M=1,P=0;++P<r&&(M*=256);)v+=this[e+P]*M;return M*=128,v>=M&&(v-=Math.pow(2,8*r)),v},i.prototype.readIntBE=function(e,r,l){e=e>>>0,r=r>>>0,l||Q(e,r,this.length);for(var v=r,M=1,P=this[e+--v];v>0&&(M*=256);)P+=this[e+--v]*M;return M*=128,P>=M&&(P-=Math.pow(2,8*r)),P},i.prototype.readInt8=function(e,r){return e=e>>>0,r||Q(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},i.prototype.readInt16LE=function(e,r){e=e>>>0,r||Q(e,2,this.length);var l=this[e]|this[e+1]<<8;return l&32768?l|4294901760:l},i.prototype.readInt16BE=function(e,r){e=e>>>0,r||Q(e,2,this.length);var l=this[e+1]|this[e]<<8;return l&32768?l|4294901760:l},i.prototype.readInt32LE=function(e,r){return e=e>>>0,r||Q(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,r){return e=e>>>0,r||Q(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,r){return e=e>>>0,r||Q(e,4,this.length),c.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,r){return e=e>>>0,r||Q(e,4,this.length),c.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||Q(e,8,this.length),c.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||Q(e,8,this.length),c.read(this,e,!1,52,8)};function et(s,e,r,l,v,M){if(!i.isBuffer(s))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>v||e<M)throw new RangeError('"value" argument is out of bounds');if(r+l>s.length)throw new RangeError("Index out of range")}i.prototype.writeUintLE=i.prototype.writeUIntLE=function(e,r,l,v){if(e=+e,r=r>>>0,l=l>>>0,!v){var M=Math.pow(2,8*l)-1;et(this,e,r,l,M,0)}var P=1,q=0;for(this[r]=e&255;++q<l&&(P*=256);)this[r+q]=e/P&255;return r+l},i.prototype.writeUintBE=i.prototype.writeUIntBE=function(e,r,l,v){if(e=+e,r=r>>>0,l=l>>>0,!v){var M=Math.pow(2,8*l)-1;et(this,e,r,l,M,0)}var P=l-1,q=1;for(this[r+P]=e&255;--P>=0&&(q*=256);)this[r+P]=e/q&255;return r+l},i.prototype.writeUint8=i.prototype.writeUInt8=function(e,r,l){return e=+e,r=r>>>0,l||et(this,e,r,1,255,0),this[r]=e&255,r+1},i.prototype.writeUint16LE=i.prototype.writeUInt16LE=function(e,r,l){return e=+e,r=r>>>0,l||et(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2},i.prototype.writeUint16BE=i.prototype.writeUInt16BE=function(e,r,l){return e=+e,r=r>>>0,l||et(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2},i.prototype.writeUint32LE=i.prototype.writeUInt32LE=function(e,r,l){return e=+e,r=r>>>0,l||et(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4},i.prototype.writeUint32BE=i.prototype.writeUInt32BE=function(e,r,l){return e=+e,r=r>>>0,l||et(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4},i.prototype.writeIntLE=function(e,r,l,v){if(e=+e,r=r>>>0,!v){var M=Math.pow(2,8*l-1);et(this,e,r,l,M-1,-M)}var P=0,q=1,V=0;for(this[r]=e&255;++P<l&&(q*=256);)e<0&&V===0&&this[r+P-1]!==0&&(V=1),this[r+P]=(e/q>>0)-V&255;return r+l},i.prototype.writeIntBE=function(e,r,l,v){if(e=+e,r=r>>>0,!v){var M=Math.pow(2,8*l-1);et(this,e,r,l,M-1,-M)}var P=l-1,q=1,V=0;for(this[r+P]=e&255;--P>=0&&(q*=256);)e<0&&V===0&&this[r+P+1]!==0&&(V=1),this[r+P]=(e/q>>0)-V&255;return r+l},i.prototype.writeInt8=function(e,r,l){return e=+e,r=r>>>0,l||et(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1},i.prototype.writeInt16LE=function(e,r,l){return e=+e,r=r>>>0,l||et(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2},i.prototype.writeInt16BE=function(e,r,l){return e=+e,r=r>>>0,l||et(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2},i.prototype.writeInt32LE=function(e,r,l){return e=+e,r=r>>>0,l||et(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4},i.prototype.writeInt32BE=function(e,r,l){return e=+e,r=r>>>0,l||et(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function Tt(s,e,r,l,v,M){if(r+l>s.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function k(s,e,r,l,v){return e=+e,r=r>>>0,v||Tt(s,e,r,4),c.write(s,e,r,l,23,4),r+4}i.prototype.writeFloatLE=function(e,r,l){return k(this,e,r,!0,l)},i.prototype.writeFloatBE=function(e,r,l){return k(this,e,r,!1,l)};function wt(s,e,r,l,v){return e=+e,r=r>>>0,v||Tt(s,e,r,8),c.write(s,e,r,l,52,8),r+8}i.prototype.writeDoubleLE=function(e,r,l){return wt(this,e,r,!0,l)},i.prototype.writeDoubleBE=function(e,r,l){return wt(this,e,r,!1,l)},i.prototype.copy=function(e,r,l,v){if(!i.isBuffer(e))throw new TypeError("argument should be a Buffer");if(l||(l=0),!v&&v!==0&&(v=this.length),r>=e.length&&(r=e.length),r||(r=0),v>0&&v<l&&(v=l),v===l||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(l<0||l>=this.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("sourceEnd out of bounds");v>this.length&&(v=this.length),e.length-r<v-l&&(v=e.length-r+l);var M=v-l;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,l,v):Uint8Array.prototype.set.call(e,this.subarray(l,v),r),M},i.prototype.fill=function(e,r,l,v){if(typeof e=="string"){if(typeof r=="string"?(v=r,r=0,l=this.length):typeof l=="string"&&(v=l,l=this.length),v!==void 0&&typeof v!="string")throw new TypeError("encoding must be a string");if(typeof v=="string"&&!i.isEncoding(v))throw new TypeError("Unknown encoding: "+v);if(e.length===1){var M=e.charCodeAt(0);(v==="utf8"&&M<128||v==="latin1")&&(e=M)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(r<0||this.length<r||this.length<l)throw new RangeError("Out of range index");if(l<=r)return this;r=r>>>0,l=l===void 0?this.length:l>>>0,e||(e=0);var P;if(typeof e=="number")for(P=r;P<l;++P)this[P]=e;else{var q=i.isBuffer(e)?e:i.from(e,v),V=q.length;if(V===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(P=0;P<l-r;++P)this[P+r]=q[P%V]}return this};var It=/[^+/0-9A-Za-z-_]/g;function y(s){if(s=s.split("=")[0],s=s.trim().replace(It,""),s.length<2)return"";for(;s.length%4!==0;)s=s+"=";return s}function d(s,e){e=e||1/0;for(var r,l=s.length,v=null,M=[],P=0;P<l;++P){if(r=s.charCodeAt(P),r>55295&&r<57344){if(!v){if(r>56319){(e-=3)>-1&&M.push(239,191,189);continue}else if(P+1===l){(e-=3)>-1&&M.push(239,191,189);continue}v=r;continue}if(r<56320){(e-=3)>-1&&M.push(239,191,189),v=r;continue}r=(v-55296<<10|r-56320)+65536}else v&&(e-=3)>-1&&M.push(239,191,189);if(v=null,r<128){if((e-=1)<0)break;M.push(r)}else if(r<2048){if((e-=2)<0)break;M.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;M.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;M.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return M}function S(s){for(var e=[],r=0;r<s.length;++r)e.push(s.charCodeAt(r)&255);return e}function L(s,e){for(var r,l,v,M=[],P=0;P<s.length&&!((e-=2)<0);++P)r=s.charCodeAt(P),l=r>>8,v=r%256,M.push(v),M.push(l);return M}function K(s){return n.toByteArray(y(s))}function tt(s,e,r,l){for(var v=0;v<l&&!(v+r>=e.length||v>=s.length);++v)e[v+r]=s[v];return v}function H(s,e){return s instanceof e||s!=null&&s.constructor!=null&&s.constructor.name!=null&&s.constructor.name===e.name}function it(s){return s!==s}var C=function(){for(var s="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var l=r*16,v=0;v<16;++v)e[l+v]=s[r]+s[v];return e}()}(De)),De}/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Xr;function bi(){return Xr||(Xr=1,function(u,n){var c=wi(),a=c.Buffer;function f(t,i){for(var m in t)i[m]=t[m]}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?u.exports=c:(f(c,n),n.Buffer=o);function o(t,i,m){return a(t,i,m)}o.prototype=Object.create(a.prototype),f(a,o),o.from=function(t,i,m){if(typeof t=="number")throw new TypeError("Argument must not be a number");return a(t,i,m)},o.alloc=function(t,i,m){if(typeof t!="number")throw new TypeError("Argument must be a number");var N=a(t);return i!==void 0?typeof m=="string"?N.fill(i,m):N.fill(i):N.fill(0),N},o.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return a(t)},o.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return c.SlowBuffer(t)}}(Lt,Lt.exports)),Lt.exports}var qr;function Ei(){if(qr)return xe;qr=1;var u=bi().Buffer,n=u.isEncoding||function(D){switch(D=""+D,D&&D.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function c(D){if(!D)return"utf8";for(var T;;)switch(D){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return D;default:if(T)return;D=(""+D).toLowerCase(),T=!0}}function a(D){var T=c(D);if(typeof T!="string"&&(u.isEncoding===n||!n(D)))throw new Error("Unknown encoding: "+D);return T||D}xe.StringDecoder=f;function f(D){this.encoding=a(D);var T;switch(this.encoding){case"utf16le":this.text=g,this.end=b,T=4;break;case"utf8":this.fillLast=m,T=4;break;case"base64":this.text=x,this.end=O,T=3;break;default:this.write=_,this.end=E;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=u.allocUnsafe(T)}f.prototype.write=function(D){if(D.length===0)return"";var T,p;if(this.lastNeed){if(T=this.fillLast(D),T===void 0)return"";p=this.lastNeed,this.lastNeed=0}else p=0;return p<D.length?T?T+this.text(D,p):this.text(D,p):T||""},f.prototype.end=w,f.prototype.text=N,f.prototype.fillLast=function(D){if(this.lastNeed<=D.length)return D.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);D.copy(this.lastChar,this.lastTotal-this.lastNeed,0,D.length),this.lastNeed-=D.length};function o(D){return D<=127?0:D>>5===6?2:D>>4===14?3:D>>3===30?4:D>>6===2?-1:-2}function t(D,T,p){var I=T.length-1;if(I<p)return 0;var A=o(T[I]);return A>=0?(A>0&&(D.lastNeed=A-1),A):--I<p||A===-2?0:(A=o(T[I]),A>=0?(A>0&&(D.lastNeed=A-2),A):--I<p||A===-2?0:(A=o(T[I]),A>=0?(A>0&&(A===2?A=0:D.lastNeed=A-3),A):0))}function i(D,T,p){if((T[0]&192)!==128)return D.lastNeed=0,"�";if(D.lastNeed>1&&T.length>1){if((T[1]&192)!==128)return D.lastNeed=1,"�";if(D.lastNeed>2&&T.length>2&&(T[2]&192)!==128)return D.lastNeed=2,"�"}}function m(D){var T=this.lastTotal-this.lastNeed,p=i(this,D);if(p!==void 0)return p;if(this.lastNeed<=D.length)return D.copy(this.lastChar,T,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);D.copy(this.lastChar,T,0,D.length),this.lastNeed-=D.length}function N(D,T){var p=t(this,D,T);if(!this.lastNeed)return D.toString("utf8",T);this.lastTotal=p;var I=D.length-(p-this.lastNeed);return D.copy(this.lastChar,0,I),D.toString("utf8",T,I)}function w(D){var T=D&&D.length?this.write(D):"";return this.lastNeed?T+"�":T}function g(D,T){if((D.length-T)%2===0){var p=D.toString("utf16le",T);if(p){var I=p.charCodeAt(p.length-1);if(I>=55296&&I<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=D[D.length-2],this.lastChar[1]=D[D.length-1],p.slice(0,-1)}return p}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=D[D.length-1],D.toString("utf16le",T,D.length-1)}function b(D){var T=D&&D.length?this.write(D):"";if(this.lastNeed){var p=this.lastTotal-this.lastNeed;return T+this.lastChar.toString("utf16le",0,p)}return T}function x(D,T){var p=(D.length-T)%3;return p===0?D.toString("base64",T):(this.lastNeed=3-p,this.lastTotal=3,p===1?this.lastChar[0]=D[D.length-1]:(this.lastChar[0]=D[D.length-2],this.lastChar[1]=D[D.length-1]),D.toString("base64",T,D.length-p))}function O(D){var T=D&&D.length?this.write(D):"";return this.lastNeed?T+this.lastChar.toString("base64",0,3-this.lastNeed):T}function _(D){return D.toString(this.encoding)}function E(D){return D&&D.length?this.write(D):""}return xe}var kr;function Ti(){return kr||(kr=1,function(u){(function(n){n.parser=function(y,d){return new a(y,d)},n.SAXParser=a,n.SAXStream=w,n.createStream=N,n.MAX_BUFFER_LENGTH=64*1024;var c=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];n.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function a(y,d){if(!(this instanceof a))return new a(y,d);var S=this;o(S),S.q=S.c="",S.bufferCheckPosition=n.MAX_BUFFER_LENGTH,S.opt=d||{},S.opt.lowercase=S.opt.lowercase||S.opt.lowercasetags,S.looseCase=S.opt.lowercase?"toLowerCase":"toUpperCase",S.tags=[],S.closed=S.closedRoot=S.sawRoot=!1,S.tag=S.error=null,S.strict=!!y,S.noscript=!!(y||S.opt.noscript),S.state=h.BEGIN,S.strictEntities=S.opt.strictEntities,S.ENTITIES=S.strictEntities?Object.create(n.XML_ENTITIES):Object.create(n.ENTITIES),S.attribList=[],S.opt.xmlns&&(S.ns=Object.create(_)),S.opt.unquotedAttributeValues===void 0&&(S.opt.unquotedAttributeValues=!y),S.trackPosition=S.opt.position!==!1,S.trackPosition&&(S.position=S.line=S.column=0),R(S,"onready")}Object.create||(Object.create=function(y){function d(){}d.prototype=y;var S=new d;return S}),Object.keys||(Object.keys=function(y){var d=[];for(var S in y)y.hasOwnProperty(S)&&d.push(S);return d});function f(y){for(var d=Math.max(n.MAX_BUFFER_LENGTH,10),S=0,L=0,K=c.length;L<K;L++){var tt=y[c[L]].length;if(tt>d)switch(c[L]){case"textNode":$(y);break;case"cdata":X(y,"oncdata",y.cdata),y.cdata="";break;case"script":X(y,"onscript",y.script),y.script="";break;default:J(y,"Max buffer length exceeded: "+c[L])}S=Math.max(S,tt)}var H=n.MAX_BUFFER_LENGTH-S;y.bufferCheckPosition=H+y.position}function o(y){for(var d=0,S=c.length;d<S;d++)y[c[d]]=""}function t(y){$(y),y.cdata!==""&&(X(y,"oncdata",y.cdata),y.cdata=""),y.script!==""&&(X(y,"onscript",y.script),y.script="")}a.prototype={end:function(){z(this)},write:It,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){t(this)}};var i;try{i=require("stream").Stream}catch{i=function(){}}i||(i=function(){});var m=n.EVENTS.filter(function(y){return y!=="error"&&y!=="end"});function N(y,d){return new w(y,d)}function w(y,d){if(!(this instanceof w))return new w(y,d);i.apply(this),this._parser=new a(y,d),this.writable=!0,this.readable=!0;var S=this;this._parser.onend=function(){S.emit("end")},this._parser.onerror=function(L){S.emit("error",L),S._parser.error=null},this._decoder=null,m.forEach(function(L){Object.defineProperty(S,"on"+L,{get:function(){return S._parser["on"+L]},set:function(K){if(!K)return S.removeAllListeners(L),S._parser["on"+L]=K,K;S.on(L,K)},enumerable:!0,configurable:!1})})}w.prototype=Object.create(i.prototype,{constructor:{value:w}}),w.prototype.write=function(y){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(y)){if(!this._decoder){var d=Ei().StringDecoder;this._decoder=new d("utf8")}y=this._decoder.write(y)}return this._parser.write(y.toString()),this.emit("data",y),!0},w.prototype.end=function(y){return y&&y.length&&this.write(y),this._parser.end(),!0},w.prototype.on=function(y,d){var S=this;return!S._parser["on"+y]&&m.indexOf(y)!==-1&&(S._parser["on"+y]=function(){var L=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);L.splice(0,0,y),S.emit.apply(S,L)}),i.prototype.on.call(S,y,d)};var g="[CDATA[",b="DOCTYPE",x="http://www.w3.org/XML/1998/namespace",O="http://www.w3.org/2000/xmlns/",_={xml:x,xmlns:O},E=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,D=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,T=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,p=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function I(y){return y===" "||y===`
35
- `||y==="\r"||y===" "}function A(y){return y==='"'||y==="'"}function j(y){return y===">"||I(y)}function U(y,d){return y.test(d)}function B(y,d){return!U(y,d)}var h=0;n.STATE={BEGIN:h++,BEGIN_WHITESPACE:h++,TEXT:h++,TEXT_ENTITY:h++,OPEN_WAKA:h++,SGML_DECL:h++,SGML_DECL_QUOTED:h++,DOCTYPE:h++,DOCTYPE_QUOTED:h++,DOCTYPE_DTD:h++,DOCTYPE_DTD_QUOTED:h++,COMMENT_STARTING:h++,COMMENT:h++,COMMENT_ENDING:h++,COMMENT_ENDED:h++,CDATA:h++,CDATA_ENDING:h++,CDATA_ENDING_2:h++,PROC_INST:h++,PROC_INST_BODY:h++,PROC_INST_ENDING:h++,OPEN_TAG:h++,OPEN_TAG_SLASH:h++,ATTRIB:h++,ATTRIB_NAME:h++,ATTRIB_NAME_SAW_WHITE:h++,ATTRIB_VALUE:h++,ATTRIB_VALUE_QUOTED:h++,ATTRIB_VALUE_CLOSED:h++,ATTRIB_VALUE_UNQUOTED:h++,ATTRIB_VALUE_ENTITY_Q:h++,ATTRIB_VALUE_ENTITY_U:h++,CLOSE_TAG:h++,CLOSE_TAG_SAW_WHITE:h++,SCRIPT:h++,SCRIPT_ENDING:h++},n.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},n.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(n.ENTITIES).forEach(function(y){var d=n.ENTITIES[y],S=typeof d=="number"?String.fromCharCode(d):d;n.ENTITIES[y]=S});for(var F in n.STATE)n.STATE[n.STATE[F]]=F;h=n.STATE;function R(y,d,S){y[d]&&y[d](S)}function X(y,d,S){y.textNode&&$(y),R(y,d,S)}function $(y){y.textNode=Y(y.opt,y.textNode),y.textNode&&R(y,"ontext",y.textNode),y.textNode=""}function Y(y,d){return y.trim&&(d=d.trim()),y.normalize&&(d=d.replace(/\s+/g," ")),d}function J(y,d){return $(y),y.trackPosition&&(d+=`
36
- Line: `+y.line+`
37
- Column: `+y.column+`
38
- Char: `+y.c),d=new Error(d),y.error=d,R(y,"onerror",d),y}function z(y){return y.sawRoot&&!y.closedRoot&&W(y,"Unclosed root tag"),y.state!==h.BEGIN&&y.state!==h.BEGIN_WHITESPACE&&y.state!==h.TEXT&&J(y,"Unexpected end"),$(y),y.c="",y.closed=!0,R(y,"onend"),a.call(y,y.strict,y.opt),y}function W(y,d){if(typeof y!="object"||!(y instanceof a))throw new Error("bad call to strictFail");y.strict&&J(y,d)}function vt(y){y.strict||(y.tagName=y.tagName[y.looseCase]());var d=y.tags[y.tags.length-1]||y,S=y.tag={name:y.tagName,attributes:{}};y.opt.xmlns&&(S.ns=d.ns),y.attribList.length=0,X(y,"onopentagstart",S)}function bt(y,d){var S=y.indexOf(":"),L=S<0?["",y]:y.split(":"),K=L[0],tt=L[1];return d&&y==="xmlns"&&(K="xmlns",tt=""),{prefix:K,local:tt}}function gt(y){if(y.strict||(y.attribName=y.attribName[y.looseCase]()),y.attribList.indexOf(y.attribName)!==-1||y.tag.attributes.hasOwnProperty(y.attribName)){y.attribName=y.attribValue="";return}if(y.opt.xmlns){var d=bt(y.attribName,!0),S=d.prefix,L=d.local;if(S==="xmlns")if(L==="xml"&&y.attribValue!==x)W(y,"xml: prefix must be bound to "+x+`
39
- Actual: `+y.attribValue);else if(L==="xmlns"&&y.attribValue!==O)W(y,"xmlns: prefix must be bound to "+O+`
40
- Actual: `+y.attribValue);else{var K=y.tag,tt=y.tags[y.tags.length-1]||y;K.ns===tt.ns&&(K.ns=Object.create(tt.ns)),K.ns[L]=y.attribValue}y.attribList.push([y.attribName,y.attribValue])}else y.tag.attributes[y.attribName]=y.attribValue,X(y,"onattribute",{name:y.attribName,value:y.attribValue});y.attribName=y.attribValue=""}function Q(y,d){if(y.opt.xmlns){var S=y.tag,L=bt(y.tagName);S.prefix=L.prefix,S.local=L.local,S.uri=S.ns[L.prefix]||"",S.prefix&&!S.uri&&(W(y,"Unbound namespace prefix: "+JSON.stringify(y.tagName)),S.uri=L.prefix);var K=y.tags[y.tags.length-1]||y;S.ns&&K.ns!==S.ns&&Object.keys(S.ns).forEach(function(P){X(y,"onopennamespace",{prefix:P,uri:S.ns[P]})});for(var tt=0,H=y.attribList.length;tt<H;tt++){var it=y.attribList[tt],C=it[0],s=it[1],e=bt(C,!0),r=e.prefix,l=e.local,v=r===""?"":S.ns[r]||"",M={name:C,value:s,prefix:r,local:l,uri:v};r&&r!=="xmlns"&&!v&&(W(y,"Unbound namespace prefix: "+JSON.stringify(r)),M.uri=r),y.tag.attributes[C]=M,X(y,"onattribute",M)}y.attribList.length=0}y.tag.isSelfClosing=!!d,y.sawRoot=!0,y.tags.push(y.tag),X(y,"onopentag",y.tag),d||(!y.noscript&&y.tagName.toLowerCase()==="script"?y.state=h.SCRIPT:y.state=h.TEXT,y.tag=null,y.tagName=""),y.attribName=y.attribValue="",y.attribList.length=0}function et(y){if(!y.tagName){W(y,"Weird empty close tag."),y.textNode+="</>",y.state=h.TEXT;return}if(y.script){if(y.tagName!=="script"){y.script+="</"+y.tagName+">",y.tagName="",y.state=h.SCRIPT;return}X(y,"onscript",y.script),y.script=""}var d=y.tags.length,S=y.tagName;y.strict||(S=S[y.looseCase]());for(var L=S;d--;){var K=y.tags[d];if(K.name!==L)W(y,"Unexpected close tag");else break}if(d<0){W(y,"Unmatched closing tag: "+y.tagName),y.textNode+="</"+y.tagName+">",y.state=h.TEXT;return}y.tagName=S;for(var tt=y.tags.length;tt-- >d;){var H=y.tag=y.tags.pop();y.tagName=y.tag.name,X(y,"onclosetag",y.tagName);var it={};for(var C in H.ns)it[C]=H.ns[C];var s=y.tags[y.tags.length-1]||y;y.opt.xmlns&&H.ns!==s.ns&&Object.keys(H.ns).forEach(function(e){var r=H.ns[e];X(y,"onclosenamespace",{prefix:e,uri:r})})}d===0&&(y.closedRoot=!0),y.tagName=y.attribValue=y.attribName="",y.attribList.length=0,y.state=h.TEXT}function Tt(y){var d=y.entity,S=d.toLowerCase(),L,K="";return y.ENTITIES[d]?y.ENTITIES[d]:y.ENTITIES[S]?y.ENTITIES[S]:(d=S,d.charAt(0)==="#"&&(d.charAt(1)==="x"?(d=d.slice(2),L=parseInt(d,16),K=L.toString(16)):(d=d.slice(1),L=parseInt(d,10),K=L.toString(10))),d=d.replace(/^0+/,""),isNaN(L)||K.toLowerCase()!==d?(W(y,"Invalid character entity"),"&"+y.entity+";"):String.fromCodePoint(L))}function k(y,d){d==="<"?(y.state=h.OPEN_WAKA,y.startTagPosition=y.position):I(d)||(W(y,"Non-whitespace before first tag."),y.textNode=d,y.state=h.TEXT)}function wt(y,d){var S="";return d<y.length&&(S=y.charAt(d)),S}function It(y){var d=this;if(this.error)throw this.error;if(d.closed)return J(d,"Cannot write after close. Assign an onready handler.");if(y===null)return z(d);typeof y=="object"&&(y=y.toString());for(var S=0,L="";L=wt(y,S++),d.c=L,!!L;)switch(d.trackPosition&&(d.position++,L===`
41
- `?(d.line++,d.column=0):d.column++),d.state){case h.BEGIN:if(d.state=h.BEGIN_WHITESPACE,L==="\uFEFF")continue;k(d,L);continue;case h.BEGIN_WHITESPACE:k(d,L);continue;case h.TEXT:if(d.sawRoot&&!d.closedRoot){for(var K=S-1;L&&L!=="<"&&L!=="&";)L=wt(y,S++),L&&d.trackPosition&&(d.position++,L===`
42
- `?(d.line++,d.column=0):d.column++);d.textNode+=y.substring(K,S-1)}L==="<"&&!(d.sawRoot&&d.closedRoot&&!d.strict)?(d.state=h.OPEN_WAKA,d.startTagPosition=d.position):(!I(L)&&(!d.sawRoot||d.closedRoot)&&W(d,"Text data outside of root node."),L==="&"?d.state=h.TEXT_ENTITY:d.textNode+=L);continue;case h.SCRIPT:L==="<"?d.state=h.SCRIPT_ENDING:d.script+=L;continue;case h.SCRIPT_ENDING:L==="/"?d.state=h.CLOSE_TAG:(d.script+="<"+L,d.state=h.SCRIPT);continue;case h.OPEN_WAKA:if(L==="!")d.state=h.SGML_DECL,d.sgmlDecl="";else if(!I(L))if(U(E,L))d.state=h.OPEN_TAG,d.tagName=L;else if(L==="/")d.state=h.CLOSE_TAG,d.tagName="";else if(L==="?")d.state=h.PROC_INST,d.procInstName=d.procInstBody="";else{if(W(d,"Unencoded <"),d.startTagPosition+1<d.position){var tt=d.position-d.startTagPosition;L=new Array(tt).join(" ")+L}d.textNode+="<"+L,d.state=h.TEXT}continue;case h.SGML_DECL:if(d.sgmlDecl+L==="--"){d.state=h.COMMENT,d.comment="",d.sgmlDecl="";continue}d.doctype&&d.doctype!==!0&&d.sgmlDecl?(d.state=h.DOCTYPE_DTD,d.doctype+="<!"+d.sgmlDecl+L,d.sgmlDecl=""):(d.sgmlDecl+L).toUpperCase()===g?(X(d,"onopencdata"),d.state=h.CDATA,d.sgmlDecl="",d.cdata=""):(d.sgmlDecl+L).toUpperCase()===b?(d.state=h.DOCTYPE,(d.doctype||d.sawRoot)&&W(d,"Inappropriately located doctype declaration"),d.doctype="",d.sgmlDecl=""):L===">"?(X(d,"onsgmldeclaration",d.sgmlDecl),d.sgmlDecl="",d.state=h.TEXT):(A(L)&&(d.state=h.SGML_DECL_QUOTED),d.sgmlDecl+=L);continue;case h.SGML_DECL_QUOTED:L===d.q&&(d.state=h.SGML_DECL,d.q=""),d.sgmlDecl+=L;continue;case h.DOCTYPE:L===">"?(d.state=h.TEXT,X(d,"ondoctype",d.doctype),d.doctype=!0):(d.doctype+=L,L==="["?d.state=h.DOCTYPE_DTD:A(L)&&(d.state=h.DOCTYPE_QUOTED,d.q=L));continue;case h.DOCTYPE_QUOTED:d.doctype+=L,L===d.q&&(d.q="",d.state=h.DOCTYPE);continue;case h.DOCTYPE_DTD:L==="]"?(d.doctype+=L,d.state=h.DOCTYPE):L==="<"?(d.state=h.OPEN_WAKA,d.startTagPosition=d.position):A(L)?(d.doctype+=L,d.state=h.DOCTYPE_DTD_QUOTED,d.q=L):d.doctype+=L;continue;case h.DOCTYPE_DTD_QUOTED:d.doctype+=L,L===d.q&&(d.state=h.DOCTYPE_DTD,d.q="");continue;case h.COMMENT:L==="-"?d.state=h.COMMENT_ENDING:d.comment+=L;continue;case h.COMMENT_ENDING:L==="-"?(d.state=h.COMMENT_ENDED,d.comment=Y(d.opt,d.comment),d.comment&&X(d,"oncomment",d.comment),d.comment=""):(d.comment+="-"+L,d.state=h.COMMENT);continue;case h.COMMENT_ENDED:L!==">"?(W(d,"Malformed comment"),d.comment+="--"+L,d.state=h.COMMENT):d.doctype&&d.doctype!==!0?d.state=h.DOCTYPE_DTD:d.state=h.TEXT;continue;case h.CDATA:L==="]"?d.state=h.CDATA_ENDING:d.cdata+=L;continue;case h.CDATA_ENDING:L==="]"?d.state=h.CDATA_ENDING_2:(d.cdata+="]"+L,d.state=h.CDATA);continue;case h.CDATA_ENDING_2:L===">"?(d.cdata&&X(d,"oncdata",d.cdata),X(d,"onclosecdata"),d.cdata="",d.state=h.TEXT):L==="]"?d.cdata+="]":(d.cdata+="]]"+L,d.state=h.CDATA);continue;case h.PROC_INST:L==="?"?d.state=h.PROC_INST_ENDING:I(L)?d.state=h.PROC_INST_BODY:d.procInstName+=L;continue;case h.PROC_INST_BODY:if(!d.procInstBody&&I(L))continue;L==="?"?d.state=h.PROC_INST_ENDING:d.procInstBody+=L;continue;case h.PROC_INST_ENDING:L===">"?(X(d,"onprocessinginstruction",{name:d.procInstName,body:d.procInstBody}),d.procInstName=d.procInstBody="",d.state=h.TEXT):(d.procInstBody+="?"+L,d.state=h.PROC_INST_BODY);continue;case h.OPEN_TAG:U(D,L)?d.tagName+=L:(vt(d),L===">"?Q(d):L==="/"?d.state=h.OPEN_TAG_SLASH:(I(L)||W(d,"Invalid character in tag name"),d.state=h.ATTRIB));continue;case h.OPEN_TAG_SLASH:L===">"?(Q(d,!0),et(d)):(W(d,"Forward-slash in opening tag not followed by >"),d.state=h.ATTRIB);continue;case h.ATTRIB:if(I(L))continue;L===">"?Q(d):L==="/"?d.state=h.OPEN_TAG_SLASH:U(E,L)?(d.attribName=L,d.attribValue="",d.state=h.ATTRIB_NAME):W(d,"Invalid attribute name");continue;case h.ATTRIB_NAME:L==="="?d.state=h.ATTRIB_VALUE:L===">"?(W(d,"Attribute without value"),d.attribValue=d.attribName,gt(d),Q(d)):I(L)?d.state=h.ATTRIB_NAME_SAW_WHITE:U(D,L)?d.attribName+=L:W(d,"Invalid attribute name");continue;case h.ATTRIB_NAME_SAW_WHITE:if(L==="=")d.state=h.ATTRIB_VALUE;else{if(I(L))continue;W(d,"Attribute without value"),d.tag.attributes[d.attribName]="",d.attribValue="",X(d,"onattribute",{name:d.attribName,value:""}),d.attribName="",L===">"?Q(d):U(E,L)?(d.attribName=L,d.state=h.ATTRIB_NAME):(W(d,"Invalid attribute name"),d.state=h.ATTRIB)}continue;case h.ATTRIB_VALUE:if(I(L))continue;A(L)?(d.q=L,d.state=h.ATTRIB_VALUE_QUOTED):(d.opt.unquotedAttributeValues||J(d,"Unquoted attribute value"),d.state=h.ATTRIB_VALUE_UNQUOTED,d.attribValue=L);continue;case h.ATTRIB_VALUE_QUOTED:if(L!==d.q){L==="&"?d.state=h.ATTRIB_VALUE_ENTITY_Q:d.attribValue+=L;continue}gt(d),d.q="",d.state=h.ATTRIB_VALUE_CLOSED;continue;case h.ATTRIB_VALUE_CLOSED:I(L)?d.state=h.ATTRIB:L===">"?Q(d):L==="/"?d.state=h.OPEN_TAG_SLASH:U(E,L)?(W(d,"No whitespace between attributes"),d.attribName=L,d.attribValue="",d.state=h.ATTRIB_NAME):W(d,"Invalid attribute name");continue;case h.ATTRIB_VALUE_UNQUOTED:if(!j(L)){L==="&"?d.state=h.ATTRIB_VALUE_ENTITY_U:d.attribValue+=L;continue}gt(d),L===">"?Q(d):d.state=h.ATTRIB;continue;case h.CLOSE_TAG:if(d.tagName)L===">"?et(d):U(D,L)?d.tagName+=L:d.script?(d.script+="</"+d.tagName,d.tagName="",d.state=h.SCRIPT):(I(L)||W(d,"Invalid tagname in closing tag"),d.state=h.CLOSE_TAG_SAW_WHITE);else{if(I(L))continue;B(E,L)?d.script?(d.script+="</"+L,d.state=h.SCRIPT):W(d,"Invalid tagname in closing tag."):d.tagName=L}continue;case h.CLOSE_TAG_SAW_WHITE:if(I(L))continue;L===">"?et(d):W(d,"Invalid characters in closing tag");continue;case h.TEXT_ENTITY:case h.ATTRIB_VALUE_ENTITY_Q:case h.ATTRIB_VALUE_ENTITY_U:var H,it;switch(d.state){case h.TEXT_ENTITY:H=h.TEXT,it="textNode";break;case h.ATTRIB_VALUE_ENTITY_Q:H=h.ATTRIB_VALUE_QUOTED,it="attribValue";break;case h.ATTRIB_VALUE_ENTITY_U:H=h.ATTRIB_VALUE_UNQUOTED,it="attribValue";break}if(L===";"){var C=Tt(d);d.opt.unparsedEntities&&!Object.values(n.XML_ENTITIES).includes(C)?(d.entity="",d.state=H,d.write(C)):(d[it]+=C,d.entity="",d.state=H)}else U(d.entity.length?p:T,L)?d.entity+=L:(W(d,"Invalid character in entity name"),d[it]+="&"+d.entity+L,d.entity="",d.state=H);continue;default:throw new Error(d,"Unknown state: "+d.state)}return d.position>=d.bufferCheckPosition&&f(d),d}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */String.fromCodePoint||function(){var y=String.fromCharCode,d=Math.floor,S=function(){var L=16384,K=[],tt,H,it=-1,C=arguments.length;if(!C)return"";for(var s="";++it<C;){var e=Number(arguments[it]);if(!isFinite(e)||e<0||e>1114111||d(e)!==e)throw RangeError("Invalid code point: "+e);e<=65535?K.push(e):(e-=65536,tt=(e>>10)+55296,H=e%1024+56320,K.push(tt,H)),(it+1===C||K.length>L)&&(s+=y.apply(null,K),K.length=0)}return s};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:S,configurable:!0,writable:!0}):String.fromCodePoint=S}()})(u)}(Te)),Te}var ve={},Vr;function xi(){return Vr||(Vr=1,function(){ve.stripBOM=function(u){return u[0]==="\uFEFF"?u.substring(1):u}}.call(G)),ve}var Et={},$r;function hn(){return $r||($r=1,function(){var u;u=new RegExp(/(?!xmlns)^.*:/),Et.normalize=function(n){return n.toLowerCase()},Et.firstCharLowerCase=function(n){return n.charAt(0).toLowerCase()+n.slice(1)},Et.stripPrefix=function(n){return n.replace(u,"")},Et.parseNumbers=function(n){return isNaN(n)||(n=n%1===0?parseInt(n,10):parseFloat(n)),n},Et.parseBooleans=function(n){return/^(?:true|false)$/i.test(n)&&(n=n.toLowerCase()==="true"),n}}.call(G)),Et}var Wr;function Di(){return Wr||(Wr=1,function(u){(function(){var n,c,a,f,o,t,i,m,N,w=function(x,O){return function(){return x.apply(O,arguments)}},g=function(x,O){for(var _ in O)b.call(O,_)&&(x[_]=O[_]);function E(){this.constructor=x}return E.prototype=O.prototype,x.prototype=new E,x.__super__=O.prototype,x},b={}.hasOwnProperty;m=Ti(),f=Le,n=xi(),i=hn(),N=Pn.setImmediate,c=_e().defaults,o=function(x){return typeof x=="object"&&x!=null&&Object.keys(x).length===0},t=function(x,O,_){var E,D,T;for(E=0,D=x.length;E<D;E++)T=x[E],O=T(O,_);return O},a=function(x,O,_){var E;return E=Object.create(null),E.value=_,E.writable=!0,E.enumerable=!0,E.configurable=!0,Object.defineProperty(x,O,E)},u.Parser=function(x){g(O,x);function O(_){this.parseStringPromise=w(this.parseStringPromise,this),this.parseString=w(this.parseString,this),this.reset=w(this.reset,this),this.assignOrPush=w(this.assignOrPush,this),this.processAsync=w(this.processAsync,this);var E,D,T;if(!(this instanceof u.Parser))return new u.Parser(_);this.options={},D=c["0.2"];for(E in D)b.call(D,E)&&(T=D[E],this.options[E]=T);for(E in _)b.call(_,E)&&(T=_[E],this.options[E]=T);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(i.normalize)),this.reset()}return O.prototype.processAsync=function(){var _,E;try{return this.remaining.length<=this.options.chunkSize?(_=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(_),this.saxParser.close()):(_=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(_),N(this.processAsync))}catch(D){if(E=D,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(E)}},O.prototype.assignOrPush=function(_,E,D){return E in _?(_[E]instanceof Array||a(_,E,[_[E]]),_[E].push(D)):this.options.explicitArray?a(_,E,[D]):a(_,E,D)},O.prototype.reset=function(){var _,E,D,T;return this.removeAllListeners(),this.saxParser=m.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(p){return function(I){if(p.saxParser.resume(),!p.saxParser.errThrown)return p.saxParser.errThrown=!0,p.emit("error",I)}}(this),this.saxParser.onend=function(p){return function(){if(!p.saxParser.ended)return p.saxParser.ended=!0,p.emit("end",p.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,T=[],_=this.options.attrkey,E=this.options.charkey,this.saxParser.onopentag=function(p){return function(I){var A,j,U,B,h;if(U={},U[E]="",!p.options.ignoreAttrs){h=I.attributes;for(A in h)b.call(h,A)&&(!(_ in U)&&!p.options.mergeAttrs&&(U[_]={}),j=p.options.attrValueProcessors?t(p.options.attrValueProcessors,I.attributes[A],A):I.attributes[A],B=p.options.attrNameProcessors?t(p.options.attrNameProcessors,A):A,p.options.mergeAttrs?p.assignOrPush(U,B,j):a(U[_],B,j))}return U["#name"]=p.options.tagNameProcessors?t(p.options.tagNameProcessors,I.name):I.name,p.options.xmlns&&(U[p.options.xmlnskey]={uri:I.uri,local:I.local}),T.push(U)}}(this),this.saxParser.onclosetag=function(p){return function(){var I,A,j,U,B,h,F,R,X,$;if(h=T.pop(),B=h["#name"],(!p.options.explicitChildren||!p.options.preserveChildrenOrder)&&delete h["#name"],h.cdata===!0&&(I=h.cdata,delete h.cdata),X=T[T.length-1],h[E].match(/^\s*$/)&&!I?(A=h[E],delete h[E]):(p.options.trim&&(h[E]=h[E].trim()),p.options.normalize&&(h[E]=h[E].replace(/\s{2,}/g," ").trim()),h[E]=p.options.valueProcessors?t(p.options.valueProcessors,h[E],B):h[E],Object.keys(h).length===1&&E in h&&!p.EXPLICIT_CHARKEY&&(h=h[E])),o(h)&&(typeof p.options.emptyTag=="function"?h=p.options.emptyTag():h=p.options.emptyTag!==""?p.options.emptyTag:A),p.options.validator!=null&&($="/"+function(){var Y,J,z;for(z=[],Y=0,J=T.length;Y<J;Y++)U=T[Y],z.push(U["#name"]);return z}().concat(B).join("/"),function(){var Y;try{return h=p.options.validator($,X&&X[B],h)}catch(J){return Y=J,p.emit("error",Y)}}()),p.options.explicitChildren&&!p.options.mergeAttrs&&typeof h=="object"){if(!p.options.preserveChildrenOrder)U={},p.options.attrkey in h&&(U[p.options.attrkey]=h[p.options.attrkey],delete h[p.options.attrkey]),!p.options.charsAsChildren&&p.options.charkey in h&&(U[p.options.charkey]=h[p.options.charkey],delete h[p.options.charkey]),Object.getOwnPropertyNames(h).length>0&&(U[p.options.childkey]=h),h=U;else if(X){X[p.options.childkey]=X[p.options.childkey]||[],F={};for(j in h)b.call(h,j)&&a(F,j,h[j]);X[p.options.childkey].push(F),delete h["#name"],Object.keys(h).length===1&&E in h&&!p.EXPLICIT_CHARKEY&&(h=h[E])}}return T.length>0?p.assignOrPush(X,B,h):(p.options.explicitRoot&&(R=h,h={},a(h,B,R)),p.resultObject=h,p.saxParser.ended=!0,p.emit("end",p.resultObject))}}(this),D=function(p){return function(I){var A,j;if(j=T[T.length-1],j)return j[E]+=I,p.options.explicitChildren&&p.options.preserveChildrenOrder&&p.options.charsAsChildren&&(p.options.includeWhiteChars||I.replace(/\\n/g,"").trim()!=="")&&(j[p.options.childkey]=j[p.options.childkey]||[],A={"#name":"__text__"},A[E]=I,p.options.normalize&&(A[E]=A[E].replace(/\s{2,}/g," ").trim()),j[p.options.childkey].push(A)),j}}(this),this.saxParser.ontext=D,this.saxParser.oncdata=function(p){return function(I){var A;if(A=D(I),A)return A.cdata=!0}}()},O.prototype.parseString=function(_,E){var D;E!=null&&typeof E=="function"&&(this.on("end",function(T){return this.reset(),E(null,T)}),this.on("error",function(T){return this.reset(),E(T)}));try{return _=_.toString(),_.trim()===""?(this.emit("end",null),!0):(_=n.stripBOM(_),this.options.async?(this.remaining=_,N(this.processAsync),this.saxParser):this.saxParser.write(_).close())}catch(T){if(D=T,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw D}else return this.emit("error",D),this.saxParser.errThrown=!0}},O.prototype.parseStringPromise=function(_){return new Promise(function(E){return function(D,T){return E.parseString(_,function(p,I){return p?T(p):D(I)})}}(this))},O}(f),u.parseString=function(x,O,_){var E,D,T;return _!=null?(typeof _=="function"&&(E=_),typeof O=="object"&&(D=O)):(typeof O=="function"&&(E=O),D={}),T=new u.Parser(D),T.parseString(x,E)},u.parseStringPromise=function(x,O){var _,E;return typeof O=="object"&&(_=O),E=new u.Parser(_),E.parseStringPromise(x)}}).call(G)}(Ee)),Ee}var pn;(function(){var u,n,c,a=function(o,t){for(var i in t)f.call(t,i)&&(o[i]=t[i]);function m(){this.constructor=o}return m.prototype=t.prototype,o.prototype=new m,o.__super__=t.prototype,o},f={}.hasOwnProperty;n=_e(),u=mi(),c=Di(),hn(),n.defaults,function(o){a(t,o);function t(i){this.message=i}return t}(Error),u.Builder,c.Parser,c.parseString,pn=c.parseStringPromise}).call(G);class vi{constructor(n,c,a){this.nextTxnId=1,this.pendingCommands=new Map,this.breakpoints=new Map,this.scriptIdByUrl=new Map,this.nextScriptId=1,this.objectHandles=new Map,this.nextObjectId=1,this.callFramesMap=new Map,this.xdebugConnected=!1,this.dbgp=n,this.cdp=c,this.readPHPFile=a.getPHPFile,this.phpRoot=a.phpRoot||"";for(const f of a.knownScriptUrls)this.scriptIdByUrl.set(f,this.getOrCreateScriptId(f));this.breakOnFirstLine=a.breakOnFirstLine||!1}start(){this.dbgp.on("connected",()=>{this.xdebugConnected=!0,this.sendDbgpCommand("stdout","-c 1"),this.sendDbgpCommand("stderr","-c 1")}),this.dbgp.on("message",async n=>{try{const c=await pn(n,{explicitArray:!1});await this.handleDbgpMessage(c)}catch{}}),this.dbgp.on("disconnected",()=>{this.xdebugConnected=!1,this.cdp.sendMessage({method:"Debugger.paused",params:{reason:"terminated",callFrames:[]}})}),this.cdp.on("message",n=>{this.handleCdpMessage(n)}),this.cdp.on("clientDisconnected",()=>{this.xdebugConnected&&this.sendDbgpCommand("detach")}),this.sendInitialScripts().then(()=>{if(!this.breakOnFirstLine){const n=this.scriptIdByUrl.entries().next().value;n&&(this.cdp.sendMessage({method:"Debugger.paused",params:{callFrames:[{location:{scriptId:n[1],lineNumber:0},scopeChain:[],this:{type:"undefined"}}],reason:"other"}}),setTimeout(()=>{this.cdp.sendMessage({method:"Debugger.resumed"})},50))}this.cdp.sendMessage({method:"Log.entryAdded",params:{entry:{source:"other",level:"info",text:`🎉 Welcome to WordPress Playground DevTools! 🎉
34
+ */var Ur;function wi(){return Ur||(Ur=1,function(u){var n=yi(),c=gi(),a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;u.Buffer=i,u.SlowBuffer=T,u.INSPECT_MAX_BYTES=50;var f=2147483647;u.kMaxLength=f,i.TYPED_ARRAY_SUPPORT=o(),!i.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{var s=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(s,e),s.foo()===42}catch{return!1}}Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}});function t(s){if(s>f)throw new RangeError('The value "'+s+'" is invalid for option "size"');var e=new Uint8Array(s);return Object.setPrototypeOf(e,i.prototype),e}function i(s,e,r){if(typeof s=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return y(s)}return m(s,e,r)}i.poolSize=8192;function m(s,e,r){if(typeof s=="string")return b(s,e);if(ArrayBuffer.isView(s))return O(s);if(s==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof s);if(H(s,ArrayBuffer)||s&&H(s.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(H(s,SharedArrayBuffer)||s&&H(s.buffer,SharedArrayBuffer)))return _(s,e,r);if(typeof s=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var l=s.valueOf&&s.valueOf();if(l!=null&&l!==s)return i.from(l,e,r);var v=E(s);if(v)return v;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof s[Symbol.toPrimitive]=="function")return i.from(s[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof s)}i.from=function(s,e,r){return m(s,e,r)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array);function N(s){if(typeof s!="number")throw new TypeError('"size" argument must be of type number');if(s<0)throw new RangeError('The value "'+s+'" is invalid for option "size"')}function w(s,e,r){return N(s),s<=0?t(s):e!==void 0?typeof r=="string"?t(s).fill(e,r):t(s).fill(e):t(s)}i.alloc=function(s,e,r){return w(s,e,r)};function y(s){return N(s),t(s<0?0:D(s)|0)}i.allocUnsafe=function(s){return y(s)},i.allocUnsafeSlow=function(s){return y(s)};function b(s,e){if((typeof e!="string"||e==="")&&(e="utf8"),!i.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=p(s,e)|0,l=t(r),v=l.write(s,e);return v!==r&&(l=l.slice(0,v)),l}function x(s){for(var e=s.length<0?0:D(s.length)|0,r=t(e),l=0;l<e;l+=1)r[l]=s[l]&255;return r}function O(s){if(H(s,Uint8Array)){var e=new Uint8Array(s);return _(e.buffer,e.byteOffset,e.byteLength)}return x(s)}function _(s,e,r){if(e<0||s.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(s.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var l;return e===void 0&&r===void 0?l=new Uint8Array(s):r===void 0?l=new Uint8Array(s,e):l=new Uint8Array(s,e,r),Object.setPrototypeOf(l,i.prototype),l}function E(s){if(i.isBuffer(s)){var e=D(s.length)|0,r=t(e);return r.length===0||s.copy(r,0,0,e),r}if(s.length!==void 0)return typeof s.length!="number"||it(s.length)?t(0):x(s);if(s.type==="Buffer"&&Array.isArray(s.data))return x(s.data)}function D(s){if(s>=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return s|0}function T(s){return+s!=s&&(s=0),i.alloc(+s)}i.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==i.prototype},i.compare=function(e,r){if(H(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),H(r,Uint8Array)&&(r=i.from(r,r.offset,r.byteLength)),!i.isBuffer(e)||!i.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;for(var l=e.length,v=r.length,M=0,P=Math.min(l,v);M<P;++M)if(e[M]!==r[M]){l=e[M],v=r[M];break}return l<v?-1:v<l?1:0},i.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return i.alloc(0);var l;if(r===void 0)for(r=0,l=0;l<e.length;++l)r+=e[l].length;var v=i.allocUnsafe(r),M=0;for(l=0;l<e.length;++l){var P=e[l];if(H(P,Uint8Array))M+P.length>v.length?i.from(P).copy(v,M):Uint8Array.prototype.set.call(v,P,M);else if(i.isBuffer(P))P.copy(v,M);else throw new TypeError('"list" argument must be an Array of Buffers');M+=P.length}return v};function p(s,e){if(i.isBuffer(s))return s.length;if(ArrayBuffer.isView(s)||H(s,ArrayBuffer))return s.byteLength;if(typeof s!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof s);var r=s.length,l=arguments.length>2&&arguments[2]===!0;if(!l&&r===0)return 0;for(var v=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return d(s).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return K(s).length;default:if(v)return l?-1:d(s).length;e=(""+e).toLowerCase(),v=!0}}i.byteLength=p;function I(s,e,r){var l=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(s||(s="utf8");;)switch(s){case"hex":return bt(this,e,r);case"utf8":case"utf-8":return Y(this,e,r);case"ascii":return W(this,e,r);case"latin1":case"binary":return vt(this,e,r);case"base64":return $(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gt(this,e,r);default:if(l)throw new TypeError("Unknown encoding: "+s);s=(s+"").toLowerCase(),l=!0}}i.prototype._isBuffer=!0;function A(s,e,r){var l=s[e];s[e]=s[r],s[r]=l}i.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<e;r+=2)A(this,r,r+1);return this},i.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<e;r+=4)A(this,r,r+3),A(this,r+1,r+2);return this},i.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<e;r+=8)A(this,r,r+7),A(this,r+1,r+6),A(this,r+2,r+5),A(this,r+3,r+4);return this},i.prototype.toString=function(){var e=this.length;return e===0?"":arguments.length===0?Y(this,0,e):I.apply(this,arguments)},i.prototype.toLocaleString=i.prototype.toString,i.prototype.equals=function(e){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:i.compare(this,e)===0},i.prototype.inspect=function(){var e="",r=u.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},a&&(i.prototype[a]=i.prototype.inspect),i.prototype.compare=function(e,r,l,v,M){if(H(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),!i.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),l===void 0&&(l=e?e.length:0),v===void 0&&(v=0),M===void 0&&(M=this.length),r<0||l>e.length||v<0||M>this.length)throw new RangeError("out of range index");if(v>=M&&r>=l)return 0;if(v>=M)return-1;if(r>=l)return 1;if(r>>>=0,l>>>=0,v>>>=0,M>>>=0,this===e)return 0;for(var P=M-v,q=l-r,V=Math.min(P,q),rt=this.slice(v,M),st=e.slice(r,l),nt=0;nt<V;++nt)if(rt[nt]!==st[nt]){P=rt[nt],q=st[nt];break}return P<q?-1:q<P?1:0};function j(s,e,r,l,v){if(s.length===0)return-1;if(typeof r=="string"?(l=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,it(r)&&(r=v?0:s.length-1),r<0&&(r=s.length+r),r>=s.length){if(v)return-1;r=s.length-1}else if(r<0)if(v)r=0;else return-1;if(typeof e=="string"&&(e=i.from(e,l)),i.isBuffer(e))return e.length===0?-1:U(s,e,r,l,v);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?v?Uint8Array.prototype.indexOf.call(s,e,r):Uint8Array.prototype.lastIndexOf.call(s,e,r):U(s,[e],r,l,v);throw new TypeError("val must be string, number or Buffer")}function U(s,e,r,l,v){var M=1,P=s.length,q=e.length;if(l!==void 0&&(l=String(l).toLowerCase(),l==="ucs2"||l==="ucs-2"||l==="utf16le"||l==="utf-16le")){if(s.length<2||e.length<2)return-1;M=2,P/=2,q/=2,r/=2}function V(He,Ge){return M===1?He[Ge]:He.readUInt16BE(Ge*M)}var rt;if(v){var st=-1;for(rt=r;rt<P;rt++)if(V(s,rt)===V(e,st===-1?0:rt-st)){if(st===-1&&(st=rt),rt-st+1===q)return st*M}else st!==-1&&(rt-=rt-st),st=-1}else for(r+q>P&&(r=P-q),rt=r;rt>=0;rt--){for(var nt=!0,Ct=0;Ct<q;Ct++)if(V(s,rt+Ct)!==V(e,Ct)){nt=!1;break}if(nt)return rt}return-1}i.prototype.includes=function(e,r,l){return this.indexOf(e,r,l)!==-1},i.prototype.indexOf=function(e,r,l){return j(this,e,r,l,!0)},i.prototype.lastIndexOf=function(e,r,l){return j(this,e,r,l,!1)};function B(s,e,r,l){r=Number(r)||0;var v=s.length-r;l?(l=Number(l),l>v&&(l=v)):l=v;var M=e.length;l>M/2&&(l=M/2);for(var P=0;P<l;++P){var q=parseInt(e.substr(P*2,2),16);if(it(q))return P;s[r+P]=q}return P}function h(s,e,r,l){return tt(d(e,s.length-r),s,r,l)}function F(s,e,r,l){return tt(S(e),s,r,l)}function R(s,e,r,l){return tt(K(e),s,r,l)}function X(s,e,r,l){return tt(L(e,s.length-r),s,r,l)}i.prototype.write=function(e,r,l,v){if(r===void 0)v="utf8",l=this.length,r=0;else if(l===void 0&&typeof r=="string")v=r,l=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(l)?(l=l>>>0,v===void 0&&(v="utf8")):(v=l,l=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var M=this.length-r;if((l===void 0||l>M)&&(l=M),e.length>0&&(l<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");v||(v="utf8");for(var P=!1;;)switch(v){case"hex":return B(this,e,r,l);case"utf8":case"utf-8":return h(this,e,r,l);case"ascii":case"latin1":case"binary":return F(this,e,r,l);case"base64":return R(this,e,r,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,e,r,l);default:if(P)throw new TypeError("Unknown encoding: "+v);v=(""+v).toLowerCase(),P=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function $(s,e,r){return e===0&&r===s.length?n.fromByteArray(s):n.fromByteArray(s.slice(e,r))}function Y(s,e,r){r=Math.min(s.length,r);for(var l=[],v=e;v<r;){var M=s[v],P=null,q=M>239?4:M>223?3:M>191?2:1;if(v+q<=r){var V,rt,st,nt;switch(q){case 1:M<128&&(P=M);break;case 2:V=s[v+1],(V&192)===128&&(nt=(M&31)<<6|V&63,nt>127&&(P=nt));break;case 3:V=s[v+1],rt=s[v+2],(V&192)===128&&(rt&192)===128&&(nt=(M&15)<<12|(V&63)<<6|rt&63,nt>2047&&(nt<55296||nt>57343)&&(P=nt));break;case 4:V=s[v+1],rt=s[v+2],st=s[v+3],(V&192)===128&&(rt&192)===128&&(st&192)===128&&(nt=(M&15)<<18|(V&63)<<12|(rt&63)<<6|st&63,nt>65535&&nt<1114112&&(P=nt))}}P===null?(P=65533,q=1):P>65535&&(P-=65536,l.push(P>>>10&1023|55296),P=56320|P&1023),l.push(P),v+=q}return z(l)}var J=4096;function z(s){var e=s.length;if(e<=J)return String.fromCharCode.apply(String,s);for(var r="",l=0;l<e;)r+=String.fromCharCode.apply(String,s.slice(l,l+=J));return r}function W(s,e,r){var l="";r=Math.min(s.length,r);for(var v=e;v<r;++v)l+=String.fromCharCode(s[v]&127);return l}function vt(s,e,r){var l="";r=Math.min(s.length,r);for(var v=e;v<r;++v)l+=String.fromCharCode(s[v]);return l}function bt(s,e,r){var l=s.length;(!e||e<0)&&(e=0),(!r||r<0||r>l)&&(r=l);for(var v="",M=e;M<r;++M)v+=C[s[M]];return v}function gt(s,e,r){for(var l=s.slice(e,r),v="",M=0;M<l.length-1;M+=2)v+=String.fromCharCode(l[M]+l[M+1]*256);return v}i.prototype.slice=function(e,r){var l=this.length;e=~~e,r=r===void 0?l:~~r,e<0?(e+=l,e<0&&(e=0)):e>l&&(e=l),r<0?(r+=l,r<0&&(r=0)):r>l&&(r=l),r<e&&(r=e);var v=this.subarray(e,r);return Object.setPrototypeOf(v,i.prototype),v};function Q(s,e,r){if(s%1!==0||s<0)throw new RangeError("offset is not uint");if(s+e>r)throw new RangeError("Trying to access beyond buffer length")}i.prototype.readUintLE=i.prototype.readUIntLE=function(e,r,l){e=e>>>0,r=r>>>0,l||Q(e,r,this.length);for(var v=this[e],M=1,P=0;++P<r&&(M*=256);)v+=this[e+P]*M;return v},i.prototype.readUintBE=i.prototype.readUIntBE=function(e,r,l){e=e>>>0,r=r>>>0,l||Q(e,r,this.length);for(var v=this[e+--r],M=1;r>0&&(M*=256);)v+=this[e+--r]*M;return v},i.prototype.readUint8=i.prototype.readUInt8=function(e,r){return e=e>>>0,r||Q(e,1,this.length),this[e]},i.prototype.readUint16LE=i.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||Q(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUint16BE=i.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||Q(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUint32LE=i.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||Q(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},i.prototype.readUint32BE=i.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||Q(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,r,l){e=e>>>0,r=r>>>0,l||Q(e,r,this.length);for(var v=this[e],M=1,P=0;++P<r&&(M*=256);)v+=this[e+P]*M;return M*=128,v>=M&&(v-=Math.pow(2,8*r)),v},i.prototype.readIntBE=function(e,r,l){e=e>>>0,r=r>>>0,l||Q(e,r,this.length);for(var v=r,M=1,P=this[e+--v];v>0&&(M*=256);)P+=this[e+--v]*M;return M*=128,P>=M&&(P-=Math.pow(2,8*r)),P},i.prototype.readInt8=function(e,r){return e=e>>>0,r||Q(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},i.prototype.readInt16LE=function(e,r){e=e>>>0,r||Q(e,2,this.length);var l=this[e]|this[e+1]<<8;return l&32768?l|4294901760:l},i.prototype.readInt16BE=function(e,r){e=e>>>0,r||Q(e,2,this.length);var l=this[e+1]|this[e]<<8;return l&32768?l|4294901760:l},i.prototype.readInt32LE=function(e,r){return e=e>>>0,r||Q(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,r){return e=e>>>0,r||Q(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,r){return e=e>>>0,r||Q(e,4,this.length),c.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,r){return e=e>>>0,r||Q(e,4,this.length),c.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||Q(e,8,this.length),c.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||Q(e,8,this.length),c.read(this,e,!1,52,8)};function et(s,e,r,l,v,M){if(!i.isBuffer(s))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>v||e<M)throw new RangeError('"value" argument is out of bounds');if(r+l>s.length)throw new RangeError("Index out of range")}i.prototype.writeUintLE=i.prototype.writeUIntLE=function(e,r,l,v){if(e=+e,r=r>>>0,l=l>>>0,!v){var M=Math.pow(2,8*l)-1;et(this,e,r,l,M,0)}var P=1,q=0;for(this[r]=e&255;++q<l&&(P*=256);)this[r+q]=e/P&255;return r+l},i.prototype.writeUintBE=i.prototype.writeUIntBE=function(e,r,l,v){if(e=+e,r=r>>>0,l=l>>>0,!v){var M=Math.pow(2,8*l)-1;et(this,e,r,l,M,0)}var P=l-1,q=1;for(this[r+P]=e&255;--P>=0&&(q*=256);)this[r+P]=e/q&255;return r+l},i.prototype.writeUint8=i.prototype.writeUInt8=function(e,r,l){return e=+e,r=r>>>0,l||et(this,e,r,1,255,0),this[r]=e&255,r+1},i.prototype.writeUint16LE=i.prototype.writeUInt16LE=function(e,r,l){return e=+e,r=r>>>0,l||et(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2},i.prototype.writeUint16BE=i.prototype.writeUInt16BE=function(e,r,l){return e=+e,r=r>>>0,l||et(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2},i.prototype.writeUint32LE=i.prototype.writeUInt32LE=function(e,r,l){return e=+e,r=r>>>0,l||et(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4},i.prototype.writeUint32BE=i.prototype.writeUInt32BE=function(e,r,l){return e=+e,r=r>>>0,l||et(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4},i.prototype.writeIntLE=function(e,r,l,v){if(e=+e,r=r>>>0,!v){var M=Math.pow(2,8*l-1);et(this,e,r,l,M-1,-M)}var P=0,q=1,V=0;for(this[r]=e&255;++P<l&&(q*=256);)e<0&&V===0&&this[r+P-1]!==0&&(V=1),this[r+P]=(e/q>>0)-V&255;return r+l},i.prototype.writeIntBE=function(e,r,l,v){if(e=+e,r=r>>>0,!v){var M=Math.pow(2,8*l-1);et(this,e,r,l,M-1,-M)}var P=l-1,q=1,V=0;for(this[r+P]=e&255;--P>=0&&(q*=256);)e<0&&V===0&&this[r+P+1]!==0&&(V=1),this[r+P]=(e/q>>0)-V&255;return r+l},i.prototype.writeInt8=function(e,r,l){return e=+e,r=r>>>0,l||et(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1},i.prototype.writeInt16LE=function(e,r,l){return e=+e,r=r>>>0,l||et(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2},i.prototype.writeInt16BE=function(e,r,l){return e=+e,r=r>>>0,l||et(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2},i.prototype.writeInt32LE=function(e,r,l){return e=+e,r=r>>>0,l||et(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4},i.prototype.writeInt32BE=function(e,r,l){return e=+e,r=r>>>0,l||et(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function Tt(s,e,r,l,v,M){if(r+l>s.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function k(s,e,r,l,v){return e=+e,r=r>>>0,v||Tt(s,e,r,4),c.write(s,e,r,l,23,4),r+4}i.prototype.writeFloatLE=function(e,r,l){return k(this,e,r,!0,l)},i.prototype.writeFloatBE=function(e,r,l){return k(this,e,r,!1,l)};function wt(s,e,r,l,v){return e=+e,r=r>>>0,v||Tt(s,e,r,8),c.write(s,e,r,l,52,8),r+8}i.prototype.writeDoubleLE=function(e,r,l){return wt(this,e,r,!0,l)},i.prototype.writeDoubleBE=function(e,r,l){return wt(this,e,r,!1,l)},i.prototype.copy=function(e,r,l,v){if(!i.isBuffer(e))throw new TypeError("argument should be a Buffer");if(l||(l=0),!v&&v!==0&&(v=this.length),r>=e.length&&(r=e.length),r||(r=0),v>0&&v<l&&(v=l),v===l||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(l<0||l>=this.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("sourceEnd out of bounds");v>this.length&&(v=this.length),e.length-r<v-l&&(v=e.length-r+l);var M=v-l;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,l,v):Uint8Array.prototype.set.call(e,this.subarray(l,v),r),M},i.prototype.fill=function(e,r,l,v){if(typeof e=="string"){if(typeof r=="string"?(v=r,r=0,l=this.length):typeof l=="string"&&(v=l,l=this.length),v!==void 0&&typeof v!="string")throw new TypeError("encoding must be a string");if(typeof v=="string"&&!i.isEncoding(v))throw new TypeError("Unknown encoding: "+v);if(e.length===1){var M=e.charCodeAt(0);(v==="utf8"&&M<128||v==="latin1")&&(e=M)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(r<0||this.length<r||this.length<l)throw new RangeError("Out of range index");if(l<=r)return this;r=r>>>0,l=l===void 0?this.length:l>>>0,e||(e=0);var P;if(typeof e=="number")for(P=r;P<l;++P)this[P]=e;else{var q=i.isBuffer(e)?e:i.from(e,v),V=q.length;if(V===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(P=0;P<l-r;++P)this[P+r]=q[P%V]}return this};var It=/[^+/0-9A-Za-z-_]/g;function g(s){if(s=s.split("=")[0],s=s.trim().replace(It,""),s.length<2)return"";for(;s.length%4!==0;)s=s+"=";return s}function d(s,e){e=e||1/0;for(var r,l=s.length,v=null,M=[],P=0;P<l;++P){if(r=s.charCodeAt(P),r>55295&&r<57344){if(!v){if(r>56319){(e-=3)>-1&&M.push(239,191,189);continue}else if(P+1===l){(e-=3)>-1&&M.push(239,191,189);continue}v=r;continue}if(r<56320){(e-=3)>-1&&M.push(239,191,189),v=r;continue}r=(v-55296<<10|r-56320)+65536}else v&&(e-=3)>-1&&M.push(239,191,189);if(v=null,r<128){if((e-=1)<0)break;M.push(r)}else if(r<2048){if((e-=2)<0)break;M.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;M.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;M.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return M}function S(s){for(var e=[],r=0;r<s.length;++r)e.push(s.charCodeAt(r)&255);return e}function L(s,e){for(var r,l,v,M=[],P=0;P<s.length&&!((e-=2)<0);++P)r=s.charCodeAt(P),l=r>>8,v=r%256,M.push(v),M.push(l);return M}function K(s){return n.toByteArray(g(s))}function tt(s,e,r,l){for(var v=0;v<l&&!(v+r>=e.length||v>=s.length);++v)e[v+r]=s[v];return v}function H(s,e){return s instanceof e||s!=null&&s.constructor!=null&&s.constructor.name!=null&&s.constructor.name===e.name}function it(s){return s!==s}var C=function(){for(var s="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var l=r*16,v=0;v<16;++v)e[l+v]=s[r]+s[v];return e}()}(De)),De}/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Xr;function bi(){return Xr||(Xr=1,function(u,n){var c=wi(),a=c.Buffer;function f(t,i){for(var m in t)i[m]=t[m]}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?u.exports=c:(f(c,n),n.Buffer=o);function o(t,i,m){return a(t,i,m)}o.prototype=Object.create(a.prototype),f(a,o),o.from=function(t,i,m){if(typeof t=="number")throw new TypeError("Argument must not be a number");return a(t,i,m)},o.alloc=function(t,i,m){if(typeof t!="number")throw new TypeError("Argument must be a number");var N=a(t);return i!==void 0?typeof m=="string"?N.fill(i,m):N.fill(i):N.fill(0),N},o.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return a(t)},o.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return c.SlowBuffer(t)}}(Lt,Lt.exports)),Lt.exports}var qr;function Ei(){if(qr)return xe;qr=1;var u=bi().Buffer,n=u.isEncoding||function(D){switch(D=""+D,D&&D.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function c(D){if(!D)return"utf8";for(var T;;)switch(D){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return D;default:if(T)return;D=(""+D).toLowerCase(),T=!0}}function a(D){var T=c(D);if(typeof T!="string"&&(u.isEncoding===n||!n(D)))throw new Error("Unknown encoding: "+D);return T||D}xe.StringDecoder=f;function f(D){this.encoding=a(D);var T;switch(this.encoding){case"utf16le":this.text=y,this.end=b,T=4;break;case"utf8":this.fillLast=m,T=4;break;case"base64":this.text=x,this.end=O,T=3;break;default:this.write=_,this.end=E;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=u.allocUnsafe(T)}f.prototype.write=function(D){if(D.length===0)return"";var T,p;if(this.lastNeed){if(T=this.fillLast(D),T===void 0)return"";p=this.lastNeed,this.lastNeed=0}else p=0;return p<D.length?T?T+this.text(D,p):this.text(D,p):T||""},f.prototype.end=w,f.prototype.text=N,f.prototype.fillLast=function(D){if(this.lastNeed<=D.length)return D.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);D.copy(this.lastChar,this.lastTotal-this.lastNeed,0,D.length),this.lastNeed-=D.length};function o(D){return D<=127?0:D>>5===6?2:D>>4===14?3:D>>3===30?4:D>>6===2?-1:-2}function t(D,T,p){var I=T.length-1;if(I<p)return 0;var A=o(T[I]);return A>=0?(A>0&&(D.lastNeed=A-1),A):--I<p||A===-2?0:(A=o(T[I]),A>=0?(A>0&&(D.lastNeed=A-2),A):--I<p||A===-2?0:(A=o(T[I]),A>=0?(A>0&&(A===2?A=0:D.lastNeed=A-3),A):0))}function i(D,T,p){if((T[0]&192)!==128)return D.lastNeed=0,"�";if(D.lastNeed>1&&T.length>1){if((T[1]&192)!==128)return D.lastNeed=1,"�";if(D.lastNeed>2&&T.length>2&&(T[2]&192)!==128)return D.lastNeed=2,"�"}}function m(D){var T=this.lastTotal-this.lastNeed,p=i(this,D);if(p!==void 0)return p;if(this.lastNeed<=D.length)return D.copy(this.lastChar,T,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);D.copy(this.lastChar,T,0,D.length),this.lastNeed-=D.length}function N(D,T){var p=t(this,D,T);if(!this.lastNeed)return D.toString("utf8",T);this.lastTotal=p;var I=D.length-(p-this.lastNeed);return D.copy(this.lastChar,0,I),D.toString("utf8",T,I)}function w(D){var T=D&&D.length?this.write(D):"";return this.lastNeed?T+"�":T}function y(D,T){if((D.length-T)%2===0){var p=D.toString("utf16le",T);if(p){var I=p.charCodeAt(p.length-1);if(I>=55296&&I<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=D[D.length-2],this.lastChar[1]=D[D.length-1],p.slice(0,-1)}return p}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=D[D.length-1],D.toString("utf16le",T,D.length-1)}function b(D){var T=D&&D.length?this.write(D):"";if(this.lastNeed){var p=this.lastTotal-this.lastNeed;return T+this.lastChar.toString("utf16le",0,p)}return T}function x(D,T){var p=(D.length-T)%3;return p===0?D.toString("base64",T):(this.lastNeed=3-p,this.lastTotal=3,p===1?this.lastChar[0]=D[D.length-1]:(this.lastChar[0]=D[D.length-2],this.lastChar[1]=D[D.length-1]),D.toString("base64",T,D.length-p))}function O(D){var T=D&&D.length?this.write(D):"";return this.lastNeed?T+this.lastChar.toString("base64",0,3-this.lastNeed):T}function _(D){return D.toString(this.encoding)}function E(D){return D&&D.length?this.write(D):""}return xe}var kr;function Ti(){return kr||(kr=1,function(u){(function(n){n.parser=function(g,d){return new a(g,d)},n.SAXParser=a,n.SAXStream=w,n.createStream=N,n.MAX_BUFFER_LENGTH=64*1024;var c=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];n.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function a(g,d){if(!(this instanceof a))return new a(g,d);var S=this;o(S),S.q=S.c="",S.bufferCheckPosition=n.MAX_BUFFER_LENGTH,S.opt=d||{},S.opt.lowercase=S.opt.lowercase||S.opt.lowercasetags,S.looseCase=S.opt.lowercase?"toLowerCase":"toUpperCase",S.tags=[],S.closed=S.closedRoot=S.sawRoot=!1,S.tag=S.error=null,S.strict=!!g,S.noscript=!!(g||S.opt.noscript),S.state=h.BEGIN,S.strictEntities=S.opt.strictEntities,S.ENTITIES=S.strictEntities?Object.create(n.XML_ENTITIES):Object.create(n.ENTITIES),S.attribList=[],S.opt.xmlns&&(S.ns=Object.create(_)),S.opt.unquotedAttributeValues===void 0&&(S.opt.unquotedAttributeValues=!g),S.trackPosition=S.opt.position!==!1,S.trackPosition&&(S.position=S.line=S.column=0),R(S,"onready")}Object.create||(Object.create=function(g){function d(){}d.prototype=g;var S=new d;return S}),Object.keys||(Object.keys=function(g){var d=[];for(var S in g)g.hasOwnProperty(S)&&d.push(S);return d});function f(g){for(var d=Math.max(n.MAX_BUFFER_LENGTH,10),S=0,L=0,K=c.length;L<K;L++){var tt=g[c[L]].length;if(tt>d)switch(c[L]){case"textNode":$(g);break;case"cdata":X(g,"oncdata",g.cdata),g.cdata="";break;case"script":X(g,"onscript",g.script),g.script="";break;default:J(g,"Max buffer length exceeded: "+c[L])}S=Math.max(S,tt)}var H=n.MAX_BUFFER_LENGTH-S;g.bufferCheckPosition=H+g.position}function o(g){for(var d=0,S=c.length;d<S;d++)g[c[d]]=""}function t(g){$(g),g.cdata!==""&&(X(g,"oncdata",g.cdata),g.cdata=""),g.script!==""&&(X(g,"onscript",g.script),g.script="")}a.prototype={end:function(){z(this)},write:It,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){t(this)}};var i;try{i=require("stream").Stream}catch{i=function(){}}i||(i=function(){});var m=n.EVENTS.filter(function(g){return g!=="error"&&g!=="end"});function N(g,d){return new w(g,d)}function w(g,d){if(!(this instanceof w))return new w(g,d);i.apply(this),this._parser=new a(g,d),this.writable=!0,this.readable=!0;var S=this;this._parser.onend=function(){S.emit("end")},this._parser.onerror=function(L){S.emit("error",L),S._parser.error=null},this._decoder=null,m.forEach(function(L){Object.defineProperty(S,"on"+L,{get:function(){return S._parser["on"+L]},set:function(K){if(!K)return S.removeAllListeners(L),S._parser["on"+L]=K,K;S.on(L,K)},enumerable:!0,configurable:!1})})}w.prototype=Object.create(i.prototype,{constructor:{value:w}}),w.prototype.write=function(g){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(g)){if(!this._decoder){var d=Ei().StringDecoder;this._decoder=new d("utf8")}g=this._decoder.write(g)}return this._parser.write(g.toString()),this.emit("data",g),!0},w.prototype.end=function(g){return g&&g.length&&this.write(g),this._parser.end(),!0},w.prototype.on=function(g,d){var S=this;return!S._parser["on"+g]&&m.indexOf(g)!==-1&&(S._parser["on"+g]=function(){var L=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);L.splice(0,0,g),S.emit.apply(S,L)}),i.prototype.on.call(S,g,d)};var y="[CDATA[",b="DOCTYPE",x="http://www.w3.org/XML/1998/namespace",O="http://www.w3.org/2000/xmlns/",_={xml:x,xmlns:O},E=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,D=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,T=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,p=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function I(g){return g===" "||g===`
35
+ `||g==="\r"||g===" "}function A(g){return g==='"'||g==="'"}function j(g){return g===">"||I(g)}function U(g,d){return g.test(d)}function B(g,d){return!U(g,d)}var h=0;n.STATE={BEGIN:h++,BEGIN_WHITESPACE:h++,TEXT:h++,TEXT_ENTITY:h++,OPEN_WAKA:h++,SGML_DECL:h++,SGML_DECL_QUOTED:h++,DOCTYPE:h++,DOCTYPE_QUOTED:h++,DOCTYPE_DTD:h++,DOCTYPE_DTD_QUOTED:h++,COMMENT_STARTING:h++,COMMENT:h++,COMMENT_ENDING:h++,COMMENT_ENDED:h++,CDATA:h++,CDATA_ENDING:h++,CDATA_ENDING_2:h++,PROC_INST:h++,PROC_INST_BODY:h++,PROC_INST_ENDING:h++,OPEN_TAG:h++,OPEN_TAG_SLASH:h++,ATTRIB:h++,ATTRIB_NAME:h++,ATTRIB_NAME_SAW_WHITE:h++,ATTRIB_VALUE:h++,ATTRIB_VALUE_QUOTED:h++,ATTRIB_VALUE_CLOSED:h++,ATTRIB_VALUE_UNQUOTED:h++,ATTRIB_VALUE_ENTITY_Q:h++,ATTRIB_VALUE_ENTITY_U:h++,CLOSE_TAG:h++,CLOSE_TAG_SAW_WHITE:h++,SCRIPT:h++,SCRIPT_ENDING:h++},n.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},n.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(n.ENTITIES).forEach(function(g){var d=n.ENTITIES[g],S=typeof d=="number"?String.fromCharCode(d):d;n.ENTITIES[g]=S});for(var F in n.STATE)n.STATE[n.STATE[F]]=F;h=n.STATE;function R(g,d,S){g[d]&&g[d](S)}function X(g,d,S){g.textNode&&$(g),R(g,d,S)}function $(g){g.textNode=Y(g.opt,g.textNode),g.textNode&&R(g,"ontext",g.textNode),g.textNode=""}function Y(g,d){return g.trim&&(d=d.trim()),g.normalize&&(d=d.replace(/\s+/g," ")),d}function J(g,d){return $(g),g.trackPosition&&(d+=`
36
+ Line: `+g.line+`
37
+ Column: `+g.column+`
38
+ Char: `+g.c),d=new Error(d),g.error=d,R(g,"onerror",d),g}function z(g){return g.sawRoot&&!g.closedRoot&&W(g,"Unclosed root tag"),g.state!==h.BEGIN&&g.state!==h.BEGIN_WHITESPACE&&g.state!==h.TEXT&&J(g,"Unexpected end"),$(g),g.c="",g.closed=!0,R(g,"onend"),a.call(g,g.strict,g.opt),g}function W(g,d){if(typeof g!="object"||!(g instanceof a))throw new Error("bad call to strictFail");g.strict&&J(g,d)}function vt(g){g.strict||(g.tagName=g.tagName[g.looseCase]());var d=g.tags[g.tags.length-1]||g,S=g.tag={name:g.tagName,attributes:{}};g.opt.xmlns&&(S.ns=d.ns),g.attribList.length=0,X(g,"onopentagstart",S)}function bt(g,d){var S=g.indexOf(":"),L=S<0?["",g]:g.split(":"),K=L[0],tt=L[1];return d&&g==="xmlns"&&(K="xmlns",tt=""),{prefix:K,local:tt}}function gt(g){if(g.strict||(g.attribName=g.attribName[g.looseCase]()),g.attribList.indexOf(g.attribName)!==-1||g.tag.attributes.hasOwnProperty(g.attribName)){g.attribName=g.attribValue="";return}if(g.opt.xmlns){var d=bt(g.attribName,!0),S=d.prefix,L=d.local;if(S==="xmlns")if(L==="xml"&&g.attribValue!==x)W(g,"xml: prefix must be bound to "+x+`
39
+ Actual: `+g.attribValue);else if(L==="xmlns"&&g.attribValue!==O)W(g,"xmlns: prefix must be bound to "+O+`
40
+ Actual: `+g.attribValue);else{var K=g.tag,tt=g.tags[g.tags.length-1]||g;K.ns===tt.ns&&(K.ns=Object.create(tt.ns)),K.ns[L]=g.attribValue}g.attribList.push([g.attribName,g.attribValue])}else g.tag.attributes[g.attribName]=g.attribValue,X(g,"onattribute",{name:g.attribName,value:g.attribValue});g.attribName=g.attribValue=""}function Q(g,d){if(g.opt.xmlns){var S=g.tag,L=bt(g.tagName);S.prefix=L.prefix,S.local=L.local,S.uri=S.ns[L.prefix]||"",S.prefix&&!S.uri&&(W(g,"Unbound namespace prefix: "+JSON.stringify(g.tagName)),S.uri=L.prefix);var K=g.tags[g.tags.length-1]||g;S.ns&&K.ns!==S.ns&&Object.keys(S.ns).forEach(function(P){X(g,"onopennamespace",{prefix:P,uri:S.ns[P]})});for(var tt=0,H=g.attribList.length;tt<H;tt++){var it=g.attribList[tt],C=it[0],s=it[1],e=bt(C,!0),r=e.prefix,l=e.local,v=r===""?"":S.ns[r]||"",M={name:C,value:s,prefix:r,local:l,uri:v};r&&r!=="xmlns"&&!v&&(W(g,"Unbound namespace prefix: "+JSON.stringify(r)),M.uri=r),g.tag.attributes[C]=M,X(g,"onattribute",M)}g.attribList.length=0}g.tag.isSelfClosing=!!d,g.sawRoot=!0,g.tags.push(g.tag),X(g,"onopentag",g.tag),d||(!g.noscript&&g.tagName.toLowerCase()==="script"?g.state=h.SCRIPT:g.state=h.TEXT,g.tag=null,g.tagName=""),g.attribName=g.attribValue="",g.attribList.length=0}function et(g){if(!g.tagName){W(g,"Weird empty close tag."),g.textNode+="</>",g.state=h.TEXT;return}if(g.script){if(g.tagName!=="script"){g.script+="</"+g.tagName+">",g.tagName="",g.state=h.SCRIPT;return}X(g,"onscript",g.script),g.script=""}var d=g.tags.length,S=g.tagName;g.strict||(S=S[g.looseCase]());for(var L=S;d--;){var K=g.tags[d];if(K.name!==L)W(g,"Unexpected close tag");else break}if(d<0){W(g,"Unmatched closing tag: "+g.tagName),g.textNode+="</"+g.tagName+">",g.state=h.TEXT;return}g.tagName=S;for(var tt=g.tags.length;tt-- >d;){var H=g.tag=g.tags.pop();g.tagName=g.tag.name,X(g,"onclosetag",g.tagName);var it={};for(var C in H.ns)it[C]=H.ns[C];var s=g.tags[g.tags.length-1]||g;g.opt.xmlns&&H.ns!==s.ns&&Object.keys(H.ns).forEach(function(e){var r=H.ns[e];X(g,"onclosenamespace",{prefix:e,uri:r})})}d===0&&(g.closedRoot=!0),g.tagName=g.attribValue=g.attribName="",g.attribList.length=0,g.state=h.TEXT}function Tt(g){var d=g.entity,S=d.toLowerCase(),L,K="";return g.ENTITIES[d]?g.ENTITIES[d]:g.ENTITIES[S]?g.ENTITIES[S]:(d=S,d.charAt(0)==="#"&&(d.charAt(1)==="x"?(d=d.slice(2),L=parseInt(d,16),K=L.toString(16)):(d=d.slice(1),L=parseInt(d,10),K=L.toString(10))),d=d.replace(/^0+/,""),isNaN(L)||K.toLowerCase()!==d?(W(g,"Invalid character entity"),"&"+g.entity+";"):String.fromCodePoint(L))}function k(g,d){d==="<"?(g.state=h.OPEN_WAKA,g.startTagPosition=g.position):I(d)||(W(g,"Non-whitespace before first tag."),g.textNode=d,g.state=h.TEXT)}function wt(g,d){var S="";return d<g.length&&(S=g.charAt(d)),S}function It(g){var d=this;if(this.error)throw this.error;if(d.closed)return J(d,"Cannot write after close. Assign an onready handler.");if(g===null)return z(d);typeof g=="object"&&(g=g.toString());for(var S=0,L="";L=wt(g,S++),d.c=L,!!L;)switch(d.trackPosition&&(d.position++,L===`
41
+ `?(d.line++,d.column=0):d.column++),d.state){case h.BEGIN:if(d.state=h.BEGIN_WHITESPACE,L==="\uFEFF")continue;k(d,L);continue;case h.BEGIN_WHITESPACE:k(d,L);continue;case h.TEXT:if(d.sawRoot&&!d.closedRoot){for(var K=S-1;L&&L!=="<"&&L!=="&";)L=wt(g,S++),L&&d.trackPosition&&(d.position++,L===`
42
+ `?(d.line++,d.column=0):d.column++);d.textNode+=g.substring(K,S-1)}L==="<"&&!(d.sawRoot&&d.closedRoot&&!d.strict)?(d.state=h.OPEN_WAKA,d.startTagPosition=d.position):(!I(L)&&(!d.sawRoot||d.closedRoot)&&W(d,"Text data outside of root node."),L==="&"?d.state=h.TEXT_ENTITY:d.textNode+=L);continue;case h.SCRIPT:L==="<"?d.state=h.SCRIPT_ENDING:d.script+=L;continue;case h.SCRIPT_ENDING:L==="/"?d.state=h.CLOSE_TAG:(d.script+="<"+L,d.state=h.SCRIPT);continue;case h.OPEN_WAKA:if(L==="!")d.state=h.SGML_DECL,d.sgmlDecl="";else if(!I(L))if(U(E,L))d.state=h.OPEN_TAG,d.tagName=L;else if(L==="/")d.state=h.CLOSE_TAG,d.tagName="";else if(L==="?")d.state=h.PROC_INST,d.procInstName=d.procInstBody="";else{if(W(d,"Unencoded <"),d.startTagPosition+1<d.position){var tt=d.position-d.startTagPosition;L=new Array(tt).join(" ")+L}d.textNode+="<"+L,d.state=h.TEXT}continue;case h.SGML_DECL:if(d.sgmlDecl+L==="--"){d.state=h.COMMENT,d.comment="",d.sgmlDecl="";continue}d.doctype&&d.doctype!==!0&&d.sgmlDecl?(d.state=h.DOCTYPE_DTD,d.doctype+="<!"+d.sgmlDecl+L,d.sgmlDecl=""):(d.sgmlDecl+L).toUpperCase()===y?(X(d,"onopencdata"),d.state=h.CDATA,d.sgmlDecl="",d.cdata=""):(d.sgmlDecl+L).toUpperCase()===b?(d.state=h.DOCTYPE,(d.doctype||d.sawRoot)&&W(d,"Inappropriately located doctype declaration"),d.doctype="",d.sgmlDecl=""):L===">"?(X(d,"onsgmldeclaration",d.sgmlDecl),d.sgmlDecl="",d.state=h.TEXT):(A(L)&&(d.state=h.SGML_DECL_QUOTED),d.sgmlDecl+=L);continue;case h.SGML_DECL_QUOTED:L===d.q&&(d.state=h.SGML_DECL,d.q=""),d.sgmlDecl+=L;continue;case h.DOCTYPE:L===">"?(d.state=h.TEXT,X(d,"ondoctype",d.doctype),d.doctype=!0):(d.doctype+=L,L==="["?d.state=h.DOCTYPE_DTD:A(L)&&(d.state=h.DOCTYPE_QUOTED,d.q=L));continue;case h.DOCTYPE_QUOTED:d.doctype+=L,L===d.q&&(d.q="",d.state=h.DOCTYPE);continue;case h.DOCTYPE_DTD:L==="]"?(d.doctype+=L,d.state=h.DOCTYPE):L==="<"?(d.state=h.OPEN_WAKA,d.startTagPosition=d.position):A(L)?(d.doctype+=L,d.state=h.DOCTYPE_DTD_QUOTED,d.q=L):d.doctype+=L;continue;case h.DOCTYPE_DTD_QUOTED:d.doctype+=L,L===d.q&&(d.state=h.DOCTYPE_DTD,d.q="");continue;case h.COMMENT:L==="-"?d.state=h.COMMENT_ENDING:d.comment+=L;continue;case h.COMMENT_ENDING:L==="-"?(d.state=h.COMMENT_ENDED,d.comment=Y(d.opt,d.comment),d.comment&&X(d,"oncomment",d.comment),d.comment=""):(d.comment+="-"+L,d.state=h.COMMENT);continue;case h.COMMENT_ENDED:L!==">"?(W(d,"Malformed comment"),d.comment+="--"+L,d.state=h.COMMENT):d.doctype&&d.doctype!==!0?d.state=h.DOCTYPE_DTD:d.state=h.TEXT;continue;case h.CDATA:L==="]"?d.state=h.CDATA_ENDING:d.cdata+=L;continue;case h.CDATA_ENDING:L==="]"?d.state=h.CDATA_ENDING_2:(d.cdata+="]"+L,d.state=h.CDATA);continue;case h.CDATA_ENDING_2:L===">"?(d.cdata&&X(d,"oncdata",d.cdata),X(d,"onclosecdata"),d.cdata="",d.state=h.TEXT):L==="]"?d.cdata+="]":(d.cdata+="]]"+L,d.state=h.CDATA);continue;case h.PROC_INST:L==="?"?d.state=h.PROC_INST_ENDING:I(L)?d.state=h.PROC_INST_BODY:d.procInstName+=L;continue;case h.PROC_INST_BODY:if(!d.procInstBody&&I(L))continue;L==="?"?d.state=h.PROC_INST_ENDING:d.procInstBody+=L;continue;case h.PROC_INST_ENDING:L===">"?(X(d,"onprocessinginstruction",{name:d.procInstName,body:d.procInstBody}),d.procInstName=d.procInstBody="",d.state=h.TEXT):(d.procInstBody+="?"+L,d.state=h.PROC_INST_BODY);continue;case h.OPEN_TAG:U(D,L)?d.tagName+=L:(vt(d),L===">"?Q(d):L==="/"?d.state=h.OPEN_TAG_SLASH:(I(L)||W(d,"Invalid character in tag name"),d.state=h.ATTRIB));continue;case h.OPEN_TAG_SLASH:L===">"?(Q(d,!0),et(d)):(W(d,"Forward-slash in opening tag not followed by >"),d.state=h.ATTRIB);continue;case h.ATTRIB:if(I(L))continue;L===">"?Q(d):L==="/"?d.state=h.OPEN_TAG_SLASH:U(E,L)?(d.attribName=L,d.attribValue="",d.state=h.ATTRIB_NAME):W(d,"Invalid attribute name");continue;case h.ATTRIB_NAME:L==="="?d.state=h.ATTRIB_VALUE:L===">"?(W(d,"Attribute without value"),d.attribValue=d.attribName,gt(d),Q(d)):I(L)?d.state=h.ATTRIB_NAME_SAW_WHITE:U(D,L)?d.attribName+=L:W(d,"Invalid attribute name");continue;case h.ATTRIB_NAME_SAW_WHITE:if(L==="=")d.state=h.ATTRIB_VALUE;else{if(I(L))continue;W(d,"Attribute without value"),d.tag.attributes[d.attribName]="",d.attribValue="",X(d,"onattribute",{name:d.attribName,value:""}),d.attribName="",L===">"?Q(d):U(E,L)?(d.attribName=L,d.state=h.ATTRIB_NAME):(W(d,"Invalid attribute name"),d.state=h.ATTRIB)}continue;case h.ATTRIB_VALUE:if(I(L))continue;A(L)?(d.q=L,d.state=h.ATTRIB_VALUE_QUOTED):(d.opt.unquotedAttributeValues||J(d,"Unquoted attribute value"),d.state=h.ATTRIB_VALUE_UNQUOTED,d.attribValue=L);continue;case h.ATTRIB_VALUE_QUOTED:if(L!==d.q){L==="&"?d.state=h.ATTRIB_VALUE_ENTITY_Q:d.attribValue+=L;continue}gt(d),d.q="",d.state=h.ATTRIB_VALUE_CLOSED;continue;case h.ATTRIB_VALUE_CLOSED:I(L)?d.state=h.ATTRIB:L===">"?Q(d):L==="/"?d.state=h.OPEN_TAG_SLASH:U(E,L)?(W(d,"No whitespace between attributes"),d.attribName=L,d.attribValue="",d.state=h.ATTRIB_NAME):W(d,"Invalid attribute name");continue;case h.ATTRIB_VALUE_UNQUOTED:if(!j(L)){L==="&"?d.state=h.ATTRIB_VALUE_ENTITY_U:d.attribValue+=L;continue}gt(d),L===">"?Q(d):d.state=h.ATTRIB;continue;case h.CLOSE_TAG:if(d.tagName)L===">"?et(d):U(D,L)?d.tagName+=L:d.script?(d.script+="</"+d.tagName,d.tagName="",d.state=h.SCRIPT):(I(L)||W(d,"Invalid tagname in closing tag"),d.state=h.CLOSE_TAG_SAW_WHITE);else{if(I(L))continue;B(E,L)?d.script?(d.script+="</"+L,d.state=h.SCRIPT):W(d,"Invalid tagname in closing tag."):d.tagName=L}continue;case h.CLOSE_TAG_SAW_WHITE:if(I(L))continue;L===">"?et(d):W(d,"Invalid characters in closing tag");continue;case h.TEXT_ENTITY:case h.ATTRIB_VALUE_ENTITY_Q:case h.ATTRIB_VALUE_ENTITY_U:var H,it;switch(d.state){case h.TEXT_ENTITY:H=h.TEXT,it="textNode";break;case h.ATTRIB_VALUE_ENTITY_Q:H=h.ATTRIB_VALUE_QUOTED,it="attribValue";break;case h.ATTRIB_VALUE_ENTITY_U:H=h.ATTRIB_VALUE_UNQUOTED,it="attribValue";break}if(L===";"){var C=Tt(d);d.opt.unparsedEntities&&!Object.values(n.XML_ENTITIES).includes(C)?(d.entity="",d.state=H,d.write(C)):(d[it]+=C,d.entity="",d.state=H)}else U(d.entity.length?p:T,L)?d.entity+=L:(W(d,"Invalid character in entity name"),d[it]+="&"+d.entity+L,d.entity="",d.state=H);continue;default:throw new Error(d,"Unknown state: "+d.state)}return d.position>=d.bufferCheckPosition&&f(d),d}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */String.fromCodePoint||function(){var g=String.fromCharCode,d=Math.floor,S=function(){var L=16384,K=[],tt,H,it=-1,C=arguments.length;if(!C)return"";for(var s="";++it<C;){var e=Number(arguments[it]);if(!isFinite(e)||e<0||e>1114111||d(e)!==e)throw RangeError("Invalid code point: "+e);e<=65535?K.push(e):(e-=65536,tt=(e>>10)+55296,H=e%1024+56320,K.push(tt,H)),(it+1===C||K.length>L)&&(s+=g.apply(null,K),K.length=0)}return s};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:S,configurable:!0,writable:!0}):String.fromCodePoint=S}()})(u)}(Te)),Te}var ve={},Vr;function xi(){return Vr||(Vr=1,function(){ve.stripBOM=function(u){return u[0]==="\uFEFF"?u.substring(1):u}}.call(G)),ve}var Et={},$r;function hn(){return $r||($r=1,function(){var u;u=new RegExp(/(?!xmlns)^.*:/),Et.normalize=function(n){return n.toLowerCase()},Et.firstCharLowerCase=function(n){return n.charAt(0).toLowerCase()+n.slice(1)},Et.stripPrefix=function(n){return n.replace(u,"")},Et.parseNumbers=function(n){return isNaN(n)||(n=n%1===0?parseInt(n,10):parseFloat(n)),n},Et.parseBooleans=function(n){return/^(?:true|false)$/i.test(n)&&(n=n.toLowerCase()==="true"),n}}.call(G)),Et}var Wr;function Di(){return Wr||(Wr=1,function(u){(function(){var n,c,a,f,o,t,i,m,N,w=function(x,O){return function(){return x.apply(O,arguments)}},y=function(x,O){for(var _ in O)b.call(O,_)&&(x[_]=O[_]);function E(){this.constructor=x}return E.prototype=O.prototype,x.prototype=new E,x.__super__=O.prototype,x},b={}.hasOwnProperty;m=Ti(),f=Le,n=xi(),i=hn(),N=Pn.setImmediate,c=_e().defaults,o=function(x){return typeof x=="object"&&x!=null&&Object.keys(x).length===0},t=function(x,O,_){var E,D,T;for(E=0,D=x.length;E<D;E++)T=x[E],O=T(O,_);return O},a=function(x,O,_){var E;return E=Object.create(null),E.value=_,E.writable=!0,E.enumerable=!0,E.configurable=!0,Object.defineProperty(x,O,E)},u.Parser=function(x){y(O,x);function O(_){this.parseStringPromise=w(this.parseStringPromise,this),this.parseString=w(this.parseString,this),this.reset=w(this.reset,this),this.assignOrPush=w(this.assignOrPush,this),this.processAsync=w(this.processAsync,this);var E,D,T;if(!(this instanceof u.Parser))return new u.Parser(_);this.options={},D=c["0.2"];for(E in D)b.call(D,E)&&(T=D[E],this.options[E]=T);for(E in _)b.call(_,E)&&(T=_[E],this.options[E]=T);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(i.normalize)),this.reset()}return O.prototype.processAsync=function(){var _,E;try{return this.remaining.length<=this.options.chunkSize?(_=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(_),this.saxParser.close()):(_=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(_),N(this.processAsync))}catch(D){if(E=D,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(E)}},O.prototype.assignOrPush=function(_,E,D){return E in _?(_[E]instanceof Array||a(_,E,[_[E]]),_[E].push(D)):this.options.explicitArray?a(_,E,[D]):a(_,E,D)},O.prototype.reset=function(){var _,E,D,T;return this.removeAllListeners(),this.saxParser=m.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(p){return function(I){if(p.saxParser.resume(),!p.saxParser.errThrown)return p.saxParser.errThrown=!0,p.emit("error",I)}}(this),this.saxParser.onend=function(p){return function(){if(!p.saxParser.ended)return p.saxParser.ended=!0,p.emit("end",p.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,T=[],_=this.options.attrkey,E=this.options.charkey,this.saxParser.onopentag=function(p){return function(I){var A,j,U,B,h;if(U={},U[E]="",!p.options.ignoreAttrs){h=I.attributes;for(A in h)b.call(h,A)&&(!(_ in U)&&!p.options.mergeAttrs&&(U[_]={}),j=p.options.attrValueProcessors?t(p.options.attrValueProcessors,I.attributes[A],A):I.attributes[A],B=p.options.attrNameProcessors?t(p.options.attrNameProcessors,A):A,p.options.mergeAttrs?p.assignOrPush(U,B,j):a(U[_],B,j))}return U["#name"]=p.options.tagNameProcessors?t(p.options.tagNameProcessors,I.name):I.name,p.options.xmlns&&(U[p.options.xmlnskey]={uri:I.uri,local:I.local}),T.push(U)}}(this),this.saxParser.onclosetag=function(p){return function(){var I,A,j,U,B,h,F,R,X,$;if(h=T.pop(),B=h["#name"],(!p.options.explicitChildren||!p.options.preserveChildrenOrder)&&delete h["#name"],h.cdata===!0&&(I=h.cdata,delete h.cdata),X=T[T.length-1],h[E].match(/^\s*$/)&&!I?(A=h[E],delete h[E]):(p.options.trim&&(h[E]=h[E].trim()),p.options.normalize&&(h[E]=h[E].replace(/\s{2,}/g," ").trim()),h[E]=p.options.valueProcessors?t(p.options.valueProcessors,h[E],B):h[E],Object.keys(h).length===1&&E in h&&!p.EXPLICIT_CHARKEY&&(h=h[E])),o(h)&&(typeof p.options.emptyTag=="function"?h=p.options.emptyTag():h=p.options.emptyTag!==""?p.options.emptyTag:A),p.options.validator!=null&&($="/"+function(){var Y,J,z;for(z=[],Y=0,J=T.length;Y<J;Y++)U=T[Y],z.push(U["#name"]);return z}().concat(B).join("/"),function(){var Y;try{return h=p.options.validator($,X&&X[B],h)}catch(J){return Y=J,p.emit("error",Y)}}()),p.options.explicitChildren&&!p.options.mergeAttrs&&typeof h=="object"){if(!p.options.preserveChildrenOrder)U={},p.options.attrkey in h&&(U[p.options.attrkey]=h[p.options.attrkey],delete h[p.options.attrkey]),!p.options.charsAsChildren&&p.options.charkey in h&&(U[p.options.charkey]=h[p.options.charkey],delete h[p.options.charkey]),Object.getOwnPropertyNames(h).length>0&&(U[p.options.childkey]=h),h=U;else if(X){X[p.options.childkey]=X[p.options.childkey]||[],F={};for(j in h)b.call(h,j)&&a(F,j,h[j]);X[p.options.childkey].push(F),delete h["#name"],Object.keys(h).length===1&&E in h&&!p.EXPLICIT_CHARKEY&&(h=h[E])}}return T.length>0?p.assignOrPush(X,B,h):(p.options.explicitRoot&&(R=h,h={},a(h,B,R)),p.resultObject=h,p.saxParser.ended=!0,p.emit("end",p.resultObject))}}(this),D=function(p){return function(I){var A,j;if(j=T[T.length-1],j)return j[E]+=I,p.options.explicitChildren&&p.options.preserveChildrenOrder&&p.options.charsAsChildren&&(p.options.includeWhiteChars||I.replace(/\\n/g,"").trim()!=="")&&(j[p.options.childkey]=j[p.options.childkey]||[],A={"#name":"__text__"},A[E]=I,p.options.normalize&&(A[E]=A[E].replace(/\s{2,}/g," ").trim()),j[p.options.childkey].push(A)),j}}(this),this.saxParser.ontext=D,this.saxParser.oncdata=function(p){return function(I){var A;if(A=D(I),A)return A.cdata=!0}}()},O.prototype.parseString=function(_,E){var D;E!=null&&typeof E=="function"&&(this.on("end",function(T){return this.reset(),E(null,T)}),this.on("error",function(T){return this.reset(),E(T)}));try{return _=_.toString(),_.trim()===""?(this.emit("end",null),!0):(_=n.stripBOM(_),this.options.async?(this.remaining=_,N(this.processAsync),this.saxParser):this.saxParser.write(_).close())}catch(T){if(D=T,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw D}else return this.emit("error",D),this.saxParser.errThrown=!0}},O.prototype.parseStringPromise=function(_){return new Promise(function(E){return function(D,T){return E.parseString(_,function(p,I){return p?T(p):D(I)})}}(this))},O}(f),u.parseString=function(x,O,_){var E,D,T;return _!=null?(typeof _=="function"&&(E=_),typeof O=="object"&&(D=O)):(typeof O=="function"&&(E=O),D={}),T=new u.Parser(D),T.parseString(x,E)},u.parseStringPromise=function(x,O){var _,E;return typeof O=="object"&&(_=O),E=new u.Parser(_),E.parseStringPromise(x)}}).call(G)}(Ee)),Ee}var pn;(function(){var u,n,c,a=function(o,t){for(var i in t)f.call(t,i)&&(o[i]=t[i]);function m(){this.constructor=o}return m.prototype=t.prototype,o.prototype=new m,o.__super__=t.prototype,o},f={}.hasOwnProperty;n=_e(),u=mi(),c=Di(),hn(),n.defaults,function(o){a(t,o);function t(i){this.message=i}return t}(Error),u.Builder,c.Parser,c.parseString,pn=c.parseStringPromise}).call(G);class vi{constructor(n,c,a){this.nextTxnId=1,this.pendingCommands=new Map,this.breakpoints=new Map,this.scriptIdByUrl=new Map,this.nextScriptId=1,this.objectHandles=new Map,this.nextObjectId=1,this.callFramesMap=new Map,this.xdebugConnected=!1,this.dbgp=n,this.cdp=c,this.readPHPFile=a.getPHPFile,this.phpRoot=a.phpRoot||"";for(const f of a.knownScriptUrls)this.scriptIdByUrl.set(f,this.getOrCreateScriptId(f));this.breakOnFirstLine=a.breakOnFirstLine||!1}start(){this.dbgp.on("connected",()=>{this.xdebugConnected=!0,this.sendDbgpCommand("stdout","-c 1"),this.sendDbgpCommand("stderr","-c 1")}),this.dbgp.on("message",async n=>{try{const c=await pn(n,{explicitArray:!1});await this.handleDbgpMessage(c)}catch{}}),this.dbgp.on("disconnected",()=>{this.xdebugConnected=!1,this.cdp.sendMessage({method:"Debugger.paused",params:{reason:"terminated",callFrames:[]}})}),this.cdp.on("message",n=>{this.handleCdpMessage(n)}),this.cdp.on("clientDisconnected",()=>{this.xdebugConnected&&this.sendDbgpCommand("detach")}),this.sendInitialScripts().then(()=>{if(!this.breakOnFirstLine){const n=this.scriptIdByUrl.entries().next().value;n&&(this.cdp.sendMessage({method:"Debugger.paused",params:{callFrames:[{location:{scriptId:n[1],lineNumber:0},scopeChain:[],this:{type:"undefined"}}],reason:"other"}}),setTimeout(()=>{this.cdp.sendMessage({method:"Debugger.resumed"})},50))}this.cdp.sendMessage({method:"Log.entryAdded",params:{entry:{source:"other",level:"info",text:`🎉 Welcome to WordPress Playground DevTools! 🎉
43
43
  ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
44
44
 
45
45
  1. Add breakpoints in your files to start step debugging.
@@ -47,13 +47,13 @@ Actual: `+y.attribValue);else{var K=y.tag,tt=y.tags[y.tags.length-1]||y;K.ns===t
47
47
  2. Run your php file, project, plugin or theme using PHP.wasm or Playground CLI.
48
48
 
49
49
  3. Witness the magic break.`,timestamp:Date.now()}}}),this.cdp.sendMessage({method:"Log.entryAdded",params:{entry:{source:"other",level:"info",text:" ",timestamp:Date.now()}}})})}stop(){this.dbgp.close(),this.cdp.close()}async sendInitialScripts(){for(const[n,c]of this.scriptIdByUrl.entries())await this.sendScriptToCDP(n,c)}async sendScriptToCDP(n,c){const a=this.uriFromBridgeToCDPSyntaxHighlight(n),f=this.uriFromBridgeToCDP(n);try{const o=await this.readPHPFile(n),t=o.split(`
50
- `),i=t.map((g,b)=>b===0?"AAAA":"AACA").join(";"),m={version:3,file:f,sources:[a],sourcesContent:[o],mappings:i},w=`data:application/json;base64,${Buffer.from(JSON.stringify(m),"utf-8").toString("base64")}`;this.cdp.sendMessage({method:"Debugger.scriptParsed",params:{scriptId:c,url:f,startLine:0,startColumn:0,endLine:t.length,endColumn:0,executionContextId:1,sourceMapURL:w}})}catch(o){this.cdp.sendMessage({method:"Log.entryAdded",params:{entry:{source:"other",level:"warning",text:o.message,timestamp:Date.now()}}})}}getOrCreateScriptId(n){let c=this.scriptIdByUrl.get(n);return c||(c=Mn("sha256").update(String(this.nextScriptId++)).digest("hex").slice(0,16),this.scriptIdByUrl.set(n,c)),c}formatPropertyFullName(n){let c=!1,a="";for(const f of n)f==='"'||f==="\\"||f==="\0"?(a+="\\"+f,c=!0):f===" "?(a+=f,c=!0):a+=f;return(c||n.includes("'"))&&(a=`"${a}"`),a}sendDbgpCommand(n,c){const f=(this.nextTxnId++).toString();let o=`${n} -i ${f}`;return c!==void 0&&(o+=` ${c}`),this.dbgp.sendCommand(o),f}async handleCdpMessage(n){const{id:c,method:a,params:f}=n;let o={},t=!0;switch(a){case"Debugger.enable":case"Runtime.enable":o={};break;case"Debugger.setBreakpointByUrl":{const{url:i,lineNumber:m}=f,N=this.uriFromCDPToBridge(i),w=this.uriFromBridgeToDBGP(N),g=(typeof m=="number"?m:0)+1,b=String(this.breakpoints.size+1);if(this.xdebugConnected){const x=`breakpoint_set -t line -f ${this.formatPropertyFullName(w)} -n ${g}`,O=this.sendDbgpCommand(x);this.pendingCommands.set(O,{cdpId:c,cdpMethod:a,params:{breakpointId:b,fileUri:N,lineNumber:g}}),t=!1}else this.breakpoints.set(b,{cdpId:b,xdebugId:null,fileUri:N,lineNumber:g}),o={breakpointId:b,locations:[{scriptId:this.getOrCreateScriptId(N),lineNumber:g-1,columnNumber:0}]};break}case"Debugger.removeBreakpoint":{const{breakpointId:i}=f,m=String(i),N=this.breakpoints.get(m);if(N){if(N.xdebugId&&this.xdebugConnected){const w=`breakpoint_remove -d ${N.xdebugId}`,g=this.sendDbgpCommand(w);this.pendingCommands.set(g,{cdpId:c,cdpMethod:a}),t=!1}this.breakpoints.delete(m)}o={};break}case"Debugger.resume":{this.xdebugConnected&&this.sendDbgpCommand("run"),o={};break}case"Debugger.stepOver":{this.xdebugConnected&&this.sendDbgpCommand("step_over"),o={};break}case"Debugger.stepInto":{this.xdebugConnected&&this.sendDbgpCommand("step_into"),o={};break}case"Debugger.stepOut":{this.xdebugConnected&&this.sendDbgpCommand("step_out"),o={};break}case"Debugger.pause":{this.xdebugConnected&&this.sendDbgpCommand("break"),o={};break}case"Runtime.evaluate":case"Debugger.evaluateOnCallFrame":{const i=f.expression||"",m=f.callFrameId;if(a==="Debugger.evaluateOnCallFrame"){if(m===void 0||!this.callFramesMap.has(m)){this.cdp.sendMessage({id:c,error:{code:-32e3,message:"No such call frame"}});return}if(this.callFramesMap.get(m)!==0){this.cdp.sendMessage({id:c,error:{code:-32e3,message:"Evaluation in this frame not supported"}});return}}if(this.xdebugConnected){const N=Buffer.from(i).toString("base64"),w=this.sendDbgpCommand("eval",`-- ${N}`);this.pendingCommands.set(w,{cdpId:c,cdpMethod:a}),t=!1}else o={result:{type:"undefined",value:void 0}};break}case"Runtime.getProperties":{const{objectId:i}=f,m=this.objectHandles.get(i);if(m&&this.xdebugConnected)if(m.type==="context"){const N=m.contextId??0,g=`context_get -d ${m.depth} -c ${N} -p 0 -m 32`,b=this.sendDbgpCommand(g),x={...m,currentPage:0,aggregatedProps:[]};this.objectHandles.set(i,x),this.pendingCommands.set(b,{cdpId:c,cdpMethod:a,params:{objectId:i}}),t=!1}else if(m.type==="property"){const N=m.depth,w=m.fullname,g=this.formatPropertyFullName(w),b=`property_get -d ${N} -n ${g} -p 0 -m 32`,x=this.sendDbgpCommand(b),O={...m,currentPage:0,aggregatedProps:[]};this.objectHandles.set(i,O),this.pendingCommands.set(x,{cdpId:c,cdpMethod:a,params:{parentObjectId:i}}),t=!1}else o={result:[]};else o={result:[]};break}case"Debugger.getScriptSource":{const i=f.scriptId,m=[...this.scriptIdByUrl.entries()].find(([,w])=>w===i)?.[0],N=[];m&&N.push(`Here's the full path for your convenience:
50
+ `),i=t.map((y,b)=>b===0?"AAAA":"AACA").join(";"),m={version:3,file:f,sources:[a],sourcesContent:[o],mappings:i},w=`data:application/json;base64,${Buffer.from(JSON.stringify(m),"utf-8").toString("base64")}`;this.cdp.sendMessage({method:"Debugger.scriptParsed",params:{scriptId:c,url:f,startLine:0,startColumn:0,endLine:t.length,endColumn:0,executionContextId:1,sourceMapURL:w}})}catch(o){this.cdp.sendMessage({method:"Log.entryAdded",params:{entry:{source:"other",level:"warning",text:o.message,timestamp:Date.now()}}})}}getOrCreateScriptId(n){let c=this.scriptIdByUrl.get(n);return c||(c=Mn("sha256").update(String(this.nextScriptId++)).digest("hex").slice(0,16),this.scriptIdByUrl.set(n,c)),c}formatPropertyFullName(n){let c=!1,a="";for(const f of n)f==='"'||f==="\\"||f==="\0"?(a+="\\"+f,c=!0):f===" "?(a+=f,c=!0):a+=f;return(c||n.includes("'"))&&(a=`"${a}"`),a}sendDbgpCommand(n,c){const f=(this.nextTxnId++).toString();let o=`${n} -i ${f}`;return c!==void 0&&(o+=` ${c}`),this.dbgp.sendCommand(o),f}async handleCdpMessage(n){const{id:c,method:a,params:f}=n;let o={},t=!0;switch(a){case"Debugger.enable":case"Runtime.enable":o={};break;case"Debugger.setBreakpointByUrl":{const{url:i,lineNumber:m}=f;if(!i){t=!1;break}const N=this.uriFromCDPToBridge(i),w=this.uriFromBridgeToDBGP(N),y=(typeof m=="number"?m:0)+1,b=String(this.breakpoints.size+1);if(this.xdebugConnected){const x=`breakpoint_set -t line -f ${this.formatPropertyFullName(w)} -n ${y}`,O=this.sendDbgpCommand(x);this.pendingCommands.set(O,{cdpId:c,cdpMethod:a,params:{breakpointId:b,fileUri:N,lineNumber:y}}),t=!1}else this.breakpoints.set(b,{cdpId:b,xdebugId:null,fileUri:N,lineNumber:y}),o={breakpointId:b,locations:[{scriptId:this.getOrCreateScriptId(N),lineNumber:y-1,columnNumber:0}]};break}case"Debugger.removeBreakpoint":{const{breakpointId:i}=f,m=String(i),N=this.breakpoints.get(m);if(N){if(N.xdebugId&&this.xdebugConnected){const w=`breakpoint_remove -d ${N.xdebugId}`,y=this.sendDbgpCommand(w);this.pendingCommands.set(y,{cdpId:c,cdpMethod:a}),t=!1}this.breakpoints.delete(m)}o={};break}case"Debugger.resume":{this.xdebugConnected&&this.sendDbgpCommand("run"),o={};break}case"Debugger.stepOver":{this.xdebugConnected&&this.sendDbgpCommand("step_over"),o={};break}case"Debugger.stepInto":{this.xdebugConnected&&this.sendDbgpCommand("step_into"),o={};break}case"Debugger.stepOut":{this.xdebugConnected&&this.sendDbgpCommand("step_out"),o={};break}case"Debugger.pause":{this.xdebugConnected&&this.sendDbgpCommand("break"),o={};break}case"Runtime.evaluate":case"Debugger.evaluateOnCallFrame":{const i=f.expression||"",m=f.callFrameId;if(a==="Debugger.evaluateOnCallFrame"){if(m===void 0||!this.callFramesMap.has(m)){this.cdp.sendMessage({id:c,error:{code:-32e3,message:"No such call frame"}});return}if(this.callFramesMap.get(m)!==0){this.cdp.sendMessage({id:c,error:{code:-32e3,message:"Evaluation in this frame not supported"}});return}}if(this.xdebugConnected){const N=Buffer.from(i).toString("base64"),w=this.sendDbgpCommand("eval",`-- ${N}`);this.pendingCommands.set(w,{cdpId:c,cdpMethod:a}),t=!1}else o={result:{type:"undefined",value:void 0}};break}case"Runtime.getProperties":{const{objectId:i}=f,m=this.objectHandles.get(i);if(m&&this.xdebugConnected)if(m.type==="context"){const N=m.contextId??0,y=`context_get -d ${m.depth} -c ${N} -p 0 -m 32`,b=this.sendDbgpCommand(y),x={...m,currentPage:0,aggregatedProps:[]};this.objectHandles.set(i,x),this.pendingCommands.set(b,{cdpId:c,cdpMethod:a,params:{objectId:i}}),t=!1}else if(m.type==="property"){const N=m.depth,w=m.fullname,y=this.formatPropertyFullName(w),b=`property_get -d ${N} -n ${y} -p 0 -m 32`,x=this.sendDbgpCommand(b),O={...m,currentPage:0,aggregatedProps:[]};this.objectHandles.set(i,O),this.pendingCommands.set(x,{cdpId:c,cdpMethod:a,params:{parentObjectId:i}}),t=!1}else o={result:[]};else o={result:[]};break}case"Debugger.getScriptSource":{const i=f.scriptId,m=[...this.scriptIdByUrl.entries()].find(([,w])=>w===i)?.[0],N=[];m&&N.push(`Here's the full path for your convenience:
51
51
  `,`${this.uriFromBridgeToCDPSyntaxHighlight(m).replace("file://","")}
52
52
  `),o={scriptSource:["`Are you looking for your source code?","Go to PHP.wasm group in the navigator and find it there.",...N,"What is this file, then? It's a placeholder required due to the dev tools limitations.","The XDebug <-> Devtools bridge implement PHP syntax highlighting using source maps,",'and the unfortunate side effect is having a "source" file and a "target" file.',`This is the "source". If you're interested in even more details, see the discussion at:
53
53
  `,"https://github.com/WordPress/wordpress-playground/pull/2566`"].join(`
54
- `)};break}default:o={};break}t&&this.cdp.sendMessage({id:c,result:o})}uriFromBridgeToCDPSyntaxHighlight(n){return`file://PHP.wasm/${n}`}uriFromBridgeToCDP(n){return n=this.scriptIdByUrl.get(n)??"",`file://placeholders/${n}`}uriFromCDPToBridge(n){const c="file://placeholders/";return[...this.scriptIdByUrl.entries()].find(([,a])=>a===n.slice(c.length))?.[0]??""}uriFromBridgeToDBGP(n){return Pt.resolve(process.cwd(),n)}uriFromDBGPToBridge(n){n=n.startsWith("file://")?n.slice(7):n;const c=n.indexOf(this.phpRoot);return c!==-1?n.slice(c):n}async handleDbgpMessage(n){if(n.init){this.breakpoints.forEach(a=>{this.handleCdpMessage({id:a.cdpId,method:"Debugger.setBreakpointByUrl",params:{url:this.uriFromBridgeToCDP(a.fileUri),lineNumber:a.lineNumber-1}})});const c=this.breakOnFirstLine?this.sendDbgpCommand("step_into"):this.sendDbgpCommand("run");this.pendingCommands.set(c,{});return}if(n.response){const c=n.response,a=c.$,f=a.command,o=a.transaction_id,t=this.pendingCommands.get(o);switch(f){case"breakpoint_set":{if(t&&t.cdpId!==void 0&&t.cdpMethod==="Debugger.setBreakpointByUrl"){const i=a.id,m=t.params;if(m){const{breakpointId:N,fileUri:w,lineNumber:g}=m;this.breakpoints.set(N,{cdpId:N,xdebugId:i,fileUri:w,lineNumber:g});const b=this.getOrCreateScriptId(w),x={breakpointId:N,locations:[{scriptId:b,lineNumber:g-1,columnNumber:0}]};this.cdp.sendMessage({id:t.cdpId,result:x})}this.pendingCommands.delete(o)}break}case"breakpoint_remove":{t&&t.cdpId!==void 0&&(this.cdp.sendMessage({id:t.cdpId,result:{}}),this.pendingCommands.delete(o));break}case"run":case"step_into":case"step_over":case"step_out":{const i=a.status;if(c["xdebug:message"]){const m=this.uriFromDBGPToBridge(c["xdebug:message"].$.filename);m&&!this.scriptIdByUrl.has(m)&&await this.sendScriptToCDP(m,this.getOrCreateScriptId(m))}if(i==="break"){const m=this.sendDbgpCommand("stack_get");this.pendingCommands.set(m,{}),this.pendingCommands.delete(o)}else(i==="stopping"||i==="stopped")&&this.cdp.sendMessage({method:"Debugger.resumed",params:{}});break}case"eval":{if(t&&t.cdpId!==void 0){let i;if(c.property){const N=c.property,w=N.$.type,g=N.$.encoding;let b=null;if(Object.prototype.hasOwnProperty.call(N,"_")?b=N._:typeof N.$value<"u"&&(b=N.$value),g==="base64"&&b!==null)try{b=Buffer.from(b,"base64").toString()}catch{}if(w==="string")i={type:"string",value:b??""};else if(w==="int"||w==="float"||w==="bool"||w==="boolen"||w==="integer"||w==="double"){let x=b;w.startsWith("int")||w==="integer"?x=parseInt(b||"0",10):w==="float"||w==="double"?x=parseFloat(b||"0"):w.startsWith("bool")&&(x=b==="1"||b==="true"),i={type:"number",value:x}}else if(w==="array"||w==="object"){const x=N.$.classname||(w==="array"?"Array":"Object"),O=String(this.nextObjectId++),_=N.$.fullname||"";this.objectHandles.set(O,{type:"property",depth:0,contextId:0,fullname:_}),i={type:"object",objectId:O,className:x,description:x}}else w==="null"?i={type:"object",subtype:"null",value:null}:i={type:"undefined",value:void 0}}else i={type:"undefined",value:void 0};const m={result:i};this.cdp.sendMessage({id:t.cdpId,result:m}),this.pendingCommands.delete(o)}break}case"context_get":case"property_get":{if(t&&t.cdpId!==void 0){const i=t.params?.objectId||t.params?.parentObjectId,m=i?this.objectHandles.get(i):null,N=c.property?.property??c.property,w=[];if(N){const g=Array.isArray(N)?N:[N];for(const b of g){const x=b.$.name||b.$.fullname||"";let O=b.$.type||"undefined";const _=b.$.children==="1",E=b.$.encoding;let D=null;if(typeof b._<"u"&&(D=b._),E==="base64"&&D!==null)try{D=Buffer.from(D,"base64").toString()}catch{}if(_){const T=b.$.classname||(O==="array"?"Array":"Object"),p=String(this.nextObjectId++),I=t.cdpMethod==="Runtime.getProperties"&&t.params?.parentObjectId&&this.objectHandles.get(t.params.parentObjectId)?.contextId||0,A=t.cdpMethod==="Runtime.getProperties"&&t.params?.parentObjectId&&this.objectHandles.get(t.params.parentObjectId)?.depth||0;this.objectHandles.set(p,{type:"property",depth:A,contextId:I,fullname:b.$.fullname||x}),w.push({name:b.$.key||x,value:{type:"object",className:T,description:T,objectId:p},writable:!1,configurable:!1,enumerable:!0})}else{let T,p;O==="string"?T=D??"":O==="int"||O==="integer"?T=parseInt(D||"0",10):O==="float"||O==="double"?T=parseFloat(D||"0"):O==="bool"||O==="boolean"?(T=D==="1"||D==="true",O="boolean"):O==="null"?(T=null,p="null"):T=D;const I={type:O==="integer"?"number":O};p&&(I.subtype=p),I.value=T,w.push({name:b.$.key||x,value:I,writable:!1,configurable:!1,enumerable:!0})}}}if(m){const g=(m.aggregatedProps||[]).concat(w),b=32;if(w.length===b){const O=(m.currentPage||0)+1,_={...m,currentPage:O,aggregatedProps:g};this.objectHandles.set(i,_);let E;if(f==="context_get"){const T=m.contextId??0;E=`context_get -d ${m.depth} -c ${T} -p ${O} -m ${b}`}else{const T=m.depth,p=m.fullname,I=this.formatPropertyFullName(p);E=`property_get -d ${T} -n ${I} -p ${O} -m ${b}`}const D=this.sendDbgpCommand(E);this.pendingCommands.set(D,{cdpId:t.cdpId,cdpMethod:t.cdpMethod,params:t.params}),this.pendingCommands.delete(o);return}else{const O={result:g};this.cdp.sendMessage({id:t.cdpId,result:O}),this.pendingCommands.delete(o)}}else{const g={result:w};this.cdp.sendMessage({id:t.cdpId,result:g}),this.pendingCommands.delete(o)}}break}case"stack_get":{if(c.stack){const i=Array.isArray(c.stack)?c.stack:[c.stack],m=[];this.callFramesMap.clear();for(const w of i){const g=this.uriFromDBGPToBridge(w.$.filename),b=this.getOrCreateScriptId(g);this.scriptIdByUrl.has(g)||(this.scriptIdByUrl.set(g,b),await this.sendScriptToCDP(g,b))}for(const w of i){const g=parseInt(w.$.level,10),b=this.uriFromDBGPToBridge(w.$.filename),x=parseInt(w.$.lineno,10),O=w.$.where&&w.$.where!=="{main}"?w.$.where:"(anonymous)",_=`frame:${g}`;this.callFramesMap.set(_,g);const E=[],D=String(this.nextObjectId++);this.objectHandles.set(D,{type:"context",contextId:0,depth:g}),E.push({type:"local",object:{objectId:D,className:"Object",description:"Local"}});const T=String(this.nextObjectId++);this.objectHandles.set(T,{type:"context",contextId:1,depth:g}),E.push({type:"global",object:{objectId:T,className:"Object",description:"Global"}}),m.push({callFrameId:_,functionName:O,location:{scriptId:this.getOrCreateScriptId(b),lineNumber:x-1,columnNumber:0},scopeChain:E,this:{type:"object",className:"Object",description:"Object",objectId:T}})}let N="pause";if(i.length>0){const w=i[0];if(w.$.filename&&w.$.lineno){const g=this.uriFromDBGPToBridge(w.$.filename),b=parseInt(w.$.lineno,10);for(const x of this.breakpoints.values())if(x.fileUri===g&&x.lineNumber===b){N="breakpoint";break}}}this.cdp.sendMessage({method:"Debugger.paused",params:{reason:N,callFrames:m,hitBreakpoints:N==="breakpoint"?[""]:[]}})}this.pendingCommands.delete(o);break}default:{t&&t.cdpId!==void 0&&(this.cdp.sendMessage({id:t.cdpId,result:{}}),this.pendingCommands.delete(o));break}}}else if(n.stream){const c=n.stream,a=c.$.type,f=c.$.encoding||"none";let o=typeof c._=="string"?c._:"";f==="base64"&&(o=Buffer.from(o,"base64").toString()),this.cdp.sendMessage({method:"Log.entryAdded",params:{entry:{source:"other",level:a==="stderr"?"error":"info",text:o,timestamp:Date.now(),stackTrace:{callFrames:[]}}}})}else n.notify}}async function Ii(u){const n=u.cdpPort??9229,c=u.dbgpPort??9003,a=u.cdpHost??"localhost",f=u.phpRoot??process.cwd(),o=u.breakOnFirstLine??!1;ht.log("Starting XDebug Bridge...");const t=new Gn(n);ht.log("Connect Chrome DevTools to CDP at:"),ht.log(`devtools://devtools/bundled/inspector.html?ws=${a}:${n}
55
- `),await new Promise(g=>t.on("clientConnected",g)),await new Promise(g=>setTimeout(g,2e3)),ht.log("Chrome connected! Initializing Xdebug receiver...");const i=new Yn(c);ht.log(`XDebug receiver running on port ${c}`),ht.log("Running a PHP script with Xdebug enabled...");function m(g){const b=[],x=gn(g);for(const O of x){const _=Pt.join(g,O),E=wn(_);E&&E.isDirectory()?b.push(...m(_)):O.endsWith(".php")&&b.push(_)}return b}const N=u.phpInstance?g=>u.phpInstance.readFileAsText(g):u.getPHPFile?u.getPHPFile:g=>Oe(g,"utf-8"),w=m(f);return new vi(i,t,{knownScriptUrls:w,phpRoot:f,getPHPFile:N,breakOnFirstLine:o})}let at=process.argv.slice(2);at.length||(at=["--help"]);const dn=(import.meta||{}).url,Ne=new URL("ca-bundle.crt",dn).pathname;bn(Ne)||Hr(Ne,Tn.join(`
56
- `));at.unshift("-d",`openssl.cafile=${Ne}`);async function Ni(){const u=new URL("php.ini",dn).pathname,n=process.env.PHP||xn;if(!Dn.includes(n))throw new Error(`Unsupported PHP version ${n}`);const c=at.some(g=>g.startsWith("--xdebug"));c&&(at=at.filter(g=>g!=="--xdebug"));const a=at.some(g=>g.startsWith("--experimental-devtools"));a&&(at=at.filter(g=>g!=="--experimental-devtools"));const{TMPDIR:f,...o}=process.env,t=ze(Pt.join(Ye.tmpdir(),"php-wasm-bin"));Hr(`${t}/php`,`#!/bin/sh
54
+ `)};break}default:o={};break}t&&this.cdp.sendMessage({id:c,result:o})}uriFromBridgeToCDPSyntaxHighlight(n){return`file://PHP.wasm/${n}`}uriFromBridgeToCDP(n){return n=this.scriptIdByUrl.get(n)??"",`file://placeholders/${n}`}uriFromCDPToBridge(n){const c="file://placeholders/";return[...this.scriptIdByUrl.entries()].find(([,a])=>a===n.slice(c.length))?.[0]??""}uriFromBridgeToDBGP(n){return Pt.resolve(process.cwd(),n)}uriFromDBGPToBridge(n){n=n.startsWith("file://")?n.slice(7):n;const c=n.indexOf(this.phpRoot);return c!==-1?n.slice(c):n}async handleDbgpMessage(n){if(n.init){this.breakpoints.forEach(a=>{this.handleCdpMessage({id:a.cdpId,method:"Debugger.setBreakpointByUrl",params:{url:this.uriFromBridgeToCDP(a.fileUri),lineNumber:a.lineNumber-1}})});const c=this.breakOnFirstLine?this.sendDbgpCommand("step_into"):this.sendDbgpCommand("run");this.pendingCommands.set(c,{});return}if(n.response){const c=n.response,a=c.$,f=a.command,o=a.transaction_id,t=this.pendingCommands.get(o);switch(f){case"breakpoint_set":{if(t&&t.cdpId!==void 0&&t.cdpMethod==="Debugger.setBreakpointByUrl"){const i=a.id,m=t.params;if(m){const{breakpointId:N,fileUri:w,lineNumber:y}=m;this.breakpoints.set(N,{cdpId:N,xdebugId:i,fileUri:w,lineNumber:y});const b=this.getOrCreateScriptId(w),x={breakpointId:N,locations:[{scriptId:b,lineNumber:y-1,columnNumber:0}]};this.cdp.sendMessage({id:t.cdpId,result:x})}this.pendingCommands.delete(o)}break}case"breakpoint_remove":{t&&t.cdpId!==void 0&&(this.cdp.sendMessage({id:t.cdpId,result:{}}),this.pendingCommands.delete(o));break}case"run":case"step_into":case"step_over":case"step_out":{const i=a.status;if(c["xdebug:message"]){const m=this.uriFromDBGPToBridge(c["xdebug:message"].$.filename);m&&!this.scriptIdByUrl.has(m)&&await this.sendScriptToCDP(m,this.getOrCreateScriptId(m))}if(i==="break"){const m=this.sendDbgpCommand("stack_get");this.pendingCommands.set(m,{}),this.pendingCommands.delete(o)}else(i==="stopping"||i==="stopped")&&this.cdp.sendMessage({method:"Debugger.resumed",params:{}});break}case"eval":{if(t&&t.cdpId!==void 0){let i;if(c.property){const N=c.property,w=N.$.type,y=N.$.encoding;let b=null;if(Object.prototype.hasOwnProperty.call(N,"_")?b=N._:typeof N.$value<"u"&&(b=N.$value),y==="base64"&&b!==null)try{b=Buffer.from(b,"base64").toString()}catch{}if(w==="string")i={type:"string",value:b??""};else if(w==="int"||w==="float"||w==="bool"||w==="boolen"||w==="integer"||w==="double"){let x=b;w.startsWith("int")||w==="integer"?x=parseInt(b||"0",10):w==="float"||w==="double"?x=parseFloat(b||"0"):w.startsWith("bool")&&(x=b==="1"||b==="true"),i={type:"number",value:x}}else if(w==="array"||w==="object"){const x=N.$.classname||(w==="array"?"Array":"Object"),O=String(this.nextObjectId++),_=N.$.fullname||"";this.objectHandles.set(O,{type:"property",depth:0,contextId:0,fullname:_}),i={type:"object",objectId:O,className:x,description:x}}else w==="null"?i={type:"object",subtype:"null",value:null}:i={type:"undefined",value:void 0}}else i={type:"undefined",value:void 0};const m={result:i};this.cdp.sendMessage({id:t.cdpId,result:m}),this.pendingCommands.delete(o)}break}case"context_get":case"property_get":{if(t&&t.cdpId!==void 0){const i=t.params?.objectId||t.params?.parentObjectId,m=i?this.objectHandles.get(i):null,N=c.property?.property??c.property,w=[];if(N){const y=Array.isArray(N)?N:[N];for(const b of y){const x=b.$.name||b.$.fullname||"";let O=b.$.type||"undefined";const _=b.$.children==="1",E=b.$.encoding;let D=null;if(typeof b._<"u"&&(D=b._),E==="base64"&&D!==null)try{D=Buffer.from(D,"base64").toString()}catch{}if(_){const T=b.$.classname||(O==="array"?"Array":"Object"),p=String(this.nextObjectId++),I=t.cdpMethod==="Runtime.getProperties"&&t.params?.parentObjectId&&this.objectHandles.get(t.params.parentObjectId)?.contextId||0,A=t.cdpMethod==="Runtime.getProperties"&&t.params?.parentObjectId&&this.objectHandles.get(t.params.parentObjectId)?.depth||0;this.objectHandles.set(p,{type:"property",depth:A,contextId:I,fullname:b.$.fullname||x}),w.push({name:b.$.key||x,value:{type:"object",className:T,description:T,objectId:p},writable:!1,configurable:!1,enumerable:!0})}else{let T,p;O==="string"?T=D??"":O==="int"||O==="integer"?T=parseInt(D||"0",10):O==="float"||O==="double"?T=parseFloat(D||"0"):O==="bool"||O==="boolean"?(T=D==="1"||D==="true",O="boolean"):O==="null"?(T=null,p="null"):T=D;const I={type:O==="integer"?"number":O};p&&(I.subtype=p),I.value=T,w.push({name:b.$.key||x,value:I,writable:!1,configurable:!1,enumerable:!0})}}}if(m){const y=(m.aggregatedProps||[]).concat(w),b=32;if(w.length===b){const O=(m.currentPage||0)+1,_={...m,currentPage:O,aggregatedProps:y};this.objectHandles.set(i,_);let E;if(f==="context_get"){const T=m.contextId??0;E=`context_get -d ${m.depth} -c ${T} -p ${O} -m ${b}`}else{const T=m.depth,p=m.fullname,I=this.formatPropertyFullName(p);E=`property_get -d ${T} -n ${I} -p ${O} -m ${b}`}const D=this.sendDbgpCommand(E);this.pendingCommands.set(D,{cdpId:t.cdpId,cdpMethod:t.cdpMethod,params:t.params}),this.pendingCommands.delete(o);return}else{const O={result:y};this.cdp.sendMessage({id:t.cdpId,result:O}),this.pendingCommands.delete(o)}}else{const y={result:w};this.cdp.sendMessage({id:t.cdpId,result:y}),this.pendingCommands.delete(o)}}break}case"stack_get":{if(c.stack){const i=Array.isArray(c.stack)?c.stack:[c.stack],m=[];this.callFramesMap.clear();for(const w of i){const y=this.uriFromDBGPToBridge(w.$.filename),b=this.getOrCreateScriptId(y);this.scriptIdByUrl.has(y)||(this.scriptIdByUrl.set(y,b),await this.sendScriptToCDP(y,b))}for(const w of i){const y=parseInt(w.$.level,10),b=this.uriFromDBGPToBridge(w.$.filename),x=parseInt(w.$.lineno,10),O=w.$.where&&w.$.where!=="{main}"?w.$.where:"(anonymous)",_=`frame:${y}`;this.callFramesMap.set(_,y);const E=[],D=String(this.nextObjectId++);this.objectHandles.set(D,{type:"context",contextId:0,depth:y}),E.push({type:"local",object:{objectId:D,className:"Object",description:"Local"}});const T=String(this.nextObjectId++);this.objectHandles.set(T,{type:"context",contextId:1,depth:y}),E.push({type:"global",object:{objectId:T,className:"Object",description:"Global"}}),m.push({callFrameId:_,functionName:O,location:{scriptId:this.getOrCreateScriptId(b),lineNumber:x-1,columnNumber:0},scopeChain:E,this:{type:"object",className:"Object",description:"Object",objectId:T}})}let N="pause";if(i.length>0){const w=i[0];if(w.$.filename&&w.$.lineno){const y=this.uriFromDBGPToBridge(w.$.filename),b=parseInt(w.$.lineno,10);for(const x of this.breakpoints.values())if(x.fileUri===y&&x.lineNumber===b){N="breakpoint";break}}}this.cdp.sendMessage({method:"Debugger.paused",params:{reason:N,callFrames:m,hitBreakpoints:N==="breakpoint"?[""]:[]}})}this.pendingCommands.delete(o);break}default:{t&&t.cdpId!==void 0&&(this.cdp.sendMessage({id:t.cdpId,result:{}}),this.pendingCommands.delete(o));break}}}else if(n.stream){const c=n.stream,a=c.$.type,f=c.$.encoding||"none";let o=typeof c._=="string"?c._:"";f==="base64"&&(o=Buffer.from(o,"base64").toString()),this.cdp.sendMessage({method:"Log.entryAdded",params:{entry:{source:"other",level:a==="stderr"?"error":"info",text:o,timestamp:Date.now(),stackTrace:{callFrames:[]}}}})}else n.notify}}async function Ii(u){const n=u.cdpPort??9229,c=u.dbgpPort??9003,a=u.cdpHost??"localhost",f=u.phpRoot??process.cwd(),o=u.breakOnFirstLine??!1;ht.log("Starting XDebug Bridge...");const t=new Gn(n);ht.log("Connect Chrome DevTools to CDP at:"),ht.log(`devtools://devtools/bundled/inspector.html?ws=${a}:${n}
55
+ `),await new Promise(y=>t.on("clientConnected",y)),await new Promise(y=>setTimeout(y,2e3)),ht.log("Chrome connected! Initializing Xdebug receiver...");const i=new Yn(c);ht.log(`XDebug receiver running on port ${c}`),ht.log("Running a PHP script with Xdebug enabled...");async function m(y){const b=[],x=u.phpInstance?await u.phpInstance.listFiles(y):gn(y);for(const O of x){const _=Pt.join(y,O);try{(u.phpInstance?await u.phpInstance.isDir(_):wn(_).isDirectory())?b.push(...await m(_)):O.endsWith(".php")&&b.push(_)}catch{}}return b}const N=u.phpInstance?y=>u.phpInstance.readFileAsText(y):u.getPHPFile?u.getPHPFile:y=>Oe(y,"utf-8"),w=await m(f);return new vi(i,t,{knownScriptUrls:w,phpRoot:f,getPHPFile:N,breakOnFirstLine:o})}let at=process.argv.slice(2);at.length||(at=["--help"]);const dn=(import.meta||{}).url,Ne=new URL("ca-bundle.crt",dn).pathname;bn(Ne)||Hr(Ne,Tn.join(`
56
+ `));at.unshift("-d",`openssl.cafile=${Ne}`);async function Ni(){const u=new URL("php.ini",dn).pathname,n=process.env.PHP||xn;if(!Dn.includes(n))throw new Error(`Unsupported PHP version ${n}`);const c=at.some(y=>y.startsWith("--xdebug"));c&&(at=at.filter(y=>y!=="--xdebug"));const a=at.some(y=>y.startsWith("--experimental-devtools"));a&&(at=at.filter(y=>y!=="--experimental-devtools"));const{TMPDIR:f,...o}=process.env,t=ze(Pt.join(Ye.tmpdir(),"php-wasm-bin"));Hr(`${t}/php`,`#!/bin/sh
57
57
  ${process.argv[0]} ${process.execArgv.join(" ")} ${process.argv[1]}
58
- `),En(`${t}/php`,493);const i=ze(Pt.join(Ye.tmpdir(),"php-wasm-sys-tmp")),m=new vn(await In(n,{emscriptenOptions:{fileLockManager:new Nn,processId:1,ENV:{...o,TMPDIR:i,TERM:"xterm",PATH:`${t}:${o.PATH}`}},withXdebug:c}));On(m),a&&c&&(await Ii({breakOnFirstLine:!0})).start(),at.some(g=>g.startsWith("-c"))||at.unshift("-c",u);const w=await m.cli(["php",...at]);w.stderr.pipeTo(new WritableStream({write(g){process.stderr.write(g)}})),w.stdout.pipeTo(new WritableStream({write(g){process.stdout.write(g)}})),await w.exitCode.catch(g=>{throw g.name==="ExitStatus"&&process.exit(g.status===void 0?1:g.status),g}).finally(()=>{setTimeout(()=>{process.exit(0)},100)})}Ni();
58
+ `),En(`${t}/php`,493);const i=ze(Pt.join(Ye.tmpdir(),"php-wasm-sys-tmp")),m=new vn(await In(n,{emscriptenOptions:{fileLockManager:new Nn,processId:1,ENV:{...o,TMPDIR:i,TERM:"xterm",PATH:`${t}:${o.PATH}`}},withXdebug:c}));On(m),a&&c&&(await Ii({breakOnFirstLine:!0})).start(),at.some(y=>y.startsWith("-c"))||at.unshift("-c",u);const w=await m.cli(["php",...at]);w.stderr.pipeTo(new WritableStream({write(y){process.stderr.write(y)}})),w.stdout.pipeTo(new WritableStream({write(y){process.stdout.write(y)}})),await w.exitCode.catch(y=>{throw y.name==="ExitStatus"&&process.exit(y.status===void 0?1:y.status),y}).finally(()=>{setTimeout(()=>{process.exit(0)},100)})}Ni();
59
59
  //# sourceMappingURL=main.js.map