diff --git a/.gitmodules b/.gitmodules
index 16820a0..d574706 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -21,7 +21,7 @@
url = https://github.com/seabre/simplify-geometry.git
[submodule "togpx"]
path = vendor/togpx
- url = https://github.com/tyrasd/togpx.git
+ url = https://github.com/jwenzler/togpx.git
[submodule "geojson-to-path"]
path = vendor/geojson-to-path
url = https://github.com/Wilkins/geojson-to-path.git
@@ -34,15 +34,15 @@
[submodule "i18next"]
path = vendor/i18next
url = https://github.com/i18next/i18next
-[submodule "leaflet-gpx"]
- path = vendor/leaflet-gpx
- url = https://github.com/mpetazzoni/leaflet-gpx
+#[submodule "leaflet-gpx"]
+# path = vendor/leaflet-gpx
+# url = https://github.com/mpetazzoni/leaflet-gpx
[submodule "Leaflet.FileLayer"]
path = vendor/Leaflet.FileLayer
url = https://github.com/nrenner/Leaflet.FileLayer/
-[submodule "vendor/gpx"]
- path = vendor/gpx
- url = https://github.com/Wilkins/gpx
+#[submodule "vendor/gpx"]
+# path = vendor/gpx
+# url = https://github.com/Wilkins/gpx
[submodule "vendor/gpx-parse"]
path = vendor/gpx-parse
- url = https://github.com/Wilkins/gpx-parse
+ url = https://github.com/elliotstokes/gpx-parse
diff --git a/Gruntfile.js b/Gruntfile.js
index 019d75d..afb4597 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -38,8 +38,7 @@ grunt.initConfig({
'dist/leaflet.filelayer.min.js': ['vendor/Leaflet.FileLayer/leaflet.filelayer.js'],
'dist/FileSaver.min.js': ['vendor/FileSaver.js/FileSaver.js'],
'dist/i18next.min.js': ['vendor/i18next/i18next.commonjs.withJQuery.js'],
- 'dist/gpx-parse.min.js': ['vendor/gpx-parse/lib/gpx-parse.js'],
- 'dist/gpx.min.js' : ['vendor/gpx/browserify/index.js'],
+ 'dist/gpx-parse.min.js': ['vendor/gpx-parse/dist/gpx-parse-browser.js'],
// Repository files
'dist/i18n.min.js': ['src/i18n.js'],
'dist/formats.min.js': ['src/formats.js', 'src/formats/*'],
@@ -72,8 +71,7 @@ grunt.initConfig({
'vendor/bootstrap-slider/dist/bootstrap-slider.min.js',
'vendor/jquery-autocomplete/dist/jquery.autocomplete.min.js',
'dist/i18next.min.js',
- 'vendor/gpx-parse/dist/gpx-parse-browser.js',
- 'vendor/gpx/browserify/gpx.js',
+ 'dist/gpx-parse.min.js',
],
dest: 'dist/libs.min.js'
},
@@ -125,7 +123,7 @@ grunt.initConfig({
},
js: {
options: { livereload: true },
- files: ['src/*'],
+ files: ['src/*', 'src/formats/*'],
tasks: ['clean:js', 'jshint', 'uglify', 'concat']
},
i18n: {
diff --git a/dist/app.min.js b/dist/app.min.js
index 0d9d47f..42226a4 100644
--- a/dist/app.min.js
+++ b/dist/app.min.js
@@ -16,7 +16,7 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po
!function(d,s,id){
var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}
}(document, 'script', 'twitter-wjs');;
-function filesizeHuman(a,b){if(0===a)return a;b=b||1;var c=$.t("export.units").split(",");return i=parseInt(Math.floor(Math.log(a)/Math.log(1024))),0===i&&(b=0),(a/Math.pow(1024,i)).toFixed(b)+" "+c[i]}function getPosition(a){for(var b=0,c=0;a;)b+=a.offsetLeft-a.scrollLeft+a.clientLeft,c+=a.offsetTop-a.scrollTop+a.clientTop,a=a.offsetParent;return{x:b,y:c}}function hideAll(){$(".popup").each(function(){$(this).hide()}),hideLanguages()}function chooseDownloadFormat(a){hideAll();var b=getPosition(a.currentTarget);$("#download-formats").css("top",b.y-4),$("#download-formats").show()}function chooseViewFormat(a){hideAll();var b=getPosition(a.currentTarget);$("#view-formats").css("top",b.y-4),$("#view-formats").show(),$("#download-formats").hide()}function GeoJSONFormat(){this.param={key:"geojson",syntax:"json",name:"GeoJSON",extension:"geojson",contenttype:"appplication/json",size_header:45,size_track:110,size_node:22},this.exportData=function(a){return JSON.stringify(a)},this.display=function(a){return prettyData.json(a)}}function GPXFormat(){this.param={key:"gpx",syntax:"xml",name:"GPX",extension:"gpx",contenttype:"application/gpx+xml",size_header:186,size_track:70,size_node:41},this.exportData=function(a){return togpx(a)},this.display=function(a){return prettyData.xml(a)}}function KMLFormat(){this.param={key:"kml",syntax:"xml",name:"KML",extension:"kml",contenttype:"application/vnd.google-earth.kml+xml",size_header:92,size_track:150,size_node:20},this.exportData=function(a){return tokml(a)},this.display=function(a){return prettyData.xml(a)}}function MediawikiFormat(){this.param={key:"mediawiki",syntax:"nohighlight",name:"Mediawiki",extension:"txt",contenttype:"text/plain",size_header:0,size_track:0,size_node:20},this.exportData=function(a){return geojsonToPath(a)}}$("#export-close").on("click",function(){$("#export-format").hide()});var Format=function(){this.param={key:"format",name:"RootFormat"},this.formats=[]};Format.prototype={loadAll:function(a){for(var b=0;b"+b.name+"")}Object.keys(window.Layers).length>0?$(".leaflet-control-switcher-box").show():$(".leaflet-control-switcher-box").hide()}function clearMap(){for(var a in window.Layers)window.Layers[a].remove();window.Layers={},updateLayers()}var LayerOptimizer=function(a){this.id=this.createId(),this.name=a.filename,this.sourceLayer=a.layer,this.size=a.layer.getLayers().length,this.sourceLayerStyle={color:"red",opacity:.7,fillOpacity:.7,weight:5,clickable:!1},this.sourceLayerData=[],this.sourceLayerJSON=[],this.sourceLayerNodes=0,this.simplifiedLayerStyle={color:"blue",opacity:1,fillOpacity:1,weight:2,clickable:!1},this.simplifiedLayerData=[],this.simplifiedLayerNodes=0,this.controller=null,this.tolerance=0,this.init()};LayerOptimizer.prototype={init:function(){for(var a,b=0;b'+f.param.name+' :'+d+"
");$("#size-format").show()},clearInfos:function(){$("#filename").html(""),$("#nodes").html(""),$(".leaflet-control-stats").hide()},clearSizeFormats:function(){$("#size-format").hide()},remove:function(){this.removeLayers(),this.removeController(),this.clearInfos(),this.clearSizeFormats()},removeLayers:function(){for(var a=0;a',L.Control.FileLayerLoad.TITLE=$.t("actions.upload");var d=L.Control.fileLayerLoad({addToMap:!1,fitBounds:!1,fileSizeLimit:8096,parsers:{gpx:a},binaryFormats:[]}).addTo(c);GPX_RAW_DATA={},console.log(GPX_RAW_DATA),d.loader.on("data:loaded",function(a){hideAll(),window.currentLayer&&window.currentLayer.removeController();var b=new LayerOptimizer(a);b.choose(),window.Layers[b.id]=b,window.currentLayer=b,updateLayers()}).on("data:error",function(a){console.log("ERROR",a.error)}),function(){var a=new L.Control({position:"topleft"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-download leaflet-bar"),b=L.DomUtil.create("a","",a);return b.href="#",b.target="_blank",b.title=$.t("actions.download"),b.innerHTML='',L.DomEvent.on(b,"click",L.DomEvent.stop).on(b,"click",chooseDownloadFormat),a},a}().addTo(c),function(){var a=new L.Control({position:"topleft"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-view leaflet-bar"),b=L.DomUtil.create("a","",a);return b.href="#",b.target="_blank",b.title=$.t("actions.view"),b.innerHTML='',L.DomEvent.on(b,"click",L.DomEvent.stop).on(b,"click",chooseViewFormat),a},a}().addTo(c),function(){var a=new L.Control({position:"topleft"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-erase leaflet-bar"),b=L.DomUtil.create("a","",a);return b.href="#",b.target="_blank",b.title=$.t("actions.clear"),b.innerHTML='',L.DomEvent.on(b,"click",L.DomEvent.stop).on(b,"click",clearMap).on(b,"click",hideAll),a},a}().addTo(c),function(){var a=new L.Control({position:"topleft"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-lang leaflet-bar"),b=L.DomUtil.create("a","",a);return b.href="#",b.target="_blank",b.title=$.t("actions.lang"),$(b).addClass("first"),b.innerHTML='',L.DomEvent.on(b,"click",L.DomEvent.stop).on(b,"click",showLanguage),a},a}().addTo(c),function(){var a=new L.Control({position:"bottomleft"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-stats");return a.id="stats",a.innerHTML='
',filename$=$("#filename",a),nodes$=$("#nodes",a),a},a}().addTo(c),initLanguage(),L.control.attribution({position:"topright",prefix:'Leaflet • '+$.t("osm.contributors")+""}).addTo(c),function(){var a=new L.Control({position:"topright"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-switcher-box leaflet-bar"),b=L.DomUtil.create("label","",a);b.href="#",b.title=$.t("actions.switchlayer"),b.innerHTML=$.t("layers.switcher");var c=L.DomUtil.create("select","leaflet-control-switcher leaflet-bar",a);return L.DomEvent.on(c,"change",function(){window.currentLayer.removeController(),window.currentLayer=window.Layers[$(this).val()],window.currentLayer.choose()}),a},a}().addTo(c),$("#slider").slider({value:0,min:0,max:.1,step:5e-5,precision:8,tooltip:"hide"}).on("slide",function(a){window.currentLayer.optimize(a.value),window.currentLayer.displayInfos()}).parent().width("100%"),$("#helpbtn").on("click",function(a){a.preventDefault(),$("#modal").modal("show")});var e=$.cookie("tour");(!e||parseInt(e)<3)&&($("#modal").modal("show"),e=(parseInt(e)||0)+1,$.cookie("tour",e,{expires:120}));var f=new Format;window.formats=f,f.loadAll(["GeoJSONFormat","GPXFormat","KMLFormat","MediawikiFormat"]),hljs.initHighlightingOnLoad()});
\ No newline at end of file
+$(function(){var a=new L.Map("map",{zoomControl:!1,attributionControl:!1}).setView(L.latLng(36,-30),20).on("click",hideAll);window.map=a,L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png").addTo(a),window.Layers={},window.currentLayer=null,L.control.zoom({zoomInTitle:$.t("actions.zoomin"),zoomOutTitle:$.t("actions.zoomout")}).addTo(a),L.Control.FileLayerLoad.LABEL='',L.Control.FileLayerLoad.TITLE=$.t("actions.upload");var b=L.Control.fileLayerLoad({addToMap:!1,fitBounds:!1,fileSizeLimit:8096,parsers:{gpx:gpxParser},binaryFormats:[]}).addTo(a);b.loader.on("data:loaded",function(a){hideAll(),window.currentLayer&&window.currentLayer.removeController();var b=new LayerOptimizer(a);b.choose(),window.Layers[b.id]=b,window.currentLayer=b,updateLayers()}).on("data:error",function(a){console.log("ERROR",a.error)}),function(){var a=new L.Control({position:"topleft"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-download leaflet-bar"),b=L.DomUtil.create("a","",a);return b.href="#",b.target="_blank",b.title=$.t("actions.download"),b.innerHTML='',L.DomEvent.on(b,"click",L.DomEvent.stop).on(b,"click",chooseDownloadFormat),a},a}().addTo(a),function(){var a=new L.Control({position:"topleft"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-view leaflet-bar"),b=L.DomUtil.create("a","",a);return b.href="#",b.target="_blank",b.title=$.t("actions.view"),b.innerHTML='',L.DomEvent.on(b,"click",L.DomEvent.stop).on(b,"click",chooseViewFormat),a},a}().addTo(a),function(){var a=new L.Control({position:"topleft"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-erase leaflet-bar"),b=L.DomUtil.create("a","",a);return b.href="#",b.target="_blank",b.title=$.t("actions.clear"),b.innerHTML='',L.DomEvent.on(b,"click",L.DomEvent.stop).on(b,"click",clearMap).on(b,"click",hideAll),a},a}().addTo(a),function(){var a=new L.Control({position:"topleft"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-lang leaflet-bar"),b=L.DomUtil.create("a","",a);return b.href="#",b.target="_blank",b.title=$.t("actions.lang"),$(b).addClass("first"),b.innerHTML='',L.DomEvent.on(b,"click",L.DomEvent.stop).on(b,"click",showLanguage),a},a}().addTo(a),function(){var a=new L.Control({position:"bottomleft"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-stats");return a.id="stats",a.innerHTML='
',filename$=$("#filename",a),nodes$=$("#nodes",a),a},a}().addTo(a),initLanguage(),L.control.attribution({position:"topright",prefix:'Leaflet • '+$.t("osm.contributors")+""}).addTo(a),function(){var a=new L.Control({position:"topright"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-switcher-box leaflet-bar"),b=L.DomUtil.create("label","",a);b.href="#",b.title=$.t("actions.switchlayer"),b.innerHTML=$.t("layers.switcher");var c=L.DomUtil.create("select","leaflet-control-switcher leaflet-bar",a);return L.DomEvent.on(c,"change",function(){window.currentLayer.removeController(),window.currentLayer=window.Layers[$(this).val()],window.currentLayer.choose()}),a},a}().addTo(a),$("#slider").slider({value:0,min:0,max:.1,step:5e-5,precision:8,tooltip:"hide"}).on("slide",function(a){window.currentLayer.optimize(a.value),window.currentLayer.displayInfos()}).parent().width("100%"),$("#helpbtn").on("click",function(a){a.preventDefault(),$("#modal").modal("show")});var c=$.cookie("tour");(!c||parseInt(c)<3)&&($("#modal").modal("show"),c=(parseInt(c)||0)+1,$.cookie("tour",c,{expires:120}));var d=new Format;window.formats=d,d.loadAll(["GeoJSONFormat","GPXFormat","KMLFormat","MediawikiFormat"]),hljs.initHighlightingOnLoad()});
\ No newline at end of file
diff --git a/dist/formats.min.js b/dist/formats.min.js
index 6125832..d5323c9 100644
--- a/dist/formats.min.js
+++ b/dist/formats.min.js
@@ -1 +1 @@
-function filesizeHuman(a,b){if(0===a)return a;b=b||1;var c=$.t("export.units").split(",");return i=parseInt(Math.floor(Math.log(a)/Math.log(1024))),0===i&&(b=0),(a/Math.pow(1024,i)).toFixed(b)+" "+c[i]}function getPosition(a){for(var b=0,c=0;a;)b+=a.offsetLeft-a.scrollLeft+a.clientLeft,c+=a.offsetTop-a.scrollTop+a.clientTop,a=a.offsetParent;return{x:b,y:c}}function hideAll(){$(".popup").each(function(){$(this).hide()}),hideLanguages()}function chooseDownloadFormat(a){hideAll();var b=getPosition(a.currentTarget);$("#download-formats").css("top",b.y-4),$("#download-formats").show()}function chooseViewFormat(a){hideAll();var b=getPosition(a.currentTarget);$("#view-formats").css("top",b.y-4),$("#view-formats").show(),$("#download-formats").hide()}function GeoJSONFormat(){this.param={key:"geojson",syntax:"json",name:"GeoJSON",extension:"geojson",contenttype:"appplication/json",size_header:45,size_track:110,size_node:22},this.exportData=function(a){return JSON.stringify(a)},this.display=function(a){return prettyData.json(a)}}function GPXFormat(){this.param={key:"gpx",syntax:"xml",name:"GPX",extension:"gpx",contenttype:"application/gpx+xml",size_header:186,size_track:70,size_node:41},this.exportData=function(a){return togpx(a)},this.display=function(a){return prettyData.xml(a)}}function KMLFormat(){this.param={key:"kml",syntax:"xml",name:"KML",extension:"kml",contenttype:"application/vnd.google-earth.kml+xml",size_header:92,size_track:150,size_node:20},this.exportData=function(a){return tokml(a)},this.display=function(a){return prettyData.xml(a)}}function MediawikiFormat(){this.param={key:"mediawiki",syntax:"nohighlight",name:"Mediawiki",extension:"txt",contenttype:"text/plain",size_header:0,size_track:0,size_node:20},this.exportData=function(a){return geojsonToPath(a)}}$("#export-close").on("click",function(){$("#export-format").hide()});var Format=function(){this.param={key:"format",name:"RootFormat"},this.formats=[]};Format.prototype={loadAll:function(a){for(var b=0;be;e++)c=a[e],d=new GpxWaypoint(c.$.lat,c.$.lon,c.ele,c.time),b.push(d);return b},_getRoutes=function(a){var b=[],c=null;if(null!==a&&void 0!==a)for(var d=0,e=a.length;e>d;d++){for(var f=[],g=a[d],h=0,i=g.rtept.length;i>h;h++)f.push(new GpxWaypoint(g.rtept[h].$.lat,g.rtept[h].$.lon));c=new GpxRoute(a.name,a.cmt,a.desc,f),b.push(c)}return b},_getTracks=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=[],f=a[c],g=null;f.name&&(g=f.name[0]);for(var h=0,i=f.trkseg.length;i>h;h++){for(var j,k=[],l=f.trkseg[h],m=0,n=l.trkpt.length;n>m;m++){var o=l.trkpt[m],p=o.ele;j=o.hasOwnProperty("time")?o.time:null,k.push(new GpxWaypoint(o.$.lat,o.$.lon,p,j))}e.push(k)}b.push(new GpxTrack(e,g))}return b},_ParseV10=function(a){var b=null,c=null;return b=new GpxExtent,c=new GpxMetaData(a.$.creator,a.time,b),new GpxResult(c,_getWayPoints(a.wpt),_getRoutes(a.rte),_getTracks(a.trk))},_ParseV11=function(a){var b,c;return a.metadata&&a.metadata[0]?(a.metadata[0].time&&(c=a.metadata[0].time[0]),b=new GpxMetaData(a.$.creator,c)):b=new GpxMetaData,new GpxResult(b,_getWayPoints(a.wpt),_getRoutes(a.rte),_getTracks(a.trk))};exports.parseGpx=function(a,b){var c=require("xml2js").parseString,d=null,e=null;c(a,function(a,c){if(a)return void b(a,null);try{if(!c.hasOwnProperty("gpx")||!c.gpx.hasOwnProperty("$"))return b(new Error("version not specified"),null);if(e=c.gpx.$.version,"1.0"===e)d=_ParseV10(c.gpx);else{if("1.1"!==e)return void b(new Error("version not supported"),null);d=_ParseV11(c.gpx)}b(null,d)}catch(a){return b(a)}})},exports.parseGpxFromFile=function(a,b){fs.readFile(a,function(a,c){return a?(console.log("error"),void b(a,null)):void exports.parseGpx(c,b)})},exports.parseRemoteGpxFile=function(a,b){function c(a){return b(new Error("failed to fetch gpx file: "+a.toString()))}function d(a){var c="";a.on("data",function(a){c+=a}),a.once("end",function(){exports.parseGpx(c,b)})}assert.equal(typeof a,"string","uri should be a string"),assert.equal(typeof b,"function","callback should be a function"),("https:"===url.parse(a).protocol?https:http).get(a,d).once("error",c)},exports.GpxResult=GpxResult,exports.GpxExtent=GpxExtent,exports.GpxWaypoint=GpxWaypoint,exports.GpxTrack=GpxTrack,exports.GpxMetaData=GpxMetaData,exports.GpxRoute=GpxRoute,exports.utils=geomUtils;
\ No newline at end of file
+!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.gpxParse=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;ge;e++)c=a[e],d=new k(c.$.lat,c.$.lon,c.ele,c.time),b.push(d);return b},q=function(a){var b=[],c=null;if(null!==a&&void 0!==a)for(var d=0,e=a.length;e>d;d++){for(var f=[],g=a[d],h=0,i=g.rtept.length;i>h;h++)f.push(new k(g.rtept[h].$.lat,g.rtept[h].$.lon));c=new n(a.name,a.cmt,a.desc,f),b.push(c)}return b},r=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=[],f=a[c],g=null;f.name&&(g=f.name[0]);for(var h=0,i=f.trkseg.length;i>h;h++){for(var j,m=[],n=f.trkseg[h],o=0,p=n.trkpt.length;p>o;o++){var q=n.trkpt[o],r=q.ele;j=q.hasOwnProperty("time")?q.time:null,m.push(new k(q.$.lat,q.$.lon,r,j))}e.push(m)}b.push(new l(e,g))}return b},s=function(a){var b=null,c=null;return b=new j,c=new m(a.$.creator,a.time,b),new i(c,p(a.wpt),q(a.rte),r(a.trk))},t=function(a){var b,c;return a.metadata&&a.metadata[0]?(a.metadata[0].time&&(c=a.metadata[0].time[0]),b=new m(a.$.creator,c)):b=new m,new i(b,p(a.wpt),q(a.rte),r(a.trk))};c.parseGpx=function(b,c){var d=a("xml2js").parseString,e=null,f=null;d(b,function(a,b){if(a)return void c(a,null);try{if(!b.hasOwnProperty("gpx")||!b.gpx.hasOwnProperty("$"))return c(new Error("version not specified"),null);if(f=b.gpx.$.version,"1.0"===f)e=s(b.gpx);else{if("1.1"!==f)return void c(new Error("version not supported"),null);e=t(b.gpx)}c(null,e)}catch(a){return c(a)}})},c.parseGpxFromFile=function(a,b){e.readFile(a,function(a,d){return a?(console.log("error"),void b(a,null)):void c.parseGpx(d,b)})},c.parseRemoteGpxFile=function(a,b){function e(a){return b(new Error("failed to fetch gpx file: "+a.toString()))}function i(a){var d="";a.on("data",function(a){d+=a}),a.once("end",function(){c.parseGpx(d,b)})}d.equal(typeof a,"string","uri should be a string"),d.equal(typeof b,"function","callback should be a function"),("https:"===f.parse(a).protocol?h:g).get(a,i).once("error",e)},c.GpxResult=i,c.GpxExtent=j,c.GpxWaypoint=k,c.GpxTrack=l,c.GpxMetaData=m,c.GpxRoute=n,c.utils=o},{"./geomUtils":2,"./gpxExtent":4,"./gpxMetaData":5,"./gpxResult":6,"./gpxRoute":7,"./gpxTrack":8,"./gpxWaypoint":9,assert:11,fs:10,http:40,https:18,url:50,xml2js:56}],4:[function(a,b){function c(a,b,c,d){a=a||-1,b=b||-1,c=c||-1,d=d||-1,this.__defineGetter__("minx",function(){return a}),this.__defineGetter__("miny",function(){return b}),this.__defineGetter__("maxx",function(){return c}),this.__defineGetter__("maxy",function(){return d})}b.exports=c},{}],5:[function(a,b){function c(a,b,c,d,e,f,g,h,i){a=a||null,b=new Date(b)||null,c=c||null,d=d||"",e=e||"",this.__defineGetter__("creator",function(){return a}),this.__defineGetter__("time",function(){return b}),this.__defineGetter__("bounds",function(){return c}),this.__defineGetter__("name",function(){return d}),this.__defineGetter__("description",function(){return e}),this.__defineGetter__("author",function(){return f}),this.__defineGetter__("copyright",function(){return g}),this.__defineGetter__("links",function(){return h}),this.__defineGetter__("keywords",function(){return i})}b.exports=c},{}],6:[function(a,b){function c(a,b,c,d){a=a||null,b=b||null,c=c||null,d=d||null,this.__defineGetter__("metadata",function(){return a}),this.__defineGetter__("waypoints",function(){return b}),this.__defineGetter__("routes",function(){return c}),this.__defineGetter__("tracks",function(){return d})}b.exports=c},{}],7:[function(a,b){function c(a,b,c,e){a=a||"",c=c||"",b=b||"",e=e||[],this.__defineGetter__("name",function(){return a}),this.__defineGetter__("cmt",function(){return b}),this.__defineGetter__("description",function(){return c}),this.__defineGetter__("points",function(){return e}),this.point=function(a){return e[a]},this.length=function(){for(var a=0,b=0,c=e.length-1;c>b;b++)a+=d.calculateDistance(e[b].lat,e[b].lon,e[b+1].lat,e[b+1].lon);return a}}var d=a("./geomUtils");b.exports=c},{"./geomUtils":2}],8:[function(a,b){function c(a,b){a=a||[],b=b||"",this.__defineGetter__("name",function(){return b}),this.__defineGetter__("segments",function(){return a}),this.segment=function(b){return a[b]},this.length=function(){for(var b=0,c=null,e=0,f=a.length;f>e;e++)if(c=a[e],c.length>1)for(var g=0,h=c.length-1;h>g;g++)b+=d.calculateDistance(c[g].lat,c[g].lon,c[g+1].lat,c[g+1].lon);return b}}var d=a("./geomUtils");b.exports=c},{"./geomUtils":2}],9:[function(a,b){function c(a,b,c,d,e,f,g,h,i,j,k,l,m){a=parseFloat(a)||-1,b=parseFloat(b)||-1,c=c||-1,d=new Date(d)||null,g=g||"",h=h||"",i=i||"",j=j||"",m=m||"",this.__defineGetter__("name",function(){return g}),this.__defineGetter__("cmt",function(){return h}),this.__defineGetter__("desc",function(){return i}),this.__defineGetter__("src",function(){return j}),this.__defineGetter__("type",function(){return m}),this.__defineGetter__("lat",function(){return a}),this.__defineGetter__("lon",function(){return b}),this.__defineGetter__("elevation",function(){return c}),this.__defineGetter__("time",function(){return d})}b.exports=c},{}],10:[function(){},{}],11:[function(a,b){function c(a,b){return m.isUndefined(b)?""+b:m.isNumber(b)&&!isFinite(b)?b.toString():m.isFunction(b)||m.isRegExp(b)?b.toString():b}function d(a,b){return m.isString(a)?a.length=0;f--)if(g[f]!=j[f])return!1;for(f=g.length-1;f>=0;f--)if(e=g[f],!h(a[e],b[e]))return!1;return!0}function k(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b?!0:b.call({},a)===!0?!0:!1:!1}function l(a,b,c,d){var e;m.isString(c)&&(d=c,c=null);try{b()}catch(g){e=g}if(d=(c&&c.name?" ("+c.name+").":".")+(d?" "+d:"."),a&&!e&&f(e,c,"Missing expected exception"+d),!a&&k(e,c)&&f(e,c,"Got unwanted exception"+d),a&&e&&c&&!k(e,c)||!a&&e)throw e}var m=a("util/"),n=Array.prototype.slice,o=Object.prototype.hasOwnProperty,p=b.exports=g;p.AssertionError=function(a){this.name="AssertionError",this.actual=a.actual,this.expected=a.expected,this.operator=a.operator,a.message?(this.message=a.message,this.generatedMessage=!1):(this.message=e(this),this.generatedMessage=!0);var b=a.stackStartFunction||f;if(Error.captureStackTrace)Error.captureStackTrace(this,b);else{var c=new Error;if(c.stack){var d=c.stack,g=b.name,h=d.indexOf("\n"+g);if(h>=0){var i=d.indexOf("\n",h+1);d=d.substring(i+1)}this.stack=d}}},m.inherits(p.AssertionError,Error),p.fail=f,p.ok=g,p.equal=function(a,b,c){a!=b&&f(a,b,c,"==",p.equal)},p.notEqual=function(a,b,c){a==b&&f(a,b,c,"!=",p.notEqual)},p.deepEqual=function(a,b,c){h(a,b)||f(a,b,c,"deepEqual",p.deepEqual)},p.notDeepEqual=function(a,b,c){h(a,b)&&f(a,b,c,"notDeepEqual",p.notDeepEqual)},p.strictEqual=function(a,b,c){a!==b&&f(a,b,c,"===",p.strictEqual)},p.notStrictEqual=function(a,b,c){a===b&&f(a,b,c,"!==",p.notStrictEqual)},p["throws"]=function(){l.apply(this,[!0].concat(n.call(arguments)))},p.doesNotThrow=function(){l.apply(this,[!1].concat(n.call(arguments)))},p.ifError=function(a){if(a)throw a};var q=Object.keys||function(a){var b=[];for(var c in a)o.call(a,c)&&b.push(c);return b}},{"util/":52}],12:[function(a,b,c){arguments[4][10][0].apply(c,arguments)},{dup:10}],13:[function(a,b,c){function d(){return e.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function e(a){return this instanceof e?(this.length=0,this.parent=void 0,"number"==typeof a?f(this,a):"string"==typeof a?g(this,a,arguments.length>1?arguments[1]:"utf8"):h(this,a)):arguments.length>1?new e(a,arguments[1]):new e(a)}function f(a,b){if(a=o(a,0>b?0:0|p(b)),!e.TYPED_ARRAY_SUPPORT)for(var c=0;b>c;c++)a[c]=0;return a}function g(a,b,c){("string"!=typeof c||""===c)&&(c="utf8");var d=0|r(b,c);return a=o(a,d),a.write(b,c),a}function h(a,b){if(e.isBuffer(b))return i(a,b);if(X(b))return j(a,b);if(null==b)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(b.buffer instanceof ArrayBuffer)return k(a,b);if(b instanceof ArrayBuffer)return l(a,b)}return b.length?m(a,b):n(a,b)}function i(a,b){var c=0|p(b.length);return a=o(a,c),b.copy(a,0,0,c),a}function j(a,b){var c=0|p(b.length);a=o(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function k(a,b){var c=0|p(b.length);a=o(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function l(a,b){return e.TYPED_ARRAY_SUPPORT?(b.byteLength,a=e._augment(new Uint8Array(b))):a=k(a,new Uint8Array(b)),a}function m(a,b){var c=0|p(b.length);a=o(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function n(a,b){var c,d=0;"Buffer"===b.type&&X(b.data)&&(c=b.data,d=0|p(c.length)),a=o(a,d);for(var e=0;d>e;e+=1)a[e]=255&c[e];return a}function o(a,b){e.TYPED_ARRAY_SUPPORT?a=e._augment(new Uint8Array(b)):(a.length=b,a._isBuffer=!0);var c=0!==b&&b<=e.poolSize>>>1;return c&&(a.parent=Y),a}function p(a){if(a>=d())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d().toString(16)+" bytes");return 0|a}function q(a,b){if(!(this instanceof q))return new q(a,b);var c=new e(a,b);return delete c.parent,c}function r(a,b){"string"!=typeof a&&(a=""+a);var c=a.length;if(0===c)return 0;for(var d=!1;;)switch(b){case"ascii":case"binary":case"raw":case"raws":return c;case"utf8":case"utf-8":return P(a).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*c;case"hex":return c>>>1;case"base64":return S(a).length;default:if(d)return P(a).length;b=(""+b).toLowerCase(),d=!0}}function s(a,b,c){var d=!1;if(b=0|b,c=void 0===c||c===1/0?this.length:0|c,a||(a="utf8"),0>b&&(b=0),c>this.length&&(c=this.length),b>=c)return"";for(;;)switch(a){case"hex":return D(this,b,c);case"utf8":case"utf-8":return A(this,b,c);case"ascii":return B(this,b,c);case"binary":return C(this,b,c);case"base64":return z(this,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,b,c);default:if(d)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),d=!0}}function t(a,b,c,d){c=Number(c)||0;var e=a.length-c;d?(d=Number(d),d>e&&(d=e)):d=e;var f=b.length;if(f%2!==0)throw new Error("Invalid hex string");d>f/2&&(d=f/2);for(var g=0;d>g;g++){var h=parseInt(b.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");a[c+g]=h}return g}function u(a,b,c,d){return T(P(b,a.length-c),a,c,d)}function v(a,b,c,d){return T(Q(b),a,c,d)}function w(a,b,c,d){return v(a,b,c,d)}function x(a,b,c,d){return T(S(b),a,c,d)}function y(a,b,c,d){return T(R(b,a.length-c),a,c,d)}function z(a,b,c){return V.fromByteArray(0===b&&c===a.length?a:a.slice(b,c))}function A(a,b,c){var d="",e="";c=Math.min(a.length,c);for(var f=b;c>f;f++)a[f]<=127?(d+=U(e)+String.fromCharCode(a[f]),e=""):e+="%"+a[f].toString(16);return d+U(e)}function B(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(127&a[e]);return d}function C(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(a[e]);return d}function D(a,b,c){var d=a.length;(!b||0>b)&&(b=0),(!c||0>c||c>d)&&(c=d);for(var e="",f=b;c>f;f++)e+=O(a[f]);return e}function E(a,b,c){for(var d=a.slice(b,c),e="",f=0;fa)throw new RangeError("offset is not uint");if(a+b>c)throw new RangeError("Trying to access beyond buffer length")}function G(a,b,c,d,f,g){if(!e.isBuffer(a))throw new TypeError("buffer must be a Buffer instance");if(b>f||g>b)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range")}function H(a,b,c,d){0>b&&(b=65535+b+1);for(var e=0,f=Math.min(a.length-c,2);f>e;e++)a[c+e]=(b&255<<8*(d?e:1-e))>>>8*(d?e:1-e)}function I(a,b,c,d){0>b&&(b=4294967295+b+1);for(var e=0,f=Math.min(a.length-c,4);f>e;e++)a[c+e]=b>>>8*(d?e:3-e)&255}function J(a,b,c,d,e,f){if(b>e||f>b)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range");if(0>c)throw new RangeError("index out of range")}function K(a,b,c,d,e){return e||J(a,b,c,4,3.4028234663852886e38,-3.4028234663852886e38),W.write(a,b,c,d,23,4),c+4}function L(a,b,c,d,e){return e||J(a,b,c,8,1.7976931348623157e308,-1.7976931348623157e308),W.write(a,b,c,d,52,8),c+8}function M(a){if(a=N(a).replace($,""),a.length<2)return"";for(;a.length%4!==0;)a+="=";return a}function N(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function O(a){return 16>a?"0"+a.toString(16):a.toString(16)}function P(a,b){b=b||1/0;for(var c,d=a.length,e=null,f=[],g=0;d>g;g++){if(c=a.charCodeAt(g),c>55295&&57344>c){if(!e){if(c>56319){(b-=3)>-1&&f.push(239,191,189);continue}if(g+1===d){(b-=3)>-1&&f.push(239,191,189);continue}e=c;continue}if(56320>c){(b-=3)>-1&&f.push(239,191,189),e=c;continue}c=e-55296<<10|c-56320|65536,e=null}else e&&((b-=3)>-1&&f.push(239,191,189),e=null);if(128>c){if((b-=1)<0)break;f.push(c)}else if(2048>c){if((b-=2)<0)break;f.push(c>>6|192,63&c|128)}else if(65536>c){if((b-=3)<0)break;f.push(c>>12|224,c>>6&63|128,63&c|128)}else{if(!(2097152>c))throw new Error("Invalid code point");if((b-=4)<0)break;f.push(c>>18|240,c>>12&63|128,c>>6&63|128,63&c|128)}}return f}function Q(a){for(var b=[],c=0;c>8,e=c%256,f.push(e),f.push(d);return f}function S(a){return V.toByteArray(M(a))}function T(a,b,c,d){for(var e=0;d>e&&!(e+c>=b.length||e>=a.length);e++)b[e+c]=a[e];return e}function U(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}var V=a("base64-js"),W=a("ieee754"),X=a("is-array");c.Buffer=e,c.SlowBuffer=q,c.INSPECT_MAX_BYTES=50,e.poolSize=8192;var Y={};e.TYPED_ARRAY_SUPPORT=function(){function a(){}try{var b=new Uint8Array(1);return b.foo=function(){return 42},b.constructor=a,42===b.foo()&&b.constructor===a&&"function"==typeof b.subarray&&0===b.subarray(1,1).byteLength}catch(c){return!1}}(),e.isBuffer=function(a){return!(null==a||!a._isBuffer)},e.compare=function(a,b){if(!e.isBuffer(a)||!e.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var c=a.length,d=b.length,f=0,g=Math.min(c,d);g>f&&a[f]===b[f];)++f;return f!==g&&(c=a[f],d=b[f]),d>c?-1:c>d?1:0},e.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(a,b){if(!X(a))throw new TypeError("list argument must be an Array of Buffers.");if(0===a.length)return new e(0);var c;if(void 0===b)for(b=0,c=0;c0&&(a=this.toString("hex",0,b).match(/.{2}/g).join(" "),this.length>b&&(a+=" ... ")),""},e.prototype.compare=function(a){if(!e.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?0:e.compare(this,a)},e.prototype.indexOf=function(a,b){function c(a,b,c){for(var d=-1,e=0;c+e2147483647?b=2147483647:-2147483648>b&&(b=-2147483648),b>>=0,0===this.length)return-1;if(b>=this.length)return-1;if(0>b&&(b=Math.max(this.length+b,0)),"string"==typeof a)return 0===a.length?-1:String.prototype.indexOf.call(this,a,b);if(e.isBuffer(a))return c(this,a,b);if("number"==typeof a)return e.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,a,b):c(this,[a],b);throw new TypeError("val must be string, number or Buffer")},e.prototype.get=function(a){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(a)},e.prototype.set=function(a,b){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(a,b)},e.prototype.write=function(a,b,c,d){if(void 0===b)d="utf8",c=this.length,b=0;else if(void 0===c&&"string"==typeof b)d=b,c=this.length,b=0;else if(isFinite(b))b=0|b,isFinite(c)?(c=0|c,void 0===d&&(d="utf8")):(d=c,c=void 0);else{var e=d;d=b,b=0|c,c=e}var f=this.length-b;if((void 0===c||c>f)&&(c=f),a.length>0&&(0>c||0>b)||b>this.length)throw new RangeError("attempt to write outside buffer bounds");d||(d="utf8");for(var g=!1;;)switch(d){case"hex":return t(this,a,b,c);case"utf8":case"utf-8":return u(this,a,b,c);case"ascii":return v(this,a,b,c);case"binary":return w(this,a,b,c);case"base64":return x(this,a,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y(this,a,b,c);default:if(g)throw new TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase(),g=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},e.prototype.slice=function(a,b){var c=this.length;a=~~a,b=void 0===b?c:~~b,0>a?(a+=c,0>a&&(a=0)):a>c&&(a=c),0>b?(b+=c,0>b&&(b=0)):b>c&&(b=c),a>b&&(b=a);var d;if(e.TYPED_ARRAY_SUPPORT)d=e._augment(this.subarray(a,b));else{var f=b-a;d=new e(f,void 0);for(var g=0;f>g;g++)d[g]=this[g+a]}return d.length&&(d.parent=this.parent||this),d},e.prototype.readUIntLE=function(a,b,c){a=0|a,b=0|b,c||F(a,b,this.length);for(var d=this[a],e=1,f=0;++f0&&(e*=256);)d+=this[a+--b]*e;return d},e.prototype.readUInt8=function(a,b){return b||F(a,1,this.length),this[a]},e.prototype.readUInt16LE=function(a,b){return b||F(a,2,this.length),this[a]|this[a+1]<<8},e.prototype.readUInt16BE=function(a,b){return b||F(a,2,this.length),this[a]<<8|this[a+1]},e.prototype.readUInt32LE=function(a,b){return b||F(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]},e.prototype.readUInt32BE=function(a,b){return b||F(a,4,this.length),16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])},e.prototype.readIntLE=function(a,b,c){a=0|a,b=0|b,c||F(a,b,this.length);for(var d=this[a],e=1,f=0;++f=e&&(d-=Math.pow(2,8*b)),d},e.prototype.readIntBE=function(a,b,c){a=0|a,b=0|b,c||F(a,b,this.length);for(var d=b,e=1,f=this[a+--d];d>0&&(e*=256);)f+=this[a+--d]*e;return e*=128,f>=e&&(f-=Math.pow(2,8*b)),f},e.prototype.readInt8=function(a,b){return b||F(a,1,this.length),128&this[a]?-1*(255-this[a]+1):this[a]},e.prototype.readInt16LE=function(a,b){b||F(a,2,this.length);var c=this[a]|this[a+1]<<8;return 32768&c?4294901760|c:c},e.prototype.readInt16BE=function(a,b){b||F(a,2,this.length);var c=this[a+1]|this[a]<<8;return 32768&c?4294901760|c:c},e.prototype.readInt32LE=function(a,b){return b||F(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},e.prototype.readInt32BE=function(a,b){return b||F(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},e.prototype.readFloatLE=function(a,b){return b||F(a,4,this.length),W.read(this,a,!0,23,4)},e.prototype.readFloatBE=function(a,b){return b||F(a,4,this.length),W.read(this,a,!1,23,4)},e.prototype.readDoubleLE=function(a,b){return b||F(a,8,this.length),W.read(this,a,!0,52,8)},e.prototype.readDoubleBE=function(a,b){return b||F(a,8,this.length),W.read(this,a,!1,52,8)},e.prototype.writeUIntLE=function(a,b,c,d){a=+a,b=0|b,c=0|c,d||G(this,a,b,c,Math.pow(2,8*c),0);var e=1,f=0;for(this[b]=255&a;++f=0&&(f*=256);)this[b+e]=a/f&255;return b+c},e.prototype.writeUInt8=function(a,b,c){return a=+a,b=0|b,c||G(this,a,b,1,255,0),e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),this[b]=a,b+1},e.prototype.writeUInt16LE=function(a,b,c){return a=+a,b=0|b,c||G(this,a,b,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):H(this,a,b,!0),b+2},e.prototype.writeUInt16BE=function(a,b,c){return a=+a,b=0|b,c||G(this,a,b,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):H(this,a,b,!1),b+2},e.prototype.writeUInt32LE=function(a,b,c){return a=+a,b=0|b,c||G(this,a,b,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=a):I(this,a,b,!0),b+4},e.prototype.writeUInt32BE=function(a,b,c){return a=+a,b=0|b,c||G(this,a,b,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a):I(this,a,b,!1),b+4},e.prototype.writeIntLE=function(a,b,c,d){if(a=+a,b=0|b,!d){var e=Math.pow(2,8*c-1);G(this,a,b,c,e-1,-e)}var f=0,g=1,h=0>a?1:0;for(this[b]=255&a;++f>0)-h&255;return b+c},e.prototype.writeIntBE=function(a,b,c,d){if(a=+a,b=0|b,!d){var e=Math.pow(2,8*c-1);G(this,a,b,c,e-1,-e)}var f=c-1,g=1,h=0>a?1:0;for(this[b+f]=255&a;--f>=0&&(g*=256);)this[b+f]=(a/g>>0)-h&255;return b+c},e.prototype.writeInt8=function(a,b,c){return a=+a,b=0|b,c||G(this,a,b,1,127,-128),e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),0>a&&(a=255+a+1),this[b]=a,b+1},e.prototype.writeInt16LE=function(a,b,c){return a=+a,b=0|b,c||G(this,a,b,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):H(this,a,b,!0),b+2},e.prototype.writeInt16BE=function(a,b,c){return a=+a,b=0|b,c||G(this,a,b,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):H(this,a,b,!1),b+2},e.prototype.writeInt32LE=function(a,b,c){return a=+a,b=0|b,c||G(this,a,b,4,2147483647,-2147483648),e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):I(this,a,b,!0),b+4},e.prototype.writeInt32BE=function(a,b,c){return a=+a,b=0|b,c||G(this,a,b,4,2147483647,-2147483648),0>a&&(a=4294967295+a+1),e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a):I(this,a,b,!1),b+4},e.prototype.writeFloatLE=function(a,b,c){return K(this,a,b,!0,c)},e.prototype.writeFloatBE=function(a,b,c){return K(this,a,b,!1,c)},e.prototype.writeDoubleLE=function(a,b,c){return L(this,a,b,!0,c)},e.prototype.writeDoubleBE=function(a,b,c){return L(this,a,b,!1,c)},e.prototype.copy=function(a,b,c,d){if(c||(c=0),d||0===d||(d=this.length),b>=a.length&&(b=a.length),b||(b=0),d>0&&c>d&&(d=c),d===c)return 0;if(0===a.length||0===this.length)return 0;if(0>b)throw new RangeError("targetStart out of bounds");if(0>c||c>=this.length)throw new RangeError("sourceStart out of bounds");if(0>d)throw new RangeError("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-bc&&d>b)for(f=g-1;f>=0;f--)a[f+b]=this[f+c];else if(1e3>g||!e.TYPED_ARRAY_SUPPORT)for(f=0;g>f;f++)a[f+b]=this[f+c];else a._set(this.subarray(c,c+g),b);return g},e.prototype.fill=function(a,b,c){if(a||(a=0),b||(b=0),c||(c=this.length),b>c)throw new RangeError("end < start");if(c!==b&&0!==this.length){if(0>b||b>=this.length)throw new RangeError("start out of bounds");if(0>c||c>this.length)throw new RangeError("end out of bounds");var d;if("number"==typeof a)for(d=b;c>d;d++)this[d]=a;else{var e=P(a.toString()),f=e.length;for(d=b;c>d;d++)this[d]=e[d%f]}return this}},e.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(e.TYPED_ARRAY_SUPPORT)return new e(this).buffer;for(var a=new Uint8Array(this.length),b=0,c=a.length;c>b;b+=1)a[b]=this[b];return a.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var Z=e.prototype;e._augment=function(a){return a.constructor=e,a._isBuffer=!0,a._set=a.set,a.get=Z.get,a.set=Z.set,a.write=Z.write,a.toString=Z.toString,a.toLocaleString=Z.toString,a.toJSON=Z.toJSON,a.equals=Z.equals,a.compare=Z.compare,a.indexOf=Z.indexOf,a.copy=Z.copy,a.slice=Z.slice,a.readUIntLE=Z.readUIntLE,a.readUIntBE=Z.readUIntBE,a.readUInt8=Z.readUInt8,a.readUInt16LE=Z.readUInt16LE,a.readUInt16BE=Z.readUInt16BE,a.readUInt32LE=Z.readUInt32LE,a.readUInt32BE=Z.readUInt32BE,a.readIntLE=Z.readIntLE,a.readIntBE=Z.readIntBE,a.readInt8=Z.readInt8,a.readInt16LE=Z.readInt16LE,a.readInt16BE=Z.readInt16BE,a.readInt32LE=Z.readInt32LE,a.readInt32BE=Z.readInt32BE,a.readFloatLE=Z.readFloatLE,a.readFloatBE=Z.readFloatBE,a.readDoubleLE=Z.readDoubleLE,a.readDoubleBE=Z.readDoubleBE,a.writeUInt8=Z.writeUInt8,a.writeUIntLE=Z.writeUIntLE,a.writeUIntBE=Z.writeUIntBE,a.writeUInt16LE=Z.writeUInt16LE,a.writeUInt16BE=Z.writeUInt16BE,a.writeUInt32LE=Z.writeUInt32LE,a.writeUInt32BE=Z.writeUInt32BE,a.writeIntLE=Z.writeIntLE,a.writeIntBE=Z.writeIntBE,a.writeInt8=Z.writeInt8,a.writeInt16LE=Z.writeInt16LE,a.writeInt16BE=Z.writeInt16BE,a.writeInt32LE=Z.writeInt32LE,a.writeInt32BE=Z.writeInt32BE,a.writeFloatLE=Z.writeFloatLE,a.writeFloatBE=Z.writeFloatBE,a.writeDoubleLE=Z.writeDoubleLE,a.writeDoubleBE=Z.writeDoubleBE,a.fill=Z.fill,a.inspect=Z.inspect,a.toArrayBuffer=Z.toArrayBuffer,a};var $=/[^+\/0-9A-Za-z-_]/g},{"base64-js":14,ieee754:15,"is-array":16}],14:[function(a,b,c){var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(a){"use strict";function b(a){var b=a.charCodeAt(0);return b===g||b===l?62:b===h||b===m?63:i>b?-1:i+10>b?b-i+26+26:k+26>b?b-k:j+26>b?b-j+26:void 0}function c(a){function c(a){j[l++]=a}var d,e,g,h,i,j;if(a.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=a.length;i="="===a.charAt(k-2)?2:"="===a.charAt(k-1)?1:0,j=new f(3*a.length/4-i),g=i>0?a.length-4:a.length;var l=0;for(d=0,e=0;g>d;d+=4,e+=3)h=b(a.charAt(d))<<18|b(a.charAt(d+1))<<12|b(a.charAt(d+2))<<6|b(a.charAt(d+3)),c((16711680&h)>>16),c((65280&h)>>8),c(255&h);return 2===i?(h=b(a.charAt(d))<<2|b(a.charAt(d+1))>>4,c(255&h)):1===i&&(h=b(a.charAt(d))<<10|b(a.charAt(d+1))<<4|b(a.charAt(d+2))>>2,c(h>>8&255),c(255&h)),j}function e(a){function b(a){return d.charAt(a)}function c(a){return b(a>>18&63)+b(a>>12&63)+b(a>>6&63)+b(63&a)}var e,f,g,h=a.length%3,i="";for(e=0,g=a.length-h;g>e;e+=3)f=(a[e]<<16)+(a[e+1]<<8)+a[e+2],i+=c(f);switch(h){case 1:f=a[a.length-1],i+=b(f>>2),i+=b(f<<4&63),i+="==";break;case 2:f=(a[a.length-2]<<8)+a[a.length-1],i+=b(f>>10),i+=b(f>>4&63),i+=b(f<<2&63),i+="="}return i}var f="undefined"!=typeof Uint8Array?Uint8Array:Array,g="+".charCodeAt(0),h="/".charCodeAt(0),i="0".charCodeAt(0),j="a".charCodeAt(0),k="A".charCodeAt(0),l="-".charCodeAt(0),m="_".charCodeAt(0);a.toByteArray=c,a.fromByteArray=e}("undefined"==typeof c?this.base64js={}:c)},{}],15:[function(a,b,c){c.read=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<>1,k=-7,l=c?e-1:0,m=c?-1:1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?0/0:(n?-1:1)*(1/0);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.write=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?0:f-1,o=d?1:-1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],16:[function(a,b){var c=Array.isArray,d=Object.prototype.toString;b.exports=c||function(a){return!!a&&"[object Array]"==d.call(a)}},{}],17:[function(a,b){function c(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function d(a){return"function"==typeof a}function e(a){return"number"==typeof a}function f(a){return"object"==typeof a&&null!==a}function g(a){return void 0===a}b.exports=c,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._maxListeners=void 0,c.defaultMaxListeners=10,c.prototype.setMaxListeners=function(a){if(!e(a)||0>a||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},c.prototype.emit=function(a){var b,c,e,h,i,j;if(this._events||(this._events={}),"error"===a&&(!this._events.error||f(this._events.error)&&!this._events.error.length)){if(b=arguments[1],b instanceof Error)throw b;throw TypeError('Uncaught, unspecified "error" event.')}if(c=this._events[a],g(c))return!1;if(d(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(e=arguments.length,h=new Array(e-1),i=1;e>i;i++)h[i-1]=arguments[i];c.apply(this,h)}else if(f(c)){for(e=arguments.length,h=new Array(e-1),i=1;e>i;i++)h[i-1]=arguments[i];for(j=c.slice(),e=j.length,i=0;e>i;i++)j[i].apply(this,h)}return!0},c.prototype.addListener=function(a,b){var e;if(!d(b))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,d(b.listener)?b.listener:b),this._events[a]?f(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,f(this._events[a])&&!this._events[a].warned){var e;e=g(this._maxListeners)?c.defaultMaxListeners:this._maxListeners,e&&e>0&&this._events[a].length>e&&(this._events[a].warned=!0,
+console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),"function"==typeof console.trace&&console.trace())}return this},c.prototype.on=c.prototype.addListener,c.prototype.once=function(a,b){function c(){this.removeListener(a,c),e||(e=!0,b.apply(this,arguments))}if(!d(b))throw TypeError("listener must be a function");var e=!1;return c.listener=b,this.on(a,c),this},c.prototype.removeListener=function(a,b){var c,e,g,h;if(!d(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],g=c.length,e=-1,c===b||d(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(f(c)){for(h=g;h-->0;)if(c[h]===b||c[h].listener&&c[h].listener===b){e=h;break}if(0>e)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(e,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},c.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],d(c))this.removeListener(a,c);else for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},c.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?d(this._events[a])?[this._events[a]]:this._events[a].slice():[]},c.listenerCount=function(a,b){var c;return c=a._events&&a._events[b]?d(a._events[b])?1:a._events[b].length:0}},{}],18:[function(a,b){var c=a("http"),d=b.exports;for(var e in c)c.hasOwnProperty(e)&&(d[e]=c[e]);d.request=function(a,b){return a||(a={}),a.scheme="https",c.request.call(this,a,b)}},{http:40}],19:[function(a,b){b.exports="function"==typeof Object.create?function(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:function(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}},{}],20:[function(a,b){b.exports=Array.isArray||function(a){return"[object Array]"==Object.prototype.toString.call(a)}},{}],21:[function(a,b){function c(){j=!1,g.length?i=g.concat(i):k=-1,i.length&&d()}function d(){if(!j){var a=setTimeout(c);j=!0;for(var b=i.length;b;){for(g=i,i=[];++k1)for(var c=1;c1&&(d=c[0]+"@",a=c[1]),a=a.replace(H,".");var e=a.split("."),f=g(e,b).join(".");return d+f}function i(a){for(var b,c,d=[],e=0,f=a.length;f>e;)b=a.charCodeAt(e++),b>=55296&&56319>=b&&f>e?(c=a.charCodeAt(e++),56320==(64512&c)?d.push(((1023&b)<<10)+(1023&c)+65536):(d.push(b),e--)):d.push(b);return d}function j(a){return g(a,function(a){var b="";return a>65535&&(a-=65536,b+=L(a>>>10&1023|55296),a=56320|1023&a),b+=L(a)}).join("")}function k(a){return 10>a-48?a-22:26>a-65?a-65:26>a-97?a-97:x}function l(a,b){return a+22+75*(26>a)-((0!=b)<<5)}function m(a,b,c){var d=0;for(a=c?K(a/B):a>>1,a+=K(a/b);a>J*z>>1;d+=x)a=K(a/J);return K(d+(J+1)*a/(a+A))}function n(a){var b,c,d,e,g,h,i,l,n,o,p=[],q=a.length,r=0,s=D,t=C;for(c=a.lastIndexOf(E),0>c&&(c=0),d=0;c>d;++d)a.charCodeAt(d)>=128&&f("not-basic"),p.push(a.charCodeAt(d));for(e=c>0?c+1:0;q>e;){for(g=r,h=1,i=x;e>=q&&f("invalid-input"),l=k(a.charCodeAt(e++)),(l>=x||l>K((w-r)/h))&&f("overflow"),r+=l*h,n=t>=i?y:i>=t+z?z:i-t,!(n>l);i+=x)o=x-n,h>K(w/o)&&f("overflow"),h*=o;b=p.length+1,t=m(r-g,b,0==g),K(r/b)>w-s&&f("overflow"),s+=K(r/b),r%=b,p.splice(r++,0,s)}return j(p)}function o(a){var b,c,d,e,g,h,j,k,n,o,p,q,r,s,t,u=[];for(a=i(a),q=a.length,b=D,c=0,g=C,h=0;q>h;++h)p=a[h],128>p&&u.push(L(p));for(d=e=u.length,e&&u.push(E);q>d;){for(j=w,h=0;q>h;++h)p=a[h],p>=b&&j>p&&(j=p);for(r=d+1,j-b>K((w-c)/r)&&f("overflow"),c+=(j-b)*r,b=j,h=0;q>h;++h)if(p=a[h],b>p&&++c>w&&f("overflow"),p==b){for(k=c,n=x;o=g>=n?y:n>=g+z?z:n-g,!(o>k);n+=x)t=k-o,s=x-o,u.push(L(l(o+t%s,0))),k=K(t/s);u.push(L(l(k,0))),g=m(c,r,d==e),c=0,++d}++c,++b}return u.join("")}function p(a){return h(a,function(a){return F.test(a)?n(a.slice(4).toLowerCase()):a})}function q(a){return h(a,function(a){return G.test(a)?"xn--"+o(a):a})}var r="object"==typeof d&&d&&!d.nodeType&&d,s="object"==typeof c&&c&&!c.nodeType&&c,t="object"==typeof b&&b;(t.global===t||t.window===t||t.self===t)&&(e=t);var u,v,w=2147483647,x=36,y=1,z=26,A=38,B=700,C=72,D=128,E="-",F=/^xn--/,G=/[^\x20-\x7E]/,H=/[\x2E\u3002\uFF0E\uFF61]/g,I={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},J=x-y,K=Math.floor,L=String.fromCharCode;if(u={version:"1.3.2",ucs2:{decode:i,encode:j},decode:n,encode:o,toASCII:q,toUnicode:p},"function"==typeof a&&"object"==typeof a.amd&&a.amd)a("punycode",function(){return u});else if(r&&s)if(c.exports==r)s.exports=u;else for(v in u)u.hasOwnProperty(v)&&(r[v]=u[v]);else e.punycode=u}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],23:[function(a,b){"use strict";function c(a,b){return Object.prototype.hasOwnProperty.call(a,b)}b.exports=function(a,b,e,f){b=b||"&",e=e||"=";var g={};if("string"!=typeof a||0===a.length)return g;var h=/\+/g;a=a.split(b);var i=1e3;f&&"number"==typeof f.maxKeys&&(i=f.maxKeys);var j=a.length;i>0&&j>i&&(j=i);for(var k=0;j>k;++k){var l,m,n,o,p=a[k].replace(h,"%20"),q=p.indexOf(e);q>=0?(l=p.substr(0,q),m=p.substr(q+1)):(l=p,m=""),n=decodeURIComponent(l),o=decodeURIComponent(m),c(g,n)?d(g[n])?g[n].push(o):g[n]=[g[n],o]:g[n]=o}return g};var d=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}},{}],24:[function(a,b){"use strict";function c(a,b){if(a.map)return a.map(b);for(var c=[],d=0;d0)if(b.ended&&!e){var h=new Error("stream.push() after EOF");a.emit("error",h)}else if(b.endEmitted&&e){var h=new Error("stream.unshift() after end event");a.emit("error",h)}else!b.decoder||e||d||(c=b.decoder.write(c)),e||(b.reading=!1),b.flowing&&0===b.length&&!b.sync?(a.emit("data",c),a.read(0)):(b.length+=b.objectMode?1:c.length,e?b.buffer.unshift(c):b.buffer.push(c),b.needReadable&&l(a)),n(a,b);else e||(b.reading=!1);return g(b)}function g(a){return!a.ended&&(a.needReadable||a.length=H)a=H;else{a--;for(var b=1;32>b;b<<=1)a|=a>>b;a++}return a}function i(a,b){return 0===b.length&&b.ended?0:b.objectMode?0===a?0:1:null===a||isNaN(a)?b.flowing&&b.buffer.length?b.buffer[0].length:b.length:0>=a?0:(a>b.highWaterMark&&(b.highWaterMark=h(a)),a>b.length?b.ended?b.length:(b.needReadable=!0,0):a)}function j(a,b){var c=null;return B.isBuffer(b)||"string"==typeof b||null===b||void 0===b||a.objectMode||(c=new TypeError("Invalid non-string/buffer chunk")),c}function k(a,b){if(!b.ended){if(b.decoder){var c=b.decoder.end();c&&c.length&&(b.buffer.push(c),b.length+=b.objectMode?1:c.length)}b.ended=!0,l(a)}}function l(a){var b=a._readableState;b.needReadable=!1,b.emittedReadable||(F("emitReadable",b.flowing),b.emittedReadable=!0,b.sync?z(m,a):m(a))}function m(a){F("emit readable"),a.emit("readable"),t(a)}function n(a,b){b.readingMore||(b.readingMore=!0,z(o,a,b))}function o(a,b){for(var c=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length=e)c=f?d.join(""):B.concat(d,e),d.length=0;else if(aj&&a>i;j++){var h=d[0],l=Math.min(a-i,h.length);f?c+=h.slice(0,l):h.copy(c,i,0,l),l0)throw new Error("endReadable called on non-empty stream");b.endEmitted||(b.ended=!0,z(w,b,a))}function w(a,b){a.endEmitted||0!==a.length||(a.endEmitted=!0,b.readable=!1,b.emit("end"))}function x(a,b){for(var c=0,d=a.length;d>c;c++)b(a[c],c)}function y(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1}b.exports=e;var z=a("process-nextick-args"),A=a("isarray"),B=a("buffer").Buffer;e.ReadableState=d;var C=a("events").EventEmitter;C.listenerCount||(C.listenerCount=function(a,b){return a.listeners(b).length});var D;!function(){try{D=a("stream")}catch(b){}finally{D||(D=a("events").EventEmitter)}}();var B=a("buffer").Buffer,E=a("core-util-is");E.inherits=a("inherits");var F=a("util");F=F&&F.debuglog?F.debuglog("stream"):function(){};var G;E.inherits(e,D),e.prototype.push=function(a,b){var c=this._readableState;return c.objectMode||"string"!=typeof a||(b=b||c.defaultEncoding,b!==c.encoding&&(a=new B(a,b),b="")),f(this,c,a,b,!1)},e.prototype.unshift=function(a){var b=this._readableState;return f(this,b,a,"",!0)},e.prototype.isPaused=function(){return this._readableState.flowing===!1},e.prototype.setEncoding=function(b){return G||(G=a("string_decoder/").StringDecoder),this._readableState.decoder=new G(b),this._readableState.encoding=b,this};var H=8388608;e.prototype.read=function(a){F("read",a);var b=this._readableState,c=a;if(("number"!=typeof a||a>0)&&(b.emittedReadable=!1),0===a&&b.needReadable&&(b.length>=b.highWaterMark||b.ended))return F("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?v(this):l(this),null;if(a=i(a,b),0===a&&b.ended)return 0===b.length&&v(this),null;var d=b.needReadable;F("need readable",d),(0===b.length||b.length-a0?u(a,b):null,null===e&&(b.needReadable=!0,a=0),b.length-=a,0!==b.length||b.ended||(b.needReadable=!0),c!==a&&b.ended&&0===b.length&&v(this),null!==e&&this.emit("data",e),e},e.prototype._read=function(){this.emit("error",new Error("not implemented"))},e.prototype.pipe=function(a,b){function d(a){F("onunpipe"),a===l&&f()}function e(){F("onend"),a.end()}function f(){F("cleanup"),a.removeListener("close",i),a.removeListener("finish",j),a.removeListener("drain",q),a.removeListener("error",h),a.removeListener("unpipe",d),l.removeListener("end",e),l.removeListener("end",f),l.removeListener("data",g),!m.awaitDrain||a._writableState&&!a._writableState.needDrain||q()}function g(b){F("ondata");var c=a.write(b);!1===c&&(F("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,l.pause())}function h(b){F("onerror",b),k(),a.removeListener("error",h),0===C.listenerCount(a,"error")&&a.emit("error",b)}function i(){a.removeListener("finish",j),k()}function j(){F("onfinish"),a.removeListener("close",i),k()}function k(){F("unpipe"),l.unpipe(a)}var l=this,m=this._readableState;switch(m.pipesCount){case 0:m.pipes=a;break;case 1:m.pipes=[m.pipes,a];break;default:m.pipes.push(a)}m.pipesCount+=1,F("pipe count=%d opts=%j",m.pipesCount,b);var n=(!b||b.end!==!1)&&a!==c.stdout&&a!==c.stderr,o=n?e:f;m.endEmitted?z(o):l.once("end",o),a.on("unpipe",d);var q=p(l);return a.on("drain",q),l.on("data",g),a._events&&a._events.error?A(a._events.error)?a._events.error.unshift(h):a._events.error=[h,a._events.error]:a.on("error",h),a.once("close",i),a.once("finish",j),a.emit("pipe",l),m.flowing||(F("pipe resume"),l.resume()),a},e.prototype.unpipe=function(a){var b=this._readableState;if(0===b.pipesCount)return this;if(1===b.pipesCount)return a&&a!==b.pipes?this:(a||(a=b.pipes),b.pipes=null,b.pipesCount=0,b.flowing=!1,a&&a.emit("unpipe",this),this);if(!a){var c=b.pipes,d=b.pipesCount;b.pipes=null,b.pipesCount=0,b.flowing=!1;for(var e=0;d>e;e++)c[e].emit("unpipe",this);return this}var e=y(b.pipes,a);return-1===e?this:(b.pipes.splice(e,1),b.pipesCount-=1,1===b.pipesCount&&(b.pipes=b.pipes[0]),a.emit("unpipe",this),this)},e.prototype.on=function(a,b){var c=D.prototype.on.call(this,a,b);if("data"===a&&!1!==this._readableState.flowing&&this.resume(),"readable"===a&&this.readable){var d=this._readableState;d.readableListening||(d.readableListening=!0,d.emittedReadable=!1,d.needReadable=!0,d.reading?d.length&&l(this,d):z(q,this))}return c},e.prototype.addListener=e.prototype.on,e.prototype.resume=function(){var a=this._readableState;return a.flowing||(F("resume"),a.flowing=!0,r(this,a)),this},e.prototype.pause=function(){return F("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(F("pause"),this._readableState.flowing=!1,this.emit("pause")),this},e.prototype.wrap=function(a){var b=this._readableState,c=!1,d=this;a.on("end",function(){if(F("wrapped end"),b.decoder&&!b.ended){var a=b.decoder.end();a&&a.length&&d.push(a)}d.push(null)}),a.on("data",function(e){if(F("wrapped data"),b.decoder&&(e=b.decoder.write(e)),(!b.objectMode||null!==e&&void 0!==e)&&(b.objectMode||e&&e.length)){var f=d.push(e);f||(c=!0,a.pause())}});for(var e in a)void 0===this[e]&&"function"==typeof a[e]&&(this[e]=function(b){return function(){return a[b].apply(a,arguments)}}(e));var f=["error","close","destroy","pause","resume"];return x(f,function(b){a.on(b,d.emit.bind(d,b))}),d._read=function(b){F("wrapped _read",b),c&&(c=!1,a.resume())},d},e._fromList=u}).call(this,a("_process"))},{"./_stream_duplex":27,_process:21,buffer:13,"core-util-is":32,events:17,inherits:19,isarray:20,"process-nextick-args":33,"string_decoder/":49,util:12}],30:[function(a,b){"use strict";function c(a){this.afterTransform=function(b,c){return d(a,b,c)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function d(a,b,c){var d=a._transformState;d.transforming=!1;var e=d.writecb;if(!e)return a.emit("error",new Error("no writecb in Transform class"));d.writechunk=null,d.writecb=null,null!==c&&void 0!==c&&a.push(c),e&&e(b);var f=a._readableState;f.reading=!1,(f.needReadable||f.length-1))throw new TypeError("Unknown encoding: "+a);this._writableState.defaultEncoding=a},f.prototype._write=function(a,b,c){c(new Error("not implemented"))},f.prototype._writev=null,f.prototype.end=function(a,b,c){var d=this._writableState;"function"==typeof a?(c=a,a=null,b=null):"function"==typeof b&&(c=b,b=null),null!==a&&void 0!==a&&this.write(a,b),d.corked&&(d.corked=1,this.uncork()),d.ending||d.finished||u(this,d,c)}},{"./_stream_duplex":27,buffer:13,"core-util-is":32,events:17,inherits:19,"process-nextick-args":33,"util-deprecate":34}],32:[function(a,b,c){(function(a){function b(a){return Array.isArray(a)}function d(a){return"boolean"==typeof a}function e(a){return null===a}function f(a){return null==a}function g(a){return"number"==typeof a}function h(a){return"string"==typeof a}function i(a){return"symbol"==typeof a}function j(a){return void 0===a}function k(a){return l(a)&&"[object RegExp]"===r(a)}function l(a){return"object"==typeof a&&null!==a}function m(a){return l(a)&&"[object Date]"===r(a)}function n(a){return l(a)&&("[object Error]"===r(a)||a instanceof Error)}function o(a){return"function"==typeof a}function p(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function q(b){return a.isBuffer(b)}function r(a){return Object.prototype.toString.call(a)}c.isArray=b,c.isBoolean=d,c.isNull=e,c.isNullOrUndefined=f,c.isNumber=g,c.isString=h,c.isSymbol=i,c.isUndefined=j,c.isRegExp=k,c.isObject=l,c.isDate=m,c.isError=n,c.isFunction=o,c.isPrimitive=p,c.isBuffer=q}).call(this,a("buffer").Buffer)},{buffer:13}],33:[function(a,b){(function(a){"use strict";function c(b){for(var c=new Array(arguments.length-1),d=0;da._pos){var f=c.substr(a._pos);if("x-user-defined"===a._charset){for(var g=new d(f.length),h=0;ha._pos&&(a.push(new d(new Uint8Array(j.result.slice(a._pos)))),a._pos=j.result.byteLength)},j.onload=function(){a.push(null)},j.readAsArrayBuffer(c)}a._xhr.readyState===i.DONE&&"ms-stream"!==a._mode&&a.push(null)}}).call(this,a("_process"),a("buffer").Buffer)},{"./capability":41,_process:21,buffer:13,foreach:45,inherits:19,stream:39}],44:[function(a,b){b.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Large",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Time-out",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],45:[function(a,b){var c=Object.prototype.hasOwnProperty,d=Object.prototype.toString;b.exports=function(a,b,e){if("[object Function]"!==d.call(b))throw new TypeError("iterator must be a function");var f=a.length;if(f===+f)for(var g=0;f>g;g++)b.call(e,a[g],g,a);else for(var h in a)c.call(a,h)&&b.call(e,a[h],h,a)}},{}],46:[function(a,b){var c=[].indexOf;b.exports=function(a,b){if(c)return a.indexOf(b);for(var d=0;d0&&!c.call(a,0))for(var n=0;n0)for(var o=0;o=0&&"[object Function]"===c.call(a.callee)),d}},{}],49:[function(a,b,c){function d(a){if(a&&!i(a))throw new Error("Unknown encoding: "+a)}function e(a){return a.toString(this.encoding)}function f(a){this.charReceived=a.length%2,this.charLength=this.charReceived?2:0}function g(a){this.charReceived=a.length%3,this.charLength=this.charReceived?3:0}var h=a("buffer").Buffer,i=h.isEncoding||function(a){switch(a&&a.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}},j=c.StringDecoder=function(a){switch(this.encoding=(a||"utf8").toLowerCase().replace(/[-_]/,""),d(a),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=f;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=g;break;default:return void(this.write=e)}this.charBuffer=new h(6),this.charReceived=0,this.charLength=0};j.prototype.write=function(a){for(var b="";this.charLength;){var c=a.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:a.length;if(a.copy(this.charBuffer,this.charReceived,0,c),this.charReceived+=c,this.charReceived=55296&&56319>=d)){if(this.charReceived=this.charLength=0,0===a.length)return b;break}this.charLength+=this.surrogateSize,b=""}this.detectIncompleteChar(a);var e=a.length;this.charLength&&(a.copy(this.charBuffer,0,a.length-this.charReceived,e),e-=this.charReceived),b+=a.toString(this.encoding,0,e);var e=b.length-1,d=b.charCodeAt(e);if(d>=55296&&56319>=d){var f=this.surrogateSize;return this.charLength+=f,this.charReceived+=f,this.charBuffer.copy(this.charBuffer,f,0,f),a.copy(this.charBuffer,0,0,f),b.substring(0,e)}return b},j.prototype.detectIncompleteChar=function(a){for(var b=a.length>=3?3:a.length;b>0;b--){var c=a[a.length-b];if(1==b&&c>>5==6){this.charLength=2;break}if(2>=b&&c>>4==14){this.charLength=3;break}if(3>=b&&c>>3==30){this.charLength=4;break}}this.charReceived=b},j.prototype.end=function(a){var b="";if(a&&a.length&&(b=this.write(a)),this.charReceived){var c=this.charReceived,d=this.charBuffer,e=this.encoding;b+=d.slice(0,c).toString(e)}return b}},{buffer:13}],50:[function(a,b,c){function d(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function e(a,b,c){if(a&&j(a)&&a instanceof d)return a;var e=new d;return e.parse(a,b,c),e}function f(a){return i(a)&&(a=e(a)),a instanceof d?a.format():d.prototype.format.call(a)}function g(a,b){return e(a,!1,!0).resolve(b)}function h(a,b){return a?e(a,!1,!0).resolveObject(b):b}function i(a){return"string"==typeof a}function j(a){return"object"==typeof a&&null!==a}function k(a){return null===a}function l(a){return null==a}var m=a("punycode");c.parse=e,c.resolve=g,c.resolveObject=h,c.format=f,c.Url=d;var n=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,p=["<",">",'"',"`"," ","\r","\n"," "],q=["{","}","|","\\","^","`"].concat(p),r=["'"].concat(q),s=["%","/","?",";","#"].concat(r),t=["/","?","#"],u=255,v=/^[a-z0-9A-Z_-]{0,63}$/,w=/^([a-z0-9A-Z_-]{0,63})(.*)$/,x={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},z={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},A=a("querystring");d.prototype.parse=function(a,b,c){if(!i(a))throw new TypeError("Parameter 'url' must be a string, not "+typeof a);var d=a;d=d.trim();var e=n.exec(d);if(e){e=e[0];var f=e.toLowerCase();this.protocol=f,d=d.substr(e.length)}if(c||e||d.match(/^\/\/[^@\/]+@[^@\/]+/)){var g="//"===d.substr(0,2);!g||e&&y[e]||(d=d.substr(2),this.slashes=!0)}if(!y[e]&&(g||e&&!z[e])){for(var h=-1,j=0;jk)&&(h=k)}var l,o;o=-1===h?d.lastIndexOf("@"):d.lastIndexOf("@",h),-1!==o&&(l=d.slice(0,o),d=d.slice(o+1),this.auth=decodeURIComponent(l)),h=-1;for(var j=0;jk)&&(h=k)}-1===h&&(h=d.length),this.host=d.slice(0,h),d=d.slice(h),this.parseHost(),this.hostname=this.hostname||"";var p="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!p)for(var q=this.hostname.split(/\./),j=0,B=q.length;B>j;j++){var C=q[j];if(C&&!C.match(v)){for(var D="",E=0,F=C.length;F>E;E++)D+=C.charCodeAt(E)>127?"x":C[E];if(!D.match(v)){var G=q.slice(0,j),H=q.slice(j+1),I=C.match(w);I&&(G.push(I[1]),H.unshift(I[2])),H.length&&(d="/"+H.join(".")+d),this.hostname=G.join(".");break}}}if(this.hostname=this.hostname.length>u?"":this.hostname.toLowerCase(),!p){for(var J=this.hostname.split("."),K=[],j=0;jj;j++){var O=r[j],P=encodeURIComponent(O);P===O&&(P=escape(O)),d=d.split(O).join(P)}var Q=d.indexOf("#");-1!==Q&&(this.hash=d.substr(Q),d=d.slice(0,Q));var R=d.indexOf("?");if(-1!==R?(this.search=d.substr(R),this.query=d.substr(R+1),b&&(this.query=A.parse(this.query)),d=d.slice(0,R)):b&&(this.search="",this.query={}),d&&(this.pathname=d),z[f]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var M=this.pathname||"",L=this.search||"";this.path=M+L}return this.href=this.format(),this},d.prototype.format=function(){var a=this.auth||"";a&&(a=encodeURIComponent(a),a=a.replace(/%3A/i,":"),a+="@");var b=this.protocol||"",c=this.pathname||"",d=this.hash||"",e=!1,f="";this.host?e=a+this.host:this.hostname&&(e=a+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(e+=":"+this.port)),this.query&&j(this.query)&&Object.keys(this.query).length&&(f=A.stringify(this.query));var g=this.search||f&&"?"+f||"";return b&&":"!==b.substr(-1)&&(b+=":"),this.slashes||(!b||z[b])&&e!==!1?(e="//"+(e||""),c&&"/"!==c.charAt(0)&&(c="/"+c)):e||(e=""),d&&"#"!==d.charAt(0)&&(d="#"+d),g&&"?"!==g.charAt(0)&&(g="?"+g),c=c.replace(/[?#]/g,function(a){return encodeURIComponent(a)}),g=g.replace("#","%23"),b+e+c+g+d},d.prototype.resolve=function(a){return this.resolveObject(e(a,!1,!0)).format()},d.prototype.resolveObject=function(a){if(i(a)){var b=new d;b.parse(a,!1,!0),a=b}var c=new d;if(Object.keys(this).forEach(function(a){c[a]=this[a]},this),c.hash=a.hash,""===a.href)return c.href=c.format(),c;if(a.slashes&&!a.protocol)return Object.keys(a).forEach(function(b){"protocol"!==b&&(c[b]=a[b])}),z[c.protocol]&&c.hostname&&!c.pathname&&(c.path=c.pathname="/"),c.href=c.format(),c;if(a.protocol&&a.protocol!==c.protocol){if(!z[a.protocol])return Object.keys(a).forEach(function(b){c[b]=a[b]}),c.href=c.format(),c;if(c.protocol=a.protocol,a.host||y[a.protocol])c.pathname=a.pathname;else{for(var e=(a.pathname||"").split("/");e.length&&!(a.host=e.shift()););a.host||(a.host=""),a.hostname||(a.hostname=""),""!==e[0]&&e.unshift(""),e.length<2&&e.unshift(""),c.pathname=e.join("/")}if(c.search=a.search,c.query=a.query,c.host=a.host||"",c.auth=a.auth,c.hostname=a.hostname||a.host,c.port=a.port,c.pathname||c.search){var f=c.pathname||"",g=c.search||"";c.path=f+g}return c.slashes=c.slashes||a.slashes,c.href=c.format(),c}var h=c.pathname&&"/"===c.pathname.charAt(0),j=a.host||a.pathname&&"/"===a.pathname.charAt(0),m=j||h||c.host&&a.pathname,n=m,o=c.pathname&&c.pathname.split("/")||[],e=a.pathname&&a.pathname.split("/")||[],p=c.protocol&&!z[c.protocol];if(p&&(c.hostname="",c.port=null,c.host&&(""===o[0]?o[0]=c.host:o.unshift(c.host)),c.host="",a.protocol&&(a.hostname=null,a.port=null,a.host&&(""===e[0]?e[0]=a.host:e.unshift(a.host)),a.host=null),m=m&&(""===e[0]||""===o[0])),j)c.host=a.host||""===a.host?a.host:c.host,c.hostname=a.hostname||""===a.hostname?a.hostname:c.hostname,c.search=a.search,c.query=a.query,o=e;else if(e.length)o||(o=[]),o.pop(),o=o.concat(e),c.search=a.search,c.query=a.query;else if(!l(a.search)){if(p){c.hostname=c.host=o.shift();var q=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;q&&(c.auth=q.shift(),c.host=c.hostname=q.shift())}return c.search=a.search,c.query=a.query,k(c.pathname)&&k(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.href=c.format(),c}if(!o.length)return c.pathname=null,c.path=c.search?"/"+c.search:null,c.href=c.format(),c;for(var r=o.slice(-1)[0],s=(c.host||a.host)&&("."===r||".."===r)||""===r,t=0,u=o.length;u>=0;u--)r=o[u],"."==r?o.splice(u,1):".."===r?(o.splice(u,1),t++):t&&(o.splice(u,1),t--);if(!m&&!n)for(;t--;t)o.unshift("..");!m||""===o[0]||o[0]&&"/"===o[0].charAt(0)||o.unshift(""),s&&"/"!==o.join("/").substr(-1)&&o.push("");var v=""===o[0]||o[0]&&"/"===o[0].charAt(0);if(p){c.hostname=c.host=v?"":o.length?o.shift():"";var q=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;q&&(c.auth=q.shift(),c.host=c.hostname=q.shift())}return m=m||c.host&&o.length,m&&!v&&o.unshift(""),o.length?c.pathname=o.join("/"):(c.pathname=null,c.path=null),k(c.pathname)&&k(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.auth=a.auth||c.auth,c.slashes=c.slashes||a.slashes,c.href=c.format(),c},d.prototype.parseHost=function(){var a=this.host,b=o.exec(a);b&&(b=b[0],":"!==b&&(this.port=b.substr(1)),a=a.substr(0,a.length-b.length)),a&&(this.hostname=a)}},{punycode:22,querystring:25}],51:[function(a,b){b.exports=function(a){return a&&"object"==typeof a&&"function"==typeof a.copy&&"function"==typeof a.fill&&"function"==typeof a.readUInt8}},{}],52:[function(a,b,c){(function(b,d){function e(a,b){var d={seen:[],stylize:g};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),p(b)?d.showHidden=b:b&&c._extend(d,b),v(d.showHidden)&&(d.showHidden=!1),v(d.depth)&&(d.depth=2),v(d.colors)&&(d.colors=!1),v(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=f),i(d,a,d.depth)}function f(a,b){var c=e.styles[b];return c?"["+e.colors[c][0]+"m"+a+"["+e.colors[c][1]+"m":a}function g(a){return a}function h(a){var b={};return a.forEach(function(a){b[a]=!0}),b}function i(a,b,d){if(a.customInspect&&b&&A(b.inspect)&&b.inspect!==c.inspect&&(!b.constructor||b.constructor.prototype!==b)){var e=b.inspect(d,a);return t(e)||(e=i(a,e,d)),e}var f=j(a,b);if(f)return f;var g=Object.keys(b),p=h(g);if(a.showHidden&&(g=Object.getOwnPropertyNames(b)),z(b)&&(g.indexOf("message")>=0||g.indexOf("description")>=0))return k(b);if(0===g.length){if(A(b)){var q=b.name?": "+b.name:"";return a.stylize("[Function"+q+"]","special")}if(w(b))return a.stylize(RegExp.prototype.toString.call(b),"regexp");if(y(b))return a.stylize(Date.prototype.toString.call(b),"date");if(z(b))return k(b)}var r="",s=!1,u=["{","}"];if(o(b)&&(s=!0,u=["[","]"]),A(b)){var v=b.name?": "+b.name:"";r=" [Function"+v+"]"}if(w(b)&&(r=" "+RegExp.prototype.toString.call(b)),y(b)&&(r=" "+Date.prototype.toUTCString.call(b)),z(b)&&(r=" "+k(b)),0===g.length&&(!s||0==b.length))return u[0]+r+u[1];if(0>d)return w(b)?a.stylize(RegExp.prototype.toString.call(b),"regexp"):a.stylize("[Object]","special");a.seen.push(b);var x;return x=s?l(a,b,d,p,g):g.map(function(c){return m(a,b,d,p,c,s)}),a.seen.pop(),n(x,r,u)}function j(a,b){if(v(b))return a.stylize("undefined","undefined");if(t(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return s(b)?a.stylize(""+b,"number"):p(b)?a.stylize(""+b,"boolean"):q(b)?a.stylize("null","null"):void 0}function k(a){return"["+Error.prototype.toString.call(a)+"]"}function l(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)f.push(F(b,String(g))?m(a,b,c,d,String(g),!0):"");return e.forEach(function(e){e.match(/^\d+$/)||f.push(m(a,b,c,d,e,!0))}),f}function m(a,b,c,d,e,f){var g,h,j;if(j=Object.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?h=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(h=a.stylize("[Setter]","special")),F(d,e)||(g="["+e+"]"),h||(a.seen.indexOf(j.value)<0?(h=q(c)?i(a,j.value,null):i(a,j.value,c-1),h.indexOf("\n")>-1&&(h=f?h.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+h.split("\n").map(function(a){return" "+a}).join("\n"))):h=a.stylize("[Circular]","special")),v(g)){if(f&&e.match(/^\d+$/))return h;g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+h}function n(a,b,c){var d=0,e=a.reduce(function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function o(a){return Array.isArray(a)}function p(a){return"boolean"==typeof a}function q(a){return null===a}function r(a){return null==a}function s(a){return"number"==typeof a}function t(a){return"string"==typeof a}function u(a){return"symbol"==typeof a}function v(a){return void 0===a}function w(a){return x(a)&&"[object RegExp]"===C(a)}function x(a){return"object"==typeof a&&null!==a}function y(a){return x(a)&&"[object Date]"===C(a)}function z(a){return x(a)&&("[object Error]"===C(a)||a instanceof Error)}function A(a){return"function"==typeof a}function B(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function C(a){return Object.prototype.toString.call(a)}function D(a){return 10>a?"0"+a.toString(10):a.toString(10)}function E(){var a=new Date,b=[D(a.getHours()),D(a.getMinutes()),D(a.getSeconds())].join(":");return[a.getDate(),J[a.getMonth()],b].join(" ")}function F(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var G=/%[sdj%]/g;c.format=function(a){if(!t(a)){for(var b=[],c=0;c=f)return a;switch(a){case"%s":return String(d[c++]);case"%d":return Number(d[c++]);case"%j":try{return JSON.stringify(d[c++])}catch(b){return"[Circular]"}default:return a}}),h=d[c];f>c;h=d[++c])g+=q(h)||!x(h)?" "+h:" "+e(h);return g},c.deprecate=function(a,e){function f(){if(!g){if(b.throwDeprecation)throw new Error(e);b.traceDeprecation?console.trace(e):console.error(e),g=!0}return a.apply(this,arguments)}if(v(d.process))return function(){return c.deprecate(a,e).apply(this,arguments)};if(b.noDeprecation===!0)return a;var g=!1;return f};var H,I={};c.debuglog=function(a){if(v(H)&&(H=b.env.NODE_DEBUG||""),a=a.toUpperCase(),!I[a])if(new RegExp("\\b"+a+"\\b","i").test(H)){var d=b.pid;I[a]=function(){var b=c.format.apply(c,arguments);console.error("%s %d: %s",a,d,b)}}else I[a]=function(){};return I[a]},c.inspect=e,e.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},e.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},c.isArray=o,c.isBoolean=p,c.isNull=q,c.isNullOrUndefined=r,c.isNumber=s,c.isString=t,c.isSymbol=u,c.isUndefined=v,c.isRegExp=w,c.isObject=x,c.isDate=y,c.isError=z,c.isFunction=A,c.isPrimitive=B,c.isBuffer=a("./support/isBuffer");var J=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];c.log=function(){console.log("%s - %s",E(),c.format.apply(c,arguments))},c.inherits=a("inherits"),c._extend=function(a,b){if(!b||!x(b))return a;for(var c=Object.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}}).call(this,a("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":51,_process:21,inherits:19}],53:[function(a,b){function c(){for(var a={},b=0;bc;c++)e=a[c],b=e(b);return b},j=function(a){return a.indexOf("&")>=0||a.indexOf(">")>=0||a.indexOf("<")>=0},l=function(a){return""},e=function(a){return a.replace("]]>","]]]]>")},c.processors=i,c.defaults={.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,async:!1,strict:!0,attrNameProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.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,async:!1,strict:!0,attrNameProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:"\n"},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}},c.ValidationError=function(a){function b(a){this.message=a}return m(b,a),b}(Error),c.Builder=function(){function a(a){var b,d,e;this.options={},d=c.defaults[.2];for(b in d)n.call(d,b)&&(e=d[b],this.options[b]=e);for(b in a)n.call(a,b)&&(e=a[b],this.options[b]=e)}return a.prototype.buildObject=function(a){var b,e,f,g,h;return b=this.options.attrkey,e=this.options.charkey,1===Object.keys(a).length&&this.options.rootName===c.defaults[.2].rootName?(h=Object.keys(a)[0],a=a[h]):h=this.options.rootName,f=function(a){return function(c,d){var f,g,h,i,k,m;if("object"!=typeof d)a.options.cdata&&j(d)?c.raw(l(d)):c.txt(d);else for(k in d)if(n.call(d,k))if(g=d[k],k===b){if("object"==typeof g)for(f in g)m=g[f],c=c.att(f,m)}else if(k===e)c=a.options.cdata&&j(g)?c.raw(l(g)):c.txt(g);else if(Array.isArray(g))for(i in g)n.call(g,i)&&(h=g[i],c="string"==typeof h?a.options.cdata&&j(h)?c.ele(k).raw(l(h)).up():c.ele(k,h).up():arguments.callee(c.ele(k),h).up());else c="object"==typeof g?arguments.callee(c.ele(k),g).up():"string"==typeof g&&a.options.cdata&&j(g)?c.ele(k).raw(l(g)).up():c.ele(k,g.toString()).up();return c}}(this),g=d.create(h,this.options.xmldec,this.options.doctype,{headless:this.options.headless}),f(g,a).end(this.options.renderOpts)},a}(),c.Parser=function(a){function d(a){this.parseString=o(this.parseString,this),this.reset=o(this.reset,this),this.assignOrPush=o(this.assignOrPush,this),this.processAsync=o(this.processAsync,this);var b,d,e;if(!(this instanceof c.Parser))return new c.Parser(a);this.options={},d=c.defaults[.2];for(b in d)n.call(d,b)&&(e=d[b],this.options[b]=e);for(b in a)n.call(a,b)&&(e=a[b],this.options[b]=e);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(i.normalize)),this.reset()}return m(d,a),d.prototype.processAsync=function(){var a;return this.remaining.length<=this.options.chunkSize?(a=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(a),this.saxParser.close()):(a=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(a),setImmediate(this.processAsync))},d.prototype.assignOrPush=function(a,b,c){return b in a?(a[b]instanceof Array||(a[b]=[a[b]]),a[b].push(c)):a[b]=this.options.explicitArray?[c]:c},d.prototype.reset=function(){var a,b,c,d;return this.removeAllListeners(),this.saxParser=k.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(a){return function(b){return a.saxParser.resume(),a.saxParser.errThrown?void 0:(a.saxParser.errThrown=!0,a.emit("error",b))}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,d=[],a=this.options.attrkey,b=this.options.charkey,this.saxParser.onopentag=function(c){return function(e){var f,g,i,j,k;if(i={},i[b]="",!c.options.ignoreAttrs){k=e.attributes;for(f in k)n.call(k,f)&&(a in i||c.options.mergeAttrs||(i[a]={}),g=e.attributes[f],j=c.options.attrNameProcessors?h(c.options.attrNameProcessors,f):f,c.options.mergeAttrs?c.assignOrPush(i,j,g):i[a][j]=g)}return i["#name"]=c.options.tagNameProcessors?h(c.options.tagNameProcessors,e.name):e.name,c.options.xmlns&&(i[c.options.xmlnskey]={uri:e.uri,local:e.local}),d.push(i)}}(this),this.saxParser.onclosetag=function(a){return function(){var c,e,f,i,j,k,l,m,o,p,q;if(l=d.pop(),k=l["#name"],a.options.explicitChildren&&a.options.preserveChildrenOrder||delete l["#name"],l.cdata===!0&&(c=l.cdata,delete l.cdata),p=d[d.length-1],l[b].match(/^\s*$/)&&!c?(e=l[b],delete l[b]):(a.options.trim&&(l[b]=l[b].trim()),a.options.normalize&&(l[b]=l[b].replace(/\s{2,}/g," ").trim()),l[b]=a.options.valueProcessors?h(a.options.valueProcessors,l[b]):l[b],1===Object.keys(l).length&&b in l&&!a.EXPLICIT_CHARKEY&&(l=l[b])),g(l)&&(l=""!==a.options.emptyTag?a.options.emptyTag:e),null!=a.options.validator){q="/"+function(){var a,b,c;for(c=[],a=0,b=d.length;b>a;a++)j=d[a],c.push(j["#name"]);return c}().concat(k).join("/");try{l=a.options.validator(q,p&&p[k],l)}catch(r){f=r,a.emit("error",f)}}if(a.options.explicitChildren&&!a.options.mergeAttrs&&"object"==typeof l)if(a.options.preserveChildrenOrder){if(p){p[a.options.childkey]=p[a.options.childkey]||[],m={};for(i in l)n.call(l,i)&&(m[i]=l[i]);p[a.options.childkey].push(m),delete l["#name"],1===Object.keys(l).length&&b in l&&!a.EXPLICIT_CHARKEY&&(l=l[b])}}else j={},a.options.attrkey in l&&(j[a.options.attrkey]=l[a.options.attrkey],delete l[a.options.attrkey]),!a.options.charsAsChildren&&a.options.charkey in l&&(j[a.options.charkey]=l[a.options.charkey],delete l[a.options.charkey]),Object.getOwnPropertyNames(l).length>0&&(j[a.options.childkey]=l),l=j;return d.length>0?a.assignOrPush(p,k,l):(a.options.explicitRoot&&(o=l,l={},l[k]=o),a.resultObject=l,a.saxParser.ended=!0,a.emit("end",a.resultObject))}}(this),c=function(a){return function(c){var e,f;return f=d[d.length-1],f?(f[b]+=c,a.options.explicitChildren&&a.options.preserveChildrenOrder&&a.options.charsAsChildren&&""!==c.replace(/\\n/g,"").trim()&&(f[a.options.childkey]=f[a.options.childkey]||[],e={"#name":"__text__"},e[b]=c,f[a.options.childkey].push(e)),f):void 0}}(this),this.saxParser.ontext=c,
+this.saxParser.oncdata=function(){return function(a){var b;return b=c(a),b?b.cdata=!0:void 0}}(this)},d.prototype.parseString=function(a,c){var d;if(null!=c&&"function"==typeof c&&(this.on("end",function(a){return this.reset(),c(null,a)}),this.on("error",function(a){return this.reset(),c(a)})),a=a.toString(),""===a.trim())return this.emit("end",null),!0;try{return a=b.stripBOM(a),this.options.async&&(this.remaining=a,setImmediate(this.processAsync),this.saxParser),this.saxParser.write(a).close()}catch(e){if(d=e,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",d),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw d}},d}(f.EventEmitter),c.parseString=function(a,b,d){var e,f,g;return null!=d?("function"==typeof d&&(e=d),"object"==typeof b&&(f=b)):("function"==typeof b&&(e=b),f={}),g=new c.Parser(f),g.parseString(a,e)}}).call(this)},{"./bom":54,"./processors":55,events:17,sax:57,xmlbuilder:74}],57:[function(a,b,c){(function(b){!function(c){function d(a,b){if(!(this instanceof d))return new d(a,b);var e=this;f(e),e.q=e.c="",e.bufferCheckPosition=c.MAX_BUFFER_LENGTH,e.opt=b||{},e.opt.lowercase=e.opt.lowercase||e.opt.lowercasetags,e.looseCase=e.opt.lowercase?"toLowerCase":"toUpperCase",e.tags=[],e.closed=e.closedRoot=e.sawRoot=!1,e.tag=e.error=null,e.strict=!!a,e.noscript=!(!a&&!e.opt.noscript),e.state=S.BEGIN,e.ENTITIES=Object.create(c.ENTITIES),e.attribList=[],e.opt.xmlns&&(e.ns=Object.create(P)),e.trackPosition=e.opt.position!==!1,e.trackPosition&&(e.position=e.line=e.column=0),n(e,"onready")}function e(a){for(var b=Math.max(c.MAX_BUFFER_LENGTH,10),d=0,e=0,f=B.length;f>e;e++){var g=a[B[e]].length;if(g>b)switch(B[e]){case"textNode":p(a);break;case"cdata":o(a,"oncdata",a.cdata),a.cdata="";break;case"script":o(a,"onscript",a.script),a.script="";break;default:r(a,"Max buffer length exceeded: "+B[e])}d=Math.max(d,g)}a.bufferCheckPosition=c.MAX_BUFFER_LENGTH-d+a.position}function f(a){for(var b=0,c=B.length;c>b;b++)a[B[b]]=""}function g(a){p(a),""!==a.cdata&&(o(a,"oncdata",a.cdata),a.cdata=""),""!==a.script&&(o(a,"onscript",a.script),a.script="")}function h(a,b){return new i(a,b)}function i(a,b){if(!(this instanceof i))return new i(a,b);C.apply(this),this._parser=new d(a,b),this.writable=!0,this.readable=!0;var c=this;this._parser.onend=function(){c.emit("end")},this._parser.onerror=function(a){c.emit("error",a),c._parser.error=null},this._decoder=null,E.forEach(function(a){Object.defineProperty(c,"on"+a,{get:function(){return c._parser["on"+a]},set:function(b){return b?void c.on(a,b):(c.removeAllListeners(a),c._parser["on"+a]=b)},enumerable:!0,configurable:!1})})}function j(a){return a.split("").reduce(function(a,b){return a[b]=!0,a},{})}function k(a){return"[object RegExp]"===Object.prototype.toString.call(a)}function l(a,b){return k(a)?!!b.match(a):a[b]}function m(a,b){return!l(a,b)}function n(a,b,c){a[b]&&a[b](c)}function o(a,b,c){a.textNode&&p(a),n(a,b,c)}function p(a){a.textNode=q(a.opt,a.textNode),a.textNode&&n(a,"ontext",a.textNode),a.textNode=""}function q(a,b){return a.trim&&(b=b.trim()),a.normalize&&(b=b.replace(/\s+/g," ")),b}function r(a,b){return p(a),a.trackPosition&&(b+="\nLine: "+a.line+"\nColumn: "+a.column+"\nChar: "+a.c),b=new Error(b),a.error=b,n(a,"onerror",b),a}function s(a){return a.closedRoot||t(a,"Unclosed root tag"),a.state!==S.BEGIN&&a.state!==S.TEXT&&r(a,"Unexpected end"),p(a),a.c="",a.closed=!0,n(a,"onend"),d.call(a,a.strict,a.opt),a}function t(a,b){if("object"!=typeof a||!(a instanceof d))throw new Error("bad call to strictFail");a.strict&&r(a,b)}function u(a){a.strict||(a.tagName=a.tagName[a.looseCase]());var b=a.tags[a.tags.length-1]||a,c=a.tag={name:a.tagName,attributes:{}};a.opt.xmlns&&(c.ns=b.ns),a.attribList.length=0}function v(a,b){var c=a.indexOf(":"),d=0>c?["",a]:a.split(":"),e=d[0],f=d[1];return b&&"xmlns"===a&&(e="xmlns",f=""),{prefix:e,local:f}}function w(a){if(a.strict||(a.attribName=a.attribName[a.looseCase]()),-1!==a.attribList.indexOf(a.attribName)||a.tag.attributes.hasOwnProperty(a.attribName))return a.attribName=a.attribValue="";if(a.opt.xmlns){var b=v(a.attribName,!0),c=b.prefix,d=b.local;if("xmlns"===c)if("xml"===d&&a.attribValue!==N)t(a,"xml: prefix must be bound to "+N+"\nActual: "+a.attribValue);else if("xmlns"===d&&a.attribValue!==O)t(a,"xmlns: prefix must be bound to "+O+"\nActual: "+a.attribValue);else{var e=a.tag,f=a.tags[a.tags.length-1]||a;e.ns===f.ns&&(e.ns=Object.create(f.ns)),e.ns[d]=a.attribValue}a.attribList.push([a.attribName,a.attribValue])}else a.tag.attributes[a.attribName]=a.attribValue,o(a,"onattribute",{name:a.attribName,value:a.attribValue});a.attribName=a.attribValue=""}function x(a,b){if(a.opt.xmlns){var c=a.tag,d=v(a.tagName);c.prefix=d.prefix,c.local=d.local,c.uri=c.ns[d.prefix]||"",c.prefix&&!c.uri&&(t(a,"Unbound namespace prefix: "+JSON.stringify(a.tagName)),c.uri=d.prefix);var e=a.tags[a.tags.length-1]||a;c.ns&&e.ns!==c.ns&&Object.keys(c.ns).forEach(function(b){o(a,"onopennamespace",{prefix:b,uri:c.ns[b]})});for(var f=0,g=a.attribList.length;g>f;f++){var h=a.attribList[f],i=h[0],j=h[1],k=v(i,!0),l=k.prefix,m=k.local,n=""==l?"":c.ns[l]||"",p={name:i,value:j,prefix:l,local:m,uri:n};l&&"xmlns"!=l&&!n&&(t(a,"Unbound namespace prefix: "+JSON.stringify(l)),p.uri=l),a.tag.attributes[i]=p,o(a,"onattribute",p)}a.attribList.length=0}a.tag.isSelfClosing=!!b,a.sawRoot=!0,a.tags.push(a.tag),o(a,"onopentag",a.tag),b||(a.state=a.noscript||"script"!==a.tagName.toLowerCase()?S.TEXT:S.SCRIPT,a.tag=null,a.tagName=""),a.attribName=a.attribValue="",a.attribList.length=0}function y(a){if(!a.tagName)return t(a,"Weird empty close tag."),a.textNode+=">",void(a.state=S.TEXT);if(a.script){if("script"!==a.tagName)return a.script+=""+a.tagName+">",a.tagName="",void(a.state=S.SCRIPT);o(a,"onscript",a.script),a.script=""}var b=a.tags.length,c=a.tagName;a.strict||(c=c[a.looseCase]());for(var d=c;b--;){var e=a.tags[b];if(e.name===d)break;t(a,"Unexpected close tag")}if(0>b)return t(a,"Unmatched closing tag: "+a.tagName),a.textNode+=""+a.tagName+">",void(a.state=S.TEXT);a.tagName=c;for(var f=a.tags.length;f-->b;){var g=a.tag=a.tags.pop();a.tagName=a.tag.name,o(a,"onclosetag",a.tagName);var h={};for(var i in g.ns)h[i]=g.ns[i];var j=a.tags[a.tags.length-1]||a;a.opt.xmlns&&g.ns!==j.ns&&Object.keys(g.ns).forEach(function(b){var c=g.ns[b];o(a,"onclosenamespace",{prefix:b,uri:c})})}0===b&&(a.closedRoot=!0),a.tagName=a.attribValue=a.attribName="",a.attribList.length=0,a.state=S.TEXT}function z(a){var b,c=a.entity,d=c.toLowerCase(),e="";return a.ENTITIES[c]?a.ENTITIES[c]:a.ENTITIES[d]?a.ENTITIES[d]:(c=d,"#"===c.charAt(0)&&("x"===c.charAt(1)?(c=c.slice(2),b=parseInt(c,16),e=b.toString(16)):(c=c.slice(1),b=parseInt(c,10),e=b.toString(10))),c=c.replace(/^0+/,""),e.toLowerCase()!==c?(t(a,"Invalid character entity"),"&"+a.entity+";"):String.fromCodePoint(b))}function A(a){var b=this;if(this.error)throw this.error;if(b.closed)return r(b,"Cannot write after close. Assign an onready handler.");if(null===a)return s(b);for(var c=0,d="";b.c=d=a.charAt(c++);)switch(b.trackPosition&&(b.position++,"\n"===d?(b.line++,b.column=0):b.column++),b.state){case S.BEGIN:"<"===d?(b.state=S.OPEN_WAKA,b.startTagPosition=b.position):m(F,d)&&(t(b,"Non-whitespace before first tag."),b.textNode=d,b.state=S.TEXT);continue;case S.TEXT:if(b.sawRoot&&!b.closedRoot){for(var f=c-1;d&&"<"!==d&&"&"!==d;)d=a.charAt(c++),d&&b.trackPosition&&(b.position++,"\n"===d?(b.line++,b.column=0):b.column++);b.textNode+=a.substring(f,c-1)}"<"===d?(b.state=S.OPEN_WAKA,b.startTagPosition=b.position):(!m(F,d)||b.sawRoot&&!b.closedRoot||t(b,"Text data outside of root node."),"&"===d?b.state=S.TEXT_ENTITY:b.textNode+=d);continue;case S.SCRIPT:"<"===d?b.state=S.SCRIPT_ENDING:b.script+=d;continue;case S.SCRIPT_ENDING:"/"===d?b.state=S.CLOSE_TAG:(b.script+="<"+d,b.state=S.SCRIPT);continue;case S.OPEN_WAKA:if("!"===d)b.state=S.SGML_DECL,b.sgmlDecl="";else if(l(F,d));else if(l(Q,d))b.state=S.OPEN_TAG,b.tagName=d;else if("/"===d)b.state=S.CLOSE_TAG,b.tagName="";else if("?"===d)b.state=S.PROC_INST,b.procInstName=b.procInstBody="";else{if(t(b,"Unencoded <"),b.startTagPosition+1"===d?(o(b,"onsgmldeclaration",b.sgmlDecl),b.sgmlDecl="",b.state=S.TEXT):l(I,d)?(b.state=S.SGML_DECL_QUOTED,b.sgmlDecl+=d):b.sgmlDecl+=d;continue;case S.SGML_DECL_QUOTED:d===b.q&&(b.state=S.SGML_DECL,b.q=""),b.sgmlDecl+=d;continue;case S.DOCTYPE:">"===d?(b.state=S.TEXT,o(b,"ondoctype",b.doctype),b.doctype=!0):(b.doctype+=d,"["===d?b.state=S.DOCTYPE_DTD:l(I,d)&&(b.state=S.DOCTYPE_QUOTED,b.q=d));continue;case S.DOCTYPE_QUOTED:b.doctype+=d,d===b.q&&(b.q="",b.state=S.DOCTYPE);continue;case S.DOCTYPE_DTD:b.doctype+=d,"]"===d?b.state=S.DOCTYPE:l(I,d)&&(b.state=S.DOCTYPE_DTD_QUOTED,b.q=d);continue;case S.DOCTYPE_DTD_QUOTED:b.doctype+=d,d===b.q&&(b.state=S.DOCTYPE_DTD,b.q="");continue;case S.COMMENT:"-"===d?b.state=S.COMMENT_ENDING:b.comment+=d;continue;case S.COMMENT_ENDING:"-"===d?(b.state=S.COMMENT_ENDED,b.comment=q(b.opt,b.comment),b.comment&&o(b,"oncomment",b.comment),b.comment=""):(b.comment+="-"+d,b.state=S.COMMENT);continue;case S.COMMENT_ENDED:">"!==d?(t(b,"Malformed comment"),b.comment+="--"+d,b.state=S.COMMENT):b.state=S.TEXT;continue;case S.CDATA:"]"===d?b.state=S.CDATA_ENDING:b.cdata+=d;continue;case S.CDATA_ENDING:"]"===d?b.state=S.CDATA_ENDING_2:(b.cdata+="]"+d,b.state=S.CDATA);continue;case S.CDATA_ENDING_2:">"===d?(b.cdata&&o(b,"oncdata",b.cdata),o(b,"onclosecdata"),b.cdata="",b.state=S.TEXT):"]"===d?b.cdata+="]":(b.cdata+="]]"+d,b.state=S.CDATA);continue;case S.PROC_INST:"?"===d?b.state=S.PROC_INST_ENDING:l(F,d)?b.state=S.PROC_INST_BODY:b.procInstName+=d;continue;case S.PROC_INST_BODY:if(!b.procInstBody&&l(F,d))continue;"?"===d?b.state=S.PROC_INST_ENDING:b.procInstBody+=d;continue;case S.PROC_INST_ENDING:">"===d?(o(b,"onprocessinginstruction",{name:b.procInstName,body:b.procInstBody}),b.procInstName=b.procInstBody="",b.state=S.TEXT):(b.procInstBody+="?"+d,b.state=S.PROC_INST_BODY);continue;case S.OPEN_TAG:l(R,d)?b.tagName+=d:(u(b),">"===d?x(b):"/"===d?b.state=S.OPEN_TAG_SLASH:(m(F,d)&&t(b,"Invalid character in tag name"),b.state=S.ATTRIB));continue;case S.OPEN_TAG_SLASH:">"===d?(x(b,!0),y(b)):(t(b,"Forward-slash in opening tag not followed by >"),b.state=S.ATTRIB);continue;case S.ATTRIB:if(l(F,d))continue;">"===d?x(b):"/"===d?b.state=S.OPEN_TAG_SLASH:l(Q,d)?(b.attribName=d,b.attribValue="",b.state=S.ATTRIB_NAME):t(b,"Invalid attribute name");continue;case S.ATTRIB_NAME:"="===d?b.state=S.ATTRIB_VALUE:">"===d?(t(b,"Attribute without value"),b.attribValue=b.attribName,w(b),x(b)):l(F,d)?b.state=S.ATTRIB_NAME_SAW_WHITE:l(R,d)?b.attribName+=d:t(b,"Invalid attribute name");continue;case S.ATTRIB_NAME_SAW_WHITE:if("="===d)b.state=S.ATTRIB_VALUE;else{if(l(F,d))continue;t(b,"Attribute without value"),b.tag.attributes[b.attribName]="",b.attribValue="",o(b,"onattribute",{name:b.attribName,value:""}),b.attribName="",">"===d?x(b):l(Q,d)?(b.attribName=d,b.state=S.ATTRIB_NAME):(t(b,"Invalid attribute name"),b.state=S.ATTRIB)}continue;case S.ATTRIB_VALUE:if(l(F,d))continue;l(I,d)?(b.q=d,b.state=S.ATTRIB_VALUE_QUOTED):(t(b,"Unquoted attribute value"),b.state=S.ATTRIB_VALUE_UNQUOTED,b.attribValue=d);continue;case S.ATTRIB_VALUE_QUOTED:if(d!==b.q){"&"===d?b.state=S.ATTRIB_VALUE_ENTITY_Q:b.attribValue+=d;continue}w(b),b.q="",b.state=S.ATTRIB_VALUE_CLOSED;continue;case S.ATTRIB_VALUE_CLOSED:l(F,d)?b.state=S.ATTRIB:">"===d?x(b):"/"===d?b.state=S.OPEN_TAG_SLASH:l(Q,d)?(t(b,"No whitespace between attributes"),b.attribName=d,b.attribValue="",b.state=S.ATTRIB_NAME):t(b,"Invalid attribute name");continue;case S.ATTRIB_VALUE_UNQUOTED:if(m(K,d)){"&"===d?b.state=S.ATTRIB_VALUE_ENTITY_U:b.attribValue+=d;continue}w(b),">"===d?x(b):b.state=S.ATTRIB;continue;case S.CLOSE_TAG:if(b.tagName)">"===d?y(b):l(R,d)?b.tagName+=d:b.script?(b.script+=""+b.tagName,b.tagName="",b.state=S.SCRIPT):(m(F,d)&&t(b,"Invalid tagname in closing tag"),b.state=S.CLOSE_TAG_SAW_WHITE);else{if(l(F,d))continue;m(Q,d)?b.script?(b.script+=""+d,b.state=S.SCRIPT):t(b,"Invalid tagname in closing tag."):b.tagName=d}continue;case S.CLOSE_TAG_SAW_WHITE:if(l(F,d))continue;">"===d?y(b):t(b,"Invalid characters in closing tag");continue;case S.TEXT_ENTITY:case S.ATTRIB_VALUE_ENTITY_Q:case S.ATTRIB_VALUE_ENTITY_U:switch(b.state){case S.TEXT_ENTITY:var h=S.TEXT,i="textNode";break;case S.ATTRIB_VALUE_ENTITY_Q:var h=S.ATTRIB_VALUE_QUOTED,i="attribValue";break;case S.ATTRIB_VALUE_ENTITY_U:var h=S.ATTRIB_VALUE_UNQUOTED,i="attribValue"}";"===d?(b[i]+=z(b),b.entity="",b.state=h):l(J,d)?b.entity+=d:(t(b,"Invalid character entity"),b[i]+="&"+b.entity+d,b.entity="",b.state=h);continue;default:throw new Error(b,"Unknown state: "+b.state)}return b.position>=b.bufferCheckPosition&&e(b),b}c.parser=function(a,b){return new d(a,b)},c.SAXParser=d,c.SAXStream=i,c.createStream=h,c.MAX_BUFFER_LENGTH=65536;var B=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];c.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(a){function b(){this.__proto__=a}return b.prototype=a,new b}),Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__}),Object.keys||(Object.keys=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b}),d.prototype={end:function(){s(this)},write:A,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){g(this)}};try{var C=a("stream").Stream}catch(D){var C=function(){}}var E=c.EVENTS.filter(function(a){return"error"!==a&&"end"!==a});i.prototype=Object.create(C.prototype,{constructor:{value:i}}),i.prototype.write=function(c){if("function"==typeof b&&"function"==typeof b.isBuffer&&b.isBuffer(c)){if(!this._decoder){var d=a("string_decoder").StringDecoder;this._decoder=new d("utf8")}c=this._decoder.write(c)}return this._parser.write(c.toString()),this.emit("data",c),!0},i.prototype.end=function(a){return a&&a.length&&this.write(a),this._parser.end(),!0},i.prototype.on=function(a,b){var c=this;return c._parser["on"+a]||-1===E.indexOf(a)||(c._parser["on"+a]=function(){var b=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);b.splice(0,0,a),c.emit.apply(c,b)}),C.prototype.on.call(c,a,b)};var F="\r\n ",G="0124356789",H="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",I="'\"",J=G+H+"#",K=F+">",L="[CDATA[",M="DOCTYPE",N="http://www.w3.org/XML/1998/namespace",O="http://www.w3.org/2000/xmlns/",P={xml:N,xmlns:O};F=j(F),G=j(G),H=j(H);var Q=/[:_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]/,R=/[:_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-]/;I=j(I),J=j(J),K=j(K);var S=0;c.STATE={BEGIN:S++,TEXT:S++,TEXT_ENTITY:S++,OPEN_WAKA:S++,SGML_DECL:S++,SGML_DECL_QUOTED:S++,DOCTYPE:S++,DOCTYPE_QUOTED:S++,DOCTYPE_DTD:S++,DOCTYPE_DTD_QUOTED:S++,COMMENT_STARTING:S++,COMMENT:S++,COMMENT_ENDING:S++,COMMENT_ENDED:S++,CDATA:S++,CDATA_ENDING:S++,CDATA_ENDING_2:S++,PROC_INST:S++,PROC_INST_BODY:S++,PROC_INST_ENDING:S++,OPEN_TAG:S++,OPEN_TAG_SLASH:S++,ATTRIB:S++,ATTRIB_NAME:S++,ATTRIB_NAME_SAW_WHITE:S++,ATTRIB_VALUE:S++,ATTRIB_VALUE_QUOTED:S++,ATTRIB_VALUE_CLOSED:S++,ATTRIB_VALUE_UNQUOTED:S++,ATTRIB_VALUE_ENTITY_Q:S++,ATTRIB_VALUE_ENTITY_U:S++,CLOSE_TAG:S++,CLOSE_TAG_SAW_WHITE:S++,SCRIPT:S++,SCRIPT_ENDING:S++},c.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(c.ENTITIES).forEach(function(a){var b=c.ENTITIES[a],d="number"==typeof b?String.fromCharCode(b):b;c.ENTITIES[a]=d});for(var S in c.STATE)c.STATE[c.STATE[S]]=S;S=c.STATE,String.fromCodePoint||!function(){var a=String.fromCharCode,b=Math.floor,c=function(){var c,d,e=16384,f=[],g=-1,h=arguments.length;if(!h)return"";for(var i="";++gj||j>1114111||b(j)!=j)throw RangeError("Invalid code point: "+j);65535>=j?f.push(j):(j-=65536,c=(j>>10)+55296,d=j%1024+56320,f.push(c,d)),(g+1==h||f.length>e)&&(i+=a.apply(null,f),f.length=0)}return i};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:c,configurable:!0,writable:!0}):String.fromCodePoint=c}()}("undefined"==typeof c?sax={}:c)}).call(this,a("buffer").Buffer)},{buffer:13,stream:39,string_decoder:49}],58:[function(a,b){(function(){var c,d;d=a("lodash/object/create"),b.exports=c=function(){function a(a,b,c){if(this.stringify=a.stringify,null==b)throw new Error("Missing attribute name of element "+a.name);if(null==c)throw new Error("Missing attribute value for attribute "+b+" of element "+a.name);this.name=this.stringify.attName(b),this.value=this.stringify.attValue(c)}return a.prototype.clone=function(){return d(a.prototype,this)},a.prototype.toString=function(){return" "+this.name+'="'+this.value+'"'},a}()}).call(this)},{"lodash/object/create":128}],59:[function(a,b){(function(){var c,d,e,f,g;g=a("./XMLStringifier"),d=a("./XMLDeclaration"),e=a("./XMLDocType"),f=a("./XMLElement"),b.exports=c=function(){function a(a,b){var c,d;if(null==a)throw new Error("Root element needs a name");null==b&&(b={}),this.options=b,this.stringify=new g(b),d=new f(this,"doc"),c=d.element(a),c.isRoot=!0,c.documentObject=this,this.rootObject=c,b.headless||(c.declaration(b),(null!=b.pubID||null!=b.sysID)&&c.doctype(b))}return a.prototype.root=function(){return this.rootObject},a.prototype.end=function(a){return this.toString(a)},a.prototype.toString=function(a){var b,c,d,e,f,g,h,i;return e=(null!=a?a.pretty:void 0)||!1,b=null!=(g=null!=a?a.indent:void 0)?g:" ",d=null!=(h=null!=a?a.offset:void 0)?h:0,c=null!=(i=null!=a?a.newline:void 0)?i:"\n",f="",null!=this.xmldec&&(f+=this.xmldec.toString(a)),null!=this.doctype&&(f+=this.doctype.toString(a)),f+=this.rootObject.toString(a),e&&f.slice(-c.length)===c&&(f=f.slice(0,-c.length)),f},a}()}).call(this)},{"./XMLDeclaration":66,"./XMLDocType":67,"./XMLElement":68,"./XMLStringifier":72}],60:[function(a,b){(function(){var c,d,e,f=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},g={}.hasOwnProperty;e=a("lodash/object/create"),d=a("./XMLNode"),b.exports=c=function(a){function b(a,c){if(b.__super__.constructor.call(this,a),null==c)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(c)}return f(b,a),b.prototype.clone=function(){return e(b.prototype,this)},b.prototype.toString=function(a,b){var c,d,e,f,g,h,i,j,k;return f=(null!=a?a.pretty:void 0)||!1,c=null!=(h=null!=a?a.indent:void 0)?h:" ",e=null!=(i=null!=a?a.offset:void 0)?i:0,d=null!=(j=null!=a?a.newline:void 0)?j:"\n",b||(b=0),k=new Array(b+e+1).join(c),g="",f&&(g+=k),g+="",f&&(g+=d),g},b}(d)}).call(this)},{"./XMLNode":69,"lodash/object/create":128}],61:[function(a,b){(function(){var c,d,e,f=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},g={}.hasOwnProperty;e=a("lodash/object/create"),d=a("./XMLNode"),b.exports=c=function(a){function b(a,c){if(b.__super__.constructor.call(this,a),null==c)throw new Error("Missing comment text");this.text=this.stringify.comment(c)}return f(b,a),b.prototype.clone=function(){return e(b.prototype,this)},b.prototype.toString=function(a,b){var c,d,e,f,g,h,i,j,k;return f=(null!=a?a.pretty:void 0)||!1,c=null!=(h=null!=a?a.indent:void 0)?h:" ",e=null!=(i=null!=a?a.offset:void 0)?i:0,d=null!=(j=null!=a?a.newline:void 0)?j:"\n",b||(b=0),k=new Array(b+e+1).join(c),g="",f&&(g+=k),g+="",f&&(g+=d),g},b}(d)}).call(this)},{"./XMLNode":69,"lodash/object/create":128}],62:[function(a,b){(function(){var c,d;d=a("lodash/object/create"),b.exports=c=function(){function a(a,b,c,d,e,f){if(this.stringify=a.stringify,null==b)throw new Error("Missing DTD element name");if(null==c)throw new Error("Missing DTD attribute name");if(!d)throw new Error("Missing DTD attribute type");if(!e)throw new Error("Missing DTD attribute default");if(0!==e.indexOf("#")&&(e="#"+e),!e.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(f&&!e.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(b),this.attributeName=this.stringify.attName(c),this.attributeType=this.stringify.dtdAttType(d),this.defaultValue=this.stringify.dtdAttDefault(f),this.defaultValueType=e}return a.prototype.clone=function(){return d(a.prototype,this)},a.prototype.toString=function(a,b){var c,d,e,f,g,h,i,j,k;return f=(null!=a?a.pretty:void 0)||!1,c=null!=(h=null!=a?a.indent:void 0)?h:" ",e=null!=(i=null!=a?a.offset:void 0)?i:0,d=null!=(j=null!=a?a.newline:void 0)?j:"\n",b||(b=0),k=new Array(b+e+1).join(c),g="",f&&(g+=k),g+="",f&&(g+=d),g},a}()}).call(this)},{"lodash/object/create":128}],63:[function(a,b){(function(){var c,d,e;d=a("lodash/object/create"),e=a("lodash/lang/isArray"),b.exports=c=function(){function a(a,b,c){if(this.stringify=a.stringify,null==b)throw new Error("Missing DTD element name");c||(c="(#PCDATA)"),e(c)&&(c="("+c.join(",")+")"),this.name=this.stringify.eleName(b),this.value=this.stringify.dtdElementValue(c)}return a.prototype.clone=function(){return d(a.prototype,this)},a.prototype.toString=function(a,b){var c,d,e,f,g,h,i,j,k;return f=(null!=a?a.pretty:void 0)||!1,c=null!=(h=null!=a?a.indent:void 0)?h:" ",e=null!=(i=null!=a?a.offset:void 0)?i:0,d=null!=(j=null!=a?a.newline:void 0)?j:"\n",b||(b=0),k=new Array(b+e+1).join(c),g="",f&&(g+=k),g+="",f&&(g+=d),g},a}()}).call(this)},{"lodash/lang/isArray":120,"lodash/object/create":128}],64:[function(a,b){(function(){var c,d,e;d=a("lodash/object/create"),e=a("lodash/lang/isObject"),b.exports=c=function(){function a(a,b,c,d){if(this.stringify=a.stringify,null==c)throw new Error("Missing entity name");if(null==d)throw new Error("Missing entity value");if(this.pe=!!b,this.name=this.stringify.eleName(c),e(d)){if(!d.pubID&&!d.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(d.pubID&&!d.sysID)throw new Error("System identifier is required for a public external entity");if(null!=d.pubID&&(this.pubID=this.stringify.dtdPubID(d.pubID)),null!=d.sysID&&(this.sysID=this.stringify.dtdSysID(d.sysID)),null!=d.nData&&(this.nData=this.stringify.dtdNData(d.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(d)}return a.prototype.clone=function(){return d(a.prototype,this)},a.prototype.toString=function(a,b){var c,d,e,f,g,h,i,j,k;return f=(null!=a?a.pretty:void 0)||!1,c=null!=(h=null!=a?a.indent:void 0)?h:" ",e=null!=(i=null!=a?a.offset:void 0)?i:0,d=null!=(j=null!=a?a.newline:void 0)?j:"\n",b||(b=0),k=new Array(b+e+1).join(c),g="",f&&(g+=k),g+="",f&&(g+=d),g},a}()}).call(this)},{"lodash/lang/isObject":124,"lodash/object/create":128}],65:[function(a,b){(function(){var c,d;d=a("lodash/object/create"),b.exports=c=function(){function a(a,b,c){if(this.stringify=a.stringify,null==b)throw new Error("Missing notation name");if(!c.pubID&&!c.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(b),null!=c.pubID&&(this.pubID=this.stringify.dtdPubID(c.pubID)),null!=c.sysID&&(this.sysID=this.stringify.dtdSysID(c.sysID))}return a.prototype.clone=function(){return d(a.prototype,this)},a.prototype.toString=function(a,b){var c,d,e,f,g,h,i,j,k;return f=(null!=a?a.pretty:void 0)||!1,c=null!=(h=null!=a?a.indent:void 0)?h:" ",e=null!=(i=null!=a?a.offset:void 0)?i:0,d=null!=(j=null!=a?a.newline:void 0)?j:"\n",b||(b=0),k=new Array(b+e+1).join(c),g="",f&&(g+=k),g+="",f&&(g+=d),g},a}()}).call(this)},{"lodash/object/create":128}],66:[function(a,b){(function(){var c,d,e,f,g=function(a,b){function c(){this.constructor=a}for(var d in b)h.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},h={}.hasOwnProperty;e=a("lodash/object/create"),f=a("lodash/lang/isObject"),d=a("./XMLNode"),b.exports=c=function(a){function b(a,c,d,e){var g;b.__super__.constructor.call(this,a),f(c)&&(g=c,c=g.version,d=g.encoding,e=g.standalone),c||(c="1.0"),null!=c&&(this.version=this.stringify.xmlVersion(c)),null!=d&&(this.encoding=this.stringify.xmlEncoding(d)),null!=e&&(this.standalone=this.stringify.xmlStandalone(e))}return g(b,a),b.prototype.clone=function(){return e(b.prototype,this)},b.prototype.toString=function(a,b){var c,d,e,f,g,h,i,j,k;return f=(null!=a?a.pretty:void 0)||!1,c=null!=(h=null!=a?a.indent:void 0)?h:" ",e=null!=(i=null!=a?a.offset:void 0)?i:0,d=null!=(j=null!=a?a.newline:void 0)?j:"\n",b||(b=0),k=new Array(b+e+1).join(c),g="",f&&(g+=k),g+="",f&&(g+=d),g},b}(d)}).call(this)},{"./XMLNode":69,"lodash/lang/isObject":124,"lodash/object/create":128}],67:[function(a,b){(function(){var c,d,e,f,g,h,i,j,k,l;k=a("lodash/object/create"),l=a("lodash/lang/isObject"),c=a("./XMLCData"),d=a("./XMLComment"),e=a("./XMLDTDAttList"),g=a("./XMLDTDEntity"),f=a("./XMLDTDElement"),h=a("./XMLDTDNotation"),j=a("./XMLProcessingInstruction"),b.exports=i=function(){function a(a,b,c){var d,e;this.documentObject=a,this.stringify=this.documentObject.stringify,this.children=[],l(b)&&(d=b,b=d.pubID,c=d.sysID),null==c&&(e=[b,c],c=e[0],b=e[1]),null!=b&&(this.pubID=this.stringify.dtdPubID(b)),null!=c&&(this.sysID=this.stringify.dtdSysID(c))}return a.prototype.clone=function(){return k(a.prototype,this)},a.prototype.element=function(a,b){var c;return c=new f(this,a,b),this.children.push(c),this},a.prototype.attList=function(a,b,c,d,f){var g;return g=new e(this,a,b,c,d,f),this.children.push(g),this},a.prototype.entity=function(a,b){var c;return c=new g(this,!1,a,b),this.children.push(c),this},a.prototype.pEntity=function(a,b){var c;return c=new g(this,!0,a,b),this.children.push(c),this},a.prototype.notation=function(a,b){var c;return c=new h(this,a,b),this.children.push(c),this},a.prototype.cdata=function(a){var b;return b=new c(this,a),this.children.push(b),this},a.prototype.comment=function(a){var b;return b=new d(this,a),this.children.push(b),this},a.prototype.instruction=function(a,b){var c;return c=new j(this,a,b),this.children.push(c),this},a.prototype.root=function(){return this.documentObject.root()},a.prototype.document=function(){return this.documentObject},a.prototype.toString=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;if(i=(null!=a?a.pretty:void 0)||!1,e=null!=(k=null!=a?a.indent:void 0)?k:" ",h=null!=(l=null!=a?a.offset:void 0)?l:0,g=null!=(m=null!=a?a.newline:void 0)?m:"\n",b||(b=0),o=new Array(b+h+1).join(e),j="",i&&(j+=o),j+="0){for(j+=" [",i&&(j+=g),n=this.children,d=0,f=n.length;f>d;d++)c=n[d],j+=c.toString(a,b+1);j+="]"}return j+=">",i&&(j+=g),j},a.prototype.ele=function(a,b){return this.element(a,b)},a.prototype.att=function(a,b,c,d,e){return this.attList(a,b,c,d,e)},a.prototype.ent=function(a,b){return this.entity(a,b)},a.prototype.pent=function(a,b){return this.pEntity(a,b)},a.prototype.not=function(a,b){return this.notation(a,b)},a.prototype.dat=function(a){return this.cdata(a)},a.prototype.com=function(a){return this.comment(a)},a.prototype.ins=function(a,b){return this.instruction(a,b)},a.prototype.up=function(){return this.root()},a.prototype.doc=function(){return this.document()},a}()}).call(this)},{"./XMLCData":60,"./XMLComment":61,"./XMLDTDAttList":62,"./XMLDTDElement":63,"./XMLDTDEntity":64,"./XMLDTDNotation":65,"./XMLProcessingInstruction":70,"lodash/lang/isObject":124,"lodash/object/create":128}],68:[function(a,b){(function(){var c,d,e,f,g,h,i,j,k,l=function(a,b){function c(){this.constructor=a;
+
+}for(var d in b)m.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},m={}.hasOwnProperty;g=a("lodash/object/create"),k=a("lodash/lang/isObject"),i=a("lodash/lang/isArray"),j=a("lodash/lang/isFunction"),h=a("lodash/collection/every"),e=a("./XMLNode"),c=a("./XMLAttribute"),f=a("./XMLProcessingInstruction"),b.exports=d=function(a){function b(a,c,d){if(b.__super__.constructor.call(this,a),null==c)throw new Error("Missing element name");this.name=this.stringify.eleName(c),this.children=[],this.instructions=[],this.attributes={},null!=d&&this.attribute(d)}return l(b,a),b.prototype.clone=function(){var a,c,d,e,f,h,i,j;d=g(b.prototype,this),d.isRoot&&(d.documentObject=null),d.attributes={},i=this.attributes;for(c in i)m.call(i,c)&&(a=i[c],d.attributes[c]=a.clone());for(d.instructions=[],j=this.instructions,e=0,f=j.length;f>e;e++)h=j[e],d.instructions.push(h.clone());return d.children=[],this.children.forEach(function(a){var b;return b=a.clone(),b.parent=d,d.children.push(b)}),d},b.prototype.attribute=function(a,b){var d,e;if(null!=a&&(a=a.valueOf()),k(a))for(d in a)m.call(a,d)&&(e=a[d],this.attribute(d,e));else j(b)&&(b=b.apply()),this.options.skipNullAttributes&&null==b||(this.attributes[a]=new c(this,a,b));return this},b.prototype.removeAttribute=function(a){var b,c,d;if(null==a)throw new Error("Missing attribute name");if(a=a.valueOf(),i(a))for(c=0,d=a.length;d>c;c++)b=a[c],delete this.attributes[b];else delete this.attributes[a];return this},b.prototype.instruction=function(a,b){var c,d,e,g,h;if(null!=a&&(a=a.valueOf()),null!=b&&(b=b.valueOf()),i(a))for(c=0,h=a.length;h>c;c++)d=a[c],this.instruction(d);else if(k(a))for(d in a)m.call(a,d)&&(e=a[d],this.instruction(d,e));else j(b)&&(b=b.apply()),g=new f(this,a,b),this.instructions.push(g);return this},b.prototype.toString=function(a,b){var c,d,e,f,g,i,j,k,l,n,o,p,q,r,s,t,u,v,w,x;for(p=(null!=a?a.pretty:void 0)||!1,f=null!=(r=null!=a?a.indent:void 0)?r:" ",o=null!=(s=null!=a?a.offset:void 0)?s:0,n=null!=(t=null!=a?a.newline:void 0)?t:"\n",b||(b=0),x=new Array(b+o+1).join(f),q="",u=this.instructions,e=0,j=u.length;j>e;e++)g=u[e],q+=g.toString(a,b+1);p&&(q+=x),q+="<"+this.name,v=this.attributes;for(l in v)m.call(v,l)&&(c=v[l],q+=c.toString(a));if(0===this.children.length||h(this.children,function(a){return""===a.value}))q+="/>",p&&(q+=n);else if(p&&1===this.children.length&&null!=this.children[0].value)q+=">",q+=this.children[0].value,q+=""+this.name+">",q+=n;else{for(q+=">",p&&(q+=n),w=this.children,i=0,k=w.length;k>i;i++)d=w[i],q+=d.toString(a,b+1);p&&(q+=x),q+=""+this.name+">",p&&(q+=n)}return q},b.prototype.att=function(a,b){return this.attribute(a,b)},b.prototype.ins=function(a,b){return this.instruction(a,b)},b.prototype.a=function(a,b){return this.attribute(a,b)},b.prototype.i=function(a,b){return this.instruction(a,b)},b}(e)}).call(this)},{"./XMLAttribute":58,"./XMLNode":69,"./XMLProcessingInstruction":70,"lodash/collection/every":76,"lodash/lang/isArray":120,"lodash/lang/isFunction":122,"lodash/lang/isObject":124,"lodash/object/create":128}],69:[function(a,b){(function(){var c,d,e,f,g,h,i,j,k,l,m,n,o={}.hasOwnProperty;n=a("lodash/lang/isObject"),k=a("lodash/lang/isArray"),m=a("lodash/lang/isFunction"),l=a("lodash/lang/isEmpty"),g=null,c=null,d=null,e=null,f=null,i=null,j=null,b.exports=h=function(){function b(b){this.parent=b,this.options=this.parent.options,this.stringify=this.parent.stringify,null===g&&(g=a("./XMLElement"),c=a("./XMLCData"),d=a("./XMLComment"),e=a("./XMLDeclaration"),f=a("./XMLDocType"),i=a("./XMLRaw"),j=a("./XMLText"))}return b.prototype.clone=function(){throw new Error("Cannot clone generic XMLNode")},b.prototype.element=function(a,b,c){var d,e,f,g,h,i,j;if(g=null,null==b&&(b={}),b=b.valueOf(),n(b)||(i=[b,c],c=i[0],b=i[1]),null!=a&&(a=a.valueOf()),k(a))for(e=0,h=a.length;h>e;e++)d=a[e],g=this.element(d);else if(m(a))g=this.element(a.apply());else if(n(a))for(f in a)o.call(a,f)&&(j=a[f],m(j)&&(j=j.apply()),n(j)&&l(j)&&(j=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&0===f.indexOf(this.stringify.convertAttKey)?g=this.attribute(f.substr(this.stringify.convertAttKey.length),j):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&0===f.indexOf(this.stringify.convertPIKey)?g=this.instruction(f.substr(this.stringify.convertPIKey.length),j):n(j)?!this.options.ignoreDecorators&&this.stringify.convertListKey&&0===f.indexOf(this.stringify.convertListKey)&&k(j)?g=this.element(j):(g=this.element(f),g.element(j)):g=this.element(f,j));else g=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===a.indexOf(this.stringify.convertTextKey)?this.text(c):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&0===a.indexOf(this.stringify.convertCDataKey)?this.cdata(c):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&0===a.indexOf(this.stringify.convertCommentKey)?this.comment(c):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&0===a.indexOf(this.stringify.convertRawKey)?this.raw(c):this.node(a,b,c);if(null==g)throw new Error("Could not create any elements with: "+a);return g},b.prototype.insertBefore=function(a,b,c){var d,e,f;if(this.isRoot)throw new Error("Cannot insert elements at root level");return e=this.parent.children.indexOf(this),f=this.parent.children.splice(e),d=this.parent.element(a,b,c),Array.prototype.push.apply(this.parent.children,f),d},b.prototype.insertAfter=function(a,b,c){var d,e,f;if(this.isRoot)throw new Error("Cannot insert elements at root level");return e=this.parent.children.indexOf(this),f=this.parent.children.splice(e+1),d=this.parent.element(a,b,c),Array.prototype.push.apply(this.parent.children,f),d},b.prototype.remove=function(){var a,b;if(this.isRoot)throw new Error("Cannot remove the root element");return a=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[a,a-a+1].concat(b=[])),b,this.parent},b.prototype.node=function(a,b,c){var d,e;return null!=a&&(a=a.valueOf()),null==b&&(b={}),b=b.valueOf(),n(b)||(e=[b,c],c=e[0],b=e[1]),d=new g(this,a,b),null!=c&&d.text(c),this.children.push(d),d},b.prototype.text=function(a){var b;return b=new j(this,a),this.children.push(b),this},b.prototype.cdata=function(a){var b;return b=new c(this,a),this.children.push(b),this},b.prototype.comment=function(a){var b;return b=new d(this,a),this.children.push(b),this},b.prototype.raw=function(a){var b;return b=new i(this,a),this.children.push(b),this},b.prototype.declaration=function(a,b,c){var d,f;return d=this.document(),f=new e(d,a,b,c),d.xmldec=f,d.root()},b.prototype.doctype=function(a,b){var c,d;return c=this.document(),d=new f(c,a,b),c.doctype=d,d},b.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},b.prototype.root=function(){var a;if(this.isRoot)return this;for(a=this.parent;!a.isRoot;)a=a.parent;return a},b.prototype.document=function(){return this.root().documentObject},b.prototype.end=function(a){return this.document().toString(a)},b.prototype.prev=function(){var a;if(this.isRoot)throw new Error("Root node has no siblings");if(a=this.parent.children.indexOf(this),1>a)throw new Error("Already at the first node");return this.parent.children[a-1]},b.prototype.next=function(){var a;if(this.isRoot)throw new Error("Root node has no siblings");if(a=this.parent.children.indexOf(this),-1===a||a===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[a+1]},b.prototype.importXMLBuilder=function(a){var b;return b=a.root().clone(),b.parent=this,b.isRoot=!1,this.children.push(b),this},b.prototype.ele=function(a,b,c){return this.element(a,b,c)},b.prototype.nod=function(a,b,c){return this.node(a,b,c)},b.prototype.txt=function(a){return this.text(a)},b.prototype.dat=function(a){return this.cdata(a)},b.prototype.com=function(a){return this.comment(a)},b.prototype.doc=function(){return this.document()},b.prototype.dec=function(a,b,c){return this.declaration(a,b,c)},b.prototype.dtd=function(a,b){return this.doctype(a,b)},b.prototype.e=function(a,b,c){return this.element(a,b,c)},b.prototype.n=function(a,b,c){return this.node(a,b,c)},b.prototype.t=function(a){return this.text(a)},b.prototype.d=function(a){return this.cdata(a)},b.prototype.c=function(a){return this.comment(a)},b.prototype.r=function(a){return this.raw(a)},b.prototype.u=function(){return this.up()},b}()}).call(this)},{"./XMLCData":60,"./XMLComment":61,"./XMLDeclaration":66,"./XMLDocType":67,"./XMLElement":68,"./XMLRaw":71,"./XMLText":73,"lodash/lang/isArray":120,"lodash/lang/isEmpty":121,"lodash/lang/isFunction":122,"lodash/lang/isObject":124}],70:[function(a,b){(function(){var c,d;d=a("lodash/object/create"),b.exports=c=function(){function a(a,b,c){if(this.stringify=a.stringify,null==b)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(b),c&&(this.value=this.stringify.insValue(c))}return a.prototype.clone=function(){return d(a.prototype,this)},a.prototype.toString=function(a,b){var c,d,e,f,g,h,i,j,k;return f=(null!=a?a.pretty:void 0)||!1,c=null!=(h=null!=a?a.indent:void 0)?h:" ",e=null!=(i=null!=a?a.offset:void 0)?i:0,d=null!=(j=null!=a?a.newline:void 0)?j:"\n",b||(b=0),k=new Array(b+e+1).join(c),g="",f&&(g+=k),g+="",g+=this.target,this.value&&(g+=" "+this.value),g+="?>",f&&(g+=d),g},a}()}).call(this)},{"lodash/object/create":128}],71:[function(a,b){(function(){var c,d,e,f=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},g={}.hasOwnProperty;e=a("lodash/object/create"),c=a("./XMLNode"),b.exports=d=function(a){function b(a,c){if(b.__super__.constructor.call(this,a),null==c)throw new Error("Missing raw text");this.value=this.stringify.raw(c)}return f(b,a),b.prototype.clone=function(){return e(b.prototype,this)},b.prototype.toString=function(a,b){var c,d,e,f,g,h,i,j,k;return f=(null!=a?a.pretty:void 0)||!1,c=null!=(h=null!=a?a.indent:void 0)?h:" ",e=null!=(i=null!=a?a.offset:void 0)?i:0,d=null!=(j=null!=a?a.newline:void 0)?j:"\n",b||(b=0),k=new Array(b+e+1).join(c),g="",f&&(g+=k),g+=this.value,f&&(g+=d),g},b}(c)}).call(this)},{"./XMLNode":69,"lodash/object/create":128}],72:[function(a,b){(function(){var a,c=function(a,b){return function(){return a.apply(b,arguments)}},d={}.hasOwnProperty;b.exports=a=function(){function a(a){this.assertLegalChar=c(this.assertLegalChar,this);var b,e,f;this.allowSurrogateChars=null!=a?a.allowSurrogateChars:void 0,e=(null!=a?a.stringify:void 0)||{};for(b in e)d.call(e,b)&&(f=e[b],this[b]=f)}return a.prototype.eleName=function(a){return a=""+a||"",this.assertLegalChar(a)},a.prototype.eleText=function(a){return a=""+a||"",this.assertLegalChar(this.elEscape(a))},a.prototype.cdata=function(a){if(a=""+a||"",a.match(/]]>/))throw new Error("Invalid CDATA text: "+a);return this.assertLegalChar(a)},a.prototype.comment=function(a){if(a=""+a||"",a.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+a);return this.assertLegalChar(a)},a.prototype.raw=function(a){return""+a||""},a.prototype.attName=function(a){return""+a||""},a.prototype.attValue=function(a){return a=""+a||"",this.attEscape(a)},a.prototype.insTarget=function(a){return""+a||""},a.prototype.insValue=function(a){if(a=""+a||"",a.match(/\?>/))throw new Error("Invalid processing instruction value: "+a);return a},a.prototype.xmlVersion=function(a){if(a=""+a||"",!a.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+a);return a},a.prototype.xmlEncoding=function(a){if(a=""+a||"",!a.match(/[A-Za-z](?:[A-Za-z0-9._-]|-)*/))throw new Error("Invalid encoding: "+a);return a},a.prototype.xmlStandalone=function(a){return a?"yes":"no"},a.prototype.dtdPubID=function(a){return""+a||""},a.prototype.dtdSysID=function(a){return""+a||""},a.prototype.dtdElementValue=function(a){return""+a||""},a.prototype.dtdAttType=function(a){return""+a||""},a.prototype.dtdAttDefault=function(a){return null!=a?""+a||"":a},a.prototype.dtdEntityValue=function(a){return""+a||""},a.prototype.dtdNData=function(a){return""+a||""},a.prototype.convertAttKey="@",a.prototype.convertPIKey="?",a.prototype.convertTextKey="#text",a.prototype.convertCDataKey="#cdata",a.prototype.convertCommentKey="#comment",a.prototype.convertRawKey="#raw",a.prototype.convertListKey="#list",a.prototype.assertLegalChar=function(a){var b,c;if(b=this.allowSurrogateChars?/[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uFFFE-\uFFFF]/:/[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/,c=a.match(b))throw new Error("Invalid character ("+c+") in string: "+a+" at index "+c.index);return a},a.prototype.elEscape=function(a){return a.replace(/&/g,"&").replace(//g,">").replace(/\r/g,"
")},a.prototype.attEscape=function(a){return a.replace(/&/g,"&").replace(/e;)a=a[b[e++]];return e&&e==f?a:void 0}}var d=a("./toObject");b.exports=c},{"./toObject":117}],90:[function(a,b){function c(a,b,g,h,i,j){return a===b?!0:null==a||null==b||!e(a)&&!f(b)?a!==a&&b!==b:d(a,b,c,g,h,i,j)}var d=a("./baseIsEqualDeep"),e=a("../lang/isObject"),f=a("./isObjectLike");b.exports=c},{"../lang/isObject":124,"./baseIsEqualDeep":91,"./isObjectLike":114}],91:[function(a,b){function c(a,b,c,l,o,p,q){var r=g(a),s=g(b),t=j,u=j;r||(t=n.call(a),t==i?t=k:t!=k&&(r=h(a))),s||(u=n.call(b),u==i?u=k:u!=k&&(s=h(b)));var v=t==k,w=u==k,x=t==u;if(x&&!r&&!v)return e(a,b,t);if(!o){var y=v&&m.call(a,"__wrapped__"),z=w&&m.call(b,"__wrapped__");if(y||z)return c(y?a.value():a,z?b.value():b,l,o,p,q)}if(!x)return!1;p||(p=[]),q||(q=[]);for(var A=p.length;A--;)if(p[A]==a)return q[A]==b;p.push(a),q.push(b);var B=(r?d:f)(a,b,c,l,o,p,q);return p.pop(),q.pop(),B}var d=a("./equalArrays"),e=a("./equalByTag"),f=a("./equalObjects"),g=a("../lang/isArray"),h=a("../lang/isTypedArray"),i="[object Arguments]",j="[object Array]",k="[object Object]",l=Object.prototype,m=l.hasOwnProperty,n=l.toString;b.exports=c},{"../lang/isArray":120,"../lang/isTypedArray":126,"./equalArrays":103,"./equalByTag":104,"./equalObjects":105}],92:[function(a,b){function c(a,b,c){var f=b.length,g=f,h=!c;if(null==a)return!g;for(a=e(a);f--;){var i=b[f];if(h&&i[2]?i[1]!==a[i[0]]:!(i[0]in a))return!1}for(;++fb&&(b=-b>e?0:e+b),c=void 0===c||c>e?e:+c||0,0>c&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Array(e);++d2?c[g-2]:void 0,i=g>2?c[2]:void 0,j=g>1?c[g-1]:void 0;for("function"==typeof h?(h=d(h,j,5),g-=2):(h="function"==typeof j?j:void 0,g-=h?1:0),i&&e(c[0],c[1],i)&&(h=3>g?void 0:h,g=1);++fj))return!1;for(;++i-1&&a%1==0&&b>a}var d=/^\d+$/,e=9007199254740991;b.exports=c},{}],111:[function(a,b){function c(a,b,c){if(!f(c))return!1;var g=typeof b;if("number"==g?d(c)&&e(b,c.length):"string"==g&&b in c){var h=c[b];return a===a?a===h:h!==h}return!1}var d=a("./isArrayLike"),e=a("./isIndex"),f=a("../lang/isObject");b.exports=c},{"../lang/isObject":124,"./isArrayLike":109,"./isIndex":110}],112:[function(a,b){function c(a,b){var c=typeof a;if("string"==c&&g.test(a)||"number"==c)return!0;if(d(a))return!1;var h=!f.test(a);return h||null!=b&&a in e(b)}var d=a("../lang/isArray"),e=a("./toObject"),f=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,g=/^\w*$/;b.exports=c},{"../lang/isArray":120,"./toObject":117}],113:[function(a,b){function c(a){return"number"==typeof a&&a>-1&&a%1==0&&d>=a}var d=9007199254740991;b.exports=c},{}],114:[function(a,b){function c(a){return!!a&&"object"==typeof a}b.exports=c},{}],115:[function(a,b){function c(a){return a===a&&!d(a)}var d=a("../lang/isObject");b.exports=c},{"../lang/isObject":124}],116:[function(a,b){function c(a){for(var b=h(a),c=b.length,i=c&&a.length,k=!!i&&g(i)&&(e(a)||d(a)),l=-1,m=[];++l0;++i'),b.push(''),b.push(""),null!==this.name&&b.push(this.getXmlElement("name",this.name)),null!==this.description&&b.push(this.getXmlElement("desc",this.description)),null!==this.time&&b.push(this.getXmlElement("time",this.time)),null!==this.keywords&&b.push(this.getXmlElement("keywords",this.keywords)),b.push(""),a=0;a"),b.join("\n")},a}();b.exports=e}).call(this,a("IrXUsu"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},a("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/lib/gpxfile.js","/lib")},{"./gpxobject":4,"./helpers":9,IrXUsu:13,buffer:10}],3:[function(a,b){(function(){var c=a("./gpxfile"),d=a("./gpxroute"),e=a("./gpxpoint"),f=a("./gpxtrack"),g=a("./gpxtracksegment"),h=a("./helpers"),i=function(){"use strict";var a=function(a){this.file=new c(a)};return a.prototype.setFileInfo=function(a){return a&&this.file.setProperties(a),this},a.prototype.addTrack=function(a,b){var c,d,i=this.file.add(f,a);if(b)for(b=h.force2d(b),c=0;c"+a(c)+""+b+">"},b}();b.exports=d}).call(this,a("IrXUsu"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},a("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/lib/gpxobject.js","/lib")},{"./helpers":9,IrXUsu:13,buffer:10}],5:[function(a,b){(function(){var c=a("./gpxobject"),d=a("./helpers"),e=function(){"use strict";var a=function(a){a&&this.setProperties(a)};return d["extends"](a,c),a.prototype.name=null,a.prototype.elevation=null,a.prototype.latitude=null,a.prototype.longitude=null,a.prototype.setProperties=function(a){a.hasOwnProperty("name")&&this.setName(a.name),a.hasOwnProperty("elevation")&&this.setElevation(a.elevation),a.hasOwnProperty("latitude")&&this.setLatitude(a.latitude),a.hasOwnProperty("longitude")&&this.setLongitude(a.longitude)},a.prototype.setName=function(a){this.name=a},a.prototype.setElevation=function(a){this.elevation=d.toFloat(a,!1)},a.prototype.setLatitude=function(a){this.latitude=d.toFloat(a,!1)},a.prototype.setLongitude=function(a){this.longitude=d.toFloat(a,!0)},a.prototype.getXml=function(a){var b=[],c=d.encodeXml;return a=a||"wpt",b.push("<"+a+' lon="'+c(this.longitude)+'" lat="'+c(this.latitude)+'">'),null!==this.elevation&&b.push(this.getXmlElement("ele",this.elevation)),null!==this.name&&b.push(this.getXmlElement("name",this.name)),b.push(""+a+">"),b.join("\n")},a}();b.exports=e}).call(this,a("IrXUsu"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},a("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/lib/gpxpoint.js","/lib")},{"./gpxobject":4,"./helpers":9,IrXUsu:13,buffer:10}],6:[function(a,b){(function(){var c=a("./gpxobject"),d=a("./helpers"),e=function(){"use strict";var a=function(b){a["super"].call(this,b)};return d["extends"](a,c),a.prototype.name=null,a.prototype.setProperties=function(a){a.hasOwnProperty("name")&&this.setName(a.name)},a.prototype.setName=function(a){this.name=a},a.prototype.getXml=function(){var a,b=[];for(b.push(""),null!==this.name&&b.push(this.getXmlElement("name",this.name)),a=0;a"),b.join("\n")},a}();b.exports=e}).call(this,a("IrXUsu"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},a("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/lib/gpxroute.js","/lib")},{"./gpxobject":4,"./helpers":9,IrXUsu:13,buffer:10}],7:[function(a,b){(function(){var c=a("./gpxobject"),d=a("./helpers"),e=function(){"use strict";var a=function(b){a["super"].call(this,b)};return d["extends"](a,c),a.prototype.name=null,a.prototype.setProperties=function(a){a.hasOwnProperty("name")&&this.setName(a.name)},a.prototype.setName=function(a){this.name=a},a.prototype.getXml=function(){var a,b=[];for(b.push(""),null!==this.name&&b.push(this.getXmlElement("name",this.name)),a=0;a"),b.join("\n")},a}();b.exports=e}).call(this,a("IrXUsu"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},a("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/lib/gpxtrack.js","/lib")},{"./gpxobject":4,"./helpers":9,IrXUsu:13,buffer:10}],8:[function(a,b){(function(){var c=a("./gpxobject"),d=a("./helpers"),e=function(){"use strict";var a=function(b){a["super"].call(this,b)};return d["extends"](a,c),a.prototype.getXml=function(){var a,b=[];for(b.push(""),a=0;a"),b.join("\n")},a}();b.exports=e}).call(this,a("IrXUsu"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},a("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/lib/gpxtracksegment.js","/lib")},{"./gpxobject":4,"./helpers":9,IrXUsu:13,buffer:10}],9:[function(a,b){(function(){var a=function(){"use strict";var a={};return a.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)},a.force2d=function(b){var c,d=[],e=null;for(c=0;c/g,">").replace(/"/g,""").replace(/'/g,"'")},a.toInteger=function(a,b){return b&&null===a?a:(a=parseInt(a,10),isNaN(a)?0:a)},a.toFloat=function(a,b){return b&&null===a?a:(a=parseFloat(a),isNaN(a)?0:a)},a}();b.exports=a}).call(this,a("IrXUsu"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},a("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/lib/helpers.js","/lib")},{IrXUsu:13,buffer:10}],10:[function(a,b,c){(function(b,d,e){function e(a,b,c){if(!(this instanceof e))return new e(a,b,c);var d=typeof a;if("base64"===b&&"string"===d)for(a=D(a);a.length%4!==0;)a+="=";var f;if("number"===d)f=F(a);else if("string"===d)f=e.byteLength(a,b);else{if("object"!==d)throw new Error("First argument needs to be a number, array or string.");f=F(a.length)}var g;e._useTypedArrays?g=e._augment(new Uint8Array(f)):(g=this,g.length=f,g._isBuffer=!0);var h;if(e._useTypedArrays&&"number"==typeof a.byteLength)g._set(a);else if(H(a))for(h=0;f>h;h++)g[h]=e.isBuffer(a)?a.readUInt8(h):a[h];else if("string"===d)g.write(a,0,b);else if("number"===d&&!e._useTypedArrays&&!c)for(h=0;f>h;h++)g[h]=0;return g}function f(a,b,c,d){c=Number(c)||0;var f=a.length-c;d?(d=Number(d),d>f&&(d=f)):d=f;var g=b.length;S(g%2===0,"Invalid hex string"),d>g/2&&(d=g/2);for(var h=0;d>h;h++){var i=parseInt(b.substr(2*h,2),16);S(!isNaN(i),"Invalid hex string"),a[c+h]=i}return e._charsWritten=2*h,h}function g(a,b,c,d){var f=e._charsWritten=N(J(b),a,c,d);return f}function h(a,b,c,d){var f=e._charsWritten=N(K(b),a,c,d);return f}function i(a,b,c,d){return h(a,b,c,d)}function j(a,b,c,d){var f=e._charsWritten=N(M(b),a,c,d);return f}function k(a,b,c,d){var f=e._charsWritten=N(L(b),a,c,d);return f}function l(a,b,c){return T.fromByteArray(0===b&&c===a.length?a:a.slice(b,c))}function m(a,b,c){var d="",e="";c=Math.min(a.length,c);for(var f=b;c>f;f++)a[f]<=127?(d+=O(e)+String.fromCharCode(a[f]),e=""):e+="%"+a[f].toString(16);return d+O(e)}function n(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(a[e]);return d}function o(a,b,c){return n(a,b,c)}function p(a,b,c){var d=a.length;(!b||0>b)&&(b=0),(!c||0>c||c>d)&&(c=d);for(var e="",f=b;c>f;f++)e+=I(a[f]);return e}function q(a,b,c){for(var d=a.slice(b,c),e="",f=0;f=e)){var f;return c?(f=a[b],e>b+1&&(f|=a[b+1]<<8)):(f=a[b]<<8,e>b+1&&(f|=a[b+1])),f}}function s(a,b,c,d){d||(S("boolean"==typeof c,"missing or invalid endian"),S(void 0!==b&&null!==b,"missing offset"),S(b+3=e)){var f;return c?(e>b+2&&(f=a[b+2]<<16),e>b+1&&(f|=a[b+1]<<8),f|=a[b],e>b+3&&(f+=a[b+3]<<24>>>0)):(e>b+1&&(f=a[b+1]<<16),e>b+2&&(f|=a[b+2]<<8),e>b+3&&(f|=a[b+3]),f+=a[b]<<24>>>0),f}}function t(a,b,c,d){d||(S("boolean"==typeof c,"missing or invalid endian"),S(void 0!==b&&null!==b,"missing offset"),S(b+1=e)){var f=r(a,b,c,!0),g=32768&f;return g?-1*(65535-f+1):f}}function u(a,b,c,d){d||(S("boolean"==typeof c,"missing or invalid endian"),S(void 0!==b&&null!==b,"missing offset"),S(b+3=e)){var f=s(a,b,c,!0),g=2147483648&f;return g?-1*(4294967295-f+1):f}}function v(a,b,c,d){return d||(S("boolean"==typeof c,"missing or invalid endian"),S(b+3=f))for(var g=0,h=Math.min(f-c,2);h>g;g++)a[c+g]=(b&255<<8*(d?g:1-g))>>>8*(d?g:1-g)}function y(a,b,c,d,e){e||(S(void 0!==b&&null!==b,"missing value"),S("boolean"==typeof d,"missing or invalid endian"),S(void 0!==c&&null!==c,"missing offset"),S(c+3=f))for(var g=0,h=Math.min(f-c,4);h>g;g++)a[c+g]=b>>>8*(d?g:3-g)&255}function z(a,b,c,d,e){e||(S(void 0!==b&&null!==b,"missing value"),S("boolean"==typeof d,"missing or invalid endian"),S(void 0!==c&&null!==c,"missing offset"),S(c+1=f||(b>=0?x(a,b,c,d,e):x(a,65535+b+1,c,d,e))}function A(a,b,c,d,e){e||(S(void 0!==b&&null!==b,"missing value"),S("boolean"==typeof d,"missing or invalid endian"),S(void 0!==c&&null!==c,"missing offset"),S(c+3=f||(b>=0?y(a,b,c,d,e):y(a,4294967295+b+1,c,d,e))}function B(a,b,c,d,e){e||(S(void 0!==b&&null!==b,"missing value"),S("boolean"==typeof d,"missing or invalid endian"),S(void 0!==c&&null!==c,"missing offset"),S(c+3=f||U.write(a,b,c,d,23,4)}function C(a,b,c,d,e){e||(S(void 0!==b&&null!==b,"missing value"),S("boolean"==typeof d,"missing or invalid endian"),S(void 0!==c&&null!==c,"missing offset"),S(c+7=f||U.write(a,b,c,d,52,8)}function D(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function E(a,b,c){return"number"!=typeof a?c:(a=~~a,a>=b?b:a>=0?a:(a+=b,a>=0?a:0))}function F(a){return a=~~Math.ceil(+a),0>a?0:a}function G(a){return(Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)})(a)}function H(a){return G(a)||e.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length}function I(a){return 16>a?"0"+a.toString(16):a.toString(16)}function J(a){for(var b=[],c=0;c=d)b.push(a.charCodeAt(c));else{var e=c;d>=55296&&57343>=d&&c++;for(var f=encodeURIComponent(a.slice(e,c+1)).substr(1).split("%"),g=0;g>8,d=b%256,e.push(d),e.push(c);return e}function M(a){return T.toByteArray(a)}function N(a,b,c,d){for(var e=0;d>e&&!(e+c>=b.length||e>=a.length);e++)b[e+c]=a[e];return e}function O(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}function P(a,b){S("number"==typeof a,"cannot write a non-number as a number"),S(a>=0,"specified a negative value for writing an unsigned value"),S(b>=a,"value is larger than maximum value for type"),S(Math.floor(a)===a,"value has a fractional component")}function Q(a,b,c){S("number"==typeof a,"cannot write a non-number as a number"),S(b>=a,"value larger than maximum allowed value"),S(a>=c,"value smaller than minimum allowed value"),S(Math.floor(a)===a,"value has a fractional component")}function R(a,b,c){S("number"==typeof a,"cannot write a non-number as a number"),S(b>=a,"value larger than maximum allowed value"),S(a>=c,"value smaller than minimum allowed value")}function S(a,b){if(!a)throw new Error(b||"Failed assertion")}var T=a("base64-js"),U=a("ieee754");c.Buffer=e,c.SlowBuffer=e,c.INSPECT_MAX_BYTES=50,e.poolSize=8192,e._useTypedArrays=function(){try{var a=new ArrayBuffer(0),b=new Uint8Array(a);return b.foo=function(){return 42},42===b.foo()&&"function"==typeof b.subarray}catch(c){return!1}}(),e.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.isBuffer=function(a){return!(null===a||void 0===a||!a._isBuffer)},e.byteLength=function(a,b){var c;switch(a+="",b||"utf8"){case"hex":c=a.length/2;break;case"utf8":case"utf-8":c=J(a).length;break;case"ascii":case"binary":case"raw":c=a.length;break;case"base64":c=M(a).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":c=2*a.length;break;default:throw new Error("Unknown encoding")}return c},e.concat=function(a,b){if(S(G(a),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===a.length)return new e(0);if(1===a.length)return a[0];var c;if("number"!=typeof b)for(b=0,c=0;cl&&(c=l)):c=l,d=String(d||"utf8").toLowerCase();var m;switch(d){case"hex":m=f(this,a,b,c);break;case"utf8":case"utf-8":m=g(this,a,b,c);break;case"ascii":m=h(this,a,b,c);break;case"binary":m=i(this,a,b,c);break;case"base64":m=j(this,a,b,c);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":m=k(this,a,b,c);break;default:throw new Error("Unknown encoding")}return m},e.prototype.toString=function(a,b,c){var d=this;if(a=String(a||"utf8").toLowerCase(),b=Number(b)||0,c=void 0!==c?Number(c):c=d.length,c===b)return"";var e;switch(a){case"hex":e=p(d,b,c);break;case"utf8":case"utf-8":e=m(d,b,c);break;case"ascii":e=n(d,b,c);break;case"binary":e=o(d,b,c);break;case"base64":e=l(d,b,c);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":e=q(d,b,c);break;default:throw new Error("Unknown encoding")}return e},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},e.prototype.copy=function(a,b,c,d){var f=this;if(c||(c=0),d||0===d||(d=this.length),b||(b=0),d!==c&&0!==a.length&&0!==f.length){S(d>=c,"sourceEnd < sourceStart"),S(b>=0&&b=0&&c=0&&d<=f.length,"sourceEnd out of bounds"),d>this.length&&(d=this.length),a.length-bg||!e._useTypedArrays)for(var h=0;g>h;h++)a[h+b]=this[h+c];else a._set(this.subarray(c,c+g),b)}},e.prototype.slice=function(a,b){var c=this.length;if(a=E(a,c,0),b=E(b,c,c),e._useTypedArrays)return e._augment(this.subarray(a,b));for(var d=b-a,f=new e(d,void 0,!0),g=0;d>g;g++)f[g]=this[g+a];return f},e.prototype.get=function(a){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(a)},e.prototype.set=function(a,b){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(a,b)},e.prototype.readUInt8=function(a,b){return b||(S(void 0!==a&&null!==a,"missing offset"),S(a=this.length?void 0:this[a]},e.prototype.readUInt16LE=function(a,b){return r(this,a,!0,b)},e.prototype.readUInt16BE=function(a,b){return r(this,a,!1,b)},e.prototype.readUInt32LE=function(a,b){return s(this,a,!0,b)},e.prototype.readUInt32BE=function(a,b){return s(this,a,!1,b)},e.prototype.readInt8=function(a,b){if(b||(S(void 0!==a&&null!==a,"missing offset"),S(a=this.length)){var c=128&this[a];return c?-1*(255-this[a]+1):this[a]}},e.prototype.readInt16LE=function(a,b){return t(this,a,!0,b)},e.prototype.readInt16BE=function(a,b){return t(this,a,!1,b)},e.prototype.readInt32LE=function(a,b){return u(this,a,!0,b)},e.prototype.readInt32BE=function(a,b){return u(this,a,!1,b)},e.prototype.readFloatLE=function(a,b){return v(this,a,!0,b)},e.prototype.readFloatBE=function(a,b){return v(this,a,!1,b)},e.prototype.readDoubleLE=function(a,b){return w(this,a,!0,b)},e.prototype.readDoubleBE=function(a,b){return w(this,a,!1,b)},e.prototype.writeUInt8=function(a,b,c){c||(S(void 0!==a&&null!==a,"missing value"),S(void 0!==b&&null!==b,"missing offset"),S(b=this.length||(this[b]=a)},e.prototype.writeUInt16LE=function(a,b,c){x(this,a,b,!0,c)},e.prototype.writeUInt16BE=function(a,b,c){x(this,a,b,!1,c)},e.prototype.writeUInt32LE=function(a,b,c){y(this,a,b,!0,c)},e.prototype.writeUInt32BE=function(a,b,c){y(this,a,b,!1,c)},e.prototype.writeInt8=function(a,b,c){c||(S(void 0!==a&&null!==a,"missing value"),S(void 0!==b&&null!==b,"missing offset"),S(b=this.length||(a>=0?this.writeUInt8(a,b,c):this.writeUInt8(255+a+1,b,c))},e.prototype.writeInt16LE=function(a,b,c){z(this,a,b,!0,c)},e.prototype.writeInt16BE=function(a,b,c){z(this,a,b,!1,c)},e.prototype.writeInt32LE=function(a,b,c){A(this,a,b,!0,c)},e.prototype.writeInt32BE=function(a,b,c){A(this,a,b,!1,c)},e.prototype.writeFloatLE=function(a,b,c){B(this,a,b,!0,c)},e.prototype.writeFloatBE=function(a,b,c){B(this,a,b,!1,c)},e.prototype.writeDoubleLE=function(a,b,c){C(this,a,b,!0,c)},e.prototype.writeDoubleBE=function(a,b,c){C(this,a,b,!1,c)},e.prototype.fill=function(a,b,c){if(a||(a=0),b||(b=0),c||(c=this.length),"string"==typeof a&&(a=a.charCodeAt(0)),S("number"==typeof a&&!isNaN(a),"value is not a number"),S(c>=b,"end < start"),c!==b&&0!==this.length){S(b>=0&&b=0&&c<=this.length,"end out of bounds");for(var d=b;c>d;d++)this[d]=a}},e.prototype.inspect=function(){for(var a=[],b=this.length,d=0;b>d;d++)if(a[d]=I(this[d]),d===c.INSPECT_MAX_BYTES){a[d+1]="...";break}return""},e.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(e._useTypedArrays)return new e(this).buffer;for(var a=new Uint8Array(this.length),b=0,c=a.length;c>b;b+=1)a[b]=this[b];return a.buffer}throw new Error("Buffer.toArrayBuffer not supported in this browser")};var V=e.prototype;e._augment=function(a){return a._isBuffer=!0,a._get=a.get,a._set=a.set,a.get=V.get,a.set=V.set,a.write=V.write,a.toString=V.toString,a.toLocaleString=V.toString,a.toJSON=V.toJSON,a.copy=V.copy,a.slice=V.slice,a.readUInt8=V.readUInt8,a.readUInt16LE=V.readUInt16LE,a.readUInt16BE=V.readUInt16BE,a.readUInt32LE=V.readUInt32LE,a.readUInt32BE=V.readUInt32BE,a.readInt8=V.readInt8,a.readInt16LE=V.readInt16LE,a.readInt16BE=V.readInt16BE,a.readInt32LE=V.readInt32LE,a.readInt32BE=V.readInt32BE,a.readFloatLE=V.readFloatLE,a.readFloatBE=V.readFloatBE,a.readDoubleLE=V.readDoubleLE,a.readDoubleBE=V.readDoubleBE,a.writeUInt8=V.writeUInt8,a.writeUInt16LE=V.writeUInt16LE,a.writeUInt16BE=V.writeUInt16BE,a.writeUInt32LE=V.writeUInt32LE,a.writeUInt32BE=V.writeUInt32BE,a.writeInt8=V.writeInt8,a.writeInt16LE=V.writeInt16LE,a.writeInt16BE=V.writeInt16BE,a.writeInt32LE=V.writeInt32LE,a.writeInt32BE=V.writeInt32BE,a.writeFloatLE=V.writeFloatLE,a.writeFloatBE=V.writeFloatBE,a.writeDoubleLE=V.writeDoubleLE,a.writeDoubleBE=V.writeDoubleBE,a.fill=V.fill,a.inspect=V.inspect,a.toArrayBuffer=V.toArrayBuffer,a}}).call(this,a("IrXUsu"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},a("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/browserify/node_modules/buffer")},{IrXUsu:13,"base64-js":11,buffer:10,ieee754:12}],11:[function(a,b,c){(function(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(b){"use strict";function c(a){var b=a.charCodeAt(0);return b===g||b===l?62:b===h||b===m?63:i>b?-1:i+10>b?b-i+26+26:k+26>b?b-k:j+26>b?b-j+26:void 0}function d(a){function b(a){j[l++]=a}var d,e,g,h,i,j;if(a.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=a.length;i="="===a.charAt(k-2)?2:"="===a.charAt(k-1)?1:0,j=new f(3*a.length/4-i),g=i>0?a.length-4:a.length;var l=0;for(d=0,e=0;g>d;d+=4,e+=3)h=c(a.charAt(d))<<18|c(a.charAt(d+1))<<12|c(a.charAt(d+2))<<6|c(a.charAt(d+3)),b((16711680&h)>>16),b((65280&h)>>8),b(255&h);return 2===i?(h=c(a.charAt(d))<<2|c(a.charAt(d+1))>>4,b(255&h)):1===i&&(h=c(a.charAt(d))<<10|c(a.charAt(d+1))<<4|c(a.charAt(d+2))>>2,b(h>>8&255),b(255&h)),j}function e(b){function c(b){return a.charAt(b)}function d(a){return c(a>>18&63)+c(a>>12&63)+c(a>>6&63)+c(63&a)}var e,f,g,h=b.length%3,i="";for(e=0,g=b.length-h;g>e;e+=3)f=(b[e]<<16)+(b[e+1]<<8)+b[e+2],i+=d(f);switch(h){case 1:f=b[b.length-1],i+=c(f>>2),i+=c(f<<4&63),i+="==";break;case 2:f=(b[b.length-2]<<8)+b[b.length-1],i+=c(f>>10),i+=c(f>>4&63),i+=c(f<<2&63),i+="="}return i}var f="undefined"!=typeof Uint8Array?Uint8Array:Array,g="+".charCodeAt(0),h="/".charCodeAt(0),i="0".charCodeAt(0),j="a".charCodeAt(0),k="A".charCodeAt(0),l="-".charCodeAt(0),m="_".charCodeAt(0);b.toByteArray=d,b.fromByteArray=e}("undefined"==typeof c?this.base64js={}:c)}).call(this,a("IrXUsu"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},a("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/browserify/node_modules/buffer/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/browserify/node_modules/buffer/node_modules/base64-js/lib")},{IrXUsu:13,buffer:10}],12:[function(a,b,c){(function(){c.read=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<>1,k=-7,l=c?e-1:0,m=c?-1:1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?0/0:(n?-1:1)*(1/0);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.write=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?0:f-1,o=d?1:-1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}}).call(this,a("IrXUsu"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},a("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/browserify/node_modules/buffer/node_modules/ieee754/index.js","/node_modules/gulp-browserify/node_modules/browserify/node_modules/buffer/node_modules/ieee754")},{IrXUsu:13,buffer:10}],13:[function(a,b){(function(a){function c(){}var a=b.exports={};a.nextTick=function(){var a="undefined"!=typeof window&&window.setImmediate,b="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(a)return function(a){return window.setImmediate(a)};if(b){var c=[];return window.addEventListener("message",function(a){var b=a.source;if((b===window||null===b)&&"process-tick"===a.data&&(a.stopPropagation(),c.length>0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),a.title="browser",a.browser=!0,a.env={},a.argv=[],a.on=c,a.addListener=c,a.once=c,a.off=c,a.removeListener=c,a.removeAllListeners=c,a.emit=c,a.binding=function(){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(){throw new Error("process.chdir is not supported")}}).call(this,a("IrXUsu"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},a("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/browserify/node_modules/process")},{IrXUsu:13,buffer:10}]},{},[1]);
\ No newline at end of file
diff --git a/dist/libs.min.js b/dist/libs.min.js
index 70735a1..ef8256d 100644
--- a/dist/libs.min.js
+++ b/dist/libs.min.js
@@ -1,6 +1,6 @@
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});;
toGeoJSON=function(){"use strict";function a(a){if(!a||!a.length)return 0;for(var b=0,c=0;by;y++)l=j[y].nodeName.toLowerCase(),m=e(j[y],c,f,k),t.hasOwnProperty(l)?(t[l].constructor!==Array&&(t[l]=[t[l]]),t[l].push(m)):(t[l]=m,r++);if(p){for(var z,A=b.attributes.length,B=k?"":i,C=k?{}:t,D=0;A>D;r++,D++)z=b.attributes.item(D),C[B+z.name.toLowerCase()]=a(z.value.trim());k&&(f&&Object.freeze(C),t[h]=C,r-=A-1)}return 3===c||(2===c||1===c&&r>0)&&s?t[g]=x:!q&&0===r&&s&&(t=x),f&&(q||r>0)&&Object.freeze(t),j.length=n,t}function f(a,b,c){var d,e;c instanceof String||c instanceof Number||c instanceof Boolean?b.appendChild(a.createTextNode(c.toString())):c.constructor===Date&&b.appendChild(a.createTextNode(c.toGMTString()));for(var j in c)if(d=c[j],!(isFinite(j)||d instanceof Function))if(j===g)null!==d&&d!==!0&&b.appendChild(a.createTextNode(d.constructor===Date?d.toGMTString():String(d)));else if(j===h)for(var k in d)b.setAttribute(k,d[k]);else if(j.charAt(0)===i)b.setAttribute(j.slice(1),d);else if(d.constructor===Array)for(var l=0;l1&&"number"==typeof b?3&b:1;return e(a,f,c||!1,arguments.length>3?d:3===f)},this.unbuild=function(a){var b=document.implementation.createDocument("","",null);return f(b,b,a),b},this.stringify=function(a){return(new XMLSerializer).serializeToString(c.unbuild(a))}};b.exports=c},{xmldom:3}],3:[function(){},{}]},{},[1])(1)});;
+!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.togpx=a():"undefined"!=typeof global?global.togpx=a():"undefined"!=typeof self&&(self.togpx=a())}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gy;y++)l=j[y].nodeName.toLowerCase(),m=e(j[y],c,f,k),t.hasOwnProperty(l)?(t[l].constructor!==Array&&(t[l]=[t[l]]),t[l].push(m)):(t[l]=m,r++);if(p){for(var z,A=b.attributes.length,B=k?"":i,C=k?{}:t,D=0;A>D;r++,D++)z=b.attributes.item(D),C[B+z.name.toLowerCase()]=a(z.value.trim());k&&(f&&Object.freeze(C),t[h]=C,r-=A-1)}return 3===c||(2===c||1===c&&r>0)&&s?t[g]=x:!q&&0===r&&s&&(t=x),f&&(q||r>0)&&Object.freeze(t),j.length=n,t}function f(a,b,c){var d,e;c instanceof String||c instanceof Number||c instanceof Boolean?b.appendChild(a.createTextNode(c.toString())):c.constructor===Date&&b.appendChild(a.createTextNode(c.toGMTString()));for(var j in c)if(d=c[j],!(isFinite(j)||d instanceof Function))if(j===g)null!==d&&d!==!0&&b.appendChild(a.createTextNode(d.constructor===Date?d.toGMTString():String(d)));else if(j===h)for(var k in d)b.setAttribute(k,d[k]);else if(j.charAt(0)===i)b.setAttribute(j.slice(1),d);else if(d.constructor===Array)for(var l=0;l1&&"number"==typeof b?3&b:1;return e(a,f,c||!1,arguments.length>3?d:3===f)},this.unbuild=function(a){var b=document.implementation.createDocument("","",null);return f(b,b,a),b},this.stringify=function(a){return(new XMLSerializer).serializeToString(c.unbuild(a))}};b.exports=c},{xmldom:3}],3:[function(){},{}]},{},[1])(1)});;
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.prettyData=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gb;b++)this.shift.push(this.shift[b]+this.step)}function e(a,b){return b-(a.replace(/\(/g,"").length-a.replace(/\)/g,"").length)}function f(a,b){return a.replace(/\s{1,}/g," ").replace(/ AND /gi,"~::~"+b+b+"AND ").replace(/ BETWEEN /gi,"~::~"+b+"BETWEEN ").replace(/ CASE /gi,"~::~"+b+"CASE ").replace(/ ELSE /gi,"~::~"+b+"ELSE ").replace(/ END /gi,"~::~"+b+"END ").replace(/ FROM /gi,"~::~FROM ").replace(/ GROUP\s{1,}BY/gi,"~::~GROUP BY ").replace(/ HAVING /gi,"~::~HAVING ").replace(/ IN /gi," IN ").replace(/ JOIN /gi,"~::~JOIN ").replace(/ CROSS~::~{1,}JOIN /gi,"~::~CROSS JOIN ").replace(/ INNER~::~{1,}JOIN /gi,"~::~INNER JOIN ").replace(/ LEFT~::~{1,}JOIN /gi,"~::~LEFT JOIN ").replace(/ RIGHT~::~{1,}JOIN /gi,"~::~RIGHT JOIN ").replace(/ ON /gi,"~::~"+b+"ON ").replace(/ OR /gi,"~::~"+b+b+"OR ").replace(/ ORDER\s{1,}BY/gi,"~::~ORDER BY ").replace(/ OVER /gi,"~::~"+b+"OVER ").replace(/\(\s{0,}SELECT /gi,"~::~(SELECT ").replace(/\)\s{0,}SELECT /gi,")~::~SELECT ").replace(/ THEN /gi," THEN~::~"+b).replace(/ UNION /gi,"~::~UNION~::~").replace(/ USING /gi,"~::~USING ").replace(/ WHEN /gi,"~::~"+b+"WHEN ").replace(/ WHERE /gi,"~::~WHERE ").replace(/ WITH /gi,"~::~WITH ").replace(/ ALL /gi," ALL ").replace(/ AS /gi," AS ").replace(/ ASC /gi," ASC ").replace(/ DESC /gi," DESC ").replace(/ DISTINCT /gi," DISTINCT ").replace(/ EXISTS /gi," EXISTS ").replace(/ NOT /gi," NOT ").replace(/ NULL /gi," NULL ").replace(/ LIKE /gi," LIKE ").replace(/\s{0,}SELECT /gi,"SELECT ").replace(/~::~{1,}/g,"~::~").split("~::~")}d.prototype.xml=function(a){var b=a.replace(/>\s{0,}<").replace(/g;g++)b[g].search(/-1?(f+=this.shift[e]+b[g],d=!0,(b[g].search(/-->/)>-1||b[g].search(/\]>/)>-1||b[g].search(/!DOCTYPE/)>-1)&&(d=!1)):b[g].search(/-->/)>-1||b[g].search(/\]>/)>-1?(f+=b[g],d=!1):/^<\w/.exec(b[g-1])&&/^<\/\w/.exec(b[g])&&/^<[\w:\-\.\,]+/.exec(b[g-1])==/^<\/[\w:\-\.\,]+/.exec(b[g])[0].replace("/","")?(f+=b[g],d||e--):b[g].search(/<\w/)>-1&&-1==b[g].search(/<\//)&&-1==b[g].search(/\/>/)?f=f+=d?b[g]:this.shift[e++]+b[g]:b[g].search(/<\w/)>-1&&b[g].search(/<\//)>-1?f=f+=d?b[g]:this.shift[e]+b[g]:b[g].search(/<\//)>-1?f=f+=d?b[g]:this.shift[--e]+b[g]:b[g].search(/\/>/)>-1?f=f+=d?b[g]:this.shift[e]+b[g]:f+=b[g].search(/<\?/)>-1?this.shift[e]+b[g]:b[g].search(/xmlns\:/)>-1||b[g].search(/xmlns\=/)>-1?this.shift[e]+b[g]:b[g];return"\n"==f[0]?f.slice(1):f},d.prototype.json=function(a){return"string"==typeof a?JSON.stringify(JSON.parse(a),null,this.step):"object"==typeof a?JSON.stringify(a,null,this.step):null},d.prototype.css=function(a){var b=a.replace(/\s{1,}/g," ").replace(/\{/g,"{~::~").replace(/\}/g,"~::~}~::~").replace(/\;/g,";~::~").replace(/\/\*/g,"~::~/*").replace(/\*\//g,"*/~::~").replace(/~::~\s{0,}~::~/g,"~::~").split("~::~"),c=b.length,d=0,e="",f=0;for(f=0;c>f;f++)e+=/\{/.exec(b[f])?this.shift[d++]+b[f]:/\}/.exec(b[f])?this.shift[--d]+b[f]:/\*\\/.exec(b[f])?this.shift[d]+b[f]:this.shift[d]+b[f];return e.replace(/^\n{1,}/,"")},d.prototype.sql=function(a){var b=a.replace(/\s{1,}/g," ").replace(/\'/gi,"~::~'").split("~::~"),c=b.length,d=[],g=0,h=this.step,i=0,j="",k=0;for(k=0;c>k;k++)d=d.concat(k%2?b[k]:f(b[k],h));for(c=d.length,k=0;c>k;k++)i=e(d[k],i),/\s{0,}\s{0,}SELECT\s{0,}/.exec(d[k])&&(d[k]=d[k].replace(/\,/g,",\n"+h+h)),/\s{0,}\(\s{0,}SELECT\s{0,}/.exec(d[k])?(g++,j+=this.shift[g]+d[k]):/\'/.exec(d[k])?(1>i&&g&&g--,j+=d[k]):(j+=this.shift[g]+d[k],1>i&&g&&g--);return j=j.replace(/^\n{1,}/,"").replace(/\n{1,}/g,"\n")},d.prototype.xmlmin=function(a,b){var c=b?a:a.replace(/\/g,"");return c.replace(/>\s{0,}<")},d.prototype.jsonmin=function(a){return a.replace(/\s{0,}\{\s{0,}/g,"{").replace(/\s{0,}\[$/g,"[").replace(/\[\s{0,}/g,"[").replace(/:\s{0,}\[/g,":[").replace(/\s{0,}\}\s{0,}/g,"}").replace(/\s{0,}\]\s{0,}/g,"]").replace(/\"\s{0,}\,/g,'",').replace(/\,\s{0,}\"/g,',"').replace(/\"\s{0,}:/g,'":').replace(/:\s{0,}\"/g,':"').replace(/:\s{0,}\[/g,":[").replace(/\,\s{0,}\[/g,",[").replace(/\,\s{2,}/g,", ").replace(/\]\s{0,},\s{0,}\[/g,"],[")},d.prototype.cssmin=function(a,b){var c=b?a:a.replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\//g,"");return c.replace(/\s{1,}/g," ").replace(/\{\s{1,}/g,"{").replace(/\}\s{1,}/g,"}").replace(/\;\s{1,}/g,";").replace(/\/\*\s{1,}/g,"/*").replace(/\*\/\s{1,}/g,"*/")},d.prototype.sqlmin=function(a){return a.replace(/\s{1,}/g," ").replace(/\s{1,}\(/,"(").replace(/\s{1,}\)/,")")},c.pd=new d,b.exports=new d},{}]},{},[1])(1)});;
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.tokml=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g'+t("kml",t("Document",e(b)+f(b)+d(a,b)),[["xmlns","http://www.opengis.net/kml/2.2"]])};var v={Point:function(a){return t("Point",t("coordinates",a.coordinates.join(",")))},LineString:function(a){return t("LineString",t("coordinates",j(a.coordinates)))},Polygon:function(a){if(!a.coordinates.length)return"";var b=a.coordinates[0],c=a.coordinates.slice(1),d=t("outerBoundaryIs",t("LinearRing",t("coordinates",j(b)))),e=c.map(function(a){return t("innerBoundaryIs",t("LinearRing",t("coordinates",j(a))))}).join("");return t("Polygon",d+e)},MultiPoint:function(a){return a.coordinates.length?t("MultiGeometry",a.coordinates.map(function(a){return v.Point({coordinates:a})}).join("")):""},MultiPolygon:function(a){return a.coordinates.length?t("MultiGeometry",a.coordinates.map(function(a){return v.Polygon({coordinates:a})}).join("")):""},MultiLineString:function(a){return a.coordinates.length?t("MultiGeometry",a.coordinates.map(function(a){return v.LineString({coordinates:a})}).join("")):""},GeometryCollection:function(a){return t("MultiGeometry",a.geometries.map(v.any).join(""))},valid:function(a){return a&&a.type&&(a.coordinates||"GeometryCollection"===a.type&&a.geometries.every(v.valid))},any:function(a){return v[a.type]?v[a.type](a):""}}},{strxml:2}],2:[function(a,b){function c(a){return a&&a.length?" "+a.map(function(a){return a[0]+'="'+a[1]+'"'}).join(" "):""}function d(a,b){return"<"+a+c(b)+"/>"}function e(a,b,d){return"<"+a+c(d)+">"+b+""+a+">"}function f(a){return(null===a?"":a.toString()).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}b.exports.attr=c,b.exports.tagClose=d,b.exports.tag=e,b.exports.encode=f},{}]},{},[1])(1)});;
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.geojsonToPath=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g').insertBefore(this.element).append(this.element),this.id=this.element.data("slider-id")||c.id,this.id&&(this.picker[0].id=this.id),("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch)&&(this.touchCapable=!0);var h=this.element.data("slider-tooltip")||c.tooltip;switch(this.tooltip=this.picker.find("#tooltip"),this.tooltipInner=this.tooltip.find("div.tooltip-inner"),this.tooltip_min=this.picker.find("#tooltip_min"),this.tooltipInner_min=this.tooltip_min.find("div.tooltip-inner"),this.tooltip_max=this.picker.find("#tooltip_max"),this.tooltipInner_max=this.tooltip_max.find("div.tooltip-inner"),f===!0&&(this.picker.removeClass("slider-horizontal"),this.picker.removeClass("slider-vertical"),this.tooltip.removeClass("hide"),this.tooltip_min.removeClass("hide"),this.tooltip_max.removeClass("hide")),this.orientation=this.element.data("slider-orientation")||c.orientation,this.orientation){case"vertical":this.picker.addClass("slider-vertical"),this.stylePos="top",this.mousePos="pageY",this.sizePos="offsetHeight",this.tooltip.addClass("right")[0].style.left="100%",this.tooltip_min.addClass("right")[0].style.left="100%",this.tooltip_max.addClass("right")[0].style.left="100%";break;default:this.picker.addClass("slider-horizontal").css("width",e),this.orientation="horizontal",this.stylePos="left",this.mousePos="pageX",this.sizePos="offsetWidth",this.tooltip.addClass("top")[0].style.top=-this.tooltip.outerHeight()-14+"px",this.tooltip_min.addClass("top")[0].style.top=-this.tooltip_min.outerHeight()-14+"px",this.tooltip_max.addClass("top")[0].style.top=-this.tooltip_max.outerHeight()-14+"px"}var i=this;switch(a.each(["min","max","step","precision","value","reversed","handle"],function(a,b){i[b]="undefined"!=typeof d.data("slider-"+b)?d.data("slider-"+b):"undefined"!=typeof c[b]?c[b]:"undefined"!=typeof d.prop(b)?d.prop(b):0}),this.value instanceof Array?f&&!this.range?this.value=this.value[0]:this.range=!0:this.range&&(this.value=[this.value,this.max]),this.selection=this.element.data("slider-selection")||c.selection,this.selectionEl=this.picker.find(".slider-selection"),"none"===this.selection&&this.selectionEl.addClass("hide"),this.selectionElStyle=this.selectionEl[0].style,this.handle1=this.picker.find(".slider-handle:first"),this.handle1Stype=this.handle1[0].style,this.handle2=this.picker.find(".slider-handle:last"),this.handle2Stype=this.handle2[0].style,f===!0&&(this.handle1.removeClass("round triangle"),this.handle2.removeClass("round triangle hide")),this.handle){case"round":this.handle1.addClass("round"),this.handle2.addClass("round");break;case"triangle":this.handle1.addClass("triangle"),this.handle2.addClass("triangle")}this.offset=this.picker.offset(),this.size=this.picker[0][this.sizePos],this.formater=c.formater,this.tooltip_separator=c.tooltip_separator,this.tooltip_split=c.tooltip_split,this.setValue(this.value),this.handle1.on({keydown:a.proxy(this.keydown,this,0)}),this.handle2.on({keydown:a.proxy(this.keydown,this,1)}),this.touchCapable&&this.picker.on({touchstart:a.proxy(this.mousedown,this)}),this.picker.on({mousedown:a.proxy(this.mousedown,this)}),"hide"===h?(this.tooltip.addClass("hide"),this.tooltip_min.addClass("hide"),this.tooltip_max.addClass("hide")):"always"===h?(this.showTooltip(),this.alwaysShowTooltip=!0):(this.picker.on({mouseenter:a.proxy(this.showTooltip,this),mouseleave:a.proxy(this.hideTooltip,this)}),this.handle1.on({focus:a.proxy(this.showTooltip,this),blur:a.proxy(this.hideTooltip,this)}),this.handle2.on({focus:a.proxy(this.showTooltip,this),blur:a.proxy(this.hideTooltip,this)})),this.enabled=c.enabled&&(void 0===this.element.data("slider-enabled")||this.element.data("slider-enabled")===!0),this.enabled?this.enable():this.disable(),this.natural_arrow_keys=this.element.data("slider-natural_arrow_keys")||c.natural_arrow_keys};f.prototype={constructor:f,over:!1,inDrag:!1,showTooltip:function(){this.tooltip_split===!1?this.tooltip.addClass("in"):(this.tooltip_min.addClass("in"),this.tooltip_max.addClass("in")),this.over=!0},hideTooltip:function(){this.inDrag===!1&&this.alwaysShowTooltip!==!0&&(this.tooltip.removeClass("in"),this.tooltip_min.removeClass("in"),this.tooltip_max.removeClass("in")),this.over=!1},layout:function(){var a;if(a=this.reversed?[100-this.percentage[0],this.percentage[1]]:[this.percentage[0],this.percentage[1]],this.handle1Stype[this.stylePos]=a[0]+"%",this.handle2Stype[this.stylePos]=a[1]+"%","vertical"===this.orientation)this.selectionElStyle.top=Math.min(a[0],a[1])+"%",this.selectionElStyle.height=Math.abs(a[0]-a[1])+"%";else{this.selectionElStyle.left=Math.min(a[0],a[1])+"%",this.selectionElStyle.width=Math.abs(a[0]-a[1])+"%";var b=this.tooltip_min[0].getBoundingClientRect(),c=this.tooltip_max[0].getBoundingClientRect();b.right>c.left?(this.tooltip_max.removeClass("top"),this.tooltip_max.addClass("bottom")[0].style.top="18px"):(this.tooltip_max.removeClass("bottom"),this.tooltip_max.addClass("top")[0].style.top="-30px")}this.range?(this.tooltipInner.text(this.formater(this.value[0])+this.tooltip_separator+this.formater(this.value[1])),this.tooltip[0].style[this.stylePos]=this.size*(a[0]+(a[1]-a[0])/2)/100-("vertical"===this.orientation?this.tooltip.outerHeight()/2:this.tooltip.outerWidth()/2)+"px",this.tooltipInner_min.text(this.formater(this.value[0])),this.tooltipInner_max.text(this.formater(this.value[1])),this.tooltip_min[0].style[this.stylePos]=this.size*(a[0]/100)-("vertical"===this.orientation?this.tooltip_min.outerHeight()/2:this.tooltip_min.outerWidth()/2)+"px",this.tooltip_max[0].style[this.stylePos]=this.size*(a[1]/100)-("vertical"===this.orientation?this.tooltip_max.outerHeight()/2:this.tooltip_max.outerWidth()/2)+"px"):(this.tooltipInner.text(this.formater(this.value[0])),this.tooltip[0].style[this.stylePos]=this.size*a[0]/100-("vertical"===this.orientation?this.tooltip.outerHeight()/2:this.tooltip.outerWidth()/2)+"px")},mousedown:function(b){if(!this.isEnabled())return!1;this.touchCapable&&"touchstart"===b.type&&(b=b.originalEvent),this.triggerFocusOnHandle(),this.offset=this.picker.offset(),this.size=this.picker[0][this.sizePos];var c=this.getPercentage(b);if(this.range){var d=Math.abs(this.percentage[0]-c),e=Math.abs(this.percentage[1]-c);this.dragged=e>d?0:1}else this.dragged=0;this.percentage[this.dragged]=this.reversed?100-c:c,this.layout(),this.touchCapable&&a(document).on({touchmove:a.proxy(this.mousemove,this),touchend:a.proxy(this.mouseup,this)}),a(document).on({mousemove:a.proxy(this.mousemove,this),mouseup:a.proxy(this.mouseup,this)}),this.inDrag=!0;var f=this.calculateValue();return this.element.trigger({type:"slideStart",value:f}).data("value",f).prop("value",f),this.setValue(f),!0},triggerFocusOnHandle:function(a){0===a&&this.handle1.focus(),1===a&&this.handle2.focus()},keydown:function(a,b){if(!this.isEnabled())return!1;var c;switch(b.which){case 37:case 40:c=-1;break;case 39:case 38:c=1}if(c){this.natural_arrow_keys&&("vertical"===this.orientation&&!this.reversed||"horizontal"===this.orientation&&this.reversed)&&(c=-1*c);var d=c*this.percentage[2],e=this.percentage[a]+d;e>100?e=100:0>e&&(e=0),this.dragged=a,this.adjustPercentageForRangeSliders(e),this.percentage[this.dragged]=e,this.layout();var f=this.calculateValue();return this.element.trigger({type:"slideStart",value:f}).data("value",f).prop("value",f),this.setValue(f,!0),this.element.trigger({type:"slideStop",value:f}).data("value",f).prop("value",f),!1}},mousemove:function(a){if(!this.isEnabled())return!1;this.touchCapable&&"touchmove"===a.type&&(a=a.originalEvent);var b=this.getPercentage(a);this.adjustPercentageForRangeSliders(b),this.percentage[this.dragged]=this.reversed?100-b:b,this.layout();var c=this.calculateValue();return this.setValue(c,!0),!1},adjustPercentageForRangeSliders:function(a){this.range&&(0===this.dragged&&this.percentage[1]a&&(this.percentage[1]=this.percentage[0],this.dragged=0))},mouseup:function(){if(!this.isEnabled())return!1;this.touchCapable&&a(document).off({touchmove:this.mousemove,touchend:this.mouseup}),a(document).off({mousemove:this.mousemove,mouseup:this.mouseup}),this.inDrag=!1,this.over===!1&&this.hideTooltip();var b=this.calculateValue();return this.layout(),this.element.data("value",b).prop("value",b).trigger({type:"slideStop",value:b}),!1},calculateValue:function(){var a;return this.range?(a=[this.min,this.max],0!==this.percentage[0]&&(a[0]=Math.max(this.min,this.min+Math.round(this.diff*this.percentage[0]/100/this.step)*this.step),a[0]=this.applyPrecision(a[0])),100!==this.percentage[1]&&(a[1]=Math.min(this.max,this.min+Math.round(this.diff*this.percentage[1]/100/this.step)*this.step),a[1]=this.applyPrecision(a[1])),this.value=a):(a=this.min+Math.round(this.diff*this.percentage[0]/100/this.step)*this.step,athis.max&&(a=this.max),a=parseFloat(a),a=this.applyPrecision(a),this.value=[a,this.value[1]]),a},applyPrecision:function(a){var b=this.precision||this.getNumDigitsAfterDecimalPlace(this.step);return this.applyToFixedAndParseFloat(a,b)},getNumDigitsAfterDecimalPlace:function(a){var b=(""+a).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return b?Math.max(0,(b[1]?b[1].length:0)-(b[2]?+b[2]:0)):0},applyToFixedAndParseFloat:function(a,b){var c=a.toFixed(b);return parseFloat(c)},getPercentage:function(a){!this.touchCapable||"touchstart"!==a.type&&"touchmove"!==a.type||(a=a.touches[0]);var b=100*(a[this.mousePos]-this.offset[this.stylePos])/this.size;return b=Math.round(b/this.percentage[2])*this.percentage[2],Math.max(0,Math.min(100,b))},getValue:function(){return this.range?this.value:this.value[0]},setValue:function(a,b){if(a||(a=0),this.value=this.validateInputValue(a),this.range?(this.value[0]=this.applyPrecision(this.value[0]),this.value[1]=this.applyPrecision(this.value[1]),this.value[0]=Math.max(this.min,Math.min(this.max,this.value[0])),this.value[1]=Math.max(this.min,Math.min(this.max,this.value[1]))):(this.value=this.applyPrecision(this.value),this.value=[Math.max(this.min,Math.min(this.max,this.value))],this.handle2.addClass("hide"),this.value[1]="after"===this.selection?this.max:this.min),this.diff=this.max-this.min,this.percentage=this.diff>0?[100*(this.value[0]-this.min)/this.diff,100*(this.value[1]-this.min)/this.diff,100*this.step/this.diff]:[0,0,100],this.layout(),b===!0){var c=this.range?this.value:this.value[0];this.element.trigger({type:"slide",value:c}).data("value",c).prop("value",c)}},validateInputValue:function(b){if("number"==typeof b)return b;if(b instanceof Array)return a.each(b,function(a,b){if("number"!=typeof b)throw new Error(e.formatInvalidInputErrorMsg(b))}),b;throw new Error(e.formatInvalidInputErrorMsg(b))},destroy:function(){this.handle1.off(),this.handle2.off(),this.element.off().show().insertBefore(this.picker),this.picker.off().remove(),a(this.element).removeData("slider")},disable:function(){this.enabled=!1,this.handle1.removeAttr("tabindex"),this.handle2.removeAttr("tabindex"),this.picker.addClass("slider-disabled"),this.element.trigger("slideDisabled")},enable:function(){this.enabled=!0,this.handle1.attr("tabindex",0),this.handle2.attr("tabindex",0),this.picker.removeClass("slider-disabled"),this.element.trigger("slideEnabled")},toggle:function(){this.enabled?this.disable():this.enable()},isEnabled:function(){return this.enabled},setAttribute:function(a,b){this[a]=b},getAttribute:function(a){return this[a]}};var g={getValue:f.prototype.getValue,setValue:f.prototype.setValue,setAttribute:f.prototype.setAttribute,getAttribute:f.prototype.getAttribute,destroy:f.prototype.destroy,disable:f.prototype.disable,enable:f.prototype.enable,toggle:f.prototype.toggle,isEnabled:f.prototype.isEnabled};a.fn.slider=function(a){if("string"==typeof a&&"refresh"!==a){var c=Array.prototype.slice.call(arguments,1);return b.call(this,a,c)}return d.call(this,a)},a.fn.slider.defaults={min:0,max:10,step:1,precision:0,orientation:"horizontal",value:5,range:!1,selection:"before",tooltip:"show",tooltip_separator:":",tooltip_split:!1,natural_arrow_keys:!1,handle:"round",reversed:!1,enabled:!0,formater:function(a){return a}},a.fn.slider.Constructor=f}(window.jQuery);;
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports&&"function"==typeof require?require("jquery"):jQuery)}(function(a){"use strict";function b(c,d){var e=function(){},f=this,g={ajaxSettings:{},autoSelectFirst:!1,appendTo:document.body,serviceUrl:null,lookup:null,onSelect:null,width:"auto",minChars:1,maxHeight:300,deferRequestBy:0,params:{},formatResult:b.formatResult,delimiter:null,zIndex:9999,type:"GET",noCache:!1,onSearchStart:e,onSearchComplete:e,onSearchError:e,preserveInput:!1,containerClass:"autocomplete-suggestions",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,preventBadQueries:!0,lookupFilter:function(a,b,c){return-1!==a.value.toLowerCase().indexOf(c)},paramName:"query",transformResult:function(b){return"string"==typeof b?a.parseJSON(b):b},showNoSuggestionNotice:!1,noSuggestionNotice:"No results",orientation:"bottom",forceFixPosition:!1};f.element=c,f.el=a(c),f.suggestions=[],f.badQueries=[],f.selectedIndex=-1,f.currentValue=f.element.value,f.intervalId=0,f.cachedResponse={},f.onChangeInterval=null,f.onChange=null,f.isLocal=!1,f.suggestionsContainer=null,f.noSuggestionsContainer=null,f.options=a.extend({},g,d),f.classes={selected:"autocomplete-selected",suggestion:"autocomplete-suggestion"},f.hint=null,f.hintValue="",f.selection=null,f.initialize(),f.setOptions(d)}var c=function(){return{escapeRegExChars:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},createNode:function(a){var b=document.createElement("div");return b.className=a,b.style.position="absolute",b.style.display="none",b}}}(),d={ESC:27,TAB:9,RETURN:13,LEFT:37,UP:38,RIGHT:39,DOWN:40};b.utils=c,a.Autocomplete=b,b.formatResult=function(a,b){var d="("+c.escapeRegExChars(b)+")";return a.value.replace(new RegExp(d,"gi"),"$1")},b.prototype={killerFn:null,initialize:function(){var c,d=this,e="."+d.classes.suggestion,f=d.classes.selected,g=d.options;d.element.setAttribute("autocomplete","off"),d.killerFn=function(b){0===a(b.target).closest("."+d.options.containerClass).length&&(d.killSuggestions(),d.disableKillerFn())},d.noSuggestionsContainer=a('').html(this.options.noSuggestionNotice).get(0),d.suggestionsContainer=b.utils.createNode(g.containerClass),c=a(d.suggestionsContainer),c.appendTo(g.appendTo),"auto"!==g.width&&c.width(g.width),c.on("mouseover.autocomplete",e,function(){d.activate(a(this).data("index"))}),c.on("mouseout.autocomplete",function(){d.selectedIndex=-1,c.children("."+f).removeClass(f)}),c.on("click.autocomplete",e,function(){d.select(a(this).data("index"))}),d.fixPositionCapture=function(){d.visible&&d.fixPosition()},a(window).on("resize.autocomplete",d.fixPositionCapture),d.el.on("keydown.autocomplete",function(a){d.onKeyPress(a)}),d.el.on("keyup.autocomplete",function(a){d.onKeyUp(a)}),d.el.on("blur.autocomplete",function(){d.onBlur()}),d.el.on("focus.autocomplete",function(){d.onFocus()}),d.el.on("change.autocomplete",function(a){d.onKeyUp(a)}),d.el.on("input.autocomplete",function(a){d.onKeyUp(a)})},onFocus:function(){var a=this;a.fixPosition(),a.options.minChars<=a.el.val().length&&a.onValueChange()},onBlur:function(){this.enableKillerFn()},setOptions:function(b){var c=this,d=c.options;a.extend(d,b),c.isLocal=a.isArray(d.lookup),c.isLocal&&(d.lookup=c.verifySuggestionsFormat(d.lookup)),d.orientation=c.validateOrientation(d.orientation,"bottom"),a(c.suggestionsContainer).css({"max-height":d.maxHeight+"px",width:d.width+"px","z-index":d.zIndex})},clearCache:function(){this.cachedResponse={},this.badQueries=[]},clear:function(){this.clearCache(),this.currentValue="",this.suggestions=[]},disable:function(){var a=this;a.disabled=!0,clearInterval(a.onChangeInterval),a.currentRequest&&a.currentRequest.abort()},enable:function(){this.disabled=!1},fixPosition:function(){var b=this,c=a(b.suggestionsContainer),d=c.parent().get(0);if(d===document.body||b.options.forceFixPosition){var e=b.options.orientation,f=c.outerHeight(),g=b.el.outerHeight(),h=b.el.offset(),i={top:h.top,left:h.left};if("auto"===e){var j=a(window).height(),k=a(window).scrollTop(),l=-k+h.top-f,m=k+j-(h.top+g+f);e=Math.max(l,m)===l?"top":"bottom"}if(i.top+="top"===e?-f:g,d!==document.body){var n,o=c.css("opacity");b.visible||c.css("opacity",0).show(),n=c.offsetParent().offset(),i.top-=n.top,i.left-=n.left,b.visible||c.css("opacity",o).hide()}"auto"===b.options.width&&(i.width=b.el.outerWidth()-2+"px"),c.css(i)}},enableKillerFn:function(){var b=this;a(document).on("click.autocomplete",b.killerFn)},disableKillerFn:function(){var b=this;a(document).off("click.autocomplete",b.killerFn)},killSuggestions:function(){var a=this;a.stopKillSuggestions(),a.intervalId=window.setInterval(function(){a.hide(),a.stopKillSuggestions()},50)},stopKillSuggestions:function(){window.clearInterval(this.intervalId)},isCursorAtEnd:function(){var a,b=this,c=b.el.val().length,d=b.element.selectionStart;return"number"==typeof d?d===c:document.selection?(a=document.selection.createRange(),a.moveStart("character",-c),c===a.text.length):!0},onKeyPress:function(a){var b=this;if(!b.disabled&&!b.visible&&a.which===d.DOWN&&b.currentValue)return void b.suggest();if(!b.disabled&&b.visible){switch(a.which){case d.ESC:b.el.val(b.currentValue),b.hide();break;case d.RIGHT:if(b.hint&&b.options.onHint&&b.isCursorAtEnd()){b.selectHint();break}return;case d.TAB:if(b.hint&&b.options.onHint)return void b.selectHint();if(-1===b.selectedIndex)return void b.hide();if(b.select(b.selectedIndex),b.options.tabDisabled===!1)return;break;case d.RETURN:if(-1===b.selectedIndex)return void b.hide();b.select(b.selectedIndex);break;case d.UP:b.moveUp();break;case d.DOWN:b.moveDown();break;default:return}a.stopImmediatePropagation(),a.preventDefault()}},onKeyUp:function(a){var b=this;if(!b.disabled){switch(a.which){case d.UP:case d.DOWN:return}clearInterval(b.onChangeInterval),b.currentValue!==b.el.val()&&(b.findBestHint(),b.options.deferRequestBy>0?b.onChangeInterval=setInterval(function(){b.onValueChange()},b.options.deferRequestBy):b.onValueChange())}},onValueChange:function(){var b,c=this,d=c.options,e=c.el.val(),f=c.getQuery(e);return c.selection&&c.currentValue!==f&&(c.selection=null,(d.onInvalidateSelection||a.noop).call(c.element)),clearInterval(c.onChangeInterval),c.currentValue=e,c.selectedIndex=-1,d.triggerSelectOnValidInput&&(b=c.findSuggestionIndex(f),-1!==b)?void c.select(b):void(f.lengthh&&(c.suggestions=c.suggestions.slice(0,h)),c},getSuggestions:function(b){var c,d,e,f,g=this,h=g.options,i=h.serviceUrl;if(h.params[h.paramName]=b,d=h.ignoreParams?null:h.params,h.onSearchStart.call(g.element,h.params)!==!1){if(a.isFunction(h.lookup))return void h.lookup(b,function(a){g.suggestions=a.suggestions,g.suggest(),h.onSearchComplete.call(g.element,b,a.suggestions)});g.isLocal?c=g.getSuggestionsLocal(b):(a.isFunction(i)&&(i=i.call(g.element,b)),e=i+"?"+a.param(d||{}),c=g.cachedResponse[e]),c&&a.isArray(c.suggestions)?(g.suggestions=c.suggestions,g.suggest(),h.onSearchComplete.call(g.element,b,c.suggestions)):g.isBadQuery(b)?h.onSearchComplete.call(g.element,b,[]):(g.currentRequest&&g.currentRequest.abort(),f={url:i,data:d,type:h.type,dataType:h.dataType},a.extend(f,h.ajaxSettings),g.currentRequest=a.ajax(f).done(function(a){var c;g.currentRequest=null,c=h.transformResult(a),g.processResponse(c,b,e),h.onSearchComplete.call(g.element,b,c.suggestions)}).fail(function(a,c,d){h.onSearchError.call(g.element,b,a,c,d)}))}},isBadQuery:function(a){if(!this.options.preventBadQueries)return!1;for(var b=this.badQueries,c=b.length;c--;)if(0===a.indexOf(b[c]))return!0;return!1},hide:function(){var b=this,c=a(b.suggestionsContainer);a.isFunction(b.options.onHide)&&b.visible&&b.options.onHide.call(b.element,c),b.visible=!1,b.selectedIndex=-1,clearInterval(b.onChangeInterval),a(b.suggestionsContainer).hide(),b.signalHint(null)},suggest:function(){if(0===this.suggestions.length)return void(this.options.showNoSuggestionNotice?this.noSuggestions():this.hide());var b,c,d=this,e=d.options,f=e.groupBy,g=e.formatResult,h=d.getQuery(d.currentValue),i=d.classes.suggestion,j=d.classes.selected,k=a(d.suggestionsContainer),l=a(d.noSuggestionsContainer),m=e.beforeRender,n="",o=function(a){var c=a.data[f];return b===c?"":(b=c,''+b+"
")};return e.triggerSelectOnValidInput&&(c=d.findSuggestionIndex(h),-1!==c)?void d.select(c):(a.each(d.suggestions,function(a,b){f&&(n+=o(b,h,a)),n+=''+g(b,h)+"
"}),this.adjustContainerWidth(),l.detach(),k.html(n),a.isFunction(m)&&m.call(d.element,k),d.fixPosition(),k.show(),e.autoSelectFirst&&(d.selectedIndex=0,k.scrollTop(0),k.children("."+i).first().addClass(j)),d.visible=!0,void d.findBestHint())},noSuggestions:function(){var b=this,c=a(b.suggestionsContainer),d=a(b.noSuggestionsContainer);this.adjustContainerWidth(),d.detach(),c.empty(),c.append(d),b.fixPosition(),c.show(),b.visible=!0},adjustContainerWidth:function(){var b,c=this,d=c.options,e=a(c.suggestionsContainer);"auto"===d.width&&(b=c.el.outerWidth()-2,e.width(b>0?b:300))},findBestHint:function(){var b=this,c=b.el.val().toLowerCase(),d=null;c&&(a.each(b.suggestions,function(a,b){var e=0===b.value.toLowerCase().indexOf(c);return e&&(d=b),!e}),b.signalHint(d))},signalHint:function(b){var c="",d=this;b&&(c=d.currentValue+b.value.substr(d.currentValue.length)),d.hintValue!==c&&(d.hintValue=c,d.hint=b,(this.options.onHint||a.noop)(c))},verifySuggestionsFormat:function(b){return b.length&&"string"==typeof b[0]?a.map(b,function(a){return{value:a,data:null}}):b},validateOrientation:function(b,c){return b=a.trim(b||"").toLowerCase(),-1===a.inArray(b,["auto","bottom","top"])&&(b=c),b},processResponse:function(a,b,c){var d=this,e=d.options;a.suggestions=d.verifySuggestionsFormat(a.suggestions),e.noCache||(d.cachedResponse[c]=a,e.preventBadQueries&&0===a.suggestions.length&&d.badQueries.push(b)),b===d.getQuery(d.currentValue)&&(d.suggestions=a.suggestions,d.suggest())},activate:function(b){var c,d=this,e=d.classes.selected,f=a(d.suggestionsContainer),g=f.find("."+d.classes.suggestion);return f.find("."+e).removeClass(e),d.selectedIndex=b,-1!==d.selectedIndex&&g.length>d.selectedIndex?(c=g.get(d.selectedIndex),a(c).addClass(e),c):null},selectHint:function(){var b=this,c=a.inArray(b.hint,b.suggestions);b.select(c)},select:function(a){var b=this;b.hide(),b.onSelect(a)},moveUp:function(){var b=this;if(-1!==b.selectedIndex)return 0===b.selectedIndex?(a(b.suggestionsContainer).children().first().removeClass(b.classes.selected),b.selectedIndex=-1,b.el.val(b.currentValue),void b.findBestHint()):void b.adjustScroll(b.selectedIndex-1)},moveDown:function(){var a=this;a.selectedIndex!==a.suggestions.length-1&&a.adjustScroll(a.selectedIndex+1)},adjustScroll:function(b){var c=this,d=c.activate(b);if(d){var e,f,g,h=a(d).outerHeight();e=d.offsetTop,f=a(c.suggestionsContainer).scrollTop(),g=f+c.options.maxHeight-h,f>e?a(c.suggestionsContainer).scrollTop(e):e>g&&a(c.suggestionsContainer).scrollTop(e-c.options.maxHeight+h),c.options.preserveInput||c.el.val(c.getValue(c.suggestions[b].value)),c.signalHint(null)}},onSelect:function(b){var c=this,d=c.options.onSelect,e=c.suggestions[b];c.currentValue=c.getValue(e.value),c.currentValue===c.el.val()||c.options.preserveInput||c.el.val(c.currentValue),c.signalHint(null),c.suggestions=[],c.selection=e,a.isFunction(d)&&d.call(c.element,e)},getValue:function(a){var b,c,d=this,e=d.options.delimiter;return e?(b=d.currentValue,c=b.split(e),1===c.length?a:b.substr(0,b.length-c[c.length-1].length)+a):a},dispose:function(){var b=this;b.el.off(".autocomplete").removeData("autocomplete"),b.disableKillerFn(),a(window).off("resize.autocomplete",b.fixPositionCapture),a(b.suggestionsContainer).remove()}},a.fn.autocomplete=a.fn.devbridgeAutocomplete=function(c,d){var e="autocomplete";return 0===arguments.length?this.first().data(e):this.each(function(){var f=a(this),g=f.data(e);"string"==typeof c?g&&"function"==typeof g[c]&&g[c](d):(g&&g.dispose&&g.dispose(),g=new b(this,c),f.data(e,g))})}});;
!function(a){function b(a,b){if(!b||"function"==typeof b)return a;for(var c in b)a[c]=b[c];return a}function c(a,b){for(var d in b)d in a?c(a[d],b[d]):a[d]=b[d];return a}function d(a,b,c){var d,e=0,f=a.length,g=void 0===f||"[object Array]"!==Object.prototype.toString.apply(a)||"function"==typeof a;if(c)if(g){for(d in a)if(b.apply(a[d],c)===!1)break}else for(;f>e&&b.apply(a[e++],c)!==!1;);else if(g){for(d in a)if(b.call(a[d],d,a[d])===!1)break}else for(;f>e&&b.call(a[e],e,a[e++])!==!1;);return a}function e(a){return"string"==typeof a?a.replace(/[&<>"'\/]/g,function(a){return R[a]}):a}function f(a){var b=function(a){if(window.XMLHttpRequest)return a(null,new XMLHttpRequest);if(window.ActiveXObject)try{return a(null,new ActiveXObject("Msxml2.XMLHTTP"))}catch(b){return a(null,new ActiveXObject("Microsoft.XMLHTTP"))}return a(new Error)},c=function(a){if("string"==typeof a)return a;var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(encodeURIComponent(c)+"="+encodeURIComponent(a[c]));return b.join("&")},d=function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;cd?b+=String.fromCharCode(d):d>127&&2048>d?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},e=function(a){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";a=d(a);var c,e,f,g,h,i,j,k="",l=0;do c=a.charCodeAt(l++),e=a.charCodeAt(l++),f=a.charCodeAt(l++),g=c>>2,h=(3&c)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k+=b.charAt(g)+b.charAt(h)+b.charAt(i)+b.charAt(j),c=e=f="",g=h=i=j="";while(l1&&(d+=d.indexOf("?")>-1?"&"+k:"?"+k),e.jsonp){var l=document.getElementsByTagName("head")[0],m=document.createElement("script");return m.type="text/javascript",m.src=d,void l.appendChild(m)}}b(function(b,c){if(b)return h(b);c.open(a,d,e.async);for(var f in j)j.hasOwnProperty(f)&&c.setRequestHeader(f,j[f]);c.onreadystatechange=function(){if(4===c.readyState){var a=c.responseText||"";if(!h)return;h(c.status,{text:function(){return a},json:function(){try{return JSON.parse(a)}catch(b){return U.error("Can not parse JSON. URL: "+d),{}}}})}},c.send(i)})},h={authBasic:function(a,b){g.headers.Authorization="Basic "+e(a+":"+b)},connect:function(a,b,c){return g("CONNECT",a,b,c)},del:function(a,b,c){return g("DELETE",a,b,c)},get:function(a,b,c){return g("GET",a,b,c)},head:function(a,b,c){return g("HEAD",a,b,c)},headers:function(a){g.headers=a||{}},isAllowed:function(a,b,c){this.options(a,function(a,d){c(-1!==d.text().indexOf(b))})},options:function(a,b,c){return g("OPTIONS",a,b,c)},patch:function(a,b,c){return g("PATCH",a,b,c)},post:function(a,b,c){return g("POST",a,b,c)},put:function(a,b,c){return g("PUT",a,b,c)},trace:function(a,b,c){return g("TRACE",a,b,c)}},i=a.type?a.type.toLowerCase():"get";h[i](a.url,a,function(b,c){200===b||0===b&&c.text()?a.success(c.json(),b,null):a.error(c.text(),b,null)})}function g(a,b){"function"==typeof a&&(b=a,a={}),a=a||{},U.extend(Q,a),delete Q.fixLng,Q.functions&&(delete Q.functions,U.extend(U,a.functions)),"string"==typeof Q.ns&&(Q.ns={namespaces:[Q.ns],defaultNs:Q.ns}),"string"==typeof Q.fallbackNS&&(Q.fallbackNS=[Q.fallbackNS]),("string"==typeof Q.fallbackLng||"boolean"==typeof Q.fallbackLng)&&(Q.fallbackLng=[Q.fallbackLng]),Q.interpolationPrefixEscaped=U.regexEscape(Q.interpolationPrefix),Q.interpolationSuffixEscaped=U.regexEscape(Q.interpolationSuffix),Q.lng||(Q.lng=U.detectLanguage()),M=U.toLanguages(Q.lng),H=M[0],U.log("currentLng set to: "+H),Q.useCookie&&U.cookie.read(Q.cookieName)!==H&&U.cookie.create(Q.cookieName,H,Q.cookieExpirationTime,Q.cookieDomain),Q.detectLngFromLocalStorage&&"undefined"!=typeof document&&window.localStorage&&U.localStorage.setItem("i18next_lng",H);var c=B;a.fixLng&&(c=function(a,b){return b=b||{},b.lng=b.lng||c.lng,B(a,b)},c.lng=H),X.setCurrentLng(H),I&&Q.setJqueryExt&&u();var d;if(I&&I.Deferred&&(d=I.Deferred()),!Q.resStore){var e=U.toLanguages(Q.lng);"string"==typeof Q.preload&&(Q.preload=[Q.preload]);for(var f=0,g=Q.preload.length;g>f;f++)for(var h=U.toLanguages(Q.preload[f]),i=0,j=h.length;j>i;i++)e.indexOf(h[i])<0&&e.push(h[i]);return J.sync.load(e,Q,function(a,e){K=e,N=!0,b&&b(c),d&&d.resolve(c)}),d?d.promise():void 0}return K=Q.resStore,N=!0,b&&b(c),d&&d.resolve(c),d?d.promise():void 0}function h(a,b){"string"==typeof a&&(a=[a]);for(var c=0,d=a.length;d>c;c++)Q.preload.indexOf(a[c])<0&&Q.preload.push(a[c]);return g(b)}function i(a,b,c,d){"string"!=typeof b?(c=b,b=Q.ns.defaultNs):Q.ns.namespaces.indexOf(b)<0&&Q.ns.namespaces.push(b),K[a]=K[a]||{},K[a][b]=K[a][b]||{},d?U.deepExtend(K[a][b],c):U.extend(K[a][b],c),Q.useLocalStorage&&O._storeLocal(K)}function j(a,b){"string"!=typeof b&&(b=Q.ns.defaultNs),K[a]=K[a]||{};var c=K[a][b]||{},d=!1;for(var e in c)c.hasOwnProperty(e)&&(d=!0);return d}function k(a,b){return"string"!=typeof b&&(b=Q.ns.defaultNs),K[a]=K[a]||{},U.extend({},K[a][b])}function l(a,b){"string"!=typeof b&&(b=Q.ns.defaultNs),K[a]=K[a]||{},K[a][b]={},Q.useLocalStorage&&O._storeLocal(K)}function m(a,b,c,d){"string"!=typeof b?(resource=b,b=Q.ns.defaultNs):Q.ns.namespaces.indexOf(b)<0&&Q.ns.namespaces.push(b),K[a]=K[a]||{},K[a][b]=K[a][b]||{};for(var e=c.split(Q.keyseparator),f=0,g=K[a][b];e[f];)f==e.length-1?g[e[f]]=d:(null==g[e[f]]&&(g[e[f]]={}),g=g[e[f]]),f++;Q.useLocalStorage&&O._storeLocal(K)}function n(a,b,c){"string"!=typeof b?(resource=b,b=Q.ns.defaultNs):Q.ns.namespaces.indexOf(b)<0&&Q.ns.namespaces.push(b);for(var d in c)"string"==typeof c[d]&&m(a,b,d,c[d])}function o(a){Q.ns.defaultNs=a}function p(a,b){q([a],b)}function q(a,b){var c={dynamicLoad:Q.dynamicLoad,resGetPath:Q.resGetPath,getAsync:Q.getAsync,customLoad:Q.customLoad,ns:{namespaces:a,defaultNs:""}},d=U.toLanguages(Q.lng);"string"==typeof Q.preload&&(Q.preload=[Q.preload]);for(var e=0,f=Q.preload.length;f>e;e++)for(var g=U.toLanguages(Q.preload[e]),h=0,i=g.length;i>h;h++)d.indexOf(g[h])<0&&d.push(g[h]);for(var j=[],k=0,l=d.length;l>k;k++){var m=!1,n=K[d[k]];if(n)for(var o=0,p=a.length;p>o;o++)n[a[o]]||(m=!0);else m=!0;m&&j.push(d[k])}j.length?J.sync._fetch(j,c,function(c,d){var e=a.length*j.length;U.each(a,function(a,c){Q.ns.namespaces.indexOf(c)<0&&Q.ns.namespaces.push(c),U.each(j,function(a,f){K[f]=K[f]||{},K[f][c]=d[f][c],e--,0===e&&b&&(Q.useLocalStorage&&J.sync._storeLocal(K),b())})})}):b&&b()}function r(a,b,c){return"function"==typeof b?(c=b,b={}):b||(b={}),b.lng=a,g(b,c)}function s(){return H}function t(a){K={},r(H,a)}function u(){function a(a,b,c){if(0!==b.length){var d="text";if(0===b.indexOf("[")){var e=b.split("]");b=e[1],d=e[0].substr(1,e[0].length-1)}b.indexOf(";")===b.length-1&&(b=b.substr(0,b.length-2));var f;if("html"===d)f=Q.defaultValueFromContent?I.extend({defaultValue:a.html()},c):c,a.html(I.t(b,f));else if("text"===d)f=Q.defaultValueFromContent?I.extend({defaultValue:a.text()},c):c,a.text(I.t(b,f));else if("prepend"===d)f=Q.defaultValueFromContent?I.extend({defaultValue:a.html()},c):c,a.prepend(I.t(b,f));else if("append"===d)f=Q.defaultValueFromContent?I.extend({defaultValue:a.html()},c):c,a.append(I.t(b,f));else if(0===d.indexOf("data-")){var g=d.substr("data-".length);f=Q.defaultValueFromContent?I.extend({defaultValue:a.data(g)},c):c;var h=I.t(b,f);a.data(g,h),a.attr(d,h)}else f=Q.defaultValueFromContent?I.extend({defaultValue:a.attr(d)},c):c,a.attr(d,I.t(b,f))}}function b(b,c){var d=b.attr(Q.selectorAttr);if(d||"undefined"==typeof d||d===!1||(d=b.text()||b.val()),d){var e=b,f=b.data("i18n-target");if(f&&(e=b.find(f)||b),c||Q.useDataAttrOptions!==!0||(c=b.data("i18n-options")),c=c||{},d.indexOf(";")>=0){var g=d.split(";");I.each(g,function(b,d){""!==d&&a(e,d,c)})}else a(e,d,c);Q.useDataAttrOptions===!0&&b.data("i18n-options",c)}}I.t=I.t||B,I.fn.i18n=function(a){return this.each(function(){b(I(this),a);var c=I(this).find("["+Q.selectorAttr+"]");c.each(function(){b(I(this),a)})})}}function v(a,b,c,d){if(!a)return a;if(d=d||b,a.indexOf(d.interpolationPrefix||Q.interpolationPrefix)<0)return a;var e=d.interpolationPrefix?U.regexEscape(d.interpolationPrefix):Q.interpolationPrefixEscaped,f=d.interpolationSuffix?U.regexEscape(d.interpolationSuffix):Q.interpolationSuffixEscaped,g="HTML"+f,h=b.replace&&"object"==typeof b.replace?b.replace:b;return U.each(h,function(b,h){var i=c?c+Q.keyseparator+b:b;"object"==typeof h&&null!==h?a=v(a,h,i,d):d.escapeInterpolation||Q.escapeInterpolation?(a=a.replace(new RegExp([e,i,g].join(""),"g"),U.regexReplacementEscape(h)),a=a.replace(new RegExp([e,i,f].join(""),"g"),U.regexReplacementEscape(U.escape(h)))):a=a.replace(new RegExp([e,i,f].join(""),"g"),U.regexReplacementEscape(h))}),a}function w(a,b){var c=",",d="{",e="}",f=U.extend({},b);for(delete f.postProcess;-1!=a.indexOf(Q.reusePrefix)&&(L++,!(L>Q.maxRecursion));){var g=a.lastIndexOf(Q.reusePrefix),h=a.indexOf(Q.reuseSuffix,g)+Q.reuseSuffix.length,i=a.substring(g,h),j=i.replace(Q.reusePrefix,"").replace(Q.reuseSuffix,"");if(g>=h)return U.error("there is an missing closing in following translation value",a),"";if(-1!=j.indexOf(c)){var k=j.indexOf(c);if(-1!=j.indexOf(d,k)&&-1!=j.indexOf(e,k)){var l=j.indexOf(d,k),m=j.indexOf(e,l)+e.length;try{f=U.extend(f,JSON.parse(j.substring(l,m))),j=j.substring(0,k)}catch(n){}}}var o=E(j,f);a=a.replace(i,U.regexReplacementEscape(o))}return a}function x(a){return a.context&&("string"==typeof a.context||"number"==typeof a.context)}function y(a){return void 0!==a.count&&"string"!=typeof a.count}function z(a){return void 0!==a.indefinite_article&&"string"!=typeof a.indefinite_article&&a.indefinite_article}function A(a,b){b=b||{};var c=C(a,b),d=F(a,b);return void 0!==d||d===c}function B(a,b){return b=b||{},N?(L=0,E.apply(null,arguments)):(U.log("i18next not finished initialization. you might have called t function before loading resources finished."),b.defaultValue||"")}function C(a,b){return void 0!==b.defaultValue?b.defaultValue:a}function D(){for(var a=[],b=1;b1)for(var d=0;d-1&&(e=c.split(Q.nsseparator),i=e[0],c=e[1]),void 0===g&&Q.sendMissing&&"function"==typeof Q.missingKeyHandler&&(b.lng?Q.missingKeyHandler(h[0],i,c,f,h):Q.missingKeyHandler(Q.lng,i,c,f,h));var j;j="string"==typeof Q.postProcess&&""!==Q.postProcess?[Q.postProcess]:"array"==typeof Q.postProcess||"object"==typeof Q.postProcess?Q.postProcess:[],"string"==typeof b.postProcess&&""!==b.postProcess?j=j.concat([b.postProcess]):("array"==typeof b.postProcess||"object"==typeof b.postProcess)&&(j=j.concat(b.postProcess)),void 0!==g&&j.length&&j.forEach(function(a){Y[a]&&(g=Y[a](g,c,b))});var k=f;if(f.indexOf(Q.nsseparator)>-1&&(e=f.split(Q.nsseparator),k=e[1]),k===c&&Q.parseMissingKey&&(f=Q.parseMissingKey(f)),void 0===g&&(f=v(f,b),f=w(f,b),j.length)){var l=C(c,b);j.forEach(function(a){Y[a]&&(g=Y[a](l,c,b))})}return void 0!==g?g:f}function F(a,b){b=b||{};var c,d,e=C(a,b),f=M;if(!K)return e;if("cimode"===f[0].toLowerCase())return e;if(b.lngs&&(f=b.lngs),b.lng&&(f=U.toLanguages(b.lng,b.fallbackLng),!K[f[0]])){var g=Q.getAsync;Q.getAsync=!1,J.sync.load(f,Q,function(a,b){U.extend(K,b),Q.getAsync=g})}var h=b.ns||Q.ns.defaultNs;if(a.indexOf(Q.nsseparator)>-1){var i=a.split(Q.nsseparator);h=i[0],a=i[1]}if(x(b)){c=U.extend({},b),delete c.context,c.defaultValue=Q.contextNotFound;var j=h+Q.nsseparator+a+"_"+b.context;if(d=B(j,c),d!=Q.contextNotFound)return v(d,{context:b.context})}if(y(b,f[0])){c=U.extend({lngs:[f[0]]},b),delete c.count,c._origLng=c._origLng||c.lng||f[0],delete c.lng,c.defaultValue=Q.pluralNotFound;var k;if(X.needsPlural(f[0],b.count)){k=h+Q.nsseparator+a+Q.pluralSuffix;var l=X.get(f[0],b.count);l>=0?k=k+"_"+l:1===l&&(k=h+Q.nsseparator+a)}else k=h+Q.nsseparator+a;if(d=B(k,c),d!=Q.pluralNotFound)return v(d,{count:b.count,interpolationPrefix:b.interpolationPrefix,interpolationSuffix:b.interpolationSuffix});if(!(f.length>1))return c.lng=c._origLng,delete c._origLng,d=B(h+Q.nsseparator+a,c),v(d,{count:b.count,interpolationPrefix:b.interpolationPrefix,interpolationSuffix:b.interpolationSuffix});var m=f.slice();if(m.shift(),b=U.extend(b,{lngs:m}),b._origLng=c._origLng,delete b.lng,d=B(h+Q.nsseparator+a,b),d!=Q.pluralNotFound)return d}if(z(b)){var n=U.extend({},b);delete n.indefinite_article,n.defaultValue=Q.indefiniteNotFound;var o=h+Q.nsseparator+a+(b.count&&!y(b,f[0])||!b.count?Q.indefiniteSuffix:"");if(d=B(o,n),d!=Q.indefiniteNotFound)return d}for(var p,q=a.split(Q.keyseparator),r=0,s=f.length;s>r&&void 0===p;r++){for(var t=f[r],u=0,A=K[t]&&K[t][h];q[u];)A=A&&A[q[u]],u++;if(void 0!==A){var D=Object.prototype.toString.apply(A);if("string"==typeof A)A=v(A,b),A=w(A,b);else if("[object Array]"!==D||Q.returnObjectTrees||b.returnObjectTrees){if(null===A&&Q.fallbackOnNull===!0)A=void 0;else if(null!==A)if(Q.returnObjectTrees||b.returnObjectTrees){if("[object Number]"!==D&&"[object Function]"!==D&&"[object RegExp]"!==D){var G="[object Array]"===D?[]:{};U.each(A,function(c){G[c]=E(h+Q.nsseparator+a+Q.keyseparator+c,b)}),A=G}}else Q.objectTreeKeyHandler&&"function"==typeof Q.objectTreeKeyHandler?A=Q.objectTreeKeyHandler(a,A,t,h,b):(A="key '"+h+":"+a+" ("+t+")' returned an object instead of string.",U.log(A))}else A=A.join("\n"),A=v(A,b),A=w(A,b);"string"==typeof A&&""===A.trim()&&Q.fallbackOnEmpty===!0&&(A=void 0),p=A}}if(void 0===p&&!b.isFallbackLookup&&(Q.fallbackToDefaultNS===!0||Q.fallbackNS&&Q.fallbackNS.length>0)){if(b.isFallbackLookup=!0,Q.fallbackNS.length){for(var H=0,I=Q.fallbackNS.length;I>H;H++)if(p=F(Q.fallbackNS[H]+Q.nsseparator+a,b),p||""===p&&Q.fallbackOnEmpty===!1){var L=p.indexOf(Q.nsseparator)>-1?p.split(Q.nsseparator)[1]:p,N=e.indexOf(Q.nsseparator)>-1?e.split(Q.nsseparator)[1]:e;if(L!==N)break}}else p=F(a,b);b.isFallbackLookup=!1}return p}function G(){var a,b=Q.lngWhitelist||[],c=[];if("undefined"!=typeof window&&!function(){for(var a=window.location.search.substring(1),b=a.split("&"),d=0;d0){var f=b[d].substring(0,e);f==Q.detectLngQS&&c.push(b[d].substring(e+1))}}}(),Q.useCookie&&"undefined"!=typeof document){var d=U.cookie.read(Q.cookieName);d&&c.push(d)}if(Q.detectLngFromLocalStorage&&"undefined"!=typeof window&&window.localStorage&&c.push(U.localStorage.getItem("i18next_lng")),"undefined"!=typeof navigator){if(navigator.languages)for(var e=0;e-1){var f=e.split("-");e=Q.lowerCaseLng?f[0].toLowerCase()+"-"+f[1].toLowerCase():f[0].toLowerCase()+"-"+f[1].toUpperCase()}if(0===b.length||b.indexOf(e)>-1){a=e;break}}}(),a||(a=Q.fallbackLng[0]),a}Array.prototype.indexOf||(Array.prototype.indexOf=function(a){"use strict";if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>0&&(d=Number(arguments[1]),d!=d?d=0:0!=d&&d!=1/0&&d!=-(1/0)&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(a){"use strict";if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=c;arguments.length>1&&(d=Number(arguments[1]),d!=d?d=0:0!=d&&d!=1/0&&d!=-(1/0)&&(d=(d>0||-1)*Math.floor(Math.abs(d))));for(var e=d>=0?Math.min(d,c-1):c-Math.abs(d);e>=0;e--)if(e in b&&b[e]===a)return e;return-1}),"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});var H,I=a.jQuery||a.Zepto,J={},K={},L=0,M=[],N=!1,O={};if("undefined"!=typeof module&&module.exports){if(module.exports=J,!I)try{I=require("jquery")}catch(P){}}else a.i18n=a.i18n||J;I&&(I.i18n=I.i18n||J),O={load:function(a,b,c){b.useLocalStorage?O._loadLocal(a,b,function(d,e){for(var f=[],g=0,h=a.length;h>g;g++)e[a[g]]||f.push(a[g]);f.length>0?O._fetch(f,b,function(a,b){U.extend(e,b),O._storeLocal(b),c(null,e)}):c(null,e)}):O._fetch(a,b,function(a,b){c(null,b)})},_loadLocal:function(a,b,c){var d={},e=(new Date).getTime();if(window.localStorage){var f=a.length;U.each(a,function(a,g){var h=U.localStorage.getItem("res_"+g);h&&(h=JSON.parse(h),h.i18nStamp&&h.i18nStamp+b.localStorageExpirationTime>e&&(d[g]=h)),f--,0===f&&c(null,d)})}},_storeLocal:function(a){if(window.localStorage)for(var b in a)a[b].i18nStamp=(new Date).getTime(),U.localStorage.setItem("res_"+b,JSON.stringify(a[b]))},_fetch:function(a,b,c){var d=b.ns,e={};if(b.dynamicLoad){var f=function(a,b){c(null,b)};if("function"==typeof b.customLoad)b.customLoad(a,d.namespaces,b,f);else{var g=v(b.resGetPath,{lng:a.join("+"),ns:d.namespaces.join("+")});U.ajax({url:g,success:function(a){U.log("loaded: "+g),f(null,a)},error:function(a,b,c){U.log("failed loading: "+g),f("failed loading resource.json error: "+c)},dataType:"json",async:b.getAsync})}}else{var h,i=d.namespaces.length*a.length;U.each(d.namespaces,function(d,f){U.each(a,function(a,d){var g=function(a,b){a&&(h=h||[],h.push(a)),e[d]=e[d]||{},e[d][f]=b,i--,0===i&&c(h,e)};"function"==typeof b.customLoad?b.customLoad(d,f,b,g):O._fetchOne(d,f,b,g)})})}},_fetchOne:function(a,b,c,d){var e=v(c.resGetPath,{lng:a,ns:b});U.ajax({url:e,success:function(a){U.log("loaded: "+e),d(null,a)},error:function(a,b,c){if(b&&200==b||a&&a.status&&200==a.status)U.error("There is a typo in: "+e);else if(b&&404==b||a&&a.status&&404==a.status)U.log("Does not exist: "+e);else{var f=b?b:a&&a.status?a.status:null;U.log(f+" when loading "+e)}d(c,{})},dataType:"json",async:c.getAsync})},postMissing:function(a,b,c,d,e){var f={};f[c]=d;var g=[];if("fallback"===Q.sendMissingTo&&Q.fallbackLng[0]!==!1)for(var h=0;hh;h++)g.push({lng:e[h],url:v(Q.resPostPath,{lng:e[h],ns:b})});for(var j=0,k=g.length;k>j;j++){var l=g[j];U.ajax({url:l.url,type:Q.sendType,data:f,success:function(){U.log("posted missing key '"+c+"' to: "+l.url);for(var a=c.split("."),e=0,f=K[l.lng][b];a[e];)f=f[a[e]]=e===a.length-1?d:f[a[e]]||{},e++},error:function(){U.log("failed posting missing key '"+c+"' to: "+l.url)},dataType:"json",async:Q.postAsync})}},reload:t};var Q={lng:void 0,load:"all",preload:[],lowerCaseLng:!1,returnObjectTrees:!1,fallbackLng:["dev"],fallbackNS:[],detectLngQS:"setLng",detectLngFromLocalStorage:!1,ns:"translation",fallbackOnNull:!0,fallbackOnEmpty:!1,fallbackToDefaultNS:!1,nsseparator:":",keyseparator:".",selectorAttr:"data-i18n",debug:!1,resGetPath:"locales/__lng__/__ns__.json",resPostPath:"locales/add/__lng__/__ns__",getAsync:!0,postAsync:!0,resStore:void 0,useLocalStorage:!1,localStorageExpirationTime:6048e5,dynamicLoad:!1,sendMissing:!1,sendMissingTo:"fallback",sendType:"POST",interpolationPrefix:"__",interpolationSuffix:"__",defaultVariables:!1,reusePrefix:"$t(",reuseSuffix:")",pluralSuffix:"_plural",pluralNotFound:["plural_not_found",Math.random()].join(""),contextNotFound:["context_not_found",Math.random()].join(""),escapeInterpolation:!1,indefiniteSuffix:"_indefinite",indefiniteNotFound:["indefinite_not_found",Math.random()].join(""),setJqueryExt:!0,defaultValueFromContent:!0,useDataAttrOptions:!1,cookieExpirationTime:void 0,useCookie:!0,cookieName:"i18next",cookieDomain:void 0,objectTreeKeyHandler:void 0,postProcess:void 0,parseMissingKey:void 0,missingKeyHandler:O.postMissing,shortcutFunction:"sprintf"},R={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},S={create:function(a,b,c,d){var e;if(c){var f=new Date;f.setTime(f.getTime()+60*c*1e3),e="; expires="+f.toGMTString()}else e="";d=d?"domain="+d+";":"",document.cookie=a+"="+b+e+";"+d+"path=/"},read:function(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;d-1){var c=a.split("-");b=Q.lowerCaseLng?c[0].toLowerCase()+"-"+c[1].toLowerCase():c[0].toLowerCase()+"-"+c[1].toUpperCase()}else b=Q.lowerCaseLng?a.toLowerCase():a;return b}var c=this.log,d=[],e=Q.lngWhitelist||!1,f=function(a){!e||e.indexOf(a)>-1?d.push(a):c("rejecting non-whitelisted language: "+a)};if("string"==typeof a&&a.indexOf("-")>-1){var g=a.split("-");"unspecific"!==Q.load&&f(b(a)),"current"!==Q.load&&f(b(g[this.getCountyIndexOfLng(a)]))}else f(b(a));for(var h=0;h1)},2:function(a){return Number(1!=a)},3:function(){return 0},4:function(a){return Number(a%10==1&&a%100!=11?0:a%10>=2&&4>=a%10&&(10>a%100||a%100>=20)?1:2)},5:function(a){return Number(0===a?0:1==a?1:2==a?2:a%100>=3&&10>=a%100?3:a%100>=11?4:5)},6:function(a){return Number(1==a?0:a>=2&&4>=a?1:2)},7:function(a){return Number(1==a?0:a%10>=2&&4>=a%10&&(10>a%100||a%100>=20)?1:2)},8:function(a){return Number(1==a?0:2==a?1:8!=a&&11!=a?2:3)},9:function(a){return Number(a>=2)},10:function(a){return Number(1==a?0:2==a?1:7>a?2:11>a?3:4)},11:function(a){return Number(1==a||11==a?0:2==a||12==a?1:a>2&&20>a?2:3)},12:function(a){return Number(a%10!=1||a%100==11)},13:function(a){return Number(0!==a)},14:function(a){return Number(1==a?0:2==a?1:3==a?2:3)},15:function(a){return Number(a%10==1&&a%100!=11?0:a%10>=2&&(10>a%100||a%100>=20)?1:2)},16:function(a){return Number(a%10==1&&a%100!=11?0:0!==a?1:2)},17:function(a){return Number(1==a||a%10==1?0:1)},18:function(a){return Number(1==a?1:2)},19:function(a){return Number(1==a?0:0===a||a%100>1&&11>a%100?1:a%100>10&&20>a%100?2:3)},20:function(a){return Number(1==a?0:0===a||a%100>0&&20>a%100?1:2)},21:function(a){return Number(a%100==1?1:a%100==2?2:a%100==3||a%100==4?3:0)}},X={rules:function(){var a,b={};for(a=V.length;a--;)b[V[a][0]]={name:V[a][1],numbers:V[a][2],plurals:W[V[a][3]]};return b}(),addRule:function(a,b){X.rules[a]=b},setCurrentLng:function(a){if(!X.currentRule||X.currentRule.lng!==a){var b=a.split("-");X.currentRule={lng:a,rule:X.rules[b[0]]}}},needsPlural:function(a,b){var c,d=a.split("-");return c=X.currentRule&&X.currentRule.lng===a?X.currentRule.rule:X.rules[d[U.getCountyIndexOfLng(a)]],c&&c.numbers.length<=1?!1:1!==this.get(a,b)},get:function(a,b){function c(b,c){var d;if(d=X.currentRule&&X.currentRule.lng===a?X.currentRule.rule:X.rules[b]){var e;e=d.plurals(d.noAbs?c:Math.abs(c));var f=d.numbers[e];return 2===d.numbers.length&&1===d.numbers[0]&&(2===f?f=-1:1===f&&(f=1)),f}return 1===c?"1":"-1"}var d=a.split("-");return c(d[U.getCountyIndexOfLng(a)],b)}},Y={},Z=function(a,b){Y[a]=b},$=function(){function a(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}function b(a,b){for(var c=[];b>0;c[--b]=a);return c.join("")}var c=function(){return c.cache.hasOwnProperty(arguments[0])||(c.cache[arguments[0]]=c.parse(arguments[0])),c.format.call(null,c.cache[arguments[0]],arguments)};return c.format=function(c,d){var e,f,g,h,i,j,k,l=1,m=c.length,n="",o=[];for(f=0;m>f;f++)if(n=a(c[f]),"string"===n)o.push(c[f]);else if("array"===n){if(h=c[f],h[2])for(e=d[l],g=0;g=0?"+"+e:e,j=h[4]?"0"==h[4]?"0":h[4].charAt(1):" ",k=h[6]-String(e).length,i=h[6]?b(j,k):"",o.push(h[5]?e+i:i+e)}return o.join("")},c.cache={},c.parse=function(a){for(var b=a,c=[],d=[],e=0;b;){if(null!==(c=/^[^\x25]+/.exec(b)))d.push(c[0]);else if(null!==(c=/^\x25{2}/.exec(b)))d.push("%");else{if(null===(c=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(b)))throw"[sprintf] huh?";if(c[2]){e|=1;var f=[],g=c[2],h=[];if(null===(h=/^([a-z_][a-z_\d]*)/i.exec(g)))throw"[sprintf] huh?";for(f.push(h[1]);""!==(g=g.substring(h[0].length));)if(null!==(h=/^\.([a-z_][a-z_\d]*)/i.exec(g)))f.push(h[1]);else{if(null===(h=/^\[(\d+)\]/.exec(g)))throw"[sprintf] huh?";f.push(h[1])}c[2]=f}else e|=2;if(3===e)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";d.push(c)}b=b.substring(c[0].length)}return d},c}(),_=function(a,b){return b.unshift(a),$.apply(null,b)};Z("sprintf",function(a,b,c){return c.sprintf?"[object Array]"===Object.prototype.toString.apply(c.sprintf)?_(a,c.sprintf):"object"==typeof c.sprintf?$(a,c.sprintf):a:a}),J.init=g,J.setLng=r,J.preload=h,J.addResourceBundle=i,J.hasResourceBundle=j,J.getResourceBundle=k,J.addResource=m,J.addResources=n,J.removeResourceBundle=l,J.loadNamespace=p,J.loadNamespaces=q,J.setDefaultNamespace=o,J.t=B,J.translate=B,J.exists=A,J.detectLanguage=U.detectLanguage,J.pluralExtensions=X,J.sync=O,J.functions=U,J.lng=s,J.addPostProcessor=Z,J.applyReplacement=U.applyReplacement,J.options=Q}("undefined"==typeof exports?window:exports);;
-(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.gpxParse = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;oe;e++)c=a[e],d=new k(c.$.lat,c.$.lon,c.ele,c.time),b.push(d);return b},q=function(a){var b=[],c=null;if(null!==a&&void 0!==a)for(var d=0,e=a.length;e>d;d++){for(var f=[],g=a[d],h=0,i=g.rtept.length;i>h;h++)f.push(new k(g.rtept[h].$.lat,g.rtept[h].$.lon));c=new n(a.name,a.cmt,a.desc,f),b.push(c)}return b},r=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=[],f=a[c],g=null;f.name&&(g=f.name[0]);for(var h=0,i=f.trkseg.length;i>h;h++){for(var j,m=[],n=f.trkseg[h],o=0,p=n.trkpt.length;p>o;o++){var q=n.trkpt[o],r=q.ele;j=q.hasOwnProperty("time")?q.time:null,m.push(new k(q.$.lat,q.$.lon,r,j))}e.push(m)}b.push(new l(e,g))}return b},s=function(a){var b=null,c=null;return b=new j,c=new m(a.$.creator,a.time,b),new i(c,p(a.wpt),q(a.rte),r(a.trk))},t=function(a){var b,c;return a.metadata&&a.metadata[0]?(a.metadata[0].time&&(c=a.metadata[0].time[0]),b=new m(a.$.creator,c)):b=new m,new i(b,p(a.wpt),q(a.rte),r(a.trk))};c.parseGpx=function(b,c){var d=a("xml2js").parseString,e=null,f=null;d(b,function(a,b){if(a)return void c(a,null);try{if(!b.hasOwnProperty("gpx")||!b.gpx.hasOwnProperty("$"))return c(new Error("version not specified"),null);if(f=b.gpx.$.version,"1.0"===f)e=s(b.gpx);else{if("1.1"!==f)return void c(new Error("version not supported"),null);e=t(b.gpx)}c(null,e)}catch(a){return c(a)}})},c.parseGpxFromFile=function(a,b){e.readFile(a,function(a,d){return a?(console.log("error"),void b(a,null)):void c.parseGpx(d,b)})},c.parseRemoteGpxFile=function(a,b){function e(a){return b(new Error("failed to fetch gpx file: "+a.toString()))}function i(a){var d="";a.on("data",function(a){d+=a}),a.once("end",function(){c.parseGpx(d,b)})}d.equal(typeof a,"string","uri should be a string"),d.equal(typeof b,"function","callback should be a function"),("https:"===f.parse(a).protocol?h:g).get(a,i).once("error",e)},c.GpxResult=i,c.GpxExtent=j,c.GpxWaypoint=k,c.GpxTrack=l,c.GpxMetaData=m,c.GpxRoute=n,c.utils=o},{"./geomUtils":2,"./gpxExtent":4,"./gpxMetaData":5,"./gpxResult":6,"./gpxRoute":7,"./gpxTrack":8,"./gpxWaypoint":9,assert:11,fs:10,http:40,https:18,url:50,xml2js:56}],4:[function(a,b){function c(a,b,c,d){a=a||-1,b=b||-1,c=c||-1,d=d||-1,this.__defineGetter__("minx",function(){return a}),this.__defineGetter__("miny",function(){return b}),this.__defineGetter__("maxx",function(){return c}),this.__defineGetter__("maxy",function(){return d})}b.exports=c},{}],5:[function(a,b){function c(a,b,c,d,e,f,g,h,i){a=a||null,b=new Date(b)||null,c=c||null,d=d||"",e=e||"",this.__defineGetter__("creator",function(){return a}),this.__defineGetter__("time",function(){return b}),this.__defineGetter__("bounds",function(){return c}),this.__defineGetter__("name",function(){return d}),this.__defineGetter__("description",function(){return e}),this.__defineGetter__("author",function(){return f}),this.__defineGetter__("copyright",function(){return g}),this.__defineGetter__("links",function(){return h}),this.__defineGetter__("keywords",function(){return i})}b.exports=c},{}],6:[function(a,b){function c(a,b,c,d){a=a||null,b=b||null,c=c||null,d=d||null,this.__defineGetter__("metadata",function(){return a}),this.__defineGetter__("waypoints",function(){return b}),this.__defineGetter__("routes",function(){return c}),this.__defineGetter__("tracks",function(){return d})}b.exports=c},{}],7:[function(a,b){function c(a,b,c,e){a=a||"",c=c||"",b=b||"",e=e||[],this.__defineGetter__("name",function(){return a}),this.__defineGetter__("cmt",function(){return b}),this.__defineGetter__("description",function(){return c}),this.__defineGetter__("points",function(){return e}),this.point=function(a){return e[a]},this.length=function(){for(var a=0,b=0,c=e.length-1;c>b;b++)a+=d.calculateDistance(e[b].lat,e[b].lon,e[b+1].lat,e[b+1].lon);return a}}var d=a("./geomUtils");b.exports=c},{"./geomUtils":2}],8:[function(a,b){function c(a,b){a=a||[],b=b||"",this.__defineGetter__("name",function(){return b}),this.__defineGetter__("segments",function(){return a}),this.segment=function(b){return a[b]},this.length=function(){for(var b=0,c=null,e=0,f=a.length;f>e;e++)if(c=a[e],c.length>1)for(var g=0,h=c.length-1;h>g;g++)b+=d.calculateDistance(c[g].lat,c[g].lon,c[g+1].lat,c[g+1].lon);return b}}var d=a("./geomUtils");b.exports=c},{"./geomUtils":2}],9:[function(a,b){function c(a,b,c,d,e,f,g,h,i,j,k,l,m){a=parseFloat(a)||-1,b=parseFloat(b)||-1,c=c||-1,d=new Date(d)||null,g=g||"",h=h||"",i=i||"",j=j||"",m=m||"",this.__defineGetter__("name",function(){return g}),this.__defineGetter__("cmt",function(){return h}),this.__defineGetter__("desc",function(){return i}),this.__defineGetter__("src",function(){return j}),this.__defineGetter__("type",function(){return m}),this.__defineGetter__("lat",function(){return a}),this.__defineGetter__("lon",function(){return b}),this.__defineGetter__("elevation",function(){return c}),this.__defineGetter__("time",function(){return d})}b.exports=c},{}],10:[function(){},{}],11:[function(a,b){function c(a,b){return m.isUndefined(b)?""+b:m.isNumber(b)&&!isFinite(b)?b.toString():m.isFunction(b)||m.isRegExp(b)?b.toString():b}function d(a,b){return m.isString(a)?a.length=0;f--)if(g[f]!=j[f])return!1;for(f=g.length-1;f>=0;f--)if(e=g[f],!h(a[e],b[e]))return!1;return!0}function k(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b?!0:b.call({},a)===!0?!0:!1:!1}function l(a,b,c,d){var e;m.isString(c)&&(d=c,c=null);try{b()}catch(g){e=g}if(d=(c&&c.name?" ("+c.name+").":".")+(d?" "+d:"."),a&&!e&&f(e,c,"Missing expected exception"+d),!a&&k(e,c)&&f(e,c,"Got unwanted exception"+d),a&&e&&c&&!k(e,c)||!a&&e)throw e}var m=a("util/"),n=Array.prototype.slice,o=Object.prototype.hasOwnProperty,p=b.exports=g;p.AssertionError=function(a){this.name="AssertionError",this.actual=a.actual,this.expected=a.expected,this.operator=a.operator,a.message?(this.message=a.message,this.generatedMessage=!1):(this.message=e(this),this.generatedMessage=!0);var b=a.stackStartFunction||f;if(Error.captureStackTrace)Error.captureStackTrace(this,b);else{var c=new Error;if(c.stack){var d=c.stack,g=b.name,h=d.indexOf("\n"+g);if(h>=0){var i=d.indexOf("\n",h+1);d=d.substring(i+1)}this.stack=d}}},m.inherits(p.AssertionError,Error),p.fail=f,p.ok=g,p.equal=function(a,b,c){a!=b&&f(a,b,c,"==",p.equal)},p.notEqual=function(a,b,c){a==b&&f(a,b,c,"!=",p.notEqual)},p.deepEqual=function(a,b,c){h(a,b)||f(a,b,c,"deepEqual",p.deepEqual)},p.notDeepEqual=function(a,b,c){h(a,b)&&f(a,b,c,"notDeepEqual",p.notDeepEqual)},p.strictEqual=function(a,b,c){a!==b&&f(a,b,c,"===",p.strictEqual)},p.notStrictEqual=function(a,b,c){a===b&&f(a,b,c,"!==",p.notStrictEqual)},p["throws"]=function(){l.apply(this,[!0].concat(n.call(arguments)))},p.doesNotThrow=function(){l.apply(this,[!1].concat(n.call(arguments)))},p.ifError=function(a){if(a)throw a};var q=Object.keys||function(a){var b=[];for(var c in a)o.call(a,c)&&b.push(c);return b}},{"util/":52}],12:[function(a,b,c){arguments[4][10][0].apply(c,arguments)},{dup:10}],13:[function(a,b,c){function d(){return e.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function e(a){return this instanceof e?(this.length=0,this.parent=void 0,"number"==typeof a?f(this,a):"string"==typeof a?g(this,a,arguments.length>1?arguments[1]:"utf8"):h(this,a)):arguments.length>1?new e(a,arguments[1]):new e(a)}function f(a,b){if(a=o(a,0>b?0:0|p(b)),!e.TYPED_ARRAY_SUPPORT)for(var c=0;b>c;c++)a[c]=0;return a}function g(a,b,c){("string"!=typeof c||""===c)&&(c="utf8");var d=0|r(b,c);return a=o(a,d),a.write(b,c),a}function h(a,b){if(e.isBuffer(b))return i(a,b);if(X(b))return j(a,b);if(null==b)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(b.buffer instanceof ArrayBuffer)return k(a,b);if(b instanceof ArrayBuffer)return l(a,b)}return b.length?m(a,b):n(a,b)}function i(a,b){var c=0|p(b.length);return a=o(a,c),b.copy(a,0,0,c),a}function j(a,b){var c=0|p(b.length);a=o(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function k(a,b){var c=0|p(b.length);a=o(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function l(a,b){return e.TYPED_ARRAY_SUPPORT?(b.byteLength,a=e._augment(new Uint8Array(b))):a=k(a,new Uint8Array(b)),a}function m(a,b){var c=0|p(b.length);a=o(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function n(a,b){var c,d=0;"Buffer"===b.type&&X(b.data)&&(c=b.data,d=0|p(c.length)),a=o(a,d);for(var e=0;d>e;e+=1)a[e]=255&c[e];return a}function o(a,b){e.TYPED_ARRAY_SUPPORT?a=e._augment(new Uint8Array(b)):(a.length=b,a._isBuffer=!0);var c=0!==b&&b<=e.poolSize>>>1;return c&&(a.parent=Y),a}function p(a){if(a>=d())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d().toString(16)+" bytes");return 0|a}function q(a,b){if(!(this instanceof q))return new q(a,b);var c=new e(a,b);return delete c.parent,c}function r(a,b){"string"!=typeof a&&(a=""+a);var c=a.length;if(0===c)return 0;for(var d=!1;;)switch(b){case"ascii":case"binary":case"raw":case"raws":return c;case"utf8":case"utf-8":return P(a).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*c;case"hex":return c>>>1;case"base64":return S(a).length;default:if(d)return P(a).length;b=(""+b).toLowerCase(),d=!0}}function s(a,b,c){var d=!1;if(b=0|b,c=void 0===c||c===1/0?this.length:0|c,a||(a="utf8"),0>b&&(b=0),c>this.length&&(c=this.length),b>=c)return"";for(;;)switch(a){case"hex":return D(this,b,c);case"utf8":case"utf-8":return A(this,b,c);case"ascii":return B(this,b,c);case"binary":return C(this,b,c);case"base64":return z(this,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,b,c);default:if(d)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),d=!0}}function t(a,b,c,d){c=Number(c)||0;var e=a.length-c;d?(d=Number(d),d>e&&(d=e)):d=e;var f=b.length;if(f%2!==0)throw new Error("Invalid hex string");d>f/2&&(d=f/2);for(var g=0;d>g;g++){var h=parseInt(b.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");a[c+g]=h}return g}function u(a,b,c,d){return T(P(b,a.length-c),a,c,d)}function v(a,b,c,d){return T(Q(b),a,c,d)}function w(a,b,c,d){return v(a,b,c,d)}function x(a,b,c,d){return T(S(b),a,c,d)}function y(a,b,c,d){return T(R(b,a.length-c),a,c,d)}function z(a,b,c){return V.fromByteArray(0===b&&c===a.length?a:a.slice(b,c))}function A(a,b,c){var d="",e="";c=Math.min(a.length,c);for(var f=b;c>f;f++)a[f]<=127?(d+=U(e)+String.fromCharCode(a[f]),e=""):e+="%"+a[f].toString(16);return d+U(e)}function B(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(127&a[e]);return d}function C(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(a[e]);return d}function D(a,b,c){var d=a.length;(!b||0>b)&&(b=0),(!c||0>c||c>d)&&(c=d);for(var e="",f=b;c>f;f++)e+=O(a[f]);return e}function E(a,b,c){for(var d=a.slice(b,c),e="",f=0;fa)throw new RangeError("offset is not uint");if(a+b>c)throw new RangeError("Trying to access beyond buffer length")}function G(a,b,c,d,f,g){if(!e.isBuffer(a))throw new TypeError("buffer must be a Buffer instance");if(b>f||g>b)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range")}function H(a,b,c,d){0>b&&(b=65535+b+1);for(var e=0,f=Math.min(a.length-c,2);f>e;e++)a[c+e]=(b&255<<8*(d?e:1-e))>>>8*(d?e:1-e)}function I(a,b,c,d){0>b&&(b=4294967295+b+1);for(var e=0,f=Math.min(a.length-c,4);f>e;e++)a[c+e]=b>>>8*(d?e:3-e)&255}function J(a,b,c,d,e,f){if(b>e||f>b)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range");if(0>c)throw new RangeError("index out of range")}function K(a,b,c,d,e){return e||J(a,b,c,4,3.4028234663852886e38,-3.4028234663852886e38),W.write(a,b,c,d,23,4),c+4}function L(a,b,c,d,e){return e||J(a,b,c,8,1.7976931348623157e308,-1.7976931348623157e308),W.write(a,b,c,d,52,8),c+8}function M(a){if(a=N(a).replace($,""),a.length<2)return"";for(;a.length%4!==0;)a+="=";return a}function N(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function O(a){return 16>a?"0"+a.toString(16):a.toString(16)}function P(a,b){b=b||1/0;for(var c,d=a.length,e=null,f=[],g=0;d>g;g++){if(c=a.charCodeAt(g),c>55295&&57344>c){if(!e){if(c>56319){(b-=3)>-1&&f.push(239,191,189);continue}if(g+1===d){(b-=3)>-1&&f.push(239,191,189);continue}e=c;continue}if(56320>c){(b-=3)>-1&&f.push(239,191,189),e=c;continue}c=e-55296<<10|c-56320|65536,e=null}else e&&((b-=3)>-1&&f.push(239,191,189),e=null);if(128>c){if((b-=1)<0)break;f.push(c)}else if(2048>c){if((b-=2)<0)break;f.push(c>>6|192,63&c|128)}else if(65536>c){if((b-=3)<0)break;f.push(c>>12|224,c>>6&63|128,63&c|128)}else{if(!(2097152>c))throw new Error("Invalid code point");if((b-=4)<0)break;f.push(c>>18|240,c>>12&63|128,c>>6&63|128,63&c|128)}}return f}function Q(a){for(var b=[],c=0;c>8,e=c%256,f.push(e),f.push(d);return f}function S(a){return V.toByteArray(M(a))}function T(a,b,c,d){for(var e=0;d>e&&!(e+c>=b.length||e>=a.length);e++)b[e+c]=a[e];return e}function U(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}var V=a("base64-js"),W=a("ieee754"),X=a("is-array");c.Buffer=e,c.SlowBuffer=q,c.INSPECT_MAX_BYTES=50,e.poolSize=8192;var Y={};e.TYPED_ARRAY_SUPPORT=function(){function a(){}try{var b=new Uint8Array(1);return b.foo=function(){return 42},b.constructor=a,42===b.foo()&&b.constructor===a&&"function"==typeof b.subarray&&0===b.subarray(1,1).byteLength}catch(c){return!1}}(),e.isBuffer=function(a){return!(null==a||!a._isBuffer)},e.compare=function(a,b){if(!e.isBuffer(a)||!e.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var c=a.length,d=b.length,f=0,g=Math.min(c,d);g>f&&a[f]===b[f];)++f;return f!==g&&(c=a[f],d=b[f]),d>c?-1:c>d?1:0},e.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(a,b){if(!X(a))throw new TypeError("list argument must be an Array of Buffers.");if(0===a.length)return new e(0);var c;if(void 0===b)for(b=0,c=0;c0&&(a=this.toString("hex",0,b).match(/.{2}/g).join(" "),this.length>b&&(a+=" ... ")),""},e.prototype.compare=function(a){if(!e.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?0:e.compare(this,a)},e.prototype.indexOf=function(a,b){function c(a,b,c){for(var d=-1,e=0;c+e2147483647?b=2147483647:-2147483648>b&&(b=-2147483648),b>>=0,0===this.length)return-1;if(b>=this.length)return-1;if(0>b&&(b=Math.max(this.length+b,0)),"string"==typeof a)return 0===a.length?-1:String.prototype.indexOf.call(this,a,b);if(e.isBuffer(a))return c(this,a,b);if("number"==typeof a)return e.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,a,b):c(this,[a],b);throw new TypeError("val must be string, number or Buffer")},e.prototype.get=function(a){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(a)},e.prototype.set=function(a,b){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(a,b)},e.prototype.write=function(a,b,c,d){if(void 0===b)d="utf8",c=this.length,b=0;else if(void 0===c&&"string"==typeof b)d=b,c=this.length,b=0;else if(isFinite(b))b=0|b,isFinite(c)?(c=0|c,void 0===d&&(d="utf8")):(d=c,c=void 0);else{var e=d;d=b,b=0|c,c=e}var f=this.length-b;if((void 0===c||c>f)&&(c=f),a.length>0&&(0>c||0>b)||b>this.length)throw new RangeError("attempt to write outside buffer bounds");d||(d="utf8");for(var g=!1;;)switch(d){case"hex":return t(this,a,b,c);case"utf8":case"utf-8":return u(this,a,b,c);case"ascii":return v(this,a,b,c);case"binary":return w(this,a,b,c);case"base64":return x(this,a,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y(this,a,b,c);default:if(g)throw new TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase(),g=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},e.prototype.slice=function(a,b){var c=this.length;a=~~a,b=void 0===b?c:~~b,0>a?(a+=c,0>a&&(a=0)):a>c&&(a=c),0>b?(b+=c,0>b&&(b=0)):b>c&&(b=c),a>b&&(b=a);var d;if(e.TYPED_ARRAY_SUPPORT)d=e._augment(this.subarray(a,b));else{var f=b-a;d=new e(f,void 0);for(var g=0;f>g;g++)d[g]=this[g+a]}return d.length&&(d.parent=this.parent||this),d},e.prototype.readUIntLE=function(a,b,c){a=0|a,b=0|b,c||F(a,b,this.length);for(var d=this[a],e=1,f=0;++f0&&(e*=256);)d+=this[a+--b]*e;return d},e.prototype.readUInt8=function(a,b){return b||F(a,1,this.length),this[a]},e.prototype.readUInt16LE=function(a,b){return b||F(a,2,this.length),this[a]|this[a+1]<<8},e.prototype.readUInt16BE=function(a,b){return b||F(a,2,this.length),this[a]<<8|this[a+1]},e.prototype.readUInt32LE=function(a,b){return b||F(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]},e.prototype.readUInt32BE=function(a,b){return b||F(a,4,this.length),16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])},e.prototype.readIntLE=function(a,b,c){a=0|a,b=0|b,c||F(a,b,this.length);for(var d=this[a],e=1,f=0;++f=e&&(d-=Math.pow(2,8*b)),d},e.prototype.readIntBE=function(a,b,c){a=0|a,b=0|b,c||F(a,b,this.length);for(var d=b,e=1,f=this[a+--d];d>0&&(e*=256);)f+=this[a+--d]*e;return e*=128,f>=e&&(f-=Math.pow(2,8*b)),f},e.prototype.readInt8=function(a,b){return b||F(a,1,this.length),128&this[a]?-1*(255-this[a]+1):this[a]},e.prototype.readInt16LE=function(a,b){b||F(a,2,this.length);var c=this[a]|this[a+1]<<8;return 32768&c?4294901760|c:c},e.prototype.readInt16BE=function(a,b){b||F(a,2,this.length);var c=this[a+1]|this[a]<<8;return 32768&c?4294901760|c:c},e.prototype.readInt32LE=function(a,b){return b||F(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},e.prototype.readInt32BE=function(a,b){return b||F(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},e.prototype.readFloatLE=function(a,b){return b||F(a,4,this.length),W.read(this,a,!0,23,4)},e.prototype.readFloatBE=function(a,b){return b||F(a,4,this.length),W.read(this,a,!1,23,4)},e.prototype.readDoubleLE=function(a,b){return b||F(a,8,this.length),W.read(this,a,!0,52,8)},e.prototype.readDoubleBE=function(a,b){return b||F(a,8,this.length),W.read(this,a,!1,52,8)},e.prototype.writeUIntLE=function(a,b,c,d){a=+a,b=0|b,c=0|c,d||G(this,a,b,c,Math.pow(2,8*c),0);var e=1,f=0;for(this[b]=255&a;++f=0&&(f*=256);)this[b+e]=a/f&255;return b+c},e.prototype.writeUInt8=function(a,b,c){return a=+a,b=0|b,c||G(this,a,b,1,255,0),e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),this[b]=a,b+1},e.prototype.writeUInt16LE=function(a,b,c){return a=+a,b=0|b,c||G(this,a,b,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):H(this,a,b,!0),b+2},e.prototype.writeUInt16BE=function(a,b,c){return a=+a,b=0|b,c||G(this,a,b,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):H(this,a,b,!1),b+2},e.prototype.writeUInt32LE=function(a,b,c){return a=+a,b=0|b,c||G(this,a,b,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=a):I(this,a,b,!0),b+4},e.prototype.writeUInt32BE=function(a,b,c){return a=+a,b=0|b,c||G(this,a,b,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a):I(this,a,b,!1),b+4},e.prototype.writeIntLE=function(a,b,c,d){if(a=+a,b=0|b,!d){var e=Math.pow(2,8*c-1);G(this,a,b,c,e-1,-e)}var f=0,g=1,h=0>a?1:0;for(this[b]=255&a;++f>0)-h&255;return b+c},e.prototype.writeIntBE=function(a,b,c,d){if(a=+a,b=0|b,!d){var e=Math.pow(2,8*c-1);G(this,a,b,c,e-1,-e)}var f=c-1,g=1,h=0>a?1:0;for(this[b+f]=255&a;--f>=0&&(g*=256);)this[b+f]=(a/g>>0)-h&255;return b+c},e.prototype.writeInt8=function(a,b,c){return a=+a,b=0|b,c||G(this,a,b,1,127,-128),e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),0>a&&(a=255+a+1),this[b]=a,b+1},e.prototype.writeInt16LE=function(a,b,c){return a=+a,b=0|b,c||G(this,a,b,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):H(this,a,b,!0),b+2},e.prototype.writeInt16BE=function(a,b,c){return a=+a,b=0|b,c||G(this,a,b,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):H(this,a,b,!1),b+2},e.prototype.writeInt32LE=function(a,b,c){return a=+a,b=0|b,c||G(this,a,b,4,2147483647,-2147483648),e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):I(this,a,b,!0),b+4},e.prototype.writeInt32BE=function(a,b,c){return a=+a,b=0|b,c||G(this,a,b,4,2147483647,-2147483648),0>a&&(a=4294967295+a+1),e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a):I(this,a,b,!1),b+4},e.prototype.writeFloatLE=function(a,b,c){return K(this,a,b,!0,c)},e.prototype.writeFloatBE=function(a,b,c){return K(this,a,b,!1,c)},e.prototype.writeDoubleLE=function(a,b,c){return L(this,a,b,!0,c)},e.prototype.writeDoubleBE=function(a,b,c){return L(this,a,b,!1,c)},e.prototype.copy=function(a,b,c,d){if(c||(c=0),d||0===d||(d=this.length),b>=a.length&&(b=a.length),b||(b=0),d>0&&c>d&&(d=c),d===c)return 0;if(0===a.length||0===this.length)return 0;if(0>b)throw new RangeError("targetStart out of bounds");if(0>c||c>=this.length)throw new RangeError("sourceStart out of bounds");if(0>d)throw new RangeError("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-bc&&d>b)for(f=g-1;f>=0;f--)a[f+b]=this[f+c];else if(1e3>g||!e.TYPED_ARRAY_SUPPORT)for(f=0;g>f;f++)a[f+b]=this[f+c];else a._set(this.subarray(c,c+g),b);return g},e.prototype.fill=function(a,b,c){if(a||(a=0),b||(b=0),c||(c=this.length),b>c)throw new RangeError("end < start");if(c!==b&&0!==this.length){if(0>b||b>=this.length)throw new RangeError("start out of bounds");if(0>c||c>this.length)throw new RangeError("end out of bounds");var d;if("number"==typeof a)for(d=b;c>d;d++)this[d]=a;else{var e=P(a.toString()),f=e.length;for(d=b;c>d;d++)this[d]=e[d%f]}return this}},e.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(e.TYPED_ARRAY_SUPPORT)return new e(this).buffer;for(var a=new Uint8Array(this.length),b=0,c=a.length;c>b;b+=1)a[b]=this[b];return a.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var Z=e.prototype;e._augment=function(a){return a.constructor=e,a._isBuffer=!0,a._set=a.set,a.get=Z.get,a.set=Z.set,a.write=Z.write,a.toString=Z.toString,a.toLocaleString=Z.toString,a.toJSON=Z.toJSON,a.equals=Z.equals,a.compare=Z.compare,a.indexOf=Z.indexOf,a.copy=Z.copy,a.slice=Z.slice,a.readUIntLE=Z.readUIntLE,a.readUIntBE=Z.readUIntBE,a.readUInt8=Z.readUInt8,a.readUInt16LE=Z.readUInt16LE,a.readUInt16BE=Z.readUInt16BE,a.readUInt32LE=Z.readUInt32LE,a.readUInt32BE=Z.readUInt32BE,a.readIntLE=Z.readIntLE,a.readIntBE=Z.readIntBE,a.readInt8=Z.readInt8,a.readInt16LE=Z.readInt16LE,a.readInt16BE=Z.readInt16BE,a.readInt32LE=Z.readInt32LE,a.readInt32BE=Z.readInt32BE,a.readFloatLE=Z.readFloatLE,a.readFloatBE=Z.readFloatBE,a.readDoubleLE=Z.readDoubleLE,a.readDoubleBE=Z.readDoubleBE,a.writeUInt8=Z.writeUInt8,a.writeUIntLE=Z.writeUIntLE,a.writeUIntBE=Z.writeUIntBE,a.writeUInt16LE=Z.writeUInt16LE,a.writeUInt16BE=Z.writeUInt16BE,a.writeUInt32LE=Z.writeUInt32LE,a.writeUInt32BE=Z.writeUInt32BE,a.writeIntLE=Z.writeIntLE,a.writeIntBE=Z.writeIntBE,a.writeInt8=Z.writeInt8,a.writeInt16LE=Z.writeInt16LE,a.writeInt16BE=Z.writeInt16BE,a.writeInt32LE=Z.writeInt32LE,a.writeInt32BE=Z.writeInt32BE,a.writeFloatLE=Z.writeFloatLE,a.writeFloatBE=Z.writeFloatBE,a.writeDoubleLE=Z.writeDoubleLE,a.writeDoubleBE=Z.writeDoubleBE,a.fill=Z.fill,a.inspect=Z.inspect,a.toArrayBuffer=Z.toArrayBuffer,a};var $=/[^+\/0-9A-Za-z-_]/g},{"base64-js":14,ieee754:15,"is-array":16}],14:[function(a,b,c){var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(a){"use strict";function b(a){var b=a.charCodeAt(0);return b===g||b===l?62:b===h||b===m?63:i>b?-1:i+10>b?b-i+26+26:k+26>b?b-k:j+26>b?b-j+26:void 0}function c(a){function c(a){j[l++]=a}var d,e,g,h,i,j;if(a.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=a.length;i="="===a.charAt(k-2)?2:"="===a.charAt(k-1)?1:0,j=new f(3*a.length/4-i),g=i>0?a.length-4:a.length;var l=0;for(d=0,e=0;g>d;d+=4,e+=3)h=b(a.charAt(d))<<18|b(a.charAt(d+1))<<12|b(a.charAt(d+2))<<6|b(a.charAt(d+3)),c((16711680&h)>>16),c((65280&h)>>8),c(255&h);return 2===i?(h=b(a.charAt(d))<<2|b(a.charAt(d+1))>>4,c(255&h)):1===i&&(h=b(a.charAt(d))<<10|b(a.charAt(d+1))<<4|b(a.charAt(d+2))>>2,c(h>>8&255),c(255&h)),j}function e(a){function b(a){return d.charAt(a)}function c(a){return b(a>>18&63)+b(a>>12&63)+b(a>>6&63)+b(63&a)}var e,f,g,h=a.length%3,i="";for(e=0,g=a.length-h;g>e;e+=3)f=(a[e]<<16)+(a[e+1]<<8)+a[e+2],i+=c(f);switch(h){case 1:f=a[a.length-1],i+=b(f>>2),i+=b(f<<4&63),i+="==";break;case 2:f=(a[a.length-2]<<8)+a[a.length-1],i+=b(f>>10),i+=b(f>>4&63),i+=b(f<<2&63),i+="="}return i}var f="undefined"!=typeof Uint8Array?Uint8Array:Array,g="+".charCodeAt(0),h="/".charCodeAt(0),i="0".charCodeAt(0),j="a".charCodeAt(0),k="A".charCodeAt(0),l="-".charCodeAt(0),m="_".charCodeAt(0);a.toByteArray=c,a.fromByteArray=e}("undefined"==typeof c?this.base64js={}:c)},{}],15:[function(a,b,c){c.read=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<>1,k=-7,l=c?e-1:0,m=c?-1:1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?0/0:(n?-1:1)*(1/0);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.write=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?0:f-1,o=d?1:-1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],16:[function(a,b){var c=Array.isArray,d=Object.prototype.toString;b.exports=c||function(a){return!!a&&"[object Array]"==d.call(a)}},{}],17:[function(a,b){function c(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function d(a){return"function"==typeof a}function e(a){return"number"==typeof a}function f(a){return"object"==typeof a&&null!==a}function g(a){return void 0===a}b.exports=c,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._maxListeners=void 0,c.defaultMaxListeners=10,c.prototype.setMaxListeners=function(a){if(!e(a)||0>a||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},c.prototype.emit=function(a){var b,c,e,h,i,j;if(this._events||(this._events={}),"error"===a&&(!this._events.error||f(this._events.error)&&!this._events.error.length)){if(b=arguments[1],b instanceof Error)throw b;throw TypeError('Uncaught, unspecified "error" event.')}if(c=this._events[a],g(c))return!1;if(d(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(e=arguments.length,h=new Array(e-1),i=1;e>i;i++)h[i-1]=arguments[i];c.apply(this,h)}else if(f(c)){for(e=arguments.length,h=new Array(e-1),i=1;e>i;i++)h[i-1]=arguments[i];for(j=c.slice(),e=j.length,i=0;e>i;i++)j[i].apply(this,h)}return!0},c.prototype.addListener=function(a,b){var e;if(!d(b))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,d(b.listener)?b.listener:b),this._events[a]?f(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,f(this._events[a])&&!this._events[a].warned){var e;e=g(this._maxListeners)?c.defaultMaxListeners:this._maxListeners,e&&e>0&&this._events[a].length>e&&(this._events[a].warned=!0,
+console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),"function"==typeof console.trace&&console.trace())}return this},c.prototype.on=c.prototype.addListener,c.prototype.once=function(a,b){function c(){this.removeListener(a,c),e||(e=!0,b.apply(this,arguments))}if(!d(b))throw TypeError("listener must be a function");var e=!1;return c.listener=b,this.on(a,c),this},c.prototype.removeListener=function(a,b){var c,e,g,h;if(!d(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],g=c.length,e=-1,c===b||d(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(f(c)){for(h=g;h-->0;)if(c[h]===b||c[h].listener&&c[h].listener===b){e=h;break}if(0>e)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(e,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},c.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],d(c))this.removeListener(a,c);else for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},c.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?d(this._events[a])?[this._events[a]]:this._events[a].slice():[]},c.listenerCount=function(a,b){var c;return c=a._events&&a._events[b]?d(a._events[b])?1:a._events[b].length:0}},{}],18:[function(a,b){var c=a("http"),d=b.exports;for(var e in c)c.hasOwnProperty(e)&&(d[e]=c[e]);d.request=function(a,b){return a||(a={}),a.scheme="https",c.request.call(this,a,b)}},{http:40}],19:[function(a,b){b.exports="function"==typeof Object.create?function(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:function(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}},{}],20:[function(a,b){b.exports=Array.isArray||function(a){return"[object Array]"==Object.prototype.toString.call(a)}},{}],21:[function(a,b){function c(){j=!1,g.length?i=g.concat(i):k=-1,i.length&&d()}function d(){if(!j){var a=setTimeout(c);j=!0;for(var b=i.length;b;){for(g=i,i=[];++k1)for(var c=1;c1&&(d=c[0]+"@",a=c[1]),a=a.replace(H,".");var e=a.split("."),f=g(e,b).join(".");return d+f}function i(a){for(var b,c,d=[],e=0,f=a.length;f>e;)b=a.charCodeAt(e++),b>=55296&&56319>=b&&f>e?(c=a.charCodeAt(e++),56320==(64512&c)?d.push(((1023&b)<<10)+(1023&c)+65536):(d.push(b),e--)):d.push(b);return d}function j(a){return g(a,function(a){var b="";return a>65535&&(a-=65536,b+=L(a>>>10&1023|55296),a=56320|1023&a),b+=L(a)}).join("")}function k(a){return 10>a-48?a-22:26>a-65?a-65:26>a-97?a-97:x}function l(a,b){return a+22+75*(26>a)-((0!=b)<<5)}function m(a,b,c){var d=0;for(a=c?K(a/B):a>>1,a+=K(a/b);a>J*z>>1;d+=x)a=K(a/J);return K(d+(J+1)*a/(a+A))}function n(a){var b,c,d,e,g,h,i,l,n,o,p=[],q=a.length,r=0,s=D,t=C;for(c=a.lastIndexOf(E),0>c&&(c=0),d=0;c>d;++d)a.charCodeAt(d)>=128&&f("not-basic"),p.push(a.charCodeAt(d));for(e=c>0?c+1:0;q>e;){for(g=r,h=1,i=x;e>=q&&f("invalid-input"),l=k(a.charCodeAt(e++)),(l>=x||l>K((w-r)/h))&&f("overflow"),r+=l*h,n=t>=i?y:i>=t+z?z:i-t,!(n>l);i+=x)o=x-n,h>K(w/o)&&f("overflow"),h*=o;b=p.length+1,t=m(r-g,b,0==g),K(r/b)>w-s&&f("overflow"),s+=K(r/b),r%=b,p.splice(r++,0,s)}return j(p)}function o(a){var b,c,d,e,g,h,j,k,n,o,p,q,r,s,t,u=[];for(a=i(a),q=a.length,b=D,c=0,g=C,h=0;q>h;++h)p=a[h],128>p&&u.push(L(p));for(d=e=u.length,e&&u.push(E);q>d;){for(j=w,h=0;q>h;++h)p=a[h],p>=b&&j>p&&(j=p);for(r=d+1,j-b>K((w-c)/r)&&f("overflow"),c+=(j-b)*r,b=j,h=0;q>h;++h)if(p=a[h],b>p&&++c>w&&f("overflow"),p==b){for(k=c,n=x;o=g>=n?y:n>=g+z?z:n-g,!(o>k);n+=x)t=k-o,s=x-o,u.push(L(l(o+t%s,0))),k=K(t/s);u.push(L(l(k,0))),g=m(c,r,d==e),c=0,++d}++c,++b}return u.join("")}function p(a){return h(a,function(a){return F.test(a)?n(a.slice(4).toLowerCase()):a})}function q(a){return h(a,function(a){return G.test(a)?"xn--"+o(a):a})}var r="object"==typeof d&&d&&!d.nodeType&&d,s="object"==typeof c&&c&&!c.nodeType&&c,t="object"==typeof b&&b;(t.global===t||t.window===t||t.self===t)&&(e=t);var u,v,w=2147483647,x=36,y=1,z=26,A=38,B=700,C=72,D=128,E="-",F=/^xn--/,G=/[^\x20-\x7E]/,H=/[\x2E\u3002\uFF0E\uFF61]/g,I={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},J=x-y,K=Math.floor,L=String.fromCharCode;if(u={version:"1.3.2",ucs2:{decode:i,encode:j},decode:n,encode:o,toASCII:q,toUnicode:p},"function"==typeof a&&"object"==typeof a.amd&&a.amd)a("punycode",function(){return u});else if(r&&s)if(c.exports==r)s.exports=u;else for(v in u)u.hasOwnProperty(v)&&(r[v]=u[v]);else e.punycode=u}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],23:[function(a,b){"use strict";function c(a,b){return Object.prototype.hasOwnProperty.call(a,b)}b.exports=function(a,b,e,f){b=b||"&",e=e||"=";var g={};if("string"!=typeof a||0===a.length)return g;var h=/\+/g;a=a.split(b);var i=1e3;f&&"number"==typeof f.maxKeys&&(i=f.maxKeys);var j=a.length;i>0&&j>i&&(j=i);for(var k=0;j>k;++k){var l,m,n,o,p=a[k].replace(h,"%20"),q=p.indexOf(e);q>=0?(l=p.substr(0,q),m=p.substr(q+1)):(l=p,m=""),n=decodeURIComponent(l),o=decodeURIComponent(m),c(g,n)?d(g[n])?g[n].push(o):g[n]=[g[n],o]:g[n]=o}return g};var d=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}},{}],24:[function(a,b){"use strict";function c(a,b){if(a.map)return a.map(b);for(var c=[],d=0;d0)if(b.ended&&!e){var h=new Error("stream.push() after EOF");a.emit("error",h)}else if(b.endEmitted&&e){var h=new Error("stream.unshift() after end event");a.emit("error",h)}else!b.decoder||e||d||(c=b.decoder.write(c)),e||(b.reading=!1),b.flowing&&0===b.length&&!b.sync?(a.emit("data",c),a.read(0)):(b.length+=b.objectMode?1:c.length,e?b.buffer.unshift(c):b.buffer.push(c),b.needReadable&&l(a)),n(a,b);else e||(b.reading=!1);return g(b)}function g(a){return!a.ended&&(a.needReadable||a.length=H)a=H;else{a--;for(var b=1;32>b;b<<=1)a|=a>>b;a++}return a}function i(a,b){return 0===b.length&&b.ended?0:b.objectMode?0===a?0:1:null===a||isNaN(a)?b.flowing&&b.buffer.length?b.buffer[0].length:b.length:0>=a?0:(a>b.highWaterMark&&(b.highWaterMark=h(a)),a>b.length?b.ended?b.length:(b.needReadable=!0,0):a)}function j(a,b){var c=null;return B.isBuffer(b)||"string"==typeof b||null===b||void 0===b||a.objectMode||(c=new TypeError("Invalid non-string/buffer chunk")),c}function k(a,b){if(!b.ended){if(b.decoder){var c=b.decoder.end();c&&c.length&&(b.buffer.push(c),b.length+=b.objectMode?1:c.length)}b.ended=!0,l(a)}}function l(a){var b=a._readableState;b.needReadable=!1,b.emittedReadable||(F("emitReadable",b.flowing),b.emittedReadable=!0,b.sync?z(m,a):m(a))}function m(a){F("emit readable"),a.emit("readable"),t(a)}function n(a,b){b.readingMore||(b.readingMore=!0,z(o,a,b))}function o(a,b){for(var c=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length=e)c=f?d.join(""):B.concat(d,e),d.length=0;else if(aj&&a>i;j++){var h=d[0],l=Math.min(a-i,h.length);f?c+=h.slice(0,l):h.copy(c,i,0,l),l0)throw new Error("endReadable called on non-empty stream");b.endEmitted||(b.ended=!0,z(w,b,a))}function w(a,b){a.endEmitted||0!==a.length||(a.endEmitted=!0,b.readable=!1,b.emit("end"))}function x(a,b){for(var c=0,d=a.length;d>c;c++)b(a[c],c)}function y(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1}b.exports=e;var z=a("process-nextick-args"),A=a("isarray"),B=a("buffer").Buffer;e.ReadableState=d;var C=a("events").EventEmitter;C.listenerCount||(C.listenerCount=function(a,b){return a.listeners(b).length});var D;!function(){try{D=a("stream")}catch(b){}finally{D||(D=a("events").EventEmitter)}}();var B=a("buffer").Buffer,E=a("core-util-is");E.inherits=a("inherits");var F=a("util");F=F&&F.debuglog?F.debuglog("stream"):function(){};var G;E.inherits(e,D),e.prototype.push=function(a,b){var c=this._readableState;return c.objectMode||"string"!=typeof a||(b=b||c.defaultEncoding,b!==c.encoding&&(a=new B(a,b),b="")),f(this,c,a,b,!1)},e.prototype.unshift=function(a){var b=this._readableState;return f(this,b,a,"",!0)},e.prototype.isPaused=function(){return this._readableState.flowing===!1},e.prototype.setEncoding=function(b){return G||(G=a("string_decoder/").StringDecoder),this._readableState.decoder=new G(b),this._readableState.encoding=b,this};var H=8388608;e.prototype.read=function(a){F("read",a);var b=this._readableState,c=a;if(("number"!=typeof a||a>0)&&(b.emittedReadable=!1),0===a&&b.needReadable&&(b.length>=b.highWaterMark||b.ended))return F("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?v(this):l(this),null;if(a=i(a,b),0===a&&b.ended)return 0===b.length&&v(this),null;var d=b.needReadable;F("need readable",d),(0===b.length||b.length-a0?u(a,b):null,null===e&&(b.needReadable=!0,a=0),b.length-=a,0!==b.length||b.ended||(b.needReadable=!0),c!==a&&b.ended&&0===b.length&&v(this),null!==e&&this.emit("data",e),e},e.prototype._read=function(){this.emit("error",new Error("not implemented"))},e.prototype.pipe=function(a,b){function d(a){F("onunpipe"),a===l&&f()}function e(){F("onend"),a.end()}function f(){F("cleanup"),a.removeListener("close",i),a.removeListener("finish",j),a.removeListener("drain",q),a.removeListener("error",h),a.removeListener("unpipe",d),l.removeListener("end",e),l.removeListener("end",f),l.removeListener("data",g),!m.awaitDrain||a._writableState&&!a._writableState.needDrain||q()}function g(b){F("ondata");var c=a.write(b);!1===c&&(F("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,l.pause())}function h(b){F("onerror",b),k(),a.removeListener("error",h),0===C.listenerCount(a,"error")&&a.emit("error",b)}function i(){a.removeListener("finish",j),k()}function j(){F("onfinish"),a.removeListener("close",i),k()}function k(){F("unpipe"),l.unpipe(a)}var l=this,m=this._readableState;switch(m.pipesCount){case 0:m.pipes=a;break;case 1:m.pipes=[m.pipes,a];break;default:m.pipes.push(a)}m.pipesCount+=1,F("pipe count=%d opts=%j",m.pipesCount,b);var n=(!b||b.end!==!1)&&a!==c.stdout&&a!==c.stderr,o=n?e:f;m.endEmitted?z(o):l.once("end",o),a.on("unpipe",d);var q=p(l);return a.on("drain",q),l.on("data",g),a._events&&a._events.error?A(a._events.error)?a._events.error.unshift(h):a._events.error=[h,a._events.error]:a.on("error",h),a.once("close",i),a.once("finish",j),a.emit("pipe",l),m.flowing||(F("pipe resume"),l.resume()),a},e.prototype.unpipe=function(a){var b=this._readableState;if(0===b.pipesCount)return this;if(1===b.pipesCount)return a&&a!==b.pipes?this:(a||(a=b.pipes),b.pipes=null,b.pipesCount=0,b.flowing=!1,a&&a.emit("unpipe",this),this);if(!a){var c=b.pipes,d=b.pipesCount;b.pipes=null,b.pipesCount=0,b.flowing=!1;for(var e=0;d>e;e++)c[e].emit("unpipe",this);return this}var e=y(b.pipes,a);return-1===e?this:(b.pipes.splice(e,1),b.pipesCount-=1,1===b.pipesCount&&(b.pipes=b.pipes[0]),a.emit("unpipe",this),this)},e.prototype.on=function(a,b){var c=D.prototype.on.call(this,a,b);if("data"===a&&!1!==this._readableState.flowing&&this.resume(),"readable"===a&&this.readable){var d=this._readableState;d.readableListening||(d.readableListening=!0,d.emittedReadable=!1,d.needReadable=!0,d.reading?d.length&&l(this,d):z(q,this))}return c},e.prototype.addListener=e.prototype.on,e.prototype.resume=function(){var a=this._readableState;return a.flowing||(F("resume"),a.flowing=!0,r(this,a)),this},e.prototype.pause=function(){return F("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(F("pause"),this._readableState.flowing=!1,this.emit("pause")),this},e.prototype.wrap=function(a){var b=this._readableState,c=!1,d=this;a.on("end",function(){if(F("wrapped end"),b.decoder&&!b.ended){var a=b.decoder.end();a&&a.length&&d.push(a)}d.push(null)}),a.on("data",function(e){if(F("wrapped data"),b.decoder&&(e=b.decoder.write(e)),(!b.objectMode||null!==e&&void 0!==e)&&(b.objectMode||e&&e.length)){var f=d.push(e);f||(c=!0,a.pause())}});for(var e in a)void 0===this[e]&&"function"==typeof a[e]&&(this[e]=function(b){return function(){return a[b].apply(a,arguments)}}(e));var f=["error","close","destroy","pause","resume"];return x(f,function(b){a.on(b,d.emit.bind(d,b))}),d._read=function(b){F("wrapped _read",b),c&&(c=!1,a.resume())},d},e._fromList=u}).call(this,a("_process"))},{"./_stream_duplex":27,_process:21,buffer:13,"core-util-is":32,events:17,inherits:19,isarray:20,"process-nextick-args":33,"string_decoder/":49,util:12}],30:[function(a,b){"use strict";function c(a){this.afterTransform=function(b,c){return d(a,b,c)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function d(a,b,c){var d=a._transformState;d.transforming=!1;var e=d.writecb;if(!e)return a.emit("error",new Error("no writecb in Transform class"));d.writechunk=null,d.writecb=null,null!==c&&void 0!==c&&a.push(c),e&&e(b);var f=a._readableState;f.reading=!1,(f.needReadable||f.length-1))throw new TypeError("Unknown encoding: "+a);this._writableState.defaultEncoding=a},f.prototype._write=function(a,b,c){c(new Error("not implemented"))},f.prototype._writev=null,f.prototype.end=function(a,b,c){var d=this._writableState;"function"==typeof a?(c=a,a=null,b=null):"function"==typeof b&&(c=b,b=null),null!==a&&void 0!==a&&this.write(a,b),d.corked&&(d.corked=1,this.uncork()),d.ending||d.finished||u(this,d,c)}},{"./_stream_duplex":27,buffer:13,"core-util-is":32,events:17,inherits:19,"process-nextick-args":33,"util-deprecate":34}],32:[function(a,b,c){(function(a){function b(a){return Array.isArray(a)}function d(a){return"boolean"==typeof a}function e(a){return null===a}function f(a){return null==a}function g(a){return"number"==typeof a}function h(a){return"string"==typeof a}function i(a){return"symbol"==typeof a}function j(a){return void 0===a}function k(a){return l(a)&&"[object RegExp]"===r(a)}function l(a){return"object"==typeof a&&null!==a}function m(a){return l(a)&&"[object Date]"===r(a)}function n(a){return l(a)&&("[object Error]"===r(a)||a instanceof Error)}function o(a){return"function"==typeof a}function p(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function q(b){return a.isBuffer(b)}function r(a){return Object.prototype.toString.call(a)}c.isArray=b,c.isBoolean=d,c.isNull=e,c.isNullOrUndefined=f,c.isNumber=g,c.isString=h,c.isSymbol=i,c.isUndefined=j,c.isRegExp=k,c.isObject=l,c.isDate=m,c.isError=n,c.isFunction=o,c.isPrimitive=p,c.isBuffer=q}).call(this,a("buffer").Buffer)},{buffer:13}],33:[function(a,b){(function(a){"use strict";function c(b){for(var c=new Array(arguments.length-1),d=0;da._pos){var f=c.substr(a._pos);if("x-user-defined"===a._charset){for(var g=new d(f.length),h=0;ha._pos&&(a.push(new d(new Uint8Array(j.result.slice(a._pos)))),a._pos=j.result.byteLength)},j.onload=function(){a.push(null)},j.readAsArrayBuffer(c)}a._xhr.readyState===i.DONE&&"ms-stream"!==a._mode&&a.push(null)}}).call(this,a("_process"),a("buffer").Buffer)},{"./capability":41,_process:21,buffer:13,foreach:45,inherits:19,stream:39}],44:[function(a,b){b.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Large",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Time-out",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],45:[function(a,b){var c=Object.prototype.hasOwnProperty,d=Object.prototype.toString;b.exports=function(a,b,e){if("[object Function]"!==d.call(b))throw new TypeError("iterator must be a function");var f=a.length;if(f===+f)for(var g=0;f>g;g++)b.call(e,a[g],g,a);else for(var h in a)c.call(a,h)&&b.call(e,a[h],h,a)}},{}],46:[function(a,b){var c=[].indexOf;b.exports=function(a,b){if(c)return a.indexOf(b);for(var d=0;d0&&!c.call(a,0))for(var n=0;n0)for(var o=0;o=0&&"[object Function]"===c.call(a.callee)),d}},{}],49:[function(a,b,c){function d(a){if(a&&!i(a))throw new Error("Unknown encoding: "+a)}function e(a){return a.toString(this.encoding)}function f(a){this.charReceived=a.length%2,this.charLength=this.charReceived?2:0}function g(a){this.charReceived=a.length%3,this.charLength=this.charReceived?3:0}var h=a("buffer").Buffer,i=h.isEncoding||function(a){switch(a&&a.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}},j=c.StringDecoder=function(a){switch(this.encoding=(a||"utf8").toLowerCase().replace(/[-_]/,""),d(a),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=f;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=g;break;default:return void(this.write=e)}this.charBuffer=new h(6),this.charReceived=0,this.charLength=0};j.prototype.write=function(a){for(var b="";this.charLength;){var c=a.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:a.length;if(a.copy(this.charBuffer,this.charReceived,0,c),this.charReceived+=c,this.charReceived=55296&&56319>=d)){if(this.charReceived=this.charLength=0,0===a.length)return b;break}this.charLength+=this.surrogateSize,b=""}this.detectIncompleteChar(a);var e=a.length;this.charLength&&(a.copy(this.charBuffer,0,a.length-this.charReceived,e),e-=this.charReceived),b+=a.toString(this.encoding,0,e);var e=b.length-1,d=b.charCodeAt(e);if(d>=55296&&56319>=d){var f=this.surrogateSize;return this.charLength+=f,this.charReceived+=f,this.charBuffer.copy(this.charBuffer,f,0,f),a.copy(this.charBuffer,0,0,f),b.substring(0,e)}return b},j.prototype.detectIncompleteChar=function(a){for(var b=a.length>=3?3:a.length;b>0;b--){var c=a[a.length-b];if(1==b&&c>>5==6){this.charLength=2;break}if(2>=b&&c>>4==14){this.charLength=3;break}if(3>=b&&c>>3==30){this.charLength=4;break}}this.charReceived=b},j.prototype.end=function(a){var b="";if(a&&a.length&&(b=this.write(a)),this.charReceived){var c=this.charReceived,d=this.charBuffer,e=this.encoding;b+=d.slice(0,c).toString(e)}return b}},{buffer:13}],50:[function(a,b,c){function d(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function e(a,b,c){if(a&&j(a)&&a instanceof d)return a;var e=new d;return e.parse(a,b,c),e}function f(a){return i(a)&&(a=e(a)),a instanceof d?a.format():d.prototype.format.call(a)}function g(a,b){return e(a,!1,!0).resolve(b)}function h(a,b){return a?e(a,!1,!0).resolveObject(b):b}function i(a){return"string"==typeof a}function j(a){return"object"==typeof a&&null!==a}function k(a){return null===a}function l(a){return null==a}var m=a("punycode");c.parse=e,c.resolve=g,c.resolveObject=h,c.format=f,c.Url=d;var n=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,p=["<",">",'"',"`"," ","\r","\n"," "],q=["{","}","|","\\","^","`"].concat(p),r=["'"].concat(q),s=["%","/","?",";","#"].concat(r),t=["/","?","#"],u=255,v=/^[a-z0-9A-Z_-]{0,63}$/,w=/^([a-z0-9A-Z_-]{0,63})(.*)$/,x={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},z={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},A=a("querystring");d.prototype.parse=function(a,b,c){if(!i(a))throw new TypeError("Parameter 'url' must be a string, not "+typeof a);var d=a;d=d.trim();var e=n.exec(d);if(e){e=e[0];var f=e.toLowerCase();this.protocol=f,d=d.substr(e.length)}if(c||e||d.match(/^\/\/[^@\/]+@[^@\/]+/)){var g="//"===d.substr(0,2);!g||e&&y[e]||(d=d.substr(2),this.slashes=!0)}if(!y[e]&&(g||e&&!z[e])){for(var h=-1,j=0;jk)&&(h=k)}var l,o;o=-1===h?d.lastIndexOf("@"):d.lastIndexOf("@",h),-1!==o&&(l=d.slice(0,o),d=d.slice(o+1),this.auth=decodeURIComponent(l)),h=-1;for(var j=0;jk)&&(h=k)}-1===h&&(h=d.length),this.host=d.slice(0,h),d=d.slice(h),this.parseHost(),this.hostname=this.hostname||"";var p="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!p)for(var q=this.hostname.split(/\./),j=0,B=q.length;B>j;j++){var C=q[j];if(C&&!C.match(v)){for(var D="",E=0,F=C.length;F>E;E++)D+=C.charCodeAt(E)>127?"x":C[E];if(!D.match(v)){var G=q.slice(0,j),H=q.slice(j+1),I=C.match(w);I&&(G.push(I[1]),H.unshift(I[2])),H.length&&(d="/"+H.join(".")+d),this.hostname=G.join(".");break}}}if(this.hostname=this.hostname.length>u?"":this.hostname.toLowerCase(),!p){for(var J=this.hostname.split("."),K=[],j=0;jj;j++){var O=r[j],P=encodeURIComponent(O);P===O&&(P=escape(O)),d=d.split(O).join(P)}var Q=d.indexOf("#");-1!==Q&&(this.hash=d.substr(Q),d=d.slice(0,Q));var R=d.indexOf("?");if(-1!==R?(this.search=d.substr(R),this.query=d.substr(R+1),b&&(this.query=A.parse(this.query)),d=d.slice(0,R)):b&&(this.search="",this.query={}),d&&(this.pathname=d),z[f]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var M=this.pathname||"",L=this.search||"";this.path=M+L}return this.href=this.format(),this},d.prototype.format=function(){var a=this.auth||"";a&&(a=encodeURIComponent(a),a=a.replace(/%3A/i,":"),a+="@");var b=this.protocol||"",c=this.pathname||"",d=this.hash||"",e=!1,f="";this.host?e=a+this.host:this.hostname&&(e=a+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(e+=":"+this.port)),this.query&&j(this.query)&&Object.keys(this.query).length&&(f=A.stringify(this.query));var g=this.search||f&&"?"+f||"";return b&&":"!==b.substr(-1)&&(b+=":"),this.slashes||(!b||z[b])&&e!==!1?(e="//"+(e||""),c&&"/"!==c.charAt(0)&&(c="/"+c)):e||(e=""),d&&"#"!==d.charAt(0)&&(d="#"+d),g&&"?"!==g.charAt(0)&&(g="?"+g),c=c.replace(/[?#]/g,function(a){return encodeURIComponent(a)}),g=g.replace("#","%23"),b+e+c+g+d},d.prototype.resolve=function(a){return this.resolveObject(e(a,!1,!0)).format()},d.prototype.resolveObject=function(a){if(i(a)){var b=new d;b.parse(a,!1,!0),a=b}var c=new d;if(Object.keys(this).forEach(function(a){c[a]=this[a]},this),c.hash=a.hash,""===a.href)return c.href=c.format(),c;if(a.slashes&&!a.protocol)return Object.keys(a).forEach(function(b){"protocol"!==b&&(c[b]=a[b])}),z[c.protocol]&&c.hostname&&!c.pathname&&(c.path=c.pathname="/"),c.href=c.format(),c;if(a.protocol&&a.protocol!==c.protocol){if(!z[a.protocol])return Object.keys(a).forEach(function(b){c[b]=a[b]}),c.href=c.format(),c;if(c.protocol=a.protocol,a.host||y[a.protocol])c.pathname=a.pathname;else{for(var e=(a.pathname||"").split("/");e.length&&!(a.host=e.shift()););a.host||(a.host=""),a.hostname||(a.hostname=""),""!==e[0]&&e.unshift(""),e.length<2&&e.unshift(""),c.pathname=e.join("/")}if(c.search=a.search,c.query=a.query,c.host=a.host||"",c.auth=a.auth,c.hostname=a.hostname||a.host,c.port=a.port,c.pathname||c.search){var f=c.pathname||"",g=c.search||"";c.path=f+g}return c.slashes=c.slashes||a.slashes,c.href=c.format(),c}var h=c.pathname&&"/"===c.pathname.charAt(0),j=a.host||a.pathname&&"/"===a.pathname.charAt(0),m=j||h||c.host&&a.pathname,n=m,o=c.pathname&&c.pathname.split("/")||[],e=a.pathname&&a.pathname.split("/")||[],p=c.protocol&&!z[c.protocol];if(p&&(c.hostname="",c.port=null,c.host&&(""===o[0]?o[0]=c.host:o.unshift(c.host)),c.host="",a.protocol&&(a.hostname=null,a.port=null,a.host&&(""===e[0]?e[0]=a.host:e.unshift(a.host)),a.host=null),m=m&&(""===e[0]||""===o[0])),j)c.host=a.host||""===a.host?a.host:c.host,c.hostname=a.hostname||""===a.hostname?a.hostname:c.hostname,c.search=a.search,c.query=a.query,o=e;else if(e.length)o||(o=[]),o.pop(),o=o.concat(e),c.search=a.search,c.query=a.query;else if(!l(a.search)){if(p){c.hostname=c.host=o.shift();var q=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;q&&(c.auth=q.shift(),c.host=c.hostname=q.shift())}return c.search=a.search,c.query=a.query,k(c.pathname)&&k(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.href=c.format(),c}if(!o.length)return c.pathname=null,c.path=c.search?"/"+c.search:null,c.href=c.format(),c;for(var r=o.slice(-1)[0],s=(c.host||a.host)&&("."===r||".."===r)||""===r,t=0,u=o.length;u>=0;u--)r=o[u],"."==r?o.splice(u,1):".."===r?(o.splice(u,1),t++):t&&(o.splice(u,1),t--);if(!m&&!n)for(;t--;t)o.unshift("..");!m||""===o[0]||o[0]&&"/"===o[0].charAt(0)||o.unshift(""),s&&"/"!==o.join("/").substr(-1)&&o.push("");var v=""===o[0]||o[0]&&"/"===o[0].charAt(0);if(p){c.hostname=c.host=v?"":o.length?o.shift():"";var q=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;q&&(c.auth=q.shift(),c.host=c.hostname=q.shift())}return m=m||c.host&&o.length,m&&!v&&o.unshift(""),o.length?c.pathname=o.join("/"):(c.pathname=null,c.path=null),k(c.pathname)&&k(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.auth=a.auth||c.auth,c.slashes=c.slashes||a.slashes,c.href=c.format(),c},d.prototype.parseHost=function(){var a=this.host,b=o.exec(a);b&&(b=b[0],":"!==b&&(this.port=b.substr(1)),a=a.substr(0,a.length-b.length)),a&&(this.hostname=a)}},{punycode:22,querystring:25}],51:[function(a,b){b.exports=function(a){return a&&"object"==typeof a&&"function"==typeof a.copy&&"function"==typeof a.fill&&"function"==typeof a.readUInt8}},{}],52:[function(a,b,c){(function(b,d){function e(a,b){var d={seen:[],stylize:g};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),p(b)?d.showHidden=b:b&&c._extend(d,b),v(d.showHidden)&&(d.showHidden=!1),v(d.depth)&&(d.depth=2),v(d.colors)&&(d.colors=!1),v(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=f),i(d,a,d.depth)}function f(a,b){var c=e.styles[b];return c?"["+e.colors[c][0]+"m"+a+"["+e.colors[c][1]+"m":a}function g(a){return a}function h(a){var b={};return a.forEach(function(a){b[a]=!0}),b}function i(a,b,d){if(a.customInspect&&b&&A(b.inspect)&&b.inspect!==c.inspect&&(!b.constructor||b.constructor.prototype!==b)){var e=b.inspect(d,a);return t(e)||(e=i(a,e,d)),e}var f=j(a,b);if(f)return f;var g=Object.keys(b),p=h(g);if(a.showHidden&&(g=Object.getOwnPropertyNames(b)),z(b)&&(g.indexOf("message")>=0||g.indexOf("description")>=0))return k(b);if(0===g.length){if(A(b)){var q=b.name?": "+b.name:"";return a.stylize("[Function"+q+"]","special")}if(w(b))return a.stylize(RegExp.prototype.toString.call(b),"regexp");if(y(b))return a.stylize(Date.prototype.toString.call(b),"date");if(z(b))return k(b)}var r="",s=!1,u=["{","}"];if(o(b)&&(s=!0,u=["[","]"]),A(b)){var v=b.name?": "+b.name:"";r=" [Function"+v+"]"}if(w(b)&&(r=" "+RegExp.prototype.toString.call(b)),y(b)&&(r=" "+Date.prototype.toUTCString.call(b)),z(b)&&(r=" "+k(b)),0===g.length&&(!s||0==b.length))return u[0]+r+u[1];if(0>d)return w(b)?a.stylize(RegExp.prototype.toString.call(b),"regexp"):a.stylize("[Object]","special");a.seen.push(b);var x;return x=s?l(a,b,d,p,g):g.map(function(c){return m(a,b,d,p,c,s)}),a.seen.pop(),n(x,r,u)}function j(a,b){if(v(b))return a.stylize("undefined","undefined");if(t(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return s(b)?a.stylize(""+b,"number"):p(b)?a.stylize(""+b,"boolean"):q(b)?a.stylize("null","null"):void 0}function k(a){return"["+Error.prototype.toString.call(a)+"]"}function l(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)f.push(F(b,String(g))?m(a,b,c,d,String(g),!0):"");return e.forEach(function(e){e.match(/^\d+$/)||f.push(m(a,b,c,d,e,!0))}),f}function m(a,b,c,d,e,f){var g,h,j;if(j=Object.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?h=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(h=a.stylize("[Setter]","special")),F(d,e)||(g="["+e+"]"),h||(a.seen.indexOf(j.value)<0?(h=q(c)?i(a,j.value,null):i(a,j.value,c-1),h.indexOf("\n")>-1&&(h=f?h.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+h.split("\n").map(function(a){return" "+a}).join("\n"))):h=a.stylize("[Circular]","special")),v(g)){if(f&&e.match(/^\d+$/))return h;g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+h}function n(a,b,c){var d=0,e=a.reduce(function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function o(a){return Array.isArray(a)}function p(a){return"boolean"==typeof a}function q(a){return null===a}function r(a){return null==a}function s(a){return"number"==typeof a}function t(a){return"string"==typeof a}function u(a){return"symbol"==typeof a}function v(a){return void 0===a}function w(a){return x(a)&&"[object RegExp]"===C(a)}function x(a){return"object"==typeof a&&null!==a}function y(a){return x(a)&&"[object Date]"===C(a)}function z(a){return x(a)&&("[object Error]"===C(a)||a instanceof Error)}function A(a){return"function"==typeof a}function B(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function C(a){return Object.prototype.toString.call(a)}function D(a){return 10>a?"0"+a.toString(10):a.toString(10)}function E(){var a=new Date,b=[D(a.getHours()),D(a.getMinutes()),D(a.getSeconds())].join(":");return[a.getDate(),J[a.getMonth()],b].join(" ")}function F(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var G=/%[sdj%]/g;c.format=function(a){if(!t(a)){for(var b=[],c=0;c=f)return a;switch(a){case"%s":return String(d[c++]);case"%d":return Number(d[c++]);case"%j":try{return JSON.stringify(d[c++])}catch(b){return"[Circular]"}default:return a}}),h=d[c];f>c;h=d[++c])g+=q(h)||!x(h)?" "+h:" "+e(h);return g},c.deprecate=function(a,e){function f(){if(!g){if(b.throwDeprecation)throw new Error(e);b.traceDeprecation?console.trace(e):console.error(e),g=!0}return a.apply(this,arguments)}if(v(d.process))return function(){return c.deprecate(a,e).apply(this,arguments)};if(b.noDeprecation===!0)return a;var g=!1;return f};var H,I={};c.debuglog=function(a){if(v(H)&&(H=b.env.NODE_DEBUG||""),a=a.toUpperCase(),!I[a])if(new RegExp("\\b"+a+"\\b","i").test(H)){var d=b.pid;I[a]=function(){var b=c.format.apply(c,arguments);console.error("%s %d: %s",a,d,b)}}else I[a]=function(){};return I[a]},c.inspect=e,e.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},e.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},c.isArray=o,c.isBoolean=p,c.isNull=q,c.isNullOrUndefined=r,c.isNumber=s,c.isString=t,c.isSymbol=u,c.isUndefined=v,c.isRegExp=w,c.isObject=x,c.isDate=y,c.isError=z,c.isFunction=A,c.isPrimitive=B,c.isBuffer=a("./support/isBuffer");var J=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];c.log=function(){console.log("%s - %s",E(),c.format.apply(c,arguments))},c.inherits=a("inherits"),c._extend=function(a,b){if(!b||!x(b))return a;for(var c=Object.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}}).call(this,a("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":51,_process:21,inherits:19}],53:[function(a,b){function c(){for(var a={},b=0;bc;c++)e=a[c],b=e(b);return b},j=function(a){return a.indexOf("&")>=0||a.indexOf(">")>=0||a.indexOf("<")>=0},l=function(a){return""},e=function(a){return a.replace("]]>","]]]]>")},c.processors=i,c.defaults={.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,async:!1,strict:!0,attrNameProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.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,async:!1,strict:!0,attrNameProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:"\n"},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}},c.ValidationError=function(a){function b(a){this.message=a}return m(b,a),b}(Error),c.Builder=function(){function a(a){var b,d,e;this.options={},d=c.defaults[.2];for(b in d)n.call(d,b)&&(e=d[b],this.options[b]=e);for(b in a)n.call(a,b)&&(e=a[b],this.options[b]=e)}return a.prototype.buildObject=function(a){var b,e,f,g,h;return b=this.options.attrkey,e=this.options.charkey,1===Object.keys(a).length&&this.options.rootName===c.defaults[.2].rootName?(h=Object.keys(a)[0],a=a[h]):h=this.options.rootName,f=function(a){return function(c,d){var f,g,h,i,k,m;if("object"!=typeof d)a.options.cdata&&j(d)?c.raw(l(d)):c.txt(d);else for(k in d)if(n.call(d,k))if(g=d[k],k===b){if("object"==typeof g)for(f in g)m=g[f],c=c.att(f,m)}else if(k===e)c=a.options.cdata&&j(g)?c.raw(l(g)):c.txt(g);else if(Array.isArray(g))for(i in g)n.call(g,i)&&(h=g[i],c="string"==typeof h?a.options.cdata&&j(h)?c.ele(k).raw(l(h)).up():c.ele(k,h).up():arguments.callee(c.ele(k),h).up());else c="object"==typeof g?arguments.callee(c.ele(k),g).up():"string"==typeof g&&a.options.cdata&&j(g)?c.ele(k).raw(l(g)).up():c.ele(k,g.toString()).up();return c}}(this),g=d.create(h,this.options.xmldec,this.options.doctype,{headless:this.options.headless}),f(g,a).end(this.options.renderOpts)},a}(),c.Parser=function(a){function d(a){this.parseString=o(this.parseString,this),this.reset=o(this.reset,this),this.assignOrPush=o(this.assignOrPush,this),this.processAsync=o(this.processAsync,this);var b,d,e;if(!(this instanceof c.Parser))return new c.Parser(a);this.options={},d=c.defaults[.2];for(b in d)n.call(d,b)&&(e=d[b],this.options[b]=e);for(b in a)n.call(a,b)&&(e=a[b],this.options[b]=e);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(i.normalize)),this.reset()}return m(d,a),d.prototype.processAsync=function(){var a;return this.remaining.length<=this.options.chunkSize?(a=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(a),this.saxParser.close()):(a=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(a),setImmediate(this.processAsync))},d.prototype.assignOrPush=function(a,b,c){return b in a?(a[b]instanceof Array||(a[b]=[a[b]]),a[b].push(c)):a[b]=this.options.explicitArray?[c]:c},d.prototype.reset=function(){var a,b,c,d;return this.removeAllListeners(),this.saxParser=k.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(a){return function(b){return a.saxParser.resume(),a.saxParser.errThrown?void 0:(a.saxParser.errThrown=!0,a.emit("error",b))}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,d=[],a=this.options.attrkey,b=this.options.charkey,this.saxParser.onopentag=function(c){return function(e){var f,g,i,j,k;if(i={},i[b]="",!c.options.ignoreAttrs){k=e.attributes;for(f in k)n.call(k,f)&&(a in i||c.options.mergeAttrs||(i[a]={}),g=e.attributes[f],j=c.options.attrNameProcessors?h(c.options.attrNameProcessors,f):f,c.options.mergeAttrs?c.assignOrPush(i,j,g):i[a][j]=g)}return i["#name"]=c.options.tagNameProcessors?h(c.options.tagNameProcessors,e.name):e.name,c.options.xmlns&&(i[c.options.xmlnskey]={uri:e.uri,local:e.local}),d.push(i)}}(this),this.saxParser.onclosetag=function(a){return function(){var c,e,f,i,j,k,l,m,o,p,q;if(l=d.pop(),k=l["#name"],a.options.explicitChildren&&a.options.preserveChildrenOrder||delete l["#name"],l.cdata===!0&&(c=l.cdata,delete l.cdata),p=d[d.length-1],l[b].match(/^\s*$/)&&!c?(e=l[b],delete l[b]):(a.options.trim&&(l[b]=l[b].trim()),a.options.normalize&&(l[b]=l[b].replace(/\s{2,}/g," ").trim()),l[b]=a.options.valueProcessors?h(a.options.valueProcessors,l[b]):l[b],1===Object.keys(l).length&&b in l&&!a.EXPLICIT_CHARKEY&&(l=l[b])),g(l)&&(l=""!==a.options.emptyTag?a.options.emptyTag:e),null!=a.options.validator){q="/"+function(){var a,b,c;for(c=[],a=0,b=d.length;b>a;a++)j=d[a],c.push(j["#name"]);return c}().concat(k).join("/");try{l=a.options.validator(q,p&&p[k],l)}catch(r){f=r,a.emit("error",f)}}if(a.options.explicitChildren&&!a.options.mergeAttrs&&"object"==typeof l)if(a.options.preserveChildrenOrder){if(p){p[a.options.childkey]=p[a.options.childkey]||[],m={};for(i in l)n.call(l,i)&&(m[i]=l[i]);p[a.options.childkey].push(m),delete l["#name"],1===Object.keys(l).length&&b in l&&!a.EXPLICIT_CHARKEY&&(l=l[b])}}else j={},a.options.attrkey in l&&(j[a.options.attrkey]=l[a.options.attrkey],delete l[a.options.attrkey]),!a.options.charsAsChildren&&a.options.charkey in l&&(j[a.options.charkey]=l[a.options.charkey],delete l[a.options.charkey]),Object.getOwnPropertyNames(l).length>0&&(j[a.options.childkey]=l),l=j;return d.length>0?a.assignOrPush(p,k,l):(a.options.explicitRoot&&(o=l,l={},l[k]=o),a.resultObject=l,a.saxParser.ended=!0,a.emit("end",a.resultObject))}}(this),c=function(a){return function(c){var e,f;return f=d[d.length-1],f?(f[b]+=c,a.options.explicitChildren&&a.options.preserveChildrenOrder&&a.options.charsAsChildren&&""!==c.replace(/\\n/g,"").trim()&&(f[a.options.childkey]=f[a.options.childkey]||[],e={"#name":"__text__"},e[b]=c,f[a.options.childkey].push(e)),f):void 0}}(this),this.saxParser.ontext=c,
+this.saxParser.oncdata=function(){return function(a){var b;return b=c(a),b?b.cdata=!0:void 0}}(this)},d.prototype.parseString=function(a,c){var d;if(null!=c&&"function"==typeof c&&(this.on("end",function(a){return this.reset(),c(null,a)}),this.on("error",function(a){return this.reset(),c(a)})),a=a.toString(),""===a.trim())return this.emit("end",null),!0;try{return a=b.stripBOM(a),this.options.async&&(this.remaining=a,setImmediate(this.processAsync),this.saxParser),this.saxParser.write(a).close()}catch(e){if(d=e,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",d),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw d}},d}(f.EventEmitter),c.parseString=function(a,b,d){var e,f,g;return null!=d?("function"==typeof d&&(e=d),"object"==typeof b&&(f=b)):("function"==typeof b&&(e=b),f={}),g=new c.Parser(f),g.parseString(a,e)}}).call(this)},{"./bom":54,"./processors":55,events:17,sax:57,xmlbuilder:74}],57:[function(a,b,c){(function(b){!function(c){function d(a,b){if(!(this instanceof d))return new d(a,b);var e=this;f(e),e.q=e.c="",e.bufferCheckPosition=c.MAX_BUFFER_LENGTH,e.opt=b||{},e.opt.lowercase=e.opt.lowercase||e.opt.lowercasetags,e.looseCase=e.opt.lowercase?"toLowerCase":"toUpperCase",e.tags=[],e.closed=e.closedRoot=e.sawRoot=!1,e.tag=e.error=null,e.strict=!!a,e.noscript=!(!a&&!e.opt.noscript),e.state=S.BEGIN,e.ENTITIES=Object.create(c.ENTITIES),e.attribList=[],e.opt.xmlns&&(e.ns=Object.create(P)),e.trackPosition=e.opt.position!==!1,e.trackPosition&&(e.position=e.line=e.column=0),n(e,"onready")}function e(a){for(var b=Math.max(c.MAX_BUFFER_LENGTH,10),d=0,e=0,f=B.length;f>e;e++){var g=a[B[e]].length;if(g>b)switch(B[e]){case"textNode":p(a);break;case"cdata":o(a,"oncdata",a.cdata),a.cdata="";break;case"script":o(a,"onscript",a.script),a.script="";break;default:r(a,"Max buffer length exceeded: "+B[e])}d=Math.max(d,g)}a.bufferCheckPosition=c.MAX_BUFFER_LENGTH-d+a.position}function f(a){for(var b=0,c=B.length;c>b;b++)a[B[b]]=""}function g(a){p(a),""!==a.cdata&&(o(a,"oncdata",a.cdata),a.cdata=""),""!==a.script&&(o(a,"onscript",a.script),a.script="")}function h(a,b){return new i(a,b)}function i(a,b){if(!(this instanceof i))return new i(a,b);C.apply(this),this._parser=new d(a,b),this.writable=!0,this.readable=!0;var c=this;this._parser.onend=function(){c.emit("end")},this._parser.onerror=function(a){c.emit("error",a),c._parser.error=null},this._decoder=null,E.forEach(function(a){Object.defineProperty(c,"on"+a,{get:function(){return c._parser["on"+a]},set:function(b){return b?void c.on(a,b):(c.removeAllListeners(a),c._parser["on"+a]=b)},enumerable:!0,configurable:!1})})}function j(a){return a.split("").reduce(function(a,b){return a[b]=!0,a},{})}function k(a){return"[object RegExp]"===Object.prototype.toString.call(a)}function l(a,b){return k(a)?!!b.match(a):a[b]}function m(a,b){return!l(a,b)}function n(a,b,c){a[b]&&a[b](c)}function o(a,b,c){a.textNode&&p(a),n(a,b,c)}function p(a){a.textNode=q(a.opt,a.textNode),a.textNode&&n(a,"ontext",a.textNode),a.textNode=""}function q(a,b){return a.trim&&(b=b.trim()),a.normalize&&(b=b.replace(/\s+/g," ")),b}function r(a,b){return p(a),a.trackPosition&&(b+="\nLine: "+a.line+"\nColumn: "+a.column+"\nChar: "+a.c),b=new Error(b),a.error=b,n(a,"onerror",b),a}function s(a){return a.closedRoot||t(a,"Unclosed root tag"),a.state!==S.BEGIN&&a.state!==S.TEXT&&r(a,"Unexpected end"),p(a),a.c="",a.closed=!0,n(a,"onend"),d.call(a,a.strict,a.opt),a}function t(a,b){if("object"!=typeof a||!(a instanceof d))throw new Error("bad call to strictFail");a.strict&&r(a,b)}function u(a){a.strict||(a.tagName=a.tagName[a.looseCase]());var b=a.tags[a.tags.length-1]||a,c=a.tag={name:a.tagName,attributes:{}};a.opt.xmlns&&(c.ns=b.ns),a.attribList.length=0}function v(a,b){var c=a.indexOf(":"),d=0>c?["",a]:a.split(":"),e=d[0],f=d[1];return b&&"xmlns"===a&&(e="xmlns",f=""),{prefix:e,local:f}}function w(a){if(a.strict||(a.attribName=a.attribName[a.looseCase]()),-1!==a.attribList.indexOf(a.attribName)||a.tag.attributes.hasOwnProperty(a.attribName))return a.attribName=a.attribValue="";if(a.opt.xmlns){var b=v(a.attribName,!0),c=b.prefix,d=b.local;if("xmlns"===c)if("xml"===d&&a.attribValue!==N)t(a,"xml: prefix must be bound to "+N+"\nActual: "+a.attribValue);else if("xmlns"===d&&a.attribValue!==O)t(a,"xmlns: prefix must be bound to "+O+"\nActual: "+a.attribValue);else{var e=a.tag,f=a.tags[a.tags.length-1]||a;e.ns===f.ns&&(e.ns=Object.create(f.ns)),e.ns[d]=a.attribValue}a.attribList.push([a.attribName,a.attribValue])}else a.tag.attributes[a.attribName]=a.attribValue,o(a,"onattribute",{name:a.attribName,value:a.attribValue});a.attribName=a.attribValue=""}function x(a,b){if(a.opt.xmlns){var c=a.tag,d=v(a.tagName);c.prefix=d.prefix,c.local=d.local,c.uri=c.ns[d.prefix]||"",c.prefix&&!c.uri&&(t(a,"Unbound namespace prefix: "+JSON.stringify(a.tagName)),c.uri=d.prefix);var e=a.tags[a.tags.length-1]||a;c.ns&&e.ns!==c.ns&&Object.keys(c.ns).forEach(function(b){o(a,"onopennamespace",{prefix:b,uri:c.ns[b]})});for(var f=0,g=a.attribList.length;g>f;f++){var h=a.attribList[f],i=h[0],j=h[1],k=v(i,!0),l=k.prefix,m=k.local,n=""==l?"":c.ns[l]||"",p={name:i,value:j,prefix:l,local:m,uri:n};l&&"xmlns"!=l&&!n&&(t(a,"Unbound namespace prefix: "+JSON.stringify(l)),p.uri=l),a.tag.attributes[i]=p,o(a,"onattribute",p)}a.attribList.length=0}a.tag.isSelfClosing=!!b,a.sawRoot=!0,a.tags.push(a.tag),o(a,"onopentag",a.tag),b||(a.state=a.noscript||"script"!==a.tagName.toLowerCase()?S.TEXT:S.SCRIPT,a.tag=null,a.tagName=""),a.attribName=a.attribValue="",a.attribList.length=0}function y(a){if(!a.tagName)return t(a,"Weird empty close tag."),a.textNode+=">",void(a.state=S.TEXT);if(a.script){if("script"!==a.tagName)return a.script+=""+a.tagName+">",a.tagName="",void(a.state=S.SCRIPT);o(a,"onscript",a.script),a.script=""}var b=a.tags.length,c=a.tagName;a.strict||(c=c[a.looseCase]());for(var d=c;b--;){var e=a.tags[b];if(e.name===d)break;t(a,"Unexpected close tag")}if(0>b)return t(a,"Unmatched closing tag: "+a.tagName),a.textNode+=""+a.tagName+">",void(a.state=S.TEXT);a.tagName=c;for(var f=a.tags.length;f-->b;){var g=a.tag=a.tags.pop();a.tagName=a.tag.name,o(a,"onclosetag",a.tagName);var h={};for(var i in g.ns)h[i]=g.ns[i];var j=a.tags[a.tags.length-1]||a;a.opt.xmlns&&g.ns!==j.ns&&Object.keys(g.ns).forEach(function(b){var c=g.ns[b];o(a,"onclosenamespace",{prefix:b,uri:c})})}0===b&&(a.closedRoot=!0),a.tagName=a.attribValue=a.attribName="",a.attribList.length=0,a.state=S.TEXT}function z(a){var b,c=a.entity,d=c.toLowerCase(),e="";return a.ENTITIES[c]?a.ENTITIES[c]:a.ENTITIES[d]?a.ENTITIES[d]:(c=d,"#"===c.charAt(0)&&("x"===c.charAt(1)?(c=c.slice(2),b=parseInt(c,16),e=b.toString(16)):(c=c.slice(1),b=parseInt(c,10),e=b.toString(10))),c=c.replace(/^0+/,""),e.toLowerCase()!==c?(t(a,"Invalid character entity"),"&"+a.entity+";"):String.fromCodePoint(b))}function A(a){var b=this;if(this.error)throw this.error;if(b.closed)return r(b,"Cannot write after close. Assign an onready handler.");if(null===a)return s(b);for(var c=0,d="";b.c=d=a.charAt(c++);)switch(b.trackPosition&&(b.position++,"\n"===d?(b.line++,b.column=0):b.column++),b.state){case S.BEGIN:"<"===d?(b.state=S.OPEN_WAKA,b.startTagPosition=b.position):m(F,d)&&(t(b,"Non-whitespace before first tag."),b.textNode=d,b.state=S.TEXT);continue;case S.TEXT:if(b.sawRoot&&!b.closedRoot){for(var f=c-1;d&&"<"!==d&&"&"!==d;)d=a.charAt(c++),d&&b.trackPosition&&(b.position++,"\n"===d?(b.line++,b.column=0):b.column++);b.textNode+=a.substring(f,c-1)}"<"===d?(b.state=S.OPEN_WAKA,b.startTagPosition=b.position):(!m(F,d)||b.sawRoot&&!b.closedRoot||t(b,"Text data outside of root node."),"&"===d?b.state=S.TEXT_ENTITY:b.textNode+=d);continue;case S.SCRIPT:"<"===d?b.state=S.SCRIPT_ENDING:b.script+=d;continue;case S.SCRIPT_ENDING:"/"===d?b.state=S.CLOSE_TAG:(b.script+="<"+d,b.state=S.SCRIPT);continue;case S.OPEN_WAKA:if("!"===d)b.state=S.SGML_DECL,b.sgmlDecl="";else if(l(F,d));else if(l(Q,d))b.state=S.OPEN_TAG,b.tagName=d;else if("/"===d)b.state=S.CLOSE_TAG,b.tagName="";else if("?"===d)b.state=S.PROC_INST,b.procInstName=b.procInstBody="";else{if(t(b,"Unencoded <"),b.startTagPosition+1"===d?(o(b,"onsgmldeclaration",b.sgmlDecl),b.sgmlDecl="",b.state=S.TEXT):l(I,d)?(b.state=S.SGML_DECL_QUOTED,b.sgmlDecl+=d):b.sgmlDecl+=d;continue;case S.SGML_DECL_QUOTED:d===b.q&&(b.state=S.SGML_DECL,b.q=""),b.sgmlDecl+=d;continue;case S.DOCTYPE:">"===d?(b.state=S.TEXT,o(b,"ondoctype",b.doctype),b.doctype=!0):(b.doctype+=d,"["===d?b.state=S.DOCTYPE_DTD:l(I,d)&&(b.state=S.DOCTYPE_QUOTED,b.q=d));continue;case S.DOCTYPE_QUOTED:b.doctype+=d,d===b.q&&(b.q="",b.state=S.DOCTYPE);continue;case S.DOCTYPE_DTD:b.doctype+=d,"]"===d?b.state=S.DOCTYPE:l(I,d)&&(b.state=S.DOCTYPE_DTD_QUOTED,b.q=d);continue;case S.DOCTYPE_DTD_QUOTED:b.doctype+=d,d===b.q&&(b.state=S.DOCTYPE_DTD,b.q="");continue;case S.COMMENT:"-"===d?b.state=S.COMMENT_ENDING:b.comment+=d;continue;case S.COMMENT_ENDING:"-"===d?(b.state=S.COMMENT_ENDED,b.comment=q(b.opt,b.comment),b.comment&&o(b,"oncomment",b.comment),b.comment=""):(b.comment+="-"+d,b.state=S.COMMENT);continue;case S.COMMENT_ENDED:">"!==d?(t(b,"Malformed comment"),b.comment+="--"+d,b.state=S.COMMENT):b.state=S.TEXT;continue;case S.CDATA:"]"===d?b.state=S.CDATA_ENDING:b.cdata+=d;continue;case S.CDATA_ENDING:"]"===d?b.state=S.CDATA_ENDING_2:(b.cdata+="]"+d,b.state=S.CDATA);continue;case S.CDATA_ENDING_2:">"===d?(b.cdata&&o(b,"oncdata",b.cdata),o(b,"onclosecdata"),b.cdata="",b.state=S.TEXT):"]"===d?b.cdata+="]":(b.cdata+="]]"+d,b.state=S.CDATA);continue;case S.PROC_INST:"?"===d?b.state=S.PROC_INST_ENDING:l(F,d)?b.state=S.PROC_INST_BODY:b.procInstName+=d;continue;case S.PROC_INST_BODY:if(!b.procInstBody&&l(F,d))continue;"?"===d?b.state=S.PROC_INST_ENDING:b.procInstBody+=d;continue;case S.PROC_INST_ENDING:">"===d?(o(b,"onprocessinginstruction",{name:b.procInstName,body:b.procInstBody}),b.procInstName=b.procInstBody="",b.state=S.TEXT):(b.procInstBody+="?"+d,b.state=S.PROC_INST_BODY);continue;case S.OPEN_TAG:l(R,d)?b.tagName+=d:(u(b),">"===d?x(b):"/"===d?b.state=S.OPEN_TAG_SLASH:(m(F,d)&&t(b,"Invalid character in tag name"),b.state=S.ATTRIB));continue;case S.OPEN_TAG_SLASH:">"===d?(x(b,!0),y(b)):(t(b,"Forward-slash in opening tag not followed by >"),b.state=S.ATTRIB);continue;case S.ATTRIB:if(l(F,d))continue;">"===d?x(b):"/"===d?b.state=S.OPEN_TAG_SLASH:l(Q,d)?(b.attribName=d,b.attribValue="",b.state=S.ATTRIB_NAME):t(b,"Invalid attribute name");continue;case S.ATTRIB_NAME:"="===d?b.state=S.ATTRIB_VALUE:">"===d?(t(b,"Attribute without value"),b.attribValue=b.attribName,w(b),x(b)):l(F,d)?b.state=S.ATTRIB_NAME_SAW_WHITE:l(R,d)?b.attribName+=d:t(b,"Invalid attribute name");continue;case S.ATTRIB_NAME_SAW_WHITE:if("="===d)b.state=S.ATTRIB_VALUE;else{if(l(F,d))continue;t(b,"Attribute without value"),b.tag.attributes[b.attribName]="",b.attribValue="",o(b,"onattribute",{name:b.attribName,value:""}),b.attribName="",">"===d?x(b):l(Q,d)?(b.attribName=d,b.state=S.ATTRIB_NAME):(t(b,"Invalid attribute name"),b.state=S.ATTRIB)}continue;case S.ATTRIB_VALUE:if(l(F,d))continue;l(I,d)?(b.q=d,b.state=S.ATTRIB_VALUE_QUOTED):(t(b,"Unquoted attribute value"),b.state=S.ATTRIB_VALUE_UNQUOTED,b.attribValue=d);continue;case S.ATTRIB_VALUE_QUOTED:if(d!==b.q){"&"===d?b.state=S.ATTRIB_VALUE_ENTITY_Q:b.attribValue+=d;continue}w(b),b.q="",b.state=S.ATTRIB_VALUE_CLOSED;continue;case S.ATTRIB_VALUE_CLOSED:l(F,d)?b.state=S.ATTRIB:">"===d?x(b):"/"===d?b.state=S.OPEN_TAG_SLASH:l(Q,d)?(t(b,"No whitespace between attributes"),b.attribName=d,b.attribValue="",b.state=S.ATTRIB_NAME):t(b,"Invalid attribute name");continue;case S.ATTRIB_VALUE_UNQUOTED:if(m(K,d)){"&"===d?b.state=S.ATTRIB_VALUE_ENTITY_U:b.attribValue+=d;continue}w(b),">"===d?x(b):b.state=S.ATTRIB;continue;case S.CLOSE_TAG:if(b.tagName)">"===d?y(b):l(R,d)?b.tagName+=d:b.script?(b.script+=""+b.tagName,b.tagName="",b.state=S.SCRIPT):(m(F,d)&&t(b,"Invalid tagname in closing tag"),b.state=S.CLOSE_TAG_SAW_WHITE);else{if(l(F,d))continue;m(Q,d)?b.script?(b.script+=""+d,b.state=S.SCRIPT):t(b,"Invalid tagname in closing tag."):b.tagName=d}continue;case S.CLOSE_TAG_SAW_WHITE:if(l(F,d))continue;">"===d?y(b):t(b,"Invalid characters in closing tag");continue;case S.TEXT_ENTITY:case S.ATTRIB_VALUE_ENTITY_Q:case S.ATTRIB_VALUE_ENTITY_U:switch(b.state){case S.TEXT_ENTITY:var h=S.TEXT,i="textNode";break;case S.ATTRIB_VALUE_ENTITY_Q:var h=S.ATTRIB_VALUE_QUOTED,i="attribValue";break;case S.ATTRIB_VALUE_ENTITY_U:var h=S.ATTRIB_VALUE_UNQUOTED,i="attribValue"}";"===d?(b[i]+=z(b),b.entity="",b.state=h):l(J,d)?b.entity+=d:(t(b,"Invalid character entity"),b[i]+="&"+b.entity+d,b.entity="",b.state=h);continue;default:throw new Error(b,"Unknown state: "+b.state)}return b.position>=b.bufferCheckPosition&&e(b),b}c.parser=function(a,b){return new d(a,b)},c.SAXParser=d,c.SAXStream=i,c.createStream=h,c.MAX_BUFFER_LENGTH=65536;var B=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];c.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(a){function b(){this.__proto__=a}return b.prototype=a,new b}),Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__}),Object.keys||(Object.keys=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b}),d.prototype={end:function(){s(this)},write:A,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){g(this)}};try{var C=a("stream").Stream}catch(D){var C=function(){}}var E=c.EVENTS.filter(function(a){return"error"!==a&&"end"!==a});i.prototype=Object.create(C.prototype,{constructor:{value:i}}),i.prototype.write=function(c){if("function"==typeof b&&"function"==typeof b.isBuffer&&b.isBuffer(c)){if(!this._decoder){var d=a("string_decoder").StringDecoder;this._decoder=new d("utf8")}c=this._decoder.write(c)}return this._parser.write(c.toString()),this.emit("data",c),!0},i.prototype.end=function(a){return a&&a.length&&this.write(a),this._parser.end(),!0},i.prototype.on=function(a,b){var c=this;return c._parser["on"+a]||-1===E.indexOf(a)||(c._parser["on"+a]=function(){var b=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);b.splice(0,0,a),c.emit.apply(c,b)}),C.prototype.on.call(c,a,b)};var F="\r\n ",G="0124356789",H="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",I="'\"",J=G+H+"#",K=F+">",L="[CDATA[",M="DOCTYPE",N="http://www.w3.org/XML/1998/namespace",O="http://www.w3.org/2000/xmlns/",P={xml:N,xmlns:O};F=j(F),G=j(G),H=j(H);var Q=/[:_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]/,R=/[:_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-]/;I=j(I),J=j(J),K=j(K);var S=0;c.STATE={BEGIN:S++,TEXT:S++,TEXT_ENTITY:S++,OPEN_WAKA:S++,SGML_DECL:S++,SGML_DECL_QUOTED:S++,DOCTYPE:S++,DOCTYPE_QUOTED:S++,DOCTYPE_DTD:S++,DOCTYPE_DTD_QUOTED:S++,COMMENT_STARTING:S++,COMMENT:S++,COMMENT_ENDING:S++,COMMENT_ENDED:S++,CDATA:S++,CDATA_ENDING:S++,CDATA_ENDING_2:S++,PROC_INST:S++,PROC_INST_BODY:S++,PROC_INST_ENDING:S++,OPEN_TAG:S++,OPEN_TAG_SLASH:S++,ATTRIB:S++,ATTRIB_NAME:S++,ATTRIB_NAME_SAW_WHITE:S++,ATTRIB_VALUE:S++,ATTRIB_VALUE_QUOTED:S++,ATTRIB_VALUE_CLOSED:S++,ATTRIB_VALUE_UNQUOTED:S++,ATTRIB_VALUE_ENTITY_Q:S++,ATTRIB_VALUE_ENTITY_U:S++,CLOSE_TAG:S++,CLOSE_TAG_SAW_WHITE:S++,SCRIPT:S++,SCRIPT_ENDING:S++},c.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(c.ENTITIES).forEach(function(a){var b=c.ENTITIES[a],d="number"==typeof b?String.fromCharCode(b):b;c.ENTITIES[a]=d});for(var S in c.STATE)c.STATE[c.STATE[S]]=S;S=c.STATE,String.fromCodePoint||!function(){var a=String.fromCharCode,b=Math.floor,c=function(){var c,d,e=16384,f=[],g=-1,h=arguments.length;if(!h)return"";for(var i="";++gj||j>1114111||b(j)!=j)throw RangeError("Invalid code point: "+j);65535>=j?f.push(j):(j-=65536,c=(j>>10)+55296,d=j%1024+56320,f.push(c,d)),(g+1==h||f.length>e)&&(i+=a.apply(null,f),f.length=0)}return i};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:c,configurable:!0,writable:!0}):String.fromCodePoint=c}()}("undefined"==typeof c?sax={}:c)}).call(this,a("buffer").Buffer)},{buffer:13,stream:39,string_decoder:49}],58:[function(a,b){(function(){var c,d;d=a("lodash/object/create"),b.exports=c=function(){function a(a,b,c){if(this.stringify=a.stringify,null==b)throw new Error("Missing attribute name of element "+a.name);if(null==c)throw new Error("Missing attribute value for attribute "+b+" of element "+a.name);this.name=this.stringify.attName(b),this.value=this.stringify.attValue(c)}return a.prototype.clone=function(){return d(a.prototype,this)},a.prototype.toString=function(){return" "+this.name+'="'+this.value+'"'},a}()}).call(this)},{"lodash/object/create":128}],59:[function(a,b){(function(){var c,d,e,f,g;g=a("./XMLStringifier"),d=a("./XMLDeclaration"),e=a("./XMLDocType"),f=a("./XMLElement"),b.exports=c=function(){function a(a,b){var c,d;if(null==a)throw new Error("Root element needs a name");null==b&&(b={}),this.options=b,this.stringify=new g(b),d=new f(this,"doc"),c=d.element(a),c.isRoot=!0,c.documentObject=this,this.rootObject=c,b.headless||(c.declaration(b),(null!=b.pubID||null!=b.sysID)&&c.doctype(b))}return a.prototype.root=function(){return this.rootObject},a.prototype.end=function(a){return this.toString(a)},a.prototype.toString=function(a){var b,c,d,e,f,g,h,i;return e=(null!=a?a.pretty:void 0)||!1,b=null!=(g=null!=a?a.indent:void 0)?g:" ",d=null!=(h=null!=a?a.offset:void 0)?h:0,c=null!=(i=null!=a?a.newline:void 0)?i:"\n",f="",null!=this.xmldec&&(f+=this.xmldec.toString(a)),null!=this.doctype&&(f+=this.doctype.toString(a)),f+=this.rootObject.toString(a),e&&f.slice(-c.length)===c&&(f=f.slice(0,-c.length)),f},a}()}).call(this)},{"./XMLDeclaration":66,"./XMLDocType":67,"./XMLElement":68,"./XMLStringifier":72}],60:[function(a,b){(function(){var c,d,e,f=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},g={}.hasOwnProperty;e=a("lodash/object/create"),d=a("./XMLNode"),b.exports=c=function(a){function b(a,c){if(b.__super__.constructor.call(this,a),null==c)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(c)}return f(b,a),b.prototype.clone=function(){return e(b.prototype,this)},b.prototype.toString=function(a,b){var c,d,e,f,g,h,i,j,k;return f=(null!=a?a.pretty:void 0)||!1,c=null!=(h=null!=a?a.indent:void 0)?h:" ",e=null!=(i=null!=a?a.offset:void 0)?i:0,d=null!=(j=null!=a?a.newline:void 0)?j:"\n",b||(b=0),k=new Array(b+e+1).join(c),g="",f&&(g+=k),g+="",f&&(g+=d),g},b}(d)}).call(this)},{"./XMLNode":69,"lodash/object/create":128}],61:[function(a,b){(function(){var c,d,e,f=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},g={}.hasOwnProperty;e=a("lodash/object/create"),d=a("./XMLNode"),b.exports=c=function(a){function b(a,c){if(b.__super__.constructor.call(this,a),null==c)throw new Error("Missing comment text");this.text=this.stringify.comment(c)}return f(b,a),b.prototype.clone=function(){return e(b.prototype,this)},b.prototype.toString=function(a,b){var c,d,e,f,g,h,i,j,k;return f=(null!=a?a.pretty:void 0)||!1,c=null!=(h=null!=a?a.indent:void 0)?h:" ",e=null!=(i=null!=a?a.offset:void 0)?i:0,d=null!=(j=null!=a?a.newline:void 0)?j:"\n",b||(b=0),k=new Array(b+e+1).join(c),g="",f&&(g+=k),g+="",f&&(g+=d),g},b}(d)}).call(this)},{"./XMLNode":69,"lodash/object/create":128}],62:[function(a,b){(function(){var c,d;d=a("lodash/object/create"),b.exports=c=function(){function a(a,b,c,d,e,f){if(this.stringify=a.stringify,null==b)throw new Error("Missing DTD element name");if(null==c)throw new Error("Missing DTD attribute name");if(!d)throw new Error("Missing DTD attribute type");if(!e)throw new Error("Missing DTD attribute default");if(0!==e.indexOf("#")&&(e="#"+e),!e.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(f&&!e.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(b),this.attributeName=this.stringify.attName(c),this.attributeType=this.stringify.dtdAttType(d),this.defaultValue=this.stringify.dtdAttDefault(f),this.defaultValueType=e}return a.prototype.clone=function(){return d(a.prototype,this)},a.prototype.toString=function(a,b){var c,d,e,f,g,h,i,j,k;return f=(null!=a?a.pretty:void 0)||!1,c=null!=(h=null!=a?a.indent:void 0)?h:" ",e=null!=(i=null!=a?a.offset:void 0)?i:0,d=null!=(j=null!=a?a.newline:void 0)?j:"\n",b||(b=0),k=new Array(b+e+1).join(c),g="",f&&(g+=k),g+="",f&&(g+=d),g},a}()}).call(this)},{"lodash/object/create":128}],63:[function(a,b){(function(){var c,d,e;d=a("lodash/object/create"),e=a("lodash/lang/isArray"),b.exports=c=function(){function a(a,b,c){if(this.stringify=a.stringify,null==b)throw new Error("Missing DTD element name");c||(c="(#PCDATA)"),e(c)&&(c="("+c.join(",")+")"),this.name=this.stringify.eleName(b),this.value=this.stringify.dtdElementValue(c)}return a.prototype.clone=function(){return d(a.prototype,this)},a.prototype.toString=function(a,b){var c,d,e,f,g,h,i,j,k;return f=(null!=a?a.pretty:void 0)||!1,c=null!=(h=null!=a?a.indent:void 0)?h:" ",e=null!=(i=null!=a?a.offset:void 0)?i:0,d=null!=(j=null!=a?a.newline:void 0)?j:"\n",b||(b=0),k=new Array(b+e+1).join(c),g="",f&&(g+=k),g+="",f&&(g+=d),g},a}()}).call(this)},{"lodash/lang/isArray":120,"lodash/object/create":128}],64:[function(a,b){(function(){var c,d,e;d=a("lodash/object/create"),e=a("lodash/lang/isObject"),b.exports=c=function(){function a(a,b,c,d){if(this.stringify=a.stringify,null==c)throw new Error("Missing entity name");if(null==d)throw new Error("Missing entity value");if(this.pe=!!b,this.name=this.stringify.eleName(c),e(d)){if(!d.pubID&&!d.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(d.pubID&&!d.sysID)throw new Error("System identifier is required for a public external entity");if(null!=d.pubID&&(this.pubID=this.stringify.dtdPubID(d.pubID)),null!=d.sysID&&(this.sysID=this.stringify.dtdSysID(d.sysID)),null!=d.nData&&(this.nData=this.stringify.dtdNData(d.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(d)}return a.prototype.clone=function(){return d(a.prototype,this)},a.prototype.toString=function(a,b){var c,d,e,f,g,h,i,j,k;return f=(null!=a?a.pretty:void 0)||!1,c=null!=(h=null!=a?a.indent:void 0)?h:" ",e=null!=(i=null!=a?a.offset:void 0)?i:0,d=null!=(j=null!=a?a.newline:void 0)?j:"\n",b||(b=0),k=new Array(b+e+1).join(c),g="",f&&(g+=k),g+="",f&&(g+=d),g},a}()}).call(this)},{"lodash/lang/isObject":124,"lodash/object/create":128}],65:[function(a,b){(function(){var c,d;d=a("lodash/object/create"),b.exports=c=function(){function a(a,b,c){if(this.stringify=a.stringify,null==b)throw new Error("Missing notation name");if(!c.pubID&&!c.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(b),null!=c.pubID&&(this.pubID=this.stringify.dtdPubID(c.pubID)),null!=c.sysID&&(this.sysID=this.stringify.dtdSysID(c.sysID))}return a.prototype.clone=function(){return d(a.prototype,this)},a.prototype.toString=function(a,b){var c,d,e,f,g,h,i,j,k;return f=(null!=a?a.pretty:void 0)||!1,c=null!=(h=null!=a?a.indent:void 0)?h:" ",e=null!=(i=null!=a?a.offset:void 0)?i:0,d=null!=(j=null!=a?a.newline:void 0)?j:"\n",b||(b=0),k=new Array(b+e+1).join(c),g="",f&&(g+=k),g+="",f&&(g+=d),g},a}()}).call(this)},{"lodash/object/create":128}],66:[function(a,b){(function(){var c,d,e,f,g=function(a,b){function c(){this.constructor=a}for(var d in b)h.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},h={}.hasOwnProperty;e=a("lodash/object/create"),f=a("lodash/lang/isObject"),d=a("./XMLNode"),b.exports=c=function(a){function b(a,c,d,e){var g;b.__super__.constructor.call(this,a),f(c)&&(g=c,c=g.version,d=g.encoding,e=g.standalone),c||(c="1.0"),null!=c&&(this.version=this.stringify.xmlVersion(c)),null!=d&&(this.encoding=this.stringify.xmlEncoding(d)),null!=e&&(this.standalone=this.stringify.xmlStandalone(e))}return g(b,a),b.prototype.clone=function(){return e(b.prototype,this)},b.prototype.toString=function(a,b){var c,d,e,f,g,h,i,j,k;return f=(null!=a?a.pretty:void 0)||!1,c=null!=(h=null!=a?a.indent:void 0)?h:" ",e=null!=(i=null!=a?a.offset:void 0)?i:0,d=null!=(j=null!=a?a.newline:void 0)?j:"\n",b||(b=0),k=new Array(b+e+1).join(c),g="",f&&(g+=k),g+="",f&&(g+=d),g},b}(d)}).call(this)},{"./XMLNode":69,"lodash/lang/isObject":124,"lodash/object/create":128}],67:[function(a,b){(function(){var c,d,e,f,g,h,i,j,k,l;k=a("lodash/object/create"),l=a("lodash/lang/isObject"),c=a("./XMLCData"),d=a("./XMLComment"),e=a("./XMLDTDAttList"),g=a("./XMLDTDEntity"),f=a("./XMLDTDElement"),h=a("./XMLDTDNotation"),j=a("./XMLProcessingInstruction"),b.exports=i=function(){function a(a,b,c){var d,e;this.documentObject=a,this.stringify=this.documentObject.stringify,this.children=[],l(b)&&(d=b,b=d.pubID,c=d.sysID),null==c&&(e=[b,c],c=e[0],b=e[1]),null!=b&&(this.pubID=this.stringify.dtdPubID(b)),null!=c&&(this.sysID=this.stringify.dtdSysID(c))}return a.prototype.clone=function(){return k(a.prototype,this)},a.prototype.element=function(a,b){var c;return c=new f(this,a,b),this.children.push(c),this},a.prototype.attList=function(a,b,c,d,f){var g;return g=new e(this,a,b,c,d,f),this.children.push(g),this},a.prototype.entity=function(a,b){var c;return c=new g(this,!1,a,b),this.children.push(c),this},a.prototype.pEntity=function(a,b){var c;return c=new g(this,!0,a,b),this.children.push(c),this},a.prototype.notation=function(a,b){var c;return c=new h(this,a,b),this.children.push(c),this},a.prototype.cdata=function(a){var b;return b=new c(this,a),this.children.push(b),this},a.prototype.comment=function(a){var b;return b=new d(this,a),this.children.push(b),this},a.prototype.instruction=function(a,b){var c;return c=new j(this,a,b),this.children.push(c),this},a.prototype.root=function(){return this.documentObject.root()},a.prototype.document=function(){return this.documentObject},a.prototype.toString=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;if(i=(null!=a?a.pretty:void 0)||!1,e=null!=(k=null!=a?a.indent:void 0)?k:" ",h=null!=(l=null!=a?a.offset:void 0)?l:0,g=null!=(m=null!=a?a.newline:void 0)?m:"\n",b||(b=0),o=new Array(b+h+1).join(e),j="",i&&(j+=o),j+="0){for(j+=" [",i&&(j+=g),n=this.children,d=0,f=n.length;f>d;d++)c=n[d],j+=c.toString(a,b+1);j+="]"}return j+=">",i&&(j+=g),j},a.prototype.ele=function(a,b){return this.element(a,b)},a.prototype.att=function(a,b,c,d,e){return this.attList(a,b,c,d,e)},a.prototype.ent=function(a,b){return this.entity(a,b)},a.prototype.pent=function(a,b){return this.pEntity(a,b)},a.prototype.not=function(a,b){return this.notation(a,b)},a.prototype.dat=function(a){return this.cdata(a)},a.prototype.com=function(a){return this.comment(a)},a.prototype.ins=function(a,b){return this.instruction(a,b)},a.prototype.up=function(){return this.root()},a.prototype.doc=function(){return this.document()},a}()}).call(this)},{"./XMLCData":60,"./XMLComment":61,"./XMLDTDAttList":62,"./XMLDTDElement":63,"./XMLDTDEntity":64,"./XMLDTDNotation":65,"./XMLProcessingInstruction":70,"lodash/lang/isObject":124,"lodash/object/create":128}],68:[function(a,b){(function(){var c,d,e,f,g,h,i,j,k,l=function(a,b){function c(){this.constructor=a;
-},{}],1:[function(require,module,exports){
-(function (process){
-module.exports = process.env.GPXPARSE_COV ? require('./lib-cov/gpx-parse') : require('./lib/gpx-parse');
-
-}).call(this,require('_process'))
-},{"./lib-cov/gpx-parse":"./lib-cov/gpx-parse","./lib/gpx-parse":3,"_process":21}],2:[function(require,module,exports){
-/**
- * Contians utility functions for calculating values on geometries
- * @module geomutils
-**/
-
-//File for geom utils
-if (!Number.prototype.toRad) {
- Number.prototype.toRad = function() {
- return this * Math.PI / 180;
- };
-
-}
-
-var greatCircleRadius = {
- miles: 3956,
- km: 6367
-};
-
-/**
- * Calculates the distance between the two points using the haversine method.
- * @param {number} lat1 The latitude of the first point.
- * @param {number} lon1 The longtitude of the first point.
- * @param {number} lat2 The latitude of the first point.
- * @param {number} lon2 The longtitude of the first point.
- * @returns {number} The distance in miles between the two points.
-**/
-exports.calculateDistance = function(lat1, lon1, lat2, lon2) {
- var dLat = (lat2 - lat1).toRad(),
- dLon = (lon2 - lon1).toRad();
-
- lat1 = lat1.toRad();
- lat2 = lat2.toRad();
-
- var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
- Math.sin(dLon / 2) * Math.sin(dLon / 2) * Math.cos(lat1) * Math.cos(lat2);
- var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
- return greatCircleRadius.miles * c;
-};
-
-/**
- * Calcuates the midpoint between the two points passed in.
- * @param {number} lat1 The latitude of the first point.
- * @param {number} lon1 The longtitude of the first point.
- * @param {number} lat2 The latitude of the first point.
- * @param {number} lon2 The longtitude of the first point.
- */
-exports.calculateMidpoint = function(lat1, lon1, lat2, lon2) {
- var dLat = (lat2 - lat1).toRad(),
- dLon = (lon2 - lon1).toRad();
-
- lat1 = lat1.toRad();
- lat2 = lat2.toRad();
-
- var Bx = Math.cos(lat2) * Math.cos(dLon);
- var By = Math.cos(lat2) * Math.sin(dLon);
- var lat3 = Math.atan2(Math.sin(lat1) + Math.sin(lat2),
- Math.sqrt((Math.cos(lat1) + Bx) * (Math.cos(lat1) + Bx) + By * By));
- var lon3 = lon1 + Math.atan2(By, Math.cos(lat1) + Bx);
-};
-
-},{}],3:[function(require,module,exports){
-/**
- * Module for parsing gpx files
- * @module gpx-parse
-**/
-
- /*jslint node: true */
-"use strict";
-
-var assert = require("assert"),
- fs = require("fs"),
- url = require("url"),
- http = require("http"),
- https = require("https"),
- GpxResult = require('./gpxResult'),
- GpxExtent = require('./gpxExtent'),
- GpxWaypoint = require('./gpxWaypoint'),
- GpxTrack = require('./gpxTrack'),
- GpxMetaData = require('./gpxMetaData'),
- GpxRoute = require('./gpxRoute'),
- geomUtils = require('./geomUtils');
-
-
-/**
- * Parses the waypoints into an array of waypoints.
- * @param {Array