v((m-l)/o))&&w("overflow"),l+=a*o,!(a<(a=s<=p?1:p+g<=s?g:s-p));s+=b)o>v(m/(a=b-a))&&w("overflow"),o*=a;p=k(l-i,t=c.length+1,0==i),v(l/t)>m-f&&w("overflow"),f+=v(l/t),l%=t,c.splice(l++,0,f)}return y(c)}function T(e){for(var t,r,n,i,o,s,a,c,u,l,f=[],p=(e=x(e)).length,d=128,h=72,y=t=0;yv((m-t)/(c=r+1))&&w("overflow"),t+=(i-d)*c,d=i,y=0;y
m&&w("overflow"),a==d){for(o=t,s=b;!(o<(u=s<=h?1:h+g<=s?g:s-h));s+=b)f.push(j(S(u+(l=o-u)%(u=b-u),0))),o=v(l/u);f.push(j(S(o,0))),h=k(t,c,r==n),t=0,++r}++t,++d}return f.join("")}if(i={version:"1.4.1",ucs2:{decode:x,encode:y},decode:_,encode:T,toASCII:function(e){return h(e,function(e){return u.test(e)?"xn--"+T(e):e})},toUnicode:function(e){return h(e,function(e){return c.test(e)?_(e.slice(4).toLowerCase()):e})}},t&&r)if(O.exports==t)r.exports=i;else for(o in i)i.hasOwnProperty(o)&&(t[o]=i[o]);else e.punycode=i}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],446:[function(e,t,r){"use strict";var n=String.prototype.replace,i=/%20/g,o="RFC1738",s="RFC3986";t.exports={default:s,formatters:{RFC1738:function(e){return n.call(e,i,"+")},RFC3986:function(e){return String(e)}},RFC1738:o,RFC3986:s}},{}],447:[function(e,t,r){"use strict";var n=e("./stringify"),i=e("./parse"),e=e("./formats");t.exports={formats:e,parse:i,stringify:n}},{"./formats":446,"./parse":448,"./stringify":449}],448:[function(e,t,r){"use strict";function c(e,t){var r,n,i,o,s={__proto__:null},e=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,c=e.split(t.delimiter,a),u=-1,l=t.charset;if(t.charsetSentinel)for(r=0;r>6]+l[128|63&c]:c<55296||57344<=c?s+=l[224|c>>12]+l[128|c>>6&63]+l[128|63&c]:(a+=1,c=65536+((1023&c)<<10|1023&o.charCodeAt(a)),s+=l[240|c>>18]+l[128|c>>12&63]+l[128|c>>6&63]+l[128|63&c])}return s},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(y(e)){for(var r=[],n=0;nt.highWaterMark&&(t.highWaterMark=(d<=(r=e)?r=d:(r--,r=(r=(r=(r=(r|=r>>>1)|r>>>2)|r>>>4)|r>>>8)|r>>>16,r++),r)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function v(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?m.nextTick(j,e):j(e))}function j(e){g("emit readable"),e.emit("readable"),_(e)}function w(e,t){t.readingMore||(t.readingMore=!0,m.nextTick(x,e,t))}function x(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0===(e-=s)){s===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r).data=o.slice(s);break}++n}return t.length-=n,i}:function(e,t){var r=l.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,s),0===(e-=s)){s===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n).data=o.slice(s);break}++i}return t.length-=i,r})(e,t);return n}(e,t.buffer,t.decoder),r)}function E(e){var t=e._readableState;if(0=r.highWaterMark||r.ended)?(g("read: emitReadable",r.length,r.ended),(0===r.length&&r.ended?E:v)(this),null):0===(e=h(e,r))&&r.ended?(0===r.length&&E(this),null):(t=r.needReadable,g("need readable",t),(0===r.length||r.length-e>>0),i=this.head,o=0;i;)t=i.data,r=o,t.copy(n,r),o+=i.data.length,i=i.next;return n},i),n&&n.inspect&&n.inspect.custom&&(t.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":463,util:102}],460:[function(e,t,r){"use strict";var o=e("process-nextick-args");function s(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,o.nextTick(s,this,e)):o.nextTick(s,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,o.nextTick(s,r,e)):o.nextTick(s,r,e):t&&t(e)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":443}],461:[function(e,t,r){t.exports=e("events").EventEmitter},{events:388}],462:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],463:[function(e,t,r){var n=e("buffer"),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,r),r.Buffer=s),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");e=i(e);return void 0!==t?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:103}],464:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"==typeof t||n.isEncoding!==i&&i(e))return t||e;throw new Error("Unknown encoding: "+e)}function s(e){var t;switch(this.encoding=o(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=c,t=4;break;case"base64":this.text=f,this.end=p,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function c(e){var t,r=this.lastTotal-this.lastNeed,n=(t=this,128!=(192&(n=e)[0])?(t.lastNeed=0,"\ufffd"):1"===o?(k(t,"onsgmldeclaration",t.sgmlDecl),t.sgmlDecl="",t.state=x.TEXT):(g(o)&&(t.state=x.SGML_DECL_QUOTED),t.sgmlDecl+=o);continue;case x.SGML_DECL_QUOTED:o===t.q&&(t.state=x.SGML_DECL,t.q=""),t.sgmlDecl+=o;continue;case x.DOCTYPE:">"===o?(t.state=x.TEXT,k(t,"ondoctype",t.doctype),t.doctype=!0):(t.doctype+=o,"["===o?t.state=x.DOCTYPE_DTD:g(o)&&(t.state=x.DOCTYPE_QUOTED,t.q=o));continue;case x.DOCTYPE_QUOTED:t.doctype+=o,o===t.q&&(t.q="",t.state=x.DOCTYPE);continue;case x.DOCTYPE_DTD:t.doctype+=o,"]"===o?t.state=x.DOCTYPE:g(o)&&(t.state=x.DOCTYPE_DTD_QUOTED,t.q=o);continue;case x.DOCTYPE_DTD_QUOTED:t.doctype+=o,o===t.q&&(t.state=x.DOCTYPE_DTD,t.q="");continue;case x.COMMENT:"-"===o?t.state=x.COMMENT_ENDING:t.comment+=o;continue;case x.COMMENT_ENDING:"-"===o?(t.state=x.COMMENT_ENDED,t.comment=T(t.opt,t.comment),t.comment&&k(t,"oncomment",t.comment),t.comment=""):(t.comment+="-"+o,t.state=x.COMMENT);continue;case x.COMMENT_ENDED:">"!==o?(A(t,"Malformed comment"),t.comment+="--"+o,t.state=x.COMMENT):t.state=x.TEXT;continue;case x.CDATA:"]"===o?t.state=x.CDATA_ENDING:t.cdata+=o;continue;case x.CDATA_ENDING:"]"===o?t.state=x.CDATA_ENDING_2:(t.cdata+="]"+o,t.state=x.CDATA);continue;case x.CDATA_ENDING_2:">"===o?(t.cdata&&k(t,"oncdata",t.cdata),k(t,"onclosecdata"),t.cdata="",t.state=x.TEXT):"]"===o?t.cdata+="]":(t.cdata+="]]"+o,t.state=x.CDATA);continue;case x.PROC_INST:"?"===o?t.state=x.PROC_INST_ENDING:b(o)?t.state=x.PROC_INST_BODY:t.procInstName+=o;continue;case x.PROC_INST_BODY:if(!t.procInstBody&&b(o))continue;"?"===o?t.state=x.PROC_INST_ENDING:t.procInstBody+=o;continue;case x.PROC_INST_ENDING:">"===o?(k(t,"onprocessinginstruction",{name:t.procInstName,body:t.procInstBody}),t.procInstName=t.procInstBody="",t.state=x.TEXT):(t.procInstBody+="?"+o,t.state=x.PROC_INST_BODY);continue;case x.OPEN_TAG:v(y,o)?t.tagName+=o:(function(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,r=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(r.ns=t.ns);e.attribList.length=0,k(e,"onopentagstart",r)}(t),">"===o?R(t):"/"===o?t.state=x.OPEN_TAG_SLASH:(b(o)||A(t,"Invalid character in tag name"),t.state=x.ATTRIB));continue;case x.OPEN_TAG_SLASH:">"===o?(R(t,!0),C(t)):(A(t,"Forward-slash in opening tag not followed by >"),t.state=x.ATTRIB);continue;case x.ATTRIB:if(b(o))continue;">"===o?R(t):"/"===o?t.state=x.OPEN_TAG_SLASH:v(h,o)?(t.attribName=o,t.attribValue="",t.state=x.ATTRIB_NAME):A(t,"Invalid attribute name");continue;case x.ATTRIB_NAME:"="===o?t.state=x.ATTRIB_VALUE:">"===o?(A(t,"Attribute without value"),t.attribValue=t.attribName,D(t),R(t)):b(o)?t.state=x.ATTRIB_NAME_SAW_WHITE:v(y,o)?t.attribName+=o:A(t,"Invalid attribute name");continue;case x.ATTRIB_NAME_SAW_WHITE:if("="===o)t.state=x.ATTRIB_VALUE;else{if(b(o))continue;A(t,"Attribute without value"),t.tag.attributes[t.attribName]="",t.attribValue="",k(t,"onattribute",{name:t.attribName,value:""}),t.attribName="",">"===o?R(t):v(h,o)?(t.attribName=o,t.state=x.ATTRIB_NAME):(A(t,"Invalid attribute name"),t.state=x.ATTRIB)}continue;case x.ATTRIB_VALUE:if(b(o))continue;g(o)?(t.q=o,t.state=x.ATTRIB_VALUE_QUOTED):(A(t,"Unquoted attribute value"),t.state=x.ATTRIB_VALUE_UNQUOTED,t.attribValue=o);continue;case x.ATTRIB_VALUE_QUOTED:if(o!==t.q){"&"===o?t.state=x.ATTRIB_VALUE_ENTITY_Q:t.attribValue+=o;continue}D(t),t.q="",t.state=x.ATTRIB_VALUE_CLOSED;continue;case x.ATTRIB_VALUE_CLOSED:b(o)?t.state=x.ATTRIB:">"===o?R(t):"/"===o?t.state=x.OPEN_TAG_SLASH:v(h,o)?(A(t,"No whitespace between attributes"),t.attribName=o,t.attribValue="",t.state=x.ATTRIB_NAME):A(t,"Invalid attribute name");continue;case x.ATTRIB_VALUE_UNQUOTED:if(!function(e){return">"===e||b(e)}(o)){"&"===o?t.state=x.ATTRIB_VALUE_ENTITY_U:t.attribValue+=o;continue}D(t),">"===o?R(t):t.state=x.ATTRIB;continue;case x.CLOSE_TAG:if(t.tagName)">"===o?C(t):v(y,o)?t.tagName+=o:t.script?(t.script+=""+t.tagName,t.tagName="",t.state=x.SCRIPT):(b(o)||A(t,"Invalid tagname in closing tag"),t.state=x.CLOSE_TAG_SAW_WHITE);else{if(b(o))continue;!function(e,t){return!v(e,t)}(h,o)?t.tagName=o:t.script?(t.script+=""+o,t.state=x.SCRIPT):A(t,"Invalid tagname in closing tag.")}continue;case x.CLOSE_TAG_SAW_WHITE:if(b(o))continue;">"===o?C(t):A(t,"Invalid characters in closing tag");continue;case x.TEXT_ENTITY:case x.ATTRIB_VALUE_ENTITY_Q:case x.ATTRIB_VALUE_ENTITY_U:switch(t.state){case x.TEXT_ENTITY:r=x.TEXT,n="textNode";break;case x.ATTRIB_VALUE_ENTITY_Q:r=x.ATTRIB_VALUE_QUOTED,n="attribValue";break;case x.ATTRIB_VALUE_ENTITY_U:r=x.ATTRIB_VALUE_UNQUOTED,n="attribValue"}var a;";"===o?t.opt.unparsedEntities?(a=M(t),t.entity="",t.state=r,t.write(a)):(t[n]+=M(t),t.entity="",t.state=r):v(t.entity.length?L:m,o)?t.entity+=o:(A(t,"Invalid character in entity name"),t[n]+="&"+t.entity+o,t.entity="",t.state=r);continue;default:throw new Error(t,"Unknown state: "+t.state)}}t.position>=t.bufferCheckPosition&&!function(e){for(var t=Math.max(c.MAX_BUFFER_LENGTH,10),r=0,n=0,i=u.length;n",lt:"<",quot:'"',apos:"'"},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(e){var t=c.ENTITIES[e],t="number"==typeof t?String.fromCharCode(t):t;c.ENTITIES[e]=t}),c.STATE)c.STATE[c.STATE[e]]=e;function S(e,t,r){e[t]&&e[t](r)}function k(e,t,r){e.textNode&&_(e),S(e,t,r)}function _(e){e.textNode=T(e.opt,e.textNode),e.textNode&&S(e,"ontext",e.textNode),e.textNode=""}function T(e,t){return e.trim&&(t=t.trim()),t=e.normalize?t.replace(/\s+/g," "):t}function E(e,t){return _(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,S(e,"onerror",t),e}function O(e){return e.sawRoot&&!e.closedRoot&&A(e,"Unclosed root tag"),e.state!==x.BEGIN&&e.state!==x.BEGIN_WHITESPACE&&e.state!==x.TEXT&&E(e,"Unexpected end"),_(e),e.c="",e.closed=!0,S(e,"onend"),s.call(e,e.strict,e.opt),e}function A(e,t){if("object"!=typeof e||!(e instanceof s))throw new Error("bad call to strictFail");e.strict&&E(e,t)}function I(e,t){var r=e.indexOf(":")<0?["",e]:e.split(":"),n=r[0],r=r[1];return t&&"xmlns"===e&&(n="xmlns",r=""),{prefix:n,local:r}}function D(e){var t,r,n;e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName)||(e.opt.xmlns?(r=(t=I(e.attribName,!0)).prefix,t=t.local,"xmlns"===r&&("xml"===t&&e.attribValue!==a?A(e,"xml: prefix must be bound to "+a+"\nActual: "+e.attribValue):"xmlns"===t&&e.attribValue!==p?A(e,"xmlns: prefix must be bound to "+p+"\nActual: "+e.attribValue):(r=e.tag,n=e.tags[e.tags.length-1]||e,r.ns===n.ns&&(r.ns=Object.create(n.ns)),r.ns[t]=e.attribValue)),e.attribList.push([e.attribName,e.attribValue])):(e.tag.attributes[e.attribName]=e.attribValue,k(e,"onattribute",{name:e.attribName,value:e.attribValue}))),e.attribName=e.attribValue=""}function R(t,e){if(t.opt.xmlns){var r=t.tag,n=I(t.tagName),n=(r.prefix=n.prefix,r.local=n.local,r.uri=r.ns[n.prefix]||"",r.prefix&&!r.uri&&(A(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),r.uri=n.prefix),t.tags[t.tags.length-1]||t);r.ns&&n.ns!==r.ns&&Object.keys(r.ns).forEach(function(e){k(t,"onopennamespace",{prefix:e,uri:r.ns[e]})});for(var i=0,o=t.attribList.length;i",r.tagName="",void(r.state=x.SCRIPT);k(r,"onscript",r.script),r.script=""}for(var e=r.tags.length,t=r.tagName,n=t=r.strict?t:t[r.looseCase]();e--&&r.tags[e].name!==n;)A(r,"Unexpected close tag");if(e<0)A(r,"Unmatched closing tag: "+r.tagName),r.textNode+=""+r.tagName+">";else{r.tagName=t;for(var i=r.tags.length;i-- >e;){var o,s=r.tag=r.tags.pop();r.tagName=r.tag.name,k(r,"onclosetag",r.tagName);for(o in s.ns)o,s.ns[o];var a=r.tags[r.tags.length-1]||r;r.opt.xmlns&&s.ns!==a.ns&&Object.keys(s.ns).forEach(function(e){var t=s.ns[e];k(r,"onclosenamespace",{prefix:e,uri:t})})}0===e&&(r.closedRoot=!0),r.tagName=r.attribValue=r.attribName="",r.attribList.length=0}}else A(r,"Weird empty close tag."),r.textNode+=">";r.state=x.TEXT}function M(e){var t,r=e.entity,n=r.toLowerCase(),i="";return e.ENTITIES[r]||e.ENTITIES[n]||("#"===(r=n).charAt(0)&&(i="x"===r.charAt(1)?(r=r.slice(2),(t=parseInt(r,16)).toString(16)):(r=r.slice(1),(t=parseInt(r,10)).toString(10))),r=r.replace(/^0+/,""),isNaN(t)||i.toLowerCase()!==r?(A(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function P(e,t){"<"===t?(e.state=x.OPEN_WAKA,e.startTagPosition=e.position):b(t)||(A(e,"Non-whitespace before first tag."),e.textNode=t,e.state=x.TEXT)}function N(e,t){var r="";return r=t>10),i%1024+56320),(t+1===r||16384o.length)&&(a=o.length),o=(o.substring(a-s.length,a)===s?"The ".concat(e," "):(a=(i="number"!=typeof i?0:i)+(o=".").length>(a=e).length||-1===a.indexOf(o,i)?"argument":"property",'The "'.concat(e,'" ').concat(a," "))).concat(n," ").concat(c(t,"type")),o+=". Received type ".concat(typeof r)},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},{}],472:[function(l,f,e){!function(u){!function(){"use strict";var e=Object.keys||function(e){var t,r=[];for(t in e)r.push(t);return r},t=(f.exports=s,l("./_stream_readable")),r=l("./_stream_writable");l("inherits")(s,t);for(var n=e(r.prototype),i=0;it.highWaterMark&&(t.highWaterMark=(S<=(r=e)?r=S:(r--,r=(r=(r=(r=(r|=r>>>1)|r>>>2)|r>>>4)|r>>>8)|r>>>16,r++),r)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function _(e){var t=e._readableState;y("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(y("emitReadable",t.flowing),t.emittedReadable=!0,L.nextTick(T,e))}function T(e){var t=e._readableState;y("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,R(e)}function E(e,t){t.readingMore||(t.readingMore=!0,L.nextTick(O,e,t))}function O(e,t){for(;!t.reading&&!t.ended&&(t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function M(e){var t=e._readableState;y("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,L.nextTick(N,t,e))}function N(e,t){y("endReadableNT",e.endEmitted,e.length),e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy&&(!(e=t._writableState)||e.autoDestroy&&e.finished)&&t.destroy())}function P(e,t){for(var r=0,n=e.length;r=r.highWaterMark:0>>0),i=this.head,o=0;i;)t=i.data,r=o,c.prototype.copy.call(t,n,r),o+=i.data.length,i=i.next;return n}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0===(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t).data=i.slice(o);break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=c.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0===(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r).data=i.slice(o);break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return u(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&s(t.prototype,r),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},{buffer:103,util:102}],479:[function(e,t,r){!function(c){!function(){"use strict";function o(e,t){a(e,t),s(e)}function s(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function a(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,c.nextTick(a,this,e)):c.nextTick(a,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?r._writableState?r._writableState.errorEmitted?c.nextTick(s,r):(r._writableState.errorEmitted=!0,c.nextTick(o,r,e)):c.nextTick(o,r,e):t?(c.nextTick(s,r),t(e)):c.nextTick(s,r)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}.call(this)}.call(this,e("_process"))},{_process:540}],480:[function(e,t,r){"use strict";var b=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function g(){}t.exports=function e(t,r,n){var i,o,s,a,c,u,l,f,p,d,h,y,m;return"function"==typeof r?e(t,null,r):(i=n||g,o=!1,n=function(){if(!o){o=!0;for(var e=arguments.length,t=new Array(e),r=0;r")||0<=e.indexOf("<"))},d=function(e){return""},t=function(e){return e.replace("]]>","]]]]>")},o.Builder=(e.prototype.buildObject=function(e){var c,t,u,l=this.options.attrkey,f=this.options.charkey;return 1===Object.keys(e).length&&this.options.rootName===i[.2].rootName?e=e[t=Object.keys(e)[0]]:t=this.options.rootName,u=this,c=function(e,t){var r,n,i,o,s,a;if("object"!=typeof t)u.options.cdata&&p(t)?e.raw(d(t)):e.txt(t);else if(Array.isArray(t)){for(o in t)if(h.call(t,o))for(s in n=t[o])i=n[s],e=c(e.ele(s),i).up()}else for(s in t)if(h.call(t,s))if(n=t[s],s===l){if("object"==typeof n)for(r in n)a=n[r],e=e.att(r,a)}else if(s===f)e=u.options.cdata&&p(n)?e.raw(d(n)):e.txt(n);else if(Array.isArray(n))for(o in n)h.call(n,o)&&(e=("string"==typeof(i=n[o])?u.options.cdata&&p(i)?e.ele(s).raw(d(i)):e.ele(s,i):c(e.ele(s),i)).up());else e=("object"==typeof n?c(e.ele(s),n):"string"==typeof n&&u.options.cdata&&p(n)?e.ele(s).raw(d(n)):(null==n&&(n=""),e.ele(s,n.toString()))).up();return e},t=r.create(t,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),c(t,e).end(this.options.renderOpts)},e)}.call(this)},{"./defaults":495,xmlbuilder:531}],495:[function(e,t,r){!function(){r.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,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors: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,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:"\n"},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}.call(this)},{}],496:[function(e,t,m){!function(){"use strict";function o(e,t){return function(){return e.apply(t,arguments)}}var p={}.hasOwnProperty,c=e("sax"),s=e("events"),a=e("./bom"),u=e("./processors"),l=e("timers").setImmediate,f=e("./defaults").defaults,d=function(e){return"object"==typeof e&&null!=e&&0===Object.keys(e).length},h=function(e,t,r){for(var n=0,i=e.length;n":"attribute: {"+e+"}, parent: <"+this.parent.name+">"},e.prototype.isEqualNode=function(e){return e.namespaceURI===this.namespaceURI&&e.prefix===this.prefix&&e.localName===this.localName&&e.value===this.value},e)}.call(this)},{"./NodeType":500,"./XMLNode":522}],504:[function(e,t,r){!function(){var o={}.hasOwnProperty,s=e("./NodeType"),a=e("./XMLCharacterData");t.exports=function(){var e,t=i,r=a;for(e in r)o.call(r,e)&&(t[e]=r[e]);function n(){this.constructor=t}function i(e,t){if(i.__super__.constructor.call(this,e),null==t)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=s.CData,this.value=this.stringify.cdata(t)}return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(e){return this.options.writer.cdata(this,this.options.writer.filterOptions(e))},i}()}.call(this)},{"./NodeType":500,"./XMLCharacterData":505}],505:[function(e,t,r){!function(){var o={}.hasOwnProperty,s=e("./XMLNode");t.exports=function(){var e,t=i,r=s;for(e in r)o.call(r,e)&&(t[e]=r[e]);function n(){this.constructor=t}function i(e){i.__super__.constructor.call(this,e),this.value=""}return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,Object.defineProperty(i.prototype,"data",{get:function(){return this.value},set:function(e){return this.value=e||""}}),Object.defineProperty(i.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(i.prototype,"textContent",{get:function(){return this.value},set:function(e){return this.value=e||""}}),i.prototype.clone=function(){return Object.create(this)},i.prototype.substringData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.appendData=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.insertData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.deleteData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.replaceData=function(e,t,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.isEqualNode=function(e){return!!i.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)&&e.data===this.data},i}()}.call(this)},{"./XMLNode":522}],506:[function(e,t,r){!function(){var o={}.hasOwnProperty,s=e("./NodeType"),a=e("./XMLCharacterData");t.exports=function(){var e,t=i,r=a;for(e in r)o.call(r,e)&&(t[e]=r[e]);function n(){this.constructor=t}function i(e,t){if(i.__super__.constructor.call(this,e),null==t)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=s.Comment,this.value=this.stringify.comment(t)}return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(e){return this.options.writer.comment(this,this.options.writer.filterOptions(e))},i}()}.call(this)},{"./NodeType":500,"./XMLCharacterData":505}],507:[function(n,i,e){!function(){var e,t;function r(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Object.create(this.defaultParams)}e=n("./XMLDOMErrorHandler"),t=n("./XMLDOMStringList"),i.exports=(Object.defineProperty(r.prototype,"parameterNames",{get:function(){return new t(Object.keys(this.defaultParams))}}),r.prototype.getParameter=function(e){return this.params.hasOwnProperty(e)?this.params[e]:null},r.prototype.canSetParameter=function(e,t){return!0},r.prototype.setParameter=function(e,t){return null!=t?this.params[e]=t:delete this.params[e]},r)}.call(this)},{"./XMLDOMErrorHandler":508,"./XMLDOMStringList":510}],508:[function(e,t,r){!function(){function e(){}t.exports=(e.prototype.handleError=function(e){throw new Error(e)},e)}.call(this)},{}],509:[function(e,t,r){!function(){function e(){}t.exports=(e.prototype.hasFeature=function(e,t){return!0},e.prototype.createDocumentType=function(e,t,r){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(e,t,r){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(e){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(e,t){throw new Error("This DOM method is not implemented.")},e)}.call(this)},{}],510:[function(e,t,r){!function(){function e(e){this.arr=e||[]}t.exports=(Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e.prototype.item=function(e){return this.arr[e]||null},e.prototype.contains=function(e){return-1!==this.arr.indexOf(e)},e)}.call(this)},{}],511:[function(e,t,r){!function(){var i={}.hasOwnProperty,o=e("./XMLNode"),a=e("./NodeType");t.exports=function(){var e,t=s,r=o;for(e in r)i.call(r,e)&&(t[e]=r[e]);function n(){this.constructor=t}function s(e,t,r,n,i,o){if(s.__super__.constructor.call(this,e),null==t)throw new Error("Missing DTD element name. "+this.debugInfo());if(null==r)throw new Error("Missing DTD attribute name. "+this.debugInfo(t));if(!n)throw new Error("Missing DTD attribute type. "+this.debugInfo(t));if(!i)throw new Error("Missing DTD attribute default. "+this.debugInfo(t));if(!(i=0!==i.indexOf("#")?"#"+i:i).match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(t));if(o&&!i.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(t));this.elementName=this.stringify.name(t),this.type=a.AttributeDeclaration,this.attributeName=this.stringify.name(r),this.attributeType=this.stringify.dtdAttType(n),o&&(this.defaultValue=this.stringify.dtdAttDefault(o)),this.defaultValueType=i}return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,s.prototype.toString=function(e){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(e))},s}()}.call(this)},{"./NodeType":500,"./XMLNode":522}],512:[function(e,t,r){!function(){var o={}.hasOwnProperty,s=e("./XMLNode"),a=e("./NodeType");t.exports=function(){var e,t=i,r=s;for(e in r)o.call(r,e)&&(t[e]=r[e]);function n(){this.constructor=t}function i(e,t,r){if(i.__super__.constructor.call(this,e),null==t)throw new Error("Missing DTD element name. "+this.debugInfo());r=r||"(#PCDATA)",Array.isArray(r)&&(r="("+r.join(",")+")"),this.name=this.stringify.name(t),this.type=a.ElementDeclaration,this.value=this.stringify.dtdElementValue(r)}return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,i.prototype.toString=function(e){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(e))},i}()}.call(this)},{"./NodeType":500,"./XMLNode":522}],513:[function(e,t,r){!function(){var o={}.hasOwnProperty,s=e("./Utility").isObject,a=e("./XMLNode"),c=e("./NodeType");t.exports=function(){var e,t=i,r=a;for(e in r)o.call(r,e)&&(t[e]=r[e]);function n(){this.constructor=t}function i(e,t,r,n){if(i.__super__.constructor.call(this,e),null==r)throw new Error("Missing DTD entity name. "+this.debugInfo(r));if(null==n)throw new Error("Missing DTD entity value. "+this.debugInfo(r));if(this.pe=!!t,this.name=this.stringify.name(r),this.type=c.EntityDeclaration,s(n)){if(!n.pubID&&!n.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(r));if(n.pubID&&!n.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(r));if(this.internal=!1,null!=n.pubID&&(this.pubID=this.stringify.dtdPubID(n.pubID)),null!=n.sysID&&(this.sysID=this.stringify.dtdSysID(n.sysID)),null!=n.nData&&(this.nData=this.stringify.dtdNData(n.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(r))}else this.value=this.stringify.dtdEntityValue(n),this.internal=!0}return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,Object.defineProperty(i.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(i.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(i.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(i.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(i.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(i.prototype,"xmlVersion",{get:function(){return null}}),i.prototype.toString=function(e){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(e))},i}()}.call(this)},{"./NodeType":500,"./Utility":501,"./XMLNode":522}],514:[function(e,t,r){!function(){var o={}.hasOwnProperty,s=e("./XMLNode"),a=e("./NodeType");t.exports=function(){var e,t=i,r=s;for(e in r)o.call(r,e)&&(t[e]=r[e]);function n(){this.constructor=t}function i(e,t,r){if(i.__super__.constructor.call(this,e),null==t)throw new Error("Missing DTD notation name. "+this.debugInfo(t));if(!r.pubID&&!r.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(t));this.name=this.stringify.name(t),this.type=a.NotationDeclaration,null!=r.pubID&&(this.pubID=this.stringify.dtdPubID(r.pubID)),null!=r.sysID&&(this.sysID=this.stringify.dtdSysID(r.sysID))}return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,Object.defineProperty(i.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(i.prototype,"systemId",{get:function(){return this.sysID}}),i.prototype.toString=function(e){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(e))},i}()}.call(this)},{"./NodeType":500,"./XMLNode":522}],515:[function(e,t,r){!function(){var o={}.hasOwnProperty,s=e("./Utility").isObject,a=e("./XMLNode"),c=e("./NodeType");t.exports=function(){var e,t=i,r=a;for(e in r)o.call(r,e)&&(t[e]=r[e]);function n(){this.constructor=t}function i(e,t,r,n){i.__super__.constructor.call(this,e),s(t)&&(t=(e=t).version,r=e.encoding,n=e.standalone),t=t||"1.0",this.type=c.Declaration,this.version=this.stringify.xmlVersion(t),null!=r&&(this.encoding=this.stringify.xmlEncoding(r)),null!=n&&(this.standalone=this.stringify.xmlStandalone(n))}return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,i.prototype.toString=function(e){return this.options.writer.declaration(this,this.options.writer.filterOptions(e))},i}()}.call(this)},{"./NodeType":500,"./Utility":501,"./XMLNode":522}],516:[function(e,t,r){!function(){var i={}.hasOwnProperty,c=e("./Utility").isObject,o=e("./XMLNode"),u=e("./NodeType"),s=e("./XMLDTDAttList"),l=e("./XMLDTDEntity"),f=e("./XMLDTDElement"),p=e("./XMLDTDNotation"),d=e("./XMLNamedNodeMap");t.exports=function(){var e,t=a,r=o;for(e in r)i.call(r,e)&&(t[e]=r[e]);function n(){this.constructor=t}function a(e,t,r){var n,i,o,s;if(a.__super__.constructor.call(this,e),this.type=u.DocType,e.children)for(i=0,o=(s=e.children).length;i":"/>")+this.writer.endline(e,this.writerOptions,this.currentLevel),this.writerOptions.state=o.InsideTag}else this.writerOptions.state=o.OpenTag,r=this.writer.indent(e,this.writerOptions,this.currentLevel)+""),r+=this.writer.endline(e,this.writerOptions,this.currentLevel);return this.onData(r,this.currentLevel),e.isOpen=!0}},k.prototype.closeNode=function(e){var t;if(!e.isClosed)return t="",this.writerOptions.state=o.CloseTag,t=e.type===u.Element?this.writer.indent(e,this.writerOptions,this.currentLevel)+""+e.name+">"+this.writer.endline(e,this.writerOptions,this.currentLevel):this.writer.indent(e,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(e,this.writerOptions,this.currentLevel),this.writerOptions.state=o.None,this.onData(t,this.currentLevel),e.isClosed=!0},k.prototype.onData=function(e,t){return this.documentStarted=!0,this.onDataCallback(e,t+1)},k.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},k.prototype.debugInfo=function(e){return null==e?"":"node: <"+e+">"},k.prototype.ele=function(){return this.element.apply(this,arguments)},k.prototype.nod=function(e,t,r){return this.node(e,t,r)},k.prototype.txt=function(e){return this.text(e)},k.prototype.dat=function(e){return this.cdata(e)},k.prototype.com=function(e){return this.comment(e)},k.prototype.ins=function(e,t){return this.instruction(e,t)},k.prototype.dec=function(e,t,r){return this.declaration(e,t,r)},k.prototype.dtd=function(e,t,r){return this.doctype(e,t,r)},k.prototype.e=function(e,t,r){return this.element(e,t,r)},k.prototype.n=function(e,t,r){return this.node(e,t,r)},k.prototype.t=function(e){return this.text(e)},k.prototype.d=function(e){return this.cdata(e)},k.prototype.c=function(e){return this.comment(e)},k.prototype.r=function(e){return this.raw(e)},k.prototype.i=function(e,t){return this.instruction(e,t)},k.prototype.att=function(){return(this.currentNode&&this.currentNode.type===u.DocType?this.attList:this.attribute).apply(this,arguments)},k.prototype.a=function(){return(this.currentNode&&this.currentNode.type===u.DocType?this.attList:this.attribute).apply(this,arguments)},k.prototype.ent=function(e,t){return this.entity(e,t)},k.prototype.pent=function(e,t){return this.pEntity(e,t)},k.prototype.not=function(e,t){return this.notation(e,t)},k)}.call(this)},{"./NodeType":500,"./Utility":501,"./WriterState":502,"./XMLAttribute":503,"./XMLCData":504,"./XMLComment":506,"./XMLDTDAttList":511,"./XMLDTDElement":512,"./XMLDTDEntity":513,"./XMLDTDNotation":514,"./XMLDeclaration":515,"./XMLDocType":516,"./XMLDocument":517,"./XMLElement":520,"./XMLProcessingInstruction":524,"./XMLRaw":525,"./XMLStringWriter":527,"./XMLStringifier":528,"./XMLText":529}],519:[function(e,t,r){!function(){var o={}.hasOwnProperty,s=e("./XMLNode"),a=e("./NodeType");t.exports=function(){var e,t=i,r=s;for(e in r)o.call(r,e)&&(t[e]=r[e]);function n(){this.constructor=t}function i(e){i.__super__.constructor.call(this,e),this.type=a.Dummy}return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(e){return""},i}()}.call(this)},{"./NodeType":500,"./XMLNode":522}],520:[function(t,r,e){!function(){var i={}.hasOwnProperty,e=t("./Utility"),o=e.isObject,s=e.isFunction,c=e.getValue,u=t("./XMLNode"),l=t("./NodeType"),f=t("./XMLAttribute"),p=t("./XMLNamedNodeMap");r.exports=function(){var e,t=a,r=u;for(e in r)i.call(r,e)&&(t[e]=r[e]);function n(){this.constructor=t}function a(e,t,r){var n,i,o,s;if(a.__super__.constructor.call(this,e),null==t)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(t),this.type=l.Element,this.attribs={},(this.schemaTypeInfo=null)!=r&&this.attribute(r),e.type===l.Document&&(this.isRoot=!0,(this.documentObject=e).rootObject=this,e.children))for(i=0,o=(s=e.children).length;i":null!=(t=this.parent)&&t.name?"node: <"+e+">, parent: <"+this.parent.name+">":"node: <"+e+">":""},g.prototype.ele=function(e,t,r){return this.element(e,t,r)},g.prototype.nod=function(e,t,r){return this.node(e,t,r)},g.prototype.txt=function(e){return this.text(e)},g.prototype.dat=function(e){return this.cdata(e)},g.prototype.com=function(e){return this.comment(e)},g.prototype.ins=function(e,t){return this.instruction(e,t)},g.prototype.doc=function(){return this.document()},g.prototype.dec=function(e,t,r){return this.declaration(e,t,r)},g.prototype.e=function(e,t,r){return this.element(e,t,r)},g.prototype.n=function(e,t,r){return this.node(e,t,r)},g.prototype.t=function(e){return this.text(e)},g.prototype.d=function(e){return this.cdata(e)},g.prototype.c=function(e){return this.comment(e)},g.prototype.r=function(e){return this.raw(e)},g.prototype.i=function(e,t){return this.instruction(e,t)},g.prototype.u=function(){return this.up()},g.prototype.importXMLBuilder=function(e){return this.importDocument(e)},g.prototype.replaceChild=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.removeChild=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.appendChild=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.hasChildNodes=function(){return 0!==this.children.length},g.prototype.cloneNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.isSupported=function(e,t){return!0},g.prototype.hasAttributes=function(){return 0!==this.attribs.length},g.prototype.compareDocumentPosition=function(e){var t;return this===e?0:this.document()!==e.document()?(t=r.Disconnected|r.ImplementationSpecific,Math.random()<.5?t|=r.Preceding:t|=r.Following,t):this.isAncestor(e)?r.Contains|r.Preceding:this.isDescendant(e)?r.Contains|r.Following:this.isPreceding(e)?r.Preceding:r.Following},g.prototype.isSameNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.lookupPrefix=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.isDefaultNamespace=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.lookupNamespaceURI=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.isEqualNode=function(e){var t,r,n;if(e.nodeType!==this.nodeType)return!1;if(e.children.length!==this.children.length)return!1;for(t=r=0,n=this.children.length-1;0<=n?r<=n:n<=r;t=0<=n?++r:--r)if(!this.children[t].isEqualNode(e.children[t]))return!1;return!0},g.prototype.getFeature=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setUserData=function(e,t,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getUserData=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.contains=function(e){return!!e&&(e===this||this.isDescendant(e))},g.prototype.isDescendant=function(e){for(var t,r=this.children,n=0,i=r.length;n"),this.stream.write(this.endline(e,t,r)),t.state=h.None,this.closeNode(e,t,r)},i.prototype.element=function(e,t,r){var n,i,o,s,a,c,u,l,f;for(u in this.openNode(e,t,r=r||0),t.state=h.OpenTag,this.stream.write(this.indent(e,t,r)+"<"+e.name),l=e.attribs)p.call(l,u)&&(n=l[u],this.attribute(n,t,r));if(s=0===(o=e.children.length)?null:e.children[0],0===o||e.children.every(function(e){return(e.type===d.Text||e.type===d.Raw)&&""===e.value}))t.allowEmpty?(this.stream.write(">"),t.state=h.CloseTag,this.stream.write(""+e.name+">")):(t.state=h.CloseTag,this.stream.write(t.spaceBeforeSlash+"/>"));else if(!t.pretty||1!==o||s.type!==d.Text&&s.type!==d.Raw||null==s.value){for(this.stream.write(">"+this.endline(e,t,r)),t.state=h.InsideTag,a=0,c=(f=e.children).length;a")}else this.stream.write(">"),t.state=h.InsideTag,t.suppressPrettyCount++,this.writeChildNode(s,t,r+1),t.suppressPrettyCount--,t.state=h.CloseTag,this.stream.write(""+e.name+">");return this.stream.write(this.endline(e,t,r)),t.state=h.None,this.closeNode(e,t,r)},i.prototype.processingInstruction=function(e,t,r){return this.stream.write(i.__super__.processingInstruction.call(this,e,t,r))},i.prototype.raw=function(e,t,r){return this.stream.write(i.__super__.raw.call(this,e,t,r))},i.prototype.text=function(e,t,r){return this.stream.write(i.__super__.text.call(this,e,t,r))},i.prototype.dtdAttList=function(e,t,r){return this.stream.write(i.__super__.dtdAttList.call(this,e,t,r))},i.prototype.dtdElement=function(e,t,r){return this.stream.write(i.__super__.dtdElement.call(this,e,t,r))},i.prototype.dtdEntity=function(e,t,r){return this.stream.write(i.__super__.dtdEntity.call(this,e,t,r))},i.prototype.dtdNotation=function(e,t,r){return this.stream.write(i.__super__.dtdNotation.call(this,e,t,r))},i}()}.call(this)},{"./NodeType":500,"./WriterState":502,"./XMLWriterBase":530}],527:[function(e,t,r){!function(){var o={}.hasOwnProperty,s=e("./XMLWriterBase");t.exports=function(){var e,t=i,r=s;for(e in r)o.call(r,e)&&(t[e]=r[e]);function n(){this.constructor=t}function i(e){i.__super__.constructor.call(this,e)}return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,i.prototype.document=function(e,t){var r,n,i,o,s;for(t=this.filterOptions(t),o="",n=0,i=(s=e.children).length;n","]]]]>"),this.assertLegalChar(e))},e.prototype.comment=function(e){if(this.options.noValidation)return e;if((e=""+e||"").match(/--/))throw new Error("Comment text cannot contain double-hypen: "+e);return this.assertLegalChar(e)},e.prototype.raw=function(e){return this.options.noValidation?e:""+e||""},e.prototype.attValue=function(e){return this.options.noValidation?e:this.assertLegalChar(this.attEscape(e=""+e||""))},e.prototype.insTarget=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.insValue=function(e){if(this.options.noValidation)return e;if((e=""+e||"").match(/\?>/))throw new Error("Invalid processing instruction value: "+e);return this.assertLegalChar(e)},e.prototype.xmlVersion=function(e){if(this.options.noValidation)return e;if((e=""+e||"").match(/1\.[0-9]+/))return e;throw new Error("Invalid version number: "+e)},e.prototype.xmlEncoding=function(e){if(this.options.noValidation)return e;if((e=""+e||"").match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))return this.assertLegalChar(e);throw new Error("Invalid encoding: "+e)},e.prototype.xmlStandalone=function(e){return this.options.noValidation?e:e?"yes":"no"},e.prototype.dtdPubID=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdSysID=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdElementValue=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdAttType=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdAttDefault=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdEntityValue=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdNData=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.convertAttKey="@",e.prototype.convertPIKey="?",e.prototype.convertTextKey="#text",e.prototype.convertCDataKey="#cdata",e.prototype.convertCommentKey="#comment",e.prototype.convertRawKey="#raw",e.prototype.assertLegalChar=function(e){var t;if(!this.options.noValidation)if("1.0"===this.options.version){if(t=e.match(/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+e+" at index "+t.index)}else if("1.1"===this.options.version&&(t=e.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/)))throw new Error("Invalid character in string: "+e+" at index "+t.index);return e},e.prototype.assertLegalName=function(e){if(this.options.noValidation)return e;if(this.assertLegalChar(e),e.match(/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/))return e;throw new Error("Invalid character in name")},e.prototype.textEscape=function(e){var t;return this.options.noValidation?e:(t=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&").replace(//g,">").replace(/\r/g,"
"))},e.prototype.attEscape=function(e){var t;return this.options.noValidation?e:(t=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&").replace(/"+this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),n},e.prototype.comment=function(e,t,r){var n;return this.openNode(e,t,r),t.state=g.OpenTag,n=this.indent(e,t,r)+"\x3c!-- ",t.state=g.InsideTag,n+=e.value,t.state=g.CloseTag,n+=" --\x3e"+this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),n},e.prototype.declaration=function(e,t,r){var n;return this.openNode(e,t,r),t.state=g.OpenTag,n=this.indent(e,t,r)+"")+this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),n},e.prototype.docType=function(e,t,r){var n,i,o,s,a;if(this.openNode(e,t,r=r||0),t.state=g.OpenTag,s=this.indent(e,t,r),s+="")+this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),s},e.prototype.element=function(e,t,r){var n,i,o,s,a,c,u,l,f,p,d,h,y=!1,m="";for(f in this.openNode(e,t,r=r||0),t.state=g.OpenTag,m+=this.indent(e,t,r)+"<"+e.name,p=e.attribs)v.call(p,f)&&(n=p[f],m+=this.attribute(n,t,r));if(s=0===(o=e.children.length)?null:e.children[0],0===o||e.children.every(function(e){return(e.type===b.Text||e.type===b.Raw)&&""===e.value}))t.allowEmpty?(m+=">",t.state=g.CloseTag,m+=""+e.name+">"+this.endline(e,t,r)):(t.state=g.CloseTag,m+=t.spaceBeforeSlash+"/>"+this.endline(e,t,r));else if(!t.pretty||1!==o||s.type!==b.Text&&s.type!==b.Raw||null==s.value){if(t.dontPrettyTextNodes)for(a=0,u=(d=e.children).length;a"+this.endline(e,t,r),t.state=g.InsideTag,c=0,l=(h=e.children).length;c",y&&t.suppressPrettyCount--,m+=this.endline(e,t,r),t.state=g.None}else m+=">",t.state=g.InsideTag,t.suppressPrettyCount++,y=!0,m+=this.writeChildNode(s,t,r+1),t.suppressPrettyCount--,y=!1,t.state=g.CloseTag,m+=""+e.name+">"+this.endline(e,t,r);return this.closeNode(e,t,r),m},e.prototype.writeChildNode=function(e,t,r){switch(e.type){case b.CData:return this.cdata(e,t,r);case b.Comment:return this.comment(e,t,r);case b.Element:return this.element(e,t,r);case b.Raw:return this.raw(e,t,r);case b.Text:return this.text(e,t,r);case b.ProcessingInstruction:return this.processingInstruction(e,t,r);case b.Dummy:return"";case b.Declaration:return this.declaration(e,t,r);case b.DocType:return this.docType(e,t,r);case b.AttributeDeclaration:return this.dtdAttList(e,t,r);case b.ElementDeclaration:return this.dtdElement(e,t,r);case b.EntityDeclaration:return this.dtdEntity(e,t,r);case b.NotationDeclaration:return this.dtdNotation(e,t,r);default:throw new Error("Unknown XML node type: "+e.constructor.name)}},e.prototype.processingInstruction=function(e,t,r){var n;return this.openNode(e,t,r),t.state=g.OpenTag,n=this.indent(e,t,r)+"",t.state=g.InsideTag,n+=e.target,e.value&&(n+=" "+e.value),t.state=g.CloseTag,n=(n+=t.spaceBeforeSlash+"?>")+this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),n},e.prototype.raw=function(e,t,r){var n;return this.openNode(e,t,r),t.state=g.OpenTag,n=this.indent(e,t,r),t.state=g.InsideTag,n+=e.value,t.state=g.CloseTag,n+=this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),n},e.prototype.text=function(e,t,r){var n;return this.openNode(e,t,r),t.state=g.OpenTag,n=this.indent(e,t,r),t.state=g.InsideTag,n+=e.value,t.state=g.CloseTag,n+=this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),n},e.prototype.dtdAttList=function(e,t,r){var n;return this.openNode(e,t,r),t.state=g.OpenTag,n=this.indent(e,t,r)+""+this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),n},e.prototype.dtdElement=function(e,t,r){var n;return this.openNode(e,t,r),t.state=g.OpenTag,n=this.indent(e,t,r)+""+this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),n},e.prototype.dtdEntity=function(e,t,r){var n;return this.openNode(e,t,r),t.state=g.OpenTag,n=this.indent(e,t,r)+""+this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),n},e.prototype.dtdNotation=function(e,t,r){var n;return this.openNode(e,t,r),t.state=g.OpenTag,n=this.indent(e,t,r)+""+this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),n},e.prototype.openNode=function(e,t,r){},e.prototype.closeNode=function(e,t,r){},e.prototype.openAttribute=function(e,t,r){},e.prototype.closeAttribute=function(e,t,r){},e)}.call(this)},{"./NodeType":500,"./Utility":501,"./WriterState":502,"./XMLCData":504,"./XMLComment":506,"./XMLDTDAttList":511,"./XMLDTDElement":512,"./XMLDTDEntity":513,"./XMLDTDNotation":514,"./XMLDeclaration":515,"./XMLDocType":516,"./XMLDummy":519,"./XMLElement":520,"./XMLProcessingInstruction":524,"./XMLRaw":525,"./XMLText":529}],531:[function(u,l,e){!function(){var e=u("./Utility"),i=e.assign,o=e.isFunction,e=u("./XMLDOMImplementation"),s=u("./XMLDocument"),a=u("./XMLDocumentCB"),t=u("./XMLStringWriter"),r=u("./XMLStreamWriter"),n=u("./NodeType"),c=u("./WriterState");l.exports.create=function(e,t,r,n){if(null==e)throw new Error("Root element needs a name.");return n=i({},t,r,n),r=(t=new s(n)).element(e),n.headless||(t.declaration(n),null==n.pubID&&null==n.sysID)||t.dtd(n),r},l.exports.begin=function(e,t,r){var n;return o(e)&&(t=(n=[e,t])[0],r=n[1],e={}),t?new a(e,t,r):new s(e)},l.exports.stringWriter=function(e){return new t(e)},l.exports.streamWriter=function(e,t){return new r(e,t)},l.exports.implementation=new e,l.exports.nodeType=n,l.exports.writerState=c}.call(this)},{"./NodeType":500,"./Utility":501,"./WriterState":502,"./XMLDOMImplementation":509,"./XMLDocument":517,"./XMLDocumentCB":518,"./XMLStreamWriter":526,"./XMLStringWriter":527}],532:[function(e,t,r){t.exports=function(){for(var e={},t=0;ta?t=e(t):t.length>5]|=128<>>9<<4)]=t;for(var r=1732584193,n=-271733879,i=-1732584194,o=271733878,s=0;s>>32-i,r)}function f(e,t,r,n,i,o,s){return a(t&r|~t&n,e,t,i,o,s)}function p(e,t,r,n,i,o,s){return a(t&n|r&~n,e,t,i,o,s)}function d(e,t,r,n,i,o,s){return a(t^r^n,e,t,i,o,s)}function h(e,t,r,n,i,o,s){return a(r^(t|~n),e,t,i,o,s)}function y(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}t.exports=function(e){return n.hash(e,i,16)}},{"./helpers":534}],536:[function(e,t,r){"use strict";var n=e("./helpers");function i(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var r,n,i,o=Array(80),s=1732584193,a=-271733879,c=-1732584194,u=271733878,l=-1009589776,f=0;f>16)+(t>>16)+(r>>16)<<16|65535&r}function j(e,t){return e<>>32-t}t.exports=function(e){return n.hash(e,i,20,!0)}},{"./helpers":534}],537:[function(e,t,r){"use strict";function g(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function n(e,t){var r,n=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),i=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),o=new Array(64);e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var s,a,c=0;c>>t|e<<32-t},j=function(e,t){return e>>>t};t.exports=function(e){return i.hash(e,n,32,!0)}},{"./helpers":534}],538:[function(e,t,r){"use strict";t.exports=function(){return function(){}}},{}],539:[function(i,o,e){!function(n){!function(){"use strict";var t=i("@babel/runtime/helpers/interopRequireDefault")(i("@babel/runtime/helpers/typeof")),r=i("stream").Stream,e=i("../lib/common/utils/isArray").isArray;o.exports.string=function(e){return"string"==typeof e},o.exports.array=e,o.exports.buffer=n.isBuffer,o.exports.writableStream=function(e){return e instanceof r&&"function"==typeof e._write&&"object"===(0,t.default)(e._writableState)}}.call(this)}.call(this,{isBuffer:i("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":66,"../node_modules/is-buffer/index.js":411,"@babel/runtime/helpers/interopRequireDefault":84,"@babel/runtime/helpers/typeof":91,stream:470}],540:[function(e,t,r){"use strict";e=e("immediate"),t=t.exports={};function n(){}t.nextTick=e,t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=n,t.addListener=n,t.once=n,t.off=n,t.removeListener=n,t.removeAllListeners=n,t.emit=n,t.prependListener=n,t.prependOnceListener=n,t.listeners=function(e){return[]},t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{immediate:403}],541:[function(n,e,i){!function(u){!function(){"use strict";n("core-js/modules/es.regexp.exec.js"),n("core-js/modules/es.string.search.js");var s=n("./lib/request"),e=n("./lib/response"),a=n("xtend"),t=n("builtin-status-codes"),c=n("url"),r=i;r.request=function(e,t){e="string"==typeof e?c.parse(e):a(e);var r=-1===u.location.protocol.search(/^https?:$/)?"http:":"",r=e.protocol||r,n=e.hostname||e.host,i=e.port,o=e.path||"/",r=(n&&-1!==n.indexOf(":")&&(n="["+n+"]"),e.url=(n?r+"//"+n:"")+(i?":"+i:"")+o,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{},new s(e));return t&&r.on("response",t),r},r.get=function(e,t){e=r.request(e,t);return e.end(),e},r.ClientRequest=s,r.IncomingMessage=e.IncomingMessage,r.Agent=function(){},r.Agent.defaultMaxSockets=4,r.globalAgent=new r.Agent,r.STATUS_CODES=t,r.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":543,"./lib/response":544,"builtin-status-codes":104,"core-js/modules/es.regexp.exec.js":340,"core-js/modules/es.string.search.js":348,url:545,xtend:532}],542:[function(a,e,c){!function(s){!function(){"use strict";a("core-js/modules/es.object.to-string.js"),a("core-js/modules/es.promise.js"),a("core-js/modules/es.array-buffer.constructor.js"),a("core-js/modules/es.array-buffer.slice.js"),a("core-js/modules/es.array.slice.js"),c.fetch=o(s.fetch)&&o(s.ReadableStream),c.writableStream=o(s.WritableStream),c.abortController=o(s.AbortController),c.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),c.blobConstructor=!0}catch(e){}var t;function r(){if(void 0===t)if(s.XMLHttpRequest){t=new s.XMLHttpRequest;try{t.open("GET",s.XDomainRequest?"/":"https://example.com")}catch(e){t=null}}else t=null;return t}function e(e){var t=r();if(t)try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var n=void 0!==s.ArrayBuffer,i=n&&o(s.ArrayBuffer.prototype.slice);function o(e){return"function"==typeof e}c.arraybuffer=c.fetch||n&&e("arraybuffer"),c.msstream=!c.fetch&&i&&e("ms-stream"),c.mozchunkedarraybuffer=!c.fetch&&n&&e("moz-chunked-arraybuffer"),c.overrideMimeType=c.fetch||!!r()&&o(r().overrideMimeType),c.vbArray=o(s.VBArray),t=null}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"core-js/modules/es.array-buffer.constructor.js":308,"core-js/modules/es.array-buffer.slice.js":309,"core-js/modules/es.array.slice.js":319,"core-js/modules/es.object.to-string.js":331,"core-js/modules/es.promise.js":335}],543:[function(o,s,e){!function(f,p,d){!function(){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.regexp.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.function.name.js"),o("core-js/modules/es.promise.js");var c=o("./capability"),e=o("inherits"),t=o("./response"),i=o("readable-stream"),u=o("to-arraybuffer"),r=t.IncomingMessage,l=t.readyStates;t=s.exports=function(t){var e,r=this,n=(i.Writable.call(r),r._opts=t,r._body=[],r._headers={},t.auth&&r.setHeader("Authorization","Basic "+new d(t.auth).toString("base64")),Object.keys(t.headers).forEach(function(e){r.setHeader(e,t.headers[e])}),!0);if("disable-fetch"===t.mode||"requestTimeout"in t&&!c.abortController)e=!(n=!1);else if("prefer-streaming"===t.mode)e=!1;else if("allow-wrong-content-type"===t.mode)e=!c.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");e=!0}r._mode=(e=e,n=n,c.fetch&&n?"fetch":c.mozchunkedarraybuffer?"moz-chunked-arraybuffer":c.msstream?"ms-stream":c.arraybuffer&&e?"arraybuffer":c.vbArray&&e?"text:vbarray":"text"),r._fetchTimer=null,r.on("finish",function(){r._onFinish()})};e(t,i.Writable),t.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===n.indexOf(r)&&(this._headers[r]={name:e,value:t})},t.prototype.getHeader=function(e){e=this._headers[e.toLowerCase()];return e?e.value:null},t.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},t.prototype._onFinish=function(){var t=this;if(!t._destroyed){var e=t._opts,r=t._headers,n=null,i=("GET"!==e.method&&"HEAD"!==e.method&&(n=c.arraybuffer?u(d.concat(t._body)):c.blobConstructor?new p.Blob(t._body.map(function(e){return u(e)}),{type:(r["content-type"]||{}).value||""}):d.concat(t._body).toString()),[]);if(Object.keys(r).forEach(function(e){var t=r[e].name,e=r[e].value;Array.isArray(e)?e.forEach(function(e){i.push([t,e])}):i.push([t,e])}),"fetch"===t._mode){var o,s=null;c.abortController&&(s=(o=new AbortController).signal,t._fetchAbortController=o,"requestTimeout"in e)&&0!==e.requestTimeout&&(t._fetchTimer=p.setTimeout(function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()},e.requestTimeout)),p.fetch(t._opts.url,{method:t._opts.method,headers:i,body:n||void 0,mode:"cors",credentials:e.withCredentials?"include":"same-origin",signal:s}).then(function(e){t._fetchResponse=e,t._connect()},function(e){p.clearTimeout(t._fetchTimer),t._destroyed||t.emit("error",e)})}else{var a=t._xhr=new p.XMLHttpRequest;try{a.open(t._opts.method,t._opts.url,!0)}catch(e){return void f.nextTick(function(){t.emit("error",e)})}"responseType"in a&&(a.responseType=t._mode.split(":")[0]),"withCredentials"in a&&(a.withCredentials=!!e.withCredentials),"text"===t._mode&&"overrideMimeType"in a&&a.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in e&&(a.timeout=e.requestTimeout,a.ontimeout=function(){t.emit("requestTimeout")}),i.forEach(function(e){a.setRequestHeader(e[0],e[1])}),t._response=null,a.onreadystatechange=function(){switch(a.readyState){case l.LOADING:case l.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(a.onprogress=function(){t._onXHRProgress()}),a.onerror=function(){t._destroyed||t.emit("error",new Error("XHR error"))};try{a.send(n)}catch(e){f.nextTick(function(){t.emit("error",e)})}}}},t.prototype._onXHRProgress=function(){!function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){}}(this._xhr)||this._destroyed||(this._response||this._connect(),this._response._onXHRProgress())},t.prototype._connect=function(){var t=this;t._destroyed||(t._response=new r(t._xhr,t._fetchResponse,t._mode,t._fetchTimer),t._response.on("error",function(e){t.emit("error",e)}),t.emit("response",t._response))},t.prototype._write=function(e,t,r){this._body.push(e),r()},t.prototype.abort=t.prototype.destroy=function(){this._destroyed=!0,p.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},t.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),i.Writable.prototype.end.call(this,e,t,r)},t.prototype.flushHeaders=function(){},t.prototype.setTimeout=function(){},t.prototype.setNoDelay=function(){},t.prototype.setSocketKeepAlive=function(){};var n=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}.call(this)}.call(this,o("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},o("buffer").Buffer)},{"./capability":542,"./response":544,_process:540,buffer:103,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.map.js":318,"core-js/modules/es.function.name.js":322,"core-js/modules/es.object.keys.js":330,"core-js/modules/es.object.to-string.js":331,"core-js/modules/es.promise.js":335,"core-js/modules/es.regexp.to-string.js":341,"core-js/modules/web.dom-collections.for-each.js":382,inherits:409,"readable-stream":465,"to-arraybuffer":487}],544:[function(r,e,n){!function(l,f,p){!function(){"use strict";r("core-js/modules/es.object.to-string.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.promise.js"),r("core-js/modules/es.regexp.exec.js"),r("core-js/modules/es.string.split.js"),r("core-js/modules/es.string.match.js"),r("core-js/modules/es.array.iterator.js"),r("core-js/modules/es.array-buffer.slice.js"),r("core-js/modules/es.typed-array.uint8-array.js"),r("core-js/modules/es.typed-array.copy-within.js"),r("core-js/modules/es.typed-array.every.js"),r("core-js/modules/es.typed-array.fill.js"),r("core-js/modules/es.typed-array.filter.js"),r("core-js/modules/es.typed-array.find.js"),r("core-js/modules/es.typed-array.find-index.js"),r("core-js/modules/es.typed-array.for-each.js"),r("core-js/modules/es.typed-array.includes.js"),r("core-js/modules/es.typed-array.index-of.js"),r("core-js/modules/es.typed-array.iterator.js"),r("core-js/modules/es.typed-array.join.js"),r("core-js/modules/es.typed-array.last-index-of.js"),r("core-js/modules/es.typed-array.map.js"),r("core-js/modules/es.typed-array.reduce.js"),r("core-js/modules/es.typed-array.reduce-right.js"),r("core-js/modules/es.typed-array.reverse.js"),r("core-js/modules/es.typed-array.set.js"),r("core-js/modules/es.typed-array.slice.js"),r("core-js/modules/es.typed-array.some.js"),r("core-js/modules/es.typed-array.sort.js"),r("core-js/modules/es.typed-array.subarray.js"),r("core-js/modules/es.typed-array.to-locale-string.js"),r("core-js/modules/es.typed-array.to-string.js"),r("core-js/modules/es.array.slice.js");var a=r("./capability"),e=r("inherits"),c=r("readable-stream"),u=n.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},t=n.IncomingMessage=function(e,t,r,n){var i=this;if(c.Readable.call(i),i._mode=r,i.headers={},i.rawHeaders=[],i.trailers={},i.rawTrailers=[],i.on("end",function(){l.nextTick(function(){i.emit("close")})}),"fetch"===r){r=function t(){s.read().then(function(e){i._destroyed||(e.done?(f.clearTimeout(n),i.push(null)):(i.push(new p(e.value)),t()))}).catch(function(e){f.clearTimeout(n),i._destroyed||i.emit("error",e)})};if(i._fetchResponse=t,i.url=t.url,i.statusCode=t.status,i.statusMessage=t.statusText,t.headers.forEach(function(e,t){i.headers[t.toLowerCase()]=e,i.rawHeaders.push(t,e)}),a.writableStream){var o=new WritableStream({write:function(r){return new Promise(function(e,t){i._destroyed?t():i.push(new p(r))?e():i._resumeFetch=e})},close:function(){f.clearTimeout(n),i._destroyed||i.push(null)},abort:function(e){i._destroyed||i.emit("error",e)}});try{return void t.body.pipeTo(o).catch(function(e){f.clearTimeout(n),i._destroyed||i.emit("error",e)})}catch(e){}}var s=t.body.getReader();r()}else i._xhr=e,i._pos=0,i.url=e.responseURL,i.statusCode=e.status,i.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach(function(e){var t,e=e.match(/^([^:]+):\s*(.*)/);e&&("set-cookie"===(t=e[1].toLowerCase())?(void 0===i.headers[t]&&(i.headers[t]=[]),i.headers[t].push(e[2])):void 0!==i.headers[t]?i.headers[t]+=", "+e[2]:i.headers[t]=e[2],i.rawHeaders.push(e[1],e[2]))}),i._charset="x-user-defined",a.overrideMimeType||((o=i.rawHeaders["mime-type"])&&(t=o.match(/;\s*charset=([^;])(;|$)/))&&(i._charset=t[1].toLowerCase()),i._charset)||(i._charset="utf-8")};e(t,c.Readable),t.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},t.prototype._onXHRProgress=function(){var t=this,e=t._xhr,r=null;switch(t._mode){case"text:vbarray":if(e.readyState!==u.DONE)break;try{r=new f.VBArray(e.responseBody).toArray()}catch(e){}if(null!==r){t.push(new p(r));break}case"text":try{r=e.responseText}catch(e){t._mode="text:vbarray";break}if(r.length>t._pos){var n=r.substr(t._pos);if("x-user-defined"===t._charset){for(var i=new p(n.length),o=0;ot._pos&&(t.push(new p(new Uint8Array(s.result.slice(t._pos)))),t._pos=s.result.byteLength)},s.onload=function(){t.push(null)},s.readAsArrayBuffer(r))}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&t.push(null)}}.call(this)}.call(this,r("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},r("buffer").Buffer)},{"./capability":542,_process:540,buffer:103,"core-js/modules/es.array-buffer.slice.js":309,"core-js/modules/es.array.iterator.js":316,"core-js/modules/es.array.slice.js":319,"core-js/modules/es.object.to-string.js":331,"core-js/modules/es.promise.js":335,"core-js/modules/es.regexp.exec.js":340,"core-js/modules/es.string.match.js":346,"core-js/modules/es.string.split.js":349,"core-js/modules/es.typed-array.copy-within.js":358,"core-js/modules/es.typed-array.every.js":359,"core-js/modules/es.typed-array.fill.js":360,"core-js/modules/es.typed-array.filter.js":361,"core-js/modules/es.typed-array.find-index.js":362,"core-js/modules/es.typed-array.find.js":363,"core-js/modules/es.typed-array.for-each.js":364,"core-js/modules/es.typed-array.includes.js":365,"core-js/modules/es.typed-array.index-of.js":366,"core-js/modules/es.typed-array.iterator.js":367,"core-js/modules/es.typed-array.join.js":368,"core-js/modules/es.typed-array.last-index-of.js":369,"core-js/modules/es.typed-array.map.js":370,"core-js/modules/es.typed-array.reduce-right.js":371,"core-js/modules/es.typed-array.reduce.js":372,"core-js/modules/es.typed-array.reverse.js":373,"core-js/modules/es.typed-array.set.js":374,"core-js/modules/es.typed-array.slice.js":375,"core-js/modules/es.typed-array.some.js":376,"core-js/modules/es.typed-array.sort.js":377,"core-js/modules/es.typed-array.subarray.js":378,"core-js/modules/es.typed-array.to-locale-string.js":379,"core-js/modules/es.typed-array.to-string.js":380,"core-js/modules/es.typed-array.uint8-array.js":381,"core-js/modules/web.dom-collections.for-each.js":382,inherits:409,"readable-stream":465}],545:[function(e,t,r){"use strict";var S=e("@babel/runtime/helpers/interopRequireDefault")(e("@babel/runtime/helpers/typeof")),k=(e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.search.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.string.split.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.array.join.js"),e("core-js/modules/es.string.trim.js"),e("core-js/modules/es.string.match.js"),e("core-js/modules/es.array.slice.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.splice.js"),e("punycode")),_=e("./util");function w(){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}r.parse=i,r.resolve=function(e,t){return i(e,!1,!0).resolve(t)},r.resolveObject=function(e,t){return e?i(e,!1,!0).resolveObject(t):t},r.format=function(e){_.isString(e)&&(e=i(e));return e instanceof w?e.format():w.prototype.format.call(e)},r.Url=w;var T=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,E=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,r=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),O=["'"].concat(r),A=["%","/","?",";","#"].concat(O),I=["/","?","#"],D=/^[+a-z0-9A-Z_-]{0,63}$/,R=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,C={javascript:!0,"javascript:":!0},M={javascript:!0,"javascript:":!0},P={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},N=e("querystring");function i(e,t,r){var n;return e&&_.isObject(e)&&e instanceof w?e:((n=new w).parse(e,t,r),n)}w.prototype.parse=function(e,t,r){if(!_.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+(0,S.default)(e));var n=e.indexOf("?"),n=-1!==n&&nc.maxRedirects))return r=c.formatRedirectUrl?c.formatRedirectUrl(a,n):q.resolve(a,n),W("Request#%d %s: `redirected` from %s to %s",l,h.path,a,r),E(),c.headers&&c.headers.Host&&X.test(n)&&(c.headers.Host=null),n=u,u=null,J.requestWithCallback(r,c,n),{redirect:!0,error:null};(t=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+a)).name="MaxRedirectError"}else(t=new Error("Got statusCode "+e.statusCode+" but cannot resolve next location from headers")).name="FollowRedirectError"}return{redirect:!1,error:t}}c.timing&&(_={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),!c.gzip||h.headers["Accept-Encoding"]||h.headers["accept-encoding"]||(h.headers["Accept-Encoding"]="gzip");var I,D,R,C=c.writeStream;function M(){W("Response timer ticking, timeout: %d",D),m=setTimeout(function(){m=null;var e="Response timeout for "+D+"ms";(b=new Error(e)).name="ResponseTimeoutError",b.requestId=l,W("ResponseTimeout: Request#%d %s %s: %s, connected: %s",l,a,b.name,e,g),P()},D)}W("Request#%d %s %s with headers %j, options.path: %s",l,r,a,h.headers,h.path),c.requestUrls.push(a),Array.isArray(c.timeout)?(I=G(c.timeout[0]),D=G(c.timeout[1])):I=D=G(c.timeout),W("ConnectTimeout: %d, ResponseTimeout: %d",I,D),h.mode=c.mode||"";try{R=i.request(h,function(i){var e,t;return _&&(_.waiting=Date.now()-p),W("Request#%d %s `req response` event emit: status %d, headers: %j",l,a,i.statusCode,i.headers),c.streaming?(e=A(i)).redirect?void i.resume():e.error?(i.resume(),O(e.error,null,i)):O(null,null,i):(i.on("close",function(){W("Request#%d %s: `res close` event emit, total size %d",l,a,j)}),i.on("error",function(){W("Request#%d %s: `res error` event emit, total size %d",l,a,j)}),i.on("aborted",function(){x=!0,W("Request#%d %s: `res aborted` event emit, total size %d",l,a,j)}),C?(e=A(i)).redirect?void i.resume():e.error?(i.resume(),C.end(),O(e.error,null,i)):(!1===c.consumeWriteStream?i.on("end",O.bind(null,null,null,i)):C.on("close",function(){W("Request#%d %s: writeStream close event emitted",l,a),O(b||null,null,i)}),i.pipe(C)):(t=[],i.on("data",function(e){W("Request#%d %s: `res data` event emit, size %d",l,a,e.length),j+=e.length,t.push(e)}),void i.on("end",function(){var e,n=Y.concat(t,j);return W("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",l,a,j,i._dumped),b?O(b,n,i):(e=A(i)).error?O(e.error,n,i):void(e.redirect||function(e,t,r){if(e)return O(e,n,i);if(!r&&0<=K.indexOf(c.dataType)){try{t=decodeBodyByCharset(t,i)}catch(e){return W("decodeBodyByCharset error: %s",e),O(null,t,i)}"json"===c.dataType&&(0===j?t=null:(r=parseJSON(t,N)).error?e=r.error:t=r.data)}x&&W("Request#%d %s: Remote socket was terminated before `response.end()` was called",l,a),O(e,t,i)}(null,n,i.headers["content-encoding"]))})))})}catch(e){return O(e)}function P(){W("Request#%d %s abort, connected: %s",l,a,g),R.socket||(b.noSocket=!0,O(b)),R.abort()}return"undefined"==typeof window?(W("Connect timer ticking, timeout: %d",I),s=setTimeout(function(){s=null,-1===w&&(w=-2);var e="Connect timeout for "+I+"ms",t="ConnectionTimeoutError";R.socket||(t="SocketAssignTimeoutError",e+=", working sockets is full"),(b=new Error(e)).name=t,b.requestId=l,W("ConnectTimeout: Request#%d %s %s: %s, connected: %s",l,a,b.name,e,g),P()},I)):R.on("requestTimeout",function(){-1===w&&(w=-2);(b=new Error("Connect timeout for "+I+"ms")).name="ConnectionTimeoutError",b.requestId=l,P()}),_&&R.on("finish",function(){_.requestSent=Date.now()-p}),R.once("socket",function(e){_&&(_.queuing=Date.now()-p);var t=e.readyState;"opening"===t?(e.once("lookup",function(e,t,r){W("Request#%d %s lookup: %s, %s, %s",l,a,e,t,r),_&&(_.dnslookup=Date.now()-p),t&&(S=t)}),e.once("connect",function(){_&&(_.connected=Date.now()-p),T(),M(),W("Request#%d %s new socket connected",l,a),g=!0,S=S||e.remoteAddress,k=e.remotePort})):(W("Request#%d %s reuse socket connected, readyState: %s",l,a,t),v=g=!0,S=S||e.remoteAddress,k=e.remotePort,T(),M())}),R.on("error",function(e){"Error"!==e.name&&"TypeError"!==e.name||(e.name=g?"ResponseError":"RequestError"),e.message+=' (req "error")',W("Request#%d %s `req error` event emit, %s: %s",l,a,e.name,e.message),O(b||e)}),C&&C.once("error",function(e){e.message+=' (writeStream "error")',W("Request#%d %s `writeStream error` event emit, %s: %s",l,a,(b=e).name,e.message),P()}),c.stream?(c.stream.pipe(R),c.stream.once("error",function(e){e.message+=' (stream "error")',W("Request#%d %s `readStream error` event emit, %s: %s",l,a,(b=e).name,e.message),P()})):R.end(n),R.requestId=l,R}}.call(this)}.call(this,e("_process"),e("buffer").Buffer)},{"@babel/runtime/helpers/interopRequireDefault":84,"@babel/runtime/helpers/typeof":91,_process:540,buffer:103,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.function.name.js":322,"core-js/modules/es.object.to-string.js":331,"core-js/modules/es.promise.js":335,"core-js/modules/es.regexp.exec.js":340,"core-js/modules/es.string.trim.js":351,debug:538,http:541,https:400,"humanize-ms":401,url:545,util:491}]},{},[1])(1)});})(window);
// jquery.event.move
//
// 1.3.6
//
// Stephen Band
//
// Triggers 'movestart', 'move' and 'moveend' events after
// mousemoves following a mousedown cross a distance threshold,
// similar to the native 'dragstart', 'drag' and 'dragend' events.
// Move events are throttled to animation frames. Move event objects
// have the properties:
//
// pageX:
// pageY: Page coordinates of pointer.
// startX:
// startY: Page coordinates of pointer at movestart.
// distX:
// distY: Distance the pointer has moved since movestart.
// deltaX:
// deltaY: Distance the finger has moved since last event.
// velocityX:
// velocityY: Average velocity over last few events.
(function (module) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], module);
} else {
// Browser globals
module(jQuery);
}
})(function(jQuery, undefined){
var // Number of pixels a pressed pointer travels before movestart
// event is fired.
threshold = 6,
add = jQuery.event.add,
remove = jQuery.event.remove,
// Just sugar, so we can have arguments in the same order as
// add and remove.
trigger = function(node, type, data) {
jQuery.event.trigger(type, data, node);
},
// Shim for requestAnimationFrame, falling back to timer. See:
// see http://paulirish.com/2011/requestanimationframe-for-smart-animating/
requestFrame = (function(){
return (
window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(fn, element){
return window.setTimeout(function(){
fn();
}, 25);
}
);
})(),
ignoreTags = {
textarea: true,
input: true,
select: true,
button: true
},
mouseevents = {
move: 'mousemove',
cancel: 'mouseup dragstart',
end: 'mouseup'
},
touchevents = {
move: 'touchmove',
cancel: 'touchend',
end: 'touchend'
};
// Constructors
function Timer(fn){
var callback = fn,
active = false,
running = false;
function trigger(time) {
if (active){
callback();
requestFrame(trigger);
running = true;
active = false;
}
else {
running = false;
}
}
this.kick = function(fn) {
active = true;
if (!running) { trigger(); }
};
this.end = function(fn) {
var cb = callback;
if (!fn) { return; }
// If the timer is not running, simply call the end callback.
if (!running) {
fn();
}
// If the timer is running, and has been kicked lately, then
// queue up the current callback and the end callback, otherwise
// just the end callback.
else {
callback = active ?
function(){ cb(); fn(); } :
fn ;
active = true;
}
};
}
// Functions
function returnTrue() {
return true;
}
function returnFalse() {
return false;
}
function preventDefault(e) {
e.preventDefault();
}
function preventIgnoreTags(e) {
// Don't prevent interaction with form elements.
if (ignoreTags[ e.target.tagName.toLowerCase() ]) { return; }
e.preventDefault();
}
function isLeftButton(e) {
// Ignore mousedowns on any button other than the left (or primary)
// mouse button, or when a modifier key is pressed.
return (e.which === 1 && !e.ctrlKey && !e.altKey);
}
function identifiedTouch(touchList, id) {
var i, l;
if (touchList.identifiedTouch) {
return touchList.identifiedTouch(id);
}
// touchList.identifiedTouch() does not exist in
// webkit yet鈥� we must do the search ourselves...
i = -1;
l = touchList.length;
while (++i < l) {
if (touchList[i].identifier === id) {
return touchList[i];
}
}
}
function changedTouch(e, event) {
var touch = identifiedTouch(e.changedTouches, event.identifier);
// This isn't the touch you're looking for.
if (!touch) { return; }
// Chrome Android (at least) includes touches that have not
// changed in e.changedTouches. That's a bit annoying. Check
// that this touch has changed.
if (touch.pageX === event.pageX && touch.pageY === event.pageY) { return; }
return touch;
}
// Handlers that decide when the first movestart is triggered
function mousedown(e){
var data;
if (!isLeftButton(e)) { return; }
data = {
target: e.target,
startX: e.pageX,
startY: e.pageY,
timeStamp: e.timeStamp
};
add(document, mouseevents.move, mousemove, data);
add(document, mouseevents.cancel, mouseend, data);
}
function mousemove(e){
var data = e.data;
checkThreshold(e, data, e, removeMouse);
}
function mouseend(e) {
removeMouse();
}
function removeMouse() {
remove(document, mouseevents.move, mousemove);
remove(document, mouseevents.cancel, mouseend);
}
function touchstart(e) {
var touch, template;
// Don't get in the way of interaction with form elements.
if (ignoreTags[ e.target.tagName.toLowerCase() ]) { return; }
touch = e.changedTouches[0];
// iOS live updates the touch objects whereas Android gives us copies.
// That means we can't trust the touchstart object to stay the same,
// so we must copy the data. This object acts as a template for
// movestart, move and moveend event objects.
template = {
target: touch.target,
startX: touch.pageX,
startY: touch.pageY,
timeStamp: e.timeStamp,
identifier: touch.identifier
};
// Use the touch identifier as a namespace, so that we can later
// remove handlers pertaining only to this touch.
add(document, touchevents.move + '.' + touch.identifier, touchmove, template);
add(document, touchevents.cancel + '.' + touch.identifier, touchend, template);
}
function touchmove(e){
var data = e.data,
touch = changedTouch(e, data);
if (!touch) { return; }
checkThreshold(e, data, touch, removeTouch);
}
function touchend(e) {
var template = e.data,
touch = identifiedTouch(e.changedTouches, template.identifier);
if (!touch) { return; }
removeTouch(template.identifier);
}
function removeTouch(identifier) {
remove(document, '.' + identifier, touchmove);
remove(document, '.' + identifier, touchend);
}
// Logic for deciding when to trigger a movestart.
function checkThreshold(e, template, touch, fn) {
var distX = touch.pageX - template.startX,
distY = touch.pageY - template.startY;
// Do nothing if the threshold has not been crossed.
if ((distX * distX) + (distY * distY) < (threshold * threshold)) { return; }
triggerStart(e, template, touch, distX, distY, fn);
}
function handled() {
// this._handled should return false once, and after return true.
this._handled = returnTrue;
return false;
}
function flagAsHandled(e) {
e._handled();
}
function triggerStart(e, template, touch, distX, distY, fn) {
var node = template.target,
touches, time;
touches = e.targetTouches;
time = e.timeStamp - template.timeStamp;
// Create a movestart object with some special properties that
// are passed only to the movestart handlers.
template.type = 'movestart';
template.distX = distX;
template.distY = distY;
template.deltaX = distX;
template.deltaY = distY;
template.pageX = touch.pageX;
template.pageY = touch.pageY;
template.velocityX = distX / time;
template.velocityY = distY / time;
template.targetTouches = touches;
template.finger = touches ?
touches.length :
1 ;
// The _handled method is fired to tell the default movestart
// handler that one of the move events is bound.
template._handled = handled;
// Pass the touchmove event so it can be prevented if or when
// movestart is handled.
template._preventTouchmoveDefault = function() {
e.preventDefault();
};
// Trigger the movestart event.
trigger(template.target, template);
// Unbind handlers that tracked the touch or mouse up till now.
fn(template.identifier);
}
// Handlers that control what happens following a movestart
function activeMousemove(e) {
var timer = e.data.timer;
e.data.touch = e;
e.data.timeStamp = e.timeStamp;
timer.kick();
}
function activeMouseend(e) {
var event = e.data.event,
timer = e.data.timer;
removeActiveMouse();
endEvent(event, timer, function() {
// Unbind the click suppressor, waiting until after mouseup
// has been handled.
setTimeout(function(){
remove(event.target, 'click', returnFalse);
}, 0);
});
}
function removeActiveMouse(event) {
remove(document, mouseevents.move, activeMousemove);
remove(document, mouseevents.end, activeMouseend);
}
function activeTouchmove(e) {
var event = e.data.event,
timer = e.data.timer,
touch = changedTouch(e, event);
if (!touch) { return; }
// Stop the interface from gesturing
e.preventDefault();
event.targetTouches = e.targetTouches;
e.data.touch = touch;
e.data.timeStamp = e.timeStamp;
timer.kick();
}
function activeTouchend(e) {
var event = e.data.event,
timer = e.data.timer,
touch = identifiedTouch(e.changedTouches, event.identifier);
// This isn't the touch you're looking for.
if (!touch) { return; }
removeActiveTouch(event);
endEvent(event, timer);
}
function removeActiveTouch(event) {
remove(document, '.' + event.identifier, activeTouchmove);
remove(document, '.' + event.identifier, activeTouchend);
}
// Logic for triggering move and moveend events
function updateEvent(event, touch, timeStamp, timer) {
var time = timeStamp - event.timeStamp;
event.type = 'move';
event.distX = touch.pageX - event.startX;
event.distY = touch.pageY - event.startY;
event.deltaX = touch.pageX - event.pageX;
event.deltaY = touch.pageY - event.pageY;
// Average the velocity of the last few events using a decay
// curve to even out spurious jumps in values.
event.velocityX = 0.3 * event.velocityX + 0.7 * event.deltaX / time;
event.velocityY = 0.3 * event.velocityY + 0.7 * event.deltaY / time;
event.pageX = touch.pageX;
event.pageY = touch.pageY;
}
function endEvent(event, timer, fn) {
timer.end(function(){
event.type = 'moveend';
trigger(event.target, event);
return fn && fn();
});
}
// jQuery special event definition
function setup(data, namespaces, eventHandle) {
// Stop the node from being dragged
//add(this, 'dragstart.move drag.move', preventDefault);
// Prevent text selection and touch interface scrolling
//add(this, 'mousedown.move', preventIgnoreTags);
// Tell movestart default handler that we've handled this
add(this, 'movestart.move', flagAsHandled);
// Don't bind to the DOM. For speed.
return true;
}
function teardown(namespaces) {
remove(this, 'dragstart drag', preventDefault);
remove(this, 'mousedown touchstart', preventIgnoreTags);
remove(this, 'movestart', flagAsHandled);
// Don't bind to the DOM. For speed.
return true;
}
function addMethod(handleObj) {
// We're not interested in preventing defaults for handlers that
// come from internal move or moveend bindings
if (handleObj.namespace === "move" || handleObj.namespace === "moveend") {
return;
}
// Stop the node from being dragged
add(this, 'dragstart.' + handleObj.guid + ' drag.' + handleObj.guid, preventDefault, undefined, handleObj.selector);
// Prevent text selection and touch interface scrolling
add(this, 'mousedown.' + handleObj.guid, preventIgnoreTags, undefined, handleObj.selector);
}
function removeMethod(handleObj) {
if (handleObj.namespace === "move" || handleObj.namespace === "moveend") {
return;
}
remove(this, 'dragstart.' + handleObj.guid + ' drag.' + handleObj.guid);
remove(this, 'mousedown.' + handleObj.guid);
}
jQuery.event.special.movestart = {
setup: setup,
teardown: teardown,
add: addMethod,
remove: removeMethod,
_default: function(e) {
var event, data;
// If no move events were bound to any ancestors of this
// target, high tail it out of here.
if (!e._handled()) { return; }
function update(time) {
updateEvent(event, data.touch, data.timeStamp);
trigger(e.target, event);
}
event = {
target: e.target,
startX: e.startX,
startY: e.startY,
pageX: e.pageX,
pageY: e.pageY,
distX: e.distX,
distY: e.distY,
deltaX: e.deltaX,
deltaY: e.deltaY,
velocityX: e.velocityX,
velocityY: e.velocityY,
timeStamp: e.timeStamp,
identifier: e.identifier,
targetTouches: e.targetTouches,
finger: e.finger
};
data = {
event: event,
timer: new Timer(update),
touch: undefined,
timeStamp: undefined
};
if (e.identifier === undefined) {
// We're dealing with a mouse
// Stop clicks from propagating during a move
add(e.target, 'click', returnFalse);
add(document, mouseevents.move, activeMousemove, data);
add(document, mouseevents.end, activeMouseend, data);
}
else {
// We're dealing with a touch. Stop touchmove doing
// anything defaulty.
e._preventTouchmoveDefault();
add(document, touchevents.move + '.' + e.identifier, activeTouchmove, data);
add(document, touchevents.end + '.' + e.identifier, activeTouchend, data);
}
}
};
jQuery.event.special.move = {
setup: function() {
// Bind a noop to movestart. Why? It's the movestart
// setup that decides whether other move events are fired.
add(this, 'movestart.move', jQuery.noop);
},
teardown: function() {
remove(this, 'movestart.move', jQuery.noop);
}
};
jQuery.event.special.moveend = {
setup: function() {
// Bind a noop to movestart. Why? It's the movestart
// setup that decides whether other move events are fired.
add(this, 'movestart.moveend', jQuery.noop);
},
teardown: function() {
remove(this, 'movestart.moveend', jQuery.noop);
}
};
add(document, 'mousedown.move', mousedown);
add(document, 'touchstart.move', touchstart);
// Make jQuery copy touch event properties over to the jQuery event
// object, if they are not already listed. But only do the ones we
// really need. IE7/8 do not have Array#indexOf(), but nor do they
// have touch events, so let's assume we can ignore them.
if (typeof Array.prototype.indexOf === 'function') {
(function(jQuery, undefined){
var props = ["changedTouches", "targetTouches"],
l = props.length;
while (l--) {
if ( typeof jQuery.event.props != 'undefined' && jQuery.event.props.indexOf(props[l]) === -1) {
jQuery.event.props.push(props[l]);
}
}
})(jQuery);
};
});
(function($){
$.fn.twentytwenty = function(options) {
var options = $.extend({default_offset_pct: 0.5, orientation: 'horizontal'}, options);
return this.each(function() {
var sliderPct = options.default_offset_pct;
var container = $(this);
var sliderOrientation = options.orientation;
var beforeDirection = (sliderOrientation === 'vertical') ? 'down' : 'left';
var afterDirection = (sliderOrientation === 'vertical') ? 'up' : 'right';
container.wrap("");
//container.append("");
var beforeImg = container.find( (typeof options.element == 'undefined' ? 'img' : options.element) + ":first");
var afterImg = container.find( (typeof options.element == 'undefined' ? 'img' : options.element) + ":last");
container.append("");
var slider = container.find(".twentytwenty-handle");
slider.append("");
slider.append("");
container.addClass("twentytwenty-container");
beforeImg.addClass("twentytwenty-before");
afterImg.addClass("twentytwenty-after");
//var overlay = container.find(".twentytwenty-overlay");
//overlay.append("");
//overlay.append("");
var calcOffset = function(dimensionPct) {
var w = beforeImg.width();
var h = beforeImg.height();
return {
w: w+"px",
h: h+"px",
cw: (dimensionPct*w)+"px",
ch: (dimensionPct*h)+"px"
};
};
var adjustContainer = function(offset) {
if (sliderOrientation === 'vertical') {
beforeImg.css("clip", "rect(0,"+offset.w+","+offset.ch+",0)").attr('w', Math.round(parseFloat(offset.w.replace('px','')))).attr('h', Math.round(parseFloat(offset.ch.replace('px',''))));
}else {
offset.cw = offset.cw.replace('px','');
//限制左移最小位置
offset.cw = Math.max(offset.cw, options.moveMinLeft);
//限制右移最大位置
offset.cw = Math.min(offset.cw, options.moveMaxLeft);
offset.cw = offset.cw+'px';
beforeImg.css("clip", "rect(0,"+offset.cw+","+offset.h+",0)").attr('w', Math.round(parseFloat(offset.cw.replace('px','')))).attr('h', Math.round(parseFloat(offset.h.replace('px',''))));
}
container.css("height", offset.h);
};
var adjustSlider = function(pct) {
var offset = calcOffset(pct);
offset.cw = offset.cw.replace('px','');
//限制左移最小位置
offset.cw = Math.max(offset.cw, options.moveMinLeft);
//限制右移最大位置
offset.cw = Math.min(offset.cw, options.moveMaxLeft);
offset.cw = offset.cw+'px';
slider.css((sliderOrientation==="vertical") ? "top" : "left", (sliderOrientation==="vertical") ? offset.ch : offset.cw);
adjustContainer(offset);
};
$(window).on("resize.twentytwenty", function(e) {
adjustSlider(sliderPct);
});
var offsetX = 0;
var imgWidth = 0;
slider.on("movestart", function(e) {
if (((e.distX > e.distY && e.distX < -e.distY) || (e.distX < e.distY && e.distX > -e.distY)) && sliderOrientation !== 'vertical') {
e.preventDefault();
}
else if (((e.distX < e.distY && e.distX < -e.distY) || (e.distX > e.distY && e.distX > -e.distY)) && sliderOrientation === 'vertical') {
e.preventDefault();
}
container.addClass("active");
offsetX = container.offset().left;
offsetY = container.offset().top;
imgWidth = beforeImg.width();
imgHeight = beforeImg.height();
});
slider.on("moveend", function(e) {
container.removeClass("active");
});
slider.on("move", function(e) {
if (container.hasClass("active")) {
sliderPct = (sliderOrientation === 'vertical') ? (e.pageY-offsetY)/imgHeight : (e.pageX-offsetX)/imgWidth;
if (sliderPct < 0) {
sliderPct = 0;
}
if (sliderPct > 1) {
sliderPct = 1;
}
adjustSlider(sliderPct);
}
});
container.find("img").on("mousedown", function(event) {
event.preventDefault();
});
$(window).trigger("resize.twentytwenty");
});
};
})(jQuery);