harvester-ui-extension/extensions/harvester/1.9.0-dev/plugin/harvester-1.9.0-dev.umd.min.xccdf.js

2 lines
266 KiB
JavaScript

"use strict";(("undefined"!==typeof self?self:this)["webpackChunkharvester_1_9_0_dev"]=("undefined"!==typeof self?self:this)["webpackChunkharvester_1_9_0_dev"]||[]).push([[461],{3108:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.abort_add=i,t.abort_remove=o,t.abort_signalAbort=s;const r=n(81542);function i(e,t){t._abortedFlag||t._abortAlgorithms.add(e)}function o(e,t){t._abortAlgorithms.delete(e)}function s(e){if(!e._abortedFlag){e._abortedFlag=!0;for(const t of e._abortAlgorithms)t.call(e);e._abortAlgorithms.clear(),(0,r.event_fireAnEvent)("abort",e)}}},75487:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.attr_setAnExistingAttributeValue=i;const r=n(18966);function i(e,t){null===e._element?e._value=t:(0,r.element_change)(e,e._element,t)}},83222:function(e,t,n){var r=n(4364);Object.defineProperty(t,"__esModule",{value:!0}),t.boundaryPoint_position=s;const i=n(50912),o=n(93502);function s(e,t){const n=e[0],a=e[1],l=t[0],u=t[1];if(r.assert((0,o.tree_rootNode)(n)===(0,o.tree_rootNode)(l),"Boundary points must share the same root node."),n===l)return a===u?i.BoundaryPosition.Equal:a<u?i.BoundaryPosition.Before:i.BoundaryPosition.After;if((0,o.tree_isFollowing)(l,n)){const e=s([l,u],[n,a]);if(e===i.BoundaryPosition.Before)return i.BoundaryPosition.After;if(e===i.BoundaryPosition.After)return i.BoundaryPosition.Before}if((0,o.tree_isAncestorOf)(l,n)){let e=l;while(!(0,o.tree_isChildOf)(n,e))null!==e._parent&&(e=e._parent);if((0,o.tree_index)(e)<a)return i.BoundaryPosition.After}return i.BoundaryPosition.Before}},19139:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.characterData_replaceData=u,t.characterData_substringData=c;const r=n(33696),i=n(25986),o=n(18509),s=n(93502),a=n(87465),l=n(16988);function u(e,t,n,u){const c=(0,s.tree_nodeLength)(e);if(t>c)throw new o.IndexSizeError(`Offset exceeds character data length. Offset: ${t}, Length: ${c}, Node is ${e.nodeName}.`);t+n>c&&(n=c-t),r.dom.features.mutationObservers&&(0,a.observer_queueMutationRecord)("characterData",e,null,null,e._data,[],[],null,null);const d=e._data.substring(0,t)+u+e._data.substring(t+n);e._data=d;for(const i of r.dom.rangeList)i._start[0]===e&&i._start[1]>t&&i._start[1]<=t+n&&(i._start[1]=t),i._end[0]===e&&i._end[1]>t&&i._end[1]<=t+n&&(i._end[1]=t),i._start[0]===e&&i._start[1]>t+n&&(i._start[1]+=u.length-n),i._end[0]===e&&i._end[1]>t+n&&(i._end[1]+=u.length-n);r.dom.features.steps&&i.Guard.isTextNode(e)&&null!==e._parent&&(0,l.dom_runChildTextContentChangeSteps)(e._parent)}function c(e,t,n){const r=(0,s.tree_nodeLength)(e);if(t>r)throw new o.IndexSizeError(`Offset exceeds character data length. Offset: ${t}, Length: ${r}, Node is ${e.nodeName}.`);return t+n>r?e._data.substr(t):e._data.substr(t,n)}},94994:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.create_domImplementation=I,t.create_window=O,t.create_xmlDocument=D,t.create_document=A,t.create_abortController=P,t.create_abortSignal=L,t.create_documentType=M,t.create_element=F,t.create_htmlElement=k,t.create_htmlUnknownElement=R,t.create_documentFragment=j,t.create_shadowRoot=z,t.create_attr=B,t.create_text=G,t.create_cdataSection=W,t.create_comment=U,t.create_processingInstruction=q,t.create_htmlCollection=H,t.create_nodeList=X,t.create_nodeListStatic=V,t.create_namedNodeMap=$,t.create_range=Y,t.create_nodeIterator=Q,t.create_treeWalker=J,t.create_nodeFilter=K,t.create_mutationRecord=Z,t.create_domTokenList=ee;const r=n(38846),i=n(65446),o=n(11544),s=n(8563),a=n(73382),l=n(72018),u=n(18515),c=n(14420),d=n(35251),h=n(10842),_=n(3869),m=n(98669),p=n(53674),f=n(60429),g=n(73329),N=n(27659),b=n(78641),v=n(97944),y=n(95843),w=n(63041),T=n(92928),E=n(1852),S=n(49820),x=n(75484),C=n(96911);function I(e){return r.DOMImplementationImpl._create(e)}function O(){return i.WindowImpl._create()}function D(){return new o.XMLDocumentImpl}function A(){return new s.DocumentImpl}function P(){return new a.AbortControllerImpl}function L(){return l.AbortSignalImpl._create()}function M(e,t,n,r){return u.DocumentTypeImpl._create(e,t,n,r)}function F(e,t,n,r){return c.ElementImpl._create(e,t,n,r)}function k(e,t,n,r){return c.ElementImpl._create(e,t,n,r)}function R(e,t,n,r){return c.ElementImpl._create(e,t,n,r)}function j(e){return d.DocumentFragmentImpl._create(e)}function z(e,t){return h.ShadowRootImpl._create(e,t)}function B(e,t){return _.AttrImpl._create(e,t)}function G(e,t){return m.TextImpl._create(e,t)}function W(e,t){return p.CDATASectionImpl._create(e,t)}function U(e,t){return f.CommentImpl._create(e,t)}function q(e,t,n){return g.ProcessingInstructionImpl._create(e,t,n)}function H(e,t=()=>!0){return N.HTMLCollectionImpl._create(e,t)}function X(e){return b.NodeListImpl._create(e)}function V(e,t){return v.NodeListStaticImpl._create(e,t)}function $(e){return y.NamedNodeMapImpl._create(e)}function Y(e,t){return w.RangeImpl._create(e,t)}function Q(e,t,n){return T.NodeIteratorImpl._create(e,t,n)}function J(e,t){return E.TreeWalkerImpl._create(e,t)}function K(){return S.NodeFilterImpl._create()}function Z(e,t,n,r,i,o,s,a,l){return x.MutationRecordImpl._create(e,t,n,r,i,o,s,a,l)}function ee(e,t){return C.DOMTokenListImpl._create(e,t)}},73557:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.customElement_isValidCustomElementName=a,t.customElement_isValidElementName=l,t.customElement_isVoidElementName=u,t.customElement_isValidShadowHostName=c,t.customElement_enqueueACustomElementUpgradeReaction=d,t.customElement_enqueueACustomElementCallbackReaction=h,t.customElement_upgrade=_,t.customElement_tryToUpgrade=m,t.customElement_lookUpACustomElementDefinition=p;const n=/[a-z]([\0-\t\x2D\._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])*-([\0-\t\x2D\._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])*/,r=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),i=new Set(["article","aside","blockquote","body","div","footer","h1","h2","h3","h4","h5","h6","header","main","nav","p","section","span"]),o=new Set(["area","base","basefont","bgsound","br","col","embed","frame","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"]),s=new Set(["article","aside","blockquote","body","div","footer","h1","h2","h3","h4","h5","h6","header","main","nav","p","section","span"]);function a(e){return!!n.test(e)&&!r.has(e)}function l(e){return i.has(e)}function u(e){return o.has(e)}function c(e){return s.has(e)}function d(e,t){}function h(e,t,n){}function _(e,t){}function m(e){}function p(e,t,n,r){return null}},16988:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.dom_runRemovingSteps=l,t.dom_runCloningSteps=u,t.dom_runAdoptingSteps=c,t.dom_runAttributeChangeSteps=d,t.dom_runInsertionSteps=h,t.dom_runNodeIteratorPreRemovingSteps=_,t.dom_hasSupportedTokens=m,t.dom_getSupportedTokens=p,t.dom_runEventConstructingSteps=f,t.dom_runChildTextContentChangeSteps=g;const r=n(33696),i=n(93502),o=n(25986),s=n(18186),a=new Map;function l(e,t){}function u(e,t,n,r){}function c(e,t){}function d(e,t,n,i,o){r.dom.features.slots&&(v.call(e,e,t,n,i,o),b.call(e,e,t,n,i,o)),y.call(e,e,t,i,o);for(const r of e._attributeChangeSteps)r.call(e,e,t,n,i,o)}function h(e){}function _(e,t){N.call(e,e,t)}function m(e){return a.has(e)}function p(e){return a.get(e)||new Set}function f(e){}function g(e){}function N(e,t){if(t!==e._root&&(0,i.tree_isAncestorOf)(e._reference,t,!0)){if(e._pointerBeforeReference)while(1){const n=(0,i.tree_getFollowingNode)(e._root,t);if(null!==n&&(0,i.tree_isDescendantOf)(e._root,n,!0)&&!(0,i.tree_isDescendantOf)(t,n,!0))return void(e._reference=n);if(null===n)return void(e._pointerBeforeReference=!1)}if(null===t._previousSibling)null!==t._parent&&(e._reference=t._parent);else{let n=t._previousSibling,r=(0,i.tree_getFirstDescendantNode)(t._previousSibling,!0,!1);while(null!==r)null!==r&&(n=r),r=(0,i.tree_getNextDescendantNode)(t._previousSibling,r,!0,!1);e._reference=n}}}function b(e,t,n,r,a){if(o.Guard.isSlot(e)&&"name"===t&&null===a){if(r===n)return;if(null===r&&""===n)return;if(""===r&&null===n)return;e._name=null===r||""===r?"":r,(0,s.shadowTree_assignSlotablesForATree)((0,i.tree_rootNode)(e))}}function v(e,t,n,r,i){if(o.Guard.isSlotable(e)&&"slot"===t&&null===i){if(r===n)return;if(null===r&&""===n)return;if(""===r&&null===n)return;e._name=null===r||""===r?"":r,(0,s.shadowTree_isAssigned)(e)&&(0,s.shadowTree_assignSlotables)(e._assignedSlot),(0,s.shadowTree_assignASlot)(e)}}function y(e,t,n,r){"id"===t&&null===r&&(e._uniqueIdentifier=n||void 0)}},27813:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.tokenList_validationSteps=s,t.tokenList_updateSteps=a,t.tokenList_serializeSteps=l;const r=n(46683),i=n(16988),o=n(18966);function s(e,t){if(!(0,i.dom_hasSupportedTokens)(e._attribute._localName))throw new TypeError(`There are no supported tokens defined for attribute name: '${e._attribute._localName}'.`);return(0,i.dom_getSupportedTokens)(e._attribute._localName).has(t.toLowerCase())}function a(e){(e._element.hasAttribute(e._attribute._localName)||0!==e._tokenSet.size)&&(0,o.element_setAnAttributeValue)(e._element,e._attribute._localName,(0,r.orderedSet_serialize)(e._tokenSet))}function l(e){return(0,o.element_getAnAttributeValue)(e._element,e._attribute._localName)}},57921:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.document_elementInterface=_,t.document_internalCreateElementNS=m,t.document_adopt=p;const r=n(33696),i=n(25986),o=n(92539),s=n(14420),a=n(73557),l=n(93502),u=n(1995),c=n(16988),d=n(18966),h=n(27883);function _(e,t){return s.ElementImpl}function m(e,t,n,r){const[i,s,a]=(0,u.namespace_validateAndExtract)(t,n);let l=null;return void 0!==r&&(l=(0,o.isString)(r)?r:r.is),(0,d.element_createAnElement)(e,a,i,s,l,!0)}function p(e,t){if(e._nodeDocument===t&&null===e._parent)return;const n=e._nodeDocument;if(e._parent&&(0,h.mutation_remove)(e,e._parent),t!==n){let o=(0,l.tree_getFirstDescendantNode)(e,!0,!0);while(null!==o){if(o._nodeDocument=t,i.Guard.isElementNode(o))for(const e of o._attributeList._asArray())e._nodeDocument=t;r.dom.features.customElements&&i.Guard.isElementNode(o)&&"custom"===o._customElementState&&(0,a.customElement_enqueueACustomElementCallbackReaction)(o,"adoptedCallback",[n,t]),r.dom.features.steps&&(0,c.dom_runAdoptingSteps)(o,n),o=(0,l.tree_getNextDescendantNode)(e,o,!0,!0)}}}},18966:function(e,t,n){var r=n(4364);Object.defineProperty(t,"__esModule",{value:!0}),t.element_has=m,t.element_change=p,t.element_append=f,t.element_remove=g,t.element_replace=N,t.element_getAnAttributeByName=b,t.element_getAnAttributeByNamespaceAndLocalName=v,t.element_getAnAttributeValue=y,t.element_setAnAttribute=w,t.element_setAnAttributeValue=T,t.element_removeAnAttributeByName=E,t.element_removeAnAttributeByNamespaceAndLocalName=S,t.element_createAnElement=x,t.element_insertAdjacent=C;const i=n(33696),o=n(88591),s=n(25986),a=n(18509),l=n(94994),u=n(73557),c=n(87465),d=n(16988),h=n(27883),_=n(57921);function m(e,t){return-1!==t._attributeList._asArray().indexOf(e)}function p(e,t,n){i.dom.features.mutationObservers&&(0,c.observer_queueAttributeMutationRecord)(t,e._localName,e._namespace,e._value),i.dom.features.customElements&&s.Guard.isCustomElementNode(t)&&(0,u.customElement_enqueueACustomElementCallbackReaction)(t,"attributeChangedCallback",[e._localName,e._value,n,e._namespace]),i.dom.features.steps&&(0,d.dom_runAttributeChangeSteps)(t,e._localName,e._value,n,e._namespace),e._value=n}function f(e,t){i.dom.features.mutationObservers&&(0,c.observer_queueAttributeMutationRecord)(t,e._localName,e._namespace,null),i.dom.features.customElements&&s.Guard.isCustomElementNode(t)&&(0,u.customElement_enqueueACustomElementCallbackReaction)(t,"attributeChangedCallback",[e._localName,null,e._value,e._namespace]),i.dom.features.steps&&(0,d.dom_runAttributeChangeSteps)(t,e._localName,null,e._value,e._namespace),t._attributeList._asArray().push(e),e._element=t,t._nodeDocument._hasNamespaces||null===e._namespace&&null===e._namespacePrefix&&"xmlns"!==e._localName||(t._nodeDocument._hasNamespaces=!0)}function g(e,t){i.dom.features.mutationObservers&&(0,c.observer_queueAttributeMutationRecord)(t,e._localName,e._namespace,e._value),i.dom.features.customElements&&s.Guard.isCustomElementNode(t)&&(0,u.customElement_enqueueACustomElementCallbackReaction)(t,"attributeChangedCallback",[e._localName,e._value,null,e._namespace]),i.dom.features.steps&&(0,d.dom_runAttributeChangeSteps)(t,e._localName,e._value,null,e._namespace);const n=t._attributeList._asArray().indexOf(e);t._attributeList._asArray().splice(n,1),e._element=null}function N(e,t,n){i.dom.features.mutationObservers&&(0,c.observer_queueAttributeMutationRecord)(n,e._localName,e._namespace,e._value),i.dom.features.customElements&&s.Guard.isCustomElementNode(n)&&(0,u.customElement_enqueueACustomElementCallbackReaction)(n,"attributeChangedCallback",[e._localName,e._value,t._value,e._namespace]),i.dom.features.steps&&(0,d.dom_runAttributeChangeSteps)(n,e._localName,e._value,t._value,e._namespace);const r=n._attributeList._asArray().indexOf(e);-1!==r&&(n._attributeList._asArray()[r]=t),e._element=null,t._element=n,n._nodeDocument._hasNamespaces||null===t._namespace&&null===t._namespacePrefix&&"xmlns"!==t._localName||(n._nodeDocument._hasNamespaces=!0)}function b(e,t){return t._namespace===o.namespace.HTML&&"html"===t._nodeDocument._type&&(e=e.toLowerCase()),t._attributeList._asArray().find(t=>t._qualifiedName===e)||null}function v(e,t,n){const r=e||null;return n._attributeList._asArray().find(e=>e._namespace===r&&e._localName===t)||null}function y(e,t,n=""){const r=v(n,t,e);return null===r?"":r._value}function w(e,t){if(null!==e._element&&e._element!==t)throw new a.InUseAttributeError(`This attribute already exists in the document: ${e._qualifiedName} as a child of ${e._element._qualifiedName}.`);const n=v(e._namespace||"",e._localName,t);return n===e?e:(null!==n?N(n,e,t):f(e,t),n)}function T(e,t,n,r=null,i=null){const o=v(i||"",t,e);if(null===o){const o=(0,l.create_attr)(e._nodeDocument,t);return o._namespace=i,o._namespacePrefix=r,o._value=n,void f(o,e)}p(o,e,n)}function E(e,t){const n=b(e,t);return null!==n&&g(n,t),n}function S(e,t,n){const r=v(e,t,n);return null!==r&&g(r,n),r}function x(e,t,n,s=null,c=null,d=!1){let h=null;if(!i.dom.features.customElements)return h=(0,l.create_element)(e,t,n,s),h._customElementState="uncustomized",h._customElementDefinition=null,h._is=c,h;const m=(0,u.customElement_lookUpACustomElementDefinition)(e,n,t,c);if(null!==m&&m.name!==m.localName){const n=(0,_.document_elementInterface)(t,o.namespace.HTML);h=new n,h._localName=t,h._namespace=o.namespace.HTML,h._namespacePrefix=s,h._customElementState="undefined",h._customElementDefinition=null,h._is=c,h._nodeDocument=e,d?(0,u.customElement_upgrade)(m,h):(0,u.customElement_enqueueACustomElementUpgradeReaction)(h,m)}else if(null!==m)if(d)try{const n=m.constructor,i=new n;if(r.assert(void 0!==i._customElementState),r.assert(void 0!==i._customElementDefinition),r.assert(i._namespace===o.namespace.HTML),0!==i._attributeList.length)throw new a.NotSupportedError("Custom element already has attributes.");if(0!==i._children.size)throw new a.NotSupportedError("Custom element already has child nodes.");if(null!==i._parent)throw new a.NotSupportedError("Custom element already has a parent node.");if(i._nodeDocument!==e)throw new a.NotSupportedError("Custom element is already in a document.");if(i._localName!==t)throw new a.NotSupportedError("Custom element has a different local name.");i._namespacePrefix=s,i._is=null}catch(p){h=(0,l.create_htmlUnknownElement)(e,t,o.namespace.HTML,s),h._customElementState="failed",h._customElementDefinition=null,h._is=null}else h=(0,l.create_htmlElement)(e,t,o.namespace.HTML,s),h._customElementState="undefined",h._customElementDefinition=null,h._is=null,(0,u.customElement_enqueueACustomElementUpgradeReaction)(h,m);else{const r=(0,_.document_elementInterface)(t,n);h=new r,h._localName=t,h._namespace=n,h._namespacePrefix=s,h._customElementState="uncustomized",h._customElementDefinition=null,h._is=c,h._nodeDocument=e,n!==o.namespace.HTML||null===c&&!(0,u.customElement_isValidCustomElementName)(t)||(h._customElementState="undefined")}if(null===h)throw new Error("Unable to create element.");return h}function C(e,t,n){switch(t.toLowerCase()){case"beforebegin":return null===e._parent?null:(0,h.mutation_preInsert)(n,e._parent,e);case"afterbegin":return(0,h.mutation_preInsert)(n,e,e._firstChild);case"beforeend":return(0,h.mutation_preInsert)(n,e,null);case"afterend":return null===e._parent?null:(0,h.mutation_preInsert)(n,e._parent,e._nextSibling);default:throw new a.SyntaxError('Invalid \'where\' argument. "beforebegin", "afterbegin", "beforeend" or "afterend" expected')}}},81542:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.event_setTheCanceledFlag=h,t.event_initialize=_,t.event_createAnEvent=m,t.event_innerEventCreationSteps=p,t.event_dispatch=f,t.event_appendToAnEventPath=g,t.event_invoke=N,t.event_innerInvoke=b,t.event_fireAnEvent=v,t.event_createLegacyEvent=y,t.event_getterEventHandlerIDLAttribute=w,t.event_setterEventHandlerIDLAttribute=T,t.event_determineTheTargetOfAnEventHandler=E,t.event_getTheCurrentValueOfAnEventHandler=S,t.event_activateAnEventHandler=x,t.event_deactivateAnEventHandler=C;const r=n(33696),i=n(50912),o=n(25986),s=n(46897),a=n(14856),l=n(18509),u=n(93502),c=n(18186),d=n(16988);function h(e){e._cancelable&&!e._inPassiveListenerFlag&&(e._canceledFlag=!0)}function _(e,t,n,r){e._initializedFlag=!0,e._stopPropagationFlag=!1,e._stopImmediatePropagationFlag=!1,e._canceledFlag=!1,e._isTrusted=!1,e._target=null,e._type=t,e._bubbles=n,e._cancelable=r}function m(e,t=void 0){void 0===t&&(t=null);const n={},r=p(e,t,new Date,n);return r._isTrusted=!0,r}function p(e,t,n,i){const o=new e("");return o._initializedFlag=!0,o._timeStamp=n.getTime(),Object.assign(o,i),r.dom.features.steps&&(0,d.dom_runEventConstructingSteps)(o),o}function f(e,t,n=!1,r={value:!1}){let s=!1;e._dispatchFlag=!0;let a=t;if(n){const e=t._associatedDocument;o.Guard.isDocumentNode(e)&&(a=e)}let l=null,d=(0,u.tree_retarget)(e._relatedTarget,t);if(t!==d||t===e._relatedTarget){let n=[];for(const r of e._touchTargetList)n.push((0,u.tree_retarget)(r,t));g(e,t,a,d,n,!1);const h=o.Guard.isMouseEvent(e)&&"click"===e._type;h&&void 0!==t._activationBehavior&&(l=t);let _=o.Guard.isSlotable(t)&&(0,c.shadowTree_isAssigned)(t)?t:null,m=!1,p=t._getTheParent(e);while(null!==p&&o.Guard.isNode(p)){if(null!==_){if(!o.Guard.isSlot(p))throw new Error("Parent node of a slotable should be a slot.");_=null;const e=(0,u.tree_rootNode)(p,!0);o.Guard.isShadowRoot(e)&&"closed"===e._mode&&(m=!0)}o.Guard.isSlotable(p)&&(0,c.shadowTree_isAssigned)(p)&&(_=p),d=(0,u.tree_retarget)(e._relatedTarget,p),n=[];for(const t of e._touchTargetList)n.push((0,u.tree_retarget)(t,p));o.Guard.isWindow(p)||o.Guard.isNode(p)&&o.Guard.isNode(t)&&(0,u.tree_isAncestorOf)((0,u.tree_rootNode)(t,!0),p,!0,!0)?(h&&e._bubbles&&null===l&&p._activationBehavior&&(l=p),g(e,p,null,d,n,m)):p===d?p=null:(t=p,h&&null===l&&t._activationBehavior&&(l=t),g(e,p,t,d,n,m)),null!==p&&(p=p._getTheParent(e)),m=!1}let f=null;const b=e._path;for(let e=b.length-1;e>=0;e--){const t=b[e];if(null!==t.shadowAdjustedTarget){f=t;break}}if(null!==f)if(o.Guard.isNode(f.shadowAdjustedTarget)&&o.Guard.isShadowRoot((0,u.tree_rootNode)(f.shadowAdjustedTarget,!0)))s=!0;else if(o.Guard.isNode(f.relatedTarget)&&o.Guard.isShadowRoot((0,u.tree_rootNode)(f.relatedTarget,!0)))s=!0;else for(let e=0;e<f.touchTargetList.length;e++){const t=f.touchTargetList[e];if(o.Guard.isNode(t)&&o.Guard.isShadowRoot((0,u.tree_rootNode)(t,!0))){s=!0;break}}null!==l&&void 0!==l._legacyPreActivationBehavior&&l._legacyPreActivationBehavior(e);for(let t=b.length-1;t>=0;t--){const n=b[t];null!==n.shadowAdjustedTarget?e._eventPhase=i.EventPhase.AtTarget:e._eventPhase=i.EventPhase.Capturing,N(n,e,"capturing",r)}for(let t=0;t<b.length;t++){const n=b[t];if(null!==n.shadowAdjustedTarget)e._eventPhase=i.EventPhase.AtTarget;else{if(!e._bubbles)continue;e._eventPhase=i.EventPhase.Bubbling}N(n,e,"bubbling",r)}}return e._eventPhase=i.EventPhase.None,e._currentTarget=null,e._path=[],e._dispatchFlag=!1,e._stopPropagationFlag=!1,e._stopImmediatePropagationFlag=!1,s&&(e._target=null,e._relatedTarget=null,e._touchTargetList=[]),null!==l&&(e._canceledFlag||void 0===l._activationBehavior?void 0!==l._legacyCanceledActivationBehavior&&l._legacyCanceledActivationBehavior(e):l._activationBehavior(e)),!e._canceledFlag}function g(e,t,n,r,i,s){let a=!1;o.Guard.isNode(t)&&o.Guard.isShadowRoot((0,u.tree_rootNode)(t))&&(a=!0);let l=!1;o.Guard.isShadowRoot(t)&&"closed"===t._mode&&(l=!0),e._path.push({invocationTarget:t,invocationTargetInShadowTree:a,shadowAdjustedTarget:n,relatedTarget:r,touchTargetList:i,rootOfClosedTree:l,slotInClosedTree:s})}function N(e,t,n,r={value:!1}){const i=t._path;let o=-1;for(let c=0;c<i.length;c++)if(i[c]===e){o=c;break}if(-1!==o){let e=i[o];null!==e.shadowAdjustedTarget?t._target=e.shadowAdjustedTarget:o>0&&(e=i[o-1],null!==e.shadowAdjustedTarget&&(t._target=e.shadowAdjustedTarget))}if(t._relatedTarget=e.relatedTarget,t._touchTargetList=e.touchTargetList,t._stopPropagationFlag)return;t._currentTarget=e.invocationTarget;const s=t._currentTarget,a=s._eventListenerList;let l=new Array(...a);const u=b(t,l,n,e,r);if(!u&&t._isTrusted){const i=t._type;"animationend"===i?t._type="webkitAnimationEnd":"animationiteration"===i?t._type="webkitAnimationIteration":"animationstart"===i?t._type="webkitAnimationStart":"transitionend"===i&&(t._type="webkitTransitionEnd"),b(t,l,n,e,r),t._type=i}}function b(e,t,n,r,i={value:!1}){let s=!1;for(let l=0;l<t.length;l++){const u=t[l];if(!u.removed){if(e._type!==u.type)continue;if(s=!0,"capturing"===n&&!u.capture)continue;if("bubbling"===n&&u.capture)continue;if(u.once&&null!==e._currentTarget){const t=e._currentTarget;let n=-1;for(let e=0;e<t._eventListenerList.length;e++)if(t._eventListenerList[e]===u){n=e;break}-1!==n&&t._eventListenerList.splice(n,1)}const t=void 0;let l;o.Guard.isWindow(t)&&(l=t._currentEvent,!1===r.invocationTargetInShadowTree&&(t._currentEvent=e)),u.passive&&(e._inPassiveListenerFlag=!0);try{u.callback.handleEvent.call(e._currentTarget,e)}catch(a){i.value=!0}if(u.passive&&(e._inPassiveListenerFlag=!1),o.Guard.isWindow(t)&&(t._currentEvent=l),e._stopImmediatePropagationFlag)return s}}return s}function v(e,t,n,r,i){void 0===n&&(n=a.EventImpl);const o=m(n);if(o._type=e,r)for(const s in r){const e=o;e[s]=r[s]}return f(o,t,i)}function y(e){let t=null;switch(e.toLowerCase()){case"beforeunloadevent":break;case"compositionevent":break;case"customevent":t=s.CustomEventImpl;break;case"devicemotionevent":break;case"deviceorientationevent":break;case"dragevent":break;case"event":case"events":t=a.EventImpl;break;case"focusevent":break;case"hashchangeevent":break;case"htmlevents":break;case"keyboardevent":break;case"messageevent":break;case"mouseevent":break;case"mouseevents":break;case"storageevent":break;case"svgevents":break;case"textevent":break;case"touchevent":break;case"uievent":break;case"uievents":break}if(null===t)throw new l.NotSupportedError(`Event constructor not found for interface ${e}.`);const n=new t("");return n._type="",n._timeStamp=(new Date).getTime(),n._isTrusted=!1,n._initializedFlag=!1,n}function w(e,t){const n=E(e,t);return null===n?null:S(n,t)}function T(e,t,n){const r=E(e,t);if(null!==r)if(null===n)C(r,t);else{const e=r._eventHandlerMap,i=e["onabort"];void 0!==i&&(i.value=n),x(r,t)}}function E(e,t){return null}function S(e,t){return null}function x(e,t){}function C(e,t){}},85745:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.eventTarget_flatten=i,t.eventTarget_flattenMore=o,t.eventTarget_addEventListener=s,t.eventTarget_removeEventListener=a,t.eventTarget_removeAllEventListeners=l;const r=n(92539);function i(e){return(0,r.isBoolean)(e)?e:e.capture||!1}function o(e){const t=i(e);let n=!1,o=!1;return(0,r.isBoolean)(e)||(n=e.once||!1,o=e.passive||!1),[t,o,n]}function s(e,t){if(null!==t.callback){for(let n=0;n<e._eventListenerList.length;n++){const r=e._eventListenerList[n];if(r.type===t.type&&r.callback.handleEvent===t.callback.handleEvent&&r.capture===t.capture)return}e._eventListenerList.push(t)}}function a(e,t,n){t.removed=!0,e._eventListenerList.splice(n,1)}function l(e){for(const t of e._eventListenerList)t.removed=!0;e._eventListenerList.length=0}},27883:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mutation_ensurePreInsertionValidity=f,t.mutation_preInsert=g,t.mutation_insert=N,t.mutation_append=v,t.mutation_replace=y,t.mutation_replaceAll=w,t.mutation_preRemove=T,t.mutation_remove=E;const r=n(33696),i=n(18509),o=n(50912),s=n(25986),a=n(92539),l=n(88591),u=n(73557),c=n(93502),d=n(89512),h=n(18186),_=n(87465),m=n(16988),p=n(57921);function f(e,t,n){const r=t._nodeType,s=e._nodeType,a=n?n._nodeType:null;if(r!==o.NodeType.Document&&r!==o.NodeType.DocumentFragment&&r!==o.NodeType.Element)throw new i.HierarchyRequestError(`Only document, document fragment and element nodes can contain child nodes. Parent node is ${t.nodeName}.`);if((0,c.tree_isHostIncludingAncestorOf)(t,e,!0))throw new i.HierarchyRequestError(`The node to be inserted cannot be an inclusive ancestor of parent node. Node is ${e.nodeName}, parent node is ${t.nodeName}.`);if(null!==n&&n._parent!==t)throw new i.NotFoundError(`The reference child node cannot be found under parent node. Child node is ${n.nodeName}, parent node is ${t.nodeName}.`);if(s!==o.NodeType.DocumentFragment&&s!==o.NodeType.DocumentType&&s!==o.NodeType.Element&&s!==o.NodeType.Text&&s!==o.NodeType.ProcessingInstruction&&s!==o.NodeType.CData&&s!==o.NodeType.Comment)throw new i.HierarchyRequestError(`Only document fragment, document type, element, text, processing instruction, cdata section or comment nodes can be inserted. Node is ${e.nodeName}.`);if(s===o.NodeType.Text&&r===o.NodeType.Document)throw new i.HierarchyRequestError(`Cannot insert a text node as a child of a document node. Node is ${e.nodeName}.`);if(s===o.NodeType.DocumentType&&r!==o.NodeType.Document)throw new i.HierarchyRequestError(`A document type node can only be inserted under a document node. Parent node is ${t.nodeName}.`);if(r===o.NodeType.Document)if(s===o.NodeType.DocumentFragment){let r=0;for(const t of e._children)if(t._nodeType===o.NodeType.Element)r++;else if(t._nodeType===o.NodeType.Text)throw new i.HierarchyRequestError(`Cannot insert text a node as a child of a document node. Node is ${t.nodeName}.`);if(r>1)throw new i.HierarchyRequestError(`A document node can only have one document element node. Document fragment to be inserted has ${r} element nodes.`);if(1===r){for(const e of t._children)if(e._nodeType===o.NodeType.Element)throw new i.HierarchyRequestError("The document node already has a document element node.");if(n){if(a===o.NodeType.DocumentType)throw new i.HierarchyRequestError("Cannot insert an element node before a document type node.");let e=n._nextSibling;while(e){if(e._nodeType===o.NodeType.DocumentType)throw new i.HierarchyRequestError("Cannot insert an element node before a document type node.");e=e._nextSibling}}}}else if(s===o.NodeType.Element){for(const n of t._children)if(n._nodeType===o.NodeType.Element)throw new i.HierarchyRequestError(`Document already has a document element node. Node is ${e.nodeName}.`);if(n){if(a===o.NodeType.DocumentType)throw new i.HierarchyRequestError(`Cannot insert an element node before a document type node. Node is ${e.nodeName}.`);let t=n._nextSibling;while(t){if(t._nodeType===o.NodeType.DocumentType)throw new i.HierarchyRequestError(`Cannot insert an element node before a document type node. Node is ${e.nodeName}.`);t=t._nextSibling}}}else if(s===o.NodeType.DocumentType){for(const n of t._children)if(n._nodeType===o.NodeType.DocumentType)throw new i.HierarchyRequestError(`Document already has a document type node. Node is ${e.nodeName}.`);if(n){let t=n._previousSibling;while(t){if(t._nodeType===o.NodeType.Element)throw new i.HierarchyRequestError(`Cannot insert a document type node before an element node. Node is ${e.nodeName}.`);t=t._previousSibling}}else{let n=t._firstChild;while(n){if(n._nodeType===o.NodeType.Element)throw new i.HierarchyRequestError(`Cannot insert a document type node before an element node. Node is ${e.nodeName}.`);n=n._nextSibling}}}}function g(e,t,n){f(e,t,n);let r=n;return r===e&&(r=e._nextSibling),(0,p.document_adopt)(e,t._nodeDocument),N(e,t,r),e}function N(e,t,n,i){if(null===n&&e._nodeType!==o.NodeType.DocumentFragment)return void b(e,t,i);const d=e._nodeType===o.NodeType.DocumentFragment?e._children.size:1;if(null!==n&&0!==r.dom.rangeList.size){const e=(0,c.tree_index)(n);for(const n of r.dom.rangeList)n._start[0]===t&&n._start[1]>e&&(n._start[1]+=d),n._end[0]===t&&n._end[1]>e&&(n._end[1]+=d)}const p=e._nodeType===o.NodeType.DocumentFragment?new Array(...e._children):[e];if(e._nodeType===o.NodeType.DocumentFragment)while(e._firstChild)E(e._firstChild,e,!0);r.dom.features.mutationObservers&&e._nodeType===o.NodeType.DocumentFragment&&(0,_.observer_queueTreeMutationRecord)(e,[],p,null,null);const f=n?n._previousSibling:t._lastChild;let g=null===n?-1:(0,c.tree_index)(n);for(let o=0;o<p.length;o++){const e=p[o];if(s.Guard.isElementNode(e)&&(s.Guard.isDocumentNode(t)&&(t._documentElement=e),e._nodeDocument._hasNamespaces||null===e._namespace&&null===e._namespacePrefix||(e._nodeDocument._hasNamespaces=!0)),e._parent=t,null===n?l.set.append(t._children,e):(l.set.insert(t._children,e,g),g++),null===t._firstChild)e._previousSibling=null,e._nextSibling=null,t._firstChild=e,t._lastChild=e;else{const r=n?n._previousSibling:t._lastChild,i=n||null;e._previousSibling=r,e._nextSibling=i,r&&(r._nextSibling=e),i&&(i._previousSibling=e),r||(t._firstChild=e),i||(t._lastChild=e)}r.dom.features.slots&&null!==t._shadowRoot&&s.Guard.isSlotable(e)&&(0,h.shadowTree_assignASlot)(e),r.dom.features.steps&&s.Guard.isTextNode(e)&&(0,m.dom_runChildTextContentChangeSteps)(t),r.dom.features.slots&&s.Guard.isShadowRoot((0,c.tree_rootNode)(t))&&s.Guard.isSlot(t)&&(0,a.isEmpty)(t._assignedNodes)&&(0,h.shadowTree_signalASlotChange)(t),r.dom.features.slots&&(0,h.shadowTree_assignSlotablesForATree)((0,c.tree_rootNode)(e));let i=(0,c.tree_getFirstDescendantNode)(e,!0,!0);while(null!==i)r.dom.features.steps&&(0,m.dom_runInsertionSteps)(i),r.dom.features.customElements&&s.Guard.isElementNode(i)&&(0,h.shadowTree_isConnected)(i)&&(s.Guard.isCustomElementNode(i)?(0,u.customElement_enqueueACustomElementCallbackReaction)(i,"connectedCallback",[]):(0,u.customElement_tryToUpgrade)(i)),i=(0,c.tree_getNextDescendantNode)(e,i,!0,!0)}r.dom.features.mutationObservers&&(i||(0,_.observer_queueTreeMutationRecord)(t,p,[],f,n))}function b(e,t,n){const i=t._lastChild;if(s.Guard.isElementNode(e)&&(s.Guard.isDocumentNode(t)&&(t._documentElement=e),e._nodeDocument._hasNamespaces||null===e._namespace&&null===e._namespacePrefix||(e._nodeDocument._hasNamespaces=!0)),e._parent=t,t._children.add(e),null===t._firstChild)e._previousSibling=null,e._nextSibling=null,t._firstChild=e,t._lastChild=e;else{const n=t._lastChild;e._previousSibling=n,e._nextSibling=null,n&&(n._nextSibling=e),n||(t._firstChild=e),t._lastChild=e}r.dom.features.slots&&null!==t._shadowRoot&&s.Guard.isSlotable(e)&&(0,h.shadowTree_assignASlot)(e),r.dom.features.steps&&s.Guard.isTextNode(e)&&(0,m.dom_runChildTextContentChangeSteps)(t),r.dom.features.slots&&s.Guard.isShadowRoot((0,c.tree_rootNode)(t))&&s.Guard.isSlot(t)&&(0,a.isEmpty)(t._assignedNodes)&&(0,h.shadowTree_signalASlotChange)(t),r.dom.features.slots&&(0,h.shadowTree_assignSlotablesForATree)((0,c.tree_rootNode)(e)),r.dom.features.steps&&(0,m.dom_runInsertionSteps)(e),r.dom.features.customElements&&s.Guard.isElementNode(e)&&(0,h.shadowTree_isConnected)(e)&&(s.Guard.isCustomElementNode(e)?(0,u.customElement_enqueueACustomElementCallbackReaction)(e,"connectedCallback",[]):(0,u.customElement_tryToUpgrade)(e)),r.dom.features.mutationObservers&&(n||(0,_.observer_queueTreeMutationRecord)(t,[e],[],i,null))}function v(e,t){return g(e,t,null)}function y(e,t,n){if(n._nodeType!==o.NodeType.Document&&n._nodeType!==o.NodeType.DocumentFragment&&n._nodeType!==o.NodeType.Element)throw new i.HierarchyRequestError(`Only document, document fragment and element nodes can contain child nodes. Parent node is ${n.nodeName}.`);if((0,c.tree_isHostIncludingAncestorOf)(n,t,!0))throw new i.HierarchyRequestError(`The node to be inserted cannot be an ancestor of parent node. Node is ${t.nodeName}, parent node is ${n.nodeName}.`);if(e._parent!==n)throw new i.NotFoundError(`The reference child node cannot be found under parent node. Child node is ${e.nodeName}, parent node is ${n.nodeName}.`);if(t._nodeType!==o.NodeType.DocumentFragment&&t._nodeType!==o.NodeType.DocumentType&&t._nodeType!==o.NodeType.Element&&t._nodeType!==o.NodeType.Text&&t._nodeType!==o.NodeType.ProcessingInstruction&&t._nodeType!==o.NodeType.CData&&t._nodeType!==o.NodeType.Comment)throw new i.HierarchyRequestError(`Only document fragment, document type, element, text, processing instruction, cdata section or comment nodes can be inserted. Node is ${t.nodeName}.`);if(t._nodeType===o.NodeType.Text&&n._nodeType===o.NodeType.Document)throw new i.HierarchyRequestError(`Cannot insert a text node as a child of a document node. Node is ${t.nodeName}.`);if(t._nodeType===o.NodeType.DocumentType&&n._nodeType!==o.NodeType.Document)throw new i.HierarchyRequestError(`A document type node can only be inserted under a document node. Parent node is ${n.nodeName}.`);if(n._nodeType===o.NodeType.Document)if(t._nodeType===o.NodeType.DocumentFragment){let r=0;for(const e of t._children)if(e._nodeType===o.NodeType.Element)r++;else if(e._nodeType===o.NodeType.Text)throw new i.HierarchyRequestError(`Cannot insert text a node as a child of a document node. Node is ${e.nodeName}.`);if(r>1)throw new i.HierarchyRequestError(`A document node can only have one document element node. Document fragment to be inserted has ${r} element nodes.`);if(1===r){for(const r of n._children)if(r._nodeType===o.NodeType.Element&&r!==e)throw new i.HierarchyRequestError("The document node already has a document element node.");let t=e._nextSibling;while(t){if(t._nodeType===o.NodeType.DocumentType)throw new i.HierarchyRequestError("Cannot insert an element node before a document type node.");t=t._nextSibling}}}else if(t._nodeType===o.NodeType.Element){for(const s of n._children)if(s._nodeType===o.NodeType.Element&&s!==e)throw new i.HierarchyRequestError(`Document already has a document element node. Node is ${t.nodeName}.`);let r=e._nextSibling;while(r){if(r._nodeType===o.NodeType.DocumentType)throw new i.HierarchyRequestError(`Cannot insert an element node before a document type node. Node is ${t.nodeName}.`);r=r._nextSibling}}else if(t._nodeType===o.NodeType.DocumentType){for(const s of n._children)if(s._nodeType===o.NodeType.DocumentType&&s!==e)throw new i.HierarchyRequestError(`Document already has a document type node. Node is ${t.nodeName}.`);let r=e._previousSibling;while(r){if(r._nodeType===o.NodeType.Element)throw new i.HierarchyRequestError(`Cannot insert a document type node before an element node. Node is ${t.nodeName}.`);r=r._previousSibling}}let s=e._nextSibling;s===t&&(s=t._nextSibling);let a=e._previousSibling;(0,p.document_adopt)(t,n._nodeDocument);const l=[];null!==e._parent&&(l.push(e),E(e,e._parent,!0));let u=[];return t._nodeType===o.NodeType.DocumentFragment?u=Array.from(t._children):u.push(t),N(t,n,s,!0),r.dom.features.mutationObservers&&(0,_.observer_queueTreeMutationRecord)(n,u,l,a,s),e}function w(e,t){null!==e&&(0,p.document_adopt)(e,t._nodeDocument);const n=Array.from(t._children);let i=[];e&&e._nodeType===o.NodeType.DocumentFragment?i=Array.from(e._children):null!==e&&i.push(e);for(const r of n)E(r,t,!0);null!==e&&N(e,t,null,!0),r.dom.features.mutationObservers&&(0,_.observer_queueTreeMutationRecord)(t,i,n,null,null)}function T(e,t){if(e._parent!==t)throw new i.NotFoundError(`The child node cannot be found under parent node. Child node is ${e.nodeName}, parent node is ${t.nodeName}.`);return E(e,t),e}function E(e,t,n){if(0!==r.dom.rangeList.size){const n=(0,c.tree_index)(e);for(const i of r.dom.rangeList)(0,c.tree_isDescendantOf)(e,i._start[0],!0)&&(i._start=[t,n]),(0,c.tree_isDescendantOf)(e,i._end[0],!0)&&(i._end=[t,n]),i._start[0]===t&&i._start[1]>n&&i._start[1]--,i._end[0]===t&&i._end[1]>n&&i._end[1]--;for(const e of r.dom.rangeList)e._start[0]===t&&e._start[1]>n&&(e._start[1]-=1),e._end[0]===t&&e._end[1]>n&&(e._end[1]-=1)}if(r.dom.features.steps)for(const r of(0,d.nodeIterator_iteratorList)())r._root._nodeDocument===e._nodeDocument&&(0,m.dom_runNodeIteratorPreRemovingSteps)(r,e);const i=e._previousSibling,o=e._nextSibling;s.Guard.isDocumentNode(t)&&s.Guard.isElementNode(e)&&(t._documentElement=null),e._parent=null,t._children.delete(e);const l=e._previousSibling,p=e._nextSibling;if(e._previousSibling=null,e._nextSibling=null,l&&(l._nextSibling=p),p&&(p._previousSibling=l),l||(t._firstChild=p),p||(t._lastChild=l),r.dom.features.slots&&s.Guard.isSlotable(e)&&null!==e._assignedSlot&&(0,h.shadowTree_isAssigned)(e)&&(0,h.shadowTree_assignSlotables)(e._assignedSlot),r.dom.features.slots&&s.Guard.isShadowRoot((0,c.tree_rootNode)(t))&&s.Guard.isSlot(t)&&(0,a.isEmpty)(t._assignedNodes)&&(0,h.shadowTree_signalASlotChange)(t),r.dom.features.slots){const n=(0,c.tree_getFirstDescendantNode)(e,!0,!1,e=>s.Guard.isSlot(e));null!==n&&((0,h.shadowTree_assignSlotablesForATree)((0,c.tree_rootNode)(t)),(0,h.shadowTree_assignSlotablesForATree)(e))}r.dom.features.steps&&(0,m.dom_runRemovingSteps)(e,t),r.dom.features.customElements&&s.Guard.isCustomElementNode(e)&&(0,u.customElement_enqueueACustomElementCallbackReaction)(e,"disconnectedCallback",[]);let f=(0,c.tree_getFirstDescendantNode)(e,!1,!0);while(null!==f)r.dom.features.steps&&(0,m.dom_runRemovingSteps)(f,e),r.dom.features.customElements&&s.Guard.isCustomElementNode(f)&&(0,u.customElement_enqueueACustomElementCallbackReaction)(f,"disconnectedCallback",[]),f=(0,c.tree_getNextDescendantNode)(e,f,!1,!0);if(r.dom.features.mutationObservers){let n=(0,c.tree_getFirstAncestorNode)(t,!0);while(null!==n){for(const t of n._registeredObserverList)t.options.subtree&&e._registeredObserverList.push({observer:t.observer,options:t.options,source:t});n=(0,c.tree_getNextAncestorNode)(t,n,!0)}}r.dom.features.mutationObservers&&(n||(0,_.observer_queueTreeMutationRecord)(t,[],[e],i,o)),r.dom.features.steps&&s.Guard.isTextNode(e)&&(0,m.dom_runChildTextContentChangeSteps)(t)}},87465:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.observer_queueAMutationObserverMicrotask=u,t.observer_notifyMutationObservers=c,t.observer_queueMutationRecord=d,t.observer_queueTreeMutationRecord=h,t.observer_queueAttributeMutationRecord=_;const r=n(33696),i=n(25986),o=n(88591),s=n(94994),a=n(93502),l=n(81542);function u(){const e=r.dom.window;e._mutationObserverMicrotaskQueued||(e._mutationObserverMicrotaskQueued=!0,Promise.resolve().then(()=>{c()}))}function c(){const e=r.dom.window;e._mutationObserverMicrotaskQueued=!1;const t=o.set.clone(e._mutationObservers),n=o.set.clone(e._signalSlots);o.set.empty(e._signalSlots);for(const r of t){const e=o.list.clone(r._recordQueue);o.list.empty(r._recordQueue);for(let t=0;t<r._nodeList.length;t++){const e=r._nodeList[t];o.list.remove(e._registeredObserverList,e=>i.Guard.isTransientRegisteredObserver(e)&&e.observer===r)}if(!o.list.isEmpty(e))try{r._callback.call(r,e,r)}catch(s){}}if(r.dom.features.slots)for(const r of n)(0,l.event_fireAnEvent)("slotchange",r,void 0,{bubbles:!0})}function d(e,t,n,r,i,o,l,c,d){const h=new Map;let _=(0,a.tree_getFirstAncestorNode)(t,!0);while(null!==_){for(let o=0;o<_._registeredObserverList.length;o++){const s=_._registeredObserverList[o],a=s.options;if(_!==t&&!a.subtree)continue;if("attributes"===e&&!a.attributes)continue;if("attributes"===e&&a.attributeFilter&&(!a.attributeFilter.indexOf(n||"")||null!==r))continue;if("characterData"===e&&!a.characterData)continue;if("childList"===e&&!a.childList)continue;const l=s.observer;h.has(l)||h.set(l,null),("attributes"===e&&a.attributeOldValue||"characterData"===e&&a.characterDataOldValue)&&h.set(l,i)}_=(0,a.tree_getNextAncestorNode)(t,_,!0)}for(const[a,u]of h){const i=(0,s.create_mutationRecord)(e,t,(0,s.create_nodeListStatic)(t,o),(0,s.create_nodeListStatic)(t,l),c,d,n,r,u),h=a._recordQueue;h.push(i)}u()}function h(e,t,n,r,i){d("childList",e,null,null,null,t,n,r,i)}function _(e,t,n,r){d("attributes",e,t,n,r,[],[],null,null)}},1995:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.namespace_validate=s,t.namespace_validateAndExtract=a,t.namespace_extractQName=l;const r=n(18509),i=n(88591),o=n(9153);function s(e){if(!(0,o.xml_isName)(e))throw new r.InvalidCharacterError(`Invalid XML name: ${e}`);if(!(0,o.xml_isQName)(e))throw new r.InvalidCharacterError(`Invalid XML qualified name: ${e}.`)}function a(e,t){e||(e=null),s(t);const n=t.split(":"),o=2===n.length?n[0]:null,a=2===n.length?n[1]:t;if(o&&null===e)throw new r.NamespaceError("Qualified name includes a prefix but the namespace is null.");if("xml"===o&&e!==i.namespace.XML)throw new r.NamespaceError('Qualified name includes the "xml" prefix but the namespace is not the XML namespace.');if(e!==i.namespace.XMLNS&&("xmlns"===o||"xmlns"===t))throw new r.NamespaceError('Qualified name includes the "xmlns" prefix but the namespace is not the XMLNS namespace.');if(e===i.namespace.XMLNS&&"xmlns"!==o&&"xmlns"!==t)throw new r.NamespaceError('Qualified name does not include the "xmlns" prefix but the namespace is the XMLNS namespace.');return[e,o,a]}function l(e){s(e);const t=e.split(":"),n=2===t.length?t[0]:null,r=2===t.length?t[1]:e;return[n,r]}},48226:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.node_stringReplaceAll=d,t.node_clone=h,t.node_equals=_,t.node_listOfElementsWithQualifiedName=m,t.node_listOfElementsWithNamespace=p,t.node_listOfElementsWithClassNames=f,t.node_locateANamespacePrefix=g,t.node_locateANamespace=N;const r=n(33696),i=n(25986),o=n(88591),s=n(94994),a=n(46683),l=n(16988),u=n(27883),c=n(18966);function d(e,t){let n=null;""!==e&&(n=(0,s.create_text)(t._nodeDocument,e)),(0,u.mutation_replaceAll)(n,t)}function h(e,t=null,n=!1){let o;if(null===t&&(t=e._nodeDocument),i.Guard.isElementNode(e)){o=(0,c.element_createAnElement)(t,e._localName,e._namespace,e._namespacePrefix,e._is,!1);for(const n of e._attributeList){const e=h(n,t);(0,c.element_append)(e,o)}}else if(i.Guard.isDocumentNode(e)){const t=(0,s.create_document)();t._encoding=e._encoding,t._contentType=e._contentType,t._URL=e._URL,t._origin=e._origin,t._type=e._type,t._mode=e._mode,o=t}else if(i.Guard.isDocumentTypeNode(e)){const n=(0,s.create_documentType)(t,e._name,e._publicId,e._systemId);o=n}else if(i.Guard.isAttrNode(e)){const n=(0,s.create_attr)(t,e.localName);n._namespace=e._namespace,n._namespacePrefix=e._namespacePrefix,n._value=e._value,o=n}else o=i.Guard.isExclusiveTextNode(e)?(0,s.create_text)(t,e._data):i.Guard.isCDATASectionNode(e)?(0,s.create_cdataSection)(t,e._data):i.Guard.isCommentNode(e)?(0,s.create_comment)(t,e._data):i.Guard.isProcessingInstructionNode(e)?(0,s.create_processingInstruction)(t,e._target,e._data):i.Guard.isDocumentFragmentNode(e)?(0,s.create_documentFragment)(t):Object.create(e);if(i.Guard.isDocumentNode(o)?(o._nodeDocument=o,t=o):o._nodeDocument=t,r.dom.features.steps&&(0,l.dom_runCloningSteps)(o,e,t,n),n)for(const r of e._children){const e=h(r,t,!0);(0,u.mutation_append)(e,o)}return o}function _(e,t){if(e._nodeType!==t._nodeType)return!1;if(i.Guard.isDocumentTypeNode(e)&&i.Guard.isDocumentTypeNode(t)){if(e._name!==t._name||e._publicId!==t._publicId||e._systemId!==t._systemId)return!1}else if(i.Guard.isElementNode(e)&&i.Guard.isElementNode(t)){if(e._namespace!==t._namespace||e._namespacePrefix!==t._namespacePrefix||e._localName!==t._localName||e._attributeList.length!==t._attributeList.length)return!1}else if(i.Guard.isAttrNode(e)&&i.Guard.isAttrNode(t)){if(e._namespace!==t._namespace||e._localName!==t._localName||e._value!==t._value)return!1}else if(i.Guard.isProcessingInstructionNode(e)&&i.Guard.isProcessingInstructionNode(t)){if(e._target!==t._target||e._data!==t._data)return!1}else if(i.Guard.isCharacterDataNode(e)&&i.Guard.isCharacterDataNode(t)&&e._data!==t._data)return!1;if(i.Guard.isElementNode(e)&&i.Guard.isElementNode(t)){const n={};for(const t of e._attributeList)n[t._localName]=t;for(const e of t._attributeList){const t=n[e._localName];if(!t)return!1;if(!_(t,e))return!1}}if(e._children.size!==t._children.size)return!1;const n=e._children[Symbol.iterator](),r=t._children[Symbol.iterator]();let o=n.next(),s=r.next();while(!o.done&&!s.done){const e=o.value,t=s.value;if(!_(e,t))return!1;o=n.next(),s=r.next()}return!0}function m(e,t){return"*"===e?(0,s.create_htmlCollection)(t):"html"===t._nodeDocument._type?(0,s.create_htmlCollection)(t,function(t){return t._namespace===o.namespace.HTML&&t._qualifiedName===e.toLowerCase()||t._namespace!==o.namespace.HTML&&t._qualifiedName===e}):(0,s.create_htmlCollection)(t,function(t){return t._qualifiedName===e})}function p(e,t,n){return""===e&&(e=null),"*"===e&&"*"===t?(0,s.create_htmlCollection)(n):"*"===e?(0,s.create_htmlCollection)(n,function(e){return e._localName===t}):"*"===t?(0,s.create_htmlCollection)(n,function(t){return t._namespace===e}):(0,s.create_htmlCollection)(n,function(n){return n._localName===t&&n._namespace===e})}function f(e,t){const n=(0,a.orderedSet_parse)(e);if(0===n.size)return(0,s.create_htmlCollection)(t,()=>!1);const r="quirks"!==t._nodeDocument._mode;return(0,s.create_htmlCollection)(t,function(e){const t=e.classList;return(0,a.orderedSet_contains)(t._tokenSet,n,r)})}function g(e,t){if(e._namespace===t&&null!==e._namespacePrefix)return e._namespacePrefix;for(let n=0;n<e._attributeList.length;n++){const r=e._attributeList[n];if("xmlns"===r._namespacePrefix&&r._value===t)return r._localName}return e._parent&&i.Guard.isElementNode(e._parent)?g(e._parent,t):null}function N(e,t){if(i.Guard.isElementNode(e)){if(null!==e._namespace&&e._namespacePrefix===t)return e._namespace;for(let n=0;n<e._attributeList.length;n++){const r=e._attributeList[n];if(r._namespace===o.namespace.XMLNS&&"xmlns"===r._namespacePrefix&&r._localName===t)return r._value||null;if(null===t&&r._namespace===o.namespace.XMLNS&&null===r._namespacePrefix&&"xmlns"===r._localName)return r._value||null}return null===e.parentElement?null:N(e.parentElement,t)}return i.Guard.isDocumentNode(e)?null===e.documentElement?null:N(e.documentElement,t):i.Guard.isDocumentTypeNode(e)||i.Guard.isDocumentFragmentNode(e)?null:i.Guard.isAttrNode(e)?null===e._element?null:N(e._element,t):e._parent&&i.Guard.isElementNode(e._parent)?N(e._parent,t):null}},89512:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.nodeIterator_traverse=a,t.nodeIterator_iteratorList=l;const r=n(33696),i=n(50912),o=n(21060),s=n(93502);function a(e,t){let n=e._reference,r=e._pointerBeforeReference;while(1){if(t)if(r)r=!1;else{const t=(0,s.tree_getFollowingNode)(e._root,n);if(!t)return null;n=t}else if(r){const t=(0,s.tree_getPrecedingNode)(e.root,n);if(!t)return null;n=t}else r=!0;const a=(0,o.traversal_filter)(e,n);if(a===i.FilterResult.Accept)break}return e._reference=n,e._pointerBeforeReference=r,n}function l(){return r.dom.window._iteratorList}},46683:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.orderedSet_parse=i,t.orderedSet_serialize=o,t.orderedSet_sanitize=s,t.orderedSet_contains=a;const r=n(88591);function i(e){const t=r.string.splitAStringOnASCIIWhitespace(e);return new Set(t)}function o(e){return[...e].join(" ")}function s(e){return o(i(e))}function a(e,t,n){for(const r of t){let t=!1;for(const i of e)if(n){if(i===r){t=!0;break}}else if(i.toUpperCase()===r.toUpperCase()){t=!0;break}if(!t)return!1}return!0}},84346:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.parentNode_convertNodesIntoANode=o;const r=n(92539),i=n(94994);function o(e,t){let n=null;for(let o=0;o<e.length;o++){const n=e[o];if((0,r.isString)(n)){const r=(0,i.create_text)(t,n);e[o]=r}}if(1===e.length)n=e[0];else{n=(0,i.create_documentFragment)(t);const r=n;for(const t of e)r.appendChild(t)}return n}},87837:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.range_collapsed=_,t.range_root=m,t.range_isContained=p,t.range_isPartiallyContained=f,t.range_setTheStart=g,t.range_setTheEnd=N,t.range_select=b,t.range_extract=v,t.range_cloneTheContents=y,t.range_insert=w,t.range_getContainedNodes=T,t.range_getPartiallyContainedNodes=E;const r=n(50912),i=n(18509),o=n(25986),s=n(94994),a=n(93502),l=n(83222),u=n(19139),c=n(48226),d=n(27883),h=n(81587);function _(e){return e._startNode===e._endNode&&e._startOffset===e._endOffset}function m(e){return(0,a.tree_rootNode)(e._startNode)}function p(e,t){return(0,a.tree_rootNode)(e)===m(t)&&(0,l.boundaryPoint_position)([e,0],t._start)===r.BoundaryPosition.After&&(0,l.boundaryPoint_position)([e,(0,a.tree_nodeLength)(e)],t._end)===r.BoundaryPosition.Before}function f(e,t){const n=(0,a.tree_isAncestorOf)(t._startNode,e,!0),r=(0,a.tree_isAncestorOf)(t._endNode,e,!0);return n&&!r||!n&&r}function g(e,t,n){if(o.Guard.isDocumentTypeNode(t))throw new i.InvalidNodeTypeError;if(n>(0,a.tree_nodeLength)(t))throw new i.IndexSizeError;const s=[t,n];m(e)===(0,a.tree_rootNode)(t)&&(0,l.boundaryPoint_position)(s,e._end)!==r.BoundaryPosition.After||(e._end=s),e._start=s}function N(e,t,n){if(o.Guard.isDocumentTypeNode(t))throw new i.InvalidNodeTypeError;if(n>(0,a.tree_nodeLength)(t))throw new i.IndexSizeError;const s=[t,n];m(e)===(0,a.tree_rootNode)(t)&&(0,l.boundaryPoint_position)(s,e._start)!==r.BoundaryPosition.Before||(e._start=s),e._end=s}function b(e,t){const n=e._parent;if(null===n)throw new i.InvalidNodeTypeError;const r=(0,a.tree_index)(e);t._start=[n,r],t._end=[n,r+1]}function v(e){const t=(0,s.create_documentFragment)(e._startNode._nodeDocument);if(_(e))return t;const n=e._startNode,r=e._startOffset,l=e._endNode,h=e._endOffset;if(n===l&&o.Guard.isCharacterDataNode(n)){const e=(0,c.node_clone)(n);return e._data=(0,u.characterData_substringData)(n,r,h-r),(0,d.mutation_append)(e,t),(0,u.characterData_replaceData)(n,r,h-r,""),t}let m=n;while(!(0,a.tree_isAncestorOf)(l,m,!0)){if(null===m._parent)throw new Error("Parent node is null.");m=m._parent}let g=null;if(!(0,a.tree_isAncestorOf)(l,n,!0))for(const i of m._children)if(f(i,e)){g=i;break}let N=null;if(!(0,a.tree_isAncestorOf)(n,l,!0)){const t=[...m._children];for(let n=t.length-1;n>0;n--){const r=t[n];if(f(r,e)){N=r;break}}}const b=[];for(const s of m._children)if(p(s,e)){if(o.Guard.isDocumentTypeNode(s))throw new i.HierarchyRequestError;b.push(s)}let y,w;if((0,a.tree_isAncestorOf)(l,n,!0))y=n,w=r;else{let e=n;while(null!==e._parent&&!(0,a.tree_isAncestorOf)(l,e._parent))e=e._parent;if(null===e._parent)throw new Error("Parent node is null.");y=e._parent,w=1+(0,a.tree_index)(e)}if(o.Guard.isCharacterDataNode(g)){const e=(0,c.node_clone)(n);e._data=(0,u.characterData_substringData)(n,r,(0,a.tree_nodeLength)(n)-r),(0,d.mutation_append)(e,t),(0,u.characterData_replaceData)(n,r,(0,a.tree_nodeLength)(n)-r,"")}else if(null!==g){const e=(0,c.node_clone)(g);(0,d.mutation_append)(e,t);const i=(0,s.create_range)([n,r],[g,(0,a.tree_nodeLength)(g)]),o=v(i);(0,d.mutation_append)(o,e)}for(const i of b)(0,d.mutation_append)(i,t);if(o.Guard.isCharacterDataNode(N)){const e=(0,c.node_clone)(l);e._data=(0,u.characterData_substringData)(l,0,h),(0,d.mutation_append)(e,t),(0,u.characterData_replaceData)(l,0,h,"")}else if(null!==N){const e=(0,c.node_clone)(N);(0,d.mutation_append)(e,t);const n=(0,s.create_range)([N,0],[l,h]),r=v(n);(0,d.mutation_append)(r,e)}return e._start=[y,w],e._end=[y,w],t}function y(e){const t=(0,s.create_documentFragment)(e._startNode._nodeDocument);if(_(e))return t;const n=e._startNode,r=e._startOffset,l=e._endNode,h=e._endOffset;if(n===l&&o.Guard.isCharacterDataNode(n)){const e=(0,c.node_clone)(n);e._data=(0,u.characterData_substringData)(n,r,h-r),(0,d.mutation_append)(e,t)}let m=n;while(!(0,a.tree_isAncestorOf)(l,m,!0)){if(null===m._parent)throw new Error("Parent node is null.");m=m._parent}let g=null;if(!(0,a.tree_isAncestorOf)(l,n,!0))for(const i of m._children)if(f(i,e)){g=i;break}let N=null;if(!(0,a.tree_isAncestorOf)(n,l,!0)){const t=[...m._children];for(let n=t.length-1;n>0;n--){const r=t[n];if(f(r,e)){N=r;break}}}const b=[];for(const s of m._children)if(p(s,e)){if(o.Guard.isDocumentTypeNode(s))throw new i.HierarchyRequestError;b.push(s)}if(o.Guard.isCharacterDataNode(g)){const e=(0,c.node_clone)(n);e._data=(0,u.characterData_substringData)(n,r,(0,a.tree_nodeLength)(n)-r),(0,d.mutation_append)(e,t)}else if(null!==g){const e=(0,c.node_clone)(g);(0,d.mutation_append)(e,t);const i=(0,s.create_range)([n,r],[g,(0,a.tree_nodeLength)(g)]),o=y(i);(0,d.mutation_append)(o,e)}for(const i of b){const e=(0,c.node_clone)(i);(0,d.mutation_append)(e,t)}if(o.Guard.isCharacterDataNode(N)){const e=(0,c.node_clone)(l);e._data=(0,u.characterData_substringData)(l,0,h),(0,d.mutation_append)(e,t)}else if(null!==N){const e=(0,c.node_clone)(N);t.append(e);const n=(0,s.create_range)([N,0],[l,h]),r=v(n);(0,d.mutation_append)(r,e)}return t}function w(e,t){if(o.Guard.isProcessingInstructionNode(t._startNode)||o.Guard.isCommentNode(t._startNode)||o.Guard.isTextNode(t._startNode)&&null===t._startNode._parent||t._startNode===e)throw new i.HierarchyRequestError;let n,r=null;if(o.Guard.isTextNode(t._startNode))r=t._startNode;else{let e=0;for(const n of t._startNode._children){if(e===t._startOffset){r=n;break}e++}}if(null===r)n=t._startNode;else{if(null===r._parent)throw new Error("Parent node is null.");n=r._parent}(0,d.mutation_ensurePreInsertionValidity)(e,n,r),o.Guard.isTextNode(t._startNode)&&(r=(0,h.text_split)(t._startNode,t._startOffset)),e===r&&(r=e._nextSibling),null!==e._parent&&(0,d.mutation_remove)(e,e._parent);let s=null===r?(0,a.tree_nodeLength)(n):(0,a.tree_index)(r);o.Guard.isDocumentFragmentNode(e)?s+=(0,a.tree_nodeLength)(e):s++,(0,d.mutation_preInsert)(e,n,r),_(t)&&(t._end=[n,s])}function T(e){return{[Symbol.iterator]:()=>{const t=e.commonAncestorContainer;let n=(0,a.tree_getFirstDescendantNode)(t);return{next:()=>{while(n&&!p(n,e))n=(0,a.tree_getNextDescendantNode)(t,n);if(null===n)return{done:!0,value:null};{const e={done:!1,value:n};return n=(0,a.tree_getNextDescendantNode)(t,n),e}}}}}}function E(e){return{[Symbol.iterator]:()=>{const t=e.commonAncestorContainer;let n=(0,a.tree_getFirstDescendantNode)(t);return{next:()=>{while(n&&!f(n,e))n=(0,a.tree_getNextDescendantNode)(t,n);if(null===n)return{done:!0,value:null};{const e={done:!1,value:n};return n=(0,a.tree_getNextDescendantNode)(t,n),e}}}}}}},3500:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.selectors_scopeMatchASelectorsString=i;const r=n(18509);function i(e,t){throw new r.NotSupportedError}},18186:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.shadowTree_signalASlotChange=l,t.shadowTree_isConnected=u,t.shadowTree_isAssigned=c,t.shadowTree_findASlot=d,t.shadowTree_findSlotables=h,t.shadowTree_findFlattenedSlotables=_,t.shadowTree_assignSlotables=m,t.shadowTree_assignSlotablesForATree=p,t.shadowTree_assignASlot=f;const r=n(33696),i=n(25986),o=n(92539),s=n(93502),a=n(87465);function l(e){const t=r.dom.window;t._signalSlots.add(e),(0,a.observer_queueAMutationObserverMicrotask)()}function u(e){return i.Guard.isDocumentNode((0,s.tree_rootNode)(e,!0))}function c(e){return null!==e._assignedSlot}function d(e,t=!1){const n=i.Cast.asNode(e),r=n._parent;if(null===r)return null;const o=r._shadowRoot||null;if(null===o)return null;if(t&&"open"!==o._mode)return null;let a=(0,s.tree_getFirstDescendantNode)(o,!1,!0,e=>i.Guard.isSlot(e));while(null!==a){if(a._name===e._name)return a;a=(0,s.tree_getNextDescendantNode)(o,a,!1,!0,e=>i.Guard.isSlot(e))}return null}function h(e){const t=[],n=(0,s.tree_rootNode)(e);if(!i.Guard.isShadowRoot(n))return t;const r=n._host;for(const o of r._children)if(i.Guard.isSlotable(o)){const n=d(o);n===e&&t.push(o)}return t}function _(e){const t=[],n=(0,s.tree_rootNode)(e);if(!i.Guard.isShadowRoot(n))return t;const r=h(e);if((0,o.isEmpty)(r))for(const o of e._children)i.Guard.isSlotable(o)&&r.push(o);for(const o of r)if(i.Guard.isSlot(o)&&i.Guard.isShadowRoot((0,s.tree_rootNode)(o))){const e=_(o);t.push(...e)}else t.push(o);return t}function m(e){const t=h(e);if(t.length===e._assignedNodes.length){let n=!0;for(let r=0;r<t.length;r++)if(t[r]!==e._assignedNodes[r]){n=!1;break}n||l(e)}e._assignedNodes=t;for(const n of t)n._assignedSlot=e}function p(e){let t=(0,s.tree_getFirstDescendantNode)(e,!0,!1,e=>i.Guard.isSlot(e));while(null!==t)m(t),t=(0,s.tree_getNextDescendantNode)(e,t,!0,!1,e=>i.Guard.isSlot(e))}function f(e){const t=d(e);null!==t&&m(t)}},81587:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.text_contiguousTextNodes=c,t.text_contiguousExclusiveTextNodes=d,t.text_descendantTextContent=h,t.text_split=_;const r=n(33696),i=n(25986),o=n(18509),s=n(94994),a=n(93502),l=n(19139),u=n(27883);function c(e,t=!1){return{[Symbol.iterator](){let n=e;while(n&&i.Guard.isTextNode(n._previousSibling))n=n._previousSibling;return{next(){if(n&&!t&&n===e&&(n=i.Guard.isTextNode(n._nextSibling)?n._nextSibling:null),null===n)return{done:!0,value:null};{const e={done:!1,value:n};return n=i.Guard.isTextNode(n._nextSibling)?n._nextSibling:null,e}}}}}}function d(e,t=!1){return{[Symbol.iterator](){let n=e;while(n&&i.Guard.isExclusiveTextNode(n._previousSibling))n=n._previousSibling;return{next(){if(n&&!t&&n===e&&(n=i.Guard.isExclusiveTextNode(n._nextSibling)?n._nextSibling:null),null===n)return{done:!0,value:null};{const e={done:!1,value:n};return n=i.Guard.isExclusiveTextNode(n._nextSibling)?n._nextSibling:null,e}}}}}}function h(e){let t="",n=(0,a.tree_getFirstDescendantNode)(e,!1,!1,e=>i.Guard.isTextNode(e));while(null!==n)t+=n._data,n=(0,a.tree_getNextDescendantNode)(e,n,!1,!1,e=>i.Guard.isTextNode(e));return t}function _(e,t){const n=e._data.length;if(t>n)throw new o.IndexSizeError;const i=n-t,c=(0,l.characterData_substringData)(e,t,i),d=(0,s.create_text)(e._nodeDocument,c),h=e._parent;if(null!==h){(0,u.mutation_insert)(d,h,e._nextSibling);for(const n of r.dom.rangeList){n._start[0]===e&&n._start[1]>t&&(n._start[0]=d,n._start[1]-=t),n._end[0]===e&&n._end[1]>t&&(n._end[0]=d,n._end[1]-=t);const r=(0,a.tree_index)(e);n._start[0]===h&&n._start[1]===r+1&&n._start[1]++,n._end[0]===h&&n._end[1]===r+1&&n._end[1]++}}return(0,l.characterData_replaceData)(e,t,i,""),d}},21060:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.traversal_filter=o;const r=n(50912),i=n(18509);function o(e,t){if(e._activeFlag)throw new i.InvalidStateError;const n=t._nodeType-1,o=1<<n;if(0===(e.whatToShow&o))return r.FilterResult.Skip;if(!e.filter)return r.FilterResult.Accept;e._activeFlag=!0;let s=r.FilterResult.Reject;try{s=e.filter.acceptNode(t)}catch(a){throw e._activeFlag=!1,a}return e._activeFlag=!1,s}},93502:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.tree_getFirstDescendantNode=a,t.tree_getNextDescendantNode=l,t.tree_getDescendantNodes=u,t.tree_getDescendantElements=c,t.tree_getSiblingNodes=d,t.tree_getFirstAncestorNode=h,t.tree_getNextAncestorNode=_,t.tree_getAncestorNodes=m,t.tree_getCommonAncestor=p,t.tree_getFollowingNode=f,t.tree_getPrecedingNode=g,t.tree_isConstrained=N,t.tree_nodeLength=b,t.tree_isEmpty=v,t.tree_rootNode=y,t.tree_isDescendantOf=w,t.tree_isAncestorOf=T,t.tree_isHostIncludingAncestorOf=E,t.tree_isSiblingOf=S,t.tree_isPreceding=x,t.tree_isFollowing=C,t.tree_isParentOf=I,t.tree_isChildOf=O,t.tree_previousSibling=D,t.tree_nextSibling=A,t.tree_firstChild=P,t.tree_lastChild=L,t.tree_treePosition=M,t.tree_index=F,t.tree_retarget=k;const r=n(25986),i=n(50912);function o(e,t,n=!1){if(n&&r.Guard.isElementNode(t)&&r.Guard.isShadowRoot(t.shadowRoot)&&t.shadowRoot._firstChild)return t.shadowRoot._firstChild;if(t._firstChild)return t._firstChild;if(t===e)return null;if(t._nextSibling)return t._nextSibling;let i=t._parent;while(i&&i!==e){if(i._nextSibling)return i._nextSibling;i=i._parent}return null}function s(){return{[Symbol.iterator]:()=>({next:()=>({done:!0,value:null})})}}function a(e,t=!1,n=!1,r){let i=t?e:o(e,e,n);while(i&&r&&!r(i))i=o(e,i,n);return i}function l(e,t,n=!1,r=!1,i){let s=o(e,t,r);while(s&&i&&!i(s))s=o(e,s,r);return s}function u(e,t=!1,n=!1,r){return t||0!==e._children.size?{[Symbol.iterator]:()=>{let i=t?e:o(e,e,n);return{next:()=>{while(i&&r&&!r(i))i=o(e,i,n);if(null===i)return{done:!0,value:null};{const t={done:!1,value:i};return i=o(e,i,n),t}}}}}:s()}function c(e,t=!1,n=!1,i){return t||0!==e._children.size?{[Symbol.iterator]:()=>{const o=u(e,t,n,e=>r.Guard.isElementNode(e))[Symbol.iterator]();let s=o.next().value;return{next(){while(s&&i&&!i(s))s=o.next().value;if(null===s)return{done:!0,value:null};{const e={done:!1,value:s};return s=o.next().value,e}}}}}:s()}function d(e,t=!1,n){return e._parent&&0!==e._parent._children.size?{[Symbol.iterator](){let r=e._parent?e._parent._firstChild:null;return{next(){while(r&&(n&&!n(r)||!t&&r===e))r=r._nextSibling;if(null===r)return{done:!0,value:null};{const e={done:!1,value:r};return r=r._nextSibling,e}}}}}:s()}function h(e,t=!1,n){let r=t?e:e._parent;while(r&&n&&!n(r))r=r._parent;return r}function _(e,t,n=!1,r){let i=t._parent;while(i&&r&&!r(i))i=i._parent;return i}function m(e,t=!1,n){return t||e._parent?{[Symbol.iterator](){let r=h(e,t,n);return{next(){if(null===r)return{done:!0,value:null};{const i={done:!1,value:r};return r=_(e,r,t,n),i}}}}}:s()}function p(e,t){if(e===t)return e._parent;const n=[],r=[];let i=h(e,!0);while(null!==i)n.push(i),i=_(e,i,!0);let o=h(t,!0);while(null!==o)r.push(o),o=_(t,o,!0);let s=n.length,a=r.length,l=null;for(let u=Math.min(s,a);u>0;u--){const e=n[--s],t=r[--a];if(e!==t)break;l=e}return l}function f(e,t){if(t._firstChild)return t._firstChild;if(t._nextSibling)return t._nextSibling;while(1){const n=t._parent;if(null===n||n===e)return null;if(n._nextSibling)return n._nextSibling;t=n}}function g(e,t){return t===e?null:t._previousSibling?(t=t._previousSibling,t._lastChild?t._lastChild:t):t._parent}function N(e){switch(e._nodeType){case i.NodeType.Document:let t=!1,n=!1;for(const r of e._children)switch(r._nodeType){case i.NodeType.ProcessingInstruction:case i.NodeType.Comment:break;case i.NodeType.DocumentType:if(t||n)return!1;t=!0;break;case i.NodeType.Element:if(n)return!1;n=!0;break;default:return!1}break;case i.NodeType.DocumentFragment:case i.NodeType.Element:for(const r of e._children)switch(r._nodeType){case i.NodeType.Element:case i.NodeType.Text:case i.NodeType.ProcessingInstruction:case i.NodeType.CData:case i.NodeType.Comment:break;default:return!1}break;case i.NodeType.DocumentType:case i.NodeType.Text:case i.NodeType.ProcessingInstruction:case i.NodeType.CData:case i.NodeType.Comment:return!e.hasChildNodes()}for(const t of e._children)if(!N(t))return!1;return!0}function b(e){return r.Guard.isDocumentTypeNode(e)?0:r.Guard.isCharacterDataNode(e)?e._data.length:e._children.size}function v(e){return 0===b(e)}function y(e,t=!1){if(t){const t=y(e,!1);return r.Guard.isShadowRoot(t)?y(t._host,!0):t}return e._parent?y(e._parent):e}function w(e,t,n=!1,r=!1){let i=a(e,n,r);while(null!==i){if(i===t)return!0;i=l(e,i,n,r)}return!1}function T(e,t,n=!1,i=!1){let o=n?e:i&&r.Guard.isShadowRoot(e)?e._host:e._parent;while(null!==o){if(o===t)return!0;o=i&&r.Guard.isShadowRoot(o)?o._host:o._parent}return!1}function E(e,t,n=!1){if(T(e,t,n))return!0;const i=y(e);return!(!r.Guard.isDocumentFragmentNode(i)||null===i._host||!E(i._host,t,n))}function S(e,t,n=!1){return e!==t?null!==e._parent&&e._parent===t._parent:!!n}function x(e,t){const n=M(e),r=M(t);return-1!==n&&-1!==r&&(y(e)===y(t)&&r<n)}function C(e,t){const n=M(e),r=M(t);return-1!==n&&-1!==r&&(y(e)===y(t)&&r>n)}function I(e,t){return e._parent===t}function O(e,t){return t._parent===e}function D(e){return e._previousSibling}function A(e){return e._nextSibling}function P(e){return e._firstChild}function L(e){return e._lastChild}function M(e){const t=y(e);let n=0,r=a(t);while(null!==r){if(n++,r===e)return n;r=l(t,r)}return-1}function F(e){let t=0;while(null!==e._previousSibling)t++,e=e._previousSibling;return t}function k(e,t){while(1){if(!e||!r.Guard.isNode(e))return e;const n=y(e);if(!r.Guard.isShadowRoot(n))return e;if(t&&r.Guard.isNode(t)&&T(n,t,!0,!0))return e;e=n.host}}},14172:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.treeWalker_traverseChildren=o,t.treeWalker_traverseSiblings=s;const r=n(50912),i=n(21060);function o(e,t){let n=t?e._current._firstChild:e._current._lastChild;while(null!==n){const o=(0,i.traversal_filter)(e,n);if(o===r.FilterResult.Accept)return e._current=n,n;if(o===r.FilterResult.Skip){const e=t?n._firstChild:n._lastChild;if(null!==e){n=e;continue}}while(null!==n){const r=t?n._nextSibling:n._previousSibling;if(null!==r){n=r;break}const i=n._parent;if(null===i||i===e._root||i===e._current)return null;n=i}}return null}function s(e,t){let n=e._current;if(n===e._root)return null;while(1){let o=t?n._nextSibling:n._previousSibling;while(null!==o){n=o;const s=(0,i.traversal_filter)(e,n);if(s===r.FilterResult.Accept)return e._current=n,n;o=t?n._firstChild:n._lastChild,s!==r.FilterResult.Reject&&null!==o||(o=t?n._nextSibling:n._previousSibling)}if(n=n._parent,null===n||n===e._root)return null;if((0,i.traversal_filter)(e,n)===r.FilterResult.Accept)return null}}},31709:function(e,t){function n(e,t,n){Object.defineProperty(e,t,{writable:!1,enumerable:!0,configurable:!1,value:n})}Object.defineProperty(t,"__esModule",{value:!0}),t.idl_defineConst=n},9153:function(e,t){function n(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!(n>=97&&n<=122||n>=65&&n<=90||58===n||95===n||n>=192&&n<=214||n>=216&&n<=246||n>=248&&n<=767||n>=880&&n<=893||n>=895&&n<=8191||n>=8204&&n<=8205||n>=8304&&n<=8591||n>=11264&&n<=12271||n>=12289&&n<=55295||n>=63744&&n<=64975||n>=65008&&n<=65533)&&(0===t||!(45===n||46===n||n>=48&&n<=57||183===n||n>=768&&n<=879||n>=8255&&n<=8256))){if(n>=55296&&n<=56319&&t<e.length-1){const r=e.charCodeAt(t+1);if(r>=56320&&r<=57343&&(n=1024*(n-55296)+r-56320+65536,t++,n>=65536&&n<=983039))continue}return!1}}return!0}function r(e){let t=!1;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(!(r>=97&&r<=122||r>=65&&r<=90||95===r||r>=192&&r<=214||r>=216&&r<=246||r>=248&&r<=767||r>=880&&r<=893||r>=895&&r<=8191||r>=8204&&r<=8205||r>=8304&&r<=8591||r>=11264&&r<=12271||r>=12289&&r<=55295||r>=63744&&r<=64975||r>=65008&&r<=65533)&&(0===n||!(45===r||46===r||r>=48&&r<=57||183===r||r>=768&&r<=879||r>=8255&&r<=8256))){if(0===n||58!==r){if(r>=55296&&r<=56319&&n<e.length-1){const t=e.charCodeAt(n+1);if(t>=56320&&t<=57343&&(r=1024*(r-55296)+t-56320+65536,n++,r>=65536&&r<=983039))continue}return!1}if(t)return!1;if(n===e.length-1)return!1;t=!0}}return!0}function i(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!(9===n||10===n||13===n||n>=32&&n<=55295||n>=57344&&n<=65533)){if(n>=55296&&n<=56319&&t<e.length-1){const r=e.charCodeAt(t+1);if(r>=56320&&r<=57343&&(n=1024*(n-55296)+r-56320+65536,t++,n>=65536&&n<=1114111))continue}return!1}}return!0}function o(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(!(n>=97&&n<=122||n>=65&&n<=90||n>=39&&n<=59||32===n||13===n||10===n||n>=35&&n<=37||33===n||61===n||63===n||64===n||95===n))return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.xml_isName=n,t.xml_isQName=r,t.xml_isLegalChar=i,t.xml_isPubidChar=o},20371:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(3108),t),i(n(75487),t),i(n(83222),t),i(n(19139),t),i(n(94994),t),i(n(73557),t),i(n(57921),t),i(n(16988),t),i(n(27813),t),i(n(18966),t),i(n(81542),t),i(n(85745),t),i(n(27883),t),i(n(87465),t),i(n(1995),t),i(n(48226),t),i(n(89512),t),i(n(46683),t),i(n(84346),t),i(n(87837),t),i(n(3500),t),i(n(18186),t),i(n(81587),t),i(n(21060),t),i(n(93502),t),i(n(14172),t),i(n(31709),t),i(n(9153),t)},73382:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AbortControllerImpl=void 0;const r=n(20371);class i{_signal;constructor(){this._signal=(0,r.create_abortSignal)()}get signal(){return this._signal}abort(){(0,r.abort_signalAbort)(this._signal)}}t.AbortControllerImpl=i},72018:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AbortSignalImpl=void 0;const r=n(11285),i=n(20371);class o extends r.EventTargetImpl{_abortedFlag=!1;_abortAlgorithms=new Set;constructor(){super()}get aborted(){return this._abortedFlag}get onabort(){return(0,i.event_getterEventHandlerIDLAttribute)(this,"onabort")}set onabort(e){(0,i.event_setterEventHandlerIDLAttribute)(this,"onabort",e)}static _create(){return new o}}t.AbortSignalImpl=o},39067:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractRangeImpl=void 0;class n{get _startNode(){return this._start[0]}get _startOffset(){return this._start[1]}get _endNode(){return this._end[0]}get _endOffset(){return this._end[1]}get _collapsed(){return this._start[0]===this._end[0]&&this._start[1]===this._end[1]}get startContainer(){return this._startNode}get startOffset(){return this._startOffset}get endContainer(){return this._endNode}get endOffset(){return this._endOffset}get collapsed(){return this._collapsed}}t.AbstractRangeImpl=n},3869:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AttrImpl=void 0;const r=n(50912),i=n(3014),o=n(20371),s=n(31709);class a extends i.NodeImpl{_nodeType=r.NodeType.Attribute;_localName;_namespace=null;_namespacePrefix=null;_element=null;_value="";constructor(e){super(),this._localName=e}specified;get ownerElement(){return this._element}get namespaceURI(){return this._namespace}get prefix(){return this._namespacePrefix}get localName(){return this._localName}get name(){return this._qualifiedName}get value(){return this._value}set value(e){(0,o.attr_setAnExistingAttributeValue)(this,e)}get _qualifiedName(){return null!==this._namespacePrefix?this._namespacePrefix+":"+this._localName:this._localName}static _create(e,t){const n=new a(t);return n._nodeDocument=e,n}}t.AttrImpl=a,(0,s.idl_defineConst)(a.prototype,"_nodeType",r.NodeType.Attribute),(0,s.idl_defineConst)(a.prototype,"specified",!0)},53674:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CDATASectionImpl=void 0;const r=n(98669),i=n(50912),o=n(31709);class s extends r.TextImpl{_nodeType=i.NodeType.CData;constructor(e){super(e)}static _create(e,t=""){const n=new s(t);return n._nodeDocument=e,n}}t.CDATASectionImpl=s,(0,o.idl_defineConst)(s.prototype,"_nodeType",i.NodeType.CData)},43767:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterDataImpl=void 0;const r=n(3014),i=n(20371);class o extends r.NodeImpl{_data;constructor(e){super(),this._data=e}get data(){return this._data}set data(e){(0,i.characterData_replaceData)(this,0,this._data.length,e)}get length(){return this._data.length}substringData(e,t){return(0,i.characterData_substringData)(this,e,t)}appendData(e){return(0,i.characterData_replaceData)(this,this._data.length,0,e)}insertData(e,t){(0,i.characterData_replaceData)(this,e,0,t)}deleteData(e,t){(0,i.characterData_replaceData)(this,e,t,"")}replaceData(e,t,n){(0,i.characterData_replaceData)(this,e,t,n)}get previousElementSibling(){throw new Error("Mixin: NonDocumentTypeChildNode not implemented.")}get nextElementSibling(){throw new Error("Mixin: NonDocumentTypeChildNode not implemented.")}before(...e){throw new Error("Mixin: ChildNode not implemented.")}after(...e){throw new Error("Mixin: ChildNode not implemented.")}replaceWith(...e){throw new Error("Mixin: ChildNode not implemented.")}remove(){throw new Error("Mixin: ChildNode not implemented.")}}t.CharacterDataImpl=o},950:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ChildNodeImpl=void 0;const r=n(25986),i=n(20371);class o{before(...e){const t=r.Cast.asNode(this),n=t._parent;if(null===n)return;let o=t._previousSibling,s=!0;while(s&&o){s=!1;for(let t=0;t<e.length;t++){const n=e[t];if(n===o){o=o._previousSibling,s=!0;break}}}const a=(0,i.parentNode_convertNodesIntoANode)(e,t._nodeDocument);o=null===o?n._firstChild:o._nextSibling,(0,i.mutation_preInsert)(a,n,o)}after(...e){const t=r.Cast.asNode(this),n=t._parent;if(!n)return;let o=t._nextSibling,s=!0;while(s&&o){s=!1;for(let t=0;t<e.length;t++){const n=e[t];if(n===o){o=o._nextSibling,s=!0;break}}}const a=(0,i.parentNode_convertNodesIntoANode)(e,t._nodeDocument);(0,i.mutation_preInsert)(a,n,o)}replaceWith(...e){const t=r.Cast.asNode(this),n=t._parent;if(!n)return;let o=t._nextSibling,s=!0;while(s&&o){s=!1;for(let t=0;t<e.length;t++){const n=e[t];if(n===o){o=o._nextSibling,s=!0;break}}}const a=(0,i.parentNode_convertNodesIntoANode)(e,t._nodeDocument);t._parent===n?(0,i.mutation_replace)(t,a,n):(0,i.mutation_preInsert)(a,n,o)}remove(){const e=r.Cast.asNode(this),t=e._parent;t&&(0,i.mutation_remove)(e,t)}}t.ChildNodeImpl=o},60429:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CommentImpl=void 0;const r=n(50912),i=n(43767),o=n(31709);class s extends i.CharacterDataImpl{_nodeType=r.NodeType.Comment;constructor(e=""){super(e)}static _create(e,t=""){const n=new s(t);return n._nodeDocument=e,n}}t.CommentImpl=s,(0,o.idl_defineConst)(s.prototype,"_nodeType",r.NodeType.Comment)},46897:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CustomEventImpl=void 0;const r=n(14856),i=n(20371);class o extends r.EventImpl{_detail=null;constructor(e,t){super(e,t),this._detail=t&&t.detail||null}get detail(){return this._detail}initCustomEvent(e,t=!1,n=!1,r=null){this._dispatchFlag||((0,i.event_initialize)(this,e,t,n),this._detail=r)}}t.CustomEventImpl=o},18509:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidCharacterError=t.SyntaxError=t.IndexSizeError=t.NotFoundError=t.HierarchyRequestError=t.NotImplementedError=t.DataCloneError=t.InvalidNodeTypeError=t.TimeoutError=t.QuotaExceededError=t.URLMismatchError=t.AbortError=t.NetworkError=t.SecurityError=t.TypeMismatchError=t.ValidationError=t.InvalidAccessError=t.NamespaceError=t.InvalidModificationError=t.InvalidStateError=t.InUseAttributeError=t.NotSupportedError=t.NoModificationAllowedError=t.NoDataAllowedError=t.WrongDocumentError=t.DOMStringSizeError=t.DOMException=void 0;class n extends Error{name;constructor(e,t=""){super(t),this.name=e}}t.DOMException=n;class r extends n{constructor(e=""){super("DOMStringSizeError",e)}}t.DOMStringSizeError=r;class i extends n{constructor(e=""){super("WrongDocumentError","The object is in the wrong document. "+e)}}t.WrongDocumentError=i;class o extends n{constructor(e=""){super("NoDataAllowedError",e)}}t.NoDataAllowedError=o;class s extends n{constructor(e=""){super("NoModificationAllowedError","The object can not be modified. "+e)}}t.NoModificationAllowedError=s;class a extends n{constructor(e=""){super("NotSupportedError","The operation is not supported. "+e)}}t.NotSupportedError=a;class l extends n{constructor(e=""){super("InUseAttributeError",e)}}t.InUseAttributeError=l;class u extends n{constructor(e=""){super("InvalidStateError","The object is in an invalid state. "+e)}}t.InvalidStateError=u;class c extends n{constructor(e=""){super("InvalidModificationError","The object can not be modified in this way. "+e)}}t.InvalidModificationError=c;class d extends n{constructor(e=""){super("NamespaceError","The operation is not allowed by Namespaces in XML. [XMLNS] "+e)}}t.NamespaceError=d;class h extends n{constructor(e=""){super("InvalidAccessError","The object does not support the operation or argument. "+e)}}t.InvalidAccessError=h;class _ extends n{constructor(e=""){super("ValidationError",e)}}t.ValidationError=_;class m extends n{constructor(e=""){super("TypeMismatchError",e)}}t.TypeMismatchError=m;class p extends n{constructor(e=""){super("SecurityError","The operation is insecure. "+e)}}t.SecurityError=p;class f extends n{constructor(e=""){super("NetworkError","A network error occurred. "+e)}}t.NetworkError=f;class g extends n{constructor(e=""){super("AbortError","The operation was aborted. "+e)}}t.AbortError=g;class N extends n{constructor(e=""){super("URLMismatchError","The given URL does not match another URL. "+e)}}t.URLMismatchError=N;class b extends n{constructor(e=""){super("QuotaExceededError","The quota has been exceeded. "+e)}}t.QuotaExceededError=b;class v extends n{constructor(e=""){super("TimeoutError","The operation timed out. "+e)}}t.TimeoutError=v;class y extends n{constructor(e=""){super("InvalidNodeTypeError","The supplied node is incorrect or has an incorrect ancestor for this operation. "+e)}}t.InvalidNodeTypeError=y;class w extends n{constructor(e=""){super("DataCloneError","The object can not be cloned. "+e)}}t.DataCloneError=w;class T extends n{constructor(e=""){super("NotImplementedError","The DOM method is not implemented by this module. "+e)}}t.NotImplementedError=T;class E extends n{constructor(e=""){super("HierarchyRequestError","The operation would yield an incorrect node tree. "+e)}}t.HierarchyRequestError=E;class S extends n{constructor(e=""){super("NotFoundError","The object can not be found here. "+e)}}t.NotFoundError=S;class x extends n{constructor(e=""){super("IndexSizeError","The index is not in the allowed range. "+e)}}t.IndexSizeError=x;class C extends n{constructor(e=""){super("SyntaxError","The string did not match the expected pattern. "+e)}}t.SyntaxError=C;class I extends n{constructor(e=""){super("InvalidCharacterError","The string contains invalid characters. "+e)}}t.InvalidCharacterError=I},33696:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.dom=void 0;const r=n(92539),i=n(94994);class o{static _instance;_features={mutationObservers:!0,customElements:!0,slots:!0,steps:!0};_window=null;_compareCache;_rangeList;constructor(){this._compareCache=new r.CompareCache,this._rangeList=new r.FixedSizeSet}setFeatures(e){if(void 0===e&&(e=!0),(0,r.isObject)(e))for(const t in e)this._features[t]=e[t]||!1;else for(const t in this._features)this._features[t]=e}get features(){return this._features}get window(){return null===this._window&&(this._window=(0,i.create_window)()),this._window}get compareCache(){return this._compareCache}get rangeList(){return this._rangeList}static get instance(){return o._instance||(o._instance=new o),o._instance}}t.dom=o.instance},38846:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DOMImplementationImpl=void 0;const r=n(33696),i=n(88591),o=n(20371),s=n(31709);class a{_ID="@oozcitak/dom";_associatedDocument;constructor(e){this._associatedDocument=e||r.dom.window.document}createDocumentType(e,t,n){return(0,o.namespace_validate)(e),(0,o.create_documentType)(this._associatedDocument,e,t,n)}createDocument(e,t,n=null){const r=(0,o.create_xmlDocument)();let s=null;return t&&(s=(0,o.document_internalCreateElementNS)(r,e,t)),n&&r.appendChild(n),s&&r.appendChild(s),r._origin=this._associatedDocument._origin,e===i.namespace.HTML?r._contentType="application/xhtml+xml":e===i.namespace.SVG?r._contentType="image/svg+xml":r._contentType="application/xml",r}createHTMLDocument(e){const t=(0,o.create_document)();t._type="html",t._contentType="text/html",t.appendChild((0,o.create_documentType)(t,"html","",""));const n=(0,o.element_createAnElement)(t,"html",i.namespace.HTML);t.appendChild(n);const r=(0,o.element_createAnElement)(t,"head",i.namespace.HTML);if(n.appendChild(r),void 0!==e){const n=(0,o.element_createAnElement)(t,"title",i.namespace.HTML);r.appendChild(n);const s=(0,o.create_text)(t,e);n.appendChild(s)}const s=(0,o.element_createAnElement)(t,"body",i.namespace.HTML);return n.appendChild(s),t._origin=this._associatedDocument._origin,t}hasFeature(){return!0}static _create(e){return new a(e)}}t.DOMImplementationImpl=a,(0,s.idl_defineConst)(a.prototype,"_ID","@oozcitak/dom")},96911:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DOMTokenListImpl=void 0;const r=n(33696),i=n(18509),o=n(88591),s=n(20371);class a{_element;_attribute;_tokenSet;constructor(e,t){this._element=e,this._attribute=t,this._tokenSet=new Set;const n=t._localName,i=(0,s.element_getAnAttributeValue)(e,n),o=this;function a(e,t,n,r,i){t===o._attribute._localName&&null===i&&(r?o._tokenSet=(0,s.orderedSet_parse)(r):o._tokenSet.clear())}this._element._attributeChangeSteps.push(a),r.dom.features.steps&&(0,s.dom_runAttributeChangeSteps)(e,n,i,i,null)}get length(){return this._tokenSet.size}item(e){let t=0;for(const n of this._tokenSet){if(t===e)return n;t++}return null}contains(e){return this._tokenSet.has(e)}add(...e){for(const t of e){if(""===t)throw new i.SyntaxError("Cannot add an empty token.");if(o.codePoint.ASCIIWhiteSpace.test(t))throw new i.InvalidCharacterError("Token cannot contain whitespace.");this._tokenSet.add(t)}(0,s.tokenList_updateSteps)(this)}remove(...e){for(const t of e){if(""===t)throw new i.SyntaxError("Cannot remove an empty token.");if(o.codePoint.ASCIIWhiteSpace.test(t))throw new i.InvalidCharacterError("Token cannot contain whitespace.");this._tokenSet.delete(t)}(0,s.tokenList_updateSteps)(this)}toggle(e,t=void 0){if(""===e)throw new i.SyntaxError("Cannot toggle an empty token.");if(o.codePoint.ASCIIWhiteSpace.test(e))throw new i.InvalidCharacterError("Token cannot contain whitespace.");return this._tokenSet.has(e)?void 0!==t&&!1!==t||(this._tokenSet.delete(e),(0,s.tokenList_updateSteps)(this),!1):(void 0===t||!0===t)&&(this._tokenSet.add(e),(0,s.tokenList_updateSteps)(this),!0)}replace(e,t){if(""===e||""===t)throw new i.SyntaxError("Cannot replace an empty token.");if(o.codePoint.ASCIIWhiteSpace.test(e)||o.codePoint.ASCIIWhiteSpace.test(t))throw new i.InvalidCharacterError("Token cannot contain whitespace.");return!!this._tokenSet.has(e)&&(o.set.replace(this._tokenSet,e,t),(0,s.tokenList_updateSteps)(this),!0)}supports(e){return(0,s.tokenList_validationSteps)(this,e)}get value(){return(0,s.tokenList_serializeSteps)(this)}set value(e){(0,s.element_setAnAttributeValue)(this._element,this._attribute._localName,e)}[Symbol.iterator](){const e=this._tokenSet[Symbol.iterator]();return{next(){return e.next()}}}static _create(e,t){return new a(e,t)}}t.DOMTokenListImpl=a},35251:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentFragmentImpl=void 0;const r=n(50912),i=n(3014),o=n(31709);class s extends i.NodeImpl{_nodeType=r.NodeType.DocumentFragment;_children=new Set;_host;constructor(e=null){super(),this._host=e}getElementById(e){throw new Error("Mixin: NonElementParentNode not implemented.")}get children(){throw new Error("Mixin: ParentNode not implemented.")}get firstElementChild(){throw new Error("Mixin: ParentNode not implemented.")}get lastElementChild(){throw new Error("Mixin: ParentNode not implemented.")}get childElementCount(){throw new Error("Mixin: ParentNode not implemented.")}prepend(...e){throw new Error("Mixin: ParentNode not implemented.")}append(...e){throw new Error("Mixin: ParentNode not implemented.")}querySelector(e){throw new Error("Mixin: ParentNode not implemented.")}querySelectorAll(e){throw new Error("Mixin: ParentNode not implemented.")}static _create(e,t=null){const n=new s(t);return n._nodeDocument=e,n}}t.DocumentFragmentImpl=s,(0,o.idl_defineConst)(s.prototype,"_nodeType",r.NodeType.DocumentFragment)},8563:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentImpl=void 0;const r=n(33696),i=n(50912),o=n(18509),s=n(3014),a=n(25986),l=n(92539),u=n(88591),c=n(25800),d=n(20371),h=n(31709);class _ extends s.NodeImpl{_nodeType=i.NodeType.Document;_children=new Set;_encoding={name:"UTF-8",labels:["unicode-1-1-utf-8","utf-8","utf8"]};_contentType="application/xml";_URL={scheme:"about",username:"",password:"",host:null,port:null,path:["blank"],query:null,fragment:null,_cannotBeABaseURLFlag:!0,_blobURLEntry:null};_origin=null;_type="xml";_mode="no-quirks";_implementation;_documentElement=null;_hasNamespaces=!1;_nodeDocumentOverwrite=null;get _nodeDocument(){return this._nodeDocumentOverwrite||this}set _nodeDocument(e){this._nodeDocumentOverwrite=e}constructor(){super()}get implementation(){return this._implementation||(this._implementation=(0,d.create_domImplementation)(this))}get URL(){return(0,c.urlSerializer)(this._URL)}get documentURI(){return this.URL}get origin(){return"null"}get compatMode(){return"quirks"===this._mode?"BackCompat":"CSS1Compat"}get characterSet(){return this._encoding.name}get charset(){return this._encoding.name}get inputEncoding(){return this._encoding.name}get contentType(){return this._contentType}get doctype(){for(const e of this._children)if(a.Guard.isDocumentTypeNode(e))return e;return null}get documentElement(){return this._documentElement}getElementsByTagName(e){return(0,d.node_listOfElementsWithQualifiedName)(e,this)}getElementsByTagNameNS(e,t){return(0,d.node_listOfElementsWithNamespace)(e,t,this)}getElementsByClassName(e){return(0,d.node_listOfElementsWithClassNames)(e,this)}createElement(e,t){if(!(0,d.xml_isName)(e))throw new o.InvalidCharacterError;"html"===this._type&&(e=e.toLowerCase());let n=null;void 0!==t&&(n=(0,l.isString)(t)?t:t.is);const r="html"===this._type||"application/xhtml+xml"===this._contentType?u.namespace.HTML:null;return(0,d.element_createAnElement)(this,e,r,null,n,!0)}createElementNS(e,t,n){return(0,d.document_internalCreateElementNS)(this,e,t,n)}createDocumentFragment(){return(0,d.create_documentFragment)(this)}createTextNode(e){return(0,d.create_text)(this,e)}createCDATASection(e){if("html"===this._type)throw new o.NotSupportedError;if(-1!==e.indexOf("]]>"))throw new o.InvalidCharacterError;return(0,d.create_cdataSection)(this,e)}createComment(e){return(0,d.create_comment)(this,e)}createProcessingInstruction(e,t){if(!(0,d.xml_isName)(e))throw new o.InvalidCharacterError;if(-1!==t.indexOf("?>"))throw new o.InvalidCharacterError;return(0,d.create_processingInstruction)(this,e,t)}importNode(e,t=!1){if(a.Guard.isDocumentNode(e)||a.Guard.isShadowRoot(e))throw new o.NotSupportedError;return(0,d.node_clone)(e,this,t)}adoptNode(e){if(a.Guard.isDocumentNode(e))throw new o.NotSupportedError;if(a.Guard.isShadowRoot(e))throw new o.HierarchyRequestError;return(0,d.document_adopt)(e,this),e}createAttribute(e){if(!(0,d.xml_isName)(e))throw new o.InvalidCharacterError;"html"===this._type&&(e=e.toLowerCase());const t=(0,d.create_attr)(this,e);return t}createAttributeNS(e,t){const[n,r,i]=(0,d.namespace_validateAndExtract)(e,t),o=(0,d.create_attr)(this,i);return o._namespace=n,o._namespacePrefix=r,o}createEvent(e){return(0,d.event_createLegacyEvent)(e)}createRange(){const e=(0,d.create_range)();return e._start=[this,0],e._end=[this,0],e}createNodeIterator(e,t=i.WhatToShow.All,n=null){const r=(0,d.create_nodeIterator)(e,e,!0);return r._whatToShow=t,r._iteratorCollection=(0,d.create_nodeList)(e),(0,l.isFunction)(n)?(r._filter=(0,d.create_nodeFilter)(),r._filter.acceptNode=n):r._filter=n,r}createTreeWalker(e,t=i.WhatToShow.All,n=null){const r=(0,d.create_treeWalker)(e,e);return r._whatToShow=t,(0,l.isFunction)(n)?(r._filter=(0,d.create_nodeFilter)(),r._filter.acceptNode=n):r._filter=n,r}_getTheParent(e){return"load"===e._type?null:r.dom.window}getElementById(e){throw new Error("Mixin: NonElementParentNode not implemented.")}get children(){throw new Error("Mixin: ParentNode not implemented.")}get firstElementChild(){throw new Error("Mixin: ParentNode not implemented.")}get lastElementChild(){throw new Error("Mixin: ParentNode not implemented.")}get childElementCount(){throw new Error("Mixin: ParentNode not implemented.")}prepend(...e){throw new Error("Mixin: ParentNode not implemented.")}append(...e){throw new Error("Mixin: ParentNode not implemented.")}querySelector(e){throw new Error("Mixin: ParentNode not implemented.")}querySelectorAll(e){throw new Error("Mixin: ParentNode not implemented.")}}t.DocumentImpl=_,(0,h.idl_defineConst)(_.prototype,"_nodeType",i.NodeType.Document)},46914:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentOrShadowRootImpl=void 0;class n{}t.DocumentOrShadowRootImpl=n},18515:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentTypeImpl=void 0;const r=n(50912),i=n(3014),o=n(31709);class s extends i.NodeImpl{_nodeType=r.NodeType.DocumentType;_name="";_publicId="";_systemId="";constructor(e,t,n){super(),this._name=e,this._publicId=t,this._systemId=n}get name(){return this._name}get publicId(){return this._publicId}get systemId(){return this._systemId}before(...e){throw new Error("Mixin: ChildNode not implemented.")}after(...e){throw new Error("Mixin: ChildNode not implemented.")}replaceWith(...e){throw new Error("Mixin: ChildNode not implemented.")}remove(){throw new Error("Mixin: ChildNode not implemented.")}static _create(e,t,n="",r=""){const i=new s(t,n,r);return i._nodeDocument=e,i}}t.DocumentTypeImpl=s,(0,o.idl_defineConst)(s.prototype,"_nodeType",r.NodeType.DocumentType)},14420:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ElementImpl=void 0;const r=n(50912),i=n(3014),o=n(18509),s=n(88591),a=n(20371),l=n(31709);class u extends i.NodeImpl{_nodeType=r.NodeType.Element;_children=new Set;_namespace=null;_namespacePrefix=null;_localName="";_customElementState="undefined";_customElementDefinition=null;_is=null;_shadowRoot=null;_attributeList=(0,a.create_namedNodeMap)(this);_uniqueIdentifier;_attributeChangeSteps=[];_name="";_assignedSlot=null;constructor(){super()}get namespaceURI(){return this._namespace}get prefix(){return this._namespacePrefix}get localName(){return this._localName}get tagName(){return this._htmlUppercasedQualifiedName}get id(){return(0,a.element_getAnAttributeValue)(this,"id")}set id(e){(0,a.element_setAnAttributeValue)(this,"id",e)}get className(){return(0,a.element_getAnAttributeValue)(this,"class")}set className(e){(0,a.element_setAnAttributeValue)(this,"class",e)}get classList(){let e=(0,a.element_getAnAttributeByName)("class",this);return null===e&&(e=(0,a.create_attr)(this._nodeDocument,"class")),(0,a.create_domTokenList)(this,e)}get slot(){return(0,a.element_getAnAttributeValue)(this,"slot")}set slot(e){(0,a.element_setAnAttributeValue)(this,"slot",e)}hasAttributes(){return 0!==this._attributeList.length}get attributes(){return this._attributeList}getAttributeNames(){const e=[];for(const t of this._attributeList)e.push(t._qualifiedName);return e}getAttribute(e){const t=(0,a.element_getAnAttributeByName)(e,this);return t?t._value:null}getAttributeNS(e,t){const n=(0,a.element_getAnAttributeByNamespaceAndLocalName)(e,t,this);return n?n._value:null}setAttribute(e,t){if(!(0,a.xml_isName)(e))throw new o.InvalidCharacterError;this._namespace===s.namespace.HTML&&"html"===this._nodeDocument._type&&(e=e.toLowerCase());let n=null;for(let r=0;r<this._attributeList.length;r++){const t=this._attributeList[r];if(t._qualifiedName===e){n=t;break}}if(null===n)return n=(0,a.create_attr)(this._nodeDocument,e),n._value=t,void(0,a.element_append)(n,this);(0,a.element_change)(n,this,t)}setAttributeNS(e,t,n){const[r,i,o]=(0,a.namespace_validateAndExtract)(e,t);(0,a.element_setAnAttributeValue)(this,o,n,i,r)}removeAttribute(e){(0,a.element_removeAnAttributeByName)(e,this)}removeAttributeNS(e,t){(0,a.element_removeAnAttributeByNamespaceAndLocalName)(e,t,this)}hasAttribute(e){this._namespace===s.namespace.HTML&&"html"===this._nodeDocument._type&&(e=e.toLowerCase());for(let t=0;t<this._attributeList.length;t++){const n=this._attributeList[t];if(n._qualifiedName===e)return!0}return!1}toggleAttribute(e,t){if(!(0,a.xml_isName)(e))throw new o.InvalidCharacterError;this._namespace===s.namespace.HTML&&"html"===this._nodeDocument._type&&(e=e.toLowerCase());let n=null;for(let r=0;r<this._attributeList.length;r++){const t=this._attributeList[r];if(t._qualifiedName===e){n=t;break}}return null===n?(void 0===t||!0===t)&&(n=(0,a.create_attr)(this._nodeDocument,e),n._value="",(0,a.element_append)(n,this),!0):void 0!==t&&!1!==t||((0,a.element_removeAnAttributeByName)(e,this),!1)}hasAttributeNS(e,t){const n=e||null;for(let r=0;r<this._attributeList.length;r++){const e=this._attributeList[r];if(e._namespace===n&&e._localName===t)return!0}return!1}getAttributeNode(e){return(0,a.element_getAnAttributeByName)(e,this)}getAttributeNodeNS(e,t){return(0,a.element_getAnAttributeByNamespaceAndLocalName)(e,t,this)}setAttributeNode(e){return(0,a.element_setAnAttribute)(e,this)}setAttributeNodeNS(e){return(0,a.element_setAnAttribute)(e,this)}removeAttributeNode(e){let t=!1;for(let n=0;n<this._attributeList.length;n++){const r=this._attributeList[n];if(r===e){t=!0;break}}if(!t)throw new o.NotFoundError;return(0,a.element_remove)(e,this),e}attachShadow(e){if(this._namespace!==s.namespace.HTML)throw new o.NotSupportedError;if(!(0,a.customElement_isValidCustomElementName)(this._localName)&&!(0,a.customElement_isValidShadowHostName)(this._localName))throw new o.NotSupportedError;if((0,a.customElement_isValidCustomElementName)(this._localName)||null!==this._is){const e=(0,a.customElement_lookUpACustomElementDefinition)(this._nodeDocument,this._namespace,this._localName,this._is);if(null!==e&&!0===e.disableShadow)throw new o.NotSupportedError}if(null!==this._shadowRoot)throw new o.NotSupportedError;const t=(0,a.create_shadowRoot)(this._nodeDocument,this);return t._mode=e.mode,this._shadowRoot=t,t}get shadowRoot(){const e=this._shadowRoot;return null===e||"closed"===e.mode?null:e}closest(e){throw new o.NotImplementedError}matches(e){throw new o.NotImplementedError}webkitMatchesSelector(e){return this.matches(e)}getElementsByTagName(e){return(0,a.node_listOfElementsWithQualifiedName)(e,this)}getElementsByTagNameNS(e,t){return(0,a.node_listOfElementsWithNamespace)(e,t,this)}getElementsByClassName(e){return(0,a.node_listOfElementsWithClassNames)(e,this)}insertAdjacentElement(e,t){return(0,a.element_insertAdjacent)(this,e,t)}insertAdjacentText(e,t){const n=(0,a.create_text)(this._nodeDocument,t);(0,a.element_insertAdjacent)(this,e,n)}get _qualifiedName(){return this._namespacePrefix?this._namespacePrefix+":"+this._localName:this._localName}get _htmlUppercasedQualifiedName(){let e=this._qualifiedName;return this._namespace===s.namespace.HTML&&"html"===this._nodeDocument._type&&(e=e.toUpperCase()),e}get children(){throw new Error("Mixin: ParentNode not implemented.")}get firstElementChild(){throw new Error("Mixin: ParentNode not implemented.")}get lastElementChild(){throw new Error("Mixin: ParentNode not implemented.")}get childElementCount(){throw new Error("Mixin: ParentNode not implemented.")}prepend(...e){throw new Error("Mixin: ParentNode not implemented.")}append(...e){throw new Error("Mixin: ParentNode not implemented.")}querySelector(e){throw new Error("Mixin: ParentNode not implemented.")}querySelectorAll(e){throw new Error("Mixin: ParentNode not implemented.")}get previousElementSibling(){throw new Error("Mixin: NonDocumentTypeChildNode not implemented.")}get nextElementSibling(){throw new Error("Mixin: NonDocumentTypeChildNode not implemented.")}before(...e){throw new Error("Mixin: ChildNode not implemented.")}after(...e){throw new Error("Mixin: ChildNode not implemented.")}replaceWith(...e){throw new Error("Mixin: ChildNode not implemented.")}remove(){throw new Error("Mixin: ChildNode not implemented.")}get assignedSlot(){throw new Error("Mixin: Slotable not implemented.")}static _create(e,t,n=null,r=null){const i=new u;return i._localName=t,i._namespace=n,i._namespacePrefix=r,i._nodeDocument=e,i}}t.ElementImpl=u,(0,l.idl_defineConst)(u.prototype,"_nodeType",r.NodeType.Element)},14856:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.EventImpl=void 0;const r=n(50912),i=n(20371),o=n(31709);class s{static NONE=0;static CAPTURING_PHASE=1;static AT_TARGET=2;static BUBBLING_PHASE=3;NONE=0;CAPTURING_PHASE=1;AT_TARGET=2;BUBBLING_PHASE=3;_target=null;_relatedTarget=null;_touchTargetList=[];_path=[];_currentTarget=null;_eventPhase=r.EventPhase.None;_stopPropagationFlag=!1;_stopImmediatePropagationFlag=!1;_canceledFlag=!1;_inPassiveListenerFlag=!1;_composedFlag=!1;_initializedFlag=!1;_dispatchFlag=!1;_isTrusted=!1;_type;_bubbles=!1;_cancelable=!1;_timeStamp;constructor(e,t){this._type=e,t&&(this._bubbles=t.bubbles||!1,this._cancelable=t.cancelable||!1,this._composedFlag=t.composed||!1),this._initializedFlag=!0,this._timeStamp=(new Date).getTime()}get type(){return this._type}get target(){return this._target}get srcElement(){return this._target}get currentTarget(){return this._currentTarget}composedPath(){const e=[],t=this._path;if(0===t.length)return e;const n=this._currentTarget;if(null===n)throw new Error("Event currentTarget is null.");e.push(n);let r=0,i=0,o=t.length-1;while(o>=0){if(t[o].rootOfClosedTree&&i++,t[o].invocationTarget===n){r=o;break}t[o].slotInClosedTree&&i--,o--}let s=i,a=i;o=r-1;while(o>=0)t[o].rootOfClosedTree&&s++,s<=a&&e.unshift(t[o].invocationTarget),t[o].slotInClosedTree&&(s--,s<a&&(a=s)),o--;s=i,a=i,o=r+1;while(o<t.length)t[o].slotInClosedTree&&s++,s<=a&&e.push(t[o].invocationTarget),t[o].rootOfClosedTree&&(s--,s<a&&(a=s)),o++;return e}get eventPhase(){return this._eventPhase}stopPropagation(){this._stopPropagationFlag=!0}get cancelBubble(){return this._stopPropagationFlag}set cancelBubble(e){e&&this.stopPropagation()}stopImmediatePropagation(){this._stopPropagationFlag=!0,this._stopImmediatePropagationFlag=!0}get bubbles(){return this._bubbles}get cancelable(){return this._cancelable}get returnValue(){return!this._canceledFlag}set returnValue(e){e||(0,i.event_setTheCanceledFlag)(this)}preventDefault(){(0,i.event_setTheCanceledFlag)(this)}get defaultPrevented(){return this._canceledFlag}get composed(){return this._composedFlag}get isTrusted(){return this._isTrusted}get timeStamp(){return this._timeStamp}initEvent(e,t=!1,n=!1){this._dispatchFlag||(0,i.event_initialize)(this,e,t,n)}}t.EventImpl=s,(0,o.idl_defineConst)(s.prototype,"NONE",0),(0,o.idl_defineConst)(s.prototype,"CAPTURING_PHASE",1),(0,o.idl_defineConst)(s.prototype,"AT_TARGET",2),(0,o.idl_defineConst)(s.prototype,"BUBBLING_PHASE",3)},11285:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.EventTargetImpl=void 0;const r=n(18509),i=n(25986),o=n(20371);class s{__eventListenerList;get _eventListenerList(){return this.__eventListenerList||(this.__eventListenerList=[])}__eventHandlerMap;get _eventHandlerMap(){return this.__eventHandlerMap||(this.__eventHandlerMap={})}constructor(){}addEventListener(e,t,n={passive:!1,once:!1,capture:!1}){const[r,s,a]=(0,o.eventTarget_flattenMore)(n);let l;t&&(l=i.Guard.isEventListener(t)?t:{handleEvent:t},(0,o.eventTarget_addEventListener)(this,{type:e,callback:l,capture:r,passive:s,once:a,removed:!1}))}removeEventListener(e,t,n={capture:!1}){const r=(0,o.eventTarget_flatten)(n);if(t)for(let s=0;s<this._eventListenerList.length;s++){const n=this._eventListenerList[s];if(n.type===e&&n.capture===r){if(i.Guard.isEventListener(t)&&n.callback===t){(0,o.eventTarget_removeEventListener)(this,n,s);break}if(t&&n.callback.handleEvent===t){(0,o.eventTarget_removeEventListener)(this,n,s);break}}}}dispatchEvent(e){if(e._dispatchFlag||!e._initializedFlag)throw new r.InvalidStateError;return e._isTrusted=!1,(0,o.event_dispatch)(e,this)}_getTheParent(e){return null}}t.EventTargetImpl=s},27659:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLCollectionImpl=void 0;const r=n(88591),i=n(20371),o=n(25986),s=n(92539);class a{_live=!0;_root;_filter;static reservedNames=["_root","_live","_filter","length","item","namedItem","get","set"];constructor(e,t){return this._root=e,this._filter=t,new Proxy(this,this)}get length(){let e=0,t=(0,i.tree_getFirstDescendantNode)(this._root,!1,!1,e=>o.Guard.isElementNode(e)&&this._filter(e));while(null!==t)e++,t=(0,i.tree_getNextDescendantNode)(this._root,t,!1,!1,e=>o.Guard.isElementNode(e)&&this._filter(e));return e}item(e){let t=0,n=(0,i.tree_getFirstDescendantNode)(this._root,!1,!1,e=>o.Guard.isElementNode(e)&&this._filter(e));while(null!==n){if(t===e)return n;t++,n=(0,i.tree_getNextDescendantNode)(this._root,n,!1,!1,e=>o.Guard.isElementNode(e)&&this._filter(e))}return null}namedItem(e){if(""===e)return null;let t=(0,i.tree_getFirstDescendantNode)(this._root,!1,!1,e=>o.Guard.isElementNode(e)&&this._filter(e));while(null!=t){if(t._uniqueIdentifier===e)return t;if(t._namespace===r.namespace.HTML)for(let n=0;n<t._attributeList.length;n++){const r=t._attributeList[n];if("name"===r._localName&&null===r._namespace&&null===r._namespacePrefix&&r._value===e)return t}t=(0,i.tree_getNextDescendantNode)(this._root,t,!1,!1,e=>o.Guard.isElementNode(e)&&this._filter(e))}return null}[Symbol.iterator](){const e=this._root,t=this._filter;let n=(0,i.tree_getFirstDescendantNode)(e,!1,!1,e=>o.Guard.isElementNode(e)&&t(e));return{next(){if(null===n)return{done:!0,value:null};{const r={done:!1,value:n};return n=(0,i.tree_getNextDescendantNode)(e,n,!1,!1,e=>o.Guard.isElementNode(e)&&t(e)),r}}}}get(e,t,n){if(!(0,s.isString)(t)||-1!==a.reservedNames.indexOf(t))return Reflect.get(e,t,n);const r=Number(t);return isNaN(r)?e.namedItem(t)||void 0:e.item(r)||void 0}set(e,t,n,r){if(!(0,s.isString)(t)||-1!==a.reservedNames.indexOf(t))return Reflect.set(e,t,n,r);const o=Number(t),l=isNaN(o)?e.namedItem(t)||void 0:e.item(o)||void 0;return!(!l||!l._parent)&&((0,i.mutation_replace)(l,n,l._parent),!0)}static _create(e,t=()=>!0){return new a(e,t)}}t.HTMLCollectionImpl=a},59687:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.MutationObserverImpl=void 0;const r=n(33696),i=n(25986),o=n(88591);class s{_callback;_nodeList=[];_recordQueue=[];constructor(e){this._callback=e;const t=r.dom.window;o.set.append(t._mutationObservers,this)}observe(e,t){if(t=t||{childList:!1,subtree:!1},void 0===t.attributeOldValue&&void 0===t.attributeFilter||void 0!==t.attributes||(t.attributes=!0),void 0!==t.characterDataOldValue&&void 0===t.characterData&&(t.characterData=!0),!t.childList&&!t.attributes&&!t.characterData)throw new TypeError;if(t.attributeOldValue&&!t.attributes)throw new TypeError;if(void 0!==t.attributeFilter&&!t.attributes)throw new TypeError;if(t.characterDataOldValue&&!t.characterData)throw new TypeError;let n=!1;const r=t;for(const s of e._registeredObserverList)if(s.observer===this){n=!0;for(const e of this._nodeList)o.list.remove(e._registeredObserverList,e=>i.Guard.isTransientRegisteredObserver(e)&&e.source===s);s.options=r}n||(e._registeredObserverList.push({observer:this,options:t}),this._nodeList.push(e))}disconnect(){for(const e of this._nodeList)o.list.remove(e._registeredObserverList,e=>e.observer===this);this._recordQueue=[]}takeRecords(){const e=this._recordQueue;return this._recordQueue=[],e}}t.MutationObserverImpl=s},75484:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MutationRecordImpl=void 0;class n{_type;_target;_addedNodes;_removedNodes;_previousSibling;_nextSibling;_attributeName;_attributeNamespace;_oldValue;constructor(e,t,n,r,i,o,s,a,l){this._type=e,this._target=t,this._addedNodes=n,this._removedNodes=r,this._previousSibling=i,this._nextSibling=o,this._attributeName=s,this._attributeNamespace=a,this._oldValue=l}get type(){return this._type}get target(){return this._target}get addedNodes(){return this._addedNodes}get removedNodes(){return this._removedNodes}get previousSibling(){return this._previousSibling}get nextSibling(){return this._nextSibling}get attributeName(){return this._attributeName}get attributeNamespace(){return this._attributeNamespace}get oldValue(){return this._oldValue}static _create(e,t,r,i,o,s,a,l,u){return new n(e,t,r,i,o,s,a,l,u)}}t.MutationRecordImpl=n},95843:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.NamedNodeMapImpl=void 0;const r=n(18509),i=n(20371);class o extends Array{_element;constructor(e){super(),this._element=e,Object.setPrototypeOf(this,o.prototype)}_asArray(){return this}item(e){return this[e]||null}getNamedItem(e){return(0,i.element_getAnAttributeByName)(e,this._element)}getNamedItemNS(e,t){return(0,i.element_getAnAttributeByNamespaceAndLocalName)(e||"",t,this._element)}setNamedItem(e){return(0,i.element_setAnAttribute)(e,this._element)}setNamedItemNS(e){return(0,i.element_setAnAttribute)(e,this._element)}removeNamedItem(e){const t=(0,i.element_removeAnAttributeByName)(e,this._element);if(null===t)throw new r.NotFoundError;return t}removeNamedItemNS(e,t){const n=(0,i.element_removeAnAttributeByNamespaceAndLocalName)(e||"",t,this._element);if(null===n)throw new r.NotFoundError;return n}static _create(e){return new o(e)}}t.NamedNodeMapImpl=o},49820:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.NodeFilterImpl=void 0;const r=n(50912),i=n(31709);class o{static FILTER_ACCEPT=1;static FILTER_REJECT=2;static FILTER_SKIP=3;static SHOW_ALL=4294967295;static SHOW_ELEMENT=1;static SHOW_ATTRIBUTE=2;static SHOW_TEXT=4;static SHOW_CDATA_SECTION=8;static SHOW_ENTITY_REFERENCE=16;static SHOW_ENTITY=32;static SHOW_PROCESSING_INSTRUCTION=64;static SHOW_COMMENT=128;static SHOW_DOCUMENT=256;static SHOW_DOCUMENT_TYPE=512;static SHOW_DOCUMENT_FRAGMENT=1024;static SHOW_NOTATION=2048;FILTER_ACCEPT=1;FILTER_REJECT=2;FILTER_SKIP=3;SHOW_ALL=4294967295;SHOW_ELEMENT=1;SHOW_ATTRIBUTE=2;SHOW_TEXT=4;SHOW_CDATA_SECTION=8;SHOW_ENTITY_REFERENCE=16;SHOW_ENTITY=32;SHOW_PROCESSING_INSTRUCTION=64;SHOW_COMMENT=128;SHOW_DOCUMENT=256;SHOW_DOCUMENT_TYPE=512;SHOW_DOCUMENT_FRAGMENT=1024;SHOW_NOTATION=2048;constructor(){}acceptNode(e){return r.FilterResult.Accept}static _create(){return new o}}t.NodeFilterImpl=o,(0,i.idl_defineConst)(o.prototype,"FILTER_ACCEPT",1),(0,i.idl_defineConst)(o.prototype,"FILTER_REJECT",2),(0,i.idl_defineConst)(o.prototype,"FILTER_SKIP",3),(0,i.idl_defineConst)(o.prototype,"SHOW_ALL",4294967295),(0,i.idl_defineConst)(o.prototype,"SHOW_ELEMENT",1),(0,i.idl_defineConst)(o.prototype,"SHOW_ATTRIBUTE",2),(0,i.idl_defineConst)(o.prototype,"SHOW_TEXT",4),(0,i.idl_defineConst)(o.prototype,"SHOW_CDATA_SECTION",8),(0,i.idl_defineConst)(o.prototype,"SHOW_ENTITY_REFERENCE",16),(0,i.idl_defineConst)(o.prototype,"SHOW_ENTITY",32),(0,i.idl_defineConst)(o.prototype,"SHOW_PROCESSING_INSTRUCTION",64),(0,i.idl_defineConst)(o.prototype,"SHOW_COMMENT",128),(0,i.idl_defineConst)(o.prototype,"SHOW_DOCUMENT",256),(0,i.idl_defineConst)(o.prototype,"SHOW_DOCUMENT_TYPE",512),(0,i.idl_defineConst)(o.prototype,"SHOW_DOCUMENT_FRAGMENT",1024),(0,i.idl_defineConst)(o.prototype,"SHOW_NOTATION",2048)},3014:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.NodeImpl=void 0;const r=n(33696),i=n(50912),o=n(11285),s=n(25986),a=n(18509),l=n(20371),u=n(25800),c=n(31709);class d extends o.EventTargetImpl{static ELEMENT_NODE=1;static ATTRIBUTE_NODE=2;static TEXT_NODE=3;static CDATA_SECTION_NODE=4;static ENTITY_REFERENCE_NODE=5;static ENTITY_NODE=6;static PROCESSING_INSTRUCTION_NODE=7;static COMMENT_NODE=8;static DOCUMENT_NODE=9;static DOCUMENT_TYPE_NODE=10;static DOCUMENT_FRAGMENT_NODE=11;static NOTATION_NODE=12;static DOCUMENT_POSITION_DISCONNECTED=1;static DOCUMENT_POSITION_PRECEDING=2;static DOCUMENT_POSITION_FOLLOWING=4;static DOCUMENT_POSITION_CONTAINS=8;static DOCUMENT_POSITION_CONTAINED_BY=16;static DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;ELEMENT_NODE=1;ATTRIBUTE_NODE=2;TEXT_NODE=3;CDATA_SECTION_NODE=4;ENTITY_REFERENCE_NODE=5;ENTITY_NODE=6;PROCESSING_INSTRUCTION_NODE=7;COMMENT_NODE=8;DOCUMENT_NODE=9;DOCUMENT_TYPE_NODE=10;DOCUMENT_FRAGMENT_NODE=11;NOTATION_NODE=12;DOCUMENT_POSITION_DISCONNECTED=1;DOCUMENT_POSITION_PRECEDING=2;DOCUMENT_POSITION_FOLLOWING=4;DOCUMENT_POSITION_CONTAINS=8;DOCUMENT_POSITION_CONTAINED_BY=16;DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;__childNodes;get _childNodes(){return this.__childNodes||(this.__childNodes=(0,l.create_nodeList)(this))}_nodeDocumentOverride;get _nodeDocument(){return this._nodeDocumentOverride||r.dom.window._associatedDocument}set _nodeDocument(e){this._nodeDocumentOverride=e}__registeredObserverList;get _registeredObserverList(){return this.__registeredObserverList||(this.__registeredObserverList=[])}_parent=null;_children=new s.EmptySet;_firstChild=null;_lastChild=null;_previousSibling=null;_nextSibling=null;constructor(){super()}get nodeType(){return this._nodeType}get nodeName(){return s.Guard.isElementNode(this)?this._htmlUppercasedQualifiedName:s.Guard.isAttrNode(this)?this._qualifiedName:s.Guard.isExclusiveTextNode(this)?"#text":s.Guard.isCDATASectionNode(this)?"#cdata-section":s.Guard.isProcessingInstructionNode(this)?this._target:s.Guard.isCommentNode(this)?"#comment":s.Guard.isDocumentNode(this)?"#document":s.Guard.isDocumentTypeNode(this)?this._name:s.Guard.isDocumentFragmentNode(this)?"#document-fragment":""}get baseURI(){return(0,u.urlSerializer)(this._nodeDocument._URL)}get isConnected(){return s.Guard.isElementNode(this)&&(0,l.shadowTree_isConnected)(this)}get ownerDocument(){return this._nodeType===i.NodeType.Document?null:this._nodeDocument}getRootNode(e){return(0,l.tree_rootNode)(this,!!e&&e.composed)}get parentNode(){return this._nodeType===i.NodeType.Attribute?null:this._parent}get parentElement(){return this._parent&&s.Guard.isElementNode(this._parent)?this._parent:null}hasChildNodes(){return null!==this._firstChild}get childNodes(){return this._childNodes}get firstChild(){return this._firstChild}get lastChild(){return this._lastChild}get previousSibling(){return this._previousSibling}get nextSibling(){return this._nextSibling}get nodeValue(){return s.Guard.isAttrNode(this)?this._value:s.Guard.isCharacterDataNode(this)?this._data:null}set nodeValue(e){null===e&&(e=""),s.Guard.isAttrNode(this)?(0,l.attr_setAnExistingAttributeValue)(this,e):s.Guard.isCharacterDataNode(this)&&(0,l.characterData_replaceData)(this,0,this._data.length,e)}get textContent(){return s.Guard.isDocumentFragmentNode(this)||s.Guard.isElementNode(this)?(0,l.text_descendantTextContent)(this):s.Guard.isAttrNode(this)?this._value:s.Guard.isCharacterDataNode(this)?this._data:null}set textContent(e){null===e&&(e=""),s.Guard.isDocumentFragmentNode(this)||s.Guard.isElementNode(this)?(0,l.node_stringReplaceAll)(e,this):s.Guard.isAttrNode(this)?(0,l.attr_setAnExistingAttributeValue)(this,e):s.Guard.isCharacterDataNode(this)&&(0,l.characterData_replaceData)(this,0,(0,l.tree_nodeLength)(this),e)}normalize(){const e=[];let t=(0,l.tree_getFirstDescendantNode)(this,!1,!1,e=>s.Guard.isExclusiveTextNode(e));while(null!==t)e.push(t),t=(0,l.tree_getNextDescendantNode)(this,t,!1,!1,e=>s.Guard.isExclusiveTextNode(e));for(let n=0;n<e.length;n++){const t=e[n];if(null===t._parent)continue;let i=(0,l.tree_nodeLength)(t);if(0===i){(0,l.mutation_remove)(t,t._parent);continue}const o=[];let a="";for(const e of(0,l.text_contiguousExclusiveTextNodes)(t))o.push(e),a+=e._data;if((0,l.characterData_replaceData)(t,i,0,a),0!==r.dom.rangeList.size){let e=t._nextSibling;while(null!==e&&s.Guard.isExclusiveTextNode(e)){const n=e,o=(0,l.tree_index)(n);for(const e of r.dom.rangeList)e._start[0]===n&&(e._start[0]=t,e._start[1]+=i),e._end[0]===n&&(e._end[0]=t,e._end[1]+=i),e._start[0]===n._parent&&e._start[1]===o&&(e._start[0]=t,e._start[1]=i),e._end[0]===n._parent&&e._end[1]===o&&(e._end[0]=t,e._end[1]=i);i+=(0,l.tree_nodeLength)(e),e=e._nextSibling}}for(let e=0;e<o.length;e++){const t=o[e];null!==t._parent&&(0,l.mutation_remove)(t,t._parent)}}}cloneNode(e=!1){if(s.Guard.isShadowRoot(this))throw new a.NotSupportedError;return(0,l.node_clone)(this,null,e)}isEqualNode(e=null){return null!==e&&(0,l.node_equals)(this,e)}isSameNode(e=null){return this===e}compareDocumentPosition(e){if(e===this)return i.Position.SameNode;let t=e,n=this,o=null,a=null;if(s.Guard.isAttrNode(t)&&(o=t,t=o._element),s.Guard.isAttrNode(n)&&(a=n,n=a._element,o&&t&&t===n))for(let r=0;r<n._attributeList.length;r++){const e=n._attributeList[r];if((0,l.node_equals)(e,o))return i.Position.ImplementationSpecific|i.Position.Preceding;if((0,l.node_equals)(e,a))return i.Position.ImplementationSpecific|i.Position.Following}return null===t||null===n||(0,l.tree_rootNode)(t)!==(0,l.tree_rootNode)(n)?i.Position.Disconnected|i.Position.ImplementationSpecific|(r.dom.compareCache.check(this,e)?i.Position.Preceding:i.Position.Following):!o&&(0,l.tree_isAncestorOf)(n,t)||a&&t===n?i.Position.Contains|i.Position.Preceding:!a&&(0,l.tree_isDescendantOf)(n,t)||o&&t===n?i.Position.ContainedBy|i.Position.Following:(0,l.tree_isPreceding)(n,t)?i.Position.Preceding:i.Position.Following}contains(e){return null!==e&&(0,l.tree_isDescendantOf)(this,e,!0)}lookupPrefix(e){return e?s.Guard.isElementNode(this)?(0,l.node_locateANamespacePrefix)(this,e):s.Guard.isDocumentNode(this)?null===this.documentElement?null:(0,l.node_locateANamespacePrefix)(this.documentElement,e):s.Guard.isDocumentTypeNode(this)||s.Guard.isDocumentFragmentNode(this)?null:s.Guard.isAttrNode(this)?null===this._element?null:(0,l.node_locateANamespacePrefix)(this._element,e):null!==this._parent&&s.Guard.isElementNode(this._parent)?(0,l.node_locateANamespacePrefix)(this._parent,e):null:null}lookupNamespaceURI(e){return(0,l.node_locateANamespace)(this,e||null)}isDefaultNamespace(e){e||(e=null);const t=(0,l.node_locateANamespace)(this,null);return t===e}insertBefore(e,t){return(0,l.mutation_preInsert)(e,this,t)}appendChild(e){return(0,l.mutation_append)(e,this)}replaceChild(e,t){return(0,l.mutation_replace)(t,e,this)}removeChild(e){return(0,l.mutation_preRemove)(e,this)}_getTheParent(e){return s.Guard.isSlotable(this)&&(0,l.shadowTree_isAssigned)(this)?this._assignedSlot:this._parent}}t.NodeImpl=d,d.prototype._children=new s.EmptySet,(0,c.idl_defineConst)(d.prototype,"ELEMENT_NODE",1),(0,c.idl_defineConst)(d.prototype,"ATTRIBUTE_NODE",2),(0,c.idl_defineConst)(d.prototype,"TEXT_NODE",3),(0,c.idl_defineConst)(d.prototype,"CDATA_SECTION_NODE",4),(0,c.idl_defineConst)(d.prototype,"ENTITY_REFERENCE_NODE",5),(0,c.idl_defineConst)(d.prototype,"ENTITY_NODE",6),(0,c.idl_defineConst)(d.prototype,"PROCESSING_INSTRUCTION_NODE",7),(0,c.idl_defineConst)(d.prototype,"COMMENT_NODE",8),(0,c.idl_defineConst)(d.prototype,"DOCUMENT_NODE",9),(0,c.idl_defineConst)(d.prototype,"DOCUMENT_TYPE_NODE",10),(0,c.idl_defineConst)(d.prototype,"DOCUMENT_FRAGMENT_NODE",11),(0,c.idl_defineConst)(d.prototype,"NOTATION_NODE",12),(0,c.idl_defineConst)(d.prototype,"DOCUMENT_POSITION_DISCONNECTED",1),(0,c.idl_defineConst)(d.prototype,"DOCUMENT_POSITION_PRECEDING",2),(0,c.idl_defineConst)(d.prototype,"DOCUMENT_POSITION_FOLLOWING",4),(0,c.idl_defineConst)(d.prototype,"DOCUMENT_POSITION_CONTAINS",8),(0,c.idl_defineConst)(d.prototype,"DOCUMENT_POSITION_CONTAINED_BY",16),(0,c.idl_defineConst)(d.prototype,"DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC",32)},92928:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.NodeIteratorImpl=void 0;const r=n(71224),i=n(20371);class o extends r.TraverserImpl{_iteratorCollection;_reference;_pointerBeforeReference;constructor(e,t,n){super(e),this._iteratorCollection=void 0,this._reference=t,this._pointerBeforeReference=n,(0,i.nodeIterator_iteratorList)().add(this)}get referenceNode(){return this._reference}get pointerBeforeReferenceNode(){return this._pointerBeforeReference}nextNode(){return(0,i.nodeIterator_traverse)(this,!0)}previousNode(){return(0,i.nodeIterator_traverse)(this,!1)}detach(){(0,i.nodeIterator_iteratorList)().delete(this)}static _create(e,t,n){return new o(e,t,n)}}t.NodeIteratorImpl=o},78641:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.NodeListImpl=void 0;const r=n(33696),i=n(92539),o=n(20371);class s{_live=!0;_root;_filter=null;_length=0;constructor(e){return this._root=e,new Proxy(this,this)}get length(){return this._root._children.size}item(e){if(e<0||e>this.length-1)return null;if(e<this.length/2){let t=0,n=this._root._firstChild;while(null!==n&&t!==e)n=n._nextSibling,t++;return n}{let t=this.length-1,n=this._root._lastChild;while(null!==n&&t!==e)n=n._previousSibling,t--;return n}}keys(){return{[Symbol.iterator]:function(){let e=0;return{next:function(){return e===this.length?{done:!0,value:null}:{done:!1,value:e++}}.bind(this)}}.bind(this)}}values(){return{[Symbol.iterator]:function(){const e=this[Symbol.iterator]();return{next(){return e.next()}}}.bind(this)}}entries(){return{[Symbol.iterator]:function(){const e=this[Symbol.iterator]();let t=0;return{next(){const n=e.next();return n.done?{done:!0,value:null}:{done:!1,value:[t++,n.value]}}}}.bind(this)}}[Symbol.iterator](){return this._root._children[Symbol.iterator]()}forEach(e,t){void 0===t&&(t=r.dom.window);let n=0;for(const r of this._root._children)e.call(t,r,n++,this)}get(e,t,n){if(!(0,i.isString)(t))return Reflect.get(e,t,n);const r=Number(t);return isNaN(r)?Reflect.get(e,t,n):e.item(r)||void 0}set(e,t,n,r){if(!(0,i.isString)(t))return Reflect.set(e,t,n,r);const s=Number(t);if(isNaN(s))return Reflect.set(e,t,n,r);const a=e.item(s)||void 0;return!!a&&(!!a._parent&&((0,o.mutation_replace)(a,n,a._parent),!0))}static _create(e){return new s(e)}}t.NodeListImpl=s},97944:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.NodeListStaticImpl=void 0;const r=n(33696),i=n(92539);class o{_live=!1;_root;_filter;_items=[];_length=0;constructor(e){return this._root=e,this._items=[],this._filter=function(e){return!0},new Proxy(this,this)}get length(){return this._items.length}item(e){return e<0||e>this.length-1?null:this._items[e]}keys(){return{[Symbol.iterator]:function(){let e=0;return{next:function(){return e===this.length?{done:!0,value:null}:{done:!1,value:e++}}.bind(this)}}.bind(this)}}values(){return{[Symbol.iterator]:function(){const e=this[Symbol.iterator]();return{next(){return e.next()}}}.bind(this)}}entries(){return{[Symbol.iterator]:function(){const e=this[Symbol.iterator]();let t=0;return{next(){const n=e.next();return n.done?{done:!0,value:null}:{done:!1,value:[t++,n.value]}}}}.bind(this)}}[Symbol.iterator](){const e=this._items[Symbol.iterator]();return{next(){return e.next()}}}forEach(e,t){void 0===t&&(t=r.dom.window);let n=0;for(const r of this._items)e.call(t,r,n++,this)}get(e,t,n){if(!(0,i.isString)(t))return Reflect.get(e,t,n);const r=Number(t);return isNaN(r)?Reflect.get(e,t,n):e._items[r]||void 0}set(e,t,n,r){if(!(0,i.isString)(t))return Reflect.set(e,t,n,r);const o=Number(t);return isNaN(o)?Reflect.set(e,t,n,r):o>=0&&o<e._items.length&&(e._items[o]=n,!0)}static _create(e,t){const n=new o(e);return n._items=t,n}}t.NodeListStaticImpl=o},61250:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.NonDocumentTypeChildNodeImpl=void 0;const r=n(25986);class i{get previousElementSibling(){let e=r.Cast.asNode(this)._previousSibling;while(e){if(r.Guard.isElementNode(e))return e;e=e._previousSibling}return null}get nextElementSibling(){let e=r.Cast.asNode(this)._nextSibling;while(e){if(r.Guard.isElementNode(e))return e;e=e._nextSibling}return null}}t.NonDocumentTypeChildNodeImpl=i},95099:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.NonElementParentNodeImpl=void 0;const r=n(25986),i=n(20371);class o{getElementById(e){let t=(0,i.tree_getFirstDescendantNode)(r.Cast.asNode(this),!1,!1,e=>r.Guard.isElementNode(e));while(null!==t){if(t._uniqueIdentifier===e)return t;t=(0,i.tree_getNextDescendantNode)(r.Cast.asNode(this),t,!1,!1,e=>r.Guard.isElementNode(e))}return null}}t.NonElementParentNodeImpl=o},53782:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ParentNodeImpl=void 0;const r=n(25986),i=n(20371);class o{get children(){return(0,i.create_htmlCollection)(r.Cast.asNode(this))}get firstElementChild(){let e=r.Cast.asNode(this)._firstChild;while(e){if(r.Guard.isElementNode(e))return e;e=e._nextSibling}return null}get lastElementChild(){let e=r.Cast.asNode(this)._lastChild;while(e){if(r.Guard.isElementNode(e))return e;e=e._previousSibling}return null}get childElementCount(){let e=0;for(const t of r.Cast.asNode(this)._children)r.Guard.isElementNode(t)&&e++;return e}prepend(...e){const t=r.Cast.asNode(this),n=(0,i.parentNode_convertNodesIntoANode)(e,t._nodeDocument);(0,i.mutation_preInsert)(n,t,t._firstChild)}append(...e){const t=r.Cast.asNode(this),n=(0,i.parentNode_convertNodesIntoANode)(e,t._nodeDocument);(0,i.mutation_append)(n,t)}querySelector(e){const t=r.Cast.asNode(this),n=(0,i.selectors_scopeMatchASelectorsString)(e,t);return 0===n.length?null:n[0]}querySelectorAll(e){const t=r.Cast.asNode(this),n=(0,i.selectors_scopeMatchASelectorsString)(e,t);return(0,i.create_nodeListStatic)(t,n)}}t.ParentNodeImpl=o},73329:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ProcessingInstructionImpl=void 0;const r=n(50912),i=n(43767),o=n(31709);class s extends i.CharacterDataImpl{_nodeType=r.NodeType.ProcessingInstruction;_target;constructor(e,t){super(t),this._target=e}get target(){return this._target}static _create(e,t,n){const r=new s(t,n);return r._nodeDocument=e,r}}t.ProcessingInstructionImpl=s,(0,o.idl_defineConst)(s.prototype,"_nodeType",r.NodeType.ProcessingInstruction)},63041:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.RangeImpl=void 0;const r=n(33696),i=n(50912),o=n(39067),s=n(18509),a=n(20371),l=n(31709),u=n(25986);class c extends o.AbstractRangeImpl{static START_TO_START=0;static START_TO_END=1;static END_TO_END=2;static END_TO_START=3;START_TO_START=0;START_TO_END=1;END_TO_END=2;END_TO_START=3;_start;_end;constructor(){super();const e=r.dom.window._associatedDocument;this._start=[e,0],this._end=[e,0],r.dom.rangeList.add(this)}get commonAncestorContainer(){let e=this._start[0];while(!(0,a.tree_isAncestorOf)(this._end[0],e,!0)){if(null===e._parent)throw new Error("Parent node is null.");e=e._parent}return e}setStart(e,t){(0,a.range_setTheStart)(this,e,t)}setEnd(e,t){(0,a.range_setTheEnd)(this,e,t)}setStartBefore(e){let t=e._parent;if(null===t)throw new s.InvalidNodeTypeError;(0,a.range_setTheStart)(this,t,(0,a.tree_index)(e))}setStartAfter(e){let t=e._parent;if(null===t)throw new s.InvalidNodeTypeError;(0,a.range_setTheStart)(this,t,(0,a.tree_index)(e)+1)}setEndBefore(e){let t=e._parent;if(null===t)throw new s.InvalidNodeTypeError;(0,a.range_setTheEnd)(this,t,(0,a.tree_index)(e))}setEndAfter(e){let t=e._parent;if(null===t)throw new s.InvalidNodeTypeError;(0,a.range_setTheEnd)(this,t,(0,a.tree_index)(e)+1)}collapse(e){e?this._end=this._start:this._start=this._end}selectNode(e){(0,a.range_select)(e,this)}selectNodeContents(e){if(u.Guard.isDocumentTypeNode(e))throw new s.InvalidNodeTypeError;const t=(0,a.tree_nodeLength)(e);this._start=[e,0],this._end=[e,t]}compareBoundaryPoints(e,t){if(e!==i.HowToCompare.StartToStart&&e!==i.HowToCompare.StartToEnd&&e!==i.HowToCompare.EndToEnd&&e!==i.HowToCompare.EndToStart)throw new s.NotSupportedError;if((0,a.range_root)(this)!==(0,a.range_root)(t))throw new s.WrongDocumentError;let n,r;switch(e){case i.HowToCompare.StartToStart:n=this._start,r=t._start;break;case i.HowToCompare.StartToEnd:n=this._end,r=t._start;break;case i.HowToCompare.EndToEnd:n=this._end,r=t._end;break;case i.HowToCompare.EndToStart:n=this._start,r=t._end;break;default:throw new s.NotSupportedError}const o=(0,a.boundaryPoint_position)(n,r);return o===i.BoundaryPosition.Before?-1:o===i.BoundaryPosition.After?1:0}deleteContents(){if((0,a.range_collapsed)(this))return;const e=this._startNode,t=this._startOffset,n=this._endNode,r=this._endOffset;if(e===n&&u.Guard.isCharacterDataNode(e))return void(0,a.characterData_replaceData)(e,t,r-t,"");const i=[];for(const l of(0,a.range_getContainedNodes)(this)){const e=l._parent;null!==e&&(0,a.range_isContained)(e,this)||i.push(l)}let o,s;if((0,a.tree_isAncestorOf)(n,e,!0))o=e,s=t;else{let t=e;while(null!==t._parent&&!(0,a.tree_isAncestorOf)(n,t._parent,!0))t=t._parent;if(null===t._parent)throw new Error("Parent node is null.");o=t._parent,s=(0,a.tree_index)(t)+1}u.Guard.isCharacterDataNode(e)&&(0,a.characterData_replaceData)(e,t,(0,a.tree_nodeLength)(e)-t,"");for(const l of i)l._parent&&(0,a.mutation_remove)(l,l._parent);u.Guard.isCharacterDataNode(n)&&(0,a.characterData_replaceData)(n,0,r,""),this._start=[o,s],this._end=[o,s]}extractContents(){return(0,a.range_extract)(this)}cloneContents(){return(0,a.range_cloneTheContents)(this)}insertNode(e){return(0,a.range_insert)(e,this)}surroundContents(e){for(const n of(0,a.range_getPartiallyContainedNodes)(this))if(!u.Guard.isTextNode(n))throw new s.InvalidStateError;if(u.Guard.isDocumentNode(e)||u.Guard.isDocumentTypeNode(e)||u.Guard.isDocumentFragmentNode(e))throw new s.InvalidNodeTypeError;const t=(0,a.range_extract)(this);0!==e._children.size&&(0,a.mutation_replaceAll)(null,e),(0,a.range_insert)(e,this),(0,a.mutation_append)(t,e),(0,a.range_select)(e,this)}cloneRange(){return(0,a.create_range)(this._start,this._end)}detach(){r.dom.rangeList.delete(this)}isPointInRange(e,t){if((0,a.tree_rootNode)(e)!==(0,a.range_root)(this))return!1;if(u.Guard.isDocumentTypeNode(e))throw new s.InvalidNodeTypeError;if(t>(0,a.tree_nodeLength)(e))throw new s.IndexSizeError;const n=[e,t];return(0,a.boundaryPoint_position)(n,this._start)!==i.BoundaryPosition.Before&&(0,a.boundaryPoint_position)(n,this._end)!==i.BoundaryPosition.After}comparePoint(e,t){if((0,a.tree_rootNode)(e)!==(0,a.range_root)(this))throw new s.WrongDocumentError;if(u.Guard.isDocumentTypeNode(e))throw new s.InvalidNodeTypeError;if(t>(0,a.tree_nodeLength)(e))throw new s.IndexSizeError;const n=[e,t];return(0,a.boundaryPoint_position)(n,this._start)===i.BoundaryPosition.Before?-1:(0,a.boundaryPoint_position)(n,this._end)===i.BoundaryPosition.After?1:0}intersectsNode(e){if((0,a.tree_rootNode)(e)!==(0,a.range_root)(this))return!1;const t=e._parent;if(null===t)return!0;const n=(0,a.tree_index)(e);return(0,a.boundaryPoint_position)([t,n],this._end)===i.BoundaryPosition.Before&&(0,a.boundaryPoint_position)([t,n+1],this._start)===i.BoundaryPosition.After}toString(){let e="";if(this._startNode===this._endNode&&u.Guard.isTextNode(this._startNode))return this._startNode._data.substring(this._startOffset,this._endOffset);u.Guard.isTextNode(this._startNode)&&(e+=this._startNode._data.substring(this._startOffset));for(const t of(0,a.range_getContainedNodes)(this))u.Guard.isTextNode(t)&&(e+=t._data);return u.Guard.isTextNode(this._endNode)&&(e+=this._endNode._data.substring(0,this._endOffset)),e}static _create(e,t){const n=new c;return e&&(n._start=e),t&&(n._end=t),n}}t.RangeImpl=c,(0,l.idl_defineConst)(c.prototype,"START_TO_START",0),(0,l.idl_defineConst)(c.prototype,"START_TO_END",1),(0,l.idl_defineConst)(c.prototype,"END_TO_END",2),(0,l.idl_defineConst)(c.prototype,"END_TO_START",3)},10842:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ShadowRootImpl=void 0;const r=n(35251),i=n(92539),o=n(20371);class s extends r.DocumentFragmentImpl{_host;_mode;constructor(e,t){super(),this._host=e,this._mode=t}get mode(){return this._mode}get host(){return this._host}_getTheParent(e){return e._composedFlag||(0,i.isEmpty)(e._path)||(0,o.tree_rootNode)(e._path[0].invocationTarget)!==this?this._host:null}static _create(e,t){return new s(t,"closed")}}t.ShadowRootImpl=s},21334:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SlotableImpl=void 0;const r=n(20371);class i{__name;__assignedSlot;get _name(){return this.__name||""}set _name(e){this.__name=e}get _assignedSlot(){return this.__assignedSlot||null}set _assignedSlot(e){this.__assignedSlot=e}get assignedSlot(){return(0,r.shadowTree_findASlot)(this,!0)}}t.SlotableImpl=i},8219:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.StaticRangeImpl=void 0;const r=n(39067),i=n(18509),o=n(25986);class s extends r.AbstractRangeImpl{_start;_end;constructor(e){if(super(),o.Guard.isDocumentTypeNode(e.startContainer)||o.Guard.isAttrNode(e.startContainer)||o.Guard.isDocumentTypeNode(e.endContainer)||o.Guard.isAttrNode(e.endContainer))throw new i.InvalidNodeTypeError;this._start=[e.startContainer,e.startOffset],this._end=[e.endContainer,e.endOffset]}}t.StaticRangeImpl=s},98669:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.TextImpl=void 0;const r=n(50912),i=n(43767),o=n(20371),s=n(31709);class a extends i.CharacterDataImpl{_nodeType=r.NodeType.Text;_name="";_assignedSlot=null;constructor(e=""){super(e)}get wholeText(){let e="";for(const t of(0,o.text_contiguousTextNodes)(this,!0))e+=t._data;return e}splitText(e){return(0,o.text_split)(this,e)}get assignedSlot(){throw new Error("Mixin: Slotable not implemented.")}static _create(e,t=""){const n=new a(t);return n._nodeDocument=e,n}}t.TextImpl=a,(0,s.idl_defineConst)(a.prototype,"_nodeType",r.NodeType.Text)},71224:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.TraverserImpl=void 0;const r=n(50912);class i{_activeFlag;_root;_whatToShow;_filter;constructor(e){this._activeFlag=!1,this._root=e,this._whatToShow=r.WhatToShow.All,this._filter=null}get root(){return this._root}get whatToShow(){return this._whatToShow}get filter(){return this._filter}}t.TraverserImpl=i},1852:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.TreeWalkerImpl=void 0;const r=n(50912),i=n(71224),o=n(20371);class s extends i.TraverserImpl{_current;constructor(e,t){super(e),this._current=t}get currentNode(){return this._current}set currentNode(e){this._current=e}parentNode(){let e=this._current;while(null!==e&&e!==this._root)if(e=e._parent,null!==e&&(0,o.traversal_filter)(this,e)===r.FilterResult.Accept)return this._current=e,e;return null}firstChild(){return(0,o.treeWalker_traverseChildren)(this,!0)}lastChild(){return(0,o.treeWalker_traverseChildren)(this,!1)}nextSibling(){return(0,o.treeWalker_traverseSiblings)(this,!0)}previousNode(){let e=this._current;while(e!==this._root){let t=e._previousSibling;while(t){e=t;let n=(0,o.traversal_filter)(this,e);while(n!==r.FilterResult.Reject&&e._lastChild)e=e._lastChild,n=(0,o.traversal_filter)(this,e);if(n===r.FilterResult.Accept)return this._current=e,e;t=e._previousSibling}if(e===this._root||null===e._parent)return null;if(e=e._parent,(0,o.traversal_filter)(this,e)===r.FilterResult.Accept)return this._current=e,e}return null}previousSibling(){return(0,o.treeWalker_traverseSiblings)(this,!1)}nextNode(){let e=this._current,t=r.FilterResult.Accept;while(1){while(t!==r.FilterResult.Reject&&e._firstChild)if(e=e._firstChild,t=(0,o.traversal_filter)(this,e),t===r.FilterResult.Accept)return this._current=e,e;let n=null,i=e;while(null!==i){if(i===this._root)return null;if(n=i._nextSibling,null!==n){e=n;break}i=i._parent}if(t=(0,o.traversal_filter)(this,e),t===r.FilterResult.Accept)return this._current=e,e}}static _create(e,t){return new s(e,t)}}t.TreeWalkerImpl=s},65446:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.WindowImpl=void 0;const r=n(11285),i=n(92539),o=n(20371);class s extends r.EventTargetImpl{_currentEvent;_signalSlots=new Set;_mutationObserverMicrotaskQueued=!1;_mutationObservers=new Set;_associatedDocument;_iteratorList=new i.FixedSizeSet;constructor(){super(),this._associatedDocument=(0,o.create_document)()}get document(){return this._associatedDocument}get event(){return this._currentEvent}static _create(){return new s}}t.WindowImpl=s},11544:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.XMLDocumentImpl=void 0;const r=n(8563);class i extends r.DocumentImpl{constructor(){super()}}t.XMLDocumentImpl=i},33138:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.XMLDocument=t.Window=t.TreeWalker=t.Traverser=t.Text=t.StaticRange=t.ShadowRoot=t.Range=t.ProcessingInstruction=t.NodeListStatic=t.NodeList=t.NodeIterator=t.Node=t.NodeFilter=t.NamedNodeMap=t.MutationRecord=t.MutationObserver=t.HTMLCollection=t.EventTarget=t.Event=t.Element=t.DOMTokenList=t.DOMImplementation=t.dom=t.DocumentType=t.Document=t.DocumentFragment=t.CustomEvent=t.Comment=t.CharacterData=t.CDATASection=t.Attr=t.AbstractRange=t.AbortSignal=t.AbortController=void 0;const r=n(92539),i=n(73382);Object.defineProperty(t,"AbortController",{enumerable:!0,get:function(){return i.AbortControllerImpl}});const o=n(72018);Object.defineProperty(t,"AbortSignal",{enumerable:!0,get:function(){return o.AbortSignalImpl}});const s=n(39067);Object.defineProperty(t,"AbstractRange",{enumerable:!0,get:function(){return s.AbstractRangeImpl}});const a=n(3869);Object.defineProperty(t,"Attr",{enumerable:!0,get:function(){return a.AttrImpl}});const l=n(53674);Object.defineProperty(t,"CDATASection",{enumerable:!0,get:function(){return l.CDATASectionImpl}});const u=n(43767);Object.defineProperty(t,"CharacterData",{enumerable:!0,get:function(){return u.CharacterDataImpl}});const c=n(950),d=n(60429);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return d.CommentImpl}});const h=n(46897);Object.defineProperty(t,"CustomEvent",{enumerable:!0,get:function(){return h.CustomEventImpl}});const _=n(35251);Object.defineProperty(t,"DocumentFragment",{enumerable:!0,get:function(){return _.DocumentFragmentImpl}});const m=n(8563);Object.defineProperty(t,"Document",{enumerable:!0,get:function(){return m.DocumentImpl}});const p=n(46914),f=n(18515);Object.defineProperty(t,"DocumentType",{enumerable:!0,get:function(){return f.DocumentTypeImpl}});const g=n(33696);Object.defineProperty(t,"dom",{enumerable:!0,get:function(){return g.dom}});const N=n(38846);Object.defineProperty(t,"DOMImplementation",{enumerable:!0,get:function(){return N.DOMImplementationImpl}});const b=n(96911);Object.defineProperty(t,"DOMTokenList",{enumerable:!0,get:function(){return b.DOMTokenListImpl}});const v=n(14420);Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return v.ElementImpl}});const y=n(14856);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return y.EventImpl}});const w=n(11285);Object.defineProperty(t,"EventTarget",{enumerable:!0,get:function(){return w.EventTargetImpl}});const T=n(27659);Object.defineProperty(t,"HTMLCollection",{enumerable:!0,get:function(){return T.HTMLCollectionImpl}});const E=n(59687);Object.defineProperty(t,"MutationObserver",{enumerable:!0,get:function(){return E.MutationObserverImpl}});const S=n(75484);Object.defineProperty(t,"MutationRecord",{enumerable:!0,get:function(){return S.MutationRecordImpl}});const x=n(95843);Object.defineProperty(t,"NamedNodeMap",{enumerable:!0,get:function(){return x.NamedNodeMapImpl}});const C=n(49820);Object.defineProperty(t,"NodeFilter",{enumerable:!0,get:function(){return C.NodeFilterImpl}});const I=n(3014);Object.defineProperty(t,"Node",{enumerable:!0,get:function(){return I.NodeImpl}});const O=n(92928);Object.defineProperty(t,"NodeIterator",{enumerable:!0,get:function(){return O.NodeIteratorImpl}});const D=n(78641);Object.defineProperty(t,"NodeList",{enumerable:!0,get:function(){return D.NodeListImpl}});const A=n(97944);Object.defineProperty(t,"NodeListStatic",{enumerable:!0,get:function(){return A.NodeListStaticImpl}});const P=n(61250),L=n(95099),M=n(53782),F=n(73329);Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return F.ProcessingInstructionImpl}});const k=n(63041);Object.defineProperty(t,"Range",{enumerable:!0,get:function(){return k.RangeImpl}});const R=n(10842);Object.defineProperty(t,"ShadowRoot",{enumerable:!0,get:function(){return R.ShadowRootImpl}});const j=n(21334),z=n(8219);Object.defineProperty(t,"StaticRange",{enumerable:!0,get:function(){return z.StaticRangeImpl}});const B=n(98669);Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return B.TextImpl}});const G=n(71224);Object.defineProperty(t,"Traverser",{enumerable:!0,get:function(){return G.TraverserImpl}});const W=n(1852);Object.defineProperty(t,"TreeWalker",{enumerable:!0,get:function(){return W.TreeWalkerImpl}});const U=n(65446);Object.defineProperty(t,"Window",{enumerable:!0,get:function(){return U.WindowImpl}});const q=n(11544);Object.defineProperty(t,"XMLDocument",{enumerable:!0,get:function(){return q.XMLDocumentImpl}}),(0,r.applyMixin)(v.ElementImpl,c.ChildNodeImpl),(0,r.applyMixin)(u.CharacterDataImpl,c.ChildNodeImpl),(0,r.applyMixin)(f.DocumentTypeImpl,c.ChildNodeImpl),(0,r.applyMixin)(m.DocumentImpl,p.DocumentOrShadowRootImpl),(0,r.applyMixin)(R.ShadowRootImpl,p.DocumentOrShadowRootImpl),(0,r.applyMixin)(v.ElementImpl,P.NonDocumentTypeChildNodeImpl),(0,r.applyMixin)(u.CharacterDataImpl,P.NonDocumentTypeChildNodeImpl),(0,r.applyMixin)(m.DocumentImpl,L.NonElementParentNodeImpl),(0,r.applyMixin)(_.DocumentFragmentImpl,L.NonElementParentNodeImpl),(0,r.applyMixin)(m.DocumentImpl,M.ParentNodeImpl),(0,r.applyMixin)(_.DocumentFragmentImpl,M.ParentNodeImpl),(0,r.applyMixin)(v.ElementImpl,M.ParentNodeImpl),(0,r.applyMixin)(B.TextImpl,j.SlotableImpl),(0,r.applyMixin)(v.ElementImpl,j.SlotableImpl)},50912:function(e,t){var n,r,i,o,s,a,l;Object.defineProperty(t,"__esModule",{value:!0}),t.HowToCompare=t.WhatToShow=t.FilterResult=t.Position=t.NodeType=t.EventPhase=t.BoundaryPosition=void 0,function(e){e[e["Before"]=0]="Before",e[e["Equal"]=1]="Equal",e[e["After"]=2]="After"}(n||(t.BoundaryPosition=n={})),function(e){e[e["None"]=0]="None",e[e["Capturing"]=1]="Capturing",e[e["AtTarget"]=2]="AtTarget",e[e["Bubbling"]=3]="Bubbling"}(r||(t.EventPhase=r={})),function(e){e[e["Element"]=1]="Element",e[e["Attribute"]=2]="Attribute",e[e["Text"]=3]="Text",e[e["CData"]=4]="CData",e[e["EntityReference"]=5]="EntityReference",e[e["Entity"]=6]="Entity",e[e["ProcessingInstruction"]=7]="ProcessingInstruction",e[e["Comment"]=8]="Comment",e[e["Document"]=9]="Document",e[e["DocumentType"]=10]="DocumentType",e[e["DocumentFragment"]=11]="DocumentFragment",e[e["Notation"]=12]="Notation"}(i||(t.NodeType=i={})),function(e){e[e["SameNode"]=0]="SameNode",e[e["Disconnected"]=1]="Disconnected",e[e["Preceding"]=2]="Preceding",e[e["Following"]=4]="Following",e[e["Contains"]=8]="Contains",e[e["ContainedBy"]=16]="ContainedBy",e[e["ImplementationSpecific"]=32]="ImplementationSpecific"}(o||(t.Position=o={})),function(e){e[e["Accept"]=1]="Accept",e[e["Reject"]=2]="Reject",e[e["Skip"]=3]="Skip"}(s||(t.FilterResult=s={})),function(e){e[e["All"]=4294967295]="All",e[e["Element"]=1]="Element",e[e["Attribute"]=2]="Attribute",e[e["Text"]=4]="Text",e[e["CDataSection"]=8]="CDataSection",e[e["EntityReference"]=16]="EntityReference",e[e["Entity"]=32]="Entity",e[e["ProcessingInstruction"]=64]="ProcessingInstruction",e[e["Comment"]=128]="Comment",e[e["Document"]=256]="Document",e[e["DocumentType"]=512]="DocumentType",e[e["DocumentFragment"]=1024]="DocumentFragment",e[e["Notation"]=2048]="Notation"}(a||(t.WhatToShow=a={})),function(e){e[e["StartToStart"]=0]="StartToStart",e[e["StartToEnd"]=1]="StartToEnd",e[e["EndToEnd"]=2]="EndToEnd",e[e["EndToStart"]=3]="EndToStart"}(l||(t.HowToCompare=l={}))},19521:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.XMLSerializer=t.DOMParser=t.DOMImplementation=void 0;const r=n(33138);r.dom.setFeatures(!0);var i=n(33138);Object.defineProperty(t,"DOMImplementation",{enumerable:!0,get:function(){return i.DOMImplementation}});var o=n(41709);Object.defineProperty(t,"DOMParser",{enumerable:!0,get:function(){return o.DOMParser}});var s=n(3746);Object.defineProperty(t,"XMLSerializer",{enumerable:!0,get:function(){return s.XMLSerializer}})},16940:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DOMParserImpl=void 0;const r=n(20371),i=n(7477);class o{parseFromString(e,t){if("text/html"===t)throw new Error("HTML parser not implemented.");try{const n=new i.XMLParserImpl,r=n.parse(e);return r._contentType=t,r}catch(n){const e="http://www.mozilla.org/newlayout/xml/parsererror.xml",t=(0,r.create_xmlDocument)(),i=t.createElementNS(e,"parsererror"),o=t.createElementNS(e,"error");return o.setAttribute("message",n.message),i.appendChild(o),t.appendChild(i),t}}}t.DOMParserImpl=o},7477:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.XMLParserImpl=void 0;const r=n(80303),i=n(39893),o=n(88591),s=n(20371),a=n(91740);class l{parse(e){const t=new r.XMLStringLexer(e,{skipWhitespaceOnlyText:!0}),n=(0,s.create_document)();let l=n,u=t.nextToken();while(u.type!==i.TokenType.EOF){switch(u.type){case i.TokenType.Declaration:const e=u;if("1.0"!==e.version)throw new Error("Invalid xml version: "+e.version);break;case i.TokenType.DocType:const t=u;if(!(0,s.xml_isPubidChar)(t.pubId))throw new Error("DocType public identifier does not match PubidChar construct.");if(!(0,s.xml_isLegalChar)(t.sysId)||-1!==t.sysId.indexOf('"')&&-1!==t.sysId.indexOf("'"))throw new Error("DocType system identifier contains invalid characters.");l.appendChild(n.implementation.createDocumentType(t.name,t.pubId,t.sysId));break;case i.TokenType.CDATA:const r=u;if(!(0,s.xml_isLegalChar)(r.data)||-1!==r.data.indexOf("]]>"))throw new Error("CDATA contains invalid characters.");l.appendChild(n.createCDATASection(r.data));break;case i.TokenType.Comment:const c=u;if(!(0,s.xml_isLegalChar)(c.data)||-1!==c.data.indexOf("--")||c.data.endsWith("-"))throw new Error("Comment data contains invalid characters.");l.appendChild(n.createComment(c.data));break;case i.TokenType.PI:const d=u;if(-1!==d.target.indexOf(":")||/^xml$/i.test(d.target))throw new Error("Processing instruction target contains invalid characters.");if(!(0,s.xml_isLegalChar)(d.data)||-1!==d.data.indexOf("?>"))throw new Error("Processing instruction data contains invalid characters.");l.appendChild(n.createProcessingInstruction(d.target,d.data));break;case i.TokenType.Text:const h=u;if(!(0,s.xml_isLegalChar)(h.data))throw new Error("Text data contains invalid characters.");l.appendChild(n.createTextNode(this._decodeText(h.data)));break;case i.TokenType.Element:const _=u,[m,p]=(0,s.namespace_extractQName)(_.name);if(-1!==p.indexOf(":")||!(0,s.xml_isName)(p))throw new Error("Node local name contains invalid characters.");if("xmlns"===m)throw new Error("An element cannot have the 'xmlns' prefix.");let f=l.lookupNamespaceURI(m);const g={};for(const[n,i]of _.attributes)if("xmlns"===n)f=i;else{const[e,t]=(0,s.namespace_extractQName)(n);"xmlns"===e&&(t===m&&(f=i),g[t]=i)}const N=null!==f?n.createElementNS(f,_.name):n.createElement(_.name);l.appendChild(N);const b=new a.LocalNameSet;for(const[n,i]of _.attributes){const[e,t]=(0,s.namespace_extractQName)(n);let r=null;if("xmlns"===e||null===e&&"xmlns"===t?r=o.namespace.XMLNS:(r=N.lookupNamespaceURI(e),null!==r&&N.isDefaultNamespace(r)?r=null:null===r&&null!==e&&(r=g[e]||null)),b.has(r,t))throw new Error("Element contains duplicate attributes.");if(b.set(r,t),r===o.namespace.XMLNS&&i===o.namespace.XMLNS)throw new Error("XMLNS namespace is reserved.");if(-1!==t.indexOf(":")||!(0,s.xml_isName)(t))throw new Error("Attribute local name contains invalid characters.");if("xmlns"===e&&""===i)throw new Error("Empty XML namespace is not allowed.");null!==r?N.setAttributeNS(r,n,this._decodeAttributeValue(i)):N.setAttribute(n,this._decodeAttributeValue(i))}_.selfClosing||(l=N);break;case i.TokenType.ClosingTag:const v=u;if(v.name!==l.nodeName)throw new Error("Closing tag name does not match opening tag name.");l._parent&&(l=l._parent);break}u=t.nextToken()}return n}_decodeText(e){return null==e?e:e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}_decodeAttributeValue(e){return null==e?e:e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}}t.XMLParserImpl=l},80303:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.XMLStringLexer=void 0;const r=n(39893);class i{_str;_index;_length;_options={skipWhitespaceOnlyText:!1};err={line:-1,col:-1,index:-1,str:""};constructor(e,t){this._str=e,this._index=0,this._length=e.length,t&&(this._options.skipWhitespaceOnlyText=t.skipWhitespaceOnlyText||!1)}nextToken(){if(this.eof())return{type:r.TokenType.EOF};let e=this.skipIfStartsWith("<")?this.openBracket():this.text();return this._options.skipWhitespaceOnlyText&&e.type===r.TokenType.Text&&i.isWhiteSpaceToken(e)&&(e=this.nextToken()),e}openBracket(){return this.skipIfStartsWith("?")?this.skipIfStartsWith("xml")?i.isSpace(this._str[this._index])?this.declaration():(this.seek(-3),this.pi()):this.pi():this.skipIfStartsWith("!")?this.skipIfStartsWith("--")?this.comment():this.skipIfStartsWith("[CDATA[")?this.cdata():this.skipIfStartsWith("DOCTYPE")?this.doctype():void this.throwError("Invalid '!' in opening tag."):this.skipIfStartsWith("/")?this.closeTag():this.openTag()}declaration(){let e="",t="",n="";while(!this.eof()){if(this.skipSpace(),this.skipIfStartsWith("?>"))return{type:r.TokenType.Declaration,version:e,encoding:t,standalone:n};{const[r,i]=this.attribute();"version"===r?e=i:"encoding"===r?t=i:"standalone"===r?n=i:this.throwError("Invalid attribute name: "+r)}}this.throwError("Missing declaration end symbol `?>`")}doctype(){let e="",t="";this.skipSpace();const n=this.takeUntil2("[",">",!0);return this.skipSpace(),this.skipIfStartsWith("PUBLIC")?(e=this.quotedString(),t=this.quotedString()):this.skipIfStartsWith("SYSTEM")&&(t=this.quotedString()),this.skipSpace(),this.skipIfStartsWith("[")&&(this.skipUntil("]"),this.skipIfStartsWith("]")||this.throwError("Missing end bracket of DTD internal subset")),this.skipSpace(),this.skipIfStartsWith(">")||this.throwError("Missing doctype end symbol `>`"),{type:r.TokenType.DocType,name:n,pubId:e,sysId:t}}pi(){const e=this.takeUntilStartsWith("?>",!0);if(this.eof()&&this.throwError("Missing processing instruction end symbol `?>`"),this.skipSpace(),this.skipIfStartsWith("?>"))return{type:r.TokenType.PI,target:e,data:""};const t=this.takeUntilStartsWith("?>");return this.eof()&&this.throwError("Missing processing instruction end symbol `?>`"),this.seek(2),{type:r.TokenType.PI,target:e,data:t}}text(){const e=this.takeUntil("<");return{type:r.TokenType.Text,data:e}}comment(){const e=this.takeUntilStartsWith("--\x3e");return this.eof()&&this.throwError("Missing comment end symbol `--\x3e`"),this.seek(3),{type:r.TokenType.Comment,data:e}}cdata(){const e=this.takeUntilStartsWith("]]>");return this.eof()&&this.throwError("Missing CDATA end symbol `]>`"),this.seek(3),{type:r.TokenType.CDATA,data:e}}openTag(){this.skipSpace();const e=this.takeUntil2(">","/",!0);if(this.skipSpace(),this.skipIfStartsWith(">"))return{type:r.TokenType.Element,name:e,attributes:[],selfClosing:!1};if(this.skipIfStartsWith("/>"))return{type:r.TokenType.Element,name:e,attributes:[],selfClosing:!0};const t=[];while(!this.eof()){if(this.skipSpace(),this.skipIfStartsWith(">"))return{type:r.TokenType.Element,name:e,attributes:t,selfClosing:!1};if(this.skipIfStartsWith("/>"))return{type:r.TokenType.Element,name:e,attributes:t,selfClosing:!0};const n=this.attribute();t.push(n)}this.throwError("Missing opening element tag end symbol `>`")}closeTag(){this.skipSpace();const e=this.takeUntil(">",!0);return this.skipSpace(),this.skipIfStartsWith(">")||this.throwError("Missing closing element tag end symbol `>`"),{type:r.TokenType.ClosingTag,name:e}}attribute(){this.skipSpace();const e=this.takeUntil("=",!0);this.skipSpace(),this.skipIfStartsWith("=")||this.throwError("Missing equals sign before attribute value");const t=this.quotedString();return[e,t]}quotedString(){this.skipSpace();const e=this.take(1);i.isQuote(e)||this.throwError("Missing start quote character before quoted value");const t=this.takeUntil(e);return this.skipIfStartsWith(e)||this.throwError("Missing end quote character after quoted value"),t}eof(){return this._index>=this._length}skipIfStartsWith(e){const t=e.length;if(1===t)return this._str[this._index]===e&&(this._index++,!0);for(let n=0;n<t;n++)if(this._str[this._index+n]!==e[n])return!1;return this._index+=t,!0}seek(e){this._index+=e,this._index<0&&(this._index=0),this._index>this._length&&(this._index=this._length)}skipSpace(){while(!this.eof()&&i.isSpace(this._str[this._index]))this._index++}take(e){if(1===e)return this._str[this._index++];const t=this._index;return this.seek(e),this._str.slice(t,this._index)}takeUntil(e,t=!1){const n=this._index;while(this._index<this._length){const n=this._str[this._index];if(n===e||t&&i.isSpace(n))break;this._index++}return this._str.slice(n,this._index)}takeUntil2(e,t,n=!1){const r=this._index;while(this._index<this._length){const r=this._str[this._index];if(r===e||r===t||n&&i.isSpace(r))break;this._index++}return this._str.slice(r,this._index)}takeUntilStartsWith(e,t=!1){const n=this._index,r=e.length;while(this._index<this._length){let o=!0;for(let s=0;s<r;s++){const r=this._str[this._index+s],a=e[s];if(t&&i.isSpace(r))return this._str.slice(n,this._index);if(r!==a){this._index++,o=!1;break}}if(o)return this._str.slice(n,this._index)}return this._index=this._length,this._str.slice(n)}skipUntil(e){while(this._index<this._length){const t=this._str[this._index];if(t===e)break;this._index++}}static isWhiteSpaceToken(e){const t=e.data;for(let n=0;n<t.length;n++){const e=t[n];if(" "!==e&&"\n"!==e&&"\r"!==e&&"\t"!==e&&"\f"!==e)return!1}return!0}static isSpace(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}static isQuote(e){return'"'===e||"'"===e}throwError(e){const t=/\r\n|\r|\n/g;let n=null,r=0,i=0,o=this._str.length;while(null!==(n=t.exec(this._str))){if(null===n)break;if(r++,n.index<this._index&&(i=t.lastIndex),n.index>this._index){o=n.index;break}}throw this.err={line:r,col:this._index-i,index:this._index,str:this._str.substring(i,o)},new Error(e+"\nIndex: "+this.err.index+"\nLn: "+this.err.line+", Col: "+this.err.col+"\nInput: "+this.err.str)}[Symbol.iterator](){return this._index=0,{next:function(){const e=this.nextToken();return e.type===r.TokenType.EOF?{done:!0,value:null}:{done:!1,value:e}}.bind(this)}}}t.XMLStringLexer=i},41709:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DOMParser=void 0;var r=n(16940);Object.defineProperty(t,"DOMParser",{enumerable:!0,get:function(){return r.DOMParserImpl}})},39893:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TokenType=void 0,function(e){e[e["EOF"]=0]="EOF",e[e["Declaration"]=1]="Declaration",e[e["DocType"]=2]="DocType",e[e["Element"]=3]="Element",e[e["Text"]=4]="Text",e[e["CDATA"]=5]="CDATA",e[e["PI"]=6]="PI",e[e["Comment"]=7]="Comment",e[e["ClosingTag"]=8]="ClosingTag"}(n||(t.TokenType=n={}))},91740:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.LocalNameSet=void 0;class n{_items={};_nullItems={};set(e,t){null===e?this._nullItems[t]=!0:(this._items[e]||(this._items[e]={}),this._items[e][t]=!0)}has(e,t){return null===e?!0===this._nullItems[t]:!!this._items[e]&&!0===this._items[e][t]}}t.LocalNameSet=n},36939:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.NamespacePrefixMap=void 0;class n{_items={};_nullItems=[];copy(){const e=new n;for(const t in this._items)e._items[t]=this._items[t].slice(0);return e._nullItems=this._nullItems.slice(0),e}get(e,t){const n=null===t?this._nullItems:this._items[t]||null;if(null===n)return null;let r=null;for(let i=0;i<n.length;i++)if(r=n[i],r===e)return r;return r}has(e,t){const n=null===t?this._nullItems:this._items[t]||null;return null!==n&&-1!==n.indexOf(e)}hasPrefix(e){if(-1!==this._nullItems.indexOf(e))return!0;for(const t in this._items)if(-1!==this._items[t].indexOf(e))return!0;return!1}set(e,t){const n=null===t?this._nullItems:this._items[t]||null;null!==t&&null===n?this._items[t]=[e]:n.push(e)}}t.NamespacePrefixMap=n},58725:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.XMLSerializerImpl=void 0;const r=n(50912),i=n(91740),o=n(36939),s=n(18509),a=n(88591),l=n(20371);class u{static _VoidElementNames=new Set(["area","base","basefont","bgsound","br","col","embed","frame","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"]);serializeToString(e){return this._xmlSerialization(e,!1)}_xmlSerialization(e,t){if(void 0===e._nodeDocument||e._nodeDocument._hasNamespaces){const n=null,r=new o.NamespacePrefixMap;r.set("xml",a.namespace.XML);const i={value:1};try{return this._serializeNodeNS(e,n,r,i,t)}catch{throw new s.InvalidStateError}}else try{return this._serializeNode(e,t)}catch{throw new s.InvalidStateError}}_serializeNodeNS(e,t,n,i,o){switch(e.nodeType){case r.NodeType.Element:return this._serializeElementNS(e,t,n,i,o);case r.NodeType.Document:return this._serializeDocumentNS(e,t,n,i,o);case r.NodeType.Comment:return this._serializeComment(e,o);case r.NodeType.Text:return this._serializeText(e,o);case r.NodeType.DocumentFragment:return this._serializeDocumentFragmentNS(e,t,n,i,o);case r.NodeType.DocumentType:return this._serializeDocumentType(e,o);case r.NodeType.ProcessingInstruction:return this._serializeProcessingInstruction(e,o);case r.NodeType.CData:return this._serializeCData(e,o);default:throw new Error(`Unknown node type: ${e.nodeType}`)}}_serializeNode(e,t){switch(e.nodeType){case r.NodeType.Element:return this._serializeElement(e,t);case r.NodeType.Document:return this._serializeDocument(e,t);case r.NodeType.Comment:return this._serializeComment(e,t);case r.NodeType.Text:return this._serializeText(e,t);case r.NodeType.DocumentFragment:return this._serializeDocumentFragment(e,t);case r.NodeType.DocumentType:return this._serializeDocumentType(e,t);case r.NodeType.ProcessingInstruction:return this._serializeProcessingInstruction(e,t);case r.NodeType.CData:return this._serializeCData(e,t);default:throw new Error(`Unknown node type: ${e.nodeType}`)}}_serializeElementNS(e,t,n,r,i){if(i&&(-1!==e.localName.indexOf(":")||!(0,l.xml_isName)(e.localName)))throw new Error("Node local name contains invalid characters (well-formed required).");let o="<",s="",c=!1,d=!1,h=n.copy(),_={},m=this._recordNamespaceInformation(e,h,_),p=t,f=e.namespaceURI;if(p===f)null!==m&&(d=!0),s=f===a.namespace.XML?"xml:"+e.localName:e.localName,o+=s;else{let t=e.prefix,n=null;if(null===t&&f===m||(n=h.get(t,f)),"xmlns"===t){if(i)throw new Error("An element cannot have the 'xmlns' prefix (well-formed required).");n=t}null!==n?(s=n+":"+e.localName,null!==m&&m!==a.namespace.XML&&(p=m||null),o+=s):null!==t?(t in _&&(t=this._generatePrefix(f,h,r)),h.set(t,f),s+=t+":"+e.localName,o+=s,o+=" xmlns:"+t+'="'+this._serializeAttributeValue(f,i)+'"',null!==m&&(p=m||null)):null===m||null!==m&&m!==f?(d=!0,s+=e.localName,p=f,o+=s,o+=' xmlns="'+this._serializeAttributeValue(f,i)+'"'):(s+=e.localName,p=f,o+=s)}o+=this._serializeAttributesNS(e,h,r,_,d,i);const g=f===a.namespace.HTML;if(g&&0===e.childNodes.length&&u._VoidElementNames.has(e.localName)?(o+=" /",c=!0):g||0!==e.childNodes.length||(o+="/",c=!0),o+=">",c)return o;if(g&&"template"===e.localName);else for(const a of e._children||e.childNodes)o+=this._serializeNodeNS(a,p,h,r,i);return o+="</"+s+">",o}_serializeDocumentNS(e,t,n,r,i){if(i&&null===e.documentElement)throw new Error("Missing document element (well-formed required).");let o="";for(const s of e._children||e.childNodes)o+=this._serializeNodeNS(s,t,n,r,i);return o}_serializeComment(e,t){if(t&&(!(0,l.xml_isLegalChar)(e.data)||-1!==e.data.indexOf("--")||e.data.endsWith("-")))throw new Error("Comment data contains invalid characters (well-formed required).");return"\x3c!--"+e.data+"--\x3e"}_serializeText(e,t){if(t&&!(0,l.xml_isLegalChar)(e.data))throw new Error("Text data contains invalid characters (well-formed required).");let n="";for(let r=0;r<e.data.length;r++){const t=e.data[r];n+="&"===t?"&amp;":"<"===t?"&lt;":">"===t?"&gt;":t}return n}_serializeDocumentFragmentNS(e,t,n,r,i){let o="";for(const s of e._children||e.childNodes)o+=this._serializeNodeNS(s,t,n,r,i);return o}_serializeDocumentType(e,t){if(t&&!(0,l.xml_isPubidChar)(e.publicId))throw new Error("DocType public identifier does not match PubidChar construct (well-formed required).");if(t&&(!(0,l.xml_isLegalChar)(e.systemId)||-1!==e.systemId.indexOf('"')&&-1!==e.systemId.indexOf("'")))throw new Error("DocType system identifier contains invalid characters (well-formed required).");return e.publicId&&e.systemId?"<!DOCTYPE "+e.name+' PUBLIC "'+e.publicId+'" "'+e.systemId+'">':e.publicId?"<!DOCTYPE "+e.name+' PUBLIC "'+e.publicId+'">':e.systemId?"<!DOCTYPE "+e.name+' SYSTEM "'+e.systemId+'">':"<!DOCTYPE "+e.name+">"}_serializeProcessingInstruction(e,t){if(t&&(-1!==e.target.indexOf(":")||/^xml$/i.test(e.target)))throw new Error("Processing instruction target contains invalid characters (well-formed required).");if(t&&(!(0,l.xml_isLegalChar)(e.data)||-1!==e.data.indexOf("?>")))throw new Error("Processing instruction data contains invalid characters (well-formed required).");return"<?"+(""===e.data?e.target:e.target+" "+e.data)+"?>"}_serializeCData(e,t){if(t&&-1!==e.data.indexOf("]]>"))throw new Error("CDATA contains invalid characters (well-formed required).");return"<![CDATA["+e.data+"]]>"}_serializeAttributesNS(e,t,n,r,o,s){let u="";const c=s?new i.LocalNameSet:void 0;for(const i of e.attributes){if(!o&&!s&&null===i.namespaceURI){u+=" "+i.localName+'="'+this._serializeAttributeValue(i.value,s)+'"';continue}if(s&&c&&c.has(i.namespaceURI,i.localName))throw new Error("Element contains duplicate attributes (well-formed required).");s&&c&&c.set(i.namespaceURI,i.localName);let e=i.namespaceURI,d=null;if(null!==e)if(d=t.get(i.prefix,e),e===a.namespace.XMLNS){if(i.value===a.namespace.XML||null===i.prefix&&o||null!==i.prefix&&(!(i.localName in r)||r[i.localName]!==i.value)&&t.has(i.localName,i.value))continue;if(s&&i.value===a.namespace.XMLNS)throw new Error("XMLNS namespace is reserved (well-formed required).");if(s&&""===i.value)throw new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required).");"xmlns"===i.prefix&&(d="xmlns")}else null===d&&(d=null===i.prefix||t.hasPrefix(i.prefix)&&!t.has(i.prefix,e)?this._generatePrefix(e,t,n):i.prefix,u+=" xmlns:"+d+'="'+this._serializeAttributeValue(e,s)+'"');if(u+=" ",null!==d&&(u+=d+":"),s&&(-1!==i.localName.indexOf(":")||!(0,l.xml_isName)(i.localName)||"xmlns"===i.localName&&null===e))throw new Error("Attribute local name contains invalid characters (well-formed required).");u+=i.localName+'="'+this._serializeAttributeValue(i.value,s)+'"'}return u}_recordNamespaceInformation(e,t,n){let r=null;for(const i of e.attributes){let e=i.namespaceURI,o=i.prefix;if(e===a.namespace.XMLNS){if(null===o){r=i.value;continue}{let e=i.localName,r=i.value;if(r===a.namespace.XML)continue;if(""===r&&(r=null),t.has(e,r))continue;t.set(e,r),n[e]=r||""}}}return r}_generatePrefix(e,t,n){let r="ns"+n.value;return n.value++,t.set(r,e),r}_serializeAttributeValue(e,t){if(t&&null!==e&&!(0,l.xml_isLegalChar)(e))throw new Error("Invalid characters in attribute value.");if(null===e)return"";let n="";for(let r=0;r<e.length;r++){const t=e[r];n+='"'===t?"&quot;":"&"===t?"&amp;":"<"===t?"&lt;":">"===t?"&gt;":t}return n}_serializeElement(e,t){if(t&&(-1!==e.localName.indexOf(":")||!(0,l.xml_isName)(e.localName)))throw new Error("Node local name contains invalid characters (well-formed required).");let n=!1;const r=e.localName;let i="<"+r;if(i+=this._serializeAttributes(e,t),0===e._children.size&&(i+="/",n=!0),i+=">",n)return i;for(const o of e._children)i+=this._serializeNode(o,t);return i+="</"+r+">",i}_serializeDocument(e,t){if(t&&null===e.documentElement)throw new Error("Missing document element (well-formed required).");let n="";for(const r of e._children)n+=this._serializeNode(r,t);return n}_serializeDocumentFragment(e,t){let n="";for(const r of e._children)n+=this._serializeNode(r,t);return n}_serializeAttributes(e,t){let n="";const r=t?{}:void 0;for(const i of e.attributes){if(t&&r&&i.localName in r)throw new Error("Element contains duplicate attributes (well-formed required).");if(t&&r&&(r[i.localName]=!0),t&&(-1!==i.localName.indexOf(":")||!(0,l.xml_isName)(i.localName)))throw new Error("Attribute local name contains invalid characters (well-formed required).");n+=" "+i.localName+'="'+this._serializeAttributeValue(i.value,t)+'"'}return n}}t.XMLSerializerImpl=u},3746:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.XMLSerializer=void 0;var r=n(58725);Object.defineProperty(t,"XMLSerializer",{enumerable:!0,get:function(){return r.XMLSerializerImpl}})},26571:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Cast=void 0;const r=n(52911);class i{static asNode(e){if(r.Guard.isNode(e))return e;throw new Error("Invalid object. Node expected.")}}t.Cast=i},60247:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.EmptySet=void 0;class n{get size(){return 0}add(e){throw new Error("Cannot add to an empty set.")}clear(){}delete(e){return!1}forEach(e,t){}has(e){return!1}[Symbol.iterator](){return new r}entries(){return new r}keys(){return new r}values(){return new r}get[Symbol.toStringTag](){return"EmptySet"}}t.EmptySet=n;class r{[Symbol.iterator](){return this}next(){return{done:!0,value:null}}}},52911:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Guard=void 0;const r=n(50912);class i{static isNode(e){return!!e&&void 0!==e._nodeType}static isDocumentNode(e){return i.isNode(e)&&e._nodeType===r.NodeType.Document}static isDocumentTypeNode(e){return i.isNode(e)&&e._nodeType===r.NodeType.DocumentType}static isDocumentFragmentNode(e){return i.isNode(e)&&e._nodeType===r.NodeType.DocumentFragment}static isAttrNode(e){return i.isNode(e)&&e._nodeType===r.NodeType.Attribute}static isCharacterDataNode(e){if(!i.isNode(e))return!1;const t=e._nodeType;return t===r.NodeType.Text||t===r.NodeType.ProcessingInstruction||t===r.NodeType.Comment||t===r.NodeType.CData}static isTextNode(e){return i.isNode(e)&&(e._nodeType===r.NodeType.Text||e._nodeType===r.NodeType.CData)}static isExclusiveTextNode(e){return i.isNode(e)&&e._nodeType===r.NodeType.Text}static isCDATASectionNode(e){return i.isNode(e)&&e._nodeType===r.NodeType.CData}static isCommentNode(e){return i.isNode(e)&&e._nodeType===r.NodeType.Comment}static isProcessingInstructionNode(e){return i.isNode(e)&&e._nodeType===r.NodeType.ProcessingInstruction}static isElementNode(e){return i.isNode(e)&&e._nodeType===r.NodeType.Element}static isCustomElementNode(e){return i.isElementNode(e)&&"custom"===e._customElementState}static isShadowRoot(e){return!!e&&void 0!==e.host}static isMouseEvent(e){return!!e&&void 0!==e.screenX&&void 0!=e.screenY}static isSlotable(e){return!!e&&void 0!==e._name&&void 0!==e._assignedSlot&&(i.isTextNode(e)||i.isElementNode(e))}static isSlot(e){return!!e&&void 0!==e._name&&void 0!==e._assignedNodes&&i.isElementNode(e)}static isWindow(e){return!!e&&void 0!==e.navigator}static isEventListener(e){return!!e&&void 0!==e.handleEvent}static isRegisteredObserver(e){return!!e&&void 0!==e.observer&&void 0!==e.options}static isTransientRegisteredObserver(e){return!!e&&void 0!==e.source&&i.isRegisteredObserver(e)}}t.Guard=i},25986:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.EmptySet=t.Guard=t.Cast=void 0;var r=n(26571);Object.defineProperty(t,"Cast",{enumerable:!0,get:function(){return r.Cast}});var i=n(52911);Object.defineProperty(t,"Guard",{enumerable:!0,get:function(){return i.Guard}});var o=n(60247);Object.defineProperty(t,"EmptySet",{enumerable:!0,get:function(){return o.EmptySet}})},70096:function(e,t,n){var r=n(1048)["Buffer"];Object.defineProperty(t,"__esModule",{value:!0}),t.forgivingBase64Encode=o,t.forgivingBase64Decode=s;const i=n(95373);function o(e){return r.from(e).toString("base64")}function s(e){return""===e?"":(e=e.replace(i.ASCIIWhiteSpace,""),e.length%4===0&&(e.endsWith("==")?e=e.substr(0,e.length-2):e.endsWith("=")&&(e=e.substr(0,e.length-1))),e.length%4===1?null:/[0-9A-Za-z+/]/.test(e)?r.from(e,"base64").toString("utf8"):null)}},68169:function(e,t){function n(e){return e>=0&&e<=127}Object.defineProperty(t,"__esModule",{value:!0}),t.isASCIIByte=n},79348:function(e,t){function n(e){return e.length}function r(e){for(let t=0;t<e.length;t++){const n=e[t];n>=65&&n<=90&&(e[t]=n+32)}}function i(e){for(let t=0;t<e.length;t++){const n=e[t];n>=97&&n<=122&&(e[t]=n-32)}}function o(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r>=65&&r<=90&&(r+=32),i>=65&&i<=90&&(i+=32),r!==i)return!1}return!0}function s(e,t){let n=0;while(1){if(n>=e.length)return!1;if(n>=t.length)return!0;if(e[n]!==t[n])return!1;n++}}function a(e,t){let n=0;while(1){if(n>=e.length)return!1;if(n>=t.length)return!0;const r=e[n],i=t[n];if(r<i)return!0;if(r>i)return!1;n++}}function l(e){return String.fromCodePoint(...e)}Object.defineProperty(t,"__esModule",{value:!0}),t.length=n,t.byteLowercase=r,t.byteUppercase=i,t.byteCaseInsensitiveMatch=o,t.startsWith=s,t.byteLessThan=a,t.isomorphicDecode=l},95373:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ASCIIAlphanumeric=t.ASCIIAlpha=t.ASCIILowerAlpha=t.ASCIIUpperAlpha=t.ASCIIHexDigit=t.ASCIILowerHexDigit=t.ASCIIUpperHexDigit=t.ASCIIDigit=t.Control=t.C0ControlOrSpace=t.C0Control=t.ASCIIWhiteSpace=t.ASCIITabOrNewLine=t.ASCIICodePoint=t.NonCharacter=t.ScalarValue=t.Surrogate=void 0,t.Surrogate=/[\uD800-\uDFFF]/,t.ScalarValue=/[\uD800-\uDFFF]/,t.NonCharacter=/[\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]/,t.ASCIICodePoint=/[\u0000-\u007F]/,t.ASCIITabOrNewLine=/[\t\n\r]/,t.ASCIIWhiteSpace=/[\t\n\f\r ]/,t.C0Control=/[\u0000-\u001F]/,t.C0ControlOrSpace=/[\u0000-\u001F ]/,t.Control=/[\u0000-\u001F\u007F-\u009F]/,t.ASCIIDigit=/[0-9]/,t.ASCIIUpperHexDigit=/[0-9A-F]/,t.ASCIILowerHexDigit=/[0-9a-f]/,t.ASCIIHexDigit=/[0-9A-Fa-f]/,t.ASCIIUpperAlpha=/[A-Z]/,t.ASCIILowerAlpha=/[a-z]/,t.ASCIIAlpha=/[A-Za-z]/,t.ASCIIAlphanumeric=/[0-9A-Za-z]/},82113:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.parseJSONFromBytes=i,t.serializeJSONToBytes=o,t.parseJSONIntoInfraValues=s,t.convertAJSONDerivedJavaScriptValueToAnInfraValue=a;const r=n(92539);function i(e){const t=(0,r.utf8Decode)(e);return JSON.parse.call(void 0,t)}function o(e){const t=JSON.stringify.call(void 0,e);return(0,r.utf8Encode)(t)}function s(e){const t=JSON.parse.call(void 0,e);return a(t)}function a(e){if(null===e||(0,r.isString)(e)||(0,r.isNumber)(e))return e;if((0,r.isArray)(e)){const t=new Array;for(const n of e)t.push(a(n));return t}if((0,r.isObject)(e)){const t=new Map;for(const n in e)if(e.hasOwnProperty(n)){const r=e[n];t.set(n,a(r))}return t}return e}},53891:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.append=i,t.extend=o,t.prepend=s,t.replace=a,t.insert=l,t.remove=u,t.empty=c,t.contains=d,t.size=h,t.isEmpty=_,t.forEach=m,t.clone=p,t.sortInAscendingOrder=f,t.sortInDescendingOrder=g;const r=n(92539);function i(e,t){e.push(t)}function o(e,t){e.push(...t)}function s(e,t){e.unshift(t)}function a(e,t,n){let i=0;for(const o of e){if((0,r.isFunction)(t))t.call(null,o)&&(e[i]=n);else if(o===t)return void(e[i]=n);i++}}function l(e,t,n){e.splice(n,0,t)}function u(e,t){let n=e.length;while(n--){const i=e[n];if((0,r.isFunction)(t))t.call(null,i)&&e.splice(n,1);else if(i===t)return void e.splice(n,1)}}function c(e){e.length=0}function d(e,t){for(const n of e)if((0,r.isFunction)(t)){if(t.call(null,n))return!0}else if(n===t)return!0;return!1}function h(e,t){if(void 0===t)return e.length;{let n=0;for(const r of e)t.call(null,r)&&n++;return n}}function _(e){return 0===e.length}function*m(e,t){if(void 0===t)yield*e;else for(const n of e)t.call(null,n)&&(yield n)}function p(e){return new Array(...e)}function f(e,t){return e.sort((e,n)=>t.call(null,e,n)?-1:1)}function g(e,t){return e.sort((e,n)=>t.call(null,e,n)?1:-1)}},57357:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.get=i,t.set=o,t.remove=s,t.contains=a,t.keys=l,t.values=u,t.size=c,t.isEmpty=d,t.forEach=h,t.clone=_,t.sortInAscendingOrder=m,t.sortInDescendingOrder=p;const r=n(92539);function i(e,t){return e.get(t)}function o(e,t,n){e.set(t,n)}function s(e,t){if((0,r.isFunction)(t)){const n=[];for(const r of e)t.call(null,r)&&n.push(r[0]);for(const t of n)e.delete(t)}else e.delete(t)}function a(e,t){if((0,r.isFunction)(t)){for(const n of e)if(t.call(null,n))return!0;return!1}return e.has(t)}function l(e){return new Set(e.keys())}function u(e){return[...e.values()]}function c(e,t){if(void 0===t)return e.size;{let n=0;for(const r of e)t.call(null,r)&&n++;return n}}function d(e){return 0===e.size}function*h(e,t){if(void 0===t)yield*e;else for(const n of e)t.call(null,n)&&(yield n)}function _(e){return new Map(e)}function m(e,t){const n=new Array(...e);return n.sort((e,n)=>t.call(null,e,n)?-1:1),new Map(n)}function p(e,t){const n=new Array(...e);return n.sort((e,n)=>t.call(null,e,n)?1:-1),new Map(n)}},11576:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.XLink=t.SVG=t.MathML=t.XMLNS=t.XML=t.HTML=void 0,t.HTML="http://www.w3.org/1999/xhtml",t.XML="http://www.w3.org/XML/1998/namespace",t.XMLNS="http://www.w3.org/2000/xmlns/",t.MathML="http://www.w3.org/1998/Math/MathML",t.SVG="http://www.w3.org/2000/svg",t.XLink="http://www.w3.org/1999/xlink"},54744:function(e,t){function n(e,t){e.push(t)}function r(e){return e.shift()||null}Object.defineProperty(t,"__esModule",{value:!0}),t.enqueue=n,t.dequeue=r},87659:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.append=i,t.extend=o,t.prepend=s,t.replace=a,t.insert=l,t.remove=u,t.empty=c,t.contains=d,t.size=h,t.isEmpty=_,t.forEach=m,t.clone=p,t.sortInAscendingOrder=f,t.sortInDescendingOrder=g,t.isSubsetOf=N,t.isSupersetOf=b,t.intersection=v,t.union=y,t.range=w;const r=n(92539);function i(e,t){e.add(t)}function o(e,t){t.forEach(e.add,e)}function s(e,t){const n=new Set(e);e.clear(),e.add(t),n.forEach(e.add,e)}function a(e,t,n){const i=new Set;for(const o of e)(0,r.isFunction)(t)?t.call(null,o)?i.add(n):i.add(o):o===t?i.add(n):i.add(o);e.clear(),i.forEach(e.add,e)}function l(e,t,n){const r=new Set;let i=0;for(const o of e)i===n&&r.add(t),r.add(o),i++;e.clear(),r.forEach(e.add,e)}function u(e,t){if((0,r.isFunction)(t)){const n=[];for(const r of e)t.call(null,r)&&n.push(r);for(const t of n)e.delete(t)}else e.delete(t)}function c(e){e.clear()}function d(e,t){if(!(0,r.isFunction)(t))return e.has(t);for(const n of e)if(t.call(null,n))return!0;return!1}function h(e,t){if(void 0===t)return e.size;{let n=0;for(const r of e)t.call(null,r)&&n++;return n}}function _(e){return 0===e.size}function*m(e,t){if(void 0===t)yield*e;else for(const n of e)t.call(null,n)&&(yield n)}function p(e){return new Set(e)}function f(e,t){const n=new Array(...e);return n.sort((e,n)=>t.call(null,e,n)?-1:1),new Set(n)}function g(e,t){const n=new Array(...e);return n.sort((e,n)=>t.call(null,e,n)?1:-1),new Set(n)}function N(e,t){for(const n of e)if(!t.has(n))return!1;return!0}function b(e,t){return N(t,e)}function v(e,t){const n=new Set;for(const r of e)t.has(r)&&n.add(r);return n}function y(e,t){const n=new Set(e);return t.forEach(n.add,n),n}function w(e,t){const n=new Set;for(let r=e;r<=t;r++)n.add(r);return n}},99347:function(e,t){function n(e,t){e.push(t)}function r(e){return e.pop()||null}Object.defineProperty(t,"__esModule",{value:!0}),t.push=n,t.pop=r},54798:function(e,t,n){var r=n(4364);Object.defineProperty(t,"__esModule",{value:!0}),t.isCodeUnitPrefix=l,t.isCodeUnitLessThan=u,t.isomorphicEncode=c,t.isASCIIString=d,t.asciiLowercase=h,t.asciiUppercase=_,t.asciiCaseInsensitiveMatch=m,t.asciiEncode=p,t.asciiDecode=f,t.stripNewlines=g,t.normalizeNewlines=N,t.stripLeadingAndTrailingASCIIWhitespace=b,t.stripAndCollapseASCIIWhitespace=v,t.collectASequenceOfCodePoints=y,t.skipASCIIWhitespace=w,t.strictlySplit=T,t.splitAStringOnASCIIWhitespace=E,t.splitAStringOnCommas=S,t.concatenate=x;const i=n(95373),o=n(79348),s=n(68169),a=n(92539);function l(e,t){let n=0;while(1){const r=n<e.length?e.charCodeAt(n):null,i=n<t.length?t.charCodeAt(n):null;if(null===r)return!0;if(r!==i)return!1;n++}}function u(e,t){if(l(t,e))return!1;if(l(e,t))return!0;for(let n=0;n<Math.min(e.length,t.length);n++){const r=e.charCodeAt(n),i=t.charCodeAt(n);if(r!==i)return r<i}return!1}function c(e){const t=Array.from(e),n=new Uint8Array(t.length);let i=0;for(const o of e){const e=o.codePointAt(0);r.assert(void 0!==e&&e<=255,"isomorphicEncode requires string bytes to be less than or equal to 0x00FF."),void 0!==e&&e<=255&&(n[i++]=e)}return n}function d(e){return/^[\u0000-\u007F]*$/.test(e)}function h(e){let t="";for(const n of e){const e=n.codePointAt(0);t+=void 0!==e&&e>=65&&e<=90?String.fromCodePoint(e+32):n}return t}function _(e){let t="";for(const n of e){const e=n.codePointAt(0);t+=void 0!==e&&e>=97&&e<=122?String.fromCodePoint(e-32):n}return t}function m(e,t){return h(e)===h(t)}function p(e){return r.assert(d(e),"asciiEncode requires an ASCII string."),c(e)}function f(e){for(const t of e)r.assert((0,s.isASCIIByte)(t),"asciiDecode requires an ASCII byte sequence.");return(0,o.isomorphicDecode)(e)}function g(e){return e.replace(/[\n\r]/g,"")}function N(e){return e.replace(/\r\n/g,"\n").replace(/\r/g,"\n")}function b(e){return e.replace(/^[\t\n\f\r ]+/,"").replace(/[\t\n\f\r ]+$/,"")}function v(e){return b(e.replace(/[\t\n\f\r ]{2,}/g," "))}function y(e,t,n){if(!(0,a.isArray)(t))return y(e,Array.from(t),n);let r="";while(n.position<t.length&&e.call(null,t[n.position]))r+=t[n.position],n.position++;return r}function w(e,t){y(e=>i.ASCIIWhiteSpace.test(e),e,t)}function T(e,t){if(!(0,a.isArray)(e))return T(Array.from(e),t);const n={position:0},i=[];let o=y(e=>t!==e,e,n);i.push(o);while(n.position<e.length)r.assert(e[n.position]===t,"strictlySplit found no delimiter in input string."),n.position++,o=y(e=>t!==e,e,n),i.push(o);return i}function E(e){if(!(0,a.isArray)(e))return E(Array.from(e));const t={position:0},n=[];w(e,t);while(t.position<e.length){const r=y(e=>!i.ASCIIWhiteSpace.test(e),e,t);n.push(r),w(e,t)}return n}function S(e){if(!(0,a.isArray)(e))return S(Array.from(e));const t={position:0},n=[];while(t.position<e.length){const i=y(e=>","!==e,e,t);n.push(b(i)),t.position<e.length&&(r.assert(","===e[t.position],"splitAStringOnCommas found no delimiter in input string."),t.position++)}return n}function x(e,t=""){return 0===e.length?"":e.join(t)}},88591:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e["default"]=t}),o=this&&this.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var o=e(t),s=0;s<o.length;s++)"default"!==o[s]&&r(n,t,o[s]);return i(n,t),n}}();Object.defineProperty(t,"__esModule",{value:!0}),t.string=t.stack=t.set=t.queue=t.namespace=t.map=t.list=t.json=t.codePoint=t.byteSequence=t.byte=t.base64=void 0;const s=o(n(70096));t.base64=s;const a=o(n(68169));t.byte=a;const l=o(n(79348));t.byteSequence=l;const u=o(n(95373));t.codePoint=u;const c=o(n(82113));t.json=c;const d=o(n(53891));t.list=d;const h=o(n(57357));t.map=h;const _=o(n(11576));t.namespace=_;const m=o(n(54744));t.queue=m;const p=o(n(87659));t.set=p;const f=o(n(99347));t.stack=f;const g=o(n(54798));t.string=g},25800:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.setValidationErrorCallback=p,t.newURL=g,t.isSpecialScheme=N,t.isSpecial=b,t.defaultPort=v,t.includesCredentials=y,t.cannotHaveAUsernamePasswordPort=w,t.urlSerializer=T,t.hostSerializer=E,t.iPv4Serializer=S,t.iPv6Serializer=x,t.urlParser=C,t.basicURLParser=I,t.setTheUsername=O,t.setThePassword=D,t.isSingleDotPathSegment=A,t.isDoubleDotPathSegment=P,t.shorten=L,t.isNormalizedWindowsDriveLetter=M,t.isWindowsDriveLetter=F,t.startsWithAWindowsDriveLetter=k,t.hostParser=R,t.iPv4NumberParser=j,t.iPv4Parser=z,t.iPv6Parser=B,t.opaqueHostParser=G,t.resolveABlobURL=W,t.percentEncode=U,t.percentDecode=q,t.stringPercentDecode=H,t.utf8PercentEncode=X,t.hostEquals=V,t.urlEquals=$,t.urlEncodedStringParser=Y,t.urlEncodedParser=Q,t.urlEncodedByteSerializer=J,t.urlEncodedSerializer=K,t.origin=Z,t.domainToASCII=ee,t.domainToUnicode=te,t.asciiSerializationOfAnOrigin=ne;const r=n(92539),i=n(68650),o=n(88591),s=n(75442);let a;const l={ftp:21,file:null,http:80,https:443,ws:80,wss:443},u=/[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c=/[ "<>`]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,d=/[ "<>`#?{}]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,h=/[ "<>`#?{}/:;=@\[\]\\\^\|]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_=/[0-9A-Za-z!\$&-\/:;=\?@_~\xA0-\uD7FF\uE000-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB40-\uDB7E\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDC00-\uDFFD]/,m=/[\0\t\f\r #%/:?@\[\\\]]/;function p(e){a=e}function f(e){void 0!==a&&a.call(null,"Validation Error: "+e)}function g(){return{scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,_cannotBeABaseURLFlag:!1,_blobURLEntry:null}}function N(e){return e in l}function b(e){return N(e.scheme)}function v(e){return l[e]||null}function y(e){return""!==e.username||""!==e.password}function w(e){return null===e.host||""===e.host||e._cannotBeABaseURLFlag||"file"===e.scheme}function T(e,t=!1){let n=e.scheme+":";if(null!==e.host?(n+="//",y(e)&&(n+=e.username,""!==e.password&&(n+=":"+e.password),n+="@"),n+=E(e.host),null!==e.port&&(n+=":"+e.port)):null===e.host&&"file"===e.scheme&&(n+="//"),e._cannotBeABaseURLFlag)n+=e.path[0];else for(const r of e.path)n+="/"+r;return null!==e.query&&(n+="?"+e.query),t||null===e.fragment||(n+="#"+e.fragment),n}function E(e){return(0,r.isNumber)(e)?S(e):(0,r.isArray)(e)?"["+x(e)+"]":e}function S(e){let t="",n=e;for(let r=1;r<=4;r++)t=(n%256).toString()+t,4!==r&&(t="."+t),n=Math.floor(n/256);return t}function x(e){let t="",n=null,r=-1,i=0,o=0;for(let a=0;a<8;a++)if(0===e[a]){i=1;for(let t=a+1;t<8;t++){if(0!==e[t])break;i++}i>o&&(o=i,r=a)}o>1&&(n=r);let s=!1;for(let a=0;a<8;a++)s&&0===e[a]||(s&&(s=!1),n!==a?(t+=e[a].toString(16),7!==a&&(t+=":")):(t+=0===a?"::":":",s=!0));return t}function C(e,t,n){const r=I(e,t,n);if(null===r)return null;if("blob"!==r.scheme)return r;const i=W(r);return r._blobURLEntry=null!==i?i:null,r}function I(e,t,n,s,a){if(void 0===s){s=g();const t=/^[\u0000-\u001F\u0020]+/,n=/[\u0000-\u001F\u0020]+$/;(t.test(e)||n.test(e))&&f("Input string contains leading or trailing control characters or space."),e=e.replace(t,""),e=e.replace(n,"")}const l=/[\u0009\u000A\u000D]/g;l.test(e)&&f("Input string contains tab or newline characters."),e=e.replace(l,"");let m=void 0===a?i.ParserState.SchemeStart:a;void 0===t&&(t=null);let p=void 0===n||"replacement"===n||"UTF-16BE"===n||"UTF-16LE"===n?"UTF-8":n,w="",T=!1,E=!1,S=!1;const x="",C=new r.StringWalker(e);while(1){switch(m){case i.ParserState.SchemeStart:if(o.codePoint.ASCIIAlpha.test(C.c()))w+=C.c().toLowerCase(),m=i.ParserState.Scheme;else{if(void 0!==a)return f("Invalid scheme start character."),null;m=i.ParserState.NoScheme,C.pointer--}break;case i.ParserState.Scheme:if(o.codePoint.ASCIIAlphanumeric.test(C.c())||"+"===C.c()||"-"===C.c()||"."===C.c())w+=C.c().toLowerCase();else{if(":"!==C.c()){if(void 0===a){w="",m=i.ParserState.NoScheme,C.pointer=0;continue}return f("Invalid input string."),null}if(void 0!==a){if(N(s.scheme)&&!N(w))return s;if(!N(s.scheme)&&N(w))return s;if((y(s)||null!==s.port)&&"file"===w)return s;if("file"===s.scheme&&(""===s.host||null===s.host))return s}if(s.scheme=w,void 0!==a)return s.port===v(s.scheme)&&(s.port=null),s;w="","file"===s.scheme?(C.remaining().startsWith("//")||f("Invalid file URL scheme, '//' expected."),m=i.ParserState.File):b(s)&&null!==t&&t.scheme===s.scheme?m=i.ParserState.SpecialRelativeOrAuthority:b(s)?m=i.ParserState.SpecialAuthoritySlashes:C.remaining().startsWith("/")?(m=i.ParserState.PathOrAuthority,C.pointer++):(s._cannotBeABaseURLFlag=!0,s.path.push(""),m=i.ParserState.CannotBeABaseURLPath)}break;case i.ParserState.NoScheme:if(null===t||t._cannotBeABaseURLFlag&&"#"!==C.c())return f("Invalid input string."),null;t._cannotBeABaseURLFlag&&"#"===C.c()?(s.scheme=t.scheme,s.path=o.list.clone(t.path),s.query=t.query,s.fragment="",s._cannotBeABaseURLFlag=!0,m=i.ParserState.Fragment):"file"!==t.scheme?(m=i.ParserState.Relative,C.pointer--):(m=i.ParserState.File,C.pointer--);break;case i.ParserState.SpecialRelativeOrAuthority:"/"===C.c()&&C.remaining().startsWith("/")?(m=i.ParserState.SpecialAuthorityIgnoreSlashes,C.pointer++):(f("Invalid input string."),m=i.ParserState.Relative,C.pointer--);break;case i.ParserState.PathOrAuthority:"/"===C.c()?m=i.ParserState.Authority:(m=i.ParserState.Path,C.pointer--);break;case i.ParserState.Relative:if(null===t)throw new Error("Invalid parser state. Base URL is null.");switch(s.scheme=t.scheme,C.c()){case x:s.username=t.username,s.password=t.password,s.host=t.host,s.port=t.port,s.path=o.list.clone(t.path),s.query=t.query;break;case"/":m=i.ParserState.RelativeSlash;break;case"?":s.username=t.username,s.password=t.password,s.host=t.host,s.port=t.port,s.path=o.list.clone(t.path),s.query="",m=i.ParserState.Query;break;case"#":s.username=t.username,s.password=t.password,s.host=t.host,s.port=t.port,s.path=o.list.clone(t.path),s.query=t.query,s.fragment="",m=i.ParserState.Fragment;break;default:b(s)&&"\\"===C.c()?(f("Invalid input string."),m=i.ParserState.RelativeSlash):(s.username=t.username,s.password=t.password,s.host=t.host,s.port=t.port,s.path=o.list.clone(t.path),0!==s.path.length&&s.path.splice(s.path.length-1,1),m=i.ParserState.Path,C.pointer--);break}break;case i.ParserState.RelativeSlash:if(!b(s)||"/"!==C.c()&&"\\"!==C.c())if("/"===C.c())m=i.ParserState.Authority;else{if(null===t)throw new Error("Invalid parser state. Base URL is null.");s.username=t.username,s.password=t.password,s.host=t.host,s.port=t.port,m=i.ParserState.Path,C.pointer--}else"\\"===C.c()&&f("Invalid input string."),m=i.ParserState.SpecialAuthorityIgnoreSlashes;break;case i.ParserState.SpecialAuthoritySlashes:"/"===C.c()&&C.remaining().startsWith("/")?(m=i.ParserState.SpecialAuthorityIgnoreSlashes,C.pointer++):(f("Expected '//'."),m=i.ParserState.SpecialAuthorityIgnoreSlashes,C.pointer--);break;case i.ParserState.SpecialAuthorityIgnoreSlashes:"/"!==C.c()&&"\\"!==C.c()?(m=i.ParserState.Authority,C.pointer--):f("Unexpected '/' or '\\'.");break;case i.ParserState.Authority:if("@"===C.c()){f("Unexpected '@'."),T&&(w="%40"+w),T=!0;for(const e of w){if(":"===e&&!S){S=!0;continue}const t=X(e,h);S?s.password+=t:s.username+=t}w=""}else if(C.c()===x||"/"===C.c()||"?"===C.c()||"#"===C.c()||b(s)&&"\\"===C.c()){if(T&&""===w)return f("Invalid input string."),null;C.pointer-=w.length+1,w="",m=i.ParserState.Host}else w+=C.c();break;case i.ParserState.Host:case i.ParserState.Hostname:if(void 0!==a&&"file"===s.scheme)C.pointer--,m=i.ParserState.FileHost;else if(":"!==C.c()||E)if(C.c()===x||"/"===C.c()||"?"===C.c()||"#"===C.c()||b(s)&&"\\"===C.c()){if(C.pointer--,b(s)&&""===w)return f("Invalid input string."),null;if(void 0!==a&&""===w&&(y(s)||null!==s.port))return f("Invalid input string."),s;const e=R(w,!b(s));if(null===e)return null;if(s.host=e,w="",m=i.ParserState.PathStart,void 0!==a)return s}else"["===C.c()&&(E=!0),"]"===C.c()&&(E=!1),w+=C.c();else{if(""===w)return f("Invalid input string."),null;const e=R(w,!b(s));if(null===e)return null;if(s.host=e,w="",m=i.ParserState.Port,a===i.ParserState.Hostname)return s}break;case i.ParserState.Port:if(o.codePoint.ASCIIDigit.test(C.c()))w+=C.c();else{if(!(C.c()===x||"/"===C.c()||"?"===C.c()||"#"===C.c()||b(s)&&"\\"===C.c()||a))return f("Invalid input string."),null;if(""!==w&&""!==w){const e=parseInt(w,10);if(e>Math.pow(2,16)-1)return f("Invalid port number."),null;s.port=e===v(s.scheme)?null:e,w=""}if(void 0!==a)return s;m=i.ParserState.PathStart,C.pointer--}break;case i.ParserState.File:if(s.scheme="file","/"===C.c()||"\\"===C.c())"\\"===C.c()&&f("Invalid input string."),m=i.ParserState.FileSlash;else if(null!==t&&"file"===t.scheme)switch(C.c()){case x:s.host=t.host,s.path=o.list.clone(t.path),s.query=t.query;break;case"?":s.host=t.host,s.path=o.list.clone(t.path),s.query="",m=i.ParserState.Query;break;case"#":s.host=t.host,s.path=o.list.clone(t.path),s.query=t.query,s.fragment="",m=i.ParserState.Fragment;break;default:k(C.substring())?f("Unexpected windows drive letter in input string."):(s.host=t.host,s.path=o.list.clone(t.path),L(s)),m=i.ParserState.Path,C.pointer--;break}else m=i.ParserState.Path,C.pointer--;break;case i.ParserState.FileSlash:"/"===C.c()||"\\"===C.c()?("\\"===C.c()&&f("Invalid input string."),m=i.ParserState.FileHost):(null===t||"file"!==t.scheme||k(C.substring())||(M(t.path[0])?s.path.push(t.path[0]):s.host=t.host),m=i.ParserState.Path,C.pointer--);break;case i.ParserState.FileHost:if(C.c()===x||"/"===C.c()||"\\"===C.c()||"?"===C.c()||"#"===C.c())if(C.pointer--,void 0===a&&F(w))f("Unexpected windows drive letter in input string."),m=i.ParserState.Path;else if(""===w){if(s.host="",void 0!==a)return s;m=i.ParserState.PathStart}else{let e=R(w,!b(s));if(null===e)return null;if("localhost"===e&&(e=""),s.host=e,void 0!==a)return s;w="",m=i.ParserState.PathStart}else w+=C.c();break;case i.ParserState.PathStart:b(s)?("\\"===C.c()&&f("Invalid input string."),m=i.ParserState.Path,"/"!==C.c()&&"\\"!==C.c()&&C.pointer--):void 0===a&&"?"===C.c()?(s.query="",m=i.ParserState.Query):void 0===a&&"#"===C.c()?(s.fragment="",m=i.ParserState.Fragment):C.c()!==x&&(m=i.ParserState.Path,"/"!==C.c()&&C.pointer--);break;case i.ParserState.Path:if(C.c()===x||"/"===C.c()||b(s)&&"\\"===C.c()||void 0===a&&("?"===C.c()||"#"===C.c())){if(b(s)&&"\\"===C.c()&&f("Invalid input string."),P(w))L(s),"/"===C.c()||b(s)&&"\\"===C.c()||s.path.push("");else if(!A(w)||"/"===C.c()||b(s)&&"\\"===C.c()){if(!A(w)){if("file"===s.scheme&&0===s.path.length&&F(w)){null!==s.host&&""!==s.host&&(f("Invalid input string."),s.host="");const e=Array.from(w);w=e.slice(0,1)+":"+e.slice(2)}s.path.push(w)}}else s.path.push("");if(w="","file"===s.scheme&&(C.c()===x||"?"===C.c()||"#"===C.c()))while(s.path.length>1&&""===s.path[0])f("Invalid input string."),s.path.splice(0,1);"?"===C.c()&&(s.query="",m=i.ParserState.Query),"#"===C.c()&&(s.fragment="",m=i.ParserState.Fragment)}else _.test(C.c())||"%"===C.c()||f("Character is not a URL code point or a percent encoded character."),"%"!==C.c()||/^[0-9a-fA-F][0-9a-fA-F]/.test(C.remaining())||f("Percent encoded character must be followed by two hex digits."),w+=X(C.c(),d);break;case i.ParserState.CannotBeABaseURLPath:"?"===C.c()?(s.query="",m=i.ParserState.Query):"#"===C.c()?(s.fragment="",m=i.ParserState.Fragment):(C.c()===x||_.test(C.c())||"%"===C.c()||f("Character is not a URL code point or a percent encoded character."),"%"!==C.c()||/^[0-9a-fA-F][0-9a-fA-F]/.test(C.remaining())||f("Percent encoded character must be followed by two hex digits."),C.c()!==x&&(s.path[0]+=X(C.c(),u)));break;case i.ParserState.Query:if("UTF-8"===p||b(s)&&"ws"!==s.scheme&&"wss"!==s.scheme||(p="UTF-8"),void 0===a&&"#"===C.c())s.fragment="",m=i.ParserState.Fragment;else if(C.c()!==x){if(_.test(C.c())||"%"===C.c()||f("Character is not a URL code point or a percent encoded character."),"%"!==C.c()||/^[0-9a-fA-F][0-9a-fA-F]/.test(C.remaining())||f("Percent encoded character must be followed by two hex digits."),"UTF-8"!==p.toUpperCase())throw new Error("Only UTF-8 encoding is supported.");let e=(0,r.utf8Encode)(C.c());if(e.length>=3&&38===e[0]&&35===e[1]&&59===e[e.length-1])e=e.subarray(2,e.length-1),s.query+="%26%23"+o.byteSequence.isomorphicDecode(e)+"%3B";else for(const t of e)t<33||t>126||34===t||35===t||60===t||62===t||39===t&&b(s)?s.query+=U(t):s.query+=String.fromCharCode(t)}break;case i.ParserState.Fragment:C.c()===x||("\0"===C.c()?f("NULL character in input string."):(_.test(C.c())||"%"===C.c()||f("Unexpected character in fragment string."),"%"!==C.c()||/^[A-Za-z0-9][A-Za-z0-9]/.test(C.remaining())||f("Unexpected character in fragment string."),s.fragment+=X(C.c(),c)));break}if(C.eof)break;C.pointer++}return s}function O(e,t){let n="";for(const r of t)n+=X(r,h);e.username=n}function D(e,t){let n="";for(const r of t)n+=X(r,h);e.password=n}function A(e){return"."===e||"%2e"===e.toLowerCase()}function P(e){const t=e.toLowerCase();return".."===t||".%2e"===t||"%2e."===t||"%2e%2e"===t}function L(e){const t=e.path;0!==t.length&&("file"===e.scheme&&1===t.length&&M(t[0])||e.path.splice(e.path.length-1,1))}function M(e){return e.length>=2&&o.codePoint.ASCIIAlpha.test(e[0])&&":"===e[1]}function F(e){return e.length>=2&&o.codePoint.ASCIIAlpha.test(e[0])&&(":"===e[1]||"|"===e[1])}function k(e){return e.length>=2&&F(e)&&(2===e.length||"/"===e[2]||"\\"===e[2]||"?"===e[2]||"#"===e[2])}function R(e,t=!1){if(e.startsWith("["))return e.endsWith("]")?B(e.substring(1,e.length-1)):(f("Expected ']' after '['."),null);if(t)return G(e);const n=(0,r.utf8Decode)(H(e)),i=ee(n);if(null===i)return f("Invalid domain."),null;if(m.test(i))return f("Invalid domain."),null;const o=z(i);return null===o||(0,r.isNumber)(o)?o:i}function j(e,t={value:!1}){let n=10;if(e.startsWith("0x")||e.startsWith("0X")?(t.value=!0,e=e.substr(2),n=16):e.length>=2&&"0"===e[0]&&(t.value=!0,e=e.substr(1),n=8),""===e)return 0;const r=10===n?/^[0-9]+$/:16===n?/^[0-9A-Fa-f]+$/:/^[0-7]+$/;return r.test(e)?parseInt(e,n):null}function z(e){const t={value:!1},n=e.split(".");if(""===n[n.length-1]&&(t.value=!0,n.length>1&&n.pop()),n.length>4)return e;const r=[];for(const s of n){if(""===s)return e;const n=j(s,t);if(null===n)return e;r.push(n)}t.value&&f("Invalid IP v4 address.");for(let s=0;s<r.length;s++){const e=r[s];if(e>255&&(f("Invalid IP v4 address."),s<r.length-1))return null}if(r[r.length-1]>=Math.pow(256,5-r.length))return f("Invalid IP v4 address."),null;let i=r[r.length-1];r.pop();let o=0;for(const s of r)i+=s*Math.pow(256,3-o),o++;return i}function B(e){const t="",n=[0,0,0,0,0,0,0,0];let i=0,s=null;const a=new r.StringWalker(e);if(":"===a.c()){if(!a.remaining().startsWith(":"))return f("Invalid IP v6 address."),null;a.pointer+=2,i+=1,s=i}while(a.c()!==t){if(8===i)return f("Invalid IP v6 address."),null;if(":"===a.c()){if(null!==s)return f("Invalid IP v6 address."),null;a.pointer++,i++,s=i;continue}let e=0,r=0;while(r<4&&o.codePoint.ASCIIHexDigit.test(a.c()))e=16*e+parseInt(a.c(),16),a.pointer++,r++;if("."===a.c()){if(0===r)return f("Invalid IP v6 address."),null;if(a.pointer-=r,i>6)return f("Invalid IP v6 address."),null;let e=0;while(a.c()!==t){let t=null;if(e>0){if(!("."===a.c()&&e<4))return f("Invalid IP v6 address."),null;a.pointer++}if(!o.codePoint.ASCIIDigit.test(a.c()))return f("Invalid IP v6 address."),null;while(o.codePoint.ASCIIDigit.test(a.c())){const e=parseInt(a.c(),10);if(null===t)t=e;else{if(0===t)return f("Invalid IP v6 address."),null;t=10*t+e}if(t>255)return f("Invalid IP v6 address."),null;a.pointer++}if(null===t)return f("Invalid IP v6 address."),null;n[i]=256*n[i]+t,e++,2!==e&&4!==e||i++}if(4!==e)return f("Invalid IP v6 address."),null;break}if(":"===a.c()){if(a.pointer++,a.c()===t)return f("Invalid IP v6 address."),null}else if(a.c()!==t)return f("Invalid IP v6 address."),null;n[i]=e,i++}if(null!==s){let e=i-s;i=7;while(0!==i&&e>0)[n[i],n[s+e-1]]=[n[s+e-1],n[i]],i--,e--}else if(null===s&&8!==i)return f("Invalid IP v6 address."),null;return n}function G(e){const t=/[\x00\t\f\r #/:?@\[\\\]]/;if(t.test(e))return f("Invalid host string."),null;let n="";for(const r of e)n+=X(r,u);return n}function W(e){return null}function U(e){return"%"+("00"+e.toString(16).toUpperCase()).slice(-2)}function q(e){const t=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,n=new Uint8Array(e.length);let i=0;for(let o=0;o<e.length;o++){const s=e[o];if(37!==s)n[i]=s,i++;else if(37===s&&o>=e.length-2)n[i]=s,i++;else if(37!==s||t(e[o+1])&&t(e[o+2])){const t=parseInt((0,r.utf8Decode)(Uint8Array.of(e[o+1],e[o+2])),16);n[i]=t,i++,o+=2}else n[i]=s,i++}return n.subarray(0,i)}function H(e){return q((0,r.utf8Encode)(e))}function X(e,t){if(!t.test(e))return e;const n=(0,r.utf8Encode)(e);let i="";for(const r of n)i+=U(r);return i}function V(e,t){return e===t}function $(e,t,n=!1){return T(e,n)===T(t,n)}function Y(e){return Q((0,r.utf8Encode)(e))}function Q(e){const t=[];let n=[];for(const r of e)38===r?(t.push(Uint8Array.from(n)),n=[]):n.push(r);0!==n.length&&t.push(Uint8Array.from(n));const i=[];for(const o of t){if(0===o.length)continue;const e=o.indexOf(61),t=-1!==e?o.slice(0,e):o,n=-1!==e?o.slice(e+1):new Uint8Array;for(let r=0;r<t.length;r++)43===t[r]&&(t[r]=32);for(let r=0;r<n.length;r++)43===n[r]&&(n[r]=32);const s=(0,r.utf8Decode)(t),a=(0,r.utf8Decode)(n);i.push([s,a])}return i}function J(e){let t="";for(const n of e)t+=32===n?"+":42===n||45===n||46===n||n>=48&&n<=57||n>=65&&n<=90||95===n||n>=97&&n<=122?String.fromCodePoint(n):U(n);return t}function K(e,t){const n=void 0===t||"replacement"===t||"UTF-16BE"===t||"UTF-16LE"===t?"UTF-8":t;if("UTF-8"!==n.toUpperCase())throw new Error("Only UTF-8 encoding is supported.");let i="";for(const o of e){const e=J((0,r.utf8Encode)(o[0]));let t=o[1];t=J((0,r.utf8Encode)(t)),""!==i&&(i+="&"),i+=e+"="+t}return i}function Z(e){switch(e.scheme){case"blob":e._blobURLEntry;const t=I(e.path[0]);return null===t?i.OpaqueOrigin:Z(t);case"ftp":case"http":case"https":case"ws":case"wss":return[e.scheme,null===e.host?"":e.host,e.port,null];case"file":return i.OpaqueOrigin;default:return i.OpaqueOrigin}}function ee(e,t=!1){const n=(0,s.domainToASCII)(e);return""===n?(f("Invalid domain name."),null):n}function te(e,t=!1){const n=(0,s.domainToUnicode)(e);return""===n&&f("Invalid domain name."),n}function ne(e){if(""===e[0]&&""===e[1]&&null===e[2]&&null===e[3])return"null";let t=e[0]+"://"+E(e[1]);return null!==e[2]&&(t+=":"+e[2].toString()),t}},68650:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.OpaqueOrigin=t.ParserState=void 0,function(e){e[e["SchemeStart"]=0]="SchemeStart",e[e["Scheme"]=1]="Scheme",e[e["NoScheme"]=2]="NoScheme",e[e["SpecialRelativeOrAuthority"]=3]="SpecialRelativeOrAuthority",e[e["PathOrAuthority"]=4]="PathOrAuthority",e[e["Relative"]=5]="Relative",e[e["RelativeSlash"]=6]="RelativeSlash",e[e["SpecialAuthoritySlashes"]=7]="SpecialAuthoritySlashes",e[e["SpecialAuthorityIgnoreSlashes"]=8]="SpecialAuthorityIgnoreSlashes",e[e["Authority"]=9]="Authority",e[e["Host"]=10]="Host",e[e["Hostname"]=11]="Hostname",e[e["Port"]=12]="Port",e[e["File"]=13]="File",e[e["FileSlash"]=14]="FileSlash",e[e["FileHost"]=15]="FileHost",e[e["PathStart"]=16]="PathStart",e[e["Path"]=17]="Path",e[e["CannotBeABaseURLPath"]=18]="CannotBeABaseURLPath",e[e["Query"]=19]="Query",e[e["Fragment"]=20]="Fragment"}(n||(t.ParserState=n={})),t.OpaqueOrigin=["","",null,null]},48416:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CompareCache=void 0;class n{_limit;_items=new Map;constructor(e=1e3){this._limit=e}check(e,t){if(this._items.get(e)===t)return!0;if(this._items.get(t)===e)return!1;const n=Math.random()<.5;if(n?this._items.set(e,t):this._items.set(t,e),this._items.size>this._limit){const e=this._items.keys().next();e.done||this._items.delete(e.value)}return n}}t.CompareCache=n},74930:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.FixedSizeSet=void 0;class n{_limit;_items=new Set;constructor(e=1e3){this._limit=e}add(e){if(this._items.add(e),this._items.size>this._limit){const e=this._items.values().next();e.done||this._items.delete(e.value)}return this}delete(e){return this._items.delete(e)}has(e){return this._items.has(e)}clear(){this._items.clear()}get size(){return this._items.size}forEach(e,t){this._items.forEach(n=>e.call(t,n,n,this))}*keys(){yield*this._items.keys()}*values(){yield*this._items.values()}*entries(){yield*this._items.entries()}*[Symbol.iterator](){yield*this._items}get[Symbol.toStringTag](){return"FixedSizeSet"}}t.FixedSizeSet=n},84853:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Lazy=void 0;class n{_initialized=!1;_initFunc;_value;constructor(e){this._value=void 0,this._initFunc=e}get value(){return this._initialized||(this._value=this._initFunc(),this._initialized=!0),this._value}}t.Lazy=n},24400:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectCache=void 0;class n{_limit;_items=new Map;constructor(e=1e3){this._limit=e}get(e){return this._items.get(e)}set(e,t){if(this._items.set(e,t),this._items.size>this._limit){const e=this._items.keys().next();e.done||this._items.delete(e.value)}}delete(e){return this._items.delete(e)}has(e){return this._items.has(e)}clear(){this._items.clear()}get size(){return this._items.size}forEach(e,t){this._items.forEach((n,r)=>e.call(t,r,n))}*keys(){yield*this._items.keys()}*values(){yield*this._items.values()}*entries(){yield*this._items.entries()}*[Symbol.iterator](){yield*this._items}get[Symbol.toStringTag](){return"ObjectCache"}}t.ObjectCache=n},71728:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StringWalker=void 0;class n{_chars;_length;_pointer=0;_codePoint;_c;_remaining;_substring;constructor(e){this._chars=Array.from(e),this._length=this._chars.length}get eof(){return this._pointer>=this._length}get length(){return this._length}codePoint(){if(void 0===this._codePoint)if(this.eof)this._codePoint=-1;else{const e=this._chars[this._pointer].codePointAt(0);this._codePoint=void 0!==e?e:-1}return this._codePoint}c(){return void 0===this._c&&(this._c=this.eof?"":this._chars[this._pointer]),this._c}remaining(){return void 0===this._remaining&&(this._remaining=this.eof?"":this._chars.slice(this._pointer+1).join("")),this._remaining}substring(){return void 0===this._substring&&(this._substring=this.eof?"":this._chars.slice(this._pointer).join("")),this._substring}get pointer(){return this._pointer}set pointer(e){e!==this._pointer&&(this._pointer=e,this._codePoint=void 0,this._c=void 0,this._remaining=void 0,this._substring=void 0)}}t.StringWalker=n},92539:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.StringWalker=t.Lazy=t.CompareCache=t.ObjectCache=t.FixedSizeSet=void 0,t.applyMixin=l,t.applyDefaults=u,t.forEachArray=c,t.forEachObject=d,t.arrayLength=h,t.objectLength=_,t.getObjectValue=m,t.removeObjectValue=p,t.clone=f,t.isBoolean=g,t.isNumber=N,t.isString=b,t.isFunction=v,t.isObject=y,t.isArray=w,t.isSet=T,t.isMap=E,t.isEmpty=S,t.isPlainObject=x,t.isIterable=C,t.getValue=I,t.utf8Encode=O,t.utf8Decode=D;var r=n(74930);Object.defineProperty(t,"FixedSizeSet",{enumerable:!0,get:function(){return r.FixedSizeSet}});var i=n(24400);Object.defineProperty(t,"ObjectCache",{enumerable:!0,get:function(){return i.ObjectCache}});var o=n(48416);Object.defineProperty(t,"CompareCache",{enumerable:!0,get:function(){return o.CompareCache}});var s=n(84853);Object.defineProperty(t,"Lazy",{enumerable:!0,get:function(){return s.Lazy}});var a=n(71728);function l(e,t,...n){Object.getOwnPropertyNames(t.prototype).forEach(r=>{if("constructor"!==r){if(-1!==n.indexOf(r)){const t=Object.getOwnPropertyDescriptor(e.prototype,r);t&&Object.defineProperty(e.prototype,"_"+r,t)}const i=Object.getOwnPropertyDescriptor(t.prototype,r);i&&Object.defineProperty(e.prototype,r,i)}})}function u(e,t,n=!1){const r=f(e||{});return d(t,(e,t)=>{x(t)?r[e]=u(r[e],t,n):(n||void 0===r[e])&&(r[e]=t)}),r}function c(e,t,n){e.forEach(t,n)}function d(e,t,n){if(E(e))e.forEach((e,r)=>t.call(n,r,e));else for(const r in e)e.hasOwnProperty(r)&&t.call(n,r,e[r])}function h(e){return T(e)?e.size:e.length}function _(e){return E(e)?e.size:Object.keys(e).length}function m(e,t){return E(e)?e.get(t):e[t]}function p(e,t){E(e)?e.delete(t):delete e[t]}function f(e){if(v(e))return e;if(w(e)){const t=[];for(const n of e)t.push(f(n));return t}if(x(e)){const t={};for(const n in e)if(e.hasOwnProperty(n)){const r=e[n];t[n]=f(r)}return t}return e}function g(e){return"boolean"===typeof e}function N(e){return"number"===typeof e}function b(e){return"string"===typeof e}function v(e){return!!e&&"function"===typeof e}function y(e){const t=typeof e;return!!e&&("function"===t||"object"===t)}function w(e){return Array.isArray(e)}function T(e){return e instanceof Set}function E(e){return e instanceof Map}function S(e){if(w(e))return!e.length;if(T(e))return!e.size;if(E(e))return!e.size;if(y(e)){for(const t in e)if(e.hasOwnProperty(t))return!1;return!0}return!1}function x(e){if(y(e)){const t=Object.getPrototypeOf(e),n=t.constructor;return t&&n&&"function"===typeof n&&n instanceof n&&Function.prototype.toString.call(n)===Function.prototype.toString.call(Object)}return!1}function C(e){return e&&"function"===typeof e[Symbol.iterator]}function I(e){return v(e.valueOf)?e.valueOf():e}function O(e){const t=new Uint8Array(4*e.length);let n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(i<128)t[n++]=i;else{if(i<2048)t[n++]=i>>6|192;else{if(i>55295&&i<56320){if(++r>=e.length)throw new Error("Incomplete surrogate pair.");const o=e.charCodeAt(r);if(o<56320||o>57343)throw new Error("Invalid surrogate character.");i=65536+((1023&i)<<10)+(1023&o),t[n++]=i>>18|240,t[n++]=i>>12&63|128}else t[n++]=i>>12|224;t[n++]=i>>6&63|128}t[n++]=63&i|128}}return t.subarray(0,n)}function D(e){let t="",n=0;while(n<e.length){var r=e[n++];if(r>127)if(r>191&&r<224){if(n>=e.length)throw new Error("Incomplete 2-byte sequence.");r=(31&r)<<6|63&e[n++]}else if(r>223&&r<240){if(n+1>=e.length)throw new Error("Incomplete 3-byte sequence.");r=(15&r)<<12|(63&e[n++])<<6|63&e[n++]}else{if(!(r>239&&r<248))throw new Error("Unknown multi-byte start.");if(n+2>=e.length)throw new Error("Incomplete 4-byte sequence.");r=(7&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++]}if(r<=65535)t+=String.fromCharCode(r);else{if(!(r<=1114111))throw new Error("Code point exceeds UTF-16 limit.");r-=65536,t+=String.fromCharCode(r>>10|55296),t+=String.fromCharCode(1023&r|56320)}}return t}Object.defineProperty(t,"StringWalker",{enumerable:!0,get:function(){return a.StringWalker}})},71026:function(e,t,n){n.d(t,{generateXCCDFPerNode:function(){return D}});var r=n(60500);const i="http://checklists.nist.gov/xccdf/1.2",o="xccdf_compliance-operator",s="benchmark_kubernetes",a="testresult_1",l="urn:xccdf:scoring:default",u="urn:xccdf:check:manual",c="not-applicable",d=e=>e&&e.length>0?e:c,h=e=>e.replace(/ /g,"_"),_=e=>`${o}_rule_${h(e)}`,m=e=>`${_(e)}_fix`,p=e=>`${o}_profile_${h(e)}`,f=e=>{const t=e.split("-");return t.length>=2?`${t[0]}-${t[1]}`:e},g=(e,t)=>{if(!e.ruleId)return _(t);const n=f(t);if(t===n)return e.ruleId;const r=t.startsWith(`${n}-`)?t.slice(n.length+1):t;return`${e.ruleId}_${r}`},N=(e,t)=>e[f(t)]||{},b=e=>{switch((e||"").toLowerCase()){case"pass":return"pass";case"fail":return"fail";case"skip":return"notselected";case"notapplicable":return"notapplicable";case"warn":return"informational";default:return"informational"}},v=e=>e?"medium":"low",y=(e,t)=>e||v(t),w=e=>e?"10":"0",T=e=>e?"full":"unscored",E=e=>e&&0!==e.length?e.map(e=>({system:"http://cyber.mil/cci",value:e})):[{system:c,value:c}],S=e=>{const t=new Set,n=[],r=e.nodes||{};return Object.values(r).forEach(e=>{(e||[]).forEach(e=>{t.has(e)||(t.add(e),n.push(e))})}),n.length>0?n:[c]},x=e=>e&&e.length>0?e:[c],C=e=>e&&e.length>0?e:[{name:c,type:"string",value:c}];function I({report:e,benchmarkVersion:t,metadata:n={},stigChecks:h={},targetAddresses:_,targetFacts:f,clusterName:v,testResultId:I}){const O=new Date,D=O.toISOString().replace(/\.\d{3}Z$/,"Z"),A=D.slice(0,10),P=n.benchmarkId||`${o}_${s}`,L=n.title||`Kubernetes CIS Benchmark ${t}`,M=(0,r.vt)({version:"1.0",encoding:"UTF-8"}),F=M.ele("Benchmark",{xmlns:i,id:P,resolved:"1","xml:lang":"en",style:""});F.ele("status",{date:A}).txt("complete"),F.ele("title").txt(L),F.ele("description").txt(d(n.description)),F.ele("notice",{id:d(n.noticeId)}).txt(d(n.notice)),F.ele("front-matter").txt(d(n.frontMatter)),F.ele("rear-matter").txt(d(n.rearMatter));const k=F.ele("reference",{href:d(n.referenceHref)});k.ele("publisher").txt(d(n.publisher)),k.ele("source").txt(d(n.source)),F.ele("plain-text",{id:d(n.plainTextId)}).txt(d(n.plainText)),F.ele("platform",{idref:d(n.platform)}),F.ele("version").txt(d(e.version));const R=F.ele("metadata");R.ele("creator").txt(d(n.creator)),R.ele("publisher").txt(d(n.publisher)),R.ele("contributor").txt(d(n.contributor)),R.ele("source").txt(d(n.source)),F.ele("model",{system:l});const j=F.ele("Profile",{id:p(t)});j.ele("title").txt(L),j.ele("description").txt(d(n.description));const z=[],B=e.results||[];if(B.forEach(e=>{const t=F.ele("Group",{id:d(e.id)});t.ele("title").txt(d(e.description)),t.ele("description").txt(d(e.description)),(e.checks||[]).forEach(e=>{const r=e.id||"",i=N(h,r),o=g(i,r),s=i.fixId||m(r),a=i.checkId||u,l=d(n.checkHref),c=d(n.checkName),_=t.ele("Rule",{id:o,selected:"true",weight:w(e.scored),role:T(e.scored),severity:y(i.severity,e.scored)});_.ele("version").txt(d(i.version)),_.ele("title").txt(d(`${r} ${e.description||""}`)),_.ele("description").txt(d(e.description));const p=_.ele("reference");p.ele("title").txt(d(n.referenceTitle)),p.ele("subject").txt(d(n.referenceSubject)),p.ele("publisher").txt(d(n.publisher)),p.ele("type").txt(d(n.referenceType)),p.ele("identifier").txt(d(n.referenceIdentifier)),E(i.cci).forEach(e=>{_.ele("ident",{system:e.system}).txt(e.value)}),_.ele("fixtext",{fixref:s}).txt(d(e.remediation)),_.ele("fix",{id:s});const f=_.ele("check",{system:a});f.ele("check-content-ref",{name:c,href:l}),f.ele("check-content").txt(d(e.audit)),z.push({check:e,effectiveId:o,stig:i})})}),0===B.length){const e=F.ele("Group",{id:c});e.ele("title").txt(c),e.ele("description").txt(c)}const G=e.total||0,W=e.pass||0,U=G>0?(W/G*100).toFixed(1):"0.0",q=v?[v]:n.clusterName?[n.clusterName]:S(e),H=F.ele("TestResult",{id:I||`${o}_${a}`,"start-time":D,"end-time":D,version:t,"test-system":o});H.ele("benchmark",{href:`#${P}`,id:P}),H.ele("title").txt(L),H.ele("identity",{authenticated:"true",privileged:"true"}).txt("compliance-scan-serviceaccount"),q.forEach(e=>H.ele("target").txt(e)),x(_).forEach(e=>H.ele("target-address").txt(e));const X=H.ele("target-facts");if(C(f).forEach(e=>{X.ele("fact",{name:e.name,type:e.type}).txt(e.value)}),H.ele("platform",{idref:d(n.platform)}),0===z.length){const e=H.ele("rule-result",{idref:c,role:c,time:D,severity:c,version:c,weight:c});e.ele("ident",{system:c}).txt(c),e.ele("result").txt(c);const t=e.ele("check",{system:c});t.ele("check-content-ref",{name:c,href:c}),t.ele("check-content").txt(c)}else z.forEach(({check:e,effectiveId:t,stig:r})=>{const i=r.checkId||u,o=d(n.checkHref),s=d(n.checkName),a=H.ele("rule-result",{idref:t,role:T(e.scored),time:D,severity:y(r.severity,e.scored),version:d(r.version),weight:w(e.scored)});E(r.cci).forEach(e=>{a.ele("ident",{system:e.system}).txt(e.value)}),a.ele("result").txt(b(e.state));const l=a.ele("check",{system:i});l.ele("check-content-ref",{name:s,href:o}),l.ele("check-content").txt(d(e.audit))});return H.ele("score",{system:l,maximum:"100.0"}).txt(U),M.end({prettyPrint:!0})}const O=(e,t)=>{const n="mixed"===(e.state||"").toLowerCase(),r=n?(e.nodes||[]).includes(t)?"fail":"pass":e.state;return{...e,state:r}};function D(e){const{report:t,hostname:n,role:r,...i}=e,s=(t.results||[]).map(e=>({...e,checks:(e.checks||[]).map(e=>O(e,n))})),l=s.flatMap(e=>e.checks||[]).filter(e=>"pass"===(e.state||"").toLowerCase()).length;return I({...i,report:{...t,results:s,pass:l,nodes:{[r]:[n]}},clusterName:n,testResultId:`${o}_${a}_${h(n)}`})}},22038:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.builder=l,t.create=u,t.fragment=c,t.convert=d;const r=n(55014),i=n(92539),o=n(25986),s=n(43036),a=n(40236);function l(e,t){const n=_(h(e)?e:r.DefaultBuilderOptions),a=o.Guard.isNode(e)||(0,i.isArray)(e)?e:t;if(void 0===a)throw new Error("Invalid arguments.");if((0,i.isArray)(a)){const e=[];for(let t=0;t<a.length;t++){const r=new s.XMLBuilderImpl(a[t]);r.set(n),e.push(r)}return e}{const e=new s.XMLBuilderImpl(a);return e.set(n),e}}function u(e,t){const n=_(void 0===e||h(e)?e:r.DefaultBuilderOptions),i=h(e)?t:e,o=(0,a.createDocument)();m(o,n);const l=new s.XMLBuilderImpl(o);return void 0!==i&&l.ele(i),l}function c(e,t){const n=_(void 0===e||h(e)?e:r.DefaultBuilderOptions),i=h(e)?t:e,o=(0,a.createDocument)();m(o,n,!0);const l=new s.XMLBuilderImpl(o.createDocumentFragment());return void 0!==i&&l.ele(i),l}function d(e,t,n){let i,o,s;return h(e)&&void 0!==t?(i=e,o=t,s=n):(i=r.DefaultBuilderOptions,o=e,s=t||void 0),u(i,o).end(s)}function h(e){if(!(0,i.isPlainObject)(e))return!1;for(const t in e)if(e.hasOwnProperty(t)&&!r.XMLBuilderOptionKeys.has(t))return!1;return!0}function _(e={}){const t=(0,i.applyDefaults)(e,r.DefaultBuilderOptions);if(0===t.convert.att.length||0===t.convert.ins.length||0===t.convert.text.length||0===t.convert.cdata.length||0===t.convert.comment.length)throw new Error("JS object converter strings cannot be zero length.");return t}function m(e,t,n){const r=e;r._xmlBuilderOptions=t,r._isFragment=n}},17871:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.createCB=i,t.fragmentCB=o;const r=n(43036);function i(e){return new r.XMLBuilderCBImpl(e)}function o(e){return new r.XMLBuilderCBImpl(e,!0)}},71681:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.XMLBuilderCBImpl=void 0;const r=n(55014),i=n(92539),o=n(22038),s=n(20371),a=n(88591),l=n(36939),u=n(91740),c=n(25986),d=n(17744),h=n(60883),_=n(4734),m=n(50046);class p extends m.EventEmitter{static _VoidElementNames=new Set(["area","base","basefont","bgsound","br","col","embed","frame","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"]);_options;_builderOptions;_writer;_fragment;_hasDeclaration=!1;_docTypeName="";_hasDocumentElement=!1;_currentElement;_currentElementSerialized=!1;_openTags=[];_prefixMap;_prefixIndex;_ended=!1;constructor(e,t=!1){super(),this._fragment=t,this._options=(0,i.applyDefaults)(e||{},r.DefaultXMLBuilderCBOptions),this._builderOptions={defaultNamespace:this._options.defaultNamespace,namespaceAlias:this._options.namespaceAlias},"json"===this._options.format?this._writer=new h.JSONCBWriter(this._options):"yaml"===this._options.format?this._writer=new _.YAMLCBWriter(this._options):this._writer=new d.XMLCBWriter(this._options),void 0!==this._options.data&&this.on("data",this._options.data),void 0!==this._options.end&&this.on("end",this._options.end),void 0!==this._options.error&&this.on("error",this._options.error),this._prefixMap=new l.NamespacePrefixMap,this._prefixMap.set("xml",a.namespace.XML),this._prefixIndex={value:1},this._push(this._writer.frontMatter())}ele(e,t,n){if((0,i.isObject)(e)||(0,i.isString)(e)&&(/^\s*</.test(e)||/^\s*[\{\[]/.test(e)||/^(\s*|(#.*)|(%.*))*---/.test(e))){const t=(0,o.fragment)().set(this._options);try{t.ele(e)}catch(r){return this.emit("error",r),this}for(const e of t.node.childNodes)this._fromNode(e);return this}if(this._serializeOpenTag(!0),!this._fragment&&this._hasDocumentElement&&0===this._writer.level)return this.emit("error",new Error("Document cannot have multiple document element nodes.")),this;try{this._currentElement=(0,o.fragment)(this._builderOptions).ele(e,t,n)}catch(r){return this.emit("error",r),this}return this._fragment||this._hasDocumentElement||""===this._docTypeName||this._currentElement.node._qualifiedName===this._docTypeName?(this._currentElementSerialized=!1,this._fragment||(this._hasDocumentElement=!0),this):(this.emit("error",new Error("Document element name does not match DocType declaration name.")),this)}att(e,t,n){if(void 0===this._currentElement)return this.emit("error",new Error("Cannot insert an attribute node as child of a document node.")),this;try{this._currentElement.att(e,t,n)}catch(r){return this.emit("error",r),this}return this}com(e){let t;this._serializeOpenTag(!0);try{t=(0,o.fragment)(this._builderOptions).com(e).first().node}catch(n){return this.emit("error",n),this}return!this._options.wellFormed||(0,s.xml_isLegalChar)(t.data)&&-1===t.data.indexOf("--")&&!t.data.endsWith("-")?(this._push(this._writer.comment(t.data)),this):(this.emit("error",new Error("Comment data contains invalid characters (well-formed required).")),this)}txt(e){if(!this._fragment&&void 0===this._currentElement)return this.emit("error",new Error("Cannot insert a text node as child of a document node.")),this;let t;this._serializeOpenTag(!0);try{t=(0,o.fragment)(this._builderOptions).txt(e).first().node}catch(r){return this.emit("error",r),this}if(this._options.wellFormed&&!(0,s.xml_isLegalChar)(t.data))return this.emit("error",new Error("Text data contains invalid characters (well-formed required).")),this;const n=t.data.replace(/(?!&(lt|gt|amp|apos|quot);)&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return this._push(this._writer.text(n)),this}ins(e,t=""){let n;this._serializeOpenTag(!0);try{n=(0,o.fragment)(this._builderOptions).ins(e,t).first().node}catch(r){return this.emit("error",r),this}return this._options.wellFormed&&(-1!==n.target.indexOf(":")||/^xml$/i.test(n.target))?(this.emit("error",new Error("Processing instruction target contains invalid characters (well-formed required).")),this):this._options.wellFormed&&!(0,s.xml_isLegalChar)(n.data)?(this.emit("error",Error("Processing instruction data contains invalid characters (well-formed required).")),this):(this._push(this._writer.instruction(n.target,n.data)),this)}dat(e){let t;this._serializeOpenTag(!0);try{t=(0,o.fragment)(this._builderOptions).dat(e).first().node}catch(n){return this.emit("error",n),this}return this._push(this._writer.cdata(t.data)),this}dec(e={version:"1.0"}){return this._fragment?(this.emit("error",Error("Cannot insert an XML declaration into a document fragment.")),this):this._hasDeclaration?(this.emit("error",Error("XML declaration is already inserted.")),this):(this._push(this._writer.declaration(e.version||"1.0",e.encoding,e.standalone)),this._hasDeclaration=!0,this)}dtd(e){if(this._fragment)return this.emit("error",Error("Cannot insert a DocType declaration into a document fragment.")),this;if(""!==this._docTypeName)return this.emit("error",new Error("DocType declaration is already inserted.")),this;if(this._hasDocumentElement)return this.emit("error",new Error("Cannot insert DocType declaration after document element.")),this;let t;try{t=(0,o.create)().dtd(e).first().node}catch(n){return this.emit("error",n),this}return this._options.wellFormed&&!(0,s.xml_isPubidChar)(t.publicId)?(this.emit("error",new Error("DocType public identifier does not match PubidChar construct (well-formed required).")),this):this._options.wellFormed&&(!(0,s.xml_isLegalChar)(t.systemId)||-1!==t.systemId.indexOf('"')&&-1!==t.systemId.indexOf("'"))?(this.emit("error",new Error("DocType system identifier contains invalid characters (well-formed required).")),this):(this._docTypeName=e.name,this._push(this._writer.docType(e.name,t.publicId,t.systemId)),this)}import(e){const t=(0,o.fragment)().set(this._options);try{t.import(e)}catch(n){return this.emit("error",n),this}for(const r of t.node.childNodes)this._fromNode(r);return this}up(){return this._serializeOpenTag(!1),this._serializeCloseTag(),this}end(){this._serializeOpenTag(!1);while(this._openTags.length>0)this._serializeCloseTag();return this._push(null),this}_serializeOpenTag(e){if(this._currentElementSerialized)return;if(void 0===this._currentElement)return;const t=this._currentElement.node;if(this._options.wellFormed&&(-1!==t.localName.indexOf(":")||!(0,s.xml_isName)(t.localName)))return void this.emit("error",new Error("Node local name contains invalid characters (well-formed required)."));let n="",r=!1,i=this._prefixMap.copy(),o={},l=this._recordNamespaceInformation(t,i,o),u=0===this._openTags.length?null:this._openTags[this._openTags.length-1][1],c=t.namespaceURI;if(null===c&&(c=u),u===c)null!==l&&(r=!0),n=c===a.namespace.XML?"xml:"+t.localName:t.localName,this._writer.beginElement(n),this._push(this._writer.openTagBegin(n));else{let e=t.prefix,s=null;if(null===e&&c===l||(s=i.get(e,c)),"xmlns"===e){if(this._options.wellFormed)return void this.emit("error",new Error("An element cannot have the 'xmlns' prefix (well-formed required)."));s=e}null!==s?(n=s+":"+t.localName,null!==l&&l!==a.namespace.XML&&(u=l||null),this._writer.beginElement(n),this._push(this._writer.openTagBegin(n))):null!==e?(e in o&&(e=this._generatePrefix(c,i,this._prefixIndex)),i.set(e,c),n+=e+":"+t.localName,this._writer.beginElement(n),this._push(this._writer.openTagBegin(n)),this._push(this._writer.attribute("xmlns:"+e,this._serializeAttributeValue(c,this._options.wellFormed))),null!==l&&(u=l||null)):null===l||null!==l&&l!==c?(r=!0,n+=t.localName,u=c,this._writer.beginElement(n),this._push(this._writer.openTagBegin(n)),this._push(this._writer.attribute("xmlns",this._serializeAttributeValue(c,this._options.wellFormed)))):(n+=t.localName,u=c,this._writer.beginElement(n),this._push(this._writer.openTagBegin(n)))}this._serializeAttributes(t,i,this._prefixIndex,o,r,this._options.wellFormed);const d=c===a.namespace.HTML;d&&!e&&p._VoidElementNames.has(t.localName)?(this._push(this._writer.openTagEnd(n,!0,!0)),this._writer.endElement(n)):d||e?this._push(this._writer.openTagEnd(n,!1,!1)):(this._push(this._writer.openTagEnd(n,!0,!1)),this._writer.endElement(n)),this._currentElementSerialized=!0,this._openTags.push([n,u,this._prefixMap,e]),this._isPrefixMapModified(this._prefixMap,i)&&(this._prefixMap=i),this._writer.level++}_serializeCloseTag(){this._writer.level--;const e=this._openTags.pop();if(void 0===e)return void this.emit("error",new Error("Last element is undefined."));const[t,n,r,i]=e;this._prefixMap=r,i&&(this._push(this._writer.closeTag(t)),this._writer.endElement(t))}_push(e){null===e?(this._ended=!0,this.emit("end")):this._ended?this.emit("error",new Error("Cannot push to ended stream.")):0!==e.length&&(this._writer.hasData=!0,this.emit("data",e,this._writer.level))}_fromNode(e){if(c.Guard.isElementNode(e)){const t=e.prefix?e.prefix+":"+e.localName:e.localName;null!==e.namespaceURI?this.ele(e.namespaceURI,t):this.ele(t);for(const n of e.attributes){const e=n.prefix?n.prefix+":"+n.localName:n.localName;null!==n.namespaceURI?this.att(n.namespaceURI,e,n.value):this.att(e,n.value)}for(const n of e.childNodes)this._fromNode(n);this.up()}else c.Guard.isExclusiveTextNode(e)&&e.data?this.txt(e.data):c.Guard.isCommentNode(e)?this.com(e.data):c.Guard.isCDATASectionNode(e)?this.dat(e.data):c.Guard.isProcessingInstructionNode(e)&&this.ins(e.target,e.data)}_serializeAttributes(e,t,n,r,i,o){const l=o?new u.LocalNameSet:void 0;for(const u of e.attributes){if(!o&&!i&&null===u.namespaceURI){this._push(this._writer.attribute(u.localName,this._serializeAttributeValue(u.value,this._options.wellFormed)));continue}if(o&&l&&l.has(u.namespaceURI,u.localName))return void this.emit("error",new Error("Element contains duplicate attributes (well-formed required)."));o&&l&&l.set(u.namespaceURI,u.localName);let e=u.namespaceURI,c=null;if(null!==e)if(c=t.get(u.prefix,e),e===a.namespace.XMLNS){if(u.value===a.namespace.XML||null===u.prefix&&i||null!==u.prefix&&(!(u.localName in r)||r[u.localName]!==u.value)&&t.has(u.localName,u.value))continue;if(o&&u.value===a.namespace.XMLNS)return void this.emit("error",new Error("XMLNS namespace is reserved (well-formed required)."));if(o&&""===u.value)return void this.emit("error",new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required)."));"xmlns"===u.prefix&&(c="xmlns")}else null===c&&(c=null===u.prefix||t.hasPrefix(u.prefix)&&!t.has(u.prefix,e)?this._generatePrefix(e,t,n):u.prefix,this._push(this._writer.attribute("xmlns:"+c,this._serializeAttributeValue(e,this._options.wellFormed))));if(o&&(-1!==u.localName.indexOf(":")||!(0,s.xml_isName)(u.localName)||"xmlns"===u.localName&&null===e))return void this.emit("error",new Error("Attribute local name contains invalid characters (well-formed required)."));this._push(this._writer.attribute((null!==c?c+":":"")+u.localName,this._serializeAttributeValue(u.value,this._options.wellFormed)))}}_serializeAttributeValue(e,t){return t&&null!==e&&!(0,s.xml_isLegalChar)(e)?(this.emit("error",new Error("Invalid characters in attribute value.")),""):null===e?"":e.replace(/(?!&(lt|gt|amp|apos|quot);)&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}_recordNamespaceInformation(e,t,n){let r=null;for(const i of e.attributes){let e=i.namespaceURI,o=i.prefix;if(e===a.namespace.XMLNS){if(null===o){r=i.value;continue}{let e=i.localName,r=i.value;if(r===a.namespace.XML)continue;if(""===r&&(r=null),t.has(e,r))continue;t.set(e,r),n[e]=r||""}}}return r}_generatePrefix(e,t,n){let r="ns"+n.value;return n.value++,t.set(r,e),r}_isPrefixMapModified(e,t){const n=e._items,r=t._items,i=e._nullItems,o=t._nullItems;for(const s in r){const e=n[s];if(void 0===e)return!0;const t=r[s];if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!0}if(i.length!==o.length)return!0;for(let s=0;s<i.length;s++)if(i[s]!==o[s])return!0;return!1}}t.XMLBuilderCBImpl=p},87500:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.XMLBuilderImpl=void 0;const r=n(55014),i=n(92539),o=n(26715),s=n(50912),a=n(25986),l=n(20371),u=n(40236),c=n(88591),d=n(69303);class h{_domNode;constructor(e){this._domNode=e}get node(){return this._domNode}get options(){return this._options}set(e){return this._options=(0,i.applyDefaults)((0,i.applyDefaults)(this._options,e,!0),r.DefaultBuilderOptions),this}ele(e,t,n){let r,o,s;if((0,i.isObject)(e))return new d.ObjectReader(this._options).parse(this,e);if((0,i.isString)(e)&&null!==e&&/^\s*</.test(e))return new d.XMLReader(this._options).parse(this,e);if((0,i.isString)(e)&&null!==e&&/^\s*[\{\[]/.test(e))return new d.JSONReader(this._options).parse(this,e);if((0,i.isString)(e)&&null!==e&&/^(\s*|(#.*)|(%.*))*---/.test(e))return new d.YAMLReader(this._options).parse(this,e);if((null===e||(0,i.isString)(e))&&(0,i.isString)(t))[r,o,s]=[e,t,n];else{if(null===e)throw new Error("Element name cannot be null. "+this._debugInfo());[r,o,s]=[void 0,e,(0,i.isObject)(t)?t:void 0]}if(s&&(s=(0,i.getValue)(s)),[r,o]=this._extractNamespace((0,u.sanitizeInput)(r,this._options.invalidCharReplacement),(0,u.sanitizeInput)(o,this._options.invalidCharReplacement),!0),void 0===r){const[e]=(0,l.namespace_extractQName)(o);r=this.node.lookupNamespaceURI(e)}const a=void 0!==r&&null!==r?this._doc.createElementNS(r,o):this._doc.createElement(o);this.node.appendChild(a);const c=new h(a),_=this._doc.doctype;if(a===this._doc.documentElement&&null!==_){const e=this._doc.implementation.createDocumentType(this._doc.documentElement.tagName,_.publicId,_.systemId);this._doc.replaceChild(e,_)}return s&&!(0,i.isEmpty)(s)&&c.att(s),c}remove(){const e=this.up();return e.node.removeChild(this.node),e}att(e,t,n){if((0,i.isMap)(e)||(0,i.isObject)(e))return(0,i.forEachObject)(e,(e,t)=>this.att(e,t),this),this;let r,o,s;if(void 0!==e&&null!==e&&(e=(0,i.getValue)(e+"")),void 0!==t&&null!==t&&(t=(0,i.getValue)(t+"")),void 0!==n&&null!==n&&(n=(0,i.getValue)(n+"")),null!==e&&!(0,i.isString)(e)||!(0,i.isString)(t)||null!==n&&!(0,i.isString)(n)){if(!(0,i.isString)(e)||null!=t&&!(0,i.isString)(t))throw new Error("Attribute name and value not specified. "+this._debugInfo());[r,o,s]=[void 0,e,t]}else[r,o,s]=[e,t,n];if(this._options.keepNullAttributes&&null==s)s="";else if(null==s)return this;if(!a.Guard.isElementNode(this.node))throw new Error("An attribute can only be assigned to an element node.");let d=this.node;[r,o]=this._extractNamespace(r,o,!1),o=(0,u.sanitizeInput)(o,this._options.invalidCharReplacement),r=(0,u.sanitizeInput)(r,this._options.invalidCharReplacement),s=(0,u.sanitizeInput)(s,this._options.invalidCharReplacement);const[h,_]=(0,l.namespace_extractQName)(o),[m]=(0,l.namespace_extractQName)(d.prefix?d.prefix+":"+d.localName:d.localName);let p=null;return"xmlns"===h?(r=c.namespace.XMLNS,null===d.namespaceURI&&m===_&&(p=s)):null===h&&"xmlns"===_&&null===m&&(r=c.namespace.XMLNS,p=s),null!==p&&(this._updateNamespace(p),d=this.node),void 0!==r?d.setAttributeNS(r,o,s):d.setAttribute(o,s),this}removeAtt(e,t){if(!a.Guard.isElementNode(this.node))throw new Error("An attribute can only be removed from an element node.");let n,r;if(e=(0,i.getValue)(e),void 0!==t&&(t=(0,i.getValue)(t)),null!==e&&void 0===t)r=e;else{if(null!==e&&!(0,i.isString)(e)||void 0===t)throw new Error("Attribute namespace must be a string. "+this._debugInfo());n=e,r=t}return(0,i.isArray)(r)||(0,i.isSet)(r)?(0,i.forEachArray)(r,e=>void 0===n?this.removeAtt(e):this.removeAtt(n,e),this):void 0!==n?(r=(0,u.sanitizeInput)(r,this._options.invalidCharReplacement),n=(0,u.sanitizeInput)(n,this._options.invalidCharReplacement),this.node.removeAttributeNS(n,r)):(r=(0,u.sanitizeInput)(r,this._options.invalidCharReplacement),this.node.removeAttribute(r)),this}txt(e){if(null===e||void 0===e){if(!this._options.keepNullNodes)return this;e=""}const t=this._doc.createTextNode((0,u.sanitizeInput)(e,this._options.invalidCharReplacement));return this.node.appendChild(t),this}com(e){if(null===e||void 0===e){if(!this._options.keepNullNodes)return this;e=""}const t=this._doc.createComment((0,u.sanitizeInput)(e,this._options.invalidCharReplacement));return this.node.appendChild(t),this}dat(e){if(null===e||void 0===e){if(!this._options.keepNullNodes)return this;e=""}const t=this._doc.createCDATASection((0,u.sanitizeInput)(e,this._options.invalidCharReplacement));return this.node.appendChild(t),this}ins(e,t=""){if(null===t||void 0===t){if(!this._options.keepNullNodes)return this;t=""}if((0,i.isArray)(e)||(0,i.isSet)(e))(0,i.forEachArray)(e,e=>{e+="";const t=e.indexOf(" "),n=-1===t?e:e.substr(0,t),r=-1===t?"":e.substr(t+1);this.ins(n,r)},this);else if((0,i.isMap)(e)||(0,i.isObject)(e))(0,i.forEachObject)(e,(e,t)=>this.ins(e,t),this);else{const n=this._doc.createProcessingInstruction((0,u.sanitizeInput)(e,this._options.invalidCharReplacement),(0,u.sanitizeInput)(t,this._options.invalidCharReplacement));this.node.appendChild(n)}return this}dec(e){return this._options.version=e.version||"1.0",this._options.encoding=e.encoding,this._options.standalone=e.standalone,this}dtd(e){const t=(0,u.sanitizeInput)(e&&e.name||(this._doc.documentElement?this._doc.documentElement.tagName:"ROOT"),this._options.invalidCharReplacement),n=(0,u.sanitizeInput)(e&&e.pubID||"",this._options.invalidCharReplacement),r=(0,u.sanitizeInput)(e&&e.sysID||"",this._options.invalidCharReplacement);if(null!==this._doc.documentElement&&t!==this._doc.documentElement.tagName)throw new Error("DocType name does not match document element name.");const i=this._doc.implementation.createDocumentType(t,n,r);return null!==this._doc.doctype?this._doc.replaceChild(i,this._doc.doctype):this._doc.insertBefore(i,this._doc.documentElement),this}import(e){const t=this._domNode,n=this._doc,r=e.node,i=e=>{if(!e._namespace){const[n]=(0,l.namespace_extractQName)(e.prefix?e.prefix+":"+e.localName:e.localName),r=t.lookupNamespaceURI(n);new h(e)._updateNamespace(r)}};if(a.Guard.isDocumentNode(r)){const e=r.documentElement;if(null===e)throw new Error("Imported document has no document element node. "+this._debugInfo());const o=n.importNode(e,!0);t.appendChild(o),i(o)}else if(a.Guard.isDocumentFragmentNode(r))for(const o of r.childNodes){const e=n.importNode(o,!0);t.appendChild(e),a.Guard.isElementNode(e)&&i(e)}else{const e=n.importNode(r,!0);t.appendChild(e),a.Guard.isElementNode(e)&&i(e)}return this}doc(){if(this._doc._isFragment){let e=this.node;while(e&&e.nodeType!==s.NodeType.DocumentFragment)e=e.parentNode;if(null===e)throw new Error("Node has no parent node while searching for document fragment ancestor. "+this._debugInfo());return new h(e)}return new h(this._doc)}root(){const e=this._doc.documentElement;if(!e)throw new Error("Document root element is null. "+this._debugInfo());return new h(e)}up(){const e=this._domNode.parentNode;if(!e)throw new Error("Parent node is null. "+this._debugInfo());return new h(e)}prev(){const e=this._domNode.previousSibling;if(!e)throw new Error("Previous sibling node is null. "+this._debugInfo());return new h(e)}next(){const e=this._domNode.nextSibling;if(!e)throw new Error("Next sibling node is null. "+this._debugInfo());return new h(e)}first(){const e=this._domNode.firstChild;if(!e)throw new Error("First child node is null. "+this._debugInfo());return new h(e)}last(){const e=this._domNode.lastChild;if(!e)throw new Error("Last child node is null. "+this._debugInfo());return new h(e)}each(e,t=!1,n=!1,r){let i=this._getFirstDescendantNode(this._domNode,t,n);while(i[0]){const t=this._getNextDescendantNode(this._domNode,i[0],n,i[1],i[2]);e.call(r,new h(i[0]),i[1],i[2]),i=t}return this}map(e,t=!1,n=!1,r){let i=[];return this.each((t,n,o)=>i.push(e.call(r,t,n,o)),t,n),i}reduce(e,t,n=!1,r=!1,i){let o=t;return this.each((t,n,r)=>o=e.call(i,o,t,n,r),n,r),o}find(e,t=!1,n=!1,r){let i=this._getFirstDescendantNode(this._domNode,t,n);while(i[0]){const t=new h(i[0]);if(e.call(r,t,i[1],i[2]))return t;i=this._getNextDescendantNode(this._domNode,i[0],n,i[1],i[2])}}filter(e,t=!1,n=!1,r){let i=[];return this.each((t,n,o)=>{e.call(r,t,n,o)&&i.push(t)},t,n),i}every(e,t=!1,n=!1,r){let i=this._getFirstDescendantNode(this._domNode,t,n);while(i[0]){const t=new h(i[0]);if(!e.call(r,t,i[1],i[2]))return!1;i=this._getNextDescendantNode(this._domNode,i[0],n,i[1],i[2])}return!0}some(e,t=!1,n=!1,r){let i=this._getFirstDescendantNode(this._domNode,t,n);while(i[0]){const t=new h(i[0]);if(e.call(r,t,i[1],i[2]))return!0;i=this._getNextDescendantNode(this._domNode,i[0],n,i[1],i[2])}return!1}toArray(e=!1,t=!1){let n=[];return this.each(e=>n.push(e),e,t),n}toString(e){return e=e||{},void 0===e.format&&(e.format="xml"),this._serialize(e)}toObject(e){return e=e||{},void 0===e.format&&(e.format="object"),this._serialize(e)}end(e){return e=e||{},void 0===e.format&&(e.format="xml"),this.doc()._serialize(e)}_getFirstDescendantNode(e,t,n){return t?[this._domNode,0,0]:n?this._getNextDescendantNode(e,e,n,0,0):[this._domNode.firstChild,0,1]}_getNextDescendantNode(e,t,n,r,i){if(!n)return e===t?[t.firstChild,0,i+1]:[t.nextSibling,r+1,i];{if(t.firstChild)return[t.firstChild,0,i+1];if(t===e)return[null,-1,-1];if(t.nextSibling)return[t.nextSibling,r+1,i];let n=t.parentNode;while(n&&n!==e){if(n.nextSibling)return[n.nextSibling,(0,l.tree_index)(n.nextSibling),i-1];n=n.parentNode,i--}}return[null,-1,-1]}_serialize(e){if("xml"===e.format){const t=new o.XMLWriter(this._options,e);return t.serialize(this.node)}if("map"===e.format){const t=new o.MapWriter(this._options,e);return t.serialize(this.node)}if("object"===e.format){const t=new o.ObjectWriter(this._options,e);return t.serialize(this.node)}if("json"===e.format){const t=new o.JSONWriter(this._options,e);return t.serialize(this.node)}if("yaml"===e.format){const t=new o.YAMLWriter(this._options,e);return t.serialize(this.node)}throw new Error("Invalid writer format: "+e.format+". "+this._debugInfo())}_extractNamespace(e,t,n){const r=t.indexOf("@");if(r>0&&(void 0===e&&(e=t.slice(r+1)),t=t.slice(0,r)),void 0===e)e=n?this._options.defaultNamespace.ele:this._options.defaultNamespace.att;else if(null!==e&&"@"===e[0]){const t=e.slice(1);if(e=this._options.namespaceAlias[t],void 0===e)throw new Error("Namespace alias `"+t+"` is not defined. "+this._debugInfo())}return[e,t]}_updateNamespace(e){const t=this._domNode;if(a.Guard.isElementNode(t)&&null!==e&&t.namespaceURI!==e){const[n,r]=(0,l.namespace_extractQName)(t.prefix?t.prefix+":"+t.localName:t.localName),i=(0,l.create_element)(this._doc,r,e,n);for(const e of t.attributes){const n=e.prefix?e.prefix+":"+e.localName:e.localName,[r]=(0,l.namespace_extractQName)(n);let o=e.namespaceURI;null===o&&null!==r&&(o=t.lookupNamespaceURI(r)),null===o?i.setAttribute(n,e.value):i.setAttributeNS(o,n,e.value)}const o=t.parentNode;if(null===o)throw new Error("Parent node is null."+this._debugInfo());o.replaceChild(i,t),this._domNode=i;for(const e of t.childNodes){const t=e.cloneNode(!0);if(i.appendChild(t),a.Guard.isElementNode(t)&&!t._namespace){const[e]=(0,l.namespace_extractQName)(t.prefix?t.prefix+":"+t.localName:t.localName),n=i.lookupNamespaceURI(e);new h(t)._updateNamespace(n)}}}}get _doc(){const e=this.node;if(a.Guard.isDocumentNode(e))return e;{const t=e.ownerDocument;if(!t)throw new Error("Owner document is null. "+this._debugInfo());return t}}_debugInfo(e){const t=this.node,n=t.parentNode;e=e||t.nodeName;const r=n?n.nodeName:"";return r?"node: <"+e+">, parent: <"+r+">":"node: <"+e+">"}get _options(){const e=this._doc;if(void 0===e._xmlBuilderOptions)throw new Error("Builder options is not set.");return e._xmlBuilderOptions}set _options(e){const t=this._doc;t._xmlBuilderOptions=e}}t.XMLBuilderImpl=h},40236:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.createDocument=s,t.sanitizeInput=a;const r=n(19521),i=n(33138),o=n(92539);function s(){const e=new r.DOMImplementation,t=e.createDocument(null,"root",null);return t.documentElement&&t.removeChild(t.documentElement),t}function a(e,t){if(null==e)return e;if(void 0===t)return e+"";{let n="";e+="";for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(9===i||10===i||13===i||i>=32&&i<=55295||i>=57344&&i<=65533)n+=e.charAt(r);else if(i>=55296&&i<=56319&&r<e.length-1){const s=e.charCodeAt(r+1);s>=56320&&s<=57343?(i=1024*(i-55296)+s-56320+65536,n+=String.fromCodePoint(i),r++):n+=(0,o.isString)(t)?t:t(e.charAt(r),r,e)}else n+=(0,o.isString)(t)?t:t(e.charAt(r),r,e)}return n}}i.dom.setFeatures(!1)},43036:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.fragmentCB=t.createCB=t.convert=t.fragment=t.create=t.builder=t.XMLBuilderCBImpl=t.XMLBuilderImpl=void 0;var r=n(87500);Object.defineProperty(t,"XMLBuilderImpl",{enumerable:!0,get:function(){return r.XMLBuilderImpl}});var i=n(71681);Object.defineProperty(t,"XMLBuilderCBImpl",{enumerable:!0,get:function(){return i.XMLBuilderCBImpl}});var o=n(22038);Object.defineProperty(t,"builder",{enumerable:!0,get:function(){return o.builder}}),Object.defineProperty(t,"create",{enumerable:!0,get:function(){return o.create}}),Object.defineProperty(t,"fragment",{enumerable:!0,get:function(){return o.fragment}}),Object.defineProperty(t,"convert",{enumerable:!0,get:function(){return o.convert}});var s=n(17871);Object.defineProperty(t,"createCB",{enumerable:!0,get:function(){return s.createCB}}),Object.defineProperty(t,"fragmentCB",{enumerable:!0,get:function(){return s.fragmentCB}})},62457:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.nonEntityAmpersandRegex=void 0,t.nonEntityAmpersandRegex=/&(?![A-Za-z]+;|#\d+;)/g},60500:function(e,t,n){t.vt=void 0;var r=n(43036);Object.defineProperty(t,"vt",{enumerable:!0,get:function(){return r.create}})},55014:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultXMLBuilderCBOptions=t.XMLBuilderOptionKeys=t.DefaultBuilderOptions=void 0,t.DefaultBuilderOptions={version:"1.0",encoding:void 0,standalone:void 0,keepNullNodes:!1,keepNullAttributes:!1,ignoreConverters:!1,skipWhitespaceOnlyText:!0,convert:{att:"@",ins:"?",text:"#",cdata:"$",comment:"!"},defaultNamespace:{ele:void 0,att:void 0},namespaceAlias:{html:"http://www.w3.org/1999/xhtml",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink"},invalidCharReplacement:void 0,parser:void 0},t.XMLBuilderOptionKeys=new Set(Object.keys(t.DefaultBuilderOptions)),t.DefaultXMLBuilderCBOptions={format:"xml",wellFormed:!1,prettyPrint:!1,indent:" ",newline:"\n",offset:0,width:0,allowEmptyTags:!1,spaceBeforeSlash:!1,keepNullNodes:!1,keepNullAttributes:!1,ignoreConverters:!1,convert:{att:"@",ins:"?",text:"#",cdata:"$",comment:"!"},defaultNamespace:{ele:void 0,att:void 0},namespaceAlias:{html:"http://www.w3.org/1999/xhtml",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink"}}},66229:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.BaseReader=void 0;const r=n(40236);class i{_builderOptions;static _entityTable={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};constructor(e){this._builderOptions=e,e.parser&&Object.assign(this,e.parser)}_docType(e,t,n,r){return e.dtd({name:t,pubID:n,sysID:r})}_comment(e,t){return e.com(t)}_text(e,t){return e.txt(t)}_instruction(e,t,n){return e.ins(t,n)}_cdata(e,t){return e.dat(t)}_element(e,t,n){return void 0===t?e.ele(n):e.ele(t,n)}_attribute(e,t,n,r){return void 0===t?e.att(n,r):e.att(t,n,r)}_sanitize(e){return(0,r.sanitizeInput)(e,this._builderOptions.invalidCharReplacement)}_decodeText(e){return null==e?e:e.replace(/&(quot|amp|apos|lt|gt);/g,(e,t)=>i._entityTable[t]).replace(/&#(?:x([a-fA-F0-9]+)|([0-9]+));/g,(e,t,n)=>String.fromCodePoint(parseInt(t||n,t?16:10)))}_decodeAttributeValue(e){return this._decodeText(e)}parse(e,t){return this._parse(e,t)}docType(e,t,n,r){return this._docType(e,t,n,r)}comment(e,t){return this._comment(e,t)}text(e,t){return this._text(e,t)}instruction(e,t,n){return this._instruction(e,t,n)}cdata(e,t){return this._cdata(e,t)}element(e,t,n){return this._element(e,t,n)}attribute(e,t,n,r){return this._attribute(e,t,n,r)}sanitize(e){return this._sanitize(e)}}t.BaseReader=i},47122:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.JSONReader=void 0;const r=n(98139),i=n(66229);class o extends i.BaseReader{_parse(e,t){return new r.ObjectReader(this._builderOptions).parse(e,JSON.parse(t))}}t.JSONReader=o},98139:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectReader=void 0;const r=n(92539),i=n(66229);class o extends i.BaseReader{_parse(e,t){const n=this._builderOptions;let i=null;return(0,r.isFunction)(t)?i=this.parse(e,t.call(this)):(0,r.isArray)(t)||(0,r.isSet)(t)?(0,r.forEachArray)(t,t=>i=this.parse(e,t),this):(0,r.isMap)(t)||(0,r.isObject)(t)?(0,r.forEachObject)(t,(t,o)=>{if((0,r.isFunction)(o)&&(o=o.call(this)),n.ignoreConverters||0!==t.indexOf(n.convert.att))if(n.ignoreConverters||0!==t.indexOf(n.convert.text))if(n.ignoreConverters||0!==t.indexOf(n.convert.cdata))if(n.ignoreConverters||0!==t.indexOf(n.convert.comment))if(n.ignoreConverters||0!==t.indexOf(n.convert.ins))if(((0,r.isArray)(o)||(0,r.isSet)(o))&&(0,r.isEmpty)(o));else if(((0,r.isMap)(o)||(0,r.isObject)(o))&&(0,r.isEmpty)(o))i=this.element(e,void 0,this.sanitize(t))||i;else if(n.keepNullNodes||null!=o)if((0,r.isArray)(o)||(0,r.isSet)(o))(0,r.forEachArray)(o,n=>{const r={};r[t]=n,i=this.parse(e,r)},this);else if((0,r.isMap)(o)||(0,r.isObject)(o)){const n=this.element(e,void 0,this.sanitize(t));n&&(i=n,this.parse(n,o))}else if(null==o||(0,r.isString)(o)&&""===o)i=this.element(e,void 0,this.sanitize(t))||i;else{const n=this.element(e,void 0,this.sanitize(t));n&&(i=n,this.text(n,this._decodeText(this.sanitize(o?.toString()))))}else;else if((0,r.isString)(o)){const t=o.indexOf(" "),n=-1===t?o:o.substr(0,t),r=-1===t?"":o.substr(t+1);i=this.instruction(e,this.sanitize(n),this.sanitize(r))||i}else(0,r.isArray)(o)||(0,r.isSet)(o)?(0,r.forEachArray)(o,t=>{const n=t.indexOf(" "),r=-1===n?t:t.substr(0,n),o=-1===n?"":t.substr(n+1);i=this.instruction(e,this.sanitize(r),this.sanitize(o))||i},this):(0,r.forEachObject)(o,(t,n)=>i=this.instruction(e,this.sanitize(t),this.sanitize(n))||i,this);else(0,r.isArray)(o)||(0,r.isSet)(o)?(0,r.forEachArray)(o,t=>i=this.comment(e,this.sanitize(t))||i,this):i=this.comment(e,this.sanitize(o?.toString()))||i;else(0,r.isArray)(o)||(0,r.isSet)(o)?(0,r.forEachArray)(o,t=>i=this.cdata(e,this.sanitize(t))||i,this):i=this.cdata(e,this.sanitize(o?.toString()))||i;else i=(0,r.isMap)(o)||(0,r.isObject)(o)?this.parse(e,o):this.text(e,this._decodeText(this.sanitize(o?.toString())))||i;else if(t===n.convert.att){if((0,r.isArray)(o)||(0,r.isSet)(o))throw new Error("Invalid attribute: "+o.toString()+". "+e._debugInfo());(0,r.forEachObject)(o,(t,n)=>{i=this.attribute(e,void 0,this.sanitize(t),this._decodeAttributeValue(this.sanitize(n)))||i})}else i=this.attribute(e,void 0,this.sanitize(t.substring(n.convert.att.length)),this._decodeAttributeValue(this.sanitize(o?.toString())))||i},this):(n.keepNullNodes||null!=t)&&(i=this.text(e,this._decodeText(this.sanitize(t?.toString())))||i),i||e}}t.ObjectReader=o},55577:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.XMLReader=void 0;const r=n(80303),i=n(39893),o=n(50912),s=n(88591),a=n(20371),l=n(66229);class u extends l.BaseReader{_parse(e,t){const n=new r.XMLStringLexer(t,{skipWhitespaceOnlyText:this._builderOptions.skipWhitespaceOnlyText});let l=e,u=e,c=n.nextToken();while(c.type!==i.TokenType.EOF){switch(c.type){case i.TokenType.Declaration:const t=c,n=this.sanitize(t.version);if("1.0"!==n)throw new Error("Invalid xml version: "+n);const r={version:n};t.encoding&&(r.encoding=this.sanitize(t.encoding)),t.standalone&&(r.standalone="yes"===this.sanitize(t.standalone)),u.set(r);break;case i.TokenType.DocType:const d=c;u=this.docType(u,this.sanitize(d.name),this.sanitize(d.pubId),this.sanitize(d.sysId))||u;break;case i.TokenType.CDATA:const h=c;u=this.cdata(u,this.sanitize(h.data))||u;break;case i.TokenType.Comment:const _=c;u=this.comment(u,this.sanitize(_.data))||u;break;case i.TokenType.PI:const m=c;u=this.instruction(u,this.sanitize(m.target),this.sanitize(m.data))||u;break;case i.TokenType.Text:if(u.node.nodeType===o.NodeType.Document)break;const p=c;u=this.text(u,this._decodeText(this.sanitize(p.data)))||u;break;case i.TokenType.Element:const f=c,g=this.sanitize(f.name),[N]=(0,a.namespace_extractQName)(g);let b=u.node.lookupNamespaceURI(N);const v={};for(let[e,i]of f.attributes)if(e=this.sanitize(e),i=this.sanitize(i),"xmlns"===e)b=i;else{const[t,n]=(0,a.namespace_extractQName)(e);"xmlns"===t&&(n===N&&(b=i),v[n]=i)}const y=null!==b?this.element(u,b,g):this.element(u,void 0,g);if(void 0===y)break;u.node===e.node&&(l=y);for(let[e,i]of f.attributes){e=this.sanitize(e),i=this.sanitize(i);const[t,n]=(0,a.namespace_extractQName)(e);let r=null;"xmlns"===t||null===t&&"xmlns"===n?r=s.namespace.XMLNS:(r=y.node.lookupNamespaceURI(t),null!==r&&y.node.isDefaultNamespace(r)?r=null:null===r&&null!==t&&(r=v[t]||null)),null!==r?this.attribute(y,r,e,this._decodeAttributeValue(i)):this.attribute(y,void 0,e,this._decodeAttributeValue(i))}f.selfClosing||(u=y);break;case i.TokenType.ClosingTag:u.node.parentNode&&(u=u.up());break}c=n.nextToken()}return l}}t.XMLReader=u},56003:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.YAMLReader=void 0;const r=n(98139),i=n(66229),o=n(20246);class s extends i.BaseReader{_parse(e,t){const n=(0,o.load)(t);if(void 0===n)throw new Error("Unable to parse YAML document.");return new r.ObjectReader(this._builderOptions).parse(e,n)}}t.YAMLReader=s},69303:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.YAMLReader=t.JSONReader=t.ObjectReader=t.XMLReader=void 0;var r=n(55577);Object.defineProperty(t,"XMLReader",{enumerable:!0,get:function(){return r.XMLReader}});var i=n(98139);Object.defineProperty(t,"ObjectReader",{enumerable:!0,get:function(){return i.ObjectReader}});var o=n(47122);Object.defineProperty(t,"JSONReader",{enumerable:!0,get:function(){return o.JSONReader}});var s=n(56003);Object.defineProperty(t,"YAMLReader",{enumerable:!0,get:function(){return s.YAMLReader}})},63100:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.BaseCBWriter=void 0;class n{_builderOptions;_writerOptions;level=0;hasData;constructor(e){this._builderOptions=e,this._writerOptions=e}}t.BaseCBWriter=n},28693:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.BaseWriter=void 0;const r=n(50912),i=n(91740),o=n(36939),s=n(88591),a=n(20371),l=n(62457);class u{static _VoidElementNames=new Set(["area","base","basefont","bgsound","br","col","embed","frame","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"]);_builderOptions;_writerOptions;constructor(e){this._builderOptions=e}declaration(e,t,n){}docType(e,t,n){}comment(e){}text(e){}instruction(e,t){}cdata(e){}openTagBegin(e){}openTagEnd(e,t,n){}closeTag(e){}attributes(e){for(const t of e)this.attribute(null===t[1]?t[2]:t[1]+":"+t[2],t[3])}attribute(e,t){}beginElement(e){}endElement(e){}level=0;currentNode;serializeNode(e,t){const n=void 0!==e._nodeDocument&&e._nodeDocument._hasNamespaces;if(this.level=0,this.currentNode=e,n){let n=null;const r=new o.NamespacePrefixMap;r.set("xml",s.namespace.XML);const i={value:1};this._serializeNodeNS(e,n,r,i,t)}else this._serializeNode(e,t)}_serializeNodeNS(e,t,n,i,o){switch(this.currentNode=e,e.nodeType){case r.NodeType.Element:this._serializeElementNS(e,t,n,i,o);break;case r.NodeType.Document:this._serializeDocumentNS(e,t,n,i,o);break;case r.NodeType.Comment:this._serializeComment(e,o);break;case r.NodeType.Text:this._serializeText(e,o);break;case r.NodeType.DocumentFragment:this._serializeDocumentFragmentNS(e,t,n,i,o);break;case r.NodeType.DocumentType:this._serializeDocumentType(e,o);break;case r.NodeType.ProcessingInstruction:this._serializeProcessingInstruction(e,o);break;case r.NodeType.CData:this._serializeCData(e,o);break;default:throw new Error(`Unknown node type: ${e.nodeType}`)}}_serializeNode(e,t){switch(this.currentNode=e,e.nodeType){case r.NodeType.Element:this._serializeElement(e,t);break;case r.NodeType.Document:this._serializeDocument(e,t);break;case r.NodeType.Comment:this._serializeComment(e,t);break;case r.NodeType.Text:this._serializeText(e,t);break;case r.NodeType.DocumentFragment:this._serializeDocumentFragment(e,t);break;case r.NodeType.DocumentType:this._serializeDocumentType(e,t);break;case r.NodeType.ProcessingInstruction:this._serializeProcessingInstruction(e,t);break;case r.NodeType.CData:this._serializeCData(e,t);break;default:throw new Error(`Unknown node type: ${e.nodeType}`)}}_serializeElementNS(e,t,n,r,i){const o=[];if(i&&(-1!==e.localName.indexOf(":")||!(0,a.xml_isName)(e.localName)))throw new Error("Node local name contains invalid characters (well-formed required).");let l="",c=!1,d=!1,h=n.copy(),_={},m=this._recordNamespaceInformation(e,h,_),p=t,f=e.namespaceURI;if(p===f)null!==m&&(d=!0),l=f===s.namespace.XML?"xml:"+e.localName:e.localName,this.beginElement(l),this.openTagBegin(l);else{let t=e.prefix,n=null;if(null===t&&f===m||(n=h.get(t,f)),"xmlns"===t){if(i)throw new Error("An element cannot have the 'xmlns' prefix (well-formed required).");n=t}null!==n?(l=n+":"+e.localName,null!==m&&m!==s.namespace.XML&&(p=m||null),this.beginElement(l),this.openTagBegin(l)):null!==t?(t in _&&(t=this._generatePrefix(f,h,r)),h.set(t,f),l+=t+":"+e.localName,this.beginElement(l),this.openTagBegin(l),o.push([null,"xmlns",t,this._serializeAttributeValue(f,i)]),null!==m&&(p=m||null)):null===m||null!==m&&m!==f?(d=!0,l+=e.localName,p=f,this.beginElement(l),this.openTagBegin(l),o.push([null,null,"xmlns",this._serializeAttributeValue(f,i)])):(l+=e.localName,p=f,this.beginElement(l),this.openTagBegin(l))}o.push(...this._serializeAttributesNS(e,h,r,_,d,i)),this.attributes(o);const g=f===s.namespace.HTML;if(g&&0===e.childNodes.length&&u._VoidElementNames.has(e.localName)?(this.openTagEnd(l,!0,!0),this.endElement(l),c=!0):g||0!==e.childNodes.length?this.openTagEnd(l,!1,!1):(this.openTagEnd(l,!0,!1),this.endElement(l),c=!0),!c){if(g&&"template"===e.localName);else for(const t of e.childNodes)this.level++,this._serializeNodeNS(t,p,h,r,i),this.level--;this.closeTag(l),this.endElement(l)}}_serializeElement(e,t){if(t&&(-1!==e.localName.indexOf(":")||!(0,a.xml_isName)(e.localName)))throw new Error("Node local name contains invalid characters (well-formed required).");let n=!1;const r=e.localName;this.beginElement(r),this.openTagBegin(r);const i=this._serializeAttributes(e,t);if(this.attributes(i),e.hasChildNodes()?this.openTagEnd(r,!1,!1):(this.openTagEnd(r,!0,!1),this.endElement(r),n=!0),!n){for(const n of e._children)this.level++,this._serializeNode(n,t),this.level--;this.closeTag(r),this.endElement(r)}}_serializeDocumentNS(e,t,n,r,i){if(i&&null===e.documentElement)throw new Error("Missing document element (well-formed required).");for(const o of e.childNodes)this._serializeNodeNS(o,t,n,r,i)}_serializeDocument(e,t){if(t&&null===e.documentElement)throw new Error("Missing document element (well-formed required).");for(const n of e._children)this._serializeNode(n,t)}_serializeComment(e,t){if(t&&(!(0,a.xml_isLegalChar)(e.data)||-1!==e.data.indexOf("--")||e.data.endsWith("-")))throw new Error("Comment data contains invalid characters (well-formed required).");this.comment(e.data)}_serializeText(e,t){if(t&&!(0,a.xml_isLegalChar)(e.data))throw new Error("Text data contains invalid characters (well-formed required).");const n=e.data.replace(l.nonEntityAmpersandRegex,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");this.text(n)}_serializeDocumentFragmentNS(e,t,n,r,i){for(const o of e.childNodes)this._serializeNodeNS(o,t,n,r,i)}_serializeDocumentFragment(e,t){for(const n of e._children)this._serializeNode(n,t)}_serializeDocumentType(e,t){if(t&&!(0,a.xml_isPubidChar)(e.publicId))throw new Error("DocType public identifier does not match PubidChar construct (well-formed required).");if(t&&(!(0,a.xml_isLegalChar)(e.systemId)||-1!==e.systemId.indexOf('"')&&-1!==e.systemId.indexOf("'")))throw new Error("DocType system identifier contains invalid characters (well-formed required).");this.docType(e.name,e.publicId,e.systemId)}_serializeProcessingInstruction(e,t){if(t&&(-1!==e.target.indexOf(":")||/^xml$/i.test(e.target)))throw new Error("Processing instruction target contains invalid characters (well-formed required).");if(t&&(!(0,a.xml_isLegalChar)(e.data)||-1!==e.data.indexOf("?>")))throw new Error("Processing instruction data contains invalid characters (well-formed required).");this.instruction(e.target,e.data)}_serializeCData(e,t){if(t&&-1!==e.data.indexOf("]]>"))throw new Error("CDATA contains invalid characters (well-formed required).");this.cdata(e.data)}_serializeAttributesNS(e,t,n,r,o,l){const u=[],c=l?new i.LocalNameSet:void 0;for(const i of e.attributes){if(!l&&!o&&null===i.namespaceURI){u.push([null,null,i.localName,this._serializeAttributeValue(i.value,l)]);continue}if(l&&c&&c.has(i.namespaceURI,i.localName))throw new Error("Element contains duplicate attributes (well-formed required).");l&&c&&c.set(i.namespaceURI,i.localName);let e=i.namespaceURI,d=null;if(null!==e)if(d=t.get(i.prefix,e),e===s.namespace.XMLNS){if(i.value===s.namespace.XML||null===i.prefix&&o||null!==i.prefix&&(!(i.localName in r)||r[i.localName]!==i.value)&&t.has(i.localName,i.value))continue;if(l&&i.value===s.namespace.XMLNS)throw new Error("XMLNS namespace is reserved (well-formed required).");if(l&&""===i.value)throw new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required).");"xmlns"===i.prefix&&(d="xmlns")}else null===d&&(d=null===i.prefix||t.hasPrefix(i.prefix)&&!t.has(i.prefix,e)?this._generatePrefix(e,t,n):i.prefix,u.push([null,"xmlns",d,this._serializeAttributeValue(e,l)]));let h="";if(null!==d&&(h=d),l&&(-1!==i.localName.indexOf(":")||!(0,a.xml_isName)(i.localName)||"xmlns"===i.localName&&null===e))throw new Error("Attribute local name contains invalid characters (well-formed required).");u.push([e,d,i.localName,this._serializeAttributeValue(i.value,l)])}return u}_serializeAttributes(e,t){const n=[],r=t?{}:void 0;for(const i of e.attributes)if(t){if(t&&r&&i.localName in r)throw new Error("Element contains duplicate attributes (well-formed required).");if(t&&r&&(r[i.localName]=!0),t&&(-1!==i.localName.indexOf(":")||!(0,a.xml_isName)(i.localName)))throw new Error("Attribute local name contains invalid characters (well-formed required).");n.push([null,null,i.localName,this._serializeAttributeValue(i.value,t)])}else n.push([null,null,i.localName,this._serializeAttributeValue(i.value,t)]);return n}_recordNamespaceInformation(e,t,n){let r=null;for(const i of e.attributes){let e=i.namespaceURI,o=i.prefix;if(e===s.namespace.XMLNS){if(null===o){r=i.value;continue}{let e=i.localName,r=i.value;if(r===s.namespace.XML)continue;if(""===r&&(r=null),t.has(e,r))continue;t.set(e,r),n[e]=r||""}}}return r}_generatePrefix(e,t,n){const r="ns"+n.value.toString();return n.value++,t.set(r,e),r}_serializeAttributeValue(e,t){if(t&&null!==e&&!(0,a.xml_isLegalChar)(e))throw new Error("Invalid characters in attribute value.");return null===e?"":e.replace(l.nonEntityAmpersandRegex,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}}t.BaseWriter=u},60883:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.JSONCBWriter=void 0;const r=n(63100);class i extends r.BaseCBWriter{_hasChildren=[];_additionalLevel=0;constructor(e){super(e)}frontMatter(){return""}declaration(e,t,n){return""}docType(e,t,n){return""}comment(e){return this._comma()+this._beginLine()+"{"+this._sep()+this._key(this._builderOptions.convert.comment)+this._sep()+this._val(e)+this._sep()+"}"}text(e){return this._comma()+this._beginLine()+"{"+this._sep()+this._key(this._builderOptions.convert.text)+this._sep()+this._val(e)+this._sep()+"}"}instruction(e,t){return this._comma()+this._beginLine()+"{"+this._sep()+this._key(this._builderOptions.convert.ins)+this._sep()+this._val(t?e+" "+t:e)+this._sep()+"}"}cdata(e){return this._comma()+this._beginLine()+"{"+this._sep()+this._key(this._builderOptions.convert.cdata)+this._sep()+this._val(e)+this._sep()+"}"}attribute(e,t){return this._comma()+this._beginLine(1)+"{"+this._sep()+this._key(this._builderOptions.convert.att+e)+this._sep()+this._val(t)+this._sep()+"}"}openTagBegin(e){let t=this._comma()+this._beginLine()+"{"+this._sep()+this._key(e)+this._sep()+"{";return this._additionalLevel++,this.hasData=!0,t+=this._beginLine()+this._key(this._builderOptions.convert.text)+this._sep()+"[",this._hasChildren.push(!1),t}openTagEnd(e,t,n){if(t){let e=this._sep()+"]";return this._additionalLevel--,e+=this._beginLine()+"}"+this._sep()+"}",e}return""}closeTag(e){let t=this._beginLine()+"]";return this._additionalLevel--,t+=this._beginLine()+"}"+this._sep()+"}",t}beginElement(e){}endElement(e){this._hasChildren.pop()}_beginLine(e=0){return this._writerOptions.prettyPrint?(this.hasData?this._writerOptions.newline:"")+this._indent(this._writerOptions.offset+this.level+e):""}_indent(e){return e+this._additionalLevel<=0?"":this._writerOptions.indent.repeat(e+this._additionalLevel)}_comma(){const e=this._hasChildren[this._hasChildren.length-1]?",":"";return this._hasChildren.length>0&&(this._hasChildren[this._hasChildren.length-1]=!0),e}_sep(){return this._writerOptions.prettyPrint?" ":""}_key(e){return'"'+e+'":'}_val(e){return JSON.stringify(e)}}t.JSONCBWriter=i},60446:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.JSONWriter=void 0;const r=n(60975),i=n(92539),o=n(28693);class s extends o.BaseWriter{constructor(e,t){super(e),this._writerOptions=(0,i.applyDefaults)(t,{wellFormed:!1,prettyPrint:!1,indent:" ",newline:"\n",offset:0,group:!1,verbose:!1})}serialize(e){const t=(0,i.applyDefaults)(this._writerOptions,{format:"object",wellFormed:!1}),n=new r.ObjectWriter(this._builderOptions,t),o=n.serialize(e);return this._beginLine(this._writerOptions,0)+this._convertObject(o,this._writerOptions)}_convertObject(e,t,n=0){let r="";const o=this._isLeafNode(e);if((0,i.isArray)(e)){r+="[";const i=e.length;let o=0;for(const s of e)r+=this._endLine(t,n+1)+this._beginLine(t,n+1)+this._convertObject(s,t,n+1),o<i-1&&(r+=","),o++;r+=this._endLine(t,n)+this._beginLine(t,n),r+="]"}else if((0,i.isObject)(e)){r+="{";const s=(0,i.objectLength)(e);let a=0;(0,i.forEachObject)(e,(e,i)=>{o&&t.prettyPrint?r+=" ":r+=this._endLine(t,n+1)+this._beginLine(t,n+1),r+=this._key(e),t.prettyPrint&&(r+=" "),r+=this._convertObject(i,t,n+1),a<s-1&&(r+=","),a++},this),o&&t.prettyPrint?r+=" ":r+=this._endLine(t,n)+this._beginLine(t,n),r+="}"}else r+=this._val(e);return r}_beginLine(e,t){if(!e.prettyPrint)return"";{const n=e.offset+t+1;if(n>0)return new Array(n).join(e.indent)}return""}_endLine(e,t){return e.prettyPrint?e.newline:""}_key(e){return'"'+e+'":'}_val(e){return JSON.stringify(e)}_isLeafNode(e){return this._descendantCount(e)<=1}_descendantCount(e,t=0){return(0,i.isArray)(e)?(0,i.forEachArray)(e,e=>t+=this._descendantCount(e,t),this):(0,i.isObject)(e)?(0,i.forEachObject)(e,(e,n)=>t+=this._descendantCount(n,t),this):t++,t}}t.JSONWriter=s},80722:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.MapWriter=void 0;const r=n(92539),i=n(60975),o=n(28693);class s extends o.BaseWriter{constructor(e,t){super(e),this._writerOptions=(0,r.applyDefaults)(t,{format:"map",wellFormed:!1,group:!1,verbose:!1})}serialize(e){const t=(0,r.applyDefaults)(this._writerOptions,{format:"object",wellFormed:!1,verbose:!1}),n=new i.ObjectWriter(this._builderOptions,t),o=n.serialize(e);return this._convertObject(o)}_convertObject(e){if((0,r.isArray)(e)){for(let t=0;t<e.length;t++)e[t]=this._convertObject(e[t]);return e}if((0,r.isObject)(e)){const t=new Map;for(const n in e)t.set(n,this._convertObject(e[n]));return t}return e}}t.MapWriter=s},60975:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectWriter=void 0;const r=n(92539),i=n(50912),o=n(28693);class s extends o.BaseWriter{_currentList;_currentIndex;_listRegister;constructor(e,t){super(e),this._writerOptions=(0,r.applyDefaults)(t,{format:"object",wellFormed:!1,group:!1,verbose:!1})}serialize(e){return this._currentList=[],this._currentIndex=0,this._listRegister=[this._currentList],this.serializeNode(e,this._writerOptions.wellFormed),this._process(this._currentList,this._writerOptions)}_process(e,t){if(0===e.length)return{};const n={};let o=!1,s=0,a=0,l=0,u=0;for(let r=0;r<e.length;r++){const t=e[r],i=Object.keys(t)[0];switch(i){case"@":continue;case"#":s++;break;case"!":a++;break;case"?":l++;break;case"$":u++;break;default:n[i]?o=!0:n[i]=!0;break}}const c=this._getAttrKey(),d=this._getNodeKey(i.NodeType.Text),h=this._getNodeKey(i.NodeType.Comment),_=this._getNodeKey(i.NodeType.ProcessingInstruction),m=this._getNodeKey(i.NodeType.CData);if(1===s&&1===e.length&&(0,r.isString)(e[0]["#"]))return e[0]["#"];if(o){const n={};for(let r=0;r<e.length;r++){const i=e[r],o=Object.keys(i)[0];if("@"===o){const e=i["@"],r=Object.keys(e);if(t.group&&1!==r.length)n[c]=e;else for(const t in e)n[c+t]=e[t]}}const i=[];for(let o=0;o<e.length;o++){const n=e[o],s=Object.keys(n)[0];switch(s){case"@":break;case"#":i.push({[d]:n["#"]});break;case"!":i.push({[h]:n["!"]});break;case"?":i.push({[_]:n["?"]});break;case"$":i.push({[m]:n["$"]});break;default:const e=n;if(0!==e[s].length&&(0,r.isArray)(e[s][0])){const n=[],r=e[s];for(let e=0;e<r.length;e++)n.push(this._process(r[e],t));i.push({[s]:n})}else t.verbose?i.push({[s]:[this._process(e[s],t)]}):i.push({[s]:this._process(e[s],t)});break}}return n[d]=i,n}{let n=1,i=1,o=1,p=1;const f={};for(let g=0;g<e.length;g++){const N=e[g],b=Object.keys(N)[0];switch(b){case"@":const e=N["@"],g=Object.keys(e);if(t.group&&1!==g.length)f[c]=e;else for(const t in e)f[c+t]=e[t];break;case"#":n=this._processSpecItem(N["#"],f,t.group,d,s,n);break;case"!":i=this._processSpecItem(N["!"],f,t.group,h,a,i);break;case"?":o=this._processSpecItem(N["?"],f,t.group,_,l,o);break;case"$":p=this._processSpecItem(N["$"],f,t.group,m,u,p);break;default:const v=N;if(0!==v[b].length&&(0,r.isArray)(v[b][0])){const e=[],n=v[b];for(let r=0;r<n.length;r++)e.push(this._process(n[r],t));f[b]=e}else t.verbose?f[b]=[this._process(v[b],t)]:f[b]=this._process(v[b],t);break}}return f}}_processSpecItem(e,t,n,i,o,s){if(!n&&(0,r.isArray)(e)&&o+e.length>2)for(const r of e){const e=i+(s++).toString();t[e]=r}else{const n=o>1?i+(s++).toString():i;t[n]=e}return s}beginElement(e){const t=[];if(0===this._currentList.length)this._currentList.push({[e]:t});else{const n=this._currentList[this._currentList.length-1];if(this._isElementNode(n,e))if(0!==n[e].length&&(0,r.isArray)(n[e][0])){const r=n[e];r.push(t)}else n[e]=[n[e],t];else this._currentList.push({[e]:t})}this._currentIndex++,this._listRegister.length>this._currentIndex?this._listRegister[this._currentIndex]=t:this._listRegister.push(t),this._currentList=t}endElement(){this._currentList=this._listRegister[--this._currentIndex]}attribute(e,t){if(0===this._currentList.length)this._currentList.push({"@":{[e]:t}});else{const n=this._currentList[this._currentList.length-1];this._isAttrNode(n)?n["@"][e]=t:this._currentList.push({"@":{[e]:t}})}}comment(e){if(0===this._currentList.length)this._currentList.push({"!":e});else{const t=this._currentList[this._currentList.length-1];this._isCommentNode(t)?(0,r.isArray)(t["!"])?t["!"].push(e):t["!"]=[t["!"],e]:this._currentList.push({"!":e})}}text(e){if(0===this._currentList.length)this._currentList.push({"#":e});else{const t=this._currentList[this._currentList.length-1];this._isTextNode(t)?(0,r.isArray)(t["#"])?t["#"].push(e):t["#"]=[t["#"],e]:this._currentList.push({"#":e})}}instruction(e,t){const n=""===t?e:e+" "+t;if(0===this._currentList.length)this._currentList.push({"?":n});else{const e=this._currentList[this._currentList.length-1];this._isInstructionNode(e)?(0,r.isArray)(e["?"])?e["?"].push(n):e["?"]=[e["?"],n]:this._currentList.push({"?":n})}}cdata(e){if(0===this._currentList.length)this._currentList.push({$:e});else{const t=this._currentList[this._currentList.length-1];this._isCDATANode(t)?(0,r.isArray)(t["$"])?t["$"].push(e):t["$"]=[t["$"],e]:this._currentList.push({$:e})}}_isAttrNode(e){return"@"in e}_isTextNode(e){return"#"in e}_isCommentNode(e){return"!"in e}_isInstructionNode(e){return"?"in e}_isCDATANode(e){return"$"in e}_isElementNode(e,t){return t in e}_getAttrKey(){return this._builderOptions.convert.att}_getNodeKey(e){switch(e){case i.NodeType.Comment:return this._builderOptions.convert.comment;case i.NodeType.Text:return this._builderOptions.convert.text;case i.NodeType.ProcessingInstruction:return this._builderOptions.convert.ins;case i.NodeType.CData:return this._builderOptions.convert.cdata;default:throw new Error("Invalid node type.")}}}t.ObjectWriter=s},17744:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.XMLCBWriter=void 0;const r=n(63100);class i extends r.BaseCBWriter{_lineLength=0;constructor(e){super(e)}frontMatter(){return""}declaration(e,t,n){let r=this._beginLine()+"<?xml";return r+=' version="'+e+'"',void 0!==t&&(r+=' encoding="'+t+'"'),void 0!==n&&(r+=' standalone="'+(n?"yes":"no")+'"'),r+="?>",r}docType(e,t,n){let r=this._beginLine();return r+=t&&n?"<!DOCTYPE "+e+' PUBLIC "'+t+'" "'+n+'">':t?"<!DOCTYPE "+e+' PUBLIC "'+t+'">':n?"<!DOCTYPE "+e+' SYSTEM "'+n+'">':"<!DOCTYPE "+e+">",r}comment(e){return this._beginLine()+"\x3c!--"+e+"--\x3e"}text(e){return this._beginLine()+e}instruction(e,t){return t?this._beginLine()+"<?"+e+" "+t+"?>":this._beginLine()+"<?"+e+"?>"}cdata(e){return this._beginLine()+"<![CDATA["+e+"]]>"}openTagBegin(e){return this._lineLength+=1+e.length,this._beginLine()+"<"+e}openTagEnd(e,t,n){return n?" />":t?this._writerOptions.allowEmptyTags?"></"+e+">":this._writerOptions.spaceBeforeSlash?" />":"/>":">"}closeTag(e){return this._beginLine()+"</"+e+">"}attribute(e,t){let n=e+'="'+t+'"';return this._writerOptions.prettyPrint&&this._writerOptions.width>0&&this._lineLength+1+n.length>this._writerOptions.width?(n=this._beginLine()+this._indent(1)+n,this._lineLength=n.length,n):(this._lineLength+=1+n.length," "+n)}beginElement(e){}endElement(e){}_beginLine(){if(this._writerOptions.prettyPrint){const e=(this.hasData?this._writerOptions.newline:"")+this._indent(this._writerOptions.offset+this.level);return this._lineLength=e.length,e}return""}_indent(e){return e<=0?"":this._writerOptions.indent.repeat(e)}}t.XMLCBWriter=i},10377:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.XMLWriter=void 0;const r=n(92539),i=n(50912),o=n(28693),s=n(25986);class a extends o.BaseWriter{_refs;_indentation={};_lengthToLastNewline=0;constructor(e,t){super(e),this._writerOptions=(0,r.applyDefaults)(t,{wellFormed:!1,headless:!1,prettyPrint:!1,indent:" ",newline:"\n",offset:0,width:0,allowEmptyTags:!1,indentTextOnlyNodes:!1,spaceBeforeSlash:!1})}serialize(e){return this._refs={suppressPretty:!1,emptyNode:!1,markup:""},e.nodeType!==i.NodeType.Document||this._writerOptions.headless||this.declaration(this._builderOptions.version,this._builderOptions.encoding,this._builderOptions.standalone),this.serializeNode(e,this._writerOptions.wellFormed),this._writerOptions.prettyPrint&&this._refs.markup.slice(-this._writerOptions.newline.length)===this._writerOptions.newline&&(this._refs.markup=this._refs.markup.slice(0,-this._writerOptions.newline.length)),this._refs.markup}declaration(e,t,n){this._beginLine(),this._refs.markup+='<?xml version="'+e+'"',void 0!==t&&(this._refs.markup+=' encoding="'+t+'"'),void 0!==n&&(this._refs.markup+=' standalone="'+(n?"yes":"no")+'"'),this._refs.markup+="?>",this._endLine()}docType(e,t,n){this._beginLine(),this._refs.markup+=t&&n?"<!DOCTYPE "+e+' PUBLIC "'+t+'" "'+n+'">':t?"<!DOCTYPE "+e+' PUBLIC "'+t+'">':n?"<!DOCTYPE "+e+' SYSTEM "'+n+'">':"<!DOCTYPE "+e+">",this._endLine()}openTagBegin(e){this._beginLine(),this._refs.markup+="<"+e}openTagEnd(e,t,n){if(this._refs.suppressPretty=!1,this._refs.emptyNode=!1,this._writerOptions.prettyPrint&&!t&&!n){let e=!0,t=!0,n=this.currentNode.firstChild,r=0,i=0;while(n){if(s.Guard.isExclusiveTextNode(n))i++;else{if(!s.Guard.isCDATASectionNode(n)){e=!1,t=!1;break}r++}""!==n.data&&(t=!1),n=n.nextSibling}this._refs.suppressPretty=!this._writerOptions.indentTextOnlyNodes&&e&&(r<=1&&0===i||0===r),this._refs.emptyNode=t}(n||t||this._refs.emptyNode)&&this._writerOptions.allowEmptyTags?this._refs.markup+="></"+e+">":this._refs.markup+=n?" />":t||this._refs.emptyNode?this._writerOptions.spaceBeforeSlash?" />":"/>":">",this._endLine()}closeTag(e){this._refs.emptyNode||(this._beginLine(),this._refs.markup+="</"+e+">"),this._refs.suppressPretty=!1,this._refs.emptyNode=!1,this._endLine()}attribute(e,t){const n=e+'="'+t+'"';this._writerOptions.prettyPrint&&this._writerOptions.width>0&&this._refs.markup.length-this._lengthToLastNewline+1+n.length>this._writerOptions.width?(this._endLine(),this._beginLine(),this._refs.markup+=this._indent(1)+n):this._refs.markup+=" "+n}text(e){""!==e&&(this._beginLine(),this._refs.markup+=e,this._endLine())}cdata(e){""!==e&&(this._beginLine(),this._refs.markup+="<![CDATA["+e+"]]>",this._endLine())}comment(e){this._beginLine(),this._refs.markup+="\x3c!--"+e+"--\x3e",this._endLine()}instruction(e,t){this._beginLine(),this._refs.markup+="<?"+(""===t?e:e+" "+t)+"?>",this._endLine()}_beginLine(){this._writerOptions.prettyPrint&&!this._refs.suppressPretty&&(this._refs.markup+=this._indent(this._writerOptions.offset+this.level))}_endLine(){this._writerOptions.prettyPrint&&!this._refs.suppressPretty&&(this._refs.markup+=this._writerOptions.newline,this._lengthToLastNewline=this._refs.markup.length)}_indent(e){if(e<=0)return"";if(void 0!==this._indentation[e])return this._indentation[e];{const t=this._writerOptions.indent.repeat(e);return this._indentation[e]=t,t}}}t.XMLWriter=a},4734:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.YAMLCBWriter=void 0;const r=n(63100);class i extends r.BaseCBWriter{_rootWritten=!1;_additionalLevel=0;constructor(e){if(super(e),e.indent.length<2)throw new Error("YAML indententation string must be at least two characters long.");if(e.offset<0)throw new Error("YAML offset should be zero or a positive number.")}frontMatter(){return this._beginLine()+"---"}declaration(e,t,n){return""}docType(e,t,n){return""}comment(e){return this._beginLine()+this._key(this._builderOptions.convert.comment)+" "+this._val(e)}text(e){return this._beginLine()+this._key(this._builderOptions.convert.text)+" "+this._val(e)}instruction(e,t){return this._beginLine()+this._key(this._builderOptions.convert.ins)+" "+this._val(t?e+" "+t:e)}cdata(e){return this._beginLine()+this._key(this._builderOptions.convert.cdata)+" "+this._val(e)}attribute(e,t){this._additionalLevel++;const n=this._beginLine()+this._key(this._builderOptions.convert.att+e)+" "+this._val(t);return this._additionalLevel--,n}openTagBegin(e){let t=this._beginLine()+this._key(e);return this._rootWritten||(this._rootWritten=!0),this.hasData=!0,this._additionalLevel++,t+=this._beginLine(!0)+this._key(this._builderOptions.convert.text),t}openTagEnd(e,t,n){return t?" "+this._val(""):""}closeTag(e){return this._additionalLevel--,""}beginElement(e){}endElement(e){}_beginLine(e=!1){return(this.hasData?this._writerOptions.newline:"")+this._indent(this._writerOptions.offset+this.level,e)}_indent(e,t){if(e+this._additionalLevel<=0)return"";{const n=this._writerOptions.indent.repeat(e+this._additionalLevel);return!t&&this._rootWritten?n.substr(0,n.length-2)+"-"+n.substr(-1,1):n}}_key(e){return'"'+e+'":'}_val(e){return JSON.stringify(e)}}t.YAMLCBWriter=i},79023:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.YAMLWriter=void 0;const r=n(60975),i=n(92539),o=n(28693);class s extends o.BaseWriter{constructor(e,t){if(super(e),this._writerOptions=(0,i.applyDefaults)(t,{wellFormed:!1,indent:" ",newline:"\n",offset:0,group:!1,verbose:!1}),this._writerOptions.indent.length<2)throw new Error("YAML indententation string must be at least two characters long.");if(this._writerOptions.offset<0)throw new Error("YAML offset should be zero or a positive number.")}serialize(e){const t=(0,i.applyDefaults)(this._writerOptions,{format:"object",wellFormed:!1}),n=new r.ObjectWriter(this._builderOptions,t),o=n.serialize(e);let s=this._beginLine(this._writerOptions,0)+"---"+this._endLine(this._writerOptions)+this._convertObject(o,this._writerOptions,0);return s.slice(-this._writerOptions.newline.length)===this._writerOptions.newline&&(s=s.slice(0,-this._writerOptions.newline.length)),s}_convertObject(e,t,n,r=!1){let o="";if((0,i.isArray)(e))for(const s of e)o+=this._beginLine(t,n,!0),(0,i.isObject)(s)?(0,i.isEmpty)(s)?o+='""'+this._endLine(t):o+=this._convertObject(s,t,n,!0):o+=this._val(s)+this._endLine(t);else(0,i.forEachObject)(e,(e,s)=>{r?(o+=this._key(e),r=!1):o+=this._beginLine(t,n)+this._key(e),(0,i.isObject)(s)||(0,i.isArray)(s)?(0,i.isEmpty)(s)?o+=' ""'+this._endLine(t):o+=this._endLine(t)+this._convertObject(s,t,n+1):o+=" "+this._val(s)+this._endLine(t)},this);return o}_beginLine(e,t,n=!1){const r=e.offset+t+1,i=new Array(r).join(e.indent);return n?i.substr(0,i.length-2)+"-"+i.substr(-1,1):i}_endLine(e){return e.newline}_key(e){return'"'+e+'":'}_val(e){return JSON.stringify(e)}}t.YAMLWriter=s},26715:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.YAMLWriter=t.JSONWriter=t.ObjectWriter=t.XMLWriter=t.MapWriter=void 0;var r=n(80722);Object.defineProperty(t,"MapWriter",{enumerable:!0,get:function(){return r.MapWriter}});var i=n(10377);Object.defineProperty(t,"XMLWriter",{enumerable:!0,get:function(){return i.XMLWriter}});var o=n(60975);Object.defineProperty(t,"ObjectWriter",{enumerable:!0,get:function(){return o.ObjectWriter}});var s=n(60446);Object.defineProperty(t,"JSONWriter",{enumerable:!0,get:function(){return s.JSONWriter}});var a=n(79023);Object.defineProperty(t,"YAMLWriter",{enumerable:!0,get:function(){return a.YAMLWriter}})}}]);
//# sourceMappingURL=harvester-1.9.0-dev.umd.min.xccdf.js.map