xPathTrainer/public/JS/xpathTrainer.app.js

1 line
136 KiB
JavaScript
Raw Normal View History

2023-12-10 16:21:35 +01:00
(()=>{var e={167:(e,t)=>{"use strict";function r(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var n=r({HTML:"text/html",isHTML:function(e){return e===n.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),o=r({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===o.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},t.find=function(e,t,r){if(void 0===r&&(r=Array.prototype),e&&"function"==typeof r.find)return r.find.call(e,t);for(var n=0;n<e.length;n++)if(Object.prototype.hasOwnProperty.call(e,n)){var o=e[n];if(t.call(void 0,o,n,e))return o}},t.freeze=r,t.MIME_TYPE=n,t.NAMESPACE=o},129:(e,t,r)=>{var n=r(167),o=r(146),i=r(45),s=r(925),a=o.DOMImplementation,u=n.NAMESPACE,c=s.ParseError,l=s.XMLReader;function p(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function h(e){this.options=e||{locator:{}}}function f(){this.cdata=!1}function d(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function m(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function g(e,t,r){return"string"==typeof e?e.substr(t,r):e.length>=t+r||t?new java.lang.String(e,t,r)+"":e}function N(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}h.prototype.parseFromString=function(e,t){var r=this.options,n=new l,o=r.domBuilder||new f,s=r.errorHandler,a=r.locator,c=r.xmlns||{},h=/\/x?html?$/.test(t),d=h?i.HTML_ENTITIES:i.XML_ENTITIES;a&&o.setDocumentLocator(a),n.errorHandler=function(e,t,r){if(!e){if(t instanceof f)return t;e=t}var n={},o=e instanceof Function;function i(t){var i=e[t];!i&&o&&(i=2==e.length?function(r){e(t,r)}:e),n[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+m(r))}||function(){}}return r=r||{},i("warning"),i("error"),i("fatalError"),n}(s,o,a),n.domBuilder=r.domBuilder||o,h&&(c[""]=u.HTML),c.xml=c.xml||u.XML;var g=r.normalizeLineEndings||p;return e&&"string"==typeof e?n.parse(g(e),c,d):n.errorHandler.error("invalid doc source"),o.doc},f.prototype={startDocument:function(){this.doc=(new a).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,r,n){var o=this.doc,i=o.createElementNS(e,r||t),s=n.length;N(this,i),this.currentElement=i,this.locator&&d(this.locator,i);for(var a=0;a<s;a++){e=n.getURI(a);var u=n.getValue(a),c=(r=n.getQName(a),o.createAttributeNS(e,r));this.locator&&d(n.getLocator(a),c),c.value=c.nodeValue=u,i.setAttributeNode(c)}},endElement:function(e,t,r){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var r=this.doc.createProcessingInstruction(e,t);this.locator&&d(this.locator,r),N(this,r)},ignorableWhitespace:function(e,t,r){},characters:function(e,t,r){if(e=g.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&d(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,r){e=g.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&d(this.locator,n),N(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,r){var n=this.doc.implementation;if(n&&n.createDocumentType){var o=n.createDocumentType(e,t,r);this.locator&&d(this.locator,o),N(this,o),this.doc.doctype=o}},warning:function(e){console.warn("[xmldom warning]\t"+e,m(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,m(this.locator))},fatalError:function(e){throw new