@signalk/freeboard-sk 2.24.0 → 2.24.2
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.
- package/CHANGELOG.md +19 -0
- package/assets/icons/icon-192x192.png +0 -0
- package/docs/screenshots/1_freeboard-sk.png +0 -0
- package/docs/screenshots/README.md +31 -0
- package/package.json +26 -7
- package/public/3rdpartylicenses.txt +9 -361
- package/public/chunk-2AF4T5IB.js +1 -0
- package/public/chunk-346FAZUS.js +1 -0
- package/public/{chunk-BTVNOQ7K.js → chunk-3GHIRJ3C.js} +2 -2
- package/public/chunk-4SHFYAXK.js +1 -0
- package/public/{chunk-2LV2AYBP.js → chunk-64QDJX7X.js} +1 -1
- package/public/chunk-A4TULHTL.js +1 -0
- package/public/chunk-AEB5DG3B.js +1 -0
- package/public/chunk-AFVK3UQJ.js +5482 -0
- package/public/chunk-AX3UMUXB.js +1 -0
- package/public/{chunk-TLBNKF2R.js → chunk-EFVTFEXB.js} +1 -1
- package/public/chunk-FALIRPMH.js +1035 -0
- package/public/{chunk-A7QJNGJ7.js → chunk-FEIJMPL7.js} +2 -2
- package/public/chunk-G4GM24WE.js +1 -0
- package/public/{chunk-DPEXDGKO.js → chunk-GQXHMDKV.js} +1 -1
- package/public/chunk-KFWFMRV7.js +1 -0
- package/public/chunk-LXUTMJYP.js +1145 -0
- package/public/chunk-NTIQMWPW.js +2718 -0
- package/public/chunk-QIOZNURQ.js +1 -0
- package/public/chunk-RWJHAOI2.js +1 -0
- package/public/chunk-SBFXQ3G7.js +1 -0
- package/public/chunk-TAJAMNLU.js +1 -0
- package/public/chunk-UEUVGTXJ.js +1 -0
- package/public/{chunk-WUXY5N7A.js → chunk-WA2ENVQZ.js} +1 -1
- package/public/index.html +2 -2
- package/public/main-AZEF35BN.js +466 -0
- package/public/polyfills-RV3JTMEC.js +2 -0
- package/public/styles-FMJMFQ5P.css +1 -0
- package/public/worker-AUTVLQL7.js +3 -0
- package/public/worker-FRXPLBUO.js +12 -0
- package/public/worker-T4RJR7DG.js +12 -0
- package/public/worker-Y35X2QU7.js +26 -0
- package/public/chunk-3MOH2GUU.js +0 -1
- package/public/chunk-3ZBG3EOD.js +0 -1
- package/public/chunk-4SN3Q6K3.js +0 -1
- package/public/chunk-5KDMJ54F.js +0 -1
- package/public/chunk-67IVDHNW.js +0 -1
- package/public/chunk-AZK5ODAA.js +0 -1
- package/public/chunk-GMWUHE7S.js +0 -131
- package/public/chunk-GQRIAFM6.js +0 -1
- package/public/chunk-HQSHA6SH.js +0 -13
- package/public/chunk-LXWUCH7T.js +0 -1
- package/public/chunk-QPQHN5VS.js +0 -22
- package/public/chunk-RBFFWNLA.js +0 -1
- package/public/chunk-TQPGRJVE.js +0 -19
- package/public/chunk-V3DD3MHN.js +0 -1
- package/public/chunk-Y6FV7FIU.js +0 -1
- package/public/chunk-YPACWLLV.js +0 -1
- package/public/chunk-YUTPR5Z4.js +0 -1
- package/public/main-SF5NH7GR.js +0 -11
- package/public/polyfills-5CFQRCPP.js +0 -2
- package/public/styles-N7HVRSAT.css +0 -1
- package/public/worker-42LKK6ER.js +0 -26
- package/public/worker-FPJG6QKK.js +0 -5
- package/public/worker-UZNU4LIJ.js +0 -12
- package/public/worker-WYOFLVNH.js +0 -12
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
var qn=Object.create;var Gr=Object.defineProperty;var kn=Object.getOwnPropertyDescriptor;var Tn=Object.getOwnPropertyNames;var Cn=Object.getPrototypeOf,En=Object.prototype.hasOwnProperty;var l=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var In=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Tn(e))!En.call(t,n)&&n!==r&&Gr(t,n,{get:()=>e[n],enumerable:!(i=kn(e,n))||i.enumerable});return t};var Xr=(t,e,r)=>(r=t!=null?qn(Cn(t)):{},In(e||!t||!t.__esModule?Gr(r,"default",{value:t,enumerable:!0}):r,t));var S=l(g=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});g.areaConversion=g.timeConversion=g.distanceConversion=g.altitudeKeys=g.latitudeKeys=g.longitudeKeys=g.MAXLON=g.MINLON=g.MAXLAT=g.MINLAT=g.earthRadius=g.sexagesimalPattern=void 0;var Hn=/^([0-9]{1,3})°\s*([0-9]{1,3}(?:\.(?:[0-9]{1,}))?)['′]\s*(([0-9]{1,3}(\.([0-9]{1,}))?)["″]\s*)?([NEOSW]?)$/;g.sexagesimalPattern=Hn;var zn=6378137;g.earthRadius=zn;var Gn=-90;g.MINLAT=Gn;var Xn=90;g.MAXLAT=Xn;var Yn=-180;g.MINLON=Yn;var Zn=180;g.MAXLON=Zn;var Jn=["lng","lon","longitude",0];g.longitudeKeys=Jn;var Qn=["lat","latitude",1];g.latitudeKeys=Qn;var ea=["alt","altitude","elevation","elev",2];g.altitudeKeys=ea;var ta={m:1,km:.001,cm:100,mm:1e3,mi:1/1609.344,sm:1/1852.216,ft:100/30.48,in:100/2.54,yd:1/.9144};g.distanceConversion=ta;var ra={m:60,h:3600,d:86400};g.timeConversion=ra;var C={m2:1,km2:1e-6,ha:1e-4,a:.01,ft2:10.763911,yd2:1.19599,in2:1550.0031};g.areaConversion=C;C.sqm=C.m2;C.sqkm=C.km2;C.sqft=C.ft2;C.sqyd=C.yd2;C.sqin=C.in2});var me=l(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.default=void 0;var ia=function(e,r){return r.reduce(function(i,n){if(typeof e>"u"||e===null)throw new Error("'".concat(e,"' is no valid coordinate."));return Object.prototype.hasOwnProperty.call(e,n)&&typeof n<"u"&&typeof i>"u"?(i=n,n):i},void 0)},na=ia;Fe.default=na});var pe=l(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.default=void 0;var aa=function(e){var r=e.toString().trim();return isNaN(parseFloat(r))?!1:parseFloat(r)===Number(r)},oa=aa;Ue.default=oa});var ge=l(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.default=void 0;var sa=S(),ua=function(e){return sa.sexagesimalPattern.test(e.toString().trim())},la=ua;Ve.default=la});var he=l(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.default=void 0;var fa=S(),ca=function(e){var r=new RegExp(fa.sexagesimalPattern).exec(e.toString().trim());if(typeof r>"u"||r===null)throw new Error("Given value is not in sexagesimal format");var i=Number(r[2])/60||0,n=Number(r[4])/3600||0,a=parseFloat(r[1])+i+n;return["S","W"].includes(r[7])?-a:a},da=ca;Ke.default=da});var $e=l(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.default=void 0;var ar=S(),or=ma(me());function ma(t){return t&&t.__esModule?t:{default:t}}function ui(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function pa(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ui(Object(r),!0).forEach(function(i){ga(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ui(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function ga(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ha=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{longitude:ar.longitudeKeys,latitude:ar.latitudeKeys,altitude:ar.altitudeKeys},i=(0,or.default)(e,r.longitude),n=(0,or.default)(e,r.latitude),a=(0,or.default)(e,r.altitude);return pa({latitude:n,longitude:i},a?{altitude:a}:{})},va=ha;We.default=va});var ur=l(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.default=void 0;var ya=sr(pe()),ba=sr(ge()),_a=sr(he()),li=S();function sr(t){return t&&t.__esModule?t:{default:t}}var xa=function t(e){return(0,ya.default)(e)?!(parseFloat(e)>li.MAXLAT||e<li.MINLAT):(0,ba.default)(e)?t((0,_a.default)(e)):!1},Pa=xa;je.default=Pa});var fr=l(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.default=void 0;var Ma=lr(pe()),Sa=lr(ge()),Oa=lr(he()),fi=S();function lr(t){return t&&t.__esModule?t:{default:t}}var wa=function t(e){return(0,Ma.default)(e)?!(parseFloat(e)>fi.MAXLON||e<fi.MINLON):(0,Sa.default)(e)?t((0,Oa.default)(e)):!1},Aa=wa;Be.default=Aa});var dr=l(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.default=void 0;var Da=cr($e()),ci=cr(ur()),di=cr(fr());function cr(t){return t&&t.__esModule?t:{default:t}}var Ra=function(e){var r=(0,Da.default)(e),i=r.latitude,n=r.longitude;if(Array.isArray(e)&&e.length>=2)return(0,di.default)(e[0])&&(0,ci.default)(e[1]);if(typeof i>"u"||typeof n>"u")return!1;var a=e[n],o=e[i];return!(typeof o>"u"||typeof a>"u"||(0,ci.default)(o)===!1||(0,di.default)(a)===!1)},La=Ra;He.default=La});var Ge=l(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.default=void 0;var qa=ve(pe()),ka=ve(ge()),Ta=ve(he()),mi=ve(dr()),Ca=ve($e());function ve(t){return t&&t.__esModule?t:{default:t}}function pi(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function mr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?pi(Object(r),!0).forEach(function(i){pr(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pi(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function pr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ea=function t(e){if((0,qa.default)(e))return Number(e);if((0,ka.default)(e))return(0,Ta.default)(e);if((0,mi.default)(e)){var r=(0,Ca.default)(e);return Array.isArray(e)?e.map(function(i,n){return[0,1].includes(n)?t(i):i}):mr(mr(mr({},e),r.latitude&&pr({},r.latitude,t(e[r.latitude]))),r.longitude&&pr({},r.longitude,t(e[r.longitude])))}return Array.isArray(e)?e.map(function(i){return(0,mi.default)(i)?t(i):i}):e},Ia=Ea;ze.default=Ia});var R=l(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.default=void 0;var Na=S(),Fa=gi(me()),Ua=gi(Ge());function gi(t){return t&&t.__esModule?t:{default:t}}var Va=function(e,r){var i=(0,Fa.default)(e,Na.latitudeKeys);if(!(typeof i>"u"||i===null)){var n=e[i];return r===!0?n:(0,Ua.default)(n)}},Ka=Va;Xe.default=Ka});var L=l(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.default=void 0;var Wa=S(),$a=hi(me()),ja=hi(Ge());function hi(t){return t&&t.__esModule?t:{default:t}}var Ba=function(e,r){var i=(0,$a.default)(e,Wa.longitudeKeys);if(!(typeof i>"u"||i===null)){var n=e[i];return r===!0?n:(0,ja.default)(n)}},Ha=Ba;Ye.default=Ha});var F=l(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.default=void 0;var za=function(e){return e*Math.PI/180},Ga=za;Ze.default=Ga});var G=l(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.default=void 0;var Xa=function(e){return e*180/Math.PI},Ya=Xa;Je.default=Ya});var yi=l(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.default=void 0;var Za=Qe(R()),Ja=Qe(L()),gr=Qe(F()),hr=Qe(G()),vi=S();function Qe(t){return t&&t.__esModule?t:{default:t}}var Qa=function(e,r,i){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:6371e3,a=(0,Za.default)(e),o=(0,Ja.default)(e),s=r/n,u=(0,gr.default)(i),p=(0,gr.default)(a),h=(0,gr.default)(o),v=Math.asin(Math.sin(p)*Math.cos(s)+Math.cos(p)*Math.sin(s)*Math.cos(u)),m=h+Math.atan2(Math.sin(u)*Math.sin(s)*Math.cos(p),Math.cos(s)-Math.sin(p)*Math.sin(v)),b=(0,hr.default)(m);return(b<vi.MINLON||b>vi.MAXLON)&&(m=(m+3*Math.PI)%(2*Math.PI)-Math.PI,b=(0,hr.default)(m)),{latitude:(0,hr.default)(v),longitude:b}},eo=Qa;et.default=eo});var bi=l(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.default=void 0;var to=S(),ro=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"m",i=to.areaConversion[r];if(i)return e*i;throw new Error("Invalid unit used for area conversion.")},io=ro;tt.default=io});var _i=l(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.default=void 0;var no=S(),ao=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"m",i=no.distanceConversion[r];if(i)return e*i;throw new Error("Invalid unit used for distance conversion.")},oo=ao;rt.default=oo});var xi=l(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.default=void 0;var it=S(),so=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"kmh";switch(r){case"kmh":return e*it.timeConversion.h*it.distanceConversion.km;case"mph":return e*it.timeConversion.h*it.distanceConversion.mi;default:return e}},uo=so;nt.default=uo});var Si=l(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.default=void 0;function Pi(t,e){return mo(t)||co(t,e)||fo(t,e)||lo()}function lo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fo(t,e){if(t){if(typeof t=="string")return Mi(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Mi(t,e)}}function Mi(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function co(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var r=[],i=!0,n=!1,a=void 0;try{for(var o=t[Symbol.iterator](),s;!(i=(s=o.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(u){n=!0,a=u}finally{try{!i&&o.return!=null&&o.return()}finally{if(n)throw a}}return r}}function mo(t){if(Array.isArray(t))return t}var po=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:4,i=Math.pow(10,r);return Math.round(e*i)/i},go=function(e){var r=e.toString().split("."),i=Pi(r,2),n=i[0],a=i[1],o=Math.abs(Number(n)),s=+("0."+(a||0))*60,u=s.toString().split("."),p=Math.floor(s),h=po(+("0."+(u[1]||0))*60).toString(),v=h.split("."),m=Pi(v,2),b=m[0],O=m[1],y=O===void 0?"0":O;return o+"\xB0 "+p.toString().padStart(2,"0")+"' "+b.padStart(2,"0")+"."+y.padEnd(1,"0")+'"'},ho=go;at.default=ho});var vr=l(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.default=void 0;var vo=function(e){return e>1?1:e<-1?-1:e},yo=vo;ot.default=yo});var j=l(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.default=void 0;var Oi=st(R()),wi=st(L()),ne=st(F()),bo=st(vr()),_o=S();function st(t){return t&&t.__esModule?t:{default:t}}var xo=function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;i=typeof i<"u"&&!isNaN(i)?i:1;var n=(0,Oi.default)(e),a=(0,wi.default)(e),o=(0,Oi.default)(r),s=(0,wi.default)(r),u=Math.acos((0,bo.default)(Math.sin((0,ne.default)(o))*Math.sin((0,ne.default)(n))+Math.cos((0,ne.default)(o))*Math.cos((0,ne.default)(n))*Math.cos((0,ne.default)(a)-(0,ne.default)(s))))*_o.earthRadius;return Math.round(u/i)*i},Po=xo;ut.default=Po});var yr=l(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.default=void 0;var Ai=Mo(j());function Mo(t){return t&&t.__esModule?t:{default:t}}var So=function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ai.default;return i=typeof i=="function"?i:Ai.default,r.slice().sort(function(n,a){return i(e,n)-i(e,a)})},Oo=So;lt.default=Oo});var Di=l(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.default=void 0;var wo=Ao(yr());function Ao(t){return t&&t.__esModule?t:{default:t}}var Do=function(e,r){return(0,wo.default)(e,r)[0]},Ro=Do;ft.default=Ro});var qi=l(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.default=void 0;var br=_r(F()),Lo=_r(R()),Ri=_r(L()),Li=S();function _r(t){return t&&t.__esModule?t:{default:t}}var qo=function(e){var r=0;if(e.length>2){for(var i,n,a,o=0;o<e.length;o++){o===e.length-2?(i=e.length-2,n=e.length-1,a=0):o===e.length-1?(i=e.length-1,n=0,a=1):(i=o,n=o+1,a=o+2);var s=(0,Ri.default)(e[i]),u=(0,Lo.default)(e[n]),p=(0,Ri.default)(e[a]);r+=((0,br.default)(p)-(0,br.default)(s))*Math.sin((0,br.default)(u))}r=r*Li.earthRadius*Li.earthRadius/2}return Math.abs(r)},ko=qo;ct.default=ko});var xr=l(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.default=void 0;var To=ki(R()),Co=ki(L());function ki(t){return t&&t.__esModule?t:{default:t}}var Eo=function(e){if(Array.isArray(e)===!1||e.length===0)throw new Error("No points were given.");return e.reduce(function(r,i){var n=(0,To.default)(i),a=(0,Co.default)(i);return{maxLat:Math.max(n,r.maxLat),minLat:Math.min(n,r.minLat),maxLng:Math.max(a,r.maxLng),minLng:Math.min(a,r.minLng)}},{maxLat:-1/0,minLat:1/0,maxLng:-1/0,minLng:1/0})},Io=Eo;dt.default=Io});var Ti=l(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.default=void 0;var No=pt(R()),Fo=pt(L()),ae=pt(F()),mt=pt(G()),ye=S();function pt(t){return t&&t.__esModule?t:{default:t}}var Uo=function(e,r){var i=(0,No.default)(e),n=(0,Fo.default)(e),a=(0,ae.default)(i),o=(0,ae.default)(n),s=r/ye.earthRadius,u=a-s,p=a+s,h=(0,ae.default)(ye.MAXLAT),v=(0,ae.default)(ye.MINLAT),m=(0,ae.default)(ye.MAXLON),b=(0,ae.default)(ye.MINLON),O,y;if(u>v&&p<h){var k=Math.asin(Math.sin(s)/Math.cos(a));O=o-k,O<b&&(O+=Math.PI*2),y=o+k,y>m&&(y-=Math.PI*2)}else u=Math.max(u,v),p=Math.min(p,h),O=b,y=m;return[{latitude:(0,mt.default)(u),longitude:(0,mt.default)(O)},{latitude:(0,mt.default)(p),longitude:(0,mt.default)(y)}]},Vo=Uo;gt.default=Vo});var Ii=l(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.default=void 0;var Ko=ht(R()),Wo=ht(L()),Ci=ht(F()),Ei=ht(G());function ht(t){return t&&t.__esModule?t:{default:t}}var $o=function(e){if(Array.isArray(e)===!1||e.length===0)return!1;var r=e.length,i=e.reduce(function(s,u){var p=(0,Ci.default)((0,Ko.default)(u)),h=(0,Ci.default)((0,Wo.default)(u));return{X:s.X+Math.cos(p)*Math.cos(h),Y:s.Y+Math.cos(p)*Math.sin(h),Z:s.Z+Math.sin(p)}},{X:0,Y:0,Z:0}),n=i.X/r,a=i.Y/r,o=i.Z/r;return{longitude:(0,Ei.default)(Math.atan2(a,n)),latitude:(0,Ei.default)(Math.atan2(o,Math.sqrt(n*n+a*a)))}},jo=$o;vt.default=jo});var Ni=l(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.default=void 0;var Bo=Ho(xr());function Ho(t){return t&&t.__esModule?t:{default:t}}var zo=function(e){var r=(0,Bo.default)(e),i=r.minLat+(r.maxLat-r.minLat)/2,n=r.minLng+(r.maxLng-r.minLng)/2;return{latitude:parseFloat(i.toFixed(6)),longitude:parseFloat(n.toFixed(6))}},Go=zo;yt.default=Go});var Pr=l(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.default=void 0;var Fi=_t(R()),Ui=_t(L()),bt=_t(F()),Xo=_t(G());function _t(t){return t&&t.__esModule?t:{default:t}}var Yo=function(e,r){var i=(0,bt.default)((0,Ui.default)(r))-(0,bt.default)((0,Ui.default)(e)),n=Math.log(Math.tan((0,bt.default)((0,Fi.default)(r))/2+Math.PI/4)/Math.tan((0,bt.default)((0,Fi.default)(e))/2+Math.PI/4));return Math.abs(i)>Math.PI&&(i>0?i=(Math.PI*2-i)*-1:i=Math.PI*2+i),((0,Xo.default)(Math.atan2(i,n))+360)%360},Zo=Yo;xt.default=Zo});var Ki=l(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.default=void 0;var Vi=Jo(Pr());function Jo(t){return t&&t.__esModule?t:{default:t}}var Qo=function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vi.default,n=typeof i=="function"?i(e,r):(0,Vi.default)(e,r);if(isNaN(n))throw new Error("Could not calculate bearing for given points. Check your bearing function");switch(Math.round(n/22.5)){case 1:return"NNE";case 2:return"NE";case 3:return"ENE";case 4:return"E";case 5:return"ESE";case 6:return"SE";case 7:return"SSE";case 8:return"S";case 9:return"SSW";case 10:return"SW";case 11:return"WSW";case 12:return"W";case 13:return"WNW";case 14:return"NW";case 15:return"NNW";default:return"N"}},es=Qo;Pt.default=es});var Sr=l(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.default=void 0;var Mr=$i(j()),Wi=$i(vr());function $i(t){return t&&t.__esModule?t:{default:t}}var ts=function(e,r,i){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,a=(0,Mr.default)(r,e,n),o=(0,Mr.default)(e,i,n),s=(0,Mr.default)(r,i,n),u=Math.acos((0,Wi.default)((a*a+s*s-o*o)/(2*a*s))),p=Math.acos((0,Wi.default)((o*o+s*s-a*a)/(2*o*s)));return u>Math.PI/2?a:p>Math.PI/2?o:Math.sin(u)*a},rs=ts;Mt.default=rs});var Hi=l(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.default=void 0;var ji=St(R()),Bi=St(L()),V=St(F()),is=St(G());function St(t){return t&&t.__esModule?t:{default:t}}var ns=function(e,r){var i=(0,ji.default)(r),n=(0,Bi.default)(r),a=(0,ji.default)(e),o=(0,Bi.default)(e),s=((0,is.default)(Math.atan2(Math.sin((0,V.default)(n)-(0,V.default)(o))*Math.cos((0,V.default)(i)),Math.cos((0,V.default)(a))*Math.sin((0,V.default)(i))-Math.sin((0,V.default)(a))*Math.cos((0,V.default)(i))*Math.cos((0,V.default)(n)-(0,V.default)(o))))+360)%360;return s},as=ns;Ot.default=as});var zi=l(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.default=void 0;var os=ss(j());function ss(t){return t&&t.__esModule?t:{default:t}}function wt(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?wt=function(r){return typeof r}:wt=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},wt(t)}var us=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:os.default;return e.reduce(function(i,n){return wt(i)==="object"&&i.last!==null&&(i.distance+=r(n,i.last)),i.last=n,i},{last:null,distance:0}).distance},ls=us;At.default=ls});var Zi=l(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.default=void 0;var Gi=wr(R()),Xi=wr(L()),Or=wr(F()),Yi=S();function wr(t){return t&&t.__esModule?t:{default:t}}var fs=function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;i=typeof i<"u"&&!isNaN(i)?i:1;var n=(0,Gi.default)(e),a=(0,Xi.default)(e),o=(0,Gi.default)(r),s=(0,Xi.default)(r),u=6356752314245e-6,p=1/298.257223563,h=(0,Or.default)(s-a),v,m,b,O,y,k,jr=Math.atan((1-p)*Math.tan((0,Or.default)(parseFloat(n)))),Br=Math.atan((1-p)*Math.tan((0,Or.default)(parseFloat(o)))),Oe=Math.sin(jr),we=Math.cos(jr),Ae=Math.sin(Br),J=Math.cos(Br),se=h,Hr,zr=100;do{var jt=Math.sin(se),Bt=Math.cos(se);if(k=Math.sqrt(J*jt*(J*jt)+(we*Ae-Oe*J*Bt)*(we*Ae-Oe*J*Bt)),k===0)return 0;v=Oe*Ae+we*J*Bt,m=Math.atan2(k,v),b=we*J*jt/k,O=1-b*b,y=v-2*Oe*Ae/O,isNaN(y)&&(y=0);var Ht=p/16*O*(4+p*(4-3*O));Hr=se,se=h+(1-Ht)*p*b*(m+Ht*k*(y+Ht*v*(-1+2*y*y)))}while(Math.abs(se-Hr)>1e-12&&--zr>0);if(zr===0)return NaN;var $=O*(Yi.earthRadius*Yi.earthRadius-u*u)/(u*u),Dn=1+$/16384*(4096+$*(-768+$*(320-175*$))),zt=$/1024*(256+$*(-128+$*(74-47*$))),Rn=zt*k*(y+zt/4*(v*(-1+2*y*y)-zt/6*y*(-3+4*k*k)*(-3+4*y*y))),Ln=u*Dn*(m-Rn);return Math.round(Ln/i)*i},cs=fs;Dt.default=cs});var Ji=l(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.default=void 0;var ds=function(e){if(/^(NNE|NE|NNW|N)$/.test(e))return"N";if(/^(ENE|E|ESE|SE)$/.test(e))return"E";if(/^(SSE|S|SSW|SW)$/.test(e))return"S";if(/^(WSW|W|WNW|NW)$/.test(e))return"W"},ms=ds;Rt.default=ms});var Qi=l(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.default=void 0;var ps=gs(j());function gs(t){return t&&t.__esModule?t:{default:t}}var hs=function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ps.default,n=i(e,r),a=Number(r.time)-Number(e.time),o=n/a*1e3;return o},vs=hs;Lt.default=vs});var en=l(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.default=void 0;var Ar=ys(j());function ys(t){return t&&t.__esModule?t:{default:t}}var bs=function(e,r,i){return(0,Ar.default)(r,e)+(0,Ar.default)(e,i)===(0,Ar.default)(r,i)},_s=bs;qt.default=_s});var rn=l(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.default=void 0;var kt=tn(R()),q=tn(L());function tn(t){return t&&t.__esModule?t:{default:t}}var xs=function(e,r){for(var i=!1,n=r.length,a=-1,o=n-1;++a<n;o=a)((0,q.default)(r[a])<=(0,q.default)(e)&&(0,q.default)(e)<(0,q.default)(r[o])||(0,q.default)(r[o])<=(0,q.default)(e)&&(0,q.default)(e)<(0,q.default)(r[a]))&&(0,kt.default)(e)<((0,kt.default)(r[o])-(0,kt.default)(r[a]))*((0,q.default)(e)-(0,q.default)(r[a]))/((0,q.default)(r[o])-(0,q.default)(r[a]))+(0,kt.default)(r[a])&&(i=!i);return i},Ps=xs;Tt.default=Ps});var nn=l(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.default=void 0;var Ms=Ss(Sr());function Ss(t){return t&&t.__esModule?t:{default:t}}var Os=function(e,r,i,n){return(0,Ms.default)(e,r,i)<n},ws=Os;Ct.default=ws});var an=l(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.default=void 0;var As=Ds(j());function Ds(t){return t&&t.__esModule?t:{default:t}}var Rs=function(e,r,i){var n=.01;return(0,As.default)(e,r,n)<i},Ls=Rs;Et.default=Ls});var sn=l(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.default=void 0;function qs(t,e){return Es(t)||Cs(t,e)||Ts(t,e)||ks()}function ks(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ts(t,e){if(t){if(typeof t=="string")return on(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return on(t,e)}}function on(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function Cs(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var r=[],i=!0,n=!1,a=void 0;try{for(var o=t[Symbol.iterator](),s;!(i=(s=o.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(u){n=!0,a=u}finally{try{!i&&o.return!=null&&o.return()}finally{if(n)throw a}}return r}}function Es(t){if(Array.isArray(t))return t}var Is=function(e){if(!e.startsWith("POLYGON"))throw new Error("Invalid wkt.");var r=e.slice(e.indexOf("(")+2,e.indexOf(")")).split(", "),i=r.map(function(n){var a=n.split(" "),o=qs(a,2),s=o[0],u=o[1];return{longitude:parseFloat(s),latitude:parseFloat(u)}});return i},Ns=Is;It.default=Ns});var ln=l(c=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var Fs={computeDestinationPoint:!0,convertArea:!0,convertDistance:!0,convertSpeed:!0,decimalToSexagesimal:!0,findNearest:!0,getAreaOfPolygon:!0,getBounds:!0,getBoundsOfDistance:!0,getCenter:!0,getCenterOfBounds:!0,getCompassDirection:!0,getCoordinateKey:!0,getCoordinateKeys:!0,getDistance:!0,getDistanceFromLine:!0,getGreatCircleBearing:!0,getLatitude:!0,getLongitude:!0,getPathLength:!0,getPreciseDistance:!0,getRhumbLineBearing:!0,getRoughCompassDirection:!0,getSpeed:!0,isDecimal:!0,isPointInLine:!0,isPointInPolygon:!0,isPointNearLine:!0,isPointWithinRadius:!0,isSexagesimal:!0,isValidCoordinate:!0,isValidLatitude:!0,isValidLongitude:!0,orderByDistance:!0,sexagesimalToDecimal:!0,toDecimal:!0,toRad:!0,toDeg:!0,wktToPolygon:!0};Object.defineProperty(c,"computeDestinationPoint",{enumerable:!0,get:function(){return Us.default}});Object.defineProperty(c,"convertArea",{enumerable:!0,get:function(){return Vs.default}});Object.defineProperty(c,"convertDistance",{enumerable:!0,get:function(){return Ks.default}});Object.defineProperty(c,"convertSpeed",{enumerable:!0,get:function(){return Ws.default}});Object.defineProperty(c,"decimalToSexagesimal",{enumerable:!0,get:function(){return $s.default}});Object.defineProperty(c,"findNearest",{enumerable:!0,get:function(){return js.default}});Object.defineProperty(c,"getAreaOfPolygon",{enumerable:!0,get:function(){return Bs.default}});Object.defineProperty(c,"getBounds",{enumerable:!0,get:function(){return Hs.default}});Object.defineProperty(c,"getBoundsOfDistance",{enumerable:!0,get:function(){return zs.default}});Object.defineProperty(c,"getCenter",{enumerable:!0,get:function(){return Gs.default}});Object.defineProperty(c,"getCenterOfBounds",{enumerable:!0,get:function(){return Xs.default}});Object.defineProperty(c,"getCompassDirection",{enumerable:!0,get:function(){return Ys.default}});Object.defineProperty(c,"getCoordinateKey",{enumerable:!0,get:function(){return Zs.default}});Object.defineProperty(c,"getCoordinateKeys",{enumerable:!0,get:function(){return Js.default}});Object.defineProperty(c,"getDistance",{enumerable:!0,get:function(){return Qs.default}});Object.defineProperty(c,"getDistanceFromLine",{enumerable:!0,get:function(){return eu.default}});Object.defineProperty(c,"getGreatCircleBearing",{enumerable:!0,get:function(){return tu.default}});Object.defineProperty(c,"getLatitude",{enumerable:!0,get:function(){return ru.default}});Object.defineProperty(c,"getLongitude",{enumerable:!0,get:function(){return iu.default}});Object.defineProperty(c,"getPathLength",{enumerable:!0,get:function(){return nu.default}});Object.defineProperty(c,"getPreciseDistance",{enumerable:!0,get:function(){return au.default}});Object.defineProperty(c,"getRhumbLineBearing",{enumerable:!0,get:function(){return ou.default}});Object.defineProperty(c,"getRoughCompassDirection",{enumerable:!0,get:function(){return su.default}});Object.defineProperty(c,"getSpeed",{enumerable:!0,get:function(){return uu.default}});Object.defineProperty(c,"isDecimal",{enumerable:!0,get:function(){return lu.default}});Object.defineProperty(c,"isPointInLine",{enumerable:!0,get:function(){return fu.default}});Object.defineProperty(c,"isPointInPolygon",{enumerable:!0,get:function(){return cu.default}});Object.defineProperty(c,"isPointNearLine",{enumerable:!0,get:function(){return du.default}});Object.defineProperty(c,"isPointWithinRadius",{enumerable:!0,get:function(){return mu.default}});Object.defineProperty(c,"isSexagesimal",{enumerable:!0,get:function(){return pu.default}});Object.defineProperty(c,"isValidCoordinate",{enumerable:!0,get:function(){return gu.default}});Object.defineProperty(c,"isValidLatitude",{enumerable:!0,get:function(){return hu.default}});Object.defineProperty(c,"isValidLongitude",{enumerable:!0,get:function(){return vu.default}});Object.defineProperty(c,"orderByDistance",{enumerable:!0,get:function(){return yu.default}});Object.defineProperty(c,"sexagesimalToDecimal",{enumerable:!0,get:function(){return bu.default}});Object.defineProperty(c,"toDecimal",{enumerable:!0,get:function(){return _u.default}});Object.defineProperty(c,"toRad",{enumerable:!0,get:function(){return xu.default}});Object.defineProperty(c,"toDeg",{enumerable:!0,get:function(){return Pu.default}});Object.defineProperty(c,"wktToPolygon",{enumerable:!0,get:function(){return Mu.default}});var Us=d(yi()),Vs=d(bi()),Ks=d(_i()),Ws=d(xi()),$s=d(Si()),js=d(Di()),Bs=d(qi()),Hs=d(xr()),zs=d(Ti()),Gs=d(Ii()),Xs=d(Ni()),Ys=d(Ki()),Zs=d(me()),Js=d($e()),Qs=d(j()),eu=d(Sr()),tu=d(Hi()),ru=d(R()),iu=d(L()),nu=d(zi()),au=d(Zi()),ou=d(Pr()),su=d(Ji()),uu=d(Qi()),lu=d(pe()),fu=d(en()),cu=d(rn()),du=d(nn()),mu=d(an()),pu=d(ge()),gu=d(dr()),hu=d(ur()),vu=d(fr()),yu=d(yr()),bu=d(he()),_u=d(Ge()),xu=d(F()),Pu=d(G()),Mu=d(sn()),un=S();Object.keys(un).forEach(function(t){t==="default"||t==="__esModule"||Object.prototype.hasOwnProperty.call(Fs,t)||Object.defineProperty(c,t,{enumerable:!0,get:function(){return un[t]}})});function d(t){return t&&t.__esModule?t:{default:t}}});var fn=l(qr=>{"use strict";qr.__esModule=!0;function Rr(t,e){return t*t+e*e}function Su(t,e){return Rr(t[0]-e[0],t[1]-e[1])}function Ou(t,e,r){var i=e[0],n=e[1],a=r[0]-i,o=r[1]-n;if(a!==0||o!==0){var s=((t[0]-i)*a+(t[1]-n)*o)/Rr(a,o);s>1?(i=r[0],n=r[1]):s>0&&(i+=a*s,n+=o*s)}return Rr(t[0]-i,t[1]-n)}function wu(t,e){for(var r=t[0],i,n=[r],a=1,o=t.length;a<o;a++)i=t[a],Su(i,r)>e&&(n.push(i),r=i);return r!==i&&n.push(i),n}function Lr(t,e,r,i,n){for(var a=i,o,s=e+1;s<r;s++){var u=Ou(t[s],t[e],t[r]);u>a&&(o=s,a=u)}a>i&&(o-e>1&&Lr(t,e,o,i,n),n.push(t[o]),r-o>1&&Lr(t,o,r,i,n))}function Au(t,e){var r=t.length-1,i=[t[0]];return Lr(t,0,r,e,i),i.push(t[r]),i}function Du(t,e,r){if(e===void 0&&(e=1),r===void 0&&(r=!1),t.length<=2)return t;var i=e*e;return t=r?t:wu(t,i),t=Au(t,i),t}qr.SimplifyAP=Du});var cn=l(Cr=>{"use strict";Cr.__esModule=!0;function kr(t,e){return t*t+e*e}function Ru(t,e){return kr(t.longitude-e.longitude,t.latitude-e.latitude)}function Lu(t,e,r){var i=e.longitude,n=e.latitude,a=r.longitude-i,o=r.latitude-n;if(a!==0||o!==0){var s=((t.longitude-i)*a+(t.latitude-n)*o)/kr(a,o);s>1?(i=r.longitude,n=r.latitude):s>0&&(i+=a*s,n+=o*s)}return kr(t.longitude-i,t.latitude-n)}function qu(t,e){for(var r=t[0],i,n=[r],a=1,o=t.length;a<o;a++)i=t[a],Ru(i,r)>e&&(n.push(i),r=i);return r!==i&&n.push(i),n}function Tr(t,e,r,i,n){for(var a=i,o,s=e+1;s<r;s++){var u=Lu(t[s],t[e],t[r]);u>a&&(o=s,a=u)}a>i&&(o-e>1&&Tr(t,e,o,i,n),n.push(t[o]),r-o>1&&Tr(t,o,r,i,n))}function ku(t,e){var r=t.length-1,i=[t[0]];return Tr(t,0,r,e,i),i.push(t[r]),i}function Tu(t,e,r){if(e===void 0&&(e=1),r===void 0&&(r=!1),t.length<=2)return t;var i=e*e;return t=r?t:qu(t,i),t=ku(t,i),t}Cr.SimplifyLL=Tu});var dn=l(Nr=>{"use strict";Nr.__esModule=!0;function Er(t,e){return t*t+e*e}function Cu(t,e){return Er(t.x-e.x,t.y-e.y)}function Eu(t,e,r){var i=e.x,n=e.y,a=r.x-i,o=r.y-n;if(a!==0||o!==0){var s=((t.x-i)*a+(t.y-n)*o)/Er(a,o);s>1?(i=r.x,n=r.y):s>0&&(i+=a*s,n+=o*s)}return Er(t.x-i,t.y-n)}function Iu(t,e){for(var r=t[0],i,n=[r],a=1,o=t.length;a<o;a++)i=t[a],Cu(i,r)>e&&(n.push(i),r=i);return r!==i&&n.push(i),n}function Ir(t,e,r,i,n){for(var a=i,o,s=e+1;s<r;s++){var u=Eu(t[s],t[e],t[r]);u>a&&(o=s,a=u)}a>i&&(o-e>1&&Ir(t,e,o,i,n),n.push(t[o]),r-o>1&&Ir(t,o,r,i,n))}function Nu(t,e){var r=t.length-1,i=[t[0]];return Ir(t,0,r,e,i),i.push(t[r]),i}function Fu(t,e,r){if(e===void 0&&(e=1),r===void 0&&(r=!1),t.length<=2)return t;var i=e*e;return t=r?t:Iu(t,i),t=Nu(t,i),t}Nr.Simplify=Fu});var mn=l(be=>{"use strict";be.__esModule=!0;var Uu=fn();be.SimplifyAP=Uu.SimplifyAP;var Vu=cn();be.SimplifyLL=Vu.SimplifyLL;var Ku=dn();be.Simplify=Ku.Simplify});function D(t){return typeof t=="function"}function De(t){let r=t(i=>{Error.call(i),i.stack=new Error().stack});return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Re=De(t=>function(r){t(this),this.message=r?`${r.length} errors occurred during unsubscription:
|
|
4
|
-
${r.map((i,n)=>`${n+1}) ${i.toString()}`).join(`
|
|
5
|
-
`)}`:"",this.name="UnsubscriptionError",this.errors=r});function ue(t,e){if(t){let r=t.indexOf(e);0<=r&&t.splice(r,1)}}var I=class t{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:r}=this;if(r)if(this._parentage=null,Array.isArray(r))for(let a of r)a.remove(this);else r.remove(this);let{initialTeardown:i}=this;if(D(i))try{i()}catch(a){e=a instanceof Re?a.errors:[a]}let{_finalizers:n}=this;if(n){this._finalizers=null;for(let a of n)try{Yr(a)}catch(o){e=e??[],o instanceof Re?e=[...e,...o.errors]:e.push(o)}}if(e)throw new Re(e)}}add(e){var r;if(e&&e!==this)if(this.closed)Yr(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(e)}}_hasParent(e){let{_parentage:r}=this;return r===e||Array.isArray(r)&&r.includes(e)}_addParent(e){let{_parentage:r}=this;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e}_removeParent(e){let{_parentage:r}=this;r===e?this._parentage=null:Array.isArray(r)&&ue(r,e)}remove(e){let{_finalizers:r}=this;r&&ue(r,e),e instanceof t&&e._removeParent(this)}};I.EMPTY=(()=>{let t=new I;return t.closed=!0,t})();var Gt=I.EMPTY;function Le(t){return t instanceof I||t&&"closed"in t&&D(t.remove)&&D(t.add)&&D(t.unsubscribe)}function Yr(t){D(t)?t():t.unsubscribe()}var T={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Q={setTimeout(t,e,...r){let{delegate:i}=Q;return i?.setTimeout?i.setTimeout(t,e,...r):setTimeout(t,e,...r)},clearTimeout(t){let{delegate:e}=Q;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function Zr(t){Q.setTimeout(()=>{let{onUnhandledError:e}=T;if(e)e(t);else throw t})}function Xt(){}var Jr=Yt("C",void 0,void 0);function Qr(t){return Yt("E",void 0,t)}function ei(t){return Yt("N",t,void 0)}function Yt(t,e,r){return{kind:t,value:e,error:r}}var B=null;function ee(t){if(T.useDeprecatedSynchronousErrorHandling){let e=!B;if(e&&(B={errorThrown:!1,error:null}),t(),e){let{errorThrown:r,error:i}=B;if(B=null,r)throw i}}else t()}function ti(t){T.useDeprecatedSynchronousErrorHandling&&B&&(B.errorThrown=!0,B.error=t)}var le=class extends I{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Le(e)&&e.add(this)):this.destination=Un}static create(e,r,i){return new te(e,r,i)}next(e){this.isStopped?Jt(ei(e),this):this._next(e)}error(e){this.isStopped?Jt(Qr(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?Jt(Jr,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},Nn=Function.prototype.bind;function Zt(t,e){return Nn.call(t,e)}var Qt=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:r}=this;if(r.next)try{r.next(e)}catch(i){qe(i)}}error(e){let{partialObserver:r}=this;if(r.error)try{r.error(e)}catch(i){qe(i)}else qe(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(r){qe(r)}}},te=class extends le{constructor(e,r,i){super();let n;if(D(e)||!e)n={next:e??void 0,error:r??void 0,complete:i??void 0};else{let a;this&&T.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=()=>this.unsubscribe(),n={next:e.next&&Zt(e.next,a),error:e.error&&Zt(e.error,a),complete:e.complete&&Zt(e.complete,a)}):n=e}this.destination=new Qt(n)}};function qe(t){T.useDeprecatedSynchronousErrorHandling?ti(t):Zr(t)}function Fn(t){throw t}function Jt(t,e){let{onStoppedNotification:r}=T;r&&Q.setTimeout(()=>r(t,e))}var Un={closed:!0,next:Xt,error:Fn,complete:Xt};var ri=typeof Symbol=="function"&&Symbol.observable||"@@observable";function ii(t){return t}function ni(t){return t.length===0?ii:t.length===1?t[0]:function(r){return t.reduce((i,n)=>n(i),r)}}var H=class t{constructor(e){e&&(this._subscribe=e)}lift(e){let r=new t;return r.source=this,r.operator=e,r}subscribe(e,r,i){let n=Kn(e)?e:new te(e,r,i);return ee(()=>{let{operator:a,source:o}=this;n.add(a?a.call(n,o):o?this._subscribe(n):this._trySubscribe(n))}),n}_trySubscribe(e){try{return this._subscribe(e)}catch(r){e.error(r)}}forEach(e,r){return r=ai(r),new r((i,n)=>{let a=new te({next:o=>{try{e(o)}catch(s){n(s),a.unsubscribe()}},error:n,complete:i});this.subscribe(a)})}_subscribe(e){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(e)}[ri](){return this}pipe(...e){return ni(e)(this)}toPromise(e){return e=ai(e),new e((r,i)=>{let n;this.subscribe(a=>n=a,a=>i(a),()=>r(n))})}};H.create=t=>new H(t);function ai(t){var e;return(e=t??T.Promise)!==null&&e!==void 0?e:Promise}function Vn(t){return t&&D(t.next)&&D(t.error)&&D(t.complete)}function Kn(t){return t&&t instanceof le||Vn(t)&&Le(t)}var oi=De(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var N=class extends H{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let r=new ke(this,this);return r.operator=e,r}_throwIfClosed(){if(this.closed)throw new oi}next(e){ee(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(e)}})}error(e){ee(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;let{observers:r}=this;for(;r.length;)r.shift().error(e)}})}complete(){ee(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){let{hasError:r,isStopped:i,observers:n}=this;return r||i?Gt:(this.currentObservers=null,n.push(e),new I(()=>{this.currentObservers=null,ue(n,e)}))}_checkFinalizedStatuses(e){let{hasError:r,thrownError:i,isStopped:n}=this;r?e.error(i):n&&e.complete()}asObservable(){let e=new H;return e.source=this,e}};N.create=(t,e)=>new ke(t,e);var ke=class extends N{constructor(e,r){super(),this.destination=e,this.source=r}next(e){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,e)}error(e){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,e)}complete(){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||r===void 0||r.call(e)}_subscribe(e){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(e))!==null&&i!==void 0?i:Gt}};var M=[];for(let t=0;t<256;++t)M.push((t+256).toString(16).slice(1));function si(t,e=0){return(M[t[e+0]]+M[t[e+1]]+M[t[e+2]]+M[t[e+3]]+"-"+M[t[e+4]]+M[t[e+5]]+"-"+M[t[e+6]]+M[t[e+7]]+"-"+M[t[e+8]]+M[t[e+9]]+"-"+M[t[e+10]]+M[t[e+11]]+M[t[e+12]]+M[t[e+13]]+M[t[e+14]]+M[t[e+15]]).toLowerCase()}var er,Wn=new Uint8Array(16);function tr(){if(!er){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");er=crypto.getRandomValues.bind(crypto)}return er(Wn)}var $n=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),rr={randomUUID:$n};function jn(t,e,r){if(rr.randomUUID&&!e&&!t)return rr.randomUUID();t=t||{};let i=t.random??t.rng?.()??tr();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){if(r=r||0,r<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let n=0;n<16;++n)e[r+n]=i[n];return e}return si(i)}var ir=jn;var Te=class{_connect;_close;_error;_message;ws;_filter="";_wsTimeout=2e4;_token="";_playbackMode=!1;onConnect;onClose;onError;onMessage;version=1;endpoint="";selfId="";_source=null;set source(e){this._source||(this._source={}),this._source.label=e}set authToken(e){this._token=e}get connectionTimeout(){return this._wsTimeout}set connectionTimeout(e){this._wsTimeout=e<3e3?3e3:e>6e4?6e4:e}get isOpen(){return!!(this.ws&&this.ws.readyState!=1&&this.ws.readyState!=3)}get filter(){return this._filter}set filter(e){e&&e.indexOf("self")!=-1?this._filter=this.selfId?this.selfId:"":this._filter=e}get playbackMode(){return this._playbackMode}constructor(){this._connect=new N,this.onConnect=this._connect.asObservable(),this._close=new N,this.onClose=this._close.asObservable(),this._error=new N,this.onError=this._error.asObservable(),this._message=new N,this.onMessage=this._message.asObservable()}close(){this.ws&&(this.ws.close(),this.ws=null)}open(e,r,i){if(e=e||this.endpoint,!e)return;let n=e.indexOf("?")==-1?"?":"&";r&&(e+=`${n}subscribe=${r}`),(this._token||i)&&(e+=`${r?"&":"?"}token=${this._token||i}`),this.close(),this.ws=new WebSocket(e),setTimeout(()=>{this.ws&&this.ws.readyState!=1&&this.ws.readyState!=3&&(console.warn(`Connection watchdog expired (${this._wsTimeout/1e3} sec): ${this.ws.readyState}... aborting connection...`),this.close())},this._wsTimeout),this.ws.onopen=a=>{this._connect.next(a)},this.ws.onclose=a=>{this._close.next(a)},this.ws.onerror=a=>{this._error.next(a)},this.ws.onmessage=a=>{this.parseOnMessage(a)}}parseOnMessage(e){let r;if(typeof e.data=="string")try{r=JSON.parse(e.data)}catch{return}this.isHello(r)?(this.selfId=r.self,this._playbackMode=typeof r.startTime<"u",this._message.next(r)):this.isResponse(r)?(typeof r.login<"u"&&typeof r.login.token<"u"&&(this._token=r.login.token),this._message.next(r)):this._filter&&this.isDelta(r)?r.context==this._filter&&this._message.next(r):this._message.next(r)}sendRequest(e){if(typeof e!="object")return"";let r=re.request();return typeof e.login>"u"&&this._token&&(r.token=this._token),Object.keys(e).forEach(n=>{r[n]=e[n]}),this.send(r),r.requestId}put(e,r,i){let n={context:e=="self"?"vessels.self":e,put:{path:r,value:i}};return this.sendRequest(n)}login(e,r){let i={login:{username:e,password:r}};return this.sendRequest(i)}send(e){this.ws&&(typeof e=="object"&&(e=JSON.stringify(e)),this.ws.send(e))}sendUpdate(e="self",r,i){let n=re.updates();this._token&&(n.token=this._token),n.context=e=="self"?"vessels.self":e,this._token&&(n.token=this._token);let a=[];typeof r=="string"&&a.push({path:r,value:i}),typeof r=="object"&&Array.isArray(r)&&(a=r);let o={timestamp:new Date().toISOString(),values:a};this._source&&(o.source=this._source),n.updates.push(o),this.send(n)}subscribe(e="*",r="*",i){let n=re.subscribe();if(this._token&&(n.token=this._token),n.context=e=="self"?"vessels.self":e,this._token&&(n.token=this._token),typeof r=="object"&&Array.isArray(r)&&(n.subscribe=r),typeof r=="string"){let a={};a.path=r,i&&typeof i=="object"&&(i.period&&(a.period=i.period),i.minPeriod&&(a.minPeriod=i.period),i.format&&(i.format=="delta"||i.format=="full")&&(a.format=i.format),i.policy&&(i.policy=="instant"||i.policy=="ideal"||i.policy=="fixed")&&(a.policy=i.policy)),n.subscribe.push(a)}this.send(n)}unsubscribe(e="*",r="*"){let i=re.unsubscribe();this._token&&(i.token=this._token),i.context=e=="self"?"vessels.self":e,this._token&&(i.token=this._token),typeof r=="object"&&Array.isArray(r)&&(i.unsubscribe=r),typeof r=="string"&&i.unsubscribe.push({path:r}),this.send(i)}raiseAlarm(e="*",r,i){let n;typeof r=="string"?n=r.indexOf("notifications.")==-1?`notifications.${r}`:r:n=r,this.put(e,n,i.value)}clearAlarm(e="*",r){let i=r.indexOf("notifications.")==-1?`notifications.${r}`:r;this.put(e,i,null)}isSelf(e){return e.context==this.selfId}isDelta(e){return typeof e.context<"u"}isHello(e){return typeof e.version<"u"&&typeof e.self<"u"}isResponse(e){return typeof e.requestId<"u"}},re=class{static updates(){return{context:null,updates:[]}}static subscribe(){return{context:null,subscribe:[]}}static unsubscribe(){return{context:null,unsubscribe:[]}}static request(){return{requestId:ir()}}},Ce=class{_state;_method=[];_message="";constructor(e,r,i,n){this._message=typeof e<"u"?e:"",this._state=typeof r<"u"?r:"alarm",i&&this._method.push("visual"),n&&this._method.push("sound")}get value(){return{message:this._message,state:this._state,method:this._method}}};var ie=class{id;name;mmsi;position=[0,0];positionReceived=!1;positionTimestamp="";state;type={id:-1,name:""};properties={};lastUpdated=new Date;callsignVhf;callsignHf;orientation=0;virtual},fe=class extends ie{anchor={maxRadius:null,radius:null,position:null};autopilot={state:null,mode:null,target:null,enabled:!1,default:null,availableActions:[]};buddy=!1;closestApproach={distance:null,timeTo:null};cog;cogTrue=null;cogMagnetic=null;courseApi={arrivalCircle:0,activeRoute:{},nextPoint:{},previousPoint:{}};courseCalcs={};distanceToSelf;environment={mode:null,sun:null};heading;headingTrue=null;headingMagnetic=null;performance={beatAngle:null,gybeAngle:null};racing;radars={};registrations={};resourceUpdates=[];sog;track=[];vectors={cog:[]};wind={direction:null,mwd:null,twd:null,tws:null,speedTrue:null,sog:null,awa:null,aws:null};design={airHeight:null,beam:null,draft:{current:null,maximum:null},length:null};destination={name:null,eta:null};flag;port},Ee=class extends ie{constructor(){super()}},Ie=class extends ie{sog=0;track=[];constructor(){super()}},ce=class extends ie{constructor(){super()}},Ne=class extends ce{twd;tws;temperature;constructor(){super()}};var nr={K:{C:t=>t-273.15,F:t=>(t-273.15)*9/5+32},rad:{degree:t=>t*180/Math.PI},deg:{radian:t=>t*.0174532925199433},ratio:{percent:t=>t*100},"m/s":{kn:t=>t*1.94384,"km/h":t=>t*3.6,mph:t=>t*2.2369362920544025,Bf:t=>t/.836^.6666666666666666,fps:t=>t*3.280839895013124},"rad/s":{"deg/s":t=>t*57.2958,rpm:t=>t*9.549296585513723},Hz:{rpm:t=>t*60},m:{fathom:t=>t*.5467468562055768,league:t=>t*.0002071251035625518,kilometer:t=>t*.001,mile:t=>t*.000621371192237334,"naut-mile":t=>t*.0005399568034557236,foot:t=>t*3.280839895013124,yard:t=>t*1.0936132983377078},s:{hour:t=>t*.0002777777777777778,minute:t=>t*.016666666666666666,day:t=>t*11574074074074073e-21,year:t=>t*3168876461541279e-23},foot:{m:t=>t/3.280839895013124}},de={degree:{symbol:"\xBA",name:"Degrees"},radian:{symbol:"rad",name:"Radians"},percent:{symbol:"%",name:"Percent"},kilometer:{symbol:"km",name:"Kilometer"},"naut-mile":{symbol:"nmi",name:"Nautical Mile"},foot:{symbol:"ft",name:"Feet"},yard:{symbol:"yd",name:"Yard"},fathom:{symbol:"fm",name:"Fathom"},hour:{symbol:"hr",name:"Hour"},minute:{symbol:"min",name:"Minute"},F:{symbol:"\xBAF",name:"Fahrenheit"},C:{symbol:"\xBAC",name:"Celcius"}},z=class{static transform(e,r,i){if(!Number.isFinite(e))return null;if(r===i)return e;try{return nr[r][i](e)}catch{throw new Error("Transformation not found!")}}static setSymbol(e,r){e in de&&(de[e].symbol=r??de[e].symbol)}static getSymbol(e){return e in de?de[e].symbol:e}static degreesToRadians(e){return nr.deg.radian(e)}static radiansToDegrees(e=0){return nr.rad.degree(e)}static nauticalMilesToKm(e=0){return e*1.852}static angleToDirection(e,r){let i=Math.PI*2;if(r||(r=0),e||(e=0),!Number.isFinite(r)||!Number.isFinite(e))return null;let n=r+e;return n>i?n-i:n<0?i+n:n}static directionToAngle(e,r){let i=Math.PI*2;if(r||(r=0),e||(e=0),!Number.isFinite(r)||!Number.isFinite(e))return null;let n=r-e,a;if(n>0)a=n>Math.PI?i-n:0-n;else if(n<0){let o=Math.abs(n);a=o>Math.PI?o-i:o}else a=n;return a}};var A=Xr(ln()),U=class t{static R=6371e3;static rhumbDestination(e,r,i){let n=t.R,a=i/n,o=e[1]*Math.PI/180,s=e[0]*Math.PI/180,u=r,p=a*Math.cos(u),h=o+p,v=a,m=89*Math.PI/180;h>m&&o<m?(v=a*(m-o)/p,h=m):h<-m&&o>-m&&(v=a*(-m-o)/p,h=-m);let b=Math.log(Math.tan(Math.PI/4+h/2)/Math.tan(Math.PI/4+o/2)),O=Math.abs(b)>1e-12?(h-o)/b:Math.cos(o),y=v*Math.sin(u)/O;return[(s+y)*180/Math.PI,h*180/Math.PI]}static destCoordinate(e,r,i){let n=(0,A.computeDestinationPoint)(e,i,z.radiansToDegrees(r));return[n.longitude,n.latitude]}static distanceTo(e,r){return(0,A.getDistance)(e,r)}static routeLength(e){return(0,A.getPathLength)(e)}static routeLegs(e,r){if(e.length<2)return[];let i=[];r?i.push({bearing:(0,A.getGreatCircleBearing)(r,e[0]),distance:t.distanceTo(r,e[0])}):i.push({bearing:0,distance:0});for(let n=1;n<e.length;++n){let a={bearing:(0,A.getGreatCircleBearing)(e[n-1],e[n]),distance:t.distanceTo(e[n-1],e[n])};i.push(a)}return i}static closestForwardPoint(e,r,i){if(e.length<2||!r)return-1;let n={index:-1,distance:-1};for(let a=0;a<e.length;++a){let o=(0,A.getGreatCircleBearing)(r,e[a]),s=Dr.difference(i,o);if(s>-90&&s<90){let u=t.distanceTo(r,e[a]);(n.distance===-1||u<n.distance)&&(n.distance=u,n.index=a)}}return n.index}static centreOfPolygon(e){let r=(0,A.getCenter)(e);return[r.longitude,r.latitude]}static inDLCrossingZone(e,r=170){return Math.abs(e[0])>=r}static inBounds(e,r){return(0,A.isPointInPolygon)(e,[[r[0],r[1]],[r[0],r[3]],[r[2],r[3]],[r[2],r[1]],[r[0],r[1]]])}static calcMapifiedExtent(e,r){let n=111111*Math.cos(z.degreesToRadians(e[1])),a=[0,0,0,0];return a[1]=e[1]+(0-Math.abs(r))/111111,a[3]=e[1]+Math.abs(r)/111111,a[0]=e[0]+(0-Math.abs(r))/n,a[2]=e[0]+Math.abs(r)/n,a}static normaliseCoords(e){if(!Array.isArray(e))return[0,0];if(typeof e[0]=="number"){if(e[0]>180)for(;e[0]>180;)e[0]=e[0]-360;else if(e[0]<-180)for(;e[0]<-180;)e[0]=360+e[0];return e}else if(Array.isArray(e[0]))return e.forEach(r=>r=this.normaliseCoords(r)),e}},Dr=class t{static difference(e,r){let i=360-r,n=e+i,a=t.normalise(n);return a<180?0-a:360-a}static add(e,r){return t.normalise(e+r)}static normalise(e){return e<0?e+360:e>=360?e-360:e}};var Nt=class{action="notification";playback=!1;result=null;self=null;timestamp=new Date().toISOString();sourceRef},X=class{action;playback=!1;result=null;timestamp;self=null;watchDogAlarm;constructor(){this.action="update"}},Ft=class extends X{constructor(){super(),this.action="resource"}},Ut=class extends X{constructor(){super(),this.action="radar"}},Vt=class extends X{constructor(){super(),this.action="trail"}};var vn=Xr(mn());var Wu=["environment.wind.speedTrue","environment.wind.speedOverGround","environment.wind.angleTrueGround","environment.wind.angleTrueWater","environment.wind.directionTrue","environment.wind.directionMagnetic","navigation.courseOverGroundTrue","navigation.courseOverGroundMagnetic","navigation.headingTrue","navigation.headingMagnetic"],_={active:!1,maxMsgIntervals:18,intervalCount:0,msgCount:0,alarm:!1},f,P,yn,Me=[],$t=[],Fr=!1,Wr,Ur=!1,x={signalk:{},aisState:[]},bn=[0,0,0,0],_n=60,_e=0,w,Y={},Z=500,E=!1,xn,K={maxAge:54e4,staleAge:36e4,lastTick:new Date().valueOf(),maxTrack:20},Vr={selfLines:{cog:{length:10}},aisCogLine:10},xe={trailDuration:24,trailResolution:{lastHour:"5s",next23:"10s",beyond24:"1m"}},W,Pn,oe="freeboard-sk";function $u(){f={self:new fe,aisTargets:new Map,aisStatus:{updated:[],stale:[],expired:[]},paths:{},atons:new Map,aircraft:new Map,sar:new Map,meteo:new Map},f.self.positionReceived=!1,Mn()}function Mn(){w={updated:{},stale:{},expired:{}}}function Kt({action:t,msg:e}){switch(t){case"onConnect":postMessage({action:"open",playback:E,result:e.target.readyState}),_.msgCount=0,_.intervalCount=0,_.alarm=!1,_.active=!0;break;case"onClose":Sn(!1),_.active=!1;break;case"onError":postMessage({action:"error",playback:E,result:"Connection error!"}),_.msgCount=0,_.intervalCount=0,_.active=!1;break;case"onMessage":_.msgCount++,Gu(e);break}}addEventListener("message",({data:t})=>{ju(t)});function ju(t){if(t.cmd)switch(t.cmd){case"open":pn(t.options),Hu(t.options);break;case"close":Sn(!0);break;case"subscribe":P.subscribe(t.options.context,t.options.path);break;case"settings":pn(t.options);break;case"alarm":zu(t.options);break;case"vessel":if(t.options){let e;t.options.context==="self"?e=f.self:e=f.aisTargets.get(t.options.context),e&&t.options.name&&(e.name=t.options.name)}break;case"auth":t.options&&typeof t.options.token<"u"&&(yn=t.options.token);break;case"trail":t.options&&(xe.trailDuration=t.options.trailDuration??24,t.options.trailResolution&&(xe.trailResolution.lastHour=t.options.trailResolution.lastHour??"5s",xe.trailResolution.next23=t.options.trailResolution.next23??"1m",xe.trailResolution.beyond24=t.options.trailResolution.beyond24??"5m")),Bu(xe);break}}function pn(t={config:{}}){t.interval&&typeof t.interval=="number"&&(Z=t.interval,An(),wn(),_n=1/(Z/1e3)*60),E=!!t.playback,t.config&&(typeof t.config.units.preferredPaths<"u"&&(Y=t.config.units.preferredPaths),t.config.vessels.aisMaxAge&&typeof t.config.vessels.aisMaxAge=="number"&&(K.maxAge=t.config.vessels.aisMaxAge),t.config.vessels.aisStaleAge&&typeof t.config.vessels.aisStaleAge=="number"&&(K.staleAge=t.config.vessels.aisStaleAge),typeof t.config.signalk.maxRadius=="number"&&(x.signalk=t.config.signalk),typeof t.config.selections.aisState<"u"&&Array.isArray(t.config.selections.aisState)&&(x.aisState=t.config.selections.aisState),Vr=t.config.vessels)}function Sn(t=!1){An(),Me.forEach(e=>e.unsubscribe()),P&&t&&P.close(),P=null,postMessage({action:"close",result:t,playback:E})}var Wt=!1;function Se(t){if(!Wt)return new Promise((e,r)=>{Wt=!0,fetch(`${t}`).then(i=>{Wt=!1,i.json().then(n=>e(n)).catch(n=>r(n))}).catch(i=>{Wt=!1,r(i)})})}function On(){let t=x&&x.signalk&&x.signalk.maxRadius?`?radius=${x.signalk.maxRadius}`:"?radius=10000";Se(Wr+"/tracks"+t).then(e=>{Ur=!0,Object.entries(e).forEach(r=>{if(f.aisTargets.has(r[0])){let i=f.aisTargets.get(r[0]);i.track=r[1].coordinates,$r(i)}})}).catch(()=>{Ur=!1})}function Bu(t){let e=Wr+"/self/track?",r=[],i=5e-4,n=!0;t.trailDuration>24&&(r.push(Se(`${e}timespan=${t.trailDuration-24}h&resolution=${t.trailResolution.beyond24}×panOffset=24`)),r.push(Se(`${e}timespan=23h&resolution=${t.trailResolution.next23}×panOffset=1`))),t.trailDuration>1&&t.trailDuration<25&&r.push(Se(`${e}timespan=${t.trailDuration-1}h&resolution=${t.trailResolution.next23}×panOffset=1`)),r.push(Se(`${e}timespan=1h&resolution=${t.trailResolution.lastHour}`));let a=[],o=new Vt;o.playback=E,Promise.all(r).then(s=>{let u=0,p=r.length-1,h=60;s.forEach(v=>{if(v.type&&v.type==="MultiLineString"&&v.coordinates&&Array.isArray(v.coordinates))if(u!==p){let m=[];for(v.coordinates.forEach(b=>{m=m.concat(b)}),m=(0,vn.SimplifyAP)(m,i,n);m.length>h;){let b=m.slice(0,h);a.push(b),m=m.slice(h-1),m[0]=[m[0][0]+5e-9,m[0][1]+5e-9]}m.length!==0&&a.push(m)}else a=a.concat(v.coordinates);u++}),o.result=a,postMessage(o)}).catch(()=>{o.result=null,postMessage(o)})}function Hu(t){if(P)return;if(!t.url){postMessage({action:"error",result:"Valid options not provided!"});return}let e=t.url.split("/");if(e.pop(),e.push("api"),e[0]=e[0]==="wss:"?"https:":"http:",Wr=e.join("/"),$u(),P=new Te,Me.push(P.onConnect.subscribe(r=>Kt({action:"onConnect",msg:r}))),Me.push(P.onClose.subscribe(r=>Kt({action:"onClose",msg:r}))),Me.push(P.onError.subscribe(r=>Kt({action:"onError",msg:r}))),Me.push(P.onMessage.subscribe(r=>Kt({action:"onMessage",msg:r}))),P.authToken=yn,t.playback){let r=t.playbackOptions.startTime?`?startTime=${t.playbackOptions.startTime}`:null,i=t.playbackOptions.playbackRate?`playbackRate=${t.playbackOptions.playbackRate}`:null;i=i?r?"&"+i:"?"+i:null;let n=`${t.url}${r||""}${i||""}`;P.open(n,t.playbackOptions.subscribe,t.token)}else P.open(t.url,t.subscribe,t.token),On()}function zu(t){let e=t.type.indexOf("notifications.")===-1?`notifications.${t.type}`:t.type;t.raise?P.raiseAlarm("self",e,new Ce(t.message,t.state,!0,!0)):P.clearAlarm("self",e)}function Gu(t){P.isHello(t)?(postMessage({action:"hello",result:t,self:t.self,playback:E}),Z&&wn()):P.isDelta(t)?(Fr=!0,t.updates.forEach(e=>{e.values&&(W=e.$source,Pn=e.timestamp,e.values.forEach(r=>{if(xn=e.timestamp,!!t.context)switch(t.context.split(".")[0]){case"shore":case"atons":x?.signalk.atons&&Qu(t.context,r),Pe(t.context,f.atons,x?.signalk.atons);break;case"sar":x?.signalk.sar&&el(t.context,r),Pe(t.context,f.sar,x?.signalk.sar);break;case"aircraft":x?.signalk.aircraft&&rl(t.context,r),Pe(t.context,f.aircraft,x?.signalk.aircraft);break;case"meteo":x?.signalk.meteo&&(tl(t.context,r),hn(r)),Pe(t.context,f.meteo,x?.signalk.meteo);break;case"vessels":if(P.isSelf(t))f.self.id||(f.self.id=t.context),gn(f.self,r,!0),hn(r);else{if(x?.signalk.vessels){let i=Xu(t.context);gn(i,r)}Pe(t.context,f.aisTargets,x?.signalk.vessels,x?.aisState)}break}}))}),Kr()):P.isResponse(t)&&postMessage({action:"response",result:t})}function Pe(t,e,r=!0,i=[]){if(r){let n=e.get(t);n&&i.includes(n?.state)&&(w.expired[t]=!0,n=null),n&&x.signalk.maxRadius?n.positionReceived&&U.inBounds(n.position,bn)?w.updated[t]=!0:(e.delete(t),w.expired[t]=!0):w.updated[t]=!0}else e.size!==0&&(e.forEach((n,a)=>{w.expired[a]=!0}),e.clear())}function Kr(t=!1){if(!Z||t){let e=new X;e.watchDogAlarm=_.alarm,e.playback=E,f.aisStatus.updated=Object.keys(w.updated),f.aisStatus.stale=Object.keys(w.stale),f.aisStatus.expired=Object.keys(w.expired),e.result=f,e.timestamp=E?xn:f.self.lastUpdated.toISOString(),postMessage(e),Mn(),f.self.resourceUpdates=[],Ju(),_e===0&&f.self.positionReceived&&x?.signalk.maxRadius&&(bn=U.calcMapifiedExtent(f.self.position,x.signalk.maxRadius),_e++),_e=_e>=_n?0:_e+1}}function wn(){Z&&typeof Z=="number"&&$t.push(setInterval(()=>{_.active&&!_.msgCount?(_.intervalCount=_.intervalCount+1,_.intervalCount>=_.maxMsgIntervals&&(_.intervalCount=0,_.alarm=!0,Kr(!0))):(_.intervalCount=0,_.msgCount=0,_.alarm=!1),Fr&&(Kr(!0),Fr=!1)},Z)),$t.push(setInterval(()=>{Ur&&On()},6e4))}function An(){$t.forEach(t=>clearInterval(t)),$t=[]}function Xu(t){if(!f.aisTargets.has(t)){let e=new fe;e.id=t,e.position=null,f.aisTargets.set(t,e)}return f.aisTargets.get(t)}function gn(t,e,r=!1){if(r){if(t.lastUpdated=new Date,e.path.startsWith("resources."))t.resourceUpdates.push(e),Zu(e);else if(e.path.startsWith("radars"))Yu(e);else if(e.path.startsWith("navigation.racing"))t.properties[e.path]=e.value;else if(e.path==="performance.beatAngle")t.performance.beatAngle=e.value;else if(e.path==="performance.gybeAngle")t.performance.gybeAngle=e.value;else if(e.path.startsWith("navigation.course."))if(e.path.startsWith("navigation.course.calcValues.")){let a=e.path.split(".").slice(3).join(".");t.courseCalcs[a]=e.value}else e.path.includes("activeRoute")?t.courseApi.activeRoute=e.value:e.path.includes("nextPoint")?t.courseApi.nextPoint=e.value:e.path.includes("previousPoint")?t.courseApi.previousPoint=e.value:e.path.includes("arrivalCircle")&&(t.courseApi.arrivalCircle=e.value);else if(e.path.startsWith("radars.")){let a=e.path.split("."),o=a.slice(2).join(".");t.radars[a[1]]||(t.radars[a[1]]={}),t.radars[a[1]][o]=e.value}let n=e.path.indexOf("course")!==-1?e.path.split(".").slice(0,2).join("."):e.path;Wu.indexOf(n)!==-1&&(f.paths[n]=null)}else e.path==="navigation.distanceToSelf"&&(t.distanceToSelf=e.value),e.path==="navigation.closestApproach"&&(t.closestApproach=e.value);if(e.path==="")typeof e.value.name<"u"&&(t.name=e.value.name),typeof e.value.mmsi<"u"&&(t.mmsi=e.value.mmsi,t.lastUpdated=new Date),typeof e.value.registrations<"u"&&(t.registrations=e.value.registrations),typeof e.value.buddy<"u"&&(t.buddy=e.value.buddy),typeof e.value.communication<"u"&&(t.callsignVhf=e.value.communication.callsignVhf??"",t.callsignHf=e.value.communication.callsignHf??"");else if(e.path==="communication.callsignVhf")t.callsignVhf=e.value;else if(e.path==="communication.callsignHf")t.callsignHf=e.value;else if(e.path==="design.aisShipType")t.type=e.value;else if(e.path==="navigation.position"&&e.value){if(typeof e.value.latitude>"u"||typeof e.value.longitude>"u")return;t.position=U.normaliseCoords([e.value.longitude,e.value.latitude]),t.positionReceived=!0,t.positionTimestamp=Pn??"",t.lastUpdated=new Date,r||$r(t)}else e.path==="navigation.state"?t.state=e.value:e.path==="navigation.speedOverGround"?t.sog=e.value:e.path==="environment.mode"?t.environment.mode=e.value:e.path==="environment.sun"?t.environment.sun=e.value:e.path==="environment.wind.angleApparent"?t.wind.awa=e.value:e.path==="environment.wind.speedApparent"?t.wind.aws=e.value:e.path==="environment.wind.speedTrue"?t.wind.speedTrue=e.value:e.path==="environment.wind.speedOverGround"?t.wind.sog=e.value:e.path==="environment.wind.directionTrue"?t.wind.twd=e.value:e.path==="environment.wind.directionMagnetic"?t.wind.mwd=e.value:e.path==="navigation.anchor.position"?t.anchor.position=e.value:e.path==="navigation.anchor.maxRadius"?t.anchor.maxRadius=e.value:e.path==="navigation.anchor.currentRadius"?t.anchor.radius=e.value:e.path==="steering.autopilot.state"&&W===oe?t.autopilot.state=e.value:e.path==="steering.autopilot.mode"&&W===oe?t.autopilot.mode=e.value:e.path==="steering.autopilot.target"&&W===oe?t.autopilot.target=e.value:e.path==="steering.autopilot.engaged"&&W===oe?t.autopilot.enabled=e.value:e.path==="steering.autopilot.defaultPilot"?(t.autopilot.default=e.value,oe=e.value):e.path==="steering.autopilot.availableActions"&&W===oe?t.autopilot.availableActions=e.value??[]:e.path==="navigation.courseOverGroundTrue"?t.cogTrue=e.value:e.path==="navigation.courseOverGroundMagnetic"?t.cogMagnetic=e.value:e.path==="navigation.headingTrue"?t.headingTrue=e.value:e.path==="navigation.headingMagnetic"&&(t.headingMagnetic=e.value);typeof Y.heading<"u"&&e.path===Y.heading&&(t.orientation=e.value),typeof Y.tws<"u"&&e.path===Y.tws&&(t.wind.tws=e.value),typeof Y.twd<"u"&&e.path===Y.twd&&(t.wind.direction=e.path==="environment.wind.angleTrueGround"||e.path==="environment.wind.angleTrueWater"?z.angleToDirection(e.value,t.orientation??0):e.value);let i=t.cogTrue??t.cogMagnetic??void 0;if(typeof i<"u"&&t.position){let n=r?Vr.selfLines.cog.length:Vr.aisCogLine,a=(t.sog??0)*(n*60);t.vectors.cog=[t.position,U.rhumbDestination(t.position,i,a)]}}function Yu(t){let e=new Ut;e.playback=E,e.result={path:t.path,value:t.value,sourceRef:W},postMessage(e)}function Zu(t){let e=new Ft;e.playback=E,e.result={path:t.path,value:t.value,sourceRef:W},postMessage(e)}function hn(t){if(t.path.includes("notifications.")){let e=new Nt;e.playback=E,e.result={path:t.path,value:t.value,sourceRef:W},postMessage(e)}}function Ju(){let t=new Date().valueOf();f.aisTargets.forEach((e,r)=>{e.lastUpdated.valueOf()<t-K.maxAge?(w.expired[r]=!0,f.aisTargets.delete(r)):e.lastUpdated.valueOf()<t-K.staleAge&&(w.stale[r]=!0)}),f.aircraft.forEach((e,r)=>{e.lastUpdated.valueOf()<t-K.maxAge?(w.expired[r]=!0,f.aircraft.delete(r)):e.lastUpdated.valueOf()<t-K.staleAge&&(w.stale[r]=!0)}),f.sar.forEach((e,r)=>{e.lastUpdated.valueOf()<t-K.maxAge?(w.expired[r]=!0,f.sar.delete(r)):e.lastUpdated.valueOf()<t-K.staleAge&&(w.stale[r]=!0)})}function Qu(t,e){let r=!1;if(t.indexOf("shore.basestations")!==-1&&(r=!0),!f.atons.has(t)){let n=new ce;n.id=t,n.position=null,n.type.id=null,r&&(n.type.id=-2,n.type.name="Basestation"),f.atons.set(t,n)}let i=f.atons.get(t);return e.path===""?(typeof e.value.name<"u"&&(i.name=e.value.name),typeof e.value.mmsi<"u"&&(i.mmsi=e.value.mmsi),typeof e.value.atonType<"u"&&(i.type=e.value.atonType)):e.path==="atonType"?i.type=e.value:e.path==="virtual"?i.virtual=e.value:e.path==="navigation.position"?(i.position=[e.value.longitude,e.value.latitude],i.positionReceived=!0):i.properties[e.path]=e.value,t}function el(t,e){if(!f.sar.has(t)){let i=new Ee;i.id=t,i.position=null,i.type.id=-1,i.type.name="SaR Beacon",f.sar.set(t,i)}let r=f.sar.get(t);e.path===""?(typeof e.value.name<"u"&&(r.name=e.value.name),typeof e.value.mmsi<"u"&&(r.mmsi=e.value.mmsi),typeof e.value.communication<"u"&&(r.callsignVhf=e.value.communication.callsignVhf??"",r.callsignHf=e.value.communication.callsignHf??"")):e.path==="communication.callsignVhf"?r.callsignVhf=e.value:e.path==="communication.callsignHf"?r.callsignHf=e.value:e.path==="navigation.position"&&e.value&&(r.position=U.normaliseCoords([e.value.longitude,e.value.latitude]),r.positionReceived=!0)}function tl(t,e){if(!f.meteo.has(t)){let i=new Ne;i.id=t,i.position=null,i.type.id=-1,i.type.name="Weather Station",f.meteo.set(t,i)}let r=f.meteo.get(t);if(e.path===""){if(typeof e.value.name<"u"&&(r.name=e.value.name),typeof e.value.mmsi<"u"){let i=t.split(":").slice(-2);r.mmsi=i.length===2?`${i[0]}:${i[1]}`:e.value.mmsi}typeof e.value.communication<"u"&&(r.callsignVhf=e.value.communication.callsignVhf??"",r.callsignHf=e.value.communication.callsignHf??"")}else e.path==="communication.callsignVhf"?r.callsignVhf=e.value:e.path==="communication.callsignHf"?r.callsignHf=e.value:e.path==="environment.outside.temperature"?r.temperature=e.value:e.path==="environment.wind.directionTrue"?r.twd=e.value:e.path==="environment.wind.averageSpeed"?r.tws=e.value:e.path==="navigation.position"&&e.value&&(r.position=U.normaliseCoords([e.value.longitude,e.value.latitude]),r.positionReceived=!0)}function rl(t,e){if(!f.aircraft.has(t)){let i=new Ie;i.id=t,i.position=null,f.aircraft.set(t,i)}let r=f.aircraft.get(t);e.path===""?(typeof e.value.name<"u"&&(r.name=e.value.name),typeof e.value.mmsi<"u"&&(r.mmsi=e.value.mmsi),typeof e.value.communication<"u"&&(r.callsignVhf=e.value.communication.callsignVhf??"",r.callsignHf=e.value.communication.callsignHf??"")):e.path==="communication.callsignVhf"?r.callsignVhf=e.value:e.path==="communication.callsignHf"?r.callsignHf=e.value:e.path==="navigation.position"&&e.value?(r.position=U.normaliseCoords([e.value.longitude,e.value.latitude]),r.positionReceived=!0,$r(r)):e.path==="navigation.courseOverGroundTrue"?r.orientation=e.value:e.path==="navigation.speedOverGround"&&(r.sog=e.value)}function $r(t){if(t.track&&t.track.length===0)t.track.push([t.position]);else{let e=t.track[t.track.length-1].length,r=t.track[t.track.length-1][e-1];r[0]!==t.position[0]&&r[1]!==t.position[1]&&t.track[t.track.length-1].push(t.position)}t.track[t.track.length-1]=t.track[t.track.length-1].slice(0-K.maxTrack)}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var Ki=Object.create;var _e=Object.defineProperty;var zi=Object.getOwnPropertyDescriptor;var Hi=Object.getOwnPropertyNames;var Qi=Object.getPrototypeOf,Zi=Object.prototype.hasOwnProperty;var S=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports);var Ji=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Hi(t))!Zi.call(r,n)&&n!==e&&_e(r,n,{get:()=>t[n],enumerable:!(i=zi(t,n))||i.enumerable});return r};var tn=(r,t,e)=>(e=r!=null?Ki(Qi(r)):{},Ji(t||!r||!r.__esModule?_e(e,"default",{value:r,enumerable:!0}):e,r));var Lt=S(ee=>{(function(){ee.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:`
|
|
2
|
-
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(ee)});var et=S((Le,ht)=>{(function(){var r,t,e,i,n,s,o,l=[].slice,p={}.hasOwnProperty;r=function(){var m,N,I,E,g,T;if(T=arguments[0],g=2<=arguments.length?l.call(arguments,1):[],n(Object.assign))Object.assign.apply(null,arguments);else for(m=0,I=g.length;m<I;m++)if(E=g[m],E!=null)for(N in E)p.call(E,N)&&(T[N]=E[N]);return T},n=function(m){return!!m&&Object.prototype.toString.call(m)==="[object Function]"},s=function(m){var N;return!!m&&((N=typeof m)=="function"||N==="object")},e=function(m){return n(Array.isArray)?Array.isArray(m):Object.prototype.toString.call(m)==="[object Array]"},i=function(m){var N;if(e(m))return!m.length;for(N in m)if(p.call(m,N))return!1;return!0},o=function(m){var N,I;return s(m)&&(I=Object.getPrototypeOf(m))&&(N=I.constructor)&&typeof N=="function"&&N instanceof N&&Function.prototype.toString.call(N)===Function.prototype.toString.call(Object)},t=function(m){return n(m.valueOf)?m.valueOf():m},ht.exports.assign=r,ht.exports.isFunction=n,ht.exports.isObject=s,ht.exports.isArray=e,ht.exports.isEmpty=i,ht.exports.isPlainObject=o,ht.exports.getValue=t}).call(Le)});var re=S((ve,Pe)=>{(function(){var r;Pe.exports=r=(function(){function t(){}return t.prototype.hasFeature=function(e,i){return!0},t.prototype.createDocumentType=function(e,i,n){throw new Error("This DOM method is not implemented.")},t.prototype.createDocument=function(e,i,n){throw new Error("This DOM method is not implemented.")},t.prototype.createHTMLDocument=function(e){throw new Error("This DOM method is not implemented.")},t.prototype.getFeature=function(e,i){throw new Error("This DOM method is not implemented.")},t})()}).call(ve)});var Be=S((Me,Fe)=>{(function(){var r;Fe.exports=r=(function(){function t(){}return t.prototype.handleError=function(e){throw new Error(e)},t})()}).call(Me)});var Ue=S((Se,Re)=>{(function(){var r;Re.exports=r=(function(){function t(e){this.arr=e||[]}return Object.defineProperty(t.prototype,"length",{get:function(){return this.arr.length}}),t.prototype.item=function(e){return this.arr[e]||null},t.prototype.contains=function(e){return this.arr.indexOf(e)!==-1},t})()}).call(Se)});var je=S((qe,Xe)=>{(function(){var r,t,e;t=Be(),e=Ue(),Xe.exports=r=(function(){function i(){var n;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new t,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=n=Object.create(this.defaultParams)}return Object.defineProperty(i.prototype,"parameterNames",{get:function(){return new e(Object.keys(this.defaultParams))}}),i.prototype.getParameter=function(n){return this.params.hasOwnProperty(n)?this.params[n]:null},i.prototype.canSetParameter=function(n,s){return!0},i.prototype.setParameter=function(n,s){return s!=null?this.params[n]=s:delete this.params[n]},i})()}).call(qe)});var V=S((ke,Ve)=>{(function(){Ve.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(ke)});var ie=S((We,Ge)=>{(function(){var r,t,e;r=V(),e=Q(),Ge.exports=t=(function(){function i(n,s,o){if(this.parent=n,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),s==null)throw new Error("Missing attribute name. "+this.debugInfo(s));this.name=this.stringify.name(s),this.value=this.stringify.attValue(o),this.type=r.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(i.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(i.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(i.prototype,"textContent",{get:function(){return this.value},set:function(n){return this.value=n||""}}),Object.defineProperty(i.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(i.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(i.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(i.prototype,"specified",{get:function(){return!0}}),i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(n){return this.options.writer.attribute(this,this.options.writer.filterOptions(n))},i.prototype.debugInfo=function(n){return n=n||this.name,n==null?"parent: <"+this.parent.name+">":"attribute: {"+n+"}, parent: <"+this.parent.name+">"},i.prototype.isEqualNode=function(n){return!(n.namespaceURI!==this.namespaceURI||n.prefix!==this.prefix||n.localName!==this.localName||n.value!==this.value)},i})()}).call(We)});var vt=S((Ye,$e)=>{(function(){var r;$e.exports=r=(function(){function t(e){this.nodes=e}return Object.defineProperty(t.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),t.prototype.clone=function(){return this.nodes=null},t.prototype.getNamedItem=function(e){return this.nodes[e]},t.prototype.setNamedItem=function(e){var i;return i=this.nodes[e.nodeName],this.nodes[e.nodeName]=e,i||null},t.prototype.removeNamedItem=function(e){var i;return i=this.nodes[e],delete this.nodes[e],i||null},t.prototype.item=function(e){return this.nodes[Object.keys(this.nodes)[e]]||null},t.prototype.getNamedItemNS=function(e,i){throw new Error("This DOM method is not implemented.")},t.prototype.setNamedItemNS=function(e){throw new Error("This DOM method is not implemented.")},t.prototype.removeNamedItemNS=function(e,i){throw new Error("This DOM method is not implemented.")},t})()}).call(Ye)});var Pt=S((Ke,ze)=>{(function(){var r,t,e,i,n,s,o,l,p,m=function(I,E){for(var g in E)N.call(E,g)&&(I[g]=E[g]);function T(){this.constructor=I}return T.prototype=E.prototype,I.prototype=new T,I.__super__=E.prototype,I},N={}.hasOwnProperty;p=et(),l=p.isObject,o=p.isFunction,s=p.getValue,n=Q(),r=V(),t=ie(),i=vt(),ze.exports=e=(function(I){m(E,I);function E(g,T,b){var M,v,O,y;if(E.__super__.constructor.call(this,g),T==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(T),this.type=r.Element,this.attribs={},this.schemaTypeInfo=null,b!=null&&this.attribute(b),g.type===r.Document&&(this.isRoot=!0,this.documentObject=g,g.rootObject=this,g.children)){for(y=g.children,v=0,O=y.length;v<O;v++)if(M=y[v],M.type===r.DocType){M.name=this.name;break}}}return Object.defineProperty(E.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(E.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(E.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(E.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(E.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(E.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(E.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(E.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new i(this.attribs)),this.attributeMap}}),E.prototype.clone=function(){var g,T,b,M;b=Object.create(this),b.isRoot&&(b.documentObject=null),b.attribs={},M=this.attribs;for(T in M)N.call(M,T)&&(g=M[T],b.attribs[T]=g.clone());return b.children=[],this.children.forEach(function(v){var O;return O=v.clone(),O.parent=b,b.children.push(O)}),b},E.prototype.attribute=function(g,T){var b,M;if(g!=null&&(g=s(g)),l(g))for(b in g)N.call(g,b)&&(M=g[b],this.attribute(b,M));else o(T)&&(T=T.apply()),this.options.keepNullAttributes&&T==null?this.attribs[g]=new t(this,g,""):T!=null&&(this.attribs[g]=new t(this,g,T));return this},E.prototype.removeAttribute=function(g){var T,b,M;if(g==null)throw new Error("Missing attribute name. "+this.debugInfo());if(g=s(g),Array.isArray(g))for(b=0,M=g.length;b<M;b++)T=g[b],delete this.attribs[T];else delete this.attribs[g];return this},E.prototype.toString=function(g){return this.options.writer.element(this,this.options.writer.filterOptions(g))},E.prototype.att=function(g,T){return this.attribute(g,T)},E.prototype.a=function(g,T){return this.attribute(g,T)},E.prototype.getAttribute=function(g){return this.attribs.hasOwnProperty(g)?this.attribs[g].value:null},E.prototype.setAttribute=function(g,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getAttributeNode=function(g){return this.attribs.hasOwnProperty(g)?this.attribs[g]:null},E.prototype.setAttributeNode=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.removeAttributeNode=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByTagName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getAttributeNS=function(g,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setAttributeNS=function(g,T,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.removeAttributeNS=function(g,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getAttributeNodeNS=function(g,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setAttributeNodeNS=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByTagNameNS=function(g,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.hasAttribute=function(g){return this.attribs.hasOwnProperty(g)},E.prototype.hasAttributeNS=function(g,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setIdAttribute=function(g,T){return this.attribs.hasOwnProperty(g)?this.attribs[g].isId:T},E.prototype.setIdAttributeNS=function(g,T,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setIdAttributeNode=function(g,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByTagName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByTagNameNS=function(g,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByClassName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isEqualNode=function(g){var T,b,M;if(!E.__super__.isEqualNode.apply(this,arguments).isEqualNode(g)||g.namespaceURI!==this.namespaceURI||g.prefix!==this.prefix||g.localName!==this.localName||g.attribs.length!==this.attribs.length)return!1;for(T=b=0,M=this.attribs.length-1;0<=M?b<=M:b>=M;T=0<=M?++b:--b)if(!this.attribs[T].isEqualNode(g.attribs[T]))return!1;return!0},E})(n)}).call(Ke)});var xt=S((He,Qe)=>{(function(){var r,t,e=function(n,s){for(var o in s)i.call(s,o)&&(n[o]=s[o]);function l(){this.constructor=n}return l.prototype=s.prototype,n.prototype=new l,n.__super__=s.prototype,n},i={}.hasOwnProperty;t=Q(),Qe.exports=r=(function(n){e(s,n);function s(o){s.__super__.constructor.call(this,o),this.value=""}return Object.defineProperty(s.prototype,"data",{get:function(){return this.value},set:function(o){return this.value=o||""}}),Object.defineProperty(s.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(s.prototype,"textContent",{get:function(){return this.value},set:function(o){return this.value=o||""}}),s.prototype.clone=function(){return Object.create(this)},s.prototype.substringData=function(o,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.appendData=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.insertData=function(o,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.deleteData=function(o,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.replaceData=function(o,l,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.isEqualNode=function(o){return!(!s.__super__.isEqualNode.apply(this,arguments).isEqualNode(o)||o.data!==this.data)},s})(t)}).call(He)});var Mt=S((Ze,Je)=>{(function(){var r,t,e,i=function(s,o){for(var l in o)n.call(o,l)&&(s[l]=o[l]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},n={}.hasOwnProperty;r=V(),e=xt(),Je.exports=t=(function(s){i(o,s);function o(l,p){if(o.__super__.constructor.call(this,l),p==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=r.CData,this.value=this.stringify.cdata(p)}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(l){return this.options.writer.cdata(this,this.options.writer.filterOptions(l))},o})(e)}).call(Ze)});var Ft=S((tr,er)=>{(function(){var r,t,e,i=function(s,o){for(var l in o)n.call(o,l)&&(s[l]=o[l]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},n={}.hasOwnProperty;r=V(),t=xt(),er.exports=e=(function(s){i(o,s);function o(l,p){if(o.__super__.constructor.call(this,l),p==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=r.Comment,this.value=this.stringify.comment(p)}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(l){return this.options.writer.comment(this,this.options.writer.filterOptions(l))},o})(t)}).call(tr)});var Bt=S((rr,ir)=>{(function(){var r,t,e,i,n=function(o,l){for(var p in l)s.call(l,p)&&(o[p]=l[p]);function m(){this.constructor=o}return m.prototype=l.prototype,o.prototype=new m,o.__super__=l.prototype,o},s={}.hasOwnProperty;i=et().isObject,e=Q(),r=V(),ir.exports=t=(function(o){n(l,o);function l(p,m,N,I){var E;l.__super__.constructor.call(this,p),i(m)&&(E=m,m=E.version,N=E.encoding,I=E.standalone),m||(m="1.0"),this.type=r.Declaration,this.version=this.stringify.xmlVersion(m),N!=null&&(this.encoding=this.stringify.xmlEncoding(N)),I!=null&&(this.standalone=this.stringify.xmlStandalone(I))}return l.prototype.toString=function(p){return this.options.writer.declaration(this,this.options.writer.filterOptions(p))},l})(e)}).call(rr)});var St=S((nr,or)=>{(function(){var r,t,e,i=function(s,o){for(var l in o)n.call(o,l)&&(s[l]=o[l]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},n={}.hasOwnProperty;e=Q(),r=V(),or.exports=t=(function(s){i(o,s);function o(l,p,m,N,I,E){if(o.__super__.constructor.call(this,l),p==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(m==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(p));if(!N)throw new Error("Missing DTD attribute type. "+this.debugInfo(p));if(!I)throw new Error("Missing DTD attribute default. "+this.debugInfo(p));if(I.indexOf("#")!==0&&(I="#"+I),!I.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(p));if(E&&!I.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(p));this.elementName=this.stringify.name(p),this.type=r.AttributeDeclaration,this.attributeName=this.stringify.name(m),this.attributeType=this.stringify.dtdAttType(N),E&&(this.defaultValue=this.stringify.dtdAttDefault(E)),this.defaultValueType=I}return o.prototype.toString=function(l){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(l))},o})(e)}).call(nr)});var Rt=S((sr,ur)=>{(function(){var r,t,e,i,n=function(o,l){for(var p in l)s.call(l,p)&&(o[p]=l[p]);function m(){this.constructor=o}return m.prototype=l.prototype,o.prototype=new m,o.__super__=l.prototype,o},s={}.hasOwnProperty;i=et().isObject,e=Q(),r=V(),ur.exports=t=(function(o){n(l,o);function l(p,m,N,I){if(l.__super__.constructor.call(this,p),N==null)throw new Error("Missing DTD entity name. "+this.debugInfo(N));if(I==null)throw new Error("Missing DTD entity value. "+this.debugInfo(N));if(this.pe=!!m,this.name=this.stringify.name(N),this.type=r.EntityDeclaration,!i(I))this.value=this.stringify.dtdEntityValue(I),this.internal=!0;else{if(!I.pubID&&!I.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(N));if(I.pubID&&!I.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(N));if(this.internal=!1,I.pubID!=null&&(this.pubID=this.stringify.dtdPubID(I.pubID)),I.sysID!=null&&(this.sysID=this.stringify.dtdSysID(I.sysID)),I.nData!=null&&(this.nData=this.stringify.dtdNData(I.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(N))}}return Object.defineProperty(l.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(l.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(l.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(l.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(l.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(l.prototype,"xmlVersion",{get:function(){return null}}),l.prototype.toString=function(p){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(p))},l})(e)}).call(sr)});var Ut=S((ar,cr)=>{(function(){var r,t,e,i=function(s,o){for(var l in o)n.call(o,l)&&(s[l]=o[l]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},n={}.hasOwnProperty;e=Q(),r=V(),cr.exports=t=(function(s){i(o,s);function o(l,p,m){if(o.__super__.constructor.call(this,l),p==null)throw new Error("Missing DTD element name. "+this.debugInfo());m||(m="(#PCDATA)"),Array.isArray(m)&&(m="("+m.join(",")+")"),this.name=this.stringify.name(p),this.type=r.ElementDeclaration,this.value=this.stringify.dtdElementValue(m)}return o.prototype.toString=function(l){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(l))},o})(e)}).call(ar)});var qt=S((hr,lr)=>{(function(){var r,t,e,i=function(s,o){for(var l in o)n.call(o,l)&&(s[l]=o[l]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},n={}.hasOwnProperty;e=Q(),r=V(),lr.exports=t=(function(s){i(o,s);function o(l,p,m){if(o.__super__.constructor.call(this,l),p==null)throw new Error("Missing DTD notation name. "+this.debugInfo(p));if(!m.pubID&&!m.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(p));this.name=this.stringify.name(p),this.type=r.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(l){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(l))},o})(e)}).call(hr)});var Xt=S((fr,pr)=>{(function(){var r,t,e,i,n,s,o,l,p,m=function(I,E){for(var g in E)N.call(E,g)&&(I[g]=E[g]);function T(){this.constructor=I}return T.prototype=E.prototype,I.prototype=new T,I.__super__=E.prototype,I},N={}.hasOwnProperty;p=et().isObject,l=Q(),r=V(),t=St(),i=Rt(),e=Ut(),n=qt(),o=vt(),pr.exports=s=(function(I){m(E,I);function E(g,T,b){var M,v,O,y,c,a;if(E.__super__.constructor.call(this,g),this.type=r.DocType,g.children){for(y=g.children,v=0,O=y.length;v<O;v++)if(M=y[v],M.type===r.Element){this.name=M.name;break}}this.documentObject=g,p(T)&&(c=T,T=c.pubID,b=c.sysID),b==null&&(a=[T,b],b=a[0],T=a[1]),T!=null&&(this.pubID=this.stringify.dtdPubID(T)),b!=null&&(this.sysID=this.stringify.dtdSysID(b))}return Object.defineProperty(E.prototype,"entities",{get:function(){var g,T,b,M,v;for(M={},v=this.children,T=0,b=v.length;T<b;T++)g=v[T],g.type===r.EntityDeclaration&&!g.pe&&(M[g.name]=g);return new o(M)}}),Object.defineProperty(E.prototype,"notations",{get:function(){var g,T,b,M,v;for(M={},v=this.children,T=0,b=v.length;T<b;T++)g=v[T],g.type===r.NotationDeclaration&&(M[g.name]=g);return new o(M)}}),Object.defineProperty(E.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(E.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(E.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),E.prototype.element=function(g,T){var b;return b=new e(this,g,T),this.children.push(b),this},E.prototype.attList=function(g,T,b,M,v){var O;return O=new t(this,g,T,b,M,v),this.children.push(O),this},E.prototype.entity=function(g,T){var b;return b=new i(this,!1,g,T),this.children.push(b),this},E.prototype.pEntity=function(g,T){var b;return b=new i(this,!0,g,T),this.children.push(b),this},E.prototype.notation=function(g,T){var b;return b=new n(this,g,T),this.children.push(b),this},E.prototype.toString=function(g){return this.options.writer.docType(this,this.options.writer.filterOptions(g))},E.prototype.ele=function(g,T){return this.element(g,T)},E.prototype.att=function(g,T,b,M,v){return this.attList(g,T,b,M,v)},E.prototype.ent=function(g,T){return this.entity(g,T)},E.prototype.pent=function(g,T){return this.pEntity(g,T)},E.prototype.not=function(g,T){return this.notation(g,T)},E.prototype.up=function(){return this.root()||this.documentObject},E.prototype.isEqualNode=function(g){return!(!E.__super__.isEqualNode.apply(this,arguments).isEqualNode(g)||g.name!==this.name||g.publicId!==this.publicId||g.systemId!==this.systemId)},E})(l)}).call(fr)});var jt=S((dr,yr)=>{(function(){var r,t,e,i=function(s,o){for(var l in o)n.call(o,l)&&(s[l]=o[l]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},n={}.hasOwnProperty;r=V(),t=Q(),yr.exports=e=(function(s){i(o,s);function o(l,p){if(o.__super__.constructor.call(this,l),p==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=r.Raw,this.value=this.stringify.raw(p)}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(l){return this.options.writer.raw(this,this.options.writer.filterOptions(l))},o})(t)}).call(dr)});var kt=S((mr,gr)=>{(function(){var r,t,e,i=function(s,o){for(var l in o)n.call(o,l)&&(s[l]=o[l]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},n={}.hasOwnProperty;r=V(),t=xt(),gr.exports=e=(function(s){i(o,s);function o(l,p){if(o.__super__.constructor.call(this,l),p==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=r.Text,this.value=this.stringify.text(p)}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 l,p,m;for(m="",p=this.previousSibling;p;)m=p.data+m,p=p.previousSibling;for(m+=this.data,l=this.nextSibling;l;)m=m+l.data,l=l.nextSibling;return m}}),o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(l){return this.options.writer.text(this,this.options.writer.filterOptions(l))},o.prototype.splitText=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.replaceWholeText=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},o})(t)}).call(mr)});var Vt=S((wr,Er)=>{(function(){var r,t,e,i=function(s,o){for(var l in o)n.call(o,l)&&(s[l]=o[l]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},n={}.hasOwnProperty;r=V(),t=xt(),Er.exports=e=(function(s){i(o,s);function o(l,p,m){if(o.__super__.constructor.call(this,l),p==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=r.ProcessingInstruction,this.target=this.stringify.insTarget(p),this.name=this.target,m&&(this.value=this.stringify.insValue(m))}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(l){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(l))},o.prototype.isEqualNode=function(l){return!(!o.__super__.isEqualNode.apply(this,arguments).isEqualNode(l)||l.target!==this.target)},o})(t)}).call(wr)});var ne=S((Tr,Ir)=>{(function(){var r,t,e,i=function(s,o){for(var l in o)n.call(o,l)&&(s[l]=o[l]);function p(){this.constructor=s}return p.prototype=o.prototype,s.prototype=new p,s.__super__=o.prototype,s},n={}.hasOwnProperty;e=Q(),r=V(),Ir.exports=t=(function(s){i(o,s);function o(l){o.__super__.constructor.call(this,l),this.type=r.Dummy}return o.prototype.clone=function(){return Object.create(this)},o.prototype.toString=function(l){return""},o})(e)}).call(Tr)});var br=S((Nr,Dr)=>{(function(){var r;Dr.exports=r=(function(){function t(e){this.nodes=e}return Object.defineProperty(t.prototype,"length",{get:function(){return this.nodes.length||0}}),t.prototype.clone=function(){return this.nodes=null},t.prototype.item=function(e){return this.nodes[e]||null},t})()}).call(Nr)});var Ar=S((xr,Or)=>{(function(){Or.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(xr)});var Q=S((Cr,_r)=>{(function(){var r,t,e,i,n,s,o,l,p,m,N,I,E,g,T,b,M,v,O,y={}.hasOwnProperty;O=et(),v=O.isObject,M=O.isFunction,b=O.isEmpty,T=O.getValue,l=null,e=null,i=null,n=null,s=null,E=null,g=null,I=null,o=null,t=null,N=null,p=null,r=null,_r.exports=m=(function(){function c(a){this.parent=a,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,l||(l=Pt(),e=Mt(),i=Ft(),n=Bt(),s=Xt(),E=jt(),g=kt(),I=Vt(),o=ne(),t=V(),N=br(),p=vt(),r=Ar())}return Object.defineProperty(c.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(c.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(c.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(c.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(c.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new N(this.children)),this.childNodeList}}),Object.defineProperty(c.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(c.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(c.prototype,"previousSibling",{get:function(){var a;return a=this.parent.children.indexOf(this),this.parent.children[a-1]||null}}),Object.defineProperty(c.prototype,"nextSibling",{get:function(){var a;return a=this.parent.children.indexOf(this),this.parent.children[a+1]||null}}),Object.defineProperty(c.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(c.prototype,"textContent",{get:function(){var a,d,A,h,C;if(this.nodeType===t.Element||this.nodeType===t.DocumentFragment){for(C="",h=this.children,d=0,A=h.length;d<A;d++)a=h[d],a.textContent&&(C+=a.textContent);return C}else return null},set:function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),c.prototype.setParent=function(a){var d,A,h,C,w;for(this.parent=a,a&&(this.options=a.options,this.stringify=a.stringify),C=this.children,w=[],A=0,h=C.length;A<h;A++)d=C[A],w.push(d.setParent(this));return w},c.prototype.element=function(a,d,A){var h,C,w,x,P,F,R,U,B,W,q;if(F=null,d===null&&A==null&&(B=[{},null],d=B[0],A=B[1]),d==null&&(d={}),d=T(d),v(d)||(W=[d,A],A=W[0],d=W[1]),a!=null&&(a=T(a)),Array.isArray(a))for(w=0,R=a.length;w<R;w++)C=a[w],F=this.element(C);else if(M(a))F=this.element(a.apply());else if(v(a)){for(P in a)if(y.call(a,P))if(q=a[P],M(q)&&(q=q.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&P.indexOf(this.stringify.convertAttKey)===0)F=this.attribute(P.substr(this.stringify.convertAttKey.length),q);else if(!this.options.separateArrayItems&&Array.isArray(q)&&b(q))F=this.dummy();else if(v(q)&&b(q))F=this.element(P);else if(!this.options.keepNullNodes&&q==null)F=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(q))for(x=0,U=q.length;x<U;x++)C=q[x],h={},h[P]=C,F=this.element(h);else v(q)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&P.indexOf(this.stringify.convertTextKey)===0?F=this.element(q):(F=this.element(P),F.element(q)):F=this.element(P,q)}else!this.options.keepNullNodes&&A===null?F=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&a.indexOf(this.stringify.convertTextKey)===0?F=this.text(A):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&a.indexOf(this.stringify.convertCDataKey)===0?F=this.cdata(A):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&a.indexOf(this.stringify.convertCommentKey)===0?F=this.comment(A):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&a.indexOf(this.stringify.convertRawKey)===0?F=this.raw(A):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&a.indexOf(this.stringify.convertPIKey)===0?F=this.instruction(a.substr(this.stringify.convertPIKey.length),A):F=this.node(a,d,A);if(F==null)throw new Error("Could not create any elements with: "+a+". "+this.debugInfo());return F},c.prototype.insertBefore=function(a,d,A){var h,C,w,x,P;if(a?.type)return w=a,x=d,w.setParent(this),x?(C=children.indexOf(x),P=children.splice(C),children.push(w),Array.prototype.push.apply(children,P)):children.push(w),w;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(a));return C=this.parent.children.indexOf(this),P=this.parent.children.splice(C),h=this.parent.element(a,d,A),Array.prototype.push.apply(this.parent.children,P),h},c.prototype.insertAfter=function(a,d,A){var h,C,w;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(a));return C=this.parent.children.indexOf(this),w=this.parent.children.splice(C+1),h=this.parent.element(a,d,A),Array.prototype.push.apply(this.parent.children,w),h},c.prototype.remove=function(){var a,d;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return a=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[a,a-a+1].concat(d=[])),this.parent},c.prototype.node=function(a,d,A){var h,C;return a!=null&&(a=T(a)),d||(d={}),d=T(d),v(d)||(C=[d,A],A=C[0],d=C[1]),h=new l(this,a,d),A!=null&&h.text(A),this.children.push(h),h},c.prototype.text=function(a){var d;return v(a)&&this.element(a),d=new g(this,a),this.children.push(d),this},c.prototype.cdata=function(a){var d;return d=new e(this,a),this.children.push(d),this},c.prototype.comment=function(a){var d;return d=new i(this,a),this.children.push(d),this},c.prototype.commentBefore=function(a){var d,A,h;return A=this.parent.children.indexOf(this),h=this.parent.children.splice(A),d=this.parent.comment(a),Array.prototype.push.apply(this.parent.children,h),this},c.prototype.commentAfter=function(a){var d,A,h;return A=this.parent.children.indexOf(this),h=this.parent.children.splice(A+1),d=this.parent.comment(a),Array.prototype.push.apply(this.parent.children,h),this},c.prototype.raw=function(a){var d;return d=new E(this,a),this.children.push(d),this},c.prototype.dummy=function(){var a;return a=new o(this),a},c.prototype.instruction=function(a,d){var A,h,C,w,x;if(a!=null&&(a=T(a)),d!=null&&(d=T(d)),Array.isArray(a))for(w=0,x=a.length;w<x;w++)A=a[w],this.instruction(A);else if(v(a))for(A in a)y.call(a,A)&&(h=a[A],this.instruction(A,h));else M(d)&&(d=d.apply()),C=new I(this,a,d),this.children.push(C);return this},c.prototype.instructionBefore=function(a,d){var A,h,C;return h=this.parent.children.indexOf(this),C=this.parent.children.splice(h),A=this.parent.instruction(a,d),Array.prototype.push.apply(this.parent.children,C),this},c.prototype.instructionAfter=function(a,d){var A,h,C;return h=this.parent.children.indexOf(this),C=this.parent.children.splice(h+1),A=this.parent.instruction(a,d),Array.prototype.push.apply(this.parent.children,C),this},c.prototype.declaration=function(a,d,A){var h,C;return h=this.document(),C=new n(h,a,d,A),h.children.length===0?h.children.unshift(C):h.children[0].type===t.Declaration?h.children[0]=C:h.children.unshift(C),h.root()||h},c.prototype.dtd=function(a,d){var A,h,C,w,x,P,F,R,U,B;for(h=this.document(),C=new s(h,a,d),U=h.children,w=x=0,F=U.length;x<F;w=++x)if(A=U[w],A.type===t.DocType)return h.children[w]=C,C;for(B=h.children,w=P=0,R=B.length;P<R;w=++P)if(A=B[w],A.isRoot)return h.children.splice(w,0,C),C;return h.children.push(C),C},c.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},c.prototype.root=function(){var a;for(a=this;a;){if(a.type===t.Document)return a.rootObject;if(a.isRoot)return a;a=a.parent}},c.prototype.document=function(){var a;for(a=this;a;){if(a.type===t.Document)return a;a=a.parent}},c.prototype.end=function(a){return this.document().end(a)},c.prototype.prev=function(){var a;if(a=this.parent.children.indexOf(this),a<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[a-1]},c.prototype.next=function(){var a;if(a=this.parent.children.indexOf(this),a===-1||a===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[a+1]},c.prototype.importDocument=function(a){var d;return d=a.root().clone(),d.parent=this,d.isRoot=!1,this.children.push(d),this},c.prototype.debugInfo=function(a){var d,A;return a=a||this.name,a==null&&!((d=this.parent)!=null&&d.name)?"":a==null?"parent: <"+this.parent.name+">":(A=this.parent)!=null&&A.name?"node: <"+a+">, parent: <"+this.parent.name+">":"node: <"+a+">"},c.prototype.ele=function(a,d,A){return this.element(a,d,A)},c.prototype.nod=function(a,d,A){return this.node(a,d,A)},c.prototype.txt=function(a){return this.text(a)},c.prototype.dat=function(a){return this.cdata(a)},c.prototype.com=function(a){return this.comment(a)},c.prototype.ins=function(a,d){return this.instruction(a,d)},c.prototype.doc=function(){return this.document()},c.prototype.dec=function(a,d,A){return this.declaration(a,d,A)},c.prototype.e=function(a,d,A){return this.element(a,d,A)},c.prototype.n=function(a,d,A){return this.node(a,d,A)},c.prototype.t=function(a){return this.text(a)},c.prototype.d=function(a){return this.cdata(a)},c.prototype.c=function(a){return this.comment(a)},c.prototype.r=function(a){return this.raw(a)},c.prototype.i=function(a,d){return this.instruction(a,d)},c.prototype.u=function(){return this.up()},c.prototype.importXMLBuilder=function(a){return this.importDocument(a)},c.prototype.replaceChild=function(a,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.removeChild=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.appendChild=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.hasChildNodes=function(){return this.children.length!==0},c.prototype.cloneNode=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.isSupported=function(a,d){return!0},c.prototype.hasAttributes=function(){return this.attribs.length!==0},c.prototype.compareDocumentPosition=function(a){var d,A;return d=this,d===a?0:this.document()!==a.document()?(A=r.Disconnected|r.ImplementationSpecific,Math.random()<.5?A|=r.Preceding:A|=r.Following,A):d.isAncestor(a)?r.Contains|r.Preceding:d.isDescendant(a)?r.Contains|r.Following:d.isPreceding(a)?r.Preceding:r.Following},c.prototype.isSameNode=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.lookupPrefix=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.isDefaultNamespace=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.lookupNamespaceURI=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.isEqualNode=function(a){var d,A,h;if(a.nodeType!==this.nodeType||a.children.length!==this.children.length)return!1;for(d=A=0,h=this.children.length-1;0<=h?A<=h:A>=h;d=0<=h?++A:--A)if(!this.children[d].isEqualNode(a.children[d]))return!1;return!0},c.prototype.getFeature=function(a,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.setUserData=function(a,d,A){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getUserData=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.contains=function(a){return a?a===this||this.isDescendant(a):!1},c.prototype.isDescendant=function(a){var d,A,h,C,w;for(w=this.children,h=0,C=w.length;h<C;h++)if(d=w[h],a===d||(A=d.isDescendant(a),A))return!0;return!1},c.prototype.isAncestor=function(a){return a.isDescendant(this)},c.prototype.isPreceding=function(a){var d,A;return d=this.treePosition(a),A=this.treePosition(this),d===-1||A===-1?!1:d<A},c.prototype.isFollowing=function(a){var d,A;return d=this.treePosition(a),A=this.treePosition(this),d===-1||A===-1?!1:d>A},c.prototype.treePosition=function(a){var d,A;return A=0,d=!1,this.foreachTreeNode(this.document(),function(h){if(A++,!d&&h===a)return d=!0}),d?A:-1},c.prototype.foreachTreeNode=function(a,d){var A,h,C,w,x;for(a||(a=this.document()),w=a.children,h=0,C=w.length;h<C;h++){if(A=w[h],x=d(A))return x;if(x=this.foreachTreeNode(A,d),x)return x}},c})()}).call(Cr)});var oe=S((Lr,vr)=>{(function(){var r,t=function(i,n){return function(){return i.apply(n,arguments)}},e={}.hasOwnProperty;vr.exports=r=(function(){function i(n){this.assertLegalName=t(this.assertLegalName,this),this.assertLegalChar=t(this.assertLegalChar,this);var s,o,l;n||(n={}),this.options=n,this.options.version||(this.options.version="1.0"),o=n.stringify||{};for(s in o)e.call(o,s)&&(l=o[s],this[s]=l)}return i.prototype.name=function(n){return this.options.noValidation?n:this.assertLegalName(""+n||"")},i.prototype.text=function(n){return this.options.noValidation?n:this.assertLegalChar(this.textEscape(""+n||""))},i.prototype.cdata=function(n){return this.options.noValidation?n:(n=""+n||"",n=n.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(n))},i.prototype.comment=function(n){if(this.options.noValidation)return n;if(n=""+n||"",n.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+n);return this.assertLegalChar(n)},i.prototype.raw=function(n){return this.options.noValidation?n:""+n||""},i.prototype.attValue=function(n){return this.options.noValidation?n:this.assertLegalChar(this.attEscape(n=""+n||""))},i.prototype.insTarget=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},i.prototype.insValue=function(n){if(this.options.noValidation)return n;if(n=""+n||"",n.match(/\?>/))throw new Error("Invalid processing instruction value: "+n);return this.assertLegalChar(n)},i.prototype.xmlVersion=function(n){if(this.options.noValidation)return n;if(n=""+n||"",!n.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+n);return n},i.prototype.xmlEncoding=function(n){if(this.options.noValidation)return n;if(n=""+n||"",!n.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+n);return this.assertLegalChar(n)},i.prototype.xmlStandalone=function(n){return this.options.noValidation?n:n?"yes":"no"},i.prototype.dtdPubID=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},i.prototype.dtdSysID=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},i.prototype.dtdElementValue=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},i.prototype.dtdAttType=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},i.prototype.dtdAttDefault=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},i.prototype.dtdEntityValue=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},i.prototype.dtdNData=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},i.prototype.convertAttKey="@",i.prototype.convertPIKey="?",i.prototype.convertTextKey="#text",i.prototype.convertCDataKey="#cdata",i.prototype.convertCommentKey="#comment",i.prototype.convertRawKey="#raw",i.prototype.assertLegalChar=function(n){var s,o;if(this.options.noValidation)return n;if(s="",this.options.version==="1.0"){if(s=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,o=n.match(s))throw new Error("Invalid character in string: "+n+" at index "+o.index)}else if(this.options.version==="1.1"&&(s=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,o=n.match(s)))throw new Error("Invalid character in string: "+n+" at index "+o.index);return n},i.prototype.assertLegalName=function(n){var s;if(this.options.noValidation)return n;if(this.assertLegalChar(n),s=/^([: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])*$/,!n.match(s))throw new Error("Invalid character in name");return n},i.prototype.textEscape=function(n){var s;return this.options.noValidation?n:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,n.replace(s,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},i.prototype.attEscape=function(n){var s;return this.options.noValidation?n:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,n.replace(s,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},i})()}).call(Lr)});var Ot=S((Pr,Mr)=>{(function(){Mr.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(Pr)});var se=S((Fr,Br)=>{(function(){var r,t,e,i,n,s,o,l,p,m,N,I,E,g,T,b,M,v={}.hasOwnProperty;M=et().assign,r=V(),p=Bt(),m=Xt(),e=Mt(),i=Ft(),I=Pt(),g=jt(),T=kt(),E=Vt(),N=ne(),n=St(),s=Ut(),o=Rt(),l=qt(),t=Ot(),Br.exports=b=(function(){function O(y){var c,a,d;y||(y={}),this.options=y,a=y.writer||{};for(c in a)v.call(a,c)&&(d=a[c],this["_"+c]=this[c],this[c]=d)}return O.prototype.filterOptions=function(y){var c,a,d,A,h,C,w,x;return y||(y={}),y=M({},this.options,y),c={writer:this},c.pretty=y.pretty||!1,c.allowEmpty=y.allowEmpty||!1,c.indent=(a=y.indent)!=null?a:" ",c.newline=(d=y.newline)!=null?d:`
|
|
3
|
-
`,c.offset=(A=y.offset)!=null?A:0,c.dontPrettyTextNodes=(h=(C=y.dontPrettyTextNodes)!=null?C:y.dontprettytextnodes)!=null?h:0,c.spaceBeforeSlash=(w=(x=y.spaceBeforeSlash)!=null?x:y.spacebeforeslash)!=null?w:"",c.spaceBeforeSlash===!0&&(c.spaceBeforeSlash=" "),c.suppressPrettyCount=0,c.user={},c.state=t.None,c},O.prototype.indent=function(y,c,a){var d;return!c.pretty||c.suppressPrettyCount?"":c.pretty&&(d=(a||0)+c.offset+1,d>0)?new Array(d).join(c.indent):""},O.prototype.endline=function(y,c,a){return!c.pretty||c.suppressPrettyCount?"":c.newline},O.prototype.attribute=function(y,c,a){var d;return this.openAttribute(y,c,a),d=" "+y.name+'="'+y.value+'"',this.closeAttribute(y,c,a),d},O.prototype.cdata=function(y,c,a){var d;return this.openNode(y,c,a),c.state=t.OpenTag,d=this.indent(y,c,a)+"<![CDATA[",c.state=t.InsideTag,d+=y.value,c.state=t.CloseTag,d+="]]>"+this.endline(y,c,a),c.state=t.None,this.closeNode(y,c,a),d},O.prototype.comment=function(y,c,a){var d;return this.openNode(y,c,a),c.state=t.OpenTag,d=this.indent(y,c,a)+"<!-- ",c.state=t.InsideTag,d+=y.value,c.state=t.CloseTag,d+=" -->"+this.endline(y,c,a),c.state=t.None,this.closeNode(y,c,a),d},O.prototype.declaration=function(y,c,a){var d;return this.openNode(y,c,a),c.state=t.OpenTag,d=this.indent(y,c,a)+"<?xml",c.state=t.InsideTag,d+=' version="'+y.version+'"',y.encoding!=null&&(d+=' encoding="'+y.encoding+'"'),y.standalone!=null&&(d+=' standalone="'+y.standalone+'"'),c.state=t.CloseTag,d+=c.spaceBeforeSlash+"?>",d+=this.endline(y,c,a),c.state=t.None,this.closeNode(y,c,a),d},O.prototype.docType=function(y,c,a){var d,A,h,C,w;if(a||(a=0),this.openNode(y,c,a),c.state=t.OpenTag,C=this.indent(y,c,a),C+="<!DOCTYPE "+y.root().name,y.pubID&&y.sysID?C+=' PUBLIC "'+y.pubID+'" "'+y.sysID+'"':y.sysID&&(C+=' SYSTEM "'+y.sysID+'"'),y.children.length>0){for(C+=" [",C+=this.endline(y,c,a),c.state=t.InsideTag,w=y.children,A=0,h=w.length;A<h;A++)d=w[A],C+=this.writeChildNode(d,c,a+1);c.state=t.CloseTag,C+="]"}return c.state=t.CloseTag,C+=c.spaceBeforeSlash+">",C+=this.endline(y,c,a),c.state=t.None,this.closeNode(y,c,a),C},O.prototype.element=function(y,c,a){var d,A,h,C,w,x,P,F,R,U,B,W,q,pt;a||(a=0),U=!1,B="",this.openNode(y,c,a),c.state=t.OpenTag,B+=this.indent(y,c,a)+"<"+y.name,W=y.attribs;for(R in W)v.call(W,R)&&(d=W[R],B+=this.attribute(d,c,a));if(h=y.children.length,C=h===0?null:y.children[0],h===0||y.children.every(function(tt){return(tt.type===r.Text||tt.type===r.Raw)&&tt.value===""}))c.allowEmpty?(B+=">",c.state=t.CloseTag,B+="</"+y.name+">"+this.endline(y,c,a)):(c.state=t.CloseTag,B+=c.spaceBeforeSlash+"/>"+this.endline(y,c,a));else if(c.pretty&&h===1&&(C.type===r.Text||C.type===r.Raw)&&C.value!=null)B+=">",c.state=t.InsideTag,c.suppressPrettyCount++,U=!0,B+=this.writeChildNode(C,c,a+1),c.suppressPrettyCount--,U=!1,c.state=t.CloseTag,B+="</"+y.name+">"+this.endline(y,c,a);else{if(c.dontPrettyTextNodes){for(q=y.children,w=0,P=q.length;w<P;w++)if(A=q[w],(A.type===r.Text||A.type===r.Raw)&&A.value!=null){c.suppressPrettyCount++,U=!0;break}}for(B+=">"+this.endline(y,c,a),c.state=t.InsideTag,pt=y.children,x=0,F=pt.length;x<F;x++)A=pt[x],B+=this.writeChildNode(A,c,a+1);c.state=t.CloseTag,B+=this.indent(y,c,a)+"</"+y.name+">",U&&c.suppressPrettyCount--,B+=this.endline(y,c,a),c.state=t.None}return this.closeNode(y,c,a),B},O.prototype.writeChildNode=function(y,c,a){switch(y.type){case r.CData:return this.cdata(y,c,a);case r.Comment:return this.comment(y,c,a);case r.Element:return this.element(y,c,a);case r.Raw:return this.raw(y,c,a);case r.Text:return this.text(y,c,a);case r.ProcessingInstruction:return this.processingInstruction(y,c,a);case r.Dummy:return"";case r.Declaration:return this.declaration(y,c,a);case r.DocType:return this.docType(y,c,a);case r.AttributeDeclaration:return this.dtdAttList(y,c,a);case r.ElementDeclaration:return this.dtdElement(y,c,a);case r.EntityDeclaration:return this.dtdEntity(y,c,a);case r.NotationDeclaration:return this.dtdNotation(y,c,a);default:throw new Error("Unknown XML node type: "+y.constructor.name)}},O.prototype.processingInstruction=function(y,c,a){var d;return this.openNode(y,c,a),c.state=t.OpenTag,d=this.indent(y,c,a)+"<?",c.state=t.InsideTag,d+=y.target,y.value&&(d+=" "+y.value),c.state=t.CloseTag,d+=c.spaceBeforeSlash+"?>",d+=this.endline(y,c,a),c.state=t.None,this.closeNode(y,c,a),d},O.prototype.raw=function(y,c,a){var d;return this.openNode(y,c,a),c.state=t.OpenTag,d=this.indent(y,c,a),c.state=t.InsideTag,d+=y.value,c.state=t.CloseTag,d+=this.endline(y,c,a),c.state=t.None,this.closeNode(y,c,a),d},O.prototype.text=function(y,c,a){var d;return this.openNode(y,c,a),c.state=t.OpenTag,d=this.indent(y,c,a),c.state=t.InsideTag,d+=y.value,c.state=t.CloseTag,d+=this.endline(y,c,a),c.state=t.None,this.closeNode(y,c,a),d},O.prototype.dtdAttList=function(y,c,a){var d;return this.openNode(y,c,a),c.state=t.OpenTag,d=this.indent(y,c,a)+"<!ATTLIST",c.state=t.InsideTag,d+=" "+y.elementName+" "+y.attributeName+" "+y.attributeType,y.defaultValueType!=="#DEFAULT"&&(d+=" "+y.defaultValueType),y.defaultValue&&(d+=' "'+y.defaultValue+'"'),c.state=t.CloseTag,d+=c.spaceBeforeSlash+">"+this.endline(y,c,a),c.state=t.None,this.closeNode(y,c,a),d},O.prototype.dtdElement=function(y,c,a){var d;return this.openNode(y,c,a),c.state=t.OpenTag,d=this.indent(y,c,a)+"<!ELEMENT",c.state=t.InsideTag,d+=" "+y.name+" "+y.value,c.state=t.CloseTag,d+=c.spaceBeforeSlash+">"+this.endline(y,c,a),c.state=t.None,this.closeNode(y,c,a),d},O.prototype.dtdEntity=function(y,c,a){var d;return this.openNode(y,c,a),c.state=t.OpenTag,d=this.indent(y,c,a)+"<!ENTITY",c.state=t.InsideTag,y.pe&&(d+=" %"),d+=" "+y.name,y.value?d+=' "'+y.value+'"':(y.pubID&&y.sysID?d+=' PUBLIC "'+y.pubID+'" "'+y.sysID+'"':y.sysID&&(d+=' SYSTEM "'+y.sysID+'"'),y.nData&&(d+=" NDATA "+y.nData)),c.state=t.CloseTag,d+=c.spaceBeforeSlash+">"+this.endline(y,c,a),c.state=t.None,this.closeNode(y,c,a),d},O.prototype.dtdNotation=function(y,c,a){var d;return this.openNode(y,c,a),c.state=t.OpenTag,d=this.indent(y,c,a)+"<!NOTATION",c.state=t.InsideTag,d+=" "+y.name,y.pubID&&y.sysID?d+=' PUBLIC "'+y.pubID+'" "'+y.sysID+'"':y.pubID?d+=' PUBLIC "'+y.pubID+'"':y.sysID&&(d+=' SYSTEM "'+y.sysID+'"'),c.state=t.CloseTag,d+=c.spaceBeforeSlash+">"+this.endline(y,c,a),c.state=t.None,this.closeNode(y,c,a),d},O.prototype.openNode=function(y,c,a){},O.prototype.closeNode=function(y,c,a){},O.prototype.openAttribute=function(y,c,a){},O.prototype.closeAttribute=function(y,c,a){},O})()}).call(Fr)});var Wt=S((Sr,Rr)=>{(function(){var r,t,e=function(n,s){for(var o in s)i.call(s,o)&&(n[o]=s[o]);function l(){this.constructor=n}return l.prototype=s.prototype,n.prototype=new l,n.__super__=s.prototype,n},i={}.hasOwnProperty;t=se(),Rr.exports=r=(function(n){e(s,n);function s(o){s.__super__.constructor.call(this,o)}return s.prototype.document=function(o,l){var p,m,N,I,E;for(l=this.filterOptions(l),I="",E=o.children,m=0,N=E.length;m<N;m++)p=E[m],I+=this.writeChildNode(p,l,0);return l.pretty&&I.slice(-l.newline.length)===l.newline&&(I=I.slice(0,-l.newline.length)),I},s})(t)}).call(Sr)});var ue=S((Ur,qr)=>{(function(){var r,t,e,i,n,s,o,l,p=function(N,I){for(var E in I)m.call(I,E)&&(N[E]=I[E]);function g(){this.constructor=N}return g.prototype=I.prototype,N.prototype=new g,N.__super__=I.prototype,N},m={}.hasOwnProperty;l=et().isPlainObject,e=re(),t=je(),n=Q(),r=V(),o=oe(),s=Wt(),qr.exports=i=(function(N){p(I,N);function I(E){I.__super__.constructor.call(this,null),this.name="#document",this.type=r.Document,this.documentURI=null,this.domConfig=new t,E||(E={}),E.writer||(E.writer=new s),this.options=E,this.stringify=new o(E)}return Object.defineProperty(I.prototype,"implementation",{value:new e}),Object.defineProperty(I.prototype,"doctype",{get:function(){var E,g,T,b;for(b=this.children,g=0,T=b.length;g<T;g++)if(E=b[g],E.type===r.DocType)return E;return null}}),Object.defineProperty(I.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(I.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(I.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(I.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===r.Declaration?this.children[0].encoding:null}}),Object.defineProperty(I.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===r.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(I.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===r.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(I.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(I.prototype,"origin",{get:function(){return null}}),Object.defineProperty(I.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(I.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(I.prototype,"contentType",{get:function(){return null}}),I.prototype.end=function(E){var g;return g={},E?l(E)&&(g=E,E=this.options.writer):E=this.options.writer,E.document(this,E.filterOptions(g))},I.prototype.toString=function(E){return this.options.writer.document(this,this.options.writer.filterOptions(E))},I.prototype.createElement=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.createTextNode=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.createComment=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.createCDATASection=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.createProcessingInstruction=function(E,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.createAttribute=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.createEntityReference=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.getElementsByTagName=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.importNode=function(E,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.createElementNS=function(E,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.createAttributeNS=function(E,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.getElementsByTagNameNS=function(E,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.getElementById=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.adoptNode=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.renameNode=function(E,g,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.getElementsByClassName=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.createEvent=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.createNodeIterator=function(E,g,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.createTreeWalker=function(E,g,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},I})(n)}).call(Ur)});var kr=S((Xr,jr)=>{(function(){var r,t,e,i,n,s,o,l,p,m,N,I,E,g,T,b,M,v,O,y,c,a,d,A,h={}.hasOwnProperty;A=et(),a=A.isObject,c=A.isFunction,d=A.isPlainObject,y=A.getValue,r=V(),I=ue(),g=Pt(),i=Mt(),n=Ft(),b=jt(),O=kt(),T=Vt(),m=Bt(),N=Xt(),s=St(),l=Rt(),o=Ut(),p=qt(),e=ie(),v=oe(),M=Wt(),t=Ot(),jr.exports=E=(function(){function C(w,x,P){var F;this.name="?xml",this.type=r.Document,w||(w={}),F={},w.writer?d(w.writer)&&(F=w.writer,w.writer=new M):w.writer=new M,this.options=w,this.writer=w.writer,this.writerOptions=this.writer.filterOptions(F),this.stringify=new v(w),this.onDataCallback=x||function(){},this.onEndCallback=P||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return C.prototype.createChildNode=function(w){var x,P,F,R,U,B,W,q;switch(w.type){case r.CData:this.cdata(w.value);break;case r.Comment:this.comment(w.value);break;case r.Element:F={},W=w.attribs;for(P in W)h.call(W,P)&&(x=W[P],F[P]=x.value);this.node(w.name,F);break;case r.Dummy:this.dummy();break;case r.Raw:this.raw(w.value);break;case r.Text:this.text(w.value);break;case r.ProcessingInstruction:this.instruction(w.target,w.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+w.constructor.name)}for(q=w.children,U=0,B=q.length;U<B;U++)R=q[U],this.createChildNode(R),R.type===r.Element&&this.up();return this},C.prototype.dummy=function(){return this},C.prototype.node=function(w,x,P){var F;if(w==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(w));return this.openCurrent(),w=y(w),x==null&&(x={}),x=y(x),a(x)||(F=[x,P],P=F[0],x=F[1]),this.currentNode=new g(this,w,x),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,P!=null&&this.text(P),this},C.prototype.element=function(w,x,P){var F,R,U,B,W,q;if(this.currentNode&&this.currentNode.type===r.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(w)||a(w)||c(w))for(B=this.options.noValidation,this.options.noValidation=!0,q=new I(this.options).element("TEMP_ROOT"),q.element(w),this.options.noValidation=B,W=q.children,R=0,U=W.length;R<U;R++)F=W[R],this.createChildNode(F),F.type===r.Element&&this.up();else this.node(w,x,P);return this},C.prototype.attribute=function(w,x){var P,F;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(w));if(w!=null&&(w=y(w)),a(w))for(P in w)h.call(w,P)&&(F=w[P],this.attribute(P,F));else c(x)&&(x=x.apply()),this.options.keepNullAttributes&&x==null?this.currentNode.attribs[w]=new e(this,w,""):x!=null&&(this.currentNode.attribs[w]=new e(this,w,x));return this},C.prototype.text=function(w){var x;return this.openCurrent(),x=new O(this,w),this.onData(this.writer.text(x,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},C.prototype.cdata=function(w){var x;return this.openCurrent(),x=new i(this,w),this.onData(this.writer.cdata(x,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},C.prototype.comment=function(w){var x;return this.openCurrent(),x=new n(this,w),this.onData(this.writer.comment(x,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},C.prototype.raw=function(w){var x;return this.openCurrent(),x=new b(this,w),this.onData(this.writer.raw(x,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},C.prototype.instruction=function(w,x){var P,F,R,U,B;if(this.openCurrent(),w!=null&&(w=y(w)),x!=null&&(x=y(x)),Array.isArray(w))for(P=0,U=w.length;P<U;P++)F=w[P],this.instruction(F);else if(a(w))for(F in w)h.call(w,F)&&(R=w[F],this.instruction(F,R));else c(x)&&(x=x.apply()),B=new T(this,w,x),this.onData(this.writer.processingInstruction(B,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},C.prototype.declaration=function(w,x,P){var F;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return F=new m(this,w,x,P),this.onData(this.writer.declaration(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},C.prototype.doctype=function(w,x,P){if(this.openCurrent(),w==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 N(this,x,P),this.currentNode.rootNodeName=w,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},C.prototype.dtdElement=function(w,x){var P;return this.openCurrent(),P=new o(this,w,x),this.onData(this.writer.dtdElement(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},C.prototype.attList=function(w,x,P,F,R){var U;return this.openCurrent(),U=new s(this,w,x,P,F,R),this.onData(this.writer.dtdAttList(U,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},C.prototype.entity=function(w,x){var P;return this.openCurrent(),P=new l(this,!1,w,x),this.onData(this.writer.dtdEntity(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},C.prototype.pEntity=function(w,x){var P;return this.openCurrent(),P=new l(this,!0,w,x),this.onData(this.writer.dtdEntity(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},C.prototype.notation=function(w,x){var P;return this.openCurrent(),P=new p(this,w,x),this.onData(this.writer.dtdNotation(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},C.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},C.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},C.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},C.prototype.openNode=function(w){var x,P,F,R;if(!w.isOpen){if(!this.root&&this.currentLevel===0&&w.type===r.Element&&(this.root=w),P="",w.type===r.Element){this.writerOptions.state=t.OpenTag,P=this.writer.indent(w,this.writerOptions,this.currentLevel)+"<"+w.name,R=w.attribs;for(F in R)h.call(R,F)&&(x=R[F],P+=this.writer.attribute(x,this.writerOptions,this.currentLevel));P+=(w.children?">":"/>")+this.writer.endline(w,this.writerOptions,this.currentLevel),this.writerOptions.state=t.InsideTag}else this.writerOptions.state=t.OpenTag,P=this.writer.indent(w,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+w.rootNodeName,w.pubID&&w.sysID?P+=' PUBLIC "'+w.pubID+'" "'+w.sysID+'"':w.sysID&&(P+=' SYSTEM "'+w.sysID+'"'),w.children?(P+=" [",this.writerOptions.state=t.InsideTag):(this.writerOptions.state=t.CloseTag,P+=">"),P+=this.writer.endline(w,this.writerOptions,this.currentLevel);return this.onData(P,this.currentLevel),w.isOpen=!0}},C.prototype.closeNode=function(w){var x;if(!w.isClosed)return x="",this.writerOptions.state=t.CloseTag,w.type===r.Element?x=this.writer.indent(w,this.writerOptions,this.currentLevel)+"</"+w.name+">"+this.writer.endline(w,this.writerOptions,this.currentLevel):x=this.writer.indent(w,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(w,this.writerOptions,this.currentLevel),this.writerOptions.state=t.None,this.onData(x,this.currentLevel),w.isClosed=!0},C.prototype.onData=function(w,x){return this.documentStarted=!0,this.onDataCallback(w,x+1)},C.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},C.prototype.debugInfo=function(w){return w==null?"":"node: <"+w+">"},C.prototype.ele=function(){return this.element.apply(this,arguments)},C.prototype.nod=function(w,x,P){return this.node(w,x,P)},C.prototype.txt=function(w){return this.text(w)},C.prototype.dat=function(w){return this.cdata(w)},C.prototype.com=function(w){return this.comment(w)},C.prototype.ins=function(w,x){return this.instruction(w,x)},C.prototype.dec=function(w,x,P){return this.declaration(w,x,P)},C.prototype.dtd=function(w,x,P){return this.doctype(w,x,P)},C.prototype.e=function(w,x,P){return this.element(w,x,P)},C.prototype.n=function(w,x,P){return this.node(w,x,P)},C.prototype.t=function(w){return this.text(w)},C.prototype.d=function(w){return this.cdata(w)},C.prototype.c=function(w){return this.comment(w)},C.prototype.r=function(w){return this.raw(w)},C.prototype.i=function(w,x){return this.instruction(w,x)},C.prototype.att=function(){return this.currentNode&&this.currentNode.type===r.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},C.prototype.a=function(){return this.currentNode&&this.currentNode.type===r.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},C.prototype.ent=function(w,x){return this.entity(w,x)},C.prototype.pent=function(w,x){return this.pEntity(w,x)},C.prototype.not=function(w,x){return this.notation(w,x)},C})()}).call(Xr)});var Gr=S((Vr,Wr)=>{(function(){var r,t,e,i,n=function(o,l){for(var p in l)s.call(l,p)&&(o[p]=l[p]);function m(){this.constructor=o}return m.prototype=l.prototype,o.prototype=new m,o.__super__=l.prototype,o},s={}.hasOwnProperty;r=V(),i=se(),t=Ot(),Wr.exports=e=(function(o){n(l,o);function l(p,m){this.stream=p,l.__super__.constructor.call(this,m)}return l.prototype.endline=function(p,m,N){return p.isLastRootNode&&m.state===t.CloseTag?"":l.__super__.endline.call(this,p,m,N)},l.prototype.document=function(p,m){var N,I,E,g,T,b,M,v,O;for(M=p.children,I=E=0,T=M.length;E<T;I=++E)N=M[I],N.isLastRootNode=I===p.children.length-1;for(m=this.filterOptions(m),v=p.children,O=[],g=0,b=v.length;g<b;g++)N=v[g],O.push(this.writeChildNode(N,m,0));return O},l.prototype.attribute=function(p,m,N){return this.stream.write(l.__super__.attribute.call(this,p,m,N))},l.prototype.cdata=function(p,m,N){return this.stream.write(l.__super__.cdata.call(this,p,m,N))},l.prototype.comment=function(p,m,N){return this.stream.write(l.__super__.comment.call(this,p,m,N))},l.prototype.declaration=function(p,m,N){return this.stream.write(l.__super__.declaration.call(this,p,m,N))},l.prototype.docType=function(p,m,N){var I,E,g,T;if(N||(N=0),this.openNode(p,m,N),m.state=t.OpenTag,this.stream.write(this.indent(p,m,N)),this.stream.write("<!DOCTYPE "+p.root().name),p.pubID&&p.sysID?this.stream.write(' PUBLIC "'+p.pubID+'" "'+p.sysID+'"'):p.sysID&&this.stream.write(' SYSTEM "'+p.sysID+'"'),p.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(p,m,N)),m.state=t.InsideTag,T=p.children,E=0,g=T.length;E<g;E++)I=T[E],this.writeChildNode(I,m,N+1);m.state=t.CloseTag,this.stream.write("]")}return m.state=t.CloseTag,this.stream.write(m.spaceBeforeSlash+">"),this.stream.write(this.endline(p,m,N)),m.state=t.None,this.closeNode(p,m,N)},l.prototype.element=function(p,m,N){var I,E,g,T,b,M,v,O,y,c;N||(N=0),this.openNode(p,m,N),m.state=t.OpenTag,this.stream.write(this.indent(p,m,N)+"<"+p.name),y=p.attribs;for(v in y)s.call(y,v)&&(I=y[v],this.attribute(I,m,N));if(g=p.children.length,T=g===0?null:p.children[0],g===0||p.children.every(function(a){return(a.type===r.Text||a.type===r.Raw)&&a.value===""}))m.allowEmpty?(this.stream.write(">"),m.state=t.CloseTag,this.stream.write("</"+p.name+">")):(m.state=t.CloseTag,this.stream.write(m.spaceBeforeSlash+"/>"));else if(m.pretty&&g===1&&(T.type===r.Text||T.type===r.Raw)&&T.value!=null)this.stream.write(">"),m.state=t.InsideTag,m.suppressPrettyCount++,O=!0,this.writeChildNode(T,m,N+1),m.suppressPrettyCount--,O=!1,m.state=t.CloseTag,this.stream.write("</"+p.name+">");else{for(this.stream.write(">"+this.endline(p,m,N)),m.state=t.InsideTag,c=p.children,b=0,M=c.length;b<M;b++)E=c[b],this.writeChildNode(E,m,N+1);m.state=t.CloseTag,this.stream.write(this.indent(p,m,N)+"</"+p.name+">")}return this.stream.write(this.endline(p,m,N)),m.state=t.None,this.closeNode(p,m,N)},l.prototype.processingInstruction=function(p,m,N){return this.stream.write(l.__super__.processingInstruction.call(this,p,m,N))},l.prototype.raw=function(p,m,N){return this.stream.write(l.__super__.raw.call(this,p,m,N))},l.prototype.text=function(p,m,N){return this.stream.write(l.__super__.text.call(this,p,m,N))},l.prototype.dtdAttList=function(p,m,N){return this.stream.write(l.__super__.dtdAttList.call(this,p,m,N))},l.prototype.dtdElement=function(p,m,N){return this.stream.write(l.__super__.dtdElement.call(this,p,m,N))},l.prototype.dtdEntity=function(p,m,N){return this.stream.write(l.__super__.dtdEntity.call(this,p,m,N))},l.prototype.dtdNotation=function(p,m,N){return this.stream.write(l.__super__.dtdNotation.call(this,p,m,N))},l})(i)}).call(Vr)});var $r=S((Yr,lt)=>{(function(){var r,t,e,i,n,s,o,l,p,m;m=et(),l=m.assign,p=m.isFunction,e=re(),i=ue(),n=kr(),o=Wt(),s=Gr(),r=V(),t=Ot(),lt.exports.create=function(N,I,E,g){var T,b;if(N==null)throw new Error("Root element needs a name.");return g=l({},I,E,g),T=new i(g),b=T.element(N),g.headless||(T.declaration(g),(g.pubID!=null||g.sysID!=null)&&T.dtd(g)),b},lt.exports.begin=function(N,I,E){var g;return p(N)&&(g=[N,I],I=g[0],E=g[1],N={}),I?new n(N,I,E):new i(N)},lt.exports.stringWriter=function(N){return new o(N)},lt.exports.streamWriter=function(N,I){return new s(N,I)},lt.exports.implementation=new e,lt.exports.nodeType=r,lt.exports.writerState=t}).call(Yr)});var Kr=S(ae=>{(function(){"use strict";var r,t,e,i,n,s={}.hasOwnProperty;r=$r(),t=Lt().defaults,i=function(o){return typeof o=="string"&&(o.indexOf("&")>=0||o.indexOf(">")>=0||o.indexOf("<")>=0)},n=function(o){return"<![CDATA["+e(o)+"]]>"},e=function(o){return o.replace("]]>","]]]]><![CDATA[>")},ae.Builder=(function(){function o(l){var p,m,N;this.options={},m=t["0.2"];for(p in m)s.call(m,p)&&(N=m[p],this.options[p]=N);for(p in l)s.call(l,p)&&(N=l[p],this.options[p]=N)}return o.prototype.buildObject=function(l){var p,m,N,I,E;return p=this.options.attrkey,m=this.options.charkey,Object.keys(l).length===1&&this.options.rootName===t["0.2"].rootName?(E=Object.keys(l)[0],l=l[E]):E=this.options.rootName,N=(function(g){return function(T,b){var M,v,O,y,c,a;if(typeof b!="object")g.options.cdata&&i(b)?T.raw(n(b)):T.txt(b);else if(Array.isArray(b)){for(y in b)if(s.call(b,y)){v=b[y];for(c in v)O=v[c],T=N(T.ele(c),O).up()}}else for(c in b)if(s.call(b,c))if(v=b[c],c===p){if(typeof v=="object")for(M in v)a=v[M],T=T.att(M,a)}else if(c===m)g.options.cdata&&i(v)?T=T.raw(n(v)):T=T.txt(v);else if(Array.isArray(v))for(y in v)s.call(v,y)&&(O=v[y],typeof O=="string"?g.options.cdata&&i(O)?T=T.ele(c).raw(n(O)).up():T=T.ele(c,O).up():T=N(T.ele(c),O).up());else typeof v=="object"?T=N(T.ele(c),v).up():typeof v=="string"&&g.options.cdata&&i(v)?T=T.ele(c).raw(n(v)).up():(v==null&&(v=""),T=T.ele(c,v.toString()).up());return T}})(this),I=r.create(E,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),N(I,l).end(this.options.renderOpts)},o})()}).call(ae)});var Hr=S((oo,zr)=>{zr.exports=Z;function Z(r){if(r)return en(r)}function en(r){for(var t in Z.prototype)r[t]=Z.prototype[t];return r}Z.prototype.on=Z.prototype.addEventListener=function(r,t){return this._callbacks=this._callbacks||{},(this._callbacks[r]=this._callbacks[r]||[]).push(t),this};Z.prototype.once=function(r,t){var e=this;this._callbacks=this._callbacks||{};function i(){e.off(r,i),t.apply(this,arguments)}return i.fn=t,this.on(r,i),this};Z.prototype.off=Z.prototype.removeListener=Z.prototype.removeAllListeners=Z.prototype.removeEventListener=function(r,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var e=this._callbacks[r];if(!e)return this;if(arguments.length==1)return delete this._callbacks[r],this;for(var i,n=0;n<e.length;n++)if(i=e[n],i===t||i.fn===t){e.splice(n,1);break}return this};Z.prototype.emit=function(r){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),e=this._callbacks[r];if(e){e=e.slice(0);for(var i=0,n=e.length;i<n;++i)e[i].apply(this,t)}return this};Z.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks[r]||[]};Z.prototype.hasListeners=function(r){return!!this.listeners(r).length}});var Jr=S((so,Zr)=>{var Qr=Hr();function At(){Qr.call(this)}At.prototype=new Qr;Zr.exports=At;At.Stream=At;At.prototype.pipe=function(r,t){var e=this;function i(N){r.writable&&r.write(N)===!1&&e.pause&&e.pause()}e.on("data",i);function n(){e.readable&&e.resume&&e.resume()}r.on("drain",n),!r._isStdio&&(!t||t.end!==!1)&&(e.on("end",o),e.on("close",l));var s=!1;function o(){s||(s=!0,r.end())}function l(){s||(s=!0,typeof r.destroy=="function"&&r.destroy())}function p(N){if(m(),!this.hasListeners("error"))throw N}e.on("error",p),r.on("error",p);function m(){e.off("data",i),r.off("drain",n),e.off("end",o),e.off("close",l),e.off("error",p),r.off("error",p),e.off("end",m),e.off("close",m),r.off("end",m),r.off("close",m)}return e.on("end",m),e.on("close",m),r.on("end",m),r.on("close",m),r.emit("pipe",e),r}});var ri=S(Gt=>{"use strict";Gt.byteLength=nn;Gt.toByteArray=sn;Gt.fromByteArray=cn;var rt=[],J=[],rn=typeof Uint8Array<"u"?Uint8Array:Array,ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(dt=0,ti=ce.length;dt<ti;++dt)rt[dt]=ce[dt],J[ce.charCodeAt(dt)]=dt;var dt,ti;J[45]=62;J[95]=63;function ei(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");e===-1&&(e=t);var i=e===t?0:4-e%4;return[e,i]}function nn(r){var t=ei(r),e=t[0],i=t[1];return(e+i)*3/4-i}function on(r,t,e){return(t+e)*3/4-e}function sn(r){var t,e=ei(r),i=e[0],n=e[1],s=new rn(on(r,i,n)),o=0,l=n>0?i-4:i,p;for(p=0;p<l;p+=4)t=J[r.charCodeAt(p)]<<18|J[r.charCodeAt(p+1)]<<12|J[r.charCodeAt(p+2)]<<6|J[r.charCodeAt(p+3)],s[o++]=t>>16&255,s[o++]=t>>8&255,s[o++]=t&255;return n===2&&(t=J[r.charCodeAt(p)]<<2|J[r.charCodeAt(p+1)]>>4,s[o++]=t&255),n===1&&(t=J[r.charCodeAt(p)]<<10|J[r.charCodeAt(p+1)]<<4|J[r.charCodeAt(p+2)]>>2,s[o++]=t>>8&255,s[o++]=t&255),s}function un(r){return rt[r>>18&63]+rt[r>>12&63]+rt[r>>6&63]+rt[r&63]}function an(r,t,e){for(var i,n=[],s=t;s<e;s+=3)i=(r[s]<<16&16711680)+(r[s+1]<<8&65280)+(r[s+2]&255),n.push(un(i));return n.join("")}function cn(r){for(var t,e=r.length,i=e%3,n=[],s=16383,o=0,l=e-i;o<l;o+=s)n.push(an(r,o,o+s>l?l:o+s));return i===1?(t=r[e-1],n.push(rt[t>>2]+rt[t<<4&63]+"==")):i===2&&(t=(r[e-2]<<8)+r[e-1],n.push(rt[t>>10]+rt[t>>4&63]+rt[t<<2&63]+"=")),n.join("")}});var ii=S(he=>{he.read=function(r,t,e,i,n){var s,o,l=n*8-i-1,p=(1<<l)-1,m=p>>1,N=-7,I=e?n-1:0,E=e?-1:1,g=r[t+I];for(I+=E,s=g&(1<<-N)-1,g>>=-N,N+=l;N>0;s=s*256+r[t+I],I+=E,N-=8);for(o=s&(1<<-N)-1,s>>=-N,N+=i;N>0;o=o*256+r[t+I],I+=E,N-=8);if(s===0)s=1-m;else{if(s===p)return o?NaN:(g?-1:1)*(1/0);o=o+Math.pow(2,i),s=s-m}return(g?-1:1)*o*Math.pow(2,s-i)};he.write=function(r,t,e,i,n,s){var o,l,p,m=s*8-n-1,N=(1<<m)-1,I=N>>1,E=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=i?0:s-1,T=i?1:-1,b=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,o=N):(o=Math.floor(Math.log(t)/Math.LN2),t*(p=Math.pow(2,-o))<1&&(o--,p*=2),o+I>=1?t+=E/p:t+=E*Math.pow(2,1-I),t*p>=2&&(o++,p/=2),o+I>=N?(l=0,o=N):o+I>=1?(l=(t*p-1)*Math.pow(2,n),o=o+I):(l=t*Math.pow(2,I-1)*Math.pow(2,n),o=0));n>=8;r[e+g]=l&255,g+=T,l/=256,n-=8);for(o=o<<n|l,m+=n;m>0;r[e+g]=o&255,g+=T,o/=256,m-=8);r[e+g-T]|=b*128}});var Ti=S(Dt=>{"use strict";var le=ri(),It=ii(),ni=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Dt.Buffer=_;Dt.SlowBuffer=yn;Dt.INSPECT_MAX_BYTES=50;var Yt=2147483647;Dt.kMaxLength=Yt;_.TYPED_ARRAY_SUPPORT=hn();!_.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 hn(){try{let r=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(r,t),r.foo()===42}catch{return!1}}Object.defineProperty(_.prototype,"parent",{enumerable:!0,get:function(){if(_.isBuffer(this))return this.buffer}});Object.defineProperty(_.prototype,"offset",{enumerable:!0,get:function(){if(_.isBuffer(this))return this.byteOffset}});function st(r){if(r>Yt)throw new RangeError('The value "'+r+'" is invalid for option "size"');let t=new Uint8Array(r);return Object.setPrototypeOf(t,_.prototype),t}function _(r,t,e){if(typeof r=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ye(r)}return ai(r,t,e)}_.poolSize=8192;function ai(r,t,e){if(typeof r=="string")return fn(r,t);if(ArrayBuffer.isView(r))return pn(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(it(r,ArrayBuffer)||r&&it(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(it(r,SharedArrayBuffer)||r&&it(r.buffer,SharedArrayBuffer)))return pe(r,t,e);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let i=r.valueOf&&r.valueOf();if(i!=null&&i!==r)return _.from(i,t,e);let n=dn(r);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return _.from(r[Symbol.toPrimitive]("string"),t,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}_.from=function(r,t,e){return ai(r,t,e)};Object.setPrototypeOf(_.prototype,Uint8Array.prototype);Object.setPrototypeOf(_,Uint8Array);function ci(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function ln(r,t,e){return ci(r),r<=0?st(r):t!==void 0?typeof e=="string"?st(r).fill(t,e):st(r).fill(t):st(r)}_.alloc=function(r,t,e){return ln(r,t,e)};function ye(r){return ci(r),st(r<0?0:me(r)|0)}_.allocUnsafe=function(r){return ye(r)};_.allocUnsafeSlow=function(r){return ye(r)};function fn(r,t){if((typeof t!="string"||t==="")&&(t="utf8"),!_.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let e=hi(r,t)|0,i=st(e),n=i.write(r,t);return n!==e&&(i=i.slice(0,n)),i}function fe(r){let t=r.length<0?0:me(r.length)|0,e=st(t);for(let i=0;i<t;i+=1)e[i]=r[i]&255;return e}function pn(r){if(it(r,Uint8Array)){let t=new Uint8Array(r);return pe(t.buffer,t.byteOffset,t.byteLength)}return fe(r)}function pe(r,t,e){if(t<0||r.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<t+(e||0))throw new RangeError('"length" is outside of buffer bounds');let i;return t===void 0&&e===void 0?i=new Uint8Array(r):e===void 0?i=new Uint8Array(r,t):i=new Uint8Array(r,t,e),Object.setPrototypeOf(i,_.prototype),i}function dn(r){if(_.isBuffer(r)){let t=me(r.length)|0,e=st(t);return e.length===0||r.copy(e,0,0,t),e}if(r.length!==void 0)return typeof r.length!="number"||we(r.length)?st(0):fe(r);if(r.type==="Buffer"&&Array.isArray(r.data))return fe(r.data)}function me(r){if(r>=Yt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Yt.toString(16)+" bytes");return r|0}function yn(r){return+r!=r&&(r=0),_.alloc(+r)}_.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==_.prototype};_.compare=function(t,e){if(it(t,Uint8Array)&&(t=_.from(t,t.offset,t.byteLength)),it(e,Uint8Array)&&(e=_.from(e,e.offset,e.byteLength)),!_.isBuffer(t)||!_.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let i=t.length,n=e.length;for(let s=0,o=Math.min(i,n);s<o;++s)if(t[s]!==e[s]){i=t[s],n=e[s];break}return i<n?-1:n<i?1:0};_.isEncoding=function(t){switch(String(t).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}};_.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return _.alloc(0);let i;if(e===void 0)for(e=0,i=0;i<t.length;++i)e+=t[i].length;let n=_.allocUnsafe(e),s=0;for(i=0;i<t.length;++i){let o=t[i];if(it(o,Uint8Array))s+o.length>n.length?(_.isBuffer(o)||(o=_.from(o)),o.copy(n,s)):Uint8Array.prototype.set.call(n,o,s);else if(_.isBuffer(o))o.copy(n,s);else throw new TypeError('"list" argument must be an Array of Buffers');s+=o.length}return n};function hi(r,t){if(_.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||it(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);let e=r.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&e===0)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return de(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Ei(r).length;default:if(n)return i?-1:de(r).length;t=(""+t).toLowerCase(),n=!0}}_.byteLength=hi;function mn(r,t,e){let i=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return On(this,t,e);case"utf8":case"utf-8":return fi(this,t,e);case"ascii":return bn(this,t,e);case"latin1":case"binary":return xn(this,t,e);case"base64":return Nn(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return An(this,t,e);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),i=!0}}_.prototype._isBuffer=!0;function yt(r,t,e){let i=r[t];r[t]=r[e],r[e]=i}_.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)yt(this,e,e+1);return this};_.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)yt(this,e,e+3),yt(this,e+1,e+2);return this};_.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)yt(this,e,e+7),yt(this,e+1,e+6),yt(this,e+2,e+5),yt(this,e+3,e+4);return this};_.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?fi(this,0,t):mn.apply(this,arguments)};_.prototype.toLocaleString=_.prototype.toString;_.prototype.equals=function(t){if(!_.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:_.compare(this,t)===0};_.prototype.inspect=function(){let t="",e=Dt.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"};ni&&(_.prototype[ni]=_.prototype.inspect);_.prototype.compare=function(t,e,i,n,s){if(it(t,Uint8Array)&&(t=_.from(t,t.offset,t.byteLength)),!_.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(e===void 0&&(e=0),i===void 0&&(i=t?t.length:0),n===void 0&&(n=0),s===void 0&&(s=this.length),e<0||i>t.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&e>=i)return 0;if(n>=s)return-1;if(e>=i)return 1;if(e>>>=0,i>>>=0,n>>>=0,s>>>=0,this===t)return 0;let o=s-n,l=i-e,p=Math.min(o,l),m=this.slice(n,s),N=t.slice(e,i);for(let I=0;I<p;++I)if(m[I]!==N[I]){o=m[I],l=N[I];break}return o<l?-1:l<o?1:0};function li(r,t,e,i,n){if(r.length===0)return-1;if(typeof e=="string"?(i=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,we(e)&&(e=n?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(n)return-1;e=r.length-1}else if(e<0)if(n)e=0;else return-1;if(typeof t=="string"&&(t=_.from(t,i)),_.isBuffer(t))return t.length===0?-1:oi(r,t,e,i,n);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):oi(r,[t],e,i,n);throw new TypeError("val must be string, number or Buffer")}function oi(r,t,e,i,n){let s=1,o=r.length,l=t.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(r.length<2||t.length<2)return-1;s=2,o/=2,l/=2,e/=2}function p(N,I){return s===1?N[I]:N.readUInt16BE(I*s)}let m;if(n){let N=-1;for(m=e;m<o;m++)if(p(r,m)===p(t,N===-1?0:m-N)){if(N===-1&&(N=m),m-N+1===l)return N*s}else N!==-1&&(m-=m-N),N=-1}else for(e+l>o&&(e=o-l),m=e;m>=0;m--){let N=!0;for(let I=0;I<l;I++)if(p(r,m+I)!==p(t,I)){N=!1;break}if(N)return m}return-1}_.prototype.includes=function(t,e,i){return this.indexOf(t,e,i)!==-1};_.prototype.indexOf=function(t,e,i){return li(this,t,e,i,!0)};_.prototype.lastIndexOf=function(t,e,i){return li(this,t,e,i,!1)};function gn(r,t,e,i){e=Number(e)||0;let n=r.length-e;i?(i=Number(i),i>n&&(i=n)):i=n;let s=t.length;i>s/2&&(i=s/2);let o;for(o=0;o<i;++o){let l=parseInt(t.substr(o*2,2),16);if(we(l))return o;r[e+o]=l}return o}function wn(r,t,e,i){return $t(de(t,r.length-e),r,e,i)}function En(r,t,e,i){return $t(vn(t),r,e,i)}function Tn(r,t,e,i){return $t(Ei(t),r,e,i)}function In(r,t,e,i){return $t(Pn(t,r.length-e),r,e,i)}_.prototype.write=function(t,e,i,n){if(e===void 0)n="utf8",i=this.length,e=0;else if(i===void 0&&typeof e=="string")n=e,i=this.length,e=0;else if(isFinite(e))e=e>>>0,isFinite(i)?(i=i>>>0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let s=this.length-e;if((i===void 0||i>s)&&(i=s),t.length>0&&(i<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return gn(this,t,e,i);case"utf8":case"utf-8":return wn(this,t,e,i);case"ascii":case"latin1":case"binary":return En(this,t,e,i);case"base64":return Tn(this,t,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return In(this,t,e,i);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};_.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Nn(r,t,e){return t===0&&e===r.length?le.fromByteArray(r):le.fromByteArray(r.slice(t,e))}function fi(r,t,e){e=Math.min(r.length,e);let i=[],n=t;for(;n<e;){let s=r[n],o=null,l=s>239?4:s>223?3:s>191?2:1;if(n+l<=e){let p,m,N,I;switch(l){case 1:s<128&&(o=s);break;case 2:p=r[n+1],(p&192)===128&&(I=(s&31)<<6|p&63,I>127&&(o=I));break;case 3:p=r[n+1],m=r[n+2],(p&192)===128&&(m&192)===128&&(I=(s&15)<<12|(p&63)<<6|m&63,I>2047&&(I<55296||I>57343)&&(o=I));break;case 4:p=r[n+1],m=r[n+2],N=r[n+3],(p&192)===128&&(m&192)===128&&(N&192)===128&&(I=(s&15)<<18|(p&63)<<12|(m&63)<<6|N&63,I>65535&&I<1114112&&(o=I))}}o===null?(o=65533,l=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|o&1023),i.push(o),n+=l}return Dn(i)}var si=4096;function Dn(r){let t=r.length;if(t<=si)return String.fromCharCode.apply(String,r);let e="",i=0;for(;i<t;)e+=String.fromCharCode.apply(String,r.slice(i,i+=si));return e}function bn(r,t,e){let i="";e=Math.min(r.length,e);for(let n=t;n<e;++n)i+=String.fromCharCode(r[n]&127);return i}function xn(r,t,e){let i="";e=Math.min(r.length,e);for(let n=t;n<e;++n)i+=String.fromCharCode(r[n]);return i}function On(r,t,e){let i=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>i)&&(e=i);let n="";for(let s=t;s<e;++s)n+=Mn[r[s]];return n}function An(r,t,e){let i=r.slice(t,e),n="";for(let s=0;s<i.length-1;s+=2)n+=String.fromCharCode(i[s]+i[s+1]*256);return n}_.prototype.slice=function(t,e){let i=this.length;t=~~t,e=e===void 0?i:~~e,t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),e<t&&(e=t);let n=this.subarray(t,e);return Object.setPrototypeOf(n,_.prototype),n};function Y(r,t,e){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}_.prototype.readUintLE=_.prototype.readUIntLE=function(t,e,i){t=t>>>0,e=e>>>0,i||Y(t,e,this.length);let n=this[t],s=1,o=0;for(;++o<e&&(s*=256);)n+=this[t+o]*s;return n};_.prototype.readUintBE=_.prototype.readUIntBE=function(t,e,i){t=t>>>0,e=e>>>0,i||Y(t,e,this.length);let n=this[t+--e],s=1;for(;e>0&&(s*=256);)n+=this[t+--e]*s;return n};_.prototype.readUint8=_.prototype.readUInt8=function(t,e){return t=t>>>0,e||Y(t,1,this.length),this[t]};_.prototype.readUint16LE=_.prototype.readUInt16LE=function(t,e){return t=t>>>0,e||Y(t,2,this.length),this[t]|this[t+1]<<8};_.prototype.readUint16BE=_.prototype.readUInt16BE=function(t,e){return t=t>>>0,e||Y(t,2,this.length),this[t]<<8|this[t+1]};_.prototype.readUint32LE=_.prototype.readUInt32LE=function(t,e){return t=t>>>0,e||Y(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};_.prototype.readUint32BE=_.prototype.readUInt32BE=function(t,e){return t=t>>>0,e||Y(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};_.prototype.readBigUInt64LE=ft(function(t){t=t>>>0,Nt(t,"offset");let e=this[t],i=this[t+7];(e===void 0||i===void 0)&&Ct(t,this.length-8);let n=e+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,s=this[++t]+this[++t]*2**8+this[++t]*2**16+i*2**24;return BigInt(n)+(BigInt(s)<<BigInt(32))});_.prototype.readBigUInt64BE=ft(function(t){t=t>>>0,Nt(t,"offset");let e=this[t],i=this[t+7];(e===void 0||i===void 0)&&Ct(t,this.length-8);let n=e*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],s=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+i;return(BigInt(n)<<BigInt(32))+BigInt(s)});_.prototype.readIntLE=function(t,e,i){t=t>>>0,e=e>>>0,i||Y(t,e,this.length);let n=this[t],s=1,o=0;for(;++o<e&&(s*=256);)n+=this[t+o]*s;return s*=128,n>=s&&(n-=Math.pow(2,8*e)),n};_.prototype.readIntBE=function(t,e,i){t=t>>>0,e=e>>>0,i||Y(t,e,this.length);let n=e,s=1,o=this[t+--n];for(;n>0&&(s*=256);)o+=this[t+--n]*s;return s*=128,o>=s&&(o-=Math.pow(2,8*e)),o};_.prototype.readInt8=function(t,e){return t=t>>>0,e||Y(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};_.prototype.readInt16LE=function(t,e){t=t>>>0,e||Y(t,2,this.length);let i=this[t]|this[t+1]<<8;return i&32768?i|4294901760:i};_.prototype.readInt16BE=function(t,e){t=t>>>0,e||Y(t,2,this.length);let i=this[t+1]|this[t]<<8;return i&32768?i|4294901760:i};_.prototype.readInt32LE=function(t,e){return t=t>>>0,e||Y(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};_.prototype.readInt32BE=function(t,e){return t=t>>>0,e||Y(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};_.prototype.readBigInt64LE=ft(function(t){t=t>>>0,Nt(t,"offset");let e=this[t],i=this[t+7];(e===void 0||i===void 0)&&Ct(t,this.length-8);let n=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(i<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});_.prototype.readBigInt64BE=ft(function(t){t=t>>>0,Nt(t,"offset");let e=this[t],i=this[t+7];(e===void 0||i===void 0)&&Ct(t,this.length-8);let n=(e<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+i)});_.prototype.readFloatLE=function(t,e){return t=t>>>0,e||Y(t,4,this.length),It.read(this,t,!0,23,4)};_.prototype.readFloatBE=function(t,e){return t=t>>>0,e||Y(t,4,this.length),It.read(this,t,!1,23,4)};_.prototype.readDoubleLE=function(t,e){return t=t>>>0,e||Y(t,8,this.length),It.read(this,t,!0,52,8)};_.prototype.readDoubleBE=function(t,e){return t=t>>>0,e||Y(t,8,this.length),It.read(this,t,!1,52,8)};function H(r,t,e,i,n,s){if(!_.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<s)throw new RangeError('"value" argument is out of bounds');if(e+i>r.length)throw new RangeError("Index out of range")}_.prototype.writeUintLE=_.prototype.writeUIntLE=function(t,e,i,n){if(t=+t,e=e>>>0,i=i>>>0,!n){let l=Math.pow(2,8*i)-1;H(this,t,e,i,l,0)}let s=1,o=0;for(this[e]=t&255;++o<i&&(s*=256);)this[e+o]=t/s&255;return e+i};_.prototype.writeUintBE=_.prototype.writeUIntBE=function(t,e,i,n){if(t=+t,e=e>>>0,i=i>>>0,!n){let l=Math.pow(2,8*i)-1;H(this,t,e,i,l,0)}let s=i-1,o=1;for(this[e+s]=t&255;--s>=0&&(o*=256);)this[e+s]=t/o&255;return e+i};_.prototype.writeUint8=_.prototype.writeUInt8=function(t,e,i){return t=+t,e=e>>>0,i||H(this,t,e,1,255,0),this[e]=t&255,e+1};_.prototype.writeUint16LE=_.prototype.writeUInt16LE=function(t,e,i){return t=+t,e=e>>>0,i||H(this,t,e,2,65535,0),this[e]=t&255,this[e+1]=t>>>8,e+2};_.prototype.writeUint16BE=_.prototype.writeUInt16BE=function(t,e,i){return t=+t,e=e>>>0,i||H(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=t&255,e+2};_.prototype.writeUint32LE=_.prototype.writeUInt32LE=function(t,e,i){return t=+t,e=e>>>0,i||H(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255,e+4};_.prototype.writeUint32BE=_.prototype.writeUInt32BE=function(t,e,i){return t=+t,e=e>>>0,i||H(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4};function pi(r,t,e,i,n){wi(t,i,n,r,e,7);let s=Number(t&BigInt(4294967295));r[e++]=s,s=s>>8,r[e++]=s,s=s>>8,r[e++]=s,s=s>>8,r[e++]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return r[e++]=o,o=o>>8,r[e++]=o,o=o>>8,r[e++]=o,o=o>>8,r[e++]=o,e}function di(r,t,e,i,n){wi(t,i,n,r,e,7);let s=Number(t&BigInt(4294967295));r[e+7]=s,s=s>>8,r[e+6]=s,s=s>>8,r[e+5]=s,s=s>>8,r[e+4]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return r[e+3]=o,o=o>>8,r[e+2]=o,o=o>>8,r[e+1]=o,o=o>>8,r[e]=o,e+8}_.prototype.writeBigUInt64LE=ft(function(t,e=0){return pi(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))});_.prototype.writeBigUInt64BE=ft(function(t,e=0){return di(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))});_.prototype.writeIntLE=function(t,e,i,n){if(t=+t,e=e>>>0,!n){let p=Math.pow(2,8*i-1);H(this,t,e,i,p-1,-p)}let s=0,o=1,l=0;for(this[e]=t&255;++s<i&&(o*=256);)t<0&&l===0&&this[e+s-1]!==0&&(l=1),this[e+s]=(t/o>>0)-l&255;return e+i};_.prototype.writeIntBE=function(t,e,i,n){if(t=+t,e=e>>>0,!n){let p=Math.pow(2,8*i-1);H(this,t,e,i,p-1,-p)}let s=i-1,o=1,l=0;for(this[e+s]=t&255;--s>=0&&(o*=256);)t<0&&l===0&&this[e+s+1]!==0&&(l=1),this[e+s]=(t/o>>0)-l&255;return e+i};_.prototype.writeInt8=function(t,e,i){return t=+t,e=e>>>0,i||H(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=t&255,e+1};_.prototype.writeInt16LE=function(t,e,i){return t=+t,e=e>>>0,i||H(this,t,e,2,32767,-32768),this[e]=t&255,this[e+1]=t>>>8,e+2};_.prototype.writeInt16BE=function(t,e,i){return t=+t,e=e>>>0,i||H(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=t&255,e+2};_.prototype.writeInt32LE=function(t,e,i){return t=+t,e=e>>>0,i||H(this,t,e,4,2147483647,-2147483648),this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4};_.prototype.writeInt32BE=function(t,e,i){return t=+t,e=e>>>0,i||H(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4};_.prototype.writeBigInt64LE=ft(function(t,e=0){return pi(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});_.prototype.writeBigInt64BE=ft(function(t,e=0){return di(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function yi(r,t,e,i,n,s){if(e+i>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function mi(r,t,e,i,n){return t=+t,e=e>>>0,n||yi(r,t,e,4,34028234663852886e22,-34028234663852886e22),It.write(r,t,e,i,23,4),e+4}_.prototype.writeFloatLE=function(t,e,i){return mi(this,t,e,!0,i)};_.prototype.writeFloatBE=function(t,e,i){return mi(this,t,e,!1,i)};function gi(r,t,e,i,n){return t=+t,e=e>>>0,n||yi(r,t,e,8,17976931348623157e292,-17976931348623157e292),It.write(r,t,e,i,52,8),e+8}_.prototype.writeDoubleLE=function(t,e,i){return gi(this,t,e,!0,i)};_.prototype.writeDoubleBE=function(t,e,i){return gi(this,t,e,!1,i)};_.prototype.copy=function(t,e,i,n){if(!_.isBuffer(t))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&n!==0&&(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<i&&(n=i),n===i||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-i&&(n=t.length-e+i);let s=n-i;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(e,i,n):Uint8Array.prototype.set.call(t,this.subarray(i,n),e),s};_.prototype.fill=function(t,e,i,n){if(typeof t=="string"){if(typeof e=="string"?(n=e,e=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!_.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(t.length===1){let o=t.charCodeAt(0);(n==="utf8"&&o<128||n==="latin1")&&(t=o)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(e<0||this.length<e||this.length<i)throw new RangeError("Out of range index");if(i<=e)return this;e=e>>>0,i=i===void 0?this.length:i>>>0,t||(t=0);let s;if(typeof t=="number")for(s=e;s<i;++s)this[s]=t;else{let o=_.isBuffer(t)?t:_.from(t,n),l=o.length;if(l===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(s=0;s<i-e;++s)this[s+e]=o[s%l]}return this};var Tt={};function ge(r,t,e){Tt[r]=class extends e{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name}get code(){return r}set code(n){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:n,writable:!0})}toString(){return`${this.name} [${r}]: ${this.message}`}}}ge("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);ge("ERR_INVALID_ARG_TYPE",function(r,t){return`The "${r}" argument must be of type number. Received type ${typeof t}`},TypeError);ge("ERR_OUT_OF_RANGE",function(r,t,e){let i=`The value of "${r}" is out of range.`,n=e;return Number.isInteger(e)&&Math.abs(e)>2**32?n=ui(String(e)):typeof e=="bigint"&&(n=String(e),(e>BigInt(2)**BigInt(32)||e<-(BigInt(2)**BigInt(32)))&&(n=ui(n)),n+="n"),i+=` It must be ${t}. Received ${n}`,i},RangeError);function ui(r){let t="",e=r.length,i=r[0]==="-"?1:0;for(;e>=i+4;e-=3)t=`_${r.slice(e-3,e)}${t}`;return`${r.slice(0,e)}${t}`}function Cn(r,t,e){Nt(t,"offset"),(r[t]===void 0||r[t+e]===void 0)&&Ct(t,r.length-(e+1))}function wi(r,t,e,i,n,s){if(r>e||r<t){let o=typeof t=="bigint"?"n":"",l;throw s>3?t===0||t===BigInt(0)?l=`>= 0${o} and < 2${o} ** ${(s+1)*8}${o}`:l=`>= -(2${o} ** ${(s+1)*8-1}${o}) and < 2 ** ${(s+1)*8-1}${o}`:l=`>= ${t}${o} and <= ${e}${o}`,new Tt.ERR_OUT_OF_RANGE("value",l,r)}Cn(i,n,s)}function Nt(r,t){if(typeof r!="number")throw new Tt.ERR_INVALID_ARG_TYPE(t,"number",r)}function Ct(r,t,e){throw Math.floor(r)!==r?(Nt(r,e),new Tt.ERR_OUT_OF_RANGE(e||"offset","an integer",r)):t<0?new Tt.ERR_BUFFER_OUT_OF_BOUNDS:new Tt.ERR_OUT_OF_RANGE(e||"offset",`>= ${e?1:0} and <= ${t}`,r)}var _n=/[^+/0-9A-Za-z-_]/g;function Ln(r){if(r=r.split("=")[0],r=r.trim().replace(_n,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function de(r,t){t=t||1/0;let e,i=r.length,n=null,s=[];for(let o=0;o<i;++o){if(e=r.charCodeAt(o),e>55295&&e<57344){if(!n){if(e>56319){(t-=3)>-1&&s.push(239,191,189);continue}else if(o+1===i){(t-=3)>-1&&s.push(239,191,189);continue}n=e;continue}if(e<56320){(t-=3)>-1&&s.push(239,191,189),n=e;continue}e=(n-55296<<10|e-56320)+65536}else n&&(t-=3)>-1&&s.push(239,191,189);if(n=null,e<128){if((t-=1)<0)break;s.push(e)}else if(e<2048){if((t-=2)<0)break;s.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;s.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;s.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return s}function vn(r){let t=[];for(let e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function Pn(r,t){let e,i,n,s=[];for(let o=0;o<r.length&&!((t-=2)<0);++o)e=r.charCodeAt(o),i=e>>8,n=e%256,s.push(n),s.push(i);return s}function Ei(r){return le.toByteArray(Ln(r))}function $t(r,t,e,i){let n;for(n=0;n<i&&!(n+e>=t.length||n>=r.length);++n)t[n+e]=r[n];return n}function it(r,t){return r instanceof t||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===t.name}function we(r){return r!==r}var Mn=(function(){let r="0123456789abcdef",t=new Array(256);for(let e=0;e<16;++e){let i=e*16;for(let n=0;n<16;++n)t[i+n]=r[e]+r[n]}return t})();function ft(r){return typeof BigInt>"u"?Fn:r}function Fn(){throw new Error("BigInt not supported")}});var Di=S((Ee,Ni)=>{var Kt=Ti(),nt=Kt.Buffer;function Ii(r,t){for(var e in r)t[e]=r[e]}nt.from&&nt.alloc&&nt.allocUnsafe&&nt.allocUnsafeSlow?Ni.exports=Kt:(Ii(Kt,Ee),Ee.Buffer=mt);function mt(r,t,e){return nt(r,t,e)}mt.prototype=Object.create(nt.prototype);Ii(nt,mt);mt.from=function(r,t,e){if(typeof r=="number")throw new TypeError("Argument must not be a number");return nt(r,t,e)};mt.alloc=function(r,t,e){if(typeof r!="number")throw new TypeError("Argument must be a number");var i=nt(r);return t!==void 0?typeof e=="string"?i.fill(t,e):i.fill(t):i.fill(0),i};mt.allocUnsafe=function(r){if(typeof r!="number")throw new TypeError("Argument must be a number");return nt(r)};mt.allocUnsafeSlow=function(r){if(typeof r!="number")throw new TypeError("Argument must be a number");return Kt.SlowBuffer(r)}});var Oi=S(xi=>{"use strict";var Ie=Di().Buffer,bi=Ie.isEncoding||function(r){switch(r=""+r,r&&r.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 Bn(r){if(!r)return"utf8";for(var t;;)switch(r){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 r;default:if(t)return;r=(""+r).toLowerCase(),t=!0}}function Sn(r){var t=Bn(r);if(typeof t!="string"&&(Ie.isEncoding===bi||!bi(r)))throw new Error("Unknown encoding: "+r);return t||r}xi.StringDecoder=_t;function _t(r){this.encoding=Sn(r);var t;switch(this.encoding){case"utf16le":this.text=kn,this.end=Vn,t=4;break;case"utf8":this.fillLast=qn,t=4;break;case"base64":this.text=Wn,this.end=Gn,t=3;break;default:this.write=Yn,this.end=$n;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Ie.allocUnsafe(t)}_t.prototype.write=function(r){if(r.length===0)return"";var t,e;if(this.lastNeed){if(t=this.fillLast(r),t===void 0)return"";e=this.lastNeed,this.lastNeed=0}else e=0;return e<r.length?t?t+this.text(r,e):this.text(r,e):t||""};_t.prototype.end=jn;_t.prototype.text=Xn;_t.prototype.fillLast=function(r){if(this.lastNeed<=r.length)return r.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);r.copy(this.lastChar,this.lastTotal-this.lastNeed,0,r.length),this.lastNeed-=r.length};function Te(r){return r<=127?0:r>>5===6?2:r>>4===14?3:r>>3===30?4:r>>6===2?-1:-2}function Rn(r,t,e){var i=t.length-1;if(i<e)return 0;var n=Te(t[i]);return n>=0?(n>0&&(r.lastNeed=n-1),n):--i<e||n===-2?0:(n=Te(t[i]),n>=0?(n>0&&(r.lastNeed=n-2),n):--i<e||n===-2?0:(n=Te(t[i]),n>=0?(n>0&&(n===2?n=0:r.lastNeed=n-3),n):0))}function Un(r,t,e){if((t[0]&192)!==128)return r.lastNeed=0,"\uFFFD";if(r.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return r.lastNeed=1,"\uFFFD";if(r.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return r.lastNeed=2,"\uFFFD"}}function qn(r){var t=this.lastTotal-this.lastNeed,e=Un(this,r,t);if(e!==void 0)return e;if(this.lastNeed<=r.length)return r.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);r.copy(this.lastChar,t,0,r.length),this.lastNeed-=r.length}function Xn(r,t){var e=Rn(this,r,t);if(!this.lastNeed)return r.toString("utf8",t);this.lastTotal=e;var i=r.length-(e-this.lastNeed);return r.copy(this.lastChar,0,i),r.toString("utf8",t,i)}function jn(r){var t=r&&r.length?this.write(r):"";return this.lastNeed?t+"\uFFFD":t}function kn(r,t){if((r.length-t)%2===0){var e=r.toString("utf16le",t);if(e){var i=e.charCodeAt(e.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=r[r.length-2],this.lastChar[1]=r[r.length-1],e.slice(0,-1)}return e}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=r[r.length-1],r.toString("utf16le",t,r.length-1)}function Vn(r){var t=r&&r.length?this.write(r):"";if(this.lastNeed){var e=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,e)}return t}function Wn(r,t){var e=(r.length-t)%3;return e===0?r.toString("base64",t):(this.lastNeed=3-e,this.lastTotal=3,e===1?this.lastChar[0]=r[r.length-1]:(this.lastChar[0]=r[r.length-2],this.lastChar[1]=r[r.length-1]),r.toString("base64",t,r.length-e))}function Gn(r){var t=r&&r.length?this.write(r):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function Yn(r){return r.toString(this.encoding)}function $n(r){return r&&r.length?this.write(r):""}});var Ai=S(zt=>{(function(r){r.parser=function(f,u){return new e(f,u)},r.SAXParser=e,r.SAXStream=m,r.createStream=p,r.MAX_BUFFER_LENGTH=64*1024;var t=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];r.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function e(f,u){if(!(this instanceof e))return new e(f,u);var L=this;n(L),L.q=L.c="",L.bufferCheckPosition=r.MAX_BUFFER_LENGTH,L.opt=u||{},L.opt.lowercase=L.opt.lowercase||L.opt.lowercasetags,L.looseCase=L.opt.lowercase?"toLowerCase":"toUpperCase",L.tags=[],L.closed=L.closedRoot=L.sawRoot=!1,L.tag=L.error=null,L.strict=!!f,L.noscript=!!(f||L.opt.noscript),L.state=h.BEGIN,L.strictEntities=L.opt.strictEntities,L.ENTITIES=L.strictEntities?Object.create(r.XML_ENTITIES):Object.create(r.ENTITIES),L.attribList=[],L.opt.xmlns&&(L.ns=Object.create(T)),L.opt.unquotedAttributeValues===void 0&&(L.opt.unquotedAttributeValues=!f),L.trackPosition=L.opt.position!==!1,L.trackPosition&&(L.position=L.line=L.column=0),w(L,"onready")}Object.create||(Object.create=function(f){function u(){}u.prototype=f;var L=new u;return L}),Object.keys||(Object.keys=function(f){var u=[];for(var L in f)f.hasOwnProperty(L)&&u.push(L);return u});function i(f){for(var u=Math.max(r.MAX_BUFFER_LENGTH,10),L=0,D=0,X=t.length;D<X;D++){var k=f[t[D]].length;if(k>u)switch(t[D]){case"textNode":P(f);break;case"cdata":x(f,"oncdata",f.cdata),f.cdata="";break;case"script":x(f,"onscript",f.script),f.script="";break;default:R(f,"Max buffer length exceeded: "+t[D])}L=Math.max(L,k)}var G=r.MAX_BUFFER_LENGTH-L;f.bufferCheckPosition=G+f.position}function n(f){for(var u=0,L=t.length;u<L;u++)f[t[u]]=""}function s(f){P(f),f.cdata!==""&&(x(f,"oncdata",f.cdata),f.cdata=""),f.script!==""&&(x(f,"onscript",f.script),f.script="")}e.prototype={end:function(){U(this)},write:Yi,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){s(this)}};var o;try{o=Jr().Stream}catch{o=function(){}}o||(o=function(){});var l=r.EVENTS.filter(function(f){return f!=="error"&&f!=="end"});function p(f,u){return new m(f,u)}function m(f,u){if(!(this instanceof m))return new m(f,u);o.apply(this),this._parser=new e(f,u),this.writable=!0,this.readable=!0;var L=this;this._parser.onend=function(){L.emit("end")},this._parser.onerror=function(D){L.emit("error",D),L._parser.error=null},this._decoder=null,l.forEach(function(D){Object.defineProperty(L,"on"+D,{get:function(){return L._parser["on"+D]},set:function(X){if(!X)return L.removeAllListeners(D),L._parser["on"+D]=X,X;L.on(D,X)},enumerable:!0,configurable:!1})})}m.prototype=Object.create(o.prototype,{constructor:{value:m}}),m.prototype.write=function(f){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(f)){if(!this._decoder){var u=Oi().StringDecoder;this._decoder=new u("utf8")}f=this._decoder.write(f)}return this._parser.write(f.toString()),this.emit("data",f),!0},m.prototype.end=function(f){return f&&f.length&&this.write(f),this._parser.end(),!0},m.prototype.on=function(f,u){var L=this;return!L._parser["on"+f]&&l.indexOf(f)!==-1&&(L._parser["on"+f]=function(){var D=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);D.splice(0,0,f),L.emit.apply(L,D)}),o.prototype.on.call(L,f,u)};var N="[CDATA[",I="DOCTYPE",E="http://www.w3.org/XML/1998/namespace",g="http://www.w3.org/2000/xmlns/",T={xml:E,xmlns:g},b=/[:_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]/,M=/[:_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-]/,v=/[#:_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]/,O=/[#:_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 y(f){return f===" "||f===`
|
|
4
|
-
`||f==="\r"||f===" "}function c(f){return f==='"'||f==="'"}function a(f){return f===">"||y(f)}function d(f,u){return f.test(u)}function A(f,u){return!d(f,u)}var h=0;r.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++},r.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},r.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(r.ENTITIES).forEach(function(f){var u=r.ENTITIES[f],L=typeof u=="number"?String.fromCharCode(u):u;r.ENTITIES[f]=L});for(var C in r.STATE)r.STATE[r.STATE[C]]=C;h=r.STATE;function w(f,u,L){f[u]&&f[u](L)}function x(f,u,L){f.textNode&&P(f),w(f,u,L)}function P(f){f.textNode=F(f.opt,f.textNode),f.textNode&&w(f,"ontext",f.textNode),f.textNode=""}function F(f,u){return f.trim&&(u=u.trim()),f.normalize&&(u=u.replace(/\s+/g," ")),u}function R(f,u){return P(f),f.trackPosition&&(u+=`
|
|
5
|
-
Line: `+f.line+`
|
|
6
|
-
Column: `+f.column+`
|
|
7
|
-
Char: `+f.c),u=new Error(u),f.error=u,w(f,"onerror",u),f}function U(f){return f.sawRoot&&!f.closedRoot&&B(f,"Unclosed root tag"),f.state!==h.BEGIN&&f.state!==h.BEGIN_WHITESPACE&&f.state!==h.TEXT&&R(f,"Unexpected end"),P(f),f.c="",f.closed=!0,w(f,"onend"),e.call(f,f.strict,f.opt),f}function B(f,u){if(typeof f!="object"||!(f instanceof e))throw new Error("bad call to strictFail");f.strict&&R(f,u)}function W(f){f.strict||(f.tagName=f.tagName[f.looseCase]());var u=f.tags[f.tags.length-1]||f,L=f.tag={name:f.tagName,attributes:{}};f.opt.xmlns&&(L.ns=u.ns),f.attribList.length=0,x(f,"onopentagstart",L)}function q(f,u){var L=f.indexOf(":"),D=L<0?["",f]:f.split(":"),X=D[0],k=D[1];return u&&f==="xmlns"&&(X="xmlns",k=""),{prefix:X,local:k}}function pt(f){if(f.strict||(f.attribName=f.attribName[f.looseCase]()),f.attribList.indexOf(f.attribName)!==-1||f.tag.attributes.hasOwnProperty(f.attribName)){f.attribName=f.attribValue="";return}if(f.opt.xmlns){var u=q(f.attribName,!0),L=u.prefix,D=u.local;if(L==="xmlns")if(D==="xml"&&f.attribValue!==E)B(f,"xml: prefix must be bound to "+E+`
|
|
8
|
-
Actual: `+f.attribValue);else if(D==="xmlns"&&f.attribValue!==g)B(f,"xmlns: prefix must be bound to "+g+`
|
|
9
|
-
Actual: `+f.attribValue);else{var X=f.tag,k=f.tags[f.tags.length-1]||f;X.ns===k.ns&&(X.ns=Object.create(k.ns)),X.ns[D]=f.attribValue}f.attribList.push([f.attribName,f.attribValue])}else f.tag.attributes[f.attribName]=f.attribValue,x(f,"onattribute",{name:f.attribName,value:f.attribValue});f.attribName=f.attribValue=""}function tt(f,u){if(f.opt.xmlns){var L=f.tag,D=q(f.tagName);L.prefix=D.prefix,L.local=D.local,L.uri=L.ns[D.prefix]||"",L.prefix&&!L.uri&&(B(f,"Unbound namespace prefix: "+JSON.stringify(f.tagName)),L.uri=D.prefix);var X=f.tags[f.tags.length-1]||f;L.ns&&X.ns!==L.ns&&Object.keys(L.ns).forEach(function(Ce){x(f,"onopennamespace",{prefix:Ce,uri:L.ns[Ce]})});for(var k=0,G=f.attribList.length;k<G;k++){var K=f.attribList[k],z=K[0],Et=K[1],$=q(z,!0),ot=$.prefix,$i=$.local,Ae=ot===""?"":L.ns[ot]||"",te={name:z,value:Et,prefix:ot,local:$i,uri:Ae};ot&&ot!=="xmlns"&&!Ae&&(B(f,"Unbound namespace prefix: "+JSON.stringify(ot)),te.uri=ot),f.tag.attributes[z]=te,x(f,"onattribute",te)}f.attribList.length=0}f.tag.isSelfClosing=!!u,f.sawRoot=!0,f.tags.push(f.tag),x(f,"onopentag",f.tag),u||(!f.noscript&&f.tagName.toLowerCase()==="script"?f.state=h.SCRIPT:f.state=h.TEXT,f.tag=null,f.tagName=""),f.attribName=f.attribValue="",f.attribList.length=0}function Zt(f){if(!f.tagName){B(f,"Weird empty close tag."),f.textNode+="</>",f.state=h.TEXT;return}if(f.script){if(f.tagName!=="script"){f.script+="</"+f.tagName+">",f.tagName="",f.state=h.SCRIPT;return}x(f,"onscript",f.script),f.script=""}var u=f.tags.length,L=f.tagName;f.strict||(L=L[f.looseCase]());for(var D=L;u--;){var X=f.tags[u];if(X.name!==D)B(f,"Unexpected close tag");else break}if(u<0){B(f,"Unmatched closing tag: "+f.tagName),f.textNode+="</"+f.tagName+">",f.state=h.TEXT;return}f.tagName=L;for(var k=f.tags.length;k-- >u;){var G=f.tag=f.tags.pop();f.tagName=f.tag.name,x(f,"onclosetag",f.tagName);var K={};for(var z in G.ns)K[z]=G.ns[z];var Et=f.tags[f.tags.length-1]||f;f.opt.xmlns&&G.ns!==Et.ns&&Object.keys(G.ns).forEach(function($){var ot=G.ns[$];x(f,"onclosenamespace",{prefix:$,uri:ot})})}u===0&&(f.closedRoot=!0),f.tagName=f.attribValue=f.attribName="",f.attribList.length=0,f.state=h.TEXT}function Gi(f){var u=f.entity,L=u.toLowerCase(),D,X="";return f.ENTITIES[u]?f.ENTITIES[u]:f.ENTITIES[L]?f.ENTITIES[L]:(u=L,u.charAt(0)==="#"&&(u.charAt(1)==="x"?(u=u.slice(2),D=parseInt(u,16),X=D.toString(16)):(u=u.slice(1),D=parseInt(u,10),X=D.toString(10))),u=u.replace(/^0+/,""),isNaN(D)||X.toLowerCase()!==u||D<0||D>1114111?(B(f,"Invalid character entity"),"&"+f.entity+";"):String.fromCodePoint(D))}function Oe(f,u){u==="<"?(f.state=h.OPEN_WAKA,f.startTagPosition=f.position):y(u)||(B(f,"Non-whitespace before first tag."),f.textNode=u,f.state=h.TEXT)}function Jt(f,u){var L="";return u<f.length&&(L=f.charAt(u)),L}function Yi(f){var u=this;if(this.error)throw this.error;if(u.closed)return R(u,"Cannot write after close. Assign an onready handler.");if(f===null)return U(u);typeof f=="object"&&(f=f.toString());for(var L=0,D="";D=Jt(f,L++),u.c=D,!!D;)switch(u.trackPosition&&(u.position++,D===`
|
|
10
|
-
`?(u.line++,u.column=0):u.column++),u.state){case h.BEGIN:if(u.state=h.BEGIN_WHITESPACE,D==="\uFEFF")continue;Oe(u,D);continue;case h.BEGIN_WHITESPACE:Oe(u,D);continue;case h.TEXT:if(u.sawRoot&&!u.closedRoot){for(var k=L-1;D&&D!=="<"&&D!=="&";)D=Jt(f,L++),D&&u.trackPosition&&(u.position++,D===`
|
|
11
|
-
`?(u.line++,u.column=0):u.column++);u.textNode+=f.substring(k,L-1)}D==="<"&&!(u.sawRoot&&u.closedRoot&&!u.strict)?(u.state=h.OPEN_WAKA,u.startTagPosition=u.position):(!y(D)&&(!u.sawRoot||u.closedRoot)&&B(u,"Text data outside of root node."),D==="&"?u.state=h.TEXT_ENTITY:u.textNode+=D);continue;case h.SCRIPT:D==="<"?u.state=h.SCRIPT_ENDING:u.script+=D;continue;case h.SCRIPT_ENDING:D==="/"?u.state=h.CLOSE_TAG:(u.script+="<"+D,u.state=h.SCRIPT);continue;case h.OPEN_WAKA:if(D==="!")u.state=h.SGML_DECL,u.sgmlDecl="";else if(!y(D))if(d(b,D))u.state=h.OPEN_TAG,u.tagName=D;else if(D==="/")u.state=h.CLOSE_TAG,u.tagName="";else if(D==="?")u.state=h.PROC_INST,u.procInstName=u.procInstBody="";else{if(B(u,"Unencoded <"),u.startTagPosition+1<u.position){var X=u.position-u.startTagPosition;D=new Array(X).join(" ")+D}u.textNode+="<"+D,u.state=h.TEXT}continue;case h.SGML_DECL:if(u.sgmlDecl+D==="--"){u.state=h.COMMENT,u.comment="",u.sgmlDecl="";continue}u.doctype&&u.doctype!==!0&&u.sgmlDecl?(u.state=h.DOCTYPE_DTD,u.doctype+="<!"+u.sgmlDecl+D,u.sgmlDecl=""):(u.sgmlDecl+D).toUpperCase()===N?(x(u,"onopencdata"),u.state=h.CDATA,u.sgmlDecl="",u.cdata=""):(u.sgmlDecl+D).toUpperCase()===I?(u.state=h.DOCTYPE,(u.doctype||u.sawRoot)&&B(u,"Inappropriately located doctype declaration"),u.doctype="",u.sgmlDecl=""):D===">"?(x(u,"onsgmldeclaration",u.sgmlDecl),u.sgmlDecl="",u.state=h.TEXT):(c(D)&&(u.state=h.SGML_DECL_QUOTED),u.sgmlDecl+=D);continue;case h.SGML_DECL_QUOTED:D===u.q&&(u.state=h.SGML_DECL,u.q=""),u.sgmlDecl+=D;continue;case h.DOCTYPE:D===">"?(u.state=h.TEXT,x(u,"ondoctype",u.doctype),u.doctype=!0):(u.doctype+=D,D==="["?u.state=h.DOCTYPE_DTD:c(D)&&(u.state=h.DOCTYPE_QUOTED,u.q=D));continue;case h.DOCTYPE_QUOTED:u.doctype+=D,D===u.q&&(u.q="",u.state=h.DOCTYPE);continue;case h.DOCTYPE_DTD:D==="]"?(u.doctype+=D,u.state=h.DOCTYPE):D==="<"?(u.state=h.OPEN_WAKA,u.startTagPosition=u.position):c(D)?(u.doctype+=D,u.state=h.DOCTYPE_DTD_QUOTED,u.q=D):u.doctype+=D;continue;case h.DOCTYPE_DTD_QUOTED:u.doctype+=D,D===u.q&&(u.state=h.DOCTYPE_DTD,u.q="");continue;case h.COMMENT:D==="-"?u.state=h.COMMENT_ENDING:u.comment+=D;continue;case h.COMMENT_ENDING:D==="-"?(u.state=h.COMMENT_ENDED,u.comment=F(u.opt,u.comment),u.comment&&x(u,"oncomment",u.comment),u.comment=""):(u.comment+="-"+D,u.state=h.COMMENT);continue;case h.COMMENT_ENDED:D!==">"?(B(u,"Malformed comment"),u.comment+="--"+D,u.state=h.COMMENT):u.doctype&&u.doctype!==!0?u.state=h.DOCTYPE_DTD:u.state=h.TEXT;continue;case h.CDATA:for(var k=L-1;D&&D!=="]";)D=Jt(f,L++),D&&u.trackPosition&&(u.position++,D===`
|
|
12
|
-
`?(u.line++,u.column=0):u.column++);u.cdata+=f.substring(k,L-1),D==="]"&&(u.state=h.CDATA_ENDING);continue;case h.CDATA_ENDING:D==="]"?u.state=h.CDATA_ENDING_2:(u.cdata+="]"+D,u.state=h.CDATA);continue;case h.CDATA_ENDING_2:D===">"?(u.cdata&&x(u,"oncdata",u.cdata),x(u,"onclosecdata"),u.cdata="",u.state=h.TEXT):D==="]"?u.cdata+="]":(u.cdata+="]]"+D,u.state=h.CDATA);continue;case h.PROC_INST:D==="?"?u.state=h.PROC_INST_ENDING:y(D)?u.state=h.PROC_INST_BODY:u.procInstName+=D;continue;case h.PROC_INST_BODY:if(!u.procInstBody&&y(D))continue;D==="?"?u.state=h.PROC_INST_ENDING:u.procInstBody+=D;continue;case h.PROC_INST_ENDING:D===">"?(x(u,"onprocessinginstruction",{name:u.procInstName,body:u.procInstBody}),u.procInstName=u.procInstBody="",u.state=h.TEXT):(u.procInstBody+="?"+D,u.state=h.PROC_INST_BODY);continue;case h.OPEN_TAG:d(M,D)?u.tagName+=D:(W(u),D===">"?tt(u):D==="/"?u.state=h.OPEN_TAG_SLASH:(y(D)||B(u,"Invalid character in tag name"),u.state=h.ATTRIB));continue;case h.OPEN_TAG_SLASH:D===">"?(tt(u,!0),Zt(u)):(B(u,"Forward-slash in opening tag not followed by >"),u.state=h.ATTRIB);continue;case h.ATTRIB:if(y(D))continue;D===">"?tt(u):D==="/"?u.state=h.OPEN_TAG_SLASH:d(b,D)?(u.attribName=D,u.attribValue="",u.state=h.ATTRIB_NAME):B(u,"Invalid attribute name");continue;case h.ATTRIB_NAME:D==="="?u.state=h.ATTRIB_VALUE:D===">"?(B(u,"Attribute without value"),u.attribValue=u.attribName,pt(u),tt(u)):y(D)?u.state=h.ATTRIB_NAME_SAW_WHITE:d(M,D)?u.attribName+=D:B(u,"Invalid attribute name");continue;case h.ATTRIB_NAME_SAW_WHITE:if(D==="=")u.state=h.ATTRIB_VALUE;else{if(y(D))continue;B(u,"Attribute without value"),u.tag.attributes[u.attribName]="",u.attribValue="",x(u,"onattribute",{name:u.attribName,value:""}),u.attribName="",D===">"?tt(u):d(b,D)?(u.attribName=D,u.state=h.ATTRIB_NAME):(B(u,"Invalid attribute name"),u.state=h.ATTRIB)}continue;case h.ATTRIB_VALUE:if(y(D))continue;c(D)?(u.q=D,u.state=h.ATTRIB_VALUE_QUOTED):(u.opt.unquotedAttributeValues||R(u,"Unquoted attribute value"),u.state=h.ATTRIB_VALUE_UNQUOTED,u.attribValue=D);continue;case h.ATTRIB_VALUE_QUOTED:if(D!==u.q){D==="&"?u.state=h.ATTRIB_VALUE_ENTITY_Q:u.attribValue+=D;continue}pt(u),u.q="",u.state=h.ATTRIB_VALUE_CLOSED;continue;case h.ATTRIB_VALUE_CLOSED:y(D)?u.state=h.ATTRIB:D===">"?tt(u):D==="/"?u.state=h.OPEN_TAG_SLASH:d(b,D)?(B(u,"No whitespace between attributes"),u.attribName=D,u.attribValue="",u.state=h.ATTRIB_NAME):B(u,"Invalid attribute name");continue;case h.ATTRIB_VALUE_UNQUOTED:if(!a(D)){D==="&"?u.state=h.ATTRIB_VALUE_ENTITY_U:u.attribValue+=D;continue}pt(u),D===">"?tt(u):u.state=h.ATTRIB;continue;case h.CLOSE_TAG:if(u.tagName)D===">"?Zt(u):d(M,D)?u.tagName+=D:u.script?(u.script+="</"+u.tagName,u.tagName="",u.state=h.SCRIPT):(y(D)||B(u,"Invalid tagname in closing tag"),u.state=h.CLOSE_TAG_SAW_WHITE);else{if(y(D))continue;A(b,D)?u.script?(u.script+="</"+D,u.state=h.SCRIPT):B(u,"Invalid tagname in closing tag."):u.tagName=D}continue;case h.CLOSE_TAG_SAW_WHITE:if(y(D))continue;D===">"?Zt(u):B(u,"Invalid characters in closing tag");continue;case h.TEXT_ENTITY:case h.ATTRIB_VALUE_ENTITY_Q:case h.ATTRIB_VALUE_ENTITY_U:var G,K;switch(u.state){case h.TEXT_ENTITY:G=h.TEXT,K="textNode";break;case h.ATTRIB_VALUE_ENTITY_Q:G=h.ATTRIB_VALUE_QUOTED,K="attribValue";break;case h.ATTRIB_VALUE_ENTITY_U:G=h.ATTRIB_VALUE_UNQUOTED,K="attribValue";break}if(D===";"){var z=Gi(u);u.opt.unparsedEntities&&!Object.values(r.XML_ENTITIES).includes(z)?(u.entity="",u.state=G,u.write(z)):(u[K]+=z,u.entity="",u.state=G)}else d(u.entity.length?O:v,D)?u.entity+=D:(B(u,"Invalid character in entity name"),u[K]+="&"+u.entity+D,u.entity="",u.state=G);continue;default:throw new Error(u,"Unknown state: "+u.state)}return u.position>=u.bufferCheckPosition&&i(u),u}String.fromCodePoint||(function(){var f=String.fromCharCode,u=Math.floor,L=function(){var D=16384,X=[],k,G,K=-1,z=arguments.length;if(!z)return"";for(var Et="";++K<z;){var $=Number(arguments[K]);if(!isFinite($)||$<0||$>1114111||u($)!==$)throw RangeError("Invalid code point: "+$);$<=65535?X.push($):($-=65536,k=($>>10)+55296,G=$%1024+56320,X.push(k,G)),(K+1===z||X.length>D)&&(Et+=f.apply(null,X),X.length=0)}return Et};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:L,configurable:!0,writable:!0}):String.fromCodePoint=L})()})(typeof zt>"u"?zt.sax={}:zt)});var Ui=S((po,Ne)=>{"use strict";var bt=typeof Reflect=="object"?Reflect:null,Ci=bt&&typeof bt.apply=="function"?bt.apply:function(t,e,i){return Function.prototype.apply.call(t,e,i)},Ht;bt&&typeof bt.ownKeys=="function"?Ht=bt.ownKeys:Object.getOwnPropertySymbols?Ht=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Ht=function(t){return Object.getOwnPropertyNames(t)};function Kn(r){console&&console.warn&&console.warn(r)}var Li=Number.isNaN||function(t){return t!==t};function j(){j.init.call(this)}Ne.exports=j;Ne.exports.once=Zn;j.EventEmitter=j;j.prototype._events=void 0;j.prototype._eventsCount=0;j.prototype._maxListeners=void 0;var _i=10;function Qt(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(j,"defaultMaxListeners",{enumerable:!0,get:function(){return _i},set:function(r){if(typeof r!="number"||r<0||Li(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");_i=r}});j.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};j.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Li(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function vi(r){return r._maxListeners===void 0?j.defaultMaxListeners:r._maxListeners}j.prototype.getMaxListeners=function(){return vi(this)};j.prototype.emit=function(t){for(var e=[],i=1;i<arguments.length;i++)e.push(arguments[i]);var n=t==="error",s=this._events;if(s!==void 0)n=n&&s.error===void 0;else if(!n)return!1;if(n){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var p=s[t];if(p===void 0)return!1;if(typeof p=="function")Ci(p,this,e);else for(var m=p.length,N=Si(p,m),i=0;i<m;++i)Ci(N[i],this,e);return!0};function Pi(r,t,e,i){var n,s,o;if(Qt(e),s=r._events,s===void 0?(s=r._events=Object.create(null),r._eventsCount=0):(s.newListener!==void 0&&(r.emit("newListener",t,e.listener?e.listener:e),s=r._events),o=s[t]),o===void 0)o=s[t]=e,++r._eventsCount;else if(typeof o=="function"?o=s[t]=i?[e,o]:[o,e]:i?o.unshift(e):o.push(e),n=vi(r),n>0&&o.length>n&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=r,l.type=t,l.count=o.length,Kn(l)}return r}j.prototype.addListener=function(t,e){return Pi(this,t,e,!1)};j.prototype.on=j.prototype.addListener;j.prototype.prependListener=function(t,e){return Pi(this,t,e,!0)};function zn(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Mi(r,t,e){var i={fired:!1,wrapFn:void 0,target:r,type:t,listener:e},n=zn.bind(i);return n.listener=e,i.wrapFn=n,n}j.prototype.once=function(t,e){return Qt(e),this.on(t,Mi(this,t,e)),this};j.prototype.prependOnceListener=function(t,e){return Qt(e),this.prependListener(t,Mi(this,t,e)),this};j.prototype.removeListener=function(t,e){var i,n,s,o,l;if(Qt(e),n=this._events,n===void 0)return this;if(i=n[t],i===void 0)return this;if(i===e||i.listener===e)--this._eventsCount===0?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,i.listener||e));else if(typeof i!="function"){for(s=-1,o=i.length-1;o>=0;o--)if(i[o]===e||i[o].listener===e){l=i[o].listener,s=o;break}if(s<0)return this;s===0?i.shift():Hn(i,s),i.length===1&&(n[t]=i[0]),n.removeListener!==void 0&&this.emit("removeListener",t,l||e)}return this};j.prototype.off=j.prototype.removeListener;j.prototype.removeAllListeners=function(t){var e,i,n;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[t]),this;if(arguments.length===0){var s=Object.keys(i),o;for(n=0;n<s.length;++n)o=s[n],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(e=i[t],typeof e=="function")this.removeListener(t,e);else if(e!==void 0)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this};function Fi(r,t,e){var i=r._events;if(i===void 0)return[];var n=i[t];return n===void 0?[]:typeof n=="function"?e?[n.listener||n]:[n]:e?Qn(n):Si(n,n.length)}j.prototype.listeners=function(t){return Fi(this,t,!0)};j.prototype.rawListeners=function(t){return Fi(this,t,!1)};j.listenerCount=function(r,t){return typeof r.listenerCount=="function"?r.listenerCount(t):Bi.call(r,t)};j.prototype.listenerCount=Bi;function Bi(r){var t=this._events;if(t!==void 0){var e=t[r];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}j.prototype.eventNames=function(){return this._eventsCount>0?Ht(this._events):[]};function Si(r,t){for(var e=new Array(t),i=0;i<t;++i)e[i]=r[i];return e}function Hn(r,t){for(;t+1<r.length;t++)r[t]=r[t+1];r.pop()}function Qn(r){for(var t=new Array(r.length),e=0;e<t.length;++e)t[e]=r[e].listener||r[e];return t}function Zn(r,t){return new Promise(function(e,i){function n(o){r.removeListener(t,s),i(o)}function s(){typeof r.removeListener=="function"&&r.removeListener("error",n),e([].slice.call(arguments))}Ri(r,t,s,{once:!0}),t!=="error"&&Jn(r,n,{once:!0})})}function Jn(r,t,e){typeof r.on=="function"&&Ri(r,"error",t,e)}function Ri(r,t,e,i){if(typeof r.on=="function")i.once?r.once(t,e):r.on(t,e);else if(typeof r.addEventListener=="function")r.addEventListener(t,function n(s){i.once&&r.removeEventListener(t,n),e(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof r)}});var qi=S(De=>{(function(){"use strict";De.stripBOM=function(r){return r[0]==="\uFEFF"?r.substring(1):r}}).call(De)});var be=S(gt=>{(function(){"use strict";var r;r=new RegExp(/(?!xmlns)^.*:/),gt.normalize=function(t){return t.toLowerCase()},gt.firstCharLowerCase=function(t){return t.charAt(0).toLowerCase()+t.slice(1)},gt.stripPrefix=function(t){return t.replace(r,"")},gt.parseNumbers=function(t){return isNaN(t)||(t=t%1===0?parseInt(t,10):parseFloat(t)),t},gt.parseBooleans=function(t){return/^(?:true|false)$/i.test(t)&&(t=t.toLowerCase()==="true"),t}}).call(gt)});var ji=S(Xi=>{Xi.every=function(r){return new xe(r)};var ut={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5};for(wt in ut)wt==="millisecond"?ut.ms=ut[wt]:ut[wt.charAt(0)]=ut[wt],ut[wt+"s"]=ut[wt];var wt;function xe(r){this.count=0;var t=eo(r);t&&(this.time=Number(t[0])*ut[t[1]],this.type=t[1])}xe.prototype.do=function(r){this.time&&(this.interval=setInterval(e,this.time));var t=this;function e(){t.count++,r.call(t)}return this};xe.prototype.stop=function(){return this.interval&&(clearInterval(this.interval),delete this.interval),this};var to=/^\s*(\d+(?:\.\d+)?)\s*([a-z]+)\s*$/;function eo(r){var t=r.match(to);return t&&ut[t[2]]?t.slice(1):null}});var ki=S(at=>{(function(){"use strict";var r,t,e,i,n,s,o,l,p,m=function(E,g){return function(){return E.apply(g,arguments)}},N=function(E,g){for(var T in g)I.call(g,T)&&(E[T]=g[T]);function b(){this.constructor=E}return b.prototype=g.prototype,E.prototype=new b,E.__super__=g.prototype,E},I={}.hasOwnProperty;l=Ai(),i=Ui(),r=qi(),o=be(),p=ji().setImmediate,t=Lt().defaults,n=function(E){return typeof E=="object"&&E!=null&&Object.keys(E).length===0},s=function(E,g,T){var b,M,v;for(b=0,M=E.length;b<M;b++)v=E[b],g=v(g,T);return g},e=function(E,g,T){var b;return b=Object.create(null),b.value=T,b.writable=!0,b.enumerable=!0,b.configurable=!0,Object.defineProperty(E,g,b)},at.Parser=(function(E){N(g,E);function g(T){this.parseStringPromise=m(this.parseStringPromise,this),this.parseString=m(this.parseString,this),this.reset=m(this.reset,this),this.assignOrPush=m(this.assignOrPush,this),this.processAsync=m(this.processAsync,this);var b,M,v;if(!(this instanceof at.Parser))return new at.Parser(T);this.options={},M=t["0.2"];for(b in M)I.call(M,b)&&(v=M[b],this.options[b]=v);for(b in T)I.call(T,b)&&(v=T[b],this.options[b]=v);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(o.normalize)),this.reset()}return g.prototype.processAsync=function(){var T,b;try{return this.remaining.length<=this.options.chunkSize?(T=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(T),this.saxParser.close()):(T=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(T),p(this.processAsync))}catch(M){if(b=M,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(b)}},g.prototype.assignOrPush=function(T,b,M){return b in T?(T[b]instanceof Array||e(T,b,[T[b]]),T[b].push(M)):this.options.explicitArray?e(T,b,[M]):e(T,b,M)},g.prototype.reset=function(){var T,b,M,v;return this.removeAllListeners(),this.saxParser=l.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=(function(O){return function(y){if(O.saxParser.resume(),!O.saxParser.errThrown)return O.saxParser.errThrown=!0,O.emit("error",y)}})(this),this.saxParser.onend=(function(O){return function(){if(!O.saxParser.ended)return O.saxParser.ended=!0,O.emit("end",O.resultObject)}})(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,v=[],T=this.options.attrkey,b=this.options.charkey,this.saxParser.onopentag=(function(O){return function(y){var c,a,d,A,h;if(d={},d[b]="",!O.options.ignoreAttrs){h=y.attributes;for(c in h)I.call(h,c)&&(!(T in d)&&!O.options.mergeAttrs&&(d[T]={}),a=O.options.attrValueProcessors?s(O.options.attrValueProcessors,y.attributes[c],c):y.attributes[c],A=O.options.attrNameProcessors?s(O.options.attrNameProcessors,c):c,O.options.mergeAttrs?O.assignOrPush(d,A,a):e(d[T],A,a))}return d["#name"]=O.options.tagNameProcessors?s(O.options.tagNameProcessors,y.name):y.name,O.options.xmlns&&(d[O.options.xmlnskey]={uri:y.uri,local:y.local}),v.push(d)}})(this),this.saxParser.onclosetag=(function(O){return function(){var y,c,a,d,A,h,C,w,x,P;if(h=v.pop(),A=h["#name"],(!O.options.explicitChildren||!O.options.preserveChildrenOrder)&&delete h["#name"],h.cdata===!0&&(y=h.cdata,delete h.cdata),x=v[v.length-1],h[b].match(/^\s*$/)&&!y?(c=h[b],delete h[b]):(O.options.trim&&(h[b]=h[b].trim()),O.options.normalize&&(h[b]=h[b].replace(/\s{2,}/g," ").trim()),h[b]=O.options.valueProcessors?s(O.options.valueProcessors,h[b],A):h[b],Object.keys(h).length===1&&b in h&&!O.EXPLICIT_CHARKEY&&(h=h[b])),n(h)&&(typeof O.options.emptyTag=="function"?h=O.options.emptyTag():h=O.options.emptyTag!==""?O.options.emptyTag:c),O.options.validator!=null&&(P="/"+(function(){var F,R,U;for(U=[],F=0,R=v.length;F<R;F++)d=v[F],U.push(d["#name"]);return U})().concat(A).join("/"),(function(){var F;try{return h=O.options.validator(P,x&&x[A],h)}catch(R){return F=R,O.emit("error",F)}})()),O.options.explicitChildren&&!O.options.mergeAttrs&&typeof h=="object"){if(!O.options.preserveChildrenOrder)d={},O.options.attrkey in h&&(d[O.options.attrkey]=h[O.options.attrkey],delete h[O.options.attrkey]),!O.options.charsAsChildren&&O.options.charkey in h&&(d[O.options.charkey]=h[O.options.charkey],delete h[O.options.charkey]),Object.getOwnPropertyNames(h).length>0&&(d[O.options.childkey]=h),h=d;else if(x){x[O.options.childkey]=x[O.options.childkey]||[],C={};for(a in h)I.call(h,a)&&e(C,a,h[a]);x[O.options.childkey].push(C),delete h["#name"],Object.keys(h).length===1&&b in h&&!O.EXPLICIT_CHARKEY&&(h=h[b])}}return v.length>0?O.assignOrPush(x,A,h):(O.options.explicitRoot&&(w=h,h={},e(h,A,w)),O.resultObject=h,O.saxParser.ended=!0,O.emit("end",O.resultObject))}})(this),M=(function(O){return function(y){var c,a;if(a=v[v.length-1],a)return a[b]+=y,O.options.explicitChildren&&O.options.preserveChildrenOrder&&O.options.charsAsChildren&&(O.options.includeWhiteChars||y.replace(/\\n/g,"").trim()!=="")&&(a[O.options.childkey]=a[O.options.childkey]||[],c={"#name":"__text__"},c[b]=y,O.options.normalize&&(c[b]=c[b].replace(/\s{2,}/g," ").trim()),a[O.options.childkey].push(c)),a}})(this),this.saxParser.ontext=M,this.saxParser.oncdata=(function(O){return function(y){var c;if(c=M(y),c)return c.cdata=!0}})(this)},g.prototype.parseString=function(T,b){var M;b!=null&&typeof b=="function"&&(this.on("end",function(v){return this.reset(),b(null,v)}),this.on("error",function(v){return this.reset(),b(v)}));try{return T=T.toString(),T.trim()===""?(this.emit("end",null),!0):(T=r.stripBOM(T),this.options.async?(this.remaining=T,p(this.processAsync),this.saxParser):this.saxParser.write(T).close())}catch(v){if(M=v,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw M}else return this.emit("error",M),this.saxParser.errThrown=!0}},g.prototype.parseStringPromise=function(T){return new Promise((function(b){return function(M,v){return b.parseString(T,function(O,y){return O?v(O):M(y)})}})(this))},g})(i),at.parseString=function(E,g,T){var b,M,v;return T!=null?(typeof T=="function"&&(b=T),typeof g=="object"&&(M=g)):(typeof g=="function"&&(b=g),M={}),v=new at.Parser(M),v.parseString(E,b)},at.parseStringPromise=function(E,g){var T,b;return typeof g=="object"&&(T=g),b=new at.Parser(T),b.parseStringPromise(E)}}).call(at)});var Vi=S(ct=>{(function(){"use strict";var r,t,e,i,n=function(o,l){for(var p in l)s.call(l,p)&&(o[p]=l[p]);function m(){this.constructor=o}return m.prototype=l.prototype,o.prototype=new m,o.__super__=l.prototype,o},s={}.hasOwnProperty;t=Lt(),r=Kr(),e=ki(),i=be(),ct.defaults=t.defaults,ct.processors=i,ct.ValidationError=(function(o){n(l,o);function l(p){this.message=p}return l})(Error),ct.Builder=r.Builder,ct.Parser=e.Parser,ct.parseString=e.parseString,ct.parseStringPromise=e.parseStringPromise}).call(ct)});var Wi=tn(Vi());self.onmessage=async r=>{let{sourceType:t,value:e}=r.data,i;try{t==="xml"?i=await(0,Wi.parseStringPromise)(e):i=null,self.postMessage(i)}catch{self.postMessage(null)}};
|