1 line
1.3 MiB
JavaScript
1 line
1.3 MiB
JavaScript
|
|
(()=>{var c={108:(c,t,l)=>{var h=l(788);c.exports=function(c,t){var l,s=null;if(!c||"string"!=typeof c)return s;for(var v,e,a=h(c),w="function"==typeof t,g=0,o=a.length;g<o;g++)v=(l=a[g]).property,e=l.value,w?t(v,e,l):e&&(s||(s={}),s[v]=e);return s}},141:function(c,t,l){"use strict";var h=this&&this.__createBinding||(Object.create?function(c,t,l,h){void 0===h&&(h=l);var s=Object.getOwnPropertyDescriptor(t,l);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[l]}}),Object.defineProperty(c,h,s)}:function(c,t,l,h){void 0===h&&(h=l),c[h]=t[l]}),s=this&&this.__exportStar||function(c,t){for(var l in c)"default"===l||Object.prototype.hasOwnProperty.call(t,l)||h(t,c,l)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var v=l(413),e=l(957);s(l(957),t);var a=/\s+/g,w={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1,xmlMode:!1},g=function(){function c(c,t,l){this.dom=[],this.root=new e.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(l=t,t=w),"object"==typeof c&&(t=c,c=void 0),this.callback=null!=c?c:null,this.options=null!=t?t:w,this.elementCB=null!=l?l:null}return c.prototype.onparserinit=function(c){this.parser=c},c.prototype.onreset=function(){this.dom=[],this.root=new e.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},c.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},c.prototype.onerror=function(c){this.handleCallback(c)},c.prototype.onclosetag=function(){this.lastNode=null;var c=this.tagStack.pop();this.options.withEndIndices&&(c.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(c)},c.prototype.onopentag=function(c,t){var l=this.options.xmlMode?v.ElementType.Tag:void 0,h=new e.Element(c,t,void 0,l);this.addNode(h),this.tagStack.push(h)},c.prototype.ontext=function(c){var t=this.options.normalizeWhitespace,l=this.lastNode;if(l&&l.type===v.ElementType.Text)t?l.data=(l.data+c).replace(a," "):l.data+=c,this.options.withEndIndices&&(l.endIndex=this.parser.endIndex);else{t&&(c=c.replace(a," "));var h=new e.Text(c);this.addNode(h),this.lastNode=h}},c.prototype.oncomment=function(c){if(this.lastNode&&this.lastNode.type===v.ElementType.Comment)this.lastNode.data+=c;else{var t=new e.Comment(c);this.addNode(t),this.lastNode=t}},c.prototype.oncommentend=function(){this.lastNode=null},c.prototype.oncdatastart=function(){var c=new e.Text(""),t=new e.NodeWithChildren(v.ElementType.CDATA,[c]);this.addNode(t),c.parent=t,this.lastNode=c},c.prototype.oncdataend=function(){this.lastNode=null},c.prototype.onprocessinginstruction=function(c,t){var l=new e.ProcessingInstruction(c,t);this.addNode(l)},c.prototype.handleCallback=function(c){if("function"==typeof this.callback)this.callback(c,this.dom);else if(c)throw c},c.prototype.addNode=function(c){var t=this.tagStack[this.tagStack.length-1],l=t.children[t.children.length-1];this.options.withStartIndices&&(c.startIndex=this.parser.startIndex),this.options.withEndIndices&&(c.endIndex=this.parser.endIndex),t.children.push(c),l&&(c.prev=l,l.next=c),c.parent=t,this.lastNode=null},c}();t.DomHandler=g,t.default=g},210:(c,t,l)=>{"use strict";function h(c,t){(null==t||t>c.length)&&(t=c.length);for(var l=0,h=new Array(t);l<t;l++)h[l]=c[l];return h}function s(c,t,l,h,s,v,e){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=h,this.attributeNamespace=s,this.mustUseProperty=l,this.propertyName=c,this.type=t,this.sanitizeURL=v,this.removeEmptyString=e}Object.defineProperty(t,"__esModule",{value:!0});var v={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((function(c){v[c]=new s(c,0,!1,c,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(c){var t,l,e=(l=2,function(c){if(Array.isArray(c))return c}(t=c)||function(c,t){var l=null==c?null:"undefined"!=typeof
|