uri-scheme 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/build/index.js +4 -4
  2. package/package.json +4 -4
package/build/index.js CHANGED
@@ -1,4 +1,4 @@
1
- (()=>{var r={8951:(r,i)=>{"use strict";function find(r,i,o){if(o===undefined){o=Array.prototype}if(r&&typeof o.find==="function"){return o.find.call(r,i)}for(var a=0;a<r.length;a++){if(Object.prototype.hasOwnProperty.call(r,a)){var l=r[a];if(i.call(undefined,l,a,r)){return l}}}}function freeze(r,i){if(i===undefined){i=Object}return i&&typeof i.freeze==="function"?i.freeze(r):r}var o=freeze({HTML:"text/html",isHTML:function(r){return r===o.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"});var a=freeze({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(r){return r===a.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});i.find=find;i.freeze=freeze;i.MIME_TYPE=o;i.NAMESPACE=a},2800:(r,i,o)=>{var a;var l=o(8951);var u=o(95);var c=o(3258);var h=o(5705);var p=u.DOMImplementation;var d=l.NAMESPACE;var m=h.ParseError;var g=h.XMLReader;function DOMParser(r){this.options=r||{locator:{}}}DOMParser.prototype.parseFromString=function(r,i){var o=this.options;var a=new g;var l=o.domBuilder||new DOMHandler;var u=o.errorHandler;var h=o.locator;var p=o.xmlns||{};var m=/\/x?html?$/.test(i);var y=m?c.HTML_ENTITIES:c.XML_ENTITIES;if(h){l.setDocumentLocator(h)}a.errorHandler=buildErrorHandler(u,l,h);a.domBuilder=o.domBuilder||l;if(m){p[""]=d.HTML}p.xml=p.xml||d.XML;if(r&&typeof r==="string"){a.parse(r,p,y)}else{a.errorHandler.error("invalid doc source")}return l.doc};function buildErrorHandler(r,i,o){if(!r){if(i instanceof DOMHandler){return i}r=i}var a={};var l=r instanceof Function;o=o||{};function build(i){var u=r[i];if(!u&&l){u=r.length==2?function(o){r(i,o)}:r}a[i]=u&&function(r){u("[xmldom "+i+"]\t"+r+_locator(o))}||function(){}}build("warning");build("error");build("fatalError");return a}function DOMHandler(){this.cdata=false}function position(r,i){i.lineNumber=r.lineNumber;i.columnNumber=r.columnNumber}DOMHandler.prototype={startDocument:function(){this.doc=(new p).createDocument(null,null,null);if(this.locator){this.doc.documentURI=this.locator.systemId}},startElement:function(r,i,o,a){var l=this.doc;var u=l.createElementNS(r,o||i);var c=a.length;appendElement(this,u);this.currentElement=u;this.locator&&position(this.locator,u);for(var h=0;h<c;h++){var r=a.getURI(h);var p=a.getValue(h);var o=a.getQName(h);var d=l.createAttributeNS(r,o);this.locator&&position(a.getLocator(h),d);d.value=d.nodeValue=p;u.setAttributeNode(d)}},endElement:function(r,i,o){var a=this.currentElement;var l=a.tagName;this.currentElement=a.parentNode},startPrefixMapping:function(r,i){},endPrefixMapping:function(r){},processingInstruction:function(r,i){var o=this.doc.createProcessingInstruction(r,i);this.locator&&position(this.locator,o);appendElement(this,o)},ignorableWhitespace:function(r,i,o){},characters:function(r,i,o){r=_toString.apply(this,arguments);if(r){if(this.cdata){var a=this.doc.createCDATASection(r)}else{var a=this.doc.createTextNode(r)}if(this.currentElement){this.currentElement.appendChild(a)}else if(/^\s*$/.test(r)){this.doc.appendChild(a)}this.locator&&position(this.locator,a)}},skippedEntity:function(r){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(r){if(this.locator=r){r.lineNumber=0}},comment:function(r,i,o){r=_toString.apply(this,arguments);var a=this.doc.createComment(r);this.locator&&position(this.locator,a);appendElement(this,a)},startCDATA:function(){this.cdata=true},endCDATA:function(){this.cdata=false},startDTD:function(r,i,o){var a=this.doc.implementation;if(a&&a.createDocumentType){var l=a.createDocumentType(r,i,o);this.locator&&position(this.locator,l);appendElement(this,l);this.doc.doctype=l}},warning:function(r){console.warn("[xmldom warning]\t"+r,_locator(this.locator))},error:function(r){console.error("[xmldom error]\t"+r,_locator(this.locator))},fatalError:function(r){throw new m(r,this.locator)}};function _locator(r){if(r){return"\n@"+(r.systemId||"")+"#[line:"+r.lineNumber+",col:"+r.columnNumber+"]"}}function _toString(r,i,o){if(typeof r=="string"){return r.substr(i,o)}else{if(r.length>=i+o||i){return new java.lang.String(r,i,o)+""}return r}}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(r){DOMHandler.prototype[r]=function(){return null}}));function appendElement(r,i){if(!r.currentElement){r.doc.appendChild(i)}else{r.currentElement.appendChild(i)}}a=DOMHandler;i.DOMParser=DOMParser;a=u.DOMImplementation;a=u.XMLSerializer},95:(r,i,o)=>{var a=o(8951);var l=a.find;var u=a.NAMESPACE;function notEmptyString(r){return r!==""}function splitOnASCIIWhitespace(r){return r?r.split(/[\t\n\f\r ]+/).filter(notEmptyString):[]}function orderedSetReducer(r,i){if(!r.hasOwnProperty(i)){r[i]=true}return r}function toOrderedSet(r){if(!r)return[];var i=splitOnASCIIWhitespace(r);return Object.keys(i.reduce(orderedSetReducer,{}))}function arrayIncludes(r){return function(i){return r&&r.indexOf(i)!==-1}}function copy(r,i){for(var o in r){if(Object.prototype.hasOwnProperty.call(r,o)){i[o]=r[o]}}}function _extends(r,i){var o=r.prototype;if(!(o instanceof i)){function t(){}t.prototype=i.prototype;t=new t;copy(o,t);r.prototype=o=t}if(o.constructor!=r){if(typeof r!="function"){console.error("unknown Class:"+r)}o.constructor=r}}var c={};var h=c.ELEMENT_NODE=1;var p=c.ATTRIBUTE_NODE=2;var d=c.TEXT_NODE=3;var m=c.CDATA_SECTION_NODE=4;var g=c.ENTITY_REFERENCE_NODE=5;var y=c.ENTITY_NODE=6;var v=c.PROCESSING_INSTRUCTION_NODE=7;var b=c.COMMENT_NODE=8;var w=c.DOCUMENT_NODE=9;var M=c.DOCUMENT_TYPE_NODE=10;var D=c.DOCUMENT_FRAGMENT_NODE=11;var T=c.NOTATION_NODE=12;var x={};var O={};var N=x.INDEX_SIZE_ERR=(O[1]="Index size error",1);var _=x.DOMSTRING_SIZE_ERR=(O[2]="DOMString size error",2);var A=x.HIERARCHY_REQUEST_ERR=(O[3]="Hierarchy request error",3);var S=x.WRONG_DOCUMENT_ERR=(O[4]="Wrong document",4);var I=x.INVALID_CHARACTER_ERR=(O[5]="Invalid character",5);var C=x.NO_DATA_ALLOWED_ERR=(O[6]="No data allowed",6);var L=x.NO_MODIFICATION_ALLOWED_ERR=(O[7]="No modification allowed",7);var P=x.NOT_FOUND_ERR=(O[8]="Not found",8);var X=x.NOT_SUPPORTED_ERR=(O[9]="Not supported",9);var j=x.INUSE_ATTRIBUTE_ERR=(O[10]="Attribute in use",10);var k=x.INVALID_STATE_ERR=(O[11]="Invalid state",11);var R=x.SYNTAX_ERR=(O[12]="Syntax error",12);var B=x.INVALID_MODIFICATION_ERR=(O[13]="Invalid modification",13);var $=x.NAMESPACE_ERR=(O[14]="Invalid namespace",14);var U=x.INVALID_ACCESS_ERR=(O[15]="Invalid access",15);function DOMException(r,i){if(i instanceof Error){var o=i}else{o=this;Error.call(this,O[r]);this.message=O[r];if(Error.captureStackTrace)Error.captureStackTrace(this,DOMException)}o.code=r;if(i)this.message=this.message+": "+i;return o}DOMException.prototype=Error.prototype;copy(x,DOMException);function NodeList(){}NodeList.prototype={length:0,item:function(r){return this[r]||null},toString:function(r,i){for(var o=[],a=0;a<this.length;a++){serializeToString(this[a],o,r,i)}return o.join("")},filter:function(r){return Array.prototype.filter.call(this,r)},indexOf:function(r){return Array.prototype.indexOf.call(this,r)}};function LiveNodeList(r,i){this._node=r;this._refresh=i;_updateLiveList(this)}function _updateLiveList(r){var i=r._node._inc||r._node.ownerDocument._inc;if(r._inc!=i){var o=r._refresh(r._node);__set__(r,"length",o.length);copy(o,r);r._inc=i}}LiveNodeList.prototype.item=function(r){_updateLiveList(this);return this[r]};_extends(LiveNodeList,NodeList);function NamedNodeMap(){}function _findNodeIndex(r,i){var o=r.length;while(o--){if(r[o]===i){return o}}}function _addNamedNode(r,i,o,a){if(a){i[_findNodeIndex(i,a)]=o}else{i[i.length++]=o}if(r){o.ownerElement=r;var l=r.ownerDocument;if(l){a&&_onRemoveAttribute(l,r,a);_onAddAttribute(l,r,o)}}}function _removeNamedNode(r,i,o){var a=_findNodeIndex(i,o);if(a>=0){var l=i.length-1;while(a<l){i[a]=i[++a]}i.length=l;if(r){var u=r.ownerDocument;if(u){_onRemoveAttribute(u,r,o);o.ownerElement=null}}}else{throw new DOMException(P,new Error(r.tagName+"@"+o))}}NamedNodeMap.prototype={length:0,item:NodeList.prototype.item,getNamedItem:function(r){var i=this.length;while(i--){var o=this[i];if(o.nodeName==r){return o}}},setNamedItem:function(r){var i=r.ownerElement;if(i&&i!=this._ownerElement){throw new DOMException(j)}var o=this.getNamedItem(r.nodeName);_addNamedNode(this._ownerElement,this,r,o);return o},setNamedItemNS:function(r){var i=r.ownerElement,o;if(i&&i!=this._ownerElement){throw new DOMException(j)}o=this.getNamedItemNS(r.namespaceURI,r.localName);_addNamedNode(this._ownerElement,this,r,o);return o},removeNamedItem:function(r){var i=this.getNamedItem(r);_removeNamedNode(this._ownerElement,this,i);return i},removeNamedItemNS:function(r,i){var o=this.getNamedItemNS(r,i);_removeNamedNode(this._ownerElement,this,o);return o},getNamedItemNS:function(r,i){var o=this.length;while(o--){var a=this[o];if(a.localName==i&&a.namespaceURI==r){return a}}return null}};function DOMImplementation(){}DOMImplementation.prototype={hasFeature:function(r,i){return true},createDocument:function(r,i,o){var a=new Document;a.implementation=this;a.childNodes=new NodeList;a.doctype=o||null;if(o){a.appendChild(o)}if(i){var l=a.createElementNS(r,i);a.appendChild(l)}return a},createDocumentType:function(r,i,o){var a=new DocumentType;a.name=r;a.nodeName=r;a.publicId=i||"";a.systemId=o||"";return a}};function Node(){}Node.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(r,i){return _insertBefore(this,r,i)},replaceChild:function(r,i){_insertBefore(this,r,i,assertPreReplacementValidityInDocument);if(i){this.removeChild(i)}},removeChild:function(r){return _removeChild(this,r)},appendChild:function(r){return this.insertBefore(r,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(r){return cloneNode(this.ownerDocument||this,this,r)},normalize:function(){var r=this.firstChild;while(r){var i=r.nextSibling;if(i&&i.nodeType==d&&r.nodeType==d){this.removeChild(i);r.appendData(i.data)}else{r.normalize();r=i}}},isSupported:function(r,i){return this.ownerDocument.implementation.hasFeature(r,i)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(r){var i=this;while(i){var o=i._nsMap;if(o){for(var a in o){if(Object.prototype.hasOwnProperty.call(o,a)&&o[a]===r){return a}}}i=i.nodeType==p?i.ownerDocument:i.parentNode}return null},lookupNamespaceURI:function(r){var i=this;while(i){var o=i._nsMap;if(o){if(r in o){if(Object.prototype.hasOwnProperty.call(o,r)){return o[r]}}}i=i.nodeType==p?i.ownerDocument:i.parentNode}return null},isDefaultNamespace:function(r){var i=this.lookupPrefix(r);return i==null}};function _xmlEncoder(r){return r=="<"&&"&lt;"||r==">"&&"&gt;"||r=="&"&&"&amp;"||r=='"'&&"&quot;"||"&#"+r.charCodeAt()+";"}copy(c,Node);copy(c,Node.prototype);function _visitNode(r,i){if(i(r)){return true}if(r=r.firstChild){do{if(_visitNode(r,i)){return true}}while(r=r.nextSibling)}}function Document(){this.ownerDocument=this}function _onAddAttribute(r,i,o){r&&r._inc++;var a=o.namespaceURI;if(a===u.XMLNS){i._nsMap[o.prefix?o.localName:""]=o.value}}function _onRemoveAttribute(r,i,o,a){r&&r._inc++;var l=o.namespaceURI;if(l===u.XMLNS){delete i._nsMap[o.prefix?o.localName:""]}}function _onUpdateChild(r,i,o){if(r&&r._inc){r._inc++;var a=i.childNodes;if(o){a[a.length++]=o}else{var l=i.firstChild;var u=0;while(l){a[u++]=l;l=l.nextSibling}a.length=u;delete a[a.length]}}}function _removeChild(r,i){var o=i.previousSibling;var a=i.nextSibling;if(o){o.nextSibling=a}else{r.firstChild=a}if(a){a.previousSibling=o}else{r.lastChild=o}i.parentNode=null;i.previousSibling=null;i.nextSibling=null;_onUpdateChild(r.ownerDocument,r);return i}function hasValidParentNodeType(r){return r&&(r.nodeType===Node.DOCUMENT_NODE||r.nodeType===Node.DOCUMENT_FRAGMENT_NODE||r.nodeType===Node.ELEMENT_NODE)}function hasInsertableNodeType(r){return r&&(isElementNode(r)||isTextNode(r)||isDocTypeNode(r)||r.nodeType===Node.DOCUMENT_FRAGMENT_NODE||r.nodeType===Node.COMMENT_NODE||r.nodeType===Node.PROCESSING_INSTRUCTION_NODE)}function isDocTypeNode(r){return r&&r.nodeType===Node.DOCUMENT_TYPE_NODE}function isElementNode(r){return r&&r.nodeType===Node.ELEMENT_NODE}function isTextNode(r){return r&&r.nodeType===Node.TEXT_NODE}function isElementInsertionPossible(r,i){var o=r.childNodes||[];if(l(o,isElementNode)||isDocTypeNode(i)){return false}var a=l(o,isDocTypeNode);return!(i&&a&&o.indexOf(a)>o.indexOf(i))}function isElementReplacementPossible(r,i){var o=r.childNodes||[];function hasElementChildThatIsNotChild(r){return isElementNode(r)&&r!==i}if(l(o,hasElementChildThatIsNotChild)){return false}var a=l(o,isDocTypeNode);return!(i&&a&&o.indexOf(a)>o.indexOf(i))}function assertPreInsertionValidity1to5(r,i,o){if(!hasValidParentNodeType(r)){throw new DOMException(A,"Unexpected parent node type "+r.nodeType)}if(o&&o.parentNode!==r){throw new DOMException(P,"child not in parent")}if(!hasInsertableNodeType(i)||isDocTypeNode(i)&&r.nodeType!==Node.DOCUMENT_NODE){throw new DOMException(A,"Unexpected node type "+i.nodeType+" for parent node type "+r.nodeType)}}function assertPreInsertionValidityInDocument(r,i,o){var a=r.childNodes||[];var u=i.childNodes||[];if(i.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var c=u.filter(isElementNode);if(c.length>1||l(u,isTextNode)){throw new DOMException(A,"More than one element or text in fragment")}if(c.length===1&&!isElementInsertionPossible(r,o)){throw new DOMException(A,"Element in fragment can not be inserted before doctype")}}if(isElementNode(i)){if(!isElementInsertionPossible(r,o)){throw new DOMException(A,"Only one element can be added and only after doctype")}}if(isDocTypeNode(i)){if(l(a,isDocTypeNode)){throw new DOMException(A,"Only one doctype is allowed")}var h=l(a,isElementNode);if(o&&a.indexOf(h)<a.indexOf(o)){throw new DOMException(A,"Doctype can only be inserted before an element")}if(!o&&h){throw new DOMException(A,"Doctype can not be appended since element is present")}}}function assertPreReplacementValidityInDocument(r,i,o){var a=r.childNodes||[];var u=i.childNodes||[];if(i.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var c=u.filter(isElementNode);if(c.length>1||l(u,isTextNode)){throw new DOMException(A,"More than one element or text in fragment")}if(c.length===1&&!isElementReplacementPossible(r,o)){throw new DOMException(A,"Element in fragment can not be inserted before doctype")}}if(isElementNode(i)){if(!isElementReplacementPossible(r,o)){throw new DOMException(A,"Only one element can be added and only after doctype")}}if(isDocTypeNode(i)){function hasDoctypeChildThatIsNotChild(r){return isDocTypeNode(r)&&r!==o}if(l(a,hasDoctypeChildThatIsNotChild)){throw new DOMException(A,"Only one doctype is allowed")}var h=l(a,isElementNode);if(o&&a.indexOf(h)<a.indexOf(o)){throw new DOMException(A,"Doctype can only be inserted before an element")}}}function _insertBefore(r,i,o,a){assertPreInsertionValidity1to5(r,i,o);if(r.nodeType===Node.DOCUMENT_NODE){(a||assertPreInsertionValidityInDocument)(r,i,o)}var l=i.parentNode;if(l){l.removeChild(i)}if(i.nodeType===D){var u=i.firstChild;if(u==null){return i}var c=i.lastChild}else{u=c=i}var h=o?o.previousSibling:r.lastChild;u.previousSibling=h;c.nextSibling=o;if(h){h.nextSibling=u}else{r.firstChild=u}if(o==null){r.lastChild=c}else{o.previousSibling=c}do{u.parentNode=r}while(u!==c&&(u=u.nextSibling));_onUpdateChild(r.ownerDocument||r,r);if(i.nodeType==D){i.firstChild=i.lastChild=null}return i}function _appendSingleChild(r,i){if(i.parentNode){i.parentNode.removeChild(i)}i.parentNode=r;i.previousSibling=r.lastChild;i.nextSibling=null;if(i.previousSibling){i.previousSibling.nextSibling=i}else{r.firstChild=i}r.lastChild=i;_onUpdateChild(r.ownerDocument,r,i);return i}Document.prototype={nodeName:"#document",nodeType:w,doctype:null,documentElement:null,_inc:1,insertBefore:function(r,i){if(r.nodeType==D){var o=r.firstChild;while(o){var a=o.nextSibling;this.insertBefore(o,i);o=a}return r}_insertBefore(this,r,i);r.ownerDocument=this;if(this.documentElement===null&&r.nodeType===h){this.documentElement=r}return r},removeChild:function(r){if(this.documentElement==r){this.documentElement=null}return _removeChild(this,r)},replaceChild:function(r,i){_insertBefore(this,r,i,assertPreReplacementValidityInDocument);r.ownerDocument=this;if(i){this.removeChild(i)}if(isElementNode(r)){this.documentElement=r}},importNode:function(r,i){return importNode(this,r,i)},getElementById:function(r){var i=null;_visitNode(this.documentElement,(function(o){if(o.nodeType==h){if(o.getAttribute("id")==r){i=o;return true}}}));return i},getElementsByClassName:function(r){var i=toOrderedSet(r);return new LiveNodeList(this,(function(o){var a=[];if(i.length>0){_visitNode(o.documentElement,(function(l){if(l!==o&&l.nodeType===h){var u=l.getAttribute("class");if(u){var c=r===u;if(!c){var p=toOrderedSet(u);c=i.every(arrayIncludes(p))}if(c){a.push(l)}}}}))}return a}))},createElement:function(r){var i=new Element;i.ownerDocument=this;i.nodeName=r;i.tagName=r;i.localName=r;i.childNodes=new NodeList;var o=i.attributes=new NamedNodeMap;o._ownerElement=i;return i},createDocumentFragment:function(){var r=new DocumentFragment;r.ownerDocument=this;r.childNodes=new NodeList;return r},createTextNode:function(r){var i=new Text;i.ownerDocument=this;i.appendData(r);return i},createComment:function(r){var i=new Comment;i.ownerDocument=this;i.appendData(r);return i},createCDATASection:function(r){var i=new CDATASection;i.ownerDocument=this;i.appendData(r);return i},createProcessingInstruction:function(r,i){var o=new ProcessingInstruction;o.ownerDocument=this;o.tagName=o.target=r;o.nodeValue=o.data=i;return o},createAttribute:function(r){var i=new Attr;i.ownerDocument=this;i.name=r;i.nodeName=r;i.localName=r;i.specified=true;return i},createEntityReference:function(r){var i=new EntityReference;i.ownerDocument=this;i.nodeName=r;return i},createElementNS:function(r,i){var o=new Element;var a=i.split(":");var l=o.attributes=new NamedNodeMap;o.childNodes=new NodeList;o.ownerDocument=this;o.nodeName=i;o.tagName=i;o.namespaceURI=r;if(a.length==2){o.prefix=a[0];o.localName=a[1]}else{o.localName=i}l._ownerElement=o;return o},createAttributeNS:function(r,i){var o=new Attr;var a=i.split(":");o.ownerDocument=this;o.nodeName=i;o.name=i;o.namespaceURI=r;o.specified=true;if(a.length==2){o.prefix=a[0];o.localName=a[1]}else{o.localName=i}return o}};_extends(Document,Node);function Element(){this._nsMap={}}Element.prototype={nodeType:h,hasAttribute:function(r){return this.getAttributeNode(r)!=null},getAttribute:function(r){var i=this.getAttributeNode(r);return i&&i.value||""},getAttributeNode:function(r){return this.attributes.getNamedItem(r)},setAttribute:function(r,i){var o=this.ownerDocument.createAttribute(r);o.value=o.nodeValue=""+i;this.setAttributeNode(o)},removeAttribute:function(r){var i=this.getAttributeNode(r);i&&this.removeAttributeNode(i)},appendChild:function(r){if(r.nodeType===D){return this.insertBefore(r,null)}else{return _appendSingleChild(this,r)}},setAttributeNode:function(r){return this.attributes.setNamedItem(r)},setAttributeNodeNS:function(r){return this.attributes.setNamedItemNS(r)},removeAttributeNode:function(r){return this.attributes.removeNamedItem(r.nodeName)},removeAttributeNS:function(r,i){var o=this.getAttributeNodeNS(r,i);o&&this.removeAttributeNode(o)},hasAttributeNS:function(r,i){return this.getAttributeNodeNS(r,i)!=null},getAttributeNS:function(r,i){var o=this.getAttributeNodeNS(r,i);return o&&o.value||""},setAttributeNS:function(r,i,o){var a=this.ownerDocument.createAttributeNS(r,i);a.value=a.nodeValue=""+o;this.setAttributeNode(a)},getAttributeNodeNS:function(r,i){return this.attributes.getNamedItemNS(r,i)},getElementsByTagName:function(r){return new LiveNodeList(this,(function(i){var o=[];_visitNode(i,(function(a){if(a!==i&&a.nodeType==h&&(r==="*"||a.tagName==r)){o.push(a)}}));return o}))},getElementsByTagNameNS:function(r,i){return new LiveNodeList(this,(function(o){var a=[];_visitNode(o,(function(l){if(l!==o&&l.nodeType===h&&(r==="*"||l.namespaceURI===r)&&(i==="*"||l.localName==i)){a.push(l)}}));return a}))}};Document.prototype.getElementsByTagName=Element.prototype.getElementsByTagName;Document.prototype.getElementsByTagNameNS=Element.prototype.getElementsByTagNameNS;_extends(Element,Node);function Attr(){}Attr.prototype.nodeType=p;_extends(Attr,Node);function CharacterData(){}CharacterData.prototype={data:"",substringData:function(r,i){return this.data.substring(r,r+i)},appendData:function(r){r=this.data+r;this.nodeValue=this.data=r;this.length=r.length},insertData:function(r,i){this.replaceData(r,0,i)},appendChild:function(r){throw new Error(O[A])},deleteData:function(r,i){this.replaceData(r,i,"")},replaceData:function(r,i,o){var a=this.data.substring(0,r);var l=this.data.substring(r+i);o=a+o+l;this.nodeValue=this.data=o;this.length=o.length}};_extends(CharacterData,Node);function Text(){}Text.prototype={nodeName:"#text",nodeType:d,splitText:function(r){var i=this.data;var o=i.substring(r);i=i.substring(0,r);this.data=this.nodeValue=i;this.length=i.length;var a=this.ownerDocument.createTextNode(o);if(this.parentNode){this.parentNode.insertBefore(a,this.nextSibling)}return a}};_extends(Text,CharacterData);function Comment(){}Comment.prototype={nodeName:"#comment",nodeType:b};_extends(Comment,CharacterData);function CDATASection(){}CDATASection.prototype={nodeName:"#cdata-section",nodeType:m};_extends(CDATASection,CharacterData);function DocumentType(){}DocumentType.prototype.nodeType=M;_extends(DocumentType,Node);function Notation(){}Notation.prototype.nodeType=T;_extends(Notation,Node);function Entity(){}Entity.prototype.nodeType=y;_extends(Entity,Node);function EntityReference(){}EntityReference.prototype.nodeType=g;_extends(EntityReference,Node);function DocumentFragment(){}DocumentFragment.prototype.nodeName="#document-fragment";DocumentFragment.prototype.nodeType=D;_extends(DocumentFragment,Node);function ProcessingInstruction(){}ProcessingInstruction.prototype.nodeType=v;_extends(ProcessingInstruction,Node);function XMLSerializer(){}XMLSerializer.prototype.serializeToString=function(r,i,o){return nodeSerializeToString.call(r,i,o)};Node.prototype.toString=nodeSerializeToString;function nodeSerializeToString(r,i){var o=[];var a=this.nodeType==9&&this.documentElement||this;var l=a.prefix;var u=a.namespaceURI;if(u&&l==null){var l=a.lookupPrefix(u);if(l==null){var c=[{namespace:u,prefix:null}]}}serializeToString(this,o,r,i,c);return o.join("")}function needNamespaceDefine(r,i,o){var a=r.prefix||"";var l=r.namespaceURI;if(!l){return false}if(a==="xml"&&l===u.XML||l===u.XMLNS){return false}var c=o.length;while(c--){var h=o[c];if(h.prefix===a){return h.namespace!==l}}return true}function addSerializedAttribute(r,i,o){r.push(" ",i,'="',o.replace(/[<&"]/g,_xmlEncoder),'"')}function serializeToString(r,i,o,a,l){if(!l){l=[]}if(a){r=a(r);if(r){if(typeof r=="string"){i.push(r);return}}else{return}}switch(r.nodeType){case h:var c=r.attributes;var y=c.length;var T=r.firstChild;var x=r.tagName;o=u.isHTML(r.namespaceURI)||o;var O=x;if(!o&&!r.prefix&&r.namespaceURI){var N;for(var _=0;_<c.length;_++){if(c.item(_).name==="xmlns"){N=c.item(_).value;break}}if(!N){for(var A=l.length-1;A>=0;A--){var S=l[A];if(S.prefix===""&&S.namespace===r.namespaceURI){N=S.namespace;break}}}if(N!==r.namespaceURI){for(var A=l.length-1;A>=0;A--){var S=l[A];if(S.namespace===r.namespaceURI){if(S.prefix){O=S.prefix+":"+x}break}}}}i.push("<",O);for(var I=0;I<y;I++){var C=c.item(I);if(C.prefix=="xmlns"){l.push({prefix:C.localName,namespace:C.value})}else if(C.nodeName=="xmlns"){l.push({prefix:"",namespace:C.value})}}for(var I=0;I<y;I++){var C=c.item(I);if(needNamespaceDefine(C,o,l)){var L=C.prefix||"";var P=C.namespaceURI;addSerializedAttribute(i,L?"xmlns:"+L:"xmlns",P);l.push({prefix:L,namespace:P})}serializeToString(C,i,o,a,l)}if(x===O&&needNamespaceDefine(r,o,l)){var L=r.prefix||"";var P=r.namespaceURI;addSerializedAttribute(i,L?"xmlns:"+L:"xmlns",P);l.push({prefix:L,namespace:P})}if(T||o&&!/^(?:meta|link|img|br|hr|input)$/i.test(x)){i.push(">");if(o&&/^script$/i.test(x)){while(T){if(T.data){i.push(T.data)}else{serializeToString(T,i,o,a,l.slice())}T=T.nextSibling}}else{while(T){serializeToString(T,i,o,a,l.slice());T=T.nextSibling}}i.push("</",O,">")}else{i.push("/>")}return;case w:case D:var T=r.firstChild;while(T){serializeToString(T,i,o,a,l.slice());T=T.nextSibling}return;case p:return addSerializedAttribute(i,r.name,r.value);case d:return i.push(r.data.replace(/[<&]/g,_xmlEncoder).replace(/]]>/g,"]]&gt;"));case m:return i.push("<![CDATA[",r.data,"]]>");case b:return i.push("\x3c!--",r.data,"--\x3e");case M:var X=r.publicId;var j=r.systemId;i.push("<!DOCTYPE ",r.name);if(X){i.push(" PUBLIC ",X);if(j&&j!="."){i.push(" ",j)}i.push(">")}else if(j&&j!="."){i.push(" SYSTEM ",j,">")}else{var k=r.internalSubset;if(k){i.push(" [",k,"]")}i.push(">")}return;case v:return i.push("<?",r.target," ",r.data,"?>");case g:return i.push("&",r.nodeName,";");default:i.push("??",r.nodeName)}}function importNode(r,i,o){var a;switch(i.nodeType){case h:a=i.cloneNode(false);a.ownerDocument=r;case D:break;case p:o=true;break}if(!a){a=i.cloneNode(false)}a.ownerDocument=r;a.parentNode=null;if(o){var l=i.firstChild;while(l){a.appendChild(importNode(r,l,o));l=l.nextSibling}}return a}function cloneNode(r,i,o){var a=new i.constructor;for(var l in i){if(Object.prototype.hasOwnProperty.call(i,l)){var u=i[l];if(typeof u!="object"){if(u!=a[l]){a[l]=u}}}}if(i.childNodes){a.childNodes=new NodeList}a.ownerDocument=r;switch(a.nodeType){case h:var c=i.attributes;var d=a.attributes=new NamedNodeMap;var m=c.length;d._ownerElement=a;for(var g=0;g<m;g++){a.setAttributeNode(cloneNode(r,c.item(g),true))}break;case p:o=true}if(o){var y=i.firstChild;while(y){a.appendChild(cloneNode(r,y,o));y=y.nextSibling}}return a}function __set__(r,i,o){r[i]=o}try{if(Object.defineProperty){Object.defineProperty(LiveNodeList.prototype,"length",{get:function(){_updateLiveList(this);return this.$$length}});Object.defineProperty(Node.prototype,"textContent",{get:function(){return getTextContent(this)},set:function(r){switch(this.nodeType){case h:case D:while(this.firstChild){this.removeChild(this.firstChild)}if(r||String(r)){this.appendChild(this.ownerDocument.createTextNode(r))}break;default:this.data=r;this.value=r;this.nodeValue=r}}});function getTextContent(r){switch(r.nodeType){case h:case D:var i=[];r=r.firstChild;while(r){if(r.nodeType!==7&&r.nodeType!==8){i.push(getTextContent(r))}r=r.nextSibling}return i.join("");default:return r.nodeValue}}__set__=function(r,i,o){r["$$"+i]=o}}}catch(V){}i.DocumentType=DocumentType;i.DOMException=DOMException;i.DOMImplementation=DOMImplementation;i.Element=Element;i.Node=Node;i.NodeList=NodeList;i.XMLSerializer=XMLSerializer},3258:(r,i,o)=>{var a=o(8951).freeze;i.XML_ENTITIES=a({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});i.HTML_ENTITIES=a({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"});i.entityMap=i.HTML_ENTITIES},1328:(r,i,o)=>{var a=o(95);i.DOMImplementation=a.DOMImplementation;i.XMLSerializer=a.XMLSerializer;i.DOMParser=o(2800).DOMParser},5705:(r,i,o)=>{var a=o(8951).NAMESPACE;var l=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;var u=new RegExp("[\\-\\.0-9"+l.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");var c=new RegExp("^"+l.source+u.source+"*(?::"+l.source+u.source+"*)?$");var h=0;var p=1;var d=2;var m=3;var g=4;var y=5;var v=6;var b=7;function ParseError(r,i){this.message=r;this.locator=i;if(Error.captureStackTrace)Error.captureStackTrace(this,ParseError)}ParseError.prototype=new Error;ParseError.prototype.name=ParseError.name;function XMLReader(){}XMLReader.prototype={parse:function(r,i,o){var a=this.domBuilder;a.startDocument();_copy(i,i={});parse(r,i,o,a,this.errorHandler);a.endDocument()}};function parse(r,i,o,l,u){function fixedFromCharCode(r){if(r>65535){r-=65536;var i=55296+(r>>10),o=56320+(r&1023);return String.fromCharCode(i,o)}else{return String.fromCharCode(r)}}function entityReplacer(r){var i=r.slice(1,-1);if(i in o){return o[i]}else if(i.charAt(0)==="#"){return fixedFromCharCode(parseInt(i.substr(1).replace("x","0x")))}else{u.error("entity not found:"+r);return r}}function appendText(i){if(i>y){var o=r.substring(y,i).replace(/&#?\w+;/g,entityReplacer);d&&position(y);l.characters(o,0,i-y);y=i}}function position(i,o){while(i>=h&&(o=p.exec(r))){c=o.index;h=c+o[0].length;d.lineNumber++}d.columnNumber=i-c+1}var c=0;var h=0;var p=/.*(?:\r\n?|\n)|.*$/g;var d=l.locator;var m=[{currentNSMap:i}];var g={};var y=0;while(true){try{var v=r.indexOf("<",y);if(v<0){if(!r.substr(y).match(/^\s*$/)){var b=l.doc;var w=b.createTextNode(r.substr(y));b.appendChild(w);l.currentElement=w}return}if(v>y){appendText(v)}switch(r.charAt(v+1)){case"/":var M=r.indexOf(">",v+3);var D=r.substring(v+2,M).replace(/[ \t\n\r]+$/g,"");var T=m.pop();if(M<0){D=r.substring(v+2).replace(/[\s<].*/,"");u.error("end tag name: "+D+" is not complete:"+T.tagName);M=v+1+D.length}else if(D.match(/\s</)){D=D.replace(/[\s<].*/,"");u.error("end tag name: "+D+" maybe not complete");M=v+1+D.length}var x=T.localNSMap;var O=T.tagName==D;var N=O||T.tagName&&T.tagName.toLowerCase()==D.toLowerCase();if(N){l.endElement(T.uri,T.localName,D);if(x){for(var _ in x){if(Object.prototype.hasOwnProperty.call(x,_)){l.endPrefixMapping(_)}}}if(!O){u.fatalError("end tag name: "+D+" is not match the current start tagName:"+T.tagName)}}else{m.push(T)}M++;break;case"?":d&&position(v);M=parseInstruction(r,v,l);break;case"!":d&&position(v);M=parseDCC(r,v,l,u);break;default:d&&position(v);var A=new ElementAttributes;var S=m[m.length-1].currentNSMap;var M=parseElementStartPart(r,v,A,S,entityReplacer,u);var I=A.length;if(!A.closed&&fixSelfClosed(r,M,A.tagName,g)){A.closed=true;if(!o.nbsp){u.warning("unclosed xml attribute")}}if(d&&I){var C=copyLocator(d,{});for(var L=0;L<I;L++){var P=A[L];position(P.offset);P.locator=copyLocator(d,{})}l.locator=C;if(appendElement(A,l,S)){m.push(A)}l.locator=d}else{if(appendElement(A,l,S)){m.push(A)}}if(a.isHTML(A.uri)&&!A.closed){M=parseHtmlSpecialContent(r,M,A.tagName,entityReplacer,l)}else{M++}}}catch(r){if(r instanceof ParseError){throw r}u.error("element parse error: "+r);M=-1}if(M>y){y=M}else{appendText(Math.max(v,y)+1)}}}function copyLocator(r,i){i.lineNumber=r.lineNumber;i.columnNumber=r.columnNumber;return i}function parseElementStartPart(r,i,o,l,u,c){function addAttribute(r,i,a){if(o.attributeNames.hasOwnProperty(r)){c.fatalError("Attribute "+r+" redefined")}o.addValue(r,i,a)}var w;var M;var D=++i;var T=h;while(true){var x=r.charAt(D);switch(x){case"=":if(T===p){w=r.slice(i,D);T=m}else if(T===d){T=m}else{throw new Error("attribute equal must after attrName")}break;case"'":case'"':if(T===m||T===p){if(T===p){c.warning('attribute value must after "="');w=r.slice(i,D)}i=D+1;D=r.indexOf(x,i);if(D>0){M=r.slice(i,D).replace(/&#?\w+;/g,u);addAttribute(w,M,i-1);T=y}else{throw new Error("attribute value no end '"+x+"' match")}}else if(T==g){M=r.slice(i,D).replace(/&#?\w+;/g,u);addAttribute(w,M,i);c.warning('attribute "'+w+'" missed start quot('+x+")!!");i=D+1;T=y}else{throw new Error('attribute value must after "="')}break;case"/":switch(T){case h:o.setTagName(r.slice(i,D));case y:case v:case b:T=b;o.closed=true;case g:case p:case d:break;default:throw new Error("attribute invalid close char('/')")}break;case"":c.error("unexpected end of input");if(T==h){o.setTagName(r.slice(i,D))}return D;case">":switch(T){case h:o.setTagName(r.slice(i,D));case y:case v:case b:break;case g:case p:M=r.slice(i,D);if(M.slice(-1)==="/"){o.closed=true;M=M.slice(0,-1)}case d:if(T===d){M=w}if(T==g){c.warning('attribute "'+M+'" missed quot(")!');addAttribute(w,M.replace(/&#?\w+;/g,u),i)}else{if(!a.isHTML(l[""])||!M.match(/^(?:disabled|checked|selected)$/i)){c.warning('attribute "'+M+'" missed value!! "'+M+'" instead!!')}addAttribute(M,M,i)}break;case m:throw new Error("attribute value missed!!")}return D;case"€":x=" ";default:if(x<=" "){switch(T){case h:o.setTagName(r.slice(i,D));T=v;break;case p:w=r.slice(i,D);T=d;break;case g:var M=r.slice(i,D).replace(/&#?\w+;/g,u);c.warning('attribute "'+M+'" missed quot(")!!');addAttribute(w,M,i);case y:T=v;break}}else{switch(T){case d:var O=o.tagName;if(!a.isHTML(l[""])||!w.match(/^(?:disabled|checked|selected)$/i)){c.warning('attribute "'+w+'" missed value!! "'+w+'" instead2!!')}addAttribute(w,w,i);i=D;T=p;break;case y:c.warning('attribute space is required"'+w+'"!!');case v:T=p;i=D;break;case m:T=g;i=D;break;case b:throw new Error("elements closed character '/' and '>' must be connected to")}}}D++}}function appendElement(r,i,o){var l=r.tagName;var u=null;var c=r.length;while(c--){var h=r[c];var p=h.qName;var d=h.value;var m=p.indexOf(":");if(m>0){var g=h.prefix=p.slice(0,m);var y=p.slice(m+1);var v=g==="xmlns"&&y}else{y=p;g=null;v=p==="xmlns"&&""}h.localName=y;if(v!==false){if(u==null){u={};_copy(o,o={})}o[v]=u[v]=d;h.uri=a.XMLNS;i.startPrefixMapping(v,d)}}var c=r.length;while(c--){h=r[c];var g=h.prefix;if(g){if(g==="xml"){h.uri=a.XML}if(g!=="xmlns"){h.uri=o[g||""]}}}var m=l.indexOf(":");if(m>0){g=r.prefix=l.slice(0,m);y=r.localName=l.slice(m+1)}else{g=null;y=r.localName=l}var b=r.uri=o[g||""];i.startElement(b,y,l,r);if(r.closed){i.endElement(b,y,l);if(u){for(g in u){if(Object.prototype.hasOwnProperty.call(u,g)){i.endPrefixMapping(g)}}}}else{r.currentNSMap=o;r.localNSMap=u;return true}}function parseHtmlSpecialContent(r,i,o,a,l){if(/^(?:script|textarea)$/i.test(o)){var u=r.indexOf("</"+o+">",i);var c=r.substring(i+1,u);if(/[&<]/.test(c)){if(/^script$/i.test(o)){l.characters(c,0,c.length);return u}c=c.replace(/&#?\w+;/g,a);l.characters(c,0,c.length);return u}}return i+1}function fixSelfClosed(r,i,o,a){var l=a[o];if(l==null){l=r.lastIndexOf("</"+o+">");if(l<i){l=r.lastIndexOf("</"+o)}a[o]=l}return l<i}function _copy(r,i){for(var o in r){if(Object.prototype.hasOwnProperty.call(r,o)){i[o]=r[o]}}}function parseDCC(r,i,o,a){var l=r.charAt(i+2);switch(l){case"-":if(r.charAt(i+3)==="-"){var u=r.indexOf("--\x3e",i+4);if(u>i){o.comment(r,i+4,u-i-4);return u+3}else{a.error("Unclosed comment");return-1}}else{return-1}default:if(r.substr(i+3,6)=="CDATA["){var u=r.indexOf("]]>",i+9);o.startCDATA();o.characters(r,i+9,u-i-9);o.endCDATA();return u+3}var c=split(r,i);var h=c.length;if(h>1&&/!doctype/i.test(c[0][0])){var p=c[1][0];var d=false;var m=false;if(h>3){if(/^public$/i.test(c[2][0])){d=c[3][0];m=h>4&&c[4][0]}else if(/^system$/i.test(c[2][0])){m=c[3][0]}}var g=c[h-1];o.startDTD(p,d,m);o.endDTD();return g.index+g[0].length}}return-1}function parseInstruction(r,i,o){var a=r.indexOf("?>",i);if(a){var l=r.substring(i,a).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(l){var u=l[0].length;o.processingInstruction(l[1],l[2]);return a+2}else{return-1}}return-1}function ElementAttributes(){this.attributeNames={}}ElementAttributes.prototype={setTagName:function(r){if(!c.test(r)){throw new Error("invalid tagName:"+r)}this.tagName=r},addValue:function(r,i,o){if(!c.test(r)){throw new Error("invalid attribute:"+r)}this.attributeNames[r]=this.length;this[this.length++]={qName:r,value:i,offset:o}},length:0,getLocalName:function(r){return this[r].localName},getLocator:function(r){return this[r].locator},getQName:function(r){return this[r].qName},getURI:function(r){return this[r].uri},getValue:function(r){return this[r].value}};function split(r,i){var o;var a=[];var l=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;l.lastIndex=i;l.exec(r);while(o=l.exec(r)){a.push(o);if(o[1])return a}}i.XMLReader=XMLReader;i.ParseError=ParseError},3741:(r,i,o)=>{"use strict";r=o.nmd(r);const wrapAnsi16=(r,i)=>(...o)=>{const a=r(...o);return`[${a+i}m`};const wrapAnsi256=(r,i)=>(...o)=>{const a=r(...o);return`[${38+i};5;${a}m`};const wrapAnsi16m=(r,i)=>(...o)=>{const a=r(...o);return`[${38+i};2;${a[0]};${a[1]};${a[2]}m`};const ansi2ansi=r=>r;const rgb2rgb=(r,i,o)=>[r,i,o];const setLazyProperty=(r,i,o)=>{Object.defineProperty(r,i,{get:()=>{const a=o();Object.defineProperty(r,i,{value:a,enumerable:true,configurable:true});return a},enumerable:true,configurable:true})};let a;const makeDynamicStyles=(r,i,l,u)=>{if(a===undefined){a=o(1593)}const c=u?10:0;const h={};for(const[o,u]of Object.entries(a)){const a=o==="ansi16"?"ansi":o;if(o===i){h[a]=r(l,c)}else if(typeof u==="object"){h[a]=r(u[i],c)}}return h};function assembleStyles(){const r=new Map;const i={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};i.color.gray=i.color.blackBright;i.bgColor.bgGray=i.bgColor.bgBlackBright;i.color.grey=i.color.blackBright;i.bgColor.bgGrey=i.bgColor.bgBlackBright;for(const[o,a]of Object.entries(i)){for(const[o,l]of Object.entries(a)){i[o]={open:`[${l[0]}m`,close:`[${l[1]}m`};a[o]=i[o];r.set(l[0],l[1])}Object.defineProperty(i,o,{value:a,enumerable:false})}Object.defineProperty(i,"codes",{value:r,enumerable:false});i.color.close="";i.bgColor.close="";setLazyProperty(i.color,"ansi",(()=>makeDynamicStyles(wrapAnsi16,"ansi16",ansi2ansi,false)));setLazyProperty(i.color,"ansi256",(()=>makeDynamicStyles(wrapAnsi256,"ansi256",ansi2ansi,false)));setLazyProperty(i.color,"ansi16m",(()=>makeDynamicStyles(wrapAnsi16m,"rgb",rgb2rgb,false)));setLazyProperty(i.bgColor,"ansi",(()=>makeDynamicStyles(wrapAnsi16,"ansi16",ansi2ansi,true)));setLazyProperty(i.bgColor,"ansi256",(()=>makeDynamicStyles(wrapAnsi256,"ansi256",ansi2ansi,true)));setLazyProperty(i.bgColor,"ansi16m",(()=>makeDynamicStyles(wrapAnsi16m,"rgb",rgb2rgb,true)));return i}Object.defineProperty(r,"exports",{enumerable:true,get:assembleStyles})},7606:(r,i,o)=>{const a=o(9407);const l={};for(const r of Object.keys(a)){l[a[r]]=r}const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};r.exports=u;for(const r of Object.keys(u)){if(!("channels"in u[r])){throw new Error("missing channels property: "+r)}if(!("labels"in u[r])){throw new Error("missing channel labels property: "+r)}if(u[r].labels.length!==u[r].channels){throw new Error("channel and label counts mismatch: "+r)}const{channels:i,labels:o}=u[r];delete u[r].channels;delete u[r].labels;Object.defineProperty(u[r],"channels",{value:i});Object.defineProperty(u[r],"labels",{value:o})}u.rgb.hsl=function(r){const i=r[0]/255;const o=r[1]/255;const a=r[2]/255;const l=Math.min(i,o,a);const u=Math.max(i,o,a);const c=u-l;let h;let p;if(u===l){h=0}else if(i===u){h=(o-a)/c}else if(o===u){h=2+(a-i)/c}else if(a===u){h=4+(i-o)/c}h=Math.min(h*60,360);if(h<0){h+=360}const d=(l+u)/2;if(u===l){p=0}else if(d<=.5){p=c/(u+l)}else{p=c/(2-u-l)}return[h,p*100,d*100]};u.rgb.hsv=function(r){let i;let o;let a;let l;let u;const c=r[0]/255;const h=r[1]/255;const p=r[2]/255;const d=Math.max(c,h,p);const m=d-Math.min(c,h,p);const diffc=function(r){return(d-r)/6/m+1/2};if(m===0){l=0;u=0}else{u=m/d;i=diffc(c);o=diffc(h);a=diffc(p);if(c===d){l=a-o}else if(h===d){l=1/3+i-a}else if(p===d){l=2/3+o-i}if(l<0){l+=1}else if(l>1){l-=1}}return[l*360,u*100,d*100]};u.rgb.hwb=function(r){const i=r[0];const o=r[1];let a=r[2];const l=u.rgb.hsl(r)[0];const c=1/255*Math.min(i,Math.min(o,a));a=1-1/255*Math.max(i,Math.max(o,a));return[l,c*100,a*100]};u.rgb.cmyk=function(r){const i=r[0]/255;const o=r[1]/255;const a=r[2]/255;const l=Math.min(1-i,1-o,1-a);const u=(1-i-l)/(1-l)||0;const c=(1-o-l)/(1-l)||0;const h=(1-a-l)/(1-l)||0;return[u*100,c*100,h*100,l*100]};function comparativeDistance(r,i){return(r[0]-i[0])**2+(r[1]-i[1])**2+(r[2]-i[2])**2}u.rgb.keyword=function(r){const i=l[r];if(i){return i}let o=Infinity;let u;for(const i of Object.keys(a)){const l=a[i];const c=comparativeDistance(r,l);if(c<o){o=c;u=i}}return u};u.keyword.rgb=function(r){return a[r]};u.rgb.xyz=function(r){let i=r[0]/255;let o=r[1]/255;let a=r[2]/255;i=i>.04045?((i+.055)/1.055)**2.4:i/12.92;o=o>.04045?((o+.055)/1.055)**2.4:o/12.92;a=a>.04045?((a+.055)/1.055)**2.4:a/12.92;const l=i*.4124+o*.3576+a*.1805;const u=i*.2126+o*.7152+a*.0722;const c=i*.0193+o*.1192+a*.9505;return[l*100,u*100,c*100]};u.rgb.lab=function(r){const i=u.rgb.xyz(r);let o=i[0];let a=i[1];let l=i[2];o/=95.047;a/=100;l/=108.883;o=o>.008856?o**(1/3):7.787*o+16/116;a=a>.008856?a**(1/3):7.787*a+16/116;l=l>.008856?l**(1/3):7.787*l+16/116;const c=116*a-16;const h=500*(o-a);const p=200*(a-l);return[c,h,p]};u.hsl.rgb=function(r){const i=r[0]/360;const o=r[1]/100;const a=r[2]/100;let l;let u;let c;if(o===0){c=a*255;return[c,c,c]}if(a<.5){l=a*(1+o)}else{l=a+o-a*o}const h=2*a-l;const p=[0,0,0];for(let r=0;r<3;r++){u=i+1/3*-(r-1);if(u<0){u++}if(u>1){u--}if(6*u<1){c=h+(l-h)*6*u}else if(2*u<1){c=l}else if(3*u<2){c=h+(l-h)*(2/3-u)*6}else{c=h}p[r]=c*255}return p};u.hsl.hsv=function(r){const i=r[0];let o=r[1]/100;let a=r[2]/100;let l=o;const u=Math.max(a,.01);a*=2;o*=a<=1?a:2-a;l*=u<=1?u:2-u;const c=(a+o)/2;const h=a===0?2*l/(u+l):2*o/(a+o);return[i,h*100,c*100]};u.hsv.rgb=function(r){const i=r[0]/60;const o=r[1]/100;let a=r[2]/100;const l=Math.floor(i)%6;const u=i-Math.floor(i);const c=255*a*(1-o);const h=255*a*(1-o*u);const p=255*a*(1-o*(1-u));a*=255;switch(l){case 0:return[a,p,c];case 1:return[h,a,c];case 2:return[c,a,p];case 3:return[c,h,a];case 4:return[p,c,a];case 5:return[a,c,h]}};u.hsv.hsl=function(r){const i=r[0];const o=r[1]/100;const a=r[2]/100;const l=Math.max(a,.01);let u;let c;c=(2-o)*a;const h=(2-o)*l;u=o*l;u/=h<=1?h:2-h;u=u||0;c/=2;return[i,u*100,c*100]};u.hwb.rgb=function(r){const i=r[0]/360;let o=r[1]/100;let a=r[2]/100;const l=o+a;let u;if(l>1){o/=l;a/=l}const c=Math.floor(6*i);const h=1-a;u=6*i-c;if((c&1)!==0){u=1-u}const p=o+u*(h-o);let d;let m;let g;switch(c){default:case 6:case 0:d=h;m=p;g=o;break;case 1:d=p;m=h;g=o;break;case 2:d=o;m=h;g=p;break;case 3:d=o;m=p;g=h;break;case 4:d=p;m=o;g=h;break;case 5:d=h;m=o;g=p;break}return[d*255,m*255,g*255]};u.cmyk.rgb=function(r){const i=r[0]/100;const o=r[1]/100;const a=r[2]/100;const l=r[3]/100;const u=1-Math.min(1,i*(1-l)+l);const c=1-Math.min(1,o*(1-l)+l);const h=1-Math.min(1,a*(1-l)+l);return[u*255,c*255,h*255]};u.xyz.rgb=function(r){const i=r[0]/100;const o=r[1]/100;const a=r[2]/100;let l;let u;let c;l=i*3.2406+o*-1.5372+a*-.4986;u=i*-.9689+o*1.8758+a*.0415;c=i*.0557+o*-.204+a*1.057;l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92;u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92;c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92;l=Math.min(Math.max(0,l),1);u=Math.min(Math.max(0,u),1);c=Math.min(Math.max(0,c),1);return[l*255,u*255,c*255]};u.xyz.lab=function(r){let i=r[0];let o=r[1];let a=r[2];i/=95.047;o/=100;a/=108.883;i=i>.008856?i**(1/3):7.787*i+16/116;o=o>.008856?o**(1/3):7.787*o+16/116;a=a>.008856?a**(1/3):7.787*a+16/116;const l=116*o-16;const u=500*(i-o);const c=200*(o-a);return[l,u,c]};u.lab.xyz=function(r){const i=r[0];const o=r[1];const a=r[2];let l;let u;let c;u=(i+16)/116;l=o/500+u;c=u-a/200;const h=u**3;const p=l**3;const d=c**3;u=h>.008856?h:(u-16/116)/7.787;l=p>.008856?p:(l-16/116)/7.787;c=d>.008856?d:(c-16/116)/7.787;l*=95.047;u*=100;c*=108.883;return[l,u,c]};u.lab.lch=function(r){const i=r[0];const o=r[1];const a=r[2];let l;const u=Math.atan2(a,o);l=u*360/2/Math.PI;if(l<0){l+=360}const c=Math.sqrt(o*o+a*a);return[i,c,l]};u.lch.lab=function(r){const i=r[0];const o=r[1];const a=r[2];const l=a/360*2*Math.PI;const u=o*Math.cos(l);const c=o*Math.sin(l);return[i,u,c]};u.rgb.ansi16=function(r,i=null){const[o,a,l]=r;let c=i===null?u.rgb.hsv(r)[2]:i;c=Math.round(c/50);if(c===0){return 30}let h=30+(Math.round(l/255)<<2|Math.round(a/255)<<1|Math.round(o/255));if(c===2){h+=60}return h};u.hsv.ansi16=function(r){return u.rgb.ansi16(u.hsv.rgb(r),r[2])};u.rgb.ansi256=function(r){const i=r[0];const o=r[1];const a=r[2];if(i===o&&o===a){if(i<8){return 16}if(i>248){return 231}return Math.round((i-8)/247*24)+232}const l=16+36*Math.round(i/255*5)+6*Math.round(o/255*5)+Math.round(a/255*5);return l};u.ansi16.rgb=function(r){let i=r%10;if(i===0||i===7){if(r>50){i+=3.5}i=i/10.5*255;return[i,i,i]}const o=(~~(r>50)+1)*.5;const a=(i&1)*o*255;const l=(i>>1&1)*o*255;const u=(i>>2&1)*o*255;return[a,l,u]};u.ansi256.rgb=function(r){if(r>=232){const i=(r-232)*10+8;return[i,i,i]}r-=16;let i;const o=Math.floor(r/36)/5*255;const a=Math.floor((i=r%36)/6)/5*255;const l=i%6/5*255;return[o,a,l]};u.rgb.hex=function(r){const i=((Math.round(r[0])&255)<<16)+((Math.round(r[1])&255)<<8)+(Math.round(r[2])&255);const o=i.toString(16).toUpperCase();return"000000".substring(o.length)+o};u.hex.rgb=function(r){const i=r.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!i){return[0,0,0]}let o=i[0];if(i[0].length===3){o=o.split("").map((r=>r+r)).join("")}const a=parseInt(o,16);const l=a>>16&255;const u=a>>8&255;const c=a&255;return[l,u,c]};u.rgb.hcg=function(r){const i=r[0]/255;const o=r[1]/255;const a=r[2]/255;const l=Math.max(Math.max(i,o),a);const u=Math.min(Math.min(i,o),a);const c=l-u;let h;let p;if(c<1){h=u/(1-c)}else{h=0}if(c<=0){p=0}else if(l===i){p=(o-a)/c%6}else if(l===o){p=2+(a-i)/c}else{p=4+(i-o)/c}p/=6;p%=1;return[p*360,c*100,h*100]};u.hsl.hcg=function(r){const i=r[1]/100;const o=r[2]/100;const a=o<.5?2*i*o:2*i*(1-o);let l=0;if(a<1){l=(o-.5*a)/(1-a)}return[r[0],a*100,l*100]};u.hsv.hcg=function(r){const i=r[1]/100;const o=r[2]/100;const a=i*o;let l=0;if(a<1){l=(o-a)/(1-a)}return[r[0],a*100,l*100]};u.hcg.rgb=function(r){const i=r[0]/360;const o=r[1]/100;const a=r[2]/100;if(o===0){return[a*255,a*255,a*255]}const l=[0,0,0];const u=i%1*6;const c=u%1;const h=1-c;let p=0;switch(Math.floor(u)){case 0:l[0]=1;l[1]=c;l[2]=0;break;case 1:l[0]=h;l[1]=1;l[2]=0;break;case 2:l[0]=0;l[1]=1;l[2]=c;break;case 3:l[0]=0;l[1]=h;l[2]=1;break;case 4:l[0]=c;l[1]=0;l[2]=1;break;default:l[0]=1;l[1]=0;l[2]=h}p=(1-o)*a;return[(o*l[0]+p)*255,(o*l[1]+p)*255,(o*l[2]+p)*255]};u.hcg.hsv=function(r){const i=r[1]/100;const o=r[2]/100;const a=i+o*(1-i);let l=0;if(a>0){l=i/a}return[r[0],l*100,a*100]};u.hcg.hsl=function(r){const i=r[1]/100;const o=r[2]/100;const a=o*(1-i)+.5*i;let l=0;if(a>0&&a<.5){l=i/(2*a)}else if(a>=.5&&a<1){l=i/(2*(1-a))}return[r[0],l*100,a*100]};u.hcg.hwb=function(r){const i=r[1]/100;const o=r[2]/100;const a=i+o*(1-i);return[r[0],(a-i)*100,(1-a)*100]};u.hwb.hcg=function(r){const i=r[1]/100;const o=r[2]/100;const a=1-o;const l=a-i;let u=0;if(l<1){u=(a-l)/(1-l)}return[r[0],l*100,u*100]};u.apple.rgb=function(r){return[r[0]/65535*255,r[1]/65535*255,r[2]/65535*255]};u.rgb.apple=function(r){return[r[0]/255*65535,r[1]/255*65535,r[2]/255*65535]};u.gray.rgb=function(r){return[r[0]/100*255,r[0]/100*255,r[0]/100*255]};u.gray.hsl=function(r){return[0,0,r[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(r){return[0,100,r[0]]};u.gray.cmyk=function(r){return[0,0,0,r[0]]};u.gray.lab=function(r){return[r[0],0,0]};u.gray.hex=function(r){const i=Math.round(r[0]/100*255)&255;const o=(i<<16)+(i<<8)+i;const a=o.toString(16).toUpperCase();return"000000".substring(a.length)+a};u.rgb.gray=function(r){const i=(r[0]+r[1]+r[2])/3;return[i/255*100]}},1593:(r,i,o)=>{const a=o(7606);const l=o(1529);const u={};const c=Object.keys(a);function wrapRaw(r){const wrappedFn=function(...i){const o=i[0];if(o===undefined||o===null){return o}if(o.length>1){i=o}return r(i)};if("conversion"in r){wrappedFn.conversion=r.conversion}return wrappedFn}function wrapRounded(r){const wrappedFn=function(...i){const o=i[0];if(o===undefined||o===null){return o}if(o.length>1){i=o}const a=r(i);if(typeof a==="object"){for(let r=a.length,i=0;i<r;i++){a[i]=Math.round(a[i])}}return a};if("conversion"in r){wrappedFn.conversion=r.conversion}return wrappedFn}c.forEach((r=>{u[r]={};Object.defineProperty(u[r],"channels",{value:a[r].channels});Object.defineProperty(u[r],"labels",{value:a[r].labels});const i=l(r);const o=Object.keys(i);o.forEach((o=>{const a=i[o];u[r][o]=wrapRounded(a);u[r][o].raw=wrapRaw(a)}))}));r.exports=u},1529:(r,i,o)=>{const a=o(7606);function buildGraph(){const r={};const i=Object.keys(a);for(let o=i.length,a=0;a<o;a++){r[i[a]]={distance:-1,parent:null}}return r}function deriveBFS(r){const i=buildGraph();const o=[r];i[r].distance=0;while(o.length){const r=o.pop();const l=Object.keys(a[r]);for(let a=l.length,u=0;u<a;u++){const a=l[u];const c=i[a];if(c.distance===-1){c.distance=i[r].distance+1;c.parent=r;o.unshift(a)}}}return i}function link(r,i){return function(o){return i(r(o))}}function wrapConversion(r,i){const o=[i[r].parent,r];let l=a[i[r].parent][r];let u=i[r].parent;while(i[u].parent){o.unshift(i[u].parent);l=link(a[i[u].parent][u],l);u=i[u].parent}l.conversion=o;return l}r.exports=function(r){const i=deriveBFS(r);const o={};const a=Object.keys(i);for(let r=a.length,l=0;l<r;l++){const r=a[l];const u=i[r];if(u.parent===null){continue}o[r]=wrapConversion(r,i)}return o}},2058:r=>{"use strict";r.exports=balanced;function balanced(r,i,o){if(r instanceof RegExp)r=maybeMatch(r,o);if(i instanceof RegExp)i=maybeMatch(i,o);var a=range(r,i,o);return a&&{start:a[0],end:a[1],pre:o.slice(0,a[0]),body:o.slice(a[0]+r.length,a[1]),post:o.slice(a[1]+i.length)}}function maybeMatch(r,i){var o=i.match(r);return o?o[0]:null}balanced.range=range;function range(r,i,o){var a,l,u,c,h;var p=o.indexOf(r);var d=o.indexOf(i,p+1);var m=p;if(p>=0&&d>0){if(r===i){return[p,d]}a=[];u=o.length;while(m>=0&&!h){if(m==p){a.push(m);p=o.indexOf(r,m+1)}else if(a.length==1){h=[a.pop(),d]}else{l=a.pop();if(l<u){u=l;c=d}d=o.indexOf(i,m+1)}m=p<d&&p>=0?p:d}if(a.length){h=[u,c]}}return h}},2991:(r,i)=>{"use strict";i.byteLength=byteLength;i.toByteArray=toByteArray;i.fromByteArray=fromByteArray;var o=[];var a=[];var l=typeof Uint8Array!=="undefined"?Uint8Array:Array;var u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var c=0,h=u.length;c<h;++c){o[c]=u[c];a[u.charCodeAt(c)]=c}a["-".charCodeAt(0)]=62;a["_".charCodeAt(0)]=63;function getLens(r){var i=r.length;if(i%4>0){throw new Error("Invalid string. Length must be a multiple of 4")}var o=r.indexOf("=");if(o===-1)o=i;var a=o===i?0:4-o%4;return[o,a]}function byteLength(r){var i=getLens(r);var o=i[0];var a=i[1];return(o+a)*3/4-a}function _byteLength(r,i,o){return(i+o)*3/4-o}function toByteArray(r){var i;var o=getLens(r);var u=o[0];var c=o[1];var h=new l(_byteLength(r,u,c));var p=0;var d=c>0?u-4:u;var m;for(m=0;m<d;m+=4){i=a[r.charCodeAt(m)]<<18|a[r.charCodeAt(m+1)]<<12|a[r.charCodeAt(m+2)]<<6|a[r.charCodeAt(m+3)];h[p++]=i>>16&255;h[p++]=i>>8&255;h[p++]=i&255}if(c===2){i=a[r.charCodeAt(m)]<<2|a[r.charCodeAt(m+1)]>>4;h[p++]=i&255}if(c===1){i=a[r.charCodeAt(m)]<<10|a[r.charCodeAt(m+1)]<<4|a[r.charCodeAt(m+2)]>>2;h[p++]=i>>8&255;h[p++]=i&255}return h}function tripletToBase64(r){return o[r>>18&63]+o[r>>12&63]+o[r>>6&63]+o[r&63]}function encodeChunk(r,i,o){var a;var l=[];for(var u=i;u<o;u+=3){a=(r[u]<<16&16711680)+(r[u+1]<<8&65280)+(r[u+2]&255);l.push(tripletToBase64(a))}return l.join("")}function fromByteArray(r){var i;var a=r.length;var l=a%3;var u=[];var c=16383;for(var h=0,p=a-l;h<p;h+=c){u.push(encodeChunk(r,h,h+c>p?p:h+c))}if(l===1){i=r[a-1];u.push(o[i>>2]+o[i<<4&63]+"==")}else if(l===2){i=(r[a-2]<<8)+r[a-1];u.push(o[i>>10]+o[i>>4&63]+o[i<<2&63]+"=")}return u.join("")}},3197:(r,i,o)=>{var a=o(5826);var l=o(2058);r.exports=expandTop;var u="\0SLASH"+Math.random()+"\0";var c="\0OPEN"+Math.random()+"\0";var h="\0CLOSE"+Math.random()+"\0";var p="\0COMMA"+Math.random()+"\0";var d="\0PERIOD"+Math.random()+"\0";function numeric(r){return parseInt(r,10)==r?parseInt(r,10):r.charCodeAt(0)}function escapeBraces(r){return r.split("\\\\").join(u).split("\\{").join(c).split("\\}").join(h).split("\\,").join(p).split("\\.").join(d)}function unescapeBraces(r){return r.split(u).join("\\").split(c).join("{").split(h).join("}").split(p).join(",").split(d).join(".")}function parseCommaParts(r){if(!r)return[""];var i=[];var o=l("{","}",r);if(!o)return r.split(",");var a=o.pre;var u=o.body;var c=o.post;var h=a.split(",");h[h.length-1]+="{"+u+"}";var p=parseCommaParts(c);if(c.length){h[h.length-1]+=p.shift();h.push.apply(h,p)}i.push.apply(i,h);return i}function expandTop(r){if(!r)return[];if(r.substr(0,2)==="{}"){r="\\{\\}"+r.substr(2)}return expand(escapeBraces(r),true).map(unescapeBraces)}function identity(r){return r}function embrace(r){return"{"+r+"}"}function isPadded(r){return/^-?0\d/.test(r)}function lte(r,i){return r<=i}function gte(r,i){return r>=i}function expand(r,i){var o=[];var u=l("{","}",r);if(!u||/\$$/.test(u.pre))return[r];var c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(u.body);var p=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(u.body);var d=c||p;var m=u.body.indexOf(",")>=0;if(!d&&!m){if(u.post.match(/,.*\}/)){r=u.pre+"{"+u.body+h+u.post;return expand(r)}return[r]}var g;if(d){g=u.body.split(/\.\./)}else{g=parseCommaParts(u.body);if(g.length===1){g=expand(g[0],false).map(embrace);if(g.length===1){var y=u.post.length?expand(u.post,false):[""];return y.map((function(r){return u.pre+g[0]+r}))}}}var v=u.pre;var y=u.post.length?expand(u.post,false):[""];var b;if(d){var w=numeric(g[0]);var M=numeric(g[1]);var D=Math.max(g[0].length,g[1].length);var T=g.length==3?Math.abs(numeric(g[2])):1;var x=lte;var O=M<w;if(O){T*=-1;x=gte}var N=g.some(isPadded);b=[];for(var _=w;x(_,M);_+=T){var A;if(p){A=String.fromCharCode(_);if(A==="\\")A=""}else{A=String(_);if(N){var S=D-A.length;if(S>0){var I=new Array(S+1).join("0");if(_<0)A="-"+I+A.slice(1);else A=I+A}}}b.push(A)}}else{b=a(g,(function(r){return expand(r,false)}))}for(var C=0;C<b.length;C++){for(var L=0;L<y.length;L++){var P=v+b[C]+y[L];if(!i||d||P)o.push(P)}}return o}},8746:(r,i,o)=>{"use strict";const a=o(3741);const{stdout:l,stderr:u}=o(395);const{stringReplaceAll:c,stringEncaseCRLFWithFirstIndex:h}=o(5611);const{isArray:p}=Array;const d=["ansi","ansi","ansi256","ansi16m"];const m=Object.create(null);const applyOptions=(r,i={})=>{if(i.level&&!(Number.isInteger(i.level)&&i.level>=0&&i.level<=3)){throw new Error("The `level` option should be an integer from 0 to 3")}const o=l?l.level:0;r.level=i.level===undefined?o:i.level};class ChalkClass{constructor(r){return chalkFactory(r)}}const chalkFactory=r=>{const i={};applyOptions(i,r);i.template=(...r)=>chalkTag(i.template,...r);Object.setPrototypeOf(i,Chalk.prototype);Object.setPrototypeOf(i.template,i);i.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")};i.template.Instance=ChalkClass;return i.template};function Chalk(r){return chalkFactory(r)}for(const[r,i]of Object.entries(a)){m[r]={get(){const o=createBuilder(this,createStyler(i.open,i.close,this._styler),this._isEmpty);Object.defineProperty(this,r,{value:o});return o}}}m.visible={get(){const r=createBuilder(this,this._styler,true);Object.defineProperty(this,"visible",{value:r});return r}};const g=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const r of g){m[r]={get(){const{level:i}=this;return function(...o){const l=createStyler(a.color[d[i]][r](...o),a.color.close,this._styler);return createBuilder(this,l,this._isEmpty)}}}}for(const r of g){const i="bg"+r[0].toUpperCase()+r.slice(1);m[i]={get(){const{level:i}=this;return function(...o){const l=createStyler(a.bgColor[d[i]][r](...o),a.bgColor.close,this._styler);return createBuilder(this,l,this._isEmpty)}}}}const y=Object.defineProperties((()=>{}),{...m,level:{enumerable:true,get(){return this._generator.level},set(r){this._generator.level=r}}});const createStyler=(r,i,o)=>{let a;let l;if(o===undefined){a=r;l=i}else{a=o.openAll+r;l=i+o.closeAll}return{open:r,close:i,openAll:a,closeAll:l,parent:o}};const createBuilder=(r,i,o)=>{const builder=(...r)=>{if(p(r[0])&&p(r[0].raw)){return applyStyle(builder,chalkTag(builder,...r))}return applyStyle(builder,r.length===1?""+r[0]:r.join(" "))};Object.setPrototypeOf(builder,y);builder._generator=r;builder._styler=i;builder._isEmpty=o;return builder};const applyStyle=(r,i)=>{if(r.level<=0||!i){return r._isEmpty?"":i}let o=r._styler;if(o===undefined){return i}const{openAll:a,closeAll:l}=o;if(i.indexOf("")!==-1){while(o!==undefined){i=c(i,o.close,o.open);o=o.parent}}const u=i.indexOf("\n");if(u!==-1){i=h(i,l,a,u)}return a+i+l};let v;const chalkTag=(r,...i)=>{const[a]=i;if(!p(a)||!p(a.raw)){return i.join(" ")}const l=i.slice(1);const u=[a.raw[0]];for(let r=1;r<a.length;r++){u.push(String(l[r-1]).replace(/[{}\\]/g,"\\$&"),String(a.raw[r]))}if(v===undefined){v=o(2746)}return v(r,u.join(""))};Object.defineProperties(Chalk.prototype,m);const b=Chalk();b.supportsColor=l;b.stderr=Chalk({level:u?u.level:0});b.stderr.supportsColor=u;r.exports=b},2746:r=>{"use strict";const i=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;const o=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;const a=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;const l=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;const u=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function unescape(r){const i=r[0]==="u";const o=r[1]==="{";if(i&&!o&&r.length===5||r[0]==="x"&&r.length===3){return String.fromCharCode(parseInt(r.slice(1),16))}if(i&&o){return String.fromCodePoint(parseInt(r.slice(2,-1),16))}return u.get(r)||r}function parseArguments(r,i){const o=[];const u=i.trim().split(/\s*,\s*/g);let c;for(const i of u){const u=Number(i);if(!Number.isNaN(u)){o.push(u)}else if(c=i.match(a)){o.push(c[2].replace(l,((r,i,o)=>i?unescape(i):o)))}else{throw new Error(`Invalid Chalk template style argument: ${i} (in style '${r}')`)}}return o}function parseStyle(r){o.lastIndex=0;const i=[];let a;while((a=o.exec(r))!==null){const r=a[1];if(a[2]){const o=parseArguments(r,a[2]);i.push([r].concat(o))}else{i.push([r])}}return i}function buildStyle(r,i){const o={};for(const r of i){for(const i of r.styles){o[i[0]]=r.inverse?null:i.slice(1)}}let a=r;for(const[r,i]of Object.entries(o)){if(!Array.isArray(i)){continue}if(!(r in a)){throw new Error(`Unknown Chalk style: ${r}`)}a=i.length>0?a[r](...i):a[r]}return a}r.exports=(r,o)=>{const a=[];const l=[];let u=[];o.replace(i,((i,o,c,h,p,d)=>{if(o){u.push(unescape(o))}else if(h){const i=u.join("");u=[];l.push(a.length===0?i:buildStyle(r,a)(i));a.push({inverse:c,styles:parseStyle(h)})}else if(p){if(a.length===0){throw new Error("Found extraneous } in Chalk template literal")}l.push(buildStyle(r,a)(u.join("")));u=[];a.pop()}else{u.push(d)}}));l.push(u.join(""));if(a.length>0){const r=`Chalk template literal is missing ${a.length} closing bracket${a.length===1?"":"s"} (\`}\`)`;throw new Error(r)}return l.join("")}},5611:r=>{"use strict";const stringReplaceAll=(r,i,o)=>{let a=r.indexOf(i);if(a===-1){return r}const l=i.length;let u=0;let c="";do{c+=r.substr(u,a-u)+i+o;u=a+l;a=r.indexOf(i,u)}while(a!==-1);c+=r.substr(u);return c};const stringEncaseCRLFWithFirstIndex=(r,i,o,a)=>{let l=0;let u="";do{const c=r[a-1]==="\r";u+=r.substr(l,(c?a-1:a)-l)+i+(c?"\r\n":"\n")+o;l=a+1;a=r.indexOf("\n",l)}while(a!==-1);u+=r.substr(l);return u};r.exports={stringReplaceAll:stringReplaceAll,stringEncaseCRLFWithFirstIndex:stringEncaseCRLFWithFirstIndex}},9407:r=>{"use strict";r.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},8018:(r,i,o)=>{var a=o(2361).EventEmitter;var l=o(2081).spawn;var u=o(1017);var c=u.dirname;var h=u.basename;var p=o(7147);o(3837).inherits(Command,a);i=r.exports=new Command;i.Command=Command;i.Option=Option;function Option(r,i){this.flags=r;this.required=r.indexOf("<")>=0;this.optional=r.indexOf("[")>=0;this.bool=r.indexOf("-no-")===-1;r=r.split(/[ ,|]+/);if(r.length>1&&!/^[[<]/.test(r[1]))this.short=r.shift();this.long=r.shift();this.description=i||""}Option.prototype.name=function(){return this.long.replace("--","").replace("no-","")};Option.prototype.attributeName=function(){return camelcase(this.name())};Option.prototype.is=function(r){return this.short===r||this.long===r};function Command(r){this.commands=[];this.options=[];this._execs={};this._allowUnknownOption=false;this._args=[];this._name=r||""}Command.prototype.command=function(r,i,o){if(typeof i==="object"&&i!==null){o=i;i=null}o=o||{};var a=r.split(/ +/);var l=new Command(a.shift());if(i){l.description(i);this.executables=true;this._execs[l._name]=true;if(o.isDefault)this.defaultExecutable=l._name}l._noHelp=!!o.noHelp;this.commands.push(l);l.parseExpectedArgs(a);l.parent=this;if(i)return this;return l};Command.prototype.arguments=function(r){return this.parseExpectedArgs(r.split(/ +/))};Command.prototype.addImplicitHelpCommand=function(){this.command("help [cmd]","display help for [cmd]")};Command.prototype.parseExpectedArgs=function(r){if(!r.length)return;var i=this;r.forEach((function(r){var o={required:false,name:"",variadic:false};switch(r[0]){case"<":o.required=true;o.name=r.slice(1,-1);break;case"[":o.name=r.slice(1,-1);break}if(o.name.length>3&&o.name.slice(-3)==="..."){o.variadic=true;o.name=o.name.slice(0,-3)}if(o.name){i._args.push(o)}}));return this};Command.prototype.action=function(r){var i=this;var listener=function(o,a){o=o||[];a=a||[];var l=i.parseOptions(a);outputHelpIfNecessary(i,l.unknown);if(l.unknown.length>0){i.unknownOption(l.unknown[0])}if(l.args.length)o=l.args.concat(o);i._args.forEach((function(r,a){if(r.required&&o[a]==null){i.missingArgument(r.name)}else if(r.variadic){if(a!==i._args.length-1){i.variadicArgNotLast(r.name)}o[a]=o.splice(a)}}));if(i._args.length){o[i._args.length]=i}else{o.push(i)}r.apply(i,o)};var o=this.parent||this;var a=o===this?"*":this._name;o.on("command:"+a,listener);if(this._alias)o.on("command:"+this._alias,listener);return this};Command.prototype.option=function(r,i,o,a){var l=this,u=new Option(r,i),c=u.name(),h=u.attributeName();if(typeof o!=="function"){if(o instanceof RegExp){var p=o;o=function(r,i){var o=p.exec(r);return o?o[0]:i}}else{a=o;o=null}}if(!u.bool||u.optional||u.required){if(!u.bool)a=true;if(a!==undefined){l[h]=a;u.defaultValue=a}}this.options.push(u);this.on("option:"+c,(function(r){if(r!==null&&o){r=o(r,l[h]===undefined?a:l[h])}if(typeof l[h]==="boolean"||typeof l[h]==="undefined"){if(r==null){l[h]=u.bool?a||true:false}else{l[h]=r}}else if(r!==null){l[h]=r}}));return this};Command.prototype.allowUnknownOption=function(r){this._allowUnknownOption=arguments.length===0||r;return this};Command.prototype.parse=function(r){if(this.executables)this.addImplicitHelpCommand();this.rawArgs=r;this._name=this._name||h(r[1],".js");if(this.executables&&r.length<3&&!this.defaultExecutable){r.push("--help")}var i=this.parseOptions(this.normalize(r.slice(2)));var o=this.args=i.args;var a=this.parseArgs(this.args,i.unknown);var l=a.args[0];var u=null;if(l){u=this.commands.filter((function(r){return r.alias()===l}))[0]}if(this._execs[l]&&typeof this._execs[l]!=="function"){return this.executeSubCommand(r,o,i.unknown)}else if(u){o[0]=u._name;return this.executeSubCommand(r,o,i.unknown)}else if(this.defaultExecutable){o.unshift(this.defaultExecutable);return this.executeSubCommand(r,o,i.unknown)}return a};Command.prototype.executeSubCommand=function(r,i,o){i=i.concat(o);if(!i.length)this.help();if(i[0]==="help"&&i.length===1)this.help();if(i[0]==="help"){i[0]=i[1];i[1]="--help"}var a=r[1];var d=h(a,u.extname(a))+"-"+i[0];var m;var g=p.realpathSync(a);m=c(g);var y=u.join(m,d);var v=false;if(exists(y+".js")){d=y+".js";v=true}else if(exists(y+".ts")){d=y+".ts";v=true}else if(exists(y)){d=y}i=i.slice(1);var b;if(process.platform!=="win32"){if(v){i.unshift(d);i=(process.execArgv||[]).concat(i);b=l(process.argv[0],i,{stdio:"inherit",customFds:[0,1,2]})}else{b=l(d,i,{stdio:"inherit",customFds:[0,1,2]})}}else{i.unshift(d);b=l(process.execPath,i,{stdio:"inherit"})}var w=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];w.forEach((function(r){process.on(r,(function(){if(b.killed===false&&b.exitCode===null){b.kill(r)}}))}));b.on("close",process.exit.bind(process));b.on("error",(function(r){if(r.code==="ENOENT"){console.error("error: %s(1) does not exist, try --help",d)}else if(r.code==="EACCES"){console.error("error: %s(1) not executable. try chmod or run with root",d)}process.exit(1)}));this.runningCommand=b};Command.prototype.normalize=function(r){var i=[],o,a,l;for(var u=0,c=r.length;u<c;++u){o=r[u];if(u>0){a=this.optionFor(r[u-1])}if(o==="--"){i=i.concat(r.slice(u));break}else if(a&&a.required){i.push(o)}else if(o.length>1&&o[0]==="-"&&o[1]!=="-"){o.slice(1).split("").forEach((function(r){i.push("-"+r)}))}else if(/^--/.test(o)&&~(l=o.indexOf("="))){i.push(o.slice(0,l),o.slice(l+1))}else{i.push(o)}}return i};Command.prototype.parseArgs=function(r,i){var o;if(r.length){o=r[0];if(this.listeners("command:"+o).length){this.emit("command:"+r.shift(),r,i)}else{this.emit("command:*",r)}}else{outputHelpIfNecessary(this,i);if(i.length>0){this.unknownOption(i[0])}if(this.commands.length===0&&this._args.filter((function(r){return r.required})).length===0){this.emit("command:*")}}return this};Command.prototype.optionFor=function(r){for(var i=0,o=this.options.length;i<o;++i){if(this.options[i].is(r)){return this.options[i]}}};Command.prototype.parseOptions=function(r){var i=[],o=r.length,a,l,u;var c=[];for(var h=0;h<o;++h){u=r[h];if(a){i.push(u);continue}if(u==="--"){a=true;continue}l=this.optionFor(u);if(l){if(l.required){u=r[++h];if(u==null)return this.optionMissingArgument(l);this.emit("option:"+l.name(),u)}else if(l.optional){u=r[h+1];if(u==null||u[0]==="-"&&u!=="-"){u=null}else{++h}this.emit("option:"+l.name(),u)}else{this.emit("option:"+l.name())}continue}if(u.length>1&&u[0]==="-"){c.push(u);if(h+1<r.length&&r[h+1][0]!=="-"){c.push(r[++h])}continue}i.push(u)}return{args:i,unknown:c}};Command.prototype.opts=function(){var r={},i=this.options.length;for(var o=0;o<i;o++){var a=this.options[o].attributeName();r[a]=a===this._versionOptionName?this._version:this[a]}return r};Command.prototype.missingArgument=function(r){console.error("error: missing required argument `%s'",r);process.exit(1)};Command.prototype.optionMissingArgument=function(r,i){if(i){console.error("error: option `%s' argument missing, got `%s'",r.flags,i)}else{console.error("error: option `%s' argument missing",r.flags)}process.exit(1)};Command.prototype.unknownOption=function(r){if(this._allowUnknownOption)return;console.error("error: unknown option `%s'",r);process.exit(1)};Command.prototype.variadicArgNotLast=function(r){console.error("error: variadic arguments must be last `%s'",r);process.exit(1)};Command.prototype.version=function(r,i){if(arguments.length===0)return this._version;this._version=r;i=i||"-V, --version";var o=new Option(i,"output the version number");this._versionOptionName=o.long.substr(2)||"version";this.options.push(o);this.on("option:"+this._versionOptionName,(function(){process.stdout.write(r+"\n");process.exit(0)}));return this};Command.prototype.description=function(r,i){if(arguments.length===0)return this._description;this._description=r;this._argsDescription=i;return this};Command.prototype.alias=function(r){var i=this;if(this.commands.length!==0){i=this.commands[this.commands.length-1]}if(arguments.length===0)return i._alias;if(r===i._name)throw new Error("Command alias can't be the same as its name");i._alias=r;return this};Command.prototype.usage=function(r){var i=this._args.map((function(r){return humanReadableArgName(r)}));var o="[options]"+(this.commands.length?" [command]":"")+(this._args.length?" "+i.join(" "):"");if(arguments.length===0)return this._usage||o;this._usage=r;return this};Command.prototype.name=function(r){if(arguments.length===0)return this._name;this._name=r;return this};Command.prototype.prepareCommands=function(){return this.commands.filter((function(r){return!r._noHelp})).map((function(r){var i=r._args.map((function(r){return humanReadableArgName(r)})).join(" ");return[r._name+(r._alias?"|"+r._alias:"")+(r.options.length?" [options]":"")+(i?" "+i:""),r._description]}))};Command.prototype.largestCommandLength=function(){var r=this.prepareCommands();return r.reduce((function(r,i){return Math.max(r,i[0].length)}),0)};Command.prototype.largestOptionLength=function(){var r=[].slice.call(this.options);r.push({flags:"-h, --help"});return r.reduce((function(r,i){return Math.max(r,i.flags.length)}),0)};Command.prototype.largestArgLength=function(){return this._args.reduce((function(r,i){return Math.max(r,i.name.length)}),0)};Command.prototype.padWidth=function(){var r=this.largestOptionLength();if(this._argsDescription&&this._args.length){if(this.largestArgLength()>r){r=this.largestArgLength()}}if(this.commands&&this.commands.length){if(this.largestCommandLength()>r){r=this.largestCommandLength()}}return r};Command.prototype.optionHelp=function(){var r=this.padWidth();return this.options.map((function(i){return pad(i.flags,r)+" "+i.description+(i.bool&&i.defaultValue!==undefined?" (default: "+JSON.stringify(i.defaultValue)+")":"")})).concat([pad("-h, --help",r)+" "+"output usage information"]).join("\n")};Command.prototype.commandHelp=function(){if(!this.commands.length)return"";var r=this.prepareCommands();var i=this.padWidth();return["Commands:",r.map((function(r){var o=r[1]?" "+r[1]:"";return(o?pad(r[0],i):r[0])+o})).join("\n").replace(/^/gm," "),""].join("\n")};Command.prototype.helpInformation=function(){var r=[];if(this._description){r=[this._description,""];var i=this._argsDescription;if(i&&this._args.length){var o=this.padWidth();r.push("Arguments:");r.push("");this._args.forEach((function(a){r.push(" "+pad(a.name,o)+" "+i[a.name])}));r.push("")}}var a=this._name;if(this._alias){a=a+"|"+this._alias}var l=["Usage: "+a+" "+this.usage(),""];var u=[];var c=this.commandHelp();if(c)u=[c];var h=["Options:",""+this.optionHelp().replace(/^/gm," "),""];return l.concat(r).concat(h).concat(u).join("\n")};Command.prototype.outputHelp=function(r){if(!r){r=function(r){return r}}process.stdout.write(r(this.helpInformation()));this.emit("--help")};Command.prototype.help=function(r){this.outputHelp(r);process.exit()};function camelcase(r){return r.split("-").reduce((function(r,i){return r+i[0].toUpperCase()+i.slice(1)}))}function pad(r,i){var o=Math.max(0,i-r.length);return r+Array(o+1).join(" ")}function outputHelpIfNecessary(r,i){i=i||[];for(var o=0;o<i.length;o++){if(i[o]==="--help"||i[o]==="-h"){r.outputHelp();process.exit(0)}}}function humanReadableArgName(r){var i=r.name+(r.variadic===true?"...":"");return r.required?"<"+i+">":"["+i+"]"}function exists(r){try{if(p.statSync(r).isFile()){return true}}catch(r){return false}}},5826:r=>{r.exports=function(r,o){var a=[];for(var l=0;l<r.length;l++){var u=o(r[l],l);if(i(u))a.push.apply(a,u);else a.push(u)}return a};var i=Array.isArray||function(r){return Object.prototype.toString.call(r)==="[object Array]"}},5134:r=>{"use strict";
1
+ (()=>{var r={5642:function(r,i,o){"use strict";var a=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};const l=a(o(7987));function spawnAsync(r,i,o={}){const a=new Error;const u=a.stack?a.stack.replace(/^.*/," ..."):null;let c;let h=new Promise(((a,h)=>{let{ignoreStdio:d,...p}=o;c=(0,l.default)(r,i,p);let m="";let g="";if(!d){if(c.stdout){c.stdout.on("data",(r=>{m+=r}))}if(c.stderr){c.stderr.on("data",(r=>{g+=r}))}}let completionListener=(o,l)=>{c.removeListener("error",errorListener);let d={pid:c.pid,output:[m,g],stdout:m,stderr:g,status:o,signal:l};if(o!==0){let a=i&&i.length>0?` ${i.join(" ")}`:"";let c=l?new Error(`${r}${a} exited with signal: ${l}`):new Error(`${r}${a} exited with non-zero code: ${o}`);if(c.stack&&u){c.stack+=`\n${u}`}Object.assign(c,d);h(c)}else{a(d)}};let errorListener=r=>{if(d){c.removeListener("exit",completionListener)}else{c.removeListener("close",completionListener)}Object.assign(r,{pid:c.pid,output:[m,g],stdout:m,stderr:g,status:null,signal:null});h(r)};if(d){c.once("exit",completionListener)}else{c.once("close",completionListener)}c.once("error",errorListener)}));h.child=c;return h}r.exports=spawnAsync},8951:(r,i)=>{"use strict";function find(r,i,o){if(o===undefined){o=Array.prototype}if(r&&typeof o.find==="function"){return o.find.call(r,i)}for(var a=0;a<r.length;a++){if(Object.prototype.hasOwnProperty.call(r,a)){var l=r[a];if(i.call(undefined,l,a,r)){return l}}}}function freeze(r,i){if(i===undefined){i=Object}return i&&typeof i.freeze==="function"?i.freeze(r):r}var o=freeze({HTML:"text/html",isHTML:function(r){return r===o.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"});var a=freeze({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(r){return r===a.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});i.find=find;i.freeze=freeze;i.MIME_TYPE=o;i.NAMESPACE=a},2800:(r,i,o)=>{var a;var l=o(8951);var u=o(95);var c=o(3258);var h=o(5705);var d=u.DOMImplementation;var p=l.NAMESPACE;var m=h.ParseError;var g=h.XMLReader;function DOMParser(r){this.options=r||{locator:{}}}DOMParser.prototype.parseFromString=function(r,i){var o=this.options;var a=new g;var l=o.domBuilder||new DOMHandler;var u=o.errorHandler;var h=o.locator;var d=o.xmlns||{};var m=/\/x?html?$/.test(i);var y=m?c.HTML_ENTITIES:c.XML_ENTITIES;if(h){l.setDocumentLocator(h)}a.errorHandler=buildErrorHandler(u,l,h);a.domBuilder=o.domBuilder||l;if(m){d[""]=p.HTML}d.xml=d.xml||p.XML;if(r&&typeof r==="string"){a.parse(r,d,y)}else{a.errorHandler.error("invalid doc source")}return l.doc};function buildErrorHandler(r,i,o){if(!r){if(i instanceof DOMHandler){return i}r=i}var a={};var l=r instanceof Function;o=o||{};function build(i){var u=r[i];if(!u&&l){u=r.length==2?function(o){r(i,o)}:r}a[i]=u&&function(r){u("[xmldom "+i+"]\t"+r+_locator(o))}||function(){}}build("warning");build("error");build("fatalError");return a}function DOMHandler(){this.cdata=false}function position(r,i){i.lineNumber=r.lineNumber;i.columnNumber=r.columnNumber}DOMHandler.prototype={startDocument:function(){this.doc=(new d).createDocument(null,null,null);if(this.locator){this.doc.documentURI=this.locator.systemId}},startElement:function(r,i,o,a){var l=this.doc;var u=l.createElementNS(r,o||i);var c=a.length;appendElement(this,u);this.currentElement=u;this.locator&&position(this.locator,u);for(var h=0;h<c;h++){var r=a.getURI(h);var d=a.getValue(h);var o=a.getQName(h);var p=l.createAttributeNS(r,o);this.locator&&position(a.getLocator(h),p);p.value=p.nodeValue=d;u.setAttributeNode(p)}},endElement:function(r,i,o){var a=this.currentElement;var l=a.tagName;this.currentElement=a.parentNode},startPrefixMapping:function(r,i){},endPrefixMapping:function(r){},processingInstruction:function(r,i){var o=this.doc.createProcessingInstruction(r,i);this.locator&&position(this.locator,o);appendElement(this,o)},ignorableWhitespace:function(r,i,o){},characters:function(r,i,o){r=_toString.apply(this,arguments);if(r){if(this.cdata){var a=this.doc.createCDATASection(r)}else{var a=this.doc.createTextNode(r)}if(this.currentElement){this.currentElement.appendChild(a)}else if(/^\s*$/.test(r)){this.doc.appendChild(a)}this.locator&&position(this.locator,a)}},skippedEntity:function(r){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(r){if(this.locator=r){r.lineNumber=0}},comment:function(r,i,o){r=_toString.apply(this,arguments);var a=this.doc.createComment(r);this.locator&&position(this.locator,a);appendElement(this,a)},startCDATA:function(){this.cdata=true},endCDATA:function(){this.cdata=false},startDTD:function(r,i,o){var a=this.doc.implementation;if(a&&a.createDocumentType){var l=a.createDocumentType(r,i,o);this.locator&&position(this.locator,l);appendElement(this,l);this.doc.doctype=l}},warning:function(r){console.warn("[xmldom warning]\t"+r,_locator(this.locator))},error:function(r){console.error("[xmldom error]\t"+r,_locator(this.locator))},fatalError:function(r){throw new m(r,this.locator)}};function _locator(r){if(r){return"\n@"+(r.systemId||"")+"#[line:"+r.lineNumber+",col:"+r.columnNumber+"]"}}function _toString(r,i,o){if(typeof r=="string"){return r.substr(i,o)}else{if(r.length>=i+o||i){return new java.lang.String(r,i,o)+""}return r}}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(r){DOMHandler.prototype[r]=function(){return null}}));function appendElement(r,i){if(!r.currentElement){r.doc.appendChild(i)}else{r.currentElement.appendChild(i)}}a=DOMHandler;i.DOMParser=DOMParser;a=u.DOMImplementation;a=u.XMLSerializer},95:(r,i,o)=>{var a=o(8951);var l=a.find;var u=a.NAMESPACE;function notEmptyString(r){return r!==""}function splitOnASCIIWhitespace(r){return r?r.split(/[\t\n\f\r ]+/).filter(notEmptyString):[]}function orderedSetReducer(r,i){if(!r.hasOwnProperty(i)){r[i]=true}return r}function toOrderedSet(r){if(!r)return[];var i=splitOnASCIIWhitespace(r);return Object.keys(i.reduce(orderedSetReducer,{}))}function arrayIncludes(r){return function(i){return r&&r.indexOf(i)!==-1}}function copy(r,i){for(var o in r){if(Object.prototype.hasOwnProperty.call(r,o)){i[o]=r[o]}}}function _extends(r,i){var o=r.prototype;if(!(o instanceof i)){function t(){}t.prototype=i.prototype;t=new t;copy(o,t);r.prototype=o=t}if(o.constructor!=r){if(typeof r!="function"){console.error("unknown Class:"+r)}o.constructor=r}}var c={};var h=c.ELEMENT_NODE=1;var d=c.ATTRIBUTE_NODE=2;var p=c.TEXT_NODE=3;var m=c.CDATA_SECTION_NODE=4;var g=c.ENTITY_REFERENCE_NODE=5;var y=c.ENTITY_NODE=6;var v=c.PROCESSING_INSTRUCTION_NODE=7;var b=c.COMMENT_NODE=8;var w=c.DOCUMENT_NODE=9;var M=c.DOCUMENT_TYPE_NODE=10;var E=c.DOCUMENT_FRAGMENT_NODE=11;var D=c.NOTATION_NODE=12;var T={};var x={};var O=T.INDEX_SIZE_ERR=(x[1]="Index size error",1);var N=T.DOMSTRING_SIZE_ERR=(x[2]="DOMString size error",2);var _=T.HIERARCHY_REQUEST_ERR=(x[3]="Hierarchy request error",3);var A=T.WRONG_DOCUMENT_ERR=(x[4]="Wrong document",4);var I=T.INVALID_CHARACTER_ERR=(x[5]="Invalid character",5);var L=T.NO_DATA_ALLOWED_ERR=(x[6]="No data allowed",6);var S=T.NO_MODIFICATION_ALLOWED_ERR=(x[7]="No modification allowed",7);var C=T.NOT_FOUND_ERR=(x[8]="Not found",8);var P=T.NOT_SUPPORTED_ERR=(x[9]="Not supported",9);var X=T.INUSE_ATTRIBUTE_ERR=(x[10]="Attribute in use",10);var j=T.INVALID_STATE_ERR=(x[11]="Invalid state",11);var k=T.SYNTAX_ERR=(x[12]="Syntax error",12);var R=T.INVALID_MODIFICATION_ERR=(x[13]="Invalid modification",13);var B=T.NAMESPACE_ERR=(x[14]="Invalid namespace",14);var $=T.INVALID_ACCESS_ERR=(x[15]="Invalid access",15);function DOMException(r,i){if(i instanceof Error){var o=i}else{o=this;Error.call(this,x[r]);this.message=x[r];if(Error.captureStackTrace)Error.captureStackTrace(this,DOMException)}o.code=r;if(i)this.message=this.message+": "+i;return o}DOMException.prototype=Error.prototype;copy(T,DOMException);function NodeList(){}NodeList.prototype={length:0,item:function(r){return this[r]||null},toString:function(r,i){for(var o=[],a=0;a<this.length;a++){serializeToString(this[a],o,r,i)}return o.join("")},filter:function(r){return Array.prototype.filter.call(this,r)},indexOf:function(r){return Array.prototype.indexOf.call(this,r)}};function LiveNodeList(r,i){this._node=r;this._refresh=i;_updateLiveList(this)}function _updateLiveList(r){var i=r._node._inc||r._node.ownerDocument._inc;if(r._inc!=i){var o=r._refresh(r._node);__set__(r,"length",o.length);copy(o,r);r._inc=i}}LiveNodeList.prototype.item=function(r){_updateLiveList(this);return this[r]};_extends(LiveNodeList,NodeList);function NamedNodeMap(){}function _findNodeIndex(r,i){var o=r.length;while(o--){if(r[o]===i){return o}}}function _addNamedNode(r,i,o,a){if(a){i[_findNodeIndex(i,a)]=o}else{i[i.length++]=o}if(r){o.ownerElement=r;var l=r.ownerDocument;if(l){a&&_onRemoveAttribute(l,r,a);_onAddAttribute(l,r,o)}}}function _removeNamedNode(r,i,o){var a=_findNodeIndex(i,o);if(a>=0){var l=i.length-1;while(a<l){i[a]=i[++a]}i.length=l;if(r){var u=r.ownerDocument;if(u){_onRemoveAttribute(u,r,o);o.ownerElement=null}}}else{throw new DOMException(C,new Error(r.tagName+"@"+o))}}NamedNodeMap.prototype={length:0,item:NodeList.prototype.item,getNamedItem:function(r){var i=this.length;while(i--){var o=this[i];if(o.nodeName==r){return o}}},setNamedItem:function(r){var i=r.ownerElement;if(i&&i!=this._ownerElement){throw new DOMException(X)}var o=this.getNamedItem(r.nodeName);_addNamedNode(this._ownerElement,this,r,o);return o},setNamedItemNS:function(r){var i=r.ownerElement,o;if(i&&i!=this._ownerElement){throw new DOMException(X)}o=this.getNamedItemNS(r.namespaceURI,r.localName);_addNamedNode(this._ownerElement,this,r,o);return o},removeNamedItem:function(r){var i=this.getNamedItem(r);_removeNamedNode(this._ownerElement,this,i);return i},removeNamedItemNS:function(r,i){var o=this.getNamedItemNS(r,i);_removeNamedNode(this._ownerElement,this,o);return o},getNamedItemNS:function(r,i){var o=this.length;while(o--){var a=this[o];if(a.localName==i&&a.namespaceURI==r){return a}}return null}};function DOMImplementation(){}DOMImplementation.prototype={hasFeature:function(r,i){return true},createDocument:function(r,i,o){var a=new Document;a.implementation=this;a.childNodes=new NodeList;a.doctype=o||null;if(o){a.appendChild(o)}if(i){var l=a.createElementNS(r,i);a.appendChild(l)}return a},createDocumentType:function(r,i,o){var a=new DocumentType;a.name=r;a.nodeName=r;a.publicId=i||"";a.systemId=o||"";return a}};function Node(){}Node.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(r,i){return _insertBefore(this,r,i)},replaceChild:function(r,i){_insertBefore(this,r,i,assertPreReplacementValidityInDocument);if(i){this.removeChild(i)}},removeChild:function(r){return _removeChild(this,r)},appendChild:function(r){return this.insertBefore(r,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(r){return cloneNode(this.ownerDocument||this,this,r)},normalize:function(){var r=this.firstChild;while(r){var i=r.nextSibling;if(i&&i.nodeType==p&&r.nodeType==p){this.removeChild(i);r.appendData(i.data)}else{r.normalize();r=i}}},isSupported:function(r,i){return this.ownerDocument.implementation.hasFeature(r,i)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(r){var i=this;while(i){var o=i._nsMap;if(o){for(var a in o){if(Object.prototype.hasOwnProperty.call(o,a)&&o[a]===r){return a}}}i=i.nodeType==d?i.ownerDocument:i.parentNode}return null},lookupNamespaceURI:function(r){var i=this;while(i){var o=i._nsMap;if(o){if(r in o){if(Object.prototype.hasOwnProperty.call(o,r)){return o[r]}}}i=i.nodeType==d?i.ownerDocument:i.parentNode}return null},isDefaultNamespace:function(r){var i=this.lookupPrefix(r);return i==null}};function _xmlEncoder(r){return r=="<"&&"&lt;"||r==">"&&"&gt;"||r=="&"&&"&amp;"||r=='"'&&"&quot;"||"&#"+r.charCodeAt()+";"}copy(c,Node);copy(c,Node.prototype);function _visitNode(r,i){if(i(r)){return true}if(r=r.firstChild){do{if(_visitNode(r,i)){return true}}while(r=r.nextSibling)}}function Document(){this.ownerDocument=this}function _onAddAttribute(r,i,o){r&&r._inc++;var a=o.namespaceURI;if(a===u.XMLNS){i._nsMap[o.prefix?o.localName:""]=o.value}}function _onRemoveAttribute(r,i,o,a){r&&r._inc++;var l=o.namespaceURI;if(l===u.XMLNS){delete i._nsMap[o.prefix?o.localName:""]}}function _onUpdateChild(r,i,o){if(r&&r._inc){r._inc++;var a=i.childNodes;if(o){a[a.length++]=o}else{var l=i.firstChild;var u=0;while(l){a[u++]=l;l=l.nextSibling}a.length=u;delete a[a.length]}}}function _removeChild(r,i){var o=i.previousSibling;var a=i.nextSibling;if(o){o.nextSibling=a}else{r.firstChild=a}if(a){a.previousSibling=o}else{r.lastChild=o}i.parentNode=null;i.previousSibling=null;i.nextSibling=null;_onUpdateChild(r.ownerDocument,r);return i}function hasValidParentNodeType(r){return r&&(r.nodeType===Node.DOCUMENT_NODE||r.nodeType===Node.DOCUMENT_FRAGMENT_NODE||r.nodeType===Node.ELEMENT_NODE)}function hasInsertableNodeType(r){return r&&(isElementNode(r)||isTextNode(r)||isDocTypeNode(r)||r.nodeType===Node.DOCUMENT_FRAGMENT_NODE||r.nodeType===Node.COMMENT_NODE||r.nodeType===Node.PROCESSING_INSTRUCTION_NODE)}function isDocTypeNode(r){return r&&r.nodeType===Node.DOCUMENT_TYPE_NODE}function isElementNode(r){return r&&r.nodeType===Node.ELEMENT_NODE}function isTextNode(r){return r&&r.nodeType===Node.TEXT_NODE}function isElementInsertionPossible(r,i){var o=r.childNodes||[];if(l(o,isElementNode)||isDocTypeNode(i)){return false}var a=l(o,isDocTypeNode);return!(i&&a&&o.indexOf(a)>o.indexOf(i))}function isElementReplacementPossible(r,i){var o=r.childNodes||[];function hasElementChildThatIsNotChild(r){return isElementNode(r)&&r!==i}if(l(o,hasElementChildThatIsNotChild)){return false}var a=l(o,isDocTypeNode);return!(i&&a&&o.indexOf(a)>o.indexOf(i))}function assertPreInsertionValidity1to5(r,i,o){if(!hasValidParentNodeType(r)){throw new DOMException(_,"Unexpected parent node type "+r.nodeType)}if(o&&o.parentNode!==r){throw new DOMException(C,"child not in parent")}if(!hasInsertableNodeType(i)||isDocTypeNode(i)&&r.nodeType!==Node.DOCUMENT_NODE){throw new DOMException(_,"Unexpected node type "+i.nodeType+" for parent node type "+r.nodeType)}}function assertPreInsertionValidityInDocument(r,i,o){var a=r.childNodes||[];var u=i.childNodes||[];if(i.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var c=u.filter(isElementNode);if(c.length>1||l(u,isTextNode)){throw new DOMException(_,"More than one element or text in fragment")}if(c.length===1&&!isElementInsertionPossible(r,o)){throw new DOMException(_,"Element in fragment can not be inserted before doctype")}}if(isElementNode(i)){if(!isElementInsertionPossible(r,o)){throw new DOMException(_,"Only one element can be added and only after doctype")}}if(isDocTypeNode(i)){if(l(a,isDocTypeNode)){throw new DOMException(_,"Only one doctype is allowed")}var h=l(a,isElementNode);if(o&&a.indexOf(h)<a.indexOf(o)){throw new DOMException(_,"Doctype can only be inserted before an element")}if(!o&&h){throw new DOMException(_,"Doctype can not be appended since element is present")}}}function assertPreReplacementValidityInDocument(r,i,o){var a=r.childNodes||[];var u=i.childNodes||[];if(i.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var c=u.filter(isElementNode);if(c.length>1||l(u,isTextNode)){throw new DOMException(_,"More than one element or text in fragment")}if(c.length===1&&!isElementReplacementPossible(r,o)){throw new DOMException(_,"Element in fragment can not be inserted before doctype")}}if(isElementNode(i)){if(!isElementReplacementPossible(r,o)){throw new DOMException(_,"Only one element can be added and only after doctype")}}if(isDocTypeNode(i)){function hasDoctypeChildThatIsNotChild(r){return isDocTypeNode(r)&&r!==o}if(l(a,hasDoctypeChildThatIsNotChild)){throw new DOMException(_,"Only one doctype is allowed")}var h=l(a,isElementNode);if(o&&a.indexOf(h)<a.indexOf(o)){throw new DOMException(_,"Doctype can only be inserted before an element")}}}function _insertBefore(r,i,o,a){assertPreInsertionValidity1to5(r,i,o);if(r.nodeType===Node.DOCUMENT_NODE){(a||assertPreInsertionValidityInDocument)(r,i,o)}var l=i.parentNode;if(l){l.removeChild(i)}if(i.nodeType===E){var u=i.firstChild;if(u==null){return i}var c=i.lastChild}else{u=c=i}var h=o?o.previousSibling:r.lastChild;u.previousSibling=h;c.nextSibling=o;if(h){h.nextSibling=u}else{r.firstChild=u}if(o==null){r.lastChild=c}else{o.previousSibling=c}do{u.parentNode=r}while(u!==c&&(u=u.nextSibling));_onUpdateChild(r.ownerDocument||r,r);if(i.nodeType==E){i.firstChild=i.lastChild=null}return i}function _appendSingleChild(r,i){if(i.parentNode){i.parentNode.removeChild(i)}i.parentNode=r;i.previousSibling=r.lastChild;i.nextSibling=null;if(i.previousSibling){i.previousSibling.nextSibling=i}else{r.firstChild=i}r.lastChild=i;_onUpdateChild(r.ownerDocument,r,i);return i}Document.prototype={nodeName:"#document",nodeType:w,doctype:null,documentElement:null,_inc:1,insertBefore:function(r,i){if(r.nodeType==E){var o=r.firstChild;while(o){var a=o.nextSibling;this.insertBefore(o,i);o=a}return r}_insertBefore(this,r,i);r.ownerDocument=this;if(this.documentElement===null&&r.nodeType===h){this.documentElement=r}return r},removeChild:function(r){if(this.documentElement==r){this.documentElement=null}return _removeChild(this,r)},replaceChild:function(r,i){_insertBefore(this,r,i,assertPreReplacementValidityInDocument);r.ownerDocument=this;if(i){this.removeChild(i)}if(isElementNode(r)){this.documentElement=r}},importNode:function(r,i){return importNode(this,r,i)},getElementById:function(r){var i=null;_visitNode(this.documentElement,(function(o){if(o.nodeType==h){if(o.getAttribute("id")==r){i=o;return true}}}));return i},getElementsByClassName:function(r){var i=toOrderedSet(r);return new LiveNodeList(this,(function(o){var a=[];if(i.length>0){_visitNode(o.documentElement,(function(l){if(l!==o&&l.nodeType===h){var u=l.getAttribute("class");if(u){var c=r===u;if(!c){var d=toOrderedSet(u);c=i.every(arrayIncludes(d))}if(c){a.push(l)}}}}))}return a}))},createElement:function(r){var i=new Element;i.ownerDocument=this;i.nodeName=r;i.tagName=r;i.localName=r;i.childNodes=new NodeList;var o=i.attributes=new NamedNodeMap;o._ownerElement=i;return i},createDocumentFragment:function(){var r=new DocumentFragment;r.ownerDocument=this;r.childNodes=new NodeList;return r},createTextNode:function(r){var i=new Text;i.ownerDocument=this;i.appendData(r);return i},createComment:function(r){var i=new Comment;i.ownerDocument=this;i.appendData(r);return i},createCDATASection:function(r){var i=new CDATASection;i.ownerDocument=this;i.appendData(r);return i},createProcessingInstruction:function(r,i){var o=new ProcessingInstruction;o.ownerDocument=this;o.tagName=o.target=r;o.nodeValue=o.data=i;return o},createAttribute:function(r){var i=new Attr;i.ownerDocument=this;i.name=r;i.nodeName=r;i.localName=r;i.specified=true;return i},createEntityReference:function(r){var i=new EntityReference;i.ownerDocument=this;i.nodeName=r;return i},createElementNS:function(r,i){var o=new Element;var a=i.split(":");var l=o.attributes=new NamedNodeMap;o.childNodes=new NodeList;o.ownerDocument=this;o.nodeName=i;o.tagName=i;o.namespaceURI=r;if(a.length==2){o.prefix=a[0];o.localName=a[1]}else{o.localName=i}l._ownerElement=o;return o},createAttributeNS:function(r,i){var o=new Attr;var a=i.split(":");o.ownerDocument=this;o.nodeName=i;o.name=i;o.namespaceURI=r;o.specified=true;if(a.length==2){o.prefix=a[0];o.localName=a[1]}else{o.localName=i}return o}};_extends(Document,Node);function Element(){this._nsMap={}}Element.prototype={nodeType:h,hasAttribute:function(r){return this.getAttributeNode(r)!=null},getAttribute:function(r){var i=this.getAttributeNode(r);return i&&i.value||""},getAttributeNode:function(r){return this.attributes.getNamedItem(r)},setAttribute:function(r,i){var o=this.ownerDocument.createAttribute(r);o.value=o.nodeValue=""+i;this.setAttributeNode(o)},removeAttribute:function(r){var i=this.getAttributeNode(r);i&&this.removeAttributeNode(i)},appendChild:function(r){if(r.nodeType===E){return this.insertBefore(r,null)}else{return _appendSingleChild(this,r)}},setAttributeNode:function(r){return this.attributes.setNamedItem(r)},setAttributeNodeNS:function(r){return this.attributes.setNamedItemNS(r)},removeAttributeNode:function(r){return this.attributes.removeNamedItem(r.nodeName)},removeAttributeNS:function(r,i){var o=this.getAttributeNodeNS(r,i);o&&this.removeAttributeNode(o)},hasAttributeNS:function(r,i){return this.getAttributeNodeNS(r,i)!=null},getAttributeNS:function(r,i){var o=this.getAttributeNodeNS(r,i);return o&&o.value||""},setAttributeNS:function(r,i,o){var a=this.ownerDocument.createAttributeNS(r,i);a.value=a.nodeValue=""+o;this.setAttributeNode(a)},getAttributeNodeNS:function(r,i){return this.attributes.getNamedItemNS(r,i)},getElementsByTagName:function(r){return new LiveNodeList(this,(function(i){var o=[];_visitNode(i,(function(a){if(a!==i&&a.nodeType==h&&(r==="*"||a.tagName==r)){o.push(a)}}));return o}))},getElementsByTagNameNS:function(r,i){return new LiveNodeList(this,(function(o){var a=[];_visitNode(o,(function(l){if(l!==o&&l.nodeType===h&&(r==="*"||l.namespaceURI===r)&&(i==="*"||l.localName==i)){a.push(l)}}));return a}))}};Document.prototype.getElementsByTagName=Element.prototype.getElementsByTagName;Document.prototype.getElementsByTagNameNS=Element.prototype.getElementsByTagNameNS;_extends(Element,Node);function Attr(){}Attr.prototype.nodeType=d;_extends(Attr,Node);function CharacterData(){}CharacterData.prototype={data:"",substringData:function(r,i){return this.data.substring(r,r+i)},appendData:function(r){r=this.data+r;this.nodeValue=this.data=r;this.length=r.length},insertData:function(r,i){this.replaceData(r,0,i)},appendChild:function(r){throw new Error(x[_])},deleteData:function(r,i){this.replaceData(r,i,"")},replaceData:function(r,i,o){var a=this.data.substring(0,r);var l=this.data.substring(r+i);o=a+o+l;this.nodeValue=this.data=o;this.length=o.length}};_extends(CharacterData,Node);function Text(){}Text.prototype={nodeName:"#text",nodeType:p,splitText:function(r){var i=this.data;var o=i.substring(r);i=i.substring(0,r);this.data=this.nodeValue=i;this.length=i.length;var a=this.ownerDocument.createTextNode(o);if(this.parentNode){this.parentNode.insertBefore(a,this.nextSibling)}return a}};_extends(Text,CharacterData);function Comment(){}Comment.prototype={nodeName:"#comment",nodeType:b};_extends(Comment,CharacterData);function CDATASection(){}CDATASection.prototype={nodeName:"#cdata-section",nodeType:m};_extends(CDATASection,CharacterData);function DocumentType(){}DocumentType.prototype.nodeType=M;_extends(DocumentType,Node);function Notation(){}Notation.prototype.nodeType=D;_extends(Notation,Node);function Entity(){}Entity.prototype.nodeType=y;_extends(Entity,Node);function EntityReference(){}EntityReference.prototype.nodeType=g;_extends(EntityReference,Node);function DocumentFragment(){}DocumentFragment.prototype.nodeName="#document-fragment";DocumentFragment.prototype.nodeType=E;_extends(DocumentFragment,Node);function ProcessingInstruction(){}ProcessingInstruction.prototype.nodeType=v;_extends(ProcessingInstruction,Node);function XMLSerializer(){}XMLSerializer.prototype.serializeToString=function(r,i,o){return nodeSerializeToString.call(r,i,o)};Node.prototype.toString=nodeSerializeToString;function nodeSerializeToString(r,i){var o=[];var a=this.nodeType==9&&this.documentElement||this;var l=a.prefix;var u=a.namespaceURI;if(u&&l==null){var l=a.lookupPrefix(u);if(l==null){var c=[{namespace:u,prefix:null}]}}serializeToString(this,o,r,i,c);return o.join("")}function needNamespaceDefine(r,i,o){var a=r.prefix||"";var l=r.namespaceURI;if(!l){return false}if(a==="xml"&&l===u.XML||l===u.XMLNS){return false}var c=o.length;while(c--){var h=o[c];if(h.prefix===a){return h.namespace!==l}}return true}function addSerializedAttribute(r,i,o){r.push(" ",i,'="',o.replace(/[<&"]/g,_xmlEncoder),'"')}function serializeToString(r,i,o,a,l){if(!l){l=[]}if(a){r=a(r);if(r){if(typeof r=="string"){i.push(r);return}}else{return}}switch(r.nodeType){case h:var c=r.attributes;var y=c.length;var D=r.firstChild;var T=r.tagName;o=u.isHTML(r.namespaceURI)||o;var x=T;if(!o&&!r.prefix&&r.namespaceURI){var O;for(var N=0;N<c.length;N++){if(c.item(N).name==="xmlns"){O=c.item(N).value;break}}if(!O){for(var _=l.length-1;_>=0;_--){var A=l[_];if(A.prefix===""&&A.namespace===r.namespaceURI){O=A.namespace;break}}}if(O!==r.namespaceURI){for(var _=l.length-1;_>=0;_--){var A=l[_];if(A.namespace===r.namespaceURI){if(A.prefix){x=A.prefix+":"+T}break}}}}i.push("<",x);for(var I=0;I<y;I++){var L=c.item(I);if(L.prefix=="xmlns"){l.push({prefix:L.localName,namespace:L.value})}else if(L.nodeName=="xmlns"){l.push({prefix:"",namespace:L.value})}}for(var I=0;I<y;I++){var L=c.item(I);if(needNamespaceDefine(L,o,l)){var S=L.prefix||"";var C=L.namespaceURI;addSerializedAttribute(i,S?"xmlns:"+S:"xmlns",C);l.push({prefix:S,namespace:C})}serializeToString(L,i,o,a,l)}if(T===x&&needNamespaceDefine(r,o,l)){var S=r.prefix||"";var C=r.namespaceURI;addSerializedAttribute(i,S?"xmlns:"+S:"xmlns",C);l.push({prefix:S,namespace:C})}if(D||o&&!/^(?:meta|link|img|br|hr|input)$/i.test(T)){i.push(">");if(o&&/^script$/i.test(T)){while(D){if(D.data){i.push(D.data)}else{serializeToString(D,i,o,a,l.slice())}D=D.nextSibling}}else{while(D){serializeToString(D,i,o,a,l.slice());D=D.nextSibling}}i.push("</",x,">")}else{i.push("/>")}return;case w:case E:var D=r.firstChild;while(D){serializeToString(D,i,o,a,l.slice());D=D.nextSibling}return;case d:return addSerializedAttribute(i,r.name,r.value);case p:return i.push(r.data.replace(/[<&]/g,_xmlEncoder).replace(/]]>/g,"]]&gt;"));case m:return i.push("<![CDATA[",r.data,"]]>");case b:return i.push("\x3c!--",r.data,"--\x3e");case M:var P=r.publicId;var X=r.systemId;i.push("<!DOCTYPE ",r.name);if(P){i.push(" PUBLIC ",P);if(X&&X!="."){i.push(" ",X)}i.push(">")}else if(X&&X!="."){i.push(" SYSTEM ",X,">")}else{var j=r.internalSubset;if(j){i.push(" [",j,"]")}i.push(">")}return;case v:return i.push("<?",r.target," ",r.data,"?>");case g:return i.push("&",r.nodeName,";");default:i.push("??",r.nodeName)}}function importNode(r,i,o){var a;switch(i.nodeType){case h:a=i.cloneNode(false);a.ownerDocument=r;case E:break;case d:o=true;break}if(!a){a=i.cloneNode(false)}a.ownerDocument=r;a.parentNode=null;if(o){var l=i.firstChild;while(l){a.appendChild(importNode(r,l,o));l=l.nextSibling}}return a}function cloneNode(r,i,o){var a=new i.constructor;for(var l in i){if(Object.prototype.hasOwnProperty.call(i,l)){var u=i[l];if(typeof u!="object"){if(u!=a[l]){a[l]=u}}}}if(i.childNodes){a.childNodes=new NodeList}a.ownerDocument=r;switch(a.nodeType){case h:var c=i.attributes;var p=a.attributes=new NamedNodeMap;var m=c.length;p._ownerElement=a;for(var g=0;g<m;g++){a.setAttributeNode(cloneNode(r,c.item(g),true))}break;case d:o=true}if(o){var y=i.firstChild;while(y){a.appendChild(cloneNode(r,y,o));y=y.nextSibling}}return a}function __set__(r,i,o){r[i]=o}try{if(Object.defineProperty){Object.defineProperty(LiveNodeList.prototype,"length",{get:function(){_updateLiveList(this);return this.$$length}});Object.defineProperty(Node.prototype,"textContent",{get:function(){return getTextContent(this)},set:function(r){switch(this.nodeType){case h:case E:while(this.firstChild){this.removeChild(this.firstChild)}if(r||String(r)){this.appendChild(this.ownerDocument.createTextNode(r))}break;default:this.data=r;this.value=r;this.nodeValue=r}}});function getTextContent(r){switch(r.nodeType){case h:case E:var i=[];r=r.firstChild;while(r){if(r.nodeType!==7&&r.nodeType!==8){i.push(getTextContent(r))}r=r.nextSibling}return i.join("");default:return r.nodeValue}}__set__=function(r,i,o){r["$$"+i]=o}}}catch(U){}i.DocumentType=DocumentType;i.DOMException=DOMException;i.DOMImplementation=DOMImplementation;i.Element=Element;i.Node=Node;i.NodeList=NodeList;i.XMLSerializer=XMLSerializer},3258:(r,i,o)=>{var a=o(8951).freeze;i.XML_ENTITIES=a({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});i.HTML_ENTITIES=a({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"});i.entityMap=i.HTML_ENTITIES},1328:(r,i,o)=>{var a=o(95);i.DOMImplementation=a.DOMImplementation;i.XMLSerializer=a.XMLSerializer;i.DOMParser=o(2800).DOMParser},5705:(r,i,o)=>{var a=o(8951).NAMESPACE;var l=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;var u=new RegExp("[\\-\\.0-9"+l.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");var c=new RegExp("^"+l.source+u.source+"*(?::"+l.source+u.source+"*)?$");var h=0;var d=1;var p=2;var m=3;var g=4;var y=5;var v=6;var b=7;function ParseError(r,i){this.message=r;this.locator=i;if(Error.captureStackTrace)Error.captureStackTrace(this,ParseError)}ParseError.prototype=new Error;ParseError.prototype.name=ParseError.name;function XMLReader(){}XMLReader.prototype={parse:function(r,i,o){var a=this.domBuilder;a.startDocument();_copy(i,i={});parse(r,i,o,a,this.errorHandler);a.endDocument()}};function parse(r,i,o,l,u){function fixedFromCharCode(r){if(r>65535){r-=65536;var i=55296+(r>>10),o=56320+(r&1023);return String.fromCharCode(i,o)}else{return String.fromCharCode(r)}}function entityReplacer(r){var i=r.slice(1,-1);if(i in o){return o[i]}else if(i.charAt(0)==="#"){return fixedFromCharCode(parseInt(i.substr(1).replace("x","0x")))}else{u.error("entity not found:"+r);return r}}function appendText(i){if(i>y){var o=r.substring(y,i).replace(/&#?\w+;/g,entityReplacer);p&&position(y);l.characters(o,0,i-y);y=i}}function position(i,o){while(i>=h&&(o=d.exec(r))){c=o.index;h=c+o[0].length;p.lineNumber++}p.columnNumber=i-c+1}var c=0;var h=0;var d=/.*(?:\r\n?|\n)|.*$/g;var p=l.locator;var m=[{currentNSMap:i}];var g={};var y=0;while(true){try{var v=r.indexOf("<",y);if(v<0){if(!r.substr(y).match(/^\s*$/)){var b=l.doc;var w=b.createTextNode(r.substr(y));b.appendChild(w);l.currentElement=w}return}if(v>y){appendText(v)}switch(r.charAt(v+1)){case"/":var M=r.indexOf(">",v+3);var E=r.substring(v+2,M).replace(/[ \t\n\r]+$/g,"");var D=m.pop();if(M<0){E=r.substring(v+2).replace(/[\s<].*/,"");u.error("end tag name: "+E+" is not complete:"+D.tagName);M=v+1+E.length}else if(E.match(/\s</)){E=E.replace(/[\s<].*/,"");u.error("end tag name: "+E+" maybe not complete");M=v+1+E.length}var T=D.localNSMap;var x=D.tagName==E;var O=x||D.tagName&&D.tagName.toLowerCase()==E.toLowerCase();if(O){l.endElement(D.uri,D.localName,E);if(T){for(var N in T){if(Object.prototype.hasOwnProperty.call(T,N)){l.endPrefixMapping(N)}}}if(!x){u.fatalError("end tag name: "+E+" is not match the current start tagName:"+D.tagName)}}else{m.push(D)}M++;break;case"?":p&&position(v);M=parseInstruction(r,v,l);break;case"!":p&&position(v);M=parseDCC(r,v,l,u);break;default:p&&position(v);var _=new ElementAttributes;var A=m[m.length-1].currentNSMap;var M=parseElementStartPart(r,v,_,A,entityReplacer,u);var I=_.length;if(!_.closed&&fixSelfClosed(r,M,_.tagName,g)){_.closed=true;if(!o.nbsp){u.warning("unclosed xml attribute")}}if(p&&I){var L=copyLocator(p,{});for(var S=0;S<I;S++){var C=_[S];position(C.offset);C.locator=copyLocator(p,{})}l.locator=L;if(appendElement(_,l,A)){m.push(_)}l.locator=p}else{if(appendElement(_,l,A)){m.push(_)}}if(a.isHTML(_.uri)&&!_.closed){M=parseHtmlSpecialContent(r,M,_.tagName,entityReplacer,l)}else{M++}}}catch(r){if(r instanceof ParseError){throw r}u.error("element parse error: "+r);M=-1}if(M>y){y=M}else{appendText(Math.max(v,y)+1)}}}function copyLocator(r,i){i.lineNumber=r.lineNumber;i.columnNumber=r.columnNumber;return i}function parseElementStartPart(r,i,o,l,u,c){function addAttribute(r,i,a){if(o.attributeNames.hasOwnProperty(r)){c.fatalError("Attribute "+r+" redefined")}o.addValue(r,i,a)}var w;var M;var E=++i;var D=h;while(true){var T=r.charAt(E);switch(T){case"=":if(D===d){w=r.slice(i,E);D=m}else if(D===p){D=m}else{throw new Error("attribute equal must after attrName")}break;case"'":case'"':if(D===m||D===d){if(D===d){c.warning('attribute value must after "="');w=r.slice(i,E)}i=E+1;E=r.indexOf(T,i);if(E>0){M=r.slice(i,E).replace(/&#?\w+;/g,u);addAttribute(w,M,i-1);D=y}else{throw new Error("attribute value no end '"+T+"' match")}}else if(D==g){M=r.slice(i,E).replace(/&#?\w+;/g,u);addAttribute(w,M,i);c.warning('attribute "'+w+'" missed start quot('+T+")!!");i=E+1;D=y}else{throw new Error('attribute value must after "="')}break;case"/":switch(D){case h:o.setTagName(r.slice(i,E));case y:case v:case b:D=b;o.closed=true;case g:case d:case p:break;default:throw new Error("attribute invalid close char('/')")}break;case"":c.error("unexpected end of input");if(D==h){o.setTagName(r.slice(i,E))}return E;case">":switch(D){case h:o.setTagName(r.slice(i,E));case y:case v:case b:break;case g:case d:M=r.slice(i,E);if(M.slice(-1)==="/"){o.closed=true;M=M.slice(0,-1)}case p:if(D===p){M=w}if(D==g){c.warning('attribute "'+M+'" missed quot(")!');addAttribute(w,M.replace(/&#?\w+;/g,u),i)}else{if(!a.isHTML(l[""])||!M.match(/^(?:disabled|checked|selected)$/i)){c.warning('attribute "'+M+'" missed value!! "'+M+'" instead!!')}addAttribute(M,M,i)}break;case m:throw new Error("attribute value missed!!")}return E;case"€":T=" ";default:if(T<=" "){switch(D){case h:o.setTagName(r.slice(i,E));D=v;break;case d:w=r.slice(i,E);D=p;break;case g:var M=r.slice(i,E).replace(/&#?\w+;/g,u);c.warning('attribute "'+M+'" missed quot(")!!');addAttribute(w,M,i);case y:D=v;break}}else{switch(D){case p:var x=o.tagName;if(!a.isHTML(l[""])||!w.match(/^(?:disabled|checked|selected)$/i)){c.warning('attribute "'+w+'" missed value!! "'+w+'" instead2!!')}addAttribute(w,w,i);i=E;D=d;break;case y:c.warning('attribute space is required"'+w+'"!!');case v:D=d;i=E;break;case m:D=g;i=E;break;case b:throw new Error("elements closed character '/' and '>' must be connected to")}}}E++}}function appendElement(r,i,o){var l=r.tagName;var u=null;var c=r.length;while(c--){var h=r[c];var d=h.qName;var p=h.value;var m=d.indexOf(":");if(m>0){var g=h.prefix=d.slice(0,m);var y=d.slice(m+1);var v=g==="xmlns"&&y}else{y=d;g=null;v=d==="xmlns"&&""}h.localName=y;if(v!==false){if(u==null){u={};_copy(o,o={})}o[v]=u[v]=p;h.uri=a.XMLNS;i.startPrefixMapping(v,p)}}var c=r.length;while(c--){h=r[c];var g=h.prefix;if(g){if(g==="xml"){h.uri=a.XML}if(g!=="xmlns"){h.uri=o[g||""]}}}var m=l.indexOf(":");if(m>0){g=r.prefix=l.slice(0,m);y=r.localName=l.slice(m+1)}else{g=null;y=r.localName=l}var b=r.uri=o[g||""];i.startElement(b,y,l,r);if(r.closed){i.endElement(b,y,l);if(u){for(g in u){if(Object.prototype.hasOwnProperty.call(u,g)){i.endPrefixMapping(g)}}}}else{r.currentNSMap=o;r.localNSMap=u;return true}}function parseHtmlSpecialContent(r,i,o,a,l){if(/^(?:script|textarea)$/i.test(o)){var u=r.indexOf("</"+o+">",i);var c=r.substring(i+1,u);if(/[&<]/.test(c)){if(/^script$/i.test(o)){l.characters(c,0,c.length);return u}c=c.replace(/&#?\w+;/g,a);l.characters(c,0,c.length);return u}}return i+1}function fixSelfClosed(r,i,o,a){var l=a[o];if(l==null){l=r.lastIndexOf("</"+o+">");if(l<i){l=r.lastIndexOf("</"+o)}a[o]=l}return l<i}function _copy(r,i){for(var o in r){if(Object.prototype.hasOwnProperty.call(r,o)){i[o]=r[o]}}}function parseDCC(r,i,o,a){var l=r.charAt(i+2);switch(l){case"-":if(r.charAt(i+3)==="-"){var u=r.indexOf("--\x3e",i+4);if(u>i){o.comment(r,i+4,u-i-4);return u+3}else{a.error("Unclosed comment");return-1}}else{return-1}default:if(r.substr(i+3,6)=="CDATA["){var u=r.indexOf("]]>",i+9);o.startCDATA();o.characters(r,i+9,u-i-9);o.endCDATA();return u+3}var c=split(r,i);var h=c.length;if(h>1&&/!doctype/i.test(c[0][0])){var d=c[1][0];var p=false;var m=false;if(h>3){if(/^public$/i.test(c[2][0])){p=c[3][0];m=h>4&&c[4][0]}else if(/^system$/i.test(c[2][0])){m=c[3][0]}}var g=c[h-1];o.startDTD(d,p,m);o.endDTD();return g.index+g[0].length}}return-1}function parseInstruction(r,i,o){var a=r.indexOf("?>",i);if(a){var l=r.substring(i,a).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(l){var u=l[0].length;o.processingInstruction(l[1],l[2]);return a+2}else{return-1}}return-1}function ElementAttributes(){this.attributeNames={}}ElementAttributes.prototype={setTagName:function(r){if(!c.test(r)){throw new Error("invalid tagName:"+r)}this.tagName=r},addValue:function(r,i,o){if(!c.test(r)){throw new Error("invalid attribute:"+r)}this.attributeNames[r]=this.length;this[this.length++]={qName:r,value:i,offset:o}},length:0,getLocalName:function(r){return this[r].localName},getLocator:function(r){return this[r].locator},getQName:function(r){return this[r].qName},getURI:function(r){return this[r].uri},getValue:function(r){return this[r].value}};function split(r,i){var o;var a=[];var l=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;l.lastIndex=i;l.exec(r);while(o=l.exec(r)){a.push(o);if(o[1])return a}}i.XMLReader=XMLReader;i.ParseError=ParseError},3741:(r,i,o)=>{"use strict";r=o.nmd(r);const wrapAnsi16=(r,i)=>(...o)=>{const a=r(...o);return`[${a+i}m`};const wrapAnsi256=(r,i)=>(...o)=>{const a=r(...o);return`[${38+i};5;${a}m`};const wrapAnsi16m=(r,i)=>(...o)=>{const a=r(...o);return`[${38+i};2;${a[0]};${a[1]};${a[2]}m`};const ansi2ansi=r=>r;const rgb2rgb=(r,i,o)=>[r,i,o];const setLazyProperty=(r,i,o)=>{Object.defineProperty(r,i,{get:()=>{const a=o();Object.defineProperty(r,i,{value:a,enumerable:true,configurable:true});return a},enumerable:true,configurable:true})};let a;const makeDynamicStyles=(r,i,l,u)=>{if(a===undefined){a=o(1593)}const c=u?10:0;const h={};for(const[o,u]of Object.entries(a)){const a=o==="ansi16"?"ansi":o;if(o===i){h[a]=r(l,c)}else if(typeof u==="object"){h[a]=r(u[i],c)}}return h};function assembleStyles(){const r=new Map;const i={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};i.color.gray=i.color.blackBright;i.bgColor.bgGray=i.bgColor.bgBlackBright;i.color.grey=i.color.blackBright;i.bgColor.bgGrey=i.bgColor.bgBlackBright;for(const[o,a]of Object.entries(i)){for(const[o,l]of Object.entries(a)){i[o]={open:`[${l[0]}m`,close:`[${l[1]}m`};a[o]=i[o];r.set(l[0],l[1])}Object.defineProperty(i,o,{value:a,enumerable:false})}Object.defineProperty(i,"codes",{value:r,enumerable:false});i.color.close="";i.bgColor.close="";setLazyProperty(i.color,"ansi",(()=>makeDynamicStyles(wrapAnsi16,"ansi16",ansi2ansi,false)));setLazyProperty(i.color,"ansi256",(()=>makeDynamicStyles(wrapAnsi256,"ansi256",ansi2ansi,false)));setLazyProperty(i.color,"ansi16m",(()=>makeDynamicStyles(wrapAnsi16m,"rgb",rgb2rgb,false)));setLazyProperty(i.bgColor,"ansi",(()=>makeDynamicStyles(wrapAnsi16,"ansi16",ansi2ansi,true)));setLazyProperty(i.bgColor,"ansi256",(()=>makeDynamicStyles(wrapAnsi256,"ansi256",ansi2ansi,true)));setLazyProperty(i.bgColor,"ansi16m",(()=>makeDynamicStyles(wrapAnsi16m,"rgb",rgb2rgb,true)));return i}Object.defineProperty(r,"exports",{enumerable:true,get:assembleStyles})},7606:(r,i,o)=>{const a=o(9407);const l={};for(const r of Object.keys(a)){l[a[r]]=r}const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};r.exports=u;for(const r of Object.keys(u)){if(!("channels"in u[r])){throw new Error("missing channels property: "+r)}if(!("labels"in u[r])){throw new Error("missing channel labels property: "+r)}if(u[r].labels.length!==u[r].channels){throw new Error("channel and label counts mismatch: "+r)}const{channels:i,labels:o}=u[r];delete u[r].channels;delete u[r].labels;Object.defineProperty(u[r],"channels",{value:i});Object.defineProperty(u[r],"labels",{value:o})}u.rgb.hsl=function(r){const i=r[0]/255;const o=r[1]/255;const a=r[2]/255;const l=Math.min(i,o,a);const u=Math.max(i,o,a);const c=u-l;let h;let d;if(u===l){h=0}else if(i===u){h=(o-a)/c}else if(o===u){h=2+(a-i)/c}else if(a===u){h=4+(i-o)/c}h=Math.min(h*60,360);if(h<0){h+=360}const p=(l+u)/2;if(u===l){d=0}else if(p<=.5){d=c/(u+l)}else{d=c/(2-u-l)}return[h,d*100,p*100]};u.rgb.hsv=function(r){let i;let o;let a;let l;let u;const c=r[0]/255;const h=r[1]/255;const d=r[2]/255;const p=Math.max(c,h,d);const m=p-Math.min(c,h,d);const diffc=function(r){return(p-r)/6/m+1/2};if(m===0){l=0;u=0}else{u=m/p;i=diffc(c);o=diffc(h);a=diffc(d);if(c===p){l=a-o}else if(h===p){l=1/3+i-a}else if(d===p){l=2/3+o-i}if(l<0){l+=1}else if(l>1){l-=1}}return[l*360,u*100,p*100]};u.rgb.hwb=function(r){const i=r[0];const o=r[1];let a=r[2];const l=u.rgb.hsl(r)[0];const c=1/255*Math.min(i,Math.min(o,a));a=1-1/255*Math.max(i,Math.max(o,a));return[l,c*100,a*100]};u.rgb.cmyk=function(r){const i=r[0]/255;const o=r[1]/255;const a=r[2]/255;const l=Math.min(1-i,1-o,1-a);const u=(1-i-l)/(1-l)||0;const c=(1-o-l)/(1-l)||0;const h=(1-a-l)/(1-l)||0;return[u*100,c*100,h*100,l*100]};function comparativeDistance(r,i){return(r[0]-i[0])**2+(r[1]-i[1])**2+(r[2]-i[2])**2}u.rgb.keyword=function(r){const i=l[r];if(i){return i}let o=Infinity;let u;for(const i of Object.keys(a)){const l=a[i];const c=comparativeDistance(r,l);if(c<o){o=c;u=i}}return u};u.keyword.rgb=function(r){return a[r]};u.rgb.xyz=function(r){let i=r[0]/255;let o=r[1]/255;let a=r[2]/255;i=i>.04045?((i+.055)/1.055)**2.4:i/12.92;o=o>.04045?((o+.055)/1.055)**2.4:o/12.92;a=a>.04045?((a+.055)/1.055)**2.4:a/12.92;const l=i*.4124+o*.3576+a*.1805;const u=i*.2126+o*.7152+a*.0722;const c=i*.0193+o*.1192+a*.9505;return[l*100,u*100,c*100]};u.rgb.lab=function(r){const i=u.rgb.xyz(r);let o=i[0];let a=i[1];let l=i[2];o/=95.047;a/=100;l/=108.883;o=o>.008856?o**(1/3):7.787*o+16/116;a=a>.008856?a**(1/3):7.787*a+16/116;l=l>.008856?l**(1/3):7.787*l+16/116;const c=116*a-16;const h=500*(o-a);const d=200*(a-l);return[c,h,d]};u.hsl.rgb=function(r){const i=r[0]/360;const o=r[1]/100;const a=r[2]/100;let l;let u;let c;if(o===0){c=a*255;return[c,c,c]}if(a<.5){l=a*(1+o)}else{l=a+o-a*o}const h=2*a-l;const d=[0,0,0];for(let r=0;r<3;r++){u=i+1/3*-(r-1);if(u<0){u++}if(u>1){u--}if(6*u<1){c=h+(l-h)*6*u}else if(2*u<1){c=l}else if(3*u<2){c=h+(l-h)*(2/3-u)*6}else{c=h}d[r]=c*255}return d};u.hsl.hsv=function(r){const i=r[0];let o=r[1]/100;let a=r[2]/100;let l=o;const u=Math.max(a,.01);a*=2;o*=a<=1?a:2-a;l*=u<=1?u:2-u;const c=(a+o)/2;const h=a===0?2*l/(u+l):2*o/(a+o);return[i,h*100,c*100]};u.hsv.rgb=function(r){const i=r[0]/60;const o=r[1]/100;let a=r[2]/100;const l=Math.floor(i)%6;const u=i-Math.floor(i);const c=255*a*(1-o);const h=255*a*(1-o*u);const d=255*a*(1-o*(1-u));a*=255;switch(l){case 0:return[a,d,c];case 1:return[h,a,c];case 2:return[c,a,d];case 3:return[c,h,a];case 4:return[d,c,a];case 5:return[a,c,h]}};u.hsv.hsl=function(r){const i=r[0];const o=r[1]/100;const a=r[2]/100;const l=Math.max(a,.01);let u;let c;c=(2-o)*a;const h=(2-o)*l;u=o*l;u/=h<=1?h:2-h;u=u||0;c/=2;return[i,u*100,c*100]};u.hwb.rgb=function(r){const i=r[0]/360;let o=r[1]/100;let a=r[2]/100;const l=o+a;let u;if(l>1){o/=l;a/=l}const c=Math.floor(6*i);const h=1-a;u=6*i-c;if((c&1)!==0){u=1-u}const d=o+u*(h-o);let p;let m;let g;switch(c){default:case 6:case 0:p=h;m=d;g=o;break;case 1:p=d;m=h;g=o;break;case 2:p=o;m=h;g=d;break;case 3:p=o;m=d;g=h;break;case 4:p=d;m=o;g=h;break;case 5:p=h;m=o;g=d;break}return[p*255,m*255,g*255]};u.cmyk.rgb=function(r){const i=r[0]/100;const o=r[1]/100;const a=r[2]/100;const l=r[3]/100;const u=1-Math.min(1,i*(1-l)+l);const c=1-Math.min(1,o*(1-l)+l);const h=1-Math.min(1,a*(1-l)+l);return[u*255,c*255,h*255]};u.xyz.rgb=function(r){const i=r[0]/100;const o=r[1]/100;const a=r[2]/100;let l;let u;let c;l=i*3.2406+o*-1.5372+a*-.4986;u=i*-.9689+o*1.8758+a*.0415;c=i*.0557+o*-.204+a*1.057;l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92;u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92;c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92;l=Math.min(Math.max(0,l),1);u=Math.min(Math.max(0,u),1);c=Math.min(Math.max(0,c),1);return[l*255,u*255,c*255]};u.xyz.lab=function(r){let i=r[0];let o=r[1];let a=r[2];i/=95.047;o/=100;a/=108.883;i=i>.008856?i**(1/3):7.787*i+16/116;o=o>.008856?o**(1/3):7.787*o+16/116;a=a>.008856?a**(1/3):7.787*a+16/116;const l=116*o-16;const u=500*(i-o);const c=200*(o-a);return[l,u,c]};u.lab.xyz=function(r){const i=r[0];const o=r[1];const a=r[2];let l;let u;let c;u=(i+16)/116;l=o/500+u;c=u-a/200;const h=u**3;const d=l**3;const p=c**3;u=h>.008856?h:(u-16/116)/7.787;l=d>.008856?d:(l-16/116)/7.787;c=p>.008856?p:(c-16/116)/7.787;l*=95.047;u*=100;c*=108.883;return[l,u,c]};u.lab.lch=function(r){const i=r[0];const o=r[1];const a=r[2];let l;const u=Math.atan2(a,o);l=u*360/2/Math.PI;if(l<0){l+=360}const c=Math.sqrt(o*o+a*a);return[i,c,l]};u.lch.lab=function(r){const i=r[0];const o=r[1];const a=r[2];const l=a/360*2*Math.PI;const u=o*Math.cos(l);const c=o*Math.sin(l);return[i,u,c]};u.rgb.ansi16=function(r,i=null){const[o,a,l]=r;let c=i===null?u.rgb.hsv(r)[2]:i;c=Math.round(c/50);if(c===0){return 30}let h=30+(Math.round(l/255)<<2|Math.round(a/255)<<1|Math.round(o/255));if(c===2){h+=60}return h};u.hsv.ansi16=function(r){return u.rgb.ansi16(u.hsv.rgb(r),r[2])};u.rgb.ansi256=function(r){const i=r[0];const o=r[1];const a=r[2];if(i===o&&o===a){if(i<8){return 16}if(i>248){return 231}return Math.round((i-8)/247*24)+232}const l=16+36*Math.round(i/255*5)+6*Math.round(o/255*5)+Math.round(a/255*5);return l};u.ansi16.rgb=function(r){let i=r%10;if(i===0||i===7){if(r>50){i+=3.5}i=i/10.5*255;return[i,i,i]}const o=(~~(r>50)+1)*.5;const a=(i&1)*o*255;const l=(i>>1&1)*o*255;const u=(i>>2&1)*o*255;return[a,l,u]};u.ansi256.rgb=function(r){if(r>=232){const i=(r-232)*10+8;return[i,i,i]}r-=16;let i;const o=Math.floor(r/36)/5*255;const a=Math.floor((i=r%36)/6)/5*255;const l=i%6/5*255;return[o,a,l]};u.rgb.hex=function(r){const i=((Math.round(r[0])&255)<<16)+((Math.round(r[1])&255)<<8)+(Math.round(r[2])&255);const o=i.toString(16).toUpperCase();return"000000".substring(o.length)+o};u.hex.rgb=function(r){const i=r.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!i){return[0,0,0]}let o=i[0];if(i[0].length===3){o=o.split("").map((r=>r+r)).join("")}const a=parseInt(o,16);const l=a>>16&255;const u=a>>8&255;const c=a&255;return[l,u,c]};u.rgb.hcg=function(r){const i=r[0]/255;const o=r[1]/255;const a=r[2]/255;const l=Math.max(Math.max(i,o),a);const u=Math.min(Math.min(i,o),a);const c=l-u;let h;let d;if(c<1){h=u/(1-c)}else{h=0}if(c<=0){d=0}else if(l===i){d=(o-a)/c%6}else if(l===o){d=2+(a-i)/c}else{d=4+(i-o)/c}d/=6;d%=1;return[d*360,c*100,h*100]};u.hsl.hcg=function(r){const i=r[1]/100;const o=r[2]/100;const a=o<.5?2*i*o:2*i*(1-o);let l=0;if(a<1){l=(o-.5*a)/(1-a)}return[r[0],a*100,l*100]};u.hsv.hcg=function(r){const i=r[1]/100;const o=r[2]/100;const a=i*o;let l=0;if(a<1){l=(o-a)/(1-a)}return[r[0],a*100,l*100]};u.hcg.rgb=function(r){const i=r[0]/360;const o=r[1]/100;const a=r[2]/100;if(o===0){return[a*255,a*255,a*255]}const l=[0,0,0];const u=i%1*6;const c=u%1;const h=1-c;let d=0;switch(Math.floor(u)){case 0:l[0]=1;l[1]=c;l[2]=0;break;case 1:l[0]=h;l[1]=1;l[2]=0;break;case 2:l[0]=0;l[1]=1;l[2]=c;break;case 3:l[0]=0;l[1]=h;l[2]=1;break;case 4:l[0]=c;l[1]=0;l[2]=1;break;default:l[0]=1;l[1]=0;l[2]=h}d=(1-o)*a;return[(o*l[0]+d)*255,(o*l[1]+d)*255,(o*l[2]+d)*255]};u.hcg.hsv=function(r){const i=r[1]/100;const o=r[2]/100;const a=i+o*(1-i);let l=0;if(a>0){l=i/a}return[r[0],l*100,a*100]};u.hcg.hsl=function(r){const i=r[1]/100;const o=r[2]/100;const a=o*(1-i)+.5*i;let l=0;if(a>0&&a<.5){l=i/(2*a)}else if(a>=.5&&a<1){l=i/(2*(1-a))}return[r[0],l*100,a*100]};u.hcg.hwb=function(r){const i=r[1]/100;const o=r[2]/100;const a=i+o*(1-i);return[r[0],(a-i)*100,(1-a)*100]};u.hwb.hcg=function(r){const i=r[1]/100;const o=r[2]/100;const a=1-o;const l=a-i;let u=0;if(l<1){u=(a-l)/(1-l)}return[r[0],l*100,u*100]};u.apple.rgb=function(r){return[r[0]/65535*255,r[1]/65535*255,r[2]/65535*255]};u.rgb.apple=function(r){return[r[0]/255*65535,r[1]/255*65535,r[2]/255*65535]};u.gray.rgb=function(r){return[r[0]/100*255,r[0]/100*255,r[0]/100*255]};u.gray.hsl=function(r){return[0,0,r[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(r){return[0,100,r[0]]};u.gray.cmyk=function(r){return[0,0,0,r[0]]};u.gray.lab=function(r){return[r[0],0,0]};u.gray.hex=function(r){const i=Math.round(r[0]/100*255)&255;const o=(i<<16)+(i<<8)+i;const a=o.toString(16).toUpperCase();return"000000".substring(a.length)+a};u.rgb.gray=function(r){const i=(r[0]+r[1]+r[2])/3;return[i/255*100]}},1593:(r,i,o)=>{const a=o(7606);const l=o(1529);const u={};const c=Object.keys(a);function wrapRaw(r){const wrappedFn=function(...i){const o=i[0];if(o===undefined||o===null){return o}if(o.length>1){i=o}return r(i)};if("conversion"in r){wrappedFn.conversion=r.conversion}return wrappedFn}function wrapRounded(r){const wrappedFn=function(...i){const o=i[0];if(o===undefined||o===null){return o}if(o.length>1){i=o}const a=r(i);if(typeof a==="object"){for(let r=a.length,i=0;i<r;i++){a[i]=Math.round(a[i])}}return a};if("conversion"in r){wrappedFn.conversion=r.conversion}return wrappedFn}c.forEach((r=>{u[r]={};Object.defineProperty(u[r],"channels",{value:a[r].channels});Object.defineProperty(u[r],"labels",{value:a[r].labels});const i=l(r);const o=Object.keys(i);o.forEach((o=>{const a=i[o];u[r][o]=wrapRounded(a);u[r][o].raw=wrapRaw(a)}))}));r.exports=u},1529:(r,i,o)=>{const a=o(7606);function buildGraph(){const r={};const i=Object.keys(a);for(let o=i.length,a=0;a<o;a++){r[i[a]]={distance:-1,parent:null}}return r}function deriveBFS(r){const i=buildGraph();const o=[r];i[r].distance=0;while(o.length){const r=o.pop();const l=Object.keys(a[r]);for(let a=l.length,u=0;u<a;u++){const a=l[u];const c=i[a];if(c.distance===-1){c.distance=i[r].distance+1;c.parent=r;o.unshift(a)}}}return i}function link(r,i){return function(o){return i(r(o))}}function wrapConversion(r,i){const o=[i[r].parent,r];let l=a[i[r].parent][r];let u=i[r].parent;while(i[u].parent){o.unshift(i[u].parent);l=link(a[i[u].parent][u],l);u=i[u].parent}l.conversion=o;return l}r.exports=function(r){const i=deriveBFS(r);const o={};const a=Object.keys(i);for(let r=a.length,l=0;l<r;l++){const r=a[l];const u=i[r];if(u.parent===null){continue}o[r]=wrapConversion(r,i)}return o}},2058:r=>{"use strict";r.exports=balanced;function balanced(r,i,o){if(r instanceof RegExp)r=maybeMatch(r,o);if(i instanceof RegExp)i=maybeMatch(i,o);var a=range(r,i,o);return a&&{start:a[0],end:a[1],pre:o.slice(0,a[0]),body:o.slice(a[0]+r.length,a[1]),post:o.slice(a[1]+i.length)}}function maybeMatch(r,i){var o=i.match(r);return o?o[0]:null}balanced.range=range;function range(r,i,o){var a,l,u,c,h;var d=o.indexOf(r);var p=o.indexOf(i,d+1);var m=d;if(d>=0&&p>0){if(r===i){return[d,p]}a=[];u=o.length;while(m>=0&&!h){if(m==d){a.push(m);d=o.indexOf(r,m+1)}else if(a.length==1){h=[a.pop(),p]}else{l=a.pop();if(l<u){u=l;c=p}p=o.indexOf(i,m+1)}m=d<p&&d>=0?d:p}if(a.length){h=[u,c]}}return h}},2991:(r,i)=>{"use strict";i.byteLength=byteLength;i.toByteArray=toByteArray;i.fromByteArray=fromByteArray;var o=[];var a=[];var l=typeof Uint8Array!=="undefined"?Uint8Array:Array;var u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var c=0,h=u.length;c<h;++c){o[c]=u[c];a[u.charCodeAt(c)]=c}a["-".charCodeAt(0)]=62;a["_".charCodeAt(0)]=63;function getLens(r){var i=r.length;if(i%4>0){throw new Error("Invalid string. Length must be a multiple of 4")}var o=r.indexOf("=");if(o===-1)o=i;var a=o===i?0:4-o%4;return[o,a]}function byteLength(r){var i=getLens(r);var o=i[0];var a=i[1];return(o+a)*3/4-a}function _byteLength(r,i,o){return(i+o)*3/4-o}function toByteArray(r){var i;var o=getLens(r);var u=o[0];var c=o[1];var h=new l(_byteLength(r,u,c));var d=0;var p=c>0?u-4:u;var m;for(m=0;m<p;m+=4){i=a[r.charCodeAt(m)]<<18|a[r.charCodeAt(m+1)]<<12|a[r.charCodeAt(m+2)]<<6|a[r.charCodeAt(m+3)];h[d++]=i>>16&255;h[d++]=i>>8&255;h[d++]=i&255}if(c===2){i=a[r.charCodeAt(m)]<<2|a[r.charCodeAt(m+1)]>>4;h[d++]=i&255}if(c===1){i=a[r.charCodeAt(m)]<<10|a[r.charCodeAt(m+1)]<<4|a[r.charCodeAt(m+2)]>>2;h[d++]=i>>8&255;h[d++]=i&255}return h}function tripletToBase64(r){return o[r>>18&63]+o[r>>12&63]+o[r>>6&63]+o[r&63]}function encodeChunk(r,i,o){var a;var l=[];for(var u=i;u<o;u+=3){a=(r[u]<<16&16711680)+(r[u+1]<<8&65280)+(r[u+2]&255);l.push(tripletToBase64(a))}return l.join("")}function fromByteArray(r){var i;var a=r.length;var l=a%3;var u=[];var c=16383;for(var h=0,d=a-l;h<d;h+=c){u.push(encodeChunk(r,h,h+c>d?d:h+c))}if(l===1){i=r[a-1];u.push(o[i>>2]+o[i<<4&63]+"==")}else if(l===2){i=(r[a-2]<<8)+r[a-1];u.push(o[i>>10]+o[i>>4&63]+o[i<<2&63]+"=")}return u.join("")}},3197:(r,i,o)=>{var a=o(4527);var l=o(2058);r.exports=expandTop;var u="\0SLASH"+Math.random()+"\0";var c="\0OPEN"+Math.random()+"\0";var h="\0CLOSE"+Math.random()+"\0";var d="\0COMMA"+Math.random()+"\0";var p="\0PERIOD"+Math.random()+"\0";function numeric(r){return parseInt(r,10)==r?parseInt(r,10):r.charCodeAt(0)}function escapeBraces(r){return r.split("\\\\").join(u).split("\\{").join(c).split("\\}").join(h).split("\\,").join(d).split("\\.").join(p)}function unescapeBraces(r){return r.split(u).join("\\").split(c).join("{").split(h).join("}").split(d).join(",").split(p).join(".")}function parseCommaParts(r){if(!r)return[""];var i=[];var o=l("{","}",r);if(!o)return r.split(",");var a=o.pre;var u=o.body;var c=o.post;var h=a.split(",");h[h.length-1]+="{"+u+"}";var d=parseCommaParts(c);if(c.length){h[h.length-1]+=d.shift();h.push.apply(h,d)}i.push.apply(i,h);return i}function expandTop(r){if(!r)return[];if(r.substr(0,2)==="{}"){r="\\{\\}"+r.substr(2)}return expand(escapeBraces(r),true).map(unescapeBraces)}function identity(r){return r}function embrace(r){return"{"+r+"}"}function isPadded(r){return/^-?0\d/.test(r)}function lte(r,i){return r<=i}function gte(r,i){return r>=i}function expand(r,i){var o=[];var u=l("{","}",r);if(!u||/\$$/.test(u.pre))return[r];var c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(u.body);var d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(u.body);var p=c||d;var m=u.body.indexOf(",")>=0;if(!p&&!m){if(u.post.match(/,.*\}/)){r=u.pre+"{"+u.body+h+u.post;return expand(r)}return[r]}var g;if(p){g=u.body.split(/\.\./)}else{g=parseCommaParts(u.body);if(g.length===1){g=expand(g[0],false).map(embrace);if(g.length===1){var y=u.post.length?expand(u.post,false):[""];return y.map((function(r){return u.pre+g[0]+r}))}}}var v=u.pre;var y=u.post.length?expand(u.post,false):[""];var b;if(p){var w=numeric(g[0]);var M=numeric(g[1]);var E=Math.max(g[0].length,g[1].length);var D=g.length==3?Math.abs(numeric(g[2])):1;var T=lte;var x=M<w;if(x){D*=-1;T=gte}var O=g.some(isPadded);b=[];for(var N=w;T(N,M);N+=D){var _;if(d){_=String.fromCharCode(N);if(_==="\\")_=""}else{_=String(N);if(O){var A=E-_.length;if(A>0){var I=new Array(A+1).join("0");if(N<0)_="-"+I+_.slice(1);else _=I+_}}}b.push(_)}}else{b=a(g,(function(r){return expand(r,false)}))}for(var L=0;L<b.length;L++){for(var S=0;S<y.length;S++){var C=v+b[L]+y[S];if(!i||p||C)o.push(C)}}return o}},8746:(r,i,o)=>{"use strict";const a=o(3741);const{stdout:l,stderr:u}=o(395);const{stringReplaceAll:c,stringEncaseCRLFWithFirstIndex:h}=o(5611);const{isArray:d}=Array;const p=["ansi","ansi","ansi256","ansi16m"];const m=Object.create(null);const applyOptions=(r,i={})=>{if(i.level&&!(Number.isInteger(i.level)&&i.level>=0&&i.level<=3)){throw new Error("The `level` option should be an integer from 0 to 3")}const o=l?l.level:0;r.level=i.level===undefined?o:i.level};class ChalkClass{constructor(r){return chalkFactory(r)}}const chalkFactory=r=>{const i={};applyOptions(i,r);i.template=(...r)=>chalkTag(i.template,...r);Object.setPrototypeOf(i,Chalk.prototype);Object.setPrototypeOf(i.template,i);i.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")};i.template.Instance=ChalkClass;return i.template};function Chalk(r){return chalkFactory(r)}for(const[r,i]of Object.entries(a)){m[r]={get(){const o=createBuilder(this,createStyler(i.open,i.close,this._styler),this._isEmpty);Object.defineProperty(this,r,{value:o});return o}}}m.visible={get(){const r=createBuilder(this,this._styler,true);Object.defineProperty(this,"visible",{value:r});return r}};const g=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const r of g){m[r]={get(){const{level:i}=this;return function(...o){const l=createStyler(a.color[p[i]][r](...o),a.color.close,this._styler);return createBuilder(this,l,this._isEmpty)}}}}for(const r of g){const i="bg"+r[0].toUpperCase()+r.slice(1);m[i]={get(){const{level:i}=this;return function(...o){const l=createStyler(a.bgColor[p[i]][r](...o),a.bgColor.close,this._styler);return createBuilder(this,l,this._isEmpty)}}}}const y=Object.defineProperties((()=>{}),{...m,level:{enumerable:true,get(){return this._generator.level},set(r){this._generator.level=r}}});const createStyler=(r,i,o)=>{let a;let l;if(o===undefined){a=r;l=i}else{a=o.openAll+r;l=i+o.closeAll}return{open:r,close:i,openAll:a,closeAll:l,parent:o}};const createBuilder=(r,i,o)=>{const builder=(...r)=>{if(d(r[0])&&d(r[0].raw)){return applyStyle(builder,chalkTag(builder,...r))}return applyStyle(builder,r.length===1?""+r[0]:r.join(" "))};Object.setPrototypeOf(builder,y);builder._generator=r;builder._styler=i;builder._isEmpty=o;return builder};const applyStyle=(r,i)=>{if(r.level<=0||!i){return r._isEmpty?"":i}let o=r._styler;if(o===undefined){return i}const{openAll:a,closeAll:l}=o;if(i.indexOf("")!==-1){while(o!==undefined){i=c(i,o.close,o.open);o=o.parent}}const u=i.indexOf("\n");if(u!==-1){i=h(i,l,a,u)}return a+i+l};let v;const chalkTag=(r,...i)=>{const[a]=i;if(!d(a)||!d(a.raw)){return i.join(" ")}const l=i.slice(1);const u=[a.raw[0]];for(let r=1;r<a.length;r++){u.push(String(l[r-1]).replace(/[{}\\]/g,"\\$&"),String(a.raw[r]))}if(v===undefined){v=o(2746)}return v(r,u.join(""))};Object.defineProperties(Chalk.prototype,m);const b=Chalk();b.supportsColor=l;b.stderr=Chalk({level:u?u.level:0});b.stderr.supportsColor=u;r.exports=b},2746:r=>{"use strict";const i=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;const o=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;const a=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;const l=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;const u=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function unescape(r){const i=r[0]==="u";const o=r[1]==="{";if(i&&!o&&r.length===5||r[0]==="x"&&r.length===3){return String.fromCharCode(parseInt(r.slice(1),16))}if(i&&o){return String.fromCodePoint(parseInt(r.slice(2,-1),16))}return u.get(r)||r}function parseArguments(r,i){const o=[];const u=i.trim().split(/\s*,\s*/g);let c;for(const i of u){const u=Number(i);if(!Number.isNaN(u)){o.push(u)}else if(c=i.match(a)){o.push(c[2].replace(l,((r,i,o)=>i?unescape(i):o)))}else{throw new Error(`Invalid Chalk template style argument: ${i} (in style '${r}')`)}}return o}function parseStyle(r){o.lastIndex=0;const i=[];let a;while((a=o.exec(r))!==null){const r=a[1];if(a[2]){const o=parseArguments(r,a[2]);i.push([r].concat(o))}else{i.push([r])}}return i}function buildStyle(r,i){const o={};for(const r of i){for(const i of r.styles){o[i[0]]=r.inverse?null:i.slice(1)}}let a=r;for(const[r,i]of Object.entries(o)){if(!Array.isArray(i)){continue}if(!(r in a)){throw new Error(`Unknown Chalk style: ${r}`)}a=i.length>0?a[r](...i):a[r]}return a}r.exports=(r,o)=>{const a=[];const l=[];let u=[];o.replace(i,((i,o,c,h,d,p)=>{if(o){u.push(unescape(o))}else if(h){const i=u.join("");u=[];l.push(a.length===0?i:buildStyle(r,a)(i));a.push({inverse:c,styles:parseStyle(h)})}else if(d){if(a.length===0){throw new Error("Found extraneous } in Chalk template literal")}l.push(buildStyle(r,a)(u.join("")));u=[];a.pop()}else{u.push(p)}}));l.push(u.join(""));if(a.length>0){const r=`Chalk template literal is missing ${a.length} closing bracket${a.length===1?"":"s"} (\`}\`)`;throw new Error(r)}return l.join("")}},5611:r=>{"use strict";const stringReplaceAll=(r,i,o)=>{let a=r.indexOf(i);if(a===-1){return r}const l=i.length;let u=0;let c="";do{c+=r.substr(u,a-u)+i+o;u=a+l;a=r.indexOf(i,u)}while(a!==-1);c+=r.substr(u);return c};const stringEncaseCRLFWithFirstIndex=(r,i,o,a)=>{let l=0;let u="";do{const c=r[a-1]==="\r";u+=r.substr(l,(c?a-1:a)-l)+i+(c?"\r\n":"\n")+o;l=a+1;a=r.indexOf("\n",l)}while(a!==-1);u+=r.substr(l);return u};r.exports={stringReplaceAll:stringReplaceAll,stringEncaseCRLFWithFirstIndex:stringEncaseCRLFWithFirstIndex}},9407:r=>{"use strict";r.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},8018:(r,i,o)=>{var a=o(2361).EventEmitter;var l=o(2081).spawn;var u=o(1017);var c=u.dirname;var h=u.basename;var d=o(7147);o(3837).inherits(Command,a);i=r.exports=new Command;i.Command=Command;i.Option=Option;function Option(r,i){this.flags=r;this.required=r.indexOf("<")>=0;this.optional=r.indexOf("[")>=0;this.bool=r.indexOf("-no-")===-1;r=r.split(/[ ,|]+/);if(r.length>1&&!/^[[<]/.test(r[1]))this.short=r.shift();this.long=r.shift();this.description=i||""}Option.prototype.name=function(){return this.long.replace("--","").replace("no-","")};Option.prototype.attributeName=function(){return camelcase(this.name())};Option.prototype.is=function(r){return this.short===r||this.long===r};function Command(r){this.commands=[];this.options=[];this._execs={};this._allowUnknownOption=false;this._args=[];this._name=r||""}Command.prototype.command=function(r,i,o){if(typeof i==="object"&&i!==null){o=i;i=null}o=o||{};var a=r.split(/ +/);var l=new Command(a.shift());if(i){l.description(i);this.executables=true;this._execs[l._name]=true;if(o.isDefault)this.defaultExecutable=l._name}l._noHelp=!!o.noHelp;this.commands.push(l);l.parseExpectedArgs(a);l.parent=this;if(i)return this;return l};Command.prototype.arguments=function(r){return this.parseExpectedArgs(r.split(/ +/))};Command.prototype.addImplicitHelpCommand=function(){this.command("help [cmd]","display help for [cmd]")};Command.prototype.parseExpectedArgs=function(r){if(!r.length)return;var i=this;r.forEach((function(r){var o={required:false,name:"",variadic:false};switch(r[0]){case"<":o.required=true;o.name=r.slice(1,-1);break;case"[":o.name=r.slice(1,-1);break}if(o.name.length>3&&o.name.slice(-3)==="..."){o.variadic=true;o.name=o.name.slice(0,-3)}if(o.name){i._args.push(o)}}));return this};Command.prototype.action=function(r){var i=this;var listener=function(o,a){o=o||[];a=a||[];var l=i.parseOptions(a);outputHelpIfNecessary(i,l.unknown);if(l.unknown.length>0){i.unknownOption(l.unknown[0])}if(l.args.length)o=l.args.concat(o);i._args.forEach((function(r,a){if(r.required&&o[a]==null){i.missingArgument(r.name)}else if(r.variadic){if(a!==i._args.length-1){i.variadicArgNotLast(r.name)}o[a]=o.splice(a)}}));if(i._args.length){o[i._args.length]=i}else{o.push(i)}r.apply(i,o)};var o=this.parent||this;var a=o===this?"*":this._name;o.on("command:"+a,listener);if(this._alias)o.on("command:"+this._alias,listener);return this};Command.prototype.option=function(r,i,o,a){var l=this,u=new Option(r,i),c=u.name(),h=u.attributeName();if(typeof o!=="function"){if(o instanceof RegExp){var d=o;o=function(r,i){var o=d.exec(r);return o?o[0]:i}}else{a=o;o=null}}if(!u.bool||u.optional||u.required){if(!u.bool)a=true;if(a!==undefined){l[h]=a;u.defaultValue=a}}this.options.push(u);this.on("option:"+c,(function(r){if(r!==null&&o){r=o(r,l[h]===undefined?a:l[h])}if(typeof l[h]==="boolean"||typeof l[h]==="undefined"){if(r==null){l[h]=u.bool?a||true:false}else{l[h]=r}}else if(r!==null){l[h]=r}}));return this};Command.prototype.allowUnknownOption=function(r){this._allowUnknownOption=arguments.length===0||r;return this};Command.prototype.parse=function(r){if(this.executables)this.addImplicitHelpCommand();this.rawArgs=r;this._name=this._name||h(r[1],".js");if(this.executables&&r.length<3&&!this.defaultExecutable){r.push("--help")}var i=this.parseOptions(this.normalize(r.slice(2)));var o=this.args=i.args;var a=this.parseArgs(this.args,i.unknown);var l=a.args[0];var u=null;if(l){u=this.commands.filter((function(r){return r.alias()===l}))[0]}if(this._execs[l]&&typeof this._execs[l]!=="function"){return this.executeSubCommand(r,o,i.unknown)}else if(u){o[0]=u._name;return this.executeSubCommand(r,o,i.unknown)}else if(this.defaultExecutable){o.unshift(this.defaultExecutable);return this.executeSubCommand(r,o,i.unknown)}return a};Command.prototype.executeSubCommand=function(r,i,o){i=i.concat(o);if(!i.length)this.help();if(i[0]==="help"&&i.length===1)this.help();if(i[0]==="help"){i[0]=i[1];i[1]="--help"}var a=r[1];var p=h(a,u.extname(a))+"-"+i[0];var m;var g=d.realpathSync(a);m=c(g);var y=u.join(m,p);var v=false;if(exists(y+".js")){p=y+".js";v=true}else if(exists(y+".ts")){p=y+".ts";v=true}else if(exists(y)){p=y}i=i.slice(1);var b;if(process.platform!=="win32"){if(v){i.unshift(p);i=(process.execArgv||[]).concat(i);b=l(process.argv[0],i,{stdio:"inherit",customFds:[0,1,2]})}else{b=l(p,i,{stdio:"inherit",customFds:[0,1,2]})}}else{i.unshift(p);b=l(process.execPath,i,{stdio:"inherit"})}var w=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];w.forEach((function(r){process.on(r,(function(){if(b.killed===false&&b.exitCode===null){b.kill(r)}}))}));b.on("close",process.exit.bind(process));b.on("error",(function(r){if(r.code==="ENOENT"){console.error("error: %s(1) does not exist, try --help",p)}else if(r.code==="EACCES"){console.error("error: %s(1) not executable. try chmod or run with root",p)}process.exit(1)}));this.runningCommand=b};Command.prototype.normalize=function(r){var i=[],o,a,l;for(var u=0,c=r.length;u<c;++u){o=r[u];if(u>0){a=this.optionFor(r[u-1])}if(o==="--"){i=i.concat(r.slice(u));break}else if(a&&a.required){i.push(o)}else if(o.length>1&&o[0]==="-"&&o[1]!=="-"){o.slice(1).split("").forEach((function(r){i.push("-"+r)}))}else if(/^--/.test(o)&&~(l=o.indexOf("="))){i.push(o.slice(0,l),o.slice(l+1))}else{i.push(o)}}return i};Command.prototype.parseArgs=function(r,i){var o;if(r.length){o=r[0];if(this.listeners("command:"+o).length){this.emit("command:"+r.shift(),r,i)}else{this.emit("command:*",r)}}else{outputHelpIfNecessary(this,i);if(i.length>0){this.unknownOption(i[0])}if(this.commands.length===0&&this._args.filter((function(r){return r.required})).length===0){this.emit("command:*")}}return this};Command.prototype.optionFor=function(r){for(var i=0,o=this.options.length;i<o;++i){if(this.options[i].is(r)){return this.options[i]}}};Command.prototype.parseOptions=function(r){var i=[],o=r.length,a,l,u;var c=[];for(var h=0;h<o;++h){u=r[h];if(a){i.push(u);continue}if(u==="--"){a=true;continue}l=this.optionFor(u);if(l){if(l.required){u=r[++h];if(u==null)return this.optionMissingArgument(l);this.emit("option:"+l.name(),u)}else if(l.optional){u=r[h+1];if(u==null||u[0]==="-"&&u!=="-"){u=null}else{++h}this.emit("option:"+l.name(),u)}else{this.emit("option:"+l.name())}continue}if(u.length>1&&u[0]==="-"){c.push(u);if(h+1<r.length&&r[h+1][0]!=="-"){c.push(r[++h])}continue}i.push(u)}return{args:i,unknown:c}};Command.prototype.opts=function(){var r={},i=this.options.length;for(var o=0;o<i;o++){var a=this.options[o].attributeName();r[a]=a===this._versionOptionName?this._version:this[a]}return r};Command.prototype.missingArgument=function(r){console.error("error: missing required argument `%s'",r);process.exit(1)};Command.prototype.optionMissingArgument=function(r,i){if(i){console.error("error: option `%s' argument missing, got `%s'",r.flags,i)}else{console.error("error: option `%s' argument missing",r.flags)}process.exit(1)};Command.prototype.unknownOption=function(r){if(this._allowUnknownOption)return;console.error("error: unknown option `%s'",r);process.exit(1)};Command.prototype.variadicArgNotLast=function(r){console.error("error: variadic arguments must be last `%s'",r);process.exit(1)};Command.prototype.version=function(r,i){if(arguments.length===0)return this._version;this._version=r;i=i||"-V, --version";var o=new Option(i,"output the version number");this._versionOptionName=o.long.substr(2)||"version";this.options.push(o);this.on("option:"+this._versionOptionName,(function(){process.stdout.write(r+"\n");process.exit(0)}));return this};Command.prototype.description=function(r,i){if(arguments.length===0)return this._description;this._description=r;this._argsDescription=i;return this};Command.prototype.alias=function(r){var i=this;if(this.commands.length!==0){i=this.commands[this.commands.length-1]}if(arguments.length===0)return i._alias;if(r===i._name)throw new Error("Command alias can't be the same as its name");i._alias=r;return this};Command.prototype.usage=function(r){var i=this._args.map((function(r){return humanReadableArgName(r)}));var o="[options]"+(this.commands.length?" [command]":"")+(this._args.length?" "+i.join(" "):"");if(arguments.length===0)return this._usage||o;this._usage=r;return this};Command.prototype.name=function(r){if(arguments.length===0)return this._name;this._name=r;return this};Command.prototype.prepareCommands=function(){return this.commands.filter((function(r){return!r._noHelp})).map((function(r){var i=r._args.map((function(r){return humanReadableArgName(r)})).join(" ");return[r._name+(r._alias?"|"+r._alias:"")+(r.options.length?" [options]":"")+(i?" "+i:""),r._description]}))};Command.prototype.largestCommandLength=function(){var r=this.prepareCommands();return r.reduce((function(r,i){return Math.max(r,i[0].length)}),0)};Command.prototype.largestOptionLength=function(){var r=[].slice.call(this.options);r.push({flags:"-h, --help"});return r.reduce((function(r,i){return Math.max(r,i.flags.length)}),0)};Command.prototype.largestArgLength=function(){return this._args.reduce((function(r,i){return Math.max(r,i.name.length)}),0)};Command.prototype.padWidth=function(){var r=this.largestOptionLength();if(this._argsDescription&&this._args.length){if(this.largestArgLength()>r){r=this.largestArgLength()}}if(this.commands&&this.commands.length){if(this.largestCommandLength()>r){r=this.largestCommandLength()}}return r};Command.prototype.optionHelp=function(){var r=this.padWidth();return this.options.map((function(i){return pad(i.flags,r)+" "+i.description+(i.bool&&i.defaultValue!==undefined?" (default: "+JSON.stringify(i.defaultValue)+")":"")})).concat([pad("-h, --help",r)+" "+"output usage information"]).join("\n")};Command.prototype.commandHelp=function(){if(!this.commands.length)return"";var r=this.prepareCommands();var i=this.padWidth();return["Commands:",r.map((function(r){var o=r[1]?" "+r[1]:"";return(o?pad(r[0],i):r[0])+o})).join("\n").replace(/^/gm," "),""].join("\n")};Command.prototype.helpInformation=function(){var r=[];if(this._description){r=[this._description,""];var i=this._argsDescription;if(i&&this._args.length){var o=this.padWidth();r.push("Arguments:");r.push("");this._args.forEach((function(a){r.push(" "+pad(a.name,o)+" "+i[a.name])}));r.push("")}}var a=this._name;if(this._alias){a=a+"|"+this._alias}var l=["Usage: "+a+" "+this.usage(),""];var u=[];var c=this.commandHelp();if(c)u=[c];var h=["Options:",""+this.optionHelp().replace(/^/gm," "),""];return l.concat(r).concat(h).concat(u).join("\n")};Command.prototype.outputHelp=function(r){if(!r){r=function(r){return r}}process.stdout.write(r(this.helpInformation()));this.emit("--help")};Command.prototype.help=function(r){this.outputHelp(r);process.exit()};function camelcase(r){return r.split("-").reduce((function(r,i){return r+i[0].toUpperCase()+i.slice(1)}))}function pad(r,i){var o=Math.max(0,i-r.length);return r+Array(o+1).join(" ")}function outputHelpIfNecessary(r,i){i=i||[];for(var o=0;o<i.length;o++){if(i[o]==="--help"||i[o]==="-h"){r.outputHelp();process.exit(0)}}}function humanReadableArgName(r){var i=r.name+(r.variadic===true?"...":"");return r.required?"<"+i+">":"["+i+"]"}function exists(r){try{if(d.statSync(r).isFile()){return true}}catch(r){return false}}},4527:r=>{r.exports=function(r,o){var a=[];for(var l=0;l<r.length;l++){var u=o(r[l],l);if(i(u))a.push.apply(a,u);else a.push(u)}return a};var i=Array.isArray||function(r){return Object.prototype.toString.call(r)==="[object Array]"}},7987:(r,i,o)=>{"use strict";const a=o(2081);const l=o(1655);const u=o(9738);function spawn(r,i,o){const c=l(r,i,o);const h=a.spawn(c.command,c.args,c.options);u.hookChildProcess(h,c);return h}function spawnSync(r,i,o){const c=l(r,i,o);const h=a.spawnSync(c.command,c.args,c.options);h.error=h.error||u.verifyENOENTSync(h.status,c);return h}r.exports=spawn;r.exports.spawn=spawn;r.exports.sync=spawnSync;r.exports._parse=l;r.exports._enoent=u},9738:r=>{"use strict";const i=process.platform==="win32";function notFoundError(r,i){return Object.assign(new Error(`${i} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${i} ${r.command}`,path:r.command,spawnargs:r.args})}function hookChildProcess(r,o){if(!i){return}const a=r.emit;r.emit=function(i,l){if(i==="exit"){const i=verifyENOENT(l,o,"spawn");if(i){return a.call(r,"error",i)}}return a.apply(r,arguments)}}function verifyENOENT(r,o){if(i&&r===1&&!o.file){return notFoundError(o.original,"spawn")}return null}function verifyENOENTSync(r,o){if(i&&r===1&&!o.file){return notFoundError(o.original,"spawnSync")}return null}r.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},1655:(r,i,o)=>{"use strict";const a=o(1017);const l=o(7534);const u=o(8902);const c=o(2964);const h=process.platform==="win32";const d=/\.(?:com|exe)$/i;const p=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function detectShebang(r){r.file=l(r);const i=r.file&&c(r.file);if(i){r.args.unshift(r.file);r.command=i;return l(r)}return r.file}function parseNonShell(r){if(!h){return r}const i=detectShebang(r);const o=!d.test(i);if(r.options.forceShell||o){const o=p.test(i);r.command=a.normalize(r.command);r.command=u.command(r.command);r.args=r.args.map((r=>u.argument(r,o)));const l=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${l}"`];r.command=process.env.comspec||"cmd.exe";r.options.windowsVerbatimArguments=true}return r}function parse(r,i,o){if(i&&!Array.isArray(i)){o=i;i=null}i=i?i.slice(0):[];o=Object.assign({},o);const a={command:r,args:i,options:o,file:undefined,original:{command:r,args:i}};return o.shell?a:parseNonShell(a)}r.exports=parse},8902:r=>{"use strict";const i=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(r){r=r.replace(i,"^$1");return r}function escapeArgument(r,o){r=`${r}`;r=r.replace(/(\\*)"/g,'$1$1\\"');r=r.replace(/(\\*)$/,"$1$1");r=`"${r}"`;r=r.replace(i,"^$1");if(o){r=r.replace(i,"^$1")}return r}r.exports.command=escapeCommand;r.exports.argument=escapeArgument},2964:(r,i,o)=>{"use strict";const a=o(7147);const l=o(382);function readShebang(r){const i=150;const o=Buffer.alloc(i);let u;try{u=a.openSync(r,"r");a.readSync(u,o,0,i,0);a.closeSync(u)}catch(r){}return l(o.toString())}r.exports=readShebang},7534:(r,i,o)=>{"use strict";const a=o(1017);const l=o(6362);const u=o(6661);function resolveCommandAttempt(r,i){const o=r.options.env||process.env;const c=process.cwd();const h=r.options.cwd!=null;const d=h&&process.chdir!==undefined&&!process.chdir.disabled;if(d){try{process.chdir(r.options.cwd)}catch(r){}}let p;try{p=l.sync(r.command,{path:o[u({env:o})],pathExt:i?a.delimiter:undefined})}catch(r){}finally{if(d){process.chdir(c)}}if(p){p=a.resolve(h?r.options.cwd:"",p)}return p}function resolveCommand(r){return resolveCommandAttempt(r)||resolveCommandAttempt(r,true)}r.exports=resolveCommand},6661:r=>{"use strict";const pathKey=(r={})=>{const i=r.env||process.env;const o=r.platform||process.platform;if(o!=="win32"){return"PATH"}return Object.keys(i).reverse().find((r=>r.toUpperCase()==="PATH"))||"Path"};r.exports=pathKey;r.exports["default"]=pathKey},382:(r,i,o)=>{"use strict";const a=o(8690);r.exports=(r="")=>{const i=r.match(a);if(!i){return null}const[o,l]=i[0].replace(/#! ?/,"").split(" ");const u=o.split("/").pop();if(u==="env"){return l}return l?`${u} ${l}`:u}},8690:r=>{"use strict";r.exports=/^#!(.*)/},6362:(r,i,o)=>{const a=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const l=o(1017);const u=a?";":":";const c=o(228);const getNotFoundError=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"});const getPathInfo=(r,i)=>{const o=i.colon||u;const l=r.match(/\//)||a&&r.match(/\\/)?[""]:[...a?[process.cwd()]:[],...(i.path||process.env.PATH||"").split(o)];const c=a?i.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const h=a?c.split(o):[""];if(a){if(r.indexOf(".")!==-1&&h[0]!=="")h.unshift("")}return{pathEnv:l,pathExt:h,pathExtExe:c}};const which=(r,i,o)=>{if(typeof i==="function"){o=i;i={}}if(!i)i={};const{pathEnv:a,pathExt:u,pathExtExe:h}=getPathInfo(r,i);const d=[];const step=o=>new Promise(((u,c)=>{if(o===a.length)return i.all&&d.length?u(d):c(getNotFoundError(r));const h=a[o];const p=/^".*"$/.test(h)?h.slice(1,-1):h;const m=l.join(p,r);const g=!p&&/^\.[\\\/]/.test(r)?r.slice(0,2)+m:m;u(subStep(g,o,0))}));const subStep=(r,o,a)=>new Promise(((l,p)=>{if(a===u.length)return l(step(o+1));const m=u[a];c(r+m,{pathExt:h},((u,c)=>{if(!u&&c){if(i.all)d.push(r+m);else return l(r+m)}return l(subStep(r,o,a+1))}))}));return o?step(0).then((r=>o(null,r)),o):step(0)};const whichSync=(r,i)=>{i=i||{};const{pathEnv:o,pathExt:a,pathExtExe:u}=getPathInfo(r,i);const h=[];for(let d=0;d<o.length;d++){const p=o[d];const m=/^".*"$/.test(p)?p.slice(1,-1):p;const g=l.join(m,r);const y=!m&&/^\.[\\\/]/.test(r)?r.slice(0,2)+g:g;for(let r=0;r<a.length;r++){const o=y+a[r];try{const r=c.sync(o,{pathExt:u});if(r){if(i.all)h.push(o);else return o}}catch(r){}}}if(i.all&&h.length)return h;if(i.nothrow)return null;throw getNotFoundError(r)};r.exports=which;which.sync=whichSync},5134:r=>{"use strict";
2
2
  /*!
3
3
  * @description Recursive object extending
4
4
  * @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
@@ -24,7 +24,7 @@
24
24
  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
25
25
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
26
26
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27
- */function isSpecificValue(r){return r instanceof Buffer||r instanceof Date||r instanceof RegExp?true:false}function cloneSpecificValue(r){if(r instanceof Buffer){var i=Buffer.alloc?Buffer.alloc(r.length):new Buffer(r.length);r.copy(i);return i}else if(r instanceof Date){return new Date(r.getTime())}else if(r instanceof RegExp){return new RegExp(r)}else{throw new Error("Unexpected situation")}}function deepCloneArray(r){var o=[];r.forEach((function(r,a){if(typeof r==="object"&&r!==null){if(Array.isArray(r)){o[a]=deepCloneArray(r)}else if(isSpecificValue(r)){o[a]=cloneSpecificValue(r)}else{o[a]=i({},r)}}else{o[a]=r}}));return o}function safeGetProperty(r,i){return i==="__proto__"?undefined:r[i]}var i=r.exports=function(){if(arguments.length<1||typeof arguments[0]!=="object"){return false}if(arguments.length<2){return arguments[0]}var r=arguments[0];var o=Array.prototype.slice.call(arguments,1);var a,l,u;o.forEach((function(o){if(typeof o!=="object"||o===null||Array.isArray(o)){return}Object.keys(o).forEach((function(u){l=safeGetProperty(r,u);a=safeGetProperty(o,u);if(a===r){return}else if(typeof a!=="object"||a===null){r[u]=a;return}else if(Array.isArray(a)){r[u]=deepCloneArray(a);return}else if(isSpecificValue(a)){r[u]=cloneSpecificValue(a);return}else if(typeof l!=="object"||l===null||Array.isArray(l)){r[u]=i({},a);return}else{r[u]=i(l,a);return}}))}));return r}},8945:(r,i,o)=>{r.exports=realpath;realpath.realpath=realpath;realpath.sync=realpathSync;realpath.realpathSync=realpathSync;realpath.monkeypatch=monkeypatch;realpath.unmonkeypatch=unmonkeypatch;var a=o(7147);var l=a.realpath;var u=a.realpathSync;var c=process.version;var h=/^v[0-5]\./.test(c);var p=o(4403);function newError(r){return r&&r.syscall==="realpath"&&(r.code==="ELOOP"||r.code==="ENOMEM"||r.code==="ENAMETOOLONG")}function realpath(r,i,o){if(h){return l(r,i,o)}if(typeof i==="function"){o=i;i=null}l(r,i,(function(a,l){if(newError(a)){p.realpath(r,i,o)}else{o(a,l)}}))}function realpathSync(r,i){if(h){return u(r,i)}try{return u(r,i)}catch(o){if(newError(o)){return p.realpathSync(r,i)}else{throw o}}}function monkeypatch(){a.realpath=realpath;a.realpathSync=realpathSync}function unmonkeypatch(){a.realpath=l;a.realpathSync=u}},4403:(r,i,o)=>{var a=o(1017);var l=process.platform==="win32";var u=o(7147);var c=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function rethrow(){var r;if(c){var i=new Error;r=debugCallback}else r=missingCallback;return r;function debugCallback(r){if(r){i.message=r.message;r=i;missingCallback(r)}}function missingCallback(r){if(r){if(process.throwDeprecation)throw r;else if(!process.noDeprecation){var i="fs: missing callback "+(r.stack||r.message);if(process.traceDeprecation)console.trace(i);else console.error(i)}}}}function maybeCallback(r){return typeof r==="function"?r:rethrow()}var h=a.normalize;if(l){var p=/(.*?)(?:[\/\\]+|$)/g}else{var p=/(.*?)(?:[\/]+|$)/g}if(l){var d=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/}else{var d=/^[\/]*/}i.realpathSync=function realpathSync(r,i){r=a.resolve(r);if(i&&Object.prototype.hasOwnProperty.call(i,r)){return i[r]}var o=r,c={},h={};var m;var g;var y;var v;start();function start(){var i=d.exec(r);m=i[0].length;g=i[0];y=i[0];v="";if(l&&!h[y]){u.lstatSync(y);h[y]=true}}while(m<r.length){p.lastIndex=m;var b=p.exec(r);v=g;g+=b[0];y=v+b[1];m=p.lastIndex;if(h[y]||i&&i[y]===y){continue}var w;if(i&&Object.prototype.hasOwnProperty.call(i,y)){w=i[y]}else{var M=u.lstatSync(y);if(!M.isSymbolicLink()){h[y]=true;if(i)i[y]=y;continue}var D=null;if(!l){var T=M.dev.toString(32)+":"+M.ino.toString(32);if(c.hasOwnProperty(T)){D=c[T]}}if(D===null){u.statSync(y);D=u.readlinkSync(y)}w=a.resolve(v,D);if(i)i[y]=w;if(!l)c[T]=D}r=a.resolve(w,r.slice(m));start()}if(i)i[o]=r;return r};i.realpath=function realpath(r,i,o){if(typeof o!=="function"){o=maybeCallback(i);i=null}r=a.resolve(r);if(i&&Object.prototype.hasOwnProperty.call(i,r)){return process.nextTick(o.bind(null,null,i[r]))}var c=r,h={},m={};var g;var y;var v;var b;start();function start(){var i=d.exec(r);g=i[0].length;y=i[0];v=i[0];b="";if(l&&!m[v]){u.lstat(v,(function(r){if(r)return o(r);m[v]=true;LOOP()}))}else{process.nextTick(LOOP)}}function LOOP(){if(g>=r.length){if(i)i[c]=r;return o(null,r)}p.lastIndex=g;var a=p.exec(r);b=y;y+=a[0];v=b+a[1];g=p.lastIndex;if(m[v]||i&&i[v]===v){return process.nextTick(LOOP)}if(i&&Object.prototype.hasOwnProperty.call(i,v)){return gotResolvedLink(i[v])}return u.lstat(v,gotStat)}function gotStat(r,a){if(r)return o(r);if(!a.isSymbolicLink()){m[v]=true;if(i)i[v]=v;return process.nextTick(LOOP)}if(!l){var c=a.dev.toString(32)+":"+a.ino.toString(32);if(h.hasOwnProperty(c)){return gotTarget(null,h[c],v)}}u.stat(v,(function(r){if(r)return o(r);u.readlink(v,(function(r,i){if(!l)h[c]=i;gotTarget(r,i)}))}))}function gotTarget(r,l,u){if(r)return o(r);var c=a.resolve(b,l);if(i)i[u]=c;gotResolvedLink(c)}function gotResolvedLink(i){r=a.resolve(i,r.slice(g));start()}}},7945:(r,i,o)=>{const a=o(3837);const l=o(7310);let u=false;let c=true;function _value(r,i){const o=process.env[r];if(o===undefined){if(i===undefined&&!c){return o}if(i===undefined){throw new Error("GetEnv.Nonexistent: "+r+" does not exist "+"and no fallback value provided.")}if(u){throw new Error("GetEnv.DisabledFallbacks: "+r+" relying on fallback "+"when fallbacks have been disabled")}return""+i}return o}const h={string:function(r){return""+r},int:function(r){const i=r.match(/^-?\d+$/);if(!i){throw new Error("GetEnv.NoInteger: "+r+" is not an integer.")}return+r},float:function(r){const i=+r===Infinity||+r===-Infinity;if(i){throw new Error("GetEnv.Infinity: "+r+" is set to +/-Infinity.")}const o=!(isNaN(r)||r==="");if(!o){throw new Error("GetEnv.NoFloat: "+r+" is not a number.")}return+r},bool:function(r){const i=r==="true"||r==="false";if(!i){throw new Error("GetEnv.NoBoolean: "+r+" is not a boolean.")}return r==="true"},boolish:function(r){try{return h.bool(r)}catch(i){const o=r==="1"||r==="0";if(!o){throw new Error("GetEnv.NoBoolean: "+r+" is not a boolean.")}return r==="1"}},url:l.parse};function converter(r){return function(i,o){if(typeof i=="string"){const a=_value(i,o);return h[r](a)}else{return p.multi(i)}}}const p=converter("string");Object.keys(h).forEach((function(r){p[r]=converter(r)}));p.array=function array(r,i,o){i=i||"string";if(Object.keys(h).indexOf(i)===-1){throw new Error("GetEnv.ArrayUndefinedType: Unknown array type "+i)}const a=_value(r,o);return a.split(/\s*,\s*/).map(h[i])};p.multi=function multi(r){const i={};for(let o in r){const l=r[o];if(a.isArray(l)){switch(l.length){case 1:case 2:i[o]=p(l[0],l[1]);break;case 3:i[o]=p[l[2]](l[0],l[1]);break;default:throw"getenv.multi(): invalid spec";break}}else{i[o]=p(l)}}return i};p.disableFallbacks=function(){u=true};p.enableFallbacks=function(){u=false};p.disableErrors=function(){c=false};p.enableErrors=function(){c=true};r.exports=p},6738:r=>{"use strict";r.exports=(r,i=process.argv)=>{const o=r.startsWith("-")?"":r.length===1?"-":"--";const a=i.indexOf(o+r);const l=i.indexOf("--");return a!==-1&&(l===-1||a<l)}},9442:(r,i,o)=>{var a=o(4586);var l=Object.create(null);var u=o(7197);r.exports=a(inflight);function inflight(r,i){if(l[r]){l[r].push(i);return null}else{l[r]=[i];return makeres(r)}}function makeres(r){return u((function RES(){var i=l[r];var o=i.length;var a=slice(arguments);try{for(var u=0;u<o;u++){i[u].apply(null,a)}}finally{if(i.length>o){i.splice(0,o);process.nextTick((function(){RES.apply(null,a)}))}else{delete l[r]}}}))}function slice(r){var i=r.length;var o=[];for(var a=0;a<i;a++)o[a]=r[a];return o}},6919:(r,i,o)=>{try{var a=o(3837);if(typeof a.inherits!=="function")throw"";r.exports=a.inherits}catch(i){r.exports=o(7526)}},7526:r=>{if(typeof Object.create==="function"){r.exports=function inherits(r,i){if(i){r.super_=i;r.prototype=Object.create(i.prototype,{constructor:{value:r,enumerable:false,writable:true,configurable:true}})}}}else{r.exports=function inherits(r,i){if(i){r.super_=i;var TempCtor=function(){};TempCtor.prototype=i.prototype;r.prototype=new TempCtor;r.prototype.constructor=r}}}},1923:(r,i)=>{i.parse=i.decode=decode;i.stringify=i.encode=encode;i.safe=safe;i.unsafe=unsafe;var o=typeof process!=="undefined"&&process.platform==="win32"?"\r\n":"\n";function encode(r,i){var a=[];var l="";if(typeof i==="string"){i={section:i,whitespace:false}}else{i=i||{};i.whitespace=i.whitespace===true}var u=i.whitespace?" = ":"=";Object.keys(r).forEach((function(i,c,h){var p=r[i];if(p&&Array.isArray(p)){p.forEach((function(r){l+=safe(i+"[]")+u+safe(r)+"\n"}))}else if(p&&typeof p==="object")a.push(i);else l+=safe(i)+u+safe(p)+o}));if(i.section&&l.length)l="["+safe(i.section)+"]"+o+l;a.forEach((function(a,u,c){var h=dotSplit(a).join("\\.");var p=(i.section?i.section+".":"")+h;var d=encode(r[a],{section:p,whitespace:i.whitespace});if(l.length&&d.length)l+=o;l+=d}));return l}function dotSplit(r){return r.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map((function(r){return r.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")}))}function decode(r){var i={};var o=i;var a=null;var l=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;var u=r.split(/[\r\n]+/g);u.forEach((function(r,u,c){if(!r||r.match(/^\s*[;#]/))return;var h=r.match(l);if(!h)return;if(h[1]!==undefined){a=unsafe(h[1]);if(a==="__proto__"){o={};return}o=i[a]=i[a]||{};return}var p=unsafe(h[2]);if(p==="__proto__")return;var d=h[3]?unsafe(h[4]):true;switch(d){case"true":case"false":case"null":d=JSON.parse(d)}if(p.length>2&&p.slice(-2)==="[]"){p=p.substring(0,p.length-2);if(p==="__proto__")return;if(!o[p])o[p]=[];else if(!Array.isArray(o[p]))o[p]=[o[p]]}if(Array.isArray(o[p]))o[p].push(d);else o[p]=d}));Object.keys(i).filter((function(r,o,a){if(!i[r]||typeof i[r]!=="object"||Array.isArray(i[r]))return false;var l=dotSplit(r);var u=i;var c=l.pop();var h=c.replace(/\\\./g,".");l.forEach((function(r,i,o){if(r==="__proto__")return;if(!u[r]||typeof u[r]!=="object")u[r]={};u=u[r]}));if(u===i&&h===c)return false;u[h]=i[r];return true})).forEach((function(r,o,a){delete i[r]}));return i}function isQuoted(r){return r.charAt(0)==='"'&&r.slice(-1)==='"'||r.charAt(0)==="'"&&r.slice(-1)==="'"}function safe(r){return typeof r!=="string"||r.match(/[=\r\n]/)||r.match(/^\[/)||r.length>1&&isQuoted(r)||r!==r.trim()?JSON.stringify(r):r.replace(/;/g,"\\;").replace(/#/g,"\\#")}function unsafe(r,i){r=(r||"").trim();if(isQuoted(r)){if(r.charAt(0)==="'")r=r.substr(1,r.length-2);try{r=JSON.parse(r)}catch(r){}}else{var o=false;var a="";for(var l=0,u=r.length;l<u;l++){var c=r.charAt(l);if(o){if("\\;#".indexOf(c)!==-1)a+=c;else a+="\\"+c;o=false}else if(";#".indexOf(c)!==-1)break;else if(c==="\\")o=true;else a+=c}if(o)a+="\\";return a.trim()}return r}},228:(r,i,o)=>{var a=o(7147);var l;if(process.platform==="win32"||global.TESTING_WINDOWS){l=o(7214)}else{l=o(5211)}r.exports=isexe;isexe.sync=sync;function isexe(r,i,o){if(typeof i==="function"){o=i;i={}}if(!o){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(o,a){isexe(r,i||{},(function(r,i){if(r){a(r)}else{o(i)}}))}))}l(r,i||{},(function(r,a){if(r){if(r.code==="EACCES"||i&&i.ignoreErrors){r=null;a=false}}o(r,a)}))}function sync(r,i){try{return l.sync(r,i||{})}catch(r){if(i&&i.ignoreErrors||r.code==="EACCES"){return false}else{throw r}}}},5211:(r,i,o)=>{r.exports=isexe;isexe.sync=sync;var a=o(7147);function isexe(r,i,o){a.stat(r,(function(r,a){o(r,r?false:checkStat(a,i))}))}function sync(r,i){return checkStat(a.statSync(r),i)}function checkStat(r,i){return r.isFile()&&checkMode(r,i)}function checkMode(r,i){var o=r.mode;var a=r.uid;var l=r.gid;var u=i.uid!==undefined?i.uid:process.getuid&&process.getuid();var c=i.gid!==undefined?i.gid:process.getgid&&process.getgid();var h=parseInt("100",8);var p=parseInt("010",8);var d=parseInt("001",8);var m=h|p;var g=o&d||o&p&&l===c||o&h&&a===u||o&m&&u===0;return g}},7214:(r,i,o)=>{r.exports=isexe;isexe.sync=sync;var a=o(7147);function checkPathExt(r,i){var o=i.pathExt!==undefined?i.pathExt:process.env.PATHEXT;if(!o){return true}o=o.split(";");if(o.indexOf("")!==-1){return true}for(var a=0;a<o.length;a++){var l=o[a].toLowerCase();if(l&&r.substr(-l.length).toLowerCase()===l){return true}}return false}function checkStat(r,i,o){if(!r.isSymbolicLink()&&!r.isFile()){return false}return checkPathExt(i,o)}function isexe(r,i,o){a.stat(r,(function(a,l){o(a,a?false:checkStat(l,r,i))}))}function sync(r,i){return checkStat(a.statSync(r),r,i)}},9439:r=>{"use strict";const{FORCE_COLOR:i,NODE_DISABLE_COLORS:o,TERM:a}=process.env;const l={enabled:!o&&a!=="dumb"&&i!=="0",reset:init(0,0),bold:init(1,22),dim:init(2,22),italic:init(3,23),underline:init(4,24),inverse:init(7,27),hidden:init(8,28),strikethrough:init(9,29),black:init(30,39),red:init(31,39),green:init(32,39),yellow:init(33,39),blue:init(34,39),magenta:init(35,39),cyan:init(36,39),white:init(37,39),gray:init(90,39),grey:init(90,39),bgBlack:init(40,49),bgRed:init(41,49),bgGreen:init(42,49),bgYellow:init(43,49),bgBlue:init(44,49),bgMagenta:init(45,49),bgCyan:init(46,49),bgWhite:init(47,49)};function run(r,i){let o=0,a,l="",u="";for(;o<r.length;o++){a=r[o];l+=a.open;u+=a.close;if(i.includes(a.close)){i=i.replace(a.rgx,a.close+a.open)}}return l+i+u}function chain(r,i){let o={has:r,keys:i};o.reset=l.reset.bind(o);o.bold=l.bold.bind(o);o.dim=l.dim.bind(o);o.italic=l.italic.bind(o);o.underline=l.underline.bind(o);o.inverse=l.inverse.bind(o);o.hidden=l.hidden.bind(o);o.strikethrough=l.strikethrough.bind(o);o.black=l.black.bind(o);o.red=l.red.bind(o);o.green=l.green.bind(o);o.yellow=l.yellow.bind(o);o.blue=l.blue.bind(o);o.magenta=l.magenta.bind(o);o.cyan=l.cyan.bind(o);o.white=l.white.bind(o);o.gray=l.gray.bind(o);o.grey=l.grey.bind(o);o.bgBlack=l.bgBlack.bind(o);o.bgRed=l.bgRed.bind(o);o.bgGreen=l.bgGreen.bind(o);o.bgYellow=l.bgYellow.bind(o);o.bgBlue=l.bgBlue.bind(o);o.bgMagenta=l.bgMagenta.bind(o);o.bgCyan=l.bgCyan.bind(o);o.bgWhite=l.bgWhite.bind(o);return o}function init(r,i){let o={open:`[${r}m`,close:`[${i}m`,rgx:new RegExp(`\\x1b\\[${i}m`,"g")};return function(i){if(this!==void 0&&this.has!==void 0){this.has.includes(r)||(this.has.push(r),this.keys.push(o));return i===void 0?this:l.enabled?run(this.keys,i+""):i+""}return i===void 0?chain([r],[o]):l.enabled?run([o],i+""):i+""}}r.exports=l},9566:(r,i,o)=>{r.exports=minimatch;minimatch.Minimatch=Minimatch;var a=function(){try{return o(1017)}catch(r){}}()||{sep:"/"};minimatch.sep=a.sep;var l=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var u=o(3197);var c={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var h="[^/]";var p=h+"*?";var d="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var m="(?:(?!(?:\\/|^)\\.).)*?";var g=charSet("().*{}+?[]^$\\!");function charSet(r){return r.split("").reduce((function(r,i){r[i]=true;return r}),{})}var y=/\/+/;minimatch.filter=filter;function filter(r,i){i=i||{};return function(o,a,l){return minimatch(o,r,i)}}function ext(r,i){i=i||{};var o={};Object.keys(r).forEach((function(i){o[i]=r[i]}));Object.keys(i).forEach((function(r){o[r]=i[r]}));return o}minimatch.defaults=function(r){if(!r||typeof r!=="object"||!Object.keys(r).length){return minimatch}var i=minimatch;var o=function minimatch(o,a,l){return i(o,a,ext(r,l))};o.Minimatch=function Minimatch(o,a){return new i.Minimatch(o,ext(r,a))};o.Minimatch.defaults=function defaults(o){return i.defaults(ext(r,o)).Minimatch};o.filter=function filter(o,a){return i.filter(o,ext(r,a))};o.defaults=function defaults(o){return i.defaults(ext(r,o))};o.makeRe=function makeRe(o,a){return i.makeRe(o,ext(r,a))};o.braceExpand=function braceExpand(o,a){return i.braceExpand(o,ext(r,a))};o.match=function(o,a,l){return i.match(o,a,ext(r,l))};return o};Minimatch.defaults=function(r){return minimatch.defaults(r).Minimatch};function minimatch(r,i,o){assertValidPattern(i);if(!o)o={};if(!o.nocomment&&i.charAt(0)==="#"){return false}return new Minimatch(i,o).match(r)}function Minimatch(r,i){if(!(this instanceof Minimatch)){return new Minimatch(r,i)}assertValidPattern(r);if(!i)i={};r=r.trim();if(!i.allowWindowsEscape&&a.sep!=="/"){r=r.split(a.sep).join("/")}this.options=i;this.set=[];this.pattern=r;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!i.partial;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){var r=this.pattern;var i=this.options;if(!i.nocomment&&r.charAt(0)==="#"){this.comment=true;return}if(!r){this.empty=true;return}this.parseNegate();var o=this.globSet=this.braceExpand();if(i.debug)this.debug=function debug(){console.error.apply(console,arguments)};this.debug(this.pattern,o);o=this.globParts=o.map((function(r){return r.split(y)}));this.debug(this.pattern,o);o=o.map((function(r,i,o){return r.map(this.parse,this)}),this);this.debug(this.pattern,o);o=o.filter((function(r){return r.indexOf(false)===-1}));this.debug(this.pattern,o);this.set=o}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var r=this.pattern;var i=false;var o=this.options;var a=0;if(o.nonegate)return;for(var l=0,u=r.length;l<u&&r.charAt(l)==="!";l++){i=!i;a++}if(a)this.pattern=r.substr(a);this.negate=i}minimatch.braceExpand=function(r,i){return braceExpand(r,i)};Minimatch.prototype.braceExpand=braceExpand;function braceExpand(r,i){if(!i){if(this instanceof Minimatch){i=this.options}else{i={}}}r=typeof r==="undefined"?this.pattern:r;assertValidPattern(r);if(i.nobrace||!/\{(?:(?!\{).)*\}/.test(r)){return[r]}return u(r)}var v=1024*64;var assertValidPattern=function(r){if(typeof r!=="string"){throw new TypeError("invalid pattern")}if(r.length>v){throw new TypeError("pattern is too long")}};Minimatch.prototype.parse=parse;var b={};function parse(r,i){assertValidPattern(r);var o=this.options;if(r==="**"){if(!o.noglobstar)return l;else r="*"}if(r==="")return"";var a="";var u=!!o.nocase;var d=false;var m=[];var y=[];var v;var w=false;var M=-1;var D=-1;var T=r.charAt(0)==="."?"":o.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var x=this;function clearStateChar(){if(v){switch(v){case"*":a+=p;u=true;break;case"?":a+=h;u=true;break;default:a+="\\"+v;break}x.debug("clearStateChar %j %j",v,a);v=false}}for(var O=0,N=r.length,_;O<N&&(_=r.charAt(O));O++){this.debug("%s\t%s %s %j",r,O,a,_);if(d&&g[_]){a+="\\"+_;d=false;continue}switch(_){case"/":{return false}case"\\":clearStateChar();d=true;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s\t%s %s %j <-- stateChar",r,O,a,_);if(w){this.debug(" in class");if(_==="!"&&O===D+1)_="^";a+=_;continue}x.debug("call clearStateChar %j",v);clearStateChar();v=_;if(o.noext)clearStateChar();continue;case"(":if(w){a+="(";continue}if(!v){a+="\\(";continue}m.push({type:v,start:O-1,reStart:a.length,open:c[v].open,close:c[v].close});a+=v==="!"?"(?:(?!(?:":"(?:";this.debug("plType %j %j",v,a);v=false;continue;case")":if(w||!m.length){a+="\\)";continue}clearStateChar();u=true;var A=m.pop();a+=A.close;if(A.type==="!"){y.push(A)}A.reEnd=a.length;continue;case"|":if(w||!m.length||d){a+="\\|";d=false;continue}clearStateChar();a+="|";continue;case"[":clearStateChar();if(w){a+="\\"+_;continue}w=true;D=O;M=a.length;a+=_;continue;case"]":if(O===D+1||!w){a+="\\"+_;d=false;continue}var S=r.substring(D+1,O);try{RegExp("["+S+"]")}catch(r){var I=this.parse(S,b);a=a.substr(0,M)+"\\["+I[0]+"\\]";u=u||I[1];w=false;continue}u=true;w=false;a+=_;continue;default:clearStateChar();if(d){d=false}else if(g[_]&&!(_==="^"&&w)){a+="\\"}a+=_}}if(w){S=r.substr(D+1);I=this.parse(S,b);a=a.substr(0,M)+"\\["+I[0];u=u||I[1]}for(A=m.pop();A;A=m.pop()){var C=a.slice(A.reStart+A.open.length);this.debug("setting tail",a,A);C=C.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(r,i,o){if(!o){o="\\"}return i+i+o+"|"}));this.debug("tail=%j\n %s",C,C,A,a);var L=A.type==="*"?p:A.type==="?"?h:"\\"+A.type;u=true;a=a.slice(0,A.reStart)+L+"\\("+C}clearStateChar();if(d){a+="\\\\"}var P=false;switch(a.charAt(0)){case"[":case".":case"(":P=true}for(var X=y.length-1;X>-1;X--){var j=y[X];var k=a.slice(0,j.reStart);var R=a.slice(j.reStart,j.reEnd-8);var B=a.slice(j.reEnd-8,j.reEnd);var $=a.slice(j.reEnd);B+=$;var U=k.split("(").length-1;var V=$;for(O=0;O<U;O++){V=V.replace(/\)[+*?]?/,"")}$=V;var G="";if($===""&&i!==b){G="$"}var W=k+R+$+G+B;a=W}if(a!==""&&u){a="(?=.)"+a}if(P){a=T+a}if(i===b){return[a,u]}if(!u){return globUnescape(r)}var q=o.nocase?"i":"";try{var H=new RegExp("^"+a+"$",q)}catch(r){return new RegExp("$.")}H._glob=r;H._src=a;return H}minimatch.makeRe=function(r,i){return new Minimatch(r,i||{}).makeRe()};Minimatch.prototype.makeRe=makeRe;function makeRe(){if(this.regexp||this.regexp===false)return this.regexp;var r=this.set;if(!r.length){this.regexp=false;return this.regexp}var i=this.options;var o=i.noglobstar?p:i.dot?d:m;var a=i.nocase?"i":"";var u=r.map((function(r){return r.map((function(r){return r===l?o:typeof r==="string"?regExpEscape(r):r._src})).join("\\/")})).join("|");u="^(?:"+u+")$";if(this.negate)u="^(?!"+u+").*$";try{this.regexp=new RegExp(u,a)}catch(r){this.regexp=false}return this.regexp}minimatch.match=function(r,i,o){o=o||{};var a=new Minimatch(i,o);r=r.filter((function(r){return a.match(r)}));if(a.options.nonull&&!r.length){r.push(i)}return r};Minimatch.prototype.match=function match(r,i){if(typeof i==="undefined")i=this.partial;this.debug("match",r,this.pattern);if(this.comment)return false;if(this.empty)return r==="";if(r==="/"&&i)return true;var o=this.options;if(a.sep!=="/"){r=r.split(a.sep).join("/")}r=r.split(y);this.debug(this.pattern,"split",r);var l=this.set;this.debug(this.pattern,"set",l);var u;var c;for(c=r.length-1;c>=0;c--){u=r[c];if(u)break}for(c=0;c<l.length;c++){var h=l[c];var p=r;if(o.matchBase&&h.length===1){p=[u]}var d=this.matchOne(p,h,i);if(d){if(o.flipNegate)return true;return!this.negate}}if(o.flipNegate)return false;return this.negate};Minimatch.prototype.matchOne=function(r,i,o){var a=this.options;this.debug("matchOne",{this:this,file:r,pattern:i});this.debug("matchOne",r.length,i.length);for(var u=0,c=0,h=r.length,p=i.length;u<h&&c<p;u++,c++){this.debug("matchOne loop");var d=i[c];var m=r[u];this.debug(i,d,m);if(d===false)return false;if(d===l){this.debug("GLOBSTAR",[i,d,m]);var g=u;var y=c+1;if(y===p){this.debug("** at the end");for(;u<h;u++){if(r[u]==="."||r[u]===".."||!a.dot&&r[u].charAt(0)===".")return false}return true}while(g<h){var v=r[g];this.debug("\nglobstar while",r,g,i,y,v);if(this.matchOne(r.slice(g),i.slice(y),o)){this.debug("globstar found match!",g,h,v);return true}else{if(v==="."||v===".."||!a.dot&&v.charAt(0)==="."){this.debug("dot detected!",r,g,i,y);break}this.debug("globstar swallow a segment, and continue");g++}}if(o){this.debug("\n>>> no match, partial?",r,g,i,y);if(g===h)return true}return false}var b;if(typeof d==="string"){b=m===d;this.debug("string match",d,m,b)}else{b=m.match(d);this.debug("pattern match",d,m,b)}if(!b)return false}if(u===h&&c===p){return true}else if(u===h){return o}else if(c===p){return u===h-1&&r[u]===""}throw new Error("wtf?")};function globUnescape(r){return r.replace(/\\(.)/g,"$1")}function regExpEscape(r){return r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},5912:r=>{"use strict";function hasKey(r,i){var o=r;i.slice(0,-1).forEach((function(r){o=o[r]||{}}));var a=i[i.length-1];return a in o}function isNumber(r){if(typeof r==="number"){return true}if(/^0x[0-9a-f]+$/i.test(r)){return true}return/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(r)}function isConstructorOrProto(r,i){return i==="constructor"&&typeof r[i]==="function"||i==="__proto__"}r.exports=function(r,i){if(!i){i={}}var o={bools:{},strings:{},unknownFn:null};if(typeof i.unknown==="function"){o.unknownFn=i.unknown}if(typeof i.boolean==="boolean"&&i.boolean){o.allBools=true}else{[].concat(i.boolean).filter(Boolean).forEach((function(r){o.bools[r]=true}))}var a={};function aliasIsBoolean(r){return a[r].some((function(r){return o.bools[r]}))}Object.keys(i.alias||{}).forEach((function(r){a[r]=[].concat(i.alias[r]);a[r].forEach((function(i){a[i]=[r].concat(a[r].filter((function(r){return i!==r})))}))}));[].concat(i.string).filter(Boolean).forEach((function(r){o.strings[r]=true;if(a[r]){[].concat(a[r]).forEach((function(r){o.strings[r]=true}))}}));var l=i.default||{};var u={_:[]};function argDefined(r,i){return o.allBools&&/^--[^=]+$/.test(i)||o.strings[r]||o.bools[r]||a[r]}function setKey(r,i,a){var l=r;for(var u=0;u<i.length-1;u++){var c=i[u];if(isConstructorOrProto(l,c)){return}if(l[c]===undefined){l[c]={}}if(l[c]===Object.prototype||l[c]===Number.prototype||l[c]===String.prototype){l[c]={}}if(l[c]===Array.prototype){l[c]=[]}l=l[c]}var h=i[i.length-1];if(isConstructorOrProto(l,h)){return}if(l===Object.prototype||l===Number.prototype||l===String.prototype){l={}}if(l===Array.prototype){l=[]}if(l[h]===undefined||o.bools[h]||typeof l[h]==="boolean"){l[h]=a}else if(Array.isArray(l[h])){l[h].push(a)}else{l[h]=[l[h],a]}}function setArg(r,i,l){if(l&&o.unknownFn&&!argDefined(r,l)){if(o.unknownFn(l)===false){return}}var c=!o.strings[r]&&isNumber(i)?Number(i):i;setKey(u,r.split("."),c);(a[r]||[]).forEach((function(r){setKey(u,r.split("."),c)}))}Object.keys(o.bools).forEach((function(r){setArg(r,l[r]===undefined?false:l[r])}));var c=[];if(r.indexOf("--")!==-1){c=r.slice(r.indexOf("--")+1);r=r.slice(0,r.indexOf("--"))}for(var h=0;h<r.length;h++){var p=r[h];var d;var m;if(/^--.+=/.test(p)){var g=p.match(/^--([^=]+)=([\s\S]*)$/);d=g[1];var y=g[2];if(o.bools[d]){y=y!=="false"}setArg(d,y,p)}else if(/^--no-.+/.test(p)){d=p.match(/^--no-(.+)/)[1];setArg(d,false,p)}else if(/^--.+/.test(p)){d=p.match(/^--(.+)/)[1];m=r[h+1];if(m!==undefined&&!/^(-|--)[^-]/.test(m)&&!o.bools[d]&&!o.allBools&&(a[d]?!aliasIsBoolean(d):true)){setArg(d,m,p);h+=1}else if(/^(true|false)$/.test(m)){setArg(d,m==="true",p);h+=1}else{setArg(d,o.strings[d]?"":true,p)}}else if(/^-[^-]+/.test(p)){var v=p.slice(1,-1).split("");var b=false;for(var w=0;w<v.length;w++){m=p.slice(w+2);if(m==="-"){setArg(v[w],m,p);continue}if(/[A-Za-z]/.test(v[w])&&m[0]==="="){setArg(v[w],m.slice(1),p);b=true;break}if(/[A-Za-z]/.test(v[w])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(m)){setArg(v[w],m,p);b=true;break}if(v[w+1]&&v[w+1].match(/\W/)){setArg(v[w],p.slice(w+2),p);b=true;break}else{setArg(v[w],o.strings[v[w]]?"":true,p)}}d=p.slice(-1)[0];if(!b&&d!=="-"){if(r[h+1]&&!/^(-|--)[^-]/.test(r[h+1])&&!o.bools[d]&&(a[d]?!aliasIsBoolean(d):true)){setArg(d,r[h+1],p);h+=1}else if(r[h+1]&&/^(true|false)$/.test(r[h+1])){setArg(d,r[h+1]==="true",p);h+=1}else{setArg(d,o.strings[d]?"":true,p)}}}else{if(!o.unknownFn||o.unknownFn(p)!==false){u._.push(o.strings._||!isNumber(p)?p:Number(p))}if(i.stopEarly){u._.push.apply(u._,r.slice(h+1));break}}}Object.keys(l).forEach((function(r){if(!hasKey(u,r.split("."))){setKey(u,r.split("."),l[r]);(a[r]||[]).forEach((function(i){setKey(u,i.split("."),l[r])}))}}));if(i["--"]){u["--"]=c.slice()}else{c.forEach((function(r){u._.push(r)}))}return u}},7369:r=>{"use strict";r.exports=function(r){try{return r()}catch(r){}}},7197:(r,i,o)=>{var a=o(4586);r.exports=a(once);r.exports.strict=a(onceStrict);once.proto=once((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})}));function once(r){var f=function(){if(f.called)return f.value;f.called=true;return f.value=r.apply(this,arguments)};f.called=false;return f}function onceStrict(r){var f=function(){if(f.called)throw new Error(f.onceError);f.called=true;return f.value=r.apply(this,arguments)};var i=r.name||"Function wrapped with `once`";f.onceError=i+" shouldn't be called more than once";f.called=false;return f}},1323:r=>{"use strict";function posix(r){return r.charAt(0)==="/"}function win32(r){var i=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;var o=i.exec(r);var a=o[1]||"";var l=Boolean(a&&a.charAt(1)!==":");return Boolean(o[2]||l)}r.exports=process.platform==="win32"?win32:posix;r.exports.posix=posix;r.exports.win32=win32},2170:r=>{"use strict";r.exports=r=>{r=r||{};const i=r.env||process.env;const o=r.platform||process.platform;if(o!=="win32"){return"PATH"}return Object.keys(i).find((r=>r.toUpperCase()==="PATH"))||"Path"}},399:r=>{"use strict";class DatePart{constructor({token:r,date:i,parts:o,locales:a}){this.token=r;this.date=i||new Date;this.parts=o||[this];this.locales=a||{}}up(){}down(){}next(){const r=this.parts.indexOf(this);return this.parts.find(((i,o)=>o>r&&i instanceof DatePart))}setTo(r){}prev(){let r=[].concat(this.parts).reverse();const i=r.indexOf(this);return r.find(((r,o)=>o>i&&r instanceof DatePart))}toString(){return String(this.date)}}r.exports=DatePart},7967:(r,i,o)=>{"use strict";const a=o(399);const pos=r=>{r=r%10;return r===1?"st":r===2?"nd":r===3?"rd":"th"};class Day extends a{constructor(r={}){super(r)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(r){this.date.setDate(parseInt(r.substr(-2)))}toString(){let r=this.date.getDate();let i=this.date.getDay();return this.token==="DD"?String(r).padStart(2,"0"):this.token==="Do"?r+pos(r):this.token==="d"?i+1:this.token==="ddd"?this.locales.weekdaysShort[i]:this.token==="dddd"?this.locales.weekdays[i]:r}}r.exports=Day},4102:(r,i,o)=>{"use strict";const a=o(399);class Hours extends a{constructor(r={}){super(r)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(r){this.date.setHours(parseInt(r.substr(-2)))}toString(){let r=this.date.getHours();if(/h/.test(this.token))r=r%12||12;return this.token.length>1?String(r).padStart(2,"0"):r}}r.exports=Hours},7517:(r,i,o)=>{"use strict";r.exports={DatePart:o(399),Meridiem:o(5184),Day:o(7967),Hours:o(4102),Milliseconds:o(6945),Minutes:o(7829),Month:o(8608),Seconds:o(812),Year:o(5227)}},5184:(r,i,o)=>{"use strict";const a=o(399);class Meridiem extends a{constructor(r={}){super(r)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let r=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?r.toUpperCase():r}}r.exports=Meridiem},6945:(r,i,o)=>{"use strict";const a=o(399);class Milliseconds extends a{constructor(r={}){super(r)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(r){this.date.setMilliseconds(parseInt(r.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}r.exports=Milliseconds},7829:(r,i,o)=>{"use strict";const a=o(399);class Minutes extends a{constructor(r={}){super(r)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(r){this.date.setMinutes(parseInt(r.substr(-2)))}toString(){let r=this.date.getMinutes();return this.token.length>1?String(r).padStart(2,"0"):r}}r.exports=Minutes},8608:(r,i,o)=>{"use strict";const a=o(399);class Month extends a{constructor(r={}){super(r)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(r){r=parseInt(r.substr(-2))-1;this.date.setMonth(r<0?0:r)}toString(){let r=this.date.getMonth();let i=this.token.length;return i===2?String(r+1).padStart(2,"0"):i===3?this.locales.monthsShort[r]:i===4?this.locales.months[r]:String(r+1)}}r.exports=Month},812:(r,i,o)=>{"use strict";const a=o(399);class Seconds extends a{constructor(r={}){super(r)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(r){this.date.setSeconds(parseInt(r.substr(-2)))}toString(){let r=this.date.getSeconds();return this.token.length>1?String(r).padStart(2,"0"):r}}r.exports=Seconds},5227:(r,i,o)=>{"use strict";const a=o(399);class Year extends a{constructor(r={}){super(r)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(r){this.date.setFullYear(r.substr(-4))}toString(){let r=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?r.substr(-2):r}}r.exports=Year},935:(r,i,o)=>{"use strict";function asyncGeneratorStep(r,i,o,a,l,u,c){try{var h=r[u](c);var p=h.value}catch(r){o(r);return}if(h.done){i(p)}else{Promise.resolve(p).then(a,l)}}function _asyncToGenerator(r){return function(){var i=this,o=arguments;return new Promise((function(a,l){var u=r.apply(i,o);function _next(r){asyncGeneratorStep(u,a,l,_next,_throw,"next",r)}function _throw(r){asyncGeneratorStep(u,a,l,_next,_throw,"throw",r)}_next(undefined)}))}}const a=o(9439);const l=o(5876);const u=o(332),c=u.erase,h=u.cursor;const p=o(7483),d=p.style,m=p.clear,g=p.figures,y=p.wrap,v=p.entriesToDisplay;const getVal=(r,i)=>r[i]&&(r[i].value||r[i].title||r[i]);const getTitle=(r,i)=>r[i]&&(r[i].title||r[i].value||r[i]);const getIndex=(r,i)=>{const o=r.findIndex((r=>r.value===i||r.title===i));return o>-1?o:undefined};class AutocompletePrompt extends l{constructor(r={}){super(r);this.msg=r.message;this.suggest=r.suggest;this.choices=r.choices;this.initial=typeof r.initial==="number"?r.initial:getIndex(r.choices,r.initial);this.select=this.initial||r.cursor||0;this.i18n={noMatches:r.noMatches||"no matches found"};this.fallback=r.fallback||this.initial;this.clearFirst=r.clearFirst||false;this.suggestions=[];this.input="";this.limit=r.limit||10;this.cursor=0;this.transform=d.render(r.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=m("",this.out.columns);this.complete(this.render);this.render()}set fallback(r){this._fb=Number.isSafeInteger(parseInt(r))?parseInt(r):r}get fallback(){let r;if(typeof this._fb==="number")r=this.choices[this._fb];else if(typeof this._fb==="string")r={title:this._fb};return r||this._fb||{title:this.i18n.noMatches}}moveSelect(r){this.select=r;if(this.suggestions.length>0)this.value=getVal(this.suggestions,r);else this.value=this.fallback.value;this.fire()}complete(r){var i=this;return _asyncToGenerator((function*(){const o=i.completing=i.suggest(i.input,i.choices);const a=yield o;if(i.completing!==o)return;i.suggestions=a.map(((r,i,o)=>({title:getTitle(o,i),value:getVal(o,i),description:r.description})));i.completing=false;const l=Math.max(a.length-1,0);i.moveSelect(Math.min(l,i.select));r&&r()}))()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}exit(){if(this.clearFirst&&this.input.length>0){this.reset()}else{this.done=this.exited=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}abort(){this.done=this.aborted=true;this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}_(r,i){let o=this.input.slice(0,this.cursor);let a=this.input.slice(this.cursor);this.input=`${o}${r}${a}`;this.cursor=o.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let r=this.input.slice(0,this.cursor-1);let i=this.input.slice(this.cursor);this.input=`${r}${i}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let r=this.input.slice(0,this.cursor);let i=this.input.slice(this.cursor+1);this.input=`${r}${i}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions.length-1);this.render()}up(){if(this.select===0){this.moveSelect(this.suggestions.length-1)}else{this.moveSelect(this.select-1)}this.render()}down(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else{this.moveSelect(this.select+1)}this.render()}next(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1));this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0));this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}renderOption(r,i,o,l){let u;let c=o?g.arrowUp:l?g.arrowDown:" ";let h=i?a.cyan().underline(r.title):r.title;c=(i?a.cyan(g.pointer)+" ":" ")+c;if(r.description){u=` - ${r.description}`;if(c.length+h.length+u.length>=this.out.columns||r.description.split(/\r?\n/).length>1){u="\n"+y(r.description,{margin:3,width:this.out.columns})}}return c+" "+h+a.gray(u||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(h.hide);else this.out.write(m(this.outputText,this.out.columns));super.render();let r=v(this.select,this.choices.length,this.limit),i=r.startIndex,o=r.endIndex;this.outputText=[d.symbol(this.done,this.aborted,this.exited),a.bold(this.msg),d.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" ");if(!this.done){const r=this.suggestions.slice(i,o).map(((r,a)=>this.renderOption(r,this.select===a+i,a===0&&i>0,a+i===o-1&&o<this.choices.length))).join("\n");this.outputText+=`\n`+(r||a.gray(this.fallback.title))}this.out.write(c.line+h.to(0)+this.outputText)}}r.exports=AutocompletePrompt},2040:(r,i,o)=>{"use strict";const a=o(9439);const l=o(332),u=l.cursor;const c=o(4047);const h=o(7483),p=h.clear,d=h.style,m=h.figures;class AutocompleteMultiselectPrompt extends c{constructor(r={}){r.overrideRender=true;super(r);this.inputValue="";this.clear=p("",this.out.columns);this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((r=>r.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const r=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((r=>{if(this.inputValue){if(typeof r.title==="string"){if(r.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof r.value==="string"){if(r.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const i=this.filteredOptions.findIndex((i=>i===r));this.cursor=i<0?0:i;this.render()}handleSpaceToggle(){const r=this.filteredOptions[this.cursor];if(r.selected){r.selected=false;this.render()}else if(r.disabled||this.value.filter((r=>r.selected)).length>=this.maxChoices){return this.bell()}else{r.selected=true;this.render()}}handleInputChange(r){this.inputValue=this.inputValue+r;this.updateFilteredOptions()}_(r,i){if(r===" "){this.handleSpaceToggle()}else{this.handleInputChange(r)}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return`\nInstructions:\n ${m.arrowUp}/${m.arrowDown}: Highlight option\n ${m.arrowLeft}/${m.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`}return""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:a.gray("Enter something to filter")}\n`}renderOption(r,i,o){let l;if(i.disabled)l=r===o?a.gray().underline(i.title):a.strikethrough().gray(i.title);else l=r===o?a.cyan().underline(i.title):i.title;return(i.selected?a.green(m.radioOn):m.radioOff)+" "+l}renderDoneOrInstructions(){if(this.done){return this.value.filter((r=>r.selected)).map((r=>r.title)).join(", ")}const r=[a.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){r.push(a.yellow(this.warn))}return r.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);super.render();let r=[d.symbol(this.done,this.aborted),a.bold(this.msg),d.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){r+=a.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}r+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+r);this.clear=p(r,this.out.columns)}}r.exports=AutocompleteMultiselectPrompt},5680:(r,i,o)=>{"use strict";const a=o(9439);const l=o(5876);const u=o(7483),c=u.style,h=u.clear;const p=o(332),d=p.erase,m=p.cursor;class ConfirmPrompt extends l{constructor(r={}){super(r);this.msg=r.message;this.value=r.initial;this.initialValue=!!r.initial;this.yesMsg=r.yes||"yes";this.yesOption=r.yesOption||"(Y/n)";this.noMsg=r.no||"no";this.noOption=r.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(r,i){if(r.toLowerCase()==="y"){this.value=true;return this.submit()}if(r.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(m.hide);else this.out.write(h(this.outputText,this.out.columns));super.render();this.outputText=[c.symbol(this.done,this.aborted),a.bold(this.msg),c.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:a.gray(this.initialValue?this.yesOption:this.noOption)].join(" ");this.out.write(d.line+m.to(0)+this.outputText)}}r.exports=ConfirmPrompt},3031:(r,i,o)=>{"use strict";function asyncGeneratorStep(r,i,o,a,l,u,c){try{var h=r[u](c);var p=h.value}catch(r){o(r);return}if(h.done){i(p)}else{Promise.resolve(p).then(a,l)}}function _asyncToGenerator(r){return function(){var i=this,o=arguments;return new Promise((function(a,l){var u=r.apply(i,o);function _next(r){asyncGeneratorStep(u,a,l,_next,_throw,"next",r)}function _throw(r){asyncGeneratorStep(u,a,l,_next,_throw,"throw",r)}_next(undefined)}))}}const a=o(9439);const l=o(5876);const u=o(7483),c=u.style,h=u.clear,p=u.figures;const d=o(332),m=d.erase,g=d.cursor;const y=o(7517),v=y.DatePart,b=y.Meridiem,w=y.Day,M=y.Hours,D=y.Milliseconds,T=y.Minutes,x=y.Month,O=y.Seconds,N=y.Year;const _=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const A={1:({token:r})=>r.replace(/\\(.)/g,"$1"),2:r=>new w(r),3:r=>new x(r),4:r=>new N(r),5:r=>new b(r),6:r=>new M(r),7:r=>new T(r),8:r=>new O(r),9:r=>new D(r)};const S={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends l{constructor(r={}){super(r);this.msg=r.message;this.cursor=0;this.typed="";this.locales=Object.assign(S,r.locales);this._date=r.initial||new Date;this.errorMsg=r.error||"Please Enter A Valid Value";this.validator=r.validate||(()=>true);this.mask=r.mask||"YYYY-MM-DD HH:mm:ss";this.clear=h("",this.out.columns);this.render()}get value(){return this.date}get date(){return this._date}set date(r){if(r)this._date.setTime(r.getTime())}set mask(r){let i;this.parts=[];while(i=_.exec(r)){let r=i.shift();let o=i.findIndex((r=>r!=null));this.parts.push(o in A?A[o]({token:i[o]||r,date:this.date,parts:this.parts,locales:this.locales}):i[o]||r)}let o=this.parts.reduce(((r,i)=>{if(typeof i==="string"&&typeof r[r.length-1]==="string")r[r.length-1]+=i;else r.push(i);return r}),[]);this.parts.splice(0);this.parts.push(...o);this.reset()}moveCursor(r){this.typed="";this.cursor=r;this.fire()}reset(){this.moveCursor(this.parts.findIndex((r=>r instanceof v)));this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var r=this;return _asyncToGenerator((function*(){let i=yield r.validator(r.value);if(typeof i==="string"){r.errorMsg=i;i=false}r.error=!i}))()}submit(){var r=this;return _asyncToGenerator((function*(){yield r.validate();if(r.error){r.color="red";r.fire();r.render();return}r.done=true;r.aborted=false;r.fire();r.render();r.out.write("\n");r.close()}))()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let r=this.parts[this.cursor].prev();if(r==null)return this.bell();this.moveCursor(this.parts.indexOf(r));this.render()}right(){let r=this.parts[this.cursor].next();if(r==null)return this.bell();this.moveCursor(this.parts.indexOf(r));this.render()}next(){let r=this.parts[this.cursor].next();this.moveCursor(r?this.parts.indexOf(r):this.parts.findIndex((r=>r instanceof v)));this.render()}_(r){if(/\d/.test(r)){this.typed+=r;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(g.hide);else this.out.write(h(this.outputText,this.out.columns));super.render();this.outputText=[c.symbol(this.done,this.aborted),a.bold(this.msg),c.delimiter(false),this.parts.reduce(((r,i,o)=>r.concat(o===this.cursor&&!this.done?a.cyan().underline(i.toString()):i)),[]).join("")].join(" ");if(this.error){this.outputText+=this.errorMsg.split("\n").reduce(((r,i,o)=>r+`\n${o?` `:p.pointerSmall} ${a.red().italic(i)}`),``)}this.out.write(m.line+g.to(0)+this.outputText)}}r.exports=DatePrompt},9956:(r,i,o)=>{"use strict";r.exports={TextPrompt:o(5430),SelectPrompt:o(8856),TogglePrompt:o(9692),DatePrompt:o(3031),NumberPrompt:o(8831),MultiselectPrompt:o(4047),AutocompletePrompt:o(935),AutocompleteMultiselectPrompt:o(2040),ConfirmPrompt:o(5680)}},4047:(r,i,o)=>{"use strict";const a=o(9439);const l=o(332),u=l.cursor;const c=o(5876);const h=o(7483),p=h.clear,d=h.figures,m=h.style,g=h.wrap,y=h.entriesToDisplay;class MultiselectPrompt extends c{constructor(r={}){super(r);this.msg=r.message;this.cursor=r.cursor||0;this.scrollIndex=r.cursor||0;this.hint=r.hint||"";this.warn=r.warn||"- This option is disabled -";this.minSelected=r.min;this.showMinError=false;this.maxChoices=r.max;this.instructions=r.instructions;this.optionsPerPage=r.optionsPerPage||10;this.value=r.choices.map(((r,i)=>{if(typeof r==="string")r={title:r,value:i};return{title:r&&(r.title||r.value||r),description:r&&r.description,value:r&&(r.value===undefined?i:r.value),selected:r&&r.selected,disabled:r&&r.disabled}}));this.clear=p("",this.out.columns);if(!r.overrideRender){this.render()}}reset(){this.value.map((r=>!r.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((r=>r.selected))}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const r=this.value.filter((r=>r.selected));if(this.minSelected&&r.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((r=>r.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const r=this.value[this.cursor];if(r.selected){r.selected=false;this.render()}else if(r.disabled||this.value.filter((r=>r.selected)).length>=this.maxChoices){return this.bell()}else{r.selected=true;this.render()}}toggleAll(){if(this.maxChoices!==undefined||this.value[this.cursor].disabled){return this.bell()}const r=!this.value[this.cursor].selected;this.value.filter((r=>!r.disabled)).forEach((i=>i.selected=r));this.render()}_(r,i){if(r===" "){this.handleSpaceToggle()}else if(r==="a"){this.toggleAll()}else{return this.bell()}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return"\nInstructions:\n"+` ${d.arrowUp}/${d.arrowDown}: Highlight option\n`+` ${d.arrowLeft}/${d.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===undefined?` a: Toggle all\n`:"")+` enter/return: Complete answer`}return""}renderOption(r,i,o,l){const u=(i.selected?a.green(d.radioOn):d.radioOff)+" "+l+" ";let c,h;if(i.disabled){c=r===o?a.gray().underline(i.title):a.strikethrough().gray(i.title)}else{c=r===o?a.cyan().underline(i.title):i.title;if(r===o&&i.description){h=` - ${i.description}`;if(u.length+c.length+h.length>=this.out.columns||i.description.split(/\r?\n/).length>1){h="\n"+g(i.description,{margin:u.length,width:this.out.columns})}}}return u+c+a.gray(h||"")}paginateOptions(r){if(r.length===0){return a.red("No matches for this query.")}let i=y(this.cursor,r.length,this.optionsPerPage),o=i.startIndex,l=i.endIndex;let u,c=[];for(let i=o;i<l;i++){if(i===o&&o>0){u=d.arrowUp}else if(i===l-1&&l<r.length){u=d.arrowDown}else{u=" "}c.push(this.renderOption(this.cursor,r[i],i,u))}return"\n"+c.join("\n")}renderOptions(r){if(!this.done){return this.paginateOptions(r)}return""}renderDoneOrInstructions(){if(this.done){return this.value.filter((r=>r.selected)).map((r=>r.title)).join(", ")}const r=[a.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){r.push(a.yellow(this.warn))}return r.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);super.render();let r=[m.symbol(this.done,this.aborted),a.bold(this.msg),m.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){r+=a.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}r+=this.renderOptions(this.value);this.out.write(this.clear+r);this.clear=p(r,this.out.columns)}}r.exports=MultiselectPrompt},8831:(r,i,o)=>{"use strict";function asyncGeneratorStep(r,i,o,a,l,u,c){try{var h=r[u](c);var p=h.value}catch(r){o(r);return}if(h.done){i(p)}else{Promise.resolve(p).then(a,l)}}function _asyncToGenerator(r){return function(){var i=this,o=arguments;return new Promise((function(a,l){var u=r.apply(i,o);function _next(r){asyncGeneratorStep(u,a,l,_next,_throw,"next",r)}function _throw(r){asyncGeneratorStep(u,a,l,_next,_throw,"throw",r)}_next(undefined)}))}}const a=o(9439);const l=o(5876);const u=o(332),c=u.cursor,h=u.erase;const p=o(7483),d=p.style,m=p.figures,g=p.clear,y=p.lines;const v=/[0-9]/;const isDef=r=>r!==undefined;const round=(r,i)=>{let o=Math.pow(10,i);return Math.round(r*o)/o};class NumberPrompt extends l{constructor(r={}){super(r);this.transform=d.render(r.style);this.msg=r.message;this.initial=isDef(r.initial)?r.initial:"";this.float=!!r.float;this.round=r.round||2;this.inc=r.increment||1;this.min=isDef(r.min)?r.min:-Infinity;this.max=isDef(r.max)?r.max:Infinity;this.errorMsg=r.error||`Please Enter A Valid Value`;this.validator=r.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(r){if(!r&&r!==0){this.placeholder=true;this.rendered=a.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(r,this.round)}`);this._value=round(r,this.round)}this.fire()}get value(){return this._value}parse(r){return this.float?parseFloat(r):parseInt(r)}valid(r){return r===`-`||r===`.`&&this.float||v.test(r)}reset(){this.typed=``;this.value=``;this.fire();this.render()}exit(){this.abort()}abort(){let r=this.value;this.value=r!==``?r:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}validate(){var r=this;return _asyncToGenerator((function*(){let i=yield r.validator(r.value);if(typeof i===`string`){r.errorMsg=i;i=false}r.error=!i}))()}submit(){var r=this;return _asyncToGenerator((function*(){yield r.validate();if(r.error){r.color=`red`;r.fire();r.render();return}let i=r.value;r.value=i!==``?i:r.initial;r.done=true;r.aborted=false;r.error=false;r.fire();r.render();r.out.write(`\n`);r.close()}))()}up(){this.typed=``;if(this.value===""){this.value=this.min-this.inc}if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value===""){this.value=this.min+this.inc}if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let r=this.value.toString();if(r.length===0)return this.bell();this.value=this.parse(r=r.slice(0,-1))||``;if(this.value!==""&&this.value<this.min){this.value=this.min}this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(r,i){if(!this.valid(r))return this.bell();const o=Date.now();if(o-this.lastHit>1e3)this.typed=``;this.typed+=r;this.lastHit=o;this.color=`cyan`;if(r===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(c.down(y(this.outputError,this.out.columns)-1)+g(this.outputError,this.out.columns));this.out.write(g(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[d.symbol(this.done,this.aborted),a.bold(this.msg),d.delimiter(this.done),!this.done||!this.done&&!this.placeholder?a[this.color]().underline(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((r,i,o)=>r+`\n${o?` `:m.pointerSmall} ${a.red().italic(i)}`),``)}this.out.write(h.line+c.to(0)+this.outputText+c.save+this.outputError+c.restore)}}r.exports=NumberPrompt},5876:(r,i,o)=>{"use strict";const a=o(4521);const l=o(7483),u=l.action;const c=o(2361);const h=o(332),p=h.beep,d=h.cursor;const m=o(9439);class Prompt extends c{constructor(r={}){super();this.firstRender=true;this.in=r.stdin||process.stdin;this.out=r.stdout||process.stdout;this.onRender=(r.onRender||(()=>void 0)).bind(this);const i=a.createInterface({input:this.in,escapeCodeTimeout:50});a.emitKeypressEvents(this.in,i);if(this.in.isTTY)this.in.setRawMode(true);const o=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1;const keypress=(r,i)=>{let a=u(i,o);if(a===false){this._&&this._(r,i)}else if(typeof this[a]==="function"){this[a](i)}else{this.bell()}};this.close=()=>{this.out.write(d.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);i.close();this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(p)}render(){this.onRender(m);if(this.firstRender)this.firstRender=false}}r.exports=Prompt},8856:(r,i,o)=>{"use strict";const a=o(9439);const l=o(5876);const u=o(7483),c=u.style,h=u.clear,p=u.figures,d=u.wrap,m=u.entriesToDisplay;const g=o(332),y=g.cursor;class SelectPrompt extends l{constructor(r={}){super(r);this.msg=r.message;this.hint=r.hint||"- Use arrow-keys. Return to submit.";this.warn=r.warn||"- This option is disabled";this.cursor=r.initial||0;this.choices=r.choices.map(((r,i)=>{if(typeof r==="string")r={title:r,value:i};return{title:r&&(r.title||r.value||r),value:r&&(r.value===undefined?i:r.value),description:r&&r.description,selected:r&&r.selected,disabled:r&&r.disabled}}));this.optionsPerPage=r.optionsPerPage||10;this.value=(this.choices[this.cursor]||{}).value;this.clear=h("",this.out.columns);this.render()}moveCursor(r){this.cursor=r;this.value=this.choices[r].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0){this.moveCursor(this.choices.length-1)}else{this.moveCursor(this.cursor-1)}this.render()}down(){if(this.cursor===this.choices.length-1){this.moveCursor(0)}else{this.moveCursor(this.cursor+1)}this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(r,i){if(r===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(y.hide);else this.out.write(h(this.outputText,this.out.columns));super.render();let r=m(this.cursor,this.choices.length,this.optionsPerPage),i=r.startIndex,o=r.endIndex;this.outputText=[c.symbol(this.done,this.aborted),a.bold(this.msg),c.delimiter(false),this.done?this.selection.title:this.selection.disabled?a.yellow(this.warn):a.gray(this.hint)].join(" ");if(!this.done){this.outputText+="\n";for(let r=i;r<o;r++){let l,u,c="",h=this.choices[r];if(r===i&&i>0){u=p.arrowUp}else if(r===o-1&&o<this.choices.length){u=p.arrowDown}else{u=" "}if(h.disabled){l=this.cursor===r?a.gray().underline(h.title):a.strikethrough().gray(h.title);u=(this.cursor===r?a.bold().gray(p.pointer)+" ":" ")+u}else{l=this.cursor===r?a.cyan().underline(h.title):h.title;u=(this.cursor===r?a.cyan(p.pointer)+" ":" ")+u;if(h.description&&this.cursor===r){c=` - ${h.description}`;if(u.length+l.length+c.length>=this.out.columns||h.description.split(/\r?\n/).length>1){c="\n"+d(h.description,{margin:3,width:this.out.columns})}}}this.outputText+=`${u} ${l}${a.gray(c)}\n`}}this.out.write(this.outputText)}}r.exports=SelectPrompt},5430:(r,i,o)=>{"use strict";function asyncGeneratorStep(r,i,o,a,l,u,c){try{var h=r[u](c);var p=h.value}catch(r){o(r);return}if(h.done){i(p)}else{Promise.resolve(p).then(a,l)}}function _asyncToGenerator(r){return function(){var i=this,o=arguments;return new Promise((function(a,l){var u=r.apply(i,o);function _next(r){asyncGeneratorStep(u,a,l,_next,_throw,"next",r)}function _throw(r){asyncGeneratorStep(u,a,l,_next,_throw,"throw",r)}_next(undefined)}))}}const a=o(9439);const l=o(5876);const u=o(332),c=u.erase,h=u.cursor;const p=o(7483),d=p.style,m=p.clear,g=p.lines,y=p.figures;class TextPrompt extends l{constructor(r={}){super(r);this.transform=d.render(r.style);this.scale=this.transform.scale;this.msg=r.message;this.initial=r.initial||``;this.validator=r.validate||(()=>true);this.value=``;this.errorMsg=r.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.clear=m(``,this.out.columns);this.render()}set value(r){if(!r&&this.initial){this.placeholder=true;this.rendered=a.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(r)}this._value=r;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.fire();this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var r=this;return _asyncToGenerator((function*(){let i=yield r.validator(r.value);if(typeof i===`string`){r.errorMsg=i;i=false}r.error=!i}))()}submit(){var r=this;return _asyncToGenerator((function*(){r.value=r.value||r.initial;r.cursorOffset=0;r.cursor=r.rendered.length;yield r.validate();if(r.error){r.red=true;r.fire();r.render();return}r.done=true;r.aborted=false;r.fire();r.render();r.out.write("\n");r.close()}))()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(r){if(this.placeholder)return;this.cursor=this.cursor+r;this.cursorOffset+=r}_(r,i){let o=this.value.slice(0,this.cursor);let a=this.value.slice(this.cursor);this.value=`${o}${r}${a}`;this.red=false;this.cursor=this.placeholder?0:o.length+1;this.render()}delete(){if(this.isCursorAtStart())return this.bell();let r=this.value.slice(0,this.cursor-1);let i=this.value.slice(this.cursor);this.value=`${r}${i}`;this.red=false;if(this.isCursorAtStart()){this.cursorOffset=0}else{this.cursorOffset++;this.moveCursor(-1)}this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let r=this.value.slice(0,this.cursor);let i=this.value.slice(this.cursor+1);this.value=`${r}${i}`;this.red=false;if(this.isCursorAtEnd()){this.cursorOffset=0}else{this.cursorOffset++}this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(h.down(g(this.outputError,this.out.columns)-1)+m(this.outputError,this.out.columns));this.out.write(m(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[d.symbol(this.done,this.aborted),a.bold(this.msg),d.delimiter(this.done),this.red?a.red(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((r,i,o)=>r+`\n${o?" ":y.pointerSmall} ${a.red().italic(i)}`),``)}this.out.write(c.line+h.to(0)+this.outputText+h.save+this.outputError+h.restore+h.move(this.cursorOffset,0))}}r.exports=TextPrompt},9692:(r,i,o)=>{"use strict";const a=o(9439);const l=o(5876);const u=o(7483),c=u.style,h=u.clear;const p=o(332),d=p.cursor,m=p.erase;class TogglePrompt extends l{constructor(r={}){super(r);this.msg=r.message;this.value=!!r.initial;this.active=r.active||"on";this.inactive=r.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(r,i){if(r===" "){this.value=!this.value}else if(r==="1"){this.value=true}else if(r==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(d.hide);else this.out.write(h(this.outputText,this.out.columns));super.render();this.outputText=[c.symbol(this.done,this.aborted),a.bold(this.msg),c.delimiter(this.done),this.value?this.inactive:a.cyan().underline(this.inactive),a.gray("/"),this.value?a.cyan().underline(this.active):this.active].join(" ");this.out.write(m.line+d.to(0)+this.outputText)}}r.exports=TogglePrompt},6598:(r,i,o)=>{"use strict";function ownKeys(r,i){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);if(i){a=a.filter((function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))}o.push.apply(o,a)}return o}function _objectSpread(r){for(var i=1;i<arguments.length;i++){var o=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(o),true).forEach((function(i){_defineProperty(r,i,o[i])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(r,Object.getOwnPropertyDescriptors(o))}else{ownKeys(Object(o)).forEach((function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(o,i))}))}}return r}function _defineProperty(r,i,o){if(i in r){Object.defineProperty(r,i,{value:o,enumerable:true,configurable:true,writable:true})}else{r[i]=o}return r}function _createForOfIteratorHelper(r,i){var o=typeof Symbol!=="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(!o){if(Array.isArray(r)||(o=_unsupportedIterableToArray(r))||i&&r&&typeof r.length==="number"){if(o)r=o;var a=0;var l=function F(){};return{s:l,n:function n(){if(a>=r.length)return{done:true};return{done:false,value:r[a++]}},e:function e(r){throw r},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u=true,c=false,h;return{s:function s(){o=o.call(r)},n:function n(){var r=o.next();u=r.done;return r},e:function e(r){c=true;h=r},f:function f(){try{if(!u&&o.return!=null)o.return()}finally{if(c)throw h}}}}function _unsupportedIterableToArray(r,i){if(!r)return;if(typeof r==="string")return _arrayLikeToArray(r,i);var o=Object.prototype.toString.call(r).slice(8,-1);if(o==="Object"&&r.constructor)o=r.constructor.name;if(o==="Map"||o==="Set")return Array.from(r);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return _arrayLikeToArray(r,i)}function _arrayLikeToArray(r,i){if(i==null||i>r.length)i=r.length;for(var o=0,a=new Array(i);o<i;o++)a[o]=r[o];return a}function asyncGeneratorStep(r,i,o,a,l,u,c){try{var h=r[u](c);var p=h.value}catch(r){o(r);return}if(h.done){i(p)}else{Promise.resolve(p).then(a,l)}}function _asyncToGenerator(r){return function(){var i=this,o=arguments;return new Promise((function(a,l){var u=r.apply(i,o);function _next(r){asyncGeneratorStep(u,a,l,_next,_throw,"next",r)}function _throw(r){asyncGeneratorStep(u,a,l,_next,_throw,"throw",r)}_next(undefined)}))}}const a=o(4591);const l=["suggest","format","onState","validate","onRender","type"];const noop=()=>{};function prompt(){return _prompt.apply(this,arguments)}function _prompt(){_prompt=_asyncToGenerator((function*(r=[],{onSubmit:i=noop,onCancel:o=noop}={}){const u={};const c=prompt._override||{};r=[].concat(r);let h,p,d,m,g,y;const v=function(){var r=_asyncToGenerator((function*(r,i,o=false){if(!o&&r.validate&&r.validate(i)!==true){return}return r.format?yield r.format(i,u):i}));return function getFormattedAnswer(i,o){return r.apply(this,arguments)}}();var b=_createForOfIteratorHelper(r),w;try{for(b.s();!(w=b.n()).done;){p=w.value;var M=p;m=M.name;g=M.type;if(typeof g==="function"){g=yield g(h,_objectSpread({},u),p);p["type"]=g}if(!g)continue;for(let r in p){if(l.includes(r))continue;let i=p[r];p[r]=typeof i==="function"?yield i(h,_objectSpread({},u),y):i}y=p;if(typeof p.message!=="string"){throw new Error("prompt message is required")}var D=p;m=D.name;g=D.type;if(a[g]===void 0){throw new Error(`prompt type (${g}) is not defined`)}if(c[p.name]!==undefined){h=yield v(p,c[p.name]);if(h!==undefined){u[m]=h;continue}}try{h=prompt._injected?getInjectedAnswer(prompt._injected,p.initial):yield a[g](p);u[m]=h=yield v(p,h,true);d=yield i(p,h,u)}catch(r){d=!(yield o(p,u))}if(d)return u}}catch(r){b.e(r)}finally{b.f()}return u}));return _prompt.apply(this,arguments)}function getInjectedAnswer(r,i){const o=r.shift();if(o instanceof Error){throw o}return o===undefined?i:o}function inject(r){prompt._injected=(prompt._injected||[]).concat(r)}function override(r){prompt._override=Object.assign({},r)}r.exports=Object.assign(prompt,{prompt:prompt,prompts:a,inject:inject,override:override})},4591:(r,i,o)=>{"use strict";const a=i;const l=o(9956);const noop=r=>r;function toPrompt(r,i,o={}){return new Promise(((a,u)=>{const c=new l[r](i);const h=o.onAbort||noop;const p=o.onSubmit||noop;const d=o.onExit||noop;c.on("state",i.onState||noop);c.on("submit",(r=>a(p(r))));c.on("exit",(r=>a(d(r))));c.on("abort",(r=>u(h(r))))}))}a.text=r=>toPrompt("TextPrompt",r);a.password=r=>{r.style="password";return a.text(r)};a.invisible=r=>{r.style="invisible";return a.text(r)};a.number=r=>toPrompt("NumberPrompt",r);a.date=r=>toPrompt("DatePrompt",r);a.confirm=r=>toPrompt("ConfirmPrompt",r);a.list=r=>{const i=r.separator||",";return toPrompt("TextPrompt",r,{onSubmit:r=>r.split(i).map((r=>r.trim()))})};a.toggle=r=>toPrompt("TogglePrompt",r);a.select=r=>toPrompt("SelectPrompt",r);a.multiselect=r=>{r.choices=[].concat(r.choices||[]);const toSelected=r=>r.filter((r=>r.selected)).map((r=>r.value));return toPrompt("MultiselectPrompt",r,{onAbort:toSelected,onSubmit:toSelected})};a.autocompleteMultiselect=r=>{r.choices=[].concat(r.choices||[]);const toSelected=r=>r.filter((r=>r.selected)).map((r=>r.value));return toPrompt("AutocompleteMultiselectPrompt",r,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(r,i)=>Promise.resolve(i.filter((i=>i.title.slice(0,r.length).toLowerCase()===r.toLowerCase())));a.autocomplete=r=>{r.suggest=r.suggest||byTitle;r.choices=[].concat(r.choices||[]);return toPrompt("AutocompletePrompt",r)}},8692:r=>{"use strict";r.exports=(r,i)=>{if(r.meta&&r.name!=="escape")return;if(r.ctrl){if(r.name==="a")return"first";if(r.name==="c")return"abort";if(r.name==="d")return"abort";if(r.name==="e")return"last";if(r.name==="g")return"reset"}if(i){if(r.name==="j")return"down";if(r.name==="k")return"up"}if(r.name==="return")return"submit";if(r.name==="enter")return"submit";if(r.name==="backspace")return"delete";if(r.name==="delete")return"deleteForward";if(r.name==="abort")return"abort";if(r.name==="escape")return"exit";if(r.name==="tab")return"next";if(r.name==="pagedown")return"nextPage";if(r.name==="pageup")return"prevPage";if(r.name==="home")return"home";if(r.name==="end")return"end";if(r.name==="up")return"up";if(r.name==="down")return"down";if(r.name==="right")return"right";if(r.name==="left")return"left";return false}},3513:(r,i,o)=>{"use strict";function _createForOfIteratorHelper(r,i){var o=typeof Symbol!=="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(!o){if(Array.isArray(r)||(o=_unsupportedIterableToArray(r))||i&&r&&typeof r.length==="number"){if(o)r=o;var a=0;var l=function F(){};return{s:l,n:function n(){if(a>=r.length)return{done:true};return{done:false,value:r[a++]}},e:function e(r){throw r},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u=true,c=false,h;return{s:function s(){o=o.call(r)},n:function n(){var r=o.next();u=r.done;return r},e:function e(r){c=true;h=r},f:function f(){try{if(!u&&o.return!=null)o.return()}finally{if(c)throw h}}}}function _unsupportedIterableToArray(r,i){if(!r)return;if(typeof r==="string")return _arrayLikeToArray(r,i);var o=Object.prototype.toString.call(r).slice(8,-1);if(o==="Object"&&r.constructor)o=r.constructor.name;if(o==="Map"||o==="Set")return Array.from(r);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return _arrayLikeToArray(r,i)}function _arrayLikeToArray(r,i){if(i==null||i>r.length)i=r.length;for(var o=0,a=new Array(i);o<i;o++)a[o]=r[o];return a}const a=o(8760);const l=o(332),u=l.erase,c=l.cursor;const width=r=>[...a(r)].length;r.exports=function(r,i){if(!i)return u.line+c.to(0);let o=0;const a=r.split(/\r?\n/);var l=_createForOfIteratorHelper(a),h;try{for(l.s();!(h=l.n()).done;){let r=h.value;o+=1+Math.floor(Math.max(width(r)-1,0)/i)}}catch(r){l.e(r)}finally{l.f()}return u.lines(o)}},393:r=>{"use strict";r.exports=(r,i,o)=>{o=o||i;let a=Math.min(i-o,r-Math.floor(o/2));if(a<0)a=0;let l=Math.min(a+o,i);return{startIndex:a,endIndex:l}}},6217:r=>{"use strict";const i={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const o={arrowUp:i.arrowUp,arrowDown:i.arrowDown,arrowLeft:i.arrowLeft,arrowRight:i.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const a=process.platform==="win32"?o:i;r.exports=a},7483:(r,i,o)=>{"use strict";r.exports={action:o(8692),clear:o(3513),style:o(5012),strip:o(8760),figures:o(6217),lines:o(1688),wrap:o(1705),entriesToDisplay:o(393)}},1688:(r,i,o)=>{"use strict";const a=o(8760);r.exports=function(r,i){let o=String(a(r)||"").split(/\r?\n/);if(!i)return o.length;return o.map((r=>Math.ceil(r.length/i))).reduce(((r,i)=>r+i))}},8760:r=>{"use strict";r.exports=r=>{const i=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const o=new RegExp(i,"g");return typeof r==="string"?r.replace(o,""):r}},5012:(r,i,o)=>{"use strict";const a=o(9439);const l=o(6217);const u=Object.freeze({password:{scale:1,render:r=>"*".repeat(r.length)},emoji:{scale:2,render:r=>"😃".repeat(r.length)},invisible:{scale:0,render:r=>""},default:{scale:1,render:r=>`${r}`}});const render=r=>u[r]||u.default;const c=Object.freeze({aborted:a.red(l.cross),done:a.green(l.tick),exited:a.yellow(l.cross),default:a.cyan("?")});const symbol=(r,i,o)=>i?c.aborted:o?c.exited:r?c.done:c.default;const delimiter=r=>a.gray(r?l.ellipsis:l.pointerSmall);const item=(r,i)=>a.gray(r?i?l.pointerSmall:"+":l.line);r.exports={styles:u,render:render,symbols:c,symbol:symbol,delimiter:delimiter,item:item}},1705:r=>{"use strict";r.exports=(r,i={})=>{const o=Number.isSafeInteger(parseInt(i.margin))?new Array(parseInt(i.margin)).fill(" ").join(""):i.margin||"";const a=i.width;return(r||"").split(/\r?\n/g).map((r=>r.split(/\s+/g).reduce(((r,i)=>{if(i.length+o.length>=a||r[r.length-1].length+i.length+1<a)r[r.length-1]+=` ${i}`;else r.push(`${o}${i}`);return r}),[o]).join("\n"))).join("\n")}},1112:(r,i,o)=>{function isNodeLT(r){r=(Array.isArray(r)?r:r.split(".")).map(Number);let i=0,o=process.versions.node.split(".").map(Number);for(;i<r.length;i++){if(o[i]>r[i])return false;if(r[i]>o[i])return true}return false}r.exports=isNodeLT("8.6.0")?o(6598):o(9590)},8994:r=>{"use strict";class DatePart{constructor({token:r,date:i,parts:o,locales:a}){this.token=r;this.date=i||new Date;this.parts=o||[this];this.locales=a||{}}up(){}down(){}next(){const r=this.parts.indexOf(this);return this.parts.find(((i,o)=>o>r&&i instanceof DatePart))}setTo(r){}prev(){let r=[].concat(this.parts).reverse();const i=r.indexOf(this);return r.find(((r,o)=>o>i&&r instanceof DatePart))}toString(){return String(this.date)}}r.exports=DatePart},5513:(r,i,o)=>{"use strict";const a=o(8994);const pos=r=>{r=r%10;return r===1?"st":r===2?"nd":r===3?"rd":"th"};class Day extends a{constructor(r={}){super(r)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(r){this.date.setDate(parseInt(r.substr(-2)))}toString(){let r=this.date.getDate();let i=this.date.getDay();return this.token==="DD"?String(r).padStart(2,"0"):this.token==="Do"?r+pos(r):this.token==="d"?i+1:this.token==="ddd"?this.locales.weekdaysShort[i]:this.token==="dddd"?this.locales.weekdays[i]:r}}r.exports=Day},9270:(r,i,o)=>{"use strict";const a=o(8994);class Hours extends a{constructor(r={}){super(r)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(r){this.date.setHours(parseInt(r.substr(-2)))}toString(){let r=this.date.getHours();if(/h/.test(this.token))r=r%12||12;return this.token.length>1?String(r).padStart(2,"0"):r}}r.exports=Hours},1190:(r,i,o)=>{"use strict";r.exports={DatePart:o(8994),Meridiem:o(8135),Day:o(5513),Hours:o(9270),Milliseconds:o(2397),Minutes:o(9246),Month:o(5763),Seconds:o(5579),Year:o(4191)}},8135:(r,i,o)=>{"use strict";const a=o(8994);class Meridiem extends a{constructor(r={}){super(r)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let r=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?r.toUpperCase():r}}r.exports=Meridiem},2397:(r,i,o)=>{"use strict";const a=o(8994);class Milliseconds extends a{constructor(r={}){super(r)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(r){this.date.setMilliseconds(parseInt(r.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}r.exports=Milliseconds},9246:(r,i,o)=>{"use strict";const a=o(8994);class Minutes extends a{constructor(r={}){super(r)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(r){this.date.setMinutes(parseInt(r.substr(-2)))}toString(){let r=this.date.getMinutes();return this.token.length>1?String(r).padStart(2,"0"):r}}r.exports=Minutes},5763:(r,i,o)=>{"use strict";const a=o(8994);class Month extends a{constructor(r={}){super(r)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(r){r=parseInt(r.substr(-2))-1;this.date.setMonth(r<0?0:r)}toString(){let r=this.date.getMonth();let i=this.token.length;return i===2?String(r+1).padStart(2,"0"):i===3?this.locales.monthsShort[r]:i===4?this.locales.months[r]:String(r+1)}}r.exports=Month},5579:(r,i,o)=>{"use strict";const a=o(8994);class Seconds extends a{constructor(r={}){super(r)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(r){this.date.setSeconds(parseInt(r.substr(-2)))}toString(){let r=this.date.getSeconds();return this.token.length>1?String(r).padStart(2,"0"):r}}r.exports=Seconds},4191:(r,i,o)=>{"use strict";const a=o(8994);class Year extends a{constructor(r={}){super(r)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(r){this.date.setFullYear(r.substr(-4))}toString(){let r=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?r.substr(-2):r}}r.exports=Year},514:(r,i,o)=>{"use strict";const a=o(9439);const l=o(9126);const{erase:u,cursor:c}=o(332);const{style:h,clear:p,figures:d,wrap:m,entriesToDisplay:g}=o(9807);const getVal=(r,i)=>r[i]&&(r[i].value||r[i].title||r[i]);const getTitle=(r,i)=>r[i]&&(r[i].title||r[i].value||r[i]);const getIndex=(r,i)=>{const o=r.findIndex((r=>r.value===i||r.title===i));return o>-1?o:undefined};class AutocompletePrompt extends l{constructor(r={}){super(r);this.msg=r.message;this.suggest=r.suggest;this.choices=r.choices;this.initial=typeof r.initial==="number"?r.initial:getIndex(r.choices,r.initial);this.select=this.initial||r.cursor||0;this.i18n={noMatches:r.noMatches||"no matches found"};this.fallback=r.fallback||this.initial;this.clearFirst=r.clearFirst||false;this.suggestions=[];this.input="";this.limit=r.limit||10;this.cursor=0;this.transform=h.render(r.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=p("",this.out.columns);this.complete(this.render);this.render()}set fallback(r){this._fb=Number.isSafeInteger(parseInt(r))?parseInt(r):r}get fallback(){let r;if(typeof this._fb==="number")r=this.choices[this._fb];else if(typeof this._fb==="string")r={title:this._fb};return r||this._fb||{title:this.i18n.noMatches}}moveSelect(r){this.select=r;if(this.suggestions.length>0)this.value=getVal(this.suggestions,r);else this.value=this.fallback.value;this.fire()}async complete(r){const i=this.completing=this.suggest(this.input,this.choices);const o=await i;if(this.completing!==i)return;this.suggestions=o.map(((r,i,o)=>({title:getTitle(o,i),value:getVal(o,i),description:r.description})));this.completing=false;const a=Math.max(o.length-1,0);this.moveSelect(Math.min(a,this.select));r&&r()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}exit(){if(this.clearFirst&&this.input.length>0){this.reset()}else{this.done=this.exited=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}abort(){this.done=this.aborted=true;this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}_(r,i){let o=this.input.slice(0,this.cursor);let a=this.input.slice(this.cursor);this.input=`${o}${r}${a}`;this.cursor=o.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let r=this.input.slice(0,this.cursor-1);let i=this.input.slice(this.cursor);this.input=`${r}${i}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let r=this.input.slice(0,this.cursor);let i=this.input.slice(this.cursor+1);this.input=`${r}${i}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions.length-1);this.render()}up(){if(this.select===0){this.moveSelect(this.suggestions.length-1)}else{this.moveSelect(this.select-1)}this.render()}down(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else{this.moveSelect(this.select+1)}this.render()}next(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1));this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0));this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}renderOption(r,i,o,l){let u;let c=o?d.arrowUp:l?d.arrowDown:" ";let h=i?a.cyan().underline(r.title):r.title;c=(i?a.cyan(d.pointer)+" ":" ")+c;if(r.description){u=` - ${r.description}`;if(c.length+h.length+u.length>=this.out.columns||r.description.split(/\r?\n/).length>1){u="\n"+m(r.description,{margin:3,width:this.out.columns})}}return c+" "+h+a.gray(u||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(c.hide);else this.out.write(p(this.outputText,this.out.columns));super.render();let{startIndex:r,endIndex:i}=g(this.select,this.choices.length,this.limit);this.outputText=[h.symbol(this.done,this.aborted,this.exited),a.bold(this.msg),h.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" ");if(!this.done){const o=this.suggestions.slice(r,i).map(((o,a)=>this.renderOption(o,this.select===a+r,a===0&&r>0,a+r===i-1&&i<this.choices.length))).join("\n");this.outputText+=`\n`+(o||a.gray(this.fallback.title))}this.out.write(u.line+c.to(0)+this.outputText)}}r.exports=AutocompletePrompt},7685:(r,i,o)=>{"use strict";const a=o(9439);const{cursor:l}=o(332);const u=o(92);const{clear:c,style:h,figures:p}=o(9807);class AutocompleteMultiselectPrompt extends u{constructor(r={}){r.overrideRender=true;super(r);this.inputValue="";this.clear=c("",this.out.columns);this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((r=>r.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const r=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((r=>{if(this.inputValue){if(typeof r.title==="string"){if(r.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof r.value==="string"){if(r.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const i=this.filteredOptions.findIndex((i=>i===r));this.cursor=i<0?0:i;this.render()}handleSpaceToggle(){const r=this.filteredOptions[this.cursor];if(r.selected){r.selected=false;this.render()}else if(r.disabled||this.value.filter((r=>r.selected)).length>=this.maxChoices){return this.bell()}else{r.selected=true;this.render()}}handleInputChange(r){this.inputValue=this.inputValue+r;this.updateFilteredOptions()}_(r,i){if(r===" "){this.handleSpaceToggle()}else{this.handleInputChange(r)}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return`\nInstructions:\n ${p.arrowUp}/${p.arrowDown}: Highlight option\n ${p.arrowLeft}/${p.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`}return""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:a.gray("Enter something to filter")}\n`}renderOption(r,i,o){let l;if(i.disabled)l=r===o?a.gray().underline(i.title):a.strikethrough().gray(i.title);else l=r===o?a.cyan().underline(i.title):i.title;return(i.selected?a.green(p.radioOn):p.radioOff)+" "+l}renderDoneOrInstructions(){if(this.done){return this.value.filter((r=>r.selected)).map((r=>r.title)).join(", ")}const r=[a.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){r.push(a.yellow(this.warn))}return r.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(l.hide);super.render();let r=[h.symbol(this.done,this.aborted),a.bold(this.msg),h.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){r+=a.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}r+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+r);this.clear=c(r,this.out.columns)}}r.exports=AutocompleteMultiselectPrompt},3037:(r,i,o)=>{const a=o(9439);const l=o(9126);const{style:u,clear:c}=o(9807);const{erase:h,cursor:p}=o(332);class ConfirmPrompt extends l{constructor(r={}){super(r);this.msg=r.message;this.value=r.initial;this.initialValue=!!r.initial;this.yesMsg=r.yes||"yes";this.yesOption=r.yesOption||"(Y/n)";this.noMsg=r.no||"no";this.noOption=r.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(r,i){if(r.toLowerCase()==="y"){this.value=true;return this.submit()}if(r.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(p.hide);else this.out.write(c(this.outputText,this.out.columns));super.render();this.outputText=[u.symbol(this.done,this.aborted),a.bold(this.msg),u.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:a.gray(this.initialValue?this.yesOption:this.noOption)].join(" ");this.out.write(h.line+p.to(0)+this.outputText)}}r.exports=ConfirmPrompt},5048:(r,i,o)=>{"use strict";const a=o(9439);const l=o(9126);const{style:u,clear:c,figures:h}=o(9807);const{erase:p,cursor:d}=o(332);const{DatePart:m,Meridiem:g,Day:y,Hours:v,Milliseconds:b,Minutes:w,Month:M,Seconds:D,Year:T}=o(1190);const x=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const O={1:({token:r})=>r.replace(/\\(.)/g,"$1"),2:r=>new y(r),3:r=>new M(r),4:r=>new T(r),5:r=>new g(r),6:r=>new v(r),7:r=>new w(r),8:r=>new D(r),9:r=>new b(r)};const N={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends l{constructor(r={}){super(r);this.msg=r.message;this.cursor=0;this.typed="";this.locales=Object.assign(N,r.locales);this._date=r.initial||new Date;this.errorMsg=r.error||"Please Enter A Valid Value";this.validator=r.validate||(()=>true);this.mask=r.mask||"YYYY-MM-DD HH:mm:ss";this.clear=c("",this.out.columns);this.render()}get value(){return this.date}get date(){return this._date}set date(r){if(r)this._date.setTime(r.getTime())}set mask(r){let i;this.parts=[];while(i=x.exec(r)){let r=i.shift();let o=i.findIndex((r=>r!=null));this.parts.push(o in O?O[o]({token:i[o]||r,date:this.date,parts:this.parts,locales:this.locales}):i[o]||r)}let o=this.parts.reduce(((r,i)=>{if(typeof i==="string"&&typeof r[r.length-1]==="string")r[r.length-1]+=i;else r.push(i);return r}),[]);this.parts.splice(0);this.parts.push(...o);this.reset()}moveCursor(r){this.typed="";this.cursor=r;this.fire()}reset(){this.moveCursor(this.parts.findIndex((r=>r instanceof m)));this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let r=await this.validator(this.value);if(typeof r==="string"){this.errorMsg=r;r=false}this.error=!r}async submit(){await this.validate();if(this.error){this.color="red";this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let r=this.parts[this.cursor].prev();if(r==null)return this.bell();this.moveCursor(this.parts.indexOf(r));this.render()}right(){let r=this.parts[this.cursor].next();if(r==null)return this.bell();this.moveCursor(this.parts.indexOf(r));this.render()}next(){let r=this.parts[this.cursor].next();this.moveCursor(r?this.parts.indexOf(r):this.parts.findIndex((r=>r instanceof m)));this.render()}_(r){if(/\d/.test(r)){this.typed+=r;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(d.hide);else this.out.write(c(this.outputText,this.out.columns));super.render();this.outputText=[u.symbol(this.done,this.aborted),a.bold(this.msg),u.delimiter(false),this.parts.reduce(((r,i,o)=>r.concat(o===this.cursor&&!this.done?a.cyan().underline(i.toString()):i)),[]).join("")].join(" ");if(this.error){this.outputText+=this.errorMsg.split("\n").reduce(((r,i,o)=>r+`\n${o?` `:h.pointerSmall} ${a.red().italic(i)}`),``)}this.out.write(p.line+d.to(0)+this.outputText)}}r.exports=DatePrompt},6529:(r,i,o)=>{"use strict";r.exports={TextPrompt:o(1551),SelectPrompt:o(6515),TogglePrompt:o(181),DatePrompt:o(5048),NumberPrompt:o(3686),MultiselectPrompt:o(92),AutocompletePrompt:o(514),AutocompleteMultiselectPrompt:o(7685),ConfirmPrompt:o(3037)}},92:(r,i,o)=>{"use strict";const a=o(9439);const{cursor:l}=o(332);const u=o(9126);const{clear:c,figures:h,style:p,wrap:d,entriesToDisplay:m}=o(9807);class MultiselectPrompt extends u{constructor(r={}){super(r);this.msg=r.message;this.cursor=r.cursor||0;this.scrollIndex=r.cursor||0;this.hint=r.hint||"";this.warn=r.warn||"- This option is disabled -";this.minSelected=r.min;this.showMinError=false;this.maxChoices=r.max;this.instructions=r.instructions;this.optionsPerPage=r.optionsPerPage||10;this.value=r.choices.map(((r,i)=>{if(typeof r==="string")r={title:r,value:i};return{title:r&&(r.title||r.value||r),description:r&&r.description,value:r&&(r.value===undefined?i:r.value),selected:r&&r.selected,disabled:r&&r.disabled}}));this.clear=c("",this.out.columns);if(!r.overrideRender){this.render()}}reset(){this.value.map((r=>!r.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((r=>r.selected))}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const r=this.value.filter((r=>r.selected));if(this.minSelected&&r.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((r=>r.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const r=this.value[this.cursor];if(r.selected){r.selected=false;this.render()}else if(r.disabled||this.value.filter((r=>r.selected)).length>=this.maxChoices){return this.bell()}else{r.selected=true;this.render()}}toggleAll(){if(this.maxChoices!==undefined||this.value[this.cursor].disabled){return this.bell()}const r=!this.value[this.cursor].selected;this.value.filter((r=>!r.disabled)).forEach((i=>i.selected=r));this.render()}_(r,i){if(r===" "){this.handleSpaceToggle()}else if(r==="a"){this.toggleAll()}else{return this.bell()}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return"\nInstructions:\n"+` ${h.arrowUp}/${h.arrowDown}: Highlight option\n`+` ${h.arrowLeft}/${h.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===undefined?` a: Toggle all\n`:"")+` enter/return: Complete answer`}return""}renderOption(r,i,o,l){const u=(i.selected?a.green(h.radioOn):h.radioOff)+" "+l+" ";let c,p;if(i.disabled){c=r===o?a.gray().underline(i.title):a.strikethrough().gray(i.title)}else{c=r===o?a.cyan().underline(i.title):i.title;if(r===o&&i.description){p=` - ${i.description}`;if(u.length+c.length+p.length>=this.out.columns||i.description.split(/\r?\n/).length>1){p="\n"+d(i.description,{margin:u.length,width:this.out.columns})}}}return u+c+a.gray(p||"")}paginateOptions(r){if(r.length===0){return a.red("No matches for this query.")}let{startIndex:i,endIndex:o}=m(this.cursor,r.length,this.optionsPerPage);let l,u=[];for(let a=i;a<o;a++){if(a===i&&i>0){l=h.arrowUp}else if(a===o-1&&o<r.length){l=h.arrowDown}else{l=" "}u.push(this.renderOption(this.cursor,r[a],a,l))}return"\n"+u.join("\n")}renderOptions(r){if(!this.done){return this.paginateOptions(r)}return""}renderDoneOrInstructions(){if(this.done){return this.value.filter((r=>r.selected)).map((r=>r.title)).join(", ")}const r=[a.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){r.push(a.yellow(this.warn))}return r.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(l.hide);super.render();let r=[p.symbol(this.done,this.aborted),a.bold(this.msg),p.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){r+=a.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}r+=this.renderOptions(this.value);this.out.write(this.clear+r);this.clear=c(r,this.out.columns)}}r.exports=MultiselectPrompt},3686:(r,i,o)=>{const a=o(9439);const l=o(9126);const{cursor:u,erase:c}=o(332);const{style:h,figures:p,clear:d,lines:m}=o(9807);const g=/[0-9]/;const isDef=r=>r!==undefined;const round=(r,i)=>{let o=Math.pow(10,i);return Math.round(r*o)/o};class NumberPrompt extends l{constructor(r={}){super(r);this.transform=h.render(r.style);this.msg=r.message;this.initial=isDef(r.initial)?r.initial:"";this.float=!!r.float;this.round=r.round||2;this.inc=r.increment||1;this.min=isDef(r.min)?r.min:-Infinity;this.max=isDef(r.max)?r.max:Infinity;this.errorMsg=r.error||`Please Enter A Valid Value`;this.validator=r.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(r){if(!r&&r!==0){this.placeholder=true;this.rendered=a.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(r,this.round)}`);this._value=round(r,this.round)}this.fire()}get value(){return this._value}parse(r){return this.float?parseFloat(r):parseInt(r)}valid(r){return r===`-`||r===`.`&&this.float||g.test(r)}reset(){this.typed=``;this.value=``;this.fire();this.render()}exit(){this.abort()}abort(){let r=this.value;this.value=r!==``?r:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}async validate(){let r=await this.validator(this.value);if(typeof r===`string`){this.errorMsg=r;r=false}this.error=!r}async submit(){await this.validate();if(this.error){this.color=`red`;this.fire();this.render();return}let r=this.value;this.value=r!==``?r:this.initial;this.done=true;this.aborted=false;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}up(){this.typed=``;if(this.value===""){this.value=this.min-this.inc}if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value===""){this.value=this.min+this.inc}if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let r=this.value.toString();if(r.length===0)return this.bell();this.value=this.parse(r=r.slice(0,-1))||``;if(this.value!==""&&this.value<this.min){this.value=this.min}this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(r,i){if(!this.valid(r))return this.bell();const o=Date.now();if(o-this.lastHit>1e3)this.typed=``;this.typed+=r;this.lastHit=o;this.color=`cyan`;if(r===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(u.down(m(this.outputError,this.out.columns)-1)+d(this.outputError,this.out.columns));this.out.write(d(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[h.symbol(this.done,this.aborted),a.bold(this.msg),h.delimiter(this.done),!this.done||!this.done&&!this.placeholder?a[this.color]().underline(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((r,i,o)=>r+`\n${o?` `:p.pointerSmall} ${a.red().italic(i)}`),``)}this.out.write(c.line+u.to(0)+this.outputText+u.save+this.outputError+u.restore)}}r.exports=NumberPrompt},9126:(r,i,o)=>{"use strict";const a=o(4521);const{action:l}=o(9807);const u=o(2361);const{beep:c,cursor:h}=o(332);const p=o(9439);class Prompt extends u{constructor(r={}){super();this.firstRender=true;this.in=r.stdin||process.stdin;this.out=r.stdout||process.stdout;this.onRender=(r.onRender||(()=>void 0)).bind(this);const i=a.createInterface({input:this.in,escapeCodeTimeout:50});a.emitKeypressEvents(this.in,i);if(this.in.isTTY)this.in.setRawMode(true);const o=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1;const keypress=(r,i)=>{let a=l(i,o);if(a===false){this._&&this._(r,i)}else if(typeof this[a]==="function"){this[a](i)}else{this.bell()}};this.close=()=>{this.out.write(h.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);i.close();this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(c)}render(){this.onRender(p);if(this.firstRender)this.firstRender=false}}r.exports=Prompt},6515:(r,i,o)=>{"use strict";const a=o(9439);const l=o(9126);const{style:u,clear:c,figures:h,wrap:p,entriesToDisplay:d}=o(9807);const{cursor:m}=o(332);class SelectPrompt extends l{constructor(r={}){super(r);this.msg=r.message;this.hint=r.hint||"- Use arrow-keys. Return to submit.";this.warn=r.warn||"- This option is disabled";this.cursor=r.initial||0;this.choices=r.choices.map(((r,i)=>{if(typeof r==="string")r={title:r,value:i};return{title:r&&(r.title||r.value||r),value:r&&(r.value===undefined?i:r.value),description:r&&r.description,selected:r&&r.selected,disabled:r&&r.disabled}}));this.optionsPerPage=r.optionsPerPage||10;this.value=(this.choices[this.cursor]||{}).value;this.clear=c("",this.out.columns);this.render()}moveCursor(r){this.cursor=r;this.value=this.choices[r].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0){this.moveCursor(this.choices.length-1)}else{this.moveCursor(this.cursor-1)}this.render()}down(){if(this.cursor===this.choices.length-1){this.moveCursor(0)}else{this.moveCursor(this.cursor+1)}this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(r,i){if(r===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(m.hide);else this.out.write(c(this.outputText,this.out.columns));super.render();let{startIndex:r,endIndex:i}=d(this.cursor,this.choices.length,this.optionsPerPage);this.outputText=[u.symbol(this.done,this.aborted),a.bold(this.msg),u.delimiter(false),this.done?this.selection.title:this.selection.disabled?a.yellow(this.warn):a.gray(this.hint)].join(" ");if(!this.done){this.outputText+="\n";for(let o=r;o<i;o++){let l,u,c="",d=this.choices[o];if(o===r&&r>0){u=h.arrowUp}else if(o===i-1&&i<this.choices.length){u=h.arrowDown}else{u=" "}if(d.disabled){l=this.cursor===o?a.gray().underline(d.title):a.strikethrough().gray(d.title);u=(this.cursor===o?a.bold().gray(h.pointer)+" ":" ")+u}else{l=this.cursor===o?a.cyan().underline(d.title):d.title;u=(this.cursor===o?a.cyan(h.pointer)+" ":" ")+u;if(d.description&&this.cursor===o){c=` - ${d.description}`;if(u.length+l.length+c.length>=this.out.columns||d.description.split(/\r?\n/).length>1){c="\n"+p(d.description,{margin:3,width:this.out.columns})}}}this.outputText+=`${u} ${l}${a.gray(c)}\n`}}this.out.write(this.outputText)}}r.exports=SelectPrompt},1551:(r,i,o)=>{const a=o(9439);const l=o(9126);const{erase:u,cursor:c}=o(332);const{style:h,clear:p,lines:d,figures:m}=o(9807);class TextPrompt extends l{constructor(r={}){super(r);this.transform=h.render(r.style);this.scale=this.transform.scale;this.msg=r.message;this.initial=r.initial||``;this.validator=r.validate||(()=>true);this.value=``;this.errorMsg=r.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.clear=p(``,this.out.columns);this.render()}set value(r){if(!r&&this.initial){this.placeholder=true;this.rendered=a.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(r)}this._value=r;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.fire();this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let r=await this.validator(this.value);if(typeof r===`string`){this.errorMsg=r;r=false}this.error=!r}async submit(){this.value=this.value||this.initial;this.cursorOffset=0;this.cursor=this.rendered.length;await this.validate();if(this.error){this.red=true;this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(r){if(this.placeholder)return;this.cursor=this.cursor+r;this.cursorOffset+=r}_(r,i){let o=this.value.slice(0,this.cursor);let a=this.value.slice(this.cursor);this.value=`${o}${r}${a}`;this.red=false;this.cursor=this.placeholder?0:o.length+1;this.render()}delete(){if(this.isCursorAtStart())return this.bell();let r=this.value.slice(0,this.cursor-1);let i=this.value.slice(this.cursor);this.value=`${r}${i}`;this.red=false;if(this.isCursorAtStart()){this.cursorOffset=0}else{this.cursorOffset++;this.moveCursor(-1)}this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let r=this.value.slice(0,this.cursor);let i=this.value.slice(this.cursor+1);this.value=`${r}${i}`;this.red=false;if(this.isCursorAtEnd()){this.cursorOffset=0}else{this.cursorOffset++}this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(c.down(d(this.outputError,this.out.columns)-1)+p(this.outputError,this.out.columns));this.out.write(p(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[h.symbol(this.done,this.aborted),a.bold(this.msg),h.delimiter(this.done),this.red?a.red(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((r,i,o)=>r+`\n${o?" ":m.pointerSmall} ${a.red().italic(i)}`),``)}this.out.write(u.line+c.to(0)+this.outputText+c.save+this.outputError+c.restore+c.move(this.cursorOffset,0))}}r.exports=TextPrompt},181:(r,i,o)=>{const a=o(9439);const l=o(9126);const{style:u,clear:c}=o(9807);const{cursor:h,erase:p}=o(332);class TogglePrompt extends l{constructor(r={}){super(r);this.msg=r.message;this.value=!!r.initial;this.active=r.active||"on";this.inactive=r.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(r,i){if(r===" "){this.value=!this.value}else if(r==="1"){this.value=true}else if(r==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(h.hide);else this.out.write(c(this.outputText,this.out.columns));super.render();this.outputText=[u.symbol(this.done,this.aborted),a.bold(this.msg),u.delimiter(this.done),this.value?this.inactive:a.cyan().underline(this.inactive),a.gray("/"),this.value?a.cyan().underline(this.active):this.active].join(" ");this.out.write(p.line+h.to(0)+this.outputText)}}r.exports=TogglePrompt},9590:(r,i,o)=>{"use strict";const a=o(4450);const l=["suggest","format","onState","validate","onRender","type"];const noop=()=>{};async function prompt(r=[],{onSubmit:i=noop,onCancel:o=noop}={}){const u={};const c=prompt._override||{};r=[].concat(r);let h,p,d,m,g,y;const getFormattedAnswer=async(r,i,o=false)=>{if(!o&&r.validate&&r.validate(i)!==true){return}return r.format?await r.format(i,u):i};for(p of r){({name:m,type:g}=p);if(typeof g==="function"){g=await g(h,{...u},p);p["type"]=g}if(!g)continue;for(let r in p){if(l.includes(r))continue;let i=p[r];p[r]=typeof i==="function"?await i(h,{...u},y):i}y=p;if(typeof p.message!=="string"){throw new Error("prompt message is required")}({name:m,type:g}=p);if(a[g]===void 0){throw new Error(`prompt type (${g}) is not defined`)}if(c[p.name]!==undefined){h=await getFormattedAnswer(p,c[p.name]);if(h!==undefined){u[m]=h;continue}}try{h=prompt._injected?getInjectedAnswer(prompt._injected,p.initial):await a[g](p);u[m]=h=await getFormattedAnswer(p,h,true);d=await i(p,h,u)}catch(r){d=!await o(p,u)}if(d)return u}return u}function getInjectedAnswer(r,i){const o=r.shift();if(o instanceof Error){throw o}return o===undefined?i:o}function inject(r){prompt._injected=(prompt._injected||[]).concat(r)}function override(r){prompt._override=Object.assign({},r)}r.exports=Object.assign(prompt,{prompt:prompt,prompts:a,inject:inject,override:override})},4450:(r,i,o)=>{"use strict";const a=i;const l=o(6529);const noop=r=>r;function toPrompt(r,i,o={}){return new Promise(((a,u)=>{const c=new l[r](i);const h=o.onAbort||noop;const p=o.onSubmit||noop;const d=o.onExit||noop;c.on("state",i.onState||noop);c.on("submit",(r=>a(p(r))));c.on("exit",(r=>a(d(r))));c.on("abort",(r=>u(h(r))))}))}a.text=r=>toPrompt("TextPrompt",r);a.password=r=>{r.style="password";return a.text(r)};a.invisible=r=>{r.style="invisible";return a.text(r)};a.number=r=>toPrompt("NumberPrompt",r);a.date=r=>toPrompt("DatePrompt",r);a.confirm=r=>toPrompt("ConfirmPrompt",r);a.list=r=>{const i=r.separator||",";return toPrompt("TextPrompt",r,{onSubmit:r=>r.split(i).map((r=>r.trim()))})};a.toggle=r=>toPrompt("TogglePrompt",r);a.select=r=>toPrompt("SelectPrompt",r);a.multiselect=r=>{r.choices=[].concat(r.choices||[]);const toSelected=r=>r.filter((r=>r.selected)).map((r=>r.value));return toPrompt("MultiselectPrompt",r,{onAbort:toSelected,onSubmit:toSelected})};a.autocompleteMultiselect=r=>{r.choices=[].concat(r.choices||[]);const toSelected=r=>r.filter((r=>r.selected)).map((r=>r.value));return toPrompt("AutocompleteMultiselectPrompt",r,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(r,i)=>Promise.resolve(i.filter((i=>i.title.slice(0,r.length).toLowerCase()===r.toLowerCase())));a.autocomplete=r=>{r.suggest=r.suggest||byTitle;r.choices=[].concat(r.choices||[]);return toPrompt("AutocompletePrompt",r)}},8573:r=>{"use strict";r.exports=(r,i)=>{if(r.meta&&r.name!=="escape")return;if(r.ctrl){if(r.name==="a")return"first";if(r.name==="c")return"abort";if(r.name==="d")return"abort";if(r.name==="e")return"last";if(r.name==="g")return"reset"}if(i){if(r.name==="j")return"down";if(r.name==="k")return"up"}if(r.name==="return")return"submit";if(r.name==="enter")return"submit";if(r.name==="backspace")return"delete";if(r.name==="delete")return"deleteForward";if(r.name==="abort")return"abort";if(r.name==="escape")return"exit";if(r.name==="tab")return"next";if(r.name==="pagedown")return"nextPage";if(r.name==="pageup")return"prevPage";if(r.name==="home")return"home";if(r.name==="end")return"end";if(r.name==="up")return"up";if(r.name==="down")return"down";if(r.name==="right")return"right";if(r.name==="left")return"left";return false}},6747:(r,i,o)=>{"use strict";const a=o(2714);const{erase:l,cursor:u}=o(332);const width=r=>[...a(r)].length;r.exports=function(r,i){if(!i)return l.line+u.to(0);let o=0;const a=r.split(/\r?\n/);for(let r of a){o+=1+Math.floor(Math.max(width(r)-1,0)/i)}return l.lines(o)}},3297:r=>{"use strict";r.exports=(r,i,o)=>{o=o||i;let a=Math.min(i-o,r-Math.floor(o/2));if(a<0)a=0;let l=Math.min(a+o,i);return{startIndex:a,endIndex:l}}},3034:r=>{"use strict";const i={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const o={arrowUp:i.arrowUp,arrowDown:i.arrowDown,arrowLeft:i.arrowLeft,arrowRight:i.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const a=process.platform==="win32"?o:i;r.exports=a},9807:(r,i,o)=>{"use strict";r.exports={action:o(8573),clear:o(6747),style:o(7357),strip:o(2714),figures:o(3034),lines:o(4413),wrap:o(2492),entriesToDisplay:o(3297)}},4413:(r,i,o)=>{"use strict";const a=o(2714);r.exports=function(r,i){let o=String(a(r)||"").split(/\r?\n/);if(!i)return o.length;return o.map((r=>Math.ceil(r.length/i))).reduce(((r,i)=>r+i))}},2714:r=>{"use strict";r.exports=r=>{const i=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const o=new RegExp(i,"g");return typeof r==="string"?r.replace(o,""):r}},7357:(r,i,o)=>{"use strict";const a=o(9439);const l=o(3034);const u=Object.freeze({password:{scale:1,render:r=>"*".repeat(r.length)},emoji:{scale:2,render:r=>"😃".repeat(r.length)},invisible:{scale:0,render:r=>""},default:{scale:1,render:r=>`${r}`}});const render=r=>u[r]||u.default;const c=Object.freeze({aborted:a.red(l.cross),done:a.green(l.tick),exited:a.yellow(l.cross),default:a.cyan("?")});const symbol=(r,i,o)=>i?c.aborted:o?c.exited:r?c.done:c.default;const delimiter=r=>a.gray(r?l.ellipsis:l.pointerSmall);const item=(r,i)=>a.gray(r?i?l.pointerSmall:"+":l.line);r.exports={styles:u,render:render,symbols:c,symbol:symbol,delimiter:delimiter,item:item}},2492:r=>{"use strict";r.exports=(r,i={})=>{const o=Number.isSafeInteger(parseInt(i.margin))?new Array(parseInt(i.margin)).fill(" ").join(""):i.margin||"";const a=i.width;return(r||"").split(/\r?\n/g).map((r=>r.split(/\s+/g).reduce(((r,i)=>{if(i.length+o.length>=a||r[r.length-1].length+i.length+1<a)r[r.length-1]+=` ${i}`;else r.push(`${o}${i}`);return r}),[o]).join("\n"))).join("\n")}},8271:(r,i,o)=>{var a=o(7563);var l=o(1017).join;var u=o(5134);var c="/etc";var h=process.platform==="win32";var p=h?process.env.USERPROFILE:process.env.HOME;r.exports=function(r,i,d,m){if("string"!==typeof r)throw new Error("rc(name): name *must* be string");if(!d)d=o(5912)(process.argv.slice(2));i=("string"===typeof i?a.json(i):i)||{};m=m||a.parse;var g=a.env(r+"_");var y=[i];var v=[];function addConfigFile(r){if(v.indexOf(r)>=0)return;var i=a.file(r);if(i){y.push(m(i));v.push(r)}}if(!h)[l(c,r,"config"),l(c,r+"rc")].forEach(addConfigFile);if(p)[l(p,".config",r,"config"),l(p,".config",r),l(p,"."+r,"config"),l(p,"."+r+"rc")].forEach(addConfigFile);addConfigFile(a.find("."+r+"rc"));if(g.config)addConfigFile(g.config);if(d.config)addConfigFile(d.config);return u.apply(null,y.concat([g,d,v.length?{configs:v,config:v[v.length-1]}:undefined]))}},7563:(r,i,o)=>{"use strict";var a=o(7147);var l=o(1923);var u=o(1017);var c=o(6397);var h=i.parse=function(r){if(/^\s*{/.test(r))return JSON.parse(c(r));return l.parse(r)};var p=i.file=function(){var r=[].slice.call(arguments).filter((function(r){return r!=null}));for(var i in r)if("string"!==typeof r[i])return;var o=u.join.apply(null,r);var l;try{return a.readFileSync(o,"utf-8")}catch(r){return}};var d=i.json=function(){var r=p.apply(null,arguments);return r?h(r):null};var m=i.env=function(r,i){i=i||process.env;var o={};var a=r.length;for(var l in i){if(l.toLowerCase().indexOf(r.toLowerCase())===0){var u=l.substring(a).split("__");var c;while((c=u.indexOf(""))>-1){u.splice(c,1)}var h=o;u.forEach((function _buildSubObj(r,o){if(!r||typeof h!=="object")return;if(o===u.length-1)h[r]=i[l];if(h[r]===undefined)h[r]={};h=h[r]}))}}return o};var g=i.find=function(){var r=u.join.apply(null,[].slice.call(arguments));function find(r,i){var o=u.join(r,i);try{a.statSync(o);return o}catch(o){if(u.dirname(r)!==r)return find(u.dirname(r),i)}}return find(process.cwd(),r)}},6397:r=>{"use strict";var i=1;var o=2;function stripWithoutWhitespace(){return""}function stripWithWhitespace(r,i,o){return r.slice(i,o).replace(/\S/g," ")}r.exports=function(r,a){a=a||{};var l;var u;var c=false;var h=false;var p=0;var d="";var m=a.whitespace===false?stripWithoutWhitespace:stripWithWhitespace;for(var g=0;g<r.length;g++){l=r[g];u=r[g+1];if(!h&&l==='"'){var y=r[g-1]==="\\"&&r[g-2]!=="\\";if(!y){c=!c}}if(c){continue}if(!h&&l+u==="//"){d+=r.slice(p,g);p=g;h=i;g++}else if(h===i&&l+u==="\r\n"){g++;h=false;d+=m(r,p,g);p=g;continue}else if(h===i&&l==="\n"){h=false;d+=m(r,p,g);p=g}else if(!h&&l+u==="/*"){d+=r.slice(p,g);p=g;h=o;g++;continue}else if(h===o&&l+u==="*/"){g++;h=false;d+=m(r,p,g+1);p=g+1;continue}}return d+(h?m(r.substr(p)):r.substr(p))}},4955:(r,i,o)=>{const a=o(3118).Buffer;function decodeBase64(r){return a.from(r,"base64").toString("utf8")}function encodeBase64(r){return a.from(r,"utf8").toString("base64")}r.exports={decodeBase64:decodeBase64,encodeBase64:encodeBase64}},1384:(r,i,o)=>{var a=o(7310);var l=o(4955);var u=l.decodeBase64;var c=l.encodeBase64;var h=":_authToken";var p=":username";var d=":_password";r.exports=function(){var r;var i;if(arguments.length>=2){r=arguments[0];i=arguments[1]}else if(typeof arguments[0]==="string"){r=arguments[0]}else{i=arguments[0]}i=i||{};i.npmrc=i.npmrc||o(8271)("npm",{registry:"https://registry.npmjs.org/"});r=r||i.npmrc.registry;return getRegistryAuthInfo(r,i)||getLegacyAuthInfo(i.npmrc)};function getRegistryAuthInfo(r,i){var o=a.parse(r,false,true);var l;while(l!=="/"&&o.pathname!==l){l=o.pathname||"/";var u="//"+o.host+l.replace(/\/$/,"");var c=getAuthInfoForUrl(u,i.npmrc);if(c){return c}if(!i.recursive){return/\/$/.test(r)?undefined:getRegistryAuthInfo(a.resolve(r,"."),i)}o.pathname=a.resolve(normalizePath(l),"..")||"/"}return undefined}function getLegacyAuthInfo(r){if(r._auth){return{token:r._auth,type:"Basic"}}return undefined}function normalizePath(r){return r[r.length-1]==="/"?r:r+"/"}function getAuthInfoForUrl(r,i){var o=getBearerToken(i[r+h]||i[r+"/"+h]);if(o){return o}var a=i[r+p]||i[r+"/"+p];var l=i[r+d]||i[r+"/"+d];var u=getTokenForUsernameAndPassword(a,l);if(u){return u}return undefined}function getBearerToken(r){if(!r){return undefined}var i=r.replace(/^\$\{?([^}]*)\}?$/,(function(r,i){return process.env[i]}));return{token:i,type:"Bearer"}}function getTokenForUsernameAndPassword(r,i){if(!r||!i){return undefined}var o=u(i.replace(/^\$\{?([^}]*)\}?$/,(function(r,i){return process.env[i]})));var a=c(r+":"+o);return{token:a,type:"Basic",password:o,username:r}}},2447:(r,i,o)=>{"use strict";r.exports=function(r){var i=o(8271)("npm",{registry:"https://registry.npmjs.org/"});var a=i[r+":registry"]||i.registry;return a.slice(-1)==="/"?a:a+"/"}},3118:(r,i,o)=>{
27
+ */function isSpecificValue(r){return r instanceof Buffer||r instanceof Date||r instanceof RegExp?true:false}function cloneSpecificValue(r){if(r instanceof Buffer){var i=Buffer.alloc?Buffer.alloc(r.length):new Buffer(r.length);r.copy(i);return i}else if(r instanceof Date){return new Date(r.getTime())}else if(r instanceof RegExp){return new RegExp(r)}else{throw new Error("Unexpected situation")}}function deepCloneArray(r){var o=[];r.forEach((function(r,a){if(typeof r==="object"&&r!==null){if(Array.isArray(r)){o[a]=deepCloneArray(r)}else if(isSpecificValue(r)){o[a]=cloneSpecificValue(r)}else{o[a]=i({},r)}}else{o[a]=r}}));return o}function safeGetProperty(r,i){return i==="__proto__"?undefined:r[i]}var i=r.exports=function(){if(arguments.length<1||typeof arguments[0]!=="object"){return false}if(arguments.length<2){return arguments[0]}var r=arguments[0];var o=Array.prototype.slice.call(arguments,1);var a,l,u;o.forEach((function(o){if(typeof o!=="object"||o===null||Array.isArray(o)){return}Object.keys(o).forEach((function(u){l=safeGetProperty(r,u);a=safeGetProperty(o,u);if(a===r){return}else if(typeof a!=="object"||a===null){r[u]=a;return}else if(Array.isArray(a)){r[u]=deepCloneArray(a);return}else if(isSpecificValue(a)){r[u]=cloneSpecificValue(a);return}else if(typeof l!=="object"||l===null||Array.isArray(l)){r[u]=i({},a);return}else{r[u]=i(l,a);return}}))}));return r}},8945:(r,i,o)=>{r.exports=realpath;realpath.realpath=realpath;realpath.sync=realpathSync;realpath.realpathSync=realpathSync;realpath.monkeypatch=monkeypatch;realpath.unmonkeypatch=unmonkeypatch;var a=o(7147);var l=a.realpath;var u=a.realpathSync;var c=process.version;var h=/^v[0-5]\./.test(c);var d=o(4403);function newError(r){return r&&r.syscall==="realpath"&&(r.code==="ELOOP"||r.code==="ENOMEM"||r.code==="ENAMETOOLONG")}function realpath(r,i,o){if(h){return l(r,i,o)}if(typeof i==="function"){o=i;i=null}l(r,i,(function(a,l){if(newError(a)){d.realpath(r,i,o)}else{o(a,l)}}))}function realpathSync(r,i){if(h){return u(r,i)}try{return u(r,i)}catch(o){if(newError(o)){return d.realpathSync(r,i)}else{throw o}}}function monkeypatch(){a.realpath=realpath;a.realpathSync=realpathSync}function unmonkeypatch(){a.realpath=l;a.realpathSync=u}},4403:(r,i,o)=>{var a=o(1017);var l=process.platform==="win32";var u=o(7147);var c=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function rethrow(){var r;if(c){var i=new Error;r=debugCallback}else r=missingCallback;return r;function debugCallback(r){if(r){i.message=r.message;r=i;missingCallback(r)}}function missingCallback(r){if(r){if(process.throwDeprecation)throw r;else if(!process.noDeprecation){var i="fs: missing callback "+(r.stack||r.message);if(process.traceDeprecation)console.trace(i);else console.error(i)}}}}function maybeCallback(r){return typeof r==="function"?r:rethrow()}var h=a.normalize;if(l){var d=/(.*?)(?:[\/\\]+|$)/g}else{var d=/(.*?)(?:[\/]+|$)/g}if(l){var p=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/}else{var p=/^[\/]*/}i.realpathSync=function realpathSync(r,i){r=a.resolve(r);if(i&&Object.prototype.hasOwnProperty.call(i,r)){return i[r]}var o=r,c={},h={};var m;var g;var y;var v;start();function start(){var i=p.exec(r);m=i[0].length;g=i[0];y=i[0];v="";if(l&&!h[y]){u.lstatSync(y);h[y]=true}}while(m<r.length){d.lastIndex=m;var b=d.exec(r);v=g;g+=b[0];y=v+b[1];m=d.lastIndex;if(h[y]||i&&i[y]===y){continue}var w;if(i&&Object.prototype.hasOwnProperty.call(i,y)){w=i[y]}else{var M=u.lstatSync(y);if(!M.isSymbolicLink()){h[y]=true;if(i)i[y]=y;continue}var E=null;if(!l){var D=M.dev.toString(32)+":"+M.ino.toString(32);if(c.hasOwnProperty(D)){E=c[D]}}if(E===null){u.statSync(y);E=u.readlinkSync(y)}w=a.resolve(v,E);if(i)i[y]=w;if(!l)c[D]=E}r=a.resolve(w,r.slice(m));start()}if(i)i[o]=r;return r};i.realpath=function realpath(r,i,o){if(typeof o!=="function"){o=maybeCallback(i);i=null}r=a.resolve(r);if(i&&Object.prototype.hasOwnProperty.call(i,r)){return process.nextTick(o.bind(null,null,i[r]))}var c=r,h={},m={};var g;var y;var v;var b;start();function start(){var i=p.exec(r);g=i[0].length;y=i[0];v=i[0];b="";if(l&&!m[v]){u.lstat(v,(function(r){if(r)return o(r);m[v]=true;LOOP()}))}else{process.nextTick(LOOP)}}function LOOP(){if(g>=r.length){if(i)i[c]=r;return o(null,r)}d.lastIndex=g;var a=d.exec(r);b=y;y+=a[0];v=b+a[1];g=d.lastIndex;if(m[v]||i&&i[v]===v){return process.nextTick(LOOP)}if(i&&Object.prototype.hasOwnProperty.call(i,v)){return gotResolvedLink(i[v])}return u.lstat(v,gotStat)}function gotStat(r,a){if(r)return o(r);if(!a.isSymbolicLink()){m[v]=true;if(i)i[v]=v;return process.nextTick(LOOP)}if(!l){var c=a.dev.toString(32)+":"+a.ino.toString(32);if(h.hasOwnProperty(c)){return gotTarget(null,h[c],v)}}u.stat(v,(function(r){if(r)return o(r);u.readlink(v,(function(r,i){if(!l)h[c]=i;gotTarget(r,i)}))}))}function gotTarget(r,l,u){if(r)return o(r);var c=a.resolve(b,l);if(i)i[u]=c;gotResolvedLink(c)}function gotResolvedLink(i){r=a.resolve(i,r.slice(g));start()}}},7945:(r,i,o)=>{const a=o(3837);const l=o(7310);let u=false;let c=true;function _value(r,i){const o=process.env[r];if(o===undefined){if(i===undefined&&!c){return o}if(i===undefined){throw new Error("GetEnv.Nonexistent: "+r+" does not exist "+"and no fallback value provided.")}if(u){throw new Error("GetEnv.DisabledFallbacks: "+r+" relying on fallback "+"when fallbacks have been disabled")}return""+i}return o}const h={string:function(r){return""+r},int:function(r){const i=r.match(/^-?\d+$/);if(!i){throw new Error("GetEnv.NoInteger: "+r+" is not an integer.")}return+r},float:function(r){const i=+r===Infinity||+r===-Infinity;if(i){throw new Error("GetEnv.Infinity: "+r+" is set to +/-Infinity.")}const o=!(isNaN(r)||r==="");if(!o){throw new Error("GetEnv.NoFloat: "+r+" is not a number.")}return+r},bool:function(r){const i=r==="true"||r==="false";if(!i){throw new Error("GetEnv.NoBoolean: "+r+" is not a boolean.")}return r==="true"},boolish:function(r){try{return h.bool(r)}catch(i){const o=r==="1"||r==="0";if(!o){throw new Error("GetEnv.NoBoolean: "+r+" is not a boolean.")}return r==="1"}},url:l.parse};function converter(r){return function(i,o){if(typeof i=="string"){const a=_value(i,o);return h[r](a)}else{return d.multi(i)}}}const d=converter("string");Object.keys(h).forEach((function(r){d[r]=converter(r)}));d.array=function array(r,i,o){i=i||"string";if(Object.keys(h).indexOf(i)===-1){throw new Error("GetEnv.ArrayUndefinedType: Unknown array type "+i)}const a=_value(r,o);return a.split(/\s*,\s*/).map(h[i])};d.multi=function multi(r){const i={};for(let o in r){const l=r[o];if(a.isArray(l)){switch(l.length){case 1:case 2:i[o]=d(l[0],l[1]);break;case 3:i[o]=d[l[2]](l[0],l[1]);break;default:throw"getenv.multi(): invalid spec";break}}else{i[o]=d(l)}}return i};d.disableFallbacks=function(){u=true};d.enableFallbacks=function(){u=false};d.disableErrors=function(){c=false};d.enableErrors=function(){c=true};r.exports=d},6738:r=>{"use strict";r.exports=(r,i=process.argv)=>{const o=r.startsWith("-")?"":r.length===1?"-":"--";const a=i.indexOf(o+r);const l=i.indexOf("--");return a!==-1&&(l===-1||a<l)}},9442:(r,i,o)=>{var a=o(4586);var l=Object.create(null);var u=o(7197);r.exports=a(inflight);function inflight(r,i){if(l[r]){l[r].push(i);return null}else{l[r]=[i];return makeres(r)}}function makeres(r){return u((function RES(){var i=l[r];var o=i.length;var a=slice(arguments);try{for(var u=0;u<o;u++){i[u].apply(null,a)}}finally{if(i.length>o){i.splice(0,o);process.nextTick((function(){RES.apply(null,a)}))}else{delete l[r]}}}))}function slice(r){var i=r.length;var o=[];for(var a=0;a<i;a++)o[a]=r[a];return o}},6919:(r,i,o)=>{try{var a=o(3837);if(typeof a.inherits!=="function")throw"";r.exports=a.inherits}catch(i){r.exports=o(7526)}},7526:r=>{if(typeof Object.create==="function"){r.exports=function inherits(r,i){if(i){r.super_=i;r.prototype=Object.create(i.prototype,{constructor:{value:r,enumerable:false,writable:true,configurable:true}})}}}else{r.exports=function inherits(r,i){if(i){r.super_=i;var TempCtor=function(){};TempCtor.prototype=i.prototype;r.prototype=new TempCtor;r.prototype.constructor=r}}}},1923:(r,i)=>{i.parse=i.decode=decode;i.stringify=i.encode=encode;i.safe=safe;i.unsafe=unsafe;var o=typeof process!=="undefined"&&process.platform==="win32"?"\r\n":"\n";function encode(r,i){var a=[];var l="";if(typeof i==="string"){i={section:i,whitespace:false}}else{i=i||{};i.whitespace=i.whitespace===true}var u=i.whitespace?" = ":"=";Object.keys(r).forEach((function(i,c,h){var d=r[i];if(d&&Array.isArray(d)){d.forEach((function(r){l+=safe(i+"[]")+u+safe(r)+"\n"}))}else if(d&&typeof d==="object")a.push(i);else l+=safe(i)+u+safe(d)+o}));if(i.section&&l.length)l="["+safe(i.section)+"]"+o+l;a.forEach((function(a,u,c){var h=dotSplit(a).join("\\.");var d=(i.section?i.section+".":"")+h;var p=encode(r[a],{section:d,whitespace:i.whitespace});if(l.length&&p.length)l+=o;l+=p}));return l}function dotSplit(r){return r.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map((function(r){return r.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")}))}function decode(r){var i={};var o=i;var a=null;var l=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;var u=r.split(/[\r\n]+/g);u.forEach((function(r,u,c){if(!r||r.match(/^\s*[;#]/))return;var h=r.match(l);if(!h)return;if(h[1]!==undefined){a=unsafe(h[1]);if(a==="__proto__"){o={};return}o=i[a]=i[a]||{};return}var d=unsafe(h[2]);if(d==="__proto__")return;var p=h[3]?unsafe(h[4]):true;switch(p){case"true":case"false":case"null":p=JSON.parse(p)}if(d.length>2&&d.slice(-2)==="[]"){d=d.substring(0,d.length-2);if(d==="__proto__")return;if(!o[d])o[d]=[];else if(!Array.isArray(o[d]))o[d]=[o[d]]}if(Array.isArray(o[d]))o[d].push(p);else o[d]=p}));Object.keys(i).filter((function(r,o,a){if(!i[r]||typeof i[r]!=="object"||Array.isArray(i[r]))return false;var l=dotSplit(r);var u=i;var c=l.pop();var h=c.replace(/\\\./g,".");l.forEach((function(r,i,o){if(r==="__proto__")return;if(!u[r]||typeof u[r]!=="object")u[r]={};u=u[r]}));if(u===i&&h===c)return false;u[h]=i[r];return true})).forEach((function(r,o,a){delete i[r]}));return i}function isQuoted(r){return r.charAt(0)==='"'&&r.slice(-1)==='"'||r.charAt(0)==="'"&&r.slice(-1)==="'"}function safe(r){return typeof r!=="string"||r.match(/[=\r\n]/)||r.match(/^\[/)||r.length>1&&isQuoted(r)||r!==r.trim()?JSON.stringify(r):r.replace(/;/g,"\\;").replace(/#/g,"\\#")}function unsafe(r,i){r=(r||"").trim();if(isQuoted(r)){if(r.charAt(0)==="'")r=r.substr(1,r.length-2);try{r=JSON.parse(r)}catch(r){}}else{var o=false;var a="";for(var l=0,u=r.length;l<u;l++){var c=r.charAt(l);if(o){if("\\;#".indexOf(c)!==-1)a+=c;else a+="\\"+c;o=false}else if(";#".indexOf(c)!==-1)break;else if(c==="\\")o=true;else a+=c}if(o)a+="\\";return a.trim()}return r}},228:(r,i,o)=>{var a=o(7147);var l;if(process.platform==="win32"||global.TESTING_WINDOWS){l=o(7214)}else{l=o(5211)}r.exports=isexe;isexe.sync=sync;function isexe(r,i,o){if(typeof i==="function"){o=i;i={}}if(!o){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(o,a){isexe(r,i||{},(function(r,i){if(r){a(r)}else{o(i)}}))}))}l(r,i||{},(function(r,a){if(r){if(r.code==="EACCES"||i&&i.ignoreErrors){r=null;a=false}}o(r,a)}))}function sync(r,i){try{return l.sync(r,i||{})}catch(r){if(i&&i.ignoreErrors||r.code==="EACCES"){return false}else{throw r}}}},5211:(r,i,o)=>{r.exports=isexe;isexe.sync=sync;var a=o(7147);function isexe(r,i,o){a.stat(r,(function(r,a){o(r,r?false:checkStat(a,i))}))}function sync(r,i){return checkStat(a.statSync(r),i)}function checkStat(r,i){return r.isFile()&&checkMode(r,i)}function checkMode(r,i){var o=r.mode;var a=r.uid;var l=r.gid;var u=i.uid!==undefined?i.uid:process.getuid&&process.getuid();var c=i.gid!==undefined?i.gid:process.getgid&&process.getgid();var h=parseInt("100",8);var d=parseInt("010",8);var p=parseInt("001",8);var m=h|d;var g=o&p||o&d&&l===c||o&h&&a===u||o&m&&u===0;return g}},7214:(r,i,o)=>{r.exports=isexe;isexe.sync=sync;var a=o(7147);function checkPathExt(r,i){var o=i.pathExt!==undefined?i.pathExt:process.env.PATHEXT;if(!o){return true}o=o.split(";");if(o.indexOf("")!==-1){return true}for(var a=0;a<o.length;a++){var l=o[a].toLowerCase();if(l&&r.substr(-l.length).toLowerCase()===l){return true}}return false}function checkStat(r,i,o){if(!r.isSymbolicLink()&&!r.isFile()){return false}return checkPathExt(i,o)}function isexe(r,i,o){a.stat(r,(function(a,l){o(a,a?false:checkStat(l,r,i))}))}function sync(r,i){return checkStat(a.statSync(r),r,i)}},9439:r=>{"use strict";const{FORCE_COLOR:i,NODE_DISABLE_COLORS:o,TERM:a}=process.env;const l={enabled:!o&&a!=="dumb"&&i!=="0",reset:init(0,0),bold:init(1,22),dim:init(2,22),italic:init(3,23),underline:init(4,24),inverse:init(7,27),hidden:init(8,28),strikethrough:init(9,29),black:init(30,39),red:init(31,39),green:init(32,39),yellow:init(33,39),blue:init(34,39),magenta:init(35,39),cyan:init(36,39),white:init(37,39),gray:init(90,39),grey:init(90,39),bgBlack:init(40,49),bgRed:init(41,49),bgGreen:init(42,49),bgYellow:init(43,49),bgBlue:init(44,49),bgMagenta:init(45,49),bgCyan:init(46,49),bgWhite:init(47,49)};function run(r,i){let o=0,a,l="",u="";for(;o<r.length;o++){a=r[o];l+=a.open;u+=a.close;if(i.includes(a.close)){i=i.replace(a.rgx,a.close+a.open)}}return l+i+u}function chain(r,i){let o={has:r,keys:i};o.reset=l.reset.bind(o);o.bold=l.bold.bind(o);o.dim=l.dim.bind(o);o.italic=l.italic.bind(o);o.underline=l.underline.bind(o);o.inverse=l.inverse.bind(o);o.hidden=l.hidden.bind(o);o.strikethrough=l.strikethrough.bind(o);o.black=l.black.bind(o);o.red=l.red.bind(o);o.green=l.green.bind(o);o.yellow=l.yellow.bind(o);o.blue=l.blue.bind(o);o.magenta=l.magenta.bind(o);o.cyan=l.cyan.bind(o);o.white=l.white.bind(o);o.gray=l.gray.bind(o);o.grey=l.grey.bind(o);o.bgBlack=l.bgBlack.bind(o);o.bgRed=l.bgRed.bind(o);o.bgGreen=l.bgGreen.bind(o);o.bgYellow=l.bgYellow.bind(o);o.bgBlue=l.bgBlue.bind(o);o.bgMagenta=l.bgMagenta.bind(o);o.bgCyan=l.bgCyan.bind(o);o.bgWhite=l.bgWhite.bind(o);return o}function init(r,i){let o={open:`[${r}m`,close:`[${i}m`,rgx:new RegExp(`\\x1b\\[${i}m`,"g")};return function(i){if(this!==void 0&&this.has!==void 0){this.has.includes(r)||(this.has.push(r),this.keys.push(o));return i===void 0?this:l.enabled?run(this.keys,i+""):i+""}return i===void 0?chain([r],[o]):l.enabled?run([o],i+""):i+""}}r.exports=l},9566:(r,i,o)=>{r.exports=minimatch;minimatch.Minimatch=Minimatch;var a=function(){try{return o(1017)}catch(r){}}()||{sep:"/"};minimatch.sep=a.sep;var l=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var u=o(3197);var c={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var h="[^/]";var d=h+"*?";var p="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var m="(?:(?!(?:\\/|^)\\.).)*?";var g=charSet("().*{}+?[]^$\\!");function charSet(r){return r.split("").reduce((function(r,i){r[i]=true;return r}),{})}var y=/\/+/;minimatch.filter=filter;function filter(r,i){i=i||{};return function(o,a,l){return minimatch(o,r,i)}}function ext(r,i){i=i||{};var o={};Object.keys(r).forEach((function(i){o[i]=r[i]}));Object.keys(i).forEach((function(r){o[r]=i[r]}));return o}minimatch.defaults=function(r){if(!r||typeof r!=="object"||!Object.keys(r).length){return minimatch}var i=minimatch;var o=function minimatch(o,a,l){return i(o,a,ext(r,l))};o.Minimatch=function Minimatch(o,a){return new i.Minimatch(o,ext(r,a))};o.Minimatch.defaults=function defaults(o){return i.defaults(ext(r,o)).Minimatch};o.filter=function filter(o,a){return i.filter(o,ext(r,a))};o.defaults=function defaults(o){return i.defaults(ext(r,o))};o.makeRe=function makeRe(o,a){return i.makeRe(o,ext(r,a))};o.braceExpand=function braceExpand(o,a){return i.braceExpand(o,ext(r,a))};o.match=function(o,a,l){return i.match(o,a,ext(r,l))};return o};Minimatch.defaults=function(r){return minimatch.defaults(r).Minimatch};function minimatch(r,i,o){assertValidPattern(i);if(!o)o={};if(!o.nocomment&&i.charAt(0)==="#"){return false}return new Minimatch(i,o).match(r)}function Minimatch(r,i){if(!(this instanceof Minimatch)){return new Minimatch(r,i)}assertValidPattern(r);if(!i)i={};r=r.trim();if(!i.allowWindowsEscape&&a.sep!=="/"){r=r.split(a.sep).join("/")}this.options=i;this.set=[];this.pattern=r;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!i.partial;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){var r=this.pattern;var i=this.options;if(!i.nocomment&&r.charAt(0)==="#"){this.comment=true;return}if(!r){this.empty=true;return}this.parseNegate();var o=this.globSet=this.braceExpand();if(i.debug)this.debug=function debug(){console.error.apply(console,arguments)};this.debug(this.pattern,o);o=this.globParts=o.map((function(r){return r.split(y)}));this.debug(this.pattern,o);o=o.map((function(r,i,o){return r.map(this.parse,this)}),this);this.debug(this.pattern,o);o=o.filter((function(r){return r.indexOf(false)===-1}));this.debug(this.pattern,o);this.set=o}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var r=this.pattern;var i=false;var o=this.options;var a=0;if(o.nonegate)return;for(var l=0,u=r.length;l<u&&r.charAt(l)==="!";l++){i=!i;a++}if(a)this.pattern=r.substr(a);this.negate=i}minimatch.braceExpand=function(r,i){return braceExpand(r,i)};Minimatch.prototype.braceExpand=braceExpand;function braceExpand(r,i){if(!i){if(this instanceof Minimatch){i=this.options}else{i={}}}r=typeof r==="undefined"?this.pattern:r;assertValidPattern(r);if(i.nobrace||!/\{(?:(?!\{).)*\}/.test(r)){return[r]}return u(r)}var v=1024*64;var assertValidPattern=function(r){if(typeof r!=="string"){throw new TypeError("invalid pattern")}if(r.length>v){throw new TypeError("pattern is too long")}};Minimatch.prototype.parse=parse;var b={};function parse(r,i){assertValidPattern(r);var o=this.options;if(r==="**"){if(!o.noglobstar)return l;else r="*"}if(r==="")return"";var a="";var u=!!o.nocase;var p=false;var m=[];var y=[];var v;var w=false;var M=-1;var E=-1;var D=r.charAt(0)==="."?"":o.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var T=this;function clearStateChar(){if(v){switch(v){case"*":a+=d;u=true;break;case"?":a+=h;u=true;break;default:a+="\\"+v;break}T.debug("clearStateChar %j %j",v,a);v=false}}for(var x=0,O=r.length,N;x<O&&(N=r.charAt(x));x++){this.debug("%s\t%s %s %j",r,x,a,N);if(p&&g[N]){a+="\\"+N;p=false;continue}switch(N){case"/":{return false}case"\\":clearStateChar();p=true;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s\t%s %s %j <-- stateChar",r,x,a,N);if(w){this.debug(" in class");if(N==="!"&&x===E+1)N="^";a+=N;continue}T.debug("call clearStateChar %j",v);clearStateChar();v=N;if(o.noext)clearStateChar();continue;case"(":if(w){a+="(";continue}if(!v){a+="\\(";continue}m.push({type:v,start:x-1,reStart:a.length,open:c[v].open,close:c[v].close});a+=v==="!"?"(?:(?!(?:":"(?:";this.debug("plType %j %j",v,a);v=false;continue;case")":if(w||!m.length){a+="\\)";continue}clearStateChar();u=true;var _=m.pop();a+=_.close;if(_.type==="!"){y.push(_)}_.reEnd=a.length;continue;case"|":if(w||!m.length||p){a+="\\|";p=false;continue}clearStateChar();a+="|";continue;case"[":clearStateChar();if(w){a+="\\"+N;continue}w=true;E=x;M=a.length;a+=N;continue;case"]":if(x===E+1||!w){a+="\\"+N;p=false;continue}var A=r.substring(E+1,x);try{RegExp("["+A+"]")}catch(r){var I=this.parse(A,b);a=a.substr(0,M)+"\\["+I[0]+"\\]";u=u||I[1];w=false;continue}u=true;w=false;a+=N;continue;default:clearStateChar();if(p){p=false}else if(g[N]&&!(N==="^"&&w)){a+="\\"}a+=N}}if(w){A=r.substr(E+1);I=this.parse(A,b);a=a.substr(0,M)+"\\["+I[0];u=u||I[1]}for(_=m.pop();_;_=m.pop()){var L=a.slice(_.reStart+_.open.length);this.debug("setting tail",a,_);L=L.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(r,i,o){if(!o){o="\\"}return i+i+o+"|"}));this.debug("tail=%j\n %s",L,L,_,a);var S=_.type==="*"?d:_.type==="?"?h:"\\"+_.type;u=true;a=a.slice(0,_.reStart)+S+"\\("+L}clearStateChar();if(p){a+="\\\\"}var C=false;switch(a.charAt(0)){case"[":case".":case"(":C=true}for(var P=y.length-1;P>-1;P--){var X=y[P];var j=a.slice(0,X.reStart);var k=a.slice(X.reStart,X.reEnd-8);var R=a.slice(X.reEnd-8,X.reEnd);var B=a.slice(X.reEnd);R+=B;var $=j.split("(").length-1;var U=B;for(x=0;x<$;x++){U=U.replace(/\)[+*?]?/,"")}B=U;var V="";if(B===""&&i!==b){V="$"}var G=j+k+B+V+R;a=G}if(a!==""&&u){a="(?=.)"+a}if(C){a=D+a}if(i===b){return[a,u]}if(!u){return globUnescape(r)}var W=o.nocase?"i":"";try{var q=new RegExp("^"+a+"$",W)}catch(r){return new RegExp("$.")}q._glob=r;q._src=a;return q}minimatch.makeRe=function(r,i){return new Minimatch(r,i||{}).makeRe()};Minimatch.prototype.makeRe=makeRe;function makeRe(){if(this.regexp||this.regexp===false)return this.regexp;var r=this.set;if(!r.length){this.regexp=false;return this.regexp}var i=this.options;var o=i.noglobstar?d:i.dot?p:m;var a=i.nocase?"i":"";var u=r.map((function(r){return r.map((function(r){return r===l?o:typeof r==="string"?regExpEscape(r):r._src})).join("\\/")})).join("|");u="^(?:"+u+")$";if(this.negate)u="^(?!"+u+").*$";try{this.regexp=new RegExp(u,a)}catch(r){this.regexp=false}return this.regexp}minimatch.match=function(r,i,o){o=o||{};var a=new Minimatch(i,o);r=r.filter((function(r){return a.match(r)}));if(a.options.nonull&&!r.length){r.push(i)}return r};Minimatch.prototype.match=function match(r,i){if(typeof i==="undefined")i=this.partial;this.debug("match",r,this.pattern);if(this.comment)return false;if(this.empty)return r==="";if(r==="/"&&i)return true;var o=this.options;if(a.sep!=="/"){r=r.split(a.sep).join("/")}r=r.split(y);this.debug(this.pattern,"split",r);var l=this.set;this.debug(this.pattern,"set",l);var u;var c;for(c=r.length-1;c>=0;c--){u=r[c];if(u)break}for(c=0;c<l.length;c++){var h=l[c];var d=r;if(o.matchBase&&h.length===1){d=[u]}var p=this.matchOne(d,h,i);if(p){if(o.flipNegate)return true;return!this.negate}}if(o.flipNegate)return false;return this.negate};Minimatch.prototype.matchOne=function(r,i,o){var a=this.options;this.debug("matchOne",{this:this,file:r,pattern:i});this.debug("matchOne",r.length,i.length);for(var u=0,c=0,h=r.length,d=i.length;u<h&&c<d;u++,c++){this.debug("matchOne loop");var p=i[c];var m=r[u];this.debug(i,p,m);if(p===false)return false;if(p===l){this.debug("GLOBSTAR",[i,p,m]);var g=u;var y=c+1;if(y===d){this.debug("** at the end");for(;u<h;u++){if(r[u]==="."||r[u]===".."||!a.dot&&r[u].charAt(0)===".")return false}return true}while(g<h){var v=r[g];this.debug("\nglobstar while",r,g,i,y,v);if(this.matchOne(r.slice(g),i.slice(y),o)){this.debug("globstar found match!",g,h,v);return true}else{if(v==="."||v===".."||!a.dot&&v.charAt(0)==="."){this.debug("dot detected!",r,g,i,y);break}this.debug("globstar swallow a segment, and continue");g++}}if(o){this.debug("\n>>> no match, partial?",r,g,i,y);if(g===h)return true}return false}var b;if(typeof p==="string"){b=m===p;this.debug("string match",p,m,b)}else{b=m.match(p);this.debug("pattern match",p,m,b)}if(!b)return false}if(u===h&&c===d){return true}else if(u===h){return o}else if(c===d){return u===h-1&&r[u]===""}throw new Error("wtf?")};function globUnescape(r){return r.replace(/\\(.)/g,"$1")}function regExpEscape(r){return r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},5912:r=>{"use strict";function hasKey(r,i){var o=r;i.slice(0,-1).forEach((function(r){o=o[r]||{}}));var a=i[i.length-1];return a in o}function isNumber(r){if(typeof r==="number"){return true}if(/^0x[0-9a-f]+$/i.test(r)){return true}return/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(r)}function isConstructorOrProto(r,i){return i==="constructor"&&typeof r[i]==="function"||i==="__proto__"}r.exports=function(r,i){if(!i){i={}}var o={bools:{},strings:{},unknownFn:null};if(typeof i.unknown==="function"){o.unknownFn=i.unknown}if(typeof i.boolean==="boolean"&&i.boolean){o.allBools=true}else{[].concat(i.boolean).filter(Boolean).forEach((function(r){o.bools[r]=true}))}var a={};function aliasIsBoolean(r){return a[r].some((function(r){return o.bools[r]}))}Object.keys(i.alias||{}).forEach((function(r){a[r]=[].concat(i.alias[r]);a[r].forEach((function(i){a[i]=[r].concat(a[r].filter((function(r){return i!==r})))}))}));[].concat(i.string).filter(Boolean).forEach((function(r){o.strings[r]=true;if(a[r]){[].concat(a[r]).forEach((function(r){o.strings[r]=true}))}}));var l=i.default||{};var u={_:[]};function argDefined(r,i){return o.allBools&&/^--[^=]+$/.test(i)||o.strings[r]||o.bools[r]||a[r]}function setKey(r,i,a){var l=r;for(var u=0;u<i.length-1;u++){var c=i[u];if(isConstructorOrProto(l,c)){return}if(l[c]===undefined){l[c]={}}if(l[c]===Object.prototype||l[c]===Number.prototype||l[c]===String.prototype){l[c]={}}if(l[c]===Array.prototype){l[c]=[]}l=l[c]}var h=i[i.length-1];if(isConstructorOrProto(l,h)){return}if(l===Object.prototype||l===Number.prototype||l===String.prototype){l={}}if(l===Array.prototype){l=[]}if(l[h]===undefined||o.bools[h]||typeof l[h]==="boolean"){l[h]=a}else if(Array.isArray(l[h])){l[h].push(a)}else{l[h]=[l[h],a]}}function setArg(r,i,l){if(l&&o.unknownFn&&!argDefined(r,l)){if(o.unknownFn(l)===false){return}}var c=!o.strings[r]&&isNumber(i)?Number(i):i;setKey(u,r.split("."),c);(a[r]||[]).forEach((function(r){setKey(u,r.split("."),c)}))}Object.keys(o.bools).forEach((function(r){setArg(r,l[r]===undefined?false:l[r])}));var c=[];if(r.indexOf("--")!==-1){c=r.slice(r.indexOf("--")+1);r=r.slice(0,r.indexOf("--"))}for(var h=0;h<r.length;h++){var d=r[h];var p;var m;if(/^--.+=/.test(d)){var g=d.match(/^--([^=]+)=([\s\S]*)$/);p=g[1];var y=g[2];if(o.bools[p]){y=y!=="false"}setArg(p,y,d)}else if(/^--no-.+/.test(d)){p=d.match(/^--no-(.+)/)[1];setArg(p,false,d)}else if(/^--.+/.test(d)){p=d.match(/^--(.+)/)[1];m=r[h+1];if(m!==undefined&&!/^(-|--)[^-]/.test(m)&&!o.bools[p]&&!o.allBools&&(a[p]?!aliasIsBoolean(p):true)){setArg(p,m,d);h+=1}else if(/^(true|false)$/.test(m)){setArg(p,m==="true",d);h+=1}else{setArg(p,o.strings[p]?"":true,d)}}else if(/^-[^-]+/.test(d)){var v=d.slice(1,-1).split("");var b=false;for(var w=0;w<v.length;w++){m=d.slice(w+2);if(m==="-"){setArg(v[w],m,d);continue}if(/[A-Za-z]/.test(v[w])&&m[0]==="="){setArg(v[w],m.slice(1),d);b=true;break}if(/[A-Za-z]/.test(v[w])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(m)){setArg(v[w],m,d);b=true;break}if(v[w+1]&&v[w+1].match(/\W/)){setArg(v[w],d.slice(w+2),d);b=true;break}else{setArg(v[w],o.strings[v[w]]?"":true,d)}}p=d.slice(-1)[0];if(!b&&p!=="-"){if(r[h+1]&&!/^(-|--)[^-]/.test(r[h+1])&&!o.bools[p]&&(a[p]?!aliasIsBoolean(p):true)){setArg(p,r[h+1],d);h+=1}else if(r[h+1]&&/^(true|false)$/.test(r[h+1])){setArg(p,r[h+1]==="true",d);h+=1}else{setArg(p,o.strings[p]?"":true,d)}}}else{if(!o.unknownFn||o.unknownFn(d)!==false){u._.push(o.strings._||!isNumber(d)?d:Number(d))}if(i.stopEarly){u._.push.apply(u._,r.slice(h+1));break}}}Object.keys(l).forEach((function(r){if(!hasKey(u,r.split("."))){setKey(u,r.split("."),l[r]);(a[r]||[]).forEach((function(i){setKey(u,i.split("."),l[r])}))}}));if(i["--"]){u["--"]=c.slice()}else{c.forEach((function(r){u._.push(r)}))}return u}},7197:(r,i,o)=>{var a=o(4586);r.exports=a(once);r.exports.strict=a(onceStrict);once.proto=once((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})}));function once(r){var f=function(){if(f.called)return f.value;f.called=true;return f.value=r.apply(this,arguments)};f.called=false;return f}function onceStrict(r){var f=function(){if(f.called)throw new Error(f.onceError);f.called=true;return f.value=r.apply(this,arguments)};var i=r.name||"Function wrapped with `once`";f.onceError=i+" shouldn't be called more than once";f.called=false;return f}},1323:r=>{"use strict";function posix(r){return r.charAt(0)==="/"}function win32(r){var i=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;var o=i.exec(r);var a=o[1]||"";var l=Boolean(a&&a.charAt(1)!==":");return Boolean(o[2]||l)}r.exports=process.platform==="win32"?win32:posix;r.exports.posix=posix;r.exports.win32=win32},399:r=>{"use strict";class DatePart{constructor({token:r,date:i,parts:o,locales:a}){this.token=r;this.date=i||new Date;this.parts=o||[this];this.locales=a||{}}up(){}down(){}next(){const r=this.parts.indexOf(this);return this.parts.find(((i,o)=>o>r&&i instanceof DatePart))}setTo(r){}prev(){let r=[].concat(this.parts).reverse();const i=r.indexOf(this);return r.find(((r,o)=>o>i&&r instanceof DatePart))}toString(){return String(this.date)}}r.exports=DatePart},7967:(r,i,o)=>{"use strict";const a=o(399);const pos=r=>{r=r%10;return r===1?"st":r===2?"nd":r===3?"rd":"th"};class Day extends a{constructor(r={}){super(r)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(r){this.date.setDate(parseInt(r.substr(-2)))}toString(){let r=this.date.getDate();let i=this.date.getDay();return this.token==="DD"?String(r).padStart(2,"0"):this.token==="Do"?r+pos(r):this.token==="d"?i+1:this.token==="ddd"?this.locales.weekdaysShort[i]:this.token==="dddd"?this.locales.weekdays[i]:r}}r.exports=Day},4102:(r,i,o)=>{"use strict";const a=o(399);class Hours extends a{constructor(r={}){super(r)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(r){this.date.setHours(parseInt(r.substr(-2)))}toString(){let r=this.date.getHours();if(/h/.test(this.token))r=r%12||12;return this.token.length>1?String(r).padStart(2,"0"):r}}r.exports=Hours},7517:(r,i,o)=>{"use strict";r.exports={DatePart:o(399),Meridiem:o(5184),Day:o(7967),Hours:o(4102),Milliseconds:o(6945),Minutes:o(7829),Month:o(8608),Seconds:o(812),Year:o(5227)}},5184:(r,i,o)=>{"use strict";const a=o(399);class Meridiem extends a{constructor(r={}){super(r)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let r=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?r.toUpperCase():r}}r.exports=Meridiem},6945:(r,i,o)=>{"use strict";const a=o(399);class Milliseconds extends a{constructor(r={}){super(r)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(r){this.date.setMilliseconds(parseInt(r.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}r.exports=Milliseconds},7829:(r,i,o)=>{"use strict";const a=o(399);class Minutes extends a{constructor(r={}){super(r)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(r){this.date.setMinutes(parseInt(r.substr(-2)))}toString(){let r=this.date.getMinutes();return this.token.length>1?String(r).padStart(2,"0"):r}}r.exports=Minutes},8608:(r,i,o)=>{"use strict";const a=o(399);class Month extends a{constructor(r={}){super(r)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(r){r=parseInt(r.substr(-2))-1;this.date.setMonth(r<0?0:r)}toString(){let r=this.date.getMonth();let i=this.token.length;return i===2?String(r+1).padStart(2,"0"):i===3?this.locales.monthsShort[r]:i===4?this.locales.months[r]:String(r+1)}}r.exports=Month},812:(r,i,o)=>{"use strict";const a=o(399);class Seconds extends a{constructor(r={}){super(r)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(r){this.date.setSeconds(parseInt(r.substr(-2)))}toString(){let r=this.date.getSeconds();return this.token.length>1?String(r).padStart(2,"0"):r}}r.exports=Seconds},5227:(r,i,o)=>{"use strict";const a=o(399);class Year extends a{constructor(r={}){super(r)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(r){this.date.setFullYear(r.substr(-4))}toString(){let r=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?r.substr(-2):r}}r.exports=Year},935:(r,i,o)=>{"use strict";function asyncGeneratorStep(r,i,o,a,l,u,c){try{var h=r[u](c);var d=h.value}catch(r){o(r);return}if(h.done){i(d)}else{Promise.resolve(d).then(a,l)}}function _asyncToGenerator(r){return function(){var i=this,o=arguments;return new Promise((function(a,l){var u=r.apply(i,o);function _next(r){asyncGeneratorStep(u,a,l,_next,_throw,"next",r)}function _throw(r){asyncGeneratorStep(u,a,l,_next,_throw,"throw",r)}_next(undefined)}))}}const a=o(9439);const l=o(5876);const u=o(332),c=u.erase,h=u.cursor;const d=o(7483),p=d.style,m=d.clear,g=d.figures,y=d.wrap,v=d.entriesToDisplay;const getVal=(r,i)=>r[i]&&(r[i].value||r[i].title||r[i]);const getTitle=(r,i)=>r[i]&&(r[i].title||r[i].value||r[i]);const getIndex=(r,i)=>{const o=r.findIndex((r=>r.value===i||r.title===i));return o>-1?o:undefined};class AutocompletePrompt extends l{constructor(r={}){super(r);this.msg=r.message;this.suggest=r.suggest;this.choices=r.choices;this.initial=typeof r.initial==="number"?r.initial:getIndex(r.choices,r.initial);this.select=this.initial||r.cursor||0;this.i18n={noMatches:r.noMatches||"no matches found"};this.fallback=r.fallback||this.initial;this.clearFirst=r.clearFirst||false;this.suggestions=[];this.input="";this.limit=r.limit||10;this.cursor=0;this.transform=p.render(r.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=m("",this.out.columns);this.complete(this.render);this.render()}set fallback(r){this._fb=Number.isSafeInteger(parseInt(r))?parseInt(r):r}get fallback(){let r;if(typeof this._fb==="number")r=this.choices[this._fb];else if(typeof this._fb==="string")r={title:this._fb};return r||this._fb||{title:this.i18n.noMatches}}moveSelect(r){this.select=r;if(this.suggestions.length>0)this.value=getVal(this.suggestions,r);else this.value=this.fallback.value;this.fire()}complete(r){var i=this;return _asyncToGenerator((function*(){const o=i.completing=i.suggest(i.input,i.choices);const a=yield o;if(i.completing!==o)return;i.suggestions=a.map(((r,i,o)=>({title:getTitle(o,i),value:getVal(o,i),description:r.description})));i.completing=false;const l=Math.max(a.length-1,0);i.moveSelect(Math.min(l,i.select));r&&r()}))()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}exit(){if(this.clearFirst&&this.input.length>0){this.reset()}else{this.done=this.exited=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}abort(){this.done=this.aborted=true;this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}_(r,i){let o=this.input.slice(0,this.cursor);let a=this.input.slice(this.cursor);this.input=`${o}${r}${a}`;this.cursor=o.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let r=this.input.slice(0,this.cursor-1);let i=this.input.slice(this.cursor);this.input=`${r}${i}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let r=this.input.slice(0,this.cursor);let i=this.input.slice(this.cursor+1);this.input=`${r}${i}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions.length-1);this.render()}up(){if(this.select===0){this.moveSelect(this.suggestions.length-1)}else{this.moveSelect(this.select-1)}this.render()}down(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else{this.moveSelect(this.select+1)}this.render()}next(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1));this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0));this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}renderOption(r,i,o,l){let u;let c=o?g.arrowUp:l?g.arrowDown:" ";let h=i?a.cyan().underline(r.title):r.title;c=(i?a.cyan(g.pointer)+" ":" ")+c;if(r.description){u=` - ${r.description}`;if(c.length+h.length+u.length>=this.out.columns||r.description.split(/\r?\n/).length>1){u="\n"+y(r.description,{margin:3,width:this.out.columns})}}return c+" "+h+a.gray(u||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(h.hide);else this.out.write(m(this.outputText,this.out.columns));super.render();let r=v(this.select,this.choices.length,this.limit),i=r.startIndex,o=r.endIndex;this.outputText=[p.symbol(this.done,this.aborted,this.exited),a.bold(this.msg),p.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" ");if(!this.done){const r=this.suggestions.slice(i,o).map(((r,a)=>this.renderOption(r,this.select===a+i,a===0&&i>0,a+i===o-1&&o<this.choices.length))).join("\n");this.outputText+=`\n`+(r||a.gray(this.fallback.title))}this.out.write(c.line+h.to(0)+this.outputText)}}r.exports=AutocompletePrompt},2040:(r,i,o)=>{"use strict";const a=o(9439);const l=o(332),u=l.cursor;const c=o(4047);const h=o(7483),d=h.clear,p=h.style,m=h.figures;class AutocompleteMultiselectPrompt extends c{constructor(r={}){r.overrideRender=true;super(r);this.inputValue="";this.clear=d("",this.out.columns);this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((r=>r.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const r=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((r=>{if(this.inputValue){if(typeof r.title==="string"){if(r.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof r.value==="string"){if(r.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const i=this.filteredOptions.findIndex((i=>i===r));this.cursor=i<0?0:i;this.render()}handleSpaceToggle(){const r=this.filteredOptions[this.cursor];if(r.selected){r.selected=false;this.render()}else if(r.disabled||this.value.filter((r=>r.selected)).length>=this.maxChoices){return this.bell()}else{r.selected=true;this.render()}}handleInputChange(r){this.inputValue=this.inputValue+r;this.updateFilteredOptions()}_(r,i){if(r===" "){this.handleSpaceToggle()}else{this.handleInputChange(r)}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return`\nInstructions:\n ${m.arrowUp}/${m.arrowDown}: Highlight option\n ${m.arrowLeft}/${m.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`}return""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:a.gray("Enter something to filter")}\n`}renderOption(r,i,o){let l;if(i.disabled)l=r===o?a.gray().underline(i.title):a.strikethrough().gray(i.title);else l=r===o?a.cyan().underline(i.title):i.title;return(i.selected?a.green(m.radioOn):m.radioOff)+" "+l}renderDoneOrInstructions(){if(this.done){return this.value.filter((r=>r.selected)).map((r=>r.title)).join(", ")}const r=[a.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){r.push(a.yellow(this.warn))}return r.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);super.render();let r=[p.symbol(this.done,this.aborted),a.bold(this.msg),p.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){r+=a.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}r+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+r);this.clear=d(r,this.out.columns)}}r.exports=AutocompleteMultiselectPrompt},5680:(r,i,o)=>{"use strict";const a=o(9439);const l=o(5876);const u=o(7483),c=u.style,h=u.clear;const d=o(332),p=d.erase,m=d.cursor;class ConfirmPrompt extends l{constructor(r={}){super(r);this.msg=r.message;this.value=r.initial;this.initialValue=!!r.initial;this.yesMsg=r.yes||"yes";this.yesOption=r.yesOption||"(Y/n)";this.noMsg=r.no||"no";this.noOption=r.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(r,i){if(r.toLowerCase()==="y"){this.value=true;return this.submit()}if(r.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(m.hide);else this.out.write(h(this.outputText,this.out.columns));super.render();this.outputText=[c.symbol(this.done,this.aborted),a.bold(this.msg),c.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:a.gray(this.initialValue?this.yesOption:this.noOption)].join(" ");this.out.write(p.line+m.to(0)+this.outputText)}}r.exports=ConfirmPrompt},3031:(r,i,o)=>{"use strict";function asyncGeneratorStep(r,i,o,a,l,u,c){try{var h=r[u](c);var d=h.value}catch(r){o(r);return}if(h.done){i(d)}else{Promise.resolve(d).then(a,l)}}function _asyncToGenerator(r){return function(){var i=this,o=arguments;return new Promise((function(a,l){var u=r.apply(i,o);function _next(r){asyncGeneratorStep(u,a,l,_next,_throw,"next",r)}function _throw(r){asyncGeneratorStep(u,a,l,_next,_throw,"throw",r)}_next(undefined)}))}}const a=o(9439);const l=o(5876);const u=o(7483),c=u.style,h=u.clear,d=u.figures;const p=o(332),m=p.erase,g=p.cursor;const y=o(7517),v=y.DatePart,b=y.Meridiem,w=y.Day,M=y.Hours,E=y.Milliseconds,D=y.Minutes,T=y.Month,x=y.Seconds,O=y.Year;const N=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const _={1:({token:r})=>r.replace(/\\(.)/g,"$1"),2:r=>new w(r),3:r=>new T(r),4:r=>new O(r),5:r=>new b(r),6:r=>new M(r),7:r=>new D(r),8:r=>new x(r),9:r=>new E(r)};const A={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends l{constructor(r={}){super(r);this.msg=r.message;this.cursor=0;this.typed="";this.locales=Object.assign(A,r.locales);this._date=r.initial||new Date;this.errorMsg=r.error||"Please Enter A Valid Value";this.validator=r.validate||(()=>true);this.mask=r.mask||"YYYY-MM-DD HH:mm:ss";this.clear=h("",this.out.columns);this.render()}get value(){return this.date}get date(){return this._date}set date(r){if(r)this._date.setTime(r.getTime())}set mask(r){let i;this.parts=[];while(i=N.exec(r)){let r=i.shift();let o=i.findIndex((r=>r!=null));this.parts.push(o in _?_[o]({token:i[o]||r,date:this.date,parts:this.parts,locales:this.locales}):i[o]||r)}let o=this.parts.reduce(((r,i)=>{if(typeof i==="string"&&typeof r[r.length-1]==="string")r[r.length-1]+=i;else r.push(i);return r}),[]);this.parts.splice(0);this.parts.push(...o);this.reset()}moveCursor(r){this.typed="";this.cursor=r;this.fire()}reset(){this.moveCursor(this.parts.findIndex((r=>r instanceof v)));this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var r=this;return _asyncToGenerator((function*(){let i=yield r.validator(r.value);if(typeof i==="string"){r.errorMsg=i;i=false}r.error=!i}))()}submit(){var r=this;return _asyncToGenerator((function*(){yield r.validate();if(r.error){r.color="red";r.fire();r.render();return}r.done=true;r.aborted=false;r.fire();r.render();r.out.write("\n");r.close()}))()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let r=this.parts[this.cursor].prev();if(r==null)return this.bell();this.moveCursor(this.parts.indexOf(r));this.render()}right(){let r=this.parts[this.cursor].next();if(r==null)return this.bell();this.moveCursor(this.parts.indexOf(r));this.render()}next(){let r=this.parts[this.cursor].next();this.moveCursor(r?this.parts.indexOf(r):this.parts.findIndex((r=>r instanceof v)));this.render()}_(r){if(/\d/.test(r)){this.typed+=r;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(g.hide);else this.out.write(h(this.outputText,this.out.columns));super.render();this.outputText=[c.symbol(this.done,this.aborted),a.bold(this.msg),c.delimiter(false),this.parts.reduce(((r,i,o)=>r.concat(o===this.cursor&&!this.done?a.cyan().underline(i.toString()):i)),[]).join("")].join(" ");if(this.error){this.outputText+=this.errorMsg.split("\n").reduce(((r,i,o)=>r+`\n${o?` `:d.pointerSmall} ${a.red().italic(i)}`),``)}this.out.write(m.line+g.to(0)+this.outputText)}}r.exports=DatePrompt},9956:(r,i,o)=>{"use strict";r.exports={TextPrompt:o(5430),SelectPrompt:o(8856),TogglePrompt:o(9692),DatePrompt:o(3031),NumberPrompt:o(8831),MultiselectPrompt:o(4047),AutocompletePrompt:o(935),AutocompleteMultiselectPrompt:o(2040),ConfirmPrompt:o(5680)}},4047:(r,i,o)=>{"use strict";const a=o(9439);const l=o(332),u=l.cursor;const c=o(5876);const h=o(7483),d=h.clear,p=h.figures,m=h.style,g=h.wrap,y=h.entriesToDisplay;class MultiselectPrompt extends c{constructor(r={}){super(r);this.msg=r.message;this.cursor=r.cursor||0;this.scrollIndex=r.cursor||0;this.hint=r.hint||"";this.warn=r.warn||"- This option is disabled -";this.minSelected=r.min;this.showMinError=false;this.maxChoices=r.max;this.instructions=r.instructions;this.optionsPerPage=r.optionsPerPage||10;this.value=r.choices.map(((r,i)=>{if(typeof r==="string")r={title:r,value:i};return{title:r&&(r.title||r.value||r),description:r&&r.description,value:r&&(r.value===undefined?i:r.value),selected:r&&r.selected,disabled:r&&r.disabled}}));this.clear=d("",this.out.columns);if(!r.overrideRender){this.render()}}reset(){this.value.map((r=>!r.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((r=>r.selected))}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const r=this.value.filter((r=>r.selected));if(this.minSelected&&r.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((r=>r.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const r=this.value[this.cursor];if(r.selected){r.selected=false;this.render()}else if(r.disabled||this.value.filter((r=>r.selected)).length>=this.maxChoices){return this.bell()}else{r.selected=true;this.render()}}toggleAll(){if(this.maxChoices!==undefined||this.value[this.cursor].disabled){return this.bell()}const r=!this.value[this.cursor].selected;this.value.filter((r=>!r.disabled)).forEach((i=>i.selected=r));this.render()}_(r,i){if(r===" "){this.handleSpaceToggle()}else if(r==="a"){this.toggleAll()}else{return this.bell()}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return"\nInstructions:\n"+` ${p.arrowUp}/${p.arrowDown}: Highlight option\n`+` ${p.arrowLeft}/${p.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===undefined?` a: Toggle all\n`:"")+` enter/return: Complete answer`}return""}renderOption(r,i,o,l){const u=(i.selected?a.green(p.radioOn):p.radioOff)+" "+l+" ";let c,h;if(i.disabled){c=r===o?a.gray().underline(i.title):a.strikethrough().gray(i.title)}else{c=r===o?a.cyan().underline(i.title):i.title;if(r===o&&i.description){h=` - ${i.description}`;if(u.length+c.length+h.length>=this.out.columns||i.description.split(/\r?\n/).length>1){h="\n"+g(i.description,{margin:u.length,width:this.out.columns})}}}return u+c+a.gray(h||"")}paginateOptions(r){if(r.length===0){return a.red("No matches for this query.")}let i=y(this.cursor,r.length,this.optionsPerPage),o=i.startIndex,l=i.endIndex;let u,c=[];for(let i=o;i<l;i++){if(i===o&&o>0){u=p.arrowUp}else if(i===l-1&&l<r.length){u=p.arrowDown}else{u=" "}c.push(this.renderOption(this.cursor,r[i],i,u))}return"\n"+c.join("\n")}renderOptions(r){if(!this.done){return this.paginateOptions(r)}return""}renderDoneOrInstructions(){if(this.done){return this.value.filter((r=>r.selected)).map((r=>r.title)).join(", ")}const r=[a.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){r.push(a.yellow(this.warn))}return r.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);super.render();let r=[m.symbol(this.done,this.aborted),a.bold(this.msg),m.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){r+=a.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}r+=this.renderOptions(this.value);this.out.write(this.clear+r);this.clear=d(r,this.out.columns)}}r.exports=MultiselectPrompt},8831:(r,i,o)=>{"use strict";function asyncGeneratorStep(r,i,o,a,l,u,c){try{var h=r[u](c);var d=h.value}catch(r){o(r);return}if(h.done){i(d)}else{Promise.resolve(d).then(a,l)}}function _asyncToGenerator(r){return function(){var i=this,o=arguments;return new Promise((function(a,l){var u=r.apply(i,o);function _next(r){asyncGeneratorStep(u,a,l,_next,_throw,"next",r)}function _throw(r){asyncGeneratorStep(u,a,l,_next,_throw,"throw",r)}_next(undefined)}))}}const a=o(9439);const l=o(5876);const u=o(332),c=u.cursor,h=u.erase;const d=o(7483),p=d.style,m=d.figures,g=d.clear,y=d.lines;const v=/[0-9]/;const isDef=r=>r!==undefined;const round=(r,i)=>{let o=Math.pow(10,i);return Math.round(r*o)/o};class NumberPrompt extends l{constructor(r={}){super(r);this.transform=p.render(r.style);this.msg=r.message;this.initial=isDef(r.initial)?r.initial:"";this.float=!!r.float;this.round=r.round||2;this.inc=r.increment||1;this.min=isDef(r.min)?r.min:-Infinity;this.max=isDef(r.max)?r.max:Infinity;this.errorMsg=r.error||`Please Enter A Valid Value`;this.validator=r.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(r){if(!r&&r!==0){this.placeholder=true;this.rendered=a.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(r,this.round)}`);this._value=round(r,this.round)}this.fire()}get value(){return this._value}parse(r){return this.float?parseFloat(r):parseInt(r)}valid(r){return r===`-`||r===`.`&&this.float||v.test(r)}reset(){this.typed=``;this.value=``;this.fire();this.render()}exit(){this.abort()}abort(){let r=this.value;this.value=r!==``?r:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}validate(){var r=this;return _asyncToGenerator((function*(){let i=yield r.validator(r.value);if(typeof i===`string`){r.errorMsg=i;i=false}r.error=!i}))()}submit(){var r=this;return _asyncToGenerator((function*(){yield r.validate();if(r.error){r.color=`red`;r.fire();r.render();return}let i=r.value;r.value=i!==``?i:r.initial;r.done=true;r.aborted=false;r.error=false;r.fire();r.render();r.out.write(`\n`);r.close()}))()}up(){this.typed=``;if(this.value===""){this.value=this.min-this.inc}if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value===""){this.value=this.min+this.inc}if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let r=this.value.toString();if(r.length===0)return this.bell();this.value=this.parse(r=r.slice(0,-1))||``;if(this.value!==""&&this.value<this.min){this.value=this.min}this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(r,i){if(!this.valid(r))return this.bell();const o=Date.now();if(o-this.lastHit>1e3)this.typed=``;this.typed+=r;this.lastHit=o;this.color=`cyan`;if(r===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(c.down(y(this.outputError,this.out.columns)-1)+g(this.outputError,this.out.columns));this.out.write(g(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[p.symbol(this.done,this.aborted),a.bold(this.msg),p.delimiter(this.done),!this.done||!this.done&&!this.placeholder?a[this.color]().underline(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((r,i,o)=>r+`\n${o?` `:m.pointerSmall} ${a.red().italic(i)}`),``)}this.out.write(h.line+c.to(0)+this.outputText+c.save+this.outputError+c.restore)}}r.exports=NumberPrompt},5876:(r,i,o)=>{"use strict";const a=o(4521);const l=o(7483),u=l.action;const c=o(2361);const h=o(332),d=h.beep,p=h.cursor;const m=o(9439);class Prompt extends c{constructor(r={}){super();this.firstRender=true;this.in=r.stdin||process.stdin;this.out=r.stdout||process.stdout;this.onRender=(r.onRender||(()=>void 0)).bind(this);const i=a.createInterface({input:this.in,escapeCodeTimeout:50});a.emitKeypressEvents(this.in,i);if(this.in.isTTY)this.in.setRawMode(true);const o=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1;const keypress=(r,i)=>{let a=u(i,o);if(a===false){this._&&this._(r,i)}else if(typeof this[a]==="function"){this[a](i)}else{this.bell()}};this.close=()=>{this.out.write(p.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);i.close();this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(d)}render(){this.onRender(m);if(this.firstRender)this.firstRender=false}}r.exports=Prompt},8856:(r,i,o)=>{"use strict";const a=o(9439);const l=o(5876);const u=o(7483),c=u.style,h=u.clear,d=u.figures,p=u.wrap,m=u.entriesToDisplay;const g=o(332),y=g.cursor;class SelectPrompt extends l{constructor(r={}){super(r);this.msg=r.message;this.hint=r.hint||"- Use arrow-keys. Return to submit.";this.warn=r.warn||"- This option is disabled";this.cursor=r.initial||0;this.choices=r.choices.map(((r,i)=>{if(typeof r==="string")r={title:r,value:i};return{title:r&&(r.title||r.value||r),value:r&&(r.value===undefined?i:r.value),description:r&&r.description,selected:r&&r.selected,disabled:r&&r.disabled}}));this.optionsPerPage=r.optionsPerPage||10;this.value=(this.choices[this.cursor]||{}).value;this.clear=h("",this.out.columns);this.render()}moveCursor(r){this.cursor=r;this.value=this.choices[r].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0){this.moveCursor(this.choices.length-1)}else{this.moveCursor(this.cursor-1)}this.render()}down(){if(this.cursor===this.choices.length-1){this.moveCursor(0)}else{this.moveCursor(this.cursor+1)}this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(r,i){if(r===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(y.hide);else this.out.write(h(this.outputText,this.out.columns));super.render();let r=m(this.cursor,this.choices.length,this.optionsPerPage),i=r.startIndex,o=r.endIndex;this.outputText=[c.symbol(this.done,this.aborted),a.bold(this.msg),c.delimiter(false),this.done?this.selection.title:this.selection.disabled?a.yellow(this.warn):a.gray(this.hint)].join(" ");if(!this.done){this.outputText+="\n";for(let r=i;r<o;r++){let l,u,c="",h=this.choices[r];if(r===i&&i>0){u=d.arrowUp}else if(r===o-1&&o<this.choices.length){u=d.arrowDown}else{u=" "}if(h.disabled){l=this.cursor===r?a.gray().underline(h.title):a.strikethrough().gray(h.title);u=(this.cursor===r?a.bold().gray(d.pointer)+" ":" ")+u}else{l=this.cursor===r?a.cyan().underline(h.title):h.title;u=(this.cursor===r?a.cyan(d.pointer)+" ":" ")+u;if(h.description&&this.cursor===r){c=` - ${h.description}`;if(u.length+l.length+c.length>=this.out.columns||h.description.split(/\r?\n/).length>1){c="\n"+p(h.description,{margin:3,width:this.out.columns})}}}this.outputText+=`${u} ${l}${a.gray(c)}\n`}}this.out.write(this.outputText)}}r.exports=SelectPrompt},5430:(r,i,o)=>{"use strict";function asyncGeneratorStep(r,i,o,a,l,u,c){try{var h=r[u](c);var d=h.value}catch(r){o(r);return}if(h.done){i(d)}else{Promise.resolve(d).then(a,l)}}function _asyncToGenerator(r){return function(){var i=this,o=arguments;return new Promise((function(a,l){var u=r.apply(i,o);function _next(r){asyncGeneratorStep(u,a,l,_next,_throw,"next",r)}function _throw(r){asyncGeneratorStep(u,a,l,_next,_throw,"throw",r)}_next(undefined)}))}}const a=o(9439);const l=o(5876);const u=o(332),c=u.erase,h=u.cursor;const d=o(7483),p=d.style,m=d.clear,g=d.lines,y=d.figures;class TextPrompt extends l{constructor(r={}){super(r);this.transform=p.render(r.style);this.scale=this.transform.scale;this.msg=r.message;this.initial=r.initial||``;this.validator=r.validate||(()=>true);this.value=``;this.errorMsg=r.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.clear=m(``,this.out.columns);this.render()}set value(r){if(!r&&this.initial){this.placeholder=true;this.rendered=a.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(r)}this._value=r;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.fire();this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var r=this;return _asyncToGenerator((function*(){let i=yield r.validator(r.value);if(typeof i===`string`){r.errorMsg=i;i=false}r.error=!i}))()}submit(){var r=this;return _asyncToGenerator((function*(){r.value=r.value||r.initial;r.cursorOffset=0;r.cursor=r.rendered.length;yield r.validate();if(r.error){r.red=true;r.fire();r.render();return}r.done=true;r.aborted=false;r.fire();r.render();r.out.write("\n");r.close()}))()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(r){if(this.placeholder)return;this.cursor=this.cursor+r;this.cursorOffset+=r}_(r,i){let o=this.value.slice(0,this.cursor);let a=this.value.slice(this.cursor);this.value=`${o}${r}${a}`;this.red=false;this.cursor=this.placeholder?0:o.length+1;this.render()}delete(){if(this.isCursorAtStart())return this.bell();let r=this.value.slice(0,this.cursor-1);let i=this.value.slice(this.cursor);this.value=`${r}${i}`;this.red=false;if(this.isCursorAtStart()){this.cursorOffset=0}else{this.cursorOffset++;this.moveCursor(-1)}this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let r=this.value.slice(0,this.cursor);let i=this.value.slice(this.cursor+1);this.value=`${r}${i}`;this.red=false;if(this.isCursorAtEnd()){this.cursorOffset=0}else{this.cursorOffset++}this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(h.down(g(this.outputError,this.out.columns)-1)+m(this.outputError,this.out.columns));this.out.write(m(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[p.symbol(this.done,this.aborted),a.bold(this.msg),p.delimiter(this.done),this.red?a.red(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((r,i,o)=>r+`\n${o?" ":y.pointerSmall} ${a.red().italic(i)}`),``)}this.out.write(c.line+h.to(0)+this.outputText+h.save+this.outputError+h.restore+h.move(this.cursorOffset,0))}}r.exports=TextPrompt},9692:(r,i,o)=>{"use strict";const a=o(9439);const l=o(5876);const u=o(7483),c=u.style,h=u.clear;const d=o(332),p=d.cursor,m=d.erase;class TogglePrompt extends l{constructor(r={}){super(r);this.msg=r.message;this.value=!!r.initial;this.active=r.active||"on";this.inactive=r.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(r,i){if(r===" "){this.value=!this.value}else if(r==="1"){this.value=true}else if(r==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(p.hide);else this.out.write(h(this.outputText,this.out.columns));super.render();this.outputText=[c.symbol(this.done,this.aborted),a.bold(this.msg),c.delimiter(this.done),this.value?this.inactive:a.cyan().underline(this.inactive),a.gray("/"),this.value?a.cyan().underline(this.active):this.active].join(" ");this.out.write(m.line+p.to(0)+this.outputText)}}r.exports=TogglePrompt},6598:(r,i,o)=>{"use strict";function ownKeys(r,i){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);if(i){a=a.filter((function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))}o.push.apply(o,a)}return o}function _objectSpread(r){for(var i=1;i<arguments.length;i++){var o=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(o),true).forEach((function(i){_defineProperty(r,i,o[i])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(r,Object.getOwnPropertyDescriptors(o))}else{ownKeys(Object(o)).forEach((function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(o,i))}))}}return r}function _defineProperty(r,i,o){if(i in r){Object.defineProperty(r,i,{value:o,enumerable:true,configurable:true,writable:true})}else{r[i]=o}return r}function _createForOfIteratorHelper(r,i){var o=typeof Symbol!=="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(!o){if(Array.isArray(r)||(o=_unsupportedIterableToArray(r))||i&&r&&typeof r.length==="number"){if(o)r=o;var a=0;var l=function F(){};return{s:l,n:function n(){if(a>=r.length)return{done:true};return{done:false,value:r[a++]}},e:function e(r){throw r},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u=true,c=false,h;return{s:function s(){o=o.call(r)},n:function n(){var r=o.next();u=r.done;return r},e:function e(r){c=true;h=r},f:function f(){try{if(!u&&o.return!=null)o.return()}finally{if(c)throw h}}}}function _unsupportedIterableToArray(r,i){if(!r)return;if(typeof r==="string")return _arrayLikeToArray(r,i);var o=Object.prototype.toString.call(r).slice(8,-1);if(o==="Object"&&r.constructor)o=r.constructor.name;if(o==="Map"||o==="Set")return Array.from(r);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return _arrayLikeToArray(r,i)}function _arrayLikeToArray(r,i){if(i==null||i>r.length)i=r.length;for(var o=0,a=new Array(i);o<i;o++)a[o]=r[o];return a}function asyncGeneratorStep(r,i,o,a,l,u,c){try{var h=r[u](c);var d=h.value}catch(r){o(r);return}if(h.done){i(d)}else{Promise.resolve(d).then(a,l)}}function _asyncToGenerator(r){return function(){var i=this,o=arguments;return new Promise((function(a,l){var u=r.apply(i,o);function _next(r){asyncGeneratorStep(u,a,l,_next,_throw,"next",r)}function _throw(r){asyncGeneratorStep(u,a,l,_next,_throw,"throw",r)}_next(undefined)}))}}const a=o(4591);const l=["suggest","format","onState","validate","onRender","type"];const noop=()=>{};function prompt(){return _prompt.apply(this,arguments)}function _prompt(){_prompt=_asyncToGenerator((function*(r=[],{onSubmit:i=noop,onCancel:o=noop}={}){const u={};const c=prompt._override||{};r=[].concat(r);let h,d,p,m,g,y;const v=function(){var r=_asyncToGenerator((function*(r,i,o=false){if(!o&&r.validate&&r.validate(i)!==true){return}return r.format?yield r.format(i,u):i}));return function getFormattedAnswer(i,o){return r.apply(this,arguments)}}();var b=_createForOfIteratorHelper(r),w;try{for(b.s();!(w=b.n()).done;){d=w.value;var M=d;m=M.name;g=M.type;if(typeof g==="function"){g=yield g(h,_objectSpread({},u),d);d["type"]=g}if(!g)continue;for(let r in d){if(l.includes(r))continue;let i=d[r];d[r]=typeof i==="function"?yield i(h,_objectSpread({},u),y):i}y=d;if(typeof d.message!=="string"){throw new Error("prompt message is required")}var E=d;m=E.name;g=E.type;if(a[g]===void 0){throw new Error(`prompt type (${g}) is not defined`)}if(c[d.name]!==undefined){h=yield v(d,c[d.name]);if(h!==undefined){u[m]=h;continue}}try{h=prompt._injected?getInjectedAnswer(prompt._injected,d.initial):yield a[g](d);u[m]=h=yield v(d,h,true);p=yield i(d,h,u)}catch(r){p=!(yield o(d,u))}if(p)return u}}catch(r){b.e(r)}finally{b.f()}return u}));return _prompt.apply(this,arguments)}function getInjectedAnswer(r,i){const o=r.shift();if(o instanceof Error){throw o}return o===undefined?i:o}function inject(r){prompt._injected=(prompt._injected||[]).concat(r)}function override(r){prompt._override=Object.assign({},r)}r.exports=Object.assign(prompt,{prompt:prompt,prompts:a,inject:inject,override:override})},4591:(r,i,o)=>{"use strict";const a=i;const l=o(9956);const noop=r=>r;function toPrompt(r,i,o={}){return new Promise(((a,u)=>{const c=new l[r](i);const h=o.onAbort||noop;const d=o.onSubmit||noop;const p=o.onExit||noop;c.on("state",i.onState||noop);c.on("submit",(r=>a(d(r))));c.on("exit",(r=>a(p(r))));c.on("abort",(r=>u(h(r))))}))}a.text=r=>toPrompt("TextPrompt",r);a.password=r=>{r.style="password";return a.text(r)};a.invisible=r=>{r.style="invisible";return a.text(r)};a.number=r=>toPrompt("NumberPrompt",r);a.date=r=>toPrompt("DatePrompt",r);a.confirm=r=>toPrompt("ConfirmPrompt",r);a.list=r=>{const i=r.separator||",";return toPrompt("TextPrompt",r,{onSubmit:r=>r.split(i).map((r=>r.trim()))})};a.toggle=r=>toPrompt("TogglePrompt",r);a.select=r=>toPrompt("SelectPrompt",r);a.multiselect=r=>{r.choices=[].concat(r.choices||[]);const toSelected=r=>r.filter((r=>r.selected)).map((r=>r.value));return toPrompt("MultiselectPrompt",r,{onAbort:toSelected,onSubmit:toSelected})};a.autocompleteMultiselect=r=>{r.choices=[].concat(r.choices||[]);const toSelected=r=>r.filter((r=>r.selected)).map((r=>r.value));return toPrompt("AutocompleteMultiselectPrompt",r,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(r,i)=>Promise.resolve(i.filter((i=>i.title.slice(0,r.length).toLowerCase()===r.toLowerCase())));a.autocomplete=r=>{r.suggest=r.suggest||byTitle;r.choices=[].concat(r.choices||[]);return toPrompt("AutocompletePrompt",r)}},8692:r=>{"use strict";r.exports=(r,i)=>{if(r.meta&&r.name!=="escape")return;if(r.ctrl){if(r.name==="a")return"first";if(r.name==="c")return"abort";if(r.name==="d")return"abort";if(r.name==="e")return"last";if(r.name==="g")return"reset"}if(i){if(r.name==="j")return"down";if(r.name==="k")return"up"}if(r.name==="return")return"submit";if(r.name==="enter")return"submit";if(r.name==="backspace")return"delete";if(r.name==="delete")return"deleteForward";if(r.name==="abort")return"abort";if(r.name==="escape")return"exit";if(r.name==="tab")return"next";if(r.name==="pagedown")return"nextPage";if(r.name==="pageup")return"prevPage";if(r.name==="home")return"home";if(r.name==="end")return"end";if(r.name==="up")return"up";if(r.name==="down")return"down";if(r.name==="right")return"right";if(r.name==="left")return"left";return false}},3513:(r,i,o)=>{"use strict";function _createForOfIteratorHelper(r,i){var o=typeof Symbol!=="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(!o){if(Array.isArray(r)||(o=_unsupportedIterableToArray(r))||i&&r&&typeof r.length==="number"){if(o)r=o;var a=0;var l=function F(){};return{s:l,n:function n(){if(a>=r.length)return{done:true};return{done:false,value:r[a++]}},e:function e(r){throw r},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u=true,c=false,h;return{s:function s(){o=o.call(r)},n:function n(){var r=o.next();u=r.done;return r},e:function e(r){c=true;h=r},f:function f(){try{if(!u&&o.return!=null)o.return()}finally{if(c)throw h}}}}function _unsupportedIterableToArray(r,i){if(!r)return;if(typeof r==="string")return _arrayLikeToArray(r,i);var o=Object.prototype.toString.call(r).slice(8,-1);if(o==="Object"&&r.constructor)o=r.constructor.name;if(o==="Map"||o==="Set")return Array.from(r);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return _arrayLikeToArray(r,i)}function _arrayLikeToArray(r,i){if(i==null||i>r.length)i=r.length;for(var o=0,a=new Array(i);o<i;o++)a[o]=r[o];return a}const a=o(8760);const l=o(332),u=l.erase,c=l.cursor;const width=r=>[...a(r)].length;r.exports=function(r,i){if(!i)return u.line+c.to(0);let o=0;const a=r.split(/\r?\n/);var l=_createForOfIteratorHelper(a),h;try{for(l.s();!(h=l.n()).done;){let r=h.value;o+=1+Math.floor(Math.max(width(r)-1,0)/i)}}catch(r){l.e(r)}finally{l.f()}return u.lines(o)}},393:r=>{"use strict";r.exports=(r,i,o)=>{o=o||i;let a=Math.min(i-o,r-Math.floor(o/2));if(a<0)a=0;let l=Math.min(a+o,i);return{startIndex:a,endIndex:l}}},6217:r=>{"use strict";const i={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const o={arrowUp:i.arrowUp,arrowDown:i.arrowDown,arrowLeft:i.arrowLeft,arrowRight:i.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const a=process.platform==="win32"?o:i;r.exports=a},7483:(r,i,o)=>{"use strict";r.exports={action:o(8692),clear:o(3513),style:o(5012),strip:o(8760),figures:o(6217),lines:o(1688),wrap:o(1705),entriesToDisplay:o(393)}},1688:(r,i,o)=>{"use strict";const a=o(8760);r.exports=function(r,i){let o=String(a(r)||"").split(/\r?\n/);if(!i)return o.length;return o.map((r=>Math.ceil(r.length/i))).reduce(((r,i)=>r+i))}},8760:r=>{"use strict";r.exports=r=>{const i=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const o=new RegExp(i,"g");return typeof r==="string"?r.replace(o,""):r}},5012:(r,i,o)=>{"use strict";const a=o(9439);const l=o(6217);const u=Object.freeze({password:{scale:1,render:r=>"*".repeat(r.length)},emoji:{scale:2,render:r=>"😃".repeat(r.length)},invisible:{scale:0,render:r=>""},default:{scale:1,render:r=>`${r}`}});const render=r=>u[r]||u.default;const c=Object.freeze({aborted:a.red(l.cross),done:a.green(l.tick),exited:a.yellow(l.cross),default:a.cyan("?")});const symbol=(r,i,o)=>i?c.aborted:o?c.exited:r?c.done:c.default;const delimiter=r=>a.gray(r?l.ellipsis:l.pointerSmall);const item=(r,i)=>a.gray(r?i?l.pointerSmall:"+":l.line);r.exports={styles:u,render:render,symbols:c,symbol:symbol,delimiter:delimiter,item:item}},1705:r=>{"use strict";r.exports=(r,i={})=>{const o=Number.isSafeInteger(parseInt(i.margin))?new Array(parseInt(i.margin)).fill(" ").join(""):i.margin||"";const a=i.width;return(r||"").split(/\r?\n/g).map((r=>r.split(/\s+/g).reduce(((r,i)=>{if(i.length+o.length>=a||r[r.length-1].length+i.length+1<a)r[r.length-1]+=` ${i}`;else r.push(`${o}${i}`);return r}),[o]).join("\n"))).join("\n")}},1112:(r,i,o)=>{function isNodeLT(r){r=(Array.isArray(r)?r:r.split(".")).map(Number);let i=0,o=process.versions.node.split(".").map(Number);for(;i<r.length;i++){if(o[i]>r[i])return false;if(r[i]>o[i])return true}return false}r.exports=isNodeLT("8.6.0")?o(6598):o(9590)},8994:r=>{"use strict";class DatePart{constructor({token:r,date:i,parts:o,locales:a}){this.token=r;this.date=i||new Date;this.parts=o||[this];this.locales=a||{}}up(){}down(){}next(){const r=this.parts.indexOf(this);return this.parts.find(((i,o)=>o>r&&i instanceof DatePart))}setTo(r){}prev(){let r=[].concat(this.parts).reverse();const i=r.indexOf(this);return r.find(((r,o)=>o>i&&r instanceof DatePart))}toString(){return String(this.date)}}r.exports=DatePart},5513:(r,i,o)=>{"use strict";const a=o(8994);const pos=r=>{r=r%10;return r===1?"st":r===2?"nd":r===3?"rd":"th"};class Day extends a{constructor(r={}){super(r)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(r){this.date.setDate(parseInt(r.substr(-2)))}toString(){let r=this.date.getDate();let i=this.date.getDay();return this.token==="DD"?String(r).padStart(2,"0"):this.token==="Do"?r+pos(r):this.token==="d"?i+1:this.token==="ddd"?this.locales.weekdaysShort[i]:this.token==="dddd"?this.locales.weekdays[i]:r}}r.exports=Day},9270:(r,i,o)=>{"use strict";const a=o(8994);class Hours extends a{constructor(r={}){super(r)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(r){this.date.setHours(parseInt(r.substr(-2)))}toString(){let r=this.date.getHours();if(/h/.test(this.token))r=r%12||12;return this.token.length>1?String(r).padStart(2,"0"):r}}r.exports=Hours},1190:(r,i,o)=>{"use strict";r.exports={DatePart:o(8994),Meridiem:o(8135),Day:o(5513),Hours:o(9270),Milliseconds:o(2397),Minutes:o(9246),Month:o(5763),Seconds:o(5579),Year:o(4191)}},8135:(r,i,o)=>{"use strict";const a=o(8994);class Meridiem extends a{constructor(r={}){super(r)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let r=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?r.toUpperCase():r}}r.exports=Meridiem},2397:(r,i,o)=>{"use strict";const a=o(8994);class Milliseconds extends a{constructor(r={}){super(r)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(r){this.date.setMilliseconds(parseInt(r.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}r.exports=Milliseconds},9246:(r,i,o)=>{"use strict";const a=o(8994);class Minutes extends a{constructor(r={}){super(r)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(r){this.date.setMinutes(parseInt(r.substr(-2)))}toString(){let r=this.date.getMinutes();return this.token.length>1?String(r).padStart(2,"0"):r}}r.exports=Minutes},5763:(r,i,o)=>{"use strict";const a=o(8994);class Month extends a{constructor(r={}){super(r)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(r){r=parseInt(r.substr(-2))-1;this.date.setMonth(r<0?0:r)}toString(){let r=this.date.getMonth();let i=this.token.length;return i===2?String(r+1).padStart(2,"0"):i===3?this.locales.monthsShort[r]:i===4?this.locales.months[r]:String(r+1)}}r.exports=Month},5579:(r,i,o)=>{"use strict";const a=o(8994);class Seconds extends a{constructor(r={}){super(r)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(r){this.date.setSeconds(parseInt(r.substr(-2)))}toString(){let r=this.date.getSeconds();return this.token.length>1?String(r).padStart(2,"0"):r}}r.exports=Seconds},4191:(r,i,o)=>{"use strict";const a=o(8994);class Year extends a{constructor(r={}){super(r)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(r){this.date.setFullYear(r.substr(-4))}toString(){let r=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?r.substr(-2):r}}r.exports=Year},514:(r,i,o)=>{"use strict";const a=o(9439);const l=o(9126);const{erase:u,cursor:c}=o(332);const{style:h,clear:d,figures:p,wrap:m,entriesToDisplay:g}=o(9807);const getVal=(r,i)=>r[i]&&(r[i].value||r[i].title||r[i]);const getTitle=(r,i)=>r[i]&&(r[i].title||r[i].value||r[i]);const getIndex=(r,i)=>{const o=r.findIndex((r=>r.value===i||r.title===i));return o>-1?o:undefined};class AutocompletePrompt extends l{constructor(r={}){super(r);this.msg=r.message;this.suggest=r.suggest;this.choices=r.choices;this.initial=typeof r.initial==="number"?r.initial:getIndex(r.choices,r.initial);this.select=this.initial||r.cursor||0;this.i18n={noMatches:r.noMatches||"no matches found"};this.fallback=r.fallback||this.initial;this.clearFirst=r.clearFirst||false;this.suggestions=[];this.input="";this.limit=r.limit||10;this.cursor=0;this.transform=h.render(r.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=d("",this.out.columns);this.complete(this.render);this.render()}set fallback(r){this._fb=Number.isSafeInteger(parseInt(r))?parseInt(r):r}get fallback(){let r;if(typeof this._fb==="number")r=this.choices[this._fb];else if(typeof this._fb==="string")r={title:this._fb};return r||this._fb||{title:this.i18n.noMatches}}moveSelect(r){this.select=r;if(this.suggestions.length>0)this.value=getVal(this.suggestions,r);else this.value=this.fallback.value;this.fire()}async complete(r){const i=this.completing=this.suggest(this.input,this.choices);const o=await i;if(this.completing!==i)return;this.suggestions=o.map(((r,i,o)=>({title:getTitle(o,i),value:getVal(o,i),description:r.description})));this.completing=false;const a=Math.max(o.length-1,0);this.moveSelect(Math.min(a,this.select));r&&r()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}exit(){if(this.clearFirst&&this.input.length>0){this.reset()}else{this.done=this.exited=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}abort(){this.done=this.aborted=true;this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}_(r,i){let o=this.input.slice(0,this.cursor);let a=this.input.slice(this.cursor);this.input=`${o}${r}${a}`;this.cursor=o.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let r=this.input.slice(0,this.cursor-1);let i=this.input.slice(this.cursor);this.input=`${r}${i}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let r=this.input.slice(0,this.cursor);let i=this.input.slice(this.cursor+1);this.input=`${r}${i}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions.length-1);this.render()}up(){if(this.select===0){this.moveSelect(this.suggestions.length-1)}else{this.moveSelect(this.select-1)}this.render()}down(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else{this.moveSelect(this.select+1)}this.render()}next(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1));this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0));this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}renderOption(r,i,o,l){let u;let c=o?p.arrowUp:l?p.arrowDown:" ";let h=i?a.cyan().underline(r.title):r.title;c=(i?a.cyan(p.pointer)+" ":" ")+c;if(r.description){u=` - ${r.description}`;if(c.length+h.length+u.length>=this.out.columns||r.description.split(/\r?\n/).length>1){u="\n"+m(r.description,{margin:3,width:this.out.columns})}}return c+" "+h+a.gray(u||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(c.hide);else this.out.write(d(this.outputText,this.out.columns));super.render();let{startIndex:r,endIndex:i}=g(this.select,this.choices.length,this.limit);this.outputText=[h.symbol(this.done,this.aborted,this.exited),a.bold(this.msg),h.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" ");if(!this.done){const o=this.suggestions.slice(r,i).map(((o,a)=>this.renderOption(o,this.select===a+r,a===0&&r>0,a+r===i-1&&i<this.choices.length))).join("\n");this.outputText+=`\n`+(o||a.gray(this.fallback.title))}this.out.write(u.line+c.to(0)+this.outputText)}}r.exports=AutocompletePrompt},7685:(r,i,o)=>{"use strict";const a=o(9439);const{cursor:l}=o(332);const u=o(92);const{clear:c,style:h,figures:d}=o(9807);class AutocompleteMultiselectPrompt extends u{constructor(r={}){r.overrideRender=true;super(r);this.inputValue="";this.clear=c("",this.out.columns);this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((r=>r.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const r=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((r=>{if(this.inputValue){if(typeof r.title==="string"){if(r.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof r.value==="string"){if(r.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const i=this.filteredOptions.findIndex((i=>i===r));this.cursor=i<0?0:i;this.render()}handleSpaceToggle(){const r=this.filteredOptions[this.cursor];if(r.selected){r.selected=false;this.render()}else if(r.disabled||this.value.filter((r=>r.selected)).length>=this.maxChoices){return this.bell()}else{r.selected=true;this.render()}}handleInputChange(r){this.inputValue=this.inputValue+r;this.updateFilteredOptions()}_(r,i){if(r===" "){this.handleSpaceToggle()}else{this.handleInputChange(r)}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return`\nInstructions:\n ${d.arrowUp}/${d.arrowDown}: Highlight option\n ${d.arrowLeft}/${d.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`}return""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:a.gray("Enter something to filter")}\n`}renderOption(r,i,o){let l;if(i.disabled)l=r===o?a.gray().underline(i.title):a.strikethrough().gray(i.title);else l=r===o?a.cyan().underline(i.title):i.title;return(i.selected?a.green(d.radioOn):d.radioOff)+" "+l}renderDoneOrInstructions(){if(this.done){return this.value.filter((r=>r.selected)).map((r=>r.title)).join(", ")}const r=[a.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){r.push(a.yellow(this.warn))}return r.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(l.hide);super.render();let r=[h.symbol(this.done,this.aborted),a.bold(this.msg),h.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){r+=a.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}r+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+r);this.clear=c(r,this.out.columns)}}r.exports=AutocompleteMultiselectPrompt},3037:(r,i,o)=>{const a=o(9439);const l=o(9126);const{style:u,clear:c}=o(9807);const{erase:h,cursor:d}=o(332);class ConfirmPrompt extends l{constructor(r={}){super(r);this.msg=r.message;this.value=r.initial;this.initialValue=!!r.initial;this.yesMsg=r.yes||"yes";this.yesOption=r.yesOption||"(Y/n)";this.noMsg=r.no||"no";this.noOption=r.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(r,i){if(r.toLowerCase()==="y"){this.value=true;return this.submit()}if(r.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(d.hide);else this.out.write(c(this.outputText,this.out.columns));super.render();this.outputText=[u.symbol(this.done,this.aborted),a.bold(this.msg),u.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:a.gray(this.initialValue?this.yesOption:this.noOption)].join(" ");this.out.write(h.line+d.to(0)+this.outputText)}}r.exports=ConfirmPrompt},5048:(r,i,o)=>{"use strict";const a=o(9439);const l=o(9126);const{style:u,clear:c,figures:h}=o(9807);const{erase:d,cursor:p}=o(332);const{DatePart:m,Meridiem:g,Day:y,Hours:v,Milliseconds:b,Minutes:w,Month:M,Seconds:E,Year:D}=o(1190);const T=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const x={1:({token:r})=>r.replace(/\\(.)/g,"$1"),2:r=>new y(r),3:r=>new M(r),4:r=>new D(r),5:r=>new g(r),6:r=>new v(r),7:r=>new w(r),8:r=>new E(r),9:r=>new b(r)};const O={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends l{constructor(r={}){super(r);this.msg=r.message;this.cursor=0;this.typed="";this.locales=Object.assign(O,r.locales);this._date=r.initial||new Date;this.errorMsg=r.error||"Please Enter A Valid Value";this.validator=r.validate||(()=>true);this.mask=r.mask||"YYYY-MM-DD HH:mm:ss";this.clear=c("",this.out.columns);this.render()}get value(){return this.date}get date(){return this._date}set date(r){if(r)this._date.setTime(r.getTime())}set mask(r){let i;this.parts=[];while(i=T.exec(r)){let r=i.shift();let o=i.findIndex((r=>r!=null));this.parts.push(o in x?x[o]({token:i[o]||r,date:this.date,parts:this.parts,locales:this.locales}):i[o]||r)}let o=this.parts.reduce(((r,i)=>{if(typeof i==="string"&&typeof r[r.length-1]==="string")r[r.length-1]+=i;else r.push(i);return r}),[]);this.parts.splice(0);this.parts.push(...o);this.reset()}moveCursor(r){this.typed="";this.cursor=r;this.fire()}reset(){this.moveCursor(this.parts.findIndex((r=>r instanceof m)));this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let r=await this.validator(this.value);if(typeof r==="string"){this.errorMsg=r;r=false}this.error=!r}async submit(){await this.validate();if(this.error){this.color="red";this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let r=this.parts[this.cursor].prev();if(r==null)return this.bell();this.moveCursor(this.parts.indexOf(r));this.render()}right(){let r=this.parts[this.cursor].next();if(r==null)return this.bell();this.moveCursor(this.parts.indexOf(r));this.render()}next(){let r=this.parts[this.cursor].next();this.moveCursor(r?this.parts.indexOf(r):this.parts.findIndex((r=>r instanceof m)));this.render()}_(r){if(/\d/.test(r)){this.typed+=r;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(p.hide);else this.out.write(c(this.outputText,this.out.columns));super.render();this.outputText=[u.symbol(this.done,this.aborted),a.bold(this.msg),u.delimiter(false),this.parts.reduce(((r,i,o)=>r.concat(o===this.cursor&&!this.done?a.cyan().underline(i.toString()):i)),[]).join("")].join(" ");if(this.error){this.outputText+=this.errorMsg.split("\n").reduce(((r,i,o)=>r+`\n${o?` `:h.pointerSmall} ${a.red().italic(i)}`),``)}this.out.write(d.line+p.to(0)+this.outputText)}}r.exports=DatePrompt},6529:(r,i,o)=>{"use strict";r.exports={TextPrompt:o(1551),SelectPrompt:o(6515),TogglePrompt:o(181),DatePrompt:o(5048),NumberPrompt:o(3686),MultiselectPrompt:o(92),AutocompletePrompt:o(514),AutocompleteMultiselectPrompt:o(7685),ConfirmPrompt:o(3037)}},92:(r,i,o)=>{"use strict";const a=o(9439);const{cursor:l}=o(332);const u=o(9126);const{clear:c,figures:h,style:d,wrap:p,entriesToDisplay:m}=o(9807);class MultiselectPrompt extends u{constructor(r={}){super(r);this.msg=r.message;this.cursor=r.cursor||0;this.scrollIndex=r.cursor||0;this.hint=r.hint||"";this.warn=r.warn||"- This option is disabled -";this.minSelected=r.min;this.showMinError=false;this.maxChoices=r.max;this.instructions=r.instructions;this.optionsPerPage=r.optionsPerPage||10;this.value=r.choices.map(((r,i)=>{if(typeof r==="string")r={title:r,value:i};return{title:r&&(r.title||r.value||r),description:r&&r.description,value:r&&(r.value===undefined?i:r.value),selected:r&&r.selected,disabled:r&&r.disabled}}));this.clear=c("",this.out.columns);if(!r.overrideRender){this.render()}}reset(){this.value.map((r=>!r.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((r=>r.selected))}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const r=this.value.filter((r=>r.selected));if(this.minSelected&&r.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((r=>r.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const r=this.value[this.cursor];if(r.selected){r.selected=false;this.render()}else if(r.disabled||this.value.filter((r=>r.selected)).length>=this.maxChoices){return this.bell()}else{r.selected=true;this.render()}}toggleAll(){if(this.maxChoices!==undefined||this.value[this.cursor].disabled){return this.bell()}const r=!this.value[this.cursor].selected;this.value.filter((r=>!r.disabled)).forEach((i=>i.selected=r));this.render()}_(r,i){if(r===" "){this.handleSpaceToggle()}else if(r==="a"){this.toggleAll()}else{return this.bell()}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return"\nInstructions:\n"+` ${h.arrowUp}/${h.arrowDown}: Highlight option\n`+` ${h.arrowLeft}/${h.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===undefined?` a: Toggle all\n`:"")+` enter/return: Complete answer`}return""}renderOption(r,i,o,l){const u=(i.selected?a.green(h.radioOn):h.radioOff)+" "+l+" ";let c,d;if(i.disabled){c=r===o?a.gray().underline(i.title):a.strikethrough().gray(i.title)}else{c=r===o?a.cyan().underline(i.title):i.title;if(r===o&&i.description){d=` - ${i.description}`;if(u.length+c.length+d.length>=this.out.columns||i.description.split(/\r?\n/).length>1){d="\n"+p(i.description,{margin:u.length,width:this.out.columns})}}}return u+c+a.gray(d||"")}paginateOptions(r){if(r.length===0){return a.red("No matches for this query.")}let{startIndex:i,endIndex:o}=m(this.cursor,r.length,this.optionsPerPage);let l,u=[];for(let a=i;a<o;a++){if(a===i&&i>0){l=h.arrowUp}else if(a===o-1&&o<r.length){l=h.arrowDown}else{l=" "}u.push(this.renderOption(this.cursor,r[a],a,l))}return"\n"+u.join("\n")}renderOptions(r){if(!this.done){return this.paginateOptions(r)}return""}renderDoneOrInstructions(){if(this.done){return this.value.filter((r=>r.selected)).map((r=>r.title)).join(", ")}const r=[a.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){r.push(a.yellow(this.warn))}return r.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(l.hide);super.render();let r=[d.symbol(this.done,this.aborted),a.bold(this.msg),d.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){r+=a.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}r+=this.renderOptions(this.value);this.out.write(this.clear+r);this.clear=c(r,this.out.columns)}}r.exports=MultiselectPrompt},3686:(r,i,o)=>{const a=o(9439);const l=o(9126);const{cursor:u,erase:c}=o(332);const{style:h,figures:d,clear:p,lines:m}=o(9807);const g=/[0-9]/;const isDef=r=>r!==undefined;const round=(r,i)=>{let o=Math.pow(10,i);return Math.round(r*o)/o};class NumberPrompt extends l{constructor(r={}){super(r);this.transform=h.render(r.style);this.msg=r.message;this.initial=isDef(r.initial)?r.initial:"";this.float=!!r.float;this.round=r.round||2;this.inc=r.increment||1;this.min=isDef(r.min)?r.min:-Infinity;this.max=isDef(r.max)?r.max:Infinity;this.errorMsg=r.error||`Please Enter A Valid Value`;this.validator=r.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(r){if(!r&&r!==0){this.placeholder=true;this.rendered=a.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(r,this.round)}`);this._value=round(r,this.round)}this.fire()}get value(){return this._value}parse(r){return this.float?parseFloat(r):parseInt(r)}valid(r){return r===`-`||r===`.`&&this.float||g.test(r)}reset(){this.typed=``;this.value=``;this.fire();this.render()}exit(){this.abort()}abort(){let r=this.value;this.value=r!==``?r:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}async validate(){let r=await this.validator(this.value);if(typeof r===`string`){this.errorMsg=r;r=false}this.error=!r}async submit(){await this.validate();if(this.error){this.color=`red`;this.fire();this.render();return}let r=this.value;this.value=r!==``?r:this.initial;this.done=true;this.aborted=false;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}up(){this.typed=``;if(this.value===""){this.value=this.min-this.inc}if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value===""){this.value=this.min+this.inc}if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let r=this.value.toString();if(r.length===0)return this.bell();this.value=this.parse(r=r.slice(0,-1))||``;if(this.value!==""&&this.value<this.min){this.value=this.min}this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(r,i){if(!this.valid(r))return this.bell();const o=Date.now();if(o-this.lastHit>1e3)this.typed=``;this.typed+=r;this.lastHit=o;this.color=`cyan`;if(r===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(u.down(m(this.outputError,this.out.columns)-1)+p(this.outputError,this.out.columns));this.out.write(p(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[h.symbol(this.done,this.aborted),a.bold(this.msg),h.delimiter(this.done),!this.done||!this.done&&!this.placeholder?a[this.color]().underline(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((r,i,o)=>r+`\n${o?` `:d.pointerSmall} ${a.red().italic(i)}`),``)}this.out.write(c.line+u.to(0)+this.outputText+u.save+this.outputError+u.restore)}}r.exports=NumberPrompt},9126:(r,i,o)=>{"use strict";const a=o(4521);const{action:l}=o(9807);const u=o(2361);const{beep:c,cursor:h}=o(332);const d=o(9439);class Prompt extends u{constructor(r={}){super();this.firstRender=true;this.in=r.stdin||process.stdin;this.out=r.stdout||process.stdout;this.onRender=(r.onRender||(()=>void 0)).bind(this);const i=a.createInterface({input:this.in,escapeCodeTimeout:50});a.emitKeypressEvents(this.in,i);if(this.in.isTTY)this.in.setRawMode(true);const o=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1;const keypress=(r,i)=>{let a=l(i,o);if(a===false){this._&&this._(r,i)}else if(typeof this[a]==="function"){this[a](i)}else{this.bell()}};this.close=()=>{this.out.write(h.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);i.close();this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(c)}render(){this.onRender(d);if(this.firstRender)this.firstRender=false}}r.exports=Prompt},6515:(r,i,o)=>{"use strict";const a=o(9439);const l=o(9126);const{style:u,clear:c,figures:h,wrap:d,entriesToDisplay:p}=o(9807);const{cursor:m}=o(332);class SelectPrompt extends l{constructor(r={}){super(r);this.msg=r.message;this.hint=r.hint||"- Use arrow-keys. Return to submit.";this.warn=r.warn||"- This option is disabled";this.cursor=r.initial||0;this.choices=r.choices.map(((r,i)=>{if(typeof r==="string")r={title:r,value:i};return{title:r&&(r.title||r.value||r),value:r&&(r.value===undefined?i:r.value),description:r&&r.description,selected:r&&r.selected,disabled:r&&r.disabled}}));this.optionsPerPage=r.optionsPerPage||10;this.value=(this.choices[this.cursor]||{}).value;this.clear=c("",this.out.columns);this.render()}moveCursor(r){this.cursor=r;this.value=this.choices[r].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0){this.moveCursor(this.choices.length-1)}else{this.moveCursor(this.cursor-1)}this.render()}down(){if(this.cursor===this.choices.length-1){this.moveCursor(0)}else{this.moveCursor(this.cursor+1)}this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(r,i){if(r===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(m.hide);else this.out.write(c(this.outputText,this.out.columns));super.render();let{startIndex:r,endIndex:i}=p(this.cursor,this.choices.length,this.optionsPerPage);this.outputText=[u.symbol(this.done,this.aborted),a.bold(this.msg),u.delimiter(false),this.done?this.selection.title:this.selection.disabled?a.yellow(this.warn):a.gray(this.hint)].join(" ");if(!this.done){this.outputText+="\n";for(let o=r;o<i;o++){let l,u,c="",p=this.choices[o];if(o===r&&r>0){u=h.arrowUp}else if(o===i-1&&i<this.choices.length){u=h.arrowDown}else{u=" "}if(p.disabled){l=this.cursor===o?a.gray().underline(p.title):a.strikethrough().gray(p.title);u=(this.cursor===o?a.bold().gray(h.pointer)+" ":" ")+u}else{l=this.cursor===o?a.cyan().underline(p.title):p.title;u=(this.cursor===o?a.cyan(h.pointer)+" ":" ")+u;if(p.description&&this.cursor===o){c=` - ${p.description}`;if(u.length+l.length+c.length>=this.out.columns||p.description.split(/\r?\n/).length>1){c="\n"+d(p.description,{margin:3,width:this.out.columns})}}}this.outputText+=`${u} ${l}${a.gray(c)}\n`}}this.out.write(this.outputText)}}r.exports=SelectPrompt},1551:(r,i,o)=>{const a=o(9439);const l=o(9126);const{erase:u,cursor:c}=o(332);const{style:h,clear:d,lines:p,figures:m}=o(9807);class TextPrompt extends l{constructor(r={}){super(r);this.transform=h.render(r.style);this.scale=this.transform.scale;this.msg=r.message;this.initial=r.initial||``;this.validator=r.validate||(()=>true);this.value=``;this.errorMsg=r.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.clear=d(``,this.out.columns);this.render()}set value(r){if(!r&&this.initial){this.placeholder=true;this.rendered=a.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(r)}this._value=r;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.fire();this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let r=await this.validator(this.value);if(typeof r===`string`){this.errorMsg=r;r=false}this.error=!r}async submit(){this.value=this.value||this.initial;this.cursorOffset=0;this.cursor=this.rendered.length;await this.validate();if(this.error){this.red=true;this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(r){if(this.placeholder)return;this.cursor=this.cursor+r;this.cursorOffset+=r}_(r,i){let o=this.value.slice(0,this.cursor);let a=this.value.slice(this.cursor);this.value=`${o}${r}${a}`;this.red=false;this.cursor=this.placeholder?0:o.length+1;this.render()}delete(){if(this.isCursorAtStart())return this.bell();let r=this.value.slice(0,this.cursor-1);let i=this.value.slice(this.cursor);this.value=`${r}${i}`;this.red=false;if(this.isCursorAtStart()){this.cursorOffset=0}else{this.cursorOffset++;this.moveCursor(-1)}this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let r=this.value.slice(0,this.cursor);let i=this.value.slice(this.cursor+1);this.value=`${r}${i}`;this.red=false;if(this.isCursorAtEnd()){this.cursorOffset=0}else{this.cursorOffset++}this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(c.down(p(this.outputError,this.out.columns)-1)+d(this.outputError,this.out.columns));this.out.write(d(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[h.symbol(this.done,this.aborted),a.bold(this.msg),h.delimiter(this.done),this.red?a.red(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((r,i,o)=>r+`\n${o?" ":m.pointerSmall} ${a.red().italic(i)}`),``)}this.out.write(u.line+c.to(0)+this.outputText+c.save+this.outputError+c.restore+c.move(this.cursorOffset,0))}}r.exports=TextPrompt},181:(r,i,o)=>{const a=o(9439);const l=o(9126);const{style:u,clear:c}=o(9807);const{cursor:h,erase:d}=o(332);class TogglePrompt extends l{constructor(r={}){super(r);this.msg=r.message;this.value=!!r.initial;this.active=r.active||"on";this.inactive=r.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(r,i){if(r===" "){this.value=!this.value}else if(r==="1"){this.value=true}else if(r==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(h.hide);else this.out.write(c(this.outputText,this.out.columns));super.render();this.outputText=[u.symbol(this.done,this.aborted),a.bold(this.msg),u.delimiter(this.done),this.value?this.inactive:a.cyan().underline(this.inactive),a.gray("/"),this.value?a.cyan().underline(this.active):this.active].join(" ");this.out.write(d.line+h.to(0)+this.outputText)}}r.exports=TogglePrompt},9590:(r,i,o)=>{"use strict";const a=o(4450);const l=["suggest","format","onState","validate","onRender","type"];const noop=()=>{};async function prompt(r=[],{onSubmit:i=noop,onCancel:o=noop}={}){const u={};const c=prompt._override||{};r=[].concat(r);let h,d,p,m,g,y;const getFormattedAnswer=async(r,i,o=false)=>{if(!o&&r.validate&&r.validate(i)!==true){return}return r.format?await r.format(i,u):i};for(d of r){({name:m,type:g}=d);if(typeof g==="function"){g=await g(h,{...u},d);d["type"]=g}if(!g)continue;for(let r in d){if(l.includes(r))continue;let i=d[r];d[r]=typeof i==="function"?await i(h,{...u},y):i}y=d;if(typeof d.message!=="string"){throw new Error("prompt message is required")}({name:m,type:g}=d);if(a[g]===void 0){throw new Error(`prompt type (${g}) is not defined`)}if(c[d.name]!==undefined){h=await getFormattedAnswer(d,c[d.name]);if(h!==undefined){u[m]=h;continue}}try{h=prompt._injected?getInjectedAnswer(prompt._injected,d.initial):await a[g](d);u[m]=h=await getFormattedAnswer(d,h,true);p=await i(d,h,u)}catch(r){p=!await o(d,u)}if(p)return u}return u}function getInjectedAnswer(r,i){const o=r.shift();if(o instanceof Error){throw o}return o===undefined?i:o}function inject(r){prompt._injected=(prompt._injected||[]).concat(r)}function override(r){prompt._override=Object.assign({},r)}r.exports=Object.assign(prompt,{prompt:prompt,prompts:a,inject:inject,override:override})},4450:(r,i,o)=>{"use strict";const a=i;const l=o(6529);const noop=r=>r;function toPrompt(r,i,o={}){return new Promise(((a,u)=>{const c=new l[r](i);const h=o.onAbort||noop;const d=o.onSubmit||noop;const p=o.onExit||noop;c.on("state",i.onState||noop);c.on("submit",(r=>a(d(r))));c.on("exit",(r=>a(p(r))));c.on("abort",(r=>u(h(r))))}))}a.text=r=>toPrompt("TextPrompt",r);a.password=r=>{r.style="password";return a.text(r)};a.invisible=r=>{r.style="invisible";return a.text(r)};a.number=r=>toPrompt("NumberPrompt",r);a.date=r=>toPrompt("DatePrompt",r);a.confirm=r=>toPrompt("ConfirmPrompt",r);a.list=r=>{const i=r.separator||",";return toPrompt("TextPrompt",r,{onSubmit:r=>r.split(i).map((r=>r.trim()))})};a.toggle=r=>toPrompt("TogglePrompt",r);a.select=r=>toPrompt("SelectPrompt",r);a.multiselect=r=>{r.choices=[].concat(r.choices||[]);const toSelected=r=>r.filter((r=>r.selected)).map((r=>r.value));return toPrompt("MultiselectPrompt",r,{onAbort:toSelected,onSubmit:toSelected})};a.autocompleteMultiselect=r=>{r.choices=[].concat(r.choices||[]);const toSelected=r=>r.filter((r=>r.selected)).map((r=>r.value));return toPrompt("AutocompleteMultiselectPrompt",r,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(r,i)=>Promise.resolve(i.filter((i=>i.title.slice(0,r.length).toLowerCase()===r.toLowerCase())));a.autocomplete=r=>{r.suggest=r.suggest||byTitle;r.choices=[].concat(r.choices||[]);return toPrompt("AutocompletePrompt",r)}},8573:r=>{"use strict";r.exports=(r,i)=>{if(r.meta&&r.name!=="escape")return;if(r.ctrl){if(r.name==="a")return"first";if(r.name==="c")return"abort";if(r.name==="d")return"abort";if(r.name==="e")return"last";if(r.name==="g")return"reset"}if(i){if(r.name==="j")return"down";if(r.name==="k")return"up"}if(r.name==="return")return"submit";if(r.name==="enter")return"submit";if(r.name==="backspace")return"delete";if(r.name==="delete")return"deleteForward";if(r.name==="abort")return"abort";if(r.name==="escape")return"exit";if(r.name==="tab")return"next";if(r.name==="pagedown")return"nextPage";if(r.name==="pageup")return"prevPage";if(r.name==="home")return"home";if(r.name==="end")return"end";if(r.name==="up")return"up";if(r.name==="down")return"down";if(r.name==="right")return"right";if(r.name==="left")return"left";return false}},6747:(r,i,o)=>{"use strict";const a=o(2714);const{erase:l,cursor:u}=o(332);const width=r=>[...a(r)].length;r.exports=function(r,i){if(!i)return l.line+u.to(0);let o=0;const a=r.split(/\r?\n/);for(let r of a){o+=1+Math.floor(Math.max(width(r)-1,0)/i)}return l.lines(o)}},3297:r=>{"use strict";r.exports=(r,i,o)=>{o=o||i;let a=Math.min(i-o,r-Math.floor(o/2));if(a<0)a=0;let l=Math.min(a+o,i);return{startIndex:a,endIndex:l}}},3034:r=>{"use strict";const i={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const o={arrowUp:i.arrowUp,arrowDown:i.arrowDown,arrowLeft:i.arrowLeft,arrowRight:i.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const a=process.platform==="win32"?o:i;r.exports=a},9807:(r,i,o)=>{"use strict";r.exports={action:o(8573),clear:o(6747),style:o(7357),strip:o(2714),figures:o(3034),lines:o(4413),wrap:o(2492),entriesToDisplay:o(3297)}},4413:(r,i,o)=>{"use strict";const a=o(2714);r.exports=function(r,i){let o=String(a(r)||"").split(/\r?\n/);if(!i)return o.length;return o.map((r=>Math.ceil(r.length/i))).reduce(((r,i)=>r+i))}},2714:r=>{"use strict";r.exports=r=>{const i=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const o=new RegExp(i,"g");return typeof r==="string"?r.replace(o,""):r}},7357:(r,i,o)=>{"use strict";const a=o(9439);const l=o(3034);const u=Object.freeze({password:{scale:1,render:r=>"*".repeat(r.length)},emoji:{scale:2,render:r=>"😃".repeat(r.length)},invisible:{scale:0,render:r=>""},default:{scale:1,render:r=>`${r}`}});const render=r=>u[r]||u.default;const c=Object.freeze({aborted:a.red(l.cross),done:a.green(l.tick),exited:a.yellow(l.cross),default:a.cyan("?")});const symbol=(r,i,o)=>i?c.aborted:o?c.exited:r?c.done:c.default;const delimiter=r=>a.gray(r?l.ellipsis:l.pointerSmall);const item=(r,i)=>a.gray(r?i?l.pointerSmall:"+":l.line);r.exports={styles:u,render:render,symbols:c,symbol:symbol,delimiter:delimiter,item:item}},2492:r=>{"use strict";r.exports=(r,i={})=>{const o=Number.isSafeInteger(parseInt(i.margin))?new Array(parseInt(i.margin)).fill(" ").join(""):i.margin||"";const a=i.width;return(r||"").split(/\r?\n/g).map((r=>r.split(/\s+/g).reduce(((r,i)=>{if(i.length+o.length>=a||r[r.length-1].length+i.length+1<a)r[r.length-1]+=` ${i}`;else r.push(`${o}${i}`);return r}),[o]).join("\n"))).join("\n")}},8271:(r,i,o)=>{var a=o(7563);var l=o(1017).join;var u=o(5134);var c="/etc";var h=process.platform==="win32";var d=h?process.env.USERPROFILE:process.env.HOME;r.exports=function(r,i,p,m){if("string"!==typeof r)throw new Error("rc(name): name *must* be string");if(!p)p=o(5912)(process.argv.slice(2));i=("string"===typeof i?a.json(i):i)||{};m=m||a.parse;var g=a.env(r+"_");var y=[i];var v=[];function addConfigFile(r){if(v.indexOf(r)>=0)return;var i=a.file(r);if(i){y.push(m(i));v.push(r)}}if(!h)[l(c,r,"config"),l(c,r+"rc")].forEach(addConfigFile);if(d)[l(d,".config",r,"config"),l(d,".config",r),l(d,"."+r,"config"),l(d,"."+r+"rc")].forEach(addConfigFile);addConfigFile(a.find("."+r+"rc"));if(g.config)addConfigFile(g.config);if(p.config)addConfigFile(p.config);return u.apply(null,y.concat([g,p,v.length?{configs:v,config:v[v.length-1]}:undefined]))}},7563:(r,i,o)=>{"use strict";var a=o(7147);var l=o(1923);var u=o(1017);var c=o(6397);var h=i.parse=function(r){if(/^\s*{/.test(r))return JSON.parse(c(r));return l.parse(r)};var d=i.file=function(){var r=[].slice.call(arguments).filter((function(r){return r!=null}));for(var i in r)if("string"!==typeof r[i])return;var o=u.join.apply(null,r);var l;try{return a.readFileSync(o,"utf-8")}catch(r){return}};var p=i.json=function(){var r=d.apply(null,arguments);return r?h(r):null};var m=i.env=function(r,i){i=i||process.env;var o={};var a=r.length;for(var l in i){if(l.toLowerCase().indexOf(r.toLowerCase())===0){var u=l.substring(a).split("__");var c;while((c=u.indexOf(""))>-1){u.splice(c,1)}var h=o;u.forEach((function _buildSubObj(r,o){if(!r||typeof h!=="object")return;if(o===u.length-1)h[r]=i[l];if(h[r]===undefined)h[r]={};h=h[r]}))}}return o};var g=i.find=function(){var r=u.join.apply(null,[].slice.call(arguments));function find(r,i){var o=u.join(r,i);try{a.statSync(o);return o}catch(o){if(u.dirname(r)!==r)return find(u.dirname(r),i)}}return find(process.cwd(),r)}},6397:r=>{"use strict";var i=1;var o=2;function stripWithoutWhitespace(){return""}function stripWithWhitespace(r,i,o){return r.slice(i,o).replace(/\S/g," ")}r.exports=function(r,a){a=a||{};var l;var u;var c=false;var h=false;var d=0;var p="";var m=a.whitespace===false?stripWithoutWhitespace:stripWithWhitespace;for(var g=0;g<r.length;g++){l=r[g];u=r[g+1];if(!h&&l==='"'){var y=r[g-1]==="\\"&&r[g-2]!=="\\";if(!y){c=!c}}if(c){continue}if(!h&&l+u==="//"){p+=r.slice(d,g);d=g;h=i;g++}else if(h===i&&l+u==="\r\n"){g++;h=false;p+=m(r,d,g);d=g;continue}else if(h===i&&l==="\n"){h=false;p+=m(r,d,g);d=g}else if(!h&&l+u==="/*"){p+=r.slice(d,g);d=g;h=o;g++;continue}else if(h===o&&l+u==="*/"){g++;h=false;p+=m(r,d,g+1);d=g+1;continue}}return p+(h?m(r.substr(d)):r.substr(d))}},4955:(r,i,o)=>{const a=o(3118).Buffer;function decodeBase64(r){return a.from(r,"base64").toString("utf8")}function encodeBase64(r){return a.from(r,"utf8").toString("base64")}r.exports={decodeBase64:decodeBase64,encodeBase64:encodeBase64}},1384:(r,i,o)=>{var a=o(7310);var l=o(4955);var u=l.decodeBase64;var c=l.encodeBase64;var h=":_authToken";var d=":username";var p=":_password";r.exports=function(){var r;var i;if(arguments.length>=2){r=arguments[0];i=arguments[1]}else if(typeof arguments[0]==="string"){r=arguments[0]}else{i=arguments[0]}i=i||{};i.npmrc=i.npmrc||o(8271)("npm",{registry:"https://registry.npmjs.org/"});r=r||i.npmrc.registry;return getRegistryAuthInfo(r,i)||getLegacyAuthInfo(i.npmrc)};function getRegistryAuthInfo(r,i){var o=a.parse(r,false,true);var l;while(l!=="/"&&o.pathname!==l){l=o.pathname||"/";var u="//"+o.host+l.replace(/\/$/,"");var c=getAuthInfoForUrl(u,i.npmrc);if(c){return c}if(!i.recursive){return/\/$/.test(r)?undefined:getRegistryAuthInfo(a.resolve(r,"."),i)}o.pathname=a.resolve(normalizePath(l),"..")||"/"}return undefined}function getLegacyAuthInfo(r){if(r._auth){return{token:r._auth,type:"Basic"}}return undefined}function normalizePath(r){return r[r.length-1]==="/"?r:r+"/"}function getAuthInfoForUrl(r,i){var o=getBearerToken(i[r+h]||i[r+"/"+h]);if(o){return o}var a=i[r+d]||i[r+"/"+d];var l=i[r+p]||i[r+"/"+p];var u=getTokenForUsernameAndPassword(a,l);if(u){return u}return undefined}function getBearerToken(r){if(!r){return undefined}var i=r.replace(/^\$\{?([^}]*)\}?$/,(function(r,i){return process.env[i]}));return{token:i,type:"Bearer"}}function getTokenForUsernameAndPassword(r,i){if(!r||!i){return undefined}var o=u(i.replace(/^\$\{?([^}]*)\}?$/,(function(r,i){return process.env[i]})));var a=c(r+":"+o);return{token:a,type:"Basic",password:o,username:r}}},2447:(r,i,o)=>{"use strict";r.exports=function(r){var i=o(8271)("npm",{registry:"https://registry.npmjs.org/"});var a=i[r+":registry"]||i.registry;return a.slice(-1)==="/"?a:a+"/"}},3118:(r,i,o)=>{
28
28
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
29
- var a=o(4300);var l=a.Buffer;function copyProps(r,i){for(var o in r){i[o]=r[o]}}if(l.from&&l.alloc&&l.allocUnsafe&&l.allocUnsafeSlow){r.exports=a}else{copyProps(a,i);i.Buffer=SafeBuffer}function SafeBuffer(r,i,o){return l(r,i,o)}SafeBuffer.prototype=Object.create(l.prototype);copyProps(l,SafeBuffer);SafeBuffer.from=function(r,i,o){if(typeof r==="number"){throw new TypeError("Argument must not be a number")}return l(r,i,o)};SafeBuffer.alloc=function(r,i,o){if(typeof r!=="number"){throw new TypeError("Argument must be a number")}var a=l(r);if(i!==undefined){if(typeof o==="string"){a.fill(i,o)}else{a.fill(i)}}else{a.fill(0)}return a};SafeBuffer.allocUnsafe=function(r){if(typeof r!=="number"){throw new TypeError("Argument must be a number")}return l(r)};SafeBuffer.allocUnsafeSlow=function(r){if(typeof r!=="number"){throw new TypeError("Argument must be a number")}return a.SlowBuffer(r)}},9746:(r,i,o)=>{(function(r){r.parser=function(r,i){return new SAXParser(r,i)};r.SAXParser=SAXParser;r.SAXStream=SAXStream;r.createStream=createStream;r.MAX_BUFFER_LENGTH=64*1024;var i=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];r.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function SAXParser(i,o){if(!(this instanceof SAXParser)){return new SAXParser(i,o)}var a=this;clearBuffers(a);a.q=a.c="";a.bufferCheckPosition=r.MAX_BUFFER_LENGTH;a.opt=o||{};a.opt.lowercase=a.opt.lowercase||a.opt.lowercasetags;a.looseCase=a.opt.lowercase?"toLowerCase":"toUpperCase";a.tags=[];a.closed=a.closedRoot=a.sawRoot=false;a.tag=a.error=null;a.strict=!!i;a.noscript=!!(i||a.opt.noscript);a.state=b.BEGIN;a.strictEntities=a.opt.strictEntities;a.ENTITIES=a.strictEntities?Object.create(r.XML_ENTITIES):Object.create(r.ENTITIES);a.attribList=[];if(a.opt.xmlns){a.ns=Object.create(d)}a.trackPosition=a.opt.position!==false;if(a.trackPosition){a.position=a.line=a.column=0}emit(a,"onready")}if(!Object.create){Object.create=function(r){function F(){}F.prototype=r;var i=new F;return i}}if(!Object.keys){Object.keys=function(r){var i=[];for(var o in r)if(r.hasOwnProperty(o))i.push(o);return i}}function checkBufferLength(o){var a=Math.max(r.MAX_BUFFER_LENGTH,10);var l=0;for(var u=0,c=i.length;u<c;u++){var h=o[i[u]].length;if(h>a){switch(i[u]){case"textNode":closeText(o);break;case"cdata":emitNode(o,"oncdata",o.cdata);o.cdata="";break;case"script":emitNode(o,"onscript",o.script);o.script="";break;default:error(o,"Max buffer length exceeded: "+i[u])}}l=Math.max(l,h)}var p=r.MAX_BUFFER_LENGTH-l;o.bufferCheckPosition=p+o.position}function clearBuffers(r){for(var o=0,a=i.length;o<a;o++){r[i[o]]=""}}function flushBuffers(r){closeText(r);if(r.cdata!==""){emitNode(r,"oncdata",r.cdata);r.cdata=""}if(r.script!==""){emitNode(r,"onscript",r.script);r.script=""}}SAXParser.prototype={end:function(){end(this)},write:write,resume:function(){this.error=null;return this},close:function(){return this.write(null)},flush:function(){flushBuffers(this)}};var a;try{a=o(2781).Stream}catch(r){a=function(){}}var l=r.EVENTS.filter((function(r){return r!=="error"&&r!=="end"}));function createStream(r,i){return new SAXStream(r,i)}function SAXStream(r,i){if(!(this instanceof SAXStream)){return new SAXStream(r,i)}a.apply(this);this._parser=new SAXParser(r,i);this.writable=true;this.readable=true;var o=this;this._parser.onend=function(){o.emit("end")};this._parser.onerror=function(r){o.emit("error",r);o._parser.error=null};this._decoder=null;l.forEach((function(r){Object.defineProperty(o,"on"+r,{get:function(){return o._parser["on"+r]},set:function(i){if(!i){o.removeAllListeners(r);o._parser["on"+r]=i;return i}o.on(r,i)},enumerable:true,configurable:false})}))}SAXStream.prototype=Object.create(a.prototype,{constructor:{value:SAXStream}});SAXStream.prototype.write=function(r){if(typeof Buffer==="function"&&typeof Buffer.isBuffer==="function"&&Buffer.isBuffer(r)){if(!this._decoder){var i=o(1576).StringDecoder;this._decoder=new i("utf8")}r=this._decoder.write(r)}this._parser.write(r.toString());this.emit("data",r);return true};SAXStream.prototype.end=function(r){if(r&&r.length){this.write(r)}this._parser.end();return true};SAXStream.prototype.on=function(r,i){var o=this;if(!o._parser["on"+r]&&l.indexOf(r)!==-1){o._parser["on"+r]=function(){var i=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);i.splice(0,0,r);o.emit.apply(o,i)}}return a.prototype.on.call(o,r,i)};var u="[CDATA[";var c="DOCTYPE";var h="http://www.w3.org/XML/1998/namespace";var p="http://www.w3.org/2000/xmlns/";var d={xml:h,xmlns:p};var m=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;var g=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;var y=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;var v=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function isWhitespace(r){return r===" "||r==="\n"||r==="\r"||r==="\t"}function isQuote(r){return r==='"'||r==="'"}function isAttribEnd(r){return r===">"||isWhitespace(r)}function isMatch(r,i){return r.test(i)}function notMatch(r,i){return!isMatch(r,i)}var b=0;r.STATE={BEGIN:b++,BEGIN_WHITESPACE:b++,TEXT:b++,TEXT_ENTITY:b++,OPEN_WAKA:b++,SGML_DECL:b++,SGML_DECL_QUOTED:b++,DOCTYPE:b++,DOCTYPE_QUOTED:b++,DOCTYPE_DTD:b++,DOCTYPE_DTD_QUOTED:b++,COMMENT_STARTING:b++,COMMENT:b++,COMMENT_ENDING:b++,COMMENT_ENDED:b++,CDATA:b++,CDATA_ENDING:b++,CDATA_ENDING_2:b++,PROC_INST:b++,PROC_INST_BODY:b++,PROC_INST_ENDING:b++,OPEN_TAG:b++,OPEN_TAG_SLASH:b++,ATTRIB:b++,ATTRIB_NAME:b++,ATTRIB_NAME_SAW_WHITE:b++,ATTRIB_VALUE:b++,ATTRIB_VALUE_QUOTED:b++,ATTRIB_VALUE_CLOSED:b++,ATTRIB_VALUE_UNQUOTED:b++,ATTRIB_VALUE_ENTITY_Q:b++,ATTRIB_VALUE_ENTITY_U:b++,CLOSE_TAG:b++,CLOSE_TAG_SAW_WHITE:b++,SCRIPT:b++,SCRIPT_ENDING:b++};r.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"};r.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830};Object.keys(r.ENTITIES).forEach((function(i){var o=r.ENTITIES[i];var a=typeof o==="number"?String.fromCharCode(o):o;r.ENTITIES[i]=a}));for(var w in r.STATE){r.STATE[r.STATE[w]]=w}b=r.STATE;function emit(r,i,o){r[i]&&r[i](o)}function emitNode(r,i,o){if(r.textNode)closeText(r);emit(r,i,o)}function closeText(r){r.textNode=textopts(r.opt,r.textNode);if(r.textNode)emit(r,"ontext",r.textNode);r.textNode=""}function textopts(r,i){if(r.trim)i=i.trim();if(r.normalize)i=i.replace(/\s+/g," ");return i}function error(r,i){closeText(r);if(r.trackPosition){i+="\nLine: "+r.line+"\nColumn: "+r.column+"\nChar: "+r.c}i=new Error(i);r.error=i;emit(r,"onerror",i);return r}function end(r){if(r.sawRoot&&!r.closedRoot)strictFail(r,"Unclosed root tag");if(r.state!==b.BEGIN&&r.state!==b.BEGIN_WHITESPACE&&r.state!==b.TEXT){error(r,"Unexpected end")}closeText(r);r.c="";r.closed=true;emit(r,"onend");SAXParser.call(r,r.strict,r.opt);return r}function strictFail(r,i){if(typeof r!=="object"||!(r instanceof SAXParser)){throw new Error("bad call to strictFail")}if(r.strict){error(r,i)}}function newTag(r){if(!r.strict)r.tagName=r.tagName[r.looseCase]();var i=r.tags[r.tags.length-1]||r;var o=r.tag={name:r.tagName,attributes:{}};if(r.opt.xmlns){o.ns=i.ns}r.attribList.length=0;emitNode(r,"onopentagstart",o)}function qname(r,i){var o=r.indexOf(":");var a=o<0?["",r]:r.split(":");var l=a[0];var u=a[1];if(i&&r==="xmlns"){l="xmlns";u=""}return{prefix:l,local:u}}function attrib(r){if(!r.strict){r.attribName=r.attribName[r.looseCase]()}if(r.attribList.indexOf(r.attribName)!==-1||r.tag.attributes.hasOwnProperty(r.attribName)){r.attribName=r.attribValue="";return}if(r.opt.xmlns){var i=qname(r.attribName,true);var o=i.prefix;var a=i.local;if(o==="xmlns"){if(a==="xml"&&r.attribValue!==h){strictFail(r,"xml: prefix must be bound to "+h+"\n"+"Actual: "+r.attribValue)}else if(a==="xmlns"&&r.attribValue!==p){strictFail(r,"xmlns: prefix must be bound to "+p+"\n"+"Actual: "+r.attribValue)}else{var l=r.tag;var u=r.tags[r.tags.length-1]||r;if(l.ns===u.ns){l.ns=Object.create(u.ns)}l.ns[a]=r.attribValue}}r.attribList.push([r.attribName,r.attribValue])}else{r.tag.attributes[r.attribName]=r.attribValue;emitNode(r,"onattribute",{name:r.attribName,value:r.attribValue})}r.attribName=r.attribValue=""}function openTag(r,i){if(r.opt.xmlns){var o=r.tag;var a=qname(r.tagName);o.prefix=a.prefix;o.local=a.local;o.uri=o.ns[a.prefix]||"";if(o.prefix&&!o.uri){strictFail(r,"Unbound namespace prefix: "+JSON.stringify(r.tagName));o.uri=a.prefix}var l=r.tags[r.tags.length-1]||r;if(o.ns&&l.ns!==o.ns){Object.keys(o.ns).forEach((function(i){emitNode(r,"onopennamespace",{prefix:i,uri:o.ns[i]})}))}for(var u=0,c=r.attribList.length;u<c;u++){var h=r.attribList[u];var p=h[0];var d=h[1];var m=qname(p,true);var g=m.prefix;var y=m.local;var v=g===""?"":o.ns[g]||"";var w={name:p,value:d,prefix:g,local:y,uri:v};if(g&&g!=="xmlns"&&!v){strictFail(r,"Unbound namespace prefix: "+JSON.stringify(g));w.uri=g}r.tag.attributes[p]=w;emitNode(r,"onattribute",w)}r.attribList.length=0}r.tag.isSelfClosing=!!i;r.sawRoot=true;r.tags.push(r.tag);emitNode(r,"onopentag",r.tag);if(!i){if(!r.noscript&&r.tagName.toLowerCase()==="script"){r.state=b.SCRIPT}else{r.state=b.TEXT}r.tag=null;r.tagName=""}r.attribName=r.attribValue="";r.attribList.length=0}function closeTag(r){if(!r.tagName){strictFail(r,"Weird empty close tag.");r.textNode+="</>";r.state=b.TEXT;return}if(r.script){if(r.tagName!=="script"){r.script+="</"+r.tagName+">";r.tagName="";r.state=b.SCRIPT;return}emitNode(r,"onscript",r.script);r.script=""}var i=r.tags.length;var o=r.tagName;if(!r.strict){o=o[r.looseCase]()}var a=o;while(i--){var l=r.tags[i];if(l.name!==a){strictFail(r,"Unexpected close tag")}else{break}}if(i<0){strictFail(r,"Unmatched closing tag: "+r.tagName);r.textNode+="</"+r.tagName+">";r.state=b.TEXT;return}r.tagName=o;var u=r.tags.length;while(u-- >i){var c=r.tag=r.tags.pop();r.tagName=r.tag.name;emitNode(r,"onclosetag",r.tagName);var h={};for(var p in c.ns){h[p]=c.ns[p]}var d=r.tags[r.tags.length-1]||r;if(r.opt.xmlns&&c.ns!==d.ns){Object.keys(c.ns).forEach((function(i){var o=c.ns[i];emitNode(r,"onclosenamespace",{prefix:i,uri:o})}))}}if(i===0)r.closedRoot=true;r.tagName=r.attribValue=r.attribName="";r.attribList.length=0;r.state=b.TEXT}function parseEntity(r){var i=r.entity;var o=i.toLowerCase();var a;var l="";if(r.ENTITIES[i]){return r.ENTITIES[i]}if(r.ENTITIES[o]){return r.ENTITIES[o]}i=o;if(i.charAt(0)==="#"){if(i.charAt(1)==="x"){i=i.slice(2);a=parseInt(i,16);l=a.toString(16)}else{i=i.slice(1);a=parseInt(i,10);l=a.toString(10)}}i=i.replace(/^0+/,"");if(isNaN(a)||l.toLowerCase()!==i){strictFail(r,"Invalid character entity");return"&"+r.entity+";"}return String.fromCodePoint(a)}function beginWhiteSpace(r,i){if(i==="<"){r.state=b.OPEN_WAKA;r.startTagPosition=r.position}else if(!isWhitespace(i)){strictFail(r,"Non-whitespace before first tag.");r.textNode=i;r.state=b.TEXT}}function charAt(r,i){var o="";if(i<r.length){o=r.charAt(i)}return o}function write(r){var i=this;if(this.error){throw this.error}if(i.closed){return error(i,"Cannot write after close. Assign an onready handler.")}if(r===null){return end(i)}if(typeof r==="object"){r=r.toString()}var o=0;var a="";while(true){a=charAt(r,o++);i.c=a;if(!a){break}if(i.trackPosition){i.position++;if(a==="\n"){i.line++;i.column=0}else{i.column++}}switch(i.state){case b.BEGIN:i.state=b.BEGIN_WHITESPACE;if(a==="\ufeff"){continue}beginWhiteSpace(i,a);continue;case b.BEGIN_WHITESPACE:beginWhiteSpace(i,a);continue;case b.TEXT:if(i.sawRoot&&!i.closedRoot){var l=o-1;while(a&&a!=="<"&&a!=="&"){a=charAt(r,o++);if(a&&i.trackPosition){i.position++;if(a==="\n"){i.line++;i.column=0}else{i.column++}}}i.textNode+=r.substring(l,o-1)}if(a==="<"&&!(i.sawRoot&&i.closedRoot&&!i.strict)){i.state=b.OPEN_WAKA;i.startTagPosition=i.position}else{if(!isWhitespace(a)&&(!i.sawRoot||i.closedRoot)){strictFail(i,"Text data outside of root node.")}if(a==="&"){i.state=b.TEXT_ENTITY}else{i.textNode+=a}}continue;case b.SCRIPT:if(a==="<"){i.state=b.SCRIPT_ENDING}else{i.script+=a}continue;case b.SCRIPT_ENDING:if(a==="/"){i.state=b.CLOSE_TAG}else{i.script+="<"+a;i.state=b.SCRIPT}continue;case b.OPEN_WAKA:if(a==="!"){i.state=b.SGML_DECL;i.sgmlDecl=""}else if(isWhitespace(a)){}else if(isMatch(m,a)){i.state=b.OPEN_TAG;i.tagName=a}else if(a==="/"){i.state=b.CLOSE_TAG;i.tagName=""}else if(a==="?"){i.state=b.PROC_INST;i.procInstName=i.procInstBody=""}else{strictFail(i,"Unencoded <");if(i.startTagPosition+1<i.position){var h=i.position-i.startTagPosition;a=new Array(h).join(" ")+a}i.textNode+="<"+a;i.state=b.TEXT}continue;case b.SGML_DECL:if((i.sgmlDecl+a).toUpperCase()===u){emitNode(i,"onopencdata");i.state=b.CDATA;i.sgmlDecl="";i.cdata=""}else if(i.sgmlDecl+a==="--"){i.state=b.COMMENT;i.comment="";i.sgmlDecl=""}else if((i.sgmlDecl+a).toUpperCase()===c){i.state=b.DOCTYPE;if(i.doctype||i.sawRoot){strictFail(i,"Inappropriately located doctype declaration")}i.doctype="";i.sgmlDecl=""}else if(a===">"){emitNode(i,"onsgmldeclaration",i.sgmlDecl);i.sgmlDecl="";i.state=b.TEXT}else if(isQuote(a)){i.state=b.SGML_DECL_QUOTED;i.sgmlDecl+=a}else{i.sgmlDecl+=a}continue;case b.SGML_DECL_QUOTED:if(a===i.q){i.state=b.SGML_DECL;i.q=""}i.sgmlDecl+=a;continue;case b.DOCTYPE:if(a===">"){i.state=b.TEXT;emitNode(i,"ondoctype",i.doctype);i.doctype=true}else{i.doctype+=a;if(a==="["){i.state=b.DOCTYPE_DTD}else if(isQuote(a)){i.state=b.DOCTYPE_QUOTED;i.q=a}}continue;case b.DOCTYPE_QUOTED:i.doctype+=a;if(a===i.q){i.q="";i.state=b.DOCTYPE}continue;case b.DOCTYPE_DTD:i.doctype+=a;if(a==="]"){i.state=b.DOCTYPE}else if(isQuote(a)){i.state=b.DOCTYPE_DTD_QUOTED;i.q=a}continue;case b.DOCTYPE_DTD_QUOTED:i.doctype+=a;if(a===i.q){i.state=b.DOCTYPE_DTD;i.q=""}continue;case b.COMMENT:if(a==="-"){i.state=b.COMMENT_ENDING}else{i.comment+=a}continue;case b.COMMENT_ENDING:if(a==="-"){i.state=b.COMMENT_ENDED;i.comment=textopts(i.opt,i.comment);if(i.comment){emitNode(i,"oncomment",i.comment)}i.comment=""}else{i.comment+="-"+a;i.state=b.COMMENT}continue;case b.COMMENT_ENDED:if(a!==">"){strictFail(i,"Malformed comment");i.comment+="--"+a;i.state=b.COMMENT}else{i.state=b.TEXT}continue;case b.CDATA:if(a==="]"){i.state=b.CDATA_ENDING}else{i.cdata+=a}continue;case b.CDATA_ENDING:if(a==="]"){i.state=b.CDATA_ENDING_2}else{i.cdata+="]"+a;i.state=b.CDATA}continue;case b.CDATA_ENDING_2:if(a===">"){if(i.cdata){emitNode(i,"oncdata",i.cdata)}emitNode(i,"onclosecdata");i.cdata="";i.state=b.TEXT}else if(a==="]"){i.cdata+="]"}else{i.cdata+="]]"+a;i.state=b.CDATA}continue;case b.PROC_INST:if(a==="?"){i.state=b.PROC_INST_ENDING}else if(isWhitespace(a)){i.state=b.PROC_INST_BODY}else{i.procInstName+=a}continue;case b.PROC_INST_BODY:if(!i.procInstBody&&isWhitespace(a)){continue}else if(a==="?"){i.state=b.PROC_INST_ENDING}else{i.procInstBody+=a}continue;case b.PROC_INST_ENDING:if(a===">"){emitNode(i,"onprocessinginstruction",{name:i.procInstName,body:i.procInstBody});i.procInstName=i.procInstBody="";i.state=b.TEXT}else{i.procInstBody+="?"+a;i.state=b.PROC_INST_BODY}continue;case b.OPEN_TAG:if(isMatch(g,a)){i.tagName+=a}else{newTag(i);if(a===">"){openTag(i)}else if(a==="/"){i.state=b.OPEN_TAG_SLASH}else{if(!isWhitespace(a)){strictFail(i,"Invalid character in tag name")}i.state=b.ATTRIB}}continue;case b.OPEN_TAG_SLASH:if(a===">"){openTag(i,true);closeTag(i)}else{strictFail(i,"Forward-slash in opening tag not followed by >");i.state=b.ATTRIB}continue;case b.ATTRIB:if(isWhitespace(a)){continue}else if(a===">"){openTag(i)}else if(a==="/"){i.state=b.OPEN_TAG_SLASH}else if(isMatch(m,a)){i.attribName=a;i.attribValue="";i.state=b.ATTRIB_NAME}else{strictFail(i,"Invalid attribute name")}continue;case b.ATTRIB_NAME:if(a==="="){i.state=b.ATTRIB_VALUE}else if(a===">"){strictFail(i,"Attribute without value");i.attribValue=i.attribName;attrib(i);openTag(i)}else if(isWhitespace(a)){i.state=b.ATTRIB_NAME_SAW_WHITE}else if(isMatch(g,a)){i.attribName+=a}else{strictFail(i,"Invalid attribute name")}continue;case b.ATTRIB_NAME_SAW_WHITE:if(a==="="){i.state=b.ATTRIB_VALUE}else if(isWhitespace(a)){continue}else{strictFail(i,"Attribute without value");i.tag.attributes[i.attribName]="";i.attribValue="";emitNode(i,"onattribute",{name:i.attribName,value:""});i.attribName="";if(a===">"){openTag(i)}else if(isMatch(m,a)){i.attribName=a;i.state=b.ATTRIB_NAME}else{strictFail(i,"Invalid attribute name");i.state=b.ATTRIB}}continue;case b.ATTRIB_VALUE:if(isWhitespace(a)){continue}else if(isQuote(a)){i.q=a;i.state=b.ATTRIB_VALUE_QUOTED}else{strictFail(i,"Unquoted attribute value");i.state=b.ATTRIB_VALUE_UNQUOTED;i.attribValue=a}continue;case b.ATTRIB_VALUE_QUOTED:if(a!==i.q){if(a==="&"){i.state=b.ATTRIB_VALUE_ENTITY_Q}else{i.attribValue+=a}continue}attrib(i);i.q="";i.state=b.ATTRIB_VALUE_CLOSED;continue;case b.ATTRIB_VALUE_CLOSED:if(isWhitespace(a)){i.state=b.ATTRIB}else if(a===">"){openTag(i)}else if(a==="/"){i.state=b.OPEN_TAG_SLASH}else if(isMatch(m,a)){strictFail(i,"No whitespace between attributes");i.attribName=a;i.attribValue="";i.state=b.ATTRIB_NAME}else{strictFail(i,"Invalid attribute name")}continue;case b.ATTRIB_VALUE_UNQUOTED:if(!isAttribEnd(a)){if(a==="&"){i.state=b.ATTRIB_VALUE_ENTITY_U}else{i.attribValue+=a}continue}attrib(i);if(a===">"){openTag(i)}else{i.state=b.ATTRIB}continue;case b.CLOSE_TAG:if(!i.tagName){if(isWhitespace(a)){continue}else if(notMatch(m,a)){if(i.script){i.script+="</"+a;i.state=b.SCRIPT}else{strictFail(i,"Invalid tagname in closing tag.")}}else{i.tagName=a}}else if(a===">"){closeTag(i)}else if(isMatch(g,a)){i.tagName+=a}else if(i.script){i.script+="</"+i.tagName;i.tagName="";i.state=b.SCRIPT}else{if(!isWhitespace(a)){strictFail(i,"Invalid tagname in closing tag")}i.state=b.CLOSE_TAG_SAW_WHITE}continue;case b.CLOSE_TAG_SAW_WHITE:if(isWhitespace(a)){continue}if(a===">"){closeTag(i)}else{strictFail(i,"Invalid characters in closing tag")}continue;case b.TEXT_ENTITY:case b.ATTRIB_VALUE_ENTITY_Q:case b.ATTRIB_VALUE_ENTITY_U:var p;var d;switch(i.state){case b.TEXT_ENTITY:p=b.TEXT;d="textNode";break;case b.ATTRIB_VALUE_ENTITY_Q:p=b.ATTRIB_VALUE_QUOTED;d="attribValue";break;case b.ATTRIB_VALUE_ENTITY_U:p=b.ATTRIB_VALUE_UNQUOTED;d="attribValue";break}if(a===";"){i[d]+=parseEntity(i);i.entity="";i.state=p}else if(isMatch(i.entity.length?v:y,a)){i.entity+=a}else{strictFail(i,"Invalid character in entity name");i[d]+="&"+i.entity+a;i.entity="";i.state=p}continue;default:throw new Error(i,"Unknown state: "+i.state)}}if(i.position>=i.bufferCheckPosition){checkBufferLength(i)}return i}
30
- /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */if(!String.fromCodePoint){(function(){var r=String.fromCharCode;var i=Math.floor;var fromCodePoint=function(){var o=16384;var a=[];var l;var u;var c=-1;var h=arguments.length;if(!h){return""}var p="";while(++c<h){var d=Number(arguments[c]);if(!isFinite(d)||d<0||d>1114111||i(d)!==d){throw RangeError("Invalid code point: "+d)}if(d<=65535){a.push(d)}else{d-=65536;l=(d>>10)+55296;u=d%1024+56320;a.push(l,u)}if(c+1===h||a.length>o){p+=r.apply(null,a);a.length=0}}return p};if(Object.defineProperty){Object.defineProperty(String,"fromCodePoint",{value:fromCodePoint,configurable:true,writable:true})}else{String.fromCodePoint=fromCodePoint}})()}})(false?0:i)},4970:(r,i,o)=>{"use strict";var a=o(1504);r.exports=function(r){var i=r.match(a);if(!i){return null}var o=i[0].replace(/#! ?/,"").split(" ");var l=o[0].split("/").pop();var u=o[1];return l==="env"?u:l+(u?" "+u:"")}},1504:r=>{"use strict";r.exports=/^#!.*/},332:r=>{"use strict";const i="";const o=`${i}[`;const a="";const l={to(r,i){if(!i)return`${o}${r+1}G`;return`${o}${i+1};${r+1}H`},move(r,i){let a="";if(r<0)a+=`${o}${-r}D`;else if(r>0)a+=`${o}${r}C`;if(i<0)a+=`${o}${-i}A`;else if(i>0)a+=`${o}${i}B`;return a},up:(r=1)=>`${o}${r}A`,down:(r=1)=>`${o}${r}B`,forward:(r=1)=>`${o}${r}C`,backward:(r=1)=>`${o}${r}D`,nextLine:(r=1)=>`${o}E`.repeat(r),prevLine:(r=1)=>`${o}F`.repeat(r),left:`${o}G`,hide:`${o}?25l`,show:`${o}?25h`,save:`${i}7`,restore:`${i}8`};const u={up:(r=1)=>`${o}S`.repeat(r),down:(r=1)=>`${o}T`.repeat(r)};const c={screen:`${o}2J`,up:(r=1)=>`${o}1J`.repeat(r),down:(r=1)=>`${o}J`.repeat(r),line:`${o}2K`,lineEnd:`${o}K`,lineStart:`${o}1K`,lines(r){let i="";for(let o=0;o<r;o++)i+=this.line+(o<r-1?l.up():"");if(r)i+=l.left;return i}};r.exports={cursor:l,scroll:u,erase:c,beep:a}},395:(r,i,o)=>{"use strict";const a=o(2037);const l=o(6224);const u=o(6738);const{env:c}=process;let h;if(u("no-color")||u("no-colors")||u("color=false")||u("color=never")){h=0}else if(u("color")||u("colors")||u("color=true")||u("color=always")){h=1}if("FORCE_COLOR"in c){if(c.FORCE_COLOR==="true"){h=1}else if(c.FORCE_COLOR==="false"){h=0}else{h=c.FORCE_COLOR.length===0?1:Math.min(parseInt(c.FORCE_COLOR,10),3)}}function translateLevel(r){if(r===0){return false}return{level:r,hasBasic:true,has256:r>=2,has16m:r>=3}}function supportsColor(r,i){if(h===0){return 0}if(u("color=16m")||u("color=full")||u("color=truecolor")){return 3}if(u("color=256")){return 2}if(r&&!i&&h===undefined){return 0}const o=h||0;if(c.TERM==="dumb"){return o}if(process.platform==="win32"){const r=a.release().split(".");if(Number(r[0])>=10&&Number(r[2])>=10586){return Number(r[2])>=14931?3:2}return 1}if("CI"in c){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((r=>r in c))||c.CI_NAME==="codeship"){return 1}return o}if("TEAMCITY_VERSION"in c){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(c.TEAMCITY_VERSION)?1:0}if(c.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in c){const r=parseInt((c.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(c.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(c.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(c.TERM)){return 1}if("COLORTERM"in c){return 1}return o}function getSupportLevel(r){const i=supportsColor(r,r&&r.isTTY);return translateLevel(i)}r.exports={supportsColor:getSupportLevel,stdout:translateLevel(supportsColor(true,l.isatty(1))),stderr:translateLevel(supportsColor(true,l.isatty(2)))}},5418:(r,i,o)=>{const{URL:a}=o(7310);const{join:l}=o(1017);const u=o(7147);const{promisify:c}=o(3837);const{tmpdir:h}=o(2037);const p=o(2447);const d=c(u.writeFile);const m=c(u.mkdir);const g=c(u.readFile);const compareVersions=(r,i)=>r.localeCompare(i,"en-US",{numeric:true});const encode=r=>encodeURIComponent(r).replace(/^%40/,"@");const getFile=async(r,i)=>{const o=h();const a=l(o,"update-check");if(!u.existsSync(a)){await m(a)}let c=`${r.name}-${i}.json`;if(r.scope){c=`${r.scope}-${c}`}return l(a,c)};const evaluateCache=async(r,i,o)=>{if(u.existsSync(r)){const a=await g(r,"utf8");const{lastUpdate:l,latest:u}=JSON.parse(a);const c=l+o;if(c>i){return{shouldCheck:false,latest:u}}}return{shouldCheck:true,latest:null}};const updateCache=async(r,i,o)=>{const a=JSON.stringify({latest:i,lastUpdate:o});await d(r,a,"utf8")};const loadPackage=(r,i)=>new Promise(((a,l)=>{const u={host:r.hostname,path:r.pathname,port:r.port,headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},timeout:2e3};if(i){u.headers.authorization=`${i.type} ${i.token}`}const{get:c}=o(r.protocol==="https:"?5687:3685);c(u,(r=>{const{statusCode:i}=r;if(i!==200){const o=new Error(`Request failed with code ${i}`);o.code=i;l(o);r.resume();return}let o="";r.setEncoding("utf8");r.on("data",(r=>{o+=r}));r.on("end",(()=>{try{const r=JSON.parse(o);a(r)}catch(r){l(r)}}))})).on("error",l).on("timeout",l)}));const getMostRecent=async({full:r,scope:i},l)=>{const u=p(i);const c=new a(r,u);let h=null;try{h=await loadPackage(c)}catch(r){if(r.code&&String(r.code).startsWith(4)){const r=o(1384);const i=r(u,{recursive:true});h=await loadPackage(c,i)}else{throw r}}const d=h["dist-tags"][l];if(!d){throw new Error(`Distribution tag ${l} is not available`)}return d};const y={interval:36e5,distTag:"latest"};const getDetails=r=>{const i={full:encode(r)};if(r.includes("/")){const o=r.split("/");i.scope=o[0];i.name=o[1]}else{i.scope=null;i.name=r}return i};r.exports=async(r,i)=>{if(typeof r!=="object"){throw new Error("The first parameter should be your package.json file content")}const o=getDetails(r.name);const a=Date.now();const{distTag:l,interval:u}=Object.assign({},y,i);const c=await getFile(o,l);let h=null;let p=true;({shouldCheck:p,latest:h}=await evaluateCache(c,a,u));if(p){h=await getMostRecent(o,l);await updateCache(c,h,a)}const d=compareVersions(r.version,h);if(d===-1){return{latest:h,fromCache:!p}}return null}},8201:(r,i,o)=>{r.exports=which;which.sync=whichSync;var a=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";var l=o(1017);var u=a?";":":";var c=o(228);function getNotFoundError(r){var i=new Error("not found: "+r);i.code="ENOENT";return i}function getPathInfo(r,i){var o=i.colon||u;var l=i.path||process.env.PATH||"";var c=[""];l=l.split(o);var h="";if(a){l.unshift(process.cwd());h=i.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM";c=h.split(o);if(r.indexOf(".")!==-1&&c[0]!=="")c.unshift("")}if(r.match(/\//)||a&&r.match(/\\/))l=[""];return{env:l,ext:c,extExe:h}}function which(r,i,o){if(typeof i==="function"){o=i;i={}}var a=getPathInfo(r,i);var u=a.env;var h=a.ext;var p=a.extExe;var d=[];(function F(a,m){if(a===m){if(i.all&&d.length)return o(null,d);else return o(getNotFoundError(r))}var g=u[a];if(g.charAt(0)==='"'&&g.slice(-1)==='"')g=g.slice(1,-1);var y=l.join(g,r);if(!g&&/^\.[\\\/]/.test(r)){y=r.slice(0,2)+y}(function E(r,l){if(r===l)return F(a+1,m);var u=h[r];c(y+u,{pathExt:p},(function(a,c){if(!a&&c){if(i.all)d.push(y+u);else return o(null,y+u)}return E(r+1,l)}))})(0,h.length)})(0,u.length)}function whichSync(r,i){i=i||{};var o=getPathInfo(r,i);var a=o.env;var u=o.ext;var h=o.extExe;var p=[];for(var d=0,m=a.length;d<m;d++){var g=a[d];if(g.charAt(0)==='"'&&g.slice(-1)==='"')g=g.slice(1,-1);var y=l.join(g,r);if(!g&&/^\.[\\\/]/.test(r)){y=r.slice(0,2)+y}for(var v=0,b=u.length;v<b;v++){var w=y+u[v];var M;try{M=c.sync(w,{pathExt:h});if(M){if(i.all)p.push(w);else return w}}catch(r){}}}if(i.all&&p.length)return p;if(i.nothrow)return null;throw getNotFoundError(r)}},4586:r=>{r.exports=wrappy;function wrappy(r,i){if(r&&i)return wrappy(r)(i);if(typeof r!=="function")throw new TypeError("need wrapper function");Object.keys(r).forEach((function(i){wrapper[i]=r[i]}));return wrapper;function wrapper(){var i=new Array(arguments.length);for(var o=0;o<i.length;o++){i[o]=arguments[o]}var a=r.apply(this,i);var l=i[i.length-1];if(typeof a==="function"&&a!==l){Object.keys(l).forEach((function(r){a[r]=l[r]}))}return a}}},4604:function(r,i){(function(){"use strict";i.stripBOM=function(r){if(r[0]==="\ufeff"){return r.substring(1)}else{return r}}}).call(this)},1002:function(r,i,o){(function(){"use strict";var r,a,l,u,c,h={}.hasOwnProperty;r=o(3131);a=o(9498).defaults;u=function(r){return typeof r==="string"&&(r.indexOf("&")>=0||r.indexOf(">")>=0||r.indexOf("<")>=0)};c=function(r){return"<![CDATA["+l(r)+"]]>"};l=function(r){return r.replace("]]>","]]]]><![CDATA[>")};i.Builder=function(){function Builder(r){var i,o,l;this.options={};o=a["0.2"];for(i in o){if(!h.call(o,i))continue;l=o[i];this.options[i]=l}for(i in r){if(!h.call(r,i))continue;l=r[i];this.options[i]=l}}Builder.prototype.buildObject=function(i){var o,l,p,d,m;o=this.options.attrkey;l=this.options.charkey;if(Object.keys(i).length===1&&this.options.rootName===a["0.2"].rootName){m=Object.keys(i)[0];i=i[m]}else{m=this.options.rootName}p=function(r){return function(i,a){var d,m,g,y,v,b;if(typeof a!=="object"){if(r.options.cdata&&u(a)){i.raw(c(a))}else{i.txt(a)}}else if(Array.isArray(a)){for(y in a){if(!h.call(a,y))continue;m=a[y];for(v in m){g=m[v];i=p(i.ele(v),g).up()}}}else{for(v in a){if(!h.call(a,v))continue;m=a[v];if(v===o){if(typeof m==="object"){for(d in m){b=m[d];i=i.att(d,b)}}}else if(v===l){if(r.options.cdata&&u(m)){i=i.raw(c(m))}else{i=i.txt(m)}}else if(Array.isArray(m)){for(y in m){if(!h.call(m,y))continue;g=m[y];if(typeof g==="string"){if(r.options.cdata&&u(g)){i=i.ele(v).raw(c(g)).up()}else{i=i.ele(v,g).up()}}else{i=p(i.ele(v),g).up()}}}else if(typeof m==="object"){i=p(i.ele(v),m).up()}else{if(typeof m==="string"&&r.options.cdata&&u(m)){i=i.ele(v).raw(c(m)).up()}else{if(m==null){m=""}i=i.ele(v,m.toString()).up()}}}}return i}}(this);d=r.create(m,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars});return p(d,i).end(this.options.renderOpts)};return Builder}()}).call(this)},9498:function(r,i){(function(){i.defaults={.1:{explicitCharkey:false,trim:true,normalize:true,normalizeTags:false,attrkey:"@",charkey:"#",explicitArray:false,ignoreAttrs:false,mergeAttrs:false,explicitRoot:false,validator:null,xmlns:false,explicitChildren:false,childkey:"@@",charsAsChildren:false,includeWhiteChars:false,async:false,strict:true,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:false,trim:false,normalize:false,normalizeTags:false,attrkey:"$",charkey:"_",explicitArray:true,ignoreAttrs:false,mergeAttrs:false,explicitRoot:true,validator:null,xmlns:false,explicitChildren:false,preserveChildrenOrder:false,childkey:"$$",charsAsChildren:false,includeWhiteChars:false,async:false,strict:true,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:true},doctype:null,renderOpts:{pretty:true,indent:" ",newline:"\n"},headless:false,chunkSize:1e4,emptyTag:"",cdata:false}}}).call(this)},7426:function(r,i,o){(function(){"use strict";var r,a,l,u,c,h,p,d,m,bind=function(r,i){return function(){return r.apply(i,arguments)}},extend=function(r,i){for(var o in i){if(g.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},g={}.hasOwnProperty;d=o(9746);l=o(2361);r=o(4604);p=o(9068);m=o(9512).setImmediate;a=o(9498).defaults;u=function(r){return typeof r==="object"&&r!=null&&Object.keys(r).length===0};c=function(r){return r!=="__proto__"&&r!=="constructor"&&r!=="prototype"};h=function(r,i,o){var a,l,u;for(a=0,l=r.length;a<l;a++){u=r[a];i=u(i,o)}return i};i.Parser=function(o){extend(Parser,o);function Parser(r){this.parseStringPromise=bind(this.parseStringPromise,this);this.parseString=bind(this.parseString,this);this.reset=bind(this.reset,this);this.assignOrPush=bind(this.assignOrPush,this);this.processAsync=bind(this.processAsync,this);var o,l,u;if(!(this instanceof i.Parser)){return new i.Parser(r)}this.options={};l=a["0.2"];for(o in l){if(!g.call(l,o))continue;u=l[o];this.options[o]=u}for(o in r){if(!g.call(r,o))continue;u=r[o];this.options[o]=u}if(this.options.xmlns){this.options.xmlnskey=this.options.attrkey+"ns"}if(this.options.normalizeTags){if(!this.options.tagNameProcessors){this.options.tagNameProcessors=[]}this.options.tagNameProcessors.unshift(p.normalize)}this.reset()}Parser.prototype.processAsync=function(){var r,i;try{if(this.remaining.length<=this.options.chunkSize){r=this.remaining;this.remaining="";this.saxParser=this.saxParser.write(r);return this.saxParser.close()}else{r=this.remaining.substr(0,this.options.chunkSize);this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length);this.saxParser=this.saxParser.write(r);return m(this.processAsync)}}catch(r){i=r;if(!this.saxParser.errThrown){this.saxParser.errThrown=true;return this.emit(i)}}};Parser.prototype.assignOrPush=function(r,i,o){if(!c(i)){return}if(!(i in r)){if(!this.options.explicitArray){return r[i]=o}else{return r[i]=[o]}}else{if(!(r[i]instanceof Array)){r[i]=[r[i]]}return r[i].push(o)}};Parser.prototype.reset=function(){var r,i,o,a;this.removeAllListeners();this.saxParser=d.parser(this.options.strict,{trim:false,normalize:false,xmlns:this.options.xmlns});this.saxParser.errThrown=false;this.saxParser.onerror=function(r){return function(i){r.saxParser.resume();if(!r.saxParser.errThrown){r.saxParser.errThrown=true;return r.emit("error",i)}}}(this);this.saxParser.onend=function(r){return function(){if(!r.saxParser.ended){r.saxParser.ended=true;return r.emit("end",r.resultObject)}}}(this);this.saxParser.ended=false;this.EXPLICIT_CHARKEY=this.options.explicitCharkey;this.resultObject=null;a=[];r=this.options.attrkey;i=this.options.charkey;this.saxParser.onopentag=function(o){return function(l){var u,p,d,m,y;d={};d[i]="";if(!o.options.ignoreAttrs){y=l.attributes;for(u in y){if(!g.call(y,u))continue;if(!(r in d)&&!o.options.mergeAttrs){d[r]={}}p=o.options.attrValueProcessors?h(o.options.attrValueProcessors,l.attributes[u],u):l.attributes[u];m=o.options.attrNameProcessors?h(o.options.attrNameProcessors,u):u;if(c(m)){if(o.options.mergeAttrs){o.assignOrPush(d,m,p)}else{d[r][m]=p}}}}d["#name"]=o.options.tagNameProcessors?h(o.options.tagNameProcessors,l.name):l.name;if(o.options.xmlns){d[o.options.xmlnskey]={uri:l.uri,local:l.local}}return a.push(d)}}(this);this.saxParser.onclosetag=function(r){return function(){var o,l,p,d,m,y,v,b,w,M;y=a.pop();m=y["#name"];if(!r.options.explicitChildren||!r.options.preserveChildrenOrder){delete y["#name"]}if(y.cdata===true){o=y.cdata;delete y.cdata}w=a[a.length-1];if(y[i].match(/^\s*$/)&&!o){l=y[i];delete y[i]}else{if(r.options.trim){y[i]=y[i].trim()}if(r.options.normalize){y[i]=y[i].replace(/\s{2,}/g," ").trim()}y[i]=r.options.valueProcessors?h(r.options.valueProcessors,y[i],m):y[i];if(Object.keys(y).length===1&&i in y&&!r.EXPLICIT_CHARKEY){y=y[i]}}if(u(y)){if(typeof r.options.emptyTag==="function"){y=r.options.emptyTag()}else{y=r.options.emptyTag!==""?r.options.emptyTag:l}}if(r.options.validator!=null){M="/"+function(){var r,i,o;o=[];for(r=0,i=a.length;r<i;r++){d=a[r];o.push(d["#name"])}return o}().concat(m).join("/");(function(){var i;try{return y=r.options.validator(M,w&&w[m],y)}catch(o){i=o;return r.emit("error",i)}})()}if(r.options.explicitChildren&&!r.options.mergeAttrs&&typeof y==="object"){if(!r.options.preserveChildrenOrder){d={};if(r.options.attrkey in y){d[r.options.attrkey]=y[r.options.attrkey];delete y[r.options.attrkey]}if(!r.options.charsAsChildren&&r.options.charkey in y){d[r.options.charkey]=y[r.options.charkey];delete y[r.options.charkey]}if(Object.getOwnPropertyNames(y).length>0){d[r.options.childkey]=y}y=d}else if(w){w[r.options.childkey]=w[r.options.childkey]||[];v={};for(p in y){if(!g.call(y,p))continue;if(c(p)){v[p]=y[p]}}w[r.options.childkey].push(v);delete y["#name"];if(Object.keys(y).length===1&&i in y&&!r.EXPLICIT_CHARKEY){y=y[i]}}}if(a.length>0){return r.assignOrPush(w,m,y)}else{if(r.options.explicitRoot){b=y;y={};y[m]=b}r.resultObject=y;r.saxParser.ended=true;return r.emit("end",r.resultObject)}}}(this);o=function(r){return function(o){var l,u;u=a[a.length-1];if(u){u[i]+=o;if(r.options.explicitChildren&&r.options.preserveChildrenOrder&&r.options.charsAsChildren&&(r.options.includeWhiteChars||o.replace(/\\n/g,"").trim()!=="")){u[r.options.childkey]=u[r.options.childkey]||[];l={"#name":"__text__"};l[i]=o;if(r.options.normalize){l[i]=l[i].replace(/\s{2,}/g," ").trim()}u[r.options.childkey].push(l)}return u}}}(this);this.saxParser.ontext=o;return this.saxParser.oncdata=function(r){return function(r){var i;i=o(r);if(i){return i.cdata=true}}}(this)};Parser.prototype.parseString=function(i,o){var a;if(o!=null&&typeof o==="function"){this.on("end",(function(r){this.reset();return o(null,r)}));this.on("error",(function(r){this.reset();return o(r)}))}try{i=i.toString();if(i.trim()===""){this.emit("end",null);return true}i=r.stripBOM(i);if(this.options.async){this.remaining=i;m(this.processAsync);return this.saxParser}return this.saxParser.write(i).close()}catch(r){a=r;if(!(this.saxParser.errThrown||this.saxParser.ended)){this.emit("error",a);return this.saxParser.errThrown=true}else if(this.saxParser.ended){throw a}}};Parser.prototype.parseStringPromise=function(r){return new Promise(function(i){return function(o,a){return i.parseString(r,(function(r,i){if(r){return a(r)}else{return o(i)}}))}}(this))};return Parser}(l);i.parseString=function(r,o,a){var l,u,c;if(a!=null){if(typeof a==="function"){l=a}if(typeof o==="object"){u=o}}else{if(typeof o==="function"){l=o}u={}}c=new i.Parser(u);return c.parseString(r,l)};i.parseStringPromise=function(r,o){var a,l;if(typeof o==="object"){a=o}l=new i.Parser(a);return l.parseStringPromise(r)}}).call(this)},9068:function(r,i){(function(){"use strict";var r;r=new RegExp(/(?!xmlns)^.*:/);i.normalize=function(r){return r.toLowerCase()};i.firstCharLowerCase=function(r){return r.charAt(0).toLowerCase()+r.slice(1)};i.stripPrefix=function(i){return i.replace(r,"")};i.parseNumbers=function(r){if(!isNaN(r)){r=r%1===0?parseInt(r,10):parseFloat(r)}return r};i.parseBooleans=function(r){if(/^(?:true|false)$/i.test(r)){r=r.toLowerCase()==="true"}return r}}).call(this)},7013:function(r,i,o){(function(){"use strict";var r,a,l,u,extend=function(r,i){for(var o in i){if(c.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},c={}.hasOwnProperty;a=o(9498);r=o(1002);l=o(7426);u=o(9068);i.defaults=a.defaults;i.processors=u;i.ValidationError=function(r){extend(ValidationError,r);function ValidationError(r){this.message=r}return ValidationError}(Error);i.Builder=r.Builder;i.Parser=l.Parser;i.parseString=l.parseString;i.parseStringPromise=l.parseStringPromise}).call(this)},2346:function(r){(function(){r.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},4128:function(r){(function(){r.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},2629:function(r){(function(){var i,o,a,l,u,c,h,p=[].slice,d={}.hasOwnProperty;i=function(){var r,i,o,a,l,c;c=arguments[0],l=2<=arguments.length?p.call(arguments,1):[];if(u(Object.assign)){Object.assign.apply(null,arguments)}else{for(r=0,o=l.length;r<o;r++){a=l[r];if(a!=null){for(i in a){if(!d.call(a,i))continue;c[i]=a[i]}}}}return c};u=function(r){return!!r&&Object.prototype.toString.call(r)==="[object Function]"};c=function(r){var i;return!!r&&((i=typeof r)==="function"||i==="object")};a=function(r){if(u(Array.isArray)){return Array.isArray(r)}else{return Object.prototype.toString.call(r)==="[object Array]"}};l=function(r){var i;if(a(r)){return!r.length}else{for(i in r){if(!d.call(r,i))continue;return false}return true}};h=function(r){var i,o;return c(r)&&(o=Object.getPrototypeOf(r))&&(i=o.constructor)&&typeof i==="function"&&i instanceof i&&Function.prototype.toString.call(i)===Function.prototype.toString.call(Object)};o=function(r){if(u(r.valueOf)){return r.valueOf()}else{return r}};r.exports.assign=i;r.exports.isFunction=u;r.exports.isObject=c;r.exports.isArray=a;r.exports.isEmpty=l;r.exports.isPlainObject=h;r.exports.getValue=o}).call(this)},8413:function(r){(function(){r.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},9525:function(r,i,o){(function(){var i,a,l;i=o(4128);l=o(8064);r.exports=a=function(){function XMLAttribute(r,o,a){this.parent=r;if(this.parent){this.options=this.parent.options;this.stringify=this.parent.stringify}if(o==null){throw new Error("Missing attribute name. "+this.debugInfo(o))}this.name=this.stringify.name(o);this.value=this.stringify.attValue(a);this.type=i.Attribute;this.isId=false;this.schemaTypeInfo=null}Object.defineProperty(XMLAttribute.prototype,"nodeType",{get:function(){return this.type}});Object.defineProperty(XMLAttribute.prototype,"ownerElement",{get:function(){return this.parent}});Object.defineProperty(XMLAttribute.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}});Object.defineProperty(XMLAttribute.prototype,"namespaceURI",{get:function(){return""}});Object.defineProperty(XMLAttribute.prototype,"prefix",{get:function(){return""}});Object.defineProperty(XMLAttribute.prototype,"localName",{get:function(){return this.name}});Object.defineProperty(XMLAttribute.prototype,"specified",{get:function(){return true}});XMLAttribute.prototype.clone=function(){return Object.create(this)};XMLAttribute.prototype.toString=function(r){return this.options.writer.attribute(this,this.options.writer.filterOptions(r))};XMLAttribute.prototype.debugInfo=function(r){r=r||this.name;if(r==null){return"parent: <"+this.parent.name+">"}else{return"attribute: {"+r+"}, parent: <"+this.parent.name+">"}};XMLAttribute.prototype.isEqualNode=function(r){if(r.namespaceURI!==this.namespaceURI){return false}if(r.prefix!==this.prefix){return false}if(r.localName!==this.localName){return false}if(r.value!==this.value){return false}return true};return XMLAttribute}()}).call(this)},6789:function(r,i,o){(function(){var i,a,l,extend=function(r,i){for(var o in i){if(u.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},u={}.hasOwnProperty;i=o(4128);l=o(3527);r.exports=a=function(r){extend(XMLCData,r);function XMLCData(r,o){XMLCData.__super__.constructor.call(this,r);if(o==null){throw new Error("Missing CDATA text. "+this.debugInfo())}this.name="#cdata-section";this.type=i.CData;this.value=this.stringify.cdata(o)}XMLCData.prototype.clone=function(){return Object.create(this)};XMLCData.prototype.toString=function(r){return this.options.writer.cdata(this,this.options.writer.filterOptions(r))};return XMLCData}(l)}).call(this)},3527:function(r,i,o){(function(){var i,a,extend=function(r,i){for(var o in i){if(l.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},l={}.hasOwnProperty;a=o(8064);r.exports=i=function(r){extend(XMLCharacterData,r);function XMLCharacterData(r){XMLCharacterData.__super__.constructor.call(this,r);this.value=""}Object.defineProperty(XMLCharacterData.prototype,"data",{get:function(){return this.value},set:function(r){return this.value=r||""}});Object.defineProperty(XMLCharacterData.prototype,"length",{get:function(){return this.value.length}});Object.defineProperty(XMLCharacterData.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}});XMLCharacterData.prototype.clone=function(){return Object.create(this)};XMLCharacterData.prototype.substringData=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.appendData=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.insertData=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.deleteData=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.replaceData=function(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.isEqualNode=function(r){if(!XMLCharacterData.__super__.isEqualNode.apply(this,arguments).isEqualNode(r)){return false}if(r.data!==this.data){return false}return true};return XMLCharacterData}(a)}).call(this)},4593:function(r,i,o){(function(){var i,a,l,extend=function(r,i){for(var o in i){if(u.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},u={}.hasOwnProperty;i=o(4128);a=o(3527);r.exports=l=function(r){extend(XMLComment,r);function XMLComment(r,o){XMLComment.__super__.constructor.call(this,r);if(o==null){throw new Error("Missing comment text. "+this.debugInfo())}this.name="#comment";this.type=i.Comment;this.value=this.stringify.comment(o)}XMLComment.prototype.clone=function(){return Object.create(this)};XMLComment.prototype.toString=function(r){return this.options.writer.comment(this,this.options.writer.filterOptions(r))};return XMLComment}(a)}).call(this)},4196:function(r,i,o){(function(){var i,a,l;a=o(7850);l=o(5132);r.exports=i=function(){function XMLDOMConfiguration(){var r;this.defaultParams={"canonical-form":false,"cdata-sections":false,comments:false,"datatype-normalization":false,"element-content-whitespace":true,entities:true,"error-handler":new a,infoset:true,"validate-if-schema":false,namespaces:true,"namespace-declarations":true,"normalize-characters":false,"schema-location":"","schema-type":"","split-cdata-sections":true,validate:false,"well-formed":true};this.params=r=Object.create(this.defaultParams)}Object.defineProperty(XMLDOMConfiguration.prototype,"parameterNames",{get:function(){return new l(Object.keys(this.defaultParams))}});XMLDOMConfiguration.prototype.getParameter=function(r){if(this.params.hasOwnProperty(r)){return this.params[r]}else{return null}};XMLDOMConfiguration.prototype.canSetParameter=function(r,i){return true};XMLDOMConfiguration.prototype.setParameter=function(r,i){if(i!=null){return this.params[r]=i}else{return delete this.params[r]}};return XMLDOMConfiguration}()}).call(this)},7850:function(r){(function(){var i;r.exports=i=function(){function XMLDOMErrorHandler(){}XMLDOMErrorHandler.prototype.handleError=function(r){throw new Error(r)};return XMLDOMErrorHandler}()}).call(this)},9490:function(r){(function(){var i;r.exports=i=function(){function XMLDOMImplementation(){}XMLDOMImplementation.prototype.hasFeature=function(r,i){return true};XMLDOMImplementation.prototype.createDocumentType=function(r,i,o){throw new Error("This DOM method is not implemented.")};XMLDOMImplementation.prototype.createDocument=function(r,i,o){throw new Error("This DOM method is not implemented.")};XMLDOMImplementation.prototype.createHTMLDocument=function(r){throw new Error("This DOM method is not implemented.")};XMLDOMImplementation.prototype.getFeature=function(r,i){throw new Error("This DOM method is not implemented.")};return XMLDOMImplementation}()}).call(this)},5132:function(r){(function(){var i;r.exports=i=function(){function XMLDOMStringList(r){this.arr=r||[]}Object.defineProperty(XMLDOMStringList.prototype,"length",{get:function(){return this.arr.length}});XMLDOMStringList.prototype.item=function(r){return this.arr[r]||null};XMLDOMStringList.prototype.contains=function(r){return this.arr.indexOf(r)!==-1};return XMLDOMStringList}()}).call(this)},1066:function(r,i,o){(function(){var i,a,l,extend=function(r,i){for(var o in i){if(u.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},u={}.hasOwnProperty;l=o(8064);i=o(4128);r.exports=a=function(r){extend(XMLDTDAttList,r);function XMLDTDAttList(r,o,a,l,u,c){XMLDTDAttList.__super__.constructor.call(this,r);if(o==null){throw new Error("Missing DTD element name. "+this.debugInfo())}if(a==null){throw new Error("Missing DTD attribute name. "+this.debugInfo(o))}if(!l){throw new Error("Missing DTD attribute type. "+this.debugInfo(o))}if(!u){throw new Error("Missing DTD attribute default. "+this.debugInfo(o))}if(u.indexOf("#")!==0){u="#"+u}if(!u.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)){throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(o))}if(c&&!u.match(/^(#FIXED|#DEFAULT)$/)){throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(o))}this.elementName=this.stringify.name(o);this.type=i.AttributeDeclaration;this.attributeName=this.stringify.name(a);this.attributeType=this.stringify.dtdAttType(l);if(c){this.defaultValue=this.stringify.dtdAttDefault(c)}this.defaultValueType=u}XMLDTDAttList.prototype.toString=function(r){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(r))};return XMLDTDAttList}(l)}).call(this)},3584:function(r,i,o){(function(){var i,a,l,extend=function(r,i){for(var o in i){if(u.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},u={}.hasOwnProperty;l=o(8064);i=o(4128);r.exports=a=function(r){extend(XMLDTDElement,r);function XMLDTDElement(r,o,a){XMLDTDElement.__super__.constructor.call(this,r);if(o==null){throw new Error("Missing DTD element name. "+this.debugInfo())}if(!a){a="(#PCDATA)"}if(Array.isArray(a)){a="("+a.join(",")+")"}this.name=this.stringify.name(o);this.type=i.ElementDeclaration;this.value=this.stringify.dtdElementValue(a)}XMLDTDElement.prototype.toString=function(r){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(r))};return XMLDTDElement}(l)}).call(this)},9346:function(r,i,o){(function(){var i,a,l,u,extend=function(r,i){for(var o in i){if(c.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},c={}.hasOwnProperty;u=o(2629).isObject;l=o(8064);i=o(4128);r.exports=a=function(r){extend(XMLDTDEntity,r);function XMLDTDEntity(r,o,a,l){XMLDTDEntity.__super__.constructor.call(this,r);if(a==null){throw new Error("Missing DTD entity name. "+this.debugInfo(a))}if(l==null){throw new Error("Missing DTD entity value. "+this.debugInfo(a))}this.pe=!!o;this.name=this.stringify.name(a);this.type=i.EntityDeclaration;if(!u(l)){this.value=this.stringify.dtdEntityValue(l);this.internal=true}else{if(!l.pubID&&!l.sysID){throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(a))}if(l.pubID&&!l.sysID){throw new Error("System identifier is required for a public external entity. "+this.debugInfo(a))}this.internal=false;if(l.pubID!=null){this.pubID=this.stringify.dtdPubID(l.pubID)}if(l.sysID!=null){this.sysID=this.stringify.dtdSysID(l.sysID)}if(l.nData!=null){this.nData=this.stringify.dtdNData(l.nData)}if(this.pe&&this.nData){throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(a))}}}Object.defineProperty(XMLDTDEntity.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDTDEntity.prototype,"systemId",{get:function(){return this.sysID}});Object.defineProperty(XMLDTDEntity.prototype,"notationName",{get:function(){return this.nData||null}});Object.defineProperty(XMLDTDEntity.prototype,"inputEncoding",{get:function(){return null}});Object.defineProperty(XMLDTDEntity.prototype,"xmlEncoding",{get:function(){return null}});Object.defineProperty(XMLDTDEntity.prototype,"xmlVersion",{get:function(){return null}});XMLDTDEntity.prototype.toString=function(r){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(r))};return XMLDTDEntity}(l)}).call(this)},853:function(r,i,o){(function(){var i,a,l,extend=function(r,i){for(var o in i){if(u.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},u={}.hasOwnProperty;l=o(8064);i=o(4128);r.exports=a=function(r){extend(XMLDTDNotation,r);function XMLDTDNotation(r,o,a){XMLDTDNotation.__super__.constructor.call(this,r);if(o==null){throw new Error("Missing DTD notation name. "+this.debugInfo(o))}if(!a.pubID&&!a.sysID){throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(o))}this.name=this.stringify.name(o);this.type=i.NotationDeclaration;if(a.pubID!=null){this.pubID=this.stringify.dtdPubID(a.pubID)}if(a.sysID!=null){this.sysID=this.stringify.dtdSysID(a.sysID)}}Object.defineProperty(XMLDTDNotation.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDTDNotation.prototype,"systemId",{get:function(){return this.sysID}});XMLDTDNotation.prototype.toString=function(r){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(r))};return XMLDTDNotation}(l)}).call(this)},4972:function(r,i,o){(function(){var i,a,l,u,extend=function(r,i){for(var o in i){if(c.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},c={}.hasOwnProperty;u=o(2629).isObject;l=o(8064);i=o(4128);r.exports=a=function(r){extend(XMLDeclaration,r);function XMLDeclaration(r,o,a,l){var c;XMLDeclaration.__super__.constructor.call(this,r);if(u(o)){c=o,o=c.version,a=c.encoding,l=c.standalone}if(!o){o="1.0"}this.type=i.Declaration;this.version=this.stringify.xmlVersion(o);if(a!=null){this.encoding=this.stringify.xmlEncoding(a)}if(l!=null){this.standalone=this.stringify.xmlStandalone(l)}}XMLDeclaration.prototype.toString=function(r){return this.options.writer.declaration(this,this.options.writer.filterOptions(r))};return XMLDeclaration}(l)}).call(this)},9025:function(r,i,o){(function(){var i,a,l,u,c,h,p,d,m,extend=function(r,i){for(var o in i){if(g.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},g={}.hasOwnProperty;m=o(2629).isObject;d=o(8064);i=o(4128);a=o(1066);u=o(9346);l=o(3584);c=o(853);p=o(8339);r.exports=h=function(r){extend(XMLDocType,r);function XMLDocType(r,o,a){var l,u,c,h,p,d;XMLDocType.__super__.constructor.call(this,r);this.type=i.DocType;if(r.children){h=r.children;for(u=0,c=h.length;u<c;u++){l=h[u];if(l.type===i.Element){this.name=l.name;break}}}this.documentObject=r;if(m(o)){p=o,o=p.pubID,a=p.sysID}if(a==null){d=[o,a],a=d[0],o=d[1]}if(o!=null){this.pubID=this.stringify.dtdPubID(o)}if(a!=null){this.sysID=this.stringify.dtdSysID(a)}}Object.defineProperty(XMLDocType.prototype,"entities",{get:function(){var r,o,a,l,u;l={};u=this.children;for(o=0,a=u.length;o<a;o++){r=u[o];if(r.type===i.EntityDeclaration&&!r.pe){l[r.name]=r}}return new p(l)}});Object.defineProperty(XMLDocType.prototype,"notations",{get:function(){var r,o,a,l,u;l={};u=this.children;for(o=0,a=u.length;o<a;o++){r=u[o];if(r.type===i.NotationDeclaration){l[r.name]=r}}return new p(l)}});Object.defineProperty(XMLDocType.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDocType.prototype,"systemId",{get:function(){return this.sysID}});Object.defineProperty(XMLDocType.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});XMLDocType.prototype.element=function(r,i){var o;o=new l(this,r,i);this.children.push(o);return this};XMLDocType.prototype.attList=function(r,i,o,l,u){var c;c=new a(this,r,i,o,l,u);this.children.push(c);return this};XMLDocType.prototype.entity=function(r,i){var o;o=new u(this,false,r,i);this.children.push(o);return this};XMLDocType.prototype.pEntity=function(r,i){var o;o=new u(this,true,r,i);this.children.push(o);return this};XMLDocType.prototype.notation=function(r,i){var o;o=new c(this,r,i);this.children.push(o);return this};XMLDocType.prototype.toString=function(r){return this.options.writer.docType(this,this.options.writer.filterOptions(r))};XMLDocType.prototype.ele=function(r,i){return this.element(r,i)};XMLDocType.prototype.att=function(r,i,o,a,l){return this.attList(r,i,o,a,l)};XMLDocType.prototype.ent=function(r,i){return this.entity(r,i)};XMLDocType.prototype.pent=function(r,i){return this.pEntity(r,i)};XMLDocType.prototype.not=function(r,i){return this.notation(r,i)};XMLDocType.prototype.up=function(){return this.root()||this.documentObject};XMLDocType.prototype.isEqualNode=function(r){if(!XMLDocType.__super__.isEqualNode.apply(this,arguments).isEqualNode(r)){return false}if(r.name!==this.name){return false}if(r.publicId!==this.publicId){return false}if(r.systemId!==this.systemId){return false}return true};return XMLDocType}(d)}).call(this)},3315:function(r,i,o){(function(){var i,a,l,u,c,h,p,d,extend=function(r,i){for(var o in i){if(m.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},m={}.hasOwnProperty;d=o(2629).isPlainObject;l=o(9490);a=o(4196);c=o(8064);i=o(4128);p=o(916);h=o(6939);r.exports=u=function(r){extend(XMLDocument,r);function XMLDocument(r){XMLDocument.__super__.constructor.call(this,null);this.name="#document";this.type=i.Document;this.documentURI=null;this.domConfig=new a;r||(r={});if(!r.writer){r.writer=new h}this.options=r;this.stringify=new p(r)}Object.defineProperty(XMLDocument.prototype,"implementation",{value:new l});Object.defineProperty(XMLDocument.prototype,"doctype",{get:function(){var r,o,a,l;l=this.children;for(o=0,a=l.length;o<a;o++){r=l[o];if(r.type===i.DocType){return r}}return null}});Object.defineProperty(XMLDocument.prototype,"documentElement",{get:function(){return this.rootObject||null}});Object.defineProperty(XMLDocument.prototype,"inputEncoding",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"strictErrorChecking",{get:function(){return false}});Object.defineProperty(XMLDocument.prototype,"xmlEncoding",{get:function(){if(this.children.length!==0&&this.children[0].type===i.Declaration){return this.children[0].encoding}else{return null}}});Object.defineProperty(XMLDocument.prototype,"xmlStandalone",{get:function(){if(this.children.length!==0&&this.children[0].type===i.Declaration){return this.children[0].standalone==="yes"}else{return false}}});Object.defineProperty(XMLDocument.prototype,"xmlVersion",{get:function(){if(this.children.length!==0&&this.children[0].type===i.Declaration){return this.children[0].version}else{return"1.0"}}});Object.defineProperty(XMLDocument.prototype,"URL",{get:function(){return this.documentURI}});Object.defineProperty(XMLDocument.prototype,"origin",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"compatMode",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"characterSet",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"contentType",{get:function(){return null}});XMLDocument.prototype.end=function(r){var i;i={};if(!r){r=this.options.writer}else if(d(r)){i=r;r=this.options.writer}return r.document(this,r.filterOptions(i))};XMLDocument.prototype.toString=function(r){return this.options.writer.document(this,this.options.writer.filterOptions(r))};XMLDocument.prototype.createElement=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createTextNode=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createComment=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createCDATASection=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createProcessingInstruction=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createAttribute=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createEntityReference=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.getElementsByTagName=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.importNode=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createElementNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createAttributeNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.getElementsByTagNameNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.getElementById=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.adoptNode=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.renameNode=function(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.getElementsByClassName=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createEvent=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createNodeIterator=function(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createTreeWalker=function(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())};return XMLDocument}(c)}).call(this)},1523:function(r,i,o){(function(){var i,a,l,u,c,h,p,d,m,g,y,v,b,w,M,D,T,x,O,N,_,A,S,I,C={}.hasOwnProperty;I=o(2629),A=I.isObject,_=I.isFunction,S=I.isPlainObject,N=I.getValue;i=o(4128);v=o(3315);w=o(7370);u=o(6789);c=o(4593);D=o(363);O=o(8854);M=o(3234);g=o(4972);y=o(9025);h=o(1066);d=o(9346);p=o(3584);m=o(853);l=o(9525);x=o(916);T=o(6939);a=o(8413);r.exports=b=function(){function XMLDocumentCB(r,o,a){var l;this.name="?xml";this.type=i.Document;r||(r={});l={};if(!r.writer){r.writer=new T}else if(S(r.writer)){l=r.writer;r.writer=new T}this.options=r;this.writer=r.writer;this.writerOptions=this.writer.filterOptions(l);this.stringify=new x(r);this.onDataCallback=o||function(){};this.onEndCallback=a||function(){};this.currentNode=null;this.currentLevel=-1;this.openTags={};this.documentStarted=false;this.documentCompleted=false;this.root=null}XMLDocumentCB.prototype.createChildNode=function(r){var o,a,l,u,c,h,p,d;switch(r.type){case i.CData:this.cdata(r.value);break;case i.Comment:this.comment(r.value);break;case i.Element:l={};p=r.attribs;for(a in p){if(!C.call(p,a))continue;o=p[a];l[a]=o.value}this.node(r.name,l);break;case i.Dummy:this.dummy();break;case i.Raw:this.raw(r.value);break;case i.Text:this.text(r.value);break;case i.ProcessingInstruction:this.instruction(r.target,r.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+r.constructor.name)}d=r.children;for(c=0,h=d.length;c<h;c++){u=d[c];this.createChildNode(u);if(u.type===i.Element){this.up()}}return this};XMLDocumentCB.prototype.dummy=function(){return this};XMLDocumentCB.prototype.node=function(r,i,o){var a;if(r==null){throw new Error("Missing node name.")}if(this.root&&this.currentLevel===-1){throw new Error("Document can only have one root node. "+this.debugInfo(r))}this.openCurrent();r=N(r);if(i==null){i={}}i=N(i);if(!A(i)){a=[i,o],o=a[0],i=a[1]}this.currentNode=new w(this,r,i);this.currentNode.children=false;this.currentLevel++;this.openTags[this.currentLevel]=this.currentNode;if(o!=null){this.text(o)}return this};XMLDocumentCB.prototype.element=function(r,o,a){var l,u,c,h,p,d;if(this.currentNode&&this.currentNode.type===i.DocType){this.dtdElement.apply(this,arguments)}else{if(Array.isArray(r)||A(r)||_(r)){h=this.options.noValidation;this.options.noValidation=true;d=new v(this.options).element("TEMP_ROOT");d.element(r);this.options.noValidation=h;p=d.children;for(u=0,c=p.length;u<c;u++){l=p[u];this.createChildNode(l);if(l.type===i.Element){this.up()}}}else{this.node(r,o,a)}}return this};XMLDocumentCB.prototype.attribute=function(r,i){var o,a;if(!this.currentNode||this.currentNode.children){throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(r))}if(r!=null){r=N(r)}if(A(r)){for(o in r){if(!C.call(r,o))continue;a=r[o];this.attribute(o,a)}}else{if(_(i)){i=i.apply()}if(this.options.keepNullAttributes&&i==null){this.currentNode.attribs[r]=new l(this,r,"")}else if(i!=null){this.currentNode.attribs[r]=new l(this,r,i)}}return this};XMLDocumentCB.prototype.text=function(r){var i;this.openCurrent();i=new O(this,r);this.onData(this.writer.text(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.cdata=function(r){var i;this.openCurrent();i=new u(this,r);this.onData(this.writer.cdata(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.comment=function(r){var i;this.openCurrent();i=new c(this,r);this.onData(this.writer.comment(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.raw=function(r){var i;this.openCurrent();i=new D(this,r);this.onData(this.writer.raw(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.instruction=function(r,i){var o,a,l,u,c;this.openCurrent();if(r!=null){r=N(r)}if(i!=null){i=N(i)}if(Array.isArray(r)){for(o=0,u=r.length;o<u;o++){a=r[o];this.instruction(a)}}else if(A(r)){for(a in r){if(!C.call(r,a))continue;l=r[a];this.instruction(a,l)}}else{if(_(i)){i=i.apply()}c=new M(this,r,i);this.onData(this.writer.processingInstruction(c,this.writerOptions,this.currentLevel+1),this.currentLevel+1)}return this};XMLDocumentCB.prototype.declaration=function(r,i,o){var a;this.openCurrent();if(this.documentStarted){throw new Error("declaration() must be the first node.")}a=new g(this,r,i,o);this.onData(this.writer.declaration(a,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.doctype=function(r,i,o){this.openCurrent();if(r==null){throw new Error("Missing root node name.")}if(this.root){throw new Error("dtd() must come before the root node.")}this.currentNode=new y(this,i,o);this.currentNode.rootNodeName=r;this.currentNode.children=false;this.currentLevel++;this.openTags[this.currentLevel]=this.currentNode;return this};XMLDocumentCB.prototype.dtdElement=function(r,i){var o;this.openCurrent();o=new p(this,r,i);this.onData(this.writer.dtdElement(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.attList=function(r,i,o,a,l){var u;this.openCurrent();u=new h(this,r,i,o,a,l);this.onData(this.writer.dtdAttList(u,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.entity=function(r,i){var o;this.openCurrent();o=new d(this,false,r,i);this.onData(this.writer.dtdEntity(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.pEntity=function(r,i){var o;this.openCurrent();o=new d(this,true,r,i);this.onData(this.writer.dtdEntity(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.notation=function(r,i){var o;this.openCurrent();o=new m(this,r,i);this.onData(this.writer.dtdNotation(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.up=function(){if(this.currentLevel<0){throw new Error("The document node has no parent.")}if(this.currentNode){if(this.currentNode.children){this.closeNode(this.currentNode)}else{this.openNode(this.currentNode)}this.currentNode=null}else{this.closeNode(this.openTags[this.currentLevel])}delete this.openTags[this.currentLevel];this.currentLevel--;return this};XMLDocumentCB.prototype.end=function(){while(this.currentLevel>=0){this.up()}return this.onEnd()};XMLDocumentCB.prototype.openCurrent=function(){if(this.currentNode){this.currentNode.children=true;return this.openNode(this.currentNode)}};XMLDocumentCB.prototype.openNode=function(r){var o,l,u,c;if(!r.isOpen){if(!this.root&&this.currentLevel===0&&r.type===i.Element){this.root=r}l="";if(r.type===i.Element){this.writerOptions.state=a.OpenTag;l=this.writer.indent(r,this.writerOptions,this.currentLevel)+"<"+r.name;c=r.attribs;for(u in c){if(!C.call(c,u))continue;o=c[u];l+=this.writer.attribute(o,this.writerOptions,this.currentLevel)}l+=(r.children?">":"/>")+this.writer.endline(r,this.writerOptions,this.currentLevel);this.writerOptions.state=a.InsideTag}else{this.writerOptions.state=a.OpenTag;l=this.writer.indent(r,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+r.rootNodeName;if(r.pubID&&r.sysID){l+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"'}else if(r.sysID){l+=' SYSTEM "'+r.sysID+'"'}if(r.children){l+=" [";this.writerOptions.state=a.InsideTag}else{this.writerOptions.state=a.CloseTag;l+=">"}l+=this.writer.endline(r,this.writerOptions,this.currentLevel)}this.onData(l,this.currentLevel);return r.isOpen=true}};XMLDocumentCB.prototype.closeNode=function(r){var o;if(!r.isClosed){o="";this.writerOptions.state=a.CloseTag;if(r.type===i.Element){o=this.writer.indent(r,this.writerOptions,this.currentLevel)+"</"+r.name+">"+this.writer.endline(r,this.writerOptions,this.currentLevel)}else{o=this.writer.indent(r,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(r,this.writerOptions,this.currentLevel)}this.writerOptions.state=a.None;this.onData(o,this.currentLevel);return r.isClosed=true}};XMLDocumentCB.prototype.onData=function(r,i){this.documentStarted=true;return this.onDataCallback(r,i+1)};XMLDocumentCB.prototype.onEnd=function(){this.documentCompleted=true;return this.onEndCallback()};XMLDocumentCB.prototype.debugInfo=function(r){if(r==null){return""}else{return"node: <"+r+">"}};XMLDocumentCB.prototype.ele=function(){return this.element.apply(this,arguments)};XMLDocumentCB.prototype.nod=function(r,i,o){return this.node(r,i,o)};XMLDocumentCB.prototype.txt=function(r){return this.text(r)};XMLDocumentCB.prototype.dat=function(r){return this.cdata(r)};XMLDocumentCB.prototype.com=function(r){return this.comment(r)};XMLDocumentCB.prototype.ins=function(r,i){return this.instruction(r,i)};XMLDocumentCB.prototype.dec=function(r,i,o){return this.declaration(r,i,o)};XMLDocumentCB.prototype.dtd=function(r,i,o){return this.doctype(r,i,o)};XMLDocumentCB.prototype.e=function(r,i,o){return this.element(r,i,o)};XMLDocumentCB.prototype.n=function(r,i,o){return this.node(r,i,o)};XMLDocumentCB.prototype.t=function(r){return this.text(r)};XMLDocumentCB.prototype.d=function(r){return this.cdata(r)};XMLDocumentCB.prototype.c=function(r){return this.comment(r)};XMLDocumentCB.prototype.r=function(r){return this.raw(r)};XMLDocumentCB.prototype.i=function(r,i){return this.instruction(r,i)};XMLDocumentCB.prototype.att=function(){if(this.currentNode&&this.currentNode.type===i.DocType){return this.attList.apply(this,arguments)}else{return this.attribute.apply(this,arguments)}};XMLDocumentCB.prototype.a=function(){if(this.currentNode&&this.currentNode.type===i.DocType){return this.attList.apply(this,arguments)}else{return this.attribute.apply(this,arguments)}};XMLDocumentCB.prototype.ent=function(r,i){return this.entity(r,i)};XMLDocumentCB.prototype.pent=function(r,i){return this.pEntity(r,i)};XMLDocumentCB.prototype.not=function(r,i){return this.notation(r,i)};return XMLDocumentCB}()}).call(this)},3288:function(r,i,o){(function(){var i,a,l,extend=function(r,i){for(var o in i){if(u.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},u={}.hasOwnProperty;l=o(8064);i=o(4128);r.exports=a=function(r){extend(XMLDummy,r);function XMLDummy(r){XMLDummy.__super__.constructor.call(this,r);this.type=i.Dummy}XMLDummy.prototype.clone=function(){return Object.create(this)};XMLDummy.prototype.toString=function(r){return""};return XMLDummy}(l)}).call(this)},7370:function(r,i,o){(function(){var i,a,l,u,c,h,p,d,m,extend=function(r,i){for(var o in i){if(g.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},g={}.hasOwnProperty;m=o(2629),d=m.isObject,p=m.isFunction,h=m.getValue;c=o(8064);i=o(4128);a=o(9525);u=o(8339);r.exports=l=function(r){extend(XMLElement,r);function XMLElement(r,o,a){var l,u,c,h;XMLElement.__super__.constructor.call(this,r);if(o==null){throw new Error("Missing element name. "+this.debugInfo())}this.name=this.stringify.name(o);this.type=i.Element;this.attribs={};this.schemaTypeInfo=null;if(a!=null){this.attribute(a)}if(r.type===i.Document){this.isRoot=true;this.documentObject=r;r.rootObject=this;if(r.children){h=r.children;for(u=0,c=h.length;u<c;u++){l=h[u];if(l.type===i.DocType){l.name=this.name;break}}}}}Object.defineProperty(XMLElement.prototype,"tagName",{get:function(){return this.name}});Object.defineProperty(XMLElement.prototype,"namespaceURI",{get:function(){return""}});Object.defineProperty(XMLElement.prototype,"prefix",{get:function(){return""}});Object.defineProperty(XMLElement.prototype,"localName",{get:function(){return this.name}});Object.defineProperty(XMLElement.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"attributes",{get:function(){if(!this.attributeMap||!this.attributeMap.nodes){this.attributeMap=new u(this.attribs)}return this.attributeMap}});XMLElement.prototype.clone=function(){var r,i,o,a;o=Object.create(this);if(o.isRoot){o.documentObject=null}o.attribs={};a=this.attribs;for(i in a){if(!g.call(a,i))continue;r=a[i];o.attribs[i]=r.clone()}o.children=[];this.children.forEach((function(r){var i;i=r.clone();i.parent=o;return o.children.push(i)}));return o};XMLElement.prototype.attribute=function(r,i){var o,l;if(r!=null){r=h(r)}if(d(r)){for(o in r){if(!g.call(r,o))continue;l=r[o];this.attribute(o,l)}}else{if(p(i)){i=i.apply()}if(this.options.keepNullAttributes&&i==null){this.attribs[r]=new a(this,r,"")}else if(i!=null){this.attribs[r]=new a(this,r,i)}}return this};XMLElement.prototype.removeAttribute=function(r){var i,o,a;if(r==null){throw new Error("Missing attribute name. "+this.debugInfo())}r=h(r);if(Array.isArray(r)){for(o=0,a=r.length;o<a;o++){i=r[o];delete this.attribs[i]}}else{delete this.attribs[r]}return this};XMLElement.prototype.toString=function(r){return this.options.writer.element(this,this.options.writer.filterOptions(r))};XMLElement.prototype.att=function(r,i){return this.attribute(r,i)};XMLElement.prototype.a=function(r,i){return this.attribute(r,i)};XMLElement.prototype.getAttribute=function(r){if(this.attribs.hasOwnProperty(r)){return this.attribs[r].value}else{return null}};XMLElement.prototype.setAttribute=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getAttributeNode=function(r){if(this.attribs.hasOwnProperty(r)){return this.attribs[r]}else{return null}};XMLElement.prototype.setAttributeNode=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.removeAttributeNode=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByTagName=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getAttributeNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.setAttributeNS=function(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.removeAttributeNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getAttributeNodeNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.setAttributeNodeNS=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByTagNameNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.hasAttribute=function(r){return this.attribs.hasOwnProperty(r)};XMLElement.prototype.hasAttributeNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.setIdAttribute=function(r,i){if(this.attribs.hasOwnProperty(r)){return this.attribs[r].isId}else{return i}};XMLElement.prototype.setIdAttributeNS=function(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.setIdAttributeNode=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByTagName=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByTagNameNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByClassName=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.isEqualNode=function(r){var i,o,a;if(!XMLElement.__super__.isEqualNode.apply(this,arguments).isEqualNode(r)){return false}if(r.namespaceURI!==this.namespaceURI){return false}if(r.prefix!==this.prefix){return false}if(r.localName!==this.localName){return false}if(r.attribs.length!==this.attribs.length){return false}for(i=o=0,a=this.attribs.length-1;0<=a?o<=a:o>=a;i=0<=a?++o:--o){if(!this.attribs[i].isEqualNode(r.attribs[i])){return false}}return true};return XMLElement}(c)}).call(this)},8339:function(r){(function(){var i;r.exports=i=function(){function XMLNamedNodeMap(r){this.nodes=r}Object.defineProperty(XMLNamedNodeMap.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}});XMLNamedNodeMap.prototype.clone=function(){return this.nodes=null};XMLNamedNodeMap.prototype.getNamedItem=function(r){return this.nodes[r]};XMLNamedNodeMap.prototype.setNamedItem=function(r){var i;i=this.nodes[r.nodeName];this.nodes[r.nodeName]=r;return i||null};XMLNamedNodeMap.prototype.removeNamedItem=function(r){var i;i=this.nodes[r];delete this.nodes[r];return i||null};XMLNamedNodeMap.prototype.item=function(r){return this.nodes[Object.keys(this.nodes)[r]]||null};XMLNamedNodeMap.prototype.getNamedItemNS=function(r,i){throw new Error("This DOM method is not implemented.")};XMLNamedNodeMap.prototype.setNamedItemNS=function(r){throw new Error("This DOM method is not implemented.")};XMLNamedNodeMap.prototype.removeNamedItemNS=function(r,i){throw new Error("This DOM method is not implemented.")};return XMLNamedNodeMap}()}).call(this)},8064:function(r,i,o){(function(){var i,a,l,u,c,h,p,d,m,g,y,v,b,w,M,D,T,x,O,N={}.hasOwnProperty;O=o(2629),x=O.isObject,T=O.isFunction,D=O.isEmpty,M=O.getValue;d=null;l=null;u=null;c=null;h=null;b=null;w=null;v=null;p=null;a=null;y=null;m=null;i=null;r.exports=g=function(){function XMLNode(r){this.parent=r;if(this.parent){this.options=this.parent.options;this.stringify=this.parent.stringify}this.value=null;this.children=[];this.baseURI=null;if(!d){d=o(7370);l=o(6789);u=o(4593);c=o(4972);h=o(9025);b=o(363);w=o(8854);v=o(3234);p=o(3288);a=o(4128);y=o(7209);m=o(8339);i=o(2346)}}Object.defineProperty(XMLNode.prototype,"nodeName",{get:function(){return this.name}});Object.defineProperty(XMLNode.prototype,"nodeType",{get:function(){return this.type}});Object.defineProperty(XMLNode.prototype,"nodeValue",{get:function(){return this.value}});Object.defineProperty(XMLNode.prototype,"parentNode",{get:function(){return this.parent}});Object.defineProperty(XMLNode.prototype,"childNodes",{get:function(){if(!this.childNodeList||!this.childNodeList.nodes){this.childNodeList=new y(this.children)}return this.childNodeList}});Object.defineProperty(XMLNode.prototype,"firstChild",{get:function(){return this.children[0]||null}});Object.defineProperty(XMLNode.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}});Object.defineProperty(XMLNode.prototype,"previousSibling",{get:function(){var r;r=this.parent.children.indexOf(this);return this.parent.children[r-1]||null}});Object.defineProperty(XMLNode.prototype,"nextSibling",{get:function(){var r;r=this.parent.children.indexOf(this);return this.parent.children[r+1]||null}});Object.defineProperty(XMLNode.prototype,"ownerDocument",{get:function(){return this.document()||null}});Object.defineProperty(XMLNode.prototype,"textContent",{get:function(){var r,i,o,l,u;if(this.nodeType===a.Element||this.nodeType===a.DocumentFragment){u="";l=this.children;for(i=0,o=l.length;i<o;i++){r=l[i];if(r.textContent){u+=r.textContent}}return u}else{return null}},set:function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}});XMLNode.prototype.setParent=function(r){var i,o,a,l,u;this.parent=r;if(r){this.options=r.options;this.stringify=r.stringify}l=this.children;u=[];for(o=0,a=l.length;o<a;o++){i=l[o];u.push(i.setParent(this))}return u};XMLNode.prototype.element=function(r,i,o){var a,l,u,c,h,p,d,m,g,y,v;p=null;if(i===null&&o==null){g=[{},null],i=g[0],o=g[1]}if(i==null){i={}}i=M(i);if(!x(i)){y=[i,o],o=y[0],i=y[1]}if(r!=null){r=M(r)}if(Array.isArray(r)){for(u=0,d=r.length;u<d;u++){l=r[u];p=this.element(l)}}else if(T(r)){p=this.element(r.apply())}else if(x(r)){for(h in r){if(!N.call(r,h))continue;v=r[h];if(T(v)){v=v.apply()}if(!this.options.ignoreDecorators&&this.stringify.convertAttKey&&h.indexOf(this.stringify.convertAttKey)===0){p=this.attribute(h.substr(this.stringify.convertAttKey.length),v)}else if(!this.options.separateArrayItems&&Array.isArray(v)&&D(v)){p=this.dummy()}else if(x(v)&&D(v)){p=this.element(h)}else if(!this.options.keepNullNodes&&v==null){p=this.dummy()}else if(!this.options.separateArrayItems&&Array.isArray(v)){for(c=0,m=v.length;c<m;c++){l=v[c];a={};a[h]=l;p=this.element(a)}}else if(x(v)){if(!this.options.ignoreDecorators&&this.stringify.convertTextKey&&h.indexOf(this.stringify.convertTextKey)===0){p=this.element(v)}else{p=this.element(h);p.element(v)}}else{p=this.element(h,v)}}}else if(!this.options.keepNullNodes&&o===null){p=this.dummy()}else{if(!this.options.ignoreDecorators&&this.stringify.convertTextKey&&r.indexOf(this.stringify.convertTextKey)===0){p=this.text(o)}else if(!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&r.indexOf(this.stringify.convertCDataKey)===0){p=this.cdata(o)}else if(!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&r.indexOf(this.stringify.convertCommentKey)===0){p=this.comment(o)}else if(!this.options.ignoreDecorators&&this.stringify.convertRawKey&&r.indexOf(this.stringify.convertRawKey)===0){p=this.raw(o)}else if(!this.options.ignoreDecorators&&this.stringify.convertPIKey&&r.indexOf(this.stringify.convertPIKey)===0){p=this.instruction(r.substr(this.stringify.convertPIKey.length),o)}else{p=this.node(r,i,o)}}if(p==null){throw new Error("Could not create any elements with: "+r+". "+this.debugInfo())}return p};XMLNode.prototype.insertBefore=function(r,i,o){var a,l,u,c,h;if(r!=null?r.type:void 0){u=r;c=i;u.setParent(this);if(c){l=children.indexOf(c);h=children.splice(l);children.push(u);Array.prototype.push.apply(children,h)}else{children.push(u)}return u}else{if(this.isRoot){throw new Error("Cannot insert elements at root level. "+this.debugInfo(r))}l=this.parent.children.indexOf(this);h=this.parent.children.splice(l);a=this.parent.element(r,i,o);Array.prototype.push.apply(this.parent.children,h);return a}};XMLNode.prototype.insertAfter=function(r,i,o){var a,l,u;if(this.isRoot){throw new Error("Cannot insert elements at root level. "+this.debugInfo(r))}l=this.parent.children.indexOf(this);u=this.parent.children.splice(l+1);a=this.parent.element(r,i,o);Array.prototype.push.apply(this.parent.children,u);return a};XMLNode.prototype.remove=function(){var r,i;if(this.isRoot){throw new Error("Cannot remove the root element. "+this.debugInfo())}r=this.parent.children.indexOf(this);[].splice.apply(this.parent.children,[r,r-r+1].concat(i=[])),i;return this.parent};XMLNode.prototype.node=function(r,i,o){var a,l;if(r!=null){r=M(r)}i||(i={});i=M(i);if(!x(i)){l=[i,o],o=l[0],i=l[1]}a=new d(this,r,i);if(o!=null){a.text(o)}this.children.push(a);return a};XMLNode.prototype.text=function(r){var i;if(x(r)){this.element(r)}i=new w(this,r);this.children.push(i);return this};XMLNode.prototype.cdata=function(r){var i;i=new l(this,r);this.children.push(i);return this};XMLNode.prototype.comment=function(r){var i;i=new u(this,r);this.children.push(i);return this};XMLNode.prototype.commentBefore=function(r){var i,o,a;o=this.parent.children.indexOf(this);a=this.parent.children.splice(o);i=this.parent.comment(r);Array.prototype.push.apply(this.parent.children,a);return this};XMLNode.prototype.commentAfter=function(r){var i,o,a;o=this.parent.children.indexOf(this);a=this.parent.children.splice(o+1);i=this.parent.comment(r);Array.prototype.push.apply(this.parent.children,a);return this};XMLNode.prototype.raw=function(r){var i;i=new b(this,r);this.children.push(i);return this};XMLNode.prototype.dummy=function(){var r;r=new p(this);return r};XMLNode.prototype.instruction=function(r,i){var o,a,l,u,c;if(r!=null){r=M(r)}if(i!=null){i=M(i)}if(Array.isArray(r)){for(u=0,c=r.length;u<c;u++){o=r[u];this.instruction(o)}}else if(x(r)){for(o in r){if(!N.call(r,o))continue;a=r[o];this.instruction(o,a)}}else{if(T(i)){i=i.apply()}l=new v(this,r,i);this.children.push(l)}return this};XMLNode.prototype.instructionBefore=function(r,i){var o,a,l;a=this.parent.children.indexOf(this);l=this.parent.children.splice(a);o=this.parent.instruction(r,i);Array.prototype.push.apply(this.parent.children,l);return this};XMLNode.prototype.instructionAfter=function(r,i){var o,a,l;a=this.parent.children.indexOf(this);l=this.parent.children.splice(a+1);o=this.parent.instruction(r,i);Array.prototype.push.apply(this.parent.children,l);return this};XMLNode.prototype.declaration=function(r,i,o){var l,u;l=this.document();u=new c(l,r,i,o);if(l.children.length===0){l.children.unshift(u)}else if(l.children[0].type===a.Declaration){l.children[0]=u}else{l.children.unshift(u)}return l.root()||l};XMLNode.prototype.dtd=function(r,i){var o,l,u,c,p,d,m,g,y,v;l=this.document();u=new h(l,r,i);y=l.children;for(c=p=0,m=y.length;p<m;c=++p){o=y[c];if(o.type===a.DocType){l.children[c]=u;return u}}v=l.children;for(c=d=0,g=v.length;d<g;c=++d){o=v[c];if(o.isRoot){l.children.splice(c,0,u);return u}}l.children.push(u);return u};XMLNode.prototype.up=function(){if(this.isRoot){throw new Error("The root node has no parent. Use doc() if you need to get the document object.")}return this.parent};XMLNode.prototype.root=function(){var r;r=this;while(r){if(r.type===a.Document){return r.rootObject}else if(r.isRoot){return r}else{r=r.parent}}};XMLNode.prototype.document=function(){var r;r=this;while(r){if(r.type===a.Document){return r}else{r=r.parent}}};XMLNode.prototype.end=function(r){return this.document().end(r)};XMLNode.prototype.prev=function(){var r;r=this.parent.children.indexOf(this);if(r<1){throw new Error("Already at the first node. "+this.debugInfo())}return this.parent.children[r-1]};XMLNode.prototype.next=function(){var r;r=this.parent.children.indexOf(this);if(r===-1||r===this.parent.children.length-1){throw new Error("Already at the last node. "+this.debugInfo())}return this.parent.children[r+1]};XMLNode.prototype.importDocument=function(r){var i;i=r.root().clone();i.parent=this;i.isRoot=false;this.children.push(i);return this};XMLNode.prototype.debugInfo=function(r){var i,o;r=r||this.name;if(r==null&&!((i=this.parent)!=null?i.name:void 0)){return""}else if(r==null){return"parent: <"+this.parent.name+">"}else if(!((o=this.parent)!=null?o.name:void 0)){return"node: <"+r+">"}else{return"node: <"+r+">, parent: <"+this.parent.name+">"}};XMLNode.prototype.ele=function(r,i,o){return this.element(r,i,o)};XMLNode.prototype.nod=function(r,i,o){return this.node(r,i,o)};XMLNode.prototype.txt=function(r){return this.text(r)};XMLNode.prototype.dat=function(r){return this.cdata(r)};XMLNode.prototype.com=function(r){return this.comment(r)};XMLNode.prototype.ins=function(r,i){return this.instruction(r,i)};XMLNode.prototype.doc=function(){return this.document()};XMLNode.prototype.dec=function(r,i,o){return this.declaration(r,i,o)};XMLNode.prototype.e=function(r,i,o){return this.element(r,i,o)};XMLNode.prototype.n=function(r,i,o){return this.node(r,i,o)};XMLNode.prototype.t=function(r){return this.text(r)};XMLNode.prototype.d=function(r){return this.cdata(r)};XMLNode.prototype.c=function(r){return this.comment(r)};XMLNode.prototype.r=function(r){return this.raw(r)};XMLNode.prototype.i=function(r,i){return this.instruction(r,i)};XMLNode.prototype.u=function(){return this.up()};XMLNode.prototype.importXMLBuilder=function(r){return this.importDocument(r)};XMLNode.prototype.replaceChild=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.removeChild=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.appendChild=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.hasChildNodes=function(){return this.children.length!==0};XMLNode.prototype.cloneNode=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.isSupported=function(r,i){return true};XMLNode.prototype.hasAttributes=function(){return this.attribs.length!==0};XMLNode.prototype.compareDocumentPosition=function(r){var o,a;o=this;if(o===r){return 0}else if(this.document()!==r.document()){a=i.Disconnected|i.ImplementationSpecific;if(Math.random()<.5){a|=i.Preceding}else{a|=i.Following}return a}else if(o.isAncestor(r)){return i.Contains|i.Preceding}else if(o.isDescendant(r)){return i.Contains|i.Following}else if(o.isPreceding(r)){return i.Preceding}else{return i.Following}};XMLNode.prototype.isSameNode=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.lookupPrefix=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.isDefaultNamespace=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.lookupNamespaceURI=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.isEqualNode=function(r){var i,o,a;if(r.nodeType!==this.nodeType){return false}if(r.children.length!==this.children.length){return false}for(i=o=0,a=this.children.length-1;0<=a?o<=a:o>=a;i=0<=a?++o:--o){if(!this.children[i].isEqualNode(r.children[i])){return false}}return true};XMLNode.prototype.getFeature=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.setUserData=function(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.getUserData=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.contains=function(r){if(!r){return false}return r===this||this.isDescendant(r)};XMLNode.prototype.isDescendant=function(r){var i,o,a,l,u;u=this.children;for(a=0,l=u.length;a<l;a++){i=u[a];if(r===i){return true}o=i.isDescendant(r);if(o){return true}}return false};XMLNode.prototype.isAncestor=function(r){return r.isDescendant(this)};XMLNode.prototype.isPreceding=function(r){var i,o;i=this.treePosition(r);o=this.treePosition(this);if(i===-1||o===-1){return false}else{return i<o}};XMLNode.prototype.isFollowing=function(r){var i,o;i=this.treePosition(r);o=this.treePosition(this);if(i===-1||o===-1){return false}else{return i>o}};XMLNode.prototype.treePosition=function(r){var i,o;o=0;i=false;this.foreachTreeNode(this.document(),(function(a){o++;if(!i&&a===r){return i=true}}));if(i){return o}else{return-1}};XMLNode.prototype.foreachTreeNode=function(r,i){var o,a,l,u,c;r||(r=this.document());u=r.children;for(a=0,l=u.length;a<l;a++){o=u[a];if(c=i(o)){return c}else{c=this.foreachTreeNode(o,i);if(c){return c}}}};return XMLNode}()}).call(this)},7209:function(r){(function(){var i;r.exports=i=function(){function XMLNodeList(r){this.nodes=r}Object.defineProperty(XMLNodeList.prototype,"length",{get:function(){return this.nodes.length||0}});XMLNodeList.prototype.clone=function(){return this.nodes=null};XMLNodeList.prototype.item=function(r){return this.nodes[r]||null};return XMLNodeList}()}).call(this)},3234:function(r,i,o){(function(){var i,a,l,extend=function(r,i){for(var o in i){if(u.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},u={}.hasOwnProperty;i=o(4128);a=o(3527);r.exports=l=function(r){extend(XMLProcessingInstruction,r);function XMLProcessingInstruction(r,o,a){XMLProcessingInstruction.__super__.constructor.call(this,r);if(o==null){throw new Error("Missing instruction target. "+this.debugInfo())}this.type=i.ProcessingInstruction;this.target=this.stringify.insTarget(o);this.name=this.target;if(a){this.value=this.stringify.insValue(a)}}XMLProcessingInstruction.prototype.clone=function(){return Object.create(this)};XMLProcessingInstruction.prototype.toString=function(r){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(r))};XMLProcessingInstruction.prototype.isEqualNode=function(r){if(!XMLProcessingInstruction.__super__.isEqualNode.apply(this,arguments).isEqualNode(r)){return false}if(r.target!==this.target){return false}return true};return XMLProcessingInstruction}(a)}).call(this)},363:function(r,i,o){(function(){var i,a,l,extend=function(r,i){for(var o in i){if(u.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},u={}.hasOwnProperty;i=o(4128);a=o(8064);r.exports=l=function(r){extend(XMLRaw,r);function XMLRaw(r,o){XMLRaw.__super__.constructor.call(this,r);if(o==null){throw new Error("Missing raw text. "+this.debugInfo())}this.type=i.Raw;this.value=this.stringify.raw(o)}XMLRaw.prototype.clone=function(){return Object.create(this)};XMLRaw.prototype.toString=function(r){return this.options.writer.raw(this,this.options.writer.filterOptions(r))};return XMLRaw}(a)}).call(this)},359:function(r,i,o){(function(){var i,a,l,u,extend=function(r,i){for(var o in i){if(c.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},c={}.hasOwnProperty;i=o(4128);u=o(8126);a=o(8413);r.exports=l=function(r){extend(XMLStreamWriter,r);function XMLStreamWriter(r,i){this.stream=r;XMLStreamWriter.__super__.constructor.call(this,i)}XMLStreamWriter.prototype.endline=function(r,i,o){if(r.isLastRootNode&&i.state===a.CloseTag){return""}else{return XMLStreamWriter.__super__.endline.call(this,r,i,o)}};XMLStreamWriter.prototype.document=function(r,i){var o,a,l,u,c,h,p,d,m;p=r.children;for(a=l=0,c=p.length;l<c;a=++l){o=p[a];o.isLastRootNode=a===r.children.length-1}i=this.filterOptions(i);d=r.children;m=[];for(u=0,h=d.length;u<h;u++){o=d[u];m.push(this.writeChildNode(o,i,0))}return m};XMLStreamWriter.prototype.attribute=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.attribute.call(this,r,i,o))};XMLStreamWriter.prototype.cdata=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.cdata.call(this,r,i,o))};XMLStreamWriter.prototype.comment=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.comment.call(this,r,i,o))};XMLStreamWriter.prototype.declaration=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.declaration.call(this,r,i,o))};XMLStreamWriter.prototype.docType=function(r,i,o){var l,u,c,h;o||(o=0);this.openNode(r,i,o);i.state=a.OpenTag;this.stream.write(this.indent(r,i,o));this.stream.write("<!DOCTYPE "+r.root().name);if(r.pubID&&r.sysID){this.stream.write(' PUBLIC "'+r.pubID+'" "'+r.sysID+'"')}else if(r.sysID){this.stream.write(' SYSTEM "'+r.sysID+'"')}if(r.children.length>0){this.stream.write(" [");this.stream.write(this.endline(r,i,o));i.state=a.InsideTag;h=r.children;for(u=0,c=h.length;u<c;u++){l=h[u];this.writeChildNode(l,i,o+1)}i.state=a.CloseTag;this.stream.write("]")}i.state=a.CloseTag;this.stream.write(i.spaceBeforeSlash+">");this.stream.write(this.endline(r,i,o));i.state=a.None;return this.closeNode(r,i,o)};XMLStreamWriter.prototype.element=function(r,o,l){var u,h,p,d,m,g,y,v,b,w;l||(l=0);this.openNode(r,o,l);o.state=a.OpenTag;this.stream.write(this.indent(r,o,l)+"<"+r.name);b=r.attribs;for(y in b){if(!c.call(b,y))continue;u=b[y];this.attribute(u,o,l)}p=r.children.length;d=p===0?null:r.children[0];if(p===0||r.children.every((function(r){return(r.type===i.Text||r.type===i.Raw)&&r.value===""}))){if(o.allowEmpty){this.stream.write(">");o.state=a.CloseTag;this.stream.write("</"+r.name+">")}else{o.state=a.CloseTag;this.stream.write(o.spaceBeforeSlash+"/>")}}else if(o.pretty&&p===1&&(d.type===i.Text||d.type===i.Raw)&&d.value!=null){this.stream.write(">");o.state=a.InsideTag;o.suppressPrettyCount++;v=true;this.writeChildNode(d,o,l+1);o.suppressPrettyCount--;v=false;o.state=a.CloseTag;this.stream.write("</"+r.name+">")}else{this.stream.write(">"+this.endline(r,o,l));o.state=a.InsideTag;w=r.children;for(m=0,g=w.length;m<g;m++){h=w[m];this.writeChildNode(h,o,l+1)}o.state=a.CloseTag;this.stream.write(this.indent(r,o,l)+"</"+r.name+">")}this.stream.write(this.endline(r,o,l));o.state=a.None;return this.closeNode(r,o,l)};XMLStreamWriter.prototype.processingInstruction=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.processingInstruction.call(this,r,i,o))};XMLStreamWriter.prototype.raw=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.raw.call(this,r,i,o))};XMLStreamWriter.prototype.text=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.text.call(this,r,i,o))};XMLStreamWriter.prototype.dtdAttList=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.dtdAttList.call(this,r,i,o))};XMLStreamWriter.prototype.dtdElement=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.dtdElement.call(this,r,i,o))};XMLStreamWriter.prototype.dtdEntity=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.dtdEntity.call(this,r,i,o))};XMLStreamWriter.prototype.dtdNotation=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.dtdNotation.call(this,r,i,o))};return XMLStreamWriter}(u)}).call(this)},6939:function(r,i,o){(function(){var i,a,extend=function(r,i){for(var o in i){if(l.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},l={}.hasOwnProperty;a=o(8126);r.exports=i=function(r){extend(XMLStringWriter,r);function XMLStringWriter(r){XMLStringWriter.__super__.constructor.call(this,r)}XMLStringWriter.prototype.document=function(r,i){var o,a,l,u,c;i=this.filterOptions(i);u="";c=r.children;for(a=0,l=c.length;a<l;a++){o=c[a];u+=this.writeChildNode(o,i,0)}if(i.pretty&&u.slice(-i.newline.length)===i.newline){u=u.slice(0,-i.newline.length)}return u};return XMLStringWriter}(a)}).call(this)},916:function(r){(function(){var i,bind=function(r,i){return function(){return r.apply(i,arguments)}},o={}.hasOwnProperty;r.exports=i=function(){function XMLStringifier(r){this.assertLegalName=bind(this.assertLegalName,this);this.assertLegalChar=bind(this.assertLegalChar,this);var i,a,l;r||(r={});this.options=r;if(!this.options.version){this.options.version="1.0"}a=r.stringify||{};for(i in a){if(!o.call(a,i))continue;l=a[i];this[i]=l}}XMLStringifier.prototype.name=function(r){if(this.options.noValidation){return r}return this.assertLegalName(""+r||"")};XMLStringifier.prototype.text=function(r){if(this.options.noValidation){return r}return this.assertLegalChar(this.textEscape(""+r||""))};XMLStringifier.prototype.cdata=function(r){if(this.options.noValidation){return r}r=""+r||"";r=r.replace("]]>","]]]]><![CDATA[>");return this.assertLegalChar(r)};XMLStringifier.prototype.comment=function(r){if(this.options.noValidation){return r}r=""+r||"";if(r.match(/--/)){throw new Error("Comment text cannot contain double-hypen: "+r)}return this.assertLegalChar(r)};XMLStringifier.prototype.raw=function(r){if(this.options.noValidation){return r}return""+r||""};XMLStringifier.prototype.attValue=function(r){if(this.options.noValidation){return r}return this.assertLegalChar(this.attEscape(r=""+r||""))};XMLStringifier.prototype.insTarget=function(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")};XMLStringifier.prototype.insValue=function(r){if(this.options.noValidation){return r}r=""+r||"";if(r.match(/\?>/)){throw new Error("Invalid processing instruction value: "+r)}return this.assertLegalChar(r)};XMLStringifier.prototype.xmlVersion=function(r){if(this.options.noValidation){return r}r=""+r||"";if(!r.match(/1\.[0-9]+/)){throw new Error("Invalid version number: "+r)}return r};XMLStringifier.prototype.xmlEncoding=function(r){if(this.options.noValidation){return r}r=""+r||"";if(!r.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)){throw new Error("Invalid encoding: "+r)}return this.assertLegalChar(r)};XMLStringifier.prototype.xmlStandalone=function(r){if(this.options.noValidation){return r}if(r){return"yes"}else{return"no"}};XMLStringifier.prototype.dtdPubID=function(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")};XMLStringifier.prototype.dtdSysID=function(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")};XMLStringifier.prototype.dtdElementValue=function(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")};XMLStringifier.prototype.dtdAttType=function(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")};XMLStringifier.prototype.dtdAttDefault=function(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")};XMLStringifier.prototype.dtdEntityValue=function(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")};XMLStringifier.prototype.dtdNData=function(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")};XMLStringifier.prototype.convertAttKey="@";XMLStringifier.prototype.convertPIKey="?";XMLStringifier.prototype.convertTextKey="#text";XMLStringifier.prototype.convertCDataKey="#cdata";XMLStringifier.prototype.convertCommentKey="#comment";XMLStringifier.prototype.convertRawKey="#raw";XMLStringifier.prototype.assertLegalChar=function(r){var i,o;if(this.options.noValidation){return r}i="";if(this.options.version==="1.0"){i=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;if(o=r.match(i)){throw new Error("Invalid character in string: "+r+" at index "+o.index)}}else if(this.options.version==="1.1"){i=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;if(o=r.match(i)){throw new Error("Invalid character in string: "+r+" at index "+o.index)}}return r};XMLStringifier.prototype.assertLegalName=function(r){var i;if(this.options.noValidation){return r}this.assertLegalChar(r);i=/^([: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])*$/;if(!r.match(i)){throw new Error("Invalid character in name")}return r};XMLStringifier.prototype.textEscape=function(r){var i;if(this.options.noValidation){return r}i=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g;return r.replace(i,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;")};XMLStringifier.prototype.attEscape=function(r){var i;if(this.options.noValidation){return r}i=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g;return r.replace(i,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;")};return XMLStringifier}()}).call(this)},8854:function(r,i,o){(function(){var i,a,l,extend=function(r,i){for(var o in i){if(u.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},u={}.hasOwnProperty;i=o(4128);a=o(3527);r.exports=l=function(r){extend(XMLText,r);function XMLText(r,o){XMLText.__super__.constructor.call(this,r);if(o==null){throw new Error("Missing element text. "+this.debugInfo())}this.name="#text";this.type=i.Text;this.value=this.stringify.text(o)}Object.defineProperty(XMLText.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLText.prototype,"wholeText",{get:function(){var r,i,o;o="";i=this.previousSibling;while(i){o=i.data+o;i=i.previousSibling}o+=this.data;r=this.nextSibling;while(r){o=o+r.data;r=r.nextSibling}return o}});XMLText.prototype.clone=function(){return Object.create(this)};XMLText.prototype.toString=function(r){return this.options.writer.text(this,this.options.writer.filterOptions(r))};XMLText.prototype.splitText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLText.prototype.replaceWholeText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};return XMLText}(a)}).call(this)},8126:function(r,i,o){(function(){var i,a,l,u,c,h,p,d,m,g,y,v,b,w,M,D,T,x={}.hasOwnProperty;T=o(2629).assign;i=o(4128);m=o(4972);g=o(9025);l=o(6789);u=o(4593);v=o(7370);w=o(363);M=o(8854);b=o(3234);y=o(3288);c=o(1066);h=o(3584);p=o(9346);d=o(853);a=o(8413);r.exports=D=function(){function XMLWriterBase(r){var i,o,a;r||(r={});this.options=r;o=r.writer||{};for(i in o){if(!x.call(o,i))continue;a=o[i];this["_"+i]=this[i];this[i]=a}}XMLWriterBase.prototype.filterOptions=function(r){var i,o,l,u,c,h,p,d;r||(r={});r=T({},this.options,r);i={writer:this};i.pretty=r.pretty||false;i.allowEmpty=r.allowEmpty||false;i.indent=(o=r.indent)!=null?o:" ";i.newline=(l=r.newline)!=null?l:"\n";i.offset=(u=r.offset)!=null?u:0;i.dontPrettyTextNodes=(c=(h=r.dontPrettyTextNodes)!=null?h:r.dontprettytextnodes)!=null?c:0;i.spaceBeforeSlash=(p=(d=r.spaceBeforeSlash)!=null?d:r.spacebeforeslash)!=null?p:"";if(i.spaceBeforeSlash===true){i.spaceBeforeSlash=" "}i.suppressPrettyCount=0;i.user={};i.state=a.None;return i};XMLWriterBase.prototype.indent=function(r,i,o){var a;if(!i.pretty||i.suppressPrettyCount){return""}else if(i.pretty){a=(o||0)+i.offset+1;if(a>0){return new Array(a).join(i.indent)}}return""};XMLWriterBase.prototype.endline=function(r,i,o){if(!i.pretty||i.suppressPrettyCount){return""}else{return i.newline}};XMLWriterBase.prototype.attribute=function(r,i,o){var a;this.openAttribute(r,i,o);a=" "+r.name+'="'+r.value+'"';this.closeAttribute(r,i,o);return a};XMLWriterBase.prototype.cdata=function(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<![CDATA[";i.state=a.InsideTag;l+=r.value;i.state=a.CloseTag;l+="]]>"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l};XMLWriterBase.prototype.comment=function(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"\x3c!-- ";i.state=a.InsideTag;l+=r.value;i.state=a.CloseTag;l+=" --\x3e"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l};XMLWriterBase.prototype.declaration=function(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<?xml";i.state=a.InsideTag;l+=' version="'+r.version+'"';if(r.encoding!=null){l+=' encoding="'+r.encoding+'"'}if(r.standalone!=null){l+=' standalone="'+r.standalone+'"'}i.state=a.CloseTag;l+=i.spaceBeforeSlash+"?>";l+=this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l};XMLWriterBase.prototype.docType=function(r,i,o){var l,u,c,h,p;o||(o=0);this.openNode(r,i,o);i.state=a.OpenTag;h=this.indent(r,i,o);h+="<!DOCTYPE "+r.root().name;if(r.pubID&&r.sysID){h+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"'}else if(r.sysID){h+=' SYSTEM "'+r.sysID+'"'}if(r.children.length>0){h+=" [";h+=this.endline(r,i,o);i.state=a.InsideTag;p=r.children;for(u=0,c=p.length;u<c;u++){l=p[u];h+=this.writeChildNode(l,i,o+1)}i.state=a.CloseTag;h+="]"}i.state=a.CloseTag;h+=i.spaceBeforeSlash+">";h+=this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return h};XMLWriterBase.prototype.element=function(r,o,l){var u,c,h,p,d,m,g,y,v,b,w,M,D,T;l||(l=0);b=false;w="";this.openNode(r,o,l);o.state=a.OpenTag;w+=this.indent(r,o,l)+"<"+r.name;M=r.attribs;for(v in M){if(!x.call(M,v))continue;u=M[v];w+=this.attribute(u,o,l)}h=r.children.length;p=h===0?null:r.children[0];if(h===0||r.children.every((function(r){return(r.type===i.Text||r.type===i.Raw)&&r.value===""}))){if(o.allowEmpty){w+=">";o.state=a.CloseTag;w+="</"+r.name+">"+this.endline(r,o,l)}else{o.state=a.CloseTag;w+=o.spaceBeforeSlash+"/>"+this.endline(r,o,l)}}else if(o.pretty&&h===1&&(p.type===i.Text||p.type===i.Raw)&&p.value!=null){w+=">";o.state=a.InsideTag;o.suppressPrettyCount++;b=true;w+=this.writeChildNode(p,o,l+1);o.suppressPrettyCount--;b=false;o.state=a.CloseTag;w+="</"+r.name+">"+this.endline(r,o,l)}else{if(o.dontPrettyTextNodes){D=r.children;for(d=0,g=D.length;d<g;d++){c=D[d];if((c.type===i.Text||c.type===i.Raw)&&c.value!=null){o.suppressPrettyCount++;b=true;break}}}w+=">"+this.endline(r,o,l);o.state=a.InsideTag;T=r.children;for(m=0,y=T.length;m<y;m++){c=T[m];w+=this.writeChildNode(c,o,l+1)}o.state=a.CloseTag;w+=this.indent(r,o,l)+"</"+r.name+">";if(b){o.suppressPrettyCount--}w+=this.endline(r,o,l);o.state=a.None}this.closeNode(r,o,l);return w};XMLWriterBase.prototype.writeChildNode=function(r,o,a){switch(r.type){case i.CData:return this.cdata(r,o,a);case i.Comment:return this.comment(r,o,a);case i.Element:return this.element(r,o,a);case i.Raw:return this.raw(r,o,a);case i.Text:return this.text(r,o,a);case i.ProcessingInstruction:return this.processingInstruction(r,o,a);case i.Dummy:return"";case i.Declaration:return this.declaration(r,o,a);case i.DocType:return this.docType(r,o,a);case i.AttributeDeclaration:return this.dtdAttList(r,o,a);case i.ElementDeclaration:return this.dtdElement(r,o,a);case i.EntityDeclaration:return this.dtdEntity(r,o,a);case i.NotationDeclaration:return this.dtdNotation(r,o,a);default:throw new Error("Unknown XML node type: "+r.constructor.name)}};XMLWriterBase.prototype.processingInstruction=function(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<?";i.state=a.InsideTag;l+=r.target;if(r.value){l+=" "+r.value}i.state=a.CloseTag;l+=i.spaceBeforeSlash+"?>";l+=this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l};XMLWriterBase.prototype.raw=function(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o);i.state=a.InsideTag;l+=r.value;i.state=a.CloseTag;l+=this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l};XMLWriterBase.prototype.text=function(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o);i.state=a.InsideTag;l+=r.value;i.state=a.CloseTag;l+=this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l};XMLWriterBase.prototype.dtdAttList=function(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<!ATTLIST";i.state=a.InsideTag;l+=" "+r.elementName+" "+r.attributeName+" "+r.attributeType;if(r.defaultValueType!=="#DEFAULT"){l+=" "+r.defaultValueType}if(r.defaultValue){l+=' "'+r.defaultValue+'"'}i.state=a.CloseTag;l+=i.spaceBeforeSlash+">"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l};XMLWriterBase.prototype.dtdElement=function(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<!ELEMENT";i.state=a.InsideTag;l+=" "+r.name+" "+r.value;i.state=a.CloseTag;l+=i.spaceBeforeSlash+">"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l};XMLWriterBase.prototype.dtdEntity=function(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<!ENTITY";i.state=a.InsideTag;if(r.pe){l+=" %"}l+=" "+r.name;if(r.value){l+=' "'+r.value+'"'}else{if(r.pubID&&r.sysID){l+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"'}else if(r.sysID){l+=' SYSTEM "'+r.sysID+'"'}if(r.nData){l+=" NDATA "+r.nData}}i.state=a.CloseTag;l+=i.spaceBeforeSlash+">"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l};XMLWriterBase.prototype.dtdNotation=function(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<!NOTATION";i.state=a.InsideTag;l+=" "+r.name;if(r.pubID&&r.sysID){l+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"'}else if(r.pubID){l+=' PUBLIC "'+r.pubID+'"'}else if(r.sysID){l+=' SYSTEM "'+r.sysID+'"'}i.state=a.CloseTag;l+=i.spaceBeforeSlash+">"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l};XMLWriterBase.prototype.openNode=function(r,i,o){};XMLWriterBase.prototype.closeNode=function(r,i,o){};XMLWriterBase.prototype.openAttribute=function(r,i,o){};XMLWriterBase.prototype.closeAttribute=function(r,i,o){};return XMLWriterBase}()}).call(this)},3131:function(r,i,o){(function(){var i,a,l,u,c,h,p,d,m,g;g=o(2629),d=g.assign,m=g.isFunction;l=o(9490);u=o(3315);c=o(1523);p=o(6939);h=o(359);i=o(4128);a=o(8413);r.exports.create=function(r,i,o,a){var l,c;if(r==null){throw new Error("Root element needs a name.")}a=d({},i,o,a);l=new u(a);c=l.element(r);if(!a.headless){l.declaration(a);if(a.pubID!=null||a.sysID!=null){l.dtd(a)}}return c};r.exports.begin=function(r,i,o){var a;if(m(r)){a=[r,i],i=a[0],o=a[1];r={}}if(i){return new c(r,i,o)}else{return new u(r)}};r.exports.stringWriter=function(r){return new p(r)};r.exports.streamWriter=function(r,i){return new h(r,i)};r.exports.implementation=new l;r.exports.nodeType=i;r.exports.writerState=a}).call(this)},144:function(r){(function(){r.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},7762:function(r){(function(){r.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},983:function(r){(function(){var i,o,a,l,u,c,h,p={}.hasOwnProperty;i=function(r,...i){var o,a,l,c;if(u(Object.assign)){Object.assign.apply(null,arguments)}else{for(o=0,l=i.length;o<l;o++){c=i[o];if(c!=null){for(a in c){if(!p.call(c,a))continue;r[a]=c[a]}}}}return r};u=function(r){return!!r&&Object.prototype.toString.call(r)==="[object Function]"};c=function(r){var i;return!!r&&((i=typeof r)==="function"||i==="object")};a=function(r){if(u(Array.isArray)){return Array.isArray(r)}else{return Object.prototype.toString.call(r)==="[object Array]"}};l=function(r){var i;if(a(r)){return!r.length}else{for(i in r){if(!p.call(r,i))continue;return false}return true}};h=function(r){var i,o;return c(r)&&(o=Object.getPrototypeOf(r))&&(i=o.constructor)&&typeof i==="function"&&i instanceof i&&Function.prototype.toString.call(i)===Function.prototype.toString.call(Object)};o=function(r){if(u(r.valueOf)){return r.valueOf()}else{return r}};r.exports.assign=i;r.exports.isFunction=u;r.exports.isObject=c;r.exports.isArray=a;r.exports.isEmpty=l;r.exports.isPlainObject=h;r.exports.getValue=o}).call(this)},140:function(r){(function(){r.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},1395:function(r,i,o){(function(){var i,a,l;i=o(7762);l=o(5089);r.exports=a=function(){class XMLAttribute{constructor(r,o,a){this.parent=r;if(this.parent){this.options=this.parent.options;this.stringify=this.parent.stringify}if(o==null){throw new Error("Missing attribute name. "+this.debugInfo(o))}this.name=this.stringify.name(o);this.value=this.stringify.attValue(a);this.type=i.Attribute;this.isId=false;this.schemaTypeInfo=null}clone(){return Object.create(this)}toString(r){return this.options.writer.attribute(this,this.options.writer.filterOptions(r))}debugInfo(r){r=r||this.name;if(r==null){return"parent: <"+this.parent.name+">"}else{return"attribute: {"+r+"}, parent: <"+this.parent.name+">"}}isEqualNode(r){if(r.namespaceURI!==this.namespaceURI){return false}if(r.prefix!==this.prefix){return false}if(r.localName!==this.localName){return false}if(r.value!==this.value){return false}return true}}Object.defineProperty(XMLAttribute.prototype,"nodeType",{get:function(){return this.type}});Object.defineProperty(XMLAttribute.prototype,"ownerElement",{get:function(){return this.parent}});Object.defineProperty(XMLAttribute.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}});Object.defineProperty(XMLAttribute.prototype,"namespaceURI",{get:function(){return""}});Object.defineProperty(XMLAttribute.prototype,"prefix",{get:function(){return""}});Object.defineProperty(XMLAttribute.prototype,"localName",{get:function(){return this.name}});Object.defineProperty(XMLAttribute.prototype,"specified",{get:function(){return true}});return XMLAttribute}.call(this)}).call(this)},5261:function(r,i,o){(function(){var i,a,l;i=o(7762);l=o(4765);r.exports=a=class XMLCData extends l{constructor(r,o){super(r);if(o==null){throw new Error("Missing CDATA text. "+this.debugInfo())}this.name="#cdata-section";this.type=i.CData;this.value=this.stringify.cdata(o)}clone(){return Object.create(this)}toString(r){return this.options.writer.cdata(this,this.options.writer.filterOptions(r))}}}).call(this)},4765:function(r,i,o){(function(){var i,a;a=o(5089);r.exports=i=function(){class XMLCharacterData extends a{constructor(r){super(r);this.value=""}clone(){return Object.create(this)}substringData(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}appendData(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}insertData(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}deleteData(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}replaceData(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(r){if(!super.isEqualNode(r)){return false}if(r.data!==this.data){return false}return true}}Object.defineProperty(XMLCharacterData.prototype,"data",{get:function(){return this.value},set:function(r){return this.value=r||""}});Object.defineProperty(XMLCharacterData.prototype,"length",{get:function(){return this.value.length}});Object.defineProperty(XMLCharacterData.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}});return XMLCharacterData}.call(this)}).call(this)},360:function(r,i,o){(function(){var i,a,l;i=o(7762);a=o(4765);r.exports=l=class XMLComment extends a{constructor(r,o){super(r);if(o==null){throw new Error("Missing comment text. "+this.debugInfo())}this.name="#comment";this.type=i.Comment;this.value=this.stringify.comment(o)}clone(){return Object.create(this)}toString(r){return this.options.writer.comment(this,this.options.writer.filterOptions(r))}}}).call(this)},5675:function(r,i,o){(function(){var i,a,l;a=o(121);l=o(8207);r.exports=i=function(){class XMLDOMConfiguration{constructor(){var r;this.defaultParams={"canonical-form":false,"cdata-sections":false,comments:false,"datatype-normalization":false,"element-content-whitespace":true,entities:true,"error-handler":new a,infoset:true,"validate-if-schema":false,namespaces:true,"namespace-declarations":true,"normalize-characters":false,"schema-location":"","schema-type":"","split-cdata-sections":true,validate:false,"well-formed":true};this.params=r=Object.create(this.defaultParams)}getParameter(r){if(this.params.hasOwnProperty(r)){return this.params[r]}else{return null}}canSetParameter(r,i){return true}setParameter(r,i){if(i!=null){return this.params[r]=i}else{return delete this.params[r]}}}Object.defineProperty(XMLDOMConfiguration.prototype,"parameterNames",{get:function(){return new l(Object.keys(this.defaultParams))}});return XMLDOMConfiguration}.call(this)}).call(this)},121:function(r){(function(){var i;r.exports=i=class XMLDOMErrorHandler{constructor(){}handleError(r){throw new Error(r)}}}).call(this)},2692:function(r){(function(){var i;r.exports=i=class XMLDOMImplementation{hasFeature(r,i){return true}createDocumentType(r,i,o){throw new Error("This DOM method is not implemented.")}createDocument(r,i,o){throw new Error("This DOM method is not implemented.")}createHTMLDocument(r){throw new Error("This DOM method is not implemented.")}getFeature(r,i){throw new Error("This DOM method is not implemented.")}}}).call(this)},8207:function(r){(function(){var i;r.exports=i=function(){class XMLDOMStringList{constructor(r){this.arr=r||[]}item(r){return this.arr[r]||null}contains(r){return this.arr.indexOf(r)!==-1}}Object.defineProperty(XMLDOMStringList.prototype,"length",{get:function(){return this.arr.length}});return XMLDOMStringList}.call(this)}).call(this)},2529:function(r,i,o){(function(){var i,a,l;l=o(5089);i=o(7762);r.exports=a=class XMLDTDAttList extends l{constructor(r,o,a,l,u,c){super(r);if(o==null){throw new Error("Missing DTD element name. "+this.debugInfo())}if(a==null){throw new Error("Missing DTD attribute name. "+this.debugInfo(o))}if(!l){throw new Error("Missing DTD attribute type. "+this.debugInfo(o))}if(!u){throw new Error("Missing DTD attribute default. "+this.debugInfo(o))}if(u.indexOf("#")!==0){u="#"+u}if(!u.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)){throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(o))}if(c&&!u.match(/^(#FIXED|#DEFAULT)$/)){throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(o))}this.elementName=this.stringify.name(o);this.type=i.AttributeDeclaration;this.attributeName=this.stringify.name(a);this.attributeType=this.stringify.dtdAttType(l);if(c){this.defaultValue=this.stringify.dtdAttDefault(c)}this.defaultValueType=u}toString(r){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(r))}}}).call(this)},7486:function(r,i,o){(function(){var i,a,l;l=o(5089);i=o(7762);r.exports=a=class XMLDTDElement extends l{constructor(r,o,a){super(r);if(o==null){throw new Error("Missing DTD element name. "+this.debugInfo())}if(!a){a="(#PCDATA)"}if(Array.isArray(a)){a="("+a.join(",")+")"}this.name=this.stringify.name(o);this.type=i.ElementDeclaration;this.value=this.stringify.dtdElementValue(a)}toString(r){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(r))}}}).call(this)},9252:function(r,i,o){(function(){var i,a,l,u;({isObject:u}=o(983));l=o(5089);i=o(7762);r.exports=a=function(){class XMLDTDEntity extends l{constructor(r,o,a,l){super(r);if(a==null){throw new Error("Missing DTD entity name. "+this.debugInfo(a))}if(l==null){throw new Error("Missing DTD entity value. "+this.debugInfo(a))}this.pe=!!o;this.name=this.stringify.name(a);this.type=i.EntityDeclaration;if(!u(l)){this.value=this.stringify.dtdEntityValue(l);this.internal=true}else{if(!l.pubID&&!l.sysID){throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(a))}if(l.pubID&&!l.sysID){throw new Error("System identifier is required for a public external entity. "+this.debugInfo(a))}this.internal=false;if(l.pubID!=null){this.pubID=this.stringify.dtdPubID(l.pubID)}if(l.sysID!=null){this.sysID=this.stringify.dtdSysID(l.sysID)}if(l.nData!=null){this.nData=this.stringify.dtdNData(l.nData)}if(this.pe&&this.nData){throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(a))}}}toString(r){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(r))}}Object.defineProperty(XMLDTDEntity.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDTDEntity.prototype,"systemId",{get:function(){return this.sysID}});Object.defineProperty(XMLDTDEntity.prototype,"notationName",{get:function(){return this.nData||null}});Object.defineProperty(XMLDTDEntity.prototype,"inputEncoding",{get:function(){return null}});Object.defineProperty(XMLDTDEntity.prototype,"xmlEncoding",{get:function(){return null}});Object.defineProperty(XMLDTDEntity.prototype,"xmlVersion",{get:function(){return null}});return XMLDTDEntity}.call(this)}).call(this)},3353:function(r,i,o){(function(){var i,a,l;l=o(5089);i=o(7762);r.exports=a=function(){class XMLDTDNotation extends l{constructor(r,o,a){super(r);if(o==null){throw new Error("Missing DTD notation name. "+this.debugInfo(o))}if(!a.pubID&&!a.sysID){throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(o))}this.name=this.stringify.name(o);this.type=i.NotationDeclaration;if(a.pubID!=null){this.pubID=this.stringify.dtdPubID(a.pubID)}if(a.sysID!=null){this.sysID=this.stringify.dtdSysID(a.sysID)}}toString(r){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(r))}}Object.defineProperty(XMLDTDNotation.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDTDNotation.prototype,"systemId",{get:function(){return this.sysID}});return XMLDTDNotation}.call(this)}).call(this)},6645:function(r,i,o){(function(){var i,a,l,u;({isObject:u}=o(983));l=o(5089);i=o(7762);r.exports=a=class XMLDeclaration extends l{constructor(r,o,a,l){super(r);if(u(o)){({version:o,encoding:a,standalone:l}=o)}if(!o){o="1.0"}this.type=i.Declaration;this.version=this.stringify.xmlVersion(o);if(a!=null){this.encoding=this.stringify.xmlEncoding(a)}if(l!=null){this.standalone=this.stringify.xmlStandalone(l)}}toString(r){return this.options.writer.declaration(this,this.options.writer.filterOptions(r))}}}).call(this)},8873:function(r,i,o){(function(){var i,a,l,u,c,h,p,d,m;({isObject:m}=o(983));d=o(5089);i=o(7762);a=o(2529);u=o(9252);l=o(7486);c=o(3353);p=o(2076);r.exports=h=function(){class XMLDocType extends d{constructor(r,o,a){var l,u,c,h;super(r);this.type=i.DocType;if(r.children){h=r.children;for(u=0,c=h.length;u<c;u++){l=h[u];if(l.type===i.Element){this.name=l.name;break}}}this.documentObject=r;if(m(o)){({pubID:o,sysID:a}=o)}if(a==null){[a,o]=[o,a]}if(o!=null){this.pubID=this.stringify.dtdPubID(o)}if(a!=null){this.sysID=this.stringify.dtdSysID(a)}}element(r,i){var o;o=new l(this,r,i);this.children.push(o);return this}attList(r,i,o,l,u){var c;c=new a(this,r,i,o,l,u);this.children.push(c);return this}entity(r,i){var o;o=new u(this,false,r,i);this.children.push(o);return this}pEntity(r,i){var o;o=new u(this,true,r,i);this.children.push(o);return this}notation(r,i){var o;o=new c(this,r,i);this.children.push(o);return this}toString(r){return this.options.writer.docType(this,this.options.writer.filterOptions(r))}ele(r,i){return this.element(r,i)}att(r,i,o,a,l){return this.attList(r,i,o,a,l)}ent(r,i){return this.entity(r,i)}pent(r,i){return this.pEntity(r,i)}not(r,i){return this.notation(r,i)}up(){return this.root()||this.documentObject}isEqualNode(r){if(!super.isEqualNode(r)){return false}if(r.name!==this.name){return false}if(r.publicId!==this.publicId){return false}if(r.systemId!==this.systemId){return false}return true}}Object.defineProperty(XMLDocType.prototype,"entities",{get:function(){var r,o,a,l,u;l={};u=this.children;for(o=0,a=u.length;o<a;o++){r=u[o];if(r.type===i.EntityDeclaration&&!r.pe){l[r.name]=r}}return new p(l)}});Object.defineProperty(XMLDocType.prototype,"notations",{get:function(){var r,o,a,l,u;l={};u=this.children;for(o=0,a=u.length;o<a;o++){r=u[o];if(r.type===i.NotationDeclaration){l[r.name]=r}}return new p(l)}});Object.defineProperty(XMLDocType.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDocType.prototype,"systemId",{get:function(){return this.sysID}});Object.defineProperty(XMLDocType.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});return XMLDocType}.call(this)}).call(this)},1582:function(r,i,o){(function(){var i,a,l,u,c,h,p,d;({isPlainObject:d}=o(983));l=o(2692);a=o(5675);c=o(5089);i=o(7762);p=o(645);h=o(7834);r.exports=u=function(){class XMLDocument extends c{constructor(r){super(null);this.name="#document";this.type=i.Document;this.documentURI=null;this.domConfig=new a;r||(r={});if(!r.writer){r.writer=new h}this.options=r;this.stringify=new p(r)}end(r){var i;i={};if(!r){r=this.options.writer}else if(d(r)){i=r;r=this.options.writer}return r.document(this,r.filterOptions(i))}toString(r){return this.options.writer.document(this,this.options.writer.filterOptions(r))}createElement(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}createDocumentFragment(){throw new Error("This DOM method is not implemented."+this.debugInfo())}createTextNode(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}createComment(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}createCDATASection(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}createProcessingInstruction(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}createAttribute(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}createEntityReference(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagName(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}importNode(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}createElementNS(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}createAttributeNS(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagNameNS(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementById(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}adoptNode(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}normalizeDocument(){throw new Error("This DOM method is not implemented."+this.debugInfo())}renameNode(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByClassName(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}createEvent(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}createRange(){throw new Error("This DOM method is not implemented."+this.debugInfo())}createNodeIterator(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())}createTreeWalker(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())}}Object.defineProperty(XMLDocument.prototype,"implementation",{value:new l});Object.defineProperty(XMLDocument.prototype,"doctype",{get:function(){var r,o,a,l;l=this.children;for(o=0,a=l.length;o<a;o++){r=l[o];if(r.type===i.DocType){return r}}return null}});Object.defineProperty(XMLDocument.prototype,"documentElement",{get:function(){return this.rootObject||null}});Object.defineProperty(XMLDocument.prototype,"inputEncoding",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"strictErrorChecking",{get:function(){return false}});Object.defineProperty(XMLDocument.prototype,"xmlEncoding",{get:function(){if(this.children.length!==0&&this.children[0].type===i.Declaration){return this.children[0].encoding}else{return null}}});Object.defineProperty(XMLDocument.prototype,"xmlStandalone",{get:function(){if(this.children.length!==0&&this.children[0].type===i.Declaration){return this.children[0].standalone==="yes"}else{return false}}});Object.defineProperty(XMLDocument.prototype,"xmlVersion",{get:function(){if(this.children.length!==0&&this.children[0].type===i.Declaration){return this.children[0].version}else{return"1.0"}}});Object.defineProperty(XMLDocument.prototype,"URL",{get:function(){return this.documentURI}});Object.defineProperty(XMLDocument.prototype,"origin",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"compatMode",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"characterSet",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"contentType",{get:function(){return null}});return XMLDocument}.call(this)}).call(this)},2871:function(r,i,o){(function(){var i,a,l,u,c,h,p,d,m,g,y,v,b,w,M,D,T,x,O,N,_,A,S,I={}.hasOwnProperty;({isObject:A,isFunction:_,isPlainObject:S,getValue:N}=o(983));i=o(7762);v=o(1582);w=o(6484);u=o(5261);c=o(360);D=o(8732);O=o(2275);M=o(8947);g=o(6645);y=o(8873);h=o(2529);d=o(9252);p=o(7486);m=o(3353);l=o(1395);x=o(645);T=o(7834);a=o(140);r.exports=b=class XMLDocumentCB{constructor(r,o,a){var l;this.name="?xml";this.type=i.Document;r||(r={});l={};if(!r.writer){r.writer=new T}else if(S(r.writer)){l=r.writer;r.writer=new T}this.options=r;this.writer=r.writer;this.writerOptions=this.writer.filterOptions(l);this.stringify=new x(r);this.onDataCallback=o||function(){};this.onEndCallback=a||function(){};this.currentNode=null;this.currentLevel=-1;this.openTags={};this.documentStarted=false;this.documentCompleted=false;this.root=null}createChildNode(r){var o,a,l,u,c,h,p,d;switch(r.type){case i.CData:this.cdata(r.value);break;case i.Comment:this.comment(r.value);break;case i.Element:l={};p=r.attribs;for(a in p){if(!I.call(p,a))continue;o=p[a];l[a]=o.value}this.node(r.name,l);break;case i.Dummy:this.dummy();break;case i.Raw:this.raw(r.value);break;case i.Text:this.text(r.value);break;case i.ProcessingInstruction:this.instruction(r.target,r.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+r.constructor.name)}d=r.children;for(c=0,h=d.length;c<h;c++){u=d[c];this.createChildNode(u);if(u.type===i.Element){this.up()}}return this}dummy(){return this}node(r,i,o){if(r==null){throw new Error("Missing node name.")}if(this.root&&this.currentLevel===-1){throw new Error("Document can only have one root node. "+this.debugInfo(r))}this.openCurrent();r=N(r);if(i==null){i={}}i=N(i);if(!A(i)){[o,i]=[i,o]}this.currentNode=new w(this,r,i);this.currentNode.children=false;this.currentLevel++;this.openTags[this.currentLevel]=this.currentNode;if(o!=null){this.text(o)}return this}element(r,o,a){var l,u,c,h,p,d;if(this.currentNode&&this.currentNode.type===i.DocType){this.dtdElement(...arguments)}else{if(Array.isArray(r)||A(r)||_(r)){h=this.options.noValidation;this.options.noValidation=true;d=new v(this.options).element("TEMP_ROOT");d.element(r);this.options.noValidation=h;p=d.children;for(u=0,c=p.length;u<c;u++){l=p[u];this.createChildNode(l);if(l.type===i.Element){this.up()}}}else{this.node(r,o,a)}}return this}attribute(r,i){var o,a;if(!this.currentNode||this.currentNode.children){throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(r))}if(r!=null){r=N(r)}if(A(r)){for(o in r){if(!I.call(r,o))continue;a=r[o];this.attribute(o,a)}}else{if(_(i)){i=i.apply()}if(this.options.keepNullAttributes&&i==null){this.currentNode.attribs[r]=new l(this,r,"")}else if(i!=null){this.currentNode.attribs[r]=new l(this,r,i)}}return this}text(r){var i;this.openCurrent();i=new O(this,r);this.onData(this.writer.text(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}cdata(r){var i;this.openCurrent();i=new u(this,r);this.onData(this.writer.cdata(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}comment(r){var i;this.openCurrent();i=new c(this,r);this.onData(this.writer.comment(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}raw(r){var i;this.openCurrent();i=new D(this,r);this.onData(this.writer.raw(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}instruction(r,i){var o,a,l,u,c;this.openCurrent();if(r!=null){r=N(r)}if(i!=null){i=N(i)}if(Array.isArray(r)){for(o=0,u=r.length;o<u;o++){a=r[o];this.instruction(a)}}else if(A(r)){for(a in r){if(!I.call(r,a))continue;l=r[a];this.instruction(a,l)}}else{if(_(i)){i=i.apply()}c=new M(this,r,i);this.onData(this.writer.processingInstruction(c,this.writerOptions,this.currentLevel+1),this.currentLevel+1)}return this}declaration(r,i,o){var a;this.openCurrent();if(this.documentStarted){throw new Error("declaration() must be the first node.")}a=new g(this,r,i,o);this.onData(this.writer.declaration(a,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}doctype(r,i,o){this.openCurrent();if(r==null){throw new Error("Missing root node name.")}if(this.root){throw new Error("dtd() must come before the root node.")}this.currentNode=new y(this,i,o);this.currentNode.rootNodeName=r;this.currentNode.children=false;this.currentLevel++;this.openTags[this.currentLevel]=this.currentNode;return this}dtdElement(r,i){var o;this.openCurrent();o=new p(this,r,i);this.onData(this.writer.dtdElement(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}attList(r,i,o,a,l){var u;this.openCurrent();u=new h(this,r,i,o,a,l);this.onData(this.writer.dtdAttList(u,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}entity(r,i){var o;this.openCurrent();o=new d(this,false,r,i);this.onData(this.writer.dtdEntity(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}pEntity(r,i){var o;this.openCurrent();o=new d(this,true,r,i);this.onData(this.writer.dtdEntity(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}notation(r,i){var o;this.openCurrent();o=new m(this,r,i);this.onData(this.writer.dtdNotation(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}up(){if(this.currentLevel<0){throw new Error("The document node has no parent.")}if(this.currentNode){if(this.currentNode.children){this.closeNode(this.currentNode)}else{this.openNode(this.currentNode)}this.currentNode=null}else{this.closeNode(this.openTags[this.currentLevel])}delete this.openTags[this.currentLevel];this.currentLevel--;return this}end(){while(this.currentLevel>=0){this.up()}return this.onEnd()}openCurrent(){if(this.currentNode){this.currentNode.children=true;return this.openNode(this.currentNode)}}openNode(r){var o,l,u,c;if(!r.isOpen){if(!this.root&&this.currentLevel===0&&r.type===i.Element){this.root=r}l="";if(r.type===i.Element){this.writerOptions.state=a.OpenTag;l=this.writer.indent(r,this.writerOptions,this.currentLevel)+"<"+r.name;c=r.attribs;for(u in c){if(!I.call(c,u))continue;o=c[u];l+=this.writer.attribute(o,this.writerOptions,this.currentLevel)}l+=(r.children?">":"/>")+this.writer.endline(r,this.writerOptions,this.currentLevel);this.writerOptions.state=a.InsideTag}else{this.writerOptions.state=a.OpenTag;l=this.writer.indent(r,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+r.rootNodeName;if(r.pubID&&r.sysID){l+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"'}else if(r.sysID){l+=' SYSTEM "'+r.sysID+'"'}if(r.children){l+=" [";this.writerOptions.state=a.InsideTag}else{this.writerOptions.state=a.CloseTag;l+=">"}l+=this.writer.endline(r,this.writerOptions,this.currentLevel)}this.onData(l,this.currentLevel);return r.isOpen=true}}closeNode(r){var o;if(!r.isClosed){o="";this.writerOptions.state=a.CloseTag;if(r.type===i.Element){o=this.writer.indent(r,this.writerOptions,this.currentLevel)+"</"+r.name+">"+this.writer.endline(r,this.writerOptions,this.currentLevel)}else{o=this.writer.indent(r,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(r,this.writerOptions,this.currentLevel)}this.writerOptions.state=a.None;this.onData(o,this.currentLevel);return r.isClosed=true}}onData(r,i){this.documentStarted=true;return this.onDataCallback(r,i+1)}onEnd(){this.documentCompleted=true;return this.onEndCallback()}debugInfo(r){if(r==null){return""}else{return"node: <"+r+">"}}ele(){return this.element(...arguments)}nod(r,i,o){return this.node(r,i,o)}txt(r){return this.text(r)}dat(r){return this.cdata(r)}com(r){return this.comment(r)}ins(r,i){return this.instruction(r,i)}dec(r,i,o){return this.declaration(r,i,o)}dtd(r,i,o){return this.doctype(r,i,o)}e(r,i,o){return this.element(r,i,o)}n(r,i,o){return this.node(r,i,o)}t(r){return this.text(r)}d(r){return this.cdata(r)}c(r){return this.comment(r)}r(r){return this.raw(r)}i(r,i){return this.instruction(r,i)}att(){if(this.currentNode&&this.currentNode.type===i.DocType){return this.attList(...arguments)}else{return this.attribute(...arguments)}}a(){if(this.currentNode&&this.currentNode.type===i.DocType){return this.attList(...arguments)}else{return this.attribute(...arguments)}}ent(r,i){return this.entity(r,i)}pent(r,i){return this.pEntity(r,i)}not(r,i){return this.notation(r,i)}}}).call(this)},706:function(r,i,o){(function(){var i,a,l;l=o(5089);i=o(7762);r.exports=a=class XMLDummy extends l{constructor(r){super(r);this.type=i.Dummy}clone(){return Object.create(this)}toString(r){return""}}}).call(this)},6484:function(r,i,o){(function(){var i,a,l,u,c,h,p,d,m={}.hasOwnProperty;({isObject:d,isFunction:p,getValue:h}=o(983));c=o(5089);i=o(7762);a=o(1395);u=o(2076);r.exports=l=function(){class XMLElement extends c{constructor(r,o,a){var l,u,c,h;super(r);if(o==null){throw new Error("Missing element name. "+this.debugInfo())}this.name=this.stringify.name(o);this.type=i.Element;this.attribs={};this.schemaTypeInfo=null;if(a!=null){this.attribute(a)}if(r.type===i.Document){this.isRoot=true;this.documentObject=r;r.rootObject=this;if(r.children){h=r.children;for(u=0,c=h.length;u<c;u++){l=h[u];if(l.type===i.DocType){l.name=this.name;break}}}}}clone(){var r,i,o,a;o=Object.create(this);if(o.isRoot){o.documentObject=null}o.attribs={};a=this.attribs;for(i in a){if(!m.call(a,i))continue;r=a[i];o.attribs[i]=r.clone()}o.children=[];this.children.forEach((function(r){var i;i=r.clone();i.parent=o;return o.children.push(i)}));return o}attribute(r,i){var o,l;if(r!=null){r=h(r)}if(d(r)){for(o in r){if(!m.call(r,o))continue;l=r[o];this.attribute(o,l)}}else{if(p(i)){i=i.apply()}if(this.options.keepNullAttributes&&i==null){this.attribs[r]=new a(this,r,"")}else if(i!=null){this.attribs[r]=new a(this,r,i)}}return this}removeAttribute(r){var i,o,a;if(r==null){throw new Error("Missing attribute name. "+this.debugInfo())}r=h(r);if(Array.isArray(r)){for(o=0,a=r.length;o<a;o++){i=r[o];delete this.attribs[i]}}else{delete this.attribs[r]}return this}toString(r){return this.options.writer.element(this,this.options.writer.filterOptions(r))}att(r,i){return this.attribute(r,i)}a(r,i){return this.attribute(r,i)}getAttribute(r){if(this.attribs.hasOwnProperty(r)){return this.attribs[r].value}else{return null}}setAttribute(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}getAttributeNode(r){if(this.attribs.hasOwnProperty(r)){return this.attribs[r]}else{return null}}setAttributeNode(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}removeAttributeNode(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagName(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}getAttributeNS(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}setAttributeNS(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())}removeAttributeNS(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}getAttributeNodeNS(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}setAttributeNodeNS(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagNameNS(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}hasAttribute(r){return this.attribs.hasOwnProperty(r)}hasAttributeNS(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}setIdAttribute(r,i){if(this.attribs.hasOwnProperty(r)){return this.attribs[r].isId}else{return i}}setIdAttributeNS(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())}setIdAttributeNode(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagName(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagNameNS(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByClassName(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(r){var i,o,a;if(!super.isEqualNode(r)){return false}if(r.namespaceURI!==this.namespaceURI){return false}if(r.prefix!==this.prefix){return false}if(r.localName!==this.localName){return false}if(r.attribs.length!==this.attribs.length){return false}for(i=o=0,a=this.attribs.length-1;0<=a?o<=a:o>=a;i=0<=a?++o:--o){if(!this.attribs[i].isEqualNode(r.attribs[i])){return false}}return true}}Object.defineProperty(XMLElement.prototype,"tagName",{get:function(){return this.name}});Object.defineProperty(XMLElement.prototype,"namespaceURI",{get:function(){return""}});Object.defineProperty(XMLElement.prototype,"prefix",{get:function(){return""}});Object.defineProperty(XMLElement.prototype,"localName",{get:function(){return this.name}});Object.defineProperty(XMLElement.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"attributes",{get:function(){if(!this.attributeMap||!this.attributeMap.nodes){this.attributeMap=new u(this.attribs)}return this.attributeMap}});return XMLElement}.call(this)}).call(this)},2076:function(r){(function(){var i;r.exports=i=function(){class XMLNamedNodeMap{constructor(r){this.nodes=r}clone(){return this.nodes=null}getNamedItem(r){return this.nodes[r]}setNamedItem(r){var i;i=this.nodes[r.nodeName];this.nodes[r.nodeName]=r;return i||null}removeNamedItem(r){var i;i=this.nodes[r];delete this.nodes[r];return i||null}item(r){return this.nodes[Object.keys(this.nodes)[r]]||null}getNamedItemNS(r,i){throw new Error("This DOM method is not implemented.")}setNamedItemNS(r){throw new Error("This DOM method is not implemented.")}removeNamedItemNS(r,i){throw new Error("This DOM method is not implemented.")}}Object.defineProperty(XMLNamedNodeMap.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}});return XMLNamedNodeMap}.call(this)}).call(this)},5089:function(r,i,o){(function(){var i,a,l,u,c,h,p,d,m,g,y,v,b,w,M,D,T,x,O={}.hasOwnProperty,N=[].splice;({isObject:x,isFunction:T,isEmpty:D,getValue:M}=o(983));d=null;l=null;u=null;c=null;h=null;b=null;w=null;v=null;p=null;a=null;y=null;m=null;i=null;r.exports=g=function(){class XMLNode{constructor(r){this.parent=r;if(this.parent){this.options=this.parent.options;this.stringify=this.parent.stringify}this.value=null;this.children=[];this.baseURI=null;if(!d){d=o(6484);l=o(5261);u=o(360);c=o(6645);h=o(8873);b=o(8732);w=o(2275);v=o(8947);p=o(706);a=o(7762);y=o(9908);m=o(2076);i=o(144)}}setParent(r){var i,o,a,l,u;this.parent=r;if(r){this.options=r.options;this.stringify=r.stringify}l=this.children;u=[];for(o=0,a=l.length;o<a;o++){i=l[o];u.push(i.setParent(this))}return u}element(r,i,o){var a,l,u,c,h,p,d,m,g;p=null;if(i===null&&o==null){[i,o]=[{},null]}if(i==null){i={}}i=M(i);if(!x(i)){[o,i]=[i,o]}if(r!=null){r=M(r)}if(Array.isArray(r)){for(u=0,d=r.length;u<d;u++){l=r[u];p=this.element(l)}}else if(T(r)){p=this.element(r.apply())}else if(x(r)){for(h in r){if(!O.call(r,h))continue;g=r[h];if(T(g)){g=g.apply()}if(!this.options.ignoreDecorators&&this.stringify.convertAttKey&&h.indexOf(this.stringify.convertAttKey)===0){p=this.attribute(h.substr(this.stringify.convertAttKey.length),g)}else if(!this.options.separateArrayItems&&Array.isArray(g)&&D(g)){p=this.dummy()}else if(x(g)&&D(g)){p=this.element(h)}else if(!this.options.keepNullNodes&&g==null){p=this.dummy()}else if(!this.options.separateArrayItems&&Array.isArray(g)){for(c=0,m=g.length;c<m;c++){l=g[c];a={};a[h]=l;p=this.element(a)}}else if(x(g)){if(!this.options.ignoreDecorators&&this.stringify.convertTextKey&&h.indexOf(this.stringify.convertTextKey)===0){p=this.element(g)}else{p=this.element(h);p.element(g)}}else{p=this.element(h,g)}}}else if(!this.options.keepNullNodes&&o===null){p=this.dummy()}else{if(!this.options.ignoreDecorators&&this.stringify.convertTextKey&&r.indexOf(this.stringify.convertTextKey)===0){p=this.text(o)}else if(!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&r.indexOf(this.stringify.convertCDataKey)===0){p=this.cdata(o)}else if(!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&r.indexOf(this.stringify.convertCommentKey)===0){p=this.comment(o)}else if(!this.options.ignoreDecorators&&this.stringify.convertRawKey&&r.indexOf(this.stringify.convertRawKey)===0){p=this.raw(o)}else if(!this.options.ignoreDecorators&&this.stringify.convertPIKey&&r.indexOf(this.stringify.convertPIKey)===0){p=this.instruction(r.substr(this.stringify.convertPIKey.length),o)}else{p=this.node(r,i,o)}}if(p==null){throw new Error("Could not create any elements with: "+r+". "+this.debugInfo())}return p}insertBefore(r,i,o){var a,l,u,c,h;if(r!=null?r.type:void 0){u=r;c=i;u.setParent(this);if(c){l=children.indexOf(c);h=children.splice(l);children.push(u);Array.prototype.push.apply(children,h)}else{children.push(u)}return u}else{if(this.isRoot){throw new Error("Cannot insert elements at root level. "+this.debugInfo(r))}l=this.parent.children.indexOf(this);h=this.parent.children.splice(l);a=this.parent.element(r,i,o);Array.prototype.push.apply(this.parent.children,h);return a}}insertAfter(r,i,o){var a,l,u;if(this.isRoot){throw new Error("Cannot insert elements at root level. "+this.debugInfo(r))}l=this.parent.children.indexOf(this);u=this.parent.children.splice(l+1);a=this.parent.element(r,i,o);Array.prototype.push.apply(this.parent.children,u);return a}remove(){var r,i;if(this.isRoot){throw new Error("Cannot remove the root element. "+this.debugInfo())}r=this.parent.children.indexOf(this);N.apply(this.parent.children,[r,r-r+1].concat(i=[])),i;return this.parent}node(r,i,o){var a;if(r!=null){r=M(r)}i||(i={});i=M(i);if(!x(i)){[o,i]=[i,o]}a=new d(this,r,i);if(o!=null){a.text(o)}this.children.push(a);return a}text(r){var i;if(x(r)){this.element(r)}i=new w(this,r);this.children.push(i);return this}cdata(r){var i;i=new l(this,r);this.children.push(i);return this}comment(r){var i;i=new u(this,r);this.children.push(i);return this}commentBefore(r){var i,o,a;o=this.parent.children.indexOf(this);a=this.parent.children.splice(o);i=this.parent.comment(r);Array.prototype.push.apply(this.parent.children,a);return this}commentAfter(r){var i,o,a;o=this.parent.children.indexOf(this);a=this.parent.children.splice(o+1);i=this.parent.comment(r);Array.prototype.push.apply(this.parent.children,a);return this}raw(r){var i;i=new b(this,r);this.children.push(i);return this}dummy(){var r;r=new p(this);return r}instruction(r,i){var o,a,l,u,c;if(r!=null){r=M(r)}if(i!=null){i=M(i)}if(Array.isArray(r)){for(u=0,c=r.length;u<c;u++){o=r[u];this.instruction(o)}}else if(x(r)){for(o in r){if(!O.call(r,o))continue;a=r[o];this.instruction(o,a)}}else{if(T(i)){i=i.apply()}l=new v(this,r,i);this.children.push(l)}return this}instructionBefore(r,i){var o,a,l;a=this.parent.children.indexOf(this);l=this.parent.children.splice(a);o=this.parent.instruction(r,i);Array.prototype.push.apply(this.parent.children,l);return this}instructionAfter(r,i){var o,a,l;a=this.parent.children.indexOf(this);l=this.parent.children.splice(a+1);o=this.parent.instruction(r,i);Array.prototype.push.apply(this.parent.children,l);return this}declaration(r,i,o){var l,u;l=this.document();u=new c(l,r,i,o);if(l.children.length===0){l.children.unshift(u)}else if(l.children[0].type===a.Declaration){l.children[0]=u}else{l.children.unshift(u)}return l.root()||l}dtd(r,i){var o,l,u,c,p,d,m,g,y,v;l=this.document();u=new h(l,r,i);y=l.children;for(c=p=0,m=y.length;p<m;c=++p){o=y[c];if(o.type===a.DocType){l.children[c]=u;return u}}v=l.children;for(c=d=0,g=v.length;d<g;c=++d){o=v[c];if(o.isRoot){l.children.splice(c,0,u);return u}}l.children.push(u);return u}up(){if(this.isRoot){throw new Error("The root node has no parent. Use doc() if you need to get the document object.")}return this.parent}root(){var r;r=this;while(r){if(r.type===a.Document){return r.rootObject}else if(r.isRoot){return r}else{r=r.parent}}}document(){var r;r=this;while(r){if(r.type===a.Document){return r}else{r=r.parent}}}end(r){return this.document().end(r)}prev(){var r;r=this.parent.children.indexOf(this);if(r<1){throw new Error("Already at the first node. "+this.debugInfo())}return this.parent.children[r-1]}next(){var r;r=this.parent.children.indexOf(this);if(r===-1||r===this.parent.children.length-1){throw new Error("Already at the last node. "+this.debugInfo())}return this.parent.children[r+1]}importDocument(r){var i,o,l,u,c;o=r.root().clone();o.parent=this;o.isRoot=false;this.children.push(o);if(this.type===a.Document){o.isRoot=true;o.documentObject=this;this.rootObject=o;if(this.children){c=this.children;for(l=0,u=c.length;l<u;l++){i=c[l];if(i.type===a.DocType){i.name=o.name;break}}}}return this}debugInfo(r){var i,o;r=r||this.name;if(r==null&&!((i=this.parent)!=null?i.name:void 0)){return""}else if(r==null){return"parent: <"+this.parent.name+">"}else if(!((o=this.parent)!=null?o.name:void 0)){return"node: <"+r+">"}else{return"node: <"+r+">, parent: <"+this.parent.name+">"}}ele(r,i,o){return this.element(r,i,o)}nod(r,i,o){return this.node(r,i,o)}txt(r){return this.text(r)}dat(r){return this.cdata(r)}com(r){return this.comment(r)}ins(r,i){return this.instruction(r,i)}doc(){return this.document()}dec(r,i,o){return this.declaration(r,i,o)}e(r,i,o){return this.element(r,i,o)}n(r,i,o){return this.node(r,i,o)}t(r){return this.text(r)}d(r){return this.cdata(r)}c(r){return this.comment(r)}r(r){return this.raw(r)}i(r,i){return this.instruction(r,i)}u(){return this.up()}importXMLBuilder(r){return this.importDocument(r)}attribute(r,i){throw new Error("attribute() applies to element nodes only.")}att(r,i){return this.attribute(r,i)}a(r,i){return this.attribute(r,i)}removeAttribute(r){throw new Error("attribute() applies to element nodes only.")}replaceChild(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}removeChild(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}appendChild(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}hasChildNodes(){return this.children.length!==0}cloneNode(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}normalize(){throw new Error("This DOM method is not implemented."+this.debugInfo())}isSupported(r,i){return true}hasAttributes(){return this.attribs.length!==0}compareDocumentPosition(r){var o,a;o=this;if(o===r){return 0}else if(this.document()!==r.document()){a=i.Disconnected|i.ImplementationSpecific;if(Math.random()<.5){a|=i.Preceding}else{a|=i.Following}return a}else if(o.isAncestor(r)){return i.Contains|i.Preceding}else if(o.isDescendant(r)){return i.Contains|i.Following}else if(o.isPreceding(r)){return i.Preceding}else{return i.Following}}isSameNode(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}lookupPrefix(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}isDefaultNamespace(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}lookupNamespaceURI(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(r){var i,o,a;if(r.nodeType!==this.nodeType){return false}if(r.children.length!==this.children.length){return false}for(i=o=0,a=this.children.length-1;0<=a?o<=a:o>=a;i=0<=a?++o:--o){if(!this.children[i].isEqualNode(r.children[i])){return false}}return true}getFeature(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}setUserData(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())}getUserData(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}contains(r){if(!r){return false}return r===this||this.isDescendant(r)}isDescendant(r){var i,o,a,l,u;u=this.children;for(a=0,l=u.length;a<l;a++){i=u[a];if(r===i){return true}o=i.isDescendant(r);if(o){return true}}return false}isAncestor(r){return r.isDescendant(this)}isPreceding(r){var i,o;i=this.treePosition(r);o=this.treePosition(this);if(i===-1||o===-1){return false}else{return i<o}}isFollowing(r){var i,o;i=this.treePosition(r);o=this.treePosition(this);if(i===-1||o===-1){return false}else{return i>o}}treePosition(r){var i,o;o=0;i=false;this.foreachTreeNode(this.document(),(function(a){o++;if(!i&&a===r){return i=true}}));if(i){return o}else{return-1}}foreachTreeNode(r,i){var o,a,l,u,c;r||(r=this.document());u=r.children;for(a=0,l=u.length;a<l;a++){o=u[a];if(c=i(o)){return c}else{c=this.foreachTreeNode(o,i);if(c){return c}}}}}Object.defineProperty(XMLNode.prototype,"nodeName",{get:function(){return this.name}});Object.defineProperty(XMLNode.prototype,"nodeType",{get:function(){return this.type}});Object.defineProperty(XMLNode.prototype,"nodeValue",{get:function(){return this.value}});Object.defineProperty(XMLNode.prototype,"parentNode",{get:function(){return this.parent}});Object.defineProperty(XMLNode.prototype,"childNodes",{get:function(){if(!this.childNodeList||!this.childNodeList.nodes){this.childNodeList=new y(this.children)}return this.childNodeList}});Object.defineProperty(XMLNode.prototype,"firstChild",{get:function(){return this.children[0]||null}});Object.defineProperty(XMLNode.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}});Object.defineProperty(XMLNode.prototype,"previousSibling",{get:function(){var r;r=this.parent.children.indexOf(this);return this.parent.children[r-1]||null}});Object.defineProperty(XMLNode.prototype,"nextSibling",{get:function(){var r;r=this.parent.children.indexOf(this);return this.parent.children[r+1]||null}});Object.defineProperty(XMLNode.prototype,"ownerDocument",{get:function(){return this.document()||null}});Object.defineProperty(XMLNode.prototype,"textContent",{get:function(){var r,i,o,l,u;if(this.nodeType===a.Element||this.nodeType===a.DocumentFragment){u="";l=this.children;for(i=0,o=l.length;i<o;i++){r=l[i];if(r.textContent){u+=r.textContent}}return u}else{return null}},set:function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}});return XMLNode}.call(this)}).call(this)},9908:function(r){(function(){var i;r.exports=i=function(){class XMLNodeList{constructor(r){this.nodes=r}clone(){return this.nodes=null}item(r){return this.nodes[r]||null}}Object.defineProperty(XMLNodeList.prototype,"length",{get:function(){return this.nodes.length||0}});return XMLNodeList}.call(this)}).call(this)},8947:function(r,i,o){(function(){var i,a,l;i=o(7762);a=o(4765);r.exports=l=class XMLProcessingInstruction extends a{constructor(r,o,a){super(r);if(o==null){throw new Error("Missing instruction target. "+this.debugInfo())}this.type=i.ProcessingInstruction;this.target=this.stringify.insTarget(o);this.name=this.target;if(a){this.value=this.stringify.insValue(a)}}clone(){return Object.create(this)}toString(r){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(r))}isEqualNode(r){if(!super.isEqualNode(r)){return false}if(r.target!==this.target){return false}return true}}}).call(this)},8732:function(r,i,o){(function(){var i,a,l;i=o(7762);a=o(5089);r.exports=l=class XMLRaw extends a{constructor(r,o){super(r);if(o==null){throw new Error("Missing raw text. "+this.debugInfo())}this.type=i.Raw;this.value=this.stringify.raw(o)}clone(){return Object.create(this)}toString(r){return this.options.writer.raw(this,this.options.writer.filterOptions(r))}}}).call(this)},5922:function(r,i,o){(function(){var i,a,l,u,c={}.hasOwnProperty;i=o(7762);u=o(6670);a=o(140);r.exports=l=class XMLStreamWriter extends u{constructor(r,i){super(i);this.stream=r}endline(r,i,o){if(r.isLastRootNode&&i.state===a.CloseTag){return""}else{return super.endline(r,i,o)}}document(r,i){var o,a,l,u,c,h,p,d,m;p=r.children;for(a=l=0,c=p.length;l<c;a=++l){o=p[a];o.isLastRootNode=a===r.children.length-1}i=this.filterOptions(i);d=r.children;m=[];for(u=0,h=d.length;u<h;u++){o=d[u];m.push(this.writeChildNode(o,i,0))}return m}cdata(r,i,o){return this.stream.write(super.cdata(r,i,o))}comment(r,i,o){return this.stream.write(super.comment(r,i,o))}declaration(r,i,o){return this.stream.write(super.declaration(r,i,o))}docType(r,i,o){var l,u,c,h;o||(o=0);this.openNode(r,i,o);i.state=a.OpenTag;this.stream.write(this.indent(r,i,o));this.stream.write("<!DOCTYPE "+r.root().name);if(r.pubID&&r.sysID){this.stream.write(' PUBLIC "'+r.pubID+'" "'+r.sysID+'"')}else if(r.sysID){this.stream.write(' SYSTEM "'+r.sysID+'"')}if(r.children.length>0){this.stream.write(" [");this.stream.write(this.endline(r,i,o));i.state=a.InsideTag;h=r.children;for(u=0,c=h.length;u<c;u++){l=h[u];this.writeChildNode(l,i,o+1)}i.state=a.CloseTag;this.stream.write("]")}i.state=a.CloseTag;this.stream.write(i.spaceBeforeSlash+">");this.stream.write(this.endline(r,i,o));i.state=a.None;return this.closeNode(r,i,o)}element(r,o,l){var u,h,p,d,m,g,y,v,b,w,M,D,T,x,O,N;l||(l=0);this.openNode(r,o,l);o.state=a.OpenTag;M=this.indent(r,o,l)+"<"+r.name;if(o.pretty&&o.width>0){y=M.length;T=r.attribs;for(b in T){if(!c.call(T,b))continue;u=T[b];D=this.attribute(u,o,l);h=D.length;if(y+h>o.width){N=this.indent(r,o,l+1)+D;M+=this.endline(r,o,l)+N;y=N.length}else{N=" "+D;M+=N;y+=N.length}}}else{x=r.attribs;for(b in x){if(!c.call(x,b))continue;u=x[b];M+=this.attribute(u,o,l)}}this.stream.write(M);d=r.children.length;m=d===0?null:r.children[0];if(d===0||r.children.every((function(r){return(r.type===i.Text||r.type===i.Raw)&&r.value===""}))){if(o.allowEmpty){this.stream.write(">");o.state=a.CloseTag;this.stream.write("</"+r.name+">")}else{o.state=a.CloseTag;this.stream.write(o.spaceBeforeSlash+"/>")}}else if(o.pretty&&d===1&&(m.type===i.Text||m.type===i.Raw)&&m.value!=null){this.stream.write(">");o.state=a.InsideTag;o.suppressPrettyCount++;w=true;this.writeChildNode(m,o,l+1);o.suppressPrettyCount--;w=false;o.state=a.CloseTag;this.stream.write("</"+r.name+">")}else{this.stream.write(">"+this.endline(r,o,l));o.state=a.InsideTag;O=r.children;for(g=0,v=O.length;g<v;g++){p=O[g];this.writeChildNode(p,o,l+1)}o.state=a.CloseTag;this.stream.write(this.indent(r,o,l)+"</"+r.name+">")}this.stream.write(this.endline(r,o,l));o.state=a.None;return this.closeNode(r,o,l)}processingInstruction(r,i,o){return this.stream.write(super.processingInstruction(r,i,o))}raw(r,i,o){return this.stream.write(super.raw(r,i,o))}text(r,i,o){return this.stream.write(super.text(r,i,o))}dtdAttList(r,i,o){return this.stream.write(super.dtdAttList(r,i,o))}dtdElement(r,i,o){return this.stream.write(super.dtdElement(r,i,o))}dtdEntity(r,i,o){return this.stream.write(super.dtdEntity(r,i,o))}dtdNotation(r,i,o){return this.stream.write(super.dtdNotation(r,i,o))}}}).call(this)},7834:function(r,i,o){(function(){var i,a;a=o(6670);r.exports=i=class XMLStringWriter extends a{constructor(r){super(r)}document(r,i){var o,a,l,u,c;i=this.filterOptions(i);u="";c=r.children;for(a=0,l=c.length;a<l;a++){o=c[a];u+=this.writeChildNode(o,i,0)}if(i.pretty&&u.slice(-i.newline.length)===i.newline){u=u.slice(0,-i.newline.length)}return u}}}).call(this)},645:function(r){(function(){var i,o={}.hasOwnProperty;r.exports=i=function(){class XMLStringifier{constructor(r){var i,a,l;this.assertLegalChar=this.assertLegalChar.bind(this);this.assertLegalName=this.assertLegalName.bind(this);r||(r={});this.options=r;if(!this.options.version){this.options.version="1.0"}a=r.stringify||{};for(i in a){if(!o.call(a,i))continue;l=a[i];this[i]=l}}name(r){if(this.options.noValidation){return r}return this.assertLegalName(""+r||"")}text(r){if(this.options.noValidation){return r}return this.assertLegalChar(this.textEscape(""+r||""))}cdata(r){if(this.options.noValidation){return r}r=""+r||"";r=r.replace("]]>","]]]]><![CDATA[>");return this.assertLegalChar(r)}comment(r){if(this.options.noValidation){return r}r=""+r||"";if(r.match(/--/)){throw new Error("Comment text cannot contain double-hypen: "+r)}return this.assertLegalChar(r)}raw(r){if(this.options.noValidation){return r}return""+r||""}attValue(r){if(this.options.noValidation){return r}return this.assertLegalChar(this.attEscape(r=""+r||""))}insTarget(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")}insValue(r){if(this.options.noValidation){return r}r=""+r||"";if(r.match(/\?>/)){throw new Error("Invalid processing instruction value: "+r)}return this.assertLegalChar(r)}xmlVersion(r){if(this.options.noValidation){return r}r=""+r||"";if(!r.match(/1\.[0-9]+/)){throw new Error("Invalid version number: "+r)}return r}xmlEncoding(r){if(this.options.noValidation){return r}r=""+r||"";if(!r.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)){throw new Error("Invalid encoding: "+r)}return this.assertLegalChar(r)}xmlStandalone(r){if(this.options.noValidation){return r}if(r){return"yes"}else{return"no"}}dtdPubID(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")}dtdSysID(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")}dtdElementValue(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")}dtdAttType(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")}dtdAttDefault(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")}dtdEntityValue(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")}dtdNData(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")}assertLegalChar(r){var i,o;if(this.options.noValidation){return r}i="";if(this.options.version==="1.0"){i=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;if(o=r.match(i)){throw new Error(`Invalid character in string: ${r} at index ${o.index}`)}}else if(this.options.version==="1.1"){i=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;if(o=r.match(i)){throw new Error(`Invalid character in string: ${r} at index ${o.index}`)}}return r}assertLegalName(r){var i;if(this.options.noValidation){return r}this.assertLegalChar(r);i=/^([: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])*$/;if(!r.match(i)){throw new Error("Invalid character in name")}return r}textEscape(r){var i;if(this.options.noValidation){return r}i=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g;return r.replace(i,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;")}attEscape(r){var i;if(this.options.noValidation){return r}i=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g;return r.replace(i,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;")}}XMLStringifier.prototype.convertAttKey="@";XMLStringifier.prototype.convertPIKey="?";XMLStringifier.prototype.convertTextKey="#text";XMLStringifier.prototype.convertCDataKey="#cdata";XMLStringifier.prototype.convertCommentKey="#comment";XMLStringifier.prototype.convertRawKey="#raw";return XMLStringifier}.call(this)}).call(this)},2275:function(r,i,o){(function(){var i,a,l;i=o(7762);a=o(4765);r.exports=l=function(){class XMLText extends a{constructor(r,o){super(r);if(o==null){throw new Error("Missing element text. "+this.debugInfo())}this.name="#text";this.type=i.Text;this.value=this.stringify.text(o)}clone(){return Object.create(this)}toString(r){return this.options.writer.text(this,this.options.writer.filterOptions(r))}splitText(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}replaceWholeText(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}}Object.defineProperty(XMLText.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLText.prototype,"wholeText",{get:function(){var r,i,o;o="";i=this.previousSibling;while(i){o=i.data+o;i=i.previousSibling}o+=this.data;r=this.nextSibling;while(r){o=o+r.data;r=r.nextSibling}return o}});return XMLText}.call(this)}).call(this)},6670:function(r,i,o){(function(){var i,a,l,u,c,h,p,d,m,g,y,v,b,w,M,D,T,x={}.hasOwnProperty;({assign:T}=o(983));i=o(7762);m=o(6645);g=o(8873);l=o(5261);u=o(360);v=o(6484);w=o(8732);M=o(2275);b=o(8947);y=o(706);c=o(2529);h=o(7486);p=o(9252);d=o(3353);a=o(140);r.exports=D=class XMLWriterBase{constructor(r){var i,o,a;r||(r={});this.options=r;o=r.writer||{};for(i in o){if(!x.call(o,i))continue;a=o[i];this["_"+i]=this[i];this[i]=a}}filterOptions(r){var i,o,l,u,c,h,p,d,m;r||(r={});r=T({},this.options,r);i={writer:this};i.pretty=r.pretty||false;i.allowEmpty=r.allowEmpty||false;i.indent=(o=r.indent)!=null?o:" ";i.newline=(l=r.newline)!=null?l:"\n";i.offset=(u=r.offset)!=null?u:0;i.width=(c=r.width)!=null?c:0;i.dontPrettyTextNodes=(h=(p=r.dontPrettyTextNodes)!=null?p:r.dontprettytextnodes)!=null?h:0;i.spaceBeforeSlash=(d=(m=r.spaceBeforeSlash)!=null?m:r.spacebeforeslash)!=null?d:"";if(i.spaceBeforeSlash===true){i.spaceBeforeSlash=" "}i.suppressPrettyCount=0;i.user={};i.state=a.None;return i}indent(r,i,o){var a;if(!i.pretty||i.suppressPrettyCount){return""}else if(i.pretty){a=(o||0)+i.offset+1;if(a>0){return new Array(a).join(i.indent)}}return""}endline(r,i,o){if(!i.pretty||i.suppressPrettyCount){return""}else{return i.newline}}attribute(r,i,o){var a;this.openAttribute(r,i,o);if(i.pretty&&i.width>0){a=r.name+'="'+r.value+'"'}else{a=" "+r.name+'="'+r.value+'"'}this.closeAttribute(r,i,o);return a}cdata(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<![CDATA[";i.state=a.InsideTag;l+=r.value;i.state=a.CloseTag;l+="]]>"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l}comment(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"\x3c!-- ";i.state=a.InsideTag;l+=r.value;i.state=a.CloseTag;l+=" --\x3e"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l}declaration(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<?xml";i.state=a.InsideTag;l+=' version="'+r.version+'"';if(r.encoding!=null){l+=' encoding="'+r.encoding+'"'}if(r.standalone!=null){l+=' standalone="'+r.standalone+'"'}i.state=a.CloseTag;l+=i.spaceBeforeSlash+"?>";l+=this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l}docType(r,i,o){var l,u,c,h,p;o||(o=0);this.openNode(r,i,o);i.state=a.OpenTag;h=this.indent(r,i,o);h+="<!DOCTYPE "+r.root().name;if(r.pubID&&r.sysID){h+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"'}else if(r.sysID){h+=' SYSTEM "'+r.sysID+'"'}if(r.children.length>0){h+=" [";h+=this.endline(r,i,o);i.state=a.InsideTag;p=r.children;for(u=0,c=p.length;u<c;u++){l=p[u];h+=this.writeChildNode(l,i,o+1)}i.state=a.CloseTag;h+="]"}i.state=a.CloseTag;h+=i.spaceBeforeSlash+">";h+=this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return h}element(r,o,l){var u,c,h,p,d,m,g,y,v,b,w,M,D,T,O,N,_,A,S;l||(l=0);M=false;this.openNode(r,o,l);o.state=a.OpenTag;D=this.indent(r,o,l)+"<"+r.name;if(o.pretty&&o.width>0){y=D.length;O=r.attribs;for(w in O){if(!x.call(O,w))continue;u=O[w];T=this.attribute(u,o,l);c=T.length;if(y+c>o.width){S=this.indent(r,o,l+1)+T;D+=this.endline(r,o,l)+S;y=S.length}else{S=" "+T;D+=S;y+=S.length}}}else{N=r.attribs;for(w in N){if(!x.call(N,w))continue;u=N[w];D+=this.attribute(u,o,l)}}p=r.children.length;d=p===0?null:r.children[0];if(p===0||r.children.every((function(r){return(r.type===i.Text||r.type===i.Raw)&&r.value===""}))){if(o.allowEmpty){D+=">";o.state=a.CloseTag;D+="</"+r.name+">"+this.endline(r,o,l)}else{o.state=a.CloseTag;D+=o.spaceBeforeSlash+"/>"+this.endline(r,o,l)}}else if(o.pretty&&p===1&&(d.type===i.Text||d.type===i.Raw)&&d.value!=null){D+=">";o.state=a.InsideTag;o.suppressPrettyCount++;M=true;D+=this.writeChildNode(d,o,l+1);o.suppressPrettyCount--;M=false;o.state=a.CloseTag;D+="</"+r.name+">"+this.endline(r,o,l)}else{if(o.dontPrettyTextNodes){_=r.children;for(m=0,v=_.length;m<v;m++){h=_[m];if((h.type===i.Text||h.type===i.Raw)&&h.value!=null){o.suppressPrettyCount++;M=true;break}}}D+=">"+this.endline(r,o,l);o.state=a.InsideTag;A=r.children;for(g=0,b=A.length;g<b;g++){h=A[g];D+=this.writeChildNode(h,o,l+1)}o.state=a.CloseTag;D+=this.indent(r,o,l)+"</"+r.name+">";if(M){o.suppressPrettyCount--}D+=this.endline(r,o,l);o.state=a.None}this.closeNode(r,o,l);return D}writeChildNode(r,o,a){switch(r.type){case i.CData:return this.cdata(r,o,a);case i.Comment:return this.comment(r,o,a);case i.Element:return this.element(r,o,a);case i.Raw:return this.raw(r,o,a);case i.Text:return this.text(r,o,a);case i.ProcessingInstruction:return this.processingInstruction(r,o,a);case i.Dummy:return"";case i.Declaration:return this.declaration(r,o,a);case i.DocType:return this.docType(r,o,a);case i.AttributeDeclaration:return this.dtdAttList(r,o,a);case i.ElementDeclaration:return this.dtdElement(r,o,a);case i.EntityDeclaration:return this.dtdEntity(r,o,a);case i.NotationDeclaration:return this.dtdNotation(r,o,a);default:throw new Error("Unknown XML node type: "+r.constructor.name)}}processingInstruction(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<?";i.state=a.InsideTag;l+=r.target;if(r.value){l+=" "+r.value}i.state=a.CloseTag;l+=i.spaceBeforeSlash+"?>";l+=this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l}raw(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o);i.state=a.InsideTag;l+=r.value;i.state=a.CloseTag;l+=this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l}text(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o);i.state=a.InsideTag;l+=r.value;i.state=a.CloseTag;l+=this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l}dtdAttList(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<!ATTLIST";i.state=a.InsideTag;l+=" "+r.elementName+" "+r.attributeName+" "+r.attributeType;if(r.defaultValueType!=="#DEFAULT"){l+=" "+r.defaultValueType}if(r.defaultValue){l+=' "'+r.defaultValue+'"'}i.state=a.CloseTag;l+=i.spaceBeforeSlash+">"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l}dtdElement(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<!ELEMENT";i.state=a.InsideTag;l+=" "+r.name+" "+r.value;i.state=a.CloseTag;l+=i.spaceBeforeSlash+">"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l}dtdEntity(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<!ENTITY";i.state=a.InsideTag;if(r.pe){l+=" %"}l+=" "+r.name;if(r.value){l+=' "'+r.value+'"'}else{if(r.pubID&&r.sysID){l+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"'}else if(r.sysID){l+=' SYSTEM "'+r.sysID+'"'}if(r.nData){l+=" NDATA "+r.nData}}i.state=a.CloseTag;l+=i.spaceBeforeSlash+">"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l}dtdNotation(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<!NOTATION";i.state=a.InsideTag;l+=" "+r.name;if(r.pubID&&r.sysID){l+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"'}else if(r.pubID){l+=' PUBLIC "'+r.pubID+'"'}else if(r.sysID){l+=' SYSTEM "'+r.sysID+'"'}i.state=a.CloseTag;l+=i.spaceBeforeSlash+">"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l}openNode(r,i,o){}closeNode(r,i,o){}openAttribute(r,i,o){}closeAttribute(r,i,o){}}}).call(this)},5769:function(r,i,o){(function(){var i,a,l,u,c,h,p,d,m;({assign:d,isFunction:m}=o(983));l=o(2692);u=o(1582);c=o(2871);p=o(7834);h=o(5922);i=o(7762);a=o(140);r.exports.create=function(r,i,o,a){var l,c;if(r==null){throw new Error("Root element needs a name.")}a=d({},i,o,a);l=new u(a);c=l.element(r);if(!a.headless){l.declaration(a);if(a.pubID!=null||a.sysID!=null){l.dtd(a)}}return c};r.exports.begin=function(r,i,o){if(m(r)){[i,o]=[r,i];r={}}if(i){return new c(r,i,o)}else{return new u(r)}};r.exports.stringWriter=function(r){return new p(r)};r.exports.streamWriter=function(r,i){return new h(r,i)};r.exports.implementation=new l;r.exports.nodeType=i;r.exports.writerState=a}).call(this)},4513:(r,i,o)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.addMetaDataItemToMainApplication=addMetaDataItemToMainApplication;i.addUsesLibraryItemToMainApplication=addUsesLibraryItemToMainApplication;i.ensureToolsAvailable=ensureToolsAvailable;i.findMetaDataItem=findMetaDataItem;i.findUsesLibraryItem=findUsesLibraryItem;i.getMainActivity=getMainActivity;i.getMainActivityOrThrow=getMainActivityOrThrow;i.getMainApplication=getMainApplication;i.getMainApplicationMetaDataValue=getMainApplicationMetaDataValue;i.getMainApplicationOrThrow=getMainApplicationOrThrow;i.getRunnableActivity=getRunnableActivity;i.prefixAndroidKeys=prefixAndroidKeys;i.readAndroidManifestAsync=readAndroidManifestAsync;i.removeMetaDataItemFromMainApplication=removeMetaDataItemFromMainApplication;i.removeUsesLibraryItemFromMainApplication=removeUsesLibraryItemFromMainApplication;i.writeAndroidManifestAsync=writeAndroidManifestAsync;function _assert(){const r=_interopRequireDefault(o(9491));_assert=function(){return r};return r}function _fs(){const r=_interopRequireDefault(o(7147));_fs=function(){return r};return r}function _path(){const r=_interopRequireDefault(o(1017));_path=function(){return r};return r}function XML(){const r=_interopRequireWildcard(o(8853));XML=function(){return r};return r}function _getRequireWildcardCache(r){if(typeof WeakMap!=="function")return null;var i=new WeakMap;var o=new WeakMap;return(_getRequireWildcardCache=function(r){return r?o:i})(r)}function _interopRequireWildcard(r,i){if(!i&&r&&r.__esModule){return r}if(r===null||typeof r!=="object"&&typeof r!=="function"){return{default:r}}var o=_getRequireWildcardCache(i);if(o&&o.has(r)){return o.get(r)}var a={};var l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in r){if(u!=="default"&&Object.prototype.hasOwnProperty.call(r,u)){var c=l?Object.getOwnPropertyDescriptor(r,u):null;if(c&&(c.get||c.set)){Object.defineProperty(a,u,c)}else{a[u]=r[u]}}}a.default=r;if(o){o.set(r,a)}return a}function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}async function writeAndroidManifestAsync(r,i){const o=XML().format(i);await _fs().default.promises.mkdir(_path().default.dirname(r),{recursive:true});await _fs().default.promises.writeFile(r,o)}async function readAndroidManifestAsync(r){const i=await XML().readXMLAsync({path:r});if(!isManifest(i)){throw new Error("Invalid manifest found at: "+r)}return i}function isManifest(r){return!!r.manifest}function getMainApplication(r){var i,o,a;return(i=r===null||r===void 0?void 0:(o=r.manifest)===null||o===void 0?void 0:(a=o.application)===null||a===void 0?void 0:a.filter((r=>{var i;return r===null||r===void 0?void 0:(i=r.$)===null||i===void 0?void 0:i["android:name"].endsWith(".MainApplication")}))[0])!==null&&i!==void 0?i:null}function getMainApplicationOrThrow(r){const i=getMainApplication(r);(0,_assert().default)(i,"AndroidManifest.xml is missing the required MainApplication element");return i}function getMainActivityOrThrow(r){const i=getMainActivity(r);(0,_assert().default)(i,"AndroidManifest.xml is missing the required MainActivity element");return i}function getRunnableActivity(r){var i,o,a,l,u;const c=r===null||r===void 0?void 0:(i=r.manifest)===null||i===void 0?void 0:(o=i.application)===null||o===void 0?void 0:(a=o[0])===null||a===void 0?void 0:(l=a.activity)===null||l===void 0?void 0:(u=l.filter)===null||u===void 0?void 0:u.call(l,(r=>r.$["android:enabled"]!=="false"&&r.$["android:enabled"]!==false));if(!c){return null}for(const r of c){if(Array.isArray(r["intent-filter"])){for(const i of r["intent-filter"]){var h,p;if((h=i.action)!==null&&h!==void 0&&h.find((r=>r.$["android:name"]==="android.intent.action.MAIN"))&&(p=i.category)!==null&&p!==void 0&&p.find((r=>r.$["android:name"]==="android.intent.category.LAUNCHER"))){return r}}}}return null}function getMainActivity(r){var i,o,a,l,u,c;const h=r===null||r===void 0?void 0:(i=r.manifest)===null||i===void 0?void 0:(o=i.application)===null||o===void 0?void 0:(a=o[0])===null||a===void 0?void 0:(l=a.activity)===null||l===void 0?void 0:(u=l.filter)===null||u===void 0?void 0:u.call(l,(r=>r.$["android:name"]===".MainActivity"));return(c=h===null||h===void 0?void 0:h[0])!==null&&c!==void 0?c:null}function addMetaDataItemToMainApplication(r,i,o,a="value"){let l;const u={$:prefixAndroidKeys({name:i,[a]:o})};if(r["meta-data"]){l=r["meta-data"].filter((r=>r.$["android:name"]===i));if(l.length){l[0].$[`android:${a}`]=o}else{r["meta-data"].push(u)}}else{r["meta-data"]=[u]}return r}function removeMetaDataItemFromMainApplication(r,i){const o=findMetaDataItem(r,i);if(r!==null&&r!==void 0&&r["meta-data"]&&o>-1){r["meta-data"].splice(o,1)}return r}function findApplicationSubItem(r,i,o){const a=r[i];if(Array.isArray(a)){const r=a.findIndex((r=>r.$["android:name"]===o));return r}return-1}function findMetaDataItem(r,i){return findApplicationSubItem(r,"meta-data",i)}function findUsesLibraryItem(r,i){return findApplicationSubItem(r,"uses-library",i)}function getMainApplicationMetaDataValue(r,i){const o=getMainApplication(r);if(o!==null&&o!==void 0&&o.hasOwnProperty("meta-data")){var a,l;const r=o===null||o===void 0?void 0:(a=o["meta-data"])===null||a===void 0?void 0:a.find((r=>r.$["android:name"]===i));return(l=r===null||r===void 0?void 0:r.$["android:value"])!==null&&l!==void 0?l:null}return null}function addUsesLibraryItemToMainApplication(r,i){let o;const a={$:prefixAndroidKeys(i)};if(r["uses-library"]){o=r["uses-library"].filter((r=>r.$["android:name"]===i.name));if(o.length){o[0].$=a.$}else{r["uses-library"].push(a)}}else{r["uses-library"]=[a]}return r}function removeUsesLibraryItemFromMainApplication(r,i){const o=findUsesLibraryItem(r,i);if(r!==null&&r!==void 0&&r["uses-library"]&&o>-1){r["uses-library"].splice(o,1)}return r}function prefixAndroidKeys(r){return Object.entries(r).reduce(((r,[i,o])=>({...r,[`android:${i}`]:o})),{})}function ensureToolsAvailable(r){return ensureManifestHasNamespace(r,{namespace:"xmlns:tools",url:"http://schemas.android.com/tools"})}function ensureManifestHasNamespace(r,{namespace:i,url:o}){var a,l;if(r!==null&&r!==void 0&&(a=r.manifest)!==null&&a!==void 0&&(l=a.$)!==null&&l!==void 0&&l[i]){return r}r.manifest.$[i]=o;return r}},365:(r,i,o)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.appendScheme=appendScheme;i.ensureManifestHasValidIntentFilter=ensureManifestHasValidIntentFilter;i.getScheme=getScheme;i.getSchemesFromManifest=getSchemesFromManifest;i.hasScheme=hasScheme;i.removeScheme=removeScheme;i.setScheme=setScheme;i.withScheme=void 0;function _androidPlugins(){const r=o(2636);_androidPlugins=function(){return r};return r}function _warnings(){const r=o(128);_warnings=function(){return r};return r}const a=(0,_androidPlugins().createAndroidManifestPlugin)(setScheme,"withScheme");i.withScheme=a;function getScheme(r){if(Array.isArray(r.scheme)){const validate=r=>typeof r==="string";return r.scheme.filter(validate)}else if(typeof r.scheme==="string"){return[r.scheme]}return[]}function setScheme(r,i){var o,a;const l=[...getScheme(r),...getScheme((o=r.android)!==null&&o!==void 0?o:{})];if((a=r.android)!==null&&a!==void 0&&a.package){l.push(r.android.package)}if(l.length===0){return i}if(!ensureManifestHasValidIntentFilter(i)){(0,_warnings().addWarningAndroid)("scheme",`Cannot add schemes because the provided manifest does not have a valid Activity with \`android:launchMode="singleTask"\``,"https://expo.fyi/setup-android-uri-scheme");return i}const u=getSchemesFromManifest(i);for(const r of u){const i=l.indexOf(r);if(i>-1)l.splice(i,1)}for(const r of l){i=appendScheme(r,i)}return i}function isValidRedirectIntentFilter({actions:r,categories:i}){return r.includes("android.intent.action.VIEW")&&!i.includes("android.intent.category.LAUNCHER")}function propertiesFromIntentFilter(r){var i,o,a,l,u,c,h;const p=(i=r===null||r===void 0?void 0:(o=r.action)===null||o===void 0?void 0:o.map((r=>{var i;return r===null||r===void 0?void 0:(i=r.$)===null||i===void 0?void 0:i["android:name"]})))!==null&&i!==void 0?i:[];const d=(a=r===null||r===void 0?void 0:(l=r.category)===null||l===void 0?void 0:l.map((r=>{var i;return r===null||r===void 0?void 0:(i=r.$)===null||i===void 0?void 0:i["android:name"]})))!==null&&a!==void 0?a:[];const m=(u=r===null||r===void 0?void 0:(c=r.data)===null||c===void 0?void 0:(h=c.filter((r=>{var i;return r===null||r===void 0?void 0:(i=r.$)===null||i===void 0?void 0:i["android:scheme"]})))===null||h===void 0?void 0:h.map((r=>{var i,o;return{scheme:r===null||r===void 0?void 0:(i=r.$)===null||i===void 0?void 0:i["android:scheme"],host:r===null||r===void 0?void 0:(o=r.$)===null||o===void 0?void 0:o["android:host"]}})))!==null&&u!==void 0?u:[];return{actions:p,categories:d,data:m}}function getSingleTaskIntentFilters(r){if(!Array.isArray(r.manifest.application))return[];let i=[];for(const o of r.manifest.application){const{activity:r}=o;const a=Array.isArray(r)?r:[r];const l=a.filter((r=>{var i;return(r===null||r===void 0?void 0:(i=r.$)===null||i===void 0?void 0:i["android:launchMode"])==="singleTask"}));for(const r of l){const o=r["intent-filter"];i=i.concat(o)}}return i}function getSchemesFromManifest(r,i=null){const o=[];const a=getSingleTaskIntentFilters(r);for(const r of a){const a=propertiesFromIntentFilter(r);if(isValidRedirectIntentFilter(a)&&a.data){for(const{scheme:r,host:l}of a.data){if(i===null||!l||l===i){o.push(r)}}}}return o}function ensureManifestHasValidIntentFilter(r){if(!Array.isArray(r.manifest.application)){return false}for(const o of r.manifest.application){for(const r of o.activity||[]){var i;if((r===null||r===void 0?void 0:(i=r.$)===null||i===void 0?void 0:i["android:launchMode"])==="singleTask"){for(const i of r["intent-filter"]||[]){const r=propertiesFromIntentFilter(i);if(isValidRedirectIntentFilter(r)){return true}}if(!r["intent-filter"]){r["intent-filter"]=[]}r["intent-filter"].push({action:[{$:{"android:name":"android.intent.action.VIEW"}}],category:[{$:{"android:name":"android.intent.category.DEFAULT"}},{$:{"android:name":"android.intent.category.BROWSABLE"}}]});return true}}}return false}function hasScheme(r,i){const o=getSchemesFromManifest(i);return o.includes(r)}function appendScheme(r,i){if(!Array.isArray(i.manifest.application)){return i}for(const a of i.manifest.application){for(const i of a.activity||[]){var o;if((i===null||i===void 0?void 0:(o=i.$)===null||o===void 0?void 0:o["android:launchMode"])==="singleTask"){for(const o of i["intent-filter"]||[]){const i=propertiesFromIntentFilter(o);if(isValidRedirectIntentFilter(i)){if(!o.data)o.data=[];o.data.push({$:{"android:scheme":r}})}}break}}}return i}function removeScheme(r,i){if(!Array.isArray(i.manifest.application)){return i}for(const c of i.manifest.application){for(const i of c.activity||[]){var o;if((i===null||i===void 0?void 0:(o=i.$)===null||o===void 0?void 0:o["android:launchMode"])==="singleTask"){for(const o of i["intent-filter"]||[]){const i=propertiesFromIntentFilter(o);if(isValidRedirectIntentFilter(i)){for(const i in(o===null||o===void 0?void 0:o.data)||[]){var a,l;const c=(a=o.data)===null||a===void 0?void 0:a[i];if((c===null||c===void 0?void 0:(l=c.$)===null||l===void 0?void 0:l["android:scheme"])===r){var u;(u=o.data)===null||u===void 0?true:delete u[i]}}}}break}}}return i}},7903:(r,i,o)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.appendScheme=appendScheme;i.getScheme=getScheme;i.getSchemesFromPlist=getSchemesFromPlist;i.hasScheme=hasScheme;i.removeScheme=removeScheme;i.setScheme=setScheme;i.withScheme=void 0;function _iosPlugins(){const r=o(4797);_iosPlugins=function(){return r};return r}const a=(0,_iosPlugins().createInfoPlistPluginWithPropertyGuard)(setScheme,{infoPlistProperty:"CFBundleURLTypes",expoConfigProperty:"scheme"},"withScheme");i.withScheme=a;function getScheme(r){if(Array.isArray(r.scheme)){const validate=r=>typeof r==="string";return r.scheme.filter(validate)}else if(typeof r.scheme==="string"){return[r.scheme]}return[]}function setScheme(r,i){var o,a;const l=[...getScheme(r),...getScheme((o=r.ios)!==null&&o!==void 0?o:{})];if((a=r.ios)!==null&&a!==void 0&&a.bundleIdentifier){l.push(r.ios.bundleIdentifier)}if(l.length===0){return i}return{...i,CFBundleURLTypes:[{CFBundleURLSchemes:l}]}}function appendScheme(r,i){var o;if(!r){return i}const a=(o=i.CFBundleURLTypes)!==null&&o!==void 0?o:[];if(a!==null&&a!==void 0&&a.some((({CFBundleURLSchemes:i})=>i.includes(r)))){return i}return{...i,CFBundleURLTypes:[...a,{CFBundleURLSchemes:[r]}]}}function removeScheme(r,i){if(!r){return i}if(!i.CFBundleURLTypes){return i}i.CFBundleURLTypes=i.CFBundleURLTypes.map((i=>{const o=i.CFBundleURLSchemes.indexOf(r);if(o>-1){i.CFBundleURLSchemes.splice(o,1);if(i.CFBundleURLSchemes.length===0){return undefined}}return i})).filter(Boolean);return i}function hasScheme(r,i){const o=i.CFBundleURLTypes;if(!Array.isArray(o))return false;return o===null||o===void 0?void 0:o.some((({CFBundleURLSchemes:i})=>Array.isArray(i)?i.includes(r):false))}function getSchemesFromPlist(r){if(Array.isArray(r.CFBundleURLTypes)){return r.CFBundleURLTypes.reduce(((r,{CFBundleURLSchemes:i})=>{if(Array.isArray(i)){return[...r,...i]}return r}),[])}return[]}},2636:(r,i,o)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.createAndroidManifestPlugin=createAndroidManifestPlugin;i.createStringsXmlPlugin=createStringsXmlPlugin;i.withStringsXml=i.withSettingsGradle=i.withProjectBuildGradle=i.withMainApplication=i.withMainActivity=i.withGradleProperties=i.withAppBuildGradle=i.withAndroidStyles=i.withAndroidManifest=i.withAndroidColorsNight=i.withAndroidColors=void 0;function _withMod(){const r=o(2932);_withMod=function(){return r};return r}function createAndroidManifestPlugin(r,i){const withUnknown=i=>withAndroidManifest(i,(async i=>{i.modResults=await r(i,i.modResults);return i}));if(i){Object.defineProperty(withUnknown,"name",{value:i})}return withUnknown}function createStringsXmlPlugin(r,i){const withUnknown=i=>withStringsXml(i,(async i=>{i.modResults=await r(i,i.modResults);return i}));if(i){Object.defineProperty(withUnknown,"name",{value:i})}return withUnknown}const withAndroidManifest=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"manifest",action:i});i.withAndroidManifest=withAndroidManifest;const withStringsXml=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"strings",action:i});i.withStringsXml=withStringsXml;const withAndroidColors=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"colors",action:i});i.withAndroidColors=withAndroidColors;const withAndroidColorsNight=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"colorsNight",action:i});i.withAndroidColorsNight=withAndroidColorsNight;const withAndroidStyles=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"styles",action:i});i.withAndroidStyles=withAndroidStyles;const withMainActivity=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"mainActivity",action:i});i.withMainActivity=withMainActivity;const withMainApplication=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"mainApplication",action:i});i.withMainApplication=withMainApplication;const withProjectBuildGradle=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"projectBuildGradle",action:i});i.withProjectBuildGradle=withProjectBuildGradle;const withAppBuildGradle=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"appBuildGradle",action:i});i.withAppBuildGradle=withAppBuildGradle;const withSettingsGradle=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"settingsGradle",action:i});i.withSettingsGradle=withSettingsGradle;const withGradleProperties=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"gradleProperties",action:i});i.withGradleProperties=withGradleProperties},4797:(r,i,o)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.createEntitlementsPlugin=createEntitlementsPlugin;i.createInfoPlistPlugin=createInfoPlistPlugin;i.createInfoPlistPluginWithPropertyGuard=createInfoPlistPluginWithPropertyGuard;i.withXcodeProject=i.withPodfileProperties=i.withInfoPlist=i.withExpoPlist=i.withEntitlementsPlist=i.withAppDelegate=void 0;function _withMod(){const r=o(2932);_withMod=function(){return r};return r}function _obj(){const r=o(7324);_obj=function(){return r};return r}function _warnings(){const r=o(128);_warnings=function(){return r};return r}function createInfoPlistPlugin(r,i){const withUnknown=i=>withInfoPlist(i,(async i=>{i.modResults=await r(i,i.modResults);return i}));if(i){Object.defineProperty(withUnknown,"name",{value:i})}return withUnknown}function createInfoPlistPluginWithPropertyGuard(r,i,o){const withUnknown=o=>withInfoPlist(o,(async o=>{var a,l;const u=i.expoPropertyGetter?i.expoPropertyGetter(o):(0,_obj().get)(o,i.expoConfigProperty);if(((a=o.modRawConfig.ios)===null||a===void 0?void 0:(l=a.infoPlist)===null||l===void 0?void 0:l[i.infoPlistProperty])===undefined){o.modResults=await r(o,o.modResults)}else if(u!==undefined){(0,_warnings().addWarningIOS)(i.expoConfigProperty,`"ios.infoPlist.${i.infoPlistProperty}" is set in the config. Ignoring abstract property "${i.expoConfigProperty}": ${u}`)}return o}));if(o){Object.defineProperty(withUnknown,"name",{value:o})}return withUnknown}function createEntitlementsPlugin(r,i){const withUnknown=i=>withEntitlementsPlist(i,(async i=>{i.modResults=await r(i,i.modResults);return i}));if(i){Object.defineProperty(withUnknown,"name",{value:i})}return withUnknown}const withAppDelegate=(r,i)=>(0,_withMod().withMod)(r,{platform:"ios",mod:"appDelegate",action:i});i.withAppDelegate=withAppDelegate;const withInfoPlist=(r,i)=>(0,_withMod().withMod)(r,{platform:"ios",mod:"infoPlist",async action(r){r=await i(r);if(!r.ios){r.ios={}}r.ios.infoPlist=r.modResults;return r}});i.withInfoPlist=withInfoPlist;const withEntitlementsPlist=(r,i)=>(0,_withMod().withMod)(r,{platform:"ios",mod:"entitlements",async action(r){r=await i(r);if(!r.ios){r.ios={}}r.ios.entitlements=r.modResults;return r}});i.withEntitlementsPlist=withEntitlementsPlist;const withExpoPlist=(r,i)=>(0,_withMod().withMod)(r,{platform:"ios",mod:"expoPlist",action:i});i.withExpoPlist=withExpoPlist;const withXcodeProject=(r,i)=>(0,_withMod().withMod)(r,{platform:"ios",mod:"xcodeproj",action:i});i.withXcodeProject=withXcodeProject;const withPodfileProperties=(r,i)=>(0,_withMod().withMod)(r,{platform:"ios",mod:"podfileProperties",action:i});i.withPodfileProperties=withPodfileProperties},2932:(r,i,o)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.withBaseMod=withBaseMod;i.withMod=withMod;function _chalk(){const r=_interopRequireDefault(o(8746));_chalk=function(){return r};return r}function _getenv(){const r=o(7945);_getenv=function(){return r};return r}function _errors(){const r=o(3857);_errors=function(){return r};return r}function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}const a=(0,_getenv().boolish)("EXPO_DEBUG",false);function withBaseMod(r,{platform:i,mod:o,action:l,skipEmptyMod:u,isProvider:c,isIntrospective:h,saveToInternal:p}){var d,m;if(!r.mods){r.mods={}}if(!r.mods[i]){r.mods[i]={}}let g=r.mods[i][o];if(!g){if(u){return r}const noopMod=r=>r;g=noopMod}let y="";const v=(d=(m=r._internal)===null||m===void 0?void 0:m.isDebug)!==null&&d!==void 0?d:a;if(v){const r=(new Error).stack;y=getDebugPluginStackFromStackTrace(r);const a=_chalk().default.bold(`${i}.${o}`);y=`${a}: ${y}`}if(g.isProvider){if(c){throw new(_errors().PluginError)(`Cannot set provider mod for "${i}.${o}" because another is already being used.`,"CONFLICTING_PROVIDER")}else{throw new(_errors().PluginError)(`Cannot add mod to "${i}.${o}" because the provider has already been added. Provider must be the last mod added.`,"INVALID_MOD_ORDER")}}async function interceptingMod({modRequest:r,...a}){if(v){console.log(y)}const u=await l({...a,modRequest:{...r,nextMod:g}});if(p){saveToInternalObject(u,i,o,u.modResults)}return u}interceptingMod.isProvider=c;if(h){interceptingMod.isIntrospective=h}r.mods[i][o]=interceptingMod;return r}function saveToInternalObject(r,i,o,a){if(!r._internal)r._internal={};if(!r._internal.modResults)r._internal.modResults={};if(!r._internal.modResults[i])r._internal.modResults[i]={};r._internal.modResults[i][o]=a}function getDebugPluginStackFromStackTrace(r){if(!r){return""}const i=[];for(const o of r.split("\n")){const[r,a]=o.trim().split(" ");if(r==="at"){i.push(a)}}const o=i.map((r=>{var i,o,a,l,u,c;return(i=(o=r===null||r===void 0?void 0:(a=r.match(/^(\bwith[A-Z].*?\b)/))===null||a===void 0?void 0:(l=a[1])===null||l===void 0?void 0:l.trim())!==null&&o!==void 0?o:r===null||r===void 0?void 0:(u=r.match(/\.(\bwith[A-Z].*?\b)/))===null||u===void 0?void 0:(c=u[1])===null||c===void 0?void 0:c.trim())!==null&&i!==void 0?i:null})).filter(Boolean).filter((r=>!["withMod","withBaseMod","withExtendedMod"].includes(r)));const a=["withPlugins","withRunOnce","withStaticPlugin"];return o.reverse().map(((r,i)=>{if(r.includes("BaseMod")){r=_chalk().default.bold(r)}if(r.toLowerCase().includes("dangerous")){r=_chalk().default.red(r)}if(i===0){return _chalk().default.blue(r)}else if(a.includes(r)){return _chalk().default.dim(r)}return r})).join(" ➜ ")}function withMod(r,{platform:i,mod:o,action:a}){return withBaseMod(r,{platform:i,mod:o,isProvider:false,async action({modRequest:{nextMod:r,...i},modResults:o,...l}){const u=await a({modRequest:i,modResults:o,...l});return r(u)}})}},8853:(r,i,o)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i._processAndroidXML=_processAndroidXML;i.escapeAndroidString=escapeAndroidString;i.format=format;i.parseXMLAsync=parseXMLAsync;i.readXMLAsync=readXMLAsync;i.unescapeAndroidString=unescapeAndroidString;i.writeXMLAsync=writeXMLAsync;function _fs(){const r=_interopRequireDefault(o(7147));_fs=function(){return r};return r}function _os(){const r=o(2037);_os=function(){return r};return r}function _path(){const r=_interopRequireDefault(o(1017));_path=function(){return r};return r}function _xml2js(){const r=o(7013);_xml2js=function(){return r};return r}function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}async function writeXMLAsync(r){const i=format(r.xml);await _fs().default.promises.mkdir(_path().default.dirname(r.path),{recursive:true});await _fs().default.promises.writeFile(r.path,i)}async function readXMLAsync(r){let i="";try{i=await _fs().default.promises.readFile(r.path,{encoding:"utf8",flag:"r"})}catch{}const o=new(_xml2js().Parser);const a=await o.parseStringPromise(i||r.fallback||"");return _processAndroidXML(a)}function _processAndroidXML(r){var i;if(Array.isArray(r===null||r===void 0?void 0:(i=r.resources)===null||i===void 0?void 0:i.string)){for(const i of r===null||r===void 0?void 0:(o=r.resources)===null||o===void 0?void 0:o.string){var o;if(i.$.translatable==="false"||i.$.translatable===false){continue}i._=unescapeAndroidString(i._)}}return r}async function parseXMLAsync(r){const i=await(new(_xml2js().Parser)).parseStringPromise(r);return i}const stringTimesN=(r,i)=>Array(r+1).join(i);function format(r,{indentLevel:i=2,newline:o=_os().EOL}={}){let a;if(typeof r==="string"){a=r}else if(r.toString){var l;const i=new(_xml2js().Builder)({headless:true});if(Array.isArray(r===null||r===void 0?void 0:(l=r.resources)===null||l===void 0?void 0:l.string)){for(const i of r===null||r===void 0?void 0:(u=r.resources)===null||u===void 0?void 0:u.string){var u;if(i.$.translatable==="false"||i.$.translatable===false){continue}i._=escapeAndroidString(i._)}}a=i.buildObject(r);return a}else{throw new Error(`Invalid XML value passed in: ${r}`)}const c=stringTimesN(i," ");let h="";const p=/(>)(<)(\/*)/g;const d=a.replace(p,`$1${o}$2$3`);let m=0;d.split(/\r?\n/).map((r=>r.trim())).forEach((r=>{let i=0;if(r.match(/.+<\/\w[^>]*>$/)){i=0}else if(r.match(/^<\/\w/)){if(m!==0){m-=1}}else if(r.match(/^<\w([^>]*[^/])?>.*$/)){i=1}else{i=0}const a=stringTimesN(m,c);h+=a+r+o;m+=i}));return h.trim()}function escapeAndroidString(r){r=r.replace(/[\n\r\t'"@]/g,(r=>{switch(r){case'"':case"'":case"@":return"\\"+r;case"\n":return"\\n";case"\r":return"\\r";case"\t":return"\\t";default:throw new Error(`Cannot escape unhandled XML character: ${r}`)}}));if(r.match(/(^\s|\s$)/)){r='"'+r+'"'}return r}function unescapeAndroidString(r){return r.replace(/\\(.)/g,"$1")}},3857:(r,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.UnexpectedError=i.PluginError=void 0;class UnexpectedError extends Error{name="UnexpectedError";constructor(r){super(`${r}\nPlease report this as an issue on https://github.com/expo/expo-cli/issues`)}}i.UnexpectedError=UnexpectedError;class PluginError extends Error{name="PluginError";isPluginError=true;constructor(r,i,o){super(o?`${r}\n└─ Cause: ${o.name}: ${o.message}`:r);this.code=i;this.cause=o}}i.PluginError=PluginError},7324:(r,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.get=get;function get(r,i){const o=i.split(".");let a=r;let l;while(l=o.shift()){if(!(l in a)){return undefined}a=a[l]}return a}},128:(r,i,o)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.addWarningAndroid=addWarningAndroid;i.addWarningForPlatform=addWarningForPlatform;i.addWarningIOS=addWarningIOS;function _chalk(){const r=_interopRequireDefault(o(8746));_chalk=function(){return r};return r}function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function addWarningAndroid(r,i,o){console.warn(formatWarning("android",r,i,o))}function addWarningIOS(r,i,o){console.warn(formatWarning("ios",r,i,o))}function addWarningForPlatform(r,i,o,a){console.warn(formatWarning(r,i,o,a))}function formatWarning(r,i,o,a){return _chalk().default.yellow`${"» "+_chalk().default.bold(r)}: ${i}: ${o}${a?_chalk().default.gray(" "+a):""}`}},2395:function(r,i,o){"use strict";var a=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:true});i.build=void 0;const l=a(o(2991));const u=a(o(5769));function ISODateString(r){function pad(r){return r<10?"0"+r:r}return r.getUTCFullYear()+"-"+pad(r.getUTCMonth()+1)+"-"+pad(r.getUTCDate())+"T"+pad(r.getUTCHours())+":"+pad(r.getUTCMinutes())+":"+pad(r.getUTCSeconds())+"Z"}const c=Object.prototype.toString;function type(r){const i=c.call(r).match(/\[object (.*)\]/);return i?i[1]:i}function build(r,i){const o={version:"1.0",encoding:"UTF-8"};const a={pubid:"-//Apple//DTD PLIST 1.0//EN",sysid:"http://www.apple.com/DTDs/PropertyList-1.0.dtd"};const l=u.default.create("plist");l.dec(o.version,o.encoding,o.standalone);l.dtd(a.pubid,a.sysid);l.att("version","1.0");walk_obj(r,l);if(!i)i={};i.pretty=i.pretty!==false;return l.end(i)}i.build=build;function walk_obj(r,i){let o,a,u;const c=type(r);if(c=="Undefined"){}else if(Array.isArray(r)){i=i.ele("array");for(a=0;a<r.length;a++){walk_obj(r[a],i)}}else if(Buffer.isBuffer(r)){i.ele("data").raw(r.toString("base64"))}else if(c=="Object"){i=i.ele("dict");for(u in r){if(r.hasOwnProperty(u)&&r[u]!==undefined){i.ele("key").txt(u);walk_obj(r[u],i)}}}else if(c=="Number"){o=r%1===0?"integer":"real";i.ele(o).txt(r.toString())}else if(c=="Date"){i.ele("date").txt(ISODateString(new Date(r)))}else if(c=="Boolean"){i.ele(r?"true":"false")}else if(c=="String"){i.ele("string").txt(r)}else if(c=="ArrayBuffer"){i.ele("data").raw(l.default.fromByteArray(r))}else if(r&&r.buffer&&type(r.buffer)=="ArrayBuffer"){i.ele("data").raw(l.default.fromByteArray(new Uint8Array(r.buffer)))}}},3681:(r,i,o)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});const a=o(2395);const l=o(6859);i["default"]={parse:l.parse,build:a.build}},6859:function(r,i,o){"use strict";var a=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:true});i.parse=void 0;const l=o(1328);const u=a(o(9491));const c=3;const h=4;const p=8;function shouldIgnoreNode(r){return r.nodeType===c||r.nodeType===p||r.nodeType===h}function isEmptyNode(r){return!r.childNodes||r.childNodes.length===0}function parse(r){const i=new l.DOMParser({errorHandler(){}}).parseFromString(r);(0,u.default)(i.documentElement.nodeName==="plist","malformed document. First element should be <plist>");let o=parsePlistXML(i.documentElement);if(o.length==1)o=o[0];return o}i.parse=parse;function parsePlistXML(r){let i,o,a,l,p,d;if(!r)return null;if(r.nodeName==="plist"){l=[];if(isEmptyNode(r)){return l}for(i=0;i<r.childNodes.length;i++){if(!shouldIgnoreNode(r.childNodes[i])){l.push(parsePlistXML(r.childNodes[i]))}}return l}else if(r.nodeName==="dict"){o={};a=null;d=0;if(isEmptyNode(r)){return o}for(i=0;i<r.childNodes.length;i++){if(shouldIgnoreNode(r.childNodes[i]))continue;if(d%2===0){(0,u.default)(r.childNodes[i].nodeName==="key","Missing key while parsing <dict/>.");a=parsePlistXML(r.childNodes[i])}else{(0,u.default)(r.childNodes[i].nodeName!=="key",'Unexpected key "'+parsePlistXML(r.childNodes[i])+'" while parsing <dict/>.');o[a]=parsePlistXML(r.childNodes[i])}d+=1}if(d%2===1){throw new Error('Missing value for "'+a+'" while parsing <dict/>')}return o}else if(r.nodeName==="array"){l=[];if(isEmptyNode(r)){return l}for(i=0;i<r.childNodes.length;i++){if(!shouldIgnoreNode(r.childNodes[i])){p=parsePlistXML(r.childNodes[i]);if(p!=null)l.push(p)}}return l}else if(r.nodeName==="#text"){}else if(r.nodeName==="key"){if(isEmptyNode(r)){return""}return r.childNodes[0].nodeValue}else if(r.nodeName==="string"){p="";if(isEmptyNode(r)){return p}for(i=0;i<r.childNodes.length;i++){const o=r.childNodes[i].nodeType;if(o===c||o===h){p+=r.childNodes[i].nodeValue}}return p}else if(r.nodeName==="integer"){(0,u.default)(!isEmptyNode(r),'Cannot parse "" as integer.');return parseInt(r.childNodes[0].nodeValue,10)}else if(r.nodeName==="real"){(0,u.default)(!isEmptyNode(r),'Cannot parse "" as real.');p="";for(i=0;i<r.childNodes.length;i++){if(r.childNodes[i].nodeType===c){p+=r.childNodes[i].nodeValue}}return parseFloat(p)}else if(r.nodeName==="data"){p="";if(isEmptyNode(r)){return Buffer.from(p,"base64")}for(i=0;i<r.childNodes.length;i++){if(r.childNodes[i].nodeType===c){p+=r.childNodes[i].nodeValue.replace(/\s+/g,"")}}return Buffer.from(p,"base64")}else if(r.nodeName==="date"){(0,u.default)(!isEmptyNode(r),'Cannot parse "" as Date.');return new Date(r.childNodes[0].nodeValue)}else if(r.nodeName==="true"){return true}else if(r.nodeName==="false"){return false}}},5521:function(r,i,o){"use strict";var a=this&&this.__rest||function(r,i){var o={};for(var a in r)if(Object.prototype.hasOwnProperty.call(r,a)&&i.indexOf(a)<0)o[a]=r[a];if(r!=null&&typeof Object.getOwnPropertySymbols==="function")for(var l=0,a=Object.getOwnPropertySymbols(r);l<a.length;l++)if(i.indexOf(a[l])<0)o[a[l]]=r[a[l]];return o};var l=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:true});const u=l(o(7618));function spawnAsync(r,i,o={}){const l=new Error("fake error just to preserve stacktrace");const c=l.stack&&l.stack.split("\n").splice(1);const h=c&&[" ...",...c].join("\n");let p;let d=new Promise(((l,c)=>{let{ignoreStdio:d}=o,m=a(o,["ignoreStdio"]);p=u.default(r,i,m);let g="";let y="";if(!d){if(p.stdout){p.stdout.on("data",(r=>{g+=r}))}if(p.stderr){p.stderr.on("data",(r=>{y+=r}))}}let completionListener=(i,o)=>{p.removeListener("error",errorListener);let a={pid:p.pid,output:[g,y],stdout:g,stderr:y,status:i,signal:o};if(i!==0){let l=o?new Error(`${r} exited with signal: ${o}`):new Error(`${r} exited with non-zero code: ${i}`);if(l.stack&&h){l.stack+=`\n${h}`}Object.assign(l,a);c(l)}else{l(a)}};let errorListener=r=>{if(d){p.removeListener("exit",completionListener)}else{p.removeListener("close",completionListener)}Object.assign(r,{pid:p.pid,output:[g,y],stdout:g,stderr:y,status:null,signal:null});c(r)};if(d){p.once("exit",completionListener)}else{p.once("close",completionListener)}p.once("error",errorListener)}));d.child=p;return d}i["default"]=spawnAsync},1072:(r,i,o)=>{r.exports=o(5521)["default"]},7618:(r,i,o)=>{"use strict";const a=o(2081);const l=o(4527);const u=o(2773);function spawn(r,i,o){const c=l(r,i,o);const h=a.spawn(c.command,c.args,c.options);u.hookChildProcess(h,c);return h}function spawnSync(r,i,o){const c=l(r,i,o);const h=a.spawnSync(c.command,c.args,c.options);h.error=h.error||u.verifyENOENTSync(h.status,c);return h}r.exports=spawn;r.exports.spawn=spawn;r.exports.sync=spawnSync;r.exports._parse=l;r.exports._enoent=u},2773:r=>{"use strict";const i=process.platform==="win32";function notFoundError(r,i){return Object.assign(new Error(`${i} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${i} ${r.command}`,path:r.command,spawnargs:r.args})}function hookChildProcess(r,o){if(!i){return}const a=r.emit;r.emit=function(i,l){if(i==="exit"){const i=verifyENOENT(l,o,"spawn");if(i){return a.call(r,"error",i)}}return a.apply(r,arguments)}}function verifyENOENT(r,o){if(i&&r===1&&!o.file){return notFoundError(o.original,"spawn")}return null}function verifyENOENTSync(r,o){if(i&&r===1&&!o.file){return notFoundError(o.original,"spawnSync")}return null}r.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},4527:(r,i,o)=>{"use strict";const a=o(1017);const l=o(7369);const u=o(7231);const c=o(1880);const h=o(2655);const p=o(2879);const d=process.platform==="win32";const m=/\.(?:com|exe)$/i;const g=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;const y=l((()=>p.satisfies(process.version,"^4.8.0 || ^5.7.0 || >= 6.0.0",true)))||false;function detectShebang(r){r.file=u(r);const i=r.file&&h(r.file);if(i){r.args.unshift(r.file);r.command=i;return u(r)}return r.file}function parseNonShell(r){if(!d){return r}const i=detectShebang(r);const o=!m.test(i);if(r.options.forceShell||o){const o=g.test(i);r.command=a.normalize(r.command);r.command=c.command(r.command);r.args=r.args.map((r=>c.argument(r,o)));const l=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${l}"`];r.command=process.env.comspec||"cmd.exe";r.options.windowsVerbatimArguments=true}return r}function parseShell(r){if(y){return r}const i=[r.command].concat(r.args).join(" ");if(d){r.command=typeof r.options.shell==="string"?r.options.shell:process.env.comspec||"cmd.exe";r.args=["/d","/s","/c",`"${i}"`];r.options.windowsVerbatimArguments=true}else{if(typeof r.options.shell==="string"){r.command=r.options.shell}else if(process.platform==="android"){r.command="/system/bin/sh"}else{r.command="/bin/sh"}r.args=["-c",i]}return r}function parse(r,i,o){if(i&&!Array.isArray(i)){o=i;i=null}i=i?i.slice(0):[];o=Object.assign({},o);const a={command:r,args:i,options:o,file:undefined,original:{command:r,args:i}};return o.shell?parseShell(a):parseNonShell(a)}r.exports=parse},1880:r=>{"use strict";const i=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(r){r=r.replace(i,"^$1");return r}function escapeArgument(r,o){r=`${r}`;r=r.replace(/(\\*)"/g,'$1$1\\"');r=r.replace(/(\\*)$/,"$1$1");r=`"${r}"`;r=r.replace(i,"^$1");if(o){r=r.replace(i,"^$1")}return r}r.exports.command=escapeCommand;r.exports.argument=escapeArgument},2655:(r,i,o)=>{"use strict";const a=o(7147);const l=o(4970);function readShebang(r){const i=150;let o;if(Buffer.alloc){o=Buffer.alloc(i)}else{o=new Buffer(i);o.fill(0)}let u;try{u=a.openSync(r,"r");a.readSync(u,o,0,i,0);a.closeSync(u)}catch(r){}return l(o.toString())}r.exports=readShebang},7231:(r,i,o)=>{"use strict";const a=o(1017);const l=o(8201);const u=o(2170)();function resolveCommandAttempt(r,i){const o=process.cwd();const c=r.options.cwd!=null;if(c){try{process.chdir(r.options.cwd)}catch(r){}}let h;try{h=l.sync(r.command,{path:(r.options.env||process.env)[u],pathExt:i?a.delimiter:undefined})}catch(r){}finally{process.chdir(o)}if(h){h=a.resolve(c?r.options.cwd:"",h)}return h}function resolveCommand(r){return resolveCommandAttempt(r)||resolveCommandAttempt(r,true)}r.exports=resolveCommand},9686:(r,i,o)=>{i.alphasort=alphasort;i.alphasorti=alphasorti;i.setopts=setopts;i.ownProp=ownProp;i.makeAbs=makeAbs;i.finish=finish;i.mark=mark;i.isIgnored=isIgnored;i.childrenIgnored=childrenIgnored;function ownProp(r,i){return Object.prototype.hasOwnProperty.call(r,i)}var a=o(1017);var l=o(9566);var u=o(1323);var c=l.Minimatch;function alphasorti(r,i){return r.toLowerCase().localeCompare(i.toLowerCase())}function alphasort(r,i){return r.localeCompare(i)}function setupIgnores(r,i){r.ignore=i.ignore||[];if(!Array.isArray(r.ignore))r.ignore=[r.ignore];if(r.ignore.length){r.ignore=r.ignore.map(ignoreMap)}}function ignoreMap(r){var i=null;if(r.slice(-3)==="/**"){var o=r.replace(/(\/\*\*)+$/,"");i=new c(o,{dot:true})}return{matcher:new c(r,{dot:true}),gmatcher:i}}function setopts(r,i,o){if(!o)o={};if(o.matchBase&&-1===i.indexOf("/")){if(o.noglobstar){throw new Error("base matching requires globstar")}i="**/"+i}r.silent=!!o.silent;r.pattern=i;r.strict=o.strict!==false;r.realpath=!!o.realpath;r.realpathCache=o.realpathCache||Object.create(null);r.follow=!!o.follow;r.dot=!!o.dot;r.mark=!!o.mark;r.nodir=!!o.nodir;if(r.nodir)r.mark=true;r.sync=!!o.sync;r.nounique=!!o.nounique;r.nonull=!!o.nonull;r.nosort=!!o.nosort;r.nocase=!!o.nocase;r.stat=!!o.stat;r.noprocess=!!o.noprocess;r.absolute=!!o.absolute;r.maxLength=o.maxLength||Infinity;r.cache=o.cache||Object.create(null);r.statCache=o.statCache||Object.create(null);r.symlinks=o.symlinks||Object.create(null);setupIgnores(r,o);r.changedCwd=false;var l=process.cwd();if(!ownProp(o,"cwd"))r.cwd=l;else{r.cwd=a.resolve(o.cwd);r.changedCwd=r.cwd!==l}r.root=o.root||a.resolve(r.cwd,"/");r.root=a.resolve(r.root);if(process.platform==="win32")r.root=r.root.replace(/\\/g,"/");r.cwdAbs=u(r.cwd)?r.cwd:makeAbs(r,r.cwd);if(process.platform==="win32")r.cwdAbs=r.cwdAbs.replace(/\\/g,"/");r.nomount=!!o.nomount;o.nonegate=true;o.nocomment=true;r.minimatch=new c(i,o);r.options=r.minimatch.options}function finish(r){var i=r.nounique;var o=i?[]:Object.create(null);for(var a=0,l=r.matches.length;a<l;a++){var u=r.matches[a];if(!u||Object.keys(u).length===0){if(r.nonull){var c=r.minimatch.globSet[a];if(i)o.push(c);else o[c]=true}}else{var h=Object.keys(u);if(i)o.push.apply(o,h);else h.forEach((function(r){o[r]=true}))}}if(!i)o=Object.keys(o);if(!r.nosort)o=o.sort(r.nocase?alphasorti:alphasort);if(r.mark){for(var a=0;a<o.length;a++){o[a]=r._mark(o[a])}if(r.nodir){o=o.filter((function(i){var o=!/\/$/.test(i);var a=r.cache[i]||r.cache[makeAbs(r,i)];if(o&&a)o=a!=="DIR"&&!Array.isArray(a);return o}))}}if(r.ignore.length)o=o.filter((function(i){return!isIgnored(r,i)}));r.found=o}function mark(r,i){var o=makeAbs(r,i);var a=r.cache[o];var l=i;if(a){var u=a==="DIR"||Array.isArray(a);var c=i.slice(-1)==="/";if(u&&!c)l+="/";else if(!u&&c)l=l.slice(0,-1);if(l!==i){var h=makeAbs(r,l);r.statCache[h]=r.statCache[o];r.cache[h]=r.cache[o]}}return l}function makeAbs(r,i){var o=i;if(i.charAt(0)==="/"){o=a.join(r.root,i)}else if(u(i)||i===""){o=i}else if(r.changedCwd){o=a.resolve(r.cwd,i)}else{o=a.resolve(i)}if(process.platform==="win32")o=o.replace(/\\/g,"/");return o}function isIgnored(r,i){if(!r.ignore.length)return false;return r.ignore.some((function(r){return r.matcher.match(i)||!!(r.gmatcher&&r.gmatcher.match(i))}))}function childrenIgnored(r,i){if(!r.ignore.length)return false;return r.ignore.some((function(r){return!!(r.gmatcher&&r.gmatcher.match(i))}))}},1104:(r,i,o)=>{r.exports=glob;var a=o(7147);var l=o(8945);var u=o(9566);var c=u.Minimatch;var h=o(6919);var p=o(2361).EventEmitter;var d=o(1017);var m=o(9491);var g=o(1323);var y=o(2231);var v=o(9686);var b=v.alphasort;var w=v.alphasorti;var M=v.setopts;var D=v.ownProp;var T=o(9442);var x=o(3837);var O=v.childrenIgnored;var N=v.isIgnored;var _=o(7197);function glob(r,i,o){if(typeof i==="function")o=i,i={};if(!i)i={};if(i.sync){if(o)throw new TypeError("callback provided to sync glob");return y(r,i)}return new Glob(r,i,o)}glob.sync=y;var A=glob.GlobSync=y.GlobSync;glob.glob=glob;function extend(r,i){if(i===null||typeof i!=="object"){return r}var o=Object.keys(i);var a=o.length;while(a--){r[o[a]]=i[o[a]]}return r}glob.hasMagic=function(r,i){var o=extend({},i);o.noprocess=true;var a=new Glob(r,o);var l=a.minimatch.set;if(!r)return false;if(l.length>1)return true;for(var u=0;u<l[0].length;u++){if(typeof l[0][u]!=="string")return true}return false};glob.Glob=Glob;h(Glob,p);function Glob(r,i,o){if(typeof i==="function"){o=i;i=null}if(i&&i.sync){if(o)throw new TypeError("callback provided to sync glob");return new A(r,i)}if(!(this instanceof Glob))return new Glob(r,i,o);M(this,r,i);this._didRealPath=false;var a=this.minimatch.set.length;this.matches=new Array(a);if(typeof o==="function"){o=_(o);this.on("error",o);this.on("end",(function(r){o(null,r)}))}var l=this;this._processing=0;this._emitQueue=[];this._processQueue=[];this.paused=false;if(this.noprocess)return this;if(a===0)return done();var u=true;for(var c=0;c<a;c++){this._process(this.minimatch.set[c],c,false,done)}u=false;function done(){--l._processing;if(l._processing<=0){if(u){process.nextTick((function(){l._finish()}))}else{l._finish()}}}}Glob.prototype._finish=function(){m(this instanceof Glob);if(this.aborted)return;if(this.realpath&&!this._didRealpath)return this._realpath();v.finish(this);this.emit("end",this.found)};Glob.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=true;var r=this.matches.length;if(r===0)return this._finish();var i=this;for(var o=0;o<this.matches.length;o++)this._realpathSet(o,next);function next(){if(--r===0)i._finish()}};Glob.prototype._realpathSet=function(r,i){var o=this.matches[r];if(!o)return i();var a=Object.keys(o);var u=this;var c=a.length;if(c===0)return i();var h=this.matches[r]=Object.create(null);a.forEach((function(o,a){o=u._makeAbs(o);l.realpath(o,u.realpathCache,(function(a,l){if(!a)h[l]=true;else if(a.syscall==="stat")h[o]=true;else u.emit("error",a);if(--c===0){u.matches[r]=h;i()}}))}))};Glob.prototype._mark=function(r){return v.mark(this,r)};Glob.prototype._makeAbs=function(r){return v.makeAbs(this,r)};Glob.prototype.abort=function(){this.aborted=true;this.emit("abort")};Glob.prototype.pause=function(){if(!this.paused){this.paused=true;this.emit("pause")}};Glob.prototype.resume=function(){if(this.paused){this.emit("resume");this.paused=false;if(this._emitQueue.length){var r=this._emitQueue.slice(0);this._emitQueue.length=0;for(var i=0;i<r.length;i++){var o=r[i];this._emitMatch(o[0],o[1])}}if(this._processQueue.length){var a=this._processQueue.slice(0);this._processQueue.length=0;for(var i=0;i<a.length;i++){var l=a[i];this._processing--;this._process(l[0],l[1],l[2],l[3])}}}};Glob.prototype._process=function(r,i,o,a){m(this instanceof Glob);m(typeof a==="function");if(this.aborted)return;this._processing++;if(this.paused){this._processQueue.push([r,i,o,a]);return}var l=0;while(typeof r[l]==="string"){l++}var c;switch(l){case r.length:this._processSimple(r.join("/"),i,a);return;case 0:c=null;break;default:c=r.slice(0,l).join("/");break}var h=r.slice(l);var p;if(c===null)p=".";else if(g(c)||g(r.join("/"))){if(!c||!g(c))c="/"+c;p=c}else p=c;var d=this._makeAbs(p);if(O(this,p))return a();var y=h[0]===u.GLOBSTAR;if(y)this._processGlobStar(c,p,d,h,i,o,a);else this._processReaddir(c,p,d,h,i,o,a)};Glob.prototype._processReaddir=function(r,i,o,a,l,u,c){var h=this;this._readdir(o,u,(function(p,d){return h._processReaddir2(r,i,o,a,l,u,d,c)}))};Glob.prototype._processReaddir2=function(r,i,o,a,l,u,c,h){if(!c)return h();var p=a[0];var m=!!this.minimatch.negate;var g=p._glob;var y=this.dot||g.charAt(0)===".";var v=[];for(var b=0;b<c.length;b++){var w=c[b];if(w.charAt(0)!=="."||y){var M;if(m&&!r){M=!w.match(p)}else{M=w.match(p)}if(M)v.push(w)}}var D=v.length;if(D===0)return h();if(a.length===1&&!this.mark&&!this.stat){if(!this.matches[l])this.matches[l]=Object.create(null);for(var b=0;b<D;b++){var w=v[b];if(r){if(r!=="/")w=r+"/"+w;else w=r+w}if(w.charAt(0)==="/"&&!this.nomount){w=d.join(this.root,w)}this._emitMatch(l,w)}return h()}a.shift();for(var b=0;b<D;b++){var w=v[b];var T;if(r){if(r!=="/")w=r+"/"+w;else w=r+w}this._process([w].concat(a),l,u,h)}h()};Glob.prototype._emitMatch=function(r,i){if(this.aborted)return;if(N(this,i))return;if(this.paused){this._emitQueue.push([r,i]);return}var o=g(i)?i:this._makeAbs(i);if(this.mark)i=this._mark(i);if(this.absolute)i=o;if(this.matches[r][i])return;if(this.nodir){var a=this.cache[o];if(a==="DIR"||Array.isArray(a))return}this.matches[r][i]=true;var l=this.statCache[o];if(l)this.emit("stat",i,l);this.emit("match",i)};Glob.prototype._readdirInGlobStar=function(r,i){if(this.aborted)return;if(this.follow)return this._readdir(r,false,i);var o="lstat\0"+r;var l=this;var u=T(o,lstatcb_);if(u)a.lstat(r,u);function lstatcb_(o,a){if(o&&o.code==="ENOENT")return i();var u=a&&a.isSymbolicLink();l.symlinks[r]=u;if(!u&&a&&!a.isDirectory()){l.cache[r]="FILE";i()}else l._readdir(r,false,i)}};Glob.prototype._readdir=function(r,i,o){if(this.aborted)return;o=T("readdir\0"+r+"\0"+i,o);if(!o)return;if(i&&!D(this.symlinks,r))return this._readdirInGlobStar(r,o);if(D(this.cache,r)){var l=this.cache[r];if(!l||l==="FILE")return o();if(Array.isArray(l))return o(null,l)}var u=this;a.readdir(r,readdirCb(this,r,o))};function readdirCb(r,i,o){return function(a,l){if(a)r._readdirError(i,a,o);else r._readdirEntries(i,l,o)}}Glob.prototype._readdirEntries=function(r,i,o){if(this.aborted)return;if(!this.mark&&!this.stat){for(var a=0;a<i.length;a++){var l=i[a];if(r==="/")l=r+l;else l=r+"/"+l;this.cache[l]=true}}this.cache[r]=i;return o(null,i)};Glob.prototype._readdirError=function(r,i,o){if(this.aborted)return;switch(i.code){case"ENOTSUP":case"ENOTDIR":var a=this._makeAbs(r);this.cache[a]="FILE";if(a===this.cwdAbs){var l=new Error(i.code+" invalid cwd "+this.cwd);l.path=this.cwd;l.code=i.code;this.emit("error",l);this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(r)]=false;break;default:this.cache[this._makeAbs(r)]=false;if(this.strict){this.emit("error",i);this.abort()}if(!this.silent)console.error("glob error",i);break}return o()};Glob.prototype._processGlobStar=function(r,i,o,a,l,u,c){var h=this;this._readdir(o,u,(function(p,d){h._processGlobStar2(r,i,o,a,l,u,d,c)}))};Glob.prototype._processGlobStar2=function(r,i,o,a,l,u,c,h){if(!c)return h();var p=a.slice(1);var d=r?[r]:[];var m=d.concat(p);this._process(m,l,false,h);var g=this.symlinks[o];var y=c.length;if(g&&u)return h();for(var v=0;v<y;v++){var b=c[v];if(b.charAt(0)==="."&&!this.dot)continue;var w=d.concat(c[v],p);this._process(w,l,true,h);var M=d.concat(c[v],a);this._process(M,l,true,h)}h()};Glob.prototype._processSimple=function(r,i,o){var a=this;this._stat(r,(function(l,u){a._processSimple2(r,i,l,u,o)}))};Glob.prototype._processSimple2=function(r,i,o,a,l){if(!this.matches[i])this.matches[i]=Object.create(null);if(!a)return l();if(r&&g(r)&&!this.nomount){var u=/[\/\\]$/.test(r);if(r.charAt(0)==="/"){r=d.join(this.root,r)}else{r=d.resolve(this.root,r);if(u)r+="/"}}if(process.platform==="win32")r=r.replace(/\\/g,"/");this._emitMatch(i,r);l()};Glob.prototype._stat=function(r,i){var o=this._makeAbs(r);var l=r.slice(-1)==="/";if(r.length>this.maxLength)return i();if(!this.stat&&D(this.cache,o)){var u=this.cache[o];if(Array.isArray(u))u="DIR";if(!l||u==="DIR")return i(null,u);if(l&&u==="FILE")return i()}var c;var h=this.statCache[o];if(h!==undefined){if(h===false)return i(null,h);else{var p=h.isDirectory()?"DIR":"FILE";if(l&&p==="FILE")return i();else return i(null,p,h)}}var d=this;var m=T("stat\0"+o,lstatcb_);if(m)a.lstat(o,m);function lstatcb_(l,u){if(u&&u.isSymbolicLink()){return a.stat(o,(function(a,l){if(a)d._stat2(r,o,null,u,i);else d._stat2(r,o,a,l,i)}))}else{d._stat2(r,o,l,u,i)}}};Glob.prototype._stat2=function(r,i,o,a,l){if(o&&(o.code==="ENOENT"||o.code==="ENOTDIR")){this.statCache[i]=false;return l()}var u=r.slice(-1)==="/";this.statCache[i]=a;if(i.slice(-1)==="/"&&a&&!a.isDirectory())return l(null,false,a);var c=true;if(a)c=a.isDirectory()?"DIR":"FILE";this.cache[i]=this.cache[i]||c;if(u&&c==="FILE")return l();return l(null,c,a)}},2231:(r,i,o)=>{r.exports=globSync;globSync.GlobSync=GlobSync;var a=o(7147);var l=o(8945);var u=o(9566);var c=u.Minimatch;var h=o(1104).Glob;var p=o(3837);var d=o(1017);var m=o(9491);var g=o(1323);var y=o(9686);var v=y.alphasort;var b=y.alphasorti;var w=y.setopts;var M=y.ownProp;var D=y.childrenIgnored;var T=y.isIgnored;function globSync(r,i){if(typeof i==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");return new GlobSync(r,i).found}function GlobSync(r,i){if(!r)throw new Error("must provide pattern");if(typeof i==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof GlobSync))return new GlobSync(r,i);w(this,r,i);if(this.noprocess)return this;var o=this.minimatch.set.length;this.matches=new Array(o);for(var a=0;a<o;a++){this._process(this.minimatch.set[a],a,false)}this._finish()}GlobSync.prototype._finish=function(){m(this instanceof GlobSync);if(this.realpath){var r=this;this.matches.forEach((function(i,o){var a=r.matches[o]=Object.create(null);for(var u in i){try{u=r._makeAbs(u);var c=l.realpathSync(u,r.realpathCache);a[c]=true}catch(i){if(i.syscall==="stat")a[r._makeAbs(u)]=true;else throw i}}}))}y.finish(this)};GlobSync.prototype._process=function(r,i,o){m(this instanceof GlobSync);var a=0;while(typeof r[a]==="string"){a++}var l;switch(a){case r.length:this._processSimple(r.join("/"),i);return;case 0:l=null;break;default:l=r.slice(0,a).join("/");break}var c=r.slice(a);var h;if(l===null)h=".";else if(g(l)||g(r.join("/"))){if(!l||!g(l))l="/"+l;h=l}else h=l;var p=this._makeAbs(h);if(D(this,h))return;var d=c[0]===u.GLOBSTAR;if(d)this._processGlobStar(l,h,p,c,i,o);else this._processReaddir(l,h,p,c,i,o)};GlobSync.prototype._processReaddir=function(r,i,o,a,l,u){var c=this._readdir(o,u);if(!c)return;var h=a[0];var p=!!this.minimatch.negate;var m=h._glob;var g=this.dot||m.charAt(0)===".";var y=[];for(var v=0;v<c.length;v++){var b=c[v];if(b.charAt(0)!=="."||g){var w;if(p&&!r){w=!b.match(h)}else{w=b.match(h)}if(w)y.push(b)}}var M=y.length;if(M===0)return;if(a.length===1&&!this.mark&&!this.stat){if(!this.matches[l])this.matches[l]=Object.create(null);for(var v=0;v<M;v++){var b=y[v];if(r){if(r.slice(-1)!=="/")b=r+"/"+b;else b=r+b}if(b.charAt(0)==="/"&&!this.nomount){b=d.join(this.root,b)}this._emitMatch(l,b)}return}a.shift();for(var v=0;v<M;v++){var b=y[v];var D;if(r)D=[r,b];else D=[b];this._process(D.concat(a),l,u)}};GlobSync.prototype._emitMatch=function(r,i){if(T(this,i))return;var o=this._makeAbs(i);if(this.mark)i=this._mark(i);if(this.absolute){i=o}if(this.matches[r][i])return;if(this.nodir){var a=this.cache[o];if(a==="DIR"||Array.isArray(a))return}this.matches[r][i]=true;if(this.stat)this._stat(i)};GlobSync.prototype._readdirInGlobStar=function(r){if(this.follow)return this._readdir(r,false);var i;var o;var l;try{o=a.lstatSync(r)}catch(r){if(r.code==="ENOENT"){return null}}var u=o&&o.isSymbolicLink();this.symlinks[r]=u;if(!u&&o&&!o.isDirectory())this.cache[r]="FILE";else i=this._readdir(r,false);return i};GlobSync.prototype._readdir=function(r,i){var o;if(i&&!M(this.symlinks,r))return this._readdirInGlobStar(r);if(M(this.cache,r)){var l=this.cache[r];if(!l||l==="FILE")return null;if(Array.isArray(l))return l}try{return this._readdirEntries(r,a.readdirSync(r))}catch(i){this._readdirError(r,i);return null}};GlobSync.prototype._readdirEntries=function(r,i){if(!this.mark&&!this.stat){for(var o=0;o<i.length;o++){var a=i[o];if(r==="/")a=r+a;else a=r+"/"+a;this.cache[a]=true}}this.cache[r]=i;return i};GlobSync.prototype._readdirError=function(r,i){switch(i.code){case"ENOTSUP":case"ENOTDIR":var o=this._makeAbs(r);this.cache[o]="FILE";if(o===this.cwdAbs){var a=new Error(i.code+" invalid cwd "+this.cwd);a.path=this.cwd;a.code=i.code;throw a}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(r)]=false;break;default:this.cache[this._makeAbs(r)]=false;if(this.strict)throw i;if(!this.silent)console.error("glob error",i);break}};GlobSync.prototype._processGlobStar=function(r,i,o,a,l,u){var c=this._readdir(o,u);if(!c)return;var h=a.slice(1);var p=r?[r]:[];var d=p.concat(h);this._process(d,l,false);var m=c.length;var g=this.symlinks[o];if(g&&u)return;for(var y=0;y<m;y++){var v=c[y];if(v.charAt(0)==="."&&!this.dot)continue;var b=p.concat(c[y],h);this._process(b,l,true);var w=p.concat(c[y],a);this._process(w,l,true)}};GlobSync.prototype._processSimple=function(r,i){var o=this._stat(r);if(!this.matches[i])this.matches[i]=Object.create(null);if(!o)return;if(r&&g(r)&&!this.nomount){var a=/[\/\\]$/.test(r);if(r.charAt(0)==="/"){r=d.join(this.root,r)}else{r=d.resolve(this.root,r);if(a)r+="/"}}if(process.platform==="win32")r=r.replace(/\\/g,"/");this._emitMatch(i,r)};GlobSync.prototype._stat=function(r){var i=this._makeAbs(r);var o=r.slice(-1)==="/";if(r.length>this.maxLength)return false;if(!this.stat&&M(this.cache,i)){var l=this.cache[i];if(Array.isArray(l))l="DIR";if(!o||l==="DIR")return l;if(o&&l==="FILE")return false}var u;var c=this.statCache[i];if(!c){var h;try{h=a.lstatSync(i)}catch(r){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[i]=false;return false}}if(h&&h.isSymbolicLink()){try{c=a.statSync(i)}catch(r){c=h}}else{c=h}}this.statCache[i]=c;var l=true;if(c)l=c.isDirectory()?"DIR":"FILE";this.cache[i]=this.cache[i]||l;if(o&&l==="FILE")return false;return l};GlobSync.prototype._mark=function(r){return y.mark(this,r)};GlobSync.prototype._makeAbs=function(r){return y.makeAbs(this,r)}},2879:(r,i)=>{i=r.exports=SemVer;var o;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){o=function(){var r=Array.prototype.slice.call(arguments,0);r.unshift("SEMVER");console.log.apply(console,r)}}else{o=function(){}}i.SEMVER_SPEC_VERSION="2.0.0";var a=256;var l=Number.MAX_SAFE_INTEGER||9007199254740991;var u=16;var c=i.re=[];var h=i.src=[];var p=0;var d=p++;h[d]="0|[1-9]\\d*";var m=p++;h[m]="[0-9]+";var g=p++;h[g]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var y=p++;h[y]="("+h[d]+")\\."+"("+h[d]+")\\."+"("+h[d]+")";var v=p++;h[v]="("+h[m]+")\\."+"("+h[m]+")\\."+"("+h[m]+")";var b=p++;h[b]="(?:"+h[d]+"|"+h[g]+")";var w=p++;h[w]="(?:"+h[m]+"|"+h[g]+")";var M=p++;h[M]="(?:-("+h[b]+"(?:\\."+h[b]+")*))";var D=p++;h[D]="(?:-?("+h[w]+"(?:\\."+h[w]+")*))";var T=p++;h[T]="[0-9A-Za-z-]+";var x=p++;h[x]="(?:\\+("+h[T]+"(?:\\."+h[T]+")*))";var O=p++;var N="v?"+h[y]+h[M]+"?"+h[x]+"?";h[O]="^"+N+"$";var _="[v=\\s]*"+h[v]+h[D]+"?"+h[x]+"?";var A=p++;h[A]="^"+_+"$";var S=p++;h[S]="((?:<|>)?=?)";var I=p++;h[I]=h[m]+"|x|X|\\*";var C=p++;h[C]=h[d]+"|x|X|\\*";var L=p++;h[L]="[v=\\s]*("+h[C]+")"+"(?:\\.("+h[C]+")"+"(?:\\.("+h[C]+")"+"(?:"+h[M]+")?"+h[x]+"?"+")?)?";var P=p++;h[P]="[v=\\s]*("+h[I]+")"+"(?:\\.("+h[I]+")"+"(?:\\.("+h[I]+")"+"(?:"+h[D]+")?"+h[x]+"?"+")?)?";var X=p++;h[X]="^"+h[S]+"\\s*"+h[L]+"$";var j=p++;h[j]="^"+h[S]+"\\s*"+h[P]+"$";var k=p++;h[k]="(?:^|[^\\d])"+"(\\d{1,"+u+"})"+"(?:\\.(\\d{1,"+u+"}))?"+"(?:\\.(\\d{1,"+u+"}))?"+"(?:$|[^\\d])";var R=p++;h[R]="(?:~>?)";var B=p++;h[B]="(\\s*)"+h[R]+"\\s+";c[B]=new RegExp(h[B],"g");var $="$1~";var U=p++;h[U]="^"+h[R]+h[L]+"$";var V=p++;h[V]="^"+h[R]+h[P]+"$";var G=p++;h[G]="(?:\\^)";var W=p++;h[W]="(\\s*)"+h[G]+"\\s+";c[W]=new RegExp(h[W],"g");var q="$1^";var H=p++;h[H]="^"+h[G]+h[L]+"$";var Y=p++;h[Y]="^"+h[G]+h[P]+"$";var z=p++;h[z]="^"+h[S]+"\\s*("+_+")$|^$";var K=p++;h[K]="^"+h[S]+"\\s*("+N+")$|^$";var Q=p++;h[Q]="(\\s*)"+h[S]+"\\s*("+_+"|"+h[L]+")";c[Q]=new RegExp(h[Q],"g");var Z="$1$2$3";var J=p++;h[J]="^\\s*("+h[L]+")"+"\\s+-\\s+"+"("+h[L]+")"+"\\s*$";var tt=p++;h[tt]="^\\s*("+h[P]+")"+"\\s+-\\s+"+"("+h[P]+")"+"\\s*$";var et=p++;h[et]="(<|>)?=?\\s*\\*";for(var rt=0;rt<p;rt++){o(rt,h[rt]);if(!c[rt]){c[rt]=new RegExp(h[rt])}}i.parse=parse;function parse(r,i){if(!i||typeof i!=="object"){i={loose:!!i,includePrerelease:false}}if(r instanceof SemVer){return r}if(typeof r!=="string"){return null}if(r.length>a){return null}var o=i.loose?c[A]:c[O];if(!o.test(r)){return null}try{return new SemVer(r,i)}catch(r){return null}}i.valid=valid;function valid(r,i){var o=parse(r,i);return o?o.version:null}i.clean=clean;function clean(r,i){var o=parse(r.trim().replace(/^[=v]+/,""),i);return o?o.version:null}i.SemVer=SemVer;function SemVer(r,i){if(!i||typeof i!=="object"){i={loose:!!i,includePrerelease:false}}if(r instanceof SemVer){if(r.loose===i.loose){return r}else{r=r.version}}else if(typeof r!=="string"){throw new TypeError("Invalid Version: "+r)}if(r.length>a){throw new TypeError("version is longer than "+a+" characters")}if(!(this instanceof SemVer)){return new SemVer(r,i)}o("SemVer",r,i);this.options=i;this.loose=!!i.loose;var u=r.trim().match(i.loose?c[A]:c[O]);if(!u){throw new TypeError("Invalid Version: "+r)}this.raw=r;this.major=+u[1];this.minor=+u[2];this.patch=+u[3];if(this.major>l||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>l||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>l||this.patch<0){throw new TypeError("Invalid patch version")}if(!u[4]){this.prerelease=[]}else{this.prerelease=u[4].split(".").map((function(r){if(/^[0-9]+$/.test(r)){var i=+r;if(i>=0&&i<l){return i}}return r}))}this.build=u[5]?u[5].split("."):[];this.format()}SemVer.prototype.format=function(){this.version=this.major+"."+this.minor+"."+this.patch;if(this.prerelease.length){this.version+="-"+this.prerelease.join(".")}return this.version};SemVer.prototype.toString=function(){return this.version};SemVer.prototype.compare=function(r){o("SemVer.compare",this.version,this.options,r);if(!(r instanceof SemVer)){r=new SemVer(r,this.options)}return this.compareMain(r)||this.comparePre(r)};SemVer.prototype.compareMain=function(r){if(!(r instanceof SemVer)){r=new SemVer(r,this.options)}return compareIdentifiers(this.major,r.major)||compareIdentifiers(this.minor,r.minor)||compareIdentifiers(this.patch,r.patch)};SemVer.prototype.comparePre=function(r){if(!(r instanceof SemVer)){r=new SemVer(r,this.options)}if(this.prerelease.length&&!r.prerelease.length){return-1}else if(!this.prerelease.length&&r.prerelease.length){return 1}else if(!this.prerelease.length&&!r.prerelease.length){return 0}var i=0;do{var a=this.prerelease[i];var l=r.prerelease[i];o("prerelease compare",i,a,l);if(a===undefined&&l===undefined){return 0}else if(l===undefined){return 1}else if(a===undefined){return-1}else if(a===l){continue}else{return compareIdentifiers(a,l)}}while(++i)};SemVer.prototype.inc=function(r,i){switch(r){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",i);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",i);break;case"prepatch":this.prerelease.length=0;this.inc("patch",i);this.inc("pre",i);break;case"prerelease":if(this.prerelease.length===0){this.inc("patch",i)}this.inc("pre",i);break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0){this.major++}this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0){this.minor++}this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0){this.patch++}this.prerelease=[];break;case"pre":if(this.prerelease.length===0){this.prerelease=[0]}else{var o=this.prerelease.length;while(--o>=0){if(typeof this.prerelease[o]==="number"){this.prerelease[o]++;o=-2}}if(o===-1){this.prerelease.push(0)}}if(i){if(this.prerelease[0]===i){if(isNaN(this.prerelease[1])){this.prerelease=[i,0]}}else{this.prerelease=[i,0]}}break;default:throw new Error("invalid increment argument: "+r)}this.format();this.raw=this.version;return this};i.inc=inc;function inc(r,i,o,a){if(typeof o==="string"){a=o;o=undefined}try{return new SemVer(r,o).inc(i,a).version}catch(r){return null}}i.diff=diff;function diff(r,i){if(eq(r,i)){return null}else{var o=parse(r);var a=parse(i);var l="";if(o.prerelease.length||a.prerelease.length){l="pre";var u="prerelease"}for(var c in o){if(c==="major"||c==="minor"||c==="patch"){if(o[c]!==a[c]){return l+c}}}return u}}i.compareIdentifiers=compareIdentifiers;var it=/^[0-9]+$/;function compareIdentifiers(r,i){var o=it.test(r);var a=it.test(i);if(o&&a){r=+r;i=+i}return r===i?0:o&&!a?-1:a&&!o?1:r<i?-1:1}i.rcompareIdentifiers=rcompareIdentifiers;function rcompareIdentifiers(r,i){return compareIdentifiers(i,r)}i.major=major;function major(r,i){return new SemVer(r,i).major}i.minor=minor;function minor(r,i){return new SemVer(r,i).minor}i.patch=patch;function patch(r,i){return new SemVer(r,i).patch}i.compare=compare;function compare(r,i,o){return new SemVer(r,o).compare(new SemVer(i,o))}i.compareLoose=compareLoose;function compareLoose(r,i){return compare(r,i,true)}i.rcompare=rcompare;function rcompare(r,i,o){return compare(i,r,o)}i.sort=sort;function sort(r,o){return r.sort((function(r,a){return i.compare(r,a,o)}))}i.rsort=rsort;function rsort(r,o){return r.sort((function(r,a){return i.rcompare(r,a,o)}))}i.gt=gt;function gt(r,i,o){return compare(r,i,o)>0}i.lt=lt;function lt(r,i,o){return compare(r,i,o)<0}i.eq=eq;function eq(r,i,o){return compare(r,i,o)===0}i.neq=neq;function neq(r,i,o){return compare(r,i,o)!==0}i.gte=gte;function gte(r,i,o){return compare(r,i,o)>=0}i.lte=lte;function lte(r,i,o){return compare(r,i,o)<=0}i.cmp=cmp;function cmp(r,i,o,a){switch(i){case"===":if(typeof r==="object")r=r.version;if(typeof o==="object")o=o.version;return r===o;case"!==":if(typeof r==="object")r=r.version;if(typeof o==="object")o=o.version;return r!==o;case"":case"=":case"==":return eq(r,o,a);case"!=":return neq(r,o,a);case">":return gt(r,o,a);case">=":return gte(r,o,a);case"<":return lt(r,o,a);case"<=":return lte(r,o,a);default:throw new TypeError("Invalid operator: "+i)}}i.Comparator=Comparator;function Comparator(r,i){if(!i||typeof i!=="object"){i={loose:!!i,includePrerelease:false}}if(r instanceof Comparator){if(r.loose===!!i.loose){return r}else{r=r.value}}if(!(this instanceof Comparator)){return new Comparator(r,i)}o("comparator",r,i);this.options=i;this.loose=!!i.loose;this.parse(r);if(this.semver===nt){this.value=""}else{this.value=this.operator+this.semver.version}o("comp",this)}var nt={};Comparator.prototype.parse=function(r){var i=this.options.loose?c[z]:c[K];var o=r.match(i);if(!o){throw new TypeError("Invalid comparator: "+r)}this.operator=o[1];if(this.operator==="="){this.operator=""}if(!o[2]){this.semver=nt}else{this.semver=new SemVer(o[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(r){o("Comparator.test",r,this.options.loose);if(this.semver===nt){return true}if(typeof r==="string"){r=new SemVer(r,this.options)}return cmp(r,this.operator,this.semver,this.options)};Comparator.prototype.intersects=function(r,i){if(!(r instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!i||typeof i!=="object"){i={loose:!!i,includePrerelease:false}}var o;if(this.operator===""){o=new Range(r.value,i);return satisfies(this.value,o,i)}else if(r.operator===""){o=new Range(this.value,i);return satisfies(r.semver,o,i)}var a=(this.operator===">="||this.operator===">")&&(r.operator===">="||r.operator===">");var l=(this.operator==="<="||this.operator==="<")&&(r.operator==="<="||r.operator==="<");var u=this.semver.version===r.semver.version;var c=(this.operator===">="||this.operator==="<=")&&(r.operator===">="||r.operator==="<=");var h=cmp(this.semver,"<",r.semver,i)&&((this.operator===">="||this.operator===">")&&(r.operator==="<="||r.operator==="<"));var p=cmp(this.semver,">",r.semver,i)&&((this.operator==="<="||this.operator==="<")&&(r.operator===">="||r.operator===">"));return a||l||u&&c||h||p};i.Range=Range;function Range(r,i){if(!i||typeof i!=="object"){i={loose:!!i,includePrerelease:false}}if(r instanceof Range){if(r.loose===!!i.loose&&r.includePrerelease===!!i.includePrerelease){return r}else{return new Range(r.raw,i)}}if(r instanceof Comparator){return new Range(r.value,i)}if(!(this instanceof Range)){return new Range(r,i)}this.options=i;this.loose=!!i.loose;this.includePrerelease=!!i.includePrerelease;this.raw=r;this.set=r.split(/\s*\|\|\s*/).map((function(r){return this.parseRange(r.trim())}),this).filter((function(r){return r.length}));if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+r)}this.format()}Range.prototype.format=function(){this.range=this.set.map((function(r){return r.join(" ").trim()})).join("||").trim();return this.range};Range.prototype.toString=function(){return this.range};Range.prototype.parseRange=function(r){var i=this.options.loose;r=r.trim();var a=i?c[tt]:c[J];r=r.replace(a,hyphenReplace);o("hyphen replace",r);r=r.replace(c[Q],Z);o("comparator trim",r,c[Q]);r=r.replace(c[B],$);r=r.replace(c[W],q);r=r.split(/\s+/).join(" ");var l=i?c[z]:c[K];var u=r.split(" ").map((function(r){return parseComparator(r,this.options)}),this).join(" ").split(/\s+/);if(this.options.loose){u=u.filter((function(r){return!!r.match(l)}))}u=u.map((function(r){return new Comparator(r,this.options)}),this);return u};Range.prototype.intersects=function(r,i){if(!(r instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((function(o){return o.every((function(o){return r.set.some((function(r){return r.every((function(r){return o.intersects(r,i)}))}))}))}))};i.toComparators=toComparators;function toComparators(r,i){return new Range(r,i).set.map((function(r){return r.map((function(r){return r.value})).join(" ").trim().split(" ")}))}function parseComparator(r,i){o("comp",r,i);r=replaceCarets(r,i);o("caret",r);r=replaceTildes(r,i);o("tildes",r);r=replaceXRanges(r,i);o("xrange",r);r=replaceStars(r,i);o("stars",r);return r}function isX(r){return!r||r.toLowerCase()==="x"||r==="*"}function replaceTildes(r,i){return r.trim().split(/\s+/).map((function(r){return replaceTilde(r,i)})).join(" ")}function replaceTilde(r,i){var a=i.loose?c[V]:c[U];return r.replace(a,(function(i,a,l,u,c){o("tilde",r,i,a,l,u,c);var h;if(isX(a)){h=""}else if(isX(l)){h=">="+a+".0.0 <"+(+a+1)+".0.0"}else if(isX(u)){h=">="+a+"."+l+".0 <"+a+"."+(+l+1)+".0"}else if(c){o("replaceTilde pr",c);h=">="+a+"."+l+"."+u+"-"+c+" <"+a+"."+(+l+1)+".0"}else{h=">="+a+"."+l+"."+u+" <"+a+"."+(+l+1)+".0"}o("tilde return",h);return h}))}function replaceCarets(r,i){return r.trim().split(/\s+/).map((function(r){return replaceCaret(r,i)})).join(" ")}function replaceCaret(r,i){o("caret",r,i);var a=i.loose?c[Y]:c[H];return r.replace(a,(function(i,a,l,u,c){o("caret",r,i,a,l,u,c);var h;if(isX(a)){h=""}else if(isX(l)){h=">="+a+".0.0 <"+(+a+1)+".0.0"}else if(isX(u)){if(a==="0"){h=">="+a+"."+l+".0 <"+a+"."+(+l+1)+".0"}else{h=">="+a+"."+l+".0 <"+(+a+1)+".0.0"}}else if(c){o("replaceCaret pr",c);if(a==="0"){if(l==="0"){h=">="+a+"."+l+"."+u+"-"+c+" <"+a+"."+l+"."+(+u+1)}else{h=">="+a+"."+l+"."+u+"-"+c+" <"+a+"."+(+l+1)+".0"}}else{h=">="+a+"."+l+"."+u+"-"+c+" <"+(+a+1)+".0.0"}}else{o("no pr");if(a==="0"){if(l==="0"){h=">="+a+"."+l+"."+u+" <"+a+"."+l+"."+(+u+1)}else{h=">="+a+"."+l+"."+u+" <"+a+"."+(+l+1)+".0"}}else{h=">="+a+"."+l+"."+u+" <"+(+a+1)+".0.0"}}o("caret return",h);return h}))}function replaceXRanges(r,i){o("replaceXRanges",r,i);return r.split(/\s+/).map((function(r){return replaceXRange(r,i)})).join(" ")}function replaceXRange(r,i){r=r.trim();var a=i.loose?c[j]:c[X];return r.replace(a,(function(i,a,l,u,c,h){o("xRange",r,i,a,l,u,c,h);var p=isX(l);var d=p||isX(u);var m=d||isX(c);var g=m;if(a==="="&&g){a=""}if(p){if(a===">"||a==="<"){i="<0.0.0"}else{i="*"}}else if(a&&g){if(d){u=0}c=0;if(a===">"){a=">=";if(d){l=+l+1;u=0;c=0}else{u=+u+1;c=0}}else if(a==="<="){a="<";if(d){l=+l+1}else{u=+u+1}}i=a+l+"."+u+"."+c}else if(d){i=">="+l+".0.0 <"+(+l+1)+".0.0"}else if(m){i=">="+l+"."+u+".0 <"+l+"."+(+u+1)+".0"}o("xRange return",i);return i}))}function replaceStars(r,i){o("replaceStars",r,i);return r.trim().replace(c[et],"")}function hyphenReplace(r,i,o,a,l,u,c,h,p,d,m,g,y){if(isX(o)){i=""}else if(isX(a)){i=">="+o+".0.0"}else if(isX(l)){i=">="+o+"."+a+".0"}else{i=">="+i}if(isX(p)){h=""}else if(isX(d)){h="<"+(+p+1)+".0.0"}else if(isX(m)){h="<"+p+"."+(+d+1)+".0"}else if(g){h="<="+p+"."+d+"."+m+"-"+g}else{h="<="+h}return(i+" "+h).trim()}Range.prototype.test=function(r){if(!r){return false}if(typeof r==="string"){r=new SemVer(r,this.options)}for(var i=0;i<this.set.length;i++){if(testSet(this.set[i],r,this.options)){return true}}return false};function testSet(r,i,a){for(var l=0;l<r.length;l++){if(!r[l].test(i)){return false}}if(i.prerelease.length&&!a.includePrerelease){for(l=0;l<r.length;l++){o(r[l].semver);if(r[l].semver===nt){continue}if(r[l].semver.prerelease.length>0){var u=r[l].semver;if(u.major===i.major&&u.minor===i.minor&&u.patch===i.patch){return true}}}return false}return true}i.satisfies=satisfies;function satisfies(r,i,o){try{i=new Range(i,o)}catch(r){return false}return i.test(r)}i.maxSatisfying=maxSatisfying;function maxSatisfying(r,i,o){var a=null;var l=null;try{var u=new Range(i,o)}catch(r){return null}r.forEach((function(r){if(u.test(r)){if(!a||l.compare(r)===-1){a=r;l=new SemVer(a,o)}}}));return a}i.minSatisfying=minSatisfying;function minSatisfying(r,i,o){var a=null;var l=null;try{var u=new Range(i,o)}catch(r){return null}r.forEach((function(r){if(u.test(r)){if(!a||l.compare(r)===1){a=r;l=new SemVer(a,o)}}}));return a}i.minVersion=minVersion;function minVersion(r,i){r=new Range(r,i);var o=new SemVer("0.0.0");if(r.test(o)){return o}o=new SemVer("0.0.0-0");if(r.test(o)){return o}o=null;for(var a=0;a<r.set.length;++a){var l=r.set[a];l.forEach((function(r){var i=new SemVer(r.semver.version);switch(r.operator){case">":if(i.prerelease.length===0){i.patch++}else{i.prerelease.push(0)}i.raw=i.format();case"":case">=":if(!o||gt(o,i)){o=i}break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+r.operator)}}))}if(o&&r.test(o)){return o}return null}i.validRange=validRange;function validRange(r,i){try{return new Range(r,i).range||"*"}catch(r){return null}}i.ltr=ltr;function ltr(r,i,o){return outside(r,i,"<",o)}i.gtr=gtr;function gtr(r,i,o){return outside(r,i,">",o)}i.outside=outside;function outside(r,i,o,a){r=new SemVer(r,a);i=new Range(i,a);var l,u,c,h,p;switch(o){case">":l=gt;u=lte;c=lt;h=">";p=">=";break;case"<":l=lt;u=gte;c=gt;h="<";p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(r,i,a)){return false}for(var d=0;d<i.set.length;++d){var m=i.set[d];var g=null;var y=null;m.forEach((function(r){if(r.semver===nt){r=new Comparator(">=0.0.0")}g=g||r;y=y||r;if(l(r.semver,g.semver,a)){g=r}else if(c(r.semver,y.semver,a)){y=r}}));if(g.operator===h||g.operator===p){return false}if((!y.operator||y.operator===h)&&u(r,y.semver)){return false}else if(y.operator===p&&c(r,y.semver)){return false}}return true}i.prerelease=prerelease;function prerelease(r,i){var o=parse(r,i);return o&&o.prerelease.length?o.prerelease:null}i.intersects=intersects;function intersects(r,i,o){r=new Range(r,o);i=new Range(i,o);return r.intersects(i)}i.coerce=coerce;function coerce(r){if(r instanceof SemVer){return r}if(typeof r!=="string"){return null}var i=r.match(c[k]);if(i==null){return null}return parse(i[1]+"."+(i[2]||"0")+"."+(i[3]||"0"))}},208:function(r,i,o){"use strict";var a=this&&this.__createBinding||(Object.create?function(r,i,o,a){if(a===undefined)a=o;var l=Object.getOwnPropertyDescriptor(i,o);if(!l||("get"in l?!i.__esModule:l.writable||l.configurable)){l={enumerable:true,get:function(){return i[o]}}}Object.defineProperty(r,a,l)}:function(r,i,o,a){if(a===undefined)a=o;r[a]=i[o]});var l=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var u=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var o in r)if(o!=="default"&&Object.prototype.hasOwnProperty.call(r,o))a(i,r,o);l(i,r);return i};var c=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:true});i.getConfigPath=i.getProjectIdAsync=i.getAsync=i.openAsync=i.getAdbOutputAsync=i.removeAsync=i.addAsync=i.isAvailable=void 0;const h=o(4513);const p=u(o(365));const d=o(8853);const m=c(o(1072));const g=c(o(8746));const y=o(7147);const v=c(o(1017));const b=o(3329);const w="Activity not started, unable to resolve Intent";const M="error: ";function isAvailable(r){return(0,y.existsSync)(v.default.join(r,"android/app/src/main/AndroidManifest.xml"))||(0,y.existsSync)(v.default.join(r,"app/src/main/AndroidManifest.xml"))}i.isAvailable=isAvailable;async function addAsync({dryRun:r,uri:i,manifestPath:o,projectRoot:a}){const l=o??getConfigPath(a);let u=await readConfigAsync(l);if(!p.ensureManifestHasValidIntentFilter(u)){throw new b.CommandError(`Cannot add scheme "${i}" because the provided manifest does not have a valid Activity with \`android:launchMode="singleTask"\`.\nThis guide can help you get setup properly https://expo.fyi/setup-android-uri-scheme`,"add")}if(p.hasScheme(i,u)){console.log(g.default.yellow(`› Android: URI scheme "${i}" already exists in AndroidManifest.xml at: ${l}`));return false}u=p.appendScheme(i,u);if(r){console.log(g.default.magenta("Write manifest to: ",l));console.log((0,d.format)(u));return false}await writeConfigAsync(l,u);return true}i.addAsync=addAsync;async function removeAsync({dryRun:r,uri:i,manifestPath:o,projectRoot:a}){const l=o??getConfigPath(a);let u=await readConfigAsync(l);if(!p.ensureManifestHasValidIntentFilter(u)){throw new b.CommandError(`Cannot remove scheme "${i}" because the provided manifest does not have a valid Activity with \`android:launchMode="singleTask"\`.\nThis guide can help you get setup properly https://expo.fyi/setup-android-uri-scheme`,"remove")}if(!p.hasScheme(i,u)){console.log(g.default.yellow(`› Android: URI scheme "${i}" does not exist in AndroidManifest.xml at: ${l}`));return false}u=p.removeScheme(i,u);if(r){console.log(g.default.magenta("Write manifest to: ",l));console.log((0,d.format)(u));return false}await writeConfigAsync(l,u);return true}i.removeAsync=removeAsync;function whichADB(){if(process.env.ANDROID_HOME){return`${process.env.ANDROID_HOME}/platform-tools/adb`}return"adb"}async function getAdbOutputAsync(r){const i=whichADB();try{const o=await(0,m.default)(i,r);return o.stdout}catch(r){const i=r.stderr||r.stdout||"";let o=i.trim();if(o.startsWith(M)){o=o.substring(M.length)}throw new b.CommandError(o)}}i.getAdbOutputAsync=getAdbOutputAsync;async function openUrlAsync(...r){const i=await getAdbOutputAsync(["shell","am","start","-a","android.intent.action.VIEW","-d",...r.filter(Boolean)]);if(i.includes(w)){throw new b.CommandError(i.substring(i.indexOf("Error: ")))}return i}async function openAsync({uri:r,androidPackage:i}){return await openUrlAsync(r.replace(/&/g,String.raw`\&`),i??null)}i.openAsync=openAsync;async function getAsync({projectRoot:r,manifestPath:i}){const o=await readConfigAsync(i??getConfigPath(r));return await p.getSchemesFromManifest(o)}i.getAsync=getAsync;function getPackage(r){return r.manifest?.$?.package??null}async function getProjectIdAsync({projectRoot:r,manifestPath:i}){const o=i??getConfigPath(r);const a=await readConfigAsync(o);const l=getPackage(a);if(!l)throw new b.CommandError(`Android: Failed to resolve android package for Manifest at path: ${o}`);return l}i.getProjectIdAsync=getProjectIdAsync;function getConfigPath(r){const i=["android/app/src/main/AndroidManifest.xml","app/src/main/AndroidManifest.xml"].map((i=>v.default.join(r,i)));for(const r of i){if((0,y.existsSync)(r)){return r}}throw new Error(`Could not find AndroidManifest.xml, looked in: ${i.join(", ")}`)}i.getConfigPath=getConfigPath;async function readConfigAsync(r){return await(0,h.readAndroidManifestAsync)(r)}async function writeConfigAsync(r,i){await(0,h.writeAndroidManifestAsync)(r,i)}},5585:function(r,i,o){"use strict";var a=this&&this.__createBinding||(Object.create?function(r,i,o,a){if(a===undefined)a=o;var l=Object.getOwnPropertyDescriptor(i,o);if(!l||("get"in l?!i.__esModule:l.writable||l.configurable)){l={enumerable:true,get:function(){return i[o]}}}Object.defineProperty(r,a,l)}:function(r,i,o,a){if(a===undefined)a=o;r[a]=i[o]});var l=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var u=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var o in r)if(o!=="default"&&Object.prototype.hasOwnProperty.call(r,o))a(i,r,o);l(i,r);return i};var c=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:true});i.run=i.program=void 0;const h=c(o(8746));const p=o(8018);const d=o(1017);const m=u(o(208));const g=u(o(2194));const y=o(3329);const v=u(o(8522));const b=c(o(2586));const packageJson=()=>o(4147);i.program=new p.Command(packageJson().name).version(packageJson().version);function buildCommand(r,o=[]){return i.program.command(`${r} [uri-protocol]`).option("-a, --android","Apply action to Android").option("-i, --ios","Apply action to iOS ").on("--help",(()=>{if(!o.length)return;console.log();console.log("Examples:");console.log();for(const i of o){console.log(` $ uri-scheme ${r} ${i}`)}console.log()}))}buildCommand("add",["com.app","myapp"]).description("Add URI schemes to a native app").option("-n, --name <string>","Name to use on iOS.").option("-r, --role <string>","Role to use on iOS: Editor, Viewer").option("--manifest-path <string>","Custom path to use for an Android project's AndroidManifest.xml").option("--info-path <string>","Custom path to use for an iOS project's Info.plist").option("--dry-run","View the proposed change").action((async(r,i)=>{try{const o=await parseArgsAsync(r,i);await v.addAsync(o);(0,b.default)()}catch(r){commandDidThrowAsync(r)}}));buildCommand("remove",["com.app","myapp"]).description("Remove URI schemes from a native app").option("--manifest-path <string>","Custom path to use for an Android project's AndroidManifest.xml").option("--info-path <string>","Custom path to use for an iOS project's Info.plist").option("--dry-run","View the proposed change").action((async(r,i)=>{try{const o=await parseArgsAsync(r,i);await v.removeAsync(o);(0,b.default)()}catch(r){commandDidThrowAsync(r)}}));buildCommand("open",["com.app://oauth","http://expo.dev"]).description("Open a URI scheme in a running simulator or emulator").option("--package <string>","The Android package name to use when opening in an emulator").action((async(r,i)=>{try{if(!i.ios&&!i.android){throw new y.CommandError("Please provide a target platform with --ios or --android")}await v.openAsync({projectRoot:process.cwd(),...i,androidPackage:i["package"],uri:r});(0,b.default)()}catch(r){commandDidThrowAsync(r)}}));buildCommand("list").description("List the existing URI scheme prefixes for a native app").option("--manifest-path <string>","Custom path to use for an Android project's AndroidManifest.xml").option("--info-path <string>","Custom path to use for an iOS project's Info.plist").action((async(r,i)=>{try{const o=await parseArgsAsync(r,i);await v.listAsync(o);(0,b.default)()}catch(r){commandDidThrowAsync(r)}}));async function parseArgsAsync(r,i){const o=(0,d.resolve)(process.cwd());i.projectRoot=o;if(i.manifestPath)i.manifestPath=(0,d.resolve)(i.manifestPath);if(i.infoPath)i.infoPath=(0,d.resolve)(i.infoPath);const a=v.getAvailablePlatforms(i);let l=false;if(!i.android&&!i.ios){l=true;for(const r of a){i[r]=true}}else{if(i.android){if(!a.includes("android")){throw new y.CommandError(`Android project not found in directory "${o}".\nYou can manually select an AndroidManifest.xml with \`--manifest-path\``)}}if(i.ios){if(!a.includes("ios")){throw new y.CommandError(`iOS project not found in directory "${o}".\nYou can manually select an Info.plist with \`--info-path\``)}}}if(i.android&&!i.manifestPath){try{i.manifestPath=m.getConfigPath(o)}catch(r){if(l){delete i.android}else{throw r}}}if(i.ios&&!i.infoPath){try{i.infoPath=g.getConfigPath(o)}catch(r){if(l){delete i.ios}else{throw r}}}i.uri=r;return i}function run(){i.program.parse(process.argv)}i.run=run;async function commandDidThrowAsync(r){console.log();if(r.command){console.log(h.default.red(`› ${h.default.bold(`npx ${packageJson().name} ${r.command}`)} has failed.`));console.log()}if(r.origin==="uri-scheme"){console.log(h.default.black.bgRed(r.message))}else{console.log("Aborting run");console.log(h.default.black.bgRed`An unexpected error was encountered. Please report it as a bug:`);console.log(r)}console.log();await(0,b.default)();process.exit(1)}},2194:function(r,i,o){"use strict";var a=this&&this.__createBinding||(Object.create?function(r,i,o,a){if(a===undefined)a=o;var l=Object.getOwnPropertyDescriptor(i,o);if(!l||("get"in l?!i.__esModule:l.writable||l.configurable)){l={enumerable:true,get:function(){return i[o]}}}Object.defineProperty(r,a,l)}:function(r,i,o,a){if(a===undefined)a=o;r[a]=i[o]});var l=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var u=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var o in r)if(o!=="default"&&Object.prototype.hasOwnProperty.call(r,o))a(i,r,o);l(i,r);return i};var c=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:true});i.getConfigPath=i.getAsync=i.openAsync=i.removeAsync=i.addAsync=i.isAvailable=void 0;const h=u(o(7903));const p=c(o(3681));const d=c(o(1072));const m=c(o(8746));const g=c(o(7147));const y=o(1104);const v=u(o(1017));const b=o(3329);const w=["**/@(Carthage|Pods|vendor|node_modules)/**"];function isAvailable(r){const i=(0,y.sync)("ios/*.xcodeproj",{ignore:w,absolute:true,cwd:r});const o=(0,y.sync)("*.xcodeproj",{ignore:w,absolute:true,cwd:r});return!!o.length||!!i.length}i.isAvailable=isAvailable;async function addAsync({uri:r,infoPath:i,projectRoot:o,dryRun:a}){const l=i??getConfigPath(o);let u=readConfig(l);if(h.hasScheme(r,u)){console.log(m.default.yellow(`› iOS: URI scheme "${r}" already exists in Info.plist at: ${l}`));return false}u=h.appendScheme(r,u);if(a){console.log(m.default.magenta("Write plist to: ",l));console.log(formatConfig(u));return false}writeConfig(l,u);return true}i.addAsync=addAsync;async function removeAsync({uri:r,infoPath:i,projectRoot:o,dryRun:a}){const l=i??getConfigPath(o);let u=readConfig(l);if(!h.hasScheme(r,u)){console.log(m.default.yellow(`› iOS: URI scheme "${r}" does not exist in Info.plist at: ${l}`));return false}u=h.removeScheme(r,u);if(a){console.log(m.default.magenta("Write plist to: ",l));console.log(formatConfig(u));return false}writeConfig(l,u);return true}i.removeAsync=removeAsync;async function openAsync({uri:r}){await(0,d.default)("xcrun",["simctl","openurl","booted",r],{stdio:"inherit"})}i.openAsync=openAsync;async function getAsync({projectRoot:r,infoPath:i}){const o=i??getConfigPath(r);const a=g.default.readFileSync(o,"utf8");const l=p.default.parse(a);const u=h.getSchemesFromPlist(l);return u}i.getAsync=getAsync;function getInfoPlistsInDirectory(r){return(0,y.sync)("*/Info.plist",{ignore:w,absolute:true,cwd:r}).sort(((r,i)=>r.length-i.length))}function getConfigPath(r){const i=getInfoPlistsInDirectory(v.join(r,"ios"));if(i.length){return i[0]}const o=getInfoPlistsInDirectory(r);if(!o.length){throw new b.CommandError(`iOS: No Info.plist found for project at root: ${r}`)}return o[0]}i.getConfigPath=getConfigPath;function readConfig(r){const i=g.default.readFileSync(r,"utf8");return{...p.default.parse(i)}}function formatConfig(r){const i={pretty:true,indent:`\t`};const o=p.default.build(r,i);return o}function writeConfig(r,i){g.default.writeFileSync(r,formatConfig(i))}},3329:(r,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.CommandError=void 0;class CommandError extends Error{command;origin="uri-scheme";constructor(r,i){super(r);this.command=i}}i.CommandError=CommandError},8522:function(r,i,o){"use strict";var a=this&&this.__createBinding||(Object.create?function(r,i,o,a){if(a===undefined)a=o;var l=Object.getOwnPropertyDescriptor(i,o);if(!l||("get"in l?!i.__esModule:l.writable||l.configurable)){l={enumerable:true,get:function(){return i[o]}}}Object.defineProperty(r,a,l)}:function(r,i,o,a){if(a===undefined)a=o;r[a]=i[o]});var l=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var u=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var o in r)if(o!=="default"&&Object.prototype.hasOwnProperty.call(r,o))a(i,r,o);l(i,r);return i};var c=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:true});i.listAsync=i.openAsync=i.removeAsync=i.addAsync=i.getAvailablePlatforms=void 0;const h=c(o(8746));const p=o(7147);const d=o(1017);const m=c(o(1112));const g=u(o(208));const y=u(o(2194));const v=o(3329);function fileExists(r){try{return(0,p.statSync)(r).isFile()}catch{return false}}function getAvailablePlatforms(r){const i=[];if(r.infoPath){if(!fileExists(r.infoPath)){throw new v.CommandError(`Custom Info.plist does not exist at path "${r.infoPath}"`)}i.push("ios")}else if(y.isAvailable(r.projectRoot)){i.push("ios")}if(r.manifestPath){if(!fileExists(r.manifestPath)){throw new v.CommandError(`Custom AndroidManifest.xml does not exist at path "${r.manifestPath}"`)}i.push("android")}else if(g.isAvailable(r.projectRoot)){i.push("android")}return i}i.getAvailablePlatforms=getAvailablePlatforms;function ensureUriString(r){if(!r){throw new v.CommandError("Please supply a URI protocol")}if(typeof r!=="string"){throw new v.CommandError(`URI protocol should be of type string. Instead got: ${typeof r}`)}return r.trim()}async function normalizeUriProtocolAsync(r){const i=ensureUriString(r);const[o]=i.split(":");const a=o.toLowerCase();if(a!==r){if(a){console.log(h.default.yellow(`› Supplied URI protocol "${i}" does not match normalized scheme "${a}".`));const{answer:r}=await(0,m.default)({type:"confirm",name:"answer",message:`Would you like to use "${a}" instead?`,initial:true});if(r)return a}else{throw new v.CommandError(`Supplied URI protocol "${i}" does not appear to be spec compliant: http://www.ietf.org/rfc/rfc2396.txt`)}}return i}async function addAsync(r){r.uri=await normalizeUriProtocolAsync(r.uri);const i=[];let o=false;if(r.ios){if(await y.addAsync(r)){o=true;logPlatformMessage("iOS",`Added URI protocol "${r.uri}" to project`);i.push("ios")}}if(r.android){if(await g.addAsync(r)){o=true;logPlatformMessage("Android",`Added URI protocol "${r.uri}" to project`);i.push("android")}}if(!o){console.log(h.default.yellow("No URI schemes could be added. Please ensure there is a native project available."))}return i}i.addAsync=addAsync;async function removeAsync(r){r.uri=ensureUriString(r.uri);const i=[];let o=false;if(r.ios){if(await y.removeAsync(r)){o=true;logPlatformMessage("iOS",`Removed URI protocol "${r.uri}" from project`);i.push("ios")}}if(r.android){if(await g.removeAsync(r)){o=true;logPlatformMessage("Android",`Removed URI protocol "${r.uri}" from project`);i.push("android")}}if(!o){console.log(h.default.yellow("No URI schemes could be removed. Please ensure there is a native project available."))}return i}i.removeAsync=removeAsync;async function openAsync(r){r.uri=ensureUriString(r.uri);if(r.ios){logPlatformMessage("iOS",`Opening URI "${r.uri}" in simulator`);await y.openAsync(r)}if(r.android){logPlatformMessage("Android",`Opening URI "${r.uri}" in emulator`);await g.openAsync(r)}}i.openAsync=openAsync;async function listAsync(r){let i=false;if(r.infoPath){i=true;const o=await y.getAsync(r);logPlatformMessage("iOS",`Schemes for config: ./${(0,d.relative)(r.projectRoot,r.infoPath)}`);logSchemes(o)}if(r.manifestPath){i=true;const o=await g.getAsync(r);logPlatformMessage("Android",`Schemes for config: ./${(0,d.relative)(r.projectRoot,r.manifestPath)}`);logSchemes(o)}if(!i){console.log(h.default.yellow("Could not find any native URI schemes to list."))}}i.listAsync=listAsync;function logPlatformMessage(r,i){console.log(h.default.magenta(`› ${h.default.bold(r)}: ${i}`))}function logSchemes(r){for(const i of r)console.log(`${h.default.dim("› ")}${i}${h.default.dim("://")}`);console.log("")}},2855:function(r,i,o){"use strict";var a=this&&this.__createBinding||(Object.create?function(r,i,o,a){if(a===undefined)a=o;var l=Object.getOwnPropertyDescriptor(i,o);if(!l||("get"in l?!i.__esModule:l.writable||l.configurable)){l={enumerable:true,get:function(){return i[o]}}}Object.defineProperty(r,a,l)}:function(r,i,o,a){if(a===undefined)a=o;r[a]=i[o]});var l=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var u=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var o in r)if(o!=="default"&&Object.prototype.hasOwnProperty.call(r,o))a(i,r,o);l(i,r);return i};Object.defineProperty(i,"__esModule",{value:true});i.URIScheme=i.Android=i.Ios=i.program=void 0;const c=u(o(208));i.Android=c;const h=u(o(2194));i.Ios=h;const p=u(o(8522));i.URIScheme=p;var d=o(5585);Object.defineProperty(i,"program",{enumerable:true,get:function(){return d.program}})},2586:function(r,i,o){"use strict";var a=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:true});const l=a(o(8746));const u=a(o(5418));async function shouldUpdate(){const packageJson=()=>o(4147);const r=(0,u.default)(packageJson()).catch((()=>null));try{const i=await r;if(i&&i.latest){const r=packageJson();console.log();console.log(l.default.yellow.bold(`A new version of \`${r.name}\` is available`));console.log("You can update by running: "+l.default.cyan(`npm i -g ${r.name}`));console.log()}}catch{}}i["default"]=shouldUpdate},9491:r=>{"use strict";r.exports=require("assert")},4300:r=>{"use strict";r.exports=require("buffer")},2081:r=>{"use strict";r.exports=require("child_process")},2361:r=>{"use strict";r.exports=require("events")},7147:r=>{"use strict";r.exports=require("fs")},3685:r=>{"use strict";r.exports=require("http")},5687:r=>{"use strict";r.exports=require("https")},2037:r=>{"use strict";r.exports=require("os")},1017:r=>{"use strict";r.exports=require("path")},4521:r=>{"use strict";r.exports=require("readline")},2781:r=>{"use strict";r.exports=require("stream")},1576:r=>{"use strict";r.exports=require("string_decoder")},9512:r=>{"use strict";r.exports=require("timers")},6224:r=>{"use strict";r.exports=require("tty")},7310:r=>{"use strict";r.exports=require("url")},3837:r=>{"use strict";r.exports=require("util")},4147:r=>{"use strict";r.exports=JSON.parse('{"name":"uri-scheme","version":"1.2.0","description":"Interact with native URI schemes","main":"build/index.js","keywords":["expo","ios","uri-scheme","android"],"repository":{"type":"git","url":"https://github.com/expo/expo.git","directory":"packages/uri-scheme"},"author":"Expo <support@expo.dev>","license":"MIT","bugs":{"url":"https://github.com/expo/expo/issues"},"homepage":"https://github.com/expo/expo/tree/main/packages/uri-scheme#readme","bin":"cli.js","files":["build","cli.js"],"scripts":{"build":"ncc build ./src/index.ts -o build/","build:prod":"ncc build ./src/index.ts -o build/ --minify --no-cache --no-source-map-register","clean":"expo-module clean","lint":"expo-module lint","prepare":"yarn run clean && yarn run build:prod","test":"expo-module test","typecheck":"expo-module typecheck","watch":"yarn run build --watch","prepublishOnly":"expo-module prepublishOnly"},"devDependencies":{"@expo/config-plugins":"^7.7.0","@expo/plist":"^0.1.0","@expo/spawn-async":"1.5.0","@types/prompts":"^2.0.6","chalk":"^4.0.0","commander":"2.20.0","expo-module-scripts":"^3.3.0","glob":"7.1.6","prompts":"^2.3.2","update-check":"^1.5.4"},"gitHead":"6aca7ce098ddc667776a3d7cf612adbb985e264a"}')}};var i={};function __nccwpck_require__(o){var a=i[o];if(a!==undefined){return a.exports}var l=i[o]={id:o,loaded:false,exports:{}};var u=true;try{r[o].call(l.exports,l,l.exports,__nccwpck_require__);u=false}finally{if(u)delete i[o]}l.loaded=true;return l.exports}(()=>{__nccwpck_require__.nmd=r=>{r.paths=[];if(!r.children)r.children=[];return r}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var o=__nccwpck_require__(2855);module.exports=o})();
29
+ var a=o(4300);var l=a.Buffer;function copyProps(r,i){for(var o in r){i[o]=r[o]}}if(l.from&&l.alloc&&l.allocUnsafe&&l.allocUnsafeSlow){r.exports=a}else{copyProps(a,i);i.Buffer=SafeBuffer}function SafeBuffer(r,i,o){return l(r,i,o)}SafeBuffer.prototype=Object.create(l.prototype);copyProps(l,SafeBuffer);SafeBuffer.from=function(r,i,o){if(typeof r==="number"){throw new TypeError("Argument must not be a number")}return l(r,i,o)};SafeBuffer.alloc=function(r,i,o){if(typeof r!=="number"){throw new TypeError("Argument must be a number")}var a=l(r);if(i!==undefined){if(typeof o==="string"){a.fill(i,o)}else{a.fill(i)}}else{a.fill(0)}return a};SafeBuffer.allocUnsafe=function(r){if(typeof r!=="number"){throw new TypeError("Argument must be a number")}return l(r)};SafeBuffer.allocUnsafeSlow=function(r){if(typeof r!=="number"){throw new TypeError("Argument must be a number")}return a.SlowBuffer(r)}},9746:(r,i,o)=>{(function(r){r.parser=function(r,i){return new SAXParser(r,i)};r.SAXParser=SAXParser;r.SAXStream=SAXStream;r.createStream=createStream;r.MAX_BUFFER_LENGTH=64*1024;var i=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];r.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function SAXParser(i,o){if(!(this instanceof SAXParser)){return new SAXParser(i,o)}var a=this;clearBuffers(a);a.q=a.c="";a.bufferCheckPosition=r.MAX_BUFFER_LENGTH;a.opt=o||{};a.opt.lowercase=a.opt.lowercase||a.opt.lowercasetags;a.looseCase=a.opt.lowercase?"toLowerCase":"toUpperCase";a.tags=[];a.closed=a.closedRoot=a.sawRoot=false;a.tag=a.error=null;a.strict=!!i;a.noscript=!!(i||a.opt.noscript);a.state=b.BEGIN;a.strictEntities=a.opt.strictEntities;a.ENTITIES=a.strictEntities?Object.create(r.XML_ENTITIES):Object.create(r.ENTITIES);a.attribList=[];if(a.opt.xmlns){a.ns=Object.create(p)}a.trackPosition=a.opt.position!==false;if(a.trackPosition){a.position=a.line=a.column=0}emit(a,"onready")}if(!Object.create){Object.create=function(r){function F(){}F.prototype=r;var i=new F;return i}}if(!Object.keys){Object.keys=function(r){var i=[];for(var o in r)if(r.hasOwnProperty(o))i.push(o);return i}}function checkBufferLength(o){var a=Math.max(r.MAX_BUFFER_LENGTH,10);var l=0;for(var u=0,c=i.length;u<c;u++){var h=o[i[u]].length;if(h>a){switch(i[u]){case"textNode":closeText(o);break;case"cdata":emitNode(o,"oncdata",o.cdata);o.cdata="";break;case"script":emitNode(o,"onscript",o.script);o.script="";break;default:error(o,"Max buffer length exceeded: "+i[u])}}l=Math.max(l,h)}var d=r.MAX_BUFFER_LENGTH-l;o.bufferCheckPosition=d+o.position}function clearBuffers(r){for(var o=0,a=i.length;o<a;o++){r[i[o]]=""}}function flushBuffers(r){closeText(r);if(r.cdata!==""){emitNode(r,"oncdata",r.cdata);r.cdata=""}if(r.script!==""){emitNode(r,"onscript",r.script);r.script=""}}SAXParser.prototype={end:function(){end(this)},write:write,resume:function(){this.error=null;return this},close:function(){return this.write(null)},flush:function(){flushBuffers(this)}};var a;try{a=o(2781).Stream}catch(r){a=function(){}}var l=r.EVENTS.filter((function(r){return r!=="error"&&r!=="end"}));function createStream(r,i){return new SAXStream(r,i)}function SAXStream(r,i){if(!(this instanceof SAXStream)){return new SAXStream(r,i)}a.apply(this);this._parser=new SAXParser(r,i);this.writable=true;this.readable=true;var o=this;this._parser.onend=function(){o.emit("end")};this._parser.onerror=function(r){o.emit("error",r);o._parser.error=null};this._decoder=null;l.forEach((function(r){Object.defineProperty(o,"on"+r,{get:function(){return o._parser["on"+r]},set:function(i){if(!i){o.removeAllListeners(r);o._parser["on"+r]=i;return i}o.on(r,i)},enumerable:true,configurable:false})}))}SAXStream.prototype=Object.create(a.prototype,{constructor:{value:SAXStream}});SAXStream.prototype.write=function(r){if(typeof Buffer==="function"&&typeof Buffer.isBuffer==="function"&&Buffer.isBuffer(r)){if(!this._decoder){var i=o(1576).StringDecoder;this._decoder=new i("utf8")}r=this._decoder.write(r)}this._parser.write(r.toString());this.emit("data",r);return true};SAXStream.prototype.end=function(r){if(r&&r.length){this.write(r)}this._parser.end();return true};SAXStream.prototype.on=function(r,i){var o=this;if(!o._parser["on"+r]&&l.indexOf(r)!==-1){o._parser["on"+r]=function(){var i=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);i.splice(0,0,r);o.emit.apply(o,i)}}return a.prototype.on.call(o,r,i)};var u="[CDATA[";var c="DOCTYPE";var h="http://www.w3.org/XML/1998/namespace";var d="http://www.w3.org/2000/xmlns/";var p={xml:h,xmlns:d};var m=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;var g=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;var y=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;var v=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function isWhitespace(r){return r===" "||r==="\n"||r==="\r"||r==="\t"}function isQuote(r){return r==='"'||r==="'"}function isAttribEnd(r){return r===">"||isWhitespace(r)}function isMatch(r,i){return r.test(i)}function notMatch(r,i){return!isMatch(r,i)}var b=0;r.STATE={BEGIN:b++,BEGIN_WHITESPACE:b++,TEXT:b++,TEXT_ENTITY:b++,OPEN_WAKA:b++,SGML_DECL:b++,SGML_DECL_QUOTED:b++,DOCTYPE:b++,DOCTYPE_QUOTED:b++,DOCTYPE_DTD:b++,DOCTYPE_DTD_QUOTED:b++,COMMENT_STARTING:b++,COMMENT:b++,COMMENT_ENDING:b++,COMMENT_ENDED:b++,CDATA:b++,CDATA_ENDING:b++,CDATA_ENDING_2:b++,PROC_INST:b++,PROC_INST_BODY:b++,PROC_INST_ENDING:b++,OPEN_TAG:b++,OPEN_TAG_SLASH:b++,ATTRIB:b++,ATTRIB_NAME:b++,ATTRIB_NAME_SAW_WHITE:b++,ATTRIB_VALUE:b++,ATTRIB_VALUE_QUOTED:b++,ATTRIB_VALUE_CLOSED:b++,ATTRIB_VALUE_UNQUOTED:b++,ATTRIB_VALUE_ENTITY_Q:b++,ATTRIB_VALUE_ENTITY_U:b++,CLOSE_TAG:b++,CLOSE_TAG_SAW_WHITE:b++,SCRIPT:b++,SCRIPT_ENDING:b++};r.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"};r.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830};Object.keys(r.ENTITIES).forEach((function(i){var o=r.ENTITIES[i];var a=typeof o==="number"?String.fromCharCode(o):o;r.ENTITIES[i]=a}));for(var w in r.STATE){r.STATE[r.STATE[w]]=w}b=r.STATE;function emit(r,i,o){r[i]&&r[i](o)}function emitNode(r,i,o){if(r.textNode)closeText(r);emit(r,i,o)}function closeText(r){r.textNode=textopts(r.opt,r.textNode);if(r.textNode)emit(r,"ontext",r.textNode);r.textNode=""}function textopts(r,i){if(r.trim)i=i.trim();if(r.normalize)i=i.replace(/\s+/g," ");return i}function error(r,i){closeText(r);if(r.trackPosition){i+="\nLine: "+r.line+"\nColumn: "+r.column+"\nChar: "+r.c}i=new Error(i);r.error=i;emit(r,"onerror",i);return r}function end(r){if(r.sawRoot&&!r.closedRoot)strictFail(r,"Unclosed root tag");if(r.state!==b.BEGIN&&r.state!==b.BEGIN_WHITESPACE&&r.state!==b.TEXT){error(r,"Unexpected end")}closeText(r);r.c="";r.closed=true;emit(r,"onend");SAXParser.call(r,r.strict,r.opt);return r}function strictFail(r,i){if(typeof r!=="object"||!(r instanceof SAXParser)){throw new Error("bad call to strictFail")}if(r.strict){error(r,i)}}function newTag(r){if(!r.strict)r.tagName=r.tagName[r.looseCase]();var i=r.tags[r.tags.length-1]||r;var o=r.tag={name:r.tagName,attributes:{}};if(r.opt.xmlns){o.ns=i.ns}r.attribList.length=0;emitNode(r,"onopentagstart",o)}function qname(r,i){var o=r.indexOf(":");var a=o<0?["",r]:r.split(":");var l=a[0];var u=a[1];if(i&&r==="xmlns"){l="xmlns";u=""}return{prefix:l,local:u}}function attrib(r){if(!r.strict){r.attribName=r.attribName[r.looseCase]()}if(r.attribList.indexOf(r.attribName)!==-1||r.tag.attributes.hasOwnProperty(r.attribName)){r.attribName=r.attribValue="";return}if(r.opt.xmlns){var i=qname(r.attribName,true);var o=i.prefix;var a=i.local;if(o==="xmlns"){if(a==="xml"&&r.attribValue!==h){strictFail(r,"xml: prefix must be bound to "+h+"\n"+"Actual: "+r.attribValue)}else if(a==="xmlns"&&r.attribValue!==d){strictFail(r,"xmlns: prefix must be bound to "+d+"\n"+"Actual: "+r.attribValue)}else{var l=r.tag;var u=r.tags[r.tags.length-1]||r;if(l.ns===u.ns){l.ns=Object.create(u.ns)}l.ns[a]=r.attribValue}}r.attribList.push([r.attribName,r.attribValue])}else{r.tag.attributes[r.attribName]=r.attribValue;emitNode(r,"onattribute",{name:r.attribName,value:r.attribValue})}r.attribName=r.attribValue=""}function openTag(r,i){if(r.opt.xmlns){var o=r.tag;var a=qname(r.tagName);o.prefix=a.prefix;o.local=a.local;o.uri=o.ns[a.prefix]||"";if(o.prefix&&!o.uri){strictFail(r,"Unbound namespace prefix: "+JSON.stringify(r.tagName));o.uri=a.prefix}var l=r.tags[r.tags.length-1]||r;if(o.ns&&l.ns!==o.ns){Object.keys(o.ns).forEach((function(i){emitNode(r,"onopennamespace",{prefix:i,uri:o.ns[i]})}))}for(var u=0,c=r.attribList.length;u<c;u++){var h=r.attribList[u];var d=h[0];var p=h[1];var m=qname(d,true);var g=m.prefix;var y=m.local;var v=g===""?"":o.ns[g]||"";var w={name:d,value:p,prefix:g,local:y,uri:v};if(g&&g!=="xmlns"&&!v){strictFail(r,"Unbound namespace prefix: "+JSON.stringify(g));w.uri=g}r.tag.attributes[d]=w;emitNode(r,"onattribute",w)}r.attribList.length=0}r.tag.isSelfClosing=!!i;r.sawRoot=true;r.tags.push(r.tag);emitNode(r,"onopentag",r.tag);if(!i){if(!r.noscript&&r.tagName.toLowerCase()==="script"){r.state=b.SCRIPT}else{r.state=b.TEXT}r.tag=null;r.tagName=""}r.attribName=r.attribValue="";r.attribList.length=0}function closeTag(r){if(!r.tagName){strictFail(r,"Weird empty close tag.");r.textNode+="</>";r.state=b.TEXT;return}if(r.script){if(r.tagName!=="script"){r.script+="</"+r.tagName+">";r.tagName="";r.state=b.SCRIPT;return}emitNode(r,"onscript",r.script);r.script=""}var i=r.tags.length;var o=r.tagName;if(!r.strict){o=o[r.looseCase]()}var a=o;while(i--){var l=r.tags[i];if(l.name!==a){strictFail(r,"Unexpected close tag")}else{break}}if(i<0){strictFail(r,"Unmatched closing tag: "+r.tagName);r.textNode+="</"+r.tagName+">";r.state=b.TEXT;return}r.tagName=o;var u=r.tags.length;while(u-- >i){var c=r.tag=r.tags.pop();r.tagName=r.tag.name;emitNode(r,"onclosetag",r.tagName);var h={};for(var d in c.ns){h[d]=c.ns[d]}var p=r.tags[r.tags.length-1]||r;if(r.opt.xmlns&&c.ns!==p.ns){Object.keys(c.ns).forEach((function(i){var o=c.ns[i];emitNode(r,"onclosenamespace",{prefix:i,uri:o})}))}}if(i===0)r.closedRoot=true;r.tagName=r.attribValue=r.attribName="";r.attribList.length=0;r.state=b.TEXT}function parseEntity(r){var i=r.entity;var o=i.toLowerCase();var a;var l="";if(r.ENTITIES[i]){return r.ENTITIES[i]}if(r.ENTITIES[o]){return r.ENTITIES[o]}i=o;if(i.charAt(0)==="#"){if(i.charAt(1)==="x"){i=i.slice(2);a=parseInt(i,16);l=a.toString(16)}else{i=i.slice(1);a=parseInt(i,10);l=a.toString(10)}}i=i.replace(/^0+/,"");if(isNaN(a)||l.toLowerCase()!==i){strictFail(r,"Invalid character entity");return"&"+r.entity+";"}return String.fromCodePoint(a)}function beginWhiteSpace(r,i){if(i==="<"){r.state=b.OPEN_WAKA;r.startTagPosition=r.position}else if(!isWhitespace(i)){strictFail(r,"Non-whitespace before first tag.");r.textNode=i;r.state=b.TEXT}}function charAt(r,i){var o="";if(i<r.length){o=r.charAt(i)}return o}function write(r){var i=this;if(this.error){throw this.error}if(i.closed){return error(i,"Cannot write after close. Assign an onready handler.")}if(r===null){return end(i)}if(typeof r==="object"){r=r.toString()}var o=0;var a="";while(true){a=charAt(r,o++);i.c=a;if(!a){break}if(i.trackPosition){i.position++;if(a==="\n"){i.line++;i.column=0}else{i.column++}}switch(i.state){case b.BEGIN:i.state=b.BEGIN_WHITESPACE;if(a==="\ufeff"){continue}beginWhiteSpace(i,a);continue;case b.BEGIN_WHITESPACE:beginWhiteSpace(i,a);continue;case b.TEXT:if(i.sawRoot&&!i.closedRoot){var l=o-1;while(a&&a!=="<"&&a!=="&"){a=charAt(r,o++);if(a&&i.trackPosition){i.position++;if(a==="\n"){i.line++;i.column=0}else{i.column++}}}i.textNode+=r.substring(l,o-1)}if(a==="<"&&!(i.sawRoot&&i.closedRoot&&!i.strict)){i.state=b.OPEN_WAKA;i.startTagPosition=i.position}else{if(!isWhitespace(a)&&(!i.sawRoot||i.closedRoot)){strictFail(i,"Text data outside of root node.")}if(a==="&"){i.state=b.TEXT_ENTITY}else{i.textNode+=a}}continue;case b.SCRIPT:if(a==="<"){i.state=b.SCRIPT_ENDING}else{i.script+=a}continue;case b.SCRIPT_ENDING:if(a==="/"){i.state=b.CLOSE_TAG}else{i.script+="<"+a;i.state=b.SCRIPT}continue;case b.OPEN_WAKA:if(a==="!"){i.state=b.SGML_DECL;i.sgmlDecl=""}else if(isWhitespace(a)){}else if(isMatch(m,a)){i.state=b.OPEN_TAG;i.tagName=a}else if(a==="/"){i.state=b.CLOSE_TAG;i.tagName=""}else if(a==="?"){i.state=b.PROC_INST;i.procInstName=i.procInstBody=""}else{strictFail(i,"Unencoded <");if(i.startTagPosition+1<i.position){var h=i.position-i.startTagPosition;a=new Array(h).join(" ")+a}i.textNode+="<"+a;i.state=b.TEXT}continue;case b.SGML_DECL:if((i.sgmlDecl+a).toUpperCase()===u){emitNode(i,"onopencdata");i.state=b.CDATA;i.sgmlDecl="";i.cdata=""}else if(i.sgmlDecl+a==="--"){i.state=b.COMMENT;i.comment="";i.sgmlDecl=""}else if((i.sgmlDecl+a).toUpperCase()===c){i.state=b.DOCTYPE;if(i.doctype||i.sawRoot){strictFail(i,"Inappropriately located doctype declaration")}i.doctype="";i.sgmlDecl=""}else if(a===">"){emitNode(i,"onsgmldeclaration",i.sgmlDecl);i.sgmlDecl="";i.state=b.TEXT}else if(isQuote(a)){i.state=b.SGML_DECL_QUOTED;i.sgmlDecl+=a}else{i.sgmlDecl+=a}continue;case b.SGML_DECL_QUOTED:if(a===i.q){i.state=b.SGML_DECL;i.q=""}i.sgmlDecl+=a;continue;case b.DOCTYPE:if(a===">"){i.state=b.TEXT;emitNode(i,"ondoctype",i.doctype);i.doctype=true}else{i.doctype+=a;if(a==="["){i.state=b.DOCTYPE_DTD}else if(isQuote(a)){i.state=b.DOCTYPE_QUOTED;i.q=a}}continue;case b.DOCTYPE_QUOTED:i.doctype+=a;if(a===i.q){i.q="";i.state=b.DOCTYPE}continue;case b.DOCTYPE_DTD:i.doctype+=a;if(a==="]"){i.state=b.DOCTYPE}else if(isQuote(a)){i.state=b.DOCTYPE_DTD_QUOTED;i.q=a}continue;case b.DOCTYPE_DTD_QUOTED:i.doctype+=a;if(a===i.q){i.state=b.DOCTYPE_DTD;i.q=""}continue;case b.COMMENT:if(a==="-"){i.state=b.COMMENT_ENDING}else{i.comment+=a}continue;case b.COMMENT_ENDING:if(a==="-"){i.state=b.COMMENT_ENDED;i.comment=textopts(i.opt,i.comment);if(i.comment){emitNode(i,"oncomment",i.comment)}i.comment=""}else{i.comment+="-"+a;i.state=b.COMMENT}continue;case b.COMMENT_ENDED:if(a!==">"){strictFail(i,"Malformed comment");i.comment+="--"+a;i.state=b.COMMENT}else{i.state=b.TEXT}continue;case b.CDATA:if(a==="]"){i.state=b.CDATA_ENDING}else{i.cdata+=a}continue;case b.CDATA_ENDING:if(a==="]"){i.state=b.CDATA_ENDING_2}else{i.cdata+="]"+a;i.state=b.CDATA}continue;case b.CDATA_ENDING_2:if(a===">"){if(i.cdata){emitNode(i,"oncdata",i.cdata)}emitNode(i,"onclosecdata");i.cdata="";i.state=b.TEXT}else if(a==="]"){i.cdata+="]"}else{i.cdata+="]]"+a;i.state=b.CDATA}continue;case b.PROC_INST:if(a==="?"){i.state=b.PROC_INST_ENDING}else if(isWhitespace(a)){i.state=b.PROC_INST_BODY}else{i.procInstName+=a}continue;case b.PROC_INST_BODY:if(!i.procInstBody&&isWhitespace(a)){continue}else if(a==="?"){i.state=b.PROC_INST_ENDING}else{i.procInstBody+=a}continue;case b.PROC_INST_ENDING:if(a===">"){emitNode(i,"onprocessinginstruction",{name:i.procInstName,body:i.procInstBody});i.procInstName=i.procInstBody="";i.state=b.TEXT}else{i.procInstBody+="?"+a;i.state=b.PROC_INST_BODY}continue;case b.OPEN_TAG:if(isMatch(g,a)){i.tagName+=a}else{newTag(i);if(a===">"){openTag(i)}else if(a==="/"){i.state=b.OPEN_TAG_SLASH}else{if(!isWhitespace(a)){strictFail(i,"Invalid character in tag name")}i.state=b.ATTRIB}}continue;case b.OPEN_TAG_SLASH:if(a===">"){openTag(i,true);closeTag(i)}else{strictFail(i,"Forward-slash in opening tag not followed by >");i.state=b.ATTRIB}continue;case b.ATTRIB:if(isWhitespace(a)){continue}else if(a===">"){openTag(i)}else if(a==="/"){i.state=b.OPEN_TAG_SLASH}else if(isMatch(m,a)){i.attribName=a;i.attribValue="";i.state=b.ATTRIB_NAME}else{strictFail(i,"Invalid attribute name")}continue;case b.ATTRIB_NAME:if(a==="="){i.state=b.ATTRIB_VALUE}else if(a===">"){strictFail(i,"Attribute without value");i.attribValue=i.attribName;attrib(i);openTag(i)}else if(isWhitespace(a)){i.state=b.ATTRIB_NAME_SAW_WHITE}else if(isMatch(g,a)){i.attribName+=a}else{strictFail(i,"Invalid attribute name")}continue;case b.ATTRIB_NAME_SAW_WHITE:if(a==="="){i.state=b.ATTRIB_VALUE}else if(isWhitespace(a)){continue}else{strictFail(i,"Attribute without value");i.tag.attributes[i.attribName]="";i.attribValue="";emitNode(i,"onattribute",{name:i.attribName,value:""});i.attribName="";if(a===">"){openTag(i)}else if(isMatch(m,a)){i.attribName=a;i.state=b.ATTRIB_NAME}else{strictFail(i,"Invalid attribute name");i.state=b.ATTRIB}}continue;case b.ATTRIB_VALUE:if(isWhitespace(a)){continue}else if(isQuote(a)){i.q=a;i.state=b.ATTRIB_VALUE_QUOTED}else{strictFail(i,"Unquoted attribute value");i.state=b.ATTRIB_VALUE_UNQUOTED;i.attribValue=a}continue;case b.ATTRIB_VALUE_QUOTED:if(a!==i.q){if(a==="&"){i.state=b.ATTRIB_VALUE_ENTITY_Q}else{i.attribValue+=a}continue}attrib(i);i.q="";i.state=b.ATTRIB_VALUE_CLOSED;continue;case b.ATTRIB_VALUE_CLOSED:if(isWhitespace(a)){i.state=b.ATTRIB}else if(a===">"){openTag(i)}else if(a==="/"){i.state=b.OPEN_TAG_SLASH}else if(isMatch(m,a)){strictFail(i,"No whitespace between attributes");i.attribName=a;i.attribValue="";i.state=b.ATTRIB_NAME}else{strictFail(i,"Invalid attribute name")}continue;case b.ATTRIB_VALUE_UNQUOTED:if(!isAttribEnd(a)){if(a==="&"){i.state=b.ATTRIB_VALUE_ENTITY_U}else{i.attribValue+=a}continue}attrib(i);if(a===">"){openTag(i)}else{i.state=b.ATTRIB}continue;case b.CLOSE_TAG:if(!i.tagName){if(isWhitespace(a)){continue}else if(notMatch(m,a)){if(i.script){i.script+="</"+a;i.state=b.SCRIPT}else{strictFail(i,"Invalid tagname in closing tag.")}}else{i.tagName=a}}else if(a===">"){closeTag(i)}else if(isMatch(g,a)){i.tagName+=a}else if(i.script){i.script+="</"+i.tagName;i.tagName="";i.state=b.SCRIPT}else{if(!isWhitespace(a)){strictFail(i,"Invalid tagname in closing tag")}i.state=b.CLOSE_TAG_SAW_WHITE}continue;case b.CLOSE_TAG_SAW_WHITE:if(isWhitespace(a)){continue}if(a===">"){closeTag(i)}else{strictFail(i,"Invalid characters in closing tag")}continue;case b.TEXT_ENTITY:case b.ATTRIB_VALUE_ENTITY_Q:case b.ATTRIB_VALUE_ENTITY_U:var d;var p;switch(i.state){case b.TEXT_ENTITY:d=b.TEXT;p="textNode";break;case b.ATTRIB_VALUE_ENTITY_Q:d=b.ATTRIB_VALUE_QUOTED;p="attribValue";break;case b.ATTRIB_VALUE_ENTITY_U:d=b.ATTRIB_VALUE_UNQUOTED;p="attribValue";break}if(a===";"){i[p]+=parseEntity(i);i.entity="";i.state=d}else if(isMatch(i.entity.length?v:y,a)){i.entity+=a}else{strictFail(i,"Invalid character in entity name");i[p]+="&"+i.entity+a;i.entity="";i.state=d}continue;default:throw new Error(i,"Unknown state: "+i.state)}}if(i.position>=i.bufferCheckPosition){checkBufferLength(i)}return i}
30
+ /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */if(!String.fromCodePoint){(function(){var r=String.fromCharCode;var i=Math.floor;var fromCodePoint=function(){var o=16384;var a=[];var l;var u;var c=-1;var h=arguments.length;if(!h){return""}var d="";while(++c<h){var p=Number(arguments[c]);if(!isFinite(p)||p<0||p>1114111||i(p)!==p){throw RangeError("Invalid code point: "+p)}if(p<=65535){a.push(p)}else{p-=65536;l=(p>>10)+55296;u=p%1024+56320;a.push(l,u)}if(c+1===h||a.length>o){d+=r.apply(null,a);a.length=0}}return d};if(Object.defineProperty){Object.defineProperty(String,"fromCodePoint",{value:fromCodePoint,configurable:true,writable:true})}else{String.fromCodePoint=fromCodePoint}})()}})(false?0:i)},332:r=>{"use strict";const i="";const o=`${i}[`;const a="";const l={to(r,i){if(!i)return`${o}${r+1}G`;return`${o}${i+1};${r+1}H`},move(r,i){let a="";if(r<0)a+=`${o}${-r}D`;else if(r>0)a+=`${o}${r}C`;if(i<0)a+=`${o}${-i}A`;else if(i>0)a+=`${o}${i}B`;return a},up:(r=1)=>`${o}${r}A`,down:(r=1)=>`${o}${r}B`,forward:(r=1)=>`${o}${r}C`,backward:(r=1)=>`${o}${r}D`,nextLine:(r=1)=>`${o}E`.repeat(r),prevLine:(r=1)=>`${o}F`.repeat(r),left:`${o}G`,hide:`${o}?25l`,show:`${o}?25h`,save:`${i}7`,restore:`${i}8`};const u={up:(r=1)=>`${o}S`.repeat(r),down:(r=1)=>`${o}T`.repeat(r)};const c={screen:`${o}2J`,up:(r=1)=>`${o}1J`.repeat(r),down:(r=1)=>`${o}J`.repeat(r),line:`${o}2K`,lineEnd:`${o}K`,lineStart:`${o}1K`,lines(r){let i="";for(let o=0;o<r;o++)i+=this.line+(o<r-1?l.up():"");if(r)i+=l.left;return i}};r.exports={cursor:l,scroll:u,erase:c,beep:a}},395:(r,i,o)=>{"use strict";const a=o(2037);const l=o(6224);const u=o(6738);const{env:c}=process;let h;if(u("no-color")||u("no-colors")||u("color=false")||u("color=never")){h=0}else if(u("color")||u("colors")||u("color=true")||u("color=always")){h=1}if("FORCE_COLOR"in c){if(c.FORCE_COLOR==="true"){h=1}else if(c.FORCE_COLOR==="false"){h=0}else{h=c.FORCE_COLOR.length===0?1:Math.min(parseInt(c.FORCE_COLOR,10),3)}}function translateLevel(r){if(r===0){return false}return{level:r,hasBasic:true,has256:r>=2,has16m:r>=3}}function supportsColor(r,i){if(h===0){return 0}if(u("color=16m")||u("color=full")||u("color=truecolor")){return 3}if(u("color=256")){return 2}if(r&&!i&&h===undefined){return 0}const o=h||0;if(c.TERM==="dumb"){return o}if(process.platform==="win32"){const r=a.release().split(".");if(Number(r[0])>=10&&Number(r[2])>=10586){return Number(r[2])>=14931?3:2}return 1}if("CI"in c){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((r=>r in c))||c.CI_NAME==="codeship"){return 1}return o}if("TEAMCITY_VERSION"in c){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(c.TEAMCITY_VERSION)?1:0}if(c.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in c){const r=parseInt((c.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(c.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(c.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(c.TERM)){return 1}if("COLORTERM"in c){return 1}return o}function getSupportLevel(r){const i=supportsColor(r,r&&r.isTTY);return translateLevel(i)}r.exports={supportsColor:getSupportLevel,stdout:translateLevel(supportsColor(true,l.isatty(1))),stderr:translateLevel(supportsColor(true,l.isatty(2)))}},5418:(r,i,o)=>{const{URL:a}=o(7310);const{join:l}=o(1017);const u=o(7147);const{promisify:c}=o(3837);const{tmpdir:h}=o(2037);const d=o(2447);const p=c(u.writeFile);const m=c(u.mkdir);const g=c(u.readFile);const compareVersions=(r,i)=>r.localeCompare(i,"en-US",{numeric:true});const encode=r=>encodeURIComponent(r).replace(/^%40/,"@");const getFile=async(r,i)=>{const o=h();const a=l(o,"update-check");if(!u.existsSync(a)){await m(a)}let c=`${r.name}-${i}.json`;if(r.scope){c=`${r.scope}-${c}`}return l(a,c)};const evaluateCache=async(r,i,o)=>{if(u.existsSync(r)){const a=await g(r,"utf8");const{lastUpdate:l,latest:u}=JSON.parse(a);const c=l+o;if(c>i){return{shouldCheck:false,latest:u}}}return{shouldCheck:true,latest:null}};const updateCache=async(r,i,o)=>{const a=JSON.stringify({latest:i,lastUpdate:o});await p(r,a,"utf8")};const loadPackage=(r,i)=>new Promise(((a,l)=>{const u={host:r.hostname,path:r.pathname,port:r.port,headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},timeout:2e3};if(i){u.headers.authorization=`${i.type} ${i.token}`}const{get:c}=o(r.protocol==="https:"?5687:3685);c(u,(r=>{const{statusCode:i}=r;if(i!==200){const o=new Error(`Request failed with code ${i}`);o.code=i;l(o);r.resume();return}let o="";r.setEncoding("utf8");r.on("data",(r=>{o+=r}));r.on("end",(()=>{try{const r=JSON.parse(o);a(r)}catch(r){l(r)}}))})).on("error",l).on("timeout",l)}));const getMostRecent=async({full:r,scope:i},l)=>{const u=d(i);const c=new a(r,u);let h=null;try{h=await loadPackage(c)}catch(r){if(r.code&&String(r.code).startsWith(4)){const r=o(1384);const i=r(u,{recursive:true});h=await loadPackage(c,i)}else{throw r}}const p=h["dist-tags"][l];if(!p){throw new Error(`Distribution tag ${l} is not available`)}return p};const y={interval:36e5,distTag:"latest"};const getDetails=r=>{const i={full:encode(r)};if(r.includes("/")){const o=r.split("/");i.scope=o[0];i.name=o[1]}else{i.scope=null;i.name=r}return i};r.exports=async(r,i)=>{if(typeof r!=="object"){throw new Error("The first parameter should be your package.json file content")}const o=getDetails(r.name);const a=Date.now();const{distTag:l,interval:u}=Object.assign({},y,i);const c=await getFile(o,l);let h=null;let d=true;({shouldCheck:d,latest:h}=await evaluateCache(c,a,u));if(d){h=await getMostRecent(o,l);await updateCache(c,h,a)}const p=compareVersions(r.version,h);if(p===-1){return{latest:h,fromCache:!d}}return null}},4586:r=>{r.exports=wrappy;function wrappy(r,i){if(r&&i)return wrappy(r)(i);if(typeof r!=="function")throw new TypeError("need wrapper function");Object.keys(r).forEach((function(i){wrapper[i]=r[i]}));return wrapper;function wrapper(){var i=new Array(arguments.length);for(var o=0;o<i.length;o++){i[o]=arguments[o]}var a=r.apply(this,i);var l=i[i.length-1];if(typeof a==="function"&&a!==l){Object.keys(l).forEach((function(r){a[r]=l[r]}))}return a}}},4604:function(r,i){(function(){"use strict";i.stripBOM=function(r){if(r[0]==="\ufeff"){return r.substring(1)}else{return r}}}).call(this)},1002:function(r,i,o){(function(){"use strict";var r,a,l,u,c,h={}.hasOwnProperty;r=o(3131);a=o(9498).defaults;u=function(r){return typeof r==="string"&&(r.indexOf("&")>=0||r.indexOf(">")>=0||r.indexOf("<")>=0)};c=function(r){return"<![CDATA["+l(r)+"]]>"};l=function(r){return r.replace("]]>","]]]]><![CDATA[>")};i.Builder=function(){function Builder(r){var i,o,l;this.options={};o=a["0.2"];for(i in o){if(!h.call(o,i))continue;l=o[i];this.options[i]=l}for(i in r){if(!h.call(r,i))continue;l=r[i];this.options[i]=l}}Builder.prototype.buildObject=function(i){var o,l,d,p,m;o=this.options.attrkey;l=this.options.charkey;if(Object.keys(i).length===1&&this.options.rootName===a["0.2"].rootName){m=Object.keys(i)[0];i=i[m]}else{m=this.options.rootName}d=function(r){return function(i,a){var p,m,g,y,v,b;if(typeof a!=="object"){if(r.options.cdata&&u(a)){i.raw(c(a))}else{i.txt(a)}}else if(Array.isArray(a)){for(y in a){if(!h.call(a,y))continue;m=a[y];for(v in m){g=m[v];i=d(i.ele(v),g).up()}}}else{for(v in a){if(!h.call(a,v))continue;m=a[v];if(v===o){if(typeof m==="object"){for(p in m){b=m[p];i=i.att(p,b)}}}else if(v===l){if(r.options.cdata&&u(m)){i=i.raw(c(m))}else{i=i.txt(m)}}else if(Array.isArray(m)){for(y in m){if(!h.call(m,y))continue;g=m[y];if(typeof g==="string"){if(r.options.cdata&&u(g)){i=i.ele(v).raw(c(g)).up()}else{i=i.ele(v,g).up()}}else{i=d(i.ele(v),g).up()}}}else if(typeof m==="object"){i=d(i.ele(v),m).up()}else{if(typeof m==="string"&&r.options.cdata&&u(m)){i=i.ele(v).raw(c(m)).up()}else{if(m==null){m=""}i=i.ele(v,m.toString()).up()}}}}return i}}(this);p=r.create(m,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars});return d(p,i).end(this.options.renderOpts)};return Builder}()}).call(this)},9498:function(r,i){(function(){i.defaults={.1:{explicitCharkey:false,trim:true,normalize:true,normalizeTags:false,attrkey:"@",charkey:"#",explicitArray:false,ignoreAttrs:false,mergeAttrs:false,explicitRoot:false,validator:null,xmlns:false,explicitChildren:false,childkey:"@@",charsAsChildren:false,includeWhiteChars:false,async:false,strict:true,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:false,trim:false,normalize:false,normalizeTags:false,attrkey:"$",charkey:"_",explicitArray:true,ignoreAttrs:false,mergeAttrs:false,explicitRoot:true,validator:null,xmlns:false,explicitChildren:false,preserveChildrenOrder:false,childkey:"$$",charsAsChildren:false,includeWhiteChars:false,async:false,strict:true,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:true},doctype:null,renderOpts:{pretty:true,indent:" ",newline:"\n"},headless:false,chunkSize:1e4,emptyTag:"",cdata:false}}}).call(this)},7426:function(r,i,o){(function(){"use strict";var r,a,l,u,c,h,d,p,m,bind=function(r,i){return function(){return r.apply(i,arguments)}},extend=function(r,i){for(var o in i){if(g.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},g={}.hasOwnProperty;p=o(9746);l=o(2361);r=o(4604);d=o(9068);m=o(9512).setImmediate;a=o(9498).defaults;u=function(r){return typeof r==="object"&&r!=null&&Object.keys(r).length===0};c=function(r){return r!=="__proto__"&&r!=="constructor"&&r!=="prototype"};h=function(r,i,o){var a,l,u;for(a=0,l=r.length;a<l;a++){u=r[a];i=u(i,o)}return i};i.Parser=function(o){extend(Parser,o);function Parser(r){this.parseStringPromise=bind(this.parseStringPromise,this);this.parseString=bind(this.parseString,this);this.reset=bind(this.reset,this);this.assignOrPush=bind(this.assignOrPush,this);this.processAsync=bind(this.processAsync,this);var o,l,u;if(!(this instanceof i.Parser)){return new i.Parser(r)}this.options={};l=a["0.2"];for(o in l){if(!g.call(l,o))continue;u=l[o];this.options[o]=u}for(o in r){if(!g.call(r,o))continue;u=r[o];this.options[o]=u}if(this.options.xmlns){this.options.xmlnskey=this.options.attrkey+"ns"}if(this.options.normalizeTags){if(!this.options.tagNameProcessors){this.options.tagNameProcessors=[]}this.options.tagNameProcessors.unshift(d.normalize)}this.reset()}Parser.prototype.processAsync=function(){var r,i;try{if(this.remaining.length<=this.options.chunkSize){r=this.remaining;this.remaining="";this.saxParser=this.saxParser.write(r);return this.saxParser.close()}else{r=this.remaining.substr(0,this.options.chunkSize);this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length);this.saxParser=this.saxParser.write(r);return m(this.processAsync)}}catch(r){i=r;if(!this.saxParser.errThrown){this.saxParser.errThrown=true;return this.emit(i)}}};Parser.prototype.assignOrPush=function(r,i,o){if(!c(i)){return}if(!(i in r)){if(!this.options.explicitArray){return r[i]=o}else{return r[i]=[o]}}else{if(!(r[i]instanceof Array)){r[i]=[r[i]]}return r[i].push(o)}};Parser.prototype.reset=function(){var r,i,o,a;this.removeAllListeners();this.saxParser=p.parser(this.options.strict,{trim:false,normalize:false,xmlns:this.options.xmlns});this.saxParser.errThrown=false;this.saxParser.onerror=function(r){return function(i){r.saxParser.resume();if(!r.saxParser.errThrown){r.saxParser.errThrown=true;return r.emit("error",i)}}}(this);this.saxParser.onend=function(r){return function(){if(!r.saxParser.ended){r.saxParser.ended=true;return r.emit("end",r.resultObject)}}}(this);this.saxParser.ended=false;this.EXPLICIT_CHARKEY=this.options.explicitCharkey;this.resultObject=null;a=[];r=this.options.attrkey;i=this.options.charkey;this.saxParser.onopentag=function(o){return function(l){var u,d,p,m,y;p={};p[i]="";if(!o.options.ignoreAttrs){y=l.attributes;for(u in y){if(!g.call(y,u))continue;if(!(r in p)&&!o.options.mergeAttrs){p[r]={}}d=o.options.attrValueProcessors?h(o.options.attrValueProcessors,l.attributes[u],u):l.attributes[u];m=o.options.attrNameProcessors?h(o.options.attrNameProcessors,u):u;if(c(m)){if(o.options.mergeAttrs){o.assignOrPush(p,m,d)}else{p[r][m]=d}}}}p["#name"]=o.options.tagNameProcessors?h(o.options.tagNameProcessors,l.name):l.name;if(o.options.xmlns){p[o.options.xmlnskey]={uri:l.uri,local:l.local}}return a.push(p)}}(this);this.saxParser.onclosetag=function(r){return function(){var o,l,d,p,m,y,v,b,w,M;y=a.pop();m=y["#name"];if(!r.options.explicitChildren||!r.options.preserveChildrenOrder){delete y["#name"]}if(y.cdata===true){o=y.cdata;delete y.cdata}w=a[a.length-1];if(y[i].match(/^\s*$/)&&!o){l=y[i];delete y[i]}else{if(r.options.trim){y[i]=y[i].trim()}if(r.options.normalize){y[i]=y[i].replace(/\s{2,}/g," ").trim()}y[i]=r.options.valueProcessors?h(r.options.valueProcessors,y[i],m):y[i];if(Object.keys(y).length===1&&i in y&&!r.EXPLICIT_CHARKEY){y=y[i]}}if(u(y)){if(typeof r.options.emptyTag==="function"){y=r.options.emptyTag()}else{y=r.options.emptyTag!==""?r.options.emptyTag:l}}if(r.options.validator!=null){M="/"+function(){var r,i,o;o=[];for(r=0,i=a.length;r<i;r++){p=a[r];o.push(p["#name"])}return o}().concat(m).join("/");(function(){var i;try{return y=r.options.validator(M,w&&w[m],y)}catch(o){i=o;return r.emit("error",i)}})()}if(r.options.explicitChildren&&!r.options.mergeAttrs&&typeof y==="object"){if(!r.options.preserveChildrenOrder){p={};if(r.options.attrkey in y){p[r.options.attrkey]=y[r.options.attrkey];delete y[r.options.attrkey]}if(!r.options.charsAsChildren&&r.options.charkey in y){p[r.options.charkey]=y[r.options.charkey];delete y[r.options.charkey]}if(Object.getOwnPropertyNames(y).length>0){p[r.options.childkey]=y}y=p}else if(w){w[r.options.childkey]=w[r.options.childkey]||[];v={};for(d in y){if(!g.call(y,d))continue;if(c(d)){v[d]=y[d]}}w[r.options.childkey].push(v);delete y["#name"];if(Object.keys(y).length===1&&i in y&&!r.EXPLICIT_CHARKEY){y=y[i]}}}if(a.length>0){return r.assignOrPush(w,m,y)}else{if(r.options.explicitRoot){b=y;y={};y[m]=b}r.resultObject=y;r.saxParser.ended=true;return r.emit("end",r.resultObject)}}}(this);o=function(r){return function(o){var l,u;u=a[a.length-1];if(u){u[i]+=o;if(r.options.explicitChildren&&r.options.preserveChildrenOrder&&r.options.charsAsChildren&&(r.options.includeWhiteChars||o.replace(/\\n/g,"").trim()!=="")){u[r.options.childkey]=u[r.options.childkey]||[];l={"#name":"__text__"};l[i]=o;if(r.options.normalize){l[i]=l[i].replace(/\s{2,}/g," ").trim()}u[r.options.childkey].push(l)}return u}}}(this);this.saxParser.ontext=o;return this.saxParser.oncdata=function(r){return function(r){var i;i=o(r);if(i){return i.cdata=true}}}(this)};Parser.prototype.parseString=function(i,o){var a;if(o!=null&&typeof o==="function"){this.on("end",(function(r){this.reset();return o(null,r)}));this.on("error",(function(r){this.reset();return o(r)}))}try{i=i.toString();if(i.trim()===""){this.emit("end",null);return true}i=r.stripBOM(i);if(this.options.async){this.remaining=i;m(this.processAsync);return this.saxParser}return this.saxParser.write(i).close()}catch(r){a=r;if(!(this.saxParser.errThrown||this.saxParser.ended)){this.emit("error",a);return this.saxParser.errThrown=true}else if(this.saxParser.ended){throw a}}};Parser.prototype.parseStringPromise=function(r){return new Promise(function(i){return function(o,a){return i.parseString(r,(function(r,i){if(r){return a(r)}else{return o(i)}}))}}(this))};return Parser}(l);i.parseString=function(r,o,a){var l,u,c;if(a!=null){if(typeof a==="function"){l=a}if(typeof o==="object"){u=o}}else{if(typeof o==="function"){l=o}u={}}c=new i.Parser(u);return c.parseString(r,l)};i.parseStringPromise=function(r,o){var a,l;if(typeof o==="object"){a=o}l=new i.Parser(a);return l.parseStringPromise(r)}}).call(this)},9068:function(r,i){(function(){"use strict";var r;r=new RegExp(/(?!xmlns)^.*:/);i.normalize=function(r){return r.toLowerCase()};i.firstCharLowerCase=function(r){return r.charAt(0).toLowerCase()+r.slice(1)};i.stripPrefix=function(i){return i.replace(r,"")};i.parseNumbers=function(r){if(!isNaN(r)){r=r%1===0?parseInt(r,10):parseFloat(r)}return r};i.parseBooleans=function(r){if(/^(?:true|false)$/i.test(r)){r=r.toLowerCase()==="true"}return r}}).call(this)},7013:function(r,i,o){(function(){"use strict";var r,a,l,u,extend=function(r,i){for(var o in i){if(c.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},c={}.hasOwnProperty;a=o(9498);r=o(1002);l=o(7426);u=o(9068);i.defaults=a.defaults;i.processors=u;i.ValidationError=function(r){extend(ValidationError,r);function ValidationError(r){this.message=r}return ValidationError}(Error);i.Builder=r.Builder;i.Parser=l.Parser;i.parseString=l.parseString;i.parseStringPromise=l.parseStringPromise}).call(this)},2346:function(r){(function(){r.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},4128:function(r){(function(){r.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},2629:function(r){(function(){var i,o,a,l,u,c,h,d=[].slice,p={}.hasOwnProperty;i=function(){var r,i,o,a,l,c;c=arguments[0],l=2<=arguments.length?d.call(arguments,1):[];if(u(Object.assign)){Object.assign.apply(null,arguments)}else{for(r=0,o=l.length;r<o;r++){a=l[r];if(a!=null){for(i in a){if(!p.call(a,i))continue;c[i]=a[i]}}}}return c};u=function(r){return!!r&&Object.prototype.toString.call(r)==="[object Function]"};c=function(r){var i;return!!r&&((i=typeof r)==="function"||i==="object")};a=function(r){if(u(Array.isArray)){return Array.isArray(r)}else{return Object.prototype.toString.call(r)==="[object Array]"}};l=function(r){var i;if(a(r)){return!r.length}else{for(i in r){if(!p.call(r,i))continue;return false}return true}};h=function(r){var i,o;return c(r)&&(o=Object.getPrototypeOf(r))&&(i=o.constructor)&&typeof i==="function"&&i instanceof i&&Function.prototype.toString.call(i)===Function.prototype.toString.call(Object)};o=function(r){if(u(r.valueOf)){return r.valueOf()}else{return r}};r.exports.assign=i;r.exports.isFunction=u;r.exports.isObject=c;r.exports.isArray=a;r.exports.isEmpty=l;r.exports.isPlainObject=h;r.exports.getValue=o}).call(this)},8413:function(r){(function(){r.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},9525:function(r,i,o){(function(){var i,a,l;i=o(4128);l=o(8064);r.exports=a=function(){function XMLAttribute(r,o,a){this.parent=r;if(this.parent){this.options=this.parent.options;this.stringify=this.parent.stringify}if(o==null){throw new Error("Missing attribute name. "+this.debugInfo(o))}this.name=this.stringify.name(o);this.value=this.stringify.attValue(a);this.type=i.Attribute;this.isId=false;this.schemaTypeInfo=null}Object.defineProperty(XMLAttribute.prototype,"nodeType",{get:function(){return this.type}});Object.defineProperty(XMLAttribute.prototype,"ownerElement",{get:function(){return this.parent}});Object.defineProperty(XMLAttribute.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}});Object.defineProperty(XMLAttribute.prototype,"namespaceURI",{get:function(){return""}});Object.defineProperty(XMLAttribute.prototype,"prefix",{get:function(){return""}});Object.defineProperty(XMLAttribute.prototype,"localName",{get:function(){return this.name}});Object.defineProperty(XMLAttribute.prototype,"specified",{get:function(){return true}});XMLAttribute.prototype.clone=function(){return Object.create(this)};XMLAttribute.prototype.toString=function(r){return this.options.writer.attribute(this,this.options.writer.filterOptions(r))};XMLAttribute.prototype.debugInfo=function(r){r=r||this.name;if(r==null){return"parent: <"+this.parent.name+">"}else{return"attribute: {"+r+"}, parent: <"+this.parent.name+">"}};XMLAttribute.prototype.isEqualNode=function(r){if(r.namespaceURI!==this.namespaceURI){return false}if(r.prefix!==this.prefix){return false}if(r.localName!==this.localName){return false}if(r.value!==this.value){return false}return true};return XMLAttribute}()}).call(this)},6789:function(r,i,o){(function(){var i,a,l,extend=function(r,i){for(var o in i){if(u.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},u={}.hasOwnProperty;i=o(4128);l=o(3527);r.exports=a=function(r){extend(XMLCData,r);function XMLCData(r,o){XMLCData.__super__.constructor.call(this,r);if(o==null){throw new Error("Missing CDATA text. "+this.debugInfo())}this.name="#cdata-section";this.type=i.CData;this.value=this.stringify.cdata(o)}XMLCData.prototype.clone=function(){return Object.create(this)};XMLCData.prototype.toString=function(r){return this.options.writer.cdata(this,this.options.writer.filterOptions(r))};return XMLCData}(l)}).call(this)},3527:function(r,i,o){(function(){var i,a,extend=function(r,i){for(var o in i){if(l.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},l={}.hasOwnProperty;a=o(8064);r.exports=i=function(r){extend(XMLCharacterData,r);function XMLCharacterData(r){XMLCharacterData.__super__.constructor.call(this,r);this.value=""}Object.defineProperty(XMLCharacterData.prototype,"data",{get:function(){return this.value},set:function(r){return this.value=r||""}});Object.defineProperty(XMLCharacterData.prototype,"length",{get:function(){return this.value.length}});Object.defineProperty(XMLCharacterData.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}});XMLCharacterData.prototype.clone=function(){return Object.create(this)};XMLCharacterData.prototype.substringData=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.appendData=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.insertData=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.deleteData=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.replaceData=function(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.isEqualNode=function(r){if(!XMLCharacterData.__super__.isEqualNode.apply(this,arguments).isEqualNode(r)){return false}if(r.data!==this.data){return false}return true};return XMLCharacterData}(a)}).call(this)},4593:function(r,i,o){(function(){var i,a,l,extend=function(r,i){for(var o in i){if(u.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},u={}.hasOwnProperty;i=o(4128);a=o(3527);r.exports=l=function(r){extend(XMLComment,r);function XMLComment(r,o){XMLComment.__super__.constructor.call(this,r);if(o==null){throw new Error("Missing comment text. "+this.debugInfo())}this.name="#comment";this.type=i.Comment;this.value=this.stringify.comment(o)}XMLComment.prototype.clone=function(){return Object.create(this)};XMLComment.prototype.toString=function(r){return this.options.writer.comment(this,this.options.writer.filterOptions(r))};return XMLComment}(a)}).call(this)},4196:function(r,i,o){(function(){var i,a,l;a=o(7850);l=o(5132);r.exports=i=function(){function XMLDOMConfiguration(){var r;this.defaultParams={"canonical-form":false,"cdata-sections":false,comments:false,"datatype-normalization":false,"element-content-whitespace":true,entities:true,"error-handler":new a,infoset:true,"validate-if-schema":false,namespaces:true,"namespace-declarations":true,"normalize-characters":false,"schema-location":"","schema-type":"","split-cdata-sections":true,validate:false,"well-formed":true};this.params=r=Object.create(this.defaultParams)}Object.defineProperty(XMLDOMConfiguration.prototype,"parameterNames",{get:function(){return new l(Object.keys(this.defaultParams))}});XMLDOMConfiguration.prototype.getParameter=function(r){if(this.params.hasOwnProperty(r)){return this.params[r]}else{return null}};XMLDOMConfiguration.prototype.canSetParameter=function(r,i){return true};XMLDOMConfiguration.prototype.setParameter=function(r,i){if(i!=null){return this.params[r]=i}else{return delete this.params[r]}};return XMLDOMConfiguration}()}).call(this)},7850:function(r){(function(){var i;r.exports=i=function(){function XMLDOMErrorHandler(){}XMLDOMErrorHandler.prototype.handleError=function(r){throw new Error(r)};return XMLDOMErrorHandler}()}).call(this)},9490:function(r){(function(){var i;r.exports=i=function(){function XMLDOMImplementation(){}XMLDOMImplementation.prototype.hasFeature=function(r,i){return true};XMLDOMImplementation.prototype.createDocumentType=function(r,i,o){throw new Error("This DOM method is not implemented.")};XMLDOMImplementation.prototype.createDocument=function(r,i,o){throw new Error("This DOM method is not implemented.")};XMLDOMImplementation.prototype.createHTMLDocument=function(r){throw new Error("This DOM method is not implemented.")};XMLDOMImplementation.prototype.getFeature=function(r,i){throw new Error("This DOM method is not implemented.")};return XMLDOMImplementation}()}).call(this)},5132:function(r){(function(){var i;r.exports=i=function(){function XMLDOMStringList(r){this.arr=r||[]}Object.defineProperty(XMLDOMStringList.prototype,"length",{get:function(){return this.arr.length}});XMLDOMStringList.prototype.item=function(r){return this.arr[r]||null};XMLDOMStringList.prototype.contains=function(r){return this.arr.indexOf(r)!==-1};return XMLDOMStringList}()}).call(this)},1066:function(r,i,o){(function(){var i,a,l,extend=function(r,i){for(var o in i){if(u.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},u={}.hasOwnProperty;l=o(8064);i=o(4128);r.exports=a=function(r){extend(XMLDTDAttList,r);function XMLDTDAttList(r,o,a,l,u,c){XMLDTDAttList.__super__.constructor.call(this,r);if(o==null){throw new Error("Missing DTD element name. "+this.debugInfo())}if(a==null){throw new Error("Missing DTD attribute name. "+this.debugInfo(o))}if(!l){throw new Error("Missing DTD attribute type. "+this.debugInfo(o))}if(!u){throw new Error("Missing DTD attribute default. "+this.debugInfo(o))}if(u.indexOf("#")!==0){u="#"+u}if(!u.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)){throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(o))}if(c&&!u.match(/^(#FIXED|#DEFAULT)$/)){throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(o))}this.elementName=this.stringify.name(o);this.type=i.AttributeDeclaration;this.attributeName=this.stringify.name(a);this.attributeType=this.stringify.dtdAttType(l);if(c){this.defaultValue=this.stringify.dtdAttDefault(c)}this.defaultValueType=u}XMLDTDAttList.prototype.toString=function(r){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(r))};return XMLDTDAttList}(l)}).call(this)},3584:function(r,i,o){(function(){var i,a,l,extend=function(r,i){for(var o in i){if(u.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},u={}.hasOwnProperty;l=o(8064);i=o(4128);r.exports=a=function(r){extend(XMLDTDElement,r);function XMLDTDElement(r,o,a){XMLDTDElement.__super__.constructor.call(this,r);if(o==null){throw new Error("Missing DTD element name. "+this.debugInfo())}if(!a){a="(#PCDATA)"}if(Array.isArray(a)){a="("+a.join(",")+")"}this.name=this.stringify.name(o);this.type=i.ElementDeclaration;this.value=this.stringify.dtdElementValue(a)}XMLDTDElement.prototype.toString=function(r){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(r))};return XMLDTDElement}(l)}).call(this)},9346:function(r,i,o){(function(){var i,a,l,u,extend=function(r,i){for(var o in i){if(c.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},c={}.hasOwnProperty;u=o(2629).isObject;l=o(8064);i=o(4128);r.exports=a=function(r){extend(XMLDTDEntity,r);function XMLDTDEntity(r,o,a,l){XMLDTDEntity.__super__.constructor.call(this,r);if(a==null){throw new Error("Missing DTD entity name. "+this.debugInfo(a))}if(l==null){throw new Error("Missing DTD entity value. "+this.debugInfo(a))}this.pe=!!o;this.name=this.stringify.name(a);this.type=i.EntityDeclaration;if(!u(l)){this.value=this.stringify.dtdEntityValue(l);this.internal=true}else{if(!l.pubID&&!l.sysID){throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(a))}if(l.pubID&&!l.sysID){throw new Error("System identifier is required for a public external entity. "+this.debugInfo(a))}this.internal=false;if(l.pubID!=null){this.pubID=this.stringify.dtdPubID(l.pubID)}if(l.sysID!=null){this.sysID=this.stringify.dtdSysID(l.sysID)}if(l.nData!=null){this.nData=this.stringify.dtdNData(l.nData)}if(this.pe&&this.nData){throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(a))}}}Object.defineProperty(XMLDTDEntity.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDTDEntity.prototype,"systemId",{get:function(){return this.sysID}});Object.defineProperty(XMLDTDEntity.prototype,"notationName",{get:function(){return this.nData||null}});Object.defineProperty(XMLDTDEntity.prototype,"inputEncoding",{get:function(){return null}});Object.defineProperty(XMLDTDEntity.prototype,"xmlEncoding",{get:function(){return null}});Object.defineProperty(XMLDTDEntity.prototype,"xmlVersion",{get:function(){return null}});XMLDTDEntity.prototype.toString=function(r){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(r))};return XMLDTDEntity}(l)}).call(this)},853:function(r,i,o){(function(){var i,a,l,extend=function(r,i){for(var o in i){if(u.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},u={}.hasOwnProperty;l=o(8064);i=o(4128);r.exports=a=function(r){extend(XMLDTDNotation,r);function XMLDTDNotation(r,o,a){XMLDTDNotation.__super__.constructor.call(this,r);if(o==null){throw new Error("Missing DTD notation name. "+this.debugInfo(o))}if(!a.pubID&&!a.sysID){throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(o))}this.name=this.stringify.name(o);this.type=i.NotationDeclaration;if(a.pubID!=null){this.pubID=this.stringify.dtdPubID(a.pubID)}if(a.sysID!=null){this.sysID=this.stringify.dtdSysID(a.sysID)}}Object.defineProperty(XMLDTDNotation.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDTDNotation.prototype,"systemId",{get:function(){return this.sysID}});XMLDTDNotation.prototype.toString=function(r){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(r))};return XMLDTDNotation}(l)}).call(this)},4972:function(r,i,o){(function(){var i,a,l,u,extend=function(r,i){for(var o in i){if(c.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},c={}.hasOwnProperty;u=o(2629).isObject;l=o(8064);i=o(4128);r.exports=a=function(r){extend(XMLDeclaration,r);function XMLDeclaration(r,o,a,l){var c;XMLDeclaration.__super__.constructor.call(this,r);if(u(o)){c=o,o=c.version,a=c.encoding,l=c.standalone}if(!o){o="1.0"}this.type=i.Declaration;this.version=this.stringify.xmlVersion(o);if(a!=null){this.encoding=this.stringify.xmlEncoding(a)}if(l!=null){this.standalone=this.stringify.xmlStandalone(l)}}XMLDeclaration.prototype.toString=function(r){return this.options.writer.declaration(this,this.options.writer.filterOptions(r))};return XMLDeclaration}(l)}).call(this)},9025:function(r,i,o){(function(){var i,a,l,u,c,h,d,p,m,extend=function(r,i){for(var o in i){if(g.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},g={}.hasOwnProperty;m=o(2629).isObject;p=o(8064);i=o(4128);a=o(1066);u=o(9346);l=o(3584);c=o(853);d=o(8339);r.exports=h=function(r){extend(XMLDocType,r);function XMLDocType(r,o,a){var l,u,c,h,d,p;XMLDocType.__super__.constructor.call(this,r);this.type=i.DocType;if(r.children){h=r.children;for(u=0,c=h.length;u<c;u++){l=h[u];if(l.type===i.Element){this.name=l.name;break}}}this.documentObject=r;if(m(o)){d=o,o=d.pubID,a=d.sysID}if(a==null){p=[o,a],a=p[0],o=p[1]}if(o!=null){this.pubID=this.stringify.dtdPubID(o)}if(a!=null){this.sysID=this.stringify.dtdSysID(a)}}Object.defineProperty(XMLDocType.prototype,"entities",{get:function(){var r,o,a,l,u;l={};u=this.children;for(o=0,a=u.length;o<a;o++){r=u[o];if(r.type===i.EntityDeclaration&&!r.pe){l[r.name]=r}}return new d(l)}});Object.defineProperty(XMLDocType.prototype,"notations",{get:function(){var r,o,a,l,u;l={};u=this.children;for(o=0,a=u.length;o<a;o++){r=u[o];if(r.type===i.NotationDeclaration){l[r.name]=r}}return new d(l)}});Object.defineProperty(XMLDocType.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDocType.prototype,"systemId",{get:function(){return this.sysID}});Object.defineProperty(XMLDocType.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});XMLDocType.prototype.element=function(r,i){var o;o=new l(this,r,i);this.children.push(o);return this};XMLDocType.prototype.attList=function(r,i,o,l,u){var c;c=new a(this,r,i,o,l,u);this.children.push(c);return this};XMLDocType.prototype.entity=function(r,i){var o;o=new u(this,false,r,i);this.children.push(o);return this};XMLDocType.prototype.pEntity=function(r,i){var o;o=new u(this,true,r,i);this.children.push(o);return this};XMLDocType.prototype.notation=function(r,i){var o;o=new c(this,r,i);this.children.push(o);return this};XMLDocType.prototype.toString=function(r){return this.options.writer.docType(this,this.options.writer.filterOptions(r))};XMLDocType.prototype.ele=function(r,i){return this.element(r,i)};XMLDocType.prototype.att=function(r,i,o,a,l){return this.attList(r,i,o,a,l)};XMLDocType.prototype.ent=function(r,i){return this.entity(r,i)};XMLDocType.prototype.pent=function(r,i){return this.pEntity(r,i)};XMLDocType.prototype.not=function(r,i){return this.notation(r,i)};XMLDocType.prototype.up=function(){return this.root()||this.documentObject};XMLDocType.prototype.isEqualNode=function(r){if(!XMLDocType.__super__.isEqualNode.apply(this,arguments).isEqualNode(r)){return false}if(r.name!==this.name){return false}if(r.publicId!==this.publicId){return false}if(r.systemId!==this.systemId){return false}return true};return XMLDocType}(p)}).call(this)},3315:function(r,i,o){(function(){var i,a,l,u,c,h,d,p,extend=function(r,i){for(var o in i){if(m.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},m={}.hasOwnProperty;p=o(2629).isPlainObject;l=o(9490);a=o(4196);c=o(8064);i=o(4128);d=o(916);h=o(6939);r.exports=u=function(r){extend(XMLDocument,r);function XMLDocument(r){XMLDocument.__super__.constructor.call(this,null);this.name="#document";this.type=i.Document;this.documentURI=null;this.domConfig=new a;r||(r={});if(!r.writer){r.writer=new h}this.options=r;this.stringify=new d(r)}Object.defineProperty(XMLDocument.prototype,"implementation",{value:new l});Object.defineProperty(XMLDocument.prototype,"doctype",{get:function(){var r,o,a,l;l=this.children;for(o=0,a=l.length;o<a;o++){r=l[o];if(r.type===i.DocType){return r}}return null}});Object.defineProperty(XMLDocument.prototype,"documentElement",{get:function(){return this.rootObject||null}});Object.defineProperty(XMLDocument.prototype,"inputEncoding",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"strictErrorChecking",{get:function(){return false}});Object.defineProperty(XMLDocument.prototype,"xmlEncoding",{get:function(){if(this.children.length!==0&&this.children[0].type===i.Declaration){return this.children[0].encoding}else{return null}}});Object.defineProperty(XMLDocument.prototype,"xmlStandalone",{get:function(){if(this.children.length!==0&&this.children[0].type===i.Declaration){return this.children[0].standalone==="yes"}else{return false}}});Object.defineProperty(XMLDocument.prototype,"xmlVersion",{get:function(){if(this.children.length!==0&&this.children[0].type===i.Declaration){return this.children[0].version}else{return"1.0"}}});Object.defineProperty(XMLDocument.prototype,"URL",{get:function(){return this.documentURI}});Object.defineProperty(XMLDocument.prototype,"origin",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"compatMode",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"characterSet",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"contentType",{get:function(){return null}});XMLDocument.prototype.end=function(r){var i;i={};if(!r){r=this.options.writer}else if(p(r)){i=r;r=this.options.writer}return r.document(this,r.filterOptions(i))};XMLDocument.prototype.toString=function(r){return this.options.writer.document(this,this.options.writer.filterOptions(r))};XMLDocument.prototype.createElement=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createTextNode=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createComment=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createCDATASection=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createProcessingInstruction=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createAttribute=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createEntityReference=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.getElementsByTagName=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.importNode=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createElementNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createAttributeNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.getElementsByTagNameNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.getElementById=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.adoptNode=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.renameNode=function(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.getElementsByClassName=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createEvent=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createNodeIterator=function(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createTreeWalker=function(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())};return XMLDocument}(c)}).call(this)},1523:function(r,i,o){(function(){var i,a,l,u,c,h,d,p,m,g,y,v,b,w,M,E,D,T,x,O,N,_,A,I,L={}.hasOwnProperty;I=o(2629),_=I.isObject,N=I.isFunction,A=I.isPlainObject,O=I.getValue;i=o(4128);v=o(3315);w=o(7370);u=o(6789);c=o(4593);E=o(363);x=o(8854);M=o(3234);g=o(4972);y=o(9025);h=o(1066);p=o(9346);d=o(3584);m=o(853);l=o(9525);T=o(916);D=o(6939);a=o(8413);r.exports=b=function(){function XMLDocumentCB(r,o,a){var l;this.name="?xml";this.type=i.Document;r||(r={});l={};if(!r.writer){r.writer=new D}else if(A(r.writer)){l=r.writer;r.writer=new D}this.options=r;this.writer=r.writer;this.writerOptions=this.writer.filterOptions(l);this.stringify=new T(r);this.onDataCallback=o||function(){};this.onEndCallback=a||function(){};this.currentNode=null;this.currentLevel=-1;this.openTags={};this.documentStarted=false;this.documentCompleted=false;this.root=null}XMLDocumentCB.prototype.createChildNode=function(r){var o,a,l,u,c,h,d,p;switch(r.type){case i.CData:this.cdata(r.value);break;case i.Comment:this.comment(r.value);break;case i.Element:l={};d=r.attribs;for(a in d){if(!L.call(d,a))continue;o=d[a];l[a]=o.value}this.node(r.name,l);break;case i.Dummy:this.dummy();break;case i.Raw:this.raw(r.value);break;case i.Text:this.text(r.value);break;case i.ProcessingInstruction:this.instruction(r.target,r.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+r.constructor.name)}p=r.children;for(c=0,h=p.length;c<h;c++){u=p[c];this.createChildNode(u);if(u.type===i.Element){this.up()}}return this};XMLDocumentCB.prototype.dummy=function(){return this};XMLDocumentCB.prototype.node=function(r,i,o){var a;if(r==null){throw new Error("Missing node name.")}if(this.root&&this.currentLevel===-1){throw new Error("Document can only have one root node. "+this.debugInfo(r))}this.openCurrent();r=O(r);if(i==null){i={}}i=O(i);if(!_(i)){a=[i,o],o=a[0],i=a[1]}this.currentNode=new w(this,r,i);this.currentNode.children=false;this.currentLevel++;this.openTags[this.currentLevel]=this.currentNode;if(o!=null){this.text(o)}return this};XMLDocumentCB.prototype.element=function(r,o,a){var l,u,c,h,d,p;if(this.currentNode&&this.currentNode.type===i.DocType){this.dtdElement.apply(this,arguments)}else{if(Array.isArray(r)||_(r)||N(r)){h=this.options.noValidation;this.options.noValidation=true;p=new v(this.options).element("TEMP_ROOT");p.element(r);this.options.noValidation=h;d=p.children;for(u=0,c=d.length;u<c;u++){l=d[u];this.createChildNode(l);if(l.type===i.Element){this.up()}}}else{this.node(r,o,a)}}return this};XMLDocumentCB.prototype.attribute=function(r,i){var o,a;if(!this.currentNode||this.currentNode.children){throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(r))}if(r!=null){r=O(r)}if(_(r)){for(o in r){if(!L.call(r,o))continue;a=r[o];this.attribute(o,a)}}else{if(N(i)){i=i.apply()}if(this.options.keepNullAttributes&&i==null){this.currentNode.attribs[r]=new l(this,r,"")}else if(i!=null){this.currentNode.attribs[r]=new l(this,r,i)}}return this};XMLDocumentCB.prototype.text=function(r){var i;this.openCurrent();i=new x(this,r);this.onData(this.writer.text(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.cdata=function(r){var i;this.openCurrent();i=new u(this,r);this.onData(this.writer.cdata(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.comment=function(r){var i;this.openCurrent();i=new c(this,r);this.onData(this.writer.comment(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.raw=function(r){var i;this.openCurrent();i=new E(this,r);this.onData(this.writer.raw(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.instruction=function(r,i){var o,a,l,u,c;this.openCurrent();if(r!=null){r=O(r)}if(i!=null){i=O(i)}if(Array.isArray(r)){for(o=0,u=r.length;o<u;o++){a=r[o];this.instruction(a)}}else if(_(r)){for(a in r){if(!L.call(r,a))continue;l=r[a];this.instruction(a,l)}}else{if(N(i)){i=i.apply()}c=new M(this,r,i);this.onData(this.writer.processingInstruction(c,this.writerOptions,this.currentLevel+1),this.currentLevel+1)}return this};XMLDocumentCB.prototype.declaration=function(r,i,o){var a;this.openCurrent();if(this.documentStarted){throw new Error("declaration() must be the first node.")}a=new g(this,r,i,o);this.onData(this.writer.declaration(a,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.doctype=function(r,i,o){this.openCurrent();if(r==null){throw new Error("Missing root node name.")}if(this.root){throw new Error("dtd() must come before the root node.")}this.currentNode=new y(this,i,o);this.currentNode.rootNodeName=r;this.currentNode.children=false;this.currentLevel++;this.openTags[this.currentLevel]=this.currentNode;return this};XMLDocumentCB.prototype.dtdElement=function(r,i){var o;this.openCurrent();o=new d(this,r,i);this.onData(this.writer.dtdElement(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.attList=function(r,i,o,a,l){var u;this.openCurrent();u=new h(this,r,i,o,a,l);this.onData(this.writer.dtdAttList(u,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.entity=function(r,i){var o;this.openCurrent();o=new p(this,false,r,i);this.onData(this.writer.dtdEntity(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.pEntity=function(r,i){var o;this.openCurrent();o=new p(this,true,r,i);this.onData(this.writer.dtdEntity(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.notation=function(r,i){var o;this.openCurrent();o=new m(this,r,i);this.onData(this.writer.dtdNotation(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.up=function(){if(this.currentLevel<0){throw new Error("The document node has no parent.")}if(this.currentNode){if(this.currentNode.children){this.closeNode(this.currentNode)}else{this.openNode(this.currentNode)}this.currentNode=null}else{this.closeNode(this.openTags[this.currentLevel])}delete this.openTags[this.currentLevel];this.currentLevel--;return this};XMLDocumentCB.prototype.end=function(){while(this.currentLevel>=0){this.up()}return this.onEnd()};XMLDocumentCB.prototype.openCurrent=function(){if(this.currentNode){this.currentNode.children=true;return this.openNode(this.currentNode)}};XMLDocumentCB.prototype.openNode=function(r){var o,l,u,c;if(!r.isOpen){if(!this.root&&this.currentLevel===0&&r.type===i.Element){this.root=r}l="";if(r.type===i.Element){this.writerOptions.state=a.OpenTag;l=this.writer.indent(r,this.writerOptions,this.currentLevel)+"<"+r.name;c=r.attribs;for(u in c){if(!L.call(c,u))continue;o=c[u];l+=this.writer.attribute(o,this.writerOptions,this.currentLevel)}l+=(r.children?">":"/>")+this.writer.endline(r,this.writerOptions,this.currentLevel);this.writerOptions.state=a.InsideTag}else{this.writerOptions.state=a.OpenTag;l=this.writer.indent(r,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+r.rootNodeName;if(r.pubID&&r.sysID){l+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"'}else if(r.sysID){l+=' SYSTEM "'+r.sysID+'"'}if(r.children){l+=" [";this.writerOptions.state=a.InsideTag}else{this.writerOptions.state=a.CloseTag;l+=">"}l+=this.writer.endline(r,this.writerOptions,this.currentLevel)}this.onData(l,this.currentLevel);return r.isOpen=true}};XMLDocumentCB.prototype.closeNode=function(r){var o;if(!r.isClosed){o="";this.writerOptions.state=a.CloseTag;if(r.type===i.Element){o=this.writer.indent(r,this.writerOptions,this.currentLevel)+"</"+r.name+">"+this.writer.endline(r,this.writerOptions,this.currentLevel)}else{o=this.writer.indent(r,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(r,this.writerOptions,this.currentLevel)}this.writerOptions.state=a.None;this.onData(o,this.currentLevel);return r.isClosed=true}};XMLDocumentCB.prototype.onData=function(r,i){this.documentStarted=true;return this.onDataCallback(r,i+1)};XMLDocumentCB.prototype.onEnd=function(){this.documentCompleted=true;return this.onEndCallback()};XMLDocumentCB.prototype.debugInfo=function(r){if(r==null){return""}else{return"node: <"+r+">"}};XMLDocumentCB.prototype.ele=function(){return this.element.apply(this,arguments)};XMLDocumentCB.prototype.nod=function(r,i,o){return this.node(r,i,o)};XMLDocumentCB.prototype.txt=function(r){return this.text(r)};XMLDocumentCB.prototype.dat=function(r){return this.cdata(r)};XMLDocumentCB.prototype.com=function(r){return this.comment(r)};XMLDocumentCB.prototype.ins=function(r,i){return this.instruction(r,i)};XMLDocumentCB.prototype.dec=function(r,i,o){return this.declaration(r,i,o)};XMLDocumentCB.prototype.dtd=function(r,i,o){return this.doctype(r,i,o)};XMLDocumentCB.prototype.e=function(r,i,o){return this.element(r,i,o)};XMLDocumentCB.prototype.n=function(r,i,o){return this.node(r,i,o)};XMLDocumentCB.prototype.t=function(r){return this.text(r)};XMLDocumentCB.prototype.d=function(r){return this.cdata(r)};XMLDocumentCB.prototype.c=function(r){return this.comment(r)};XMLDocumentCB.prototype.r=function(r){return this.raw(r)};XMLDocumentCB.prototype.i=function(r,i){return this.instruction(r,i)};XMLDocumentCB.prototype.att=function(){if(this.currentNode&&this.currentNode.type===i.DocType){return this.attList.apply(this,arguments)}else{return this.attribute.apply(this,arguments)}};XMLDocumentCB.prototype.a=function(){if(this.currentNode&&this.currentNode.type===i.DocType){return this.attList.apply(this,arguments)}else{return this.attribute.apply(this,arguments)}};XMLDocumentCB.prototype.ent=function(r,i){return this.entity(r,i)};XMLDocumentCB.prototype.pent=function(r,i){return this.pEntity(r,i)};XMLDocumentCB.prototype.not=function(r,i){return this.notation(r,i)};return XMLDocumentCB}()}).call(this)},3288:function(r,i,o){(function(){var i,a,l,extend=function(r,i){for(var o in i){if(u.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},u={}.hasOwnProperty;l=o(8064);i=o(4128);r.exports=a=function(r){extend(XMLDummy,r);function XMLDummy(r){XMLDummy.__super__.constructor.call(this,r);this.type=i.Dummy}XMLDummy.prototype.clone=function(){return Object.create(this)};XMLDummy.prototype.toString=function(r){return""};return XMLDummy}(l)}).call(this)},7370:function(r,i,o){(function(){var i,a,l,u,c,h,d,p,m,extend=function(r,i){for(var o in i){if(g.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},g={}.hasOwnProperty;m=o(2629),p=m.isObject,d=m.isFunction,h=m.getValue;c=o(8064);i=o(4128);a=o(9525);u=o(8339);r.exports=l=function(r){extend(XMLElement,r);function XMLElement(r,o,a){var l,u,c,h;XMLElement.__super__.constructor.call(this,r);if(o==null){throw new Error("Missing element name. "+this.debugInfo())}this.name=this.stringify.name(o);this.type=i.Element;this.attribs={};this.schemaTypeInfo=null;if(a!=null){this.attribute(a)}if(r.type===i.Document){this.isRoot=true;this.documentObject=r;r.rootObject=this;if(r.children){h=r.children;for(u=0,c=h.length;u<c;u++){l=h[u];if(l.type===i.DocType){l.name=this.name;break}}}}}Object.defineProperty(XMLElement.prototype,"tagName",{get:function(){return this.name}});Object.defineProperty(XMLElement.prototype,"namespaceURI",{get:function(){return""}});Object.defineProperty(XMLElement.prototype,"prefix",{get:function(){return""}});Object.defineProperty(XMLElement.prototype,"localName",{get:function(){return this.name}});Object.defineProperty(XMLElement.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"attributes",{get:function(){if(!this.attributeMap||!this.attributeMap.nodes){this.attributeMap=new u(this.attribs)}return this.attributeMap}});XMLElement.prototype.clone=function(){var r,i,o,a;o=Object.create(this);if(o.isRoot){o.documentObject=null}o.attribs={};a=this.attribs;for(i in a){if(!g.call(a,i))continue;r=a[i];o.attribs[i]=r.clone()}o.children=[];this.children.forEach((function(r){var i;i=r.clone();i.parent=o;return o.children.push(i)}));return o};XMLElement.prototype.attribute=function(r,i){var o,l;if(r!=null){r=h(r)}if(p(r)){for(o in r){if(!g.call(r,o))continue;l=r[o];this.attribute(o,l)}}else{if(d(i)){i=i.apply()}if(this.options.keepNullAttributes&&i==null){this.attribs[r]=new a(this,r,"")}else if(i!=null){this.attribs[r]=new a(this,r,i)}}return this};XMLElement.prototype.removeAttribute=function(r){var i,o,a;if(r==null){throw new Error("Missing attribute name. "+this.debugInfo())}r=h(r);if(Array.isArray(r)){for(o=0,a=r.length;o<a;o++){i=r[o];delete this.attribs[i]}}else{delete this.attribs[r]}return this};XMLElement.prototype.toString=function(r){return this.options.writer.element(this,this.options.writer.filterOptions(r))};XMLElement.prototype.att=function(r,i){return this.attribute(r,i)};XMLElement.prototype.a=function(r,i){return this.attribute(r,i)};XMLElement.prototype.getAttribute=function(r){if(this.attribs.hasOwnProperty(r)){return this.attribs[r].value}else{return null}};XMLElement.prototype.setAttribute=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getAttributeNode=function(r){if(this.attribs.hasOwnProperty(r)){return this.attribs[r]}else{return null}};XMLElement.prototype.setAttributeNode=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.removeAttributeNode=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByTagName=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getAttributeNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.setAttributeNS=function(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.removeAttributeNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getAttributeNodeNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.setAttributeNodeNS=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByTagNameNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.hasAttribute=function(r){return this.attribs.hasOwnProperty(r)};XMLElement.prototype.hasAttributeNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.setIdAttribute=function(r,i){if(this.attribs.hasOwnProperty(r)){return this.attribs[r].isId}else{return i}};XMLElement.prototype.setIdAttributeNS=function(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.setIdAttributeNode=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByTagName=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByTagNameNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByClassName=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.isEqualNode=function(r){var i,o,a;if(!XMLElement.__super__.isEqualNode.apply(this,arguments).isEqualNode(r)){return false}if(r.namespaceURI!==this.namespaceURI){return false}if(r.prefix!==this.prefix){return false}if(r.localName!==this.localName){return false}if(r.attribs.length!==this.attribs.length){return false}for(i=o=0,a=this.attribs.length-1;0<=a?o<=a:o>=a;i=0<=a?++o:--o){if(!this.attribs[i].isEqualNode(r.attribs[i])){return false}}return true};return XMLElement}(c)}).call(this)},8339:function(r){(function(){var i;r.exports=i=function(){function XMLNamedNodeMap(r){this.nodes=r}Object.defineProperty(XMLNamedNodeMap.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}});XMLNamedNodeMap.prototype.clone=function(){return this.nodes=null};XMLNamedNodeMap.prototype.getNamedItem=function(r){return this.nodes[r]};XMLNamedNodeMap.prototype.setNamedItem=function(r){var i;i=this.nodes[r.nodeName];this.nodes[r.nodeName]=r;return i||null};XMLNamedNodeMap.prototype.removeNamedItem=function(r){var i;i=this.nodes[r];delete this.nodes[r];return i||null};XMLNamedNodeMap.prototype.item=function(r){return this.nodes[Object.keys(this.nodes)[r]]||null};XMLNamedNodeMap.prototype.getNamedItemNS=function(r,i){throw new Error("This DOM method is not implemented.")};XMLNamedNodeMap.prototype.setNamedItemNS=function(r){throw new Error("This DOM method is not implemented.")};XMLNamedNodeMap.prototype.removeNamedItemNS=function(r,i){throw new Error("This DOM method is not implemented.")};return XMLNamedNodeMap}()}).call(this)},8064:function(r,i,o){(function(){var i,a,l,u,c,h,d,p,m,g,y,v,b,w,M,E,D,T,x,O={}.hasOwnProperty;x=o(2629),T=x.isObject,D=x.isFunction,E=x.isEmpty,M=x.getValue;p=null;l=null;u=null;c=null;h=null;b=null;w=null;v=null;d=null;a=null;y=null;m=null;i=null;r.exports=g=function(){function XMLNode(r){this.parent=r;if(this.parent){this.options=this.parent.options;this.stringify=this.parent.stringify}this.value=null;this.children=[];this.baseURI=null;if(!p){p=o(7370);l=o(6789);u=o(4593);c=o(4972);h=o(9025);b=o(363);w=o(8854);v=o(3234);d=o(3288);a=o(4128);y=o(7209);m=o(8339);i=o(2346)}}Object.defineProperty(XMLNode.prototype,"nodeName",{get:function(){return this.name}});Object.defineProperty(XMLNode.prototype,"nodeType",{get:function(){return this.type}});Object.defineProperty(XMLNode.prototype,"nodeValue",{get:function(){return this.value}});Object.defineProperty(XMLNode.prototype,"parentNode",{get:function(){return this.parent}});Object.defineProperty(XMLNode.prototype,"childNodes",{get:function(){if(!this.childNodeList||!this.childNodeList.nodes){this.childNodeList=new y(this.children)}return this.childNodeList}});Object.defineProperty(XMLNode.prototype,"firstChild",{get:function(){return this.children[0]||null}});Object.defineProperty(XMLNode.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}});Object.defineProperty(XMLNode.prototype,"previousSibling",{get:function(){var r;r=this.parent.children.indexOf(this);return this.parent.children[r-1]||null}});Object.defineProperty(XMLNode.prototype,"nextSibling",{get:function(){var r;r=this.parent.children.indexOf(this);return this.parent.children[r+1]||null}});Object.defineProperty(XMLNode.prototype,"ownerDocument",{get:function(){return this.document()||null}});Object.defineProperty(XMLNode.prototype,"textContent",{get:function(){var r,i,o,l,u;if(this.nodeType===a.Element||this.nodeType===a.DocumentFragment){u="";l=this.children;for(i=0,o=l.length;i<o;i++){r=l[i];if(r.textContent){u+=r.textContent}}return u}else{return null}},set:function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}});XMLNode.prototype.setParent=function(r){var i,o,a,l,u;this.parent=r;if(r){this.options=r.options;this.stringify=r.stringify}l=this.children;u=[];for(o=0,a=l.length;o<a;o++){i=l[o];u.push(i.setParent(this))}return u};XMLNode.prototype.element=function(r,i,o){var a,l,u,c,h,d,p,m,g,y,v;d=null;if(i===null&&o==null){g=[{},null],i=g[0],o=g[1]}if(i==null){i={}}i=M(i);if(!T(i)){y=[i,o],o=y[0],i=y[1]}if(r!=null){r=M(r)}if(Array.isArray(r)){for(u=0,p=r.length;u<p;u++){l=r[u];d=this.element(l)}}else if(D(r)){d=this.element(r.apply())}else if(T(r)){for(h in r){if(!O.call(r,h))continue;v=r[h];if(D(v)){v=v.apply()}if(!this.options.ignoreDecorators&&this.stringify.convertAttKey&&h.indexOf(this.stringify.convertAttKey)===0){d=this.attribute(h.substr(this.stringify.convertAttKey.length),v)}else if(!this.options.separateArrayItems&&Array.isArray(v)&&E(v)){d=this.dummy()}else if(T(v)&&E(v)){d=this.element(h)}else if(!this.options.keepNullNodes&&v==null){d=this.dummy()}else if(!this.options.separateArrayItems&&Array.isArray(v)){for(c=0,m=v.length;c<m;c++){l=v[c];a={};a[h]=l;d=this.element(a)}}else if(T(v)){if(!this.options.ignoreDecorators&&this.stringify.convertTextKey&&h.indexOf(this.stringify.convertTextKey)===0){d=this.element(v)}else{d=this.element(h);d.element(v)}}else{d=this.element(h,v)}}}else if(!this.options.keepNullNodes&&o===null){d=this.dummy()}else{if(!this.options.ignoreDecorators&&this.stringify.convertTextKey&&r.indexOf(this.stringify.convertTextKey)===0){d=this.text(o)}else if(!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&r.indexOf(this.stringify.convertCDataKey)===0){d=this.cdata(o)}else if(!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&r.indexOf(this.stringify.convertCommentKey)===0){d=this.comment(o)}else if(!this.options.ignoreDecorators&&this.stringify.convertRawKey&&r.indexOf(this.stringify.convertRawKey)===0){d=this.raw(o)}else if(!this.options.ignoreDecorators&&this.stringify.convertPIKey&&r.indexOf(this.stringify.convertPIKey)===0){d=this.instruction(r.substr(this.stringify.convertPIKey.length),o)}else{d=this.node(r,i,o)}}if(d==null){throw new Error("Could not create any elements with: "+r+". "+this.debugInfo())}return d};XMLNode.prototype.insertBefore=function(r,i,o){var a,l,u,c,h;if(r!=null?r.type:void 0){u=r;c=i;u.setParent(this);if(c){l=children.indexOf(c);h=children.splice(l);children.push(u);Array.prototype.push.apply(children,h)}else{children.push(u)}return u}else{if(this.isRoot){throw new Error("Cannot insert elements at root level. "+this.debugInfo(r))}l=this.parent.children.indexOf(this);h=this.parent.children.splice(l);a=this.parent.element(r,i,o);Array.prototype.push.apply(this.parent.children,h);return a}};XMLNode.prototype.insertAfter=function(r,i,o){var a,l,u;if(this.isRoot){throw new Error("Cannot insert elements at root level. "+this.debugInfo(r))}l=this.parent.children.indexOf(this);u=this.parent.children.splice(l+1);a=this.parent.element(r,i,o);Array.prototype.push.apply(this.parent.children,u);return a};XMLNode.prototype.remove=function(){var r,i;if(this.isRoot){throw new Error("Cannot remove the root element. "+this.debugInfo())}r=this.parent.children.indexOf(this);[].splice.apply(this.parent.children,[r,r-r+1].concat(i=[])),i;return this.parent};XMLNode.prototype.node=function(r,i,o){var a,l;if(r!=null){r=M(r)}i||(i={});i=M(i);if(!T(i)){l=[i,o],o=l[0],i=l[1]}a=new p(this,r,i);if(o!=null){a.text(o)}this.children.push(a);return a};XMLNode.prototype.text=function(r){var i;if(T(r)){this.element(r)}i=new w(this,r);this.children.push(i);return this};XMLNode.prototype.cdata=function(r){var i;i=new l(this,r);this.children.push(i);return this};XMLNode.prototype.comment=function(r){var i;i=new u(this,r);this.children.push(i);return this};XMLNode.prototype.commentBefore=function(r){var i,o,a;o=this.parent.children.indexOf(this);a=this.parent.children.splice(o);i=this.parent.comment(r);Array.prototype.push.apply(this.parent.children,a);return this};XMLNode.prototype.commentAfter=function(r){var i,o,a;o=this.parent.children.indexOf(this);a=this.parent.children.splice(o+1);i=this.parent.comment(r);Array.prototype.push.apply(this.parent.children,a);return this};XMLNode.prototype.raw=function(r){var i;i=new b(this,r);this.children.push(i);return this};XMLNode.prototype.dummy=function(){var r;r=new d(this);return r};XMLNode.prototype.instruction=function(r,i){var o,a,l,u,c;if(r!=null){r=M(r)}if(i!=null){i=M(i)}if(Array.isArray(r)){for(u=0,c=r.length;u<c;u++){o=r[u];this.instruction(o)}}else if(T(r)){for(o in r){if(!O.call(r,o))continue;a=r[o];this.instruction(o,a)}}else{if(D(i)){i=i.apply()}l=new v(this,r,i);this.children.push(l)}return this};XMLNode.prototype.instructionBefore=function(r,i){var o,a,l;a=this.parent.children.indexOf(this);l=this.parent.children.splice(a);o=this.parent.instruction(r,i);Array.prototype.push.apply(this.parent.children,l);return this};XMLNode.prototype.instructionAfter=function(r,i){var o,a,l;a=this.parent.children.indexOf(this);l=this.parent.children.splice(a+1);o=this.parent.instruction(r,i);Array.prototype.push.apply(this.parent.children,l);return this};XMLNode.prototype.declaration=function(r,i,o){var l,u;l=this.document();u=new c(l,r,i,o);if(l.children.length===0){l.children.unshift(u)}else if(l.children[0].type===a.Declaration){l.children[0]=u}else{l.children.unshift(u)}return l.root()||l};XMLNode.prototype.dtd=function(r,i){var o,l,u,c,d,p,m,g,y,v;l=this.document();u=new h(l,r,i);y=l.children;for(c=d=0,m=y.length;d<m;c=++d){o=y[c];if(o.type===a.DocType){l.children[c]=u;return u}}v=l.children;for(c=p=0,g=v.length;p<g;c=++p){o=v[c];if(o.isRoot){l.children.splice(c,0,u);return u}}l.children.push(u);return u};XMLNode.prototype.up=function(){if(this.isRoot){throw new Error("The root node has no parent. Use doc() if you need to get the document object.")}return this.parent};XMLNode.prototype.root=function(){var r;r=this;while(r){if(r.type===a.Document){return r.rootObject}else if(r.isRoot){return r}else{r=r.parent}}};XMLNode.prototype.document=function(){var r;r=this;while(r){if(r.type===a.Document){return r}else{r=r.parent}}};XMLNode.prototype.end=function(r){return this.document().end(r)};XMLNode.prototype.prev=function(){var r;r=this.parent.children.indexOf(this);if(r<1){throw new Error("Already at the first node. "+this.debugInfo())}return this.parent.children[r-1]};XMLNode.prototype.next=function(){var r;r=this.parent.children.indexOf(this);if(r===-1||r===this.parent.children.length-1){throw new Error("Already at the last node. "+this.debugInfo())}return this.parent.children[r+1]};XMLNode.prototype.importDocument=function(r){var i;i=r.root().clone();i.parent=this;i.isRoot=false;this.children.push(i);return this};XMLNode.prototype.debugInfo=function(r){var i,o;r=r||this.name;if(r==null&&!((i=this.parent)!=null?i.name:void 0)){return""}else if(r==null){return"parent: <"+this.parent.name+">"}else if(!((o=this.parent)!=null?o.name:void 0)){return"node: <"+r+">"}else{return"node: <"+r+">, parent: <"+this.parent.name+">"}};XMLNode.prototype.ele=function(r,i,o){return this.element(r,i,o)};XMLNode.prototype.nod=function(r,i,o){return this.node(r,i,o)};XMLNode.prototype.txt=function(r){return this.text(r)};XMLNode.prototype.dat=function(r){return this.cdata(r)};XMLNode.prototype.com=function(r){return this.comment(r)};XMLNode.prototype.ins=function(r,i){return this.instruction(r,i)};XMLNode.prototype.doc=function(){return this.document()};XMLNode.prototype.dec=function(r,i,o){return this.declaration(r,i,o)};XMLNode.prototype.e=function(r,i,o){return this.element(r,i,o)};XMLNode.prototype.n=function(r,i,o){return this.node(r,i,o)};XMLNode.prototype.t=function(r){return this.text(r)};XMLNode.prototype.d=function(r){return this.cdata(r)};XMLNode.prototype.c=function(r){return this.comment(r)};XMLNode.prototype.r=function(r){return this.raw(r)};XMLNode.prototype.i=function(r,i){return this.instruction(r,i)};XMLNode.prototype.u=function(){return this.up()};XMLNode.prototype.importXMLBuilder=function(r){return this.importDocument(r)};XMLNode.prototype.replaceChild=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.removeChild=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.appendChild=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.hasChildNodes=function(){return this.children.length!==0};XMLNode.prototype.cloneNode=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.isSupported=function(r,i){return true};XMLNode.prototype.hasAttributes=function(){return this.attribs.length!==0};XMLNode.prototype.compareDocumentPosition=function(r){var o,a;o=this;if(o===r){return 0}else if(this.document()!==r.document()){a=i.Disconnected|i.ImplementationSpecific;if(Math.random()<.5){a|=i.Preceding}else{a|=i.Following}return a}else if(o.isAncestor(r)){return i.Contains|i.Preceding}else if(o.isDescendant(r)){return i.Contains|i.Following}else if(o.isPreceding(r)){return i.Preceding}else{return i.Following}};XMLNode.prototype.isSameNode=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.lookupPrefix=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.isDefaultNamespace=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.lookupNamespaceURI=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.isEqualNode=function(r){var i,o,a;if(r.nodeType!==this.nodeType){return false}if(r.children.length!==this.children.length){return false}for(i=o=0,a=this.children.length-1;0<=a?o<=a:o>=a;i=0<=a?++o:--o){if(!this.children[i].isEqualNode(r.children[i])){return false}}return true};XMLNode.prototype.getFeature=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.setUserData=function(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.getUserData=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.contains=function(r){if(!r){return false}return r===this||this.isDescendant(r)};XMLNode.prototype.isDescendant=function(r){var i,o,a,l,u;u=this.children;for(a=0,l=u.length;a<l;a++){i=u[a];if(r===i){return true}o=i.isDescendant(r);if(o){return true}}return false};XMLNode.prototype.isAncestor=function(r){return r.isDescendant(this)};XMLNode.prototype.isPreceding=function(r){var i,o;i=this.treePosition(r);o=this.treePosition(this);if(i===-1||o===-1){return false}else{return i<o}};XMLNode.prototype.isFollowing=function(r){var i,o;i=this.treePosition(r);o=this.treePosition(this);if(i===-1||o===-1){return false}else{return i>o}};XMLNode.prototype.treePosition=function(r){var i,o;o=0;i=false;this.foreachTreeNode(this.document(),(function(a){o++;if(!i&&a===r){return i=true}}));if(i){return o}else{return-1}};XMLNode.prototype.foreachTreeNode=function(r,i){var o,a,l,u,c;r||(r=this.document());u=r.children;for(a=0,l=u.length;a<l;a++){o=u[a];if(c=i(o)){return c}else{c=this.foreachTreeNode(o,i);if(c){return c}}}};return XMLNode}()}).call(this)},7209:function(r){(function(){var i;r.exports=i=function(){function XMLNodeList(r){this.nodes=r}Object.defineProperty(XMLNodeList.prototype,"length",{get:function(){return this.nodes.length||0}});XMLNodeList.prototype.clone=function(){return this.nodes=null};XMLNodeList.prototype.item=function(r){return this.nodes[r]||null};return XMLNodeList}()}).call(this)},3234:function(r,i,o){(function(){var i,a,l,extend=function(r,i){for(var o in i){if(u.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},u={}.hasOwnProperty;i=o(4128);a=o(3527);r.exports=l=function(r){extend(XMLProcessingInstruction,r);function XMLProcessingInstruction(r,o,a){XMLProcessingInstruction.__super__.constructor.call(this,r);if(o==null){throw new Error("Missing instruction target. "+this.debugInfo())}this.type=i.ProcessingInstruction;this.target=this.stringify.insTarget(o);this.name=this.target;if(a){this.value=this.stringify.insValue(a)}}XMLProcessingInstruction.prototype.clone=function(){return Object.create(this)};XMLProcessingInstruction.prototype.toString=function(r){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(r))};XMLProcessingInstruction.prototype.isEqualNode=function(r){if(!XMLProcessingInstruction.__super__.isEqualNode.apply(this,arguments).isEqualNode(r)){return false}if(r.target!==this.target){return false}return true};return XMLProcessingInstruction}(a)}).call(this)},363:function(r,i,o){(function(){var i,a,l,extend=function(r,i){for(var o in i){if(u.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},u={}.hasOwnProperty;i=o(4128);a=o(8064);r.exports=l=function(r){extend(XMLRaw,r);function XMLRaw(r,o){XMLRaw.__super__.constructor.call(this,r);if(o==null){throw new Error("Missing raw text. "+this.debugInfo())}this.type=i.Raw;this.value=this.stringify.raw(o)}XMLRaw.prototype.clone=function(){return Object.create(this)};XMLRaw.prototype.toString=function(r){return this.options.writer.raw(this,this.options.writer.filterOptions(r))};return XMLRaw}(a)}).call(this)},359:function(r,i,o){(function(){var i,a,l,u,extend=function(r,i){for(var o in i){if(c.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},c={}.hasOwnProperty;i=o(4128);u=o(8126);a=o(8413);r.exports=l=function(r){extend(XMLStreamWriter,r);function XMLStreamWriter(r,i){this.stream=r;XMLStreamWriter.__super__.constructor.call(this,i)}XMLStreamWriter.prototype.endline=function(r,i,o){if(r.isLastRootNode&&i.state===a.CloseTag){return""}else{return XMLStreamWriter.__super__.endline.call(this,r,i,o)}};XMLStreamWriter.prototype.document=function(r,i){var o,a,l,u,c,h,d,p,m;d=r.children;for(a=l=0,c=d.length;l<c;a=++l){o=d[a];o.isLastRootNode=a===r.children.length-1}i=this.filterOptions(i);p=r.children;m=[];for(u=0,h=p.length;u<h;u++){o=p[u];m.push(this.writeChildNode(o,i,0))}return m};XMLStreamWriter.prototype.attribute=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.attribute.call(this,r,i,o))};XMLStreamWriter.prototype.cdata=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.cdata.call(this,r,i,o))};XMLStreamWriter.prototype.comment=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.comment.call(this,r,i,o))};XMLStreamWriter.prototype.declaration=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.declaration.call(this,r,i,o))};XMLStreamWriter.prototype.docType=function(r,i,o){var l,u,c,h;o||(o=0);this.openNode(r,i,o);i.state=a.OpenTag;this.stream.write(this.indent(r,i,o));this.stream.write("<!DOCTYPE "+r.root().name);if(r.pubID&&r.sysID){this.stream.write(' PUBLIC "'+r.pubID+'" "'+r.sysID+'"')}else if(r.sysID){this.stream.write(' SYSTEM "'+r.sysID+'"')}if(r.children.length>0){this.stream.write(" [");this.stream.write(this.endline(r,i,o));i.state=a.InsideTag;h=r.children;for(u=0,c=h.length;u<c;u++){l=h[u];this.writeChildNode(l,i,o+1)}i.state=a.CloseTag;this.stream.write("]")}i.state=a.CloseTag;this.stream.write(i.spaceBeforeSlash+">");this.stream.write(this.endline(r,i,o));i.state=a.None;return this.closeNode(r,i,o)};XMLStreamWriter.prototype.element=function(r,o,l){var u,h,d,p,m,g,y,v,b,w;l||(l=0);this.openNode(r,o,l);o.state=a.OpenTag;this.stream.write(this.indent(r,o,l)+"<"+r.name);b=r.attribs;for(y in b){if(!c.call(b,y))continue;u=b[y];this.attribute(u,o,l)}d=r.children.length;p=d===0?null:r.children[0];if(d===0||r.children.every((function(r){return(r.type===i.Text||r.type===i.Raw)&&r.value===""}))){if(o.allowEmpty){this.stream.write(">");o.state=a.CloseTag;this.stream.write("</"+r.name+">")}else{o.state=a.CloseTag;this.stream.write(o.spaceBeforeSlash+"/>")}}else if(o.pretty&&d===1&&(p.type===i.Text||p.type===i.Raw)&&p.value!=null){this.stream.write(">");o.state=a.InsideTag;o.suppressPrettyCount++;v=true;this.writeChildNode(p,o,l+1);o.suppressPrettyCount--;v=false;o.state=a.CloseTag;this.stream.write("</"+r.name+">")}else{this.stream.write(">"+this.endline(r,o,l));o.state=a.InsideTag;w=r.children;for(m=0,g=w.length;m<g;m++){h=w[m];this.writeChildNode(h,o,l+1)}o.state=a.CloseTag;this.stream.write(this.indent(r,o,l)+"</"+r.name+">")}this.stream.write(this.endline(r,o,l));o.state=a.None;return this.closeNode(r,o,l)};XMLStreamWriter.prototype.processingInstruction=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.processingInstruction.call(this,r,i,o))};XMLStreamWriter.prototype.raw=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.raw.call(this,r,i,o))};XMLStreamWriter.prototype.text=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.text.call(this,r,i,o))};XMLStreamWriter.prototype.dtdAttList=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.dtdAttList.call(this,r,i,o))};XMLStreamWriter.prototype.dtdElement=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.dtdElement.call(this,r,i,o))};XMLStreamWriter.prototype.dtdEntity=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.dtdEntity.call(this,r,i,o))};XMLStreamWriter.prototype.dtdNotation=function(r,i,o){return this.stream.write(XMLStreamWriter.__super__.dtdNotation.call(this,r,i,o))};return XMLStreamWriter}(u)}).call(this)},6939:function(r,i,o){(function(){var i,a,extend=function(r,i){for(var o in i){if(l.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},l={}.hasOwnProperty;a=o(8126);r.exports=i=function(r){extend(XMLStringWriter,r);function XMLStringWriter(r){XMLStringWriter.__super__.constructor.call(this,r)}XMLStringWriter.prototype.document=function(r,i){var o,a,l,u,c;i=this.filterOptions(i);u="";c=r.children;for(a=0,l=c.length;a<l;a++){o=c[a];u+=this.writeChildNode(o,i,0)}if(i.pretty&&u.slice(-i.newline.length)===i.newline){u=u.slice(0,-i.newline.length)}return u};return XMLStringWriter}(a)}).call(this)},916:function(r){(function(){var i,bind=function(r,i){return function(){return r.apply(i,arguments)}},o={}.hasOwnProperty;r.exports=i=function(){function XMLStringifier(r){this.assertLegalName=bind(this.assertLegalName,this);this.assertLegalChar=bind(this.assertLegalChar,this);var i,a,l;r||(r={});this.options=r;if(!this.options.version){this.options.version="1.0"}a=r.stringify||{};for(i in a){if(!o.call(a,i))continue;l=a[i];this[i]=l}}XMLStringifier.prototype.name=function(r){if(this.options.noValidation){return r}return this.assertLegalName(""+r||"")};XMLStringifier.prototype.text=function(r){if(this.options.noValidation){return r}return this.assertLegalChar(this.textEscape(""+r||""))};XMLStringifier.prototype.cdata=function(r){if(this.options.noValidation){return r}r=""+r||"";r=r.replace("]]>","]]]]><![CDATA[>");return this.assertLegalChar(r)};XMLStringifier.prototype.comment=function(r){if(this.options.noValidation){return r}r=""+r||"";if(r.match(/--/)){throw new Error("Comment text cannot contain double-hypen: "+r)}return this.assertLegalChar(r)};XMLStringifier.prototype.raw=function(r){if(this.options.noValidation){return r}return""+r||""};XMLStringifier.prototype.attValue=function(r){if(this.options.noValidation){return r}return this.assertLegalChar(this.attEscape(r=""+r||""))};XMLStringifier.prototype.insTarget=function(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")};XMLStringifier.prototype.insValue=function(r){if(this.options.noValidation){return r}r=""+r||"";if(r.match(/\?>/)){throw new Error("Invalid processing instruction value: "+r)}return this.assertLegalChar(r)};XMLStringifier.prototype.xmlVersion=function(r){if(this.options.noValidation){return r}r=""+r||"";if(!r.match(/1\.[0-9]+/)){throw new Error("Invalid version number: "+r)}return r};XMLStringifier.prototype.xmlEncoding=function(r){if(this.options.noValidation){return r}r=""+r||"";if(!r.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)){throw new Error("Invalid encoding: "+r)}return this.assertLegalChar(r)};XMLStringifier.prototype.xmlStandalone=function(r){if(this.options.noValidation){return r}if(r){return"yes"}else{return"no"}};XMLStringifier.prototype.dtdPubID=function(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")};XMLStringifier.prototype.dtdSysID=function(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")};XMLStringifier.prototype.dtdElementValue=function(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")};XMLStringifier.prototype.dtdAttType=function(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")};XMLStringifier.prototype.dtdAttDefault=function(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")};XMLStringifier.prototype.dtdEntityValue=function(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")};XMLStringifier.prototype.dtdNData=function(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")};XMLStringifier.prototype.convertAttKey="@";XMLStringifier.prototype.convertPIKey="?";XMLStringifier.prototype.convertTextKey="#text";XMLStringifier.prototype.convertCDataKey="#cdata";XMLStringifier.prototype.convertCommentKey="#comment";XMLStringifier.prototype.convertRawKey="#raw";XMLStringifier.prototype.assertLegalChar=function(r){var i,o;if(this.options.noValidation){return r}i="";if(this.options.version==="1.0"){i=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;if(o=r.match(i)){throw new Error("Invalid character in string: "+r+" at index "+o.index)}}else if(this.options.version==="1.1"){i=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;if(o=r.match(i)){throw new Error("Invalid character in string: "+r+" at index "+o.index)}}return r};XMLStringifier.prototype.assertLegalName=function(r){var i;if(this.options.noValidation){return r}this.assertLegalChar(r);i=/^([: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])*$/;if(!r.match(i)){throw new Error("Invalid character in name")}return r};XMLStringifier.prototype.textEscape=function(r){var i;if(this.options.noValidation){return r}i=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g;return r.replace(i,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;")};XMLStringifier.prototype.attEscape=function(r){var i;if(this.options.noValidation){return r}i=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g;return r.replace(i,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;")};return XMLStringifier}()}).call(this)},8854:function(r,i,o){(function(){var i,a,l,extend=function(r,i){for(var o in i){if(u.call(i,o))r[o]=i[o]}function ctor(){this.constructor=r}ctor.prototype=i.prototype;r.prototype=new ctor;r.__super__=i.prototype;return r},u={}.hasOwnProperty;i=o(4128);a=o(3527);r.exports=l=function(r){extend(XMLText,r);function XMLText(r,o){XMLText.__super__.constructor.call(this,r);if(o==null){throw new Error("Missing element text. "+this.debugInfo())}this.name="#text";this.type=i.Text;this.value=this.stringify.text(o)}Object.defineProperty(XMLText.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLText.prototype,"wholeText",{get:function(){var r,i,o;o="";i=this.previousSibling;while(i){o=i.data+o;i=i.previousSibling}o+=this.data;r=this.nextSibling;while(r){o=o+r.data;r=r.nextSibling}return o}});XMLText.prototype.clone=function(){return Object.create(this)};XMLText.prototype.toString=function(r){return this.options.writer.text(this,this.options.writer.filterOptions(r))};XMLText.prototype.splitText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLText.prototype.replaceWholeText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())};return XMLText}(a)}).call(this)},8126:function(r,i,o){(function(){var i,a,l,u,c,h,d,p,m,g,y,v,b,w,M,E,D,T={}.hasOwnProperty;D=o(2629).assign;i=o(4128);m=o(4972);g=o(9025);l=o(6789);u=o(4593);v=o(7370);w=o(363);M=o(8854);b=o(3234);y=o(3288);c=o(1066);h=o(3584);d=o(9346);p=o(853);a=o(8413);r.exports=E=function(){function XMLWriterBase(r){var i,o,a;r||(r={});this.options=r;o=r.writer||{};for(i in o){if(!T.call(o,i))continue;a=o[i];this["_"+i]=this[i];this[i]=a}}XMLWriterBase.prototype.filterOptions=function(r){var i,o,l,u,c,h,d,p;r||(r={});r=D({},this.options,r);i={writer:this};i.pretty=r.pretty||false;i.allowEmpty=r.allowEmpty||false;i.indent=(o=r.indent)!=null?o:" ";i.newline=(l=r.newline)!=null?l:"\n";i.offset=(u=r.offset)!=null?u:0;i.dontPrettyTextNodes=(c=(h=r.dontPrettyTextNodes)!=null?h:r.dontprettytextnodes)!=null?c:0;i.spaceBeforeSlash=(d=(p=r.spaceBeforeSlash)!=null?p:r.spacebeforeslash)!=null?d:"";if(i.spaceBeforeSlash===true){i.spaceBeforeSlash=" "}i.suppressPrettyCount=0;i.user={};i.state=a.None;return i};XMLWriterBase.prototype.indent=function(r,i,o){var a;if(!i.pretty||i.suppressPrettyCount){return""}else if(i.pretty){a=(o||0)+i.offset+1;if(a>0){return new Array(a).join(i.indent)}}return""};XMLWriterBase.prototype.endline=function(r,i,o){if(!i.pretty||i.suppressPrettyCount){return""}else{return i.newline}};XMLWriterBase.prototype.attribute=function(r,i,o){var a;this.openAttribute(r,i,o);a=" "+r.name+'="'+r.value+'"';this.closeAttribute(r,i,o);return a};XMLWriterBase.prototype.cdata=function(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<![CDATA[";i.state=a.InsideTag;l+=r.value;i.state=a.CloseTag;l+="]]>"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l};XMLWriterBase.prototype.comment=function(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"\x3c!-- ";i.state=a.InsideTag;l+=r.value;i.state=a.CloseTag;l+=" --\x3e"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l};XMLWriterBase.prototype.declaration=function(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<?xml";i.state=a.InsideTag;l+=' version="'+r.version+'"';if(r.encoding!=null){l+=' encoding="'+r.encoding+'"'}if(r.standalone!=null){l+=' standalone="'+r.standalone+'"'}i.state=a.CloseTag;l+=i.spaceBeforeSlash+"?>";l+=this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l};XMLWriterBase.prototype.docType=function(r,i,o){var l,u,c,h,d;o||(o=0);this.openNode(r,i,o);i.state=a.OpenTag;h=this.indent(r,i,o);h+="<!DOCTYPE "+r.root().name;if(r.pubID&&r.sysID){h+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"'}else if(r.sysID){h+=' SYSTEM "'+r.sysID+'"'}if(r.children.length>0){h+=" [";h+=this.endline(r,i,o);i.state=a.InsideTag;d=r.children;for(u=0,c=d.length;u<c;u++){l=d[u];h+=this.writeChildNode(l,i,o+1)}i.state=a.CloseTag;h+="]"}i.state=a.CloseTag;h+=i.spaceBeforeSlash+">";h+=this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return h};XMLWriterBase.prototype.element=function(r,o,l){var u,c,h,d,p,m,g,y,v,b,w,M,E,D;l||(l=0);b=false;w="";this.openNode(r,o,l);o.state=a.OpenTag;w+=this.indent(r,o,l)+"<"+r.name;M=r.attribs;for(v in M){if(!T.call(M,v))continue;u=M[v];w+=this.attribute(u,o,l)}h=r.children.length;d=h===0?null:r.children[0];if(h===0||r.children.every((function(r){return(r.type===i.Text||r.type===i.Raw)&&r.value===""}))){if(o.allowEmpty){w+=">";o.state=a.CloseTag;w+="</"+r.name+">"+this.endline(r,o,l)}else{o.state=a.CloseTag;w+=o.spaceBeforeSlash+"/>"+this.endline(r,o,l)}}else if(o.pretty&&h===1&&(d.type===i.Text||d.type===i.Raw)&&d.value!=null){w+=">";o.state=a.InsideTag;o.suppressPrettyCount++;b=true;w+=this.writeChildNode(d,o,l+1);o.suppressPrettyCount--;b=false;o.state=a.CloseTag;w+="</"+r.name+">"+this.endline(r,o,l)}else{if(o.dontPrettyTextNodes){E=r.children;for(p=0,g=E.length;p<g;p++){c=E[p];if((c.type===i.Text||c.type===i.Raw)&&c.value!=null){o.suppressPrettyCount++;b=true;break}}}w+=">"+this.endline(r,o,l);o.state=a.InsideTag;D=r.children;for(m=0,y=D.length;m<y;m++){c=D[m];w+=this.writeChildNode(c,o,l+1)}o.state=a.CloseTag;w+=this.indent(r,o,l)+"</"+r.name+">";if(b){o.suppressPrettyCount--}w+=this.endline(r,o,l);o.state=a.None}this.closeNode(r,o,l);return w};XMLWriterBase.prototype.writeChildNode=function(r,o,a){switch(r.type){case i.CData:return this.cdata(r,o,a);case i.Comment:return this.comment(r,o,a);case i.Element:return this.element(r,o,a);case i.Raw:return this.raw(r,o,a);case i.Text:return this.text(r,o,a);case i.ProcessingInstruction:return this.processingInstruction(r,o,a);case i.Dummy:return"";case i.Declaration:return this.declaration(r,o,a);case i.DocType:return this.docType(r,o,a);case i.AttributeDeclaration:return this.dtdAttList(r,o,a);case i.ElementDeclaration:return this.dtdElement(r,o,a);case i.EntityDeclaration:return this.dtdEntity(r,o,a);case i.NotationDeclaration:return this.dtdNotation(r,o,a);default:throw new Error("Unknown XML node type: "+r.constructor.name)}};XMLWriterBase.prototype.processingInstruction=function(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<?";i.state=a.InsideTag;l+=r.target;if(r.value){l+=" "+r.value}i.state=a.CloseTag;l+=i.spaceBeforeSlash+"?>";l+=this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l};XMLWriterBase.prototype.raw=function(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o);i.state=a.InsideTag;l+=r.value;i.state=a.CloseTag;l+=this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l};XMLWriterBase.prototype.text=function(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o);i.state=a.InsideTag;l+=r.value;i.state=a.CloseTag;l+=this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l};XMLWriterBase.prototype.dtdAttList=function(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<!ATTLIST";i.state=a.InsideTag;l+=" "+r.elementName+" "+r.attributeName+" "+r.attributeType;if(r.defaultValueType!=="#DEFAULT"){l+=" "+r.defaultValueType}if(r.defaultValue){l+=' "'+r.defaultValue+'"'}i.state=a.CloseTag;l+=i.spaceBeforeSlash+">"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l};XMLWriterBase.prototype.dtdElement=function(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<!ELEMENT";i.state=a.InsideTag;l+=" "+r.name+" "+r.value;i.state=a.CloseTag;l+=i.spaceBeforeSlash+">"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l};XMLWriterBase.prototype.dtdEntity=function(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<!ENTITY";i.state=a.InsideTag;if(r.pe){l+=" %"}l+=" "+r.name;if(r.value){l+=' "'+r.value+'"'}else{if(r.pubID&&r.sysID){l+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"'}else if(r.sysID){l+=' SYSTEM "'+r.sysID+'"'}if(r.nData){l+=" NDATA "+r.nData}}i.state=a.CloseTag;l+=i.spaceBeforeSlash+">"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l};XMLWriterBase.prototype.dtdNotation=function(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<!NOTATION";i.state=a.InsideTag;l+=" "+r.name;if(r.pubID&&r.sysID){l+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"'}else if(r.pubID){l+=' PUBLIC "'+r.pubID+'"'}else if(r.sysID){l+=' SYSTEM "'+r.sysID+'"'}i.state=a.CloseTag;l+=i.spaceBeforeSlash+">"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l};XMLWriterBase.prototype.openNode=function(r,i,o){};XMLWriterBase.prototype.closeNode=function(r,i,o){};XMLWriterBase.prototype.openAttribute=function(r,i,o){};XMLWriterBase.prototype.closeAttribute=function(r,i,o){};return XMLWriterBase}()}).call(this)},3131:function(r,i,o){(function(){var i,a,l,u,c,h,d,p,m,g;g=o(2629),p=g.assign,m=g.isFunction;l=o(9490);u=o(3315);c=o(1523);d=o(6939);h=o(359);i=o(4128);a=o(8413);r.exports.create=function(r,i,o,a){var l,c;if(r==null){throw new Error("Root element needs a name.")}a=p({},i,o,a);l=new u(a);c=l.element(r);if(!a.headless){l.declaration(a);if(a.pubID!=null||a.sysID!=null){l.dtd(a)}}return c};r.exports.begin=function(r,i,o){var a;if(m(r)){a=[r,i],i=a[0],o=a[1];r={}}if(i){return new c(r,i,o)}else{return new u(r)}};r.exports.stringWriter=function(r){return new d(r)};r.exports.streamWriter=function(r,i){return new h(r,i)};r.exports.implementation=new l;r.exports.nodeType=i;r.exports.writerState=a}).call(this)},144:function(r){(function(){r.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},7762:function(r){(function(){r.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},983:function(r){(function(){var i,o,a,l,u,c,h,d={}.hasOwnProperty;i=function(r,...i){var o,a,l,c;if(u(Object.assign)){Object.assign.apply(null,arguments)}else{for(o=0,l=i.length;o<l;o++){c=i[o];if(c!=null){for(a in c){if(!d.call(c,a))continue;r[a]=c[a]}}}}return r};u=function(r){return!!r&&Object.prototype.toString.call(r)==="[object Function]"};c=function(r){var i;return!!r&&((i=typeof r)==="function"||i==="object")};a=function(r){if(u(Array.isArray)){return Array.isArray(r)}else{return Object.prototype.toString.call(r)==="[object Array]"}};l=function(r){var i;if(a(r)){return!r.length}else{for(i in r){if(!d.call(r,i))continue;return false}return true}};h=function(r){var i,o;return c(r)&&(o=Object.getPrototypeOf(r))&&(i=o.constructor)&&typeof i==="function"&&i instanceof i&&Function.prototype.toString.call(i)===Function.prototype.toString.call(Object)};o=function(r){if(u(r.valueOf)){return r.valueOf()}else{return r}};r.exports.assign=i;r.exports.isFunction=u;r.exports.isObject=c;r.exports.isArray=a;r.exports.isEmpty=l;r.exports.isPlainObject=h;r.exports.getValue=o}).call(this)},140:function(r){(function(){r.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},1395:function(r,i,o){(function(){var i,a,l;i=o(7762);l=o(5089);r.exports=a=function(){class XMLAttribute{constructor(r,o,a){this.parent=r;if(this.parent){this.options=this.parent.options;this.stringify=this.parent.stringify}if(o==null){throw new Error("Missing attribute name. "+this.debugInfo(o))}this.name=this.stringify.name(o);this.value=this.stringify.attValue(a);this.type=i.Attribute;this.isId=false;this.schemaTypeInfo=null}clone(){return Object.create(this)}toString(r){return this.options.writer.attribute(this,this.options.writer.filterOptions(r))}debugInfo(r){r=r||this.name;if(r==null){return"parent: <"+this.parent.name+">"}else{return"attribute: {"+r+"}, parent: <"+this.parent.name+">"}}isEqualNode(r){if(r.namespaceURI!==this.namespaceURI){return false}if(r.prefix!==this.prefix){return false}if(r.localName!==this.localName){return false}if(r.value!==this.value){return false}return true}}Object.defineProperty(XMLAttribute.prototype,"nodeType",{get:function(){return this.type}});Object.defineProperty(XMLAttribute.prototype,"ownerElement",{get:function(){return this.parent}});Object.defineProperty(XMLAttribute.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}});Object.defineProperty(XMLAttribute.prototype,"namespaceURI",{get:function(){return""}});Object.defineProperty(XMLAttribute.prototype,"prefix",{get:function(){return""}});Object.defineProperty(XMLAttribute.prototype,"localName",{get:function(){return this.name}});Object.defineProperty(XMLAttribute.prototype,"specified",{get:function(){return true}});return XMLAttribute}.call(this)}).call(this)},5261:function(r,i,o){(function(){var i,a,l;i=o(7762);l=o(4765);r.exports=a=class XMLCData extends l{constructor(r,o){super(r);if(o==null){throw new Error("Missing CDATA text. "+this.debugInfo())}this.name="#cdata-section";this.type=i.CData;this.value=this.stringify.cdata(o)}clone(){return Object.create(this)}toString(r){return this.options.writer.cdata(this,this.options.writer.filterOptions(r))}}}).call(this)},4765:function(r,i,o){(function(){var i,a;a=o(5089);r.exports=i=function(){class XMLCharacterData extends a{constructor(r){super(r);this.value=""}clone(){return Object.create(this)}substringData(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}appendData(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}insertData(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}deleteData(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}replaceData(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(r){if(!super.isEqualNode(r)){return false}if(r.data!==this.data){return false}return true}}Object.defineProperty(XMLCharacterData.prototype,"data",{get:function(){return this.value},set:function(r){return this.value=r||""}});Object.defineProperty(XMLCharacterData.prototype,"length",{get:function(){return this.value.length}});Object.defineProperty(XMLCharacterData.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}});return XMLCharacterData}.call(this)}).call(this)},360:function(r,i,o){(function(){var i,a,l;i=o(7762);a=o(4765);r.exports=l=class XMLComment extends a{constructor(r,o){super(r);if(o==null){throw new Error("Missing comment text. "+this.debugInfo())}this.name="#comment";this.type=i.Comment;this.value=this.stringify.comment(o)}clone(){return Object.create(this)}toString(r){return this.options.writer.comment(this,this.options.writer.filterOptions(r))}}}).call(this)},5675:function(r,i,o){(function(){var i,a,l;a=o(121);l=o(8207);r.exports=i=function(){class XMLDOMConfiguration{constructor(){var r;this.defaultParams={"canonical-form":false,"cdata-sections":false,comments:false,"datatype-normalization":false,"element-content-whitespace":true,entities:true,"error-handler":new a,infoset:true,"validate-if-schema":false,namespaces:true,"namespace-declarations":true,"normalize-characters":false,"schema-location":"","schema-type":"","split-cdata-sections":true,validate:false,"well-formed":true};this.params=r=Object.create(this.defaultParams)}getParameter(r){if(this.params.hasOwnProperty(r)){return this.params[r]}else{return null}}canSetParameter(r,i){return true}setParameter(r,i){if(i!=null){return this.params[r]=i}else{return delete this.params[r]}}}Object.defineProperty(XMLDOMConfiguration.prototype,"parameterNames",{get:function(){return new l(Object.keys(this.defaultParams))}});return XMLDOMConfiguration}.call(this)}).call(this)},121:function(r){(function(){var i;r.exports=i=class XMLDOMErrorHandler{constructor(){}handleError(r){throw new Error(r)}}}).call(this)},2692:function(r){(function(){var i;r.exports=i=class XMLDOMImplementation{hasFeature(r,i){return true}createDocumentType(r,i,o){throw new Error("This DOM method is not implemented.")}createDocument(r,i,o){throw new Error("This DOM method is not implemented.")}createHTMLDocument(r){throw new Error("This DOM method is not implemented.")}getFeature(r,i){throw new Error("This DOM method is not implemented.")}}}).call(this)},8207:function(r){(function(){var i;r.exports=i=function(){class XMLDOMStringList{constructor(r){this.arr=r||[]}item(r){return this.arr[r]||null}contains(r){return this.arr.indexOf(r)!==-1}}Object.defineProperty(XMLDOMStringList.prototype,"length",{get:function(){return this.arr.length}});return XMLDOMStringList}.call(this)}).call(this)},2529:function(r,i,o){(function(){var i,a,l;l=o(5089);i=o(7762);r.exports=a=class XMLDTDAttList extends l{constructor(r,o,a,l,u,c){super(r);if(o==null){throw new Error("Missing DTD element name. "+this.debugInfo())}if(a==null){throw new Error("Missing DTD attribute name. "+this.debugInfo(o))}if(!l){throw new Error("Missing DTD attribute type. "+this.debugInfo(o))}if(!u){throw new Error("Missing DTD attribute default. "+this.debugInfo(o))}if(u.indexOf("#")!==0){u="#"+u}if(!u.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)){throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(o))}if(c&&!u.match(/^(#FIXED|#DEFAULT)$/)){throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(o))}this.elementName=this.stringify.name(o);this.type=i.AttributeDeclaration;this.attributeName=this.stringify.name(a);this.attributeType=this.stringify.dtdAttType(l);if(c){this.defaultValue=this.stringify.dtdAttDefault(c)}this.defaultValueType=u}toString(r){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(r))}}}).call(this)},7486:function(r,i,o){(function(){var i,a,l;l=o(5089);i=o(7762);r.exports=a=class XMLDTDElement extends l{constructor(r,o,a){super(r);if(o==null){throw new Error("Missing DTD element name. "+this.debugInfo())}if(!a){a="(#PCDATA)"}if(Array.isArray(a)){a="("+a.join(",")+")"}this.name=this.stringify.name(o);this.type=i.ElementDeclaration;this.value=this.stringify.dtdElementValue(a)}toString(r){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(r))}}}).call(this)},9252:function(r,i,o){(function(){var i,a,l,u;({isObject:u}=o(983));l=o(5089);i=o(7762);r.exports=a=function(){class XMLDTDEntity extends l{constructor(r,o,a,l){super(r);if(a==null){throw new Error("Missing DTD entity name. "+this.debugInfo(a))}if(l==null){throw new Error("Missing DTD entity value. "+this.debugInfo(a))}this.pe=!!o;this.name=this.stringify.name(a);this.type=i.EntityDeclaration;if(!u(l)){this.value=this.stringify.dtdEntityValue(l);this.internal=true}else{if(!l.pubID&&!l.sysID){throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(a))}if(l.pubID&&!l.sysID){throw new Error("System identifier is required for a public external entity. "+this.debugInfo(a))}this.internal=false;if(l.pubID!=null){this.pubID=this.stringify.dtdPubID(l.pubID)}if(l.sysID!=null){this.sysID=this.stringify.dtdSysID(l.sysID)}if(l.nData!=null){this.nData=this.stringify.dtdNData(l.nData)}if(this.pe&&this.nData){throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(a))}}}toString(r){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(r))}}Object.defineProperty(XMLDTDEntity.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDTDEntity.prototype,"systemId",{get:function(){return this.sysID}});Object.defineProperty(XMLDTDEntity.prototype,"notationName",{get:function(){return this.nData||null}});Object.defineProperty(XMLDTDEntity.prototype,"inputEncoding",{get:function(){return null}});Object.defineProperty(XMLDTDEntity.prototype,"xmlEncoding",{get:function(){return null}});Object.defineProperty(XMLDTDEntity.prototype,"xmlVersion",{get:function(){return null}});return XMLDTDEntity}.call(this)}).call(this)},3353:function(r,i,o){(function(){var i,a,l;l=o(5089);i=o(7762);r.exports=a=function(){class XMLDTDNotation extends l{constructor(r,o,a){super(r);if(o==null){throw new Error("Missing DTD notation name. "+this.debugInfo(o))}if(!a.pubID&&!a.sysID){throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(o))}this.name=this.stringify.name(o);this.type=i.NotationDeclaration;if(a.pubID!=null){this.pubID=this.stringify.dtdPubID(a.pubID)}if(a.sysID!=null){this.sysID=this.stringify.dtdSysID(a.sysID)}}toString(r){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(r))}}Object.defineProperty(XMLDTDNotation.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDTDNotation.prototype,"systemId",{get:function(){return this.sysID}});return XMLDTDNotation}.call(this)}).call(this)},6645:function(r,i,o){(function(){var i,a,l,u;({isObject:u}=o(983));l=o(5089);i=o(7762);r.exports=a=class XMLDeclaration extends l{constructor(r,o,a,l){super(r);if(u(o)){({version:o,encoding:a,standalone:l}=o)}if(!o){o="1.0"}this.type=i.Declaration;this.version=this.stringify.xmlVersion(o);if(a!=null){this.encoding=this.stringify.xmlEncoding(a)}if(l!=null){this.standalone=this.stringify.xmlStandalone(l)}}toString(r){return this.options.writer.declaration(this,this.options.writer.filterOptions(r))}}}).call(this)},8873:function(r,i,o){(function(){var i,a,l,u,c,h,d,p,m;({isObject:m}=o(983));p=o(5089);i=o(7762);a=o(2529);u=o(9252);l=o(7486);c=o(3353);d=o(2076);r.exports=h=function(){class XMLDocType extends p{constructor(r,o,a){var l,u,c,h;super(r);this.type=i.DocType;if(r.children){h=r.children;for(u=0,c=h.length;u<c;u++){l=h[u];if(l.type===i.Element){this.name=l.name;break}}}this.documentObject=r;if(m(o)){({pubID:o,sysID:a}=o)}if(a==null){[a,o]=[o,a]}if(o!=null){this.pubID=this.stringify.dtdPubID(o)}if(a!=null){this.sysID=this.stringify.dtdSysID(a)}}element(r,i){var o;o=new l(this,r,i);this.children.push(o);return this}attList(r,i,o,l,u){var c;c=new a(this,r,i,o,l,u);this.children.push(c);return this}entity(r,i){var o;o=new u(this,false,r,i);this.children.push(o);return this}pEntity(r,i){var o;o=new u(this,true,r,i);this.children.push(o);return this}notation(r,i){var o;o=new c(this,r,i);this.children.push(o);return this}toString(r){return this.options.writer.docType(this,this.options.writer.filterOptions(r))}ele(r,i){return this.element(r,i)}att(r,i,o,a,l){return this.attList(r,i,o,a,l)}ent(r,i){return this.entity(r,i)}pent(r,i){return this.pEntity(r,i)}not(r,i){return this.notation(r,i)}up(){return this.root()||this.documentObject}isEqualNode(r){if(!super.isEqualNode(r)){return false}if(r.name!==this.name){return false}if(r.publicId!==this.publicId){return false}if(r.systemId!==this.systemId){return false}return true}}Object.defineProperty(XMLDocType.prototype,"entities",{get:function(){var r,o,a,l,u;l={};u=this.children;for(o=0,a=u.length;o<a;o++){r=u[o];if(r.type===i.EntityDeclaration&&!r.pe){l[r.name]=r}}return new d(l)}});Object.defineProperty(XMLDocType.prototype,"notations",{get:function(){var r,o,a,l,u;l={};u=this.children;for(o=0,a=u.length;o<a;o++){r=u[o];if(r.type===i.NotationDeclaration){l[r.name]=r}}return new d(l)}});Object.defineProperty(XMLDocType.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDocType.prototype,"systemId",{get:function(){return this.sysID}});Object.defineProperty(XMLDocType.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});return XMLDocType}.call(this)}).call(this)},1582:function(r,i,o){(function(){var i,a,l,u,c,h,d,p;({isPlainObject:p}=o(983));l=o(2692);a=o(5675);c=o(5089);i=o(7762);d=o(645);h=o(7834);r.exports=u=function(){class XMLDocument extends c{constructor(r){super(null);this.name="#document";this.type=i.Document;this.documentURI=null;this.domConfig=new a;r||(r={});if(!r.writer){r.writer=new h}this.options=r;this.stringify=new d(r)}end(r){var i;i={};if(!r){r=this.options.writer}else if(p(r)){i=r;r=this.options.writer}return r.document(this,r.filterOptions(i))}toString(r){return this.options.writer.document(this,this.options.writer.filterOptions(r))}createElement(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}createDocumentFragment(){throw new Error("This DOM method is not implemented."+this.debugInfo())}createTextNode(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}createComment(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}createCDATASection(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}createProcessingInstruction(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}createAttribute(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}createEntityReference(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagName(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}importNode(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}createElementNS(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}createAttributeNS(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagNameNS(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementById(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}adoptNode(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}normalizeDocument(){throw new Error("This DOM method is not implemented."+this.debugInfo())}renameNode(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByClassName(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}createEvent(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}createRange(){throw new Error("This DOM method is not implemented."+this.debugInfo())}createNodeIterator(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())}createTreeWalker(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())}}Object.defineProperty(XMLDocument.prototype,"implementation",{value:new l});Object.defineProperty(XMLDocument.prototype,"doctype",{get:function(){var r,o,a,l;l=this.children;for(o=0,a=l.length;o<a;o++){r=l[o];if(r.type===i.DocType){return r}}return null}});Object.defineProperty(XMLDocument.prototype,"documentElement",{get:function(){return this.rootObject||null}});Object.defineProperty(XMLDocument.prototype,"inputEncoding",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"strictErrorChecking",{get:function(){return false}});Object.defineProperty(XMLDocument.prototype,"xmlEncoding",{get:function(){if(this.children.length!==0&&this.children[0].type===i.Declaration){return this.children[0].encoding}else{return null}}});Object.defineProperty(XMLDocument.prototype,"xmlStandalone",{get:function(){if(this.children.length!==0&&this.children[0].type===i.Declaration){return this.children[0].standalone==="yes"}else{return false}}});Object.defineProperty(XMLDocument.prototype,"xmlVersion",{get:function(){if(this.children.length!==0&&this.children[0].type===i.Declaration){return this.children[0].version}else{return"1.0"}}});Object.defineProperty(XMLDocument.prototype,"URL",{get:function(){return this.documentURI}});Object.defineProperty(XMLDocument.prototype,"origin",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"compatMode",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"characterSet",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"contentType",{get:function(){return null}});return XMLDocument}.call(this)}).call(this)},2871:function(r,i,o){(function(){var i,a,l,u,c,h,d,p,m,g,y,v,b,w,M,E,D,T,x,O,N,_,A,I={}.hasOwnProperty;({isObject:_,isFunction:N,isPlainObject:A,getValue:O}=o(983));i=o(7762);v=o(1582);w=o(6484);u=o(5261);c=o(360);E=o(8732);x=o(2275);M=o(8947);g=o(6645);y=o(8873);h=o(2529);p=o(9252);d=o(7486);m=o(3353);l=o(1395);T=o(645);D=o(7834);a=o(140);r.exports=b=class XMLDocumentCB{constructor(r,o,a){var l;this.name="?xml";this.type=i.Document;r||(r={});l={};if(!r.writer){r.writer=new D}else if(A(r.writer)){l=r.writer;r.writer=new D}this.options=r;this.writer=r.writer;this.writerOptions=this.writer.filterOptions(l);this.stringify=new T(r);this.onDataCallback=o||function(){};this.onEndCallback=a||function(){};this.currentNode=null;this.currentLevel=-1;this.openTags={};this.documentStarted=false;this.documentCompleted=false;this.root=null}createChildNode(r){var o,a,l,u,c,h,d,p;switch(r.type){case i.CData:this.cdata(r.value);break;case i.Comment:this.comment(r.value);break;case i.Element:l={};d=r.attribs;for(a in d){if(!I.call(d,a))continue;o=d[a];l[a]=o.value}this.node(r.name,l);break;case i.Dummy:this.dummy();break;case i.Raw:this.raw(r.value);break;case i.Text:this.text(r.value);break;case i.ProcessingInstruction:this.instruction(r.target,r.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+r.constructor.name)}p=r.children;for(c=0,h=p.length;c<h;c++){u=p[c];this.createChildNode(u);if(u.type===i.Element){this.up()}}return this}dummy(){return this}node(r,i,o){if(r==null){throw new Error("Missing node name.")}if(this.root&&this.currentLevel===-1){throw new Error("Document can only have one root node. "+this.debugInfo(r))}this.openCurrent();r=O(r);if(i==null){i={}}i=O(i);if(!_(i)){[o,i]=[i,o]}this.currentNode=new w(this,r,i);this.currentNode.children=false;this.currentLevel++;this.openTags[this.currentLevel]=this.currentNode;if(o!=null){this.text(o)}return this}element(r,o,a){var l,u,c,h,d,p;if(this.currentNode&&this.currentNode.type===i.DocType){this.dtdElement(...arguments)}else{if(Array.isArray(r)||_(r)||N(r)){h=this.options.noValidation;this.options.noValidation=true;p=new v(this.options).element("TEMP_ROOT");p.element(r);this.options.noValidation=h;d=p.children;for(u=0,c=d.length;u<c;u++){l=d[u];this.createChildNode(l);if(l.type===i.Element){this.up()}}}else{this.node(r,o,a)}}return this}attribute(r,i){var o,a;if(!this.currentNode||this.currentNode.children){throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(r))}if(r!=null){r=O(r)}if(_(r)){for(o in r){if(!I.call(r,o))continue;a=r[o];this.attribute(o,a)}}else{if(N(i)){i=i.apply()}if(this.options.keepNullAttributes&&i==null){this.currentNode.attribs[r]=new l(this,r,"")}else if(i!=null){this.currentNode.attribs[r]=new l(this,r,i)}}return this}text(r){var i;this.openCurrent();i=new x(this,r);this.onData(this.writer.text(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}cdata(r){var i;this.openCurrent();i=new u(this,r);this.onData(this.writer.cdata(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}comment(r){var i;this.openCurrent();i=new c(this,r);this.onData(this.writer.comment(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}raw(r){var i;this.openCurrent();i=new E(this,r);this.onData(this.writer.raw(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}instruction(r,i){var o,a,l,u,c;this.openCurrent();if(r!=null){r=O(r)}if(i!=null){i=O(i)}if(Array.isArray(r)){for(o=0,u=r.length;o<u;o++){a=r[o];this.instruction(a)}}else if(_(r)){for(a in r){if(!I.call(r,a))continue;l=r[a];this.instruction(a,l)}}else{if(N(i)){i=i.apply()}c=new M(this,r,i);this.onData(this.writer.processingInstruction(c,this.writerOptions,this.currentLevel+1),this.currentLevel+1)}return this}declaration(r,i,o){var a;this.openCurrent();if(this.documentStarted){throw new Error("declaration() must be the first node.")}a=new g(this,r,i,o);this.onData(this.writer.declaration(a,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}doctype(r,i,o){this.openCurrent();if(r==null){throw new Error("Missing root node name.")}if(this.root){throw new Error("dtd() must come before the root node.")}this.currentNode=new y(this,i,o);this.currentNode.rootNodeName=r;this.currentNode.children=false;this.currentLevel++;this.openTags[this.currentLevel]=this.currentNode;return this}dtdElement(r,i){var o;this.openCurrent();o=new d(this,r,i);this.onData(this.writer.dtdElement(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}attList(r,i,o,a,l){var u;this.openCurrent();u=new h(this,r,i,o,a,l);this.onData(this.writer.dtdAttList(u,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}entity(r,i){var o;this.openCurrent();o=new p(this,false,r,i);this.onData(this.writer.dtdEntity(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}pEntity(r,i){var o;this.openCurrent();o=new p(this,true,r,i);this.onData(this.writer.dtdEntity(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}notation(r,i){var o;this.openCurrent();o=new m(this,r,i);this.onData(this.writer.dtdNotation(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}up(){if(this.currentLevel<0){throw new Error("The document node has no parent.")}if(this.currentNode){if(this.currentNode.children){this.closeNode(this.currentNode)}else{this.openNode(this.currentNode)}this.currentNode=null}else{this.closeNode(this.openTags[this.currentLevel])}delete this.openTags[this.currentLevel];this.currentLevel--;return this}end(){while(this.currentLevel>=0){this.up()}return this.onEnd()}openCurrent(){if(this.currentNode){this.currentNode.children=true;return this.openNode(this.currentNode)}}openNode(r){var o,l,u,c;if(!r.isOpen){if(!this.root&&this.currentLevel===0&&r.type===i.Element){this.root=r}l="";if(r.type===i.Element){this.writerOptions.state=a.OpenTag;l=this.writer.indent(r,this.writerOptions,this.currentLevel)+"<"+r.name;c=r.attribs;for(u in c){if(!I.call(c,u))continue;o=c[u];l+=this.writer.attribute(o,this.writerOptions,this.currentLevel)}l+=(r.children?">":"/>")+this.writer.endline(r,this.writerOptions,this.currentLevel);this.writerOptions.state=a.InsideTag}else{this.writerOptions.state=a.OpenTag;l=this.writer.indent(r,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+r.rootNodeName;if(r.pubID&&r.sysID){l+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"'}else if(r.sysID){l+=' SYSTEM "'+r.sysID+'"'}if(r.children){l+=" [";this.writerOptions.state=a.InsideTag}else{this.writerOptions.state=a.CloseTag;l+=">"}l+=this.writer.endline(r,this.writerOptions,this.currentLevel)}this.onData(l,this.currentLevel);return r.isOpen=true}}closeNode(r){var o;if(!r.isClosed){o="";this.writerOptions.state=a.CloseTag;if(r.type===i.Element){o=this.writer.indent(r,this.writerOptions,this.currentLevel)+"</"+r.name+">"+this.writer.endline(r,this.writerOptions,this.currentLevel)}else{o=this.writer.indent(r,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(r,this.writerOptions,this.currentLevel)}this.writerOptions.state=a.None;this.onData(o,this.currentLevel);return r.isClosed=true}}onData(r,i){this.documentStarted=true;return this.onDataCallback(r,i+1)}onEnd(){this.documentCompleted=true;return this.onEndCallback()}debugInfo(r){if(r==null){return""}else{return"node: <"+r+">"}}ele(){return this.element(...arguments)}nod(r,i,o){return this.node(r,i,o)}txt(r){return this.text(r)}dat(r){return this.cdata(r)}com(r){return this.comment(r)}ins(r,i){return this.instruction(r,i)}dec(r,i,o){return this.declaration(r,i,o)}dtd(r,i,o){return this.doctype(r,i,o)}e(r,i,o){return this.element(r,i,o)}n(r,i,o){return this.node(r,i,o)}t(r){return this.text(r)}d(r){return this.cdata(r)}c(r){return this.comment(r)}r(r){return this.raw(r)}i(r,i){return this.instruction(r,i)}att(){if(this.currentNode&&this.currentNode.type===i.DocType){return this.attList(...arguments)}else{return this.attribute(...arguments)}}a(){if(this.currentNode&&this.currentNode.type===i.DocType){return this.attList(...arguments)}else{return this.attribute(...arguments)}}ent(r,i){return this.entity(r,i)}pent(r,i){return this.pEntity(r,i)}not(r,i){return this.notation(r,i)}}}).call(this)},706:function(r,i,o){(function(){var i,a,l;l=o(5089);i=o(7762);r.exports=a=class XMLDummy extends l{constructor(r){super(r);this.type=i.Dummy}clone(){return Object.create(this)}toString(r){return""}}}).call(this)},6484:function(r,i,o){(function(){var i,a,l,u,c,h,d,p,m={}.hasOwnProperty;({isObject:p,isFunction:d,getValue:h}=o(983));c=o(5089);i=o(7762);a=o(1395);u=o(2076);r.exports=l=function(){class XMLElement extends c{constructor(r,o,a){var l,u,c,h;super(r);if(o==null){throw new Error("Missing element name. "+this.debugInfo())}this.name=this.stringify.name(o);this.type=i.Element;this.attribs={};this.schemaTypeInfo=null;if(a!=null){this.attribute(a)}if(r.type===i.Document){this.isRoot=true;this.documentObject=r;r.rootObject=this;if(r.children){h=r.children;for(u=0,c=h.length;u<c;u++){l=h[u];if(l.type===i.DocType){l.name=this.name;break}}}}}clone(){var r,i,o,a;o=Object.create(this);if(o.isRoot){o.documentObject=null}o.attribs={};a=this.attribs;for(i in a){if(!m.call(a,i))continue;r=a[i];o.attribs[i]=r.clone()}o.children=[];this.children.forEach((function(r){var i;i=r.clone();i.parent=o;return o.children.push(i)}));return o}attribute(r,i){var o,l;if(r!=null){r=h(r)}if(p(r)){for(o in r){if(!m.call(r,o))continue;l=r[o];this.attribute(o,l)}}else{if(d(i)){i=i.apply()}if(this.options.keepNullAttributes&&i==null){this.attribs[r]=new a(this,r,"")}else if(i!=null){this.attribs[r]=new a(this,r,i)}}return this}removeAttribute(r){var i,o,a;if(r==null){throw new Error("Missing attribute name. "+this.debugInfo())}r=h(r);if(Array.isArray(r)){for(o=0,a=r.length;o<a;o++){i=r[o];delete this.attribs[i]}}else{delete this.attribs[r]}return this}toString(r){return this.options.writer.element(this,this.options.writer.filterOptions(r))}att(r,i){return this.attribute(r,i)}a(r,i){return this.attribute(r,i)}getAttribute(r){if(this.attribs.hasOwnProperty(r)){return this.attribs[r].value}else{return null}}setAttribute(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}getAttributeNode(r){if(this.attribs.hasOwnProperty(r)){return this.attribs[r]}else{return null}}setAttributeNode(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}removeAttributeNode(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagName(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}getAttributeNS(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}setAttributeNS(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())}removeAttributeNS(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}getAttributeNodeNS(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}setAttributeNodeNS(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagNameNS(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}hasAttribute(r){return this.attribs.hasOwnProperty(r)}hasAttributeNS(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}setIdAttribute(r,i){if(this.attribs.hasOwnProperty(r)){return this.attribs[r].isId}else{return i}}setIdAttributeNS(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())}setIdAttributeNode(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagName(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagNameNS(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByClassName(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(r){var i,o,a;if(!super.isEqualNode(r)){return false}if(r.namespaceURI!==this.namespaceURI){return false}if(r.prefix!==this.prefix){return false}if(r.localName!==this.localName){return false}if(r.attribs.length!==this.attribs.length){return false}for(i=o=0,a=this.attribs.length-1;0<=a?o<=a:o>=a;i=0<=a?++o:--o){if(!this.attribs[i].isEqualNode(r.attribs[i])){return false}}return true}}Object.defineProperty(XMLElement.prototype,"tagName",{get:function(){return this.name}});Object.defineProperty(XMLElement.prototype,"namespaceURI",{get:function(){return""}});Object.defineProperty(XMLElement.prototype,"prefix",{get:function(){return""}});Object.defineProperty(XMLElement.prototype,"localName",{get:function(){return this.name}});Object.defineProperty(XMLElement.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"attributes",{get:function(){if(!this.attributeMap||!this.attributeMap.nodes){this.attributeMap=new u(this.attribs)}return this.attributeMap}});return XMLElement}.call(this)}).call(this)},2076:function(r){(function(){var i;r.exports=i=function(){class XMLNamedNodeMap{constructor(r){this.nodes=r}clone(){return this.nodes=null}getNamedItem(r){return this.nodes[r]}setNamedItem(r){var i;i=this.nodes[r.nodeName];this.nodes[r.nodeName]=r;return i||null}removeNamedItem(r){var i;i=this.nodes[r];delete this.nodes[r];return i||null}item(r){return this.nodes[Object.keys(this.nodes)[r]]||null}getNamedItemNS(r,i){throw new Error("This DOM method is not implemented.")}setNamedItemNS(r){throw new Error("This DOM method is not implemented.")}removeNamedItemNS(r,i){throw new Error("This DOM method is not implemented.")}}Object.defineProperty(XMLNamedNodeMap.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}});return XMLNamedNodeMap}.call(this)}).call(this)},5089:function(r,i,o){(function(){var i,a,l,u,c,h,d,p,m,g,y,v,b,w,M,E,D,T,x={}.hasOwnProperty,O=[].splice;({isObject:T,isFunction:D,isEmpty:E,getValue:M}=o(983));p=null;l=null;u=null;c=null;h=null;b=null;w=null;v=null;d=null;a=null;y=null;m=null;i=null;r.exports=g=function(){class XMLNode{constructor(r){this.parent=r;if(this.parent){this.options=this.parent.options;this.stringify=this.parent.stringify}this.value=null;this.children=[];this.baseURI=null;if(!p){p=o(6484);l=o(5261);u=o(360);c=o(6645);h=o(8873);b=o(8732);w=o(2275);v=o(8947);d=o(706);a=o(7762);y=o(9908);m=o(2076);i=o(144)}}setParent(r){var i,o,a,l,u;this.parent=r;if(r){this.options=r.options;this.stringify=r.stringify}l=this.children;u=[];for(o=0,a=l.length;o<a;o++){i=l[o];u.push(i.setParent(this))}return u}element(r,i,o){var a,l,u,c,h,d,p,m,g;d=null;if(i===null&&o==null){[i,o]=[{},null]}if(i==null){i={}}i=M(i);if(!T(i)){[o,i]=[i,o]}if(r!=null){r=M(r)}if(Array.isArray(r)){for(u=0,p=r.length;u<p;u++){l=r[u];d=this.element(l)}}else if(D(r)){d=this.element(r.apply())}else if(T(r)){for(h in r){if(!x.call(r,h))continue;g=r[h];if(D(g)){g=g.apply()}if(!this.options.ignoreDecorators&&this.stringify.convertAttKey&&h.indexOf(this.stringify.convertAttKey)===0){d=this.attribute(h.substr(this.stringify.convertAttKey.length),g)}else if(!this.options.separateArrayItems&&Array.isArray(g)&&E(g)){d=this.dummy()}else if(T(g)&&E(g)){d=this.element(h)}else if(!this.options.keepNullNodes&&g==null){d=this.dummy()}else if(!this.options.separateArrayItems&&Array.isArray(g)){for(c=0,m=g.length;c<m;c++){l=g[c];a={};a[h]=l;d=this.element(a)}}else if(T(g)){if(!this.options.ignoreDecorators&&this.stringify.convertTextKey&&h.indexOf(this.stringify.convertTextKey)===0){d=this.element(g)}else{d=this.element(h);d.element(g)}}else{d=this.element(h,g)}}}else if(!this.options.keepNullNodes&&o===null){d=this.dummy()}else{if(!this.options.ignoreDecorators&&this.stringify.convertTextKey&&r.indexOf(this.stringify.convertTextKey)===0){d=this.text(o)}else if(!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&r.indexOf(this.stringify.convertCDataKey)===0){d=this.cdata(o)}else if(!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&r.indexOf(this.stringify.convertCommentKey)===0){d=this.comment(o)}else if(!this.options.ignoreDecorators&&this.stringify.convertRawKey&&r.indexOf(this.stringify.convertRawKey)===0){d=this.raw(o)}else if(!this.options.ignoreDecorators&&this.stringify.convertPIKey&&r.indexOf(this.stringify.convertPIKey)===0){d=this.instruction(r.substr(this.stringify.convertPIKey.length),o)}else{d=this.node(r,i,o)}}if(d==null){throw new Error("Could not create any elements with: "+r+". "+this.debugInfo())}return d}insertBefore(r,i,o){var a,l,u,c,h;if(r!=null?r.type:void 0){u=r;c=i;u.setParent(this);if(c){l=children.indexOf(c);h=children.splice(l);children.push(u);Array.prototype.push.apply(children,h)}else{children.push(u)}return u}else{if(this.isRoot){throw new Error("Cannot insert elements at root level. "+this.debugInfo(r))}l=this.parent.children.indexOf(this);h=this.parent.children.splice(l);a=this.parent.element(r,i,o);Array.prototype.push.apply(this.parent.children,h);return a}}insertAfter(r,i,o){var a,l,u;if(this.isRoot){throw new Error("Cannot insert elements at root level. "+this.debugInfo(r))}l=this.parent.children.indexOf(this);u=this.parent.children.splice(l+1);a=this.parent.element(r,i,o);Array.prototype.push.apply(this.parent.children,u);return a}remove(){var r,i;if(this.isRoot){throw new Error("Cannot remove the root element. "+this.debugInfo())}r=this.parent.children.indexOf(this);O.apply(this.parent.children,[r,r-r+1].concat(i=[])),i;return this.parent}node(r,i,o){var a;if(r!=null){r=M(r)}i||(i={});i=M(i);if(!T(i)){[o,i]=[i,o]}a=new p(this,r,i);if(o!=null){a.text(o)}this.children.push(a);return a}text(r){var i;if(T(r)){this.element(r)}i=new w(this,r);this.children.push(i);return this}cdata(r){var i;i=new l(this,r);this.children.push(i);return this}comment(r){var i;i=new u(this,r);this.children.push(i);return this}commentBefore(r){var i,o,a;o=this.parent.children.indexOf(this);a=this.parent.children.splice(o);i=this.parent.comment(r);Array.prototype.push.apply(this.parent.children,a);return this}commentAfter(r){var i,o,a;o=this.parent.children.indexOf(this);a=this.parent.children.splice(o+1);i=this.parent.comment(r);Array.prototype.push.apply(this.parent.children,a);return this}raw(r){var i;i=new b(this,r);this.children.push(i);return this}dummy(){var r;r=new d(this);return r}instruction(r,i){var o,a,l,u,c;if(r!=null){r=M(r)}if(i!=null){i=M(i)}if(Array.isArray(r)){for(u=0,c=r.length;u<c;u++){o=r[u];this.instruction(o)}}else if(T(r)){for(o in r){if(!x.call(r,o))continue;a=r[o];this.instruction(o,a)}}else{if(D(i)){i=i.apply()}l=new v(this,r,i);this.children.push(l)}return this}instructionBefore(r,i){var o,a,l;a=this.parent.children.indexOf(this);l=this.parent.children.splice(a);o=this.parent.instruction(r,i);Array.prototype.push.apply(this.parent.children,l);return this}instructionAfter(r,i){var o,a,l;a=this.parent.children.indexOf(this);l=this.parent.children.splice(a+1);o=this.parent.instruction(r,i);Array.prototype.push.apply(this.parent.children,l);return this}declaration(r,i,o){var l,u;l=this.document();u=new c(l,r,i,o);if(l.children.length===0){l.children.unshift(u)}else if(l.children[0].type===a.Declaration){l.children[0]=u}else{l.children.unshift(u)}return l.root()||l}dtd(r,i){var o,l,u,c,d,p,m,g,y,v;l=this.document();u=new h(l,r,i);y=l.children;for(c=d=0,m=y.length;d<m;c=++d){o=y[c];if(o.type===a.DocType){l.children[c]=u;return u}}v=l.children;for(c=p=0,g=v.length;p<g;c=++p){o=v[c];if(o.isRoot){l.children.splice(c,0,u);return u}}l.children.push(u);return u}up(){if(this.isRoot){throw new Error("The root node has no parent. Use doc() if you need to get the document object.")}return this.parent}root(){var r;r=this;while(r){if(r.type===a.Document){return r.rootObject}else if(r.isRoot){return r}else{r=r.parent}}}document(){var r;r=this;while(r){if(r.type===a.Document){return r}else{r=r.parent}}}end(r){return this.document().end(r)}prev(){var r;r=this.parent.children.indexOf(this);if(r<1){throw new Error("Already at the first node. "+this.debugInfo())}return this.parent.children[r-1]}next(){var r;r=this.parent.children.indexOf(this);if(r===-1||r===this.parent.children.length-1){throw new Error("Already at the last node. "+this.debugInfo())}return this.parent.children[r+1]}importDocument(r){var i,o,l,u,c;o=r.root().clone();o.parent=this;o.isRoot=false;this.children.push(o);if(this.type===a.Document){o.isRoot=true;o.documentObject=this;this.rootObject=o;if(this.children){c=this.children;for(l=0,u=c.length;l<u;l++){i=c[l];if(i.type===a.DocType){i.name=o.name;break}}}}return this}debugInfo(r){var i,o;r=r||this.name;if(r==null&&!((i=this.parent)!=null?i.name:void 0)){return""}else if(r==null){return"parent: <"+this.parent.name+">"}else if(!((o=this.parent)!=null?o.name:void 0)){return"node: <"+r+">"}else{return"node: <"+r+">, parent: <"+this.parent.name+">"}}ele(r,i,o){return this.element(r,i,o)}nod(r,i,o){return this.node(r,i,o)}txt(r){return this.text(r)}dat(r){return this.cdata(r)}com(r){return this.comment(r)}ins(r,i){return this.instruction(r,i)}doc(){return this.document()}dec(r,i,o){return this.declaration(r,i,o)}e(r,i,o){return this.element(r,i,o)}n(r,i,o){return this.node(r,i,o)}t(r){return this.text(r)}d(r){return this.cdata(r)}c(r){return this.comment(r)}r(r){return this.raw(r)}i(r,i){return this.instruction(r,i)}u(){return this.up()}importXMLBuilder(r){return this.importDocument(r)}attribute(r,i){throw new Error("attribute() applies to element nodes only.")}att(r,i){return this.attribute(r,i)}a(r,i){return this.attribute(r,i)}removeAttribute(r){throw new Error("attribute() applies to element nodes only.")}replaceChild(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}removeChild(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}appendChild(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}hasChildNodes(){return this.children.length!==0}cloneNode(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}normalize(){throw new Error("This DOM method is not implemented."+this.debugInfo())}isSupported(r,i){return true}hasAttributes(){return this.attribs.length!==0}compareDocumentPosition(r){var o,a;o=this;if(o===r){return 0}else if(this.document()!==r.document()){a=i.Disconnected|i.ImplementationSpecific;if(Math.random()<.5){a|=i.Preceding}else{a|=i.Following}return a}else if(o.isAncestor(r)){return i.Contains|i.Preceding}else if(o.isDescendant(r)){return i.Contains|i.Following}else if(o.isPreceding(r)){return i.Preceding}else{return i.Following}}isSameNode(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}lookupPrefix(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}isDefaultNamespace(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}lookupNamespaceURI(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(r){var i,o,a;if(r.nodeType!==this.nodeType){return false}if(r.children.length!==this.children.length){return false}for(i=o=0,a=this.children.length-1;0<=a?o<=a:o>=a;i=0<=a?++o:--o){if(!this.children[i].isEqualNode(r.children[i])){return false}}return true}getFeature(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}setUserData(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())}getUserData(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}contains(r){if(!r){return false}return r===this||this.isDescendant(r)}isDescendant(r){var i,o,a,l,u;u=this.children;for(a=0,l=u.length;a<l;a++){i=u[a];if(r===i){return true}o=i.isDescendant(r);if(o){return true}}return false}isAncestor(r){return r.isDescendant(this)}isPreceding(r){var i,o;i=this.treePosition(r);o=this.treePosition(this);if(i===-1||o===-1){return false}else{return i<o}}isFollowing(r){var i,o;i=this.treePosition(r);o=this.treePosition(this);if(i===-1||o===-1){return false}else{return i>o}}treePosition(r){var i,o;o=0;i=false;this.foreachTreeNode(this.document(),(function(a){o++;if(!i&&a===r){return i=true}}));if(i){return o}else{return-1}}foreachTreeNode(r,i){var o,a,l,u,c;r||(r=this.document());u=r.children;for(a=0,l=u.length;a<l;a++){o=u[a];if(c=i(o)){return c}else{c=this.foreachTreeNode(o,i);if(c){return c}}}}}Object.defineProperty(XMLNode.prototype,"nodeName",{get:function(){return this.name}});Object.defineProperty(XMLNode.prototype,"nodeType",{get:function(){return this.type}});Object.defineProperty(XMLNode.prototype,"nodeValue",{get:function(){return this.value}});Object.defineProperty(XMLNode.prototype,"parentNode",{get:function(){return this.parent}});Object.defineProperty(XMLNode.prototype,"childNodes",{get:function(){if(!this.childNodeList||!this.childNodeList.nodes){this.childNodeList=new y(this.children)}return this.childNodeList}});Object.defineProperty(XMLNode.prototype,"firstChild",{get:function(){return this.children[0]||null}});Object.defineProperty(XMLNode.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}});Object.defineProperty(XMLNode.prototype,"previousSibling",{get:function(){var r;r=this.parent.children.indexOf(this);return this.parent.children[r-1]||null}});Object.defineProperty(XMLNode.prototype,"nextSibling",{get:function(){var r;r=this.parent.children.indexOf(this);return this.parent.children[r+1]||null}});Object.defineProperty(XMLNode.prototype,"ownerDocument",{get:function(){return this.document()||null}});Object.defineProperty(XMLNode.prototype,"textContent",{get:function(){var r,i,o,l,u;if(this.nodeType===a.Element||this.nodeType===a.DocumentFragment){u="";l=this.children;for(i=0,o=l.length;i<o;i++){r=l[i];if(r.textContent){u+=r.textContent}}return u}else{return null}},set:function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}});return XMLNode}.call(this)}).call(this)},9908:function(r){(function(){var i;r.exports=i=function(){class XMLNodeList{constructor(r){this.nodes=r}clone(){return this.nodes=null}item(r){return this.nodes[r]||null}}Object.defineProperty(XMLNodeList.prototype,"length",{get:function(){return this.nodes.length||0}});return XMLNodeList}.call(this)}).call(this)},8947:function(r,i,o){(function(){var i,a,l;i=o(7762);a=o(4765);r.exports=l=class XMLProcessingInstruction extends a{constructor(r,o,a){super(r);if(o==null){throw new Error("Missing instruction target. "+this.debugInfo())}this.type=i.ProcessingInstruction;this.target=this.stringify.insTarget(o);this.name=this.target;if(a){this.value=this.stringify.insValue(a)}}clone(){return Object.create(this)}toString(r){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(r))}isEqualNode(r){if(!super.isEqualNode(r)){return false}if(r.target!==this.target){return false}return true}}}).call(this)},8732:function(r,i,o){(function(){var i,a,l;i=o(7762);a=o(5089);r.exports=l=class XMLRaw extends a{constructor(r,o){super(r);if(o==null){throw new Error("Missing raw text. "+this.debugInfo())}this.type=i.Raw;this.value=this.stringify.raw(o)}clone(){return Object.create(this)}toString(r){return this.options.writer.raw(this,this.options.writer.filterOptions(r))}}}).call(this)},5922:function(r,i,o){(function(){var i,a,l,u,c={}.hasOwnProperty;i=o(7762);u=o(6670);a=o(140);r.exports=l=class XMLStreamWriter extends u{constructor(r,i){super(i);this.stream=r}endline(r,i,o){if(r.isLastRootNode&&i.state===a.CloseTag){return""}else{return super.endline(r,i,o)}}document(r,i){var o,a,l,u,c,h,d,p,m;d=r.children;for(a=l=0,c=d.length;l<c;a=++l){o=d[a];o.isLastRootNode=a===r.children.length-1}i=this.filterOptions(i);p=r.children;m=[];for(u=0,h=p.length;u<h;u++){o=p[u];m.push(this.writeChildNode(o,i,0))}return m}cdata(r,i,o){return this.stream.write(super.cdata(r,i,o))}comment(r,i,o){return this.stream.write(super.comment(r,i,o))}declaration(r,i,o){return this.stream.write(super.declaration(r,i,o))}docType(r,i,o){var l,u,c,h;o||(o=0);this.openNode(r,i,o);i.state=a.OpenTag;this.stream.write(this.indent(r,i,o));this.stream.write("<!DOCTYPE "+r.root().name);if(r.pubID&&r.sysID){this.stream.write(' PUBLIC "'+r.pubID+'" "'+r.sysID+'"')}else if(r.sysID){this.stream.write(' SYSTEM "'+r.sysID+'"')}if(r.children.length>0){this.stream.write(" [");this.stream.write(this.endline(r,i,o));i.state=a.InsideTag;h=r.children;for(u=0,c=h.length;u<c;u++){l=h[u];this.writeChildNode(l,i,o+1)}i.state=a.CloseTag;this.stream.write("]")}i.state=a.CloseTag;this.stream.write(i.spaceBeforeSlash+">");this.stream.write(this.endline(r,i,o));i.state=a.None;return this.closeNode(r,i,o)}element(r,o,l){var u,h,d,p,m,g,y,v,b,w,M,E,D,T,x,O;l||(l=0);this.openNode(r,o,l);o.state=a.OpenTag;M=this.indent(r,o,l)+"<"+r.name;if(o.pretty&&o.width>0){y=M.length;D=r.attribs;for(b in D){if(!c.call(D,b))continue;u=D[b];E=this.attribute(u,o,l);h=E.length;if(y+h>o.width){O=this.indent(r,o,l+1)+E;M+=this.endline(r,o,l)+O;y=O.length}else{O=" "+E;M+=O;y+=O.length}}}else{T=r.attribs;for(b in T){if(!c.call(T,b))continue;u=T[b];M+=this.attribute(u,o,l)}}this.stream.write(M);p=r.children.length;m=p===0?null:r.children[0];if(p===0||r.children.every((function(r){return(r.type===i.Text||r.type===i.Raw)&&r.value===""}))){if(o.allowEmpty){this.stream.write(">");o.state=a.CloseTag;this.stream.write("</"+r.name+">")}else{o.state=a.CloseTag;this.stream.write(o.spaceBeforeSlash+"/>")}}else if(o.pretty&&p===1&&(m.type===i.Text||m.type===i.Raw)&&m.value!=null){this.stream.write(">");o.state=a.InsideTag;o.suppressPrettyCount++;w=true;this.writeChildNode(m,o,l+1);o.suppressPrettyCount--;w=false;o.state=a.CloseTag;this.stream.write("</"+r.name+">")}else{this.stream.write(">"+this.endline(r,o,l));o.state=a.InsideTag;x=r.children;for(g=0,v=x.length;g<v;g++){d=x[g];this.writeChildNode(d,o,l+1)}o.state=a.CloseTag;this.stream.write(this.indent(r,o,l)+"</"+r.name+">")}this.stream.write(this.endline(r,o,l));o.state=a.None;return this.closeNode(r,o,l)}processingInstruction(r,i,o){return this.stream.write(super.processingInstruction(r,i,o))}raw(r,i,o){return this.stream.write(super.raw(r,i,o))}text(r,i,o){return this.stream.write(super.text(r,i,o))}dtdAttList(r,i,o){return this.stream.write(super.dtdAttList(r,i,o))}dtdElement(r,i,o){return this.stream.write(super.dtdElement(r,i,o))}dtdEntity(r,i,o){return this.stream.write(super.dtdEntity(r,i,o))}dtdNotation(r,i,o){return this.stream.write(super.dtdNotation(r,i,o))}}}).call(this)},7834:function(r,i,o){(function(){var i,a;a=o(6670);r.exports=i=class XMLStringWriter extends a{constructor(r){super(r)}document(r,i){var o,a,l,u,c;i=this.filterOptions(i);u="";c=r.children;for(a=0,l=c.length;a<l;a++){o=c[a];u+=this.writeChildNode(o,i,0)}if(i.pretty&&u.slice(-i.newline.length)===i.newline){u=u.slice(0,-i.newline.length)}return u}}}).call(this)},645:function(r){(function(){var i,o={}.hasOwnProperty;r.exports=i=function(){class XMLStringifier{constructor(r){var i,a,l;this.assertLegalChar=this.assertLegalChar.bind(this);this.assertLegalName=this.assertLegalName.bind(this);r||(r={});this.options=r;if(!this.options.version){this.options.version="1.0"}a=r.stringify||{};for(i in a){if(!o.call(a,i))continue;l=a[i];this[i]=l}}name(r){if(this.options.noValidation){return r}return this.assertLegalName(""+r||"")}text(r){if(this.options.noValidation){return r}return this.assertLegalChar(this.textEscape(""+r||""))}cdata(r){if(this.options.noValidation){return r}r=""+r||"";r=r.replace("]]>","]]]]><![CDATA[>");return this.assertLegalChar(r)}comment(r){if(this.options.noValidation){return r}r=""+r||"";if(r.match(/--/)){throw new Error("Comment text cannot contain double-hypen: "+r)}return this.assertLegalChar(r)}raw(r){if(this.options.noValidation){return r}return""+r||""}attValue(r){if(this.options.noValidation){return r}return this.assertLegalChar(this.attEscape(r=""+r||""))}insTarget(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")}insValue(r){if(this.options.noValidation){return r}r=""+r||"";if(r.match(/\?>/)){throw new Error("Invalid processing instruction value: "+r)}return this.assertLegalChar(r)}xmlVersion(r){if(this.options.noValidation){return r}r=""+r||"";if(!r.match(/1\.[0-9]+/)){throw new Error("Invalid version number: "+r)}return r}xmlEncoding(r){if(this.options.noValidation){return r}r=""+r||"";if(!r.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)){throw new Error("Invalid encoding: "+r)}return this.assertLegalChar(r)}xmlStandalone(r){if(this.options.noValidation){return r}if(r){return"yes"}else{return"no"}}dtdPubID(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")}dtdSysID(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")}dtdElementValue(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")}dtdAttType(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")}dtdAttDefault(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")}dtdEntityValue(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")}dtdNData(r){if(this.options.noValidation){return r}return this.assertLegalChar(""+r||"")}assertLegalChar(r){var i,o;if(this.options.noValidation){return r}i="";if(this.options.version==="1.0"){i=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;if(o=r.match(i)){throw new Error(`Invalid character in string: ${r} at index ${o.index}`)}}else if(this.options.version==="1.1"){i=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;if(o=r.match(i)){throw new Error(`Invalid character in string: ${r} at index ${o.index}`)}}return r}assertLegalName(r){var i;if(this.options.noValidation){return r}this.assertLegalChar(r);i=/^([: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])*$/;if(!r.match(i)){throw new Error("Invalid character in name")}return r}textEscape(r){var i;if(this.options.noValidation){return r}i=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g;return r.replace(i,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;")}attEscape(r){var i;if(this.options.noValidation){return r}i=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g;return r.replace(i,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;")}}XMLStringifier.prototype.convertAttKey="@";XMLStringifier.prototype.convertPIKey="?";XMLStringifier.prototype.convertTextKey="#text";XMLStringifier.prototype.convertCDataKey="#cdata";XMLStringifier.prototype.convertCommentKey="#comment";XMLStringifier.prototype.convertRawKey="#raw";return XMLStringifier}.call(this)}).call(this)},2275:function(r,i,o){(function(){var i,a,l;i=o(7762);a=o(4765);r.exports=l=function(){class XMLText extends a{constructor(r,o){super(r);if(o==null){throw new Error("Missing element text. "+this.debugInfo())}this.name="#text";this.type=i.Text;this.value=this.stringify.text(o)}clone(){return Object.create(this)}toString(r){return this.options.writer.text(this,this.options.writer.filterOptions(r))}splitText(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}replaceWholeText(r){throw new Error("This DOM method is not implemented."+this.debugInfo())}}Object.defineProperty(XMLText.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLText.prototype,"wholeText",{get:function(){var r,i,o;o="";i=this.previousSibling;while(i){o=i.data+o;i=i.previousSibling}o+=this.data;r=this.nextSibling;while(r){o=o+r.data;r=r.nextSibling}return o}});return XMLText}.call(this)}).call(this)},6670:function(r,i,o){(function(){var i,a,l,u,c,h,d,p,m,g,y,v,b,w,M,E,D,T={}.hasOwnProperty;({assign:D}=o(983));i=o(7762);m=o(6645);g=o(8873);l=o(5261);u=o(360);v=o(6484);w=o(8732);M=o(2275);b=o(8947);y=o(706);c=o(2529);h=o(7486);d=o(9252);p=o(3353);a=o(140);r.exports=E=class XMLWriterBase{constructor(r){var i,o,a;r||(r={});this.options=r;o=r.writer||{};for(i in o){if(!T.call(o,i))continue;a=o[i];this["_"+i]=this[i];this[i]=a}}filterOptions(r){var i,o,l,u,c,h,d,p,m;r||(r={});r=D({},this.options,r);i={writer:this};i.pretty=r.pretty||false;i.allowEmpty=r.allowEmpty||false;i.indent=(o=r.indent)!=null?o:" ";i.newline=(l=r.newline)!=null?l:"\n";i.offset=(u=r.offset)!=null?u:0;i.width=(c=r.width)!=null?c:0;i.dontPrettyTextNodes=(h=(d=r.dontPrettyTextNodes)!=null?d:r.dontprettytextnodes)!=null?h:0;i.spaceBeforeSlash=(p=(m=r.spaceBeforeSlash)!=null?m:r.spacebeforeslash)!=null?p:"";if(i.spaceBeforeSlash===true){i.spaceBeforeSlash=" "}i.suppressPrettyCount=0;i.user={};i.state=a.None;return i}indent(r,i,o){var a;if(!i.pretty||i.suppressPrettyCount){return""}else if(i.pretty){a=(o||0)+i.offset+1;if(a>0){return new Array(a).join(i.indent)}}return""}endline(r,i,o){if(!i.pretty||i.suppressPrettyCount){return""}else{return i.newline}}attribute(r,i,o){var a;this.openAttribute(r,i,o);if(i.pretty&&i.width>0){a=r.name+'="'+r.value+'"'}else{a=" "+r.name+'="'+r.value+'"'}this.closeAttribute(r,i,o);return a}cdata(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<![CDATA[";i.state=a.InsideTag;l+=r.value;i.state=a.CloseTag;l+="]]>"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l}comment(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"\x3c!-- ";i.state=a.InsideTag;l+=r.value;i.state=a.CloseTag;l+=" --\x3e"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l}declaration(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<?xml";i.state=a.InsideTag;l+=' version="'+r.version+'"';if(r.encoding!=null){l+=' encoding="'+r.encoding+'"'}if(r.standalone!=null){l+=' standalone="'+r.standalone+'"'}i.state=a.CloseTag;l+=i.spaceBeforeSlash+"?>";l+=this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l}docType(r,i,o){var l,u,c,h,d;o||(o=0);this.openNode(r,i,o);i.state=a.OpenTag;h=this.indent(r,i,o);h+="<!DOCTYPE "+r.root().name;if(r.pubID&&r.sysID){h+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"'}else if(r.sysID){h+=' SYSTEM "'+r.sysID+'"'}if(r.children.length>0){h+=" [";h+=this.endline(r,i,o);i.state=a.InsideTag;d=r.children;for(u=0,c=d.length;u<c;u++){l=d[u];h+=this.writeChildNode(l,i,o+1)}i.state=a.CloseTag;h+="]"}i.state=a.CloseTag;h+=i.spaceBeforeSlash+">";h+=this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return h}element(r,o,l){var u,c,h,d,p,m,g,y,v,b,w,M,E,D,x,O,N,_,A;l||(l=0);M=false;this.openNode(r,o,l);o.state=a.OpenTag;E=this.indent(r,o,l)+"<"+r.name;if(o.pretty&&o.width>0){y=E.length;x=r.attribs;for(w in x){if(!T.call(x,w))continue;u=x[w];D=this.attribute(u,o,l);c=D.length;if(y+c>o.width){A=this.indent(r,o,l+1)+D;E+=this.endline(r,o,l)+A;y=A.length}else{A=" "+D;E+=A;y+=A.length}}}else{O=r.attribs;for(w in O){if(!T.call(O,w))continue;u=O[w];E+=this.attribute(u,o,l)}}d=r.children.length;p=d===0?null:r.children[0];if(d===0||r.children.every((function(r){return(r.type===i.Text||r.type===i.Raw)&&r.value===""}))){if(o.allowEmpty){E+=">";o.state=a.CloseTag;E+="</"+r.name+">"+this.endline(r,o,l)}else{o.state=a.CloseTag;E+=o.spaceBeforeSlash+"/>"+this.endline(r,o,l)}}else if(o.pretty&&d===1&&(p.type===i.Text||p.type===i.Raw)&&p.value!=null){E+=">";o.state=a.InsideTag;o.suppressPrettyCount++;M=true;E+=this.writeChildNode(p,o,l+1);o.suppressPrettyCount--;M=false;o.state=a.CloseTag;E+="</"+r.name+">"+this.endline(r,o,l)}else{if(o.dontPrettyTextNodes){N=r.children;for(m=0,v=N.length;m<v;m++){h=N[m];if((h.type===i.Text||h.type===i.Raw)&&h.value!=null){o.suppressPrettyCount++;M=true;break}}}E+=">"+this.endline(r,o,l);o.state=a.InsideTag;_=r.children;for(g=0,b=_.length;g<b;g++){h=_[g];E+=this.writeChildNode(h,o,l+1)}o.state=a.CloseTag;E+=this.indent(r,o,l)+"</"+r.name+">";if(M){o.suppressPrettyCount--}E+=this.endline(r,o,l);o.state=a.None}this.closeNode(r,o,l);return E}writeChildNode(r,o,a){switch(r.type){case i.CData:return this.cdata(r,o,a);case i.Comment:return this.comment(r,o,a);case i.Element:return this.element(r,o,a);case i.Raw:return this.raw(r,o,a);case i.Text:return this.text(r,o,a);case i.ProcessingInstruction:return this.processingInstruction(r,o,a);case i.Dummy:return"";case i.Declaration:return this.declaration(r,o,a);case i.DocType:return this.docType(r,o,a);case i.AttributeDeclaration:return this.dtdAttList(r,o,a);case i.ElementDeclaration:return this.dtdElement(r,o,a);case i.EntityDeclaration:return this.dtdEntity(r,o,a);case i.NotationDeclaration:return this.dtdNotation(r,o,a);default:throw new Error("Unknown XML node type: "+r.constructor.name)}}processingInstruction(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<?";i.state=a.InsideTag;l+=r.target;if(r.value){l+=" "+r.value}i.state=a.CloseTag;l+=i.spaceBeforeSlash+"?>";l+=this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l}raw(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o);i.state=a.InsideTag;l+=r.value;i.state=a.CloseTag;l+=this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l}text(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o);i.state=a.InsideTag;l+=r.value;i.state=a.CloseTag;l+=this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l}dtdAttList(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<!ATTLIST";i.state=a.InsideTag;l+=" "+r.elementName+" "+r.attributeName+" "+r.attributeType;if(r.defaultValueType!=="#DEFAULT"){l+=" "+r.defaultValueType}if(r.defaultValue){l+=' "'+r.defaultValue+'"'}i.state=a.CloseTag;l+=i.spaceBeforeSlash+">"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l}dtdElement(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<!ELEMENT";i.state=a.InsideTag;l+=" "+r.name+" "+r.value;i.state=a.CloseTag;l+=i.spaceBeforeSlash+">"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l}dtdEntity(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<!ENTITY";i.state=a.InsideTag;if(r.pe){l+=" %"}l+=" "+r.name;if(r.value){l+=' "'+r.value+'"'}else{if(r.pubID&&r.sysID){l+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"'}else if(r.sysID){l+=' SYSTEM "'+r.sysID+'"'}if(r.nData){l+=" NDATA "+r.nData}}i.state=a.CloseTag;l+=i.spaceBeforeSlash+">"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l}dtdNotation(r,i,o){var l;this.openNode(r,i,o);i.state=a.OpenTag;l=this.indent(r,i,o)+"<!NOTATION";i.state=a.InsideTag;l+=" "+r.name;if(r.pubID&&r.sysID){l+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"'}else if(r.pubID){l+=' PUBLIC "'+r.pubID+'"'}else if(r.sysID){l+=' SYSTEM "'+r.sysID+'"'}i.state=a.CloseTag;l+=i.spaceBeforeSlash+">"+this.endline(r,i,o);i.state=a.None;this.closeNode(r,i,o);return l}openNode(r,i,o){}closeNode(r,i,o){}openAttribute(r,i,o){}closeAttribute(r,i,o){}}}).call(this)},5769:function(r,i,o){(function(){var i,a,l,u,c,h,d,p,m;({assign:p,isFunction:m}=o(983));l=o(2692);u=o(1582);c=o(2871);d=o(7834);h=o(5922);i=o(7762);a=o(140);r.exports.create=function(r,i,o,a){var l,c;if(r==null){throw new Error("Root element needs a name.")}a=p({},i,o,a);l=new u(a);c=l.element(r);if(!a.headless){l.declaration(a);if(a.pubID!=null||a.sysID!=null){l.dtd(a)}}return c};r.exports.begin=function(r,i,o){if(m(r)){[i,o]=[r,i];r={}}if(i){return new c(r,i,o)}else{return new u(r)}};r.exports.stringWriter=function(r){return new d(r)};r.exports.streamWriter=function(r,i){return new h(r,i)};r.exports.implementation=new l;r.exports.nodeType=i;r.exports.writerState=a}).call(this)},4513:(r,i,o)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.addMetaDataItemToMainApplication=addMetaDataItemToMainApplication;i.addUsesLibraryItemToMainApplication=addUsesLibraryItemToMainApplication;i.ensureToolsAvailable=ensureToolsAvailable;i.findMetaDataItem=findMetaDataItem;i.findUsesLibraryItem=findUsesLibraryItem;i.getMainActivity=getMainActivity;i.getMainActivityOrThrow=getMainActivityOrThrow;i.getMainApplication=getMainApplication;i.getMainApplicationMetaDataValue=getMainApplicationMetaDataValue;i.getMainApplicationOrThrow=getMainApplicationOrThrow;i.getRunnableActivity=getRunnableActivity;i.prefixAndroidKeys=prefixAndroidKeys;i.readAndroidManifestAsync=readAndroidManifestAsync;i.removeMetaDataItemFromMainApplication=removeMetaDataItemFromMainApplication;i.removeUsesLibraryItemFromMainApplication=removeUsesLibraryItemFromMainApplication;i.writeAndroidManifestAsync=writeAndroidManifestAsync;function _assert(){const r=_interopRequireDefault(o(9491));_assert=function(){return r};return r}function _fs(){const r=_interopRequireDefault(o(7147));_fs=function(){return r};return r}function _path(){const r=_interopRequireDefault(o(1017));_path=function(){return r};return r}function XML(){const r=_interopRequireWildcard(o(8853));XML=function(){return r};return r}function _getRequireWildcardCache(r){if("function"!=typeof WeakMap)return null;var i=new WeakMap,o=new WeakMap;return(_getRequireWildcardCache=function(r){return r?o:i})(r)}function _interopRequireWildcard(r,i){if(!i&&r&&r.__esModule)return r;if(null===r||"object"!=typeof r&&"function"!=typeof r)return{default:r};var o=_getRequireWildcardCache(i);if(o&&o.has(r))return o.get(r);var a={__proto__:null},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in r)if("default"!==u&&Object.prototype.hasOwnProperty.call(r,u)){var c=l?Object.getOwnPropertyDescriptor(r,u):null;c&&(c.get||c.set)?Object.defineProperty(a,u,c):a[u]=r[u]}return a.default=r,o&&o.set(r,a),a}function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}async function writeAndroidManifestAsync(r,i){const o=XML().format(i);await _fs().default.promises.mkdir(_path().default.dirname(r),{recursive:true});await _fs().default.promises.writeFile(r,o)}async function readAndroidManifestAsync(r){const i=await XML().readXMLAsync({path:r});if(!isManifest(i)){throw new Error("Invalid manifest found at: "+r)}return i}function isManifest(r){return!!r.manifest}function getMainApplication(r){return r?.manifest?.application?.filter((r=>r?.$?.["android:name"].endsWith(".MainApplication")))[0]??null}function getMainApplicationOrThrow(r){const i=getMainApplication(r);(0,_assert().default)(i,"AndroidManifest.xml is missing the required MainApplication element");return i}function getMainActivityOrThrow(r){const i=getMainActivity(r);(0,_assert().default)(i,"AndroidManifest.xml is missing the required MainActivity element");return i}function getRunnableActivity(r){const i=r?.manifest?.application?.[0]?.activity?.filter?.((r=>r.$["android:enabled"]!=="false"&&r.$["android:enabled"]!==false));if(!i){return null}for(const r of i){if(Array.isArray(r["intent-filter"])){for(const i of r["intent-filter"]){if(i.action?.find((r=>r.$["android:name"]==="android.intent.action.MAIN"))&&i.category?.find((r=>r.$["android:name"]==="android.intent.category.LAUNCHER"))){return r}}}}return null}function getMainActivity(r){const i=r?.manifest?.application?.[0]?.activity?.filter?.((r=>r.$["android:name"]===".MainActivity"));return i?.[0]??null}function addMetaDataItemToMainApplication(r,i,o,a="value"){let l;const u={$:prefixAndroidKeys({name:i,[a]:o})};if(r["meta-data"]){l=r["meta-data"].filter((r=>r.$["android:name"]===i));if(l.length){l[0].$[`android:${a}`]=o}else{r["meta-data"].push(u)}}else{r["meta-data"]=[u]}return r}function removeMetaDataItemFromMainApplication(r,i){const o=findMetaDataItem(r,i);if(r?.["meta-data"]&&o>-1){r["meta-data"].splice(o,1)}return r}function findApplicationSubItem(r,i,o){const a=r[i];if(Array.isArray(a)){const r=a.findIndex((r=>r.$["android:name"]===o));return r}return-1}function findMetaDataItem(r,i){return findApplicationSubItem(r,"meta-data",i)}function findUsesLibraryItem(r,i){return findApplicationSubItem(r,"uses-library",i)}function getMainApplicationMetaDataValue(r,i){const o=getMainApplication(r);if(o?.hasOwnProperty("meta-data")){const r=o?.["meta-data"]?.find((r=>r.$["android:name"]===i));return r?.$["android:value"]??null}return null}function addUsesLibraryItemToMainApplication(r,i){let o;const a={$:prefixAndroidKeys(i)};if(r["uses-library"]){o=r["uses-library"].filter((r=>r.$["android:name"]===i.name));if(o.length){o[0].$=a.$}else{r["uses-library"].push(a)}}else{r["uses-library"]=[a]}return r}function removeUsesLibraryItemFromMainApplication(r,i){const o=findUsesLibraryItem(r,i);if(r?.["uses-library"]&&o>-1){r["uses-library"].splice(o,1)}return r}function prefixAndroidKeys(r){return Object.entries(r).reduce(((r,[i,o])=>({...r,[`android:${i}`]:o})),{})}function ensureToolsAvailable(r){return ensureManifestHasNamespace(r,{namespace:"xmlns:tools",url:"http://schemas.android.com/tools"})}function ensureManifestHasNamespace(r,{namespace:i,url:o}){if(r?.manifest?.$?.[i]){return r}r.manifest.$[i]=o;return r}},365:(r,i,o)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.appendScheme=appendScheme;i.ensureManifestHasValidIntentFilter=ensureManifestHasValidIntentFilter;i.getScheme=getScheme;i.getSchemesFromManifest=getSchemesFromManifest;i.hasScheme=hasScheme;i.removeScheme=removeScheme;i.setScheme=setScheme;i.withScheme=void 0;function _androidPlugins(){const r=o(2636);_androidPlugins=function(){return r};return r}function _warnings(){const r=o(128);_warnings=function(){return r};return r}const a=i.withScheme=(0,_androidPlugins().createAndroidManifestPlugin)(setScheme,"withScheme");function getScheme(r){if(Array.isArray(r.scheme)){const validate=r=>typeof r==="string";return r.scheme.filter(validate)}else if(typeof r.scheme==="string"){return[r.scheme]}return[]}function setScheme(r,i){const o=[...getScheme(r),...getScheme(r.android??{})];if(r.android?.package){o.push(r.android.package)}if(o.length===0){return i}if(!ensureManifestHasValidIntentFilter(i)){(0,_warnings().addWarningAndroid)("scheme",`Cannot add schemes because the provided manifest does not have a valid Activity with \`android:launchMode="singleTask"\``,"https://expo.fyi/setup-android-uri-scheme");return i}const a=getSchemesFromManifest(i);for(const r of a){const i=o.indexOf(r);if(i>-1)o.splice(i,1)}for(const r of o){i=appendScheme(r,i)}return i}function isValidRedirectIntentFilter({actions:r,categories:i}){return r.includes("android.intent.action.VIEW")&&!i.includes("android.intent.category.LAUNCHER")}function propertiesFromIntentFilter(r){const i=r?.action?.map((r=>r?.$?.["android:name"]))??[];const o=r?.category?.map((r=>r?.$?.["android:name"]))??[];const a=r?.data?.filter((r=>r?.$?.["android:scheme"]))?.map((r=>({scheme:r?.$?.["android:scheme"],host:r?.$?.["android:host"]})))??[];return{actions:i,categories:o,data:a}}function getSingleTaskIntentFilters(r){if(!Array.isArray(r.manifest.application))return[];let i=[];for(const o of r.manifest.application){const{activity:r}=o;const a=Array.isArray(r)?r:[r];const l=a.filter((r=>r?.$?.["android:launchMode"]==="singleTask"));for(const r of l){const o=r["intent-filter"];i=i.concat(o)}}return i}function getSchemesFromManifest(r,i=null){const o=[];const a=getSingleTaskIntentFilters(r);for(const r of a){const a=propertiesFromIntentFilter(r);if(isValidRedirectIntentFilter(a)&&a.data){for(const{scheme:r,host:l}of a.data){if(i===null||!l||l===i){o.push(r)}}}}return o}function ensureManifestHasValidIntentFilter(r){if(!Array.isArray(r.manifest.application)){return false}for(const i of r.manifest.application){for(const r of i.activity||[]){if(r?.$?.["android:launchMode"]==="singleTask"){for(const i of r["intent-filter"]||[]){const r=propertiesFromIntentFilter(i);if(isValidRedirectIntentFilter(r)){return true}}if(!r["intent-filter"]){r["intent-filter"]=[]}r["intent-filter"].push({action:[{$:{"android:name":"android.intent.action.VIEW"}}],category:[{$:{"android:name":"android.intent.category.DEFAULT"}},{$:{"android:name":"android.intent.category.BROWSABLE"}}]});return true}}}return false}function hasScheme(r,i){const o=getSchemesFromManifest(i);return o.includes(r)}function appendScheme(r,i){if(!Array.isArray(i.manifest.application)){return i}for(const o of i.manifest.application){for(const i of o.activity||[]){if(i?.$?.["android:launchMode"]==="singleTask"){for(const o of i["intent-filter"]||[]){const i=propertiesFromIntentFilter(o);if(isValidRedirectIntentFilter(i)){if(!o.data)o.data=[];o.data.push({$:{"android:scheme":r}})}}break}}}return i}function removeScheme(r,i){if(!Array.isArray(i.manifest.application)){return i}for(const o of i.manifest.application){for(const i of o.activity||[]){if(i?.$?.["android:launchMode"]==="singleTask"){for(const o of i["intent-filter"]||[]){const i=propertiesFromIntentFilter(o);if(isValidRedirectIntentFilter(i)){for(const i in o?.data||[]){const a=o.data?.[i];if(a?.$?.["android:scheme"]===r){delete o.data?.[i]}}}}break}}}return i}},7903:(r,i,o)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.appendScheme=appendScheme;i.getScheme=getScheme;i.getSchemesFromPlist=getSchemesFromPlist;i.hasScheme=hasScheme;i.removeScheme=removeScheme;i.setScheme=setScheme;i.withScheme=void 0;function _iosPlugins(){const r=o(4797);_iosPlugins=function(){return r};return r}const a=i.withScheme=(0,_iosPlugins().createInfoPlistPluginWithPropertyGuard)(setScheme,{infoPlistProperty:"CFBundleURLTypes",expoConfigProperty:"scheme"},"withScheme");function getScheme(r){if(Array.isArray(r.scheme)){const validate=r=>typeof r==="string";return r.scheme.filter(validate)}else if(typeof r.scheme==="string"){return[r.scheme]}return[]}function setScheme(r,i){const o=[...getScheme(r),...getScheme(r.ios??{})];if(r.ios?.bundleIdentifier){o.push(r.ios.bundleIdentifier)}if(o.length===0){return i}return{...i,CFBundleURLTypes:[{CFBundleURLSchemes:o}]}}function appendScheme(r,i){if(!r){return i}const o=i.CFBundleURLTypes??[];if(o?.some((({CFBundleURLSchemes:i})=>i.includes(r)))){return i}return{...i,CFBundleURLTypes:[...o,{CFBundleURLSchemes:[r]}]}}function removeScheme(r,i){if(!r){return i}if(!i.CFBundleURLTypes){return i}i.CFBundleURLTypes=i.CFBundleURLTypes.map((i=>{const o=i.CFBundleURLSchemes.indexOf(r);if(o>-1){i.CFBundleURLSchemes.splice(o,1);if(i.CFBundleURLSchemes.length===0){return undefined}}return i})).filter(Boolean);return i}function hasScheme(r,i){const o=i.CFBundleURLTypes;if(!Array.isArray(o))return false;return o?.some((({CFBundleURLSchemes:i})=>Array.isArray(i)?i.includes(r):false))}function getSchemesFromPlist(r){if(Array.isArray(r.CFBundleURLTypes)){return r.CFBundleURLTypes.reduce(((r,{CFBundleURLSchemes:i})=>{if(Array.isArray(i)){return[...r,...i]}return r}),[])}return[]}},2636:(r,i,o)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.createAndroidManifestPlugin=createAndroidManifestPlugin;i.createStringsXmlPlugin=createStringsXmlPlugin;i.withStringsXml=i.withSettingsGradle=i.withProjectBuildGradle=i.withMainApplication=i.withMainActivity=i.withGradleProperties=i.withAppBuildGradle=i.withAndroidStyles=i.withAndroidManifest=i.withAndroidColorsNight=i.withAndroidColors=void 0;function _withMod(){const r=o(2932);_withMod=function(){return r};return r}function createAndroidManifestPlugin(r,i){const withUnknown=i=>withAndroidManifest(i,(async i=>{i.modResults=await r(i,i.modResults);return i}));if(i){Object.defineProperty(withUnknown,"name",{value:i})}return withUnknown}function createStringsXmlPlugin(r,i){const withUnknown=i=>withStringsXml(i,(async i=>{i.modResults=await r(i,i.modResults);return i}));if(i){Object.defineProperty(withUnknown,"name",{value:i})}return withUnknown}const withAndroidManifest=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"manifest",action:i});i.withAndroidManifest=withAndroidManifest;const withStringsXml=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"strings",action:i});i.withStringsXml=withStringsXml;const withAndroidColors=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"colors",action:i});i.withAndroidColors=withAndroidColors;const withAndroidColorsNight=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"colorsNight",action:i});i.withAndroidColorsNight=withAndroidColorsNight;const withAndroidStyles=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"styles",action:i});i.withAndroidStyles=withAndroidStyles;const withMainActivity=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"mainActivity",action:i});i.withMainActivity=withMainActivity;const withMainApplication=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"mainApplication",action:i});i.withMainApplication=withMainApplication;const withProjectBuildGradle=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"projectBuildGradle",action:i});i.withProjectBuildGradle=withProjectBuildGradle;const withAppBuildGradle=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"appBuildGradle",action:i});i.withAppBuildGradle=withAppBuildGradle;const withSettingsGradle=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"settingsGradle",action:i});i.withSettingsGradle=withSettingsGradle;const withGradleProperties=(r,i)=>(0,_withMod().withMod)(r,{platform:"android",mod:"gradleProperties",action:i});i.withGradleProperties=withGradleProperties},4797:(r,i,o)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.createEntitlementsPlugin=createEntitlementsPlugin;i.createInfoPlistPlugin=createInfoPlistPlugin;i.createInfoPlistPluginWithPropertyGuard=createInfoPlistPluginWithPropertyGuard;i.withXcodeProject=i.withPodfileProperties=i.withPodfile=i.withInfoPlist=i.withExpoPlist=i.withEntitlementsPlist=i.withAppDelegate=void 0;function _withMod(){const r=o(2932);_withMod=function(){return r};return r}function _obj(){const r=o(7324);_obj=function(){return r};return r}function _warnings(){const r=o(128);_warnings=function(){return r};return r}function createInfoPlistPlugin(r,i){const withUnknown=i=>withInfoPlist(i,(async i=>{i.modResults=await r(i,i.modResults);return i}));if(i){Object.defineProperty(withUnknown,"name",{value:i})}return withUnknown}function createInfoPlistPluginWithPropertyGuard(r,i,o){const withUnknown=o=>withInfoPlist(o,(async o=>{const a=i.expoPropertyGetter?i.expoPropertyGetter(o):(0,_obj().get)(o,i.expoConfigProperty);if(o.modRawConfig.ios?.infoPlist?.[i.infoPlistProperty]===undefined){o.modResults=await r(o,o.modResults)}else if(a!==undefined){(0,_warnings().addWarningIOS)(i.expoConfigProperty,`"ios.infoPlist.${i.infoPlistProperty}" is set in the config. Ignoring abstract property "${i.expoConfigProperty}": ${a}`)}return o}));if(o){Object.defineProperty(withUnknown,"name",{value:o})}return withUnknown}function createEntitlementsPlugin(r,i){const withUnknown=i=>withEntitlementsPlist(i,(async i=>{i.modResults=await r(i,i.modResults);return i}));if(i){Object.defineProperty(withUnknown,"name",{value:i})}return withUnknown}const withAppDelegate=(r,i)=>(0,_withMod().withMod)(r,{platform:"ios",mod:"appDelegate",action:i});i.withAppDelegate=withAppDelegate;const withInfoPlist=(r,i)=>(0,_withMod().withMod)(r,{platform:"ios",mod:"infoPlist",async action(r){r=await i(r);if(!r.ios){r.ios={}}r.ios.infoPlist=r.modResults;return r}});i.withInfoPlist=withInfoPlist;const withEntitlementsPlist=(r,i)=>(0,_withMod().withMod)(r,{platform:"ios",mod:"entitlements",async action(r){r=await i(r);if(!r.ios){r.ios={}}r.ios.entitlements=r.modResults;return r}});i.withEntitlementsPlist=withEntitlementsPlist;const withExpoPlist=(r,i)=>(0,_withMod().withMod)(r,{platform:"ios",mod:"expoPlist",action:i});i.withExpoPlist=withExpoPlist;const withXcodeProject=(r,i)=>(0,_withMod().withMod)(r,{platform:"ios",mod:"xcodeproj",action:i});i.withXcodeProject=withXcodeProject;const withPodfile=(r,i)=>(0,_withMod().withMod)(r,{platform:"ios",mod:"podfile",action:i});i.withPodfile=withPodfile;const withPodfileProperties=(r,i)=>(0,_withMod().withMod)(r,{platform:"ios",mod:"podfileProperties",action:i});i.withPodfileProperties=withPodfileProperties},2932:(r,i,o)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.withBaseMod=withBaseMod;i.withMod=withMod;function _chalk(){const r=_interopRequireDefault(o(8746));_chalk=function(){return r};return r}function _getenv(){const r=o(7945);_getenv=function(){return r};return r}function _errors(){const r=o(3857);_errors=function(){return r};return r}function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}const a=(0,_getenv().boolish)("EXPO_DEBUG",false);function withBaseMod(r,{platform:i,mod:o,action:l,skipEmptyMod:u,isProvider:c,isIntrospective:h,saveToInternal:d}){if(!r.mods){r.mods={}}if(!r.mods[i]){r.mods[i]={}}let p=r.mods[i][o];if(!p){if(u){return r}const noopMod=r=>r;p=noopMod}let m="";const g=r._internal?.isDebug??a;if(g){const r=(new Error).stack;m=getDebugPluginStackFromStackTrace(r);const a=_chalk().default.bold(`${i}.${o}`);m=`${a}: ${m}`}if(p.isProvider){if(c){throw new(_errors().PluginError)(`Cannot set provider mod for "${i}.${o}" because another is already being used.`,"CONFLICTING_PROVIDER")}else{throw new(_errors().PluginError)(`Cannot add mod to "${i}.${o}" because the provider has already been added. Provider must be the last mod added.`,"INVALID_MOD_ORDER")}}async function interceptingMod({modRequest:r,...a}){if(g){console.log(m)}const u=await l({...a,modRequest:{...r,nextMod:p}});if(d){saveToInternalObject(u,i,o,u.modResults)}return u}interceptingMod.isProvider=c;if(h){interceptingMod.isIntrospective=h}r.mods[i][o]=interceptingMod;return r}function saveToInternalObject(r,i,o,a){if(!r._internal)r._internal={};if(!r._internal.modResults)r._internal.modResults={};if(!r._internal.modResults[i])r._internal.modResults[i]={};r._internal.modResults[i][o]=a}function getDebugPluginStackFromStackTrace(r){if(!r){return""}const i=[];for(const o of r.split("\n")){const[r,a]=o.trim().split(" ");if(r==="at"){i.push(a)}}const o=i.map((r=>r?.match(/^(\bwith[A-Z].*?\b)/)?.[1]?.trim()??r?.match(/\.(\bwith[A-Z].*?\b)/)?.[1]?.trim()??null)).filter(Boolean).filter((r=>!["withMod","withBaseMod","withExtendedMod"].includes(r)));const a=["withPlugins","withRunOnce","withStaticPlugin"];return o.reverse().map(((r,i)=>{if(r.includes("BaseMod")){r=_chalk().default.bold(r)}if(r.toLowerCase().includes("dangerous")){r=_chalk().default.red(r)}if(i===0){return _chalk().default.blue(r)}else if(a.includes(r)){return _chalk().default.dim(r)}return r})).join(" ➜ ")}function withMod(r,{platform:i,mod:o,action:a}){return withBaseMod(r,{platform:i,mod:o,isProvider:false,async action({modRequest:{nextMod:r,...i},modResults:o,...l}){const u=await a({modRequest:i,modResults:o,...l});return r(u)}})}},8853:(r,i,o)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i._processAndroidXML=_processAndroidXML;i.escapeAndroidString=escapeAndroidString;i.format=format;i.parseXMLAsync=parseXMLAsync;i.readXMLAsync=readXMLAsync;i.unescapeAndroidString=unescapeAndroidString;i.writeXMLAsync=writeXMLAsync;function _fs(){const r=_interopRequireDefault(o(7147));_fs=function(){return r};return r}function _os(){const r=o(2037);_os=function(){return r};return r}function _path(){const r=_interopRequireDefault(o(1017));_path=function(){return r};return r}function _xml2js(){const r=o(7013);_xml2js=function(){return r};return r}function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}async function writeXMLAsync(r){const i=format(r.xml);await _fs().default.promises.mkdir(_path().default.dirname(r.path),{recursive:true});await _fs().default.promises.writeFile(r.path,i)}async function readXMLAsync(r){let i="";try{i=await _fs().default.promises.readFile(r.path,{encoding:"utf8",flag:"r"})}catch{}const o=new(_xml2js().Parser);const a=await o.parseStringPromise(i||r.fallback||"");return _processAndroidXML(a)}function _processAndroidXML(r){if(Array.isArray(r?.resources?.string)){for(const i of r?.resources?.string){if(i.$.translatable==="false"||i.$.translatable===false){continue}i._=unescapeAndroidString(i._)}}return r}async function parseXMLAsync(r){const i=await(new(_xml2js().Parser)).parseStringPromise(r);return i}const stringTimesN=(r,i)=>Array(r+1).join(i);function format(r,{indentLevel:i=2,newline:o=_os().EOL}={}){let a;if(typeof r==="string"){a=r}else if(r.toString){const i=new(_xml2js().Builder)({headless:true});if(Array.isArray(r?.resources?.string)){for(const i of r?.resources?.string){if(i.$.translatable==="false"||i.$.translatable===false){continue}i._=escapeAndroidString(i._)}}a=i.buildObject(r);return a}else{throw new Error(`Invalid XML value passed in: ${r}`)}const l=stringTimesN(i," ");let u="";const c=/(>)(<)(\/*)/g;const h=a.replace(c,`$1${o}$2$3`);let d=0;h.split(/\r?\n/).map((r=>r.trim())).forEach((r=>{let i=0;if(r.match(/.+<\/\w[^>]*>$/)){i=0}else if(r.match(/^<\/\w/)){if(d!==0){d-=1}}else if(r.match(/^<\w([^>]*[^/])?>.*$/)){i=1}else{i=0}const a=stringTimesN(d,l);u+=a+r+o;d+=i}));return u.trim()}function escapeAndroidString(r){r=r.replace(/[\n\r\t'"@]/g,(r=>{switch(r){case'"':case"'":case"@":return"\\"+r;case"\n":return"\\n";case"\r":return"\\r";case"\t":return"\\t";default:throw new Error(`Cannot escape unhandled XML character: ${r}`)}}));if(r.match(/(^\s|\s$)/)){r='"'+r+'"'}return r}function unescapeAndroidString(r){return r.replace(/\\(.)/g,"$1")}},3857:(r,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.UnexpectedError=i.PluginError=void 0;class UnexpectedError extends Error{name="UnexpectedError";constructor(r){super(`${r}\nPlease report this as an issue on https://github.com/expo/expo/issues`)}}i.UnexpectedError=UnexpectedError;class PluginError extends Error{name="PluginError";isPluginError=true;constructor(r,i,o){super(o?`${r}\n└─ Cause: ${o.name}: ${o.message}`:r);this.code=i;this.cause=o}}i.PluginError=PluginError},7324:(r,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.get=get;function get(r,i){const o=i.split(".");let a=r;let l;while(l=o.shift()){if(!(l in a)){return undefined}a=a[l]}return a}},128:(r,i,o)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.addWarningAndroid=addWarningAndroid;i.addWarningForPlatform=addWarningForPlatform;i.addWarningIOS=addWarningIOS;function _chalk(){const r=_interopRequireDefault(o(8746));_chalk=function(){return r};return r}function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function addWarningAndroid(r,i,o){console.warn(formatWarning("android",r,i,o))}function addWarningIOS(r,i,o){console.warn(formatWarning("ios",r,i,o))}function addWarningForPlatform(r,i,o,a){console.warn(formatWarning(r,i,o,a))}function formatWarning(r,i,o,a){return _chalk().default.yellow`${"» "+_chalk().default.bold(r)}: ${i}: ${o}${a?_chalk().default.gray(" "+a):""}`}},2395:function(r,i,o){"use strict";var a=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:true});i.build=void 0;const l=a(o(2991));const u=a(o(5769));function ISODateString(r){function pad(r){return r<10?"0"+r:r}return r.getUTCFullYear()+"-"+pad(r.getUTCMonth()+1)+"-"+pad(r.getUTCDate())+"T"+pad(r.getUTCHours())+":"+pad(r.getUTCMinutes())+":"+pad(r.getUTCSeconds())+"Z"}const c=Object.prototype.toString;function type(r){const i=c.call(r).match(/\[object (.*)\]/);return i?i[1]:i}function build(r,i){const o={version:"1.0",encoding:"UTF-8"};const a={pubid:"-//Apple//DTD PLIST 1.0//EN",sysid:"http://www.apple.com/DTDs/PropertyList-1.0.dtd"};const l=u.default.create("plist");l.dec(o.version,o.encoding,o.standalone);l.dtd(a.pubid,a.sysid);l.att("version","1.0");walk_obj(r,l);if(!i)i={};i.pretty=i.pretty!==false;return l.end(i)}i.build=build;function walk_obj(r,i){let o,a,u;const c=type(r);if(c=="Undefined"){}else if(Array.isArray(r)){i=i.ele("array");for(a=0;a<r.length;a++){walk_obj(r[a],i)}}else if(Buffer.isBuffer(r)){i.ele("data").raw(r.toString("base64"))}else if(c=="Object"){i=i.ele("dict");for(u in r){if(r.hasOwnProperty(u)&&r[u]!==undefined){i.ele("key").txt(u);walk_obj(r[u],i)}}}else if(c=="Number"){o=r%1===0?"integer":"real";i.ele(o).txt(r.toString())}else if(c=="Date"){i.ele("date").txt(ISODateString(new Date(r)))}else if(c=="Boolean"){i.ele(r?"true":"false")}else if(c=="String"){i.ele("string").txt(r)}else if(c=="ArrayBuffer"){i.ele("data").raw(l.default.fromByteArray(r))}else if(r&&r.buffer&&type(r.buffer)=="ArrayBuffer"){i.ele("data").raw(l.default.fromByteArray(new Uint8Array(r.buffer)))}}},3681:(r,i,o)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});const a=o(2395);const l=o(6859);i["default"]={parse:l.parse,build:a.build}},6859:function(r,i,o){"use strict";var a=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:true});i.parse=void 0;const l=o(1328);const u=a(o(9491));const c=3;const h=4;const d=8;function shouldIgnoreNode(r){return r.nodeType===c||r.nodeType===d||r.nodeType===h}function isEmptyNode(r){return!r.childNodes||r.childNodes.length===0}function parse(r){const i=new l.DOMParser({errorHandler(){}}).parseFromString(r);(0,u.default)(i.documentElement.nodeName==="plist","malformed document. First element should be <plist>");let o=parsePlistXML(i.documentElement);if(o.length==1)o=o[0];return o}i.parse=parse;function parsePlistXML(r){let i,o,a,l,d,p;if(!r)return null;if(r.nodeName==="plist"){l=[];if(isEmptyNode(r)){return l}for(i=0;i<r.childNodes.length;i++){if(!shouldIgnoreNode(r.childNodes[i])){l.push(parsePlistXML(r.childNodes[i]))}}return l}else if(r.nodeName==="dict"){o={};a=null;p=0;if(isEmptyNode(r)){return o}for(i=0;i<r.childNodes.length;i++){if(shouldIgnoreNode(r.childNodes[i]))continue;if(p%2===0){(0,u.default)(r.childNodes[i].nodeName==="key","Missing key while parsing <dict/>.");a=parsePlistXML(r.childNodes[i])}else{(0,u.default)(r.childNodes[i].nodeName!=="key",'Unexpected key "'+parsePlistXML(r.childNodes[i])+'" while parsing <dict/>.');o[a]=parsePlistXML(r.childNodes[i])}p+=1}if(p%2===1){throw new Error('Missing value for "'+a+'" while parsing <dict/>')}return o}else if(r.nodeName==="array"){l=[];if(isEmptyNode(r)){return l}for(i=0;i<r.childNodes.length;i++){if(!shouldIgnoreNode(r.childNodes[i])){d=parsePlistXML(r.childNodes[i]);if(d!=null)l.push(d)}}return l}else if(r.nodeName==="#text"){}else if(r.nodeName==="key"){if(isEmptyNode(r)){return""}return r.childNodes[0].nodeValue}else if(r.nodeName==="string"){d="";if(isEmptyNode(r)){return d}for(i=0;i<r.childNodes.length;i++){const o=r.childNodes[i].nodeType;if(o===c||o===h){d+=r.childNodes[i].nodeValue}}return d}else if(r.nodeName==="integer"){(0,u.default)(!isEmptyNode(r),'Cannot parse "" as integer.');return parseInt(r.childNodes[0].nodeValue,10)}else if(r.nodeName==="real"){(0,u.default)(!isEmptyNode(r),'Cannot parse "" as real.');d="";for(i=0;i<r.childNodes.length;i++){if(r.childNodes[i].nodeType===c){d+=r.childNodes[i].nodeValue}}return parseFloat(d)}else if(r.nodeName==="data"){d="";if(isEmptyNode(r)){return Buffer.from(d,"base64")}for(i=0;i<r.childNodes.length;i++){if(r.childNodes[i].nodeType===c){d+=r.childNodes[i].nodeValue.replace(/\s+/g,"")}}return Buffer.from(d,"base64")}else if(r.nodeName==="date"){(0,u.default)(!isEmptyNode(r),'Cannot parse "" as Date.');return new Date(r.childNodes[0].nodeValue)}else if(r.nodeName==="true"){return true}else if(r.nodeName==="false"){return false}}},9686:(r,i,o)=>{i.alphasort=alphasort;i.alphasorti=alphasorti;i.setopts=setopts;i.ownProp=ownProp;i.makeAbs=makeAbs;i.finish=finish;i.mark=mark;i.isIgnored=isIgnored;i.childrenIgnored=childrenIgnored;function ownProp(r,i){return Object.prototype.hasOwnProperty.call(r,i)}var a=o(1017);var l=o(9566);var u=o(1323);var c=l.Minimatch;function alphasorti(r,i){return r.toLowerCase().localeCompare(i.toLowerCase())}function alphasort(r,i){return r.localeCompare(i)}function setupIgnores(r,i){r.ignore=i.ignore||[];if(!Array.isArray(r.ignore))r.ignore=[r.ignore];if(r.ignore.length){r.ignore=r.ignore.map(ignoreMap)}}function ignoreMap(r){var i=null;if(r.slice(-3)==="/**"){var o=r.replace(/(\/\*\*)+$/,"");i=new c(o,{dot:true})}return{matcher:new c(r,{dot:true}),gmatcher:i}}function setopts(r,i,o){if(!o)o={};if(o.matchBase&&-1===i.indexOf("/")){if(o.noglobstar){throw new Error("base matching requires globstar")}i="**/"+i}r.silent=!!o.silent;r.pattern=i;r.strict=o.strict!==false;r.realpath=!!o.realpath;r.realpathCache=o.realpathCache||Object.create(null);r.follow=!!o.follow;r.dot=!!o.dot;r.mark=!!o.mark;r.nodir=!!o.nodir;if(r.nodir)r.mark=true;r.sync=!!o.sync;r.nounique=!!o.nounique;r.nonull=!!o.nonull;r.nosort=!!o.nosort;r.nocase=!!o.nocase;r.stat=!!o.stat;r.noprocess=!!o.noprocess;r.absolute=!!o.absolute;r.maxLength=o.maxLength||Infinity;r.cache=o.cache||Object.create(null);r.statCache=o.statCache||Object.create(null);r.symlinks=o.symlinks||Object.create(null);setupIgnores(r,o);r.changedCwd=false;var l=process.cwd();if(!ownProp(o,"cwd"))r.cwd=l;else{r.cwd=a.resolve(o.cwd);r.changedCwd=r.cwd!==l}r.root=o.root||a.resolve(r.cwd,"/");r.root=a.resolve(r.root);if(process.platform==="win32")r.root=r.root.replace(/\\/g,"/");r.cwdAbs=u(r.cwd)?r.cwd:makeAbs(r,r.cwd);if(process.platform==="win32")r.cwdAbs=r.cwdAbs.replace(/\\/g,"/");r.nomount=!!o.nomount;o.nonegate=true;o.nocomment=true;r.minimatch=new c(i,o);r.options=r.minimatch.options}function finish(r){var i=r.nounique;var o=i?[]:Object.create(null);for(var a=0,l=r.matches.length;a<l;a++){var u=r.matches[a];if(!u||Object.keys(u).length===0){if(r.nonull){var c=r.minimatch.globSet[a];if(i)o.push(c);else o[c]=true}}else{var h=Object.keys(u);if(i)o.push.apply(o,h);else h.forEach((function(r){o[r]=true}))}}if(!i)o=Object.keys(o);if(!r.nosort)o=o.sort(r.nocase?alphasorti:alphasort);if(r.mark){for(var a=0;a<o.length;a++){o[a]=r._mark(o[a])}if(r.nodir){o=o.filter((function(i){var o=!/\/$/.test(i);var a=r.cache[i]||r.cache[makeAbs(r,i)];if(o&&a)o=a!=="DIR"&&!Array.isArray(a);return o}))}}if(r.ignore.length)o=o.filter((function(i){return!isIgnored(r,i)}));r.found=o}function mark(r,i){var o=makeAbs(r,i);var a=r.cache[o];var l=i;if(a){var u=a==="DIR"||Array.isArray(a);var c=i.slice(-1)==="/";if(u&&!c)l+="/";else if(!u&&c)l=l.slice(0,-1);if(l!==i){var h=makeAbs(r,l);r.statCache[h]=r.statCache[o];r.cache[h]=r.cache[o]}}return l}function makeAbs(r,i){var o=i;if(i.charAt(0)==="/"){o=a.join(r.root,i)}else if(u(i)||i===""){o=i}else if(r.changedCwd){o=a.resolve(r.cwd,i)}else{o=a.resolve(i)}if(process.platform==="win32")o=o.replace(/\\/g,"/");return o}function isIgnored(r,i){if(!r.ignore.length)return false;return r.ignore.some((function(r){return r.matcher.match(i)||!!(r.gmatcher&&r.gmatcher.match(i))}))}function childrenIgnored(r,i){if(!r.ignore.length)return false;return r.ignore.some((function(r){return!!(r.gmatcher&&r.gmatcher.match(i))}))}},1104:(r,i,o)=>{r.exports=glob;var a=o(7147);var l=o(8945);var u=o(9566);var c=u.Minimatch;var h=o(6919);var d=o(2361).EventEmitter;var p=o(1017);var m=o(9491);var g=o(1323);var y=o(2231);var v=o(9686);var b=v.alphasort;var w=v.alphasorti;var M=v.setopts;var E=v.ownProp;var D=o(9442);var T=o(3837);var x=v.childrenIgnored;var O=v.isIgnored;var N=o(7197);function glob(r,i,o){if(typeof i==="function")o=i,i={};if(!i)i={};if(i.sync){if(o)throw new TypeError("callback provided to sync glob");return y(r,i)}return new Glob(r,i,o)}glob.sync=y;var _=glob.GlobSync=y.GlobSync;glob.glob=glob;function extend(r,i){if(i===null||typeof i!=="object"){return r}var o=Object.keys(i);var a=o.length;while(a--){r[o[a]]=i[o[a]]}return r}glob.hasMagic=function(r,i){var o=extend({},i);o.noprocess=true;var a=new Glob(r,o);var l=a.minimatch.set;if(!r)return false;if(l.length>1)return true;for(var u=0;u<l[0].length;u++){if(typeof l[0][u]!=="string")return true}return false};glob.Glob=Glob;h(Glob,d);function Glob(r,i,o){if(typeof i==="function"){o=i;i=null}if(i&&i.sync){if(o)throw new TypeError("callback provided to sync glob");return new _(r,i)}if(!(this instanceof Glob))return new Glob(r,i,o);M(this,r,i);this._didRealPath=false;var a=this.minimatch.set.length;this.matches=new Array(a);if(typeof o==="function"){o=N(o);this.on("error",o);this.on("end",(function(r){o(null,r)}))}var l=this;this._processing=0;this._emitQueue=[];this._processQueue=[];this.paused=false;if(this.noprocess)return this;if(a===0)return done();var u=true;for(var c=0;c<a;c++){this._process(this.minimatch.set[c],c,false,done)}u=false;function done(){--l._processing;if(l._processing<=0){if(u){process.nextTick((function(){l._finish()}))}else{l._finish()}}}}Glob.prototype._finish=function(){m(this instanceof Glob);if(this.aborted)return;if(this.realpath&&!this._didRealpath)return this._realpath();v.finish(this);this.emit("end",this.found)};Glob.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=true;var r=this.matches.length;if(r===0)return this._finish();var i=this;for(var o=0;o<this.matches.length;o++)this._realpathSet(o,next);function next(){if(--r===0)i._finish()}};Glob.prototype._realpathSet=function(r,i){var o=this.matches[r];if(!o)return i();var a=Object.keys(o);var u=this;var c=a.length;if(c===0)return i();var h=this.matches[r]=Object.create(null);a.forEach((function(o,a){o=u._makeAbs(o);l.realpath(o,u.realpathCache,(function(a,l){if(!a)h[l]=true;else if(a.syscall==="stat")h[o]=true;else u.emit("error",a);if(--c===0){u.matches[r]=h;i()}}))}))};Glob.prototype._mark=function(r){return v.mark(this,r)};Glob.prototype._makeAbs=function(r){return v.makeAbs(this,r)};Glob.prototype.abort=function(){this.aborted=true;this.emit("abort")};Glob.prototype.pause=function(){if(!this.paused){this.paused=true;this.emit("pause")}};Glob.prototype.resume=function(){if(this.paused){this.emit("resume");this.paused=false;if(this._emitQueue.length){var r=this._emitQueue.slice(0);this._emitQueue.length=0;for(var i=0;i<r.length;i++){var o=r[i];this._emitMatch(o[0],o[1])}}if(this._processQueue.length){var a=this._processQueue.slice(0);this._processQueue.length=0;for(var i=0;i<a.length;i++){var l=a[i];this._processing--;this._process(l[0],l[1],l[2],l[3])}}}};Glob.prototype._process=function(r,i,o,a){m(this instanceof Glob);m(typeof a==="function");if(this.aborted)return;this._processing++;if(this.paused){this._processQueue.push([r,i,o,a]);return}var l=0;while(typeof r[l]==="string"){l++}var c;switch(l){case r.length:this._processSimple(r.join("/"),i,a);return;case 0:c=null;break;default:c=r.slice(0,l).join("/");break}var h=r.slice(l);var d;if(c===null)d=".";else if(g(c)||g(r.join("/"))){if(!c||!g(c))c="/"+c;d=c}else d=c;var p=this._makeAbs(d);if(x(this,d))return a();var y=h[0]===u.GLOBSTAR;if(y)this._processGlobStar(c,d,p,h,i,o,a);else this._processReaddir(c,d,p,h,i,o,a)};Glob.prototype._processReaddir=function(r,i,o,a,l,u,c){var h=this;this._readdir(o,u,(function(d,p){return h._processReaddir2(r,i,o,a,l,u,p,c)}))};Glob.prototype._processReaddir2=function(r,i,o,a,l,u,c,h){if(!c)return h();var d=a[0];var m=!!this.minimatch.negate;var g=d._glob;var y=this.dot||g.charAt(0)===".";var v=[];for(var b=0;b<c.length;b++){var w=c[b];if(w.charAt(0)!=="."||y){var M;if(m&&!r){M=!w.match(d)}else{M=w.match(d)}if(M)v.push(w)}}var E=v.length;if(E===0)return h();if(a.length===1&&!this.mark&&!this.stat){if(!this.matches[l])this.matches[l]=Object.create(null);for(var b=0;b<E;b++){var w=v[b];if(r){if(r!=="/")w=r+"/"+w;else w=r+w}if(w.charAt(0)==="/"&&!this.nomount){w=p.join(this.root,w)}this._emitMatch(l,w)}return h()}a.shift();for(var b=0;b<E;b++){var w=v[b];var D;if(r){if(r!=="/")w=r+"/"+w;else w=r+w}this._process([w].concat(a),l,u,h)}h()};Glob.prototype._emitMatch=function(r,i){if(this.aborted)return;if(O(this,i))return;if(this.paused){this._emitQueue.push([r,i]);return}var o=g(i)?i:this._makeAbs(i);if(this.mark)i=this._mark(i);if(this.absolute)i=o;if(this.matches[r][i])return;if(this.nodir){var a=this.cache[o];if(a==="DIR"||Array.isArray(a))return}this.matches[r][i]=true;var l=this.statCache[o];if(l)this.emit("stat",i,l);this.emit("match",i)};Glob.prototype._readdirInGlobStar=function(r,i){if(this.aborted)return;if(this.follow)return this._readdir(r,false,i);var o="lstat\0"+r;var l=this;var u=D(o,lstatcb_);if(u)a.lstat(r,u);function lstatcb_(o,a){if(o&&o.code==="ENOENT")return i();var u=a&&a.isSymbolicLink();l.symlinks[r]=u;if(!u&&a&&!a.isDirectory()){l.cache[r]="FILE";i()}else l._readdir(r,false,i)}};Glob.prototype._readdir=function(r,i,o){if(this.aborted)return;o=D("readdir\0"+r+"\0"+i,o);if(!o)return;if(i&&!E(this.symlinks,r))return this._readdirInGlobStar(r,o);if(E(this.cache,r)){var l=this.cache[r];if(!l||l==="FILE")return o();if(Array.isArray(l))return o(null,l)}var u=this;a.readdir(r,readdirCb(this,r,o))};function readdirCb(r,i,o){return function(a,l){if(a)r._readdirError(i,a,o);else r._readdirEntries(i,l,o)}}Glob.prototype._readdirEntries=function(r,i,o){if(this.aborted)return;if(!this.mark&&!this.stat){for(var a=0;a<i.length;a++){var l=i[a];if(r==="/")l=r+l;else l=r+"/"+l;this.cache[l]=true}}this.cache[r]=i;return o(null,i)};Glob.prototype._readdirError=function(r,i,o){if(this.aborted)return;switch(i.code){case"ENOTSUP":case"ENOTDIR":var a=this._makeAbs(r);this.cache[a]="FILE";if(a===this.cwdAbs){var l=new Error(i.code+" invalid cwd "+this.cwd);l.path=this.cwd;l.code=i.code;this.emit("error",l);this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(r)]=false;break;default:this.cache[this._makeAbs(r)]=false;if(this.strict){this.emit("error",i);this.abort()}if(!this.silent)console.error("glob error",i);break}return o()};Glob.prototype._processGlobStar=function(r,i,o,a,l,u,c){var h=this;this._readdir(o,u,(function(d,p){h._processGlobStar2(r,i,o,a,l,u,p,c)}))};Glob.prototype._processGlobStar2=function(r,i,o,a,l,u,c,h){if(!c)return h();var d=a.slice(1);var p=r?[r]:[];var m=p.concat(d);this._process(m,l,false,h);var g=this.symlinks[o];var y=c.length;if(g&&u)return h();for(var v=0;v<y;v++){var b=c[v];if(b.charAt(0)==="."&&!this.dot)continue;var w=p.concat(c[v],d);this._process(w,l,true,h);var M=p.concat(c[v],a);this._process(M,l,true,h)}h()};Glob.prototype._processSimple=function(r,i,o){var a=this;this._stat(r,(function(l,u){a._processSimple2(r,i,l,u,o)}))};Glob.prototype._processSimple2=function(r,i,o,a,l){if(!this.matches[i])this.matches[i]=Object.create(null);if(!a)return l();if(r&&g(r)&&!this.nomount){var u=/[\/\\]$/.test(r);if(r.charAt(0)==="/"){r=p.join(this.root,r)}else{r=p.resolve(this.root,r);if(u)r+="/"}}if(process.platform==="win32")r=r.replace(/\\/g,"/");this._emitMatch(i,r);l()};Glob.prototype._stat=function(r,i){var o=this._makeAbs(r);var l=r.slice(-1)==="/";if(r.length>this.maxLength)return i();if(!this.stat&&E(this.cache,o)){var u=this.cache[o];if(Array.isArray(u))u="DIR";if(!l||u==="DIR")return i(null,u);if(l&&u==="FILE")return i()}var c;var h=this.statCache[o];if(h!==undefined){if(h===false)return i(null,h);else{var d=h.isDirectory()?"DIR":"FILE";if(l&&d==="FILE")return i();else return i(null,d,h)}}var p=this;var m=D("stat\0"+o,lstatcb_);if(m)a.lstat(o,m);function lstatcb_(l,u){if(u&&u.isSymbolicLink()){return a.stat(o,(function(a,l){if(a)p._stat2(r,o,null,u,i);else p._stat2(r,o,a,l,i)}))}else{p._stat2(r,o,l,u,i)}}};Glob.prototype._stat2=function(r,i,o,a,l){if(o&&(o.code==="ENOENT"||o.code==="ENOTDIR")){this.statCache[i]=false;return l()}var u=r.slice(-1)==="/";this.statCache[i]=a;if(i.slice(-1)==="/"&&a&&!a.isDirectory())return l(null,false,a);var c=true;if(a)c=a.isDirectory()?"DIR":"FILE";this.cache[i]=this.cache[i]||c;if(u&&c==="FILE")return l();return l(null,c,a)}},2231:(r,i,o)=>{r.exports=globSync;globSync.GlobSync=GlobSync;var a=o(7147);var l=o(8945);var u=o(9566);var c=u.Minimatch;var h=o(1104).Glob;var d=o(3837);var p=o(1017);var m=o(9491);var g=o(1323);var y=o(9686);var v=y.alphasort;var b=y.alphasorti;var w=y.setopts;var M=y.ownProp;var E=y.childrenIgnored;var D=y.isIgnored;function globSync(r,i){if(typeof i==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");return new GlobSync(r,i).found}function GlobSync(r,i){if(!r)throw new Error("must provide pattern");if(typeof i==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof GlobSync))return new GlobSync(r,i);w(this,r,i);if(this.noprocess)return this;var o=this.minimatch.set.length;this.matches=new Array(o);for(var a=0;a<o;a++){this._process(this.minimatch.set[a],a,false)}this._finish()}GlobSync.prototype._finish=function(){m(this instanceof GlobSync);if(this.realpath){var r=this;this.matches.forEach((function(i,o){var a=r.matches[o]=Object.create(null);for(var u in i){try{u=r._makeAbs(u);var c=l.realpathSync(u,r.realpathCache);a[c]=true}catch(i){if(i.syscall==="stat")a[r._makeAbs(u)]=true;else throw i}}}))}y.finish(this)};GlobSync.prototype._process=function(r,i,o){m(this instanceof GlobSync);var a=0;while(typeof r[a]==="string"){a++}var l;switch(a){case r.length:this._processSimple(r.join("/"),i);return;case 0:l=null;break;default:l=r.slice(0,a).join("/");break}var c=r.slice(a);var h;if(l===null)h=".";else if(g(l)||g(r.join("/"))){if(!l||!g(l))l="/"+l;h=l}else h=l;var d=this._makeAbs(h);if(E(this,h))return;var p=c[0]===u.GLOBSTAR;if(p)this._processGlobStar(l,h,d,c,i,o);else this._processReaddir(l,h,d,c,i,o)};GlobSync.prototype._processReaddir=function(r,i,o,a,l,u){var c=this._readdir(o,u);if(!c)return;var h=a[0];var d=!!this.minimatch.negate;var m=h._glob;var g=this.dot||m.charAt(0)===".";var y=[];for(var v=0;v<c.length;v++){var b=c[v];if(b.charAt(0)!=="."||g){var w;if(d&&!r){w=!b.match(h)}else{w=b.match(h)}if(w)y.push(b)}}var M=y.length;if(M===0)return;if(a.length===1&&!this.mark&&!this.stat){if(!this.matches[l])this.matches[l]=Object.create(null);for(var v=0;v<M;v++){var b=y[v];if(r){if(r.slice(-1)!=="/")b=r+"/"+b;else b=r+b}if(b.charAt(0)==="/"&&!this.nomount){b=p.join(this.root,b)}this._emitMatch(l,b)}return}a.shift();for(var v=0;v<M;v++){var b=y[v];var E;if(r)E=[r,b];else E=[b];this._process(E.concat(a),l,u)}};GlobSync.prototype._emitMatch=function(r,i){if(D(this,i))return;var o=this._makeAbs(i);if(this.mark)i=this._mark(i);if(this.absolute){i=o}if(this.matches[r][i])return;if(this.nodir){var a=this.cache[o];if(a==="DIR"||Array.isArray(a))return}this.matches[r][i]=true;if(this.stat)this._stat(i)};GlobSync.prototype._readdirInGlobStar=function(r){if(this.follow)return this._readdir(r,false);var i;var o;var l;try{o=a.lstatSync(r)}catch(r){if(r.code==="ENOENT"){return null}}var u=o&&o.isSymbolicLink();this.symlinks[r]=u;if(!u&&o&&!o.isDirectory())this.cache[r]="FILE";else i=this._readdir(r,false);return i};GlobSync.prototype._readdir=function(r,i){var o;if(i&&!M(this.symlinks,r))return this._readdirInGlobStar(r);if(M(this.cache,r)){var l=this.cache[r];if(!l||l==="FILE")return null;if(Array.isArray(l))return l}try{return this._readdirEntries(r,a.readdirSync(r))}catch(i){this._readdirError(r,i);return null}};GlobSync.prototype._readdirEntries=function(r,i){if(!this.mark&&!this.stat){for(var o=0;o<i.length;o++){var a=i[o];if(r==="/")a=r+a;else a=r+"/"+a;this.cache[a]=true}}this.cache[r]=i;return i};GlobSync.prototype._readdirError=function(r,i){switch(i.code){case"ENOTSUP":case"ENOTDIR":var o=this._makeAbs(r);this.cache[o]="FILE";if(o===this.cwdAbs){var a=new Error(i.code+" invalid cwd "+this.cwd);a.path=this.cwd;a.code=i.code;throw a}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(r)]=false;break;default:this.cache[this._makeAbs(r)]=false;if(this.strict)throw i;if(!this.silent)console.error("glob error",i);break}};GlobSync.prototype._processGlobStar=function(r,i,o,a,l,u){var c=this._readdir(o,u);if(!c)return;var h=a.slice(1);var d=r?[r]:[];var p=d.concat(h);this._process(p,l,false);var m=c.length;var g=this.symlinks[o];if(g&&u)return;for(var y=0;y<m;y++){var v=c[y];if(v.charAt(0)==="."&&!this.dot)continue;var b=d.concat(c[y],h);this._process(b,l,true);var w=d.concat(c[y],a);this._process(w,l,true)}};GlobSync.prototype._processSimple=function(r,i){var o=this._stat(r);if(!this.matches[i])this.matches[i]=Object.create(null);if(!o)return;if(r&&g(r)&&!this.nomount){var a=/[\/\\]$/.test(r);if(r.charAt(0)==="/"){r=p.join(this.root,r)}else{r=p.resolve(this.root,r);if(a)r+="/"}}if(process.platform==="win32")r=r.replace(/\\/g,"/");this._emitMatch(i,r)};GlobSync.prototype._stat=function(r){var i=this._makeAbs(r);var o=r.slice(-1)==="/";if(r.length>this.maxLength)return false;if(!this.stat&&M(this.cache,i)){var l=this.cache[i];if(Array.isArray(l))l="DIR";if(!o||l==="DIR")return l;if(o&&l==="FILE")return false}var u;var c=this.statCache[i];if(!c){var h;try{h=a.lstatSync(i)}catch(r){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[i]=false;return false}}if(h&&h.isSymbolicLink()){try{c=a.statSync(i)}catch(r){c=h}}else{c=h}}this.statCache[i]=c;var l=true;if(c)l=c.isDirectory()?"DIR":"FILE";this.cache[i]=this.cache[i]||l;if(o&&l==="FILE")return false;return l};GlobSync.prototype._mark=function(r){return y.mark(this,r)};GlobSync.prototype._makeAbs=function(r){return y.makeAbs(this,r)}},208:function(r,i,o){"use strict";var a=this&&this.__createBinding||(Object.create?function(r,i,o,a){if(a===undefined)a=o;var l=Object.getOwnPropertyDescriptor(i,o);if(!l||("get"in l?!i.__esModule:l.writable||l.configurable)){l={enumerable:true,get:function(){return i[o]}}}Object.defineProperty(r,a,l)}:function(r,i,o,a){if(a===undefined)a=o;r[a]=i[o]});var l=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var u=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var o in r)if(o!=="default"&&Object.prototype.hasOwnProperty.call(r,o))a(i,r,o);l(i,r);return i};var c=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:true});i.getConfigPath=i.getProjectIdAsync=i.getAsync=i.openAsync=i.getAdbOutputAsync=i.removeAsync=i.addAsync=i.isAvailable=void 0;const h=o(4513);const d=u(o(365));const p=o(8853);const m=c(o(5642));const g=c(o(8746));const y=o(7147);const v=c(o(1017));const b=o(3329);const w="Activity not started, unable to resolve Intent";const M="error: ";function isAvailable(r){return(0,y.existsSync)(v.default.join(r,"android/app/src/main/AndroidManifest.xml"))||(0,y.existsSync)(v.default.join(r,"app/src/main/AndroidManifest.xml"))}i.isAvailable=isAvailable;async function addAsync({dryRun:r,uri:i,manifestPath:o,projectRoot:a}){const l=o??getConfigPath(a);let u=await readConfigAsync(l);if(!d.ensureManifestHasValidIntentFilter(u)){throw new b.CommandError(`Cannot add scheme "${i}" because the provided manifest does not have a valid Activity with \`android:launchMode="singleTask"\`.\nThis guide can help you get setup properly https://expo.fyi/setup-android-uri-scheme`,"add")}if(d.hasScheme(i,u)){console.log(g.default.yellow(`› Android: URI scheme "${i}" already exists in AndroidManifest.xml at: ${l}`));return false}u=d.appendScheme(i,u);if(r){console.log(g.default.magenta("Write manifest to: ",l));console.log((0,p.format)(u));return false}await writeConfigAsync(l,u);return true}i.addAsync=addAsync;async function removeAsync({dryRun:r,uri:i,manifestPath:o,projectRoot:a}){const l=o??getConfigPath(a);let u=await readConfigAsync(l);if(!d.ensureManifestHasValidIntentFilter(u)){throw new b.CommandError(`Cannot remove scheme "${i}" because the provided manifest does not have a valid Activity with \`android:launchMode="singleTask"\`.\nThis guide can help you get setup properly https://expo.fyi/setup-android-uri-scheme`,"remove")}if(!d.hasScheme(i,u)){console.log(g.default.yellow(`› Android: URI scheme "${i}" does not exist in AndroidManifest.xml at: ${l}`));return false}u=d.removeScheme(i,u);if(r){console.log(g.default.magenta("Write manifest to: ",l));console.log((0,p.format)(u));return false}await writeConfigAsync(l,u);return true}i.removeAsync=removeAsync;function whichADB(){if(process.env.ANDROID_HOME){return`${process.env.ANDROID_HOME}/platform-tools/adb`}return"adb"}async function getAdbOutputAsync(r){const i=whichADB();try{const o=await(0,m.default)(i,r);return o.stdout}catch(r){const i=r.stderr||r.stdout||"";let o=i.trim();if(o.startsWith(M)){o=o.substring(M.length)}throw new b.CommandError(o)}}i.getAdbOutputAsync=getAdbOutputAsync;async function openUrlAsync(...r){const i=await getAdbOutputAsync(["shell","am","start","-a","android.intent.action.VIEW","-d",...r.filter(Boolean)]);if(i.includes(w)){throw new b.CommandError(i.substring(i.indexOf("Error: ")))}return i}async function openAsync({uri:r,androidPackage:i}){return await openUrlAsync(r.replace(/&/g,String.raw`\&`),i??null)}i.openAsync=openAsync;async function getAsync({projectRoot:r,manifestPath:i}){const o=await readConfigAsync(i??getConfigPath(r));return await d.getSchemesFromManifest(o)}i.getAsync=getAsync;function getPackage(r){return r.manifest?.$?.package??null}async function getProjectIdAsync({projectRoot:r,manifestPath:i}){const o=i??getConfigPath(r);const a=await readConfigAsync(o);const l=getPackage(a);if(!l)throw new b.CommandError(`Android: Failed to resolve android package for Manifest at path: ${o}`);return l}i.getProjectIdAsync=getProjectIdAsync;function getConfigPath(r){const i=["android/app/src/main/AndroidManifest.xml","app/src/main/AndroidManifest.xml"].map((i=>v.default.join(r,i)));for(const r of i){if((0,y.existsSync)(r)){return r}}throw new Error(`Could not find AndroidManifest.xml, looked in: ${i.join(", ")}`)}i.getConfigPath=getConfigPath;async function readConfigAsync(r){return await(0,h.readAndroidManifestAsync)(r)}async function writeConfigAsync(r,i){await(0,h.writeAndroidManifestAsync)(r,i)}},5585:function(r,i,o){"use strict";var a=this&&this.__createBinding||(Object.create?function(r,i,o,a){if(a===undefined)a=o;var l=Object.getOwnPropertyDescriptor(i,o);if(!l||("get"in l?!i.__esModule:l.writable||l.configurable)){l={enumerable:true,get:function(){return i[o]}}}Object.defineProperty(r,a,l)}:function(r,i,o,a){if(a===undefined)a=o;r[a]=i[o]});var l=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var u=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var o in r)if(o!=="default"&&Object.prototype.hasOwnProperty.call(r,o))a(i,r,o);l(i,r);return i};var c=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:true});i.run=i.program=void 0;const h=c(o(8746));const d=o(8018);const p=o(1017);const m=u(o(208));const g=u(o(2194));const y=o(3329);const v=u(o(8522));const b=c(o(2586));const packageJson=()=>o(4147);i.program=new d.Command(packageJson().name).version(packageJson().version);function buildCommand(r,o=[]){return i.program.command(`${r} [uri-protocol]`).option("-a, --android","Apply action to Android").option("-i, --ios","Apply action to iOS ").on("--help",(()=>{if(!o.length)return;console.log();console.log("Examples:");console.log();for(const i of o){console.log(` $ uri-scheme ${r} ${i}`)}console.log()}))}buildCommand("add",["com.app","myapp"]).description("Add URI schemes to a native app").option("-n, --name <string>","Name to use on iOS.").option("-r, --role <string>","Role to use on iOS: Editor, Viewer").option("--manifest-path <string>","Custom path to use for an Android project's AndroidManifest.xml").option("--info-path <string>","Custom path to use for an iOS project's Info.plist").option("--dry-run","View the proposed change").action((async(r,i)=>{try{const o=await parseArgsAsync(r,i);await v.addAsync(o);(0,b.default)()}catch(r){commandDidThrowAsync(r)}}));buildCommand("remove",["com.app","myapp"]).description("Remove URI schemes from a native app").option("--manifest-path <string>","Custom path to use for an Android project's AndroidManifest.xml").option("--info-path <string>","Custom path to use for an iOS project's Info.plist").option("--dry-run","View the proposed change").action((async(r,i)=>{try{const o=await parseArgsAsync(r,i);await v.removeAsync(o);(0,b.default)()}catch(r){commandDidThrowAsync(r)}}));buildCommand("open",["com.app://oauth","http://expo.dev"]).description("Open a URI scheme in a running simulator or emulator").option("--package <string>","The Android package name to use when opening in an emulator").action((async(r,i)=>{try{if(!i.ios&&!i.android){throw new y.CommandError("Please provide a target platform with --ios or --android")}await v.openAsync({projectRoot:process.cwd(),...i,androidPackage:i["package"],uri:r});(0,b.default)()}catch(r){commandDidThrowAsync(r)}}));buildCommand("list").description("List the existing URI scheme prefixes for a native app").option("--manifest-path <string>","Custom path to use for an Android project's AndroidManifest.xml").option("--info-path <string>","Custom path to use for an iOS project's Info.plist").action((async(r,i)=>{try{const o=await parseArgsAsync(r,i);await v.listAsync(o);(0,b.default)()}catch(r){commandDidThrowAsync(r)}}));async function parseArgsAsync(r,i){const o=(0,p.resolve)(process.cwd());i.projectRoot=o;if(i.manifestPath)i.manifestPath=(0,p.resolve)(i.manifestPath);if(i.infoPath)i.infoPath=(0,p.resolve)(i.infoPath);const a=v.getAvailablePlatforms(i);let l=false;if(!i.android&&!i.ios){l=true;for(const r of a){i[r]=true}}else{if(i.android){if(!a.includes("android")){throw new y.CommandError(`Android project not found in directory "${o}".\nYou can manually select an AndroidManifest.xml with \`--manifest-path\``)}}if(i.ios){if(!a.includes("ios")){throw new y.CommandError(`iOS project not found in directory "${o}".\nYou can manually select an Info.plist with \`--info-path\``)}}}if(i.android&&!i.manifestPath){try{i.manifestPath=m.getConfigPath(o)}catch(r){if(l){delete i.android}else{throw r}}}if(i.ios&&!i.infoPath){try{i.infoPath=g.getConfigPath(o)}catch(r){if(l){delete i.ios}else{throw r}}}i.uri=r;return i}function run(){i.program.parse(process.argv)}i.run=run;async function commandDidThrowAsync(r){console.log();if(r.command){console.log(h.default.red(`› ${h.default.bold(`npx ${packageJson().name} ${r.command}`)} has failed.`));console.log()}if(r.origin==="uri-scheme"){console.log(h.default.black.bgRed(r.message))}else{console.log("Aborting run");console.log(h.default.black.bgRed`An unexpected error was encountered. Please report it as a bug:`);console.log(r)}console.log();await(0,b.default)();process.exit(1)}},2194:function(r,i,o){"use strict";var a=this&&this.__createBinding||(Object.create?function(r,i,o,a){if(a===undefined)a=o;var l=Object.getOwnPropertyDescriptor(i,o);if(!l||("get"in l?!i.__esModule:l.writable||l.configurable)){l={enumerable:true,get:function(){return i[o]}}}Object.defineProperty(r,a,l)}:function(r,i,o,a){if(a===undefined)a=o;r[a]=i[o]});var l=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var u=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var o in r)if(o!=="default"&&Object.prototype.hasOwnProperty.call(r,o))a(i,r,o);l(i,r);return i};var c=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:true});i.getConfigPath=i.getAsync=i.openAsync=i.removeAsync=i.addAsync=i.isAvailable=void 0;const h=u(o(7903));const d=c(o(3681));const p=c(o(5642));const m=c(o(8746));const g=c(o(7147));const y=o(1104);const v=u(o(1017));const b=o(3329);const w=["**/@(Carthage|Pods|vendor|node_modules)/**"];function isAvailable(r){const i=(0,y.sync)("ios/*.xcodeproj",{ignore:w,absolute:true,cwd:r});const o=(0,y.sync)("*.xcodeproj",{ignore:w,absolute:true,cwd:r});return!!o.length||!!i.length}i.isAvailable=isAvailable;async function addAsync({uri:r,infoPath:i,projectRoot:o,dryRun:a}){const l=i??getConfigPath(o);let u=readConfig(l);if(h.hasScheme(r,u)){console.log(m.default.yellow(`› iOS: URI scheme "${r}" already exists in Info.plist at: ${l}`));return false}u=h.appendScheme(r,u);if(a){console.log(m.default.magenta("Write plist to: ",l));console.log(formatConfig(u));return false}writeConfig(l,u);return true}i.addAsync=addAsync;async function removeAsync({uri:r,infoPath:i,projectRoot:o,dryRun:a}){const l=i??getConfigPath(o);let u=readConfig(l);if(!h.hasScheme(r,u)){console.log(m.default.yellow(`› iOS: URI scheme "${r}" does not exist in Info.plist at: ${l}`));return false}u=h.removeScheme(r,u);if(a){console.log(m.default.magenta("Write plist to: ",l));console.log(formatConfig(u));return false}writeConfig(l,u);return true}i.removeAsync=removeAsync;async function openAsync({uri:r}){await(0,p.default)("xcrun",["simctl","openurl","booted",r],{stdio:"inherit"})}i.openAsync=openAsync;async function getAsync({projectRoot:r,infoPath:i}){const o=i??getConfigPath(r);const a=g.default.readFileSync(o,"utf8");const l=d.default.parse(a);const u=h.getSchemesFromPlist(l);return u}i.getAsync=getAsync;function getInfoPlistsInDirectory(r){return(0,y.sync)("*/Info.plist",{ignore:w,absolute:true,cwd:r}).sort(((r,i)=>r.length-i.length))}function getConfigPath(r){const i=getInfoPlistsInDirectory(v.join(r,"ios"));if(i.length){return i[0]}const o=getInfoPlistsInDirectory(r);if(!o.length){throw new b.CommandError(`iOS: No Info.plist found for project at root: ${r}`)}return o[0]}i.getConfigPath=getConfigPath;function readConfig(r){const i=g.default.readFileSync(r,"utf8");return{...d.default.parse(i)}}function formatConfig(r){const i={pretty:true,indent:`\t`};const o=d.default.build(r,i);return o}function writeConfig(r,i){g.default.writeFileSync(r,formatConfig(i))}},3329:(r,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.CommandError=void 0;class CommandError extends Error{command;origin="uri-scheme";constructor(r,i){super(r);this.command=i}}i.CommandError=CommandError},8522:function(r,i,o){"use strict";var a=this&&this.__createBinding||(Object.create?function(r,i,o,a){if(a===undefined)a=o;var l=Object.getOwnPropertyDescriptor(i,o);if(!l||("get"in l?!i.__esModule:l.writable||l.configurable)){l={enumerable:true,get:function(){return i[o]}}}Object.defineProperty(r,a,l)}:function(r,i,o,a){if(a===undefined)a=o;r[a]=i[o]});var l=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var u=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var o in r)if(o!=="default"&&Object.prototype.hasOwnProperty.call(r,o))a(i,r,o);l(i,r);return i};var c=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:true});i.listAsync=i.openAsync=i.removeAsync=i.addAsync=i.getAvailablePlatforms=void 0;const h=c(o(8746));const d=o(7147);const p=o(1017);const m=c(o(1112));const g=u(o(208));const y=u(o(2194));const v=o(3329);function fileExists(r){try{return(0,d.statSync)(r).isFile()}catch{return false}}function getAvailablePlatforms(r){const i=[];if(r.infoPath){if(!fileExists(r.infoPath)){throw new v.CommandError(`Custom Info.plist does not exist at path "${r.infoPath}"`)}i.push("ios")}else if(y.isAvailable(r.projectRoot)){i.push("ios")}if(r.manifestPath){if(!fileExists(r.manifestPath)){throw new v.CommandError(`Custom AndroidManifest.xml does not exist at path "${r.manifestPath}"`)}i.push("android")}else if(g.isAvailable(r.projectRoot)){i.push("android")}return i}i.getAvailablePlatforms=getAvailablePlatforms;function ensureUriString(r){if(!r){throw new v.CommandError("Please supply a URI protocol")}if(typeof r!=="string"){throw new v.CommandError(`URI protocol should be of type string. Instead got: ${typeof r}`)}return r.trim()}async function normalizeUriProtocolAsync(r){const i=ensureUriString(r);const[o]=i.split(":");const a=o.toLowerCase();if(a!==r){if(a){console.log(h.default.yellow(`› Supplied URI protocol "${i}" does not match normalized scheme "${a}".`));const{answer:r}=await(0,m.default)({type:"confirm",name:"answer",message:`Would you like to use "${a}" instead?`,initial:true});if(r)return a}else{throw new v.CommandError(`Supplied URI protocol "${i}" does not appear to be spec compliant: http://www.ietf.org/rfc/rfc2396.txt`)}}return i}async function addAsync(r){r.uri=await normalizeUriProtocolAsync(r.uri);const i=[];let o=false;if(r.ios){if(await y.addAsync(r)){o=true;logPlatformMessage("iOS",`Added URI protocol "${r.uri}" to project`);i.push("ios")}}if(r.android){if(await g.addAsync(r)){o=true;logPlatformMessage("Android",`Added URI protocol "${r.uri}" to project`);i.push("android")}}if(!o){console.log(h.default.yellow("No URI schemes could be added. Please ensure there is a native project available."))}return i}i.addAsync=addAsync;async function removeAsync(r){r.uri=ensureUriString(r.uri);const i=[];let o=false;if(r.ios){if(await y.removeAsync(r)){o=true;logPlatformMessage("iOS",`Removed URI protocol "${r.uri}" from project`);i.push("ios")}}if(r.android){if(await g.removeAsync(r)){o=true;logPlatformMessage("Android",`Removed URI protocol "${r.uri}" from project`);i.push("android")}}if(!o){console.log(h.default.yellow("No URI schemes could be removed. Please ensure there is a native project available."))}return i}i.removeAsync=removeAsync;async function openAsync(r){r.uri=ensureUriString(r.uri);if(r.ios){logPlatformMessage("iOS",`Opening URI "${r.uri}" in simulator`);await y.openAsync(r)}if(r.android){logPlatformMessage("Android",`Opening URI "${r.uri}" in emulator`);await g.openAsync(r)}}i.openAsync=openAsync;async function listAsync(r){let i=false;if(r.infoPath){i=true;const o=await y.getAsync(r);logPlatformMessage("iOS",`Schemes for config: ./${(0,p.relative)(r.projectRoot,r.infoPath)}`);logSchemes(o)}if(r.manifestPath){i=true;const o=await g.getAsync(r);logPlatformMessage("Android",`Schemes for config: ./${(0,p.relative)(r.projectRoot,r.manifestPath)}`);logSchemes(o)}if(!i){console.log(h.default.yellow("Could not find any native URI schemes to list."))}}i.listAsync=listAsync;function logPlatformMessage(r,i){console.log(h.default.magenta(`› ${h.default.bold(r)}: ${i}`))}function logSchemes(r){for(const i of r)console.log(`${h.default.dim("› ")}${i}${h.default.dim("://")}`);console.log("")}},2855:function(r,i,o){"use strict";var a=this&&this.__createBinding||(Object.create?function(r,i,o,a){if(a===undefined)a=o;var l=Object.getOwnPropertyDescriptor(i,o);if(!l||("get"in l?!i.__esModule:l.writable||l.configurable)){l={enumerable:true,get:function(){return i[o]}}}Object.defineProperty(r,a,l)}:function(r,i,o,a){if(a===undefined)a=o;r[a]=i[o]});var l=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var u=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var o in r)if(o!=="default"&&Object.prototype.hasOwnProperty.call(r,o))a(i,r,o);l(i,r);return i};Object.defineProperty(i,"__esModule",{value:true});i.URIScheme=i.Android=i.Ios=i.program=void 0;const c=u(o(208));i.Android=c;const h=u(o(2194));i.Ios=h;const d=u(o(8522));i.URIScheme=d;var p=o(5585);Object.defineProperty(i,"program",{enumerable:true,get:function(){return p.program}})},2586:function(r,i,o){"use strict";var a=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:true});const l=a(o(8746));const u=a(o(5418));async function shouldUpdate(){const packageJson=()=>o(4147);const r=(0,u.default)(packageJson()).catch((()=>null));try{const i=await r;if(i&&i.latest){const r=packageJson();console.log();console.log(l.default.yellow.bold(`A new version of \`${r.name}\` is available`));console.log("You can update by running: "+l.default.cyan(`npm i -g ${r.name}`));console.log()}}catch{}}i["default"]=shouldUpdate},9491:r=>{"use strict";r.exports=require("assert")},4300:r=>{"use strict";r.exports=require("buffer")},2081:r=>{"use strict";r.exports=require("child_process")},2361:r=>{"use strict";r.exports=require("events")},7147:r=>{"use strict";r.exports=require("fs")},3685:r=>{"use strict";r.exports=require("http")},5687:r=>{"use strict";r.exports=require("https")},2037:r=>{"use strict";r.exports=require("os")},1017:r=>{"use strict";r.exports=require("path")},4521:r=>{"use strict";r.exports=require("readline")},2781:r=>{"use strict";r.exports=require("stream")},1576:r=>{"use strict";r.exports=require("string_decoder")},9512:r=>{"use strict";r.exports=require("timers")},6224:r=>{"use strict";r.exports=require("tty")},7310:r=>{"use strict";r.exports=require("url")},3837:r=>{"use strict";r.exports=require("util")},4147:r=>{"use strict";r.exports=JSON.parse('{"name":"uri-scheme","version":"1.2.2","description":"Interact with native URI schemes","main":"build/index.js","keywords":["expo","ios","uri-scheme","android"],"repository":{"type":"git","url":"https://github.com/expo/expo.git","directory":"packages/uri-scheme"},"author":"Expo <support@expo.dev>","license":"MIT","bugs":{"url":"https://github.com/expo/expo/issues"},"homepage":"https://github.com/expo/expo/tree/main/packages/uri-scheme#readme","bin":"cli.js","files":["build","cli.js"],"scripts":{"build":"ncc build ./src/index.ts -o build/","build:prod":"ncc build ./src/index.ts -o build/ --minify --no-cache --no-source-map-register","clean":"expo-module clean","lint":"expo-module lint","prepare":"yarn run clean && yarn run build:prod","test":"expo-module test","typecheck":"expo-module typecheck","watch":"yarn run build --watch","prepublishOnly":"expo-module prepublishOnly"},"devDependencies":{"@expo/config-plugins":"^8.0.0","@expo/plist":"^0.1.0","@expo/spawn-async":"^1.7.2","@types/prompts":"^2.0.6","chalk":"^4.0.0","commander":"2.20.0","expo-module-scripts":"^3.3.0","glob":"7.1.6","prompts":"^2.3.2","update-check":"^1.5.4"},"gitHead":"979e9f1fc3cfa9c827700dcf99992e671cfdf63e"}')}};var i={};function __nccwpck_require__(o){var a=i[o];if(a!==undefined){return a.exports}var l=i[o]={id:o,loaded:false,exports:{}};var u=true;try{r[o].call(l.exports,l,l.exports,__nccwpck_require__);u=false}finally{if(u)delete i[o]}l.loaded=true;return l.exports}(()=>{__nccwpck_require__.nmd=r=>{r.paths=[];if(!r.children)r.children=[];return r}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var o=__nccwpck_require__(2855);module.exports=o})();