@tachybase/plugin-wechat-official-account 0.23.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +14 -0
- package/README.md +1 -0
- package/client.d.ts +2 -0
- package/client.js +1 -0
- package/dist/client/components.d.ts +5 -0
- package/dist/client/index.d.ts +5 -0
- package/dist/client/index.js +1 -0
- package/dist/client/locale.d.ts +1 -0
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +30 -0
- package/dist/externalVersion.js +12 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +39 -0
- package/dist/node_modules/xml2js/LICENSE +19 -0
- package/dist/node_modules/xml2js/lib/bom.js +12 -0
- package/dist/node_modules/xml2js/lib/builder.js +127 -0
- package/dist/node_modules/xml2js/lib/defaults.js +72 -0
- package/dist/node_modules/xml2js/lib/parser.js +395 -0
- package/dist/node_modules/xml2js/lib/processors.js +34 -0
- package/dist/node_modules/xml2js/lib/xml2js.bc.js +28337 -0
- package/dist/node_modules/xml2js/lib/xml2js.js +2 -0
- package/dist/node_modules/xml2js/package.json +1 -0
- package/dist/server/actions/work.d.ts +3 -0
- package/dist/server/actions/work.js +62 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +33 -0
- package/dist/server/plugin.d.ts +35 -0
- package/dist/server/plugin.js +614 -0
- package/package.json +31 -0
- package/server.d.ts +2 -0
- package/server.js +1 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){var t={45:function(t,e,r){(function(t){t.parser=function(t,e){return new SAXParser(t,e)};t.SAXParser=SAXParser;t.SAXStream=SAXStream;t.createStream=createStream;t.MAX_BUFFER_LENGTH=64*1024;var e=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function SAXParser(e,r){if(!(this instanceof SAXParser)){return new SAXParser(e,r)}var n=this;clearBuffers(n);n.q=n.c="";n.bufferCheckPosition=t.MAX_BUFFER_LENGTH;n.opt=r||{};n.opt.lowercase=n.opt.lowercase||n.opt.lowercasetags;n.looseCase=n.opt.lowercase?"toLowerCase":"toUpperCase";n.tags=[];n.closed=n.closedRoot=n.sawRoot=false;n.tag=n.error=null;n.strict=!!e;n.noscript=!!(e||n.opt.noscript);n.state=d.BEGIN;n.strictEntities=n.opt.strictEntities;n.ENTITIES=n.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES);n.attribList=[];if(n.opt.xmlns){n.ns=Object.create(c)}if(n.opt.unquotedAttributeValues===undefined){n.opt.unquotedAttributeValues=!e}n.trackPosition=n.opt.position!==false;if(n.trackPosition){n.position=n.line=n.column=0}emit(n,"onready")}if(!Object.create){Object.create=function(t){function F(){}F.prototype=t;var e=new F;return e}}if(!Object.keys){Object.keys=function(t){var e=[];for(var r in t)if(t.hasOwnProperty(r))e.push(r);return e}}function checkBufferLength(r){var n=Math.max(t.MAX_BUFFER_LENGTH,10);var i=0;for(var o=0,s=e.length;o<s;o++){var a=r[e[o]].length;if(a>n){switch(e[o]){case"textNode":closeText(r);break;case"cdata":emitNode(r,"oncdata",r.cdata);r.cdata="";break;case"script":emitNode(r,"onscript",r.script);r.script="";break;default:error(r,"Max buffer length exceeded: "+e[o])}}i=Math.max(i,a)}var u=t.MAX_BUFFER_LENGTH-i;r.bufferCheckPosition=u+r.position}function clearBuffers(t){for(var r=0,n=e.length;r<n;r++){t[e[r]]=""}}function flushBuffers(t){closeText(t);if(t.cdata!==""){emitNode(t,"oncdata",t.cdata);t.cdata=""}if(t.script!==""){emitNode(t,"onscript",t.script);t.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 n;try{n=r(584).Stream}catch(t){n=function(){}}if(!n)n=function(){};var i=t.EVENTS.filter((function(t){return t!=="error"&&t!=="end"}));function createStream(t,e){return new SAXStream(t,e)}function SAXStream(t,e){if(!(this instanceof SAXStream)){return new SAXStream(t,e)}n.apply(this);this._parser=new SAXParser(t,e);this.writable=true;this.readable=true;var r=this;this._parser.onend=function(){r.emit("end")};this._parser.onerror=function(t){r.emit("error",t);r._parser.error=null};this._decoder=null;i.forEach((function(t){Object.defineProperty(r,"on"+t,{get:function(){return r._parser["on"+t]},set:function(e){if(!e){r.removeAllListeners(t);r._parser["on"+t]=e;return e}r.on(t,e)},enumerable:true,configurable:false})}))}SAXStream.prototype=Object.create(n.prototype,{constructor:{value:SAXStream}});SAXStream.prototype.write=function(t){if(typeof Buffer==="function"&&typeof Buffer.isBuffer==="function"&&Buffer.isBuffer(t)){if(!this._decoder){var e=r(193).StringDecoder;this._decoder=new e("utf8")}t=this._decoder.write(t)}this._parser.write(t.toString());this.emit("data",t);return true};SAXStream.prototype.end=function(t){if(t&&t.length){this.write(t)}this._parser.end();return true};SAXStream.prototype.on=function(t,e){var r=this;if(!r._parser["on"+t]&&i.indexOf(t)!==-1){r._parser["on"+t]=function(){var e=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t);r.emit.apply(r,e)}}return n.prototype.on.call(r,t,e)};var o="[CDATA[";var s="DOCTYPE";var a="http://www.w3.org/XML/1998/namespace";var u="http://www.w3.org/2000/xmlns/";var c={xml:a,xmlns:u};var l=/[:_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 p=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;var h=/[#:_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 f=/[#:_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(t){return t===" "||t==="\n"||t==="\r"||t==="\t"}function isQuote(t){return t==='"'||t==="'"}function isAttribEnd(t){return t===">"||isWhitespace(t)}function isMatch(t,e){return t.test(e)}function notMatch(t,e){return!isMatch(t,e)}var d=0;t.STATE={BEGIN:d++,BEGIN_WHITESPACE:d++,TEXT:d++,TEXT_ENTITY:d++,OPEN_WAKA:d++,SGML_DECL:d++,SGML_DECL_QUOTED:d++,DOCTYPE:d++,DOCTYPE_QUOTED:d++,DOCTYPE_DTD:d++,DOCTYPE_DTD_QUOTED:d++,COMMENT_STARTING:d++,COMMENT:d++,COMMENT_ENDING:d++,COMMENT_ENDED:d++,CDATA:d++,CDATA_ENDING:d++,CDATA_ENDING_2:d++,PROC_INST:d++,PROC_INST_BODY:d++,PROC_INST_ENDING:d++,OPEN_TAG:d++,OPEN_TAG_SLASH:d++,ATTRIB:d++,ATTRIB_NAME:d++,ATTRIB_NAME_SAW_WHITE:d++,ATTRIB_VALUE:d++,ATTRIB_VALUE_QUOTED:d++,ATTRIB_VALUE_CLOSED:d++,ATTRIB_VALUE_UNQUOTED:d++,ATTRIB_VALUE_ENTITY_Q:d++,ATTRIB_VALUE_ENTITY_U:d++,CLOSE_TAG:d++,CLOSE_TAG_SAW_WHITE:d++,SCRIPT:d++,SCRIPT_ENDING:d++};t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"};t.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(t.ENTITIES).forEach((function(e){var r=t.ENTITIES[e];var n=typeof r==="number"?String.fromCharCode(r):r;t.ENTITIES[e]=n}));for(var m in t.STATE){t.STATE[t.STATE[m]]=m}d=t.STATE;function emit(t,e,r){t[e]&&t[e](r)}function emitNode(t,e,r){if(t.textNode)closeText(t);emit(t,e,r)}function closeText(t){t.textNode=textopts(t.opt,t.textNode);if(t.textNode)emit(t,"ontext",t.textNode);t.textNode=""}function textopts(t,e){if(t.trim)e=e.trim();if(t.normalize)e=e.replace(/\s+/g," ");return e}function error(t,e){closeText(t);if(t.trackPosition){e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c}e=new Error(e);t.error=e;emit(t,"onerror",e);return t}function end(t){if(t.sawRoot&&!t.closedRoot)strictFail(t,"Unclosed root tag");if(t.state!==d.BEGIN&&t.state!==d.BEGIN_WHITESPACE&&t.state!==d.TEXT){error(t,"Unexpected end")}closeText(t);t.c="";t.closed=true;emit(t,"onend");SAXParser.call(t,t.strict,t.opt);return t}function strictFail(t,e){if(typeof t!=="object"||!(t instanceof SAXParser)){throw new Error("bad call to strictFail")}if(t.strict){error(t,e)}}function newTag(t){if(!t.strict)t.tagName=t.tagName[t.looseCase]();var e=t.tags[t.tags.length-1]||t;var r=t.tag={name:t.tagName,attributes:{}};if(t.opt.xmlns){r.ns=e.ns}t.attribList.length=0;emitNode(t,"onopentagstart",r)}function qname(t,e){var r=t.indexOf(":");var n=r<0?["",t]:t.split(":");var i=n[0];var o=n[1];if(e&&t==="xmlns"){i="xmlns";o=""}return{prefix:i,local:o}}function attrib(t){if(!t.strict){t.attribName=t.attribName[t.looseCase]()}if(t.attribList.indexOf(t.attribName)!==-1||t.tag.attributes.hasOwnProperty(t.attribName)){t.attribName=t.attribValue="";return}if(t.opt.xmlns){var e=qname(t.attribName,true);var r=e.prefix;var n=e.local;if(r==="xmlns"){if(n==="xml"&&t.attribValue!==a){strictFail(t,"xml: prefix must be bound to "+a+"\n"+"Actual: "+t.attribValue)}else if(n==="xmlns"&&t.attribValue!==u){strictFail(t,"xmlns: prefix must be bound to "+u+"\n"+"Actual: "+t.attribValue)}else{var i=t.tag;var o=t.tags[t.tags.length-1]||t;if(i.ns===o.ns){i.ns=Object.create(o.ns)}i.ns[n]=t.attribValue}}t.attribList.push([t.attribName,t.attribValue])}else{t.tag.attributes[t.attribName]=t.attribValue;emitNode(t,"onattribute",{name:t.attribName,value:t.attribValue})}t.attribName=t.attribValue=""}function openTag(t,e){if(t.opt.xmlns){var r=t.tag;var n=qname(t.tagName);r.prefix=n.prefix;r.local=n.local;r.uri=r.ns[n.prefix]||"";if(r.prefix&&!r.uri){strictFail(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName));r.uri=n.prefix}var i=t.tags[t.tags.length-1]||t;if(r.ns&&i.ns!==r.ns){Object.keys(r.ns).forEach((function(e){emitNode(t,"onopennamespace",{prefix:e,uri:r.ns[e]})}))}for(var o=0,s=t.attribList.length;o<s;o++){var a=t.attribList[o];var u=a[0];var c=a[1];var l=qname(u,true);var p=l.prefix;var h=l.local;var f=p===""?"":r.ns[p]||"";var m={name:u,value:c,prefix:p,local:h,uri:f};if(p&&p!=="xmlns"&&!f){strictFail(t,"Unbound namespace prefix: "+JSON.stringify(p));m.uri=p}t.tag.attributes[u]=m;emitNode(t,"onattribute",m)}t.attribList.length=0}t.tag.isSelfClosing=!!e;t.sawRoot=true;t.tags.push(t.tag);emitNode(t,"onopentag",t.tag);if(!e){if(!t.noscript&&t.tagName.toLowerCase()==="script"){t.state=d.SCRIPT}else{t.state=d.TEXT}t.tag=null;t.tagName=""}t.attribName=t.attribValue="";t.attribList.length=0}function closeTag(t){if(!t.tagName){strictFail(t,"Weird empty close tag.");t.textNode+="</>";t.state=d.TEXT;return}if(t.script){if(t.tagName!=="script"){t.script+="</"+t.tagName+">";t.tagName="";t.state=d.SCRIPT;return}emitNode(t,"onscript",t.script);t.script=""}var e=t.tags.length;var r=t.tagName;if(!t.strict){r=r[t.looseCase]()}var n=r;while(e--){var i=t.tags[e];if(i.name!==n){strictFail(t,"Unexpected close tag")}else{break}}if(e<0){strictFail(t,"Unmatched closing tag: "+t.tagName);t.textNode+="</"+t.tagName+">";t.state=d.TEXT;return}t.tagName=r;var o=t.tags.length;while(o-- >e){var s=t.tag=t.tags.pop();t.tagName=t.tag.name;emitNode(t,"onclosetag",t.tagName);var a={};for(var u in s.ns){a[u]=s.ns[u]}var c=t.tags[t.tags.length-1]||t;if(t.opt.xmlns&&s.ns!==c.ns){Object.keys(s.ns).forEach((function(e){var r=s.ns[e];emitNode(t,"onclosenamespace",{prefix:e,uri:r})}))}}if(e===0)t.closedRoot=true;t.tagName=t.attribValue=t.attribName="";t.attribList.length=0;t.state=d.TEXT}function parseEntity(t){var e=t.entity;var r=e.toLowerCase();var n;var i="";if(t.ENTITIES[e]){return t.ENTITIES[e]}if(t.ENTITIES[r]){return t.ENTITIES[r]}e=r;if(e.charAt(0)==="#"){if(e.charAt(1)==="x"){e=e.slice(2);n=parseInt(e,16);i=n.toString(16)}else{e=e.slice(1);n=parseInt(e,10);i=n.toString(10)}}e=e.replace(/^0+/,"");if(isNaN(n)||i.toLowerCase()!==e){strictFail(t,"Invalid character entity");return"&"+t.entity+";"}return String.fromCodePoint(n)}function beginWhiteSpace(t,e){if(e==="<"){t.state=d.OPEN_WAKA;t.startTagPosition=t.position}else if(!isWhitespace(e)){strictFail(t,"Non-whitespace before first tag.");t.textNode=e;t.state=d.TEXT}}function charAt(t,e){var r="";if(e<t.length){r=t.charAt(e)}return r}function write(e){var r=this;if(this.error){throw this.error}if(r.closed){return error(r,"Cannot write after close. Assign an onready handler.")}if(e===null){return end(r)}if(typeof e==="object"){e=e.toString()}var n=0;var i="";while(true){i=charAt(e,n++);r.c=i;if(!i){break}if(r.trackPosition){r.position++;if(i==="\n"){r.line++;r.column=0}else{r.column++}}switch(r.state){case d.BEGIN:r.state=d.BEGIN_WHITESPACE;if(i==="\ufeff"){continue}beginWhiteSpace(r,i);continue;case d.BEGIN_WHITESPACE:beginWhiteSpace(r,i);continue;case d.TEXT:if(r.sawRoot&&!r.closedRoot){var a=n-1;while(i&&i!=="<"&&i!=="&"){i=charAt(e,n++);if(i&&r.trackPosition){r.position++;if(i==="\n"){r.line++;r.column=0}else{r.column++}}}r.textNode+=e.substring(a,n-1)}if(i==="<"&&!(r.sawRoot&&r.closedRoot&&!r.strict)){r.state=d.OPEN_WAKA;r.startTagPosition=r.position}else{if(!isWhitespace(i)&&(!r.sawRoot||r.closedRoot)){strictFail(r,"Text data outside of root node.")}if(i==="&"){r.state=d.TEXT_ENTITY}else{r.textNode+=i}}continue;case d.SCRIPT:if(i==="<"){r.state=d.SCRIPT_ENDING}else{r.script+=i}continue;case d.SCRIPT_ENDING:if(i==="/"){r.state=d.CLOSE_TAG}else{r.script+="<"+i;r.state=d.SCRIPT}continue;case d.OPEN_WAKA:if(i==="!"){r.state=d.SGML_DECL;r.sgmlDecl=""}else if(isWhitespace(i)){}else if(isMatch(l,i)){r.state=d.OPEN_TAG;r.tagName=i}else if(i==="/"){r.state=d.CLOSE_TAG;r.tagName=""}else if(i==="?"){r.state=d.PROC_INST;r.procInstName=r.procInstBody=""}else{strictFail(r,"Unencoded <");if(r.startTagPosition+1<r.position){var u=r.position-r.startTagPosition;i=new Array(u).join(" ")+i}r.textNode+="<"+i;r.state=d.TEXT}continue;case d.SGML_DECL:if(r.sgmlDecl+i==="--"){r.state=d.COMMENT;r.comment="";r.sgmlDecl="";continue}if(r.doctype&&r.doctype!==true&&r.sgmlDecl){r.state=d.DOCTYPE_DTD;r.doctype+="<!"+r.sgmlDecl+i;r.sgmlDecl=""}else if((r.sgmlDecl+i).toUpperCase()===o){emitNode(r,"onopencdata");r.state=d.CDATA;r.sgmlDecl="";r.cdata=""}else if((r.sgmlDecl+i).toUpperCase()===s){r.state=d.DOCTYPE;if(r.doctype||r.sawRoot){strictFail(r,"Inappropriately located doctype declaration")}r.doctype="";r.sgmlDecl=""}else if(i===">"){emitNode(r,"onsgmldeclaration",r.sgmlDecl);r.sgmlDecl="";r.state=d.TEXT}else if(isQuote(i)){r.state=d.SGML_DECL_QUOTED;r.sgmlDecl+=i}else{r.sgmlDecl+=i}continue;case d.SGML_DECL_QUOTED:if(i===r.q){r.state=d.SGML_DECL;r.q=""}r.sgmlDecl+=i;continue;case d.DOCTYPE:if(i===">"){r.state=d.TEXT;emitNode(r,"ondoctype",r.doctype);r.doctype=true}else{r.doctype+=i;if(i==="["){r.state=d.DOCTYPE_DTD}else if(isQuote(i)){r.state=d.DOCTYPE_QUOTED;r.q=i}}continue;case d.DOCTYPE_QUOTED:r.doctype+=i;if(i===r.q){r.q="";r.state=d.DOCTYPE}continue;case d.DOCTYPE_DTD:if(i==="]"){r.doctype+=i;r.state=d.DOCTYPE}else if(i==="<"){r.state=d.OPEN_WAKA;r.startTagPosition=r.position}else if(isQuote(i)){r.doctype+=i;r.state=d.DOCTYPE_DTD_QUOTED;r.q=i}else{r.doctype+=i}continue;case d.DOCTYPE_DTD_QUOTED:r.doctype+=i;if(i===r.q){r.state=d.DOCTYPE_DTD;r.q=""}continue;case d.COMMENT:if(i==="-"){r.state=d.COMMENT_ENDING}else{r.comment+=i}continue;case d.COMMENT_ENDING:if(i==="-"){r.state=d.COMMENT_ENDED;r.comment=textopts(r.opt,r.comment);if(r.comment){emitNode(r,"oncomment",r.comment)}r.comment=""}else{r.comment+="-"+i;r.state=d.COMMENT}continue;case d.COMMENT_ENDED:if(i!==">"){strictFail(r,"Malformed comment");r.comment+="--"+i;r.state=d.COMMENT}else if(r.doctype&&r.doctype!==true){r.state=d.DOCTYPE_DTD}else{r.state=d.TEXT}continue;case d.CDATA:if(i==="]"){r.state=d.CDATA_ENDING}else{r.cdata+=i}continue;case d.CDATA_ENDING:if(i==="]"){r.state=d.CDATA_ENDING_2}else{r.cdata+="]"+i;r.state=d.CDATA}continue;case d.CDATA_ENDING_2:if(i===">"){if(r.cdata){emitNode(r,"oncdata",r.cdata)}emitNode(r,"onclosecdata");r.cdata="";r.state=d.TEXT}else if(i==="]"){r.cdata+="]"}else{r.cdata+="]]"+i;r.state=d.CDATA}continue;case d.PROC_INST:if(i==="?"){r.state=d.PROC_INST_ENDING}else if(isWhitespace(i)){r.state=d.PROC_INST_BODY}else{r.procInstName+=i}continue;case d.PROC_INST_BODY:if(!r.procInstBody&&isWhitespace(i)){continue}else if(i==="?"){r.state=d.PROC_INST_ENDING}else{r.procInstBody+=i}continue;case d.PROC_INST_ENDING:if(i===">"){emitNode(r,"onprocessinginstruction",{name:r.procInstName,body:r.procInstBody});r.procInstName=r.procInstBody="";r.state=d.TEXT}else{r.procInstBody+="?"+i;r.state=d.PROC_INST_BODY}continue;case d.OPEN_TAG:if(isMatch(p,i)){r.tagName+=i}else{newTag(r);if(i===">"){openTag(r)}else if(i==="/"){r.state=d.OPEN_TAG_SLASH}else{if(!isWhitespace(i)){strictFail(r,"Invalid character in tag name")}r.state=d.ATTRIB}}continue;case d.OPEN_TAG_SLASH:if(i===">"){openTag(r,true);closeTag(r)}else{strictFail(r,"Forward-slash in opening tag not followed by >");r.state=d.ATTRIB}continue;case d.ATTRIB:if(isWhitespace(i)){continue}else if(i===">"){openTag(r)}else if(i==="/"){r.state=d.OPEN_TAG_SLASH}else if(isMatch(l,i)){r.attribName=i;r.attribValue="";r.state=d.ATTRIB_NAME}else{strictFail(r,"Invalid attribute name")}continue;case d.ATTRIB_NAME:if(i==="="){r.state=d.ATTRIB_VALUE}else if(i===">"){strictFail(r,"Attribute without value");r.attribValue=r.attribName;attrib(r);openTag(r)}else if(isWhitespace(i)){r.state=d.ATTRIB_NAME_SAW_WHITE}else if(isMatch(p,i)){r.attribName+=i}else{strictFail(r,"Invalid attribute name")}continue;case d.ATTRIB_NAME_SAW_WHITE:if(i==="="){r.state=d.ATTRIB_VALUE}else if(isWhitespace(i)){continue}else{strictFail(r,"Attribute without value");r.tag.attributes[r.attribName]="";r.attribValue="";emitNode(r,"onattribute",{name:r.attribName,value:""});r.attribName="";if(i===">"){openTag(r)}else if(isMatch(l,i)){r.attribName=i;r.state=d.ATTRIB_NAME}else{strictFail(r,"Invalid attribute name");r.state=d.ATTRIB}}continue;case d.ATTRIB_VALUE:if(isWhitespace(i)){continue}else if(isQuote(i)){r.q=i;r.state=d.ATTRIB_VALUE_QUOTED}else{if(!r.opt.unquotedAttributeValues){error(r,"Unquoted attribute value")}r.state=d.ATTRIB_VALUE_UNQUOTED;r.attribValue=i}continue;case d.ATTRIB_VALUE_QUOTED:if(i!==r.q){if(i==="&"){r.state=d.ATTRIB_VALUE_ENTITY_Q}else{r.attribValue+=i}continue}attrib(r);r.q="";r.state=d.ATTRIB_VALUE_CLOSED;continue;case d.ATTRIB_VALUE_CLOSED:if(isWhitespace(i)){r.state=d.ATTRIB}else if(i===">"){openTag(r)}else if(i==="/"){r.state=d.OPEN_TAG_SLASH}else if(isMatch(l,i)){strictFail(r,"No whitespace between attributes");r.attribName=i;r.attribValue="";r.state=d.ATTRIB_NAME}else{strictFail(r,"Invalid attribute name")}continue;case d.ATTRIB_VALUE_UNQUOTED:if(!isAttribEnd(i)){if(i==="&"){r.state=d.ATTRIB_VALUE_ENTITY_U}else{r.attribValue+=i}continue}attrib(r);if(i===">"){openTag(r)}else{r.state=d.ATTRIB}continue;case d.CLOSE_TAG:if(!r.tagName){if(isWhitespace(i)){continue}else if(notMatch(l,i)){if(r.script){r.script+="</"+i;r.state=d.SCRIPT}else{strictFail(r,"Invalid tagname in closing tag.")}}else{r.tagName=i}}else if(i===">"){closeTag(r)}else if(isMatch(p,i)){r.tagName+=i}else if(r.script){r.script+="</"+r.tagName;r.tagName="";r.state=d.SCRIPT}else{if(!isWhitespace(i)){strictFail(r,"Invalid tagname in closing tag")}r.state=d.CLOSE_TAG_SAW_WHITE}continue;case d.CLOSE_TAG_SAW_WHITE:if(isWhitespace(i)){continue}if(i===">"){closeTag(r)}else{strictFail(r,"Invalid characters in closing tag")}continue;case d.TEXT_ENTITY:case d.ATTRIB_VALUE_ENTITY_Q:case d.ATTRIB_VALUE_ENTITY_U:var c;var m;switch(r.state){case d.TEXT_ENTITY:c=d.TEXT;m="textNode";break;case d.ATTRIB_VALUE_ENTITY_Q:c=d.ATTRIB_VALUE_QUOTED;m="attribValue";break;case d.ATTRIB_VALUE_ENTITY_U:c=d.ATTRIB_VALUE_UNQUOTED;m="attribValue";break}if(i===";"){var y=parseEntity(r);if(r.opt.unparsedEntities&&!Object.values(t.XML_ENTITIES).includes(y)){r.entity="";r.state=c;r.write(y)}else{r[m]+=y;r.entity="";r.state=c}}else if(isMatch(r.entity.length?f:h,i)){r.entity+=i}else{strictFail(r,"Invalid character in entity name");r[m]+="&"+r.entity+i;r.entity="";r.state=c}continue;default:{throw new Error(r,"Unknown state: "+r.state)}}}if(r.position>=r.bufferCheckPosition){checkBufferLength(r)}return r}
|
|
2
|
+
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */if(!String.fromCodePoint){(function(){var t=String.fromCharCode;var e=Math.floor;var fromCodePoint=function(){var r=16384;var n=[];var i;var o;var s=-1;var a=arguments.length;if(!a){return""}var u="";while(++s<a){var c=Number(arguments[s]);if(!isFinite(c)||c<0||c>1114111||e(c)!==c){throw RangeError("Invalid code point: "+c)}if(c<=65535){n.push(c)}else{c-=65536;i=(c>>10)+55296;o=c%1024+56320;n.push(i,o)}if(s+1===a||n.length>r){u+=t.apply(null,n);n.length=0}}return u};if(Object.defineProperty){Object.defineProperty(String,"fromCodePoint",{value:fromCodePoint,configurable:true,writable:true})}else{String.fromCodePoint=fromCodePoint}})()}})(false?0:e)},452:function(t,e){(function(){"use strict";e.stripBOM=function(t){if(t[0]==="\ufeff"){return t.substring(1)}else{return t}}}).call(this)},937:function(t,e,r){(function(){"use strict";var t,n,i,o,s,a={}.hasOwnProperty;t=r(203);n=r(706).defaults;o=function(t){return typeof t==="string"&&(t.indexOf("&")>=0||t.indexOf(">")>=0||t.indexOf("<")>=0)};s=function(t){return"<![CDATA["+i(t)+"]]>"};i=function(t){return t.replace("]]>","]]]]><![CDATA[>")};e.Builder=function(){function Builder(t){var e,r,i;this.options={};r=n["0.2"];for(e in r){if(!a.call(r,e))continue;i=r[e];this.options[e]=i}for(e in t){if(!a.call(t,e))continue;i=t[e];this.options[e]=i}}Builder.prototype.buildObject=function(e){var r,i,u,c,l;r=this.options.attrkey;i=this.options.charkey;if(Object.keys(e).length===1&&this.options.rootName===n["0.2"].rootName){l=Object.keys(e)[0];e=e[l]}else{l=this.options.rootName}u=function(t){return function(e,n){var c,l,p,h,f,d;if(typeof n!=="object"){if(t.options.cdata&&o(n)){e.raw(s(n))}else{e.txt(n)}}else if(Array.isArray(n)){for(h in n){if(!a.call(n,h))continue;l=n[h];for(f in l){p=l[f];e=u(e.ele(f),p).up()}}}else{for(f in n){if(!a.call(n,f))continue;l=n[f];if(f===r){if(typeof l==="object"){for(c in l){d=l[c];e=e.att(c,d)}}}else if(f===i){if(t.options.cdata&&o(l)){e=e.raw(s(l))}else{e=e.txt(l)}}else if(Array.isArray(l)){for(h in l){if(!a.call(l,h))continue;p=l[h];if(typeof p==="string"){if(t.options.cdata&&o(p)){e=e.ele(f).raw(s(p)).up()}else{e=e.ele(f,p).up()}}else{e=u(e.ele(f),p).up()}}}else if(typeof l==="object"){e=u(e.ele(f),l).up()}else{if(typeof l==="string"&&t.options.cdata&&o(l)){e=e.ele(f).raw(s(l)).up()}else{if(l==null){l=""}e=e.ele(f,l.toString()).up()}}}}return e}}(this);c=t.create(l,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars});return u(c,e).end(this.options.renderOpts)};return Builder}()}).call(this)},706:function(t,e){(function(){e.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)},343:function(t,e,r){(function(){"use strict";var t,n,i,o,s,a,u,c,l,bind=function(t,e){return function(){return t.apply(e,arguments)}},extend=function(t,e){for(var r in e){if(p.call(e,r))t[r]=e[r]}function ctor(){this.constructor=t}ctor.prototype=e.prototype;t.prototype=new ctor;t.__super__=e.prototype;return t},p={}.hasOwnProperty;c=r(45);o=r(434);t=r(452);u=r(574);l=r(557).setImmediate;n=r(706).defaults;s=function(t){return typeof t==="object"&&t!=null&&Object.keys(t).length===0};a=function(t,e,r){var n,i,o;for(n=0,i=t.length;n<i;n++){o=t[n];e=o(e,r)}return e};i=function(t,e,r){var n;n=Object.create(null);n.value=r;n.writable=true;n.enumerable=true;n.configurable=true;return Object.defineProperty(t,e,n)};e.Parser=function(r){extend(Parser,r);function Parser(t){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 r,i,o;if(!(this instanceof e.Parser)){return new e.Parser(t)}this.options={};i=n["0.2"];for(r in i){if(!p.call(i,r))continue;o=i[r];this.options[r]=o}for(r in t){if(!p.call(t,r))continue;o=t[r];this.options[r]=o}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(u.normalize)}this.reset()}Parser.prototype.processAsync=function(){var t,e;try{if(this.remaining.length<=this.options.chunkSize){t=this.remaining;this.remaining="";this.saxParser=this.saxParser.write(t);return this.saxParser.close()}else{t=this.remaining.substr(0,this.options.chunkSize);this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length);this.saxParser=this.saxParser.write(t);return l(this.processAsync)}}catch(t){e=t;if(!this.saxParser.errThrown){this.saxParser.errThrown=true;return this.emit(e)}}};Parser.prototype.assignOrPush=function(t,e,r){if(!(e in t)){if(!this.options.explicitArray){return i(t,e,r)}else{return i(t,e,[r])}}else{if(!(t[e]instanceof Array)){i(t,e,[t[e]])}return t[e].push(r)}};Parser.prototype.reset=function(){var t,e,r,n;this.removeAllListeners();this.saxParser=c.parser(this.options.strict,{trim:false,normalize:false,xmlns:this.options.xmlns});this.saxParser.errThrown=false;this.saxParser.onerror=function(t){return function(e){t.saxParser.resume();if(!t.saxParser.errThrown){t.saxParser.errThrown=true;return t.emit("error",e)}}}(this);this.saxParser.onend=function(t){return function(){if(!t.saxParser.ended){t.saxParser.ended=true;return t.emit("end",t.resultObject)}}}(this);this.saxParser.ended=false;this.EXPLICIT_CHARKEY=this.options.explicitCharkey;this.resultObject=null;n=[];t=this.options.attrkey;e=this.options.charkey;this.saxParser.onopentag=function(r){return function(o){var s,u,c,l,h;c={};c[e]="";if(!r.options.ignoreAttrs){h=o.attributes;for(s in h){if(!p.call(h,s))continue;if(!(t in c)&&!r.options.mergeAttrs){c[t]={}}u=r.options.attrValueProcessors?a(r.options.attrValueProcessors,o.attributes[s],s):o.attributes[s];l=r.options.attrNameProcessors?a(r.options.attrNameProcessors,s):s;if(r.options.mergeAttrs){r.assignOrPush(c,l,u)}else{i(c[t],l,u)}}}c["#name"]=r.options.tagNameProcessors?a(r.options.tagNameProcessors,o.name):o.name;if(r.options.xmlns){c[r.options.xmlnskey]={uri:o.uri,local:o.local}}return n.push(c)}}(this);this.saxParser.onclosetag=function(t){return function(){var r,o,u,c,l,h,f,d,m,y;h=n.pop();l=h["#name"];if(!t.options.explicitChildren||!t.options.preserveChildrenOrder){delete h["#name"]}if(h.cdata===true){r=h.cdata;delete h.cdata}m=n[n.length-1];if(h[e].match(/^\s*$/)&&!r){o=h[e];delete h[e]}else{if(t.options.trim){h[e]=h[e].trim()}if(t.options.normalize){h[e]=h[e].replace(/\s{2,}/g," ").trim()}h[e]=t.options.valueProcessors?a(t.options.valueProcessors,h[e],l):h[e];if(Object.keys(h).length===1&&e in h&&!t.EXPLICIT_CHARKEY){h=h[e]}}if(s(h)){if(typeof t.options.emptyTag==="function"){h=t.options.emptyTag()}else{h=t.options.emptyTag!==""?t.options.emptyTag:o}}if(t.options.validator!=null){y="/"+function(){var t,e,r;r=[];for(t=0,e=n.length;t<e;t++){c=n[t];r.push(c["#name"])}return r}().concat(l).join("/");(function(){var e;try{return h=t.options.validator(y,m&&m[l],h)}catch(r){e=r;return t.emit("error",e)}})()}if(t.options.explicitChildren&&!t.options.mergeAttrs&&typeof h==="object"){if(!t.options.preserveChildrenOrder){c={};if(t.options.attrkey in h){c[t.options.attrkey]=h[t.options.attrkey];delete h[t.options.attrkey]}if(!t.options.charsAsChildren&&t.options.charkey in h){c[t.options.charkey]=h[t.options.charkey];delete h[t.options.charkey]}if(Object.getOwnPropertyNames(h).length>0){c[t.options.childkey]=h}h=c}else if(m){m[t.options.childkey]=m[t.options.childkey]||[];f={};for(u in h){if(!p.call(h,u))continue;i(f,u,h[u])}m[t.options.childkey].push(f);delete h["#name"];if(Object.keys(h).length===1&&e in h&&!t.EXPLICIT_CHARKEY){h=h[e]}}}if(n.length>0){return t.assignOrPush(m,l,h)}else{if(t.options.explicitRoot){d=h;h={};i(h,l,d)}t.resultObject=h;t.saxParser.ended=true;return t.emit("end",t.resultObject)}}}(this);r=function(t){return function(r){var i,o;o=n[n.length-1];if(o){o[e]+=r;if(t.options.explicitChildren&&t.options.preserveChildrenOrder&&t.options.charsAsChildren&&(t.options.includeWhiteChars||r.replace(/\\n/g,"").trim()!=="")){o[t.options.childkey]=o[t.options.childkey]||[];i={"#name":"__text__"};i[e]=r;if(t.options.normalize){i[e]=i[e].replace(/\s{2,}/g," ").trim()}o[t.options.childkey].push(i)}return o}}}(this);this.saxParser.ontext=r;return this.saxParser.oncdata=function(t){return function(t){var e;e=r(t);if(e){return e.cdata=true}}}(this)};Parser.prototype.parseString=function(e,r){var n;if(r!=null&&typeof r==="function"){this.on("end",(function(t){this.reset();return r(null,t)}));this.on("error",(function(t){this.reset();return r(t)}))}try{e=e.toString();if(e.trim()===""){this.emit("end",null);return true}e=t.stripBOM(e);if(this.options.async){this.remaining=e;l(this.processAsync);return this.saxParser}return this.saxParser.write(e).close()}catch(t){n=t;if(!(this.saxParser.errThrown||this.saxParser.ended)){this.emit("error",n);return this.saxParser.errThrown=true}else if(this.saxParser.ended){throw n}}};Parser.prototype.parseStringPromise=function(t){return new Promise(function(e){return function(r,n){return e.parseString(t,(function(t,e){if(t){return n(t)}else{return r(e)}}))}}(this))};return Parser}(o);e.parseString=function(t,r,n){var i,o,s;if(n!=null){if(typeof n==="function"){i=n}if(typeof r==="object"){o=r}}else{if(typeof r==="function"){i=r}o={}}s=new e.Parser(o);return s.parseString(t,i)};e.parseStringPromise=function(t,r){var n,i;if(typeof r==="object"){n=r}i=new e.Parser(n);return i.parseStringPromise(t)}}).call(this)},574:function(t,e){(function(){"use strict";var t;t=new RegExp(/(?!xmlns)^.*:/);e.normalize=function(t){return t.toLowerCase()};e.firstCharLowerCase=function(t){return t.charAt(0).toLowerCase()+t.slice(1)};e.stripPrefix=function(e){return e.replace(t,"")};e.parseNumbers=function(t){if(!isNaN(t)){t=t%1===0?parseInt(t,10):parseFloat(t)}return t};e.parseBooleans=function(t){if(/^(?:true|false)$/i.test(t)){t=t.toLowerCase()==="true"}return t}}).call(this)},362:function(t,e,r){(function(){"use strict";var t,n,i,o,extend=function(t,e){for(var r in e){if(s.call(e,r))t[r]=e[r]}function ctor(){this.constructor=t}ctor.prototype=e.prototype;t.prototype=new ctor;t.__super__=e.prototype;return t},s={}.hasOwnProperty;n=r(706);t=r(937);i=r(343);o=r(574);e.defaults=n.defaults;e.processors=o;e.ValidationError=function(t){extend(ValidationError,t);function ValidationError(t){this.message=t}return ValidationError}(Error);e.Builder=t.Builder;e.Parser=i.Parser;e.parseString=i.parseString;e.parseStringPromise=i.parseStringPromise}).call(this)},921:function(t){(function(){t.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},259:function(t){(function(){t.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)},871:function(t){(function(){var e,r,n,i,o,s,a,u=[].slice,c={}.hasOwnProperty;e=function(){var t,e,r,n,i,s;s=arguments[0],i=2<=arguments.length?u.call(arguments,1):[];if(o(Object.assign)){Object.assign.apply(null,arguments)}else{for(t=0,r=i.length;t<r;t++){n=i[t];if(n!=null){for(e in n){if(!c.call(n,e))continue;s[e]=n[e]}}}}return s};o=function(t){return!!t&&Object.prototype.toString.call(t)==="[object Function]"};s=function(t){var e;return!!t&&((e=typeof t)==="function"||e==="object")};n=function(t){if(o(Array.isArray)){return Array.isArray(t)}else{return Object.prototype.toString.call(t)==="[object Array]"}};i=function(t){var e;if(n(t)){return!t.length}else{for(e in t){if(!c.call(t,e))continue;return false}return true}};a=function(t){var e,r;return s(t)&&(r=Object.getPrototypeOf(t))&&(e=r.constructor)&&typeof e==="function"&&e instanceof e&&Function.prototype.toString.call(e)===Function.prototype.toString.call(Object)};r=function(t){if(o(t.valueOf)){return t.valueOf()}else{return t}};t.exports.assign=e;t.exports.isFunction=o;t.exports.isObject=s;t.exports.isArray=n;t.exports.isEmpty=i;t.exports.isPlainObject=a;t.exports.getValue=r}).call(this)},471:function(t){(function(){t.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},696:function(t,e,r){(function(){var e,n,i;e=r(259);i=r(730);t.exports=n=function(){function XMLAttribute(t,r,n){this.parent=t;if(this.parent){this.options=this.parent.options;this.stringify=this.parent.stringify}if(r==null){throw new Error("Missing attribute name. "+this.debugInfo(r))}this.name=this.stringify.name(r);this.value=this.stringify.attValue(n);this.type=e.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(t){return this.value=t||""}});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(t){return this.options.writer.attribute(this,this.options.writer.filterOptions(t))};XMLAttribute.prototype.debugInfo=function(t){t=t||this.name;if(t==null){return"parent: <"+this.parent.name+">"}else{return"attribute: {"+t+"}, parent: <"+this.parent.name+">"}};XMLAttribute.prototype.isEqualNode=function(t){if(t.namespaceURI!==this.namespaceURI){return false}if(t.prefix!==this.prefix){return false}if(t.localName!==this.localName){return false}if(t.value!==this.value){return false}return true};return XMLAttribute}()}).call(this)},705:function(t,e,r){(function(){var e,n,i,extend=function(t,e){for(var r in e){if(o.call(e,r))t[r]=e[r]}function ctor(){this.constructor=t}ctor.prototype=e.prototype;t.prototype=new ctor;t.__super__=e.prototype;return t},o={}.hasOwnProperty;e=r(259);i=r(363);t.exports=n=function(t){extend(XMLCData,t);function XMLCData(t,r){XMLCData.__super__.constructor.call(this,t);if(r==null){throw new Error("Missing CDATA text. "+this.debugInfo())}this.name="#cdata-section";this.type=e.CData;this.value=this.stringify.cdata(r)}XMLCData.prototype.clone=function(){return Object.create(this)};XMLCData.prototype.toString=function(t){return this.options.writer.cdata(this,this.options.writer.filterOptions(t))};return XMLCData}(i)}).call(this)},363:function(t,e,r){(function(){var e,n,extend=function(t,e){for(var r in e){if(i.call(e,r))t[r]=e[r]}function ctor(){this.constructor=t}ctor.prototype=e.prototype;t.prototype=new ctor;t.__super__=e.prototype;return t},i={}.hasOwnProperty;n=r(730);t.exports=e=function(t){extend(XMLCharacterData,t);function XMLCharacterData(t){XMLCharacterData.__super__.constructor.call(this,t);this.value=""}Object.defineProperty(XMLCharacterData.prototype,"data",{get:function(){return this.value},set:function(t){return this.value=t||""}});Object.defineProperty(XMLCharacterData.prototype,"length",{get:function(){return this.value.length}});Object.defineProperty(XMLCharacterData.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}});XMLCharacterData.prototype.clone=function(){return Object.create(this)};XMLCharacterData.prototype.substringData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.appendData=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.insertData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.deleteData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.replaceData=function(t,e,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.isEqualNode=function(t){if(!XMLCharacterData.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)){return false}if(t.data!==this.data){return false}return true};return XMLCharacterData}(n)}).call(this)},677:function(t,e,r){(function(){var e,n,i,extend=function(t,e){for(var r in e){if(o.call(e,r))t[r]=e[r]}function ctor(){this.constructor=t}ctor.prototype=e.prototype;t.prototype=new ctor;t.__super__=e.prototype;return t},o={}.hasOwnProperty;e=r(259);n=r(363);t.exports=i=function(t){extend(XMLComment,t);function XMLComment(t,r){XMLComment.__super__.constructor.call(this,t);if(r==null){throw new Error("Missing comment text. "+this.debugInfo())}this.name="#comment";this.type=e.Comment;this.value=this.stringify.comment(r)}XMLComment.prototype.clone=function(){return Object.create(this)};XMLComment.prototype.toString=function(t){return this.options.writer.comment(this,this.options.writer.filterOptions(t))};return XMLComment}(n)}).call(this)},844:function(t,e,r){(function(){var e,n,i;n=r(426);i=r(545);t.exports=e=function(){function XMLDOMConfiguration(){var t;this.defaultParams={"canonical-form":false,"cdata-sections":false,comments:false,"datatype-normalization":false,"element-content-whitespace":true,entities:true,"error-handler":new n,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=t=Object.create(this.defaultParams)}Object.defineProperty(XMLDOMConfiguration.prototype,"parameterNames",{get:function(){return new i(Object.keys(this.defaultParams))}});XMLDOMConfiguration.prototype.getParameter=function(t){if(this.params.hasOwnProperty(t)){return this.params[t]}else{return null}};XMLDOMConfiguration.prototype.canSetParameter=function(t,e){return true};XMLDOMConfiguration.prototype.setParameter=function(t,e){if(e!=null){return this.params[t]=e}else{return delete this.params[t]}};return XMLDOMConfiguration}()}).call(this)},426:function(t){(function(){var e;t.exports=e=function(){function XMLDOMErrorHandler(){}XMLDOMErrorHandler.prototype.handleError=function(t){throw new Error(t)};return XMLDOMErrorHandler}()}).call(this)},926:function(t){(function(){var e;t.exports=e=function(){function XMLDOMImplementation(){}XMLDOMImplementation.prototype.hasFeature=function(t,e){return true};XMLDOMImplementation.prototype.createDocumentType=function(t,e,r){throw new Error("This DOM method is not implemented.")};XMLDOMImplementation.prototype.createDocument=function(t,e,r){throw new Error("This DOM method is not implemented.")};XMLDOMImplementation.prototype.createHTMLDocument=function(t){throw new Error("This DOM method is not implemented.")};XMLDOMImplementation.prototype.getFeature=function(t,e){throw new Error("This DOM method is not implemented.")};return XMLDOMImplementation}()}).call(this)},545:function(t){(function(){var e;t.exports=e=function(){function XMLDOMStringList(t){this.arr=t||[]}Object.defineProperty(XMLDOMStringList.prototype,"length",{get:function(){return this.arr.length}});XMLDOMStringList.prototype.item=function(t){return this.arr[t]||null};XMLDOMStringList.prototype.contains=function(t){return this.arr.indexOf(t)!==-1};return XMLDOMStringList}()}).call(this)},145:function(t,e,r){(function(){var e,n,i,extend=function(t,e){for(var r in e){if(o.call(e,r))t[r]=e[r]}function ctor(){this.constructor=t}ctor.prototype=e.prototype;t.prototype=new ctor;t.__super__=e.prototype;return t},o={}.hasOwnProperty;i=r(730);e=r(259);t.exports=n=function(t){extend(XMLDTDAttList,t);function XMLDTDAttList(t,r,n,i,o,s){XMLDTDAttList.__super__.constructor.call(this,t);if(r==null){throw new Error("Missing DTD element name. "+this.debugInfo())}if(n==null){throw new Error("Missing DTD attribute name. "+this.debugInfo(r))}if(!i){throw new Error("Missing DTD attribute type. "+this.debugInfo(r))}if(!o){throw new Error("Missing DTD attribute default. "+this.debugInfo(r))}if(o.indexOf("#")!==0){o="#"+o}if(!o.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)){throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(r))}if(s&&!o.match(/^(#FIXED|#DEFAULT)$/)){throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(r))}this.elementName=this.stringify.name(r);this.type=e.AttributeDeclaration;this.attributeName=this.stringify.name(n);this.attributeType=this.stringify.dtdAttType(i);if(s){this.defaultValue=this.stringify.dtdAttDefault(s)}this.defaultValueType=o}XMLDTDAttList.prototype.toString=function(t){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(t))};return XMLDTDAttList}(i)}).call(this)},981:function(t,e,r){(function(){var e,n,i,extend=function(t,e){for(var r in e){if(o.call(e,r))t[r]=e[r]}function ctor(){this.constructor=t}ctor.prototype=e.prototype;t.prototype=new ctor;t.__super__=e.prototype;return t},o={}.hasOwnProperty;i=r(730);e=r(259);t.exports=n=function(t){extend(XMLDTDElement,t);function XMLDTDElement(t,r,n){XMLDTDElement.__super__.constructor.call(this,t);if(r==null){throw new Error("Missing DTD element name. "+this.debugInfo())}if(!n){n="(#PCDATA)"}if(Array.isArray(n)){n="("+n.join(",")+")"}this.name=this.stringify.name(r);this.type=e.ElementDeclaration;this.value=this.stringify.dtdElementValue(n)}XMLDTDElement.prototype.toString=function(t){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(t))};return XMLDTDElement}(i)}).call(this)},847:function(t,e,r){(function(){var e,n,i,o,extend=function(t,e){for(var r in e){if(s.call(e,r))t[r]=e[r]}function ctor(){this.constructor=t}ctor.prototype=e.prototype;t.prototype=new ctor;t.__super__=e.prototype;return t},s={}.hasOwnProperty;o=r(871).isObject;i=r(730);e=r(259);t.exports=n=function(t){extend(XMLDTDEntity,t);function XMLDTDEntity(t,r,n,i){XMLDTDEntity.__super__.constructor.call(this,t);if(n==null){throw new Error("Missing DTD entity name. "+this.debugInfo(n))}if(i==null){throw new Error("Missing DTD entity value. "+this.debugInfo(n))}this.pe=!!r;this.name=this.stringify.name(n);this.type=e.EntityDeclaration;if(!o(i)){this.value=this.stringify.dtdEntityValue(i);this.internal=true}else{if(!i.pubID&&!i.sysID){throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(n))}if(i.pubID&&!i.sysID){throw new Error("System identifier is required for a public external entity. "+this.debugInfo(n))}this.internal=false;if(i.pubID!=null){this.pubID=this.stringify.dtdPubID(i.pubID)}if(i.sysID!=null){this.sysID=this.stringify.dtdSysID(i.sysID)}if(i.nData!=null){this.nData=this.stringify.dtdNData(i.nData)}if(this.pe&&this.nData){throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(n))}}}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(t){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(t))};return XMLDTDEntity}(i)}).call(this)},678:function(t,e,r){(function(){var e,n,i,extend=function(t,e){for(var r in e){if(o.call(e,r))t[r]=e[r]}function ctor(){this.constructor=t}ctor.prototype=e.prototype;t.prototype=new ctor;t.__super__=e.prototype;return t},o={}.hasOwnProperty;i=r(730);e=r(259);t.exports=n=function(t){extend(XMLDTDNotation,t);function XMLDTDNotation(t,r,n){XMLDTDNotation.__super__.constructor.call(this,t);if(r==null){throw new Error("Missing DTD notation name. "+this.debugInfo(r))}if(!n.pubID&&!n.sysID){throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(r))}this.name=this.stringify.name(r);this.type=e.NotationDeclaration;if(n.pubID!=null){this.pubID=this.stringify.dtdPubID(n.pubID)}if(n.sysID!=null){this.sysID=this.stringify.dtdSysID(n.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(t){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(t))};return XMLDTDNotation}(i)}).call(this)},684:function(t,e,r){(function(){var e,n,i,o,extend=function(t,e){for(var r in e){if(s.call(e,r))t[r]=e[r]}function ctor(){this.constructor=t}ctor.prototype=e.prototype;t.prototype=new ctor;t.__super__=e.prototype;return t},s={}.hasOwnProperty;o=r(871).isObject;i=r(730);e=r(259);t.exports=n=function(t){extend(XMLDeclaration,t);function XMLDeclaration(t,r,n,i){var s;XMLDeclaration.__super__.constructor.call(this,t);if(o(r)){s=r,r=s.version,n=s.encoding,i=s.standalone}if(!r){r="1.0"}this.type=e.Declaration;this.version=this.stringify.xmlVersion(r);if(n!=null){this.encoding=this.stringify.xmlEncoding(n)}if(i!=null){this.standalone=this.stringify.xmlStandalone(i)}}XMLDeclaration.prototype.toString=function(t){return this.options.writer.declaration(this,this.options.writer.filterOptions(t))};return XMLDeclaration}(i)}).call(this)},522:function(t,e,r){(function(){var e,n,i,o,s,a,u,c,l,extend=function(t,e){for(var r in e){if(p.call(e,r))t[r]=e[r]}function ctor(){this.constructor=t}ctor.prototype=e.prototype;t.prototype=new ctor;t.__super__=e.prototype;return t},p={}.hasOwnProperty;l=r(871).isObject;c=r(730);e=r(259);n=r(145);o=r(847);i=r(981);s=r(678);u=r(359);t.exports=a=function(t){extend(XMLDocType,t);function XMLDocType(t,r,n){var i,o,s,a,u,c;XMLDocType.__super__.constructor.call(this,t);this.type=e.DocType;if(t.children){a=t.children;for(o=0,s=a.length;o<s;o++){i=a[o];if(i.type===e.Element){this.name=i.name;break}}}this.documentObject=t;if(l(r)){u=r,r=u.pubID,n=u.sysID}if(n==null){c=[r,n],n=c[0],r=c[1]}if(r!=null){this.pubID=this.stringify.dtdPubID(r)}if(n!=null){this.sysID=this.stringify.dtdSysID(n)}}Object.defineProperty(XMLDocType.prototype,"entities",{get:function(){var t,r,n,i,o;i={};o=this.children;for(r=0,n=o.length;r<n;r++){t=o[r];if(t.type===e.EntityDeclaration&&!t.pe){i[t.name]=t}}return new u(i)}});Object.defineProperty(XMLDocType.prototype,"notations",{get:function(){var t,r,n,i,o;i={};o=this.children;for(r=0,n=o.length;r<n;r++){t=o[r];if(t.type===e.NotationDeclaration){i[t.name]=t}}return new u(i)}});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(t,e){var r;r=new i(this,t,e);this.children.push(r);return this};XMLDocType.prototype.attList=function(t,e,r,i,o){var s;s=new n(this,t,e,r,i,o);this.children.push(s);return this};XMLDocType.prototype.entity=function(t,e){var r;r=new o(this,false,t,e);this.children.push(r);return this};XMLDocType.prototype.pEntity=function(t,e){var r;r=new o(this,true,t,e);this.children.push(r);return this};XMLDocType.prototype.notation=function(t,e){var r;r=new s(this,t,e);this.children.push(r);return this};XMLDocType.prototype.toString=function(t){return this.options.writer.docType(this,this.options.writer.filterOptions(t))};XMLDocType.prototype.ele=function(t,e){return this.element(t,e)};XMLDocType.prototype.att=function(t,e,r,n,i){return this.attList(t,e,r,n,i)};XMLDocType.prototype.ent=function(t,e){return this.entity(t,e)};XMLDocType.prototype.pent=function(t,e){return this.pEntity(t,e)};XMLDocType.prototype.not=function(t,e){return this.notation(t,e)};XMLDocType.prototype.up=function(){return this.root()||this.documentObject};XMLDocType.prototype.isEqualNode=function(t){if(!XMLDocType.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)){return false}if(t.name!==this.name){return false}if(t.publicId!==this.publicId){return false}if(t.systemId!==this.systemId){return false}return true};return XMLDocType}(c)}).call(this)},47:function(t,e,r){(function(){var e,n,i,o,s,a,u,c,extend=function(t,e){for(var r in e){if(l.call(e,r))t[r]=e[r]}function ctor(){this.constructor=t}ctor.prototype=e.prototype;t.prototype=new ctor;t.__super__=e.prototype;return t},l={}.hasOwnProperty;c=r(871).isPlainObject;i=r(926);n=r(844);s=r(730);e=r(259);u=r(178);a=r(160);t.exports=o=function(t){extend(XMLDocument,t);function XMLDocument(t){XMLDocument.__super__.constructor.call(this,null);this.name="#document";this.type=e.Document;this.documentURI=null;this.domConfig=new n;t||(t={});if(!t.writer){t.writer=new a}this.options=t;this.stringify=new u(t)}Object.defineProperty(XMLDocument.prototype,"implementation",{value:new i});Object.defineProperty(XMLDocument.prototype,"doctype",{get:function(){var t,r,n,i;i=this.children;for(r=0,n=i.length;r<n;r++){t=i[r];if(t.type===e.DocType){return t}}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===e.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===e.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===e.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(t){var e;e={};if(!t){t=this.options.writer}else if(c(t)){e=t;t=this.options.writer}return t.document(this,t.filterOptions(e))};XMLDocument.prototype.toString=function(t){return this.options.writer.document(this,this.options.writer.filterOptions(t))};XMLDocument.prototype.createElement=function(t){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(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createComment=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createCDATASection=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createProcessingInstruction=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createAttribute=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createEntityReference=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.getElementsByTagName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.importNode=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createElementNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createAttributeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.getElementsByTagNameNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.getElementById=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.adoptNode=function(t){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(t,e,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.getElementsByClassName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createEvent=function(t){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(t,e,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createTreeWalker=function(t,e,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};return XMLDocument}(s)}).call(this)},698:function(t,e,r){(function(){var e,n,i,o,s,a,u,c,l,p,h,f,d,m,y,g,D,L,M,T,w,E,N,b,X={}.hasOwnProperty;b=r(871),E=b.isObject,w=b.isFunction,N=b.isPlainObject,T=b.getValue;e=r(259);f=r(47);m=r(520);o=r(705);s=r(677);g=r(382);M=r(389);y=r(777);p=r(684);h=r(522);a=r(145);c=r(847);u=r(981);l=r(678);i=r(696);L=r(178);D=r(160);n=r(471);t.exports=d=function(){function XMLDocumentCB(t,r,n){var i;this.name="?xml";this.type=e.Document;t||(t={});i={};if(!t.writer){t.writer=new D}else if(N(t.writer)){i=t.writer;t.writer=new D}this.options=t;this.writer=t.writer;this.writerOptions=this.writer.filterOptions(i);this.stringify=new L(t);this.onDataCallback=r||function(){};this.onEndCallback=n||function(){};this.currentNode=null;this.currentLevel=-1;this.openTags={};this.documentStarted=false;this.documentCompleted=false;this.root=null}XMLDocumentCB.prototype.createChildNode=function(t){var r,n,i,o,s,a,u,c;switch(t.type){case e.CData:this.cdata(t.value);break;case e.Comment:this.comment(t.value);break;case e.Element:i={};u=t.attribs;for(n in u){if(!X.call(u,n))continue;r=u[n];i[n]=r.value}this.node(t.name,i);break;case e.Dummy:this.dummy();break;case e.Raw:this.raw(t.value);break;case e.Text:this.text(t.value);break;case e.ProcessingInstruction:this.instruction(t.target,t.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+t.constructor.name)}c=t.children;for(s=0,a=c.length;s<a;s++){o=c[s];this.createChildNode(o);if(o.type===e.Element){this.up()}}return this};XMLDocumentCB.prototype.dummy=function(){return this};XMLDocumentCB.prototype.node=function(t,e,r){var n;if(t==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(t))}this.openCurrent();t=T(t);if(e==null){e={}}e=T(e);if(!E(e)){n=[e,r],r=n[0],e=n[1]}this.currentNode=new m(this,t,e);this.currentNode.children=false;this.currentLevel++;this.openTags[this.currentLevel]=this.currentNode;if(r!=null){this.text(r)}return this};XMLDocumentCB.prototype.element=function(t,r,n){var i,o,s,a,u,c;if(this.currentNode&&this.currentNode.type===e.DocType){this.dtdElement.apply(this,arguments)}else{if(Array.isArray(t)||E(t)||w(t)){a=this.options.noValidation;this.options.noValidation=true;c=new f(this.options).element("TEMP_ROOT");c.element(t);this.options.noValidation=a;u=c.children;for(o=0,s=u.length;o<s;o++){i=u[o];this.createChildNode(i);if(i.type===e.Element){this.up()}}}else{this.node(t,r,n)}}return this};XMLDocumentCB.prototype.attribute=function(t,e){var r,n;if(!this.currentNode||this.currentNode.children){throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(t))}if(t!=null){t=T(t)}if(E(t)){for(r in t){if(!X.call(t,r))continue;n=t[r];this.attribute(r,n)}}else{if(w(e)){e=e.apply()}if(this.options.keepNullAttributes&&e==null){this.currentNode.attribs[t]=new i(this,t,"")}else if(e!=null){this.currentNode.attribs[t]=new i(this,t,e)}}return this};XMLDocumentCB.prototype.text=function(t){var e;this.openCurrent();e=new M(this,t);this.onData(this.writer.text(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.cdata=function(t){var e;this.openCurrent();e=new o(this,t);this.onData(this.writer.cdata(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.comment=function(t){var e;this.openCurrent();e=new s(this,t);this.onData(this.writer.comment(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.raw=function(t){var e;this.openCurrent();e=new g(this,t);this.onData(this.writer.raw(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.instruction=function(t,e){var r,n,i,o,s;this.openCurrent();if(t!=null){t=T(t)}if(e!=null){e=T(e)}if(Array.isArray(t)){for(r=0,o=t.length;r<o;r++){n=t[r];this.instruction(n)}}else if(E(t)){for(n in t){if(!X.call(t,n))continue;i=t[n];this.instruction(n,i)}}else{if(w(e)){e=e.apply()}s=new y(this,t,e);this.onData(this.writer.processingInstruction(s,this.writerOptions,this.currentLevel+1),this.currentLevel+1)}return this};XMLDocumentCB.prototype.declaration=function(t,e,r){var n;this.openCurrent();if(this.documentStarted){throw new Error("declaration() must be the first node.")}n=new p(this,t,e,r);this.onData(this.writer.declaration(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.doctype=function(t,e,r){this.openCurrent();if(t==null){throw new Error("Missing root node name.")}if(this.root){throw new Error("dtd() must come before the root node.")}this.currentNode=new h(this,e,r);this.currentNode.rootNodeName=t;this.currentNode.children=false;this.currentLevel++;this.openTags[this.currentLevel]=this.currentNode;return this};XMLDocumentCB.prototype.dtdElement=function(t,e){var r;this.openCurrent();r=new u(this,t,e);this.onData(this.writer.dtdElement(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.attList=function(t,e,r,n,i){var o;this.openCurrent();o=new a(this,t,e,r,n,i);this.onData(this.writer.dtdAttList(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.entity=function(t,e){var r;this.openCurrent();r=new c(this,false,t,e);this.onData(this.writer.dtdEntity(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.pEntity=function(t,e){var r;this.openCurrent();r=new c(this,true,t,e);this.onData(this.writer.dtdEntity(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.notation=function(t,e){var r;this.openCurrent();r=new l(this,t,e);this.onData(this.writer.dtdNotation(r,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(t){var r,i,o,s;if(!t.isOpen){if(!this.root&&this.currentLevel===0&&t.type===e.Element){this.root=t}i="";if(t.type===e.Element){this.writerOptions.state=n.OpenTag;i=this.writer.indent(t,this.writerOptions,this.currentLevel)+"<"+t.name;s=t.attribs;for(o in s){if(!X.call(s,o))continue;r=s[o];i+=this.writer.attribute(r,this.writerOptions,this.currentLevel)}i+=(t.children?">":"/>")+this.writer.endline(t,this.writerOptions,this.currentLevel);this.writerOptions.state=n.InsideTag}else{this.writerOptions.state=n.OpenTag;i=this.writer.indent(t,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+t.rootNodeName;if(t.pubID&&t.sysID){i+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"'}else if(t.sysID){i+=' SYSTEM "'+t.sysID+'"'}if(t.children){i+=" [";this.writerOptions.state=n.InsideTag}else{this.writerOptions.state=n.CloseTag;i+=">"}i+=this.writer.endline(t,this.writerOptions,this.currentLevel)}this.onData(i,this.currentLevel);return t.isOpen=true}};XMLDocumentCB.prototype.closeNode=function(t){var r;if(!t.isClosed){r="";this.writerOptions.state=n.CloseTag;if(t.type===e.Element){r=this.writer.indent(t,this.writerOptions,this.currentLevel)+"</"+t.name+">"+this.writer.endline(t,this.writerOptions,this.currentLevel)}else{r=this.writer.indent(t,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(t,this.writerOptions,this.currentLevel)}this.writerOptions.state=n.None;this.onData(r,this.currentLevel);return t.isClosed=true}};XMLDocumentCB.prototype.onData=function(t,e){this.documentStarted=true;return this.onDataCallback(t,e+1)};XMLDocumentCB.prototype.onEnd=function(){this.documentCompleted=true;return this.onEndCallback()};XMLDocumentCB.prototype.debugInfo=function(t){if(t==null){return""}else{return"node: <"+t+">"}};XMLDocumentCB.prototype.ele=function(){return this.element.apply(this,arguments)};XMLDocumentCB.prototype.nod=function(t,e,r){return this.node(t,e,r)};XMLDocumentCB.prototype.txt=function(t){return this.text(t)};XMLDocumentCB.prototype.dat=function(t){return this.cdata(t)};XMLDocumentCB.prototype.com=function(t){return this.comment(t)};XMLDocumentCB.prototype.ins=function(t,e){return this.instruction(t,e)};XMLDocumentCB.prototype.dec=function(t,e,r){return this.declaration(t,e,r)};XMLDocumentCB.prototype.dtd=function(t,e,r){return this.doctype(t,e,r)};XMLDocumentCB.prototype.e=function(t,e,r){return this.element(t,e,r)};XMLDocumentCB.prototype.n=function(t,e,r){return this.node(t,e,r)};XMLDocumentCB.prototype.t=function(t){return this.text(t)};XMLDocumentCB.prototype.d=function(t){return this.cdata(t)};XMLDocumentCB.prototype.c=function(t){return this.comment(t)};XMLDocumentCB.prototype.r=function(t){return this.raw(t)};XMLDocumentCB.prototype.i=function(t,e){return this.instruction(t,e)};XMLDocumentCB.prototype.att=function(){if(this.currentNode&&this.currentNode.type===e.DocType){return this.attList.apply(this,arguments)}else{return this.attribute.apply(this,arguments)}};XMLDocumentCB.prototype.a=function(){if(this.currentNode&&this.currentNode.type===e.DocType){return this.attList.apply(this,arguments)}else{return this.attribute.apply(this,arguments)}};XMLDocumentCB.prototype.ent=function(t,e){return this.entity(t,e)};XMLDocumentCB.prototype.pent=function(t,e){return this.pEntity(t,e)};XMLDocumentCB.prototype.not=function(t,e){return this.notation(t,e)};return XMLDocumentCB}()}).call(this)},916:function(t,e,r){(function(){var e,n,i,extend=function(t,e){for(var r in e){if(o.call(e,r))t[r]=e[r]}function ctor(){this.constructor=t}ctor.prototype=e.prototype;t.prototype=new ctor;t.__super__=e.prototype;return t},o={}.hasOwnProperty;i=r(730);e=r(259);t.exports=n=function(t){extend(XMLDummy,t);function XMLDummy(t){XMLDummy.__super__.constructor.call(this,t);this.type=e.Dummy}XMLDummy.prototype.clone=function(){return Object.create(this)};XMLDummy.prototype.toString=function(t){return""};return XMLDummy}(i)}).call(this)},520:function(t,e,r){(function(){var e,n,i,o,s,a,u,c,l,extend=function(t,e){for(var r in e){if(p.call(e,r))t[r]=e[r]}function ctor(){this.constructor=t}ctor.prototype=e.prototype;t.prototype=new ctor;t.__super__=e.prototype;return t},p={}.hasOwnProperty;l=r(871),c=l.isObject,u=l.isFunction,a=l.getValue;s=r(730);e=r(259);n=r(696);o=r(359);t.exports=i=function(t){extend(XMLElement,t);function XMLElement(t,r,n){var i,o,s,a;XMLElement.__super__.constructor.call(this,t);if(r==null){throw new Error("Missing element name. "+this.debugInfo())}this.name=this.stringify.name(r);this.type=e.Element;this.attribs={};this.schemaTypeInfo=null;if(n!=null){this.attribute(n)}if(t.type===e.Document){this.isRoot=true;this.documentObject=t;t.rootObject=this;if(t.children){a=t.children;for(o=0,s=a.length;o<s;o++){i=a[o];if(i.type===e.DocType){i.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 o(this.attribs)}return this.attributeMap}});XMLElement.prototype.clone=function(){var t,e,r,n;r=Object.create(this);if(r.isRoot){r.documentObject=null}r.attribs={};n=this.attribs;for(e in n){if(!p.call(n,e))continue;t=n[e];r.attribs[e]=t.clone()}r.children=[];this.children.forEach((function(t){var e;e=t.clone();e.parent=r;return r.children.push(e)}));return r};XMLElement.prototype.attribute=function(t,e){var r,i;if(t!=null){t=a(t)}if(c(t)){for(r in t){if(!p.call(t,r))continue;i=t[r];this.attribute(r,i)}}else{if(u(e)){e=e.apply()}if(this.options.keepNullAttributes&&e==null){this.attribs[t]=new n(this,t,"")}else if(e!=null){this.attribs[t]=new n(this,t,e)}}return this};XMLElement.prototype.removeAttribute=function(t){var e,r,n;if(t==null){throw new Error("Missing attribute name. "+this.debugInfo())}t=a(t);if(Array.isArray(t)){for(r=0,n=t.length;r<n;r++){e=t[r];delete this.attribs[e]}}else{delete this.attribs[t]}return this};XMLElement.prototype.toString=function(t){return this.options.writer.element(this,this.options.writer.filterOptions(t))};XMLElement.prototype.att=function(t,e){return this.attribute(t,e)};XMLElement.prototype.a=function(t,e){return this.attribute(t,e)};XMLElement.prototype.getAttribute=function(t){if(this.attribs.hasOwnProperty(t)){return this.attribs[t].value}else{return null}};XMLElement.prototype.setAttribute=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getAttributeNode=function(t){if(this.attribs.hasOwnProperty(t)){return this.attribs[t]}else{return null}};XMLElement.prototype.setAttributeNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.removeAttributeNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByTagName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getAttributeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.setAttributeNS=function(t,e,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.removeAttributeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getAttributeNodeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.setAttributeNodeNS=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByTagNameNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.hasAttribute=function(t){return this.attribs.hasOwnProperty(t)};XMLElement.prototype.hasAttributeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.setIdAttribute=function(t,e){if(this.attribs.hasOwnProperty(t)){return this.attribs[t].isId}else{return e}};XMLElement.prototype.setIdAttributeNS=function(t,e,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.setIdAttributeNode=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByTagName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByTagNameNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByClassName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.isEqualNode=function(t){var e,r,n;if(!XMLElement.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)){return false}if(t.namespaceURI!==this.namespaceURI){return false}if(t.prefix!==this.prefix){return false}if(t.localName!==this.localName){return false}if(t.attribs.length!==this.attribs.length){return false}for(e=r=0,n=this.attribs.length-1;0<=n?r<=n:r>=n;e=0<=n?++r:--r){if(!this.attribs[e].isEqualNode(t.attribs[e])){return false}}return true};return XMLElement}(s)}).call(this)},359:function(t){(function(){var e;t.exports=e=function(){function XMLNamedNodeMap(t){this.nodes=t}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(t){return this.nodes[t]};XMLNamedNodeMap.prototype.setNamedItem=function(t){var e;e=this.nodes[t.nodeName];this.nodes[t.nodeName]=t;return e||null};XMLNamedNodeMap.prototype.removeNamedItem=function(t){var e;e=this.nodes[t];delete this.nodes[t];return e||null};XMLNamedNodeMap.prototype.item=function(t){return this.nodes[Object.keys(this.nodes)[t]]||null};XMLNamedNodeMap.prototype.getNamedItemNS=function(t,e){throw new Error("This DOM method is not implemented.")};XMLNamedNodeMap.prototype.setNamedItemNS=function(t){throw new Error("This DOM method is not implemented.")};XMLNamedNodeMap.prototype.removeNamedItemNS=function(t,e){throw new Error("This DOM method is not implemented.")};return XMLNamedNodeMap}()}).call(this)},730:function(t,e,r){(function(){var e,n,i,o,s,a,u,c,l,p,h,f,d,m,y,g,D,L,M,T={}.hasOwnProperty;M=r(871),L=M.isObject,D=M.isFunction,g=M.isEmpty,y=M.getValue;c=null;i=null;o=null;s=null;a=null;d=null;m=null;f=null;u=null;n=null;h=null;l=null;e=null;t.exports=p=function(){function XMLNode(t){this.parent=t;if(this.parent){this.options=this.parent.options;this.stringify=this.parent.stringify}this.value=null;this.children=[];this.baseURI=null;if(!c){c=r(520);i=r(705);o=r(677);s=r(684);a=r(522);d=r(382);m=r(389);f=r(777);u=r(916);n=r(259);h=r(374);l=r(359);e=r(921)}}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 h(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 t;t=this.parent.children.indexOf(this);return this.parent.children[t-1]||null}});Object.defineProperty(XMLNode.prototype,"nextSibling",{get:function(){var t;t=this.parent.children.indexOf(this);return this.parent.children[t+1]||null}});Object.defineProperty(XMLNode.prototype,"ownerDocument",{get:function(){return this.document()||null}});Object.defineProperty(XMLNode.prototype,"textContent",{get:function(){var t,e,r,i,o;if(this.nodeType===n.Element||this.nodeType===n.DocumentFragment){o="";i=this.children;for(e=0,r=i.length;e<r;e++){t=i[e];if(t.textContent){o+=t.textContent}}return o}else{return null}},set:function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}});XMLNode.prototype.setParent=function(t){var e,r,n,i,o;this.parent=t;if(t){this.options=t.options;this.stringify=t.stringify}i=this.children;o=[];for(r=0,n=i.length;r<n;r++){e=i[r];o.push(e.setParent(this))}return o};XMLNode.prototype.element=function(t,e,r){var n,i,o,s,a,u,c,l,p,h,f;u=null;if(e===null&&r==null){p=[{},null],e=p[0],r=p[1]}if(e==null){e={}}e=y(e);if(!L(e)){h=[e,r],r=h[0],e=h[1]}if(t!=null){t=y(t)}if(Array.isArray(t)){for(o=0,c=t.length;o<c;o++){i=t[o];u=this.element(i)}}else if(D(t)){u=this.element(t.apply())}else if(L(t)){for(a in t){if(!T.call(t,a))continue;f=t[a];if(D(f)){f=f.apply()}if(!this.options.ignoreDecorators&&this.stringify.convertAttKey&&a.indexOf(this.stringify.convertAttKey)===0){u=this.attribute(a.substr(this.stringify.convertAttKey.length),f)}else if(!this.options.separateArrayItems&&Array.isArray(f)&&g(f)){u=this.dummy()}else if(L(f)&&g(f)){u=this.element(a)}else if(!this.options.keepNullNodes&&f==null){u=this.dummy()}else if(!this.options.separateArrayItems&&Array.isArray(f)){for(s=0,l=f.length;s<l;s++){i=f[s];n={};n[a]=i;u=this.element(n)}}else if(L(f)){if(!this.options.ignoreDecorators&&this.stringify.convertTextKey&&a.indexOf(this.stringify.convertTextKey)===0){u=this.element(f)}else{u=this.element(a);u.element(f)}}else{u=this.element(a,f)}}}else if(!this.options.keepNullNodes&&r===null){u=this.dummy()}else{if(!this.options.ignoreDecorators&&this.stringify.convertTextKey&&t.indexOf(this.stringify.convertTextKey)===0){u=this.text(r)}else if(!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&t.indexOf(this.stringify.convertCDataKey)===0){u=this.cdata(r)}else if(!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&t.indexOf(this.stringify.convertCommentKey)===0){u=this.comment(r)}else if(!this.options.ignoreDecorators&&this.stringify.convertRawKey&&t.indexOf(this.stringify.convertRawKey)===0){u=this.raw(r)}else if(!this.options.ignoreDecorators&&this.stringify.convertPIKey&&t.indexOf(this.stringify.convertPIKey)===0){u=this.instruction(t.substr(this.stringify.convertPIKey.length),r)}else{u=this.node(t,e,r)}}if(u==null){throw new Error("Could not create any elements with: "+t+". "+this.debugInfo())}return u};XMLNode.prototype.insertBefore=function(t,e,r){var n,i,o,s,a;if(t!=null?t.type:void 0){o=t;s=e;o.setParent(this);if(s){i=children.indexOf(s);a=children.splice(i);children.push(o);Array.prototype.push.apply(children,a)}else{children.push(o)}return o}else{if(this.isRoot){throw new Error("Cannot insert elements at root level. "+this.debugInfo(t))}i=this.parent.children.indexOf(this);a=this.parent.children.splice(i);n=this.parent.element(t,e,r);Array.prototype.push.apply(this.parent.children,a);return n}};XMLNode.prototype.insertAfter=function(t,e,r){var n,i,o;if(this.isRoot){throw new Error("Cannot insert elements at root level. "+this.debugInfo(t))}i=this.parent.children.indexOf(this);o=this.parent.children.splice(i+1);n=this.parent.element(t,e,r);Array.prototype.push.apply(this.parent.children,o);return n};XMLNode.prototype.remove=function(){var t,e;if(this.isRoot){throw new Error("Cannot remove the root element. "+this.debugInfo())}t=this.parent.children.indexOf(this);[].splice.apply(this.parent.children,[t,t-t+1].concat(e=[])),e;return this.parent};XMLNode.prototype.node=function(t,e,r){var n,i;if(t!=null){t=y(t)}e||(e={});e=y(e);if(!L(e)){i=[e,r],r=i[0],e=i[1]}n=new c(this,t,e);if(r!=null){n.text(r)}this.children.push(n);return n};XMLNode.prototype.text=function(t){var e;if(L(t)){this.element(t)}e=new m(this,t);this.children.push(e);return this};XMLNode.prototype.cdata=function(t){var e;e=new i(this,t);this.children.push(e);return this};XMLNode.prototype.comment=function(t){var e;e=new o(this,t);this.children.push(e);return this};XMLNode.prototype.commentBefore=function(t){var e,r,n;r=this.parent.children.indexOf(this);n=this.parent.children.splice(r);e=this.parent.comment(t);Array.prototype.push.apply(this.parent.children,n);return this};XMLNode.prototype.commentAfter=function(t){var e,r,n;r=this.parent.children.indexOf(this);n=this.parent.children.splice(r+1);e=this.parent.comment(t);Array.prototype.push.apply(this.parent.children,n);return this};XMLNode.prototype.raw=function(t){var e;e=new d(this,t);this.children.push(e);return this};XMLNode.prototype.dummy=function(){var t;t=new u(this);return t};XMLNode.prototype.instruction=function(t,e){var r,n,i,o,s;if(t!=null){t=y(t)}if(e!=null){e=y(e)}if(Array.isArray(t)){for(o=0,s=t.length;o<s;o++){r=t[o];this.instruction(r)}}else if(L(t)){for(r in t){if(!T.call(t,r))continue;n=t[r];this.instruction(r,n)}}else{if(D(e)){e=e.apply()}i=new f(this,t,e);this.children.push(i)}return this};XMLNode.prototype.instructionBefore=function(t,e){var r,n,i;n=this.parent.children.indexOf(this);i=this.parent.children.splice(n);r=this.parent.instruction(t,e);Array.prototype.push.apply(this.parent.children,i);return this};XMLNode.prototype.instructionAfter=function(t,e){var r,n,i;n=this.parent.children.indexOf(this);i=this.parent.children.splice(n+1);r=this.parent.instruction(t,e);Array.prototype.push.apply(this.parent.children,i);return this};XMLNode.prototype.declaration=function(t,e,r){var i,o;i=this.document();o=new s(i,t,e,r);if(i.children.length===0){i.children.unshift(o)}else if(i.children[0].type===n.Declaration){i.children[0]=o}else{i.children.unshift(o)}return i.root()||i};XMLNode.prototype.dtd=function(t,e){var r,i,o,s,u,c,l,p,h,f;i=this.document();o=new a(i,t,e);h=i.children;for(s=u=0,l=h.length;u<l;s=++u){r=h[s];if(r.type===n.DocType){i.children[s]=o;return o}}f=i.children;for(s=c=0,p=f.length;c<p;s=++c){r=f[s];if(r.isRoot){i.children.splice(s,0,o);return o}}i.children.push(o);return o};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 t;t=this;while(t){if(t.type===n.Document){return t.rootObject}else if(t.isRoot){return t}else{t=t.parent}}};XMLNode.prototype.document=function(){var t;t=this;while(t){if(t.type===n.Document){return t}else{t=t.parent}}};XMLNode.prototype.end=function(t){return this.document().end(t)};XMLNode.prototype.prev=function(){var t;t=this.parent.children.indexOf(this);if(t<1){throw new Error("Already at the first node. "+this.debugInfo())}return this.parent.children[t-1]};XMLNode.prototype.next=function(){var t;t=this.parent.children.indexOf(this);if(t===-1||t===this.parent.children.length-1){throw new Error("Already at the last node. "+this.debugInfo())}return this.parent.children[t+1]};XMLNode.prototype.importDocument=function(t){var e;e=t.root().clone();e.parent=this;e.isRoot=false;this.children.push(e);return this};XMLNode.prototype.debugInfo=function(t){var e,r;t=t||this.name;if(t==null&&!((e=this.parent)!=null?e.name:void 0)){return""}else if(t==null){return"parent: <"+this.parent.name+">"}else if(!((r=this.parent)!=null?r.name:void 0)){return"node: <"+t+">"}else{return"node: <"+t+">, parent: <"+this.parent.name+">"}};XMLNode.prototype.ele=function(t,e,r){return this.element(t,e,r)};XMLNode.prototype.nod=function(t,e,r){return this.node(t,e,r)};XMLNode.prototype.txt=function(t){return this.text(t)};XMLNode.prototype.dat=function(t){return this.cdata(t)};XMLNode.prototype.com=function(t){return this.comment(t)};XMLNode.prototype.ins=function(t,e){return this.instruction(t,e)};XMLNode.prototype.doc=function(){return this.document()};XMLNode.prototype.dec=function(t,e,r){return this.declaration(t,e,r)};XMLNode.prototype.e=function(t,e,r){return this.element(t,e,r)};XMLNode.prototype.n=function(t,e,r){return this.node(t,e,r)};XMLNode.prototype.t=function(t){return this.text(t)};XMLNode.prototype.d=function(t){return this.cdata(t)};XMLNode.prototype.c=function(t){return this.comment(t)};XMLNode.prototype.r=function(t){return this.raw(t)};XMLNode.prototype.i=function(t,e){return this.instruction(t,e)};XMLNode.prototype.u=function(){return this.up()};XMLNode.prototype.importXMLBuilder=function(t){return this.importDocument(t)};XMLNode.prototype.replaceChild=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.removeChild=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.appendChild=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.hasChildNodes=function(){return this.children.length!==0};XMLNode.prototype.cloneNode=function(t){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(t,e){return true};XMLNode.prototype.hasAttributes=function(){return this.attribs.length!==0};XMLNode.prototype.compareDocumentPosition=function(t){var r,n;r=this;if(r===t){return 0}else if(this.document()!==t.document()){n=e.Disconnected|e.ImplementationSpecific;if(Math.random()<.5){n|=e.Preceding}else{n|=e.Following}return n}else if(r.isAncestor(t)){return e.Contains|e.Preceding}else if(r.isDescendant(t)){return e.Contains|e.Following}else if(r.isPreceding(t)){return e.Preceding}else{return e.Following}};XMLNode.prototype.isSameNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.lookupPrefix=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.isDefaultNamespace=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.lookupNamespaceURI=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.isEqualNode=function(t){var e,r,n;if(t.nodeType!==this.nodeType){return false}if(t.children.length!==this.children.length){return false}for(e=r=0,n=this.children.length-1;0<=n?r<=n:r>=n;e=0<=n?++r:--r){if(!this.children[e].isEqualNode(t.children[e])){return false}}return true};XMLNode.prototype.getFeature=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.setUserData=function(t,e,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.getUserData=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.contains=function(t){if(!t){return false}return t===this||this.isDescendant(t)};XMLNode.prototype.isDescendant=function(t){var e,r,n,i,o;o=this.children;for(n=0,i=o.length;n<i;n++){e=o[n];if(t===e){return true}r=e.isDescendant(t);if(r){return true}}return false};XMLNode.prototype.isAncestor=function(t){return t.isDescendant(this)};XMLNode.prototype.isPreceding=function(t){var e,r;e=this.treePosition(t);r=this.treePosition(this);if(e===-1||r===-1){return false}else{return e<r}};XMLNode.prototype.isFollowing=function(t){var e,r;e=this.treePosition(t);r=this.treePosition(this);if(e===-1||r===-1){return false}else{return e>r}};XMLNode.prototype.treePosition=function(t){var e,r;r=0;e=false;this.foreachTreeNode(this.document(),(function(n){r++;if(!e&&n===t){return e=true}}));if(e){return r}else{return-1}};XMLNode.prototype.foreachTreeNode=function(t,e){var r,n,i,o,s;t||(t=this.document());o=t.children;for(n=0,i=o.length;n<i;n++){r=o[n];if(s=e(r)){return s}else{s=this.foreachTreeNode(r,e);if(s){return s}}}};return XMLNode}()}).call(this)},374:function(t){(function(){var e;t.exports=e=function(){function XMLNodeList(t){this.nodes=t}Object.defineProperty(XMLNodeList.prototype,"length",{get:function(){return this.nodes.length||0}});XMLNodeList.prototype.clone=function(){return this.nodes=null};XMLNodeList.prototype.item=function(t){return this.nodes[t]||null};return XMLNodeList}()}).call(this)},777:function(t,e,r){(function(){var e,n,i,extend=function(t,e){for(var r in e){if(o.call(e,r))t[r]=e[r]}function ctor(){this.constructor=t}ctor.prototype=e.prototype;t.prototype=new ctor;t.__super__=e.prototype;return t},o={}.hasOwnProperty;e=r(259);n=r(363);t.exports=i=function(t){extend(XMLProcessingInstruction,t);function XMLProcessingInstruction(t,r,n){XMLProcessingInstruction.__super__.constructor.call(this,t);if(r==null){throw new Error("Missing instruction target. "+this.debugInfo())}this.type=e.ProcessingInstruction;this.target=this.stringify.insTarget(r);this.name=this.target;if(n){this.value=this.stringify.insValue(n)}}XMLProcessingInstruction.prototype.clone=function(){return Object.create(this)};XMLProcessingInstruction.prototype.toString=function(t){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(t))};XMLProcessingInstruction.prototype.isEqualNode=function(t){if(!XMLProcessingInstruction.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)){return false}if(t.target!==this.target){return false}return true};return XMLProcessingInstruction}(n)}).call(this)},382:function(t,e,r){(function(){var e,n,i,extend=function(t,e){for(var r in e){if(o.call(e,r))t[r]=e[r]}function ctor(){this.constructor=t}ctor.prototype=e.prototype;t.prototype=new ctor;t.__super__=e.prototype;return t},o={}.hasOwnProperty;e=r(259);n=r(730);t.exports=i=function(t){extend(XMLRaw,t);function XMLRaw(t,r){XMLRaw.__super__.constructor.call(this,t);if(r==null){throw new Error("Missing raw text. "+this.debugInfo())}this.type=e.Raw;this.value=this.stringify.raw(r)}XMLRaw.prototype.clone=function(){return Object.create(this)};XMLRaw.prototype.toString=function(t){return this.options.writer.raw(this,this.options.writer.filterOptions(t))};return XMLRaw}(n)}).call(this)},345:function(t,e,r){(function(){var e,n,i,o,extend=function(t,e){for(var r in e){if(s.call(e,r))t[r]=e[r]}function ctor(){this.constructor=t}ctor.prototype=e.prototype;t.prototype=new ctor;t.__super__=e.prototype;return t},s={}.hasOwnProperty;e=r(259);o=r(664);n=r(471);t.exports=i=function(t){extend(XMLStreamWriter,t);function XMLStreamWriter(t,e){this.stream=t;XMLStreamWriter.__super__.constructor.call(this,e)}XMLStreamWriter.prototype.endline=function(t,e,r){if(t.isLastRootNode&&e.state===n.CloseTag){return""}else{return XMLStreamWriter.__super__.endline.call(this,t,e,r)}};XMLStreamWriter.prototype.document=function(t,e){var r,n,i,o,s,a,u,c,l;u=t.children;for(n=i=0,s=u.length;i<s;n=++i){r=u[n];r.isLastRootNode=n===t.children.length-1}e=this.filterOptions(e);c=t.children;l=[];for(o=0,a=c.length;o<a;o++){r=c[o];l.push(this.writeChildNode(r,e,0))}return l};XMLStreamWriter.prototype.attribute=function(t,e,r){return this.stream.write(XMLStreamWriter.__super__.attribute.call(this,t,e,r))};XMLStreamWriter.prototype.cdata=function(t,e,r){return this.stream.write(XMLStreamWriter.__super__.cdata.call(this,t,e,r))};XMLStreamWriter.prototype.comment=function(t,e,r){return this.stream.write(XMLStreamWriter.__super__.comment.call(this,t,e,r))};XMLStreamWriter.prototype.declaration=function(t,e,r){return this.stream.write(XMLStreamWriter.__super__.declaration.call(this,t,e,r))};XMLStreamWriter.prototype.docType=function(t,e,r){var i,o,s,a;r||(r=0);this.openNode(t,e,r);e.state=n.OpenTag;this.stream.write(this.indent(t,e,r));this.stream.write("<!DOCTYPE "+t.root().name);if(t.pubID&&t.sysID){this.stream.write(' PUBLIC "'+t.pubID+'" "'+t.sysID+'"')}else if(t.sysID){this.stream.write(' SYSTEM "'+t.sysID+'"')}if(t.children.length>0){this.stream.write(" [");this.stream.write(this.endline(t,e,r));e.state=n.InsideTag;a=t.children;for(o=0,s=a.length;o<s;o++){i=a[o];this.writeChildNode(i,e,r+1)}e.state=n.CloseTag;this.stream.write("]")}e.state=n.CloseTag;this.stream.write(e.spaceBeforeSlash+">");this.stream.write(this.endline(t,e,r));e.state=n.None;return this.closeNode(t,e,r)};XMLStreamWriter.prototype.element=function(t,r,i){var o,a,u,c,l,p,h,f,d,m;i||(i=0);this.openNode(t,r,i);r.state=n.OpenTag;this.stream.write(this.indent(t,r,i)+"<"+t.name);d=t.attribs;for(h in d){if(!s.call(d,h))continue;o=d[h];this.attribute(o,r,i)}u=t.children.length;c=u===0?null:t.children[0];if(u===0||t.children.every((function(t){return(t.type===e.Text||t.type===e.Raw)&&t.value===""}))){if(r.allowEmpty){this.stream.write(">");r.state=n.CloseTag;this.stream.write("</"+t.name+">")}else{r.state=n.CloseTag;this.stream.write(r.spaceBeforeSlash+"/>")}}else if(r.pretty&&u===1&&(c.type===e.Text||c.type===e.Raw)&&c.value!=null){this.stream.write(">");r.state=n.InsideTag;r.suppressPrettyCount++;f=true;this.writeChildNode(c,r,i+1);r.suppressPrettyCount--;f=false;r.state=n.CloseTag;this.stream.write("</"+t.name+">")}else{this.stream.write(">"+this.endline(t,r,i));r.state=n.InsideTag;m=t.children;for(l=0,p=m.length;l<p;l++){a=m[l];this.writeChildNode(a,r,i+1)}r.state=n.CloseTag;this.stream.write(this.indent(t,r,i)+"</"+t.name+">")}this.stream.write(this.endline(t,r,i));r.state=n.None;return this.closeNode(t,r,i)};XMLStreamWriter.prototype.processingInstruction=function(t,e,r){return this.stream.write(XMLStreamWriter.__super__.processingInstruction.call(this,t,e,r))};XMLStreamWriter.prototype.raw=function(t,e,r){return this.stream.write(XMLStreamWriter.__super__.raw.call(this,t,e,r))};XMLStreamWriter.prototype.text=function(t,e,r){return this.stream.write(XMLStreamWriter.__super__.text.call(this,t,e,r))};XMLStreamWriter.prototype.dtdAttList=function(t,e,r){return this.stream.write(XMLStreamWriter.__super__.dtdAttList.call(this,t,e,r))};XMLStreamWriter.prototype.dtdElement=function(t,e,r){return this.stream.write(XMLStreamWriter.__super__.dtdElement.call(this,t,e,r))};XMLStreamWriter.prototype.dtdEntity=function(t,e,r){return this.stream.write(XMLStreamWriter.__super__.dtdEntity.call(this,t,e,r))};XMLStreamWriter.prototype.dtdNotation=function(t,e,r){return this.stream.write(XMLStreamWriter.__super__.dtdNotation.call(this,t,e,r))};return XMLStreamWriter}(o)}).call(this)},160:function(t,e,r){(function(){var e,n,extend=function(t,e){for(var r in e){if(i.call(e,r))t[r]=e[r]}function ctor(){this.constructor=t}ctor.prototype=e.prototype;t.prototype=new ctor;t.__super__=e.prototype;return t},i={}.hasOwnProperty;n=r(664);t.exports=e=function(t){extend(XMLStringWriter,t);function XMLStringWriter(t){XMLStringWriter.__super__.constructor.call(this,t)}XMLStringWriter.prototype.document=function(t,e){var r,n,i,o,s;e=this.filterOptions(e);o="";s=t.children;for(n=0,i=s.length;n<i;n++){r=s[n];o+=this.writeChildNode(r,e,0)}if(e.pretty&&o.slice(-e.newline.length)===e.newline){o=o.slice(0,-e.newline.length)}return o};return XMLStringWriter}(n)}).call(this)},178:function(t){(function(){var e,bind=function(t,e){return function(){return t.apply(e,arguments)}},r={}.hasOwnProperty;t.exports=e=function(){function XMLStringifier(t){this.assertLegalName=bind(this.assertLegalName,this);this.assertLegalChar=bind(this.assertLegalChar,this);var e,n,i;t||(t={});this.options=t;if(!this.options.version){this.options.version="1.0"}n=t.stringify||{};for(e in n){if(!r.call(n,e))continue;i=n[e];this[e]=i}}XMLStringifier.prototype.name=function(t){if(this.options.noValidation){return t}return this.assertLegalName(""+t||"")};XMLStringifier.prototype.text=function(t){if(this.options.noValidation){return t}return this.assertLegalChar(this.textEscape(""+t||""))};XMLStringifier.prototype.cdata=function(t){if(this.options.noValidation){return t}t=""+t||"";t=t.replace("]]>","]]]]><![CDATA[>");return this.assertLegalChar(t)};XMLStringifier.prototype.comment=function(t){if(this.options.noValidation){return t}t=""+t||"";if(t.match(/--/)){throw new Error("Comment text cannot contain double-hypen: "+t)}return this.assertLegalChar(t)};XMLStringifier.prototype.raw=function(t){if(this.options.noValidation){return t}return""+t||""};XMLStringifier.prototype.attValue=function(t){if(this.options.noValidation){return t}return this.assertLegalChar(this.attEscape(t=""+t||""))};XMLStringifier.prototype.insTarget=function(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")};XMLStringifier.prototype.insValue=function(t){if(this.options.noValidation){return t}t=""+t||"";if(t.match(/\?>/)){throw new Error("Invalid processing instruction value: "+t)}return this.assertLegalChar(t)};XMLStringifier.prototype.xmlVersion=function(t){if(this.options.noValidation){return t}t=""+t||"";if(!t.match(/1\.[0-9]+/)){throw new Error("Invalid version number: "+t)}return t};XMLStringifier.prototype.xmlEncoding=function(t){if(this.options.noValidation){return t}t=""+t||"";if(!t.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)){throw new Error("Invalid encoding: "+t)}return this.assertLegalChar(t)};XMLStringifier.prototype.xmlStandalone=function(t){if(this.options.noValidation){return t}if(t){return"yes"}else{return"no"}};XMLStringifier.prototype.dtdPubID=function(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")};XMLStringifier.prototype.dtdSysID=function(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")};XMLStringifier.prototype.dtdElementValue=function(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")};XMLStringifier.prototype.dtdAttType=function(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")};XMLStringifier.prototype.dtdAttDefault=function(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")};XMLStringifier.prototype.dtdEntityValue=function(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")};XMLStringifier.prototype.dtdNData=function(t){if(this.options.noValidation){return t}return this.assertLegalChar(""+t||"")};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(t){var e,r;if(this.options.noValidation){return t}e="";if(this.options.version==="1.0"){e=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;if(r=t.match(e)){throw new Error("Invalid character in string: "+t+" at index "+r.index)}}else if(this.options.version==="1.1"){e=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;if(r=t.match(e)){throw new Error("Invalid character in string: "+t+" at index "+r.index)}}return t};XMLStringifier.prototype.assertLegalName=function(t){var e;if(this.options.noValidation){return t}this.assertLegalChar(t);e=/^([: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(!t.match(e)){throw new Error("Invalid character in name")}return t};XMLStringifier.prototype.textEscape=function(t){var e;if(this.options.noValidation){return t}e=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g;return t.replace(e,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
")};XMLStringifier.prototype.attEscape=function(t){var e;if(this.options.noValidation){return t}e=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g;return t.replace(e,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
")};return XMLStringifier}()}).call(this)},389:function(t,e,r){(function(){var e,n,i,extend=function(t,e){for(var r in e){if(o.call(e,r))t[r]=e[r]}function ctor(){this.constructor=t}ctor.prototype=e.prototype;t.prototype=new ctor;t.__super__=e.prototype;return t},o={}.hasOwnProperty;e=r(259);n=r(363);t.exports=i=function(t){extend(XMLText,t);function XMLText(t,r){XMLText.__super__.constructor.call(this,t);if(r==null){throw new Error("Missing element text. "+this.debugInfo())}this.name="#text";this.type=e.Text;this.value=this.stringify.text(r)}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 t,e,r;r="";e=this.previousSibling;while(e){r=e.data+r;e=e.previousSibling}r+=this.data;t=this.nextSibling;while(t){r=r+t.data;t=t.nextSibling}return r}});XMLText.prototype.clone=function(){return Object.create(this)};XMLText.prototype.toString=function(t){return this.options.writer.text(this,this.options.writer.filterOptions(t))};XMLText.prototype.splitText=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLText.prototype.replaceWholeText=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())};return XMLText}(n)}).call(this)},664:function(t,e,r){(function(){var e,n,i,o,s,a,u,c,l,p,h,f,d,m,y,g,D,L={}.hasOwnProperty;D=r(871).assign;e=r(259);l=r(684);p=r(522);i=r(705);o=r(677);f=r(520);m=r(382);y=r(389);d=r(777);h=r(916);s=r(145);a=r(981);u=r(847);c=r(678);n=r(471);t.exports=g=function(){function XMLWriterBase(t){var e,r,n;t||(t={});this.options=t;r=t.writer||{};for(e in r){if(!L.call(r,e))continue;n=r[e];this["_"+e]=this[e];this[e]=n}}XMLWriterBase.prototype.filterOptions=function(t){var e,r,i,o,s,a,u,c;t||(t={});t=D({},this.options,t);e={writer:this};e.pretty=t.pretty||false;e.allowEmpty=t.allowEmpty||false;e.indent=(r=t.indent)!=null?r:" ";e.newline=(i=t.newline)!=null?i:"\n";e.offset=(o=t.offset)!=null?o:0;e.dontPrettyTextNodes=(s=(a=t.dontPrettyTextNodes)!=null?a:t.dontprettytextnodes)!=null?s:0;e.spaceBeforeSlash=(u=(c=t.spaceBeforeSlash)!=null?c:t.spacebeforeslash)!=null?u:"";if(e.spaceBeforeSlash===true){e.spaceBeforeSlash=" "}e.suppressPrettyCount=0;e.user={};e.state=n.None;return e};XMLWriterBase.prototype.indent=function(t,e,r){var n;if(!e.pretty||e.suppressPrettyCount){return""}else if(e.pretty){n=(r||0)+e.offset+1;if(n>0){return new Array(n).join(e.indent)}}return""};XMLWriterBase.prototype.endline=function(t,e,r){if(!e.pretty||e.suppressPrettyCount){return""}else{return e.newline}};XMLWriterBase.prototype.attribute=function(t,e,r){var n;this.openAttribute(t,e,r);n=" "+t.name+'="'+t.value+'"';this.closeAttribute(t,e,r);return n};XMLWriterBase.prototype.cdata=function(t,e,r){var i;this.openNode(t,e,r);e.state=n.OpenTag;i=this.indent(t,e,r)+"<![CDATA[";e.state=n.InsideTag;i+=t.value;e.state=n.CloseTag;i+="]]>"+this.endline(t,e,r);e.state=n.None;this.closeNode(t,e,r);return i};XMLWriterBase.prototype.comment=function(t,e,r){var i;this.openNode(t,e,r);e.state=n.OpenTag;i=this.indent(t,e,r)+"\x3c!-- ";e.state=n.InsideTag;i+=t.value;e.state=n.CloseTag;i+=" --\x3e"+this.endline(t,e,r);e.state=n.None;this.closeNode(t,e,r);return i};XMLWriterBase.prototype.declaration=function(t,e,r){var i;this.openNode(t,e,r);e.state=n.OpenTag;i=this.indent(t,e,r)+"<?xml";e.state=n.InsideTag;i+=' version="'+t.version+'"';if(t.encoding!=null){i+=' encoding="'+t.encoding+'"'}if(t.standalone!=null){i+=' standalone="'+t.standalone+'"'}e.state=n.CloseTag;i+=e.spaceBeforeSlash+"?>";i+=this.endline(t,e,r);e.state=n.None;this.closeNode(t,e,r);return i};XMLWriterBase.prototype.docType=function(t,e,r){var i,o,s,a,u;r||(r=0);this.openNode(t,e,r);e.state=n.OpenTag;a=this.indent(t,e,r);a+="<!DOCTYPE "+t.root().name;if(t.pubID&&t.sysID){a+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"'}else if(t.sysID){a+=' SYSTEM "'+t.sysID+'"'}if(t.children.length>0){a+=" [";a+=this.endline(t,e,r);e.state=n.InsideTag;u=t.children;for(o=0,s=u.length;o<s;o++){i=u[o];a+=this.writeChildNode(i,e,r+1)}e.state=n.CloseTag;a+="]"}e.state=n.CloseTag;a+=e.spaceBeforeSlash+">";a+=this.endline(t,e,r);e.state=n.None;this.closeNode(t,e,r);return a};XMLWriterBase.prototype.element=function(t,r,i){var o,s,a,u,c,l,p,h,f,d,m,y,g,D;i||(i=0);d=false;m="";this.openNode(t,r,i);r.state=n.OpenTag;m+=this.indent(t,r,i)+"<"+t.name;y=t.attribs;for(f in y){if(!L.call(y,f))continue;o=y[f];m+=this.attribute(o,r,i)}a=t.children.length;u=a===0?null:t.children[0];if(a===0||t.children.every((function(t){return(t.type===e.Text||t.type===e.Raw)&&t.value===""}))){if(r.allowEmpty){m+=">";r.state=n.CloseTag;m+="</"+t.name+">"+this.endline(t,r,i)}else{r.state=n.CloseTag;m+=r.spaceBeforeSlash+"/>"+this.endline(t,r,i)}}else if(r.pretty&&a===1&&(u.type===e.Text||u.type===e.Raw)&&u.value!=null){m+=">";r.state=n.InsideTag;r.suppressPrettyCount++;d=true;m+=this.writeChildNode(u,r,i+1);r.suppressPrettyCount--;d=false;r.state=n.CloseTag;m+="</"+t.name+">"+this.endline(t,r,i)}else{if(r.dontPrettyTextNodes){g=t.children;for(c=0,p=g.length;c<p;c++){s=g[c];if((s.type===e.Text||s.type===e.Raw)&&s.value!=null){r.suppressPrettyCount++;d=true;break}}}m+=">"+this.endline(t,r,i);r.state=n.InsideTag;D=t.children;for(l=0,h=D.length;l<h;l++){s=D[l];m+=this.writeChildNode(s,r,i+1)}r.state=n.CloseTag;m+=this.indent(t,r,i)+"</"+t.name+">";if(d){r.suppressPrettyCount--}m+=this.endline(t,r,i);r.state=n.None}this.closeNode(t,r,i);return m};XMLWriterBase.prototype.writeChildNode=function(t,r,n){switch(t.type){case e.CData:return this.cdata(t,r,n);case e.Comment:return this.comment(t,r,n);case e.Element:return this.element(t,r,n);case e.Raw:return this.raw(t,r,n);case e.Text:return this.text(t,r,n);case e.ProcessingInstruction:return this.processingInstruction(t,r,n);case e.Dummy:return"";case e.Declaration:return this.declaration(t,r,n);case e.DocType:return this.docType(t,r,n);case e.AttributeDeclaration:return this.dtdAttList(t,r,n);case e.ElementDeclaration:return this.dtdElement(t,r,n);case e.EntityDeclaration:return this.dtdEntity(t,r,n);case e.NotationDeclaration:return this.dtdNotation(t,r,n);default:throw new Error("Unknown XML node type: "+t.constructor.name)}};XMLWriterBase.prototype.processingInstruction=function(t,e,r){var i;this.openNode(t,e,r);e.state=n.OpenTag;i=this.indent(t,e,r)+"<?";e.state=n.InsideTag;i+=t.target;if(t.value){i+=" "+t.value}e.state=n.CloseTag;i+=e.spaceBeforeSlash+"?>";i+=this.endline(t,e,r);e.state=n.None;this.closeNode(t,e,r);return i};XMLWriterBase.prototype.raw=function(t,e,r){var i;this.openNode(t,e,r);e.state=n.OpenTag;i=this.indent(t,e,r);e.state=n.InsideTag;i+=t.value;e.state=n.CloseTag;i+=this.endline(t,e,r);e.state=n.None;this.closeNode(t,e,r);return i};XMLWriterBase.prototype.text=function(t,e,r){var i;this.openNode(t,e,r);e.state=n.OpenTag;i=this.indent(t,e,r);e.state=n.InsideTag;i+=t.value;e.state=n.CloseTag;i+=this.endline(t,e,r);e.state=n.None;this.closeNode(t,e,r);return i};XMLWriterBase.prototype.dtdAttList=function(t,e,r){var i;this.openNode(t,e,r);e.state=n.OpenTag;i=this.indent(t,e,r)+"<!ATTLIST";e.state=n.InsideTag;i+=" "+t.elementName+" "+t.attributeName+" "+t.attributeType;if(t.defaultValueType!=="#DEFAULT"){i+=" "+t.defaultValueType}if(t.defaultValue){i+=' "'+t.defaultValue+'"'}e.state=n.CloseTag;i+=e.spaceBeforeSlash+">"+this.endline(t,e,r);e.state=n.None;this.closeNode(t,e,r);return i};XMLWriterBase.prototype.dtdElement=function(t,e,r){var i;this.openNode(t,e,r);e.state=n.OpenTag;i=this.indent(t,e,r)+"<!ELEMENT";e.state=n.InsideTag;i+=" "+t.name+" "+t.value;e.state=n.CloseTag;i+=e.spaceBeforeSlash+">"+this.endline(t,e,r);e.state=n.None;this.closeNode(t,e,r);return i};XMLWriterBase.prototype.dtdEntity=function(t,e,r){var i;this.openNode(t,e,r);e.state=n.OpenTag;i=this.indent(t,e,r)+"<!ENTITY";e.state=n.InsideTag;if(t.pe){i+=" %"}i+=" "+t.name;if(t.value){i+=' "'+t.value+'"'}else{if(t.pubID&&t.sysID){i+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"'}else if(t.sysID){i+=' SYSTEM "'+t.sysID+'"'}if(t.nData){i+=" NDATA "+t.nData}}e.state=n.CloseTag;i+=e.spaceBeforeSlash+">"+this.endline(t,e,r);e.state=n.None;this.closeNode(t,e,r);return i};XMLWriterBase.prototype.dtdNotation=function(t,e,r){var i;this.openNode(t,e,r);e.state=n.OpenTag;i=this.indent(t,e,r)+"<!NOTATION";e.state=n.InsideTag;i+=" "+t.name;if(t.pubID&&t.sysID){i+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"'}else if(t.pubID){i+=' PUBLIC "'+t.pubID+'"'}else if(t.sysID){i+=' SYSTEM "'+t.sysID+'"'}e.state=n.CloseTag;i+=e.spaceBeforeSlash+">"+this.endline(t,e,r);e.state=n.None;this.closeNode(t,e,r);return i};XMLWriterBase.prototype.openNode=function(t,e,r){};XMLWriterBase.prototype.closeNode=function(t,e,r){};XMLWriterBase.prototype.openAttribute=function(t,e,r){};XMLWriterBase.prototype.closeAttribute=function(t,e,r){};return XMLWriterBase}()}).call(this)},203:function(t,e,r){(function(){var e,n,i,o,s,a,u,c,l,p;p=r(871),c=p.assign,l=p.isFunction;i=r(926);o=r(47);s=r(698);u=r(160);a=r(345);e=r(259);n=r(471);t.exports.create=function(t,e,r,n){var i,s;if(t==null){throw new Error("Root element needs a name.")}n=c({},e,r,n);i=new o(n);s=i.element(t);if(!n.headless){i.declaration(n);if(n.pubID!=null||n.sysID!=null){i.dtd(n)}}return s};t.exports.begin=function(t,e,r){var n;if(l(t)){n=[t,e],e=n[0],r=n[1];t={}}if(e){return new s(t,e,r)}else{return new o(t)}};t.exports.stringWriter=function(t){return new u(t)};t.exports.streamWriter=function(t,e){return new a(t,e)};t.exports.implementation=new i;t.exports.nodeType=e;t.exports.writerState=n}).call(this)},434:function(t){"use strict";t.exports=require("events")},584:function(t){"use strict";t.exports=require("stream")},193:function(t){"use strict";t.exports=require("string_decoder")},557:function(t){"use strict";t.exports=require("timers")}};var e={};function __nccwpck_require__(r){var n=e[r];if(n!==undefined){return n.exports}var i=e[r]={exports:{}};var o=true;try{t[r].call(i.exports,i,i.exports,__nccwpck_require__);o=false}finally{if(o)delete e[r]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(362);module.exports=r})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"xml2js","description":"Simple XML to JavaScript object converter.","keywords":["xml","json"],"homepage":"https://github.com/Leonidas-from-XIV/node-xml2js","version":"0.6.2","author":"Marek Kubica <marek@xivilization.net> (https://xivilization.net)","contributors":["maqr <maqr.lollerskates@gmail.com> (https://github.com/maqr)","Ben Weaver (http://benweaver.com/)","Jae Kwon (https://github.com/jaekwon)","Jim Robert","Ștefan Rusu (http://www.saltwaterc.eu/)","Carter Cole <carter.cole@cartercole.com> (http://cartercole.com/)","Kurt Raschke <kurt@kurtraschke.com> (http://www.kurtraschke.com/)","Contra <contra@australia.edu> (https://github.com/Contra)","Marcelo Diniz <marudiniz@gmail.com> (https://github.com/mdiniz)","Michael Hart (https://github.com/mhart)","Zachary Scott <zachary@zacharyscott.net> (http://zacharyscott.net/)","Raoul Millais (https://github.com/raoulmillais)","Salsita Software (http://www.salsitasoft.com/)","Mike Schilling <mike@emotive.com> (http://www.emotive.com/)","Jackson Tian <shyvo1987@gmail.com> (http://weibo.com/shyvo)","Mikhail Zyatin <mikhail.zyatin@gmail.com> (https://github.com/Sitin)","Chris Tavares <ctavares@microsoft.com> (https://github.com/christav)","Frank Xu <yyfrankyy@gmail.com> (http://f2e.us/)","Guido D'Albore <guido@bitstorm.it> (http://www.bitstorm.it/)","Jack Senechal (http://jacksenechal.com/)","Matthias Hölzl <tc@xantira.com> (https://github.com/hoelzl)","Camille Reynders <info@creynders.be> (http://www.creynders.be/)","Taylor Gautier (https://github.com/tsgautier)","Todd Bryan (https://github.com/toddrbryan)","Leore Avidar <leore.avidar@gmail.com> (http://leoreavidar.com/)","Dave Aitken <dave.aitken@gmail.com> (http://www.actionshrimp.com/)","Shaney Orrowe <shaney.orrowe@practiceweb.co.uk>","Candle <candle@candle.me.uk>","Jess Telford <hi@jes.st> (http://jes.st)","Tom Hughes <<tom@compton.nu> (http://compton.nu/)","Piotr Rochala (http://rocha.la/)","Michael Avila (https://github.com/michaelavila)","Ryan Gahl (https://github.com/ryedin)","Eric Laberge <e.laberge@gmail.com> (https://github.com/elaberge)","Benjamin E. Coe <ben@npmjs.com> (https://twitter.com/benjamincoe)","Stephen Cresswell (https://github.com/cressie176)","Pascal Ehlert <pascal@hacksrus.net> (http://www.hacksrus.net/)","Tom Spencer <fiznool@gmail.com> (http://fiznool.com/)","Tristian Flanagan <tflanagan@datacollaborative.com> (https://github.com/tflanagan)","Tim Johns <timjohns@yahoo.com> (https://github.com/TimJohns)","Bogdan Chadkin <trysound@yandex.ru> (https://github.com/TrySound)","David Wood <david.p.wood@gmail.com> (http://codesleuth.co.uk/)","Nicolas Maquet (https://github.com/nmaquet)","Lovell Fuller (http://lovell.info/)","d3adc0d3 (https://github.com/d3adc0d3)","James Crosby (https://github.com/autopulated)"],"main":"./lib/xml2js","files":["lib"],"directories":{"lib":"./lib"},"scripts":{"build":"cake build","test":"zap","coverage":"nyc npm test && nyc report","coveralls":"nyc npm test && nyc report --reporter=text-lcov | coveralls","doc":"cake doc"},"repository":{"type":"git","url":"https://github.com/Leonidas-from-XIV/node-xml2js.git"},"dependencies":{"sax":">=0.6.0","xmlbuilder":"~11.0.0"},"devDependencies":{"coffeescript":">=1.10.0 <2","coveralls":"^3.0.1","diff":">=1.0.8","docco":">=0.6.2","nyc":">=2.2.1","zap":">=0.2.9 <1"},"engines":{"node":">=4.0.0"},"license":"MIT","_lastModified":"2024-12-22T16:07:13.273Z"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var work_exports = {};
|
|
19
|
+
__export(work_exports, {
|
|
20
|
+
getAuthUrl: () => getAuthUrl,
|
|
21
|
+
redirect: () => redirect
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(work_exports);
|
|
24
|
+
var import_server = require("@tachybase/server");
|
|
25
|
+
const getAuthUrl = async (ctx, next) => {
|
|
26
|
+
const { redirect: redirect2 } = ctx.action.params.values;
|
|
27
|
+
const url = await ctx.auth.getAuthUrl(redirect2);
|
|
28
|
+
ctx.body = { url };
|
|
29
|
+
await next();
|
|
30
|
+
};
|
|
31
|
+
const redirect = async (ctx, next) => {
|
|
32
|
+
const { code, state } = ctx.request.query;
|
|
33
|
+
const stateString = Array.isArray(state) ? state[0] : state;
|
|
34
|
+
const search = new URLSearchParams(stateString);
|
|
35
|
+
const authenticator = search.get("name");
|
|
36
|
+
const appName = search.get("app");
|
|
37
|
+
const redirect2 = search.get("redirect") || "/admin";
|
|
38
|
+
let prefix = process.env.APP_PUBLIC_PATH || "";
|
|
39
|
+
if (appName && appName !== "main") {
|
|
40
|
+
const appSupervisor = import_server.AppSupervisor.getInstance();
|
|
41
|
+
if ((appSupervisor == null ? void 0 : appSupervisor.runningMode) !== "single") {
|
|
42
|
+
prefix += `apps/${appName}`;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const auth = await ctx.app.authManager.get(authenticator, ctx);
|
|
46
|
+
if (prefix.endsWith("/")) {
|
|
47
|
+
prefix = prefix.slice(0, -1);
|
|
48
|
+
}
|
|
49
|
+
try {
|
|
50
|
+
const { token } = await auth.signIn();
|
|
51
|
+
ctx.redirect(`${prefix}${redirect2}?authenticator=${authenticator}&token=${token}`);
|
|
52
|
+
} catch (error) {
|
|
53
|
+
ctx.logger.error("Work auth error", { error });
|
|
54
|
+
ctx.redirect(`${prefix}/signin?redirect=${redirect2}&authenticator=${authenticator}&error=${error.message}`);
|
|
55
|
+
}
|
|
56
|
+
await next();
|
|
57
|
+
};
|
|
58
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
59
|
+
0 && (module.exports = {
|
|
60
|
+
getAuthUrl,
|
|
61
|
+
redirect
|
|
62
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './plugin';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var server_exports = {};
|
|
29
|
+
__export(server_exports, {
|
|
30
|
+
default: () => import_plugin.default
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(server_exports);
|
|
33
|
+
var import_plugin = __toESM(require("./plugin"));
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Plugin } from '@tachybase/server';
|
|
2
|
+
export declare class PluginReplacePageServer extends Plugin {
|
|
3
|
+
getWeChatConfig(): Promise<{
|
|
4
|
+
appid: any;
|
|
5
|
+
appsecret: any;
|
|
6
|
+
token: any;
|
|
7
|
+
accesstoken: any;
|
|
8
|
+
token_expires_at: any;
|
|
9
|
+
}>;
|
|
10
|
+
getWeChatMessage(): Promise<any>;
|
|
11
|
+
getWeChatMenu(): Promise<{
|
|
12
|
+
button: any[];
|
|
13
|
+
}>;
|
|
14
|
+
getWeChatArticle(): Promise<any>;
|
|
15
|
+
checkSignature(query: any): Promise<boolean>;
|
|
16
|
+
getAccessToken(forceRefresh?: boolean): Promise<any>;
|
|
17
|
+
generateAuthUrl(): Promise<string>;
|
|
18
|
+
generateQrCode(): Promise<string>;
|
|
19
|
+
createCustomMenu(): Promise<void>;
|
|
20
|
+
get(ctx: any): Promise<void>;
|
|
21
|
+
post(ctx: any): Promise<void>;
|
|
22
|
+
handleOAuthCallback(ctx: any): Promise<void>;
|
|
23
|
+
getMaterialList(): Promise<any>;
|
|
24
|
+
checkMaterialType(mediaId: any): Promise<boolean>;
|
|
25
|
+
updateLatestArticleWithLatestMediaId(): Promise<void>;
|
|
26
|
+
uploadNewsToDraft(article: any): Promise<any>;
|
|
27
|
+
sendNewsToAll(mediaId: any): Promise<any>;
|
|
28
|
+
publishLastArticleToWeChat(): Promise<any>;
|
|
29
|
+
load(): Promise<void>;
|
|
30
|
+
handleMessageCreate(model: any, options: any): Promise<void>;
|
|
31
|
+
handleMenuUpdate(model: any, options: any): Promise<void>;
|
|
32
|
+
getAllFollowers(): Promise<any>;
|
|
33
|
+
pushMessageToFollowers(userIds: any, message: any): Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
export default PluginReplacePageServer;
|