@github/copilot 0.0.340-12 → 0.0.340-13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/sdk/index.js CHANGED
@@ -927,7 +927,7 @@ this.Function = globalThis.Function;
927
927
  `,this.errorIndex=this.startTagIndex),this.readState=it.error,this.removeOverflowingTextNodes();return}}if(this.nextElement[DI]&&!this.nextElement[Ce]){this.errorMessage=`Namespace prefix ${this.nextElement[DI]} on name is not defined
928
928
  `,this.errorIndex=this.lastIndex,this.readState=it.error;return}if(this.currentNode===this.rootNode&&this.rootNode[oI].length!==0){this.errorMessage=`Extra content at the end of the document
929
929
  `,this.errorIndex=this.lastIndex-this.nextElement[ve].length-1,this.readState=it.error;return}this.currentNode[FI](this.nextElement,!0),I||(this.currentNode=this.nextElement,this.nodeStack.push(this.currentNode),this.tagNameStack.push(this.nextTagName),this.currentNode[Ce]&&!this.currentNode[DI]?this.defaultNamespaceStack.push(this.currentNode[Ce]):this.defaultNamespaceStack.push(this.defaultNamespaceStack[this.defaultNamespaceStack.length-1])),this.nextElement=null,this.nextTagName=null,this.readState=it.any,this.startTagIndex=this.markupRegExp.lastIndex}parseEndTag(e){return this.tagNameStack[this.tagNameStack.length-1]===e?(this.nodeStack.pop(),this.tagNameStack.pop(),this.namespacePrefixStack.pop(),this.defaultNamespaceStack.pop(),this.currentNode=this.nodeStack[this.nodeStack.length-1]||this.rootNode,!0):!1}parseError(e,I){let l=this.rootNode.documentElement;if(!l){let r=this.rootNode.createElementNS(lt.html,"html"),o=this.rootNode.createElementNS(lt.html,"body");r.appendChild(o),l=o,this.rootNode[FI](r,!0)}let n=e.split(`
930
- `),c=n[n.length-1].length+1,a=`error on line ${n.length} at column ${c}: ${I||"Unknown error"}`,s=this.rootNode.createElementNS(lt.html,"parsererror");s.setAttribute("style","display: block; white-space: pre; border: 2px solid #c77; padding: 0 1em 0 1em; margin: 1em; background-color: #fdd; color: black"),s.innerHTML=`<h3>This page contains the following errors:</h3><div style="font-family:monospace;font-size:12px">${a}</div><h3>Below is a rendering of the page up to the first error.</h3>`,l.insertBefore(s,l.firstChild)}removeOverflowingTextNodes(){if(this.currentNode&&this.currentNode!==this.rootNode)for(;this.currentNode.lastChild?.[se]===dI.TEXT_NODE;)this.currentNode.removeChild(this.currentNode.lastChild)}getDocumentType(e){if(!e.toUpperCase().startsWith("DOCTYPE"))return null;let I=e.split(Kk);if(I.length<=1)return null;let l=I.slice(1).join(" "),n=[],c=new RegExp(U4I,"gm"),a=l.toUpperCase().includes("PUBLIC"),s;for(;s=c.exec(l);)n.push(s[1]);let r=a&&n[0]||"",o=a?n[1]||"":n[0]||"";return{name:I[1].toLowerCase(),publicId:r,systemId:o}}};var TH=class{parseFromString(e,I){if(!I)throw new this[W].DOMException('Second parameter "mimeType" is mandatory.');let l=this[W];switch(I){case"text/html":let n=new l.HTMLDocument;return n[ks]=l,new ca(this[W]).parse(e,n);case"image/svg+xml":case"text/xml":case"application/xml":case"application/xhtml+xml":return new MH(this[W]).parse(e);default:throw new l.DOMException(`Unknown mime type "${I}".`)}}};G();G();var Bie;(function(t){t[t.endToEnd=2]="endToEnd",t[t.endToStart=3]="endToStart",t[t.startToEnd=1]="startToEnd",t[t.startToStart=0]="startToStart"})(Bie||(Bie={}));var yc=Bie;var jH=class{static END_TO_END=yc.endToEnd;static END_TO_START=yc.endToStart;static START_TO_END=yc.startToEnd;static START_TO_START=yc.startToStart;END_TO_END=yc.endToEnd;END_TO_START=yc.endToStart;START_TO_END=yc.startToEnd;START_TO_START=yc.startToStart;[re];[ue];[O];constructor(){let e=this[W];if(!e)throw new TypeError(`Failed to construct '${this.constructor.name}': '${this.constructor.name}' was constructed outside a Window context.`);this[O]=e.document,this[re]={node:e.document,offset:0},this[ue]={node:e.document,offset:0}}get startContainer(){return this[re].node}get endContainer(){return this[ue].node}get startOffset(){if(this[re].offset>0){let e=pI.getNodeLength(this[re].node);this[re].offset>e&&(this[re].offset=e)}return this[re].offset}get endOffset(){if(this[ue].offset>0){let e=pI.getNodeLength(this[ue].node);this[ue].offset>e&&(this[ue].offset=e)}return this[ue].offset}get collapsed(){return this[re].node===this[ue].node&&this.startOffset===this.endOffset}get commonAncestorContainer(){let e=this[re].node;for(;e;){if(pI.isInclusiveAncestor(e,this[ue].node))return e;e=e[he]}return null}collapse(e=!1){e?this[ue]=Object.assign({},this[re]):this[re]=Object.assign({},this[ue])}compareBoundaryPoints(e,I){if(e!==yc.startToStart&&e!==yc.startToEnd&&e!==yc.endToEnd&&e!==yc.endToStart)throw new this[W].DOMException(`The comparison method provided must be one of '${yc.startToStart}', '${yc.startToEnd}', '${yc.endToEnd}' or '${yc.endToStart}'.`,B.notSupportedError);if(this[O]!==I[O])throw new this[W].DOMException("The two Ranges are not in the same tree.",B.wrongDocumentError);let l={node:null,offset:0},n={node:null,offset:0};switch(e){case yc.startToStart:l.node=this[re].node,l.offset=this.startOffset,n.node=I[re].node,n.offset=I.startOffset;break;case yc.startToEnd:l.node=this[ue].node,l.offset=this.endOffset,n.node=I[re].node,n.offset=I.startOffset;break;case yc.endToEnd:l.node=this[ue].node,l.offset=this.endOffset,n.node=I[ue].node,n.offset=I.endOffset;break;case yc.endToStart:l.node=this[re].node,l.offset=this.startOffset,n.node=I[ue].node,n.offset=I.endOffset;break}return ll.compareBoundaryPointsPosition(l,n)}comparePoint(e,I){if(e[O]!==this[O])throw new this[W].DOMException("The two Ranges are not in the same tree.",B.wrongDocumentError);ll.validateBoundaryPoint({node:e,offset:I});let l={node:e,offset:I};return ll.compareBoundaryPointsPosition(l,{node:this[re].node,offset:this.startOffset})===-1?-1:ll.compareBoundaryPointsPosition(l,{node:this[ue].node,offset:this.endOffset})===1?1:0}cloneContents(){let e=this[W],I=this[O].createDocumentFragment(),l=this.startOffset,n=this.endOffset;if(this.collapsed)return I;if(this[re].node===this[ue].node&&(this[re].node[se]===D.textNode||this[re].node[se]===D.processingInstructionNode||this[re].node[se]===D.commentNode)){let o=this[re].node.cloneNode(!1);return o[ft]=o.substringData(l,n-l),I.appendChild(o),I}let c=this[re].node;for(;!pI.isInclusiveAncestor(c,this[ue].node);)c=c[he];let a=null;if(!pI.isInclusiveAncestor(this[re].node,this[ue].node)){let o=c.firstChild;for(;!a;)ll.isPartiallyContained(o,this)&&(a=o),o=o.nextSibling}let s=null;if(!pI.isInclusiveAncestor(this[ue].node,this[re].node)){let o=c.lastChild;for(;!s;)ll.isPartiallyContained(o,this)&&(s=o),o=o.previousSibling}let r=[];for(let o of c[be])if(ll.isContained(o,this)){if(o[se]===D.documentTypeNode)throw new e.DOMException("Invalid document type element.",B.hierarchyRequestError);r.push(o)}if(a!==null&&(a[se]===D.textNode||a[se]===D.processingInstructionNode||a[se]===D.commentNode)){let o=this[re].node.cloneNode(!1);o[ft]=o.substringData(l,pI.getNodeLength(this[re].node)-l),I.appendChild(o)}else if(a!==null){let o=a.cloneNode();I.appendChild(o);let d=new e.Range;d[re].node=this[re].node,d[re].offset=l,d[ue].node=a,d[ue].offset=pI.getNodeLength(a);let i=d.cloneContents();o.appendChild(i)}for(let o of r){let d=o.cloneNode(!0);I.appendChild(d)}if(s!==null&&(s[se]===D.textNode||s[se]===D.processingInstructionNode||s[se]===D.commentNode)){let o=this[ue].node.cloneNode(!1);o[ft]=o.substringData(0,n),I.appendChild(o)}else if(s!==null){let o=s.cloneNode(!1);I.appendChild(o);let d=new e.Range;d[re].node=s,d[re].offset=0,d[ue].node=this[ue].node,d[ue].offset=n;let i=d.cloneContents();o.appendChild(i)}return I}cloneRange(){let e=new this[W].Range;return e[re].node=this[re].node,e[re].offset=this[re].offset,e[ue].node=this[ue].node,e[ue].offset=this[ue].offset,e}createContextualFragment(e){return new ca(this[W]).parse(e)}deleteContents(){let e=this.startOffset,I=this.endOffset;if(this.collapsed)return;if(this[re].node===this[ue].node&&(this[re].node[se]===D.textNode||this[re].node[se]===D.processingInstructionNode||this[re].node[se]===D.commentNode)){this[re].node.replaceData(e,I-e,"");return}let l=[],n=this[re].node,c=pI.nextDescendantNode(this[ue].node);for(;n&&n!==c;)ll.isContained(n,this)&&!ll.isContained(n[he],this)&&l.push(n),n=pI.following(n);let a,s;if(pI.isInclusiveAncestor(this[re].node,this[ue].node))a=this[re].node,s=e;else{let r=this[re].node;for(;r&&!pI.isInclusiveAncestor(r[he],this[ue].node);)r=r[he];a=r[he],s=r[he][be].indexOf(r)+1}(this[re].node[se]===D.textNode||this[re].node[se]===D.processingInstructionNode||this[re].node[se]===D.commentNode)&&this[re].node.replaceData(this.startOffset,pI.getNodeLength(this[re].node)-this.startOffset,"");for(let r of l)r[he].removeChild(r);(this[ue].node[se]===D.textNode||this[ue].node[se]===D.processingInstructionNode||this[ue].node[se]===D.commentNode)&&this[ue].node.replaceData(0,I,""),this[re].node=a,this[re].offset=s,this[ue].node=a,this[ue].offset=s}detach(){}extractContents(){let e=this[W],I=this[O].createDocumentFragment(),l=this.startOffset,n=this.endOffset;if(this.collapsed)return I;if(this[re].node===this[ue].node&&(this[re].node[se]===D.textNode||this[re].node[se]===D.processingInstructionNode||this[re].node[se]===D.commentNode)){let i=this[re].node.cloneNode(!1);return i[ft]=i.substringData(l,n-l),I.appendChild(i),this[re].node.replaceData(l,n-l,""),I}let c=this[re].node;for(;!pI.isInclusiveAncestor(c,this[ue].node);)c=c[he];let a=null;if(!pI.isInclusiveAncestor(this[re].node,this[ue].node)){let i=c.firstChild;for(;!a;)ll.isPartiallyContained(i,this)&&(a=i),i=i.nextSibling}let s=null;if(!pI.isInclusiveAncestor(this[ue].node,this[re].node)){let i=c.lastChild;for(;!s;)ll.isPartiallyContained(i,this)&&(s=i),i=i.previousSibling}let r=[];for(let i of c[be])if(ll.isContained(i,this)){if(i[se]===D.documentTypeNode)throw new this[W].DOMException("Invalid document type element.",B.hierarchyRequestError);r.push(i)}let o,d;if(pI.isInclusiveAncestor(this[re].node,this[ue].node))o=this[re].node,d=l;else{let i=this[re].node;for(;i&&!pI.isInclusiveAncestor(i[he],this[ue].node);)i=i[he];o=i[he],d=i[he][be].indexOf(i)+1}if(a!==null&&(a[se]===D.textNode||a[se]===D.processingInstructionNode||a[se]===D.commentNode)){let i=this[re].node.cloneNode(!1);i[ft]=i.substringData(l,pI.getNodeLength(this[re].node)-l),I.appendChild(i),this[re].node.replaceData(l,pI.getNodeLength(this[re].node)-l,"")}else if(a!==null){let i=a.cloneNode(!1);I.appendChild(i);let h=new e.Range;h[re].node=this[re].node,h[re].offset=l,h[ue].node=a,h[ue].offset=pI.getNodeLength(a);let p=h.extractContents();i.appendChild(p)}for(let i of r)I.appendChild(i);if(s!==null&&(s[se]===D.textNode||s[se]===D.processingInstructionNode||s[se]===D.commentNode)){let i=this[ue].node.cloneNode(!1);i[ft]=i.substringData(0,n),I.appendChild(i),this[ue].node.replaceData(0,n,"")}else if(s!==null){let i=s.cloneNode(!1);I.appendChild(i);let h=new e.Range;h[re].node=s,h[re].offset=0,h[ue].node=this[ue].node,h[ue].offset=n;let p=h.extractContents();i.appendChild(p)}return this[re].node=o,this[re].offset=d,this[ue].node=o,this[ue].offset=d,I}getBoundingClientRect(){return new Dd}getClientRects(){return new n0(V)}isPointInRange(e,I=0){if(e[O]!==this[O])return!1;let l={node:e,offset:I};return ll.validateBoundaryPoint(l),!(ll.compareBoundaryPointsPosition(l,{node:this[re].node,offset:this.startOffset})===-1||ll.compareBoundaryPointsPosition(l,{node:this[ue].node,offset:this.endOffset})===1)}insertNode(e){if(this[re].node[se]===D.processingInstructionNode||this[re].node[se]===D.commentNode||this[re].node[se]===D.textNode&&!this[re].node[he]||e===this[re].node)throw new this[W].DOMException("Invalid start node.",B.hierarchyRequestError);let I=this[re].node[se]===D.textNode?this[re].node:this[re].node[be][this.startOffset]||null,l=I?I[he]:this[re].node;this[re].node[se]===D.textNode&&(I=this[re].node.splitText(this.startOffset)),e===I&&(I=I.nextSibling);let n=e[he];n&&n.removeChild(e);let c=I?I[he][be].indexOf(I):pI.getNodeLength(l);c+=e[se]===D.documentFragmentNode?pI.getNodeLength(e):1,l.insertBefore(e,I),this.collapsed&&(this[ue].node=l,this[ue].offset=c)}intersectsNode(e){if(e[O]!==this[O])return!1;let I=e[he];if(!I)return!0;let l=I[be].indexOf(e);return ll.compareBoundaryPointsPosition({node:I,offset:l},{node:this[ue].node,offset:this.endOffset})===-1&&ll.compareBoundaryPointsPosition({node:I,offset:l+1},{node:this[re].node,offset:this.startOffset})===1}selectNode(e){if(!e[he])throw new this[W].DOMException("The given Node has no parent.",B.invalidNodeTypeError);let I=e[he][be].indexOf(e);this[re].node=e[he],this[re].offset=I,this[ue].node=e[he],this[ue].offset=I+1}selectNodeContents(e){if(e[se]===D.documentTypeNode)throw new this[W].DOMException("DocumentType Node can't be used as boundary point.",B.invalidNodeTypeError);this[re].node=e,this[re].offset=0,this[ue].node=e,this[ue].offset=pI.getNodeLength(e)}setEnd(e,I=0){ll.validateBoundaryPoint({node:e,offset:I});let l={node:e,offset:I};(e[O]!==this[O]||ll.compareBoundaryPointsPosition(l,{node:this[re].node,offset:this.startOffset})===-1)&&(this[re].node=e,this[re].offset=I),this[ue].node=e,this[ue].offset=I}setStart(e,I=0){ll.validateBoundaryPoint({node:e,offset:I});let l={node:e,offset:I};(e[O]!==this[O]||ll.compareBoundaryPointsPosition(l,{node:this[ue].node,offset:this.endOffset})===1)&&(this[ue].node=e,this[ue].offset=I),this[re].node=e,this[re].offset=I}setEndAfter(e){if(!e[he])throw new this[W].DOMException("The given Node has no parent.",B.invalidNodeTypeError);this.setEnd(e[he],e[he][be].indexOf(e)+1)}setEndBefore(e){if(!e[he])throw new this[W].DOMException("The given Node has no parent.",B.invalidNodeTypeError);this.setEnd(e[he],e[he][be].indexOf(e))}setStartAfter(e){if(!e[he])throw new this[W].DOMException("The given Node has no parent.",B.invalidNodeTypeError);this.setStart(e[he],e[he][be].indexOf(e)+1)}setStartBefore(e){if(!e[he])throw new this[W].DOMException("The given Node has no parent.",B.invalidNodeTypeError);this.setStart(e[he],e[he][be].indexOf(e))}surroundContents(e){let I=this.commonAncestorContainer;if(!I)return;let l=pI.nextDescendantNode(I);for(;I&&I!==l;){if(I[se]!==D.textNode&&ll.isPartiallyContained(I,this))throw new this[W].DOMException("The Range has partially contains a non-Text node.",B.invalidStateError);I=pI.following(I)}if(e[se]===D.documentNode||e[se]===D.documentTypeNode||e[se]===D.documentFragmentNode)throw new this[W].DOMException("Invalid element type.",B.invalidNodeTypeError);let n=this.extractContents();for(;e.firstChild;)e.removeChild(e.firstChild);this.insertNode(e),e.appendChild(n),this.selectNode(e)}toString(){let e=this.startOffset,I=this.endOffset,l="";if(this[re].node===this[ue].node&&this[re].node[se]===D.textNode)return this[re].node.data.slice(e,I);this[re].node[se]===D.textNode&&(l+=this[re].node.data.slice(e));let n=pI.nextDescendantNode(this[ue].node),c=this[re].node;for(;c&&c!==n;)c[se]===D.textNode&&ll.isContained(c,this)&&(l+=c.data),c=pI.following(c);return this[ue].node[se]===D.textNode&&(l+=this[ue].node.data.slice(0,I)),l}};G();G();var DY=class extends tt{id="";startTime=0;endTime=0;pauseOnExit=!1;[$w]=null;onenter=null;onexit=null;constructor(e){if(super(),e!==V)throw new TypeError("Illegal constructor");if(!this[W])throw new TypeError(`Failed to construct '${this.constructor.name}': '${this.constructor.name}' was constructed outside a Window context.`)}get track(){return this[$w]}};var DH=class extends DY{region=null;vertical="";snapToLines=!0;line=0;lineAlign="";position="auto";positionAlign="auto";size=100;align="";text="";constructor(e,I,l){super(V);let n=this[W],c=0;if(e!==void 0&&c++,I!==void 0&&c++,l!==void 0&&c++,c<3)throw new n.TypeError(`Failed to construct 'VTTCue': 3 arguments required, but only ${c} present.`);if(e=Number(e),I=Number(I),isNaN(e)||isNaN(I))throw new n.TypeError("Failed to construct 'VTTCue': The provided double value is non-finite.");this.startTime=e,this.endTime=I,this.text=String(l)}getCueAsHTML(){let e=this[W],I=e.document.createDocumentFragment();return I.appendChild(e.document.createTextNode(this.text)),I}};G();var KH=class extends tt{[HG]=fh.subtitles;[zZ]="";[Cy]="";[PL]="";[Bl]="disabled";[vy]=new iu(V);[qde]=new iu(V);oncuechange=null;constructor(e){if(super(),e!==V)throw new TypeError("Illegal constructor");if(!this[W])throw new TypeError(`Failed to construct '${this.constructor.name}': '${this.constructor.name}' was constructed outside a Window context.`)}get kind(){return this[HG]}get label(){return this[zZ]}get language(){return this[Cy]}get id(){return this[PL]}get mode(){return this[Bl]}set mode(e){e!=="disabled"&&e!=="showing"||(this[Bl]=e)}get cues(){return this[Bl]==="disabled"?null:this[vy]}get activeCues(){return this[Bl]==="disabled"?null:this[qde]}addCue(e){this[vy].includes(e)||(e[$w]=this,this[vy].push(e))}removeCue(e){let I=this[vy].indexOf(e);I!==-1&&(e[$w]=null,this[vy].splice(I,1))}};G();var PH=class t extends tt{[Ye]=[];onaddtrack=null;onchange=null;onremovetrack=null;constructor(e,I){if(super(),e!==V)throw new TypeError("Illegal constructor");this[Ye]=I;let l=new Zl(this,[t,tt]);return new Proxy(this,{get:(n,c)=>{if(c==="length")return I.length;if(c in n||typeof c=="symbol")return l.bind(c),n[c];let a=Number(c);if(!isNaN(a))return I[a]},set(n,c,a){if(l.bind(c),typeof c=="symbol")return n[c]=a,!0;let s=Number(c);return isNaN(s)&&(n[c]=a),!0},deleteProperty(n,c){if(typeof c=="symbol")return delete n[c],!0;let a=Number(c);return isNaN(a)&&delete n[c],!0},ownKeys(){return Object.keys(I)},has(n,c){if(c in n)return!0;if(typeof c=="symbol")return!1;let a=Number(c);return!isNaN(a)&&a>=0&&a<I.length},defineProperty(n,c,a){return l.preventBinding(c),c in n?(Object.defineProperty(n,c,a),!0):!1},getOwnPropertyDescriptor(n,c){if(c in n||typeof c=="symbol")return;let a=Number(c);if(!isNaN(a)&&I[a])return{value:I[a],writable:!1,enumerable:!0,configurable:!0}}})}get length(){return this[Ye].length}get[Symbol.toStringTag](){return"TextTrackList"}toLocaleString(){return"[object TextTrackList]"}toString(){return"[object TextTrackList]"}[Symbol.iterator](){return this[Ye][Symbol.iterator]()}getTrackById(e){for(let I of this[Ye])if(I.id===e)return I;return null}};G();var qH=class extends tt{[_de]="disconnected";onconnecting=null;onconnect=null;ondisconnect=null;get state(){return this[_de]}async watchAvailability(){}cancelWatchAvailability(){}prompt(){}};G();var Bze=Gn(xze(),1);G();var Sie;(function(t){t[t.empty=0]="empty",t[t.loading=1]="loading",t[t.done=2]="done"})(Sie||(Sie={}));var mu=Sie;G();var Oie;(function(t){t.buffer="buffer",t.binaryString="binaryString",t.dataURL="dataURL",t.text="text"})(Oie||(Oie={}));var hu=Oie;G();var Mie;(function(t){t.abort="abort",t.error="error",t.load="load",t.loadstart="loadstart",t.loadend="loadend",t.progress="progress"})(Mie||(Mie={}));var p0=Mie;import{Buffer as ILI}from"buffer";var _H=class extends tt{error=null;result=null;readyState=mu.empty;onabort=null;onerror=null;onload=null;onloadstart=null;onloadend=null;onprogress=null;#e=!1;#I=null;#t=null;constructor(){if(super(),!this[W])throw new TypeError(`Failed to construct '${this.constructor.name}': '${this.constructor.name}' was constructed outside a Window context.`)}readAsArrayBuffer(e){if(!(e instanceof al))throw new this[W].TypeError("Failed to execute 'readAsArrayBuffer' on 'FileReader': parameter 1 is not of type 'Blob'.");this.#l(e,hu.buffer)}readAsBinaryString(e){if(!(e instanceof al))throw new this[W].TypeError("Failed to execute 'readAsBinaryString' on 'FileReader': parameter 1 is not of type 'Blob'.");this.#l(e,hu.binaryString)}readAsDataURL(e){if(!(e instanceof al))throw new this[W].TypeError("Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'.");this.#l(e,hu.dataURL)}readAsText(e,I=null){if(!(e instanceof al))throw new this[W].TypeError("Failed to execute 'readAsText' on 'FileReader': parameter 1 is not of type 'Blob'.");this.#l(e,hu.text,I||"UTF-8")}abort(){let e=this[W];if(this.#I&&e.clearTimeout(this.#I),this.#t&&e.clearTimeout(this.#t),this.readyState===mu.empty||this.readyState===mu.done){this.result=null;return}this.readyState===mu.loading&&(this.readyState=mu.done,this.result=null),this.#e=!0,this.dispatchEvent(new kr(p0.abort)),this.dispatchEvent(new kr(p0.loadend))}#l(e,I,l=null){let n=this[W];if(this.readyState===mu.loading)throw new n.DOMException("The object is in an invalid state.",B.invalidStateError);this.readyState=mu.loading,this.#I=n.setTimeout(()=>{if(this.#e){this.#e=!1;return}this.dispatchEvent(new kr(p0.loadstart));let c=e[$I];c||(c=ILI.alloc(0)),this.dispatchEvent(new kr(p0.loadstart,{lengthComputable:!isNaN(e.size),total:e.size,loaded:c.length})),this.#t=n.setTimeout(()=>{if(this.#e){this.#e=!1;return}switch(I){default:case hu.buffer:{this.result=new Uint8Array(c).buffer;break}case hu.binaryString:{this.result=c.toString("binary");break}case hu.dataURL:{let a=Bze.default.parse(e.type)||"application/octet-stream";this.result=`data:${a};base64,${c.toString("base64")}`;break}case hu.text:{this.result=new TextDecoder(l||"UTF-8").decode(c);break}}this.readyState=mu.done,this.dispatchEvent(new kr(p0.load)),this.dispatchEvent(new kr(p0.loadend))})})}};G();import tLI from"crypto";var lLI={aspectRatio:{max:300,min:.006666666666666667},deviceId:"",facingMode:[],frameRate:{max:60,min:0},height:{max:150,min:1},resizeMode:["none","crop-and-scale"],width:{max:300,min:1}},nLI={deviceId:"",frameRate:60,resizeMode:"none"},PY=class extends tt{contentHint="";enabled=!0;id=tLI.randomUUID();muted=!1;readyState="live";label="";[zZ]="";[HG]="video";[qw]={};[cb]=JSON.parse(JSON.stringify(lLI));[nY]=JSON.parse(JSON.stringify(nLI));onended=null;onmute=null;onunmute=null;constructor(e){if(super(),e!==V)throw new TypeError("Illegal constructor");if(!this[W])throw new TypeError(`Failed to construct '${this.constructor.name}': '${this.constructor.name}' was constructed outside a Window context.`)}get kind(){return this[HG]}async applyConstraints(e){this.#e(this[qw],e)}getConstraints(){return this[qw]}getCapabilities(){return this[cb]}getSettings(){return this[nY]}clone(){let e=new this.constructor(V);return e[HG]=this[HG],e[qw]=this[qw],e[cb]=this[cb],e[nY]=this[nY],e.contentHint=this.contentHint,e.enabled=this.enabled,e.label=this.label,e.muted=this.muted,e.readyState=this.readyState,e}stop(){this.readyState="ended"}#e(e,I){for(let l in I)I[l]!==null&&typeof I[l]=="object"&&!Array.isArray(I[l])?(typeof e[l]!="object"&&(e[l]={}),this.#e(e[l],I[l])):e[l]=I[l]}};G();var qk=class extends PY{[qL];constructor(e,I){super(e),this[qL]=I}get canvas(){return this[qL]}requestFrame(){}clone(){let e=super.clone();return e[qL]=this.canvas,e}};var _k=class{static extendClasses(e){class I extends zr{}I.prototype[W]=e,e.Document=I;class l extends vH{}l.prototype[W]=e,e.HTMLDocument=l;class n extends CH{}n.prototype[W]=e,e.XMLDocument=n;class c extends TY{}c.prototype[W]=e,e.DocumentFragment=c;class a extends JH{}a.prototype[W]=e,e.Text=a;class s extends LH{}s.prototype[W]=e,e.Comment=s;class r extends kH{}r.prototype[W]=e,e.Image=r;class o extends Ok{}o.prototype[W]=e,e.Audio=o;class d extends fH{}d.prototype[W]=e,e.MutationObserver=d;class i extends Tk{}i.prototype[W]=e,e.MessagePort=i;class h extends BH{}h.prototype[W]=e,e.CSSStyleSheet=h;class p extends It{}e.DOMException=p;class Z extends EY{}Z.prototype[W]=e,e.Request=Z;class u extends fr{}u.prototype[W]=e,u[W]=e,e.Response=u;class N extends tt{}N.prototype[W]=e,e.EventTarget=N;class Y extends jk{}Y.prototype[W]=e,e.XMLHttpRequestUpload=Y;class y extends bu{}y.prototype[W]=e,e.XMLHttpRequestEventTarget=y;class Q extends zH{}Q.prototype[W]=e,e.AbortController=Q;class A extends UH{}A.prototype[W]=e,A[W]=e,e.AbortSignal=A;class w extends XY{}w.prototype[W]=e,e.FormData=w;class x extends SH{}x.prototype[W]=e,e.PermissionStatus=x;class C extends Dk{}C.prototype[W]=e,e.XMLHttpRequest=C;class H extends TH{}H.prototype[W]=e,e.DOMParser=H;class J extends jH{}J.prototype[W]=e,e.Range=J;class f extends DH{}f.prototype[W]=e,e.VTTCue=f;class S extends KH{}S.prototype[W]=e,e.TextTrack=S;class te extends PH{}te.prototype[W]=e,e.TextTrackList=te;class oe extends DY{}oe.prototype[W]=e,e.TextTrackCue=oe;class Fe extends qH{}Fe.prototype[W]=e,e.RemotePlayback=Fe;class ye extends _H{}ye.prototype[W]=e,e.FileReader=ye;class Ee extends kY{}Ee.prototype[W]=e,e.MediaStream=Ee;class Qe extends PY{}Qe.prototype[W]=e,e.MediaStreamTrack=Qe;class Ne extends qk{}Ne.prototype[W]=e,e.CanvasCaptureMediaStreamTrack=Ne;class uI extends Kl{}uI.prototype[W]=e,e.URL=uI}};G();G();G();G();G();G();var $k=class{[P]=0;[q]=0;[as]=0;[Jy]=1;constructor(e,I,l,n){this[P]=e!=null?Number(e):0,this[q]=I!=null?Number(I):0,this[as]=l!=null?Number(l):0,this[Jy]=n!=null?Number(n):1}get x(){return this[P]}get y(){return this[q]}get z(){return this[as]}get w(){return this[Jy]}toJSON(){return{x:this.x,y:this.y,z:this.z,w:this.w}}static fromPoint(e){return e?new this(e.x??null,e.y??null,e.z??null,e.w??null):new this}};var Z0=class extends $k{set x(e){this[P]=e}get x(){return this[P]}set y(e){this[q]=e}get y(){return this[q]}set z(e){this[as]=e}get z(){return this[as]}set w(e){this[Jy]=e}get w(){return this[Jy]}};var $H={a:1,b:0,c:0,d:1,e:0,f:0,m11:1,m12:0,m13:0,m14:0,m21:0,m22:1,m23:0,m24:0,m31:0,m32:0,m33:1,m34:0,m41:0,m42:0,m43:0,m44:1,is2D:!0,isIdentity:!0},cLI=/([a-zA-Z0-9]+)\(([^)]+)\)/gm,aLI=/[\s,]+/,u0=class t{[OI]=1;[KI]=0;[At]=0;[wt]=0;[MI]=0;[PI]=1;[Xt]=0;[Ht]=0;[ot]=0;[Nt]=0;[Yt]=1;[dt]=0;[TI]=0;[qI]=0;[Vt]=0;[Rt]=1;constructor(e){e&&this[eX](e)}get a(){return this[OI]}get b(){return this[KI]}get c(){return this[MI]}get d(){return this[PI]}get e(){return this[TI]}get f(){return this[qI]}get m11(){return this[OI]}get m12(){return this[KI]}get m13(){return this[At]}get m14(){return this[wt]}get m21(){return this[MI]}get m22(){return this[PI]}get m23(){return this[Xt]}get m24(){return this[Ht]}get m31(){return this[ot]}get m32(){return this[Nt]}get m33(){return this[Yt]}get m34(){return this[dt]}get m41(){return this[TI]}get m42(){return this[qI]}get m43(){return this[Vt]}get m44(){return this[Rt]}get isIdentity(){return this[OI]===1&&this[KI]===0&&this[At]===0&&this[wt]===0&&this[MI]===0&&this[PI]===1&&this[Xt]===0&&this[Ht]===0&&this[ot]===0&&this[Nt]===0&&this[Yt]===1&&this[dt]===0&&this[TI]===0&&this[qI]===0&&this[Vt]===0&&this[Rt]===1}get is2D(){return this[ot]===0&&this[Nt]===0&&this[Yt]===1&&this[dt]===0&&this[Vt]===0&&this[Rt]===1}toFloat32Array(e){return Float32Array.from(this[g3](e))}toFloat64Array(e){return Float64Array.from(this[g3](e))}toString(){let e=this.is2D,I=this[g3](e).join(", ");return`${e?"matrix":"matrix3d"}(${I})`}toJSON(){let{is2D:e,isIdentity:I}=this;return{m11:this[OI],m12:this[KI],m13:this[At],m14:this[wt],m21:this[MI],m22:this[PI],m23:this[Xt],m24:this[Ht],m31:this[ot],m32:this[Nt],m33:this[Yt],m34:this[dt],m41:this[TI],m42:this[qI],m43:this[Vt],m44:this[Rt],a:this[OI],b:this[KI],c:this[MI],d:this[PI],e:this[TI],f:this[qI],is2D:e,isIdentity:I}}multiply(e){let I=new this.constructor(this);return I[CG](e),I}translate(e=0,I=0,l=0){let n=new this.constructor(this);return n[vG](e,I,l),n}scale(e,I,l=1,n=0,c=0,a=0){let s=new this.constructor(this);return s[Nh](e,I,l,n,c,a),s}scale3d(e=1,I=0,l=0,n=0){let c=new this.constructor(this);return c[Q3](e,I,l,n),c}scaleNonUniform(e=1,I=1){let l=new this.constructor(this);return l[A3](e,I),l}rotateAxisAngle(e=0,I=0,l=0,n=0){let c=new this.constructor(this);return c[OZ](e,I,l,n),c}rotate(e=0,I,l){let n=new this.constructor(this);return n[SZ](e,I,l),n}rotateFromVector(e=0,I=0){let l=new this.constructor(this);return l[Gk](e,I),l}skewX(e){let I=new this.constructor(this);return I[ky](e),I}skewY(e){let I=new this.constructor(this);return I[fy](e),I}flipX(){let e=new this.constructor(this);return e[ok](),e}flipY(){let e=new this.constructor(this);return e[dk](),e}inverse(){let e=new this.constructor(this);return e[ik](),e}transformPoint(e){let I=e.x??0,l=e.y??0,n=e.z??0,c=e.w??1,a=this[OI]*I+this[MI]*l+this[ot]*n+this[TI]*c,s=this[KI]*I+this[PI]*l+this[Nt]*n+this[qI]*c,r=this[At]*I+this[Xt]*l+this[Yt]*n+this[Vt]*c,o=this[wt]*I+this[Ht]*l+this[dt]*n+this[Rt]*c;return new Z0(a,s,r,o)}[eX](e){let I=null;if(typeof e=="string"&&e.length&&e!=="none")I=this.constructor[Ly](e);else if(Array.isArray(e)||e instanceof Float64Array||e instanceof Float32Array)I=this.constructor[EG](e);else if(typeof e=="object")I=this.constructor.fromMatrix(e);else return;this[OI]=I[OI],this[KI]=I[KI],this[At]=I[At],this[wt]=I[wt],this[MI]=I[MI],this[PI]=I[PI],this[Xt]=I[Xt],this[Ht]=I[Ht],this[ot]=I[ot],this[Nt]=I[Nt],this[Yt]=I[Yt],this[dt]=I[dt],this[TI]=I[TI],this[qI]=I[qI],this[Vt]=I[Vt],this[Rt]=I[Rt]}[CG](e){let I=e;I instanceof t||(I?.m11===void 0&&I?.a!==void 0?(I=Object.assign({},$H,I),I.m11=I.a,I.m12=I.b,I.m21=I.c,I.m22=I.d,I.m41=I.e,I.m42=I.f):I=Object.assign({},$H,I));let l=this[OI]*I.m11+this[MI]*I.m12+this[ot]*I.m13+this[TI]*I.m14,n=this[OI]*I.m21+this[MI]*I.m22+this[ot]*I.m23+this[TI]*I.m24,c=this[OI]*I.m31+this[MI]*I.m32+this[ot]*I.m33+this[TI]*I.m34,a=this[OI]*I.m41+this[MI]*I.m42+this[ot]*I.m43+this[TI]*I.m44,s=this[KI]*I.m11+this[PI]*I.m12+this[Nt]*I.m13+this[qI]*I.m14,r=this[KI]*I.m21+this[PI]*I.m22+this[Nt]*I.m23+this[qI]*I.m24,o=this[KI]*I.m31+this[PI]*I.m32+this[Nt]*I.m33+this[qI]*I.m34,d=this[KI]*I.m41+this[PI]*I.m42+this[Nt]*I.m43+this[qI]*I.m44,i=this[At]*I.m11+this[Xt]*I.m12+this[Yt]*I.m13+this[Vt]*I.m14,h=this[At]*I.m21+this[Xt]*I.m22+this[Yt]*I.m23+this[Vt]*I.m24,p=this[At]*I.m31+this[Xt]*I.m32+this[Yt]*I.m33+this[Vt]*I.m34,Z=this[At]*I.m41+this[Xt]*I.m42+this[Yt]*I.m43+this[Vt]*I.m44,u=this[wt]*I.m11+this[Ht]*I.m12+this[dt]*I.m13+this[Rt]*I.m14,N=this[wt]*I.m21+this[Ht]*I.m22+this[dt]*I.m23+this[Rt]*I.m24,Y=this[wt]*I.m31+this[Ht]*I.m32+this[dt]*I.m33+this[Rt]*I.m34,y=this[wt]*I.m41+this[Ht]*I.m42+this[dt]*I.m43+this[Rt]*I.m44;this[OI]=l,this[KI]=s,this[At]=i,this[wt]=u,this[MI]=n,this[PI]=r,this[Xt]=h,this[Ht]=N,this[ot]=c,this[Nt]=o,this[Yt]=p,this[dt]=Y,this[TI]=a,this[qI]=d,this[Vt]=Z,this[Rt]=y}[vG](e=0,I=0,l=0){let n=this.constructor[EG]([1,0,0,0,0,1,0,0,0,0,1,0,e,I,l,1]);this[CG](n)}[Nh](e,I,l=1,n=0,c=0,a=0){e=e===void 0?1:Number(e),I=I===void 0?e:Number(I),(n!==0||c!==0||a!==0)&&this[vG](n,c,a),(e!==1||I!==1||l!==1)&&this[CG](this.constructor[EG]([e,0,0,0,0,I,0,0,0,0,l,0,0,0,0,1])),(n!==0||c!==0||a!==0)&&this[vG](-n,-c,-a)}[Q3](e=1,I=0,l=0,n=0){(I!==0||l!==0||n!==0)&&this[vG](I,l,n),e!==1&&this[CG](this.constructor[EG]([e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1])),(I!==0||l!==0||n!==0)&&this[vG](-I,-l,-n)}[A3](e=1,I=1){e===1&&I===1||this[CG](this.constructor[EG]([e,0,0,0,0,I,0,0,0,0,1,0,0,0,0,1]))}[OZ](e=0,I=0,l=0,n=0){if(e=Number(e),I=Number(I),l=Number(l),n=Number(n),isNaN(e)||isNaN(I)||isNaN(l)||isNaN(n))throw new TypeError("Failed to execute 'rotateAxisAngleSelf' on 'DOMMatrix': The arguments must be numbers.");let c=Math.hypot(e,I,l);if(c===0)return;c!==1&&(e/=c,I/=c,l/=c);let a=-(n*Math.PI/360),s=this.#e,r=Math.sin(a)*Math.cos(a),o=Math.sin(a)*Math.sin(a),d=s(1-2*(I*I+l*l)*o),i=s(2*(e*I*o+l*r)),h=s(2*(e*l*o-I*r)),p=s(2*(e*I*o-l*r)),Z=s(1-2*(e*e+l*l)*o),u=s(2*(I*l*o+e*r)),N=s(2*(e*l*o+I*r)),Y=s(2*(I*l*o-e*r)),y=s(1-2*(e*e+I*I)*o),Q=this.constructor[EG]([d,p,N,0,i,Z,Y,0,h,u,y,0,0,0,0,1]);this[CG](Q)}[SZ](e=0,I,l){if(I===void 0&&l===void 0&&(l=e,e=0,I=0),I===void 0&&(I=0),l===void 0&&(l=0),e=Number(e),I=Number(I),l=Number(l),isNaN(e)||isNaN(I)||isNaN(l))throw new TypeError("Failed to execute 'rotateSelf' on 'DOMMatrix': The arguments must be numbers.");l!==0&&this[OZ](0,0,1,l),I!==0&&this[OZ](0,1,0,I),e!==0&&this[OZ](1,0,0,e)}[Gk](e=0,I=0){e===0&&I===0||this[SZ](Math.atan2(I,e)*180/Math.PI)}[ky](e){let I=Object.assign({},$H),l=Math.tan(e*Math.PI/180);I.m21=l,I.c=l,this[CG](I)}[fy](e){let I=Object.assign({},$H),l=Math.tan(e*Math.PI/180);I.m12=l,I.b=l,this[CG](I)}[ok](){let e=this.constructor[EG]([-1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);this[CG](e)}[dk](){let e=this.constructor[EG]([1,0,0,0,0,-1,0,0,0,0,1,0,0,0,0,1]);this[CG](e)}[ik](){let e=this[PI]*this[Yt]*this[Rt]-this[PI]*this[dt]*this[Vt]-this[Nt]*this[Xt]*this[Rt]+this[Nt]*this[Ht]*this[Vt]+this[qI]*this[Xt]*this[dt]-this[qI]*this[Ht]*this[Yt],I=-this[KI]*this[Yt]*this[Rt]+this[KI]*this[dt]*this[Vt]+this[Nt]*this[At]*this[Rt]-this[Nt]*this[wt]*this[Vt]-this[qI]*this[At]*this[dt]+this[qI]*this[wt]*this[Yt],l=this[KI]*this[Xt]*this[Rt]-this[KI]*this[Ht]*this[Vt]-this[PI]*this[At]*this[Rt]+this[PI]*this[wt]*this[Vt]+this[qI]*this[At]*this[Ht]-this[qI]*this[wt]*this[Xt],n=-this[KI]*this[Xt]*this[dt]+this[KI]*this[Ht]*this[Yt]+this[PI]*this[At]*this[dt]-this[PI]*this[wt]*this[Yt]-this[Nt]*this[At]*this[Ht]+this[Nt]*this[wt]*this[Xt],c=this[OI]*e+this[MI]*I+this[ot]*l+this[TI]*n;if(c===0){this[OI]=NaN,this[KI]=NaN,this[At]=NaN,this[wt]=NaN,this[MI]=NaN,this[PI]=NaN,this[Xt]=NaN,this[Ht]=NaN,this[ot]=NaN,this[Nt]=NaN,this[Yt]=NaN,this[dt]=NaN,this[TI]=NaN,this[qI]=NaN,this[Vt]=NaN,this[Rt]=NaN;return}let a=-this[MI]*this[Yt]*this[Rt]+this[MI]*this[dt]*this[Vt]+this[ot]*this[Xt]*this[Rt]-this[ot]*this[Ht]*this[Vt]-this[TI]*this[Xt]*this[dt]+this[TI]*this[Ht]*this[Yt],s=this[OI]*this[Yt]*this[Rt]-this[OI]*this[dt]*this[Vt]-this[ot]*this[At]*this[Rt]+this[ot]*this[wt]*this[Vt]+this[TI]*this[At]*this[dt]-this[TI]*this[wt]*this[Yt],r=-this[OI]*this[Xt]*this[Rt]+this[OI]*this[Ht]*this[Vt]+this[MI]*this[At]*this[Rt]-this[MI]*this[wt]*this[Vt]-this[TI]*this[At]*this[Ht]+this[TI]*this[wt]*this[Xt],o=this[OI]*this[Xt]*this[dt]-this[OI]*this[Ht]*this[Yt]-this[MI]*this[At]*this[dt]+this[MI]*this[wt]*this[Yt]+this[ot]*this[At]*this[Ht]-this[ot]*this[wt]*this[Xt],d=this[MI]*this[Nt]*this[Rt]-this[MI]*this[dt]*this[qI]-this[ot]*this[PI]*this[Rt]+this[ot]*this[Ht]*this[qI]+this[TI]*this[PI]*this[dt]-this[TI]*this[Ht]*this[Nt],i=-this[OI]*this[Nt]*this[Rt]+this[OI]*this[dt]*this[qI]+this[ot]*this[KI]*this[Rt]-this[ot]*this[wt]*this[qI]-this[TI]*this[KI]*this[dt]+this[TI]*this[wt]*this[Nt],h=this[OI]*this[PI]*this[Rt]-this[OI]*this[Ht]*this[qI]-this[MI]*this[KI]*this[Rt]+this[MI]*this[wt]*this[qI]+this[TI]*this[KI]*this[Ht]-this[TI]*this[wt]*this[PI],p=-this[OI]*this[PI]*this[dt]+this[OI]*this[Ht]*this[Nt]+this[MI]*this[KI]*this[dt]-this[MI]*this[wt]*this[Nt]-this[ot]*this[KI]*this[Ht]+this[ot]*this[wt]*this[PI],Z=-this[MI]*this[Nt]*this[Vt]+this[MI]*this[Yt]*this[qI]+this[ot]*this[PI]*this[Vt]-this[ot]*this[Xt]*this[qI]-this[TI]*this[PI]*this[Yt]+this[TI]*this[Xt]*this[Nt],u=this[OI]*this[Nt]*this[Vt]-this[OI]*this[Yt]*this[qI]-this[ot]*this[KI]*this[Vt]+this[ot]*this[At]*this[qI]+this[TI]*this[KI]*this[Yt]-this[TI]*this[At]*this[Nt],N=-this[OI]*this[PI]*this[Vt]+this[OI]*this[Xt]*this[qI]+this[MI]*this[KI]*this[Vt]-this[MI]*this[At]*this[qI]-this[TI]*this[KI]*this[Xt]+this[TI]*this[At]*this[PI],Y=this[OI]*this[PI]*this[Yt]-this[OI]*this[Xt]*this[Nt]-this[MI]*this[KI]*this[Yt]+this[MI]*this[At]*this[Nt]+this[ot]*this[KI]*this[Xt]-this[ot]*this[At]*this[PI];this[OI]=e/c||0,this[KI]=I/c||0,this[At]=l/c||0,this[wt]=n/c||0,this[MI]=a/c||0,this[PI]=s/c||0,this[Xt]=r/c||0,this[Ht]=o/c||0,this[ot]=d/c||0,this[Nt]=i/c||0,this[Yt]=h/c||0,this[dt]=p/c||0,this[TI]=Z/c||0,this[qI]=u/c||0,this[Vt]=N/c||0,this[Rt]=Y/c||0}[g3](e=!1){return e?[this[OI],this[KI],this[MI],this[PI],this[TI],this[qI]]:[this[OI],this[KI],this[At],this[wt],this[MI],this[PI],this[Xt],this[Ht],this[ot],this[Nt],this[Yt],this[dt],this[TI],this[qI],this[Vt],this[Rt]]}#e(e,I=1e15){return Math.round(e*I)/I}static fromMatrix(e){return e instanceof t||(e?.m11===void 0&&e?.a!==void 0?(e=Object.assign({},$H,e),e.m11=e.a,e.m12=e.b,e.m21=e.c,e.m22=e.d,e.m41=e.e,e.m42=e.f):e=Object.assign({},$H,e)),this[EG]([e.m11,e.m12,e.m13,e.m14,e.m21,e.m22,e.m23,e.m24,e.m31,e.m32,e.m33,e.m34,e.m41,e.m42,e.m43,e.m44])}static fromFloat32Array(e){return this[EG](e)}static fromFloat64Array(e){return this[EG](e)}static[EG](e){if(!(e instanceof Float64Array||e instanceof Float32Array||Array.isArray(e))||e.length!==6&&e.length!==16)throw TypeError(`Failed to execute 'fromArray' on '${this.name}': '${String(e)}' is not a compatible array.`);let I=new this;if(e.length===16){let[l,n,c,a,s,r,o,d,i,h,p,Z,u,N,Y,y]=e;I[OI]=l,I[KI]=n,I[At]=c,I[wt]=a,I[MI]=s,I[PI]=r,I[Xt]=o,I[Ht]=d,I[ot]=i,I[Nt]=h,I[Yt]=p,I[dt]=Z,I[TI]=u,I[qI]=N,I[Vt]=Y,I[Rt]=y}else if(e.length===6){let[l,n,c,a,s,r]=e;I[OI]=l,I[KI]=n,I[MI]=c,I[PI]=a,I[TI]=s,I[qI]=r}return I}static[Ly](e){if(typeof e!="string")throw TypeError(`Failed to execute 'setMatrixValue' on '${this.name}': Expected '${String(e)}' to be a string.`);let I=new this,l=new RegExp(cLI),n;for(;n=l.exec(e);){let c=n[1],a=n[2].split(aLI);for(let i=0,h=a.length;i<h;i++)a[i]=this[eie](a[i]);let[s,r,o,d]=a;switch(c){case"perspective":!isNaN(s)&&s!==0&&r===void 0&&o===void 0&&(I[dt]=-1/s);break;case"translate":!isNaN(s)&&o===void 0&&I[vG](s,r||0,0);break;case"translate3d":!isNaN(s)&&!isNaN(r)&&!isNaN(o)&&I[vG](s,r,o);break;case"translateX":!isNaN(s)&&r===void 0&&o===void 0&&I[vG](s);break;case"translateY":!isNaN(s)&&r===void 0&&o===void 0&&I[vG](0,s);break;case"translateZ":!isNaN(s)&&r===void 0&&o===void 0&&I[vG](0,0,s);break;case"matrix":case"matrix3d":(a.length===6||a.length===16)&&I[eX](this[EG](a));break;case"rotate":case"rotateZ":!isNaN(s)&&r===void 0&&o===void 0&&I[SZ](0,0,s);break;case"rotateX":!isNaN(s)&&r===void 0&&o===void 0&&I[SZ](s,0,0);break;case"rotateY":!isNaN(s)&&r===void 0&&o===void 0&&I[SZ](0,s,0);case"rotate3d":!isNaN(s)&&!isNaN(r)&&!isNaN(o)&&!isNaN(d)&&I[OZ](s,r,o,d);break;case"scale":!isNaN(s)&&s!==1&&o===void 0&&I[Nh](s,isNaN(r)?s:r);break;case"scale3d":!isNaN(s)&&!isNaN(r)&&!isNaN(o)&&I[Nh](s,r,o);break;case"scaleX":!isNaN(s)&&r===void 0&&o===void 0&&I[Nh](s,1,1);break;case"scaleY":!isNaN(s)&&r===void 0&&o===void 0&&I[Nh](1,s,1);break;case"scaleZ":!isNaN(s)&&r===void 0&&o===void 0&&I[Nh](1,1,s);break;case"skew":isNaN(s)||I[ky](s),isNaN(r)||I[fy](r);break;case"skewX":!isNaN(s)&&r===void 0&&I[ky](s);break;case"skewY":!isNaN(s)&&r===void 0&&I[fy](s);break;default:throw TypeError(`Failed to execute 'setMatrixValue' on '${this.name}': Unknown transform function '${n[1]}'.`)}}return I}static[eie](e){let I=parseFloat(e);switch(e.replace(I.toString(),"")){case"rem":case"em":case"vw":case"vh":case"%":case"vmin":case"vmax":throw new SyntaxError(`Failed to construct '${this.name}': Lengths must be absolute, not relative`);case"rad":return I*(180/Math.PI);case"turn":return I*360;case"px":return I;case"cm":return I*37.7812;case"mm":return I*3.7781;case"in":return I*96;case"pt":return I*1.3281;case"pc":return I*16;case"Q":return I*.945;default:return I}}};var Os=class extends u0{get a(){return this[OI]}set a(e){this[OI]=e}get b(){return this[KI]}set b(e){this[KI]=e}get c(){return this[MI]}set c(e){this[MI]=e}get d(){return this[PI]}set d(e){this[PI]=e}get e(){return this[TI]}set e(e){this[TI]=e}get f(){return this[qI]}set f(e){this[qI]=e}get m11(){return this[OI]}set m11(e){this[OI]=e}get m12(){return this[KI]}set m12(e){this[KI]=e}get m13(){return this[At]}set m13(e){this[At]=e}get m14(){return this[wt]}set m14(e){this[wt]=e}get m21(){return this[MI]}set m21(e){this[MI]=e}get m22(){return this[PI]}set m22(e){this[PI]=e}get m23(){return this[Xt]}set m23(e){this[Xt]=e}get m24(){return this[Ht]}set m24(e){this[Ht]=e}get m31(){return this[ot]}set m31(e){this[ot]=e}get m32(){return this[Nt]}set m32(e){this[Nt]=e}get m33(){return this[Yt]}set m33(e){this[Yt]=e}get m34(){return this[dt]}set m34(e){this[dt]=e}get m41(){return this[TI]}set m41(e){this[TI]=e}get m42(){return this[qI]}set m42(e){this[qI]=e}get m43(){return this[Vt]}set m43(e){this[Vt]=e}get m44(){return this[Rt]}set m44(e){this[Rt]=e}setMatrixValue(e){return this[eX](e),this}multiplySelf(e){return this[CG](e),this}translateSelf(e=0,I=0,l=0){return this[vG](e,I,l),this}scaleSelf(e,I,l=1,n=0,c=0,a=0){return this[Nh](e,I,l,n,c,a),this}scale3dSelf(e=1,I=0,l=0,n=0){return this[Q3](e,I,l,n),this}scaleNonUniformSelf(e=1,I=1){return this[A3](e,I),this}rotateAxisAngleSelf(e=0,I=0,l=0,n=0){return this[OZ](e,I,l,n),this}rotateSelf(e=0,I,l){return this[SZ](e,I,l),this}rotateFromVectorSelf(e=0,I=0){return this[Gk](e,I),this}skewXSelf(e){return this[ky](e),this}skewYSelf(e){return this[fy](e),this}flipXSelf(){return this[ok](),this}flipYSelf(){return this[dk](),this}invertSelf(){return this[ik](),this}};G();var sLI=/[\t\f\n\r ,]+/,Vb=class t{[W];[M];[L];[Ve]=!1;[de]={items:[],attributeValue:""};constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");if(this[W]=I,this[Ve]=!!l.readOnly,this[M]=l.getAttribute,this[L]=l.setAttribute,e!==V)throw new TypeError("Illegal constructor");let n=new Zl(this,[t]);return new Proxy(this,{get:(c,a)=>{if(a==="length"||a==="numberOfItems")return c[We]().length;if(a in c||typeof a=="symbol")return n.bind(a),c[a];let s=Number(a);if(!isNaN(s))return c[We]()[s]},set(c,a,s){if(n.bind(a),typeof a=="symbol")return c[a]=s,!0;let r=Number(a);return isNaN(r)&&(c[a]=s),!0},deleteProperty(c,a){if(typeof a=="symbol")return delete c[a],!0;let s=Number(a);return isNaN(s)&&delete c[a],!0},ownKeys(c){return Object.keys(c[We]())},has(c,a){if(a in c)return!0;if(typeof a=="symbol")return!1;let s=Number(a);return!isNaN(s)&&s>=0&&s<c[We]().length},defineProperty(c,a,s){return n.preventBinding(a),a in c?(Object.defineProperty(c,a,s),!0):!1},getOwnPropertyDescriptor(c,a){if(a in c||typeof a=="symbol")return;let s=Number(a),r=c[We]();if(!isNaN(s)&&r[s])return{value:r[s],writable:!1,enumerable:!0,configurable:!0}}})}get length(){return this[We]().length}get numberOfItems(){return this[We]().length}[Symbol.iterator](){return this[We]().values()}clear(){this[de].attributeValue="",this[de].items=[],this[L]("")}initialize(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'initialize' on 'SVGStringList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'initialize' on 'SVGStringList': 1 arguments required, but only ${arguments.length} present.`);if(e=String(e),!e){this.clear();return}return this[L](e),e}getItem(e){let I=this[We]();return typeof e=="number"||(e=Number(e),e=isNaN(e)?0:e),I[e]?I[e]:null}insertItemBefore(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'insertItemBefore' on 'SVGStringList': The object is read-only.");if(arguments.length<2)throw new this[W].TypeError(`Failed to execute 'insertItemBefore' on 'SVGStringList': 2 arguments required, but only ${arguments.length} present.`);if(e=String(e),!e)return e;let l=this[We](),n=l.indexOf(e);return n!==-1&&l.splice(n,1),I<0?I=0:I>l.length&&(I=l.length),l.splice(I,0,e),this[L](l.join(" ")),e}replaceItem(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'replaceItem' on 'SVGStringList': The object is read-only.");if(arguments.length<2)throw new this[W].TypeError(`Failed to execute 'replaceItem' on 'SVGStringList': 2 arguments required, but only ${arguments.length} present.`);if(e=String(e),!e)return this.removeItem(I);let l=this[We]();I<0?I=0:I>=l.length&&(I=l.length-1);let n=l[I];return l[I]=e,this[L](l.join(" ")),n}removeItem(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'removeItem' on 'SVGStringList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'removeItem' on 'SVGStringList': 1 argument required, but only ${arguments.length} present.`);let I=this[We]();if(e=Number(e),isNaN(e)&&(e=0),e>=I.length)throw new this[W].DOMException(`Failed to execute 'removeItem' on 'SVGStringList': The index provided (${e}) is greater than the maximum bound.`,B.indexSizeError);if(e<0)throw new this[W].DOMException(`Failed to execute 'removeItem' on 'SVGStringList': The index provided (${e}) is negative.`,B.indexSizeError);let l=I[e];return I.splice(e,1),this[L](I.join(" ")),l}appendItem(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'appendItem' on 'SVGStringList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'appendItem' on 'SVGStringList': 1 argument required, but only ${arguments.length} present.`);if(e=String(e),!e)return e;let I=this[We](),l=I.indexOf(e);return l!==-1&&I.splice(l,1),I.push(e),this[L](I.join(" ")),e}[We](){let e=this[M]()??"",I=this[de];if(I.attributeValue===e)return I.items;let l=[],n=e.trim();if(n)for(let c of n.split(sLI))l.includes(c)||l.push(c);return I.attributeValue=e,I.items=l,l}};G();G();G();G();var rLI=/([a-zA-Z0-9]+)\(([^)]+)\)/,GLI=/[\s,]+/,Sh=class t{[W];[M]=null;[L]=null;[$]=null;[Ve]=!1;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,l&&(this[Ve]=!!l.readOnly,this[M]=l.getAttribute||null,this[L]=l.setAttribute||null)}get a(){return this[an]().a}set a(e){if(this[Ve])return;let I=this[an]();I.a=e,this[na](I)}get b(){return this[an]().b}set b(e){if(this[Ve])return;let I=this[an]();I.b=e,this[na](I)}get c(){return this[an]().c}set c(e){if(this[Ve])return;let I=this[an]();I.c=e,this[na](I)}get d(){return this[an]().d}set d(e){if(this[Ve])return;let I=this[an]();I.d=e,this[na](I)}get e(){return this[an]().e}set e(e){if(this[Ve])return;let I=this[an]();I.e=e,this[na](I)}get f(){return this[an]().f}set f(e){if(this[Ve])return;let I=this[an]();I.f=e,this[na](I)}multiply(e){if(!(e instanceof t))throw new this[W].TypeError("Failed to execute 'multiply' on 'SVGMatrix': parameter 1 is not of type 'SVGMatrix'.");let I=this[an](),l=new t(V,this[W]);return I.multiplySelf(e[an]()),l[na](I),l}translate(e=0,I=0){let l=this[an](),n=new t(V,this[W]);return l.translateSelf(e,I),n[na](l),n}scale(e){let I=this[an](),l=new t(V,this[W]);return I.scaleSelf(e),l[na](I),l}scaleNonUniform(e=1,I=1){let l=this[an](),n=new t(V,this[W]);return l.scaleNonUniformSelf(e,I),n[na](l),n}rotate(e){let I=this[an](),l=new t(V,this[W]);return I.rotateSelf(e),l[na](I),l}rotateFromVector(e=0,I=0){let l=this[an](),n=new t(V,this[W]);return l.rotateFromVectorSelf(e,I),n[na](l),n}skewX(e){let I=this[an](),l=new t(V,this[W]);return I.skewXSelf(e),l[na](I),l}skewY(e){let I=this[an](),l=new t(V,this[W]);return I.skewYSelf(e),l[na](I),l}flipX(){let e=this[an](),I=new t(V,this[W]);return e.flipXSelf(),I[na](e),I}flipY(){let e=this[an](),I=new t(V,this[W]);return e.flipYSelf(),I[na](e),I}inverse(){let e=this[an](),I=new t(V,this[W]);return e.invertSelf(),I[na](e),I}[an](){let e=this[M]?this[M]():this[$];if(!e)return new Os;let I=e.match(rLI);if(!I)return new Os;let l=[];for(let n of I[2].trim().split(GLI)){let c=Number(n);if(isNaN(c))throw new this[W].TypeError(`Failed to parse transform attribute: Expected number, but got "${n}" in "${e}".`);l.push(c)}switch(I[1]){case"matrix":if(l.length!==6)throw new this[W].TypeError(`Failed to parse transform attribute: Expected 6 parameters in "${e}".`);return Os[Ly](e);case"scale":case"translate":if(l.length!==1&&l.length!==2)throw new this[W].TypeError(`Failed to parse transform attribute: Expected 1 or 2 parameters in "${e}".`);return Os[Ly](e);case"skewY":case"skewX":if(l.length!==1)throw new this[W].TypeError(`Failed to parse transform attribute: Expected 1 parameter in "${e}".`);return Os[Ly](e);case"rotate":let n=new Os;if(l.length!==1&&l.length!==3)throw new this[W].TypeError(`Failed to parse transform attribute: Expected 1 or 3 parameters in "${e}".`);let[c,a,s]=l;(a||s)&&n.translateSelf(a,s);let r=c*Math.PI/180;return n.multiplySelf(new Os([Math.cos(r),Math.sin(r),-Math.sin(r),Math.cos(r),0,0])),(a||s)&&n.translateSelf(-a,-s),n;default:throw new this[W].TypeError(`Failed to parse transform attribute: Unknown transformation "${e}".`)}}[na](e){this[$]=e.toString().replace(/, /g," "),this[L]&&this[L](this[$])}};G();var Tie;(function(t){t[t.unknown=0]="unknown",t[t.matrix=1]="matrix",t[t.translate=2]="translate",t[t.scale=3]="scale",t[t.rotate=4]="rotate",t[t.skewX=5]="skewX",t[t.skewY=6]="skewY"})(Tie||(Tie={}));var Sr=Tie;var zze=/([a-zA-Z0-9]+)\(([^)]+)\)/,oLI=/[\s,]+/,BG=class{static SVG_TRANSFORM_UNKNOWN=Sr.unknown;static SVG_TRANSFORM_MATRIX=Sr.matrix;static SVG_TRANSFORM_TRANSLATE=Sr.translate;static SVG_TRANSFORM_SCALE=Sr.scale;static SVG_TRANSFORM_ROTATE=Sr.rotate;static SVG_TRANSFORM_SKEWX=Sr.skewX;static SVG_TRANSFORM_SKEWY=Sr.skewY;[W];[M]=null;[L]=null;[$]=null;[Ve]=!1;[MZ]=null;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,l&&(this[Ve]=!!l.readOnly,this[M]=l.getAttribute||null,this[L]=l.setAttribute||null)}get type(){let I=(this[M]?this[M]():this[$])?.match(zze);if(!I)return Sr.unknown;switch(I[1]){case"matrix":return Sr.matrix;case"translate":return Sr.translate;case"rotate":return Sr.rotate;case"scale":return Sr.scale;case"skewX":return Sr.skewX;case"skewY":return Sr.skewY}return 0}get angle(){let I=(this[M]?this[M]():this[$])?.match(zze);if(!I)return 0;let l=parseFloat(I[2].trim().split(oLI)[0]);if(isNaN(l))return 0;switch(I[1]){case"rotate":case"skewX":case"skewY":return l}return 0}get matrix(){return this[MZ]||(this[MZ]=new Sh(V,this[W],{readOnly:this[Ve],getAttribute:()=>this[M]?this[M]():this[$],setAttribute:e=>{if(this[$]=e,this[L]){this[L](e);return}}})),this[MZ]}setMatrix(e){if(!(e instanceof Sh))throw new TypeError('Failed to set the "matrix" property on "SVGTransform": The provided value is not of type "SVGMatrix".');this[Ve]||(this[MZ]&&(this[MZ][M]=null,this[MZ][L]=null),e[M]=()=>this[M]?this[M]():this[$],e[L]=I=>{if(this[$]=I,this[L]){this[L](I);return}},this[MZ]=e,e[$]!==this[$]&&(this[$]=e[$],this[L]&&this[L](this[$]||"")))}setTranslate(e,I){if(arguments.length<2)throw new TypeError(`Failed to execute 'setTranslate' on 'SVGTransform': 2 arguments required, but only ${arguments.length} present.`);if(e=Number(e),I=Number(I),isNaN(e)||isNaN(I))throw new TypeError("Failed to execute 'setTranslate' on 'SVGTransform': The provided float value is non-finite.");this[Ve]||(this[$]=`translate(${e} ${I})`,this[L]&&this[L](this[$]))}setScale(e,I){if(arguments.length<2)throw new TypeError(`Failed to execute 'setScale' on 'SVGTransform': 2 arguments required, but only ${arguments.length} present.`);if(e=Number(e),I=Number(I),isNaN(e)||isNaN(I))throw new TypeError("Failed to execute 'setScale' on 'SVGTransform': The provided float value is non-finite.");this[Ve]||(this[$]=`scale(${e} ${I})`,this[L]&&this[L](this[$]))}setRotate(e,I,l){if(arguments.length<3)throw new TypeError(`Failed to execute 'setRotate' on 'SVGTransform': 3 arguments required, but only ${arguments.length} present.`);if(e=Number(e),I=Number(I),l=Number(l),isNaN(e)||isNaN(I)||isNaN(l))throw new TypeError("Failed to execute 'setRotate' on 'SVGTransform': The provided float value is non-finite.");this[Ve]||(this[$]=`rotate(${e} ${I} ${l})`,this[L]&&this[L](this[$]))}setSkewX(e){if(arguments.length<1)throw new TypeError(`Failed to execute 'setSkewX' on 'SVGTransform': 1 arguments required, but only ${arguments.length} present.`);if(e=Number(e),isNaN(e))throw new TypeError("Failed to execute 'setSkewX' on 'SVGTransform': The provided float value is non-finite.");this[Ve]||(this[$]=`skewX(${e})`,this[L]&&this[L](this[$]))}setSkewY(e){if(arguments.length<1)throw new TypeError(`Failed to execute 'setSkewY' on 'SVGTransform': 1 arguments required, but only ${arguments.length} present.`);if(e=Number(e),isNaN(e))throw new TypeError("Failed to execute 'setSkewY' on 'SVGTransform': The provided float value is non-finite.");this[Ve]||(this[$]=`skewY(${e})`,this[L]&&this[L](this[$]))}};var dLI=/([a-zA-Z0-9]+)\(([^)]+)\)/gm,pu="matrix(1 0 0 1 0 0)",qY=class t{[W];[M];[L];[Ve]=!1;[de]={items:[],attributeValue:""};constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[Ve]=!!l.readOnly,this[M]=l.getAttribute,this[L]=l.setAttribute;let n=new Zl(this,[t]);return new Proxy(this,{get:(c,a)=>{if(a==="length"||a==="numberOfItems")return c[We]().length;if(a in c||typeof a=="symbol")return n.bind(a),c[a];let s=Number(a);if(!isNaN(s))return c[We]()[s]},set(c,a,s){if(n.bind(a),typeof a=="symbol")return c[a]=s,!0;let r=Number(a);return isNaN(r)&&(c[a]=s),!0},deleteProperty(c,a){if(typeof a=="symbol")return delete c[a],!0;let s=Number(a);return isNaN(s)&&delete c[a],!0},ownKeys(c){return Object.keys(c[We]())},has(c,a){if(a in c)return!0;if(typeof a=="symbol")return!1;let s=Number(a);return!isNaN(s)&&s>=0&&s<c[We]().length},defineProperty(c,a,s){return n.preventBinding(a),a in c?(Object.defineProperty(c,a,s),!0):!1},getOwnPropertyDescriptor(c,a){if(a in c||typeof a=="symbol")return;let s=Number(a),r=c[We]();if(!isNaN(s)&&r[s])return{value:r[s],writable:!1,enumerable:!0,configurable:!0}}})}get length(){return this[We]().length}get numberOfItems(){return this[We]().length}[Symbol.iterator](){return this[We]().values()}clear(){if(this[Ve])throw new this[W].TypeError("Failed to execute 'clear' on 'SVGTransformList': The object is read-only.");for(let e of this[de].items)e[M]=null,e[L]=null;this[de].items=[],this[de].attributeValue="",this[L]("")}initialize(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'initialize' on 'SVGTransformList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'initialize' on 'SVGTransformList': 1 arguments required, but only ${arguments.length} present.`);if(!(e instanceof BG))throw new this[W].TypeError("Failed to execute 'appendItem' on 'SVGTransformList': parameter 1 is not of type 'SVGTransform'.");for(let I of this[de].items)I[M]=null,I[L]=null;return e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(I=>I[$]||pu).join(" "),this[L](this[de].attributeValue)},this[de].items=[e],this[de].attributeValue=e[$],this[L](e[$]||""),e}getItem(e){let I=this[We]();return typeof e=="number"||(e=Number(e),e=isNaN(e)?0:e),I[e]?I[e]:null}insertItemBefore(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'insertItemBefore' on 'SVGTransformList': The object is read-only.");if(arguments.length<2)throw new this[W].TypeError(`Failed to execute 'insertItemBefore' on 'SVGTransformList': 2 arguments required, but only ${arguments.length} present.`);if(!(e instanceof BG))throw new this[W].TypeError("Failed to execute 'insertItemBefore' on 'SVGTransformList': parameter 1 is not of type 'SVGTransform'.");let l=this[We](),n=l.indexOf(e);return n!==-1&&l.splice(n,1),I<0?I=0:I>l.length&&(I=l.length),l.splice(I,0,e),e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(c=>c[$]||pu).join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=l.map(c=>c[$]||pu).join(" "),this[L](this[de].attributeValue),e}replaceItem(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'replaceItem' on 'SVGTransformList': The object is read-only.");if(arguments.length<2)throw new this[W].TypeError(`Failed to execute 'replaceItem' on 'SVGTransformList': 2 arguments required, but only ${arguments.length} present.`);if(!(e instanceof BG))throw new this[W].TypeError("Failed to execute 'replaceItem' on 'SVGTransformList': parameter 1 is not of type 'SVGTransform'.");let l=this[We](),n=l.indexOf(e);if(n===I)return e;n!==-1&&l.splice(n,1),I<0?I=0:I>=l.length&&(I=l.length-1),l[I]&&(l[I][M]=null,l[I][L]=null);let c=l[I];return l[I]=e,e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(a=>a[$]||pu).join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=l.map(a=>a[$]||pu).join(" "),this[L](this[de].attributeValue),c}removeItem(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'removeItem' on 'SVGTransformList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'removeItem' on 'SVGTransformList': 1 argument required, but only ${arguments.length} present.`);let I=this[We]();if(e=Number(e),isNaN(e)&&(e=0),e>=I.length)throw new this[W].DOMException(`Failed to execute 'removeItem' on 'SVGTransformList': The index provided (${e}) is greater than the maximum bound.`,B.indexSizeError);if(e<0)throw new this[W].DOMException(`Failed to execute 'removeItem' on 'SVGTransformList': The index provided (${e}) is negative.`,B.indexSizeError);let l=I[e];return l&&(l[M]=null,l[L]=null),I.splice(e,1),this[de].attributeValue=I.map(n=>n[$]||pu).join(" "),this[L](this[de].attributeValue),l}appendItem(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'appendItem' on 'SVGTransformList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'appendItem' on 'SVGTransformList': 1 argument required, but only ${arguments.length} present.`);if(!(e instanceof BG))throw new this[W].TypeError("Failed to execute 'appendItem' on 'SVGTransformList': parameter 1 is not of type 'SVGTransform'.");let I=this[We](),l=I.indexOf(e);return l!==-1&&I.splice(l,1),I.push(e),e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(n=>n[$]||pu).join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=I.map(n=>n[$]||pu).join(" "),this[L](this[de].attributeValue),e}[We](){let e=this[M]()??"",I=this[de];if(I.attributeValue===e)return I.items;if(I.items.length)for(let c of I.items)c[M]=null,c[L]=null;let l=[],n=e.trim();if(n){let c=new RegExp(dLI),a;for(;a=c.exec(n);){let s=new BG(V,this[W],{readOnly:this[Ve],getAttribute:()=>s[$],setAttribute:()=>{this[de].attributeValue=this[We]().map(r=>r[$]||pu).join(" "),this[L](this[de].attributeValue)}});s[$]=`${a[1]}(${a[2]})`,l.push(s)}}return I.attributeValue=e,I.items=l,l}};var Rb=class{[W];[M];[L];[Mt]=null;[Tt]=null;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute}get animVal(){return this[Tt]||(this[Tt]=new qY(V,this[W],{readOnly:!0,getAttribute:this[M],setAttribute:()=>{}})),this[Tt]}set animVal(e){}get baseVal(){return this[Mt]||(this[Mt]=new qY(V,this[W],{getAttribute:this[M],setAttribute:this[L]})),this[Mt]}set baseVal(e){}};var Al=class extends ke{[sh]=null;[rh]=null;[t3]=null;get oncopy(){return E.getEventListener(this,"oncopy")}set oncopy(e){this[F].set("oncopy",e)}get oncut(){return E.getEventListener(this,"oncut")}set oncut(e){this[F].set("oncut",e)}get onpaste(){return E.getEventListener(this,"onpaste")}set onpaste(e){this[F].set("onpaste",e)}get requiredExtensions(){return this[sh]||(this[sh]=new Vb(V,this[W],{getAttribute:()=>this.getAttribute("requiredExtensions"),setAttribute:e=>this.setAttribute("requiredExtensions",e)})),this[sh]}get systemLanguage(){return this[rh]||(this[rh]=new Vb(V,this[W],{getAttribute:()=>this.getAttribute("systemLanguage"),setAttribute:e=>this.setAttribute("systemLanguage",e)})),this[rh]}get transform(){return this[t3]||(this[t3]=new Rb(V,this[W],{getAttribute:()=>this.getAttribute("transform"),setAttribute:e=>this.setAttribute("transform",e)})),this[t3]}getBBox(){return new Dd}getCTM(){return new Os}getScreenCTM(){return new Os}};G();var Pd=class{[W];[M]=null;[L]=null;[$]=null;[Ve]=!1;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,l&&(this[Ve]=!!l.readOnly,this[M]=l.getAttribute||null,this[L]=l.setAttribute||null)}get x(){let e=this[M]?this[M]():this[$];if(!e)return 0;let I=e.split(/\s+/),l=Number(I[0]);return isNaN(l)?0:l}set x(e){if(this[Ve])throw new this[W].TypeError("Failed to set the 'x' property on 'SVGRect': The object is read-only.");this[$]=`${String(typeof e=="number"?e:parseFloat(e))} ${this.y} ${this.width} ${this.height}`,this[L]&&this[L](this[$])}get y(){let e=this[M]?this[M]():this[$];if(!e)return 0;let I=e.split(/\s+/),l=Number(I[1]);return isNaN(l)?0:l}set y(e){if(this[Ve])throw new this[W].TypeError("Failed to set the 'y' property on 'SVGRect': The object is read-only.");this[$]=`${this.x} ${String(typeof e=="number"?e:parseFloat(e))} ${this.width} ${this.height}`,this[L]&&this[L](this[$])}get width(){let e=this[M]?this[M]():this[$];if(!e)return 0;let I=e.split(/\s+/),l=Number(I[2]);return isNaN(l)?0:l}set width(e){if(this[Ve])throw new this[W].TypeError("Failed to set the 'width' property on 'SVGRect': The object is read-only.");this[$]=`${this.x} ${this.y} ${String(typeof e=="number"?e:parseFloat(e))} ${this.height}`,this[L]&&this[L](this[$])}get height(){let e=this[M]?this[M]():this[$];if(!e)return 0;let I=e.split(/\s+/),l=Number(I[3]);return isNaN(l)?0:l}set height(e){if(this[Ve])throw new this[W].TypeError("Failed to set the 'height' property on 'SVGRect': The object is read-only.");this[$]=`${this.x} ${this.y} ${this.width} ${String(typeof e=="number"?e:parseFloat(e))}`,this[L]&&this[L](this[$])}};G();var Uze=/[\t\f\n\r, ]+/,Fc=class{[W];[M]=null;[L]=null;[$]=null;[Ve]=!1;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,l&&(this[Ve]=!!l.readOnly,this[M]=l.getAttribute||null,this[L]=l.setAttribute||null)}get x(){let I=((this[M]?this[M]():this[$])||"").split(Uze);return I[0]?parseFloat(I[0]):0}set x(e){if(this[Ve])throw new this[W].TypeError("Failed to set the 'x' property on 'SVGPoint': The object is read-only.");this[$]=`${e} ${this.y}`,this[L]&&this[L](this[$])}get y(){let I=((this[M]?this[M]():this[$])||"").split(Uze);return I[1]?parseFloat(I[1]):0}set y(e){if(this[Ve])throw new this[W].TypeError("Failed to set the 'y' property on 'SVGPoint': The object is read-only.");this[$]=`${this.x} ${e}`,this[L]&&this[L](this[$])}};G();G();var jie;(function(t){t[t.unknown=0]="unknown",t[t.number=1]="number",t[t.percentage=2]="percentage",t[t.ems=3]="ems",t[t.exs=4]="exs",t[t.px=5]="px",t[t.cm=6]="cm",t[t.mm=7]="mm",t[t.in=8]="in",t[t.pt=9]="pt",t[t.pc=10]="pc"})(jie||(jie={}));var VI=jie;var Sze=/^(\d+|\d+\.\d+)(px|em|ex|cm|mm|in|pt|pc|%|)$/,qd=class{static SVG_LENGTHTYPE_UNKNOWN=VI.unknown;static SVG_LENGTHTYPE_NUMBER=VI.number;static SVG_LENGTHTYPE_PERCENTAGE=VI.percentage;static SVG_LENGTHTYPE_EMS=VI.ems;static SVG_LENGTHTYPE_EXS=VI.exs;static SVG_LENGTHTYPE_PX=VI.px;static SVG_LENGTHTYPE_CM=VI.cm;static SVG_LENGTHTYPE_MM=VI.mm;static SVG_LENGTHTYPE_IN=VI.in;static SVG_LENGTHTYPE_PT=VI.pt;static SVG_LENGTHTYPE_PC=VI.pc;[W];[M]=null;[L]=null;[$]=null;[Ve]=!1;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,l&&(this[Ve]=!!l.readOnly,this[M]=l.getAttribute||null,this[L]=l.setAttribute||null)}get unitType(){let I=(this[M]?this[M]()||"":this[$]||"").match(Sze);if(!I)return VI.unknown;if(isNaN(parseFloat(I[1])))return VI.unknown;switch(I[2]){case"":return VI.number;case"px":return VI.px;case"cm":return VI.cm;case"mm":return VI.mm;case"in":return VI.in;case"pt":return VI.pt;case"pc":return VI.pc;case"em":case"ex":case"%":throw new this[W].TypeError("Failed to execute 'value' on 'SVGLength': Could not resolve relative length.");default:return VI.unknown}}get value(){let I=(this[M]?this[M]()||"":this[$]||"").match(Sze);if(!I)return 0;let l=parseFloat(I[1]);if(isNaN(l))return 0;switch(I[2]){case"":return l;case"px":return l;case"cm":return l/2.54*96;case"mm":return l/25.4*96;case"in":return l*96;case"pt":return l*72;case"pc":return l*6;case"em":case"ex":case"%":throw new this[W].TypeError("Failed to execute 'value' on 'SVGLength': Could not resolve relative length.");default:return 0}}set value(e){if(this[Ve])throw new this[W].TypeError("Failed to set the 'value' property on 'SVGLength': The object is read-only.");if(e=typeof e!="number"?parseFloat(String(e)):e,isNaN(e))throw new this[W].TypeError("Failed to set the 'value' property on 'SVGLength': The provided float value is non-finite.");let I="",l=e;switch(this.unitType){case VI.number:l=e,I="";break;case VI.px:l=e,I="px";break;case VI.cm:l=e/96*2.54,I="cm";break;case VI.mm:l=e/96*25.4,I="mm";break;case VI.in:l=e/96,I="in";break;case VI.pt:l=e/72,I="pt";break;case VI.pc:l=e/6,I="pc";break;case VI.percentage:case VI.ems:case VI.exs:throw new this[W].TypeError("Failed to set the 'value' property on 'SVGLength': Could not resolve relative length.");default:break}this[$]=String(l)+I,this[L]&&this[L](this[$])}get valueAsString(){return this[M]?this[M]()||"0":this[$]||"0"}get valueInSpecifiedUnits(){let e=this.valueAsString;return parseFloat(e)||0}newValueSpecifiedUnits(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'newValueSpecifiedUnits' on 'SVGLength': The object is read-only.");if(typeof e!="number")throw new this[W].TypeError("Failed to execute 'newValueSpecifiedUnits' on 'SVGLength': parameter 1 ('unitType') is not of type 'number'.");if(I=typeof I!="number"?parseFloat(String(I)):I,isNaN(I))throw new this[W].TypeError("Failed to execute 'newValueSpecifiedUnits' on 'SVGLength': The provided float value is non-finite.");let l="";switch(e){case VI.number:l="";break;case VI.px:l="px";break;case VI.cm:l="cm";break;case VI.mm:l="mm";break;case VI.in:l="in";break;case VI.pt:l="pt";break;case VI.pc:l="pc";break;case VI.ems:case VI.exs:case VI.percentage:throw new this[W].TypeError("Failed to execute 'newValueSpecifiedUnits' on 'SVGLength': Could not resolve relative length.");default:break}this[$]=String(I)+l,this[L]&&this[L](this[$])}convertToSpecifiedUnits(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'convertToSpecifiedUnits' on 'SVGLength': The object is read-only.");if(typeof e!="number")throw new this[W].TypeError("Failed to execute 'convertToSpecifiedUnits' on 'SVGLength': parameter 1 ('unitType') is not of type 'number'.");let I=this.value,l="";switch(e){case VI.number:l="";break;case VI.px:l="px";break;case VI.cm:I=I/96*2.54,l="cm";break;case VI.mm:I=I/96*25.4,l="mm";break;case VI.in:I=I/96,l="in";break;case VI.pt:I=I/72,l="pt";break;case VI.pc:I=I/6,l="pc";break;case VI.percentage:case VI.ems:case VI.exs:throw new this[W].TypeError("Failed to execute 'convertToSpecifiedUnits' on 'SVGLength': Could not resolve relative length.");default:break}this[$]=String(I)+l,this[L]&&this[L](this[$])}};G();G();var Die;(function(t){t[t.unknown=0]="unknown",t[t.unspecified=1]="unspecified",t[t.deg=2]="deg",t[t.rad=3]="rad",t[t.grad=4]="grad"})(Die||(Die={}));var El=Die;var Oze=/^(\d+|\d+\.\d+)(deg|rad|grad|turn|)$/,Oh=class{static SVG_ANGLETYPE_UNKNOWN=El.unknown;static SVG_ANGLETYPE_UNSPECIFIED=El.unspecified;static SVG_ANGLETYPE_DEG=El.deg;static SVG_ANGLETYPE_RAD=El.rad;static SVG_ANGLETYPE_GRAD=El.grad;[W];[M]=null;[L]=null;[$]="";[Ve]=!1;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,l&&(this[Ve]=!!l.readOnly,this[M]=l.getAttribute||null,this[L]=l.setAttribute||null)}get unitType(){let I=(this[M]?this[M]():this[$])?.match(Oze);if(!I)return El.unknown;if(isNaN(parseFloat(I[1])))return El.unknown;switch(I[2]){case"":return El.unspecified;case"deg":return El.deg;case"rad":return El.rad;case"grad":return El.grad;case"turn":return El.unknown;default:return El.unspecified}}get value(){let I=(this[M]?this[M]():this[$])?.match(Oze);if(!I)return 0;let l=parseFloat(I[1]);if(isNaN(l))return 0;switch(I[2]){case"":return l;case"deg":return l;case"rad":return l*(180/Math.PI);case"grad":return l*(180/200);case"turn":return l*360;default:return l}}set value(e){if(this[Ve])throw new this[W].TypeError("Failed to set the 'value' property on 'SVGAngle': The object is read-only.");if(e=typeof e!="number"?parseFloat(String(e)):e,isNaN(e))throw new this[W].TypeError("Failed to set the 'value' property on 'SVGAngle': The provided float value is non-finite.");let I="",l=e;switch(this.unitType){case El.unspecified:l=e,I="";break;case El.deg:l=e,I="deg";break;case El.rad:l=e/(180/Math.PI),I="rad";break;case El.grad:l=e/(180/200),I="grad";break;case El.unknown:l=e/360,I="turn";default:break}this[$]=String(l)+I,this[L]&&this[L](this[$])}get valueAsString(){return this[M]?this[M]()||"0":this[$]||"0"}get valueInSpecifiedUnits(){let e=this.valueAsString;return parseFloat(e)||0}newValueSpecifiedUnits(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'newValueSpecifiedUnits' on 'SVGAngle': The object is read-only.");if(typeof e!="number")throw new this[W].TypeError("Failed to execute 'newValueSpecifiedUnits' on 'SVGAngle': parameter 1 ('unitType') is not of type 'number'.");if(I=typeof I!="number"?parseFloat(I):I,isNaN(I))throw new this[W].TypeError("Failed to execute 'newValueSpecifiedUnits' on 'SVGAngle': The provided float value is non-finite.");let l="";switch(e){case El.unspecified:l="";break;case El.deg:l="deg";break;case El.rad:l="rad";break;case El.grad:l="grad";break;case El.unknown:l="turn";break;default:break}this[$]=String(I)+l,this[L]&&this[L](this[$])}convertToSpecifiedUnits(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'convertToSpecifiedUnits' on 'SVGAngle': The object is read-only.");if(typeof e!="number")throw new this[W].TypeError("Failed to execute 'convertToSpecifiedUnits' on 'SVGAngle': parameter 1 ('unitType') is not of type 'number'.");let I=this.value,l="";switch(e){case El.unspecified:l="";break;case El.deg:l="deg";break;case El.rad:l="rad",I=I/(180/Math.PI);break;case El.grad:l="grad",I=I/(180/200);break;case El.unknown:l="turn",I=I/360;break;default:break}this[$]=String(I)+l,this[L]&&this[L](this[$])}};G();var _d=class{[W];[M]=null;[L]=null;[$]=null;[Ve]=!1;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,l&&(this[Ve]=!!l.readOnly,this[M]=l.getAttribute||null,this[L]=l.setAttribute||null)}get value(){let e=this[M]?this[M]():this[$];return parseFloat(e||"0")}set value(e){if(this[Ve])throw new TypeError("Failed to set the 'value' property on 'SVGNumber': The object is read-only.");let I=typeof e!="number"?parseFloat(String(e)):e;if(isNaN(I))throw new TypeError("Failed to set the 'value' property on 'SVGNumber': The provided value is not a number.");this[$]=String(e),this[L]&&this[L](this[$]||"")}};G();var Zu=class{[W];[M];[L];[Mt]=null;[Tt]=null;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute}get animVal(){return this[Tt]||(this[Tt]=new Pd(V,this[W],{readOnly:!0,getAttribute:this[M]})),this[Tt]}set animVal(e){}get baseVal(){return this[Mt]||(this[Mt]=new Pd(V,this[W],{getAttribute:this[M],setAttribute:this[L]})),this[Mt]}set baseVal(e){}};G();G();G();var Kie;(function(t){t[t.unknown=0]="unknown",t[t.meet=1]="meet",t[t.slice=2]="slice"})(Kie||(Kie={}));var uu=Kie;G();var Pie;(function(t){t[t.unknown=0]="unknown",t[t.none=1]="none",t[t.xMinYMin=2]="xMinYMin",t[t.xMidYMin=3]="xMidYMin",t[t.xMaxYMin=4]="xMaxYMin",t[t.xMinYMid=5]="xMinYMid",t[t.xMidYMid=6]="xMidYMid",t[t.xMaxYMid=7]="xMaxYMid",t[t.xMinYMax=8]="xMinYMax",t[t.xMidYMax=9]="xMidYMax",t[t.xMaxYMax=10]="xMaxYMax"})(Pie||(Pie={}));var is=Pie;var ef=Object.values(is);ef.length=ef.indexOf(0);var gP=Object.values(uu);gP.length=gP.indexOf(0);var _Y=class{static SVG_MEETORSLICE_UNKNOWN=uu.unknown;static SVG_MEETORSLICE_MEET=uu.meet;static SVG_MEETORSLICE_SLICE=uu.slice;static SVG_PRESERVEASPECTRATIO_UNKNOWN=is.unknown;static SVG_PRESERVEASPECTRATIO_NONE=is.none;static SVG_PRESERVEASPECTRATIO_XMINYMIN=is.xMinYMin;static SVG_PRESERVEASPECTRATIO_XMIDYMIN=is.xMidYMin;static SVG_PRESERVEASPECTRATIO_XMAXYMIN=is.xMaxYMin;static SVG_PRESERVEASPECTRATIO_XMINYMID=is.xMinYMid;static SVG_PRESERVEASPECTRATIO_XMIDYMID=is.xMidYMid;static SVG_PRESERVEASPECTRATIO_XMAXYMID=is.xMaxYMid;static SVG_PRESERVEASPECTRATIO_XMINYMAX=is.xMinYMax;static SVG_PRESERVEASPECTRATIO_XMIDYMAX=is.xMidYMax;static SVG_PRESERVEASPECTRATIO_XMAXYMAX=is.xMaxYMax;[W];[M]=null;[L]=null;[$]=null;[Ve]=!1;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,l&&(this[Ve]=!!l.readOnly,this[M]=l.getAttribute||null,this[L]=l.setAttribute||null)}get align(){let e=this[M]?this[M]():this[$];if(!e)return is.xMidYMid;let I=e.split(/\s+/)[0];return is[I]===void 0?is.xMidYMid:is[I]}set align(e){if(this[Ve])throw new this[W].TypeError("Failed to set the 'align' property on 'SVGPreserveAspectRatio': The object is read-only.");let I=Number(e);if(isNaN(I)||I<1||I>ef.length)throw new this[W].TypeError("Failed to set the 'align' property on 'SVGPreserveAspectRatio': The alignment provided is invalid.");this[$]=`${ef[I]} ${gP[this.meetOrSlice]}`,this[L]&&this[L](this[$])}get meetOrSlice(){let e=this[M]?this[M]():this[$];if(!e)return uu.meet;let I=e.split(/\s+/)[1];return!I||uu[I]===void 0?uu.meet:uu[I]}set meetOrSlice(e){if(this[Ve])throw new this[W].TypeError("Failed to set the 'meetOrSlice' property on 'SVGPreserveAspectRatio': The object is read-only.");let I=Number(e);if(isNaN(I)||I<1||I>2)throw new this[W].TypeError("Failed to set the 'meetOrSlice' property on 'SVGPreserveAspectRatio': The meetOrSlice provided is invalid.");this[$]=`${ef[this.align]} ${gP[I]}`,this[L]&&this[L](this[$])}};var Ko=class{[W];[M];[L];[Mt]=null;[Tt]=null;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute}get animVal(){return this[Tt]||(this[Tt]=new _Y(V,this[W],{readOnly:!0,getAttribute:this[M]})),this[Tt]}set animVal(e){}get baseVal(){return this[Mt]||(this[Mt]=new _Y(V,this[W],{getAttribute:this[M],setAttribute:this[L]})),this[Mt]}set baseVal(e){}};G();var T=class{[W];[M];[L];[Mt]=null;[Tt]=null;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute}get animVal(){return this[Tt]||(this[Tt]=new qd(V,this[W],{readOnly:!0,getAttribute:this[M]})),this[Tt]}set animVal(e){}get baseVal(){return this[Mt]||(this[Mt]=new qd(V,this[W],{getAttribute:this[M],setAttribute:this[L]})),this[Mt]}set baseVal(e){}};var eE=class extends Al{[xc]=null;[P]=null;[q]=null;[ce]=null;[ne]=null;[sP]=1;[Gh]=null;get onafterprint(){return E.getEventListener(this,"onafterprint")}set onafterprint(e){this[F].set("onafterprint",e)}get onbeforeprint(){return E.getEventListener(this,"onbeforeprint")}set onbeforeprint(e){this[F].set("onbeforeprint",e)}get onbeforeunload(){return E.getEventListener(this,"onbeforeunload")}set onbeforeunload(e){this[F].set("onbeforeunload",e)}get ongamepadconnected(){return E.getEventListener(this,"ongamepadconnected")}set ongamepadconnected(e){this[F].set("ongamepadconnected",e)}get ongamepaddisconnected(){return E.getEventListener(this,"ongamepaddisconnected")}set ongamepaddisconnected(e){this[F].set("ongamepaddisconnected",e)}get onhashchange(){return E.getEventListener(this,"onhashchange")}set onhashchange(e){this[F].set("onhashchange",e)}get onlanguagechange(){return E.getEventListener(this,"onlanguagechange")}set onlanguagechange(e){this[F].set("onlanguagechange",e)}get onmessage(){return E.getEventListener(this,"onmessage")}set onmessage(e){this[F].set("onmessage",e)}get onmessageerror(){return E.getEventListener(this,"onmessageerror")}set onmessageerror(e){this[F].set("onmessageerror",e)}get onoffline(){return E.getEventListener(this,"onoffline")}set onoffline(e){this[F].set("onoffline",e)}get ononline(){return E.getEventListener(this,"ononline")}set ononline(e){this[F].set("ononline",e)}get onpagehide(){return E.getEventListener(this,"onpagehide")}set onpagehide(e){this[F].set("onpagehide",e)}get onpageshow(){return E.getEventListener(this,"onpageshow")}set onpageshow(e){this[F].set("onpageshow",e)}get onpopstate(){return E.getEventListener(this,"onpopstate")}set onpopstate(e){this[F].set("onpopstate",e)}get onrejectionhandled(){return E.getEventListener(this,"onrejectionhandled")}set onrejectionhandled(e){this[F].set("onrejectionhandled",e)}get onstorage(){return E.getEventListener(this,"onstorage")}set onstorage(e){this[F].set("onstorage",e)}get onunhandledrejection(){return E.getEventListener(this,"onunhandledrejection")}set onunhandledrejection(e){this[F].set("onunhandledrejection",e)}get onunload(){return E.getEventListener(this,"onunload")}set onunload(e){this[F].set("onunload",e)}get preserveAspectRatio(){return this[xc]||(this[xc]=new Ko(V,this[W],{getAttribute:()=>this.getAttribute("preserveAspectRatio"),setAttribute:e=>this.setAttribute("preserveAspectRatio",e)})),this[xc]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}get currentScale(){return this[sP]}set currentScale(e){let I=typeof e!="number"?parseFloat(String(e)):e;if(isNaN(I))throw this[W].TypeError("Failed to set the 'currentScale' property on 'SVGSVGElement': The provided float value is non-finite.");I<1||(this[sP]=I)}get currentTranslate(){return new Fc(V,this[W])}get viewBox(){return this[Gh]||(this[Gh]=new Zu(V,this[W],{getAttribute:()=>this.getAttribute("viewBox"),setAttribute:e=>this.setAttribute("viewBox",e)})),this[Gh]}pauseAnimations(){}unpauseAnimations(){}animationsPaused(){return!1}getCurrentTime(){return 0}setCurrentTime(e){}getIntersectionList(e,I){return new So(V,[])}getEnclosureList(e,I){return new So(V,[])}checkIntersection(e,I){return!1}checkEnclosure(e,I){return!1}deselectAll(){}createSVGNumber(){return new _d(V,this[W])}createSVGLength(){return new qd(V,this[W])}createSVGAngle(){return new Oh(V,this[W])}createSVGPoint(){return new Fc(V,this[W])}createSVGMatrix(){return new Sh(V,this[W])}createSVGRect(){return new Pd(V,this[W])}createSVGTransform(){return new BG(V,this[W])}createSVGTransformFromMatrix(e){let I=new BG(V,this[W]);return I.setMatrix(e),I}getElementsByClassName(e){return Et.getElementsByClassName(this,e)}getElementsByTagName(e){return Et.getElementsByTagName(this,e)}getElementsByTagNameNS(e,I){return Et.getElementsByTagNameNS(this,e,I)}getElementById(e){return Et.getElementById(this,e)}[nI](e=!1){return super[nI](e)}};G();G();var Po=class extends ke{[sh]=null;[rh]=null;get onbegin(){return E.getEventListener(this,"onbegin")}set onbegin(e){this[F].set("onbegin",e)}get onend(){return E.getEventListener(this,"onend")}set onend(e){this[F].set("onend",e)}get onrepeat(){return E.getEventListener(this,"onrepeat")}set onrepeat(e){this[F].set("onrepeat",e)}get requiredExtensions(){return this[sh]||(this[sh]=new Vb(V,this[W],{getAttribute:()=>this.getAttribute("requiredExtensions"),setAttribute:e=>this.setAttribute("requiredExtensions",e)})),this[sh]}get systemLanguage(){return this[rh]||(this[rh]=new Vb(V,this[W],{getAttribute:()=>this.getAttribute("systemLanguage"),setAttribute:e=>this.setAttribute("systemLanguage",e)})),this[rh]}get targetElement(){return null}};var If=class extends Po{};G();var tf=class extends Po{};G();var lf=class extends Po{};G();G();G();var $e=class{[W];[M];[L];[Qr]=0;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute,this[Qr]=l.defaultValue||0}get animVal(){return this.baseVal}set animVal(e){}get baseVal(){let e=this[M]();if(!e)return this[Qr];let I=parseFloat(e);return isNaN(I)?this[Qr]:I}set baseVal(e){let I=typeof e!="number"?parseFloat(e):e;if(isNaN(I))throw new this[W].TypeError("TypeError: Failed to set the 'baseVal' property on 'SVGAnimatedNumber': The provided float value is non-finite.");this[L](String(I))}};var sa=class extends Al{[l3]=null;get pathLength(){return this[l3]||(this[l3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("pathLength"),setAttribute:e=>this.setAttribute("pathLength",e)})),this[l3]}isPointInFill(e){if(!(e instanceof Fc))throw new TypeError("Failed to execute 'isPointInFill' on 'SVGGeometryElement': parameter 1 is not of type 'SVGPoint'.");return!1}isPointInStroke(e){if(!(e instanceof Fc))throw new TypeError("Failed to execute 'isPointInFill' on 'SVGGeometryElement': parameter 1 is not of type 'SVGPoint'.");return!1}getTotalLength(){return 0}getPointAtLength(e){return new Fc(V,this[W])}};var nf=class extends sa{[Ar]=null;[wr]=null;[mh]=null;get cx(){return this[Ar]||(this[Ar]=new T(V,this[W],{getAttribute:()=>this.getAttribute("cx"),setAttribute:e=>this.setAttribute("cx",e)})),this[Ar]}get cy(){return this[wr]||(this[wr]=new T(V,this[W],{getAttribute:()=>this.getAttribute("cy"),setAttribute:e=>this.setAttribute("cy",e)})),this[wr]}get r(){return this[mh]||(this[mh]=new T(V,this[W],{getAttribute:()=>this.getAttribute("r"),setAttribute:e=>this.setAttribute("r",e)})),this[mh]}};G();G();var EI=class{[W];[M];[L];[Vc];[Qr];constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute,this[Vc]=l.values,this[Qr]=l.defaultValue}get animVal(){return this.baseVal}set animVal(e){}get baseVal(){let e=this[M]();if(!e)return this[Vc].indexOf(this[Qr])+1;let I=this[Vc].indexOf(e);if(I===-1){let l=this[Vc].indexOf(null);return l!==-1?l+1:0}return I+1}set baseVal(e){let I=Number(e);if(isNaN(I)&&(I=0),I<1)throw new TypeError(`Failed to set the 'baseVal' property on 'SVGAnimatedEnumeration': The enumeration value provided is ${I}, which is not settable.`);if(I>this[Vc].length)throw new TypeError(`Failed to set the 'baseVal' property on 'SVGAnimatedEnumeration': The enumeration value provided (${I}) is larger than the largest allowed value (${this[Vc].length}).`);let l=this[M](),n=this[Vc][I-1]===null,c=n?"0":this[Vc][I-1];(!l||n&&this[Vc].includes(l)||!n&&l!==c)&&this[L](c||"")}};var cf=class extends ke{[d3]=null;get clipPathUnits(){return this[d3]||(this[d3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("clipPathUnits"),setAttribute:e=>this.setAttribute("clipPathUnits",e),values:["userSpaceOnUse","objectBoundingBox"],defaultValue:"userSpaceOnUse"})),this[d3]}};G();var af=class extends Al{};G();var sf=class extends ke{};G();var rf=class extends sa{[Ar]=null;[wr]=null;[ih]=null;[bh]=null;get cx(){return this[Ar]||(this[Ar]=new T(V,this[W],{getAttribute:()=>this.getAttribute("cx"),setAttribute:e=>this.setAttribute("cx",e)})),this[Ar]}get cy(){return this[wr]||(this[wr]=new T(V,this[W],{getAttribute:()=>this.getAttribute("cy"),setAttribute:e=>this.setAttribute("cy",e)})),this[wr]}get rx(){return this[ih]||(this[ih]=new T(V,this[W],{getAttribute:()=>this.getAttribute("rx"),setAttribute:e=>this.setAttribute("rx",e)})),this[ih]}get ry(){return this[bh]||(this[bh]=new T(V,this[W],{getAttribute:()=>this.getAttribute("ry"),setAttribute:e=>this.setAttribute("ry",e)})),this[bh]}};G();G();var Me=class{[W];[M];[L];constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute}get animVal(){return this.baseVal}set animVal(e){}get baseVal(){let e=this[M]();return e||""}set baseVal(e){this[L](String(e))}};var Gf=class extends ke{static SVG_FEBLEND_MODE_UNKNOWN=0;static SVG_FEBLEND_MODE_NORMAL=1;static SVG_FEBLEND_MODE_MULTIPLY=2;static SVG_FEBLEND_MODE_SCREEN=3;static SVG_FEBLEND_MODE_DARKEN=4;static SVG_FEBLEND_MODE_LIGHTEN=5;static SVG_FEBLEND_MODE_OVERLAY=6;static SVG_FEBLEND_MODE_COLOR_DODGE=7;static SVG_FEBLEND_MODE_COLOR_BURN=8;static SVG_FEBLEND_MODE_HARD_LIGHT=9;static SVG_FEBLEND_MODE_SOFT_LIGHT=10;static SVG_FEBLEND_MODE_DIFFERENCE=11;static SVG_FEBLEND_MODE_EXCLUSION=12;static SVG_FEBLEND_MODE_HUE=13;static SVG_FEBLEND_MODE_SATURATION=14;static SVG_FEBLEND_MODE_COLOR=15;static SVG_FEBLEND_MODE_LUMINOSITY=16;[ne]=null;[De]=null;[Xr]=null;[Bl]=null;[P]=null;[q]=null;[ce]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get in2(){return this[Xr]||(this[Xr]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in2"),setAttribute:e=>this.setAttribute("in2",e)})),this[Xr]}get mode(){return this[Bl]||(this[Bl]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("mode"),setAttribute:e=>this.setAttribute("mode",e),values:["normal","multiply","screen","darken","lighten","overlay","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],defaultValue:"normal"})),this[Bl]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();G();G();var iLI=/[\t\f\n\r, ]+/,$Y=class t{[W];[M];[L];[Ve]=!1;[de]={items:[],attributeValue:""};constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");if(this[W]=I,this[Ve]=!!l.readOnly,this[M]=l.getAttribute,this[L]=l.setAttribute,e!==V)throw new TypeError("Illegal constructor");let n=new Zl(this,[t]);return new Proxy(this,{get:(c,a)=>{if(a==="length"||a==="numberOfItems")return c[We]().length;if(a in c||typeof a=="symbol")return n.bind(a),c[a];let s=Number(a);if(!isNaN(s))return c[We]()[s]},set(c,a,s){if(n.bind(a),typeof a=="symbol")return c[a]=s,!0;let r=Number(a);return isNaN(r)&&(c[a]=s),!0},deleteProperty(c,a){if(typeof a=="symbol")return delete c[a],!0;let s=Number(a);return isNaN(s)&&delete c[a],!0},ownKeys(c){return Object.keys(c[We]())},has(c,a){if(a in c)return!0;if(typeof a=="symbol")return!1;let s=Number(a);return!isNaN(s)&&s>=0&&s<c[We]().length},defineProperty(c,a,s){return n.preventBinding(a),a in c?(Object.defineProperty(c,a,s),!0):!1},getOwnPropertyDescriptor(c,a){if(a in c||typeof a=="symbol")return;let s=Number(a),r=c[We]();if(!isNaN(s)&&r[s])return{value:r[s],writable:!1,enumerable:!0,configurable:!0}}})}get length(){return this[We]().length}get numberOfItems(){return this[We]().length}[Symbol.iterator](){return this[We]().values()}clear(){if(this[Ve])throw new this[W].TypeError("Failed to execute 'clear' on 'SVGNumberList': The object is read-only.");for(let e of this[de].items)e[M]=null,e[L]=null;this[de].items=[],this[de].attributeValue="",this[L]("")}initialize(e){if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'initialize' on 'SVGNumberList': 1 arguments required, but only ${arguments.length} present.`);if(this[Ve])throw new this[W].TypeError("Failed to execute 'initialize' on 'SVGNumberList': The object is read-only.");for(let I of this[de].items)I[M]=null,I[L]=null;return e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(I=>I[$]||"0").join(" "),this[L](this[de].attributeValue)},this[de].items=[e],this[de].attributeValue=e[$],this[L](e[$]||""),e}getItem(e){let I=this[We]();return typeof e=="number"||(e=Number(e),e=isNaN(e)?0:e),I[e]?I[e]:null}insertItemBefore(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'insertItemBefore' on 'SVGNumberList': The object is read-only.");if(arguments.length<2)throw new this[W].TypeError(`Failed to execute 'insertItemBefore' on 'SVGNumberList': 2 arguments required, but only ${arguments.length} present.`);if(!(e instanceof _d))throw new this[W].TypeError("Failed to execute 'insertItemBefore' on 'SVGNumberList': parameter 1 is not of type 'SVGNumber'.");let l=this[We](),n=l.indexOf(e);return n!==-1&&l.splice(n,1),I<0?I=0:I>l.length&&(I=l.length),l.splice(I,0,e),e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(c=>c[$]||"0").join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=l.map(c=>c[$]||"0").join(" "),this[L](this[de].attributeValue),e}replaceItem(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'replaceItem' on 'SVGNumberList': The object is read-only.");if(arguments.length<2)throw new this[W].TypeError(`Failed to execute 'replaceItem' on 'SVGNumberList': 2 arguments required, but only ${arguments.length} present.`);if(!(e instanceof _d))throw new this[W].TypeError("Failed to execute 'replaceItem' on 'SVGNumberList': parameter 1 is not of type 'SVGNumber'.");let l=this[We](),n=l.indexOf(e);if(n===I)return e;n!==-1&&l.splice(n,1),I<0?I=0:I>=l.length&&(I=l.length-1),l[I]&&(l[I][M]=null,l[I][L]=null);let c=l[I];return l[I]=e,e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(a=>a[$]||"0").join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=l.map(a=>a[$]||"0").join(" "),this[L](this[de].attributeValue),c}removeItem(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'removeItem' on 'SVGNumberList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'removeItem' on 'SVGNumberList': 1 argument required, but only ${arguments.length} present.`);let I=this[We]();if(e=Number(e),isNaN(e)&&(e=0),e>=I.length)throw new this[W].DOMException(`Failed to execute 'removeItem' on 'SVGNumberList': The index provided (${e}) is greater than the maximum bound.`,B.indexSizeError);if(e<0)throw new this[W].DOMException(`Failed to execute 'removeItem' on 'SVGNumberList': The index provided (${e}) is negative.`,B.indexSizeError);let l=I[e];return l&&(l[M]=null,l[L]=null),I.splice(e,1),this[L](I.map(n=>n[$]||"0").join(" ")),l}appendItem(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'appendItem' on 'SVGNumberList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'appendItem' on 'SVGNumberList': 1 argument required, but only ${arguments.length} present.`);if(!(e instanceof _d))throw new this[W].TypeError("Failed to execute 'appendItem' on 'SVGNumberList': parameter 1 is not of type 'SVGNumber'.");let I=this[We](),l=I.indexOf(e);return l!==-1&&I.splice(l,1),I.push(e),e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(n=>n[$]||"0").join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=I.map(n=>n[$]||"0").join(" "),this[L](this[de].attributeValue),e}[We](){let e=this[M]()??"",I=this[de];if(I.attributeValue===e)return I.items;if(I.items.length)for(let c of I.items)c[M]=null,c[L]=null;let l=[],n=e.trim();if(n){let c=n.split(iLI);for(let a=0,s=c.length;a<s;a++){let r=new _d(V,this[W],{readOnly:this[Ve],getAttribute:()=>r[$],setAttribute:()=>{this[de].attributeValue=this[We]().map(o=>o[$]||"0").join(" "),this[L](this[de].attributeValue)}});r[$]=String(parseFloat(c[a])),l.push(r)}}return I.attributeValue=e,I.items=l,l}};var Or=class{[W];[M];[L];[Mt]=null;[Tt]=null;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute}get animVal(){return this[Tt]||(this[Tt]=new $Y(V,this[W],{readOnly:!0,getAttribute:this[M],setAttribute:()=>{}})),this[Tt]}set animVal(e){}get baseVal(){return this[Mt]||(this[Mt]=new $Y(V,this[W],{getAttribute:this[M],setAttribute:this[L]})),this[Mt]}set baseVal(e){}};var of=class extends ke{static SVG_FEBLEND_TYPE_UNKNOWN=0;static SVG_FEBLEND_TYPE_MATRIX=1;static SVG_FEBLEND_TYPE_SATURATE=2;static SVG_FEBLEND_TYPE_HUEROTATE=3;static SVG_FEBLEND_TYPE_LUMINANCETOALPHA=4;[ne]=null;[De]=null;[Xr]=null;[Je]=null;[Wt]=null;[Vc]=null;[P]=null;[q]=null;[ce]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get in2(){return this[Xr]||(this[Xr]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in2"),setAttribute:e=>this.setAttribute("in2",e)})),this[Xr]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get type(){return this[Wt]||(this[Wt]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("type"),setAttribute:e=>this.setAttribute("type",e),values:["matrix","saturate","huerotate","luminancetoalpha"],defaultValue:"matrix"})),this[Wt]}get values(){return this[Vc]||(this[Vc]=new Or(V,this[W],{getAttribute:()=>this.getAttribute("values"),setAttribute:e=>this.setAttribute("values",e)})),this[Vc]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var df=class extends ke{[ne]=null;[De]=null;[Je]=null;[P]=null;[q]=null;[ce]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var bf=class extends ke{static SVG_FECOMPOSITE_OPERATOR_UNKNOWN=0;static SVG_FECOMPOSITE_OPERATOR_OVER=1;static SVG_FECOMPOSITE_OPERATOR_IN=2;static SVG_FECOMPOSITE_OPERATOR_OUT=3;static SVG_FECOMPOSITE_OPERATOR_ATOP=4;static SVG_FECOMPOSITE_OPERATOR_XOR=5;static SVG_FECOMPOSITE_OPERATOR_ARITHMETIC=6;[ne]=null;[De]=null;[Je]=null;[Wt]=null;[Vc]=null;[P]=null;[q]=null;[ce]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get type(){return this[Wt]||(this[Wt]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("type"),setAttribute:e=>this.setAttribute("type",e),values:["over","in","out","atop","xor","arithmetic"],defaultValue:"over"})),this[Wt]}get values(){return this[Vc]||(this[Vc]=new Or(V,this[W],{getAttribute:()=>this.getAttribute("values"),setAttribute:e=>this.setAttribute("values",e)})),this[Vc]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();G();var W0=class{[W];[M];[L];constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute}get animVal(){return this.baseVal}set animVal(e){}get baseVal(){return this[M]()==="true"}set baseVal(e){this[L](String(typeof e!="boolean"?!!e:e))}};G();var $d=class{[W];[M];[L];constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute}get animVal(){return this.baseVal}set animVal(e){}get baseVal(){let e=this[M]();if(!e)return 0;let I=parseInt(e);return isNaN(I)?0:I}set baseVal(e){let I=parseInt(String(e));if(isNaN(I))throw new this[W].TypeError("TypeError: Failed to set the 'baseVal' property on 'SVGAnimatedInteger': The provided float value is non-finite.");this[L](String(I))}};var mf=class extends ke{static SVG_EDGEMODE_UNKNOWN=0;static SVG_EDGEMODE_DUPLICATE=1;static SVG_EDGEMODE_WRAP=2;static SVG_EDGEMODE_NONE=3;[H3]=null;[E3]=null;[Yh]=null;[ne]=null;[De]=null;[v3]=null;[Hr]=null;[Er]=null;[C3]=null;[J3]=null;[L3]=null;[Je]=null;[k3]=null;[f3]=null;[ce]=null;[P]=null;[q]=null;get bias(){return this[H3]||(this[H3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("bias"),setAttribute:e=>this.setAttribute("bias",e)})),this[H3]}get divisor(){return this[E3]||(this[E3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("divisor"),setAttribute:e=>this.setAttribute("divisor",e)})),this[E3]}get edgeMode(){return this[Yh]||(this[Yh]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("edgeMode"),setAttribute:e=>this.setAttribute("edgeMode",e),values:["duplicate","wrap","none"],defaultValue:"duplicate"})),this[Yh]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get kernelMatrix(){return this[v3]||(this[v3]=new Or(V,this[W],{getAttribute:()=>this.getAttribute("kernelMatrix"),setAttribute:e=>this.setAttribute("kernelMatrix",e)})),this[v3]}get kernelUnitLengthX(){return this[Hr]||(this[Hr]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("kernelUnitLengthX"),setAttribute:e=>this.setAttribute("kernelUnitLengthX",e)})),this[Hr]}get kernelUnitLengthY(){return this[Er]||(this[Er]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("kernelUnitLengthY"),setAttribute:e=>this.setAttribute("kernelUnitLengthY",e)})),this[Er]}get orderX(){return this[C3]||(this[C3]=new $d(V,this[W],{getAttribute:()=>this.getAttribute("orderX"),setAttribute:e=>this.setAttribute("orderX",e)})),this[C3]}get orderY(){return this[J3]||(this[J3]=new $d(V,this[W],{getAttribute:()=>this.getAttribute("orderY"),setAttribute:e=>this.setAttribute("orderY",e)})),this[J3]}get preserveAlpha(){return this[L3]||(this[L3]=new W0(V,this[W],{getAttribute:()=>this.getAttribute("preserveAlpha"),setAttribute:e=>this.setAttribute("preserveAlpha",e)})),this[L3]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get targetX(){return this[k3]||(this[k3]=new $d(V,this[W],{getAttribute:()=>this.getAttribute("targetX"),setAttribute:e=>this.setAttribute("targetX",e)})),this[k3]}get targetY(){return this[f3]||(this[f3]=new $d(V,this[W],{getAttribute:()=>this.getAttribute("targetY"),setAttribute:e=>this.setAttribute("targetY",e)})),this[f3]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var hf=class extends ke{[x3]=null;[ne]=null;[De]=null;[Hr]=null;[Er]=null;[Je]=null;[Vh]=null;[ce]=null;[P]=null;[q]=null;get diffuseConstant(){return this[x3]||(this[x3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("diffuseConstant"),setAttribute:e=>this.setAttribute("diffuseConstant",e)})),this[x3]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get kernelUnitLengthX(){return this[Hr]||(this[Hr]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("kernelUnitLengthX"),setAttribute:e=>this.setAttribute("kernelUnitLengthX",e)})),this[Hr]}get kernelUnitLengthY(){return this[Er]||(this[Er]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("kernelUnitLengthY"),setAttribute:e=>this.setAttribute("kernelUnitLengthY",e)})),this[Er]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get surfaceScale(){return this[Vh]||(this[Vh]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("surfaceScale"),setAttribute:e=>this.setAttribute("surfaceScale",e)})),this[Vh]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var pf=class extends ke{static SVG_CHANNEL_UNKNOWN=0;static SVG_CHANNEL_R=1;static SVG_CHANNEL_G=2;static SVG_CHANNEL_B=3;static SVG_CHANNEL_A=4;[ne]=null;[De]=null;[Xr]=null;[Je]=null;[B3]=null;[ce]=null;[P]=null;[z3]=null;[q]=null;[U3]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get in2(){return this[Xr]||(this[Xr]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in2"),setAttribute:e=>this.setAttribute("in2",e)})),this[Xr]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get scale(){return this[B3]||(this[B3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("scale"),setAttribute:e=>this.setAttribute("scale",e)})),this[B3]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get xChannelSelector(){return this[z3]||(this[z3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("xChannelSelector"),setAttribute:e=>this.setAttribute("xChannelSelector",e),values:["r","g","b","a"],defaultValue:"r"})),this[z3]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}get yChannelSelector(){return this[U3]||(this[U3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("yChannelSelector"),setAttribute:e=>this.setAttribute("yChannelSelector",e),values:["r","g","b","a"],defaultValue:"r"})),this[U3]}};G();var Zf=class extends ke{[S3]=null;[O3]=null;get azimuth(){return this[S3]||(this[S3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("azimuth"),setAttribute:e=>this.setAttribute("azimuth",e)})),this[S3]}get elevation(){return this[O3]||(this[O3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("elevation"),setAttribute:e=>this.setAttribute("elevation",e)})),this[O3]}};G();var uf=class extends ke{[vr]=null;[Cr]=null;[ne]=null;[De]=null;[Je]=null;[Rh]=null;[yh]=null;[ce]=null;[P]=null;[q]=null;get dx(){return this[vr]||(this[vr]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("dx"),setAttribute:e=>this.setAttribute("dx",e)})),this[vr]}get dy(){return this[Cr]||(this[Cr]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("dy"),setAttribute:e=>this.setAttribute("dy",e)})),this[Cr]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get stdDeviationX(){return this[Rh]||(this[Rh]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("stdDeviationX"),setAttribute:e=>this.setAttribute("stdDeviationX",e),defaultValue:2})),this[Rh]}get stdDeviationY(){return this[yh]||(this[yh]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("stdDeviationY"),setAttribute:e=>this.setAttribute("stdDeviationY",e),defaultValue:2})),this[yh]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}setStdDeviation(e,I){this.stdDeviationX.baseVal=e,this.stdDeviationY.baseVal=I}};G();var Wf=class extends ke{[ne]=null;[Je]=null;[ce]=null;[P]=null;[q]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();G();var qo=class extends ke{static SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN=0;static SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY=1;static SVG_FECOMPONENTTRANSFER_TYPE_TABLE=2;static SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE=3;static SVG_FECOMPONENTTRANSFER_TYPE_LINEAR=4;static SVG_FECOMPONENTTRANSFER_TYPE_GAMMA=5;[Wt]=null;[M3]=null;[T3]=null;[j3]=null;[D3]=null;[K3]=null;[Wh]=null;get type(){return this[Wt]||(this[Wt]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("type"),setAttribute:e=>this.setAttribute("type",e),values:["identity","table","discrete","linear","gamma"],defaultValue:"identity"})),this[Wt]}get tableValues(){return this[M3]||(this[M3]=new Or(V,this[W],{getAttribute:()=>this.getAttribute("tableValues"),setAttribute:e=>this.setAttribute("tableValues",e)})),this[M3]}get slope(){return this[T3]||(this[T3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("slope"),setAttribute:e=>this.setAttribute("slope",e),defaultValue:1})),this[T3]}get intercept(){return this[j3]||(this[j3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("intercept"),setAttribute:e=>this.setAttribute("intercept",e)})),this[j3]}get amplitude(){return this[D3]||(this[D3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("amplitude"),setAttribute:e=>this.setAttribute("amplitude",e),defaultValue:1})),this[D3]}get exponent(){return this[K3]||(this[K3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("exponent"),setAttribute:e=>this.setAttribute("exponent",e),defaultValue:1})),this[K3]}get offset(){return this[Wh]||(this[Wh]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("offset"),setAttribute:e=>this.setAttribute("offset",e)})),this[Wh]}};var Nf=class extends qo{};G();var Yf=class extends qo{};G();var Vf=class extends qo{};G();var Rf=class extends qo{};G();var yf=class extends ke{static SVG_EDGEMODE_UNKNOWN=0;static SVG_EDGEMODE_DUPLICATE=1;static SVG_EDGEMODE_WRAP=2;static SVG_EDGEMODE_NONE=3;[Yh]=null;[ne]=null;[De]=null;[Je]=null;[Rh]=null;[yh]=null;[ce]=null;[P]=null;[q]=null;get edgeMode(){return this[Yh]||(this[Yh]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("edgeMode"),setAttribute:e=>this.setAttribute("edgeMode",e),values:["duplicate","wrap","none"],defaultValue:"duplicate"})),this[Yh]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get stdDeviationX(){return this[Rh]||(this[Rh]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("stdDeviationX")||"2",setAttribute:e=>this.setAttribute("stdDeviationX",e)})),this[Rh]}get stdDeviationY(){return this[yh]||(this[yh]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("stdDeviationY")||"2",setAttribute:e=>this.setAttribute("stdDeviationY",e)})),this[yh]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}setStdDeviation(e,I){this.stdDeviationX.baseVal=e,this.stdDeviationY.baseVal=I}};G();var Ff=class extends ke{[nze]=null;[ne]=null;[SI]=null;[xc]=null;[Je]=null;[ce]=null;[P]=null;[q]=null;get crossOrigin(){return this.getAttribute("crossorigin")}set crossOrigin(e){this.setAttribute("crossorigin",e)}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get href(){return this[SI]||(this[SI]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("href"),setAttribute:e=>this.setAttribute("href",e)})),this[SI]}get preserveAspectRatio(){return this[xc]||(this[xc]=new Ko(V,this[W],{getAttribute:()=>this.getAttribute("preserveAspectRatio"),setAttribute:e=>this.setAttribute("preserveAspectRatio",e)})),this[xc]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var gf=class extends ke{[ne]=null;[Je]=null;[ce]=null;[P]=null;[q]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var Qf=class extends ke{[De]=null;get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}};G();var Af=class extends ke{static SVG_MORPHOLOGY_OPERATOR_UNKNOWN=0;static SVG_MORPHOLOGY_OPERATOR_ERODE=1;static SVG_MORPHOLOGY_OPERATOR_DILATE=2;[ne]=null;[De]=null;[P3]=null;[q3]=null;[_3]=null;[Je]=null;[ce]=null;[P]=null;[q]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get operator(){return this[P3]||(this[P3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("operator"),setAttribute:e=>this.setAttribute("operator",e),values:["erode","dilate"],defaultValue:"erode"})),this[P3]}get radiusX(){return this[q3]||(this[q3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("radiusX"),setAttribute:e=>this.setAttribute("radiusX",e)})),this[q3]}get radiusY(){return this[_3]||(this[_3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("radiusY"),setAttribute:e=>this.setAttribute("radiusY",e)})),this[_3]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var wf=class extends ke{[ne]=null;[De]=null;[vr]=null;[Cr]=null;[Je]=null;[ce]=null;[P]=null;[q]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get dx(){return this[vr]||(this[vr]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("dx"),setAttribute:e=>this.setAttribute("dx",e)})),this[vr]}get dy(){return this[Cr]||(this[Cr]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("dy"),setAttribute:e=>this.setAttribute("dy",e)})),this[Cr]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var Xf=class extends ke{[P]=null;[q]=null;[as]=null;get x(){return this[P]||(this[P]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}get z(){return this[as]||(this[as]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("z"),setAttribute:e=>this.setAttribute("z",e)})),this[as]}};G();var Hf=class extends ke{[ne]=null;[De]=null;[Hr]=null;[Er]=null;[Je]=null;[$3]=null;[Fh]=null;[Vh]=null;[ce]=null;[P]=null;[q]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get kernelUnitLengthX(){return this[Hr]||(this[Hr]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("kernelUnitLengthX"),setAttribute:e=>this.setAttribute("kernelUnitLengthX",e)})),this[Hr]}get kernelUnitLengthY(){return this[Er]||(this[Er]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("kernelUnitLengthY"),setAttribute:e=>this.setAttribute("kernelUnitLengthY",e)})),this[Er]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get specularConstant(){return this[$3]||(this[$3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("specularConstant"),setAttribute:e=>this.setAttribute("specularConstant",e),defaultValue:1})),this[$3]}get specularExponent(){return this[Fh]||(this[Fh]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("specularExponent"),setAttribute:e=>this.setAttribute("specularExponent",e),defaultValue:1})),this[Fh]}get surfaceScale(){return this[Vh]||(this[Vh]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("surfaceScale"),setAttribute:e=>this.setAttribute("surfaceScale",e),defaultValue:1})),this[Vh]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var Ef=class extends ke{[P]=null;[q]=null;[as]=null;[ek]=null;[Ik]=null;[tk]=null;[Fh]=null;[lk]=null;get x(){return this[P]||(this[P]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}get z(){return this[as]||(this[as]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("z"),setAttribute:e=>this.setAttribute("z",e)})),this[as]}get pointsAtX(){return this[ek]||(this[ek]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("pointsAtX"),setAttribute:e=>this.setAttribute("pointsAtX",e)})),this[ek]}get pointsAtY(){return this[Ik]||(this[Ik]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("pointsAtY"),setAttribute:e=>this.setAttribute("pointsAtY",e)})),this[Ik]}get pointsAtZ(){return this[tk]||(this[tk]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("pointsAtZ"),setAttribute:e=>this.setAttribute("pointsAtZ",e)})),this[tk]}get specularExponent(){return this[Fh]||(this[Fh]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("specularExponent"),setAttribute:e=>this.setAttribute("specularExponent",e),defaultValue:1})),this[Fh]}get limitingConeAngle(){return this[lk]||(this[lk]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("limitingConeAngle"),setAttribute:e=>this.setAttribute("limitingConeAngle",e)})),this[lk]}};G();var vf=class extends ke{[ne]=null;[De]=null;[Je]=null;[ce]=null;[P]=null;[q]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var Cf=class extends ke{static SVG_TURBULENCE_TYPE_UNKNOWN=0;static SVG_TURBULENCE_TYPE_FRACTALNOISE=1;static SVG_TURBULENCE_TYPE_TURBULENCE=2;static SVG_STITCHTYPE_UNKNOWN=0;static SVG_STITCHTYPE_STITCH=1;static SVG_STITCHTYPE_NOSTITCH=2;[nk]=null;[ck]=null;[ne]=null;[ak]=null;[Je]=null;[sk]=null;[rk]=null;[Wt]=null;[ce]=null;[P]=null;[q]=null;get baseFrequencyX(){return this[nk]||(this[nk]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("baseFrequencyX"),setAttribute:e=>this.setAttribute("baseFrequencyX",e)})),this[nk]}get baseFrequencyY(){return this[ck]||(this[ck]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("baseFrequencyY"),setAttribute:e=>this.setAttribute("baseFrequencyY",e)})),this[ck]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get numOctaves(){return this[ak]||(this[ak]=new $d(V,this[W],{getAttribute:()=>this.getAttribute("numOctaves"),setAttribute:e=>this.setAttribute("numOctaves",e)})),this[ak]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get seed(){return this[sk]||(this[sk]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("seed"),setAttribute:e=>this.setAttribute("seed",e)})),this[sk]}get stitchTiles(){return this[rk]||(this[rk]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("stitchTiles"),setAttribute:e=>this.setAttribute("stitchTiles",e),values:["stitch","noStitch"],defaultValue:"stitch"})),this[rk]}get type(){return this[Wt]||(this[Wt]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("type"),setAttribute:e=>this.setAttribute("type",e),values:["fractalNoise","turbulence"],defaultValue:"turbulence"})),this[Wt]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var Jf=class extends ke{[SI]=null;[m3]=null;[h3]=null;[P]=null;[q]=null;[ce]=null;[ne]=null;get href(){return this[SI]||(this[SI]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("href"),setAttribute:e=>this.setAttribute("href",e)})),this[SI]}get filterUnits(){return this[m3]||(this[m3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("filterUnits"),setAttribute:e=>this.setAttribute("filterUnits",e),values:["userSpaceOnUse","objectBoundingBox"],defaultValue:"userSpaceOnUse"})),this[m3]}get primitiveUnits(){return this[h3]||(this[h3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("primitiveUnits"),setAttribute:e=>this.setAttribute("primitiveUnits",e),values:["userSpaceOnUse","objectBoundingBox"],defaultValue:"userSpaceOnUse"})),this[h3]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var Lf=class extends Al{[P]=null;[q]=null;[ce]=null;[ne]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var kf=class extends Al{};G();var ff=class extends Al{[SI]=null;[xc]=null;[P]=null;[q]=null;[ce]=null;[ne]=null;get crossOrigin(){return this.getAttribute("crossorigin")}set crossOrigin(e){this.setAttribute("crossorigin",e)}get href(){return this[SI]||(this[SI]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("href"),setAttribute:e=>this.setAttribute("href",e)})),this[SI]}get decoding(){let e=this.getAttribute("decoding");switch(e){case"sync":case"async":case"auto":return e;default:return"auto"}}set decoding(e){this.setAttribute("decoding",e)}get preserveAspectRatio(){return this[xc]||(this[xc]=new Ko(V,this[W],{getAttribute:()=>this.getAttribute("preserveAspectRatio"),setAttribute:e=>this.setAttribute("preserveAspectRatio",e)})),this[xc]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}decode(){return Promise.resolve()}};G();var xf=class extends sa{[hh]=null;[ph]=null;[Zh]=null;[uh]=null;get x1(){return this[hh]||(this[hh]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x1"),setAttribute:e=>this.setAttribute("x1",e)})),this[hh]}get y1(){return this[ph]||(this[ph]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y1"),setAttribute:e=>this.setAttribute("y1",e)})),this[ph]}get x2(){return this[Zh]||(this[Zh]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x2"),setAttribute:e=>this.setAttribute("x2",e)})),this[Zh]}get y2(){return this[uh]||(this[uh]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y2"),setAttribute:e=>this.setAttribute("y2",e)})),this[uh]}};G();G();var Wu=class extends Al{static SVG_SPREADMETHOD_UNKNOWN=0;static SVG_SPREADMETHOD_PAD=1;static SVG_SPREADMETHOD_REFLECT=2;static SVG_SPREADMETHOD_REPEAT=3;[SI]=null;[p3]=null;[Z3]=null;[u3]=null;get href(){return this[SI]||(this[SI]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("href"),setAttribute:e=>this.setAttribute("href",e)})),this[SI]}get gradientUnits(){return this[p3]||(this[p3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("gradientUnits"),setAttribute:e=>this.setAttribute("gradientUnits",e),values:["userSpaceOnUse","objectBoundingBox"],defaultValue:"objectBoundingBox"})),this[p3]}get gradientTransform(){return this[Z3]||(this[Z3]=new Rb(V,this[W],{getAttribute:()=>this.getAttribute("gradientTransform"),setAttribute:e=>this.setAttribute("gradientTransform",e)})),this[Z3]}get spreadMethod(){return this[u3]||(this[u3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("spreadMethod"),setAttribute:e=>this.setAttribute("spreadMethod",e),values:["pad","reflect","repeat"],defaultValue:"pad"})),this[u3]}};var Bf=class extends Wu{[hh]=null;[ph]=null;[Zh]=null;[uh]=null;get x1(){return this[hh]||(this[hh]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x1"),setAttribute:e=>this.setAttribute("x1",e)})),this[hh]}get y1(){return this[ph]||(this[ph]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y1"),setAttribute:e=>this.setAttribute("y1",e)})),this[ph]}get x2(){return this[Zh]||(this[Zh]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x2"),setAttribute:e=>this.setAttribute("x2",e)})),this[Zh]}get y2(){return this[uh]||(this[uh]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y2"),setAttribute:e=>this.setAttribute("y2",e)})),this[uh]}};G();G();var N0=class{[W];[M];[L];[Mt]=null;[Tt]=null;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute}get animVal(){return this[Tt]||(this[Tt]=new Oh(V,this[W],{readOnly:!0,getAttribute:this[M]})),this[Tt]}set animVal(e){}get baseVal(){return this[Mt]||(this[Mt]=new Oh(V,this[W],{getAttribute:this[M],setAttribute:this[L]})),this[Mt]}set baseVal(e){}};var zf=class extends ke{static SVG_MARKER_ORIENT_UNKNOWN=0;static SVG_MARKER_ORIENT_AUTO=1;static SVG_MARKER_ORIENT_ANGLE=2;static SVG_MARKERUNITS_UNKNOWN=0;static SVG_MARKERUNITS_USERSPACEONUSE=1;static SVG_MARKERUNITS_STROKEWIDTH=2;SVG_MARKER_ORIENT_UNKNOWN=0;SVG_MARKER_ORIENT_AUTO=1;SVG_MARKER_ORIENT_ANGLE=2;[n3]=null;[c3]=null;[a3]=null;[s3]=null;[r3]=null;[G3]=null;[o3]=null;[Gh]=null;[xc]=null;get markerUnits(){return this[n3]||(this[n3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("markerUnits"),setAttribute:e=>this.setAttribute("markerUnits",e),values:["userSpaceOnUse","strokeWidth"],defaultValue:"strokeWidth"})),this[n3]}get markerWidth(){return this[c3]||(this[c3]=new T(V,this[W],{getAttribute:()=>this.getAttribute("markerWidth"),setAttribute:e=>this.setAttribute("markerWidth",e)})),this[c3]}get markerHeight(){return this[a3]||(this[a3]=new T(V,this[W],{getAttribute:()=>this.getAttribute("markerHeight"),setAttribute:e=>this.setAttribute("markerHeight",e)})),this[a3]}get orientType(){return this[s3]||(this[s3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("orient"),setAttribute:e=>this.setAttribute("orient",e),values:["auto",null],defaultValue:"auto"})),this[s3]}get orientAngle(){return this[r3]||(this[r3]=new N0(V,this[W],{getAttribute:()=>this.getAttribute("orient"),setAttribute:e=>this.setAttribute("orient",e)})),this[r3]}get refX(){return this[G3]||(this[G3]=new T(V,this[W],{getAttribute:()=>this.getAttribute("refX"),setAttribute:e=>this.setAttribute("refX",e)})),this[G3]}get refY(){return this[o3]||(this[o3]=new T(V,this[W],{getAttribute:()=>this.getAttribute("refY"),setAttribute:e=>this.setAttribute("refY",e)})),this[o3]}get viewBox(){return this[Gh]||(this[Gh]=new Zu(V,this[W],{getAttribute:()=>this.getAttribute("viewBox"),setAttribute:e=>this.setAttribute("viewBox",e)})),this[Gh]}get preserveAspectRatio(){return this[xc]||(this[xc]=new Ko(V,this[W],{getAttribute:()=>this.getAttribute("preserveAspectRatio"),setAttribute:e=>this.setAttribute("preserveAspectRatio",e)})),this[xc]}setOrientToAuto(){this.setAttribute("orient","auto")}setOrientToAngle(e){this.setAttribute("orient",e.valueAsString)}};G();var Uf=class extends ke{[i3]=null;[b3]=null;[P]=null;[q]=null;[ce]=null;[ne]=null;get maskUnits(){return this[i3]||(this[i3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("maskUnits"),setAttribute:e=>this.setAttribute("maskUnits",e),values:["userSpaceOnUse","objectBoundingBox"],defaultValue:"userSpaceOnUse"})),this[i3]}get maskContentUnits(){return this[b3]||(this[b3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("maskContentUnits"),setAttribute:e=>this.setAttribute("maskContentUnits",e),values:["userSpaceOnUse","objectBoundingBox"],defaultValue:"userSpaceOnUse"})),this[b3]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var Sf=class extends ke{};G();var Of=class extends ke{[SI]=null;get href(){return this[SI]||(this[SI]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("href"),setAttribute:e=>this.setAttribute("href",e)})),this[SI]}};G();var Mf=class extends sa{};G();var Tf=class extends ke{[SI]=null;[W3]=null;[N3]=null;[Y3]=null;[P]=null;[q]=null;[ce]=null;[ne]=null;get href(){return this[SI]||(this[SI]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("href"),setAttribute:e=>this.setAttribute("href",e)})),this[SI]}get patternUnits(){return this[W3]||(this[W3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("patternUnits"),setAttribute:e=>this.setAttribute("patternUnits",e),values:["userSpaceOnUse","objectBoundingBox"],defaultValue:"objectBoundingBox"})),this[W3]}get patternContentUnits(){return this[N3]||(this[N3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("patternContentUnits"),setAttribute:e=>this.setAttribute("patternContentUnits",e),values:["userSpaceOnUse","objectBoundingBox"],defaultValue:"userSpaceOnUse"})),this[N3]}get patternTransform(){return this[Y3]||(this[Y3]=new Rb(V,this[W],{getAttribute:()=>this.getAttribute("patternTransform"),setAttribute:e=>this.setAttribute("patternTransform",e)})),this[Y3]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();G();var bLI=/[\t\f\n\r, ]+/,yb=class t{[W];[M];[L];[Ve]=!1;[de]={items:[],attributeValue:""};constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[Ve]=!!l.readOnly,this[M]=l.getAttribute,this[L]=l.setAttribute;let n=new Zl(this,[t]);return new Proxy(this,{get:(c,a)=>{if(a==="length"||a==="numberOfItems")return c[We]().length;if(a in c||typeof a=="symbol")return n.bind(a),c[a];let s=Number(a);if(!isNaN(s))return c[We]()[s]},set(c,a,s){if(n.bind(a),typeof a=="symbol")return c[a]=s,!0;let r=Number(a);return isNaN(r)&&(c[a]=s),!0},deleteProperty(c,a){if(typeof a=="symbol")return delete c[a],!0;let s=Number(a);return isNaN(s)&&delete c[a],!0},ownKeys(c){return Object.keys(c[We]())},has(c,a){if(a in c)return!0;if(typeof a=="symbol")return!1;let s=Number(a);return!isNaN(s)&&s>=0&&s<c[We]().length},defineProperty(c,a,s){return n.preventBinding(a),a in c?(Object.defineProperty(c,a,s),!0):!1},getOwnPropertyDescriptor(c,a){if(a in c||typeof a=="symbol")return;let s=Number(a),r=c[We]();if(!isNaN(s)&&r[s])return{value:r[s],writable:!1,enumerable:!0,configurable:!0}}})}get length(){return this[We]().length}get numberOfItems(){return this[We]().length}[Symbol.iterator](){return this[We]().values()}clear(){if(this[Ve])throw new this[W].TypeError("Failed to execute 'clear' on 'SVGPointList': The object is read-only.");for(let e of this[de].items)e[M]=null,e[L]=null;this[de].items=[],this[de].attributeValue="",this[L]("")}initialize(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'initialize' on 'SVGPointList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'initialize' on 'SVGPointList': 1 arguments required, but only ${arguments.length} present.`);if(!(e instanceof Fc))throw new this[W].TypeError("Failed to execute 'appendItem' on 'SVGPointList': parameter 1 is not of type 'SVGPoint'.");for(let I of this[de].items)I[M]=null,I[L]=null;return e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(I=>I[$]||"0 0").join(" "),this[L](this[de].attributeValue)},this[de].items=[e],this[de].attributeValue=e[$],this[L](e[$]||""),e}getItem(e){let I=this[We]();return typeof e=="number"||(e=Number(e),e=isNaN(e)?0:e),I[e]?I[e]:null}insertItemBefore(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'insertItemBefore' on 'SVGPointList': The object is read-only.");if(arguments.length<2)throw new this[W].TypeError(`Failed to execute 'insertItemBefore' on 'SVGPointList': 2 arguments required, but only ${arguments.length} present.`);if(!(e instanceof Fc))throw new this[W].TypeError("Failed to execute 'insertItemBefore' on 'SVGPointList': parameter 1 is not of type 'SVGPoint'.");let l=this[We](),n=l.indexOf(e);return n!==-1&&l.splice(n,1),I<0?I=0:I>l.length&&(I=l.length),l.splice(I,0,e),e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(c=>c[$]||"0 0").join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=l.map(c=>c[$]||"0 0").join(" "),this[L](this[de].attributeValue),e}replaceItem(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'replaceItem' on 'SVGPointList': The object is read-only.");if(arguments.length<2)throw new this[W].TypeError(`Failed to execute 'replaceItem' on 'SVGPointList': 2 arguments required, but only ${arguments.length} present.`);if(!(e instanceof Fc))throw new this[W].TypeError("Failed to execute 'replaceItem' on 'SVGPointList': parameter 1 is not of type 'SVGPoint'.");let l=this[We](),n=l.indexOf(e);if(n===I)return e;n!==-1&&l.splice(n,1),I<0?I=0:I>=l.length&&(I=l.length-1),l[I]&&(l[I][M]=null,l[I][L]=null);let c=l[I];return l[I]=e,e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(a=>a[$]||"0 0").join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=l.map(a=>a[$]||"0 0").join(" "),this[L](this[de].attributeValue),c}removeItem(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'removeItem' on 'SVGPointList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'removeItem' on 'SVGPointList': 1 argument required, but only ${arguments.length} present.`);let I=this[We]();if(e=Number(e),isNaN(e)&&(e=0),e>=I.length)throw new this[W].DOMException(`Failed to execute 'removeItem' on 'SVGPointList': The index provided (${e}) is greater than the maximum bound.`,B.indexSizeError);if(e<0)throw new this[W].DOMException(`Failed to execute 'removeItem' on 'SVGPointList': The index provided (${e}) is negative.`,B.indexSizeError);let l=I[e];return l&&(l[M]=null,l[L]=null),I.splice(e,1),this[L](I.map(n=>n[$]||"0 0").join(" ")),l}appendItem(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'appendItem' on 'SVGPointList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'appendItem' on 'SVGPointList': 1 argument required, but only ${arguments.length} present.`);if(!(e instanceof Fc))throw new this[W].TypeError("Failed to execute 'appendItem' on 'SVGPointList': parameter 1 is not of type 'SVGPoint'.");let I=this[We](),l=I.indexOf(e);return l!==-1&&I.splice(l,1),I.push(e),e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(n=>n[$]||"0 0").join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=I.map(n=>n[$]||"0 0").join(" "),this[L](this[de].attributeValue),e}[We](){let e=this[M]()??"",I=this[de];if(I.attributeValue===e)return I.items;if(I.items.length)for(let c of I.items)c[M]=null,c[L]=null;let l=[],n=e.trim();if(n){let c=n.split(bLI);for(let a=0,s=c.length;a<s;a+=2){let r=parseFloat(c[a]),o=c[a+1]!==void 0?" "+parseFloat(c[a+1]):"",d=new Fc(V,this[W],{readOnly:this[Ve],getAttribute:()=>d[$],setAttribute:()=>{this[de].attributeValue=this[We]().map(i=>i[$]||"0 0").join(" "),this[L](this[de].attributeValue)}});d[$]=`${r}${o}`,l.push(d)}}return I.attributeValue=e,I.items=l,l}};var jf=class extends sa{[oh]=null;[dh]=null;get animatedPoints(){return this[oh]||(this[oh]=new yb(V,this[W],{readOnly:!0,getAttribute:()=>this.getAttribute("points"),setAttribute:()=>{}})),this[oh]}get points(){return this[dh]||(this[dh]=new yb(V,this[W],{getAttribute:()=>this.getAttribute("points"),setAttribute:e=>this.setAttribute("points",e)})),this[dh]}};G();var Df=class extends sa{[oh]=null;[dh]=null;get animatedPoints(){return this[oh]||(this[oh]=new yb(V,this[W],{readOnly:!0,getAttribute:()=>this.getAttribute("points"),setAttribute:()=>{}})),this[oh]}get points(){return this[dh]||(this[dh]=new yb(V,this[W],{getAttribute:()=>this.getAttribute("points"),setAttribute:e=>this.setAttribute("points",e)})),this[dh]}};G();var Kf=class extends Wu{[Ar]=null;[wr]=null;[mh]=null;[V3]=null;[R3]=null;get cx(){return this[Ar]||(this[Ar]=new T(V,this[W],{getAttribute:()=>this.getAttribute("cx"),setAttribute:e=>this.setAttribute("cx",e)})),this[Ar]}get cy(){return this[wr]||(this[wr]=new T(V,this[W],{getAttribute:()=>this.getAttribute("cy"),setAttribute:e=>this.setAttribute("cy",e)})),this[wr]}get r(){return this[mh]||(this[mh]=new T(V,this[W],{getAttribute:()=>this.getAttribute("r"),setAttribute:e=>this.setAttribute("r",e)})),this[mh]}get fx(){return this[V3]||(this[V3]=new T(V,this[W],{getAttribute:()=>this.getAttribute("fx"),setAttribute:e=>this.setAttribute("fx",e)})),this[V3]}get fy(){return this[R3]||(this[R3]=new T(V,this[W],{getAttribute:()=>this.getAttribute("fy"),setAttribute:e=>this.setAttribute("fy",e)})),this[R3]}};G();var Pf=class extends sa{[P]=null;[q]=null;[ce]=null;[ne]=null;[ih]=null;[bh]=null;get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get rx(){return this[ih]||(this[ih]=new T(V,this[W],{getAttribute:()=>this.getAttribute("rx"),setAttribute:e=>this.setAttribute("rx",e)})),this[ih]}get ry(){return this[bh]||(this[bh]=new T(V,this[W],{getAttribute:()=>this.getAttribute("ry"),setAttribute:e=>this.setAttribute("ry",e)})),this[bh]}};G();var qf=class extends Al{[SI]=null;get href(){return this[SI]||(this[SI]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("href"),setAttribute:e=>this.setAttribute("href",e)})),this[SI]}get type(){return this.getAttribute("type")||""}set type(e){this.setAttribute("type",e)}};G();var _f=class extends Po{};G();var $f=class extends ke{[Wh]=null;get offset(){return this[Wh]||(this[Wh]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("offset"),setAttribute:e=>this.setAttribute("offset",e)})),this[Wh]}};G();var e9=class extends ke{[ac]=null;[Ca]=this;[oY]=!1;get media(){return this.getAttribute("media")||"all"}set media(e){this.setAttribute("media",e)}get type(){return this.getAttribute("type")||"text/css"}set type(e){this.setAttribute("type",e)}get title(){return this.getAttribute("title")||""}set title(e){this.setAttribute("title",e)}get disabled(){return this[oY]}set disabled(e){this[oY]=!!e}get sheet(){return this[fe]?(this[ac]||(this[ac]=new this[O][W].CSSStyleSheet,this[ac].replaceSync(this.textContent)),this[ac]):null}[ls](){super[ls](),this[ac]=null}[aY](){this[ac]&&this[ac].replaceSync(this.textContent)}};G();var I9=class extends Al{};G();var t9=class extends Al{};G();G();G();var Y0=class extends Al{static LENGTHADJUST_UNKNOWN=0;static LENGTHADJUST_SPACING=1;static LENGTHADJUST_SPACINGANDGLYPHS=2;[y3]=null;[F3]=null;get textLength(){return this[y3]||(this[y3]=new T(V,this[W],{getAttribute:()=>this.getAttribute("textLength"),setAttribute:e=>this.setAttribute("textLength",e)})),this[y3]}get lengthAdjust(){return this[F3]||(this[F3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("lengthAdjust"),setAttribute:e=>this.setAttribute("lengthAdjust",e),values:["spacing","spacingAndGlyphs"],defaultValue:"spacing"})),this[F3]}getNumberOfChars(){return 0}getComputedTextLength(){return 0}getSubStringLength(e,I){return 0}getStartPositionOfChar(e){return new Fc(V,this[W])}getEndPositionOfChar(e){return new Fc(V,this[W])}getExtentOfChar(e){return new Pd(V,this[W])}getRotationOfChar(e){return 0}getCharNumAtPosition(e){return 0}};G();G();var mLI=/[\t\f\n\r, ]+/,eV=class t{[W];[M];[L];[Ve]=!1;[de]={items:[],attributeValue:""};constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[Ve]=!!l.readOnly,this[M]=l.getAttribute,this[L]=l.setAttribute;let n=new Zl(this,[t]);return new Proxy(this,{get:(c,a)=>{if(a==="length"||a==="numberOfItems")return c[We]().length;if(a in c||typeof a=="symbol")return n.bind(a),c[a];let s=Number(a);if(!isNaN(s))return c[We]()[s]},set(c,a,s){if(n.bind(a),typeof a=="symbol")return c[a]=s,!0;let r=Number(a);return isNaN(r)&&(c[a]=s),!0},deleteProperty(c,a){if(typeof a=="symbol")return delete c[a],!0;let s=Number(a);return isNaN(s)&&delete c[a],!0},ownKeys(c){return Object.keys(c[We]())},has(c,a){if(a in c)return!0;if(typeof a=="symbol")return!1;let s=Number(a);return!isNaN(s)&&s>=0&&s<c[We]().length},defineProperty(c,a,s){return n.preventBinding(a),a in c?(Object.defineProperty(c,a,s),!0):!1},getOwnPropertyDescriptor(c,a){if(a in c||typeof a=="symbol")return;let s=Number(a),r=c[We]();if(!isNaN(s)&&r[s])return{value:r[s],writable:!1,enumerable:!0,configurable:!0}}})}get length(){return this[We]().length}get numberOfItems(){return this[We]().length}[Symbol.iterator](){return this[We]().values()}clear(){this[L]("")}initialize(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'initialize' on 'SVGLengthList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'initialize' on 'SVGLengthList': 1 arguments required, but only ${arguments.length} present.`);for(let I of this[de].items)I[M]=null,I[L]=null;return e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(I=>I[$]??"0").join(" "),this[L](this[de].attributeValue)},this[de].items=[e],this[de].attributeValue=e[$],this[L](e[$]||""),e}getItem(e){let I=this[We]();return typeof e=="number"||(e=Number(e),e=isNaN(e)?0:e),I[e]?I[e]:null}insertItemBefore(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'insertItemBefore' on 'SVGLengthList': The object is read-only.");if(arguments.length<2)throw new this[W].TypeError(`Failed to execute 'insertItemBefore' on 'SVGLengthList': 2 arguments required, but only ${arguments.length} present.`);let l=this[We](),n=l.indexOf(e);return n!==-1&&l.splice(n,1),I<0?I=0:I>l.length&&(I=l.length),l.splice(I,0,e),e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(c=>c[$]??"0").join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=l.map(c=>c[$]??"0").join(" "),this[L](this[de].attributeValue),e}replaceItem(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'replaceItem' on 'SVGLengthList': The object is read-only.");if(arguments.length<2)throw new this[W].TypeError(`Failed to execute 'replaceItem' on 'SVGLengthList': 2 arguments required, but only ${arguments.length} present.`);let l=this[We](),n=l.indexOf(e);if(n===I)return e;n!==-1&&l.splice(n,1),I<0?I=0:I>=l.length&&(I=l.length-1),l[I]&&(l[I][M]=null,l[I][L]=null);let c=l[I];return l[I]=e,e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(a=>a[$]??"0").join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=l.map(a=>a[$]??"0").join(" "),this[L](this[de].attributeValue),c}removeItem(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'removeItem' on 'SVGLengthList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'removeItem' on 'SVGLengthList': 1 argument required, but only ${arguments.length} present.`);let I=this[We]();if(e=Number(e),isNaN(e)&&(e=0),e>=I.length)throw new this[W].DOMException(`Failed to execute 'removeItem' on 'SVGLengthList': The index provided (${e}) is greater than the maximum bound.`,B.indexSizeError);if(e<0)throw new this[W].DOMException(`Failed to execute 'removeItem' on 'SVGLengthList': The index provided (${e}) is negative.`,B.indexSizeError);let l=I[e];return l&&(l[M]=null,l[L]=null),I.splice(e,1),this[L](I.map(n=>n[$]??"0").join(" ")),l}appendItem(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'appendItem' on 'SVGLengthList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'appendItem' on 'SVGLengthList': 1 argument required, but only ${arguments.length} present.`);let I=this[We](),l=I.indexOf(e);return l!==-1&&I.splice(l,1),I.push(e),e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(n=>n[$]??"0").join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=I.map(n=>n[$]??"0").join(" "),this[L](this[de].attributeValue),e}[We](){let e=this[M]()??"",I=this[de];if(I.attributeValue===e)return I.items;if(I.items.length)for(let c of I.items)c[M]=null,c[L]=null;let l=[],n=e.trim();if(n){let c=n.split(mLI);for(let a=0,s=c.length;a<s;a++){let r=new qd(V,this[W],{readOnly:this[Ve],getAttribute:()=>r[$],setAttribute:o=>{r[$]=o;let d=l.map(i=>i[$]??"0").join(" ");I.attributeValue=d,this[L](d)}});r[$]=c[a],l.push(r)}}return I.attributeValue=e,I.items=l,l}};var Mh=class{[W];[M];[L];[Mt]=null;[Tt]=null;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute}get animVal(){return this[Tt]||(this[Tt]=new eV(V,this[W],{readOnly:!0,getAttribute:this[M],setAttribute:this[L]})),this[Tt]}set animVal(e){}get baseVal(){return this[Mt]||(this[Mt]=new eV(V,this[W],{getAttribute:this[M],setAttribute:this[L]})),this[Mt]}set baseVal(e){}};var Nu=class extends Y0{[P]=null;[q]=null;[vr]=null;[Cr]=null;[bk]=null;get x(){return this[P]||(this[P]=new Mh(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new Mh(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}get dx(){return this[vr]||(this[vr]=new Mh(V,this[W],{getAttribute:()=>this.getAttribute("dx"),setAttribute:e=>this.setAttribute("dx",e)})),this[vr]}get dy(){return this[Cr]||(this[Cr]=new Mh(V,this[W],{getAttribute:()=>this.getAttribute("dy"),setAttribute:e=>this.setAttribute("dy",e)})),this[Cr]}get rotate(){return this[bk]||(this[bk]=new Or(V,this[W],{getAttribute:()=>this.getAttribute("rotate"),setAttribute:e=>this.setAttribute("rotate",e)})),this[bk]}};var l9=class extends Nu{};G();var n9=class extends Y0{static TEXTPATH_METHODTYPE_UNKNOWN=0;static TEXTPATH_METHODTYPE_ALIGN=1;static TEXTPATH_METHODTYPE_STRETCH=2;static TEXTPATH_SPACINGTYPE_UNKNOWN=0;static TEXTPATH_SPACINGTYPE_AUTO=1;static TEXTPATH_SPACINGTYPE_EXACT=2;[SI]=null;[w3]=null;[TZ]=null;[X3]=null;get href(){return this[SI]||(this[SI]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("href"),setAttribute:e=>this.setAttribute("href",e)})),this[SI]}get startOffset(){return this[w3]||(this[w3]=new T(V,this[W],{getAttribute:()=>this.getAttribute("startOffset"),setAttribute:e=>this.setAttribute("startOffset",e)})),this[w3]}get method(){return this[TZ]||(this[TZ]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("method"),setAttribute:e=>this.setAttribute("method",e),values:["align","stretch"],defaultValue:"align"})),this[TZ]}get spacing(){return this[X3]||(this[X3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("spacing"),setAttribute:e=>this.setAttribute("spacing",e),values:["auto","exact"],defaultValue:"exact"})),this[X3]}};G();var c9=class extends ke{};G();var a9=class extends Nu{};G();var s9=class extends Al{[SI]=null;[P]=null;[q]=null;[ce]=null;[ne]=null;get href(){return this[SI]||(this[SI]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("href"),setAttribute:e=>this.setAttribute("href",e)})),this[SI]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}};G();var r9=class extends ke{};G();var G9=class{static SVG_UNIT_TYPE_UNKNOWN=0;static SVG_UNIT_TYPE_USERSPACEONUSE=1;static SVG_UNIT_TYPE_OBJECTBOUNDINGBOX=2;SVG_UNIT_TYPE_UNKNOWN=0;SVG_UNIT_TYPE_USERSPACEONUSE=1;SVG_UNIT_TYPE_OBJECTBOUNDINGBOX=2;constructor(e){if(e!==V)throw new TypeError("Illegal constructor")}};G();var o9=class{window;constructor(e){this.window=e}enqueueReaction(e,I,l){let n=this.window.customElements[lb]?.get(e.localName);if(n&&e[O]===this.window.document)switch(I){case"connectedCallback":if(n.livecycleCallbacks.connectedCallback){let c=n.livecycleCallbacks.connectedCallback?.call(e);if(c instanceof Promise){let a=new Ke(this.window).getAsyncTaskManager();if(a){let s=a.startTask();c.then(()=>a.endTask(s)).catch(()=>a.endTask(s))}}}break;case"disconnectedCallback":n.livecycleCallbacks.disconnectedCallback&&n.livecycleCallbacks.disconnectedCallback.call(e);break;case"attributeChangedCallback":n.livecycleCallbacks.attributeChangedCallback&&l?.length&&n.observedAttributes.has(l[0])&&n.livecycleCallbacks.attributeChangedCallback.apply(e,l);break}}};G();var IE=class extends K{state;hasUAVisualTransition;constructor(e,I=null){super(e),this.state=I?.state??null,this.hasUAVisualTransition=I?.hasUAVisualTransition??!1}};var IV={setTimeout:globalThis.setTimeout.bind(globalThis),clearTimeout:globalThis.clearTimeout.bind(globalThis),setInterval:globalThis.setInterval.bind(globalThis),clearInterval:globalThis.clearInterval.bind(globalThis),queueMicrotask:globalThis.queueMicrotask.bind(globalThis),setImmediate:globalThis.setImmediate.bind(globalThis),clearImmediate:globalThis.clearImmediate.bind(globalThis)},qie=setTimeout.toString().includes("new Timeout"),_ie=class{constructor(){throw new TypeError("Illegal constructor")}},QP=class{callback;constructor(e){this.callback=e}},zG=class t extends tt{Node=dI;Attr=yX;ShadowRoot=XH;ProcessingInstruction=wH;Element=aa;CharacterData=ub;DocumentType=Ch;HTMLAnchorElement=FX;HTMLButtonElement=EX;HTMLOptGroupElement=aH;HTMLOptionElement=zh;HTMLElement=ae;HTMLUnknownElement=QH;HTMLTemplateElement=VH;HTMLInputElement=Ss;HTMLSelectElement=mH;HTMLTextAreaElement=ru;HTMLImageElement=OY;HTMLStyleElement=ZH;HTMLLabelElement=KX;HTMLSlotElement=kie;HTMLMetaElement=tH;HTMLMediaElement=xh;HTMLAudioElement=fY;HTMLVideoElement=AH;HTMLBaseElement=AX;HTMLDialogElement=fX;HTMLScriptElement=bH;HTMLLinkElement=$X;HTMLIFrameElement=DX;HTMLFormElement=SX;HTMLUListElement=gH;HTMLTrackElement=FH;HTMLTableRowElement=YH;HTMLTitleElement=yH;HTMLTimeElement=RH;HTMLTableSectionElement=Yb;HTMLTableCellElement=uH;HTMLTableElement=NH;HTMLSpanElement=pH;HTMLSourceElement=hH;HTMLQuoteElement=iH;HTMLProgressElement=dH;HTMLPreElement=oH;HTMLPictureElement=GH;HTMLParamElement=rH;HTMLParagraphElement=sH;HTMLOutputElement=BY;HTMLOListElement=cH;HTMLObjectElement=xY;HTMLMeterElement=lH;HTMLMenuElement=IH;HTMLMapElement=eH;HTMLLIElement=qX;HTMLLegendElement=PX;HTMLModElement=nH;HTMLHtmlElement=jX;HTMLHRElement=TX;HTMLHeadElement=OX;HTMLHeadingElement=MX;HTMLFieldSetElement=zY;HTMLEmbedElement=BX;HTMLDListElement=CX;HTMLDivElement=xX;HTMLDetailsElement=kX;HTMLDataListElement=LX;HTMLDataElement=JX;HTMLTableColElement=WH;HTMLTableCaptionElement=MY;HTMLCanvasElement=vX;HTMLBRElement=XX;HTMLBodyElement=wX;HTMLAreaElement=gX;SVGSVGElement=eE;SVGAnimateElement=If;SVGAnimateMotionElement=tf;SVGAnimateTransformElement=lf;SVGCircleElement=nf;SVGClipPathElement=cf;SVGDefsElement=af;SVGDescElement=sf;SVGEllipseElement=rf;SVGFEBlendElement=Gf;SVGFEColorMatrixElement=of;SVGFEComponentTransferElement=df;SVGFECompositeElement=bf;SVGFEConvolveMatrixElement=mf;SVGFEDiffuseLightingElement=hf;SVGFEDisplacementMapElement=pf;SVGFEDistantLightElement=Zf;SVGFEDropShadowElement=uf;SVGFEFloodElement=Wf;SVGFEFuncAElement=Nf;SVGFEFuncBElement=Yf;SVGFEFuncGElement=Vf;SVGFEFuncRElement=Rf;SVGFEGaussianBlurElement=yf;SVGFEImageElement=Ff;SVGFEMergeElement=gf;SVGFEMergeNodeElement=Qf;SVGFEMorphologyElement=Af;SVGFEOffsetElement=wf;SVGFEPointLightElement=Xf;SVGFESpecularLightingElement=Hf;SVGFESpotLightElement=Ef;SVGFETileElement=vf;SVGFETurbulenceElement=Cf;SVGFilterElement=Jf;SVGForeignObjectElement=Lf;SVGGElement=kf;SVGImageElement=ff;SVGLineElement=xf;SVGLinearGradientElement=Bf;SVGMarkerElement=zf;SVGMaskElement=Uf;SVGMetadataElement=Sf;SVGMPathElement=Of;SVGPathElement=Mf;SVGPatternElement=Tf;SVGPolygonElement=jf;SVGPolylineElement=Df;SVGRadialGradientElement=Kf;SVGRectElement=Pf;SVGScriptElement=qf;SVGSetElement=_f;SVGStopElement=$f;SVGStyleElement=e9;SVGSwitchElement=I9;SVGSymbolElement=t9;SVGTextElement=l9;SVGTextPathElement=n9;SVGTitleElement=c9;SVGTSpanElement=a9;SVGUseElement=s9;SVGViewElement=r9;SVGElement=ke;SVGAnimationElement=Po;SVGComponentTransferFunctionElement=qo;SVGGeometryElement=sa;SVGGradientElement=Wu;SVGTextPositioningElement=Nu;SVGGraphicsElement=Al;Event=K;UIEvent=zc;CustomEvent=bX;AnimationEvent=dX;KeyboardEvent=hX;MessageEvent=pX;MouseEvent=Tn;PointerEvent=AY;FocusEvent=mb;WheelEvent=uX;InputEvent=mX;ErrorEvent=Hh;StorageEvent=gk;SubmitEvent=wY;ProgressEvent=kr;MediaQueryListEvent=ZY;HashChangeEvent=QY;ClipboardEvent=iX;TouchEvent=ZX;PopStateEvent=IE;Touch=oX;AudioProcessingEvent=K;BeforeInputEvent=K;BeforeUnloadEvent=K;BlobEvent=K;CloseEvent=K;CompositionEvent=K;CSSFontFaceLoadEvent=K;DeviceLightEvent=K;DeviceMotionEvent=K;DeviceOrientationEvent=K;DeviceProximityEvent=K;DOMTransactionEvent=K;DragEvent=K;EditingBeforeInputEvent=K;FetchEvent=K;GamepadEvent=K;IDBVersionChangeEvent=K;MediaStreamEvent=K;MutationEvent=K;OfflineAudioCompletionEvent=K;OverconstrainedError=K;PageTransitionEvent=K;PaymentRequestUpdateEvent=K;RelatedEvent=K;RTCDataChannelEvent=K;RTCIdentityErrorEvent=K;RTCIdentityEvent=K;RTCPeerConnectionIceEvent=K;SensorEvent=K;SVGEvent=K;SVGZoomEvent=K;TimeEvent=K;TrackEvent=K;TransitionEvent=K;UserProximityEvent=K;WebGLContextEvent=K;TextEvent=K;Permissions=vY;History=_y;Navigator=RX;Clipboard=hY;TimeRanges=au;TextTrackCueList=iu;ValidityState=ds;MutationRecord=Br;IntersectionObserver=YX;IntersectionObserverEntry=VX;CSSStyleDeclaration=rs;CSSRule=fG;CSSContainerRule=uY;CSSFontFaceRule=WY;CSSKeyframeRule=wh;CSSKeyframesRule=NY;CSSMediaRule=VY;CSSStyleRule=Xh;CSSSupportsRule=FY;CSSConditionRule=Od;CSSGroupingRule=Sd;CSSScopeRule=Ah;DOMRect=Dd;DOMRectReadOnly=CY;Plugin=wk;PluginArray=I0;Location=$y;CustomElementRegistry=Dy;ResizeObserver=HH;Blob=al;File=Lr;Storage=jY;MimeType=Ak;MimeTypeArray=e0;NodeFilter=tl;HTMLCollection=Ql;HTMLFormControlCollection=UY;HTMLOptionsCollection=m0;NodeList=So;RadioNodeList=o0;FileList=su;Screen=h0;DOMMatrixReadOnly=u0;DOMMatrix=Os;NamedNodeMap=kh;TreeWalker=Jh;NodeIterator=JY;DataTransfer=GX;DataTransferItem=bb;DataTransferItemList=gY;Headers=gl;XMLSerializer=EH;ClipboardItem=aX;Selection=LY;CSSUnitValue=Dt;SVGAngle=Oh;SVGAnimatedAngle=N0;SVGAnimatedBoolean=W0;SVGAnimatedEnumeration=EI;SVGAnimatedInteger=$d;SVGAnimatedLength=T;SVGAnimatedNumber=$e;SVGAnimatedNumberList=Or;SVGAnimatedPreserveAspectRatio=Ko;SVGAnimatedRect=Zu;SVGAnimatedString=Me;SVGAnimatedTransformList=Rb;SVGLength=qd;SVGLengthList=eV;SVGMatrix=Sh;SVGNumber=_d;SVGNumberList=$Y;SVGPoint=Fc;SVGPointList=yb;SVGPreserveAspectRatio=_Y;SVGRect=Pd;SVGStringList=Vb;SVGTransform=BG;SVGTransformList=qY;SVGAnimatedLengthList=Mh;SVGUnitTypes=G9;DOMPoint=Z0;StylePropertyMap=yY;StylePropertyMapReadOnly=RY;MediaList=YY;CSSKeywordValue=_Z;CSSStyleValue=$Z;Window=this.constructor;URLSearchParams=NLI;WritableStream=Mze.Writable;ReadableStream=WLI;TransformStream=Mze.Transform;PerformanceObserver=YLI;PerformanceEntry=VLI;PerformanceObserverEntryList=_ie;onload=null;onerror=null;document;customElements=new Dy(this);window=this;globalThis=this;performance=performance;screenLeft=0;screenTop=0;screenX=0;screenY=0;crypto=pLI;TextEncoder=ZLI;TextDecoder=uLI;closed=!1;console;name="";Buffer=hLI;[eY]=[];[AG];[wG];[Yn];[_K];[$K];[eP];[IP];[sY]=this;[sb]=this;[XG]=this;[W]=this;[lie]=this;[DN]=-1;[dY]=new o9(this);[gh]={json:new Map,css:new Map,esm:new Map};[jZ]=null;#e;#I=null;#t=null;#l=null;#n=null;#a=null;#G={timeouts:null};#s=[];#o=[];constructor(e,I){super(),this.#e=e,this.console=e.page.console,this[AG]=new Xk(e),this[_K]=new RX(this),this[$K]=new h0,this[eP]=new jY,this[IP]=new jY,this[wG]=new $y(this.#e,I?.url??"about:blank"),this[Yn]=new _y(this.#e,this),e[Yn].currentItem.href=I?.url??"about:blank",Ke.setWindowBrowserFrameRelation(this,this.#e),this[fL](),_k.extendClasses(this),this.document=new this.HTMLDocument,this.document[ks]=this;let l=e[GI].startTask(()=>this[AG].destroy());this[AG].waitUntilComplete().then(()=>{e[GI].endTask(l),this.document[tY]=NP.complete,this.document.dispatchEvent(new K("readystatechange"));let n=new K("load");n[xo]=this,n[va]=this.document,n[La]=jt.atTarget,this.dispatchEvent(n),n[xo]=null,n[La]=jt.none,n[iY]=!1}),this[Iie]()}get self(){return this[sY]}set self(e){this[sY]=e}get top(){return this[sb]}get parent(){return this[XG]}set parent(e){this[XG]=e}get frames(){return this[lie]}set frames(e){this[XG]=e}get location(){return this[wG]}set location(e){this[wG].href=e}get history(){return this[Yn]}get navigator(){return this[_K]}get screen(){return this[$K]}get sessionStorage(){return this[eP]}get localStorage(){return this[IP]}get opener(){return this.#e[Bd]}get scrollX(){return this.document?.documentElement?.scrollLeft??0}get pageXOffset(){return this.scrollX}get scrollY(){return this.document?.documentElement?.scrollTop??0}get pageYOffset(){return this.scrollY}get CSS(){return new Yk}get innerWidth(){return this.#I===null?this.#e.page.viewport.width:this.#I}set innerWidth(e){this.#I=e}get innerHeight(){return this.#t===null?this.#e.page.viewport.height:this.#t}set innerHeight(e){this.#t=e}get outerWidth(){return this.#l===null?this.#e.page.viewport.width:this.#l}set outerWidth(e){this.#l=e}get outerHeight(){return this.#n===null?this.#e.page.viewport.height:this.#n}set outerHeight(e){this.#n=e}get devicePixelRatio(){return this.#a===null?this.#e.page.viewport.devicePixelRatio:this.#a}set devicePixelRatio(e){this.#a=e}getComputedStyle(e){return e[_w]=e[_w]||new rs(V,this,{element:e,computed:!0}),e[_w]}getSelection(){return this.document.getSelection()}scroll(e,I){if(typeof e!="object"&&arguments.length===1)throw new this.TypeError("Failed to execute 'scroll' on 'Window': The provided value is not of type 'ScrollToOptions'.");let l=typeof e=="object"?e:{left:e,top:I};if(l.behavior==="smooth")this.setTimeout(()=>{if(l.top!==void 0){let n=Number(l.top);this.document.documentElement.scrollTop=isNaN(n)?0:n}if(l.left!==void 0){let n=Number(l.left);this.document.documentElement.scrollLeft=isNaN(n)?0:n}});else{if(l.top!==void 0){let n=Number(l.top);this.document.documentElement.scrollTop=isNaN(n)?0:n}if(l.left!==void 0){let n=Number(l.left);this.document.documentElement.scrollLeft=isNaN(n)?0:n}}}scrollTo(e,I){if(typeof e!="object"&&arguments.length===1)throw new this.TypeError("Failed to execute 'scrollTo' on 'Window': The provided value is not of type 'ScrollToOptions'.");this.scroll(e,I)}scrollBy(e,I){if(typeof e!="object"&&arguments.length===1)throw new this.TypeError("Failed to execute 'scrollBy' on 'Window': The provided value is not of type 'ScrollToOptions'.");let l=typeof e=="object"?e:{left:e,top:I};this.scroll({left:this.document.documentElement.scrollLeft+(l.left??0),top:this.document.documentElement.scrollTop+(l.top??0),behavior:l.behavior})}blur(){}focus(){}open(e,I,l){return Sk.openPage(this.#e,{url:e,target:I,features:l})}close(){this.#e.page.mainFrame===this.#e&&this.#e[Bd]&&(this[En](),this.#e.page.close())}matchMedia(e){return new jy({window:this,media:e})}setTimeout(e,I=0,...l){if(this.closed)return{};let n=this.#e.page.context.browser.settings;if(n.timer.preventTimerLoops){let s=new Error().stack,r=this.#s,o=this.#o,d=r.indexOf(s);if(d!==-1){if(o[d].timeout++,o[d].timeout>=(n.timer.preventTimerLoops===!0?1:n.timer.preventTimerLoops.timeout??1))return{}}else r.push(s),o.push({timeout:0,requestAnimationFrame:0})}if(!I){let s=this.#G;if(!s.timeouts){let o=!n||!n.disableErrorCapturing&&n.errorCapture===Il.tryAndCatch,d=IV.setTimeout(()=>{this.#e[GI].endTimer(d);let i=s.timeouts;s.timeouts=null;for(let h of i)if(o){let p;try{p=h.callback()}catch(Z){this[cl](Z)}p instanceof Promise&&p.catch(Z=>this[cl](Z))}else h.callback()},0);s.timeouts=[],this.#e[GI].startTimer(d)}let r=new QP(()=>e(...l));return s.timeouts.push(r),r}let c=!n||!n.disableErrorCapturing&&n.errorCapture===Il.tryAndCatch,a=IV.setTimeout(()=>{if(this.#e[GI].endTimer(a),c){let s;try{s=e(...l)}catch(r){this[cl](r)}s instanceof Promise&&s.catch(r=>this[cl](r))}else e(...l)},n?.timer.maxTimeout!==-1&&I&&I>n?.timer.maxTimeout?n?.timer.maxTimeout:I);return this.#e[GI].startTimer(a),a}clearTimeout(e){if(e&&e instanceof QP){let I=this.#G;if(!I.timeouts)return;let l=I.timeouts.indexOf(e);l!==-1&&I.timeouts.splice(l,1);return}qie&&(!e||e.constructor.name!=="Timeout")||(IV.clearTimeout(e),this.#e[GI].endTimer(e))}setInterval(e,I=0,...l){if(this.closed)return{};let n=this.#e.page.context.browser.settings,c=!n||!n.disableErrorCapturing&&n.errorCapture===Il.tryAndCatch,a=0,s=IV.setInterval(()=>{if(c){let r;try{r=e(...l)}catch(o){this.clearInterval(s),this[cl](o)}r instanceof Promise&&r.catch(o=>{this.clearInterval(s),this[cl](o)})}else e(...l);n?.timer.maxIntervalIterations!==-1&&(a>=n?.timer.maxIntervalIterations&&this.clearInterval(s),a++)},n?.timer.maxIntervalTime!==-1&&I&&I>n?.timer.maxIntervalTime?n?.timer.maxIntervalTime:I);return this.#e[GI].startTimer(s),s}clearInterval(e){qie&&(!e||e.constructor.name!=="Timeout")||(IV.clearInterval(e),this.#e[GI].endTimer(e))}requestAnimationFrame(e){if(this.closed)return{};let I=this.#e.page.context.browser.settings;if(I.timer.preventTimerLoops){let c=new Error().stack,a=this.#s,s=this.#o,r=a.indexOf(c);if(r!==-1){if(s[r].requestAnimationFrame++,s[r].requestAnimationFrame>=(I.timer.preventTimerLoops===!0?1:I.timer.preventTimerLoops.requestAnimationFrame??1))return{}}else a.push(c),s.push({timeout:0,requestAnimationFrame:0})}let l=!I||!I.disableErrorCapturing&&I.errorCapture===Il.tryAndCatch,n=IV.setImmediate(()=>{if(this.#e[GI].endImmediate(n),l){let c;try{c=e(this.performance.now())}catch(a){this[cl](a)}c instanceof Promise&&c.catch(a=>this[cl](a))}else e(this.performance.now())});return this.#e[GI].startImmediate(n),n}cancelAnimationFrame(e){qie&&(!e||e.constructor.name!=="Immediate")||(IV.clearImmediate(e),this.#e[GI].endImmediate(e))}queueMicrotask(e){if(this.closed)return;let I=!1,l=this.#e[GI].startTask(()=>I=!0),n=this.#e.page.context.browser.settings,c=!n||!n.disableErrorCapturing&&n.errorCapture===Il.tryAndCatch;IV.queueMicrotask(()=>{if(!I)if(this.#e[GI].endTask(l),c){let a;try{a=e()}catch(s){this[cl](s)}a instanceof Promise&&a.catch(s=>this[cl](s))}else e()})}async fetch(e,I){return this.closed?Promise.reject(new this.DOMException("Failed to execute 'fetch' on 'Window': The window is closed.",B.invalidStateError)):await new xr({browserFrame:this.#e,window:this,url:e,init:I}).send()}btoa(e){return cX.btoa(e)}atob(e){return cX.atob(e)}postMessage(e,I="*",l){if(!this.closed){if(I&&I!=="*"&&this.location.origin!==I)throw new this.DOMException(`Failed to execute 'postMessage' on 'Window': The target origin provided ('${I}') does not match the recipient window's origin ('${this.location.origin}').`,B.securityError);try{JSON.stringify(e)}catch{throw new this.DOMException("Failed to execute 'postMessage' on 'Window': The provided message cannot be serialized.",B.invalidStateError)}this.setTimeout(()=>this.dispatchEvent(new pX("message",{data:e,origin:this.#e.parentFrame?this.#e.parentFrame.window.location.origin:this.#e.window.location.origin,source:this.#e.parentFrame?this.#e.parentFrame.window:this.#e.window,lastEventId:""})))}}resizeTo(e,I){if(!this.closed){if(!e||!I)throw new this.DOMException(`Failed to execute 'resizeTo' on 'Window': 2 arguments required, but only ${arguments.length} present.`);this.#e[JZ]&&this.#e.page.setViewport({width:e,height:I})}}resizeBy(e,I){if(!this.closed){if(!e||!I)throw new this.DOMException(`Failed to execute 'resizeBy' on 'Window': 2 arguments required, but only ${arguments.length} present.`);if(this.#e[JZ]){let l=this.#e.page.viewport;this.#e.page.setViewport({width:l.width+e,height:l.height+I})}}}[cl](e){this.#e.page.console.error(e),this.dispatchEvent(new Hh("error",{message:e.message,error:e}))}[fL](){Tze.isContext(this)||(Tze.createContext(this),Qze.runInContext(this))}[En](){if(this.closed)return;this.closed=!0;let e=this[eY];for(let a of e)a[En]&&a[En]();this[eY]=[];let I=this.document[be];for(;I.length>0;)I[0].disconnectedCallback&&delete I[0].disconnectedCallback,this.document[Yc](I[0]);let l=this.document.createElement("html"),n=this.document.createElement("head"),c=this.document.createElement("body");l.appendChild(n),l.appendChild(c),this.document[FI](l),this.location[En]&&this.location[En](),this.customElements[En]&&this.customElements[En](),this.history[En]&&this.history[En](),this[gh].json.clear(),this[gh].css.clear(),this[gh].esm.clear(),this.document[Bs].clear(),this.document[Nn]=null,this.document[qN]=null,this.document[tb]=null,this.document[Ay]=null,Ke.removeWindowBrowserFrameRelation(this)}[Iie](){for(let e of[t,tt]){let I=Object.getOwnPropertyDescriptors(e.prototype),l=Object.keys(I);for(let n of l){let c=I[n];c.get||c.set?Object.defineProperty(this,n,{...c,get:c.get?.bind(this),set:c.set?.bind(this)}):n!=="constructor"&&typeof c.value=="function"&&!c.value.toString().startsWith("class ")&&Object.defineProperty(this,n,{...c,value:c.value.bind(this)})}}}};var tE=class{childFrames=[];parentFrame=null;page;window;closed=!1;[GI]=new db(this);[Dl]={navigation:[]};[fs]=null;[Bd]=null;[JZ]=!1;[Yn]=new G0;constructor(e){this.page=e,this.window=new zG(this),e.context.browser[Ia]&&e.context.browser[Ia].observe(this.window)}get content(){return this.window.document.documentElement.outerHTML}set content(e){this.window.document[_m]=!0,this.window.document[$m]=!1,this.window.document.open(),this.window.document.write(e)}get url(){return this.window.location.href}set url(e){this.window[wG][ns](this,Us.getRelativeURL(this,e).href)}get document(){return this.window?.document??null}async waitUntilComplete(){await Promise.all([this[GI].waitUntilComplete(),...this.childFrames.map(e=>e.waitUntilComplete())])}waitForNavigation(){return new Promise(e=>this[Dl].navigation.push(e))}abort(){return this.childFrames.length?new Promise((e,I)=>{Promise.all(this.childFrames.map(l=>l.abort()).concat([this[GI].abort()])).then(()=>e()).catch(I)}):this[GI].abort()}evaluate(e){return r0.evaluate(this,e)}goto(e,I){return fa.navigate({windowClass:zG,frame:this,url:e,goToOptions:I})}goBack(e){return fa.navigateBack({windowClass:zG,frame:this,goToOptions:e})}goForward(e){return fa.navigateForward({windowClass:zG,frame:this,goToOptions:e})}goSteps(e,I){return fa.navigateSteps({windowClass:zG,frame:this,steps:e,goToOptions:I})}reload(e){return fa.reload({windowClass:zG,frame:this,goToOptions:e})}};G();var tV=class{#e;#I={};#t={};#l=0;#n=[];constructor(e){this.#e=e}assert(e,I,...l){e||this.#e.print({type:Rn.assert,level:Bc.error,message:["Assertion failed:",...I?[I,...l]:l],group:this.#n[this.#n.length-1]||null})}clear(){this.#e.clear()}count(e="default"){this.#I[e]||(this.#I[e]=0),this.#I[e]++,this.#e.print({type:Rn.count,level:Bc.info,message:[`${e}: ${this.#I[e]}`],group:this.#n[this.#n.length-1]||null})}countReset(e="default"){delete this.#I[e],this.#e.print({type:Rn.countReset,level:Bc.warn,message:[`${e}: 0`],group:this.#n[this.#n.length-1]||null})}debug(e,...I){this.#e.print({type:Rn.debug,level:Bc.log,message:e?[e,...I]:I,group:this.#n[this.#n.length-1]||null})}dir(e){this.#e.print({type:Rn.dir,level:Bc.log,message:[e],group:this.#n[this.#n.length-1]||null})}dirxml(e){this.#e.print({type:Rn.dirxml,level:Bc.log,message:[e],group:this.#n[this.#n.length-1]||null})}error(e,...I){this.#e.print({type:Rn.error,level:Bc.error,message:e?[e,...I]:I,group:this.#n[this.#n.length-1]||null})}exception(...e){this.error(...e)}group(e){this.#l++;let I={id:this.#l,label:e||"default",collapsed:!1,parent:this.#n[this.#n.length-1]||null};this.#n.push(I),this.#e.print({type:Rn.group,level:Bc.log,message:[e||"default"],group:I})}groupCollapsed(e){this.#l++;let I={id:this.#l,label:e||"default",collapsed:!0,parent:this.#n[this.#n.length-1]||null};this.#n.push(I),this.#e.print({type:Rn.groupCollapsed,level:Bc.log,message:[e||"default"],group:I})}groupEnd(){this.#n.length!==0&&this.#n.pop()}info(e,...I){this.#e.print({type:Rn.info,level:Bc.info,message:e?[e,...I]:I,group:this.#n[this.#n.length-1]||null})}log(e,...I){this.#e.print({type:Rn.log,level:Bc.log,message:e?[e,...I]:I,group:this.#n[this.#n.length-1]||null})}profile(){throw new Error("Method not implemented.")}profileEnd(){throw new Error("Method not implemented.")}table(e){this.#e.print({type:Rn.table,level:Bc.log,message:[e],group:this.#n[this.#n.length-1]||null})}time(e="default"){this.#t[e]=performance.now()}timeEnd(e="default"){let I=this.#t[e];if(I){let l=performance.now()-I;this.#e.print({type:Rn.timeEnd,level:Bc.info,message:[`${e}: ${l}ms - timer ended`],group:this.#n[this.#n.length-1]||null})}}timeLog(e="default",...I){let l=this.#t[e];if(l){let n=performance.now()-l;this.#e.print({type:Rn.timeLog,level:Bc.info,message:[`${e}: ${n}ms`,...I],group:this.#n[this.#n.length-1]||null})}}timeStamp(){throw new Error("Method not implemented.")}trace(e,...I){this.#e.print({type:Rn.trace,level:Bc.log,message:[...e?[e,...I]:I,new Error("stack").stack.replace("Error: stack","")],group:this.#n[this.#n.length-1]||null})}warn(e,...I){this.#e.print({type:Rn.warn,level:Bc.warn,message:e?[e,...I]:I,group:this.#n[this.#n.length-1]||null})}};G();var Yu=class{static getFrames(e){return this.findFrames(e.mainFrame)}static closePage(e){if(e.closed)return Promise.resolve();e.closed=!0;let I=e.context.pages.indexOf(e);return I!==-1&&e.context.pages.splice(I,1),e.virtualConsolePrinter.close(),Nb.destroyFrame(e.mainFrame)}static findFrames(e){let I=[e];for(let l of e.childFrames)I=I.concat(this.findFrames(l));return I}};var lE=class{virtualConsolePrinter=new mY;mainFrame;context;console;viewport;closed=!1;constructor(e){this.context=e,this.console=e.browser.console??new tV(this.virtualConsolePrinter),this.mainFrame=new tE(this),this.viewport={width:e.browser.settings.viewport.width,height:e.browser.settings.viewport.height,devicePixelRatio:e.browser.settings.viewport.devicePixelRatio}}get frames(){return Yu.getFrames(this)}get content(){return this.mainFrame.content}set content(e){this.mainFrame.content=e}get url(){return this.mainFrame.url}set url(e){this.mainFrame.url=e}close(){return Yu.closePage(this)}waitUntilComplete(){return this.mainFrame.waitUntilComplete()}waitForNavigation(){return this.mainFrame.waitForNavigation()}abort(){return this.mainFrame.abort()}evaluate(e){return this.mainFrame.evaluate(e)}setViewport(e){let I=Object.assign({},this.viewport);Object.assign(this.viewport,e),(I.width!==this.viewport.width||I.height!==this.viewport.height||I.devicePixelRatio!==this.viewport.devicePixelRatio)&&this.mainFrame.window.dispatchEvent(new K("resize"))}goto(e,I){return this.mainFrame.goto(e,I)}goBack(e){return this.mainFrame.goBack(e)}goForward(e){return this.mainFrame.goForward(e)}goSteps(e,I){return this.mainFrame.goSteps(e,I)}reload(e){return this.mainFrame.reload(e)}};G();var V0=class{#e=new Map;get(e){let I=this.#e.get(e.url);return I?I.expires<Date.now()?(this.#e.delete(e.url),null):I:null}add(e,I){if(this.#e.delete(e.url),e.headers.get("Cache-Control")?.includes("no-cache")||I.status<200||I.status>=300)return null;let l=I.headers.get("Access-Control-Max-Age"),n=I.headers.get("Access-Control-Allow-Origin");if(!l||!n)return null;let c=[];if(I.headers.has("Access-Control-Allow-Methods")&&I.headers.get("Access-Control-Allow-Methods")!=="*")for(let r of I.headers.get("Access-Control-Allow-Methods").split(","))c.push(r.trim().toUpperCase());let a={allowOrigin:n,allowMethods:c,expires:Date.now()+parseInt(l)*1e3};return isNaN(a.expires)||a.expires<Date.now()?null:(this.#e.set(e.url,a),a)}clear(){this.#e.clear()}};var R0=class{pages=[];browser;cookieContainer=new Uy;responseCache=new Sy;preflightResponseCache=new V0;closed=!1;constructor(e){this.browser=e}async close(){if(this.closed)return;if(this.browser.contexts[0]===this)throw new Error("Cannot close the default context. Use `browser.close()` to close the browser instead.");this.closed=!0,await Promise.all(this.pages.slice().map(l=>l.close()));let e=this.browser,I=e.contexts.indexOf(this);I!==-1&&e.contexts.splice(I,1),this.pages=[],this.cookieContainer.clearCookies(),this.responseCache.clear(),this.preflightResponseCache.clear()}async waitUntilComplete(){await Promise.all(this.pages.map(e=>e.waitUntilComplete()))}abort(){return new Promise((e,I)=>{if(!this.pages.length){e();return}Promise.all(this.pages.slice().map(l=>l.abort())).then(()=>e()).catch(l=>I(l))})}newPage(){let e=new lE(this);return this.pages.push(e),e}};G();G();G();var jze={version:"19.0.2"};var Th={disableJavaScriptEvaluation:!1,disableJavaScriptFileLoading:!1,disableCSSFileLoading:!1,disableIframePageLoading:!1,disableComputedStyleRendering:!1,handleDisabledFileLoadingAsSuccess:!1,disableErrorCapturing:!1,errorCapture:Il.tryAndCatch,enableFileSystemHttpRequests:!1,timer:{maxTimeout:-1,maxIntervalTime:-1,maxIntervalIterations:-1,preventTimerLoops:!1},fetch:{disableSameOriginPolicy:!1,disableStrictSSL:!1,interceptor:null,requestHeaders:null,virtualServers:null},navigation:{disableMainFrameNavigation:!1,disableChildFrameNavigation:!1,disableChildPageNavigation:!1,disableFallbackToSetURL:!1,crossOriginPolicy:zX.anyOrigin,beforeContentCallback:null},navigator:{userAgent:`Mozilla/5.0 (X11; ${process.platform.charAt(0).toUpperCase()+process.platform.slice(1)+" "+process.arch}) AppleWebKit/537.36 (KHTML, like Gecko) HappyDOM/${jze.version}`,maxTouchPoints:0},device:{prefersColorScheme:"light",prefersReducedMotion:"no-preference",mediaType:"screen",forcedColors:"none"},debug:{traceWaitUntilComplete:-1},viewport:{width:1024,height:768,devicePixelRatio:1}};var y0=class{static createSettings(e){return e&&this.validate(Th,e),{...Th,...e,navigation:{...Th.navigation,...e?.navigation},navigator:{...Th.navigator,...e?.navigator},timer:{...Th.timer,...e?.timer},fetch:{...Th.fetch,...e?.fetch},device:{...Th.device,...e?.device},debug:{...Th.debug,...e?.debug},viewport:{...Th.viewport,...e?.viewport}}}static validate(e,I,l){for(let n of Object.keys(I)){if(e[n]===void 0){let c=l?l+"."+n:n;throw new Error(`Unknown browser setting "${c}"`)}if(typeof e[n]=="object"&&!Array.isArray(e[n])&&e[n]!==null){let c=l?l+"."+n:n;if(typeof I[n]!="object"||Array.isArray(I[n])||I[n]===null)throw new Error(`Browser setting "${c}" cannot be null`);this.validate(e[n],I[n],c)}else if((typeof e[n]=="boolean"||typeof e[n]=="number"||typeof e[n]=="string")&&typeof I[n]!=typeof e[n]&&!(n==="preventTimerLoops"&&typeof I[n]=="object"&&I[n]!==null)){let a=l?l+"."+n:n;throw new Error(`Browser setting "${a}" must be of type "${typeof e[n]}"`)}}}};G();var F0=class{static listenerCount=0;observedWindows=[];uncaughtExceptionListener=null;uncaughtRejectionListener=null;observe(e){if(this.observedWindows.includes(e))throw new Error("Browser window is already being observed.");this.observedWindows.push(e),!this.uncaughtExceptionListener&&(this.uncaughtExceptionListener=(I,l)=>{if(l==="unhandledRejection")return;let n=null;for(let c of this.observedWindows)if(I instanceof c.Error||I instanceof c.DOMException){n=c;break}n?(n.console.error(I),n.dispatchEvent(new n.ErrorEvent("error",{error:I,message:I.message}))):process.listenerCount("uncaughtException")===this.constructor.listenerCount&&(console.error(I),process.exit(1))},this.uncaughtRejectionListener=I=>{let l=null;for(let n of this.observedWindows)if(I instanceof n.Error||I instanceof n.DOMException){l=n;break}l?(l.console.error(I),l.dispatchEvent(new l.ErrorEvent("error",{error:I,message:I.message}))):process.listenerCount("unhandledRejection")===this.constructor.listenerCount&&(console.error(I),process.exit(1))},this.constructor.listenerCount++,process.on("uncaughtException",this.uncaughtExceptionListener),process.on("unhandledRejection",this.uncaughtRejectionListener))}disconnect(e){let I=this.observedWindows.indexOf(e);I!==-1&&(this.observedWindows.splice(I,1),this.observedWindows.length===0&&this.uncaughtExceptionListener&&(this.constructor.listenerCount--,process.off("uncaughtException",this.uncaughtExceptionListener),this.uncaughtRejectionListener&&process.off("unhandledRejection",this.uncaughtRejectionListener),this.uncaughtExceptionListener=null,this.uncaughtRejectionListener=null))}};var AP=class{contexts;settings;console;[Ia]=null;constructor(e){this.console=e?.console||null,this.settings=y0.createSettings(e?.settings),this.settings.errorCapture===Il.processLevel&&(this[Ia]=new F0),this.contexts=[new R0(this)]}get closed(){return this.contexts.length===0}get defaultContext(){if(this.contexts.length===0)throw new Error("No default context. The browser has been closed.");return this.contexts[0]}async close(){if(this.contexts.length===0)return;let e=this.contexts;this.contexts=[],await Promise.all(e.map(I=>I.close()))}async waitUntilComplete(){if(this.contexts.length===0)throw new Error("No default context. The browser has been closed.");await Promise.all(this.contexts.map(e=>e.waitUntilComplete()))}abort(){return new Promise((e,I)=>{if(!this.contexts.length){e();return}Promise.all(this.contexts.slice().map(l=>l.abort())).then(()=>e()).catch(l=>I(l))})}newIncognitoContext(){if(this.contexts.length===0)throw new Error("No default context. The browser has been closed.");let e=new R0(this);return this.contexts.push(e),e}newPage(){if(this.contexts.length===0)throw new Error("No default context. The browser has been closed.");return this.contexts[0].newPage()}};G();G();G();var g0=class{virtualConsolePrinter=new mY;mainFrame;context;console;viewport;closed=!1;constructor(e){this.context=e,this.console=e.browser.console??new tV(this.virtualConsolePrinter),this.mainFrame=new SY(this),this.viewport={width:e.browser.settings.viewport.width,height:e.browser.settings.viewport.height,devicePixelRatio:e.browser.settings.viewport.devicePixelRatio}}get frames(){return Yu.getFrames(this)}get content(){return this.mainFrame.content}set content(e){this.mainFrame.content=e}get url(){return this.mainFrame.url}set url(e){this.mainFrame.url=e}close(){return new Promise((e,I)=>{let l=this.context;Yu.closePage(this).then(()=>{l.pages[0]===this?l.browser.close().then(e).catch(I):e()}).catch(I)})}waitUntilComplete(){return this.mainFrame.waitUntilComplete()}waitForNavigation(){return this.mainFrame.waitForNavigation()}abort(){return this.mainFrame.abort()}evaluate(e){return this.mainFrame.evaluate(e)}setViewport(e){let I=Object.assign({},this.viewport);Object.assign(this.viewport,e),(I.width!==this.viewport.width||I.height!==this.viewport.height||I.devicePixelRatio!==this.viewport.devicePixelRatio)&&this.mainFrame.window.dispatchEvent(new K("resize"))}goto(e,I){return this.mainFrame.goto(e,I)}goBack(e){return this.mainFrame.goBack(e)}goForward(e){return this.mainFrame.goForward(e)}goSteps(e,I){return this.mainFrame.goSteps(e,I)}reload(e){return this.mainFrame.reload(e)}};var nE=class{pages;browser;cookieContainer=new Uy;responseCache=new Sy;preflightResponseCache=new V0;closed=!1;constructor(e){this.browser=e,this.pages=[],this.pages.push(new g0(this))}async close(){if(this.closed)return;if(this.browser.contexts[0]===this)throw new Error("Cannot close the default context. Use `browser.close()` to close the browser instead.");this.closed=!0,await Promise.all(this.pages.slice().map(l=>l.close()));let e=this.browser,I=e.contexts.indexOf(this);I!==-1&&e.contexts.splice(I,1),this.pages=[],this.cookieContainer.clearCookies(),this.responseCache.clear(),this.preflightResponseCache.clear()}async waitUntilComplete(){await Promise.all(this.pages.map(e=>e.waitUntilComplete()))}abort(){return new Promise((e,I)=>{if(!this.pages.length){e();return}Promise.all(this.pages.slice().map(l=>l.abort())).then(()=>e()).catch(l=>I(l))})}newPage(){let e=new g0(this);return this.pages.push(e),e}};var cE=class{contexts;settings;console;windowClass;[Ia]=null;constructor(e,I){this.windowClass=e,this.console=I?.console||null,this.settings=y0.createSettings(I?.settings),this.settings.errorCapture===Il.processLevel&&(this[Ia]=new F0),this.contexts=[],this.contexts.push(new nE(this))}get closed(){return this.contexts.length===0}get defaultContext(){if(this.contexts.length===0)throw new Error("No default context. The browser has been closed.");return this.contexts[0]}async close(){if(this.contexts.length===0)return;let e=this.contexts;this.contexts=[],await Promise.all(e.map(I=>I.close()))}async waitUntilComplete(){await Promise.all(this.contexts.map(e=>e.waitUntilComplete()))}abort(){return new Promise((e,I)=>{if(!this.contexts.length){e();return}Promise.all(this.contexts.slice().map(l=>l.abort())).then(()=>e()).catch(l=>I(l))})}newIncognitoContext(){throw new Error("Not possible to create a new context on a detached browser.")}newPage(){if(this.contexts.length===0)throw new Error("No default context. The browser has been closed.");return this.contexts[0].newPage()}};G();var aE=class{#e;constructor(e){this.#e=e}get settings(){return this.#e.page.context.browser.settings}get virtualConsolePrinter(){return this.#e.page.virtualConsolePrinter}waitUntilComplete(){return this.#e.waitUntilComplete()}whenAsyncComplete(){return this.waitUntilComplete()}abort(){return this.#e.abort()}cancelAsync(){return this.abort()}close(){return this.#e.page.close()}setURL(e){this.#e.url=e}setViewport(e){this.#e.page.setViewport(e)}setWindowSize(e){this.setViewport({width:e?.width,height:e?.height})}setInnerWidth(e){this.setViewport({width:e})}setInnerHeight(e){this.setViewport({height:e})}};G();G();var lV=class extends zG{happyDOM;constructor(e){let l=new cE(zG,{console:e?.console,settings:e?.settings}).defaultContext.pages[0],n=l.mainFrame;e&&(e.width||e.height||e.innerWidth||e.innerHeight)&&Object.assign(l.viewport,{width:e.width||e.innerWidth||l.viewport.width,height:e.height||e.innerHeight||l.viewport.height}),super(n,{url:e?.url}),n.window=this,n.page.context.browser[Ia]&&n.page.context.browser[Ia].observe(this),this.happyDOM=new aE(n)}};import{Buffer as RLI}from"buffer";var wP=class extends lV{Array=globalThis.Array;ArrayBuffer=globalThis.ArrayBuffer;Boolean=globalThis.Boolean;Buffer=RLI;DataView=globalThis.DataView;Date=globalThis.Date;Error=globalThis.Error;EvalError=globalThis.EvalError;Float32Array=globalThis.Float32Array;Float64Array=globalThis.Float64Array;Function=globalThis.Function;Infinity=globalThis.Infinity;Int16Array=globalThis.Int16Array;Int32Array=globalThis.Int32Array;Int8Array=globalThis.Int8Array;Intl=globalThis.Intl;JSON=globalThis.JSON;Map=globalThis.Map;Math=globalThis.Math;NaN=globalThis.NaN;Number=globalThis.Number;Object=globalThis.Object;Promise=globalThis.Promise;RangeError=globalThis.RangeError;ReferenceError=globalThis.ReferenceError;RegExp=globalThis.RegExp;Set=globalThis.Set;String=globalThis.String;Symbol=globalThis.Symbol;SyntaxError=globalThis.SyntaxError;TypeError=globalThis.TypeError;URIError=globalThis.URIError;Uint16Array=globalThis.Uint16Array;Uint32Array=globalThis.Uint32Array;Uint8Array=globalThis.Uint8Array;Uint8ClampedArray=globalThis.Uint8ClampedArray;WeakMap=globalThis.WeakMap;WeakSet=globalThis.WeakSet;decodeURI=globalThis.decodeURI;decodeURIComponent=globalThis.decodeURIComponent;encodeURI=globalThis.encodeURI;encodeURIComponent=globalThis.encodeURIComponent;eval=globalThis.eval;escape=globalThis.escape;global=globalThis;isFinite=globalThis.isFinite;isNaN=globalThis.isNaN;parseFloat=globalThis.parseFloat;parseInt=globalThis.parseInt;undefined=globalThis.undefined;unescape=globalThis.unescape;[fL](){}};var Dze=5e3,yLI,FLI=["b","blockquote","br","code","em","h1","h2","h3","h4","h5","h6","hr","i","li","ol","p","pre","strong","sub","sup","table","tbody","td","th","thead","tr","ul","img","a","#text"],gLI=["href","src"],Kze={img:["src"],a:["href"]};var QLI=new lV,ALI={ALLOWED_TAGS:FLI,ALLOW_DATA_ATTR:!1,ALLOWED_ATTR:gLI,KEEP_CONTENT:!1,RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,WHOLE_DOCUMENT:!1,SANITIZE_DOM:!0,SAFE_FOR_TEMPLATES:!1,SAFE_FOR_XML:!0,RETURN_TRUSTED_TYPE:!1,USE_PROFILES:!1};function wLI(t,e,I){let l=t.tagName.toLowerCase();if(!(l in Kze)){e.forceKeepAttr=!1,e.keepAttr=!1;return}let n=Kze[l],c=e.attrName.toLowerCase();if(!n.includes(c)){e.forceKeepAttr=!1,e.keepAttr=!1;return}if(l==="img"&&c==="src"||l==="a"&&c==="href"){try{let a=URL.parse(e.attrValue);if(a&&(a.protocol==="http:"||a.protocol==="https:"))return}catch{}e.forceKeepAttr=!1,e.keepAttr=!1}}function $ie(t,e){if(!t)return t;try{return Pze(t,e)}catch(I){throw new Error(`Failed to apply content filter: ${I}`)}}function ebe(t){switch(t.toLowerCase()){case"none":return"none";case"markdown":return"markdown";case"hidden_characters":return"hidden_characters";default:return"hidden_characters"}}function Ibe(t,e){if(t===null||typeof t!="object")return t;for(let[I,l]of Object.entries(t))if(typeof l=="string"){let n=$ie(l,e);t[I]=n}else typeof l=="object"&&l!==null&&(t[I]=Ibe(l,e));return t}function Pze(t,e,I=[]){if(!t||e==="none")return t;switch(e||(e="markdown"),e){case"markdown":return Vu(t,I);case"hidden_characters":return qze(t);default:throw new Error(`Unknown filter mode: ${e}`)}}function Vu(t,e=[]){if(!t)return t;let I=qze(t),l=/((?:^|\n)```.*?\n[\s\S\n]+?\n```)|(`[\s\S\n]+?`)/gm,n="",c=0,a=new Map,s=0;for(let r of I.matchAll(l)){let o=r[0],d=r.index,i=d+o.length;n+=I.slice(c,d);let h=`*****__CODE_BLOCK_${s}__*****`;n+=h,a.set(h,o),c=i,s++}n+=I.slice(c),n=n.replace(/!\[(.*?)\]\((\S+?)(?:\s+"[^"]*")?\)/g,'<img src="$2">').replace(/\[(.*?)\]\((\S+?)(?:\s+"[^"]*")?\)/g,'<a href="$2">$1</a>').replace(/<([^!/A-Za-z0-9>])/g,"&lt;$1").replace(/<(https:\/\/.+)>/g,'<a href="$1">$1</a>'),n=XLI(n,e);for(let[r,o]of a)n=n.replaceAll(r,o);return n}function XLI(t,e=[]){let I=tze(QLI);I.addHook("uponSanitizeAttribute",wLI),I.setConfig({...ALI,ADD_TAGS:e});let l=!1,n="<__filter_complete__></__filter_complete__>",c=setTimeout(()=>{l=!0},Dze),a=I.sanitize(t+n);for(;!l&&a.endsWith(n);)a=I.sanitize(a);return l&&(yLI?.error(`Content filtering timed out after ${Dze}ms. Returning partially filtered content.`),a=a.slice(0,a.length-n.length)),clearTimeout(c),a}function qze(t){let e=t.normalize("NFD"),I="";do I=e,e=e.replaceAll(/[\u{E0001}\u{E0020}-\u{E007F}\u{2066}-\u{2069}\u{202A}-\u{202E}\u{200B}\u{200C}\u{200E}\u{200F}\u{00AD}\u{FEFF}\u{180E}\u{2060}-\u{2064}]/gu,"");while(e!==I);return e.normalize("NFC")}G();import*as li from"fs";import{existsSync as yu}from"fs";G();G();G();G();var tbe=(t,e,I)=>{let l=t instanceof RegExp?_ze(t,I):t,n=e instanceof RegExp?_ze(e,I):e,c=l!==null&&n!=null&&HLI(l,n,I);return c&&{start:c[0],end:c[1],pre:I.slice(0,c[0]),body:I.slice(c[0]+l.length,c[1]),post:I.slice(c[1]+n.length)}},_ze=(t,e)=>{let I=e.match(t);return I?I[0]:null},HLI=(t,e,I)=>{let l,n,c,a,s,r=I.indexOf(t),o=I.indexOf(e,r+1),d=r;if(r>=0&&o>0){if(t===e)return[r,o];for(l=[],c=I.length;d>=0&&!s;){if(d===r)l.push(d),r=I.indexOf(t,d+1);else if(l.length===1){let i=l.pop();i!==void 0&&(s=[i,o])}else n=l.pop(),n!==void 0&&n<c&&(c=n,a=o),o=I.indexOf(e,d+1);d=r<o&&r>=0?r:o}l.length&&a!==void 0&&(s=[c,a])}return s};var $ze="\0SLASH"+Math.random()+"\0",eUe="\0OPEN"+Math.random()+"\0",nbe="\0CLOSE"+Math.random()+"\0",IUe="\0COMMA"+Math.random()+"\0",tUe="\0PERIOD"+Math.random()+"\0",ELI=new RegExp($ze,"g"),vLI=new RegExp(eUe,"g"),CLI=new RegExp(nbe,"g"),JLI=new RegExp(IUe,"g"),LLI=new RegExp(tUe,"g"),kLI=/\\\\/g,fLI=/\\{/g,xLI=/\\}/g,BLI=/\\,/g,zLI=/\\./g;function lbe(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function ULI(t){return t.replace(kLI,$ze).replace(fLI,eUe).replace(xLI,nbe).replace(BLI,IUe).replace(zLI,tUe)}function SLI(t){return t.replace(ELI,"\\").replace(vLI,"{").replace(CLI,"}").replace(JLI,",").replace(LLI,".")}function lUe(t){if(!t)return[""];let e=[],I=tbe("{","}",t);if(!I)return t.split(",");let{pre:l,body:n,post:c}=I,a=l.split(",");a[a.length-1]+="{"+n+"}";let s=lUe(c);return c.length&&(a[a.length-1]+=s.shift(),a.push.apply(a,s)),e.push.apply(e,a),e}function nUe(t){return t?(t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),d9(ULI(t),!0).map(SLI)):[]}function OLI(t){return"{"+t+"}"}function MLI(t){return/^-?0\d/.test(t)}function TLI(t,e){return t<=e}function jLI(t,e){return t>=e}function d9(t,e){let I=[],l=tbe("{","}",t);if(!l)return[t];let n=l.pre,c=l.post.length?d9(l.post,!1):[""];if(/\$$/.test(l.pre))for(let a=0;a<c.length;a++){let s=n+"{"+l.body+"}"+c[a];I.push(s)}else{let a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(l.body),s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(l.body),r=a||s,o=l.body.indexOf(",")>=0;if(!r&&!o)return l.post.match(/,(?!,).*\}/)?(t=l.pre+"{"+l.body+nbe+l.post,d9(t)):[t];let d;if(r)d=l.body.split(/\.\./);else if(d=lUe(l.body),d.length===1&&d[0]!==void 0&&(d=d9(d[0],!1).map(OLI),d.length===1))return c.map(h=>l.pre+d[0]+h);let i;if(r&&d[0]!==void 0&&d[1]!==void 0){let h=lbe(d[0]),p=lbe(d[1]),Z=Math.max(d[0].length,d[1].length),u=d.length===3&&d[2]!==void 0?Math.abs(lbe(d[2])):1,N=TLI;p<h&&(u*=-1,N=jLI);let y=d.some(MLI);i=[];for(let Q=h;N(Q,p);Q+=u){let A;if(s)A=String.fromCharCode(Q),A==="\\"&&(A="");else if(A=String(Q),y){let w=Z-A.length;if(w>0){let x=new Array(w+1).join("0");Q<0?A="-"+x+A.slice(1):A=x+A}}i.push(A)}}else{i=[];for(let h=0;h<d.length;h++)i.push.apply(i,d9(d[h],!1))}for(let h=0;h<i.length;h++)for(let p=0;p<c.length;p++){let Z=n+i[h]+c[p];(!e||r||Z)&&I.push(Z)}}return I}G();var i9=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};G();G();var DLI={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},b9=t=>t.replace(/[[\]\\-]/g,"\\$&"),KLI=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),cUe=t=>t.join(""),aUe=(t,e)=>{let I=e;if(t.charAt(I)!=="[")throw new Error("not in a brace expression");let l=[],n=[],c=I+1,a=!1,s=!1,r=!1,o=!1,d=I,i="";e:for(;c<t.length;){let u=t.charAt(c);if((u==="!"||u==="^")&&c===I+1){o=!0,c++;continue}if(u==="]"&&a&&!r){d=c+1;break}if(a=!0,u==="\\"&&!r){r=!0,c++;continue}if(u==="["&&!r){for(let[N,[Y,y,Q]]of Object.entries(DLI))if(t.startsWith(N,c)){if(i)return["$.",!1,t.length-I,!0];c+=N.length,Q?n.push(Y):l.push(Y),s=s||y;continue e}}if(r=!1,i){u>i?l.push(b9(i)+"-"+b9(u)):u===i&&l.push(b9(u)),i="",c++;continue}if(t.startsWith("-]",c+1)){l.push(b9(u+"-")),c+=2;continue}if(t.startsWith("-",c+1)){i=u,c+=2;continue}l.push(b9(u)),c++}if(d<c)return["",!1,0,!1];if(!l.length&&!n.length)return["$.",!1,t.length-I,!0];if(n.length===0&&l.length===1&&/^\\?.$/.test(l[0])&&!o){let u=l[0].length===2?l[0].slice(-1):l[0];return[KLI(u),!1,d-I,!1]}let h="["+(o?"^":"")+cUe(l)+"]",p="["+(o?"":"^")+cUe(n)+"]";return[l.length&&n.length?"("+h+"|"+p+")":l.length?h:p,s,d-I,!0]};G();var Fb=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var PLI=new Set(["!","?","+","*","@"]),sUe=t=>PLI.has(t),qLI="(?!(?:^|/)\\.\\.?(?:$|/))",XP="(?!\\.)",_LI=new Set(["[","."]),$LI=new Set(["..","."]),e3I=new Set("().*{}+?[]^$\\!"),I3I=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),cbe="[^/]",rUe=cbe+"*?",GUe=cbe+"+?",sE=class t{type;#e;#I;#t=!1;#l=[];#n;#a;#G;#s=!1;#o;#d;#i=!1;constructor(e,I,l={}){this.type=e,e&&(this.#I=!0),this.#n=I,this.#e=this.#n?this.#n.#e:this,this.#o=this.#e===this?l:this.#e.#o,this.#G=this.#e===this?[]:this.#e.#G,e==="!"&&!this.#e.#s&&this.#G.push(this),this.#a=this.#n?this.#n.#l.length:0}get hasMagic(){if(this.#I!==void 0)return this.#I;for(let e of this.#l)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#I=!0;return this.#I}toString(){return this.#d!==void 0?this.#d:this.type?this.#d=this.type+"("+this.#l.map(e=>String(e)).join("|")+")":this.#d=this.#l.map(e=>String(e)).join("")}#c(){if(this!==this.#e)throw new Error("should only call on root");if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#G.pop();){if(e.type!=="!")continue;let I=e,l=I.#n;for(;l;){for(let n=I.#a+1;!l.type&&n<l.#l.length;n++)for(let c of e.#l){if(typeof c=="string")throw new Error("string part in extglob AST??");c.copyIn(l.#l[n])}I=l,l=I.#n}}return this}push(...e){for(let I of e)if(I!==""){if(typeof I!="string"&&!(I instanceof t&&I.#n===this))throw new Error("invalid part: "+I);this.#l.push(I)}}toJSON(){let e=this.type===null?this.#l.slice().map(I=>typeof I=="string"?I:I.toJSON()):[this.type,...this.#l.map(I=>I.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#n?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#n?.isStart())return!1;if(this.#a===0)return!0;let e=this.#n;for(let I=0;I<this.#a;I++){let l=e.#l[I];if(!(l instanceof t&&l.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#n?.type==="!")return!0;if(!this.#n?.isEnd())return!1;if(!this.type)return this.#n?.isEnd();let e=this.#n?this.#n.#l.length:0;return this.#a===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let I=new t(this.type,e);for(let l of this.#l)I.copyIn(l);return I}static#m(e,I,l,n){let c=!1,a=!1,s=-1,r=!1;if(I.type===null){let p=l,Z="";for(;p<e.length;){let u=e.charAt(p++);if(c||u==="\\"){c=!c,Z+=u;continue}if(a){p===s+1?(u==="^"||u==="!")&&(r=!0):u==="]"&&!(p===s+2&&r)&&(a=!1),Z+=u;continue}else if(u==="["){a=!0,s=p,r=!1,Z+=u;continue}if(!n.noext&&sUe(u)&&e.charAt(p)==="("){I.push(Z),Z="";let N=new t(u,I);p=t.#m(e,N,p,n),I.push(N);continue}Z+=u}return I.push(Z),p}let o=l+1,d=new t(null,I),i=[],h="";for(;o<e.length;){let p=e.charAt(o++);if(c||p==="\\"){c=!c,h+=p;continue}if(a){o===s+1?(p==="^"||p==="!")&&(r=!0):p==="]"&&!(o===s+2&&r)&&(a=!1),h+=p;continue}else if(p==="["){a=!0,s=o,r=!1,h+=p;continue}if(sUe(p)&&e.charAt(o)==="("){d.push(h),h="";let Z=new t(p,d);d.push(Z),o=t.#m(e,Z,o,n);continue}if(p==="|"){d.push(h),h="",i.push(d),d=new t(null,I);continue}if(p===")")return h===""&&I.#l.length===0&&(I.#i=!0),d.push(h),h="",I.push(...i,d),o;h+=p}return I.type=null,I.#I=void 0,I.#l=[e.substring(l-1)],o}static fromGlob(e,I={}){let l=new t(null,void 0,I);return t.#m(e,l,0,I),l}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[I,l,n,c]=this.toRegExpSource();if(!(n||this.#I||this.#o.nocase&&!this.#o.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return l;let s=(this.#o.nocase?"i":"")+(c?"u":"");return Object.assign(new RegExp(`^${I}$`,s),{_src:I,_glob:e})}get options(){return this.#o}toRegExpSource(e){let I=e??!!this.#o.dot;if(this.#e===this&&this.#c(),!this.type){let r=this.isStart()&&this.isEnd(),o=this.#l.map(p=>{let[Z,u,N,Y]=typeof p=="string"?t.#p(p,this.#I,r):p.toRegExpSource(e);return this.#I=this.#I||N,this.#t=this.#t||Y,Z}).join(""),d="";if(this.isStart()&&typeof this.#l[0]=="string"&&!(this.#l.length===1&&$LI.has(this.#l[0]))){let Z=_LI,u=I&&Z.has(o.charAt(0))||o.startsWith("\\.")&&Z.has(o.charAt(2))||o.startsWith("\\.\\.")&&Z.has(o.charAt(4)),N=!I&&!e&&Z.has(o.charAt(0));d=u?qLI:N?XP:""}let i="";return this.isEnd()&&this.#e.#s&&this.#n?.type==="!"&&(i="(?:$|\\/)"),[d+o+i,Fb(o),this.#I=!!this.#I,this.#t]}let l=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",c=this.#W(I);if(this.isStart()&&this.isEnd()&&!c&&this.type!=="!"){let r=this.toString();return this.#l=[r],this.type=null,this.#I=void 0,[r,Fb(this.toString()),!1,!1]}let a=!l||e||I||!XP?"":this.#W(!0);a===c&&(a=""),a&&(c=`(?:${c})(?:${a})*?`);let s="";if(this.type==="!"&&this.#i)s=(this.isStart()&&!I?XP:"")+GUe;else{let r=this.type==="!"?"))"+(this.isStart()&&!I&&!e?XP:"")+rUe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;s=n+c+r}return[s,Fb(c),this.#I=!!this.#I,this.#t]}#W(e){return this.#l.map(I=>{if(typeof I=="string")throw new Error("string type in extglob ast??");let[l,n,c,a]=I.toRegExpSource(e);return this.#t=this.#t||a,l}).filter(I=>!(this.isStart()&&this.isEnd())||!!I).join("|")}static#p(e,I,l=!1){let n=!1,c="",a=!1;for(let s=0;s<e.length;s++){let r=e.charAt(s);if(n){n=!1,c+=(e3I.has(r)?"\\":"")+r;continue}if(r==="\\"){s===e.length-1?c+="\\\\":n=!0;continue}if(r==="["){let[o,d,i,h]=aUe(e,s);if(i){c+=o,a=a||d,s+=i-1,I=I||h;continue}}if(r==="*"){l&&e==="*"?c+=GUe:c+=rUe,I=!0;continue}if(r==="?"){c+=cbe,I=!0;continue}c+=I3I(r)}return[c,Fb(e),!!I,a]}};G();var rE=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var Mr=(t,e,I={})=>(i9(e),!I.nocomment&&e.charAt(0)==="#"?!1:new _o(e,I).match(t)),t3I=/^\*+([^+@!?\*\[\(]*)$/,l3I=t=>e=>!e.startsWith(".")&&e.endsWith(t),n3I=t=>e=>e.endsWith(t),c3I=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),a3I=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),s3I=/^\*+\.\*+$/,r3I=t=>!t.startsWith(".")&&t.includes("."),G3I=t=>t!=="."&&t!==".."&&t.includes("."),o3I=/^\.\*+$/,d3I=t=>t!=="."&&t!==".."&&t.startsWith("."),i3I=/^\*+$/,b3I=t=>t.length!==0&&!t.startsWith("."),m3I=t=>t.length!==0&&t!=="."&&t!=="..",h3I=/^\?+([^+@!?\*\[\(]*)?$/,p3I=([t,e=""])=>{let I=iUe([t]);return e?(e=e.toLowerCase(),l=>I(l)&&l.toLowerCase().endsWith(e)):I},Z3I=([t,e=""])=>{let I=bUe([t]);return e?(e=e.toLowerCase(),l=>I(l)&&l.toLowerCase().endsWith(e)):I},u3I=([t,e=""])=>{let I=bUe([t]);return e?l=>I(l)&&l.endsWith(e):I},W3I=([t,e=""])=>{let I=iUe([t]);return e?l=>I(l)&&l.endsWith(e):I},iUe=([t])=>{let e=t.length;return I=>I.length===e&&!I.startsWith(".")},bUe=([t])=>{let e=t.length;return I=>I.length===e&&I!=="."&&I!==".."},mUe=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",oUe={win32:{sep:"\\"},posix:{sep:"/"}},N3I=mUe==="win32"?oUe.win32.sep:oUe.posix.sep;Mr.sep=N3I;var bs=Symbol("globstar **");Mr.GLOBSTAR=bs;var Y3I="[^/]",V3I=Y3I+"*?",R3I="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",y3I="(?:(?!(?:\\/|^)\\.).)*?",F3I=(t,e={})=>I=>Mr(I,t,e);Mr.filter=F3I;var ei=(t,e={})=>Object.assign({},t,e),g3I=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return Mr;let e=Mr;return Object.assign((l,n,c={})=>e(l,n,ei(t,c)),{Minimatch:class extends e.Minimatch{constructor(n,c={}){super(n,ei(t,c))}static defaults(n){return e.defaults(ei(t,n)).Minimatch}},AST:class extends e.AST{constructor(n,c,a={}){super(n,c,ei(t,a))}static fromGlob(n,c={}){return e.AST.fromGlob(n,ei(t,c))}},unescape:(l,n={})=>e.unescape(l,ei(t,n)),escape:(l,n={})=>e.escape(l,ei(t,n)),filter:(l,n={})=>e.filter(l,ei(t,n)),defaults:l=>e.defaults(ei(t,l)),makeRe:(l,n={})=>e.makeRe(l,ei(t,n)),braceExpand:(l,n={})=>e.braceExpand(l,ei(t,n)),match:(l,n,c={})=>e.match(l,n,ei(t,c)),sep:e.sep,GLOBSTAR:bs})};Mr.defaults=g3I;var hUe=(t,e={})=>(i9(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:nUe(t));Mr.braceExpand=hUe;var Q3I=(t,e={})=>new _o(t,e).makeRe();Mr.makeRe=Q3I;var A3I=(t,e,I={})=>{let l=new _o(e,I);return t=t.filter(n=>l.match(n)),l.options.nonull&&!t.length&&t.push(e),t};Mr.match=A3I;var dUe=/[?*]|[+@!]\(.*?\)|\[|\]/,w3I=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),_o=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,I={}){i9(e),I=I||{},this.options=I,this.pattern=e,this.platform=I.platform||mUe,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!I.windowsPathsNoEscape||I.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!I.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!I.nonegate,this.comment=!1,this.empty=!1,this.partial=!!I.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=I.windowsNoMagicRoot!==void 0?I.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let I of e)if(typeof I!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,I=this.options;if(!I.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],I.debug&&(this.debug=(...c)=>console.error(...c)),this.debug(this.pattern,this.globSet);let l=this.globSet.map(c=>this.slashSplit(c));this.globParts=this.preprocess(l),this.debug(this.pattern,this.globParts);let n=this.globParts.map((c,a,s)=>{if(this.isWindows&&this.windowsNoMagicRoot){let r=c[0]===""&&c[1]===""&&(c[2]==="?"||!dUe.test(c[2]))&&!dUe.test(c[3]),o=/^[a-z]:/i.test(c[0]);if(r)return[...c.slice(0,4),...c.slice(4).map(d=>this.parse(d))];if(o)return[c[0],...c.slice(1).map(d=>this.parse(d))]}return c.map(r=>this.parse(r))});if(this.debug(this.pattern,n),this.set=n.filter(c=>c.indexOf(!1)===-1),this.isWindows)for(let c=0;c<this.set.length;c++){let a=this.set[c];a[0]===""&&a[1]===""&&this.globParts[c][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let l=0;l<e.length;l++)for(let n=0;n<e[l].length;n++)e[l][n]==="**"&&(e[l][n]="*");let{optimizationLevel:I=1}=this.options;return I>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):I>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(I=>{let l=-1;for(;(l=I.indexOf("**",l+1))!==-1;){let n=l;for(;I[n+1]==="**";)n++;n!==l&&I.splice(l,n-l)}return I})}levelOneOptimize(e){return e.map(I=>(I=I.reduce((l,n)=>{let c=l[l.length-1];return n==="**"&&c==="**"?l:n===".."&&c&&c!==".."&&c!=="."&&c!=="**"?(l.pop(),l):(l.push(n),l)},[]),I.length===0?[""]:I))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let I=!1;do{if(I=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let c=e[n];n===1&&c===""&&e[0]===""||(c==="."||c==="")&&(I=!0,e.splice(n,1),n--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(I=!0,e.pop())}let l=0;for(;(l=e.indexOf("..",l+1))!==-1;){let n=e[l-1];n&&n!=="."&&n!==".."&&n!=="**"&&(I=!0,e.splice(l-1,2),l-=2)}}while(I);return e.length===0?[""]:e}firstPhasePreProcess(e){let I=!1;do{I=!1;for(let l of e){let n=-1;for(;(n=l.indexOf("**",n+1))!==-1;){let a=n;for(;l[a+1]==="**";)a++;a>n&&l.splice(n+1,a-n);let s=l[n+1],r=l[n+2],o=l[n+3];if(s!==".."||!r||r==="."||r===".."||!o||o==="."||o==="..")continue;I=!0,l.splice(n,1);let d=l.slice(0);d[n]="**",e.push(d),n--}if(!this.preserveMultipleSlashes){for(let a=1;a<l.length-1;a++){let s=l[a];a===1&&s===""&&l[0]===""||(s==="."||s==="")&&(I=!0,l.splice(a,1),a--)}l[0]==="."&&l.length===2&&(l[1]==="."||l[1]==="")&&(I=!0,l.pop())}let c=0;for(;(c=l.indexOf("..",c+1))!==-1;){let a=l[c-1];if(a&&a!=="."&&a!==".."&&a!=="**"){I=!0;let r=c===1&&l[c+1]==="**"?["."]:[];l.splice(c-1,2,...r),l.length===0&&l.push(""),c-=2}}}}while(I);return e}secondPhasePreProcess(e){for(let I=0;I<e.length-1;I++)for(let l=I+1;l<e.length;l++){let n=this.partsMatch(e[I],e[l],!this.preserveMultipleSlashes);if(n){e[I]=[],e[l]=n;break}}return e.filter(I=>I.length)}partsMatch(e,I,l=!1){let n=0,c=0,a=[],s="";for(;n<e.length&&c<I.length;)if(e[n]===I[c])a.push(s==="b"?I[c]:e[n]),n++,c++;else if(l&&e[n]==="**"&&I[c]===e[n+1])a.push(e[n]),n++;else if(l&&I[c]==="**"&&e[n]===I[c+1])a.push(I[c]),c++;else if(e[n]==="*"&&I[c]&&(this.options.dot||!I[c].startsWith("."))&&I[c]!=="**"){if(s==="b")return!1;s="a",a.push(e[n]),n++,c++}else if(I[c]==="*"&&e[n]&&(this.options.dot||!e[n].startsWith("."))&&e[n]!=="**"){if(s==="a")return!1;s="b",a.push(I[c]),n++,c++}else return!1;return e.length===I.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,I=!1,l=0;for(let n=0;n<e.length&&e.charAt(n)==="!";n++)I=!I,l++;l&&(this.pattern=e.slice(l)),this.negate=I}matchOne(e,I,l=!1){let n=this.options;if(this.isWindows){let u=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),N=!u&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),Y=typeof I[0]=="string"&&/^[a-z]:$/i.test(I[0]),y=!Y&&I[0]===""&&I[1]===""&&I[2]==="?"&&typeof I[3]=="string"&&/^[a-z]:$/i.test(I[3]),Q=N?3:u?0:void 0,A=y?3:Y?0:void 0;if(typeof Q=="number"&&typeof A=="number"){let[w,x]=[e[Q],I[A]];w.toLowerCase()===x.toLowerCase()&&(I[A]=w,A>Q?I=I.slice(A):Q>A&&(e=e.slice(Q)))}}let{optimizationLevel:c=1}=this.options;c>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:I}),this.debug("matchOne",e.length,I.length);for(var a=0,s=0,r=e.length,o=I.length;a<r&&s<o;a++,s++){this.debug("matchOne loop");var d=I[s],i=e[a];if(this.debug(I,d,i),d===!1)return!1;if(d===bs){this.debug("GLOBSTAR",[I,d,i]);var h=a,p=s+1;if(p===o){for(this.debug("** at the end");a<r;a++)if(e[a]==="."||e[a]===".."||!n.dot&&e[a].charAt(0)===".")return!1;return!0}for(;h<r;){var Z=e[h];if(this.debug(`
930
+ `),c=n[n.length-1].length+1,a=`error on line ${n.length} at column ${c}: ${I||"Unknown error"}`,s=this.rootNode.createElementNS(lt.html,"parsererror");s.setAttribute("style","display: block; white-space: pre; border: 2px solid #c77; padding: 0 1em 0 1em; margin: 1em; background-color: #fdd; color: black"),s.innerHTML=`<h3>This page contains the following errors:</h3><div style="font-family:monospace;font-size:12px">${a}</div><h3>Below is a rendering of the page up to the first error.</h3>`,l.insertBefore(s,l.firstChild)}removeOverflowingTextNodes(){if(this.currentNode&&this.currentNode!==this.rootNode)for(;this.currentNode.lastChild?.[se]===dI.TEXT_NODE;)this.currentNode.removeChild(this.currentNode.lastChild)}getDocumentType(e){if(!e.toUpperCase().startsWith("DOCTYPE"))return null;let I=e.split(Kk);if(I.length<=1)return null;let l=I.slice(1).join(" "),n=[],c=new RegExp(U4I,"gm"),a=l.toUpperCase().includes("PUBLIC"),s;for(;s=c.exec(l);)n.push(s[1]);let r=a&&n[0]||"",o=a?n[1]||"":n[0]||"";return{name:I[1].toLowerCase(),publicId:r,systemId:o}}};var TH=class{parseFromString(e,I){if(!I)throw new this[W].DOMException('Second parameter "mimeType" is mandatory.');let l=this[W];switch(I){case"text/html":let n=new l.HTMLDocument;return n[ks]=l,new ca(this[W]).parse(e,n);case"image/svg+xml":case"text/xml":case"application/xml":case"application/xhtml+xml":return new MH(this[W]).parse(e);default:throw new l.DOMException(`Unknown mime type "${I}".`)}}};G();G();var Bie;(function(t){t[t.endToEnd=2]="endToEnd",t[t.endToStart=3]="endToStart",t[t.startToEnd=1]="startToEnd",t[t.startToStart=0]="startToStart"})(Bie||(Bie={}));var yc=Bie;var jH=class{static END_TO_END=yc.endToEnd;static END_TO_START=yc.endToStart;static START_TO_END=yc.startToEnd;static START_TO_START=yc.startToStart;END_TO_END=yc.endToEnd;END_TO_START=yc.endToStart;START_TO_END=yc.startToEnd;START_TO_START=yc.startToStart;[re];[ue];[O];constructor(){let e=this[W];if(!e)throw new TypeError(`Failed to construct '${this.constructor.name}': '${this.constructor.name}' was constructed outside a Window context.`);this[O]=e.document,this[re]={node:e.document,offset:0},this[ue]={node:e.document,offset:0}}get startContainer(){return this[re].node}get endContainer(){return this[ue].node}get startOffset(){if(this[re].offset>0){let e=pI.getNodeLength(this[re].node);this[re].offset>e&&(this[re].offset=e)}return this[re].offset}get endOffset(){if(this[ue].offset>0){let e=pI.getNodeLength(this[ue].node);this[ue].offset>e&&(this[ue].offset=e)}return this[ue].offset}get collapsed(){return this[re].node===this[ue].node&&this.startOffset===this.endOffset}get commonAncestorContainer(){let e=this[re].node;for(;e;){if(pI.isInclusiveAncestor(e,this[ue].node))return e;e=e[he]}return null}collapse(e=!1){e?this[ue]=Object.assign({},this[re]):this[re]=Object.assign({},this[ue])}compareBoundaryPoints(e,I){if(e!==yc.startToStart&&e!==yc.startToEnd&&e!==yc.endToEnd&&e!==yc.endToStart)throw new this[W].DOMException(`The comparison method provided must be one of '${yc.startToStart}', '${yc.startToEnd}', '${yc.endToEnd}' or '${yc.endToStart}'.`,B.notSupportedError);if(this[O]!==I[O])throw new this[W].DOMException("The two Ranges are not in the same tree.",B.wrongDocumentError);let l={node:null,offset:0},n={node:null,offset:0};switch(e){case yc.startToStart:l.node=this[re].node,l.offset=this.startOffset,n.node=I[re].node,n.offset=I.startOffset;break;case yc.startToEnd:l.node=this[ue].node,l.offset=this.endOffset,n.node=I[re].node,n.offset=I.startOffset;break;case yc.endToEnd:l.node=this[ue].node,l.offset=this.endOffset,n.node=I[ue].node,n.offset=I.endOffset;break;case yc.endToStart:l.node=this[re].node,l.offset=this.startOffset,n.node=I[ue].node,n.offset=I.endOffset;break}return ll.compareBoundaryPointsPosition(l,n)}comparePoint(e,I){if(e[O]!==this[O])throw new this[W].DOMException("The two Ranges are not in the same tree.",B.wrongDocumentError);ll.validateBoundaryPoint({node:e,offset:I});let l={node:e,offset:I};return ll.compareBoundaryPointsPosition(l,{node:this[re].node,offset:this.startOffset})===-1?-1:ll.compareBoundaryPointsPosition(l,{node:this[ue].node,offset:this.endOffset})===1?1:0}cloneContents(){let e=this[W],I=this[O].createDocumentFragment(),l=this.startOffset,n=this.endOffset;if(this.collapsed)return I;if(this[re].node===this[ue].node&&(this[re].node[se]===D.textNode||this[re].node[se]===D.processingInstructionNode||this[re].node[se]===D.commentNode)){let o=this[re].node.cloneNode(!1);return o[ft]=o.substringData(l,n-l),I.appendChild(o),I}let c=this[re].node;for(;!pI.isInclusiveAncestor(c,this[ue].node);)c=c[he];let a=null;if(!pI.isInclusiveAncestor(this[re].node,this[ue].node)){let o=c.firstChild;for(;!a;)ll.isPartiallyContained(o,this)&&(a=o),o=o.nextSibling}let s=null;if(!pI.isInclusiveAncestor(this[ue].node,this[re].node)){let o=c.lastChild;for(;!s;)ll.isPartiallyContained(o,this)&&(s=o),o=o.previousSibling}let r=[];for(let o of c[be])if(ll.isContained(o,this)){if(o[se]===D.documentTypeNode)throw new e.DOMException("Invalid document type element.",B.hierarchyRequestError);r.push(o)}if(a!==null&&(a[se]===D.textNode||a[se]===D.processingInstructionNode||a[se]===D.commentNode)){let o=this[re].node.cloneNode(!1);o[ft]=o.substringData(l,pI.getNodeLength(this[re].node)-l),I.appendChild(o)}else if(a!==null){let o=a.cloneNode();I.appendChild(o);let d=new e.Range;d[re].node=this[re].node,d[re].offset=l,d[ue].node=a,d[ue].offset=pI.getNodeLength(a);let i=d.cloneContents();o.appendChild(i)}for(let o of r){let d=o.cloneNode(!0);I.appendChild(d)}if(s!==null&&(s[se]===D.textNode||s[se]===D.processingInstructionNode||s[se]===D.commentNode)){let o=this[ue].node.cloneNode(!1);o[ft]=o.substringData(0,n),I.appendChild(o)}else if(s!==null){let o=s.cloneNode(!1);I.appendChild(o);let d=new e.Range;d[re].node=s,d[re].offset=0,d[ue].node=this[ue].node,d[ue].offset=n;let i=d.cloneContents();o.appendChild(i)}return I}cloneRange(){let e=new this[W].Range;return e[re].node=this[re].node,e[re].offset=this[re].offset,e[ue].node=this[ue].node,e[ue].offset=this[ue].offset,e}createContextualFragment(e){return new ca(this[W]).parse(e)}deleteContents(){let e=this.startOffset,I=this.endOffset;if(this.collapsed)return;if(this[re].node===this[ue].node&&(this[re].node[se]===D.textNode||this[re].node[se]===D.processingInstructionNode||this[re].node[se]===D.commentNode)){this[re].node.replaceData(e,I-e,"");return}let l=[],n=this[re].node,c=pI.nextDescendantNode(this[ue].node);for(;n&&n!==c;)ll.isContained(n,this)&&!ll.isContained(n[he],this)&&l.push(n),n=pI.following(n);let a,s;if(pI.isInclusiveAncestor(this[re].node,this[ue].node))a=this[re].node,s=e;else{let r=this[re].node;for(;r&&!pI.isInclusiveAncestor(r[he],this[ue].node);)r=r[he];a=r[he],s=r[he][be].indexOf(r)+1}(this[re].node[se]===D.textNode||this[re].node[se]===D.processingInstructionNode||this[re].node[se]===D.commentNode)&&this[re].node.replaceData(this.startOffset,pI.getNodeLength(this[re].node)-this.startOffset,"");for(let r of l)r[he].removeChild(r);(this[ue].node[se]===D.textNode||this[ue].node[se]===D.processingInstructionNode||this[ue].node[se]===D.commentNode)&&this[ue].node.replaceData(0,I,""),this[re].node=a,this[re].offset=s,this[ue].node=a,this[ue].offset=s}detach(){}extractContents(){let e=this[W],I=this[O].createDocumentFragment(),l=this.startOffset,n=this.endOffset;if(this.collapsed)return I;if(this[re].node===this[ue].node&&(this[re].node[se]===D.textNode||this[re].node[se]===D.processingInstructionNode||this[re].node[se]===D.commentNode)){let i=this[re].node.cloneNode(!1);return i[ft]=i.substringData(l,n-l),I.appendChild(i),this[re].node.replaceData(l,n-l,""),I}let c=this[re].node;for(;!pI.isInclusiveAncestor(c,this[ue].node);)c=c[he];let a=null;if(!pI.isInclusiveAncestor(this[re].node,this[ue].node)){let i=c.firstChild;for(;!a;)ll.isPartiallyContained(i,this)&&(a=i),i=i.nextSibling}let s=null;if(!pI.isInclusiveAncestor(this[ue].node,this[re].node)){let i=c.lastChild;for(;!s;)ll.isPartiallyContained(i,this)&&(s=i),i=i.previousSibling}let r=[];for(let i of c[be])if(ll.isContained(i,this)){if(i[se]===D.documentTypeNode)throw new this[W].DOMException("Invalid document type element.",B.hierarchyRequestError);r.push(i)}let o,d;if(pI.isInclusiveAncestor(this[re].node,this[ue].node))o=this[re].node,d=l;else{let i=this[re].node;for(;i&&!pI.isInclusiveAncestor(i[he],this[ue].node);)i=i[he];o=i[he],d=i[he][be].indexOf(i)+1}if(a!==null&&(a[se]===D.textNode||a[se]===D.processingInstructionNode||a[se]===D.commentNode)){let i=this[re].node.cloneNode(!1);i[ft]=i.substringData(l,pI.getNodeLength(this[re].node)-l),I.appendChild(i),this[re].node.replaceData(l,pI.getNodeLength(this[re].node)-l,"")}else if(a!==null){let i=a.cloneNode(!1);I.appendChild(i);let h=new e.Range;h[re].node=this[re].node,h[re].offset=l,h[ue].node=a,h[ue].offset=pI.getNodeLength(a);let p=h.extractContents();i.appendChild(p)}for(let i of r)I.appendChild(i);if(s!==null&&(s[se]===D.textNode||s[se]===D.processingInstructionNode||s[se]===D.commentNode)){let i=this[ue].node.cloneNode(!1);i[ft]=i.substringData(0,n),I.appendChild(i),this[ue].node.replaceData(0,n,"")}else if(s!==null){let i=s.cloneNode(!1);I.appendChild(i);let h=new e.Range;h[re].node=s,h[re].offset=0,h[ue].node=this[ue].node,h[ue].offset=n;let p=h.extractContents();i.appendChild(p)}return this[re].node=o,this[re].offset=d,this[ue].node=o,this[ue].offset=d,I}getBoundingClientRect(){return new Dd}getClientRects(){return new n0(V)}isPointInRange(e,I=0){if(e[O]!==this[O])return!1;let l={node:e,offset:I};return ll.validateBoundaryPoint(l),!(ll.compareBoundaryPointsPosition(l,{node:this[re].node,offset:this.startOffset})===-1||ll.compareBoundaryPointsPosition(l,{node:this[ue].node,offset:this.endOffset})===1)}insertNode(e){if(this[re].node[se]===D.processingInstructionNode||this[re].node[se]===D.commentNode||this[re].node[se]===D.textNode&&!this[re].node[he]||e===this[re].node)throw new this[W].DOMException("Invalid start node.",B.hierarchyRequestError);let I=this[re].node[se]===D.textNode?this[re].node:this[re].node[be][this.startOffset]||null,l=I?I[he]:this[re].node;this[re].node[se]===D.textNode&&(I=this[re].node.splitText(this.startOffset)),e===I&&(I=I.nextSibling);let n=e[he];n&&n.removeChild(e);let c=I?I[he][be].indexOf(I):pI.getNodeLength(l);c+=e[se]===D.documentFragmentNode?pI.getNodeLength(e):1,l.insertBefore(e,I),this.collapsed&&(this[ue].node=l,this[ue].offset=c)}intersectsNode(e){if(e[O]!==this[O])return!1;let I=e[he];if(!I)return!0;let l=I[be].indexOf(e);return ll.compareBoundaryPointsPosition({node:I,offset:l},{node:this[ue].node,offset:this.endOffset})===-1&&ll.compareBoundaryPointsPosition({node:I,offset:l+1},{node:this[re].node,offset:this.startOffset})===1}selectNode(e){if(!e[he])throw new this[W].DOMException("The given Node has no parent.",B.invalidNodeTypeError);let I=e[he][be].indexOf(e);this[re].node=e[he],this[re].offset=I,this[ue].node=e[he],this[ue].offset=I+1}selectNodeContents(e){if(e[se]===D.documentTypeNode)throw new this[W].DOMException("DocumentType Node can't be used as boundary point.",B.invalidNodeTypeError);this[re].node=e,this[re].offset=0,this[ue].node=e,this[ue].offset=pI.getNodeLength(e)}setEnd(e,I=0){ll.validateBoundaryPoint({node:e,offset:I});let l={node:e,offset:I};(e[O]!==this[O]||ll.compareBoundaryPointsPosition(l,{node:this[re].node,offset:this.startOffset})===-1)&&(this[re].node=e,this[re].offset=I),this[ue].node=e,this[ue].offset=I}setStart(e,I=0){ll.validateBoundaryPoint({node:e,offset:I});let l={node:e,offset:I};(e[O]!==this[O]||ll.compareBoundaryPointsPosition(l,{node:this[ue].node,offset:this.endOffset})===1)&&(this[ue].node=e,this[ue].offset=I),this[re].node=e,this[re].offset=I}setEndAfter(e){if(!e[he])throw new this[W].DOMException("The given Node has no parent.",B.invalidNodeTypeError);this.setEnd(e[he],e[he][be].indexOf(e)+1)}setEndBefore(e){if(!e[he])throw new this[W].DOMException("The given Node has no parent.",B.invalidNodeTypeError);this.setEnd(e[he],e[he][be].indexOf(e))}setStartAfter(e){if(!e[he])throw new this[W].DOMException("The given Node has no parent.",B.invalidNodeTypeError);this.setStart(e[he],e[he][be].indexOf(e)+1)}setStartBefore(e){if(!e[he])throw new this[W].DOMException("The given Node has no parent.",B.invalidNodeTypeError);this.setStart(e[he],e[he][be].indexOf(e))}surroundContents(e){let I=this.commonAncestorContainer;if(!I)return;let l=pI.nextDescendantNode(I);for(;I&&I!==l;){if(I[se]!==D.textNode&&ll.isPartiallyContained(I,this))throw new this[W].DOMException("The Range has partially contains a non-Text node.",B.invalidStateError);I=pI.following(I)}if(e[se]===D.documentNode||e[se]===D.documentTypeNode||e[se]===D.documentFragmentNode)throw new this[W].DOMException("Invalid element type.",B.invalidNodeTypeError);let n=this.extractContents();for(;e.firstChild;)e.removeChild(e.firstChild);this.insertNode(e),e.appendChild(n),this.selectNode(e)}toString(){let e=this.startOffset,I=this.endOffset,l="";if(this[re].node===this[ue].node&&this[re].node[se]===D.textNode)return this[re].node.data.slice(e,I);this[re].node[se]===D.textNode&&(l+=this[re].node.data.slice(e));let n=pI.nextDescendantNode(this[ue].node),c=this[re].node;for(;c&&c!==n;)c[se]===D.textNode&&ll.isContained(c,this)&&(l+=c.data),c=pI.following(c);return this[ue].node[se]===D.textNode&&(l+=this[ue].node.data.slice(0,I)),l}};G();G();var DY=class extends tt{id="";startTime=0;endTime=0;pauseOnExit=!1;[$w]=null;onenter=null;onexit=null;constructor(e){if(super(),e!==V)throw new TypeError("Illegal constructor");if(!this[W])throw new TypeError(`Failed to construct '${this.constructor.name}': '${this.constructor.name}' was constructed outside a Window context.`)}get track(){return this[$w]}};var DH=class extends DY{region=null;vertical="";snapToLines=!0;line=0;lineAlign="";position="auto";positionAlign="auto";size=100;align="";text="";constructor(e,I,l){super(V);let n=this[W],c=0;if(e!==void 0&&c++,I!==void 0&&c++,l!==void 0&&c++,c<3)throw new n.TypeError(`Failed to construct 'VTTCue': 3 arguments required, but only ${c} present.`);if(e=Number(e),I=Number(I),isNaN(e)||isNaN(I))throw new n.TypeError("Failed to construct 'VTTCue': The provided double value is non-finite.");this.startTime=e,this.endTime=I,this.text=String(l)}getCueAsHTML(){let e=this[W],I=e.document.createDocumentFragment();return I.appendChild(e.document.createTextNode(this.text)),I}};G();var KH=class extends tt{[HG]=fh.subtitles;[zZ]="";[Cy]="";[PL]="";[Bl]="disabled";[vy]=new iu(V);[qde]=new iu(V);oncuechange=null;constructor(e){if(super(),e!==V)throw new TypeError("Illegal constructor");if(!this[W])throw new TypeError(`Failed to construct '${this.constructor.name}': '${this.constructor.name}' was constructed outside a Window context.`)}get kind(){return this[HG]}get label(){return this[zZ]}get language(){return this[Cy]}get id(){return this[PL]}get mode(){return this[Bl]}set mode(e){e!=="disabled"&&e!=="showing"||(this[Bl]=e)}get cues(){return this[Bl]==="disabled"?null:this[vy]}get activeCues(){return this[Bl]==="disabled"?null:this[qde]}addCue(e){this[vy].includes(e)||(e[$w]=this,this[vy].push(e))}removeCue(e){let I=this[vy].indexOf(e);I!==-1&&(e[$w]=null,this[vy].splice(I,1))}};G();var PH=class t extends tt{[Ye]=[];onaddtrack=null;onchange=null;onremovetrack=null;constructor(e,I){if(super(),e!==V)throw new TypeError("Illegal constructor");this[Ye]=I;let l=new Zl(this,[t,tt]);return new Proxy(this,{get:(n,c)=>{if(c==="length")return I.length;if(c in n||typeof c=="symbol")return l.bind(c),n[c];let a=Number(c);if(!isNaN(a))return I[a]},set(n,c,a){if(l.bind(c),typeof c=="symbol")return n[c]=a,!0;let s=Number(c);return isNaN(s)&&(n[c]=a),!0},deleteProperty(n,c){if(typeof c=="symbol")return delete n[c],!0;let a=Number(c);return isNaN(a)&&delete n[c],!0},ownKeys(){return Object.keys(I)},has(n,c){if(c in n)return!0;if(typeof c=="symbol")return!1;let a=Number(c);return!isNaN(a)&&a>=0&&a<I.length},defineProperty(n,c,a){return l.preventBinding(c),c in n?(Object.defineProperty(n,c,a),!0):!1},getOwnPropertyDescriptor(n,c){if(c in n||typeof c=="symbol")return;let a=Number(c);if(!isNaN(a)&&I[a])return{value:I[a],writable:!1,enumerable:!0,configurable:!0}}})}get length(){return this[Ye].length}get[Symbol.toStringTag](){return"TextTrackList"}toLocaleString(){return"[object TextTrackList]"}toString(){return"[object TextTrackList]"}[Symbol.iterator](){return this[Ye][Symbol.iterator]()}getTrackById(e){for(let I of this[Ye])if(I.id===e)return I;return null}};G();var qH=class extends tt{[_de]="disconnected";onconnecting=null;onconnect=null;ondisconnect=null;get state(){return this[_de]}async watchAvailability(){}cancelWatchAvailability(){}prompt(){}};G();var Bze=Gn(xze(),1);G();var Sie;(function(t){t[t.empty=0]="empty",t[t.loading=1]="loading",t[t.done=2]="done"})(Sie||(Sie={}));var mu=Sie;G();var Oie;(function(t){t.buffer="buffer",t.binaryString="binaryString",t.dataURL="dataURL",t.text="text"})(Oie||(Oie={}));var hu=Oie;G();var Mie;(function(t){t.abort="abort",t.error="error",t.load="load",t.loadstart="loadstart",t.loadend="loadend",t.progress="progress"})(Mie||(Mie={}));var p0=Mie;import{Buffer as ILI}from"buffer";var _H=class extends tt{error=null;result=null;readyState=mu.empty;onabort=null;onerror=null;onload=null;onloadstart=null;onloadend=null;onprogress=null;#e=!1;#I=null;#t=null;constructor(){if(super(),!this[W])throw new TypeError(`Failed to construct '${this.constructor.name}': '${this.constructor.name}' was constructed outside a Window context.`)}readAsArrayBuffer(e){if(!(e instanceof al))throw new this[W].TypeError("Failed to execute 'readAsArrayBuffer' on 'FileReader': parameter 1 is not of type 'Blob'.");this.#l(e,hu.buffer)}readAsBinaryString(e){if(!(e instanceof al))throw new this[W].TypeError("Failed to execute 'readAsBinaryString' on 'FileReader': parameter 1 is not of type 'Blob'.");this.#l(e,hu.binaryString)}readAsDataURL(e){if(!(e instanceof al))throw new this[W].TypeError("Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'.");this.#l(e,hu.dataURL)}readAsText(e,I=null){if(!(e instanceof al))throw new this[W].TypeError("Failed to execute 'readAsText' on 'FileReader': parameter 1 is not of type 'Blob'.");this.#l(e,hu.text,I||"UTF-8")}abort(){let e=this[W];if(this.#I&&e.clearTimeout(this.#I),this.#t&&e.clearTimeout(this.#t),this.readyState===mu.empty||this.readyState===mu.done){this.result=null;return}this.readyState===mu.loading&&(this.readyState=mu.done,this.result=null),this.#e=!0,this.dispatchEvent(new kr(p0.abort)),this.dispatchEvent(new kr(p0.loadend))}#l(e,I,l=null){let n=this[W];if(this.readyState===mu.loading)throw new n.DOMException("The object is in an invalid state.",B.invalidStateError);this.readyState=mu.loading,this.#I=n.setTimeout(()=>{if(this.#e){this.#e=!1;return}this.dispatchEvent(new kr(p0.loadstart));let c=e[$I];c||(c=ILI.alloc(0)),this.dispatchEvent(new kr(p0.loadstart,{lengthComputable:!isNaN(e.size),total:e.size,loaded:c.length})),this.#t=n.setTimeout(()=>{if(this.#e){this.#e=!1;return}switch(I){default:case hu.buffer:{this.result=new Uint8Array(c).buffer;break}case hu.binaryString:{this.result=c.toString("binary");break}case hu.dataURL:{let a=Bze.default.parse(e.type)||"application/octet-stream";this.result=`data:${a};base64,${c.toString("base64")}`;break}case hu.text:{this.result=new TextDecoder(l||"UTF-8").decode(c);break}}this.readyState=mu.done,this.dispatchEvent(new kr(p0.load)),this.dispatchEvent(new kr(p0.loadend))})})}};G();import tLI from"crypto";var lLI={aspectRatio:{max:300,min:.006666666666666667},deviceId:"",facingMode:[],frameRate:{max:60,min:0},height:{max:150,min:1},resizeMode:["none","crop-and-scale"],width:{max:300,min:1}},nLI={deviceId:"",frameRate:60,resizeMode:"none"},PY=class extends tt{contentHint="";enabled=!0;id=tLI.randomUUID();muted=!1;readyState="live";label="";[zZ]="";[HG]="video";[qw]={};[cb]=JSON.parse(JSON.stringify(lLI));[nY]=JSON.parse(JSON.stringify(nLI));onended=null;onmute=null;onunmute=null;constructor(e){if(super(),e!==V)throw new TypeError("Illegal constructor");if(!this[W])throw new TypeError(`Failed to construct '${this.constructor.name}': '${this.constructor.name}' was constructed outside a Window context.`)}get kind(){return this[HG]}async applyConstraints(e){this.#e(this[qw],e)}getConstraints(){return this[qw]}getCapabilities(){return this[cb]}getSettings(){return this[nY]}clone(){let e=new this.constructor(V);return e[HG]=this[HG],e[qw]=this[qw],e[cb]=this[cb],e[nY]=this[nY],e.contentHint=this.contentHint,e.enabled=this.enabled,e.label=this.label,e.muted=this.muted,e.readyState=this.readyState,e}stop(){this.readyState="ended"}#e(e,I){for(let l in I)I[l]!==null&&typeof I[l]=="object"&&!Array.isArray(I[l])?(typeof e[l]!="object"&&(e[l]={}),this.#e(e[l],I[l])):e[l]=I[l]}};G();var qk=class extends PY{[qL];constructor(e,I){super(e),this[qL]=I}get canvas(){return this[qL]}requestFrame(){}clone(){let e=super.clone();return e[qL]=this.canvas,e}};var _k=class{static extendClasses(e){class I extends zr{}I.prototype[W]=e,e.Document=I;class l extends vH{}l.prototype[W]=e,e.HTMLDocument=l;class n extends CH{}n.prototype[W]=e,e.XMLDocument=n;class c extends TY{}c.prototype[W]=e,e.DocumentFragment=c;class a extends JH{}a.prototype[W]=e,e.Text=a;class s extends LH{}s.prototype[W]=e,e.Comment=s;class r extends kH{}r.prototype[W]=e,e.Image=r;class o extends Ok{}o.prototype[W]=e,e.Audio=o;class d extends fH{}d.prototype[W]=e,e.MutationObserver=d;class i extends Tk{}i.prototype[W]=e,e.MessagePort=i;class h extends BH{}h.prototype[W]=e,e.CSSStyleSheet=h;class p extends It{}e.DOMException=p;class Z extends EY{}Z.prototype[W]=e,e.Request=Z;class u extends fr{}u.prototype[W]=e,u[W]=e,e.Response=u;class N extends tt{}N.prototype[W]=e,e.EventTarget=N;class Y extends jk{}Y.prototype[W]=e,e.XMLHttpRequestUpload=Y;class y extends bu{}y.prototype[W]=e,e.XMLHttpRequestEventTarget=y;class Q extends zH{}Q.prototype[W]=e,e.AbortController=Q;class A extends UH{}A.prototype[W]=e,A[W]=e,e.AbortSignal=A;class w extends XY{}w.prototype[W]=e,e.FormData=w;class x extends SH{}x.prototype[W]=e,e.PermissionStatus=x;class C extends Dk{}C.prototype[W]=e,e.XMLHttpRequest=C;class H extends TH{}H.prototype[W]=e,e.DOMParser=H;class J extends jH{}J.prototype[W]=e,e.Range=J;class f extends DH{}f.prototype[W]=e,e.VTTCue=f;class S extends KH{}S.prototype[W]=e,e.TextTrack=S;class te extends PH{}te.prototype[W]=e,e.TextTrackList=te;class oe extends DY{}oe.prototype[W]=e,e.TextTrackCue=oe;class Fe extends qH{}Fe.prototype[W]=e,e.RemotePlayback=Fe;class ye extends _H{}ye.prototype[W]=e,e.FileReader=ye;class Ee extends kY{}Ee.prototype[W]=e,e.MediaStream=Ee;class Qe extends PY{}Qe.prototype[W]=e,e.MediaStreamTrack=Qe;class Ne extends qk{}Ne.prototype[W]=e,e.CanvasCaptureMediaStreamTrack=Ne;class uI extends Kl{}uI.prototype[W]=e,e.URL=uI}};G();G();G();G();G();G();var $k=class{[P]=0;[q]=0;[as]=0;[Jy]=1;constructor(e,I,l,n){this[P]=e!=null?Number(e):0,this[q]=I!=null?Number(I):0,this[as]=l!=null?Number(l):0,this[Jy]=n!=null?Number(n):1}get x(){return this[P]}get y(){return this[q]}get z(){return this[as]}get w(){return this[Jy]}toJSON(){return{x:this.x,y:this.y,z:this.z,w:this.w}}static fromPoint(e){return e?new this(e.x??null,e.y??null,e.z??null,e.w??null):new this}};var Z0=class extends $k{set x(e){this[P]=e}get x(){return this[P]}set y(e){this[q]=e}get y(){return this[q]}set z(e){this[as]=e}get z(){return this[as]}set w(e){this[Jy]=e}get w(){return this[Jy]}};var $H={a:1,b:0,c:0,d:1,e:0,f:0,m11:1,m12:0,m13:0,m14:0,m21:0,m22:1,m23:0,m24:0,m31:0,m32:0,m33:1,m34:0,m41:0,m42:0,m43:0,m44:1,is2D:!0,isIdentity:!0},cLI=/([a-zA-Z0-9]+)\(([^)]+)\)/gm,aLI=/[\s,]+/,u0=class t{[OI]=1;[KI]=0;[At]=0;[wt]=0;[MI]=0;[PI]=1;[Xt]=0;[Ht]=0;[ot]=0;[Nt]=0;[Yt]=1;[dt]=0;[TI]=0;[qI]=0;[Vt]=0;[Rt]=1;constructor(e){e&&this[eX](e)}get a(){return this[OI]}get b(){return this[KI]}get c(){return this[MI]}get d(){return this[PI]}get e(){return this[TI]}get f(){return this[qI]}get m11(){return this[OI]}get m12(){return this[KI]}get m13(){return this[At]}get m14(){return this[wt]}get m21(){return this[MI]}get m22(){return this[PI]}get m23(){return this[Xt]}get m24(){return this[Ht]}get m31(){return this[ot]}get m32(){return this[Nt]}get m33(){return this[Yt]}get m34(){return this[dt]}get m41(){return this[TI]}get m42(){return this[qI]}get m43(){return this[Vt]}get m44(){return this[Rt]}get isIdentity(){return this[OI]===1&&this[KI]===0&&this[At]===0&&this[wt]===0&&this[MI]===0&&this[PI]===1&&this[Xt]===0&&this[Ht]===0&&this[ot]===0&&this[Nt]===0&&this[Yt]===1&&this[dt]===0&&this[TI]===0&&this[qI]===0&&this[Vt]===0&&this[Rt]===1}get is2D(){return this[ot]===0&&this[Nt]===0&&this[Yt]===1&&this[dt]===0&&this[Vt]===0&&this[Rt]===1}toFloat32Array(e){return Float32Array.from(this[g3](e))}toFloat64Array(e){return Float64Array.from(this[g3](e))}toString(){let e=this.is2D,I=this[g3](e).join(", ");return`${e?"matrix":"matrix3d"}(${I})`}toJSON(){let{is2D:e,isIdentity:I}=this;return{m11:this[OI],m12:this[KI],m13:this[At],m14:this[wt],m21:this[MI],m22:this[PI],m23:this[Xt],m24:this[Ht],m31:this[ot],m32:this[Nt],m33:this[Yt],m34:this[dt],m41:this[TI],m42:this[qI],m43:this[Vt],m44:this[Rt],a:this[OI],b:this[KI],c:this[MI],d:this[PI],e:this[TI],f:this[qI],is2D:e,isIdentity:I}}multiply(e){let I=new this.constructor(this);return I[CG](e),I}translate(e=0,I=0,l=0){let n=new this.constructor(this);return n[vG](e,I,l),n}scale(e,I,l=1,n=0,c=0,a=0){let s=new this.constructor(this);return s[Nh](e,I,l,n,c,a),s}scale3d(e=1,I=0,l=0,n=0){let c=new this.constructor(this);return c[Q3](e,I,l,n),c}scaleNonUniform(e=1,I=1){let l=new this.constructor(this);return l[A3](e,I),l}rotateAxisAngle(e=0,I=0,l=0,n=0){let c=new this.constructor(this);return c[OZ](e,I,l,n),c}rotate(e=0,I,l){let n=new this.constructor(this);return n[SZ](e,I,l),n}rotateFromVector(e=0,I=0){let l=new this.constructor(this);return l[Gk](e,I),l}skewX(e){let I=new this.constructor(this);return I[ky](e),I}skewY(e){let I=new this.constructor(this);return I[fy](e),I}flipX(){let e=new this.constructor(this);return e[ok](),e}flipY(){let e=new this.constructor(this);return e[dk](),e}inverse(){let e=new this.constructor(this);return e[ik](),e}transformPoint(e){let I=e.x??0,l=e.y??0,n=e.z??0,c=e.w??1,a=this[OI]*I+this[MI]*l+this[ot]*n+this[TI]*c,s=this[KI]*I+this[PI]*l+this[Nt]*n+this[qI]*c,r=this[At]*I+this[Xt]*l+this[Yt]*n+this[Vt]*c,o=this[wt]*I+this[Ht]*l+this[dt]*n+this[Rt]*c;return new Z0(a,s,r,o)}[eX](e){let I=null;if(typeof e=="string"&&e.length&&e!=="none")I=this.constructor[Ly](e);else if(Array.isArray(e)||e instanceof Float64Array||e instanceof Float32Array)I=this.constructor[EG](e);else if(typeof e=="object")I=this.constructor.fromMatrix(e);else return;this[OI]=I[OI],this[KI]=I[KI],this[At]=I[At],this[wt]=I[wt],this[MI]=I[MI],this[PI]=I[PI],this[Xt]=I[Xt],this[Ht]=I[Ht],this[ot]=I[ot],this[Nt]=I[Nt],this[Yt]=I[Yt],this[dt]=I[dt],this[TI]=I[TI],this[qI]=I[qI],this[Vt]=I[Vt],this[Rt]=I[Rt]}[CG](e){let I=e;I instanceof t||(I?.m11===void 0&&I?.a!==void 0?(I=Object.assign({},$H,I),I.m11=I.a,I.m12=I.b,I.m21=I.c,I.m22=I.d,I.m41=I.e,I.m42=I.f):I=Object.assign({},$H,I));let l=this[OI]*I.m11+this[MI]*I.m12+this[ot]*I.m13+this[TI]*I.m14,n=this[OI]*I.m21+this[MI]*I.m22+this[ot]*I.m23+this[TI]*I.m24,c=this[OI]*I.m31+this[MI]*I.m32+this[ot]*I.m33+this[TI]*I.m34,a=this[OI]*I.m41+this[MI]*I.m42+this[ot]*I.m43+this[TI]*I.m44,s=this[KI]*I.m11+this[PI]*I.m12+this[Nt]*I.m13+this[qI]*I.m14,r=this[KI]*I.m21+this[PI]*I.m22+this[Nt]*I.m23+this[qI]*I.m24,o=this[KI]*I.m31+this[PI]*I.m32+this[Nt]*I.m33+this[qI]*I.m34,d=this[KI]*I.m41+this[PI]*I.m42+this[Nt]*I.m43+this[qI]*I.m44,i=this[At]*I.m11+this[Xt]*I.m12+this[Yt]*I.m13+this[Vt]*I.m14,h=this[At]*I.m21+this[Xt]*I.m22+this[Yt]*I.m23+this[Vt]*I.m24,p=this[At]*I.m31+this[Xt]*I.m32+this[Yt]*I.m33+this[Vt]*I.m34,Z=this[At]*I.m41+this[Xt]*I.m42+this[Yt]*I.m43+this[Vt]*I.m44,u=this[wt]*I.m11+this[Ht]*I.m12+this[dt]*I.m13+this[Rt]*I.m14,N=this[wt]*I.m21+this[Ht]*I.m22+this[dt]*I.m23+this[Rt]*I.m24,Y=this[wt]*I.m31+this[Ht]*I.m32+this[dt]*I.m33+this[Rt]*I.m34,y=this[wt]*I.m41+this[Ht]*I.m42+this[dt]*I.m43+this[Rt]*I.m44;this[OI]=l,this[KI]=s,this[At]=i,this[wt]=u,this[MI]=n,this[PI]=r,this[Xt]=h,this[Ht]=N,this[ot]=c,this[Nt]=o,this[Yt]=p,this[dt]=Y,this[TI]=a,this[qI]=d,this[Vt]=Z,this[Rt]=y}[vG](e=0,I=0,l=0){let n=this.constructor[EG]([1,0,0,0,0,1,0,0,0,0,1,0,e,I,l,1]);this[CG](n)}[Nh](e,I,l=1,n=0,c=0,a=0){e=e===void 0?1:Number(e),I=I===void 0?e:Number(I),(n!==0||c!==0||a!==0)&&this[vG](n,c,a),(e!==1||I!==1||l!==1)&&this[CG](this.constructor[EG]([e,0,0,0,0,I,0,0,0,0,l,0,0,0,0,1])),(n!==0||c!==0||a!==0)&&this[vG](-n,-c,-a)}[Q3](e=1,I=0,l=0,n=0){(I!==0||l!==0||n!==0)&&this[vG](I,l,n),e!==1&&this[CG](this.constructor[EG]([e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1])),(I!==0||l!==0||n!==0)&&this[vG](-I,-l,-n)}[A3](e=1,I=1){e===1&&I===1||this[CG](this.constructor[EG]([e,0,0,0,0,I,0,0,0,0,1,0,0,0,0,1]))}[OZ](e=0,I=0,l=0,n=0){if(e=Number(e),I=Number(I),l=Number(l),n=Number(n),isNaN(e)||isNaN(I)||isNaN(l)||isNaN(n))throw new TypeError("Failed to execute 'rotateAxisAngleSelf' on 'DOMMatrix': The arguments must be numbers.");let c=Math.hypot(e,I,l);if(c===0)return;c!==1&&(e/=c,I/=c,l/=c);let a=-(n*Math.PI/360),s=this.#e,r=Math.sin(a)*Math.cos(a),o=Math.sin(a)*Math.sin(a),d=s(1-2*(I*I+l*l)*o),i=s(2*(e*I*o+l*r)),h=s(2*(e*l*o-I*r)),p=s(2*(e*I*o-l*r)),Z=s(1-2*(e*e+l*l)*o),u=s(2*(I*l*o+e*r)),N=s(2*(e*l*o+I*r)),Y=s(2*(I*l*o-e*r)),y=s(1-2*(e*e+I*I)*o),Q=this.constructor[EG]([d,p,N,0,i,Z,Y,0,h,u,y,0,0,0,0,1]);this[CG](Q)}[SZ](e=0,I,l){if(I===void 0&&l===void 0&&(l=e,e=0,I=0),I===void 0&&(I=0),l===void 0&&(l=0),e=Number(e),I=Number(I),l=Number(l),isNaN(e)||isNaN(I)||isNaN(l))throw new TypeError("Failed to execute 'rotateSelf' on 'DOMMatrix': The arguments must be numbers.");l!==0&&this[OZ](0,0,1,l),I!==0&&this[OZ](0,1,0,I),e!==0&&this[OZ](1,0,0,e)}[Gk](e=0,I=0){e===0&&I===0||this[SZ](Math.atan2(I,e)*180/Math.PI)}[ky](e){let I=Object.assign({},$H),l=Math.tan(e*Math.PI/180);I.m21=l,I.c=l,this[CG](I)}[fy](e){let I=Object.assign({},$H),l=Math.tan(e*Math.PI/180);I.m12=l,I.b=l,this[CG](I)}[ok](){let e=this.constructor[EG]([-1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);this[CG](e)}[dk](){let e=this.constructor[EG]([1,0,0,0,0,-1,0,0,0,0,1,0,0,0,0,1]);this[CG](e)}[ik](){let e=this[PI]*this[Yt]*this[Rt]-this[PI]*this[dt]*this[Vt]-this[Nt]*this[Xt]*this[Rt]+this[Nt]*this[Ht]*this[Vt]+this[qI]*this[Xt]*this[dt]-this[qI]*this[Ht]*this[Yt],I=-this[KI]*this[Yt]*this[Rt]+this[KI]*this[dt]*this[Vt]+this[Nt]*this[At]*this[Rt]-this[Nt]*this[wt]*this[Vt]-this[qI]*this[At]*this[dt]+this[qI]*this[wt]*this[Yt],l=this[KI]*this[Xt]*this[Rt]-this[KI]*this[Ht]*this[Vt]-this[PI]*this[At]*this[Rt]+this[PI]*this[wt]*this[Vt]+this[qI]*this[At]*this[Ht]-this[qI]*this[wt]*this[Xt],n=-this[KI]*this[Xt]*this[dt]+this[KI]*this[Ht]*this[Yt]+this[PI]*this[At]*this[dt]-this[PI]*this[wt]*this[Yt]-this[Nt]*this[At]*this[Ht]+this[Nt]*this[wt]*this[Xt],c=this[OI]*e+this[MI]*I+this[ot]*l+this[TI]*n;if(c===0){this[OI]=NaN,this[KI]=NaN,this[At]=NaN,this[wt]=NaN,this[MI]=NaN,this[PI]=NaN,this[Xt]=NaN,this[Ht]=NaN,this[ot]=NaN,this[Nt]=NaN,this[Yt]=NaN,this[dt]=NaN,this[TI]=NaN,this[qI]=NaN,this[Vt]=NaN,this[Rt]=NaN;return}let a=-this[MI]*this[Yt]*this[Rt]+this[MI]*this[dt]*this[Vt]+this[ot]*this[Xt]*this[Rt]-this[ot]*this[Ht]*this[Vt]-this[TI]*this[Xt]*this[dt]+this[TI]*this[Ht]*this[Yt],s=this[OI]*this[Yt]*this[Rt]-this[OI]*this[dt]*this[Vt]-this[ot]*this[At]*this[Rt]+this[ot]*this[wt]*this[Vt]+this[TI]*this[At]*this[dt]-this[TI]*this[wt]*this[Yt],r=-this[OI]*this[Xt]*this[Rt]+this[OI]*this[Ht]*this[Vt]+this[MI]*this[At]*this[Rt]-this[MI]*this[wt]*this[Vt]-this[TI]*this[At]*this[Ht]+this[TI]*this[wt]*this[Xt],o=this[OI]*this[Xt]*this[dt]-this[OI]*this[Ht]*this[Yt]-this[MI]*this[At]*this[dt]+this[MI]*this[wt]*this[Yt]+this[ot]*this[At]*this[Ht]-this[ot]*this[wt]*this[Xt],d=this[MI]*this[Nt]*this[Rt]-this[MI]*this[dt]*this[qI]-this[ot]*this[PI]*this[Rt]+this[ot]*this[Ht]*this[qI]+this[TI]*this[PI]*this[dt]-this[TI]*this[Ht]*this[Nt],i=-this[OI]*this[Nt]*this[Rt]+this[OI]*this[dt]*this[qI]+this[ot]*this[KI]*this[Rt]-this[ot]*this[wt]*this[qI]-this[TI]*this[KI]*this[dt]+this[TI]*this[wt]*this[Nt],h=this[OI]*this[PI]*this[Rt]-this[OI]*this[Ht]*this[qI]-this[MI]*this[KI]*this[Rt]+this[MI]*this[wt]*this[qI]+this[TI]*this[KI]*this[Ht]-this[TI]*this[wt]*this[PI],p=-this[OI]*this[PI]*this[dt]+this[OI]*this[Ht]*this[Nt]+this[MI]*this[KI]*this[dt]-this[MI]*this[wt]*this[Nt]-this[ot]*this[KI]*this[Ht]+this[ot]*this[wt]*this[PI],Z=-this[MI]*this[Nt]*this[Vt]+this[MI]*this[Yt]*this[qI]+this[ot]*this[PI]*this[Vt]-this[ot]*this[Xt]*this[qI]-this[TI]*this[PI]*this[Yt]+this[TI]*this[Xt]*this[Nt],u=this[OI]*this[Nt]*this[Vt]-this[OI]*this[Yt]*this[qI]-this[ot]*this[KI]*this[Vt]+this[ot]*this[At]*this[qI]+this[TI]*this[KI]*this[Yt]-this[TI]*this[At]*this[Nt],N=-this[OI]*this[PI]*this[Vt]+this[OI]*this[Xt]*this[qI]+this[MI]*this[KI]*this[Vt]-this[MI]*this[At]*this[qI]-this[TI]*this[KI]*this[Xt]+this[TI]*this[At]*this[PI],Y=this[OI]*this[PI]*this[Yt]-this[OI]*this[Xt]*this[Nt]-this[MI]*this[KI]*this[Yt]+this[MI]*this[At]*this[Nt]+this[ot]*this[KI]*this[Xt]-this[ot]*this[At]*this[PI];this[OI]=e/c||0,this[KI]=I/c||0,this[At]=l/c||0,this[wt]=n/c||0,this[MI]=a/c||0,this[PI]=s/c||0,this[Xt]=r/c||0,this[Ht]=o/c||0,this[ot]=d/c||0,this[Nt]=i/c||0,this[Yt]=h/c||0,this[dt]=p/c||0,this[TI]=Z/c||0,this[qI]=u/c||0,this[Vt]=N/c||0,this[Rt]=Y/c||0}[g3](e=!1){return e?[this[OI],this[KI],this[MI],this[PI],this[TI],this[qI]]:[this[OI],this[KI],this[At],this[wt],this[MI],this[PI],this[Xt],this[Ht],this[ot],this[Nt],this[Yt],this[dt],this[TI],this[qI],this[Vt],this[Rt]]}#e(e,I=1e15){return Math.round(e*I)/I}static fromMatrix(e){return e instanceof t||(e?.m11===void 0&&e?.a!==void 0?(e=Object.assign({},$H,e),e.m11=e.a,e.m12=e.b,e.m21=e.c,e.m22=e.d,e.m41=e.e,e.m42=e.f):e=Object.assign({},$H,e)),this[EG]([e.m11,e.m12,e.m13,e.m14,e.m21,e.m22,e.m23,e.m24,e.m31,e.m32,e.m33,e.m34,e.m41,e.m42,e.m43,e.m44])}static fromFloat32Array(e){return this[EG](e)}static fromFloat64Array(e){return this[EG](e)}static[EG](e){if(!(e instanceof Float64Array||e instanceof Float32Array||Array.isArray(e))||e.length!==6&&e.length!==16)throw TypeError(`Failed to execute 'fromArray' on '${this.name}': '${String(e)}' is not a compatible array.`);let I=new this;if(e.length===16){let[l,n,c,a,s,r,o,d,i,h,p,Z,u,N,Y,y]=e;I[OI]=l,I[KI]=n,I[At]=c,I[wt]=a,I[MI]=s,I[PI]=r,I[Xt]=o,I[Ht]=d,I[ot]=i,I[Nt]=h,I[Yt]=p,I[dt]=Z,I[TI]=u,I[qI]=N,I[Vt]=Y,I[Rt]=y}else if(e.length===6){let[l,n,c,a,s,r]=e;I[OI]=l,I[KI]=n,I[MI]=c,I[PI]=a,I[TI]=s,I[qI]=r}return I}static[Ly](e){if(typeof e!="string")throw TypeError(`Failed to execute 'setMatrixValue' on '${this.name}': Expected '${String(e)}' to be a string.`);let I=new this,l=new RegExp(cLI),n;for(;n=l.exec(e);){let c=n[1],a=n[2].split(aLI);for(let i=0,h=a.length;i<h;i++)a[i]=this[eie](a[i]);let[s,r,o,d]=a;switch(c){case"perspective":!isNaN(s)&&s!==0&&r===void 0&&o===void 0&&(I[dt]=-1/s);break;case"translate":!isNaN(s)&&o===void 0&&I[vG](s,r||0,0);break;case"translate3d":!isNaN(s)&&!isNaN(r)&&!isNaN(o)&&I[vG](s,r,o);break;case"translateX":!isNaN(s)&&r===void 0&&o===void 0&&I[vG](s);break;case"translateY":!isNaN(s)&&r===void 0&&o===void 0&&I[vG](0,s);break;case"translateZ":!isNaN(s)&&r===void 0&&o===void 0&&I[vG](0,0,s);break;case"matrix":case"matrix3d":(a.length===6||a.length===16)&&I[eX](this[EG](a));break;case"rotate":case"rotateZ":!isNaN(s)&&r===void 0&&o===void 0&&I[SZ](0,0,s);break;case"rotateX":!isNaN(s)&&r===void 0&&o===void 0&&I[SZ](s,0,0);break;case"rotateY":!isNaN(s)&&r===void 0&&o===void 0&&I[SZ](0,s,0);case"rotate3d":!isNaN(s)&&!isNaN(r)&&!isNaN(o)&&!isNaN(d)&&I[OZ](s,r,o,d);break;case"scale":!isNaN(s)&&s!==1&&o===void 0&&I[Nh](s,isNaN(r)?s:r);break;case"scale3d":!isNaN(s)&&!isNaN(r)&&!isNaN(o)&&I[Nh](s,r,o);break;case"scaleX":!isNaN(s)&&r===void 0&&o===void 0&&I[Nh](s,1,1);break;case"scaleY":!isNaN(s)&&r===void 0&&o===void 0&&I[Nh](1,s,1);break;case"scaleZ":!isNaN(s)&&r===void 0&&o===void 0&&I[Nh](1,1,s);break;case"skew":isNaN(s)||I[ky](s),isNaN(r)||I[fy](r);break;case"skewX":!isNaN(s)&&r===void 0&&I[ky](s);break;case"skewY":!isNaN(s)&&r===void 0&&I[fy](s);break;default:throw TypeError(`Failed to execute 'setMatrixValue' on '${this.name}': Unknown transform function '${n[1]}'.`)}}return I}static[eie](e){let I=parseFloat(e);switch(e.replace(I.toString(),"")){case"rem":case"em":case"vw":case"vh":case"%":case"vmin":case"vmax":throw new SyntaxError(`Failed to construct '${this.name}': Lengths must be absolute, not relative`);case"rad":return I*(180/Math.PI);case"turn":return I*360;case"px":return I;case"cm":return I*37.7812;case"mm":return I*3.7781;case"in":return I*96;case"pt":return I*1.3281;case"pc":return I*16;case"Q":return I*.945;default:return I}}};var Os=class extends u0{get a(){return this[OI]}set a(e){this[OI]=e}get b(){return this[KI]}set b(e){this[KI]=e}get c(){return this[MI]}set c(e){this[MI]=e}get d(){return this[PI]}set d(e){this[PI]=e}get e(){return this[TI]}set e(e){this[TI]=e}get f(){return this[qI]}set f(e){this[qI]=e}get m11(){return this[OI]}set m11(e){this[OI]=e}get m12(){return this[KI]}set m12(e){this[KI]=e}get m13(){return this[At]}set m13(e){this[At]=e}get m14(){return this[wt]}set m14(e){this[wt]=e}get m21(){return this[MI]}set m21(e){this[MI]=e}get m22(){return this[PI]}set m22(e){this[PI]=e}get m23(){return this[Xt]}set m23(e){this[Xt]=e}get m24(){return this[Ht]}set m24(e){this[Ht]=e}get m31(){return this[ot]}set m31(e){this[ot]=e}get m32(){return this[Nt]}set m32(e){this[Nt]=e}get m33(){return this[Yt]}set m33(e){this[Yt]=e}get m34(){return this[dt]}set m34(e){this[dt]=e}get m41(){return this[TI]}set m41(e){this[TI]=e}get m42(){return this[qI]}set m42(e){this[qI]=e}get m43(){return this[Vt]}set m43(e){this[Vt]=e}get m44(){return this[Rt]}set m44(e){this[Rt]=e}setMatrixValue(e){return this[eX](e),this}multiplySelf(e){return this[CG](e),this}translateSelf(e=0,I=0,l=0){return this[vG](e,I,l),this}scaleSelf(e,I,l=1,n=0,c=0,a=0){return this[Nh](e,I,l,n,c,a),this}scale3dSelf(e=1,I=0,l=0,n=0){return this[Q3](e,I,l,n),this}scaleNonUniformSelf(e=1,I=1){return this[A3](e,I),this}rotateAxisAngleSelf(e=0,I=0,l=0,n=0){return this[OZ](e,I,l,n),this}rotateSelf(e=0,I,l){return this[SZ](e,I,l),this}rotateFromVectorSelf(e=0,I=0){return this[Gk](e,I),this}skewXSelf(e){return this[ky](e),this}skewYSelf(e){return this[fy](e),this}flipXSelf(){return this[ok](),this}flipYSelf(){return this[dk](),this}invertSelf(){return this[ik](),this}};G();var sLI=/[\t\f\n\r ,]+/,Vb=class t{[W];[M];[L];[Ve]=!1;[de]={items:[],attributeValue:""};constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");if(this[W]=I,this[Ve]=!!l.readOnly,this[M]=l.getAttribute,this[L]=l.setAttribute,e!==V)throw new TypeError("Illegal constructor");let n=new Zl(this,[t]);return new Proxy(this,{get:(c,a)=>{if(a==="length"||a==="numberOfItems")return c[We]().length;if(a in c||typeof a=="symbol")return n.bind(a),c[a];let s=Number(a);if(!isNaN(s))return c[We]()[s]},set(c,a,s){if(n.bind(a),typeof a=="symbol")return c[a]=s,!0;let r=Number(a);return isNaN(r)&&(c[a]=s),!0},deleteProperty(c,a){if(typeof a=="symbol")return delete c[a],!0;let s=Number(a);return isNaN(s)&&delete c[a],!0},ownKeys(c){return Object.keys(c[We]())},has(c,a){if(a in c)return!0;if(typeof a=="symbol")return!1;let s=Number(a);return!isNaN(s)&&s>=0&&s<c[We]().length},defineProperty(c,a,s){return n.preventBinding(a),a in c?(Object.defineProperty(c,a,s),!0):!1},getOwnPropertyDescriptor(c,a){if(a in c||typeof a=="symbol")return;let s=Number(a),r=c[We]();if(!isNaN(s)&&r[s])return{value:r[s],writable:!1,enumerable:!0,configurable:!0}}})}get length(){return this[We]().length}get numberOfItems(){return this[We]().length}[Symbol.iterator](){return this[We]().values()}clear(){this[de].attributeValue="",this[de].items=[],this[L]("")}initialize(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'initialize' on 'SVGStringList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'initialize' on 'SVGStringList': 1 arguments required, but only ${arguments.length} present.`);if(e=String(e),!e){this.clear();return}return this[L](e),e}getItem(e){let I=this[We]();return typeof e=="number"||(e=Number(e),e=isNaN(e)?0:e),I[e]?I[e]:null}insertItemBefore(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'insertItemBefore' on 'SVGStringList': The object is read-only.");if(arguments.length<2)throw new this[W].TypeError(`Failed to execute 'insertItemBefore' on 'SVGStringList': 2 arguments required, but only ${arguments.length} present.`);if(e=String(e),!e)return e;let l=this[We](),n=l.indexOf(e);return n!==-1&&l.splice(n,1),I<0?I=0:I>l.length&&(I=l.length),l.splice(I,0,e),this[L](l.join(" ")),e}replaceItem(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'replaceItem' on 'SVGStringList': The object is read-only.");if(arguments.length<2)throw new this[W].TypeError(`Failed to execute 'replaceItem' on 'SVGStringList': 2 arguments required, but only ${arguments.length} present.`);if(e=String(e),!e)return this.removeItem(I);let l=this[We]();I<0?I=0:I>=l.length&&(I=l.length-1);let n=l[I];return l[I]=e,this[L](l.join(" ")),n}removeItem(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'removeItem' on 'SVGStringList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'removeItem' on 'SVGStringList': 1 argument required, but only ${arguments.length} present.`);let I=this[We]();if(e=Number(e),isNaN(e)&&(e=0),e>=I.length)throw new this[W].DOMException(`Failed to execute 'removeItem' on 'SVGStringList': The index provided (${e}) is greater than the maximum bound.`,B.indexSizeError);if(e<0)throw new this[W].DOMException(`Failed to execute 'removeItem' on 'SVGStringList': The index provided (${e}) is negative.`,B.indexSizeError);let l=I[e];return I.splice(e,1),this[L](I.join(" ")),l}appendItem(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'appendItem' on 'SVGStringList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'appendItem' on 'SVGStringList': 1 argument required, but only ${arguments.length} present.`);if(e=String(e),!e)return e;let I=this[We](),l=I.indexOf(e);return l!==-1&&I.splice(l,1),I.push(e),this[L](I.join(" ")),e}[We](){let e=this[M]()??"",I=this[de];if(I.attributeValue===e)return I.items;let l=[],n=e.trim();if(n)for(let c of n.split(sLI))l.includes(c)||l.push(c);return I.attributeValue=e,I.items=l,l}};G();G();G();G();var rLI=/([a-zA-Z0-9]+)\(([^)]+)\)/,GLI=/[\s,]+/,Sh=class t{[W];[M]=null;[L]=null;[$]=null;[Ve]=!1;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,l&&(this[Ve]=!!l.readOnly,this[M]=l.getAttribute||null,this[L]=l.setAttribute||null)}get a(){return this[an]().a}set a(e){if(this[Ve])return;let I=this[an]();I.a=e,this[na](I)}get b(){return this[an]().b}set b(e){if(this[Ve])return;let I=this[an]();I.b=e,this[na](I)}get c(){return this[an]().c}set c(e){if(this[Ve])return;let I=this[an]();I.c=e,this[na](I)}get d(){return this[an]().d}set d(e){if(this[Ve])return;let I=this[an]();I.d=e,this[na](I)}get e(){return this[an]().e}set e(e){if(this[Ve])return;let I=this[an]();I.e=e,this[na](I)}get f(){return this[an]().f}set f(e){if(this[Ve])return;let I=this[an]();I.f=e,this[na](I)}multiply(e){if(!(e instanceof t))throw new this[W].TypeError("Failed to execute 'multiply' on 'SVGMatrix': parameter 1 is not of type 'SVGMatrix'.");let I=this[an](),l=new t(V,this[W]);return I.multiplySelf(e[an]()),l[na](I),l}translate(e=0,I=0){let l=this[an](),n=new t(V,this[W]);return l.translateSelf(e,I),n[na](l),n}scale(e){let I=this[an](),l=new t(V,this[W]);return I.scaleSelf(e),l[na](I),l}scaleNonUniform(e=1,I=1){let l=this[an](),n=new t(V,this[W]);return l.scaleNonUniformSelf(e,I),n[na](l),n}rotate(e){let I=this[an](),l=new t(V,this[W]);return I.rotateSelf(e),l[na](I),l}rotateFromVector(e=0,I=0){let l=this[an](),n=new t(V,this[W]);return l.rotateFromVectorSelf(e,I),n[na](l),n}skewX(e){let I=this[an](),l=new t(V,this[W]);return I.skewXSelf(e),l[na](I),l}skewY(e){let I=this[an](),l=new t(V,this[W]);return I.skewYSelf(e),l[na](I),l}flipX(){let e=this[an](),I=new t(V,this[W]);return e.flipXSelf(),I[na](e),I}flipY(){let e=this[an](),I=new t(V,this[W]);return e.flipYSelf(),I[na](e),I}inverse(){let e=this[an](),I=new t(V,this[W]);return e.invertSelf(),I[na](e),I}[an](){let e=this[M]?this[M]():this[$];if(!e)return new Os;let I=e.match(rLI);if(!I)return new Os;let l=[];for(let n of I[2].trim().split(GLI)){let c=Number(n);if(isNaN(c))throw new this[W].TypeError(`Failed to parse transform attribute: Expected number, but got "${n}" in "${e}".`);l.push(c)}switch(I[1]){case"matrix":if(l.length!==6)throw new this[W].TypeError(`Failed to parse transform attribute: Expected 6 parameters in "${e}".`);return Os[Ly](e);case"scale":case"translate":if(l.length!==1&&l.length!==2)throw new this[W].TypeError(`Failed to parse transform attribute: Expected 1 or 2 parameters in "${e}".`);return Os[Ly](e);case"skewY":case"skewX":if(l.length!==1)throw new this[W].TypeError(`Failed to parse transform attribute: Expected 1 parameter in "${e}".`);return Os[Ly](e);case"rotate":let n=new Os;if(l.length!==1&&l.length!==3)throw new this[W].TypeError(`Failed to parse transform attribute: Expected 1 or 3 parameters in "${e}".`);let[c,a,s]=l;(a||s)&&n.translateSelf(a,s);let r=c*Math.PI/180;return n.multiplySelf(new Os([Math.cos(r),Math.sin(r),-Math.sin(r),Math.cos(r),0,0])),(a||s)&&n.translateSelf(-a,-s),n;default:throw new this[W].TypeError(`Failed to parse transform attribute: Unknown transformation "${e}".`)}}[na](e){this[$]=e.toString().replace(/, /g," "),this[L]&&this[L](this[$])}};G();var Tie;(function(t){t[t.unknown=0]="unknown",t[t.matrix=1]="matrix",t[t.translate=2]="translate",t[t.scale=3]="scale",t[t.rotate=4]="rotate",t[t.skewX=5]="skewX",t[t.skewY=6]="skewY"})(Tie||(Tie={}));var Sr=Tie;var zze=/([a-zA-Z0-9]+)\(([^)]+)\)/,oLI=/[\s,]+/,BG=class{static SVG_TRANSFORM_UNKNOWN=Sr.unknown;static SVG_TRANSFORM_MATRIX=Sr.matrix;static SVG_TRANSFORM_TRANSLATE=Sr.translate;static SVG_TRANSFORM_SCALE=Sr.scale;static SVG_TRANSFORM_ROTATE=Sr.rotate;static SVG_TRANSFORM_SKEWX=Sr.skewX;static SVG_TRANSFORM_SKEWY=Sr.skewY;[W];[M]=null;[L]=null;[$]=null;[Ve]=!1;[MZ]=null;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,l&&(this[Ve]=!!l.readOnly,this[M]=l.getAttribute||null,this[L]=l.setAttribute||null)}get type(){let I=(this[M]?this[M]():this[$])?.match(zze);if(!I)return Sr.unknown;switch(I[1]){case"matrix":return Sr.matrix;case"translate":return Sr.translate;case"rotate":return Sr.rotate;case"scale":return Sr.scale;case"skewX":return Sr.skewX;case"skewY":return Sr.skewY}return 0}get angle(){let I=(this[M]?this[M]():this[$])?.match(zze);if(!I)return 0;let l=parseFloat(I[2].trim().split(oLI)[0]);if(isNaN(l))return 0;switch(I[1]){case"rotate":case"skewX":case"skewY":return l}return 0}get matrix(){return this[MZ]||(this[MZ]=new Sh(V,this[W],{readOnly:this[Ve],getAttribute:()=>this[M]?this[M]():this[$],setAttribute:e=>{if(this[$]=e,this[L]){this[L](e);return}}})),this[MZ]}setMatrix(e){if(!(e instanceof Sh))throw new TypeError('Failed to set the "matrix" property on "SVGTransform": The provided value is not of type "SVGMatrix".');this[Ve]||(this[MZ]&&(this[MZ][M]=null,this[MZ][L]=null),e[M]=()=>this[M]?this[M]():this[$],e[L]=I=>{if(this[$]=I,this[L]){this[L](I);return}},this[MZ]=e,e[$]!==this[$]&&(this[$]=e[$],this[L]&&this[L](this[$]||"")))}setTranslate(e,I){if(arguments.length<2)throw new TypeError(`Failed to execute 'setTranslate' on 'SVGTransform': 2 arguments required, but only ${arguments.length} present.`);if(e=Number(e),I=Number(I),isNaN(e)||isNaN(I))throw new TypeError("Failed to execute 'setTranslate' on 'SVGTransform': The provided float value is non-finite.");this[Ve]||(this[$]=`translate(${e} ${I})`,this[L]&&this[L](this[$]))}setScale(e,I){if(arguments.length<2)throw new TypeError(`Failed to execute 'setScale' on 'SVGTransform': 2 arguments required, but only ${arguments.length} present.`);if(e=Number(e),I=Number(I),isNaN(e)||isNaN(I))throw new TypeError("Failed to execute 'setScale' on 'SVGTransform': The provided float value is non-finite.");this[Ve]||(this[$]=`scale(${e} ${I})`,this[L]&&this[L](this[$]))}setRotate(e,I,l){if(arguments.length<3)throw new TypeError(`Failed to execute 'setRotate' on 'SVGTransform': 3 arguments required, but only ${arguments.length} present.`);if(e=Number(e),I=Number(I),l=Number(l),isNaN(e)||isNaN(I)||isNaN(l))throw new TypeError("Failed to execute 'setRotate' on 'SVGTransform': The provided float value is non-finite.");this[Ve]||(this[$]=`rotate(${e} ${I} ${l})`,this[L]&&this[L](this[$]))}setSkewX(e){if(arguments.length<1)throw new TypeError(`Failed to execute 'setSkewX' on 'SVGTransform': 1 arguments required, but only ${arguments.length} present.`);if(e=Number(e),isNaN(e))throw new TypeError("Failed to execute 'setSkewX' on 'SVGTransform': The provided float value is non-finite.");this[Ve]||(this[$]=`skewX(${e})`,this[L]&&this[L](this[$]))}setSkewY(e){if(arguments.length<1)throw new TypeError(`Failed to execute 'setSkewY' on 'SVGTransform': 1 arguments required, but only ${arguments.length} present.`);if(e=Number(e),isNaN(e))throw new TypeError("Failed to execute 'setSkewY' on 'SVGTransform': The provided float value is non-finite.");this[Ve]||(this[$]=`skewY(${e})`,this[L]&&this[L](this[$]))}};var dLI=/([a-zA-Z0-9]+)\(([^)]+)\)/gm,pu="matrix(1 0 0 1 0 0)",qY=class t{[W];[M];[L];[Ve]=!1;[de]={items:[],attributeValue:""};constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[Ve]=!!l.readOnly,this[M]=l.getAttribute,this[L]=l.setAttribute;let n=new Zl(this,[t]);return new Proxy(this,{get:(c,a)=>{if(a==="length"||a==="numberOfItems")return c[We]().length;if(a in c||typeof a=="symbol")return n.bind(a),c[a];let s=Number(a);if(!isNaN(s))return c[We]()[s]},set(c,a,s){if(n.bind(a),typeof a=="symbol")return c[a]=s,!0;let r=Number(a);return isNaN(r)&&(c[a]=s),!0},deleteProperty(c,a){if(typeof a=="symbol")return delete c[a],!0;let s=Number(a);return isNaN(s)&&delete c[a],!0},ownKeys(c){return Object.keys(c[We]())},has(c,a){if(a in c)return!0;if(typeof a=="symbol")return!1;let s=Number(a);return!isNaN(s)&&s>=0&&s<c[We]().length},defineProperty(c,a,s){return n.preventBinding(a),a in c?(Object.defineProperty(c,a,s),!0):!1},getOwnPropertyDescriptor(c,a){if(a in c||typeof a=="symbol")return;let s=Number(a),r=c[We]();if(!isNaN(s)&&r[s])return{value:r[s],writable:!1,enumerable:!0,configurable:!0}}})}get length(){return this[We]().length}get numberOfItems(){return this[We]().length}[Symbol.iterator](){return this[We]().values()}clear(){if(this[Ve])throw new this[W].TypeError("Failed to execute 'clear' on 'SVGTransformList': The object is read-only.");for(let e of this[de].items)e[M]=null,e[L]=null;this[de].items=[],this[de].attributeValue="",this[L]("")}initialize(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'initialize' on 'SVGTransformList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'initialize' on 'SVGTransformList': 1 arguments required, but only ${arguments.length} present.`);if(!(e instanceof BG))throw new this[W].TypeError("Failed to execute 'appendItem' on 'SVGTransformList': parameter 1 is not of type 'SVGTransform'.");for(let I of this[de].items)I[M]=null,I[L]=null;return e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(I=>I[$]||pu).join(" "),this[L](this[de].attributeValue)},this[de].items=[e],this[de].attributeValue=e[$],this[L](e[$]||""),e}getItem(e){let I=this[We]();return typeof e=="number"||(e=Number(e),e=isNaN(e)?0:e),I[e]?I[e]:null}insertItemBefore(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'insertItemBefore' on 'SVGTransformList': The object is read-only.");if(arguments.length<2)throw new this[W].TypeError(`Failed to execute 'insertItemBefore' on 'SVGTransformList': 2 arguments required, but only ${arguments.length} present.`);if(!(e instanceof BG))throw new this[W].TypeError("Failed to execute 'insertItemBefore' on 'SVGTransformList': parameter 1 is not of type 'SVGTransform'.");let l=this[We](),n=l.indexOf(e);return n!==-1&&l.splice(n,1),I<0?I=0:I>l.length&&(I=l.length),l.splice(I,0,e),e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(c=>c[$]||pu).join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=l.map(c=>c[$]||pu).join(" "),this[L](this[de].attributeValue),e}replaceItem(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'replaceItem' on 'SVGTransformList': The object is read-only.");if(arguments.length<2)throw new this[W].TypeError(`Failed to execute 'replaceItem' on 'SVGTransformList': 2 arguments required, but only ${arguments.length} present.`);if(!(e instanceof BG))throw new this[W].TypeError("Failed to execute 'replaceItem' on 'SVGTransformList': parameter 1 is not of type 'SVGTransform'.");let l=this[We](),n=l.indexOf(e);if(n===I)return e;n!==-1&&l.splice(n,1),I<0?I=0:I>=l.length&&(I=l.length-1),l[I]&&(l[I][M]=null,l[I][L]=null);let c=l[I];return l[I]=e,e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(a=>a[$]||pu).join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=l.map(a=>a[$]||pu).join(" "),this[L](this[de].attributeValue),c}removeItem(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'removeItem' on 'SVGTransformList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'removeItem' on 'SVGTransformList': 1 argument required, but only ${arguments.length} present.`);let I=this[We]();if(e=Number(e),isNaN(e)&&(e=0),e>=I.length)throw new this[W].DOMException(`Failed to execute 'removeItem' on 'SVGTransformList': The index provided (${e}) is greater than the maximum bound.`,B.indexSizeError);if(e<0)throw new this[W].DOMException(`Failed to execute 'removeItem' on 'SVGTransformList': The index provided (${e}) is negative.`,B.indexSizeError);let l=I[e];return l&&(l[M]=null,l[L]=null),I.splice(e,1),this[de].attributeValue=I.map(n=>n[$]||pu).join(" "),this[L](this[de].attributeValue),l}appendItem(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'appendItem' on 'SVGTransformList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'appendItem' on 'SVGTransformList': 1 argument required, but only ${arguments.length} present.`);if(!(e instanceof BG))throw new this[W].TypeError("Failed to execute 'appendItem' on 'SVGTransformList': parameter 1 is not of type 'SVGTransform'.");let I=this[We](),l=I.indexOf(e);return l!==-1&&I.splice(l,1),I.push(e),e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(n=>n[$]||pu).join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=I.map(n=>n[$]||pu).join(" "),this[L](this[de].attributeValue),e}[We](){let e=this[M]()??"",I=this[de];if(I.attributeValue===e)return I.items;if(I.items.length)for(let c of I.items)c[M]=null,c[L]=null;let l=[],n=e.trim();if(n){let c=new RegExp(dLI),a;for(;a=c.exec(n);){let s=new BG(V,this[W],{readOnly:this[Ve],getAttribute:()=>s[$],setAttribute:()=>{this[de].attributeValue=this[We]().map(r=>r[$]||pu).join(" "),this[L](this[de].attributeValue)}});s[$]=`${a[1]}(${a[2]})`,l.push(s)}}return I.attributeValue=e,I.items=l,l}};var Rb=class{[W];[M];[L];[Mt]=null;[Tt]=null;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute}get animVal(){return this[Tt]||(this[Tt]=new qY(V,this[W],{readOnly:!0,getAttribute:this[M],setAttribute:()=>{}})),this[Tt]}set animVal(e){}get baseVal(){return this[Mt]||(this[Mt]=new qY(V,this[W],{getAttribute:this[M],setAttribute:this[L]})),this[Mt]}set baseVal(e){}};var Al=class extends ke{[sh]=null;[rh]=null;[t3]=null;get oncopy(){return E.getEventListener(this,"oncopy")}set oncopy(e){this[F].set("oncopy",e)}get oncut(){return E.getEventListener(this,"oncut")}set oncut(e){this[F].set("oncut",e)}get onpaste(){return E.getEventListener(this,"onpaste")}set onpaste(e){this[F].set("onpaste",e)}get requiredExtensions(){return this[sh]||(this[sh]=new Vb(V,this[W],{getAttribute:()=>this.getAttribute("requiredExtensions"),setAttribute:e=>this.setAttribute("requiredExtensions",e)})),this[sh]}get systemLanguage(){return this[rh]||(this[rh]=new Vb(V,this[W],{getAttribute:()=>this.getAttribute("systemLanguage"),setAttribute:e=>this.setAttribute("systemLanguage",e)})),this[rh]}get transform(){return this[t3]||(this[t3]=new Rb(V,this[W],{getAttribute:()=>this.getAttribute("transform"),setAttribute:e=>this.setAttribute("transform",e)})),this[t3]}getBBox(){return new Dd}getCTM(){return new Os}getScreenCTM(){return new Os}};G();var Pd=class{[W];[M]=null;[L]=null;[$]=null;[Ve]=!1;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,l&&(this[Ve]=!!l.readOnly,this[M]=l.getAttribute||null,this[L]=l.setAttribute||null)}get x(){let e=this[M]?this[M]():this[$];if(!e)return 0;let I=e.split(/\s+/),l=Number(I[0]);return isNaN(l)?0:l}set x(e){if(this[Ve])throw new this[W].TypeError("Failed to set the 'x' property on 'SVGRect': The object is read-only.");this[$]=`${String(typeof e=="number"?e:parseFloat(e))} ${this.y} ${this.width} ${this.height}`,this[L]&&this[L](this[$])}get y(){let e=this[M]?this[M]():this[$];if(!e)return 0;let I=e.split(/\s+/),l=Number(I[1]);return isNaN(l)?0:l}set y(e){if(this[Ve])throw new this[W].TypeError("Failed to set the 'y' property on 'SVGRect': The object is read-only.");this[$]=`${this.x} ${String(typeof e=="number"?e:parseFloat(e))} ${this.width} ${this.height}`,this[L]&&this[L](this[$])}get width(){let e=this[M]?this[M]():this[$];if(!e)return 0;let I=e.split(/\s+/),l=Number(I[2]);return isNaN(l)?0:l}set width(e){if(this[Ve])throw new this[W].TypeError("Failed to set the 'width' property on 'SVGRect': The object is read-only.");this[$]=`${this.x} ${this.y} ${String(typeof e=="number"?e:parseFloat(e))} ${this.height}`,this[L]&&this[L](this[$])}get height(){let e=this[M]?this[M]():this[$];if(!e)return 0;let I=e.split(/\s+/),l=Number(I[3]);return isNaN(l)?0:l}set height(e){if(this[Ve])throw new this[W].TypeError("Failed to set the 'height' property on 'SVGRect': The object is read-only.");this[$]=`${this.x} ${this.y} ${this.width} ${String(typeof e=="number"?e:parseFloat(e))}`,this[L]&&this[L](this[$])}};G();var Uze=/[\t\f\n\r, ]+/,Fc=class{[W];[M]=null;[L]=null;[$]=null;[Ve]=!1;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,l&&(this[Ve]=!!l.readOnly,this[M]=l.getAttribute||null,this[L]=l.setAttribute||null)}get x(){let I=((this[M]?this[M]():this[$])||"").split(Uze);return I[0]?parseFloat(I[0]):0}set x(e){if(this[Ve])throw new this[W].TypeError("Failed to set the 'x' property on 'SVGPoint': The object is read-only.");this[$]=`${e} ${this.y}`,this[L]&&this[L](this[$])}get y(){let I=((this[M]?this[M]():this[$])||"").split(Uze);return I[1]?parseFloat(I[1]):0}set y(e){if(this[Ve])throw new this[W].TypeError("Failed to set the 'y' property on 'SVGPoint': The object is read-only.");this[$]=`${this.x} ${e}`,this[L]&&this[L](this[$])}};G();G();var jie;(function(t){t[t.unknown=0]="unknown",t[t.number=1]="number",t[t.percentage=2]="percentage",t[t.ems=3]="ems",t[t.exs=4]="exs",t[t.px=5]="px",t[t.cm=6]="cm",t[t.mm=7]="mm",t[t.in=8]="in",t[t.pt=9]="pt",t[t.pc=10]="pc"})(jie||(jie={}));var VI=jie;var Sze=/^(\d+|\d+\.\d+)(px|em|ex|cm|mm|in|pt|pc|%|)$/,qd=class{static SVG_LENGTHTYPE_UNKNOWN=VI.unknown;static SVG_LENGTHTYPE_NUMBER=VI.number;static SVG_LENGTHTYPE_PERCENTAGE=VI.percentage;static SVG_LENGTHTYPE_EMS=VI.ems;static SVG_LENGTHTYPE_EXS=VI.exs;static SVG_LENGTHTYPE_PX=VI.px;static SVG_LENGTHTYPE_CM=VI.cm;static SVG_LENGTHTYPE_MM=VI.mm;static SVG_LENGTHTYPE_IN=VI.in;static SVG_LENGTHTYPE_PT=VI.pt;static SVG_LENGTHTYPE_PC=VI.pc;[W];[M]=null;[L]=null;[$]=null;[Ve]=!1;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,l&&(this[Ve]=!!l.readOnly,this[M]=l.getAttribute||null,this[L]=l.setAttribute||null)}get unitType(){let I=(this[M]?this[M]()||"":this[$]||"").match(Sze);if(!I)return VI.unknown;if(isNaN(parseFloat(I[1])))return VI.unknown;switch(I[2]){case"":return VI.number;case"px":return VI.px;case"cm":return VI.cm;case"mm":return VI.mm;case"in":return VI.in;case"pt":return VI.pt;case"pc":return VI.pc;case"em":case"ex":case"%":throw new this[W].TypeError("Failed to execute 'value' on 'SVGLength': Could not resolve relative length.");default:return VI.unknown}}get value(){let I=(this[M]?this[M]()||"":this[$]||"").match(Sze);if(!I)return 0;let l=parseFloat(I[1]);if(isNaN(l))return 0;switch(I[2]){case"":return l;case"px":return l;case"cm":return l/2.54*96;case"mm":return l/25.4*96;case"in":return l*96;case"pt":return l*72;case"pc":return l*6;case"em":case"ex":case"%":throw new this[W].TypeError("Failed to execute 'value' on 'SVGLength': Could not resolve relative length.");default:return 0}}set value(e){if(this[Ve])throw new this[W].TypeError("Failed to set the 'value' property on 'SVGLength': The object is read-only.");if(e=typeof e!="number"?parseFloat(String(e)):e,isNaN(e))throw new this[W].TypeError("Failed to set the 'value' property on 'SVGLength': The provided float value is non-finite.");let I="",l=e;switch(this.unitType){case VI.number:l=e,I="";break;case VI.px:l=e,I="px";break;case VI.cm:l=e/96*2.54,I="cm";break;case VI.mm:l=e/96*25.4,I="mm";break;case VI.in:l=e/96,I="in";break;case VI.pt:l=e/72,I="pt";break;case VI.pc:l=e/6,I="pc";break;case VI.percentage:case VI.ems:case VI.exs:throw new this[W].TypeError("Failed to set the 'value' property on 'SVGLength': Could not resolve relative length.");default:break}this[$]=String(l)+I,this[L]&&this[L](this[$])}get valueAsString(){return this[M]?this[M]()||"0":this[$]||"0"}get valueInSpecifiedUnits(){let e=this.valueAsString;return parseFloat(e)||0}newValueSpecifiedUnits(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'newValueSpecifiedUnits' on 'SVGLength': The object is read-only.");if(typeof e!="number")throw new this[W].TypeError("Failed to execute 'newValueSpecifiedUnits' on 'SVGLength': parameter 1 ('unitType') is not of type 'number'.");if(I=typeof I!="number"?parseFloat(String(I)):I,isNaN(I))throw new this[W].TypeError("Failed to execute 'newValueSpecifiedUnits' on 'SVGLength': The provided float value is non-finite.");let l="";switch(e){case VI.number:l="";break;case VI.px:l="px";break;case VI.cm:l="cm";break;case VI.mm:l="mm";break;case VI.in:l="in";break;case VI.pt:l="pt";break;case VI.pc:l="pc";break;case VI.ems:case VI.exs:case VI.percentage:throw new this[W].TypeError("Failed to execute 'newValueSpecifiedUnits' on 'SVGLength': Could not resolve relative length.");default:break}this[$]=String(I)+l,this[L]&&this[L](this[$])}convertToSpecifiedUnits(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'convertToSpecifiedUnits' on 'SVGLength': The object is read-only.");if(typeof e!="number")throw new this[W].TypeError("Failed to execute 'convertToSpecifiedUnits' on 'SVGLength': parameter 1 ('unitType') is not of type 'number'.");let I=this.value,l="";switch(e){case VI.number:l="";break;case VI.px:l="px";break;case VI.cm:I=I/96*2.54,l="cm";break;case VI.mm:I=I/96*25.4,l="mm";break;case VI.in:I=I/96,l="in";break;case VI.pt:I=I/72,l="pt";break;case VI.pc:I=I/6,l="pc";break;case VI.percentage:case VI.ems:case VI.exs:throw new this[W].TypeError("Failed to execute 'convertToSpecifiedUnits' on 'SVGLength': Could not resolve relative length.");default:break}this[$]=String(I)+l,this[L]&&this[L](this[$])}};G();G();var Die;(function(t){t[t.unknown=0]="unknown",t[t.unspecified=1]="unspecified",t[t.deg=2]="deg",t[t.rad=3]="rad",t[t.grad=4]="grad"})(Die||(Die={}));var El=Die;var Oze=/^(\d+|\d+\.\d+)(deg|rad|grad|turn|)$/,Oh=class{static SVG_ANGLETYPE_UNKNOWN=El.unknown;static SVG_ANGLETYPE_UNSPECIFIED=El.unspecified;static SVG_ANGLETYPE_DEG=El.deg;static SVG_ANGLETYPE_RAD=El.rad;static SVG_ANGLETYPE_GRAD=El.grad;[W];[M]=null;[L]=null;[$]="";[Ve]=!1;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,l&&(this[Ve]=!!l.readOnly,this[M]=l.getAttribute||null,this[L]=l.setAttribute||null)}get unitType(){let I=(this[M]?this[M]():this[$])?.match(Oze);if(!I)return El.unknown;if(isNaN(parseFloat(I[1])))return El.unknown;switch(I[2]){case"":return El.unspecified;case"deg":return El.deg;case"rad":return El.rad;case"grad":return El.grad;case"turn":return El.unknown;default:return El.unspecified}}get value(){let I=(this[M]?this[M]():this[$])?.match(Oze);if(!I)return 0;let l=parseFloat(I[1]);if(isNaN(l))return 0;switch(I[2]){case"":return l;case"deg":return l;case"rad":return l*(180/Math.PI);case"grad":return l*(180/200);case"turn":return l*360;default:return l}}set value(e){if(this[Ve])throw new this[W].TypeError("Failed to set the 'value' property on 'SVGAngle': The object is read-only.");if(e=typeof e!="number"?parseFloat(String(e)):e,isNaN(e))throw new this[W].TypeError("Failed to set the 'value' property on 'SVGAngle': The provided float value is non-finite.");let I="",l=e;switch(this.unitType){case El.unspecified:l=e,I="";break;case El.deg:l=e,I="deg";break;case El.rad:l=e/(180/Math.PI),I="rad";break;case El.grad:l=e/(180/200),I="grad";break;case El.unknown:l=e/360,I="turn";default:break}this[$]=String(l)+I,this[L]&&this[L](this[$])}get valueAsString(){return this[M]?this[M]()||"0":this[$]||"0"}get valueInSpecifiedUnits(){let e=this.valueAsString;return parseFloat(e)||0}newValueSpecifiedUnits(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'newValueSpecifiedUnits' on 'SVGAngle': The object is read-only.");if(typeof e!="number")throw new this[W].TypeError("Failed to execute 'newValueSpecifiedUnits' on 'SVGAngle': parameter 1 ('unitType') is not of type 'number'.");if(I=typeof I!="number"?parseFloat(I):I,isNaN(I))throw new this[W].TypeError("Failed to execute 'newValueSpecifiedUnits' on 'SVGAngle': The provided float value is non-finite.");let l="";switch(e){case El.unspecified:l="";break;case El.deg:l="deg";break;case El.rad:l="rad";break;case El.grad:l="grad";break;case El.unknown:l="turn";break;default:break}this[$]=String(I)+l,this[L]&&this[L](this[$])}convertToSpecifiedUnits(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'convertToSpecifiedUnits' on 'SVGAngle': The object is read-only.");if(typeof e!="number")throw new this[W].TypeError("Failed to execute 'convertToSpecifiedUnits' on 'SVGAngle': parameter 1 ('unitType') is not of type 'number'.");let I=this.value,l="";switch(e){case El.unspecified:l="";break;case El.deg:l="deg";break;case El.rad:l="rad",I=I/(180/Math.PI);break;case El.grad:l="grad",I=I/(180/200);break;case El.unknown:l="turn",I=I/360;break;default:break}this[$]=String(I)+l,this[L]&&this[L](this[$])}};G();var _d=class{[W];[M]=null;[L]=null;[$]=null;[Ve]=!1;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,l&&(this[Ve]=!!l.readOnly,this[M]=l.getAttribute||null,this[L]=l.setAttribute||null)}get value(){let e=this[M]?this[M]():this[$];return parseFloat(e||"0")}set value(e){if(this[Ve])throw new TypeError("Failed to set the 'value' property on 'SVGNumber': The object is read-only.");let I=typeof e!="number"?parseFloat(String(e)):e;if(isNaN(I))throw new TypeError("Failed to set the 'value' property on 'SVGNumber': The provided value is not a number.");this[$]=String(e),this[L]&&this[L](this[$]||"")}};G();var Zu=class{[W];[M];[L];[Mt]=null;[Tt]=null;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute}get animVal(){return this[Tt]||(this[Tt]=new Pd(V,this[W],{readOnly:!0,getAttribute:this[M]})),this[Tt]}set animVal(e){}get baseVal(){return this[Mt]||(this[Mt]=new Pd(V,this[W],{getAttribute:this[M],setAttribute:this[L]})),this[Mt]}set baseVal(e){}};G();G();G();var Kie;(function(t){t[t.unknown=0]="unknown",t[t.meet=1]="meet",t[t.slice=2]="slice"})(Kie||(Kie={}));var uu=Kie;G();var Pie;(function(t){t[t.unknown=0]="unknown",t[t.none=1]="none",t[t.xMinYMin=2]="xMinYMin",t[t.xMidYMin=3]="xMidYMin",t[t.xMaxYMin=4]="xMaxYMin",t[t.xMinYMid=5]="xMinYMid",t[t.xMidYMid=6]="xMidYMid",t[t.xMaxYMid=7]="xMaxYMid",t[t.xMinYMax=8]="xMinYMax",t[t.xMidYMax=9]="xMidYMax",t[t.xMaxYMax=10]="xMaxYMax"})(Pie||(Pie={}));var is=Pie;var ef=Object.values(is);ef.length=ef.indexOf(0);var gP=Object.values(uu);gP.length=gP.indexOf(0);var _Y=class{static SVG_MEETORSLICE_UNKNOWN=uu.unknown;static SVG_MEETORSLICE_MEET=uu.meet;static SVG_MEETORSLICE_SLICE=uu.slice;static SVG_PRESERVEASPECTRATIO_UNKNOWN=is.unknown;static SVG_PRESERVEASPECTRATIO_NONE=is.none;static SVG_PRESERVEASPECTRATIO_XMINYMIN=is.xMinYMin;static SVG_PRESERVEASPECTRATIO_XMIDYMIN=is.xMidYMin;static SVG_PRESERVEASPECTRATIO_XMAXYMIN=is.xMaxYMin;static SVG_PRESERVEASPECTRATIO_XMINYMID=is.xMinYMid;static SVG_PRESERVEASPECTRATIO_XMIDYMID=is.xMidYMid;static SVG_PRESERVEASPECTRATIO_XMAXYMID=is.xMaxYMid;static SVG_PRESERVEASPECTRATIO_XMINYMAX=is.xMinYMax;static SVG_PRESERVEASPECTRATIO_XMIDYMAX=is.xMidYMax;static SVG_PRESERVEASPECTRATIO_XMAXYMAX=is.xMaxYMax;[W];[M]=null;[L]=null;[$]=null;[Ve]=!1;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,l&&(this[Ve]=!!l.readOnly,this[M]=l.getAttribute||null,this[L]=l.setAttribute||null)}get align(){let e=this[M]?this[M]():this[$];if(!e)return is.xMidYMid;let I=e.split(/\s+/)[0];return is[I]===void 0?is.xMidYMid:is[I]}set align(e){if(this[Ve])throw new this[W].TypeError("Failed to set the 'align' property on 'SVGPreserveAspectRatio': The object is read-only.");let I=Number(e);if(isNaN(I)||I<1||I>ef.length)throw new this[W].TypeError("Failed to set the 'align' property on 'SVGPreserveAspectRatio': The alignment provided is invalid.");this[$]=`${ef[I]} ${gP[this.meetOrSlice]}`,this[L]&&this[L](this[$])}get meetOrSlice(){let e=this[M]?this[M]():this[$];if(!e)return uu.meet;let I=e.split(/\s+/)[1];return!I||uu[I]===void 0?uu.meet:uu[I]}set meetOrSlice(e){if(this[Ve])throw new this[W].TypeError("Failed to set the 'meetOrSlice' property on 'SVGPreserveAspectRatio': The object is read-only.");let I=Number(e);if(isNaN(I)||I<1||I>2)throw new this[W].TypeError("Failed to set the 'meetOrSlice' property on 'SVGPreserveAspectRatio': The meetOrSlice provided is invalid.");this[$]=`${ef[this.align]} ${gP[I]}`,this[L]&&this[L](this[$])}};var Ko=class{[W];[M];[L];[Mt]=null;[Tt]=null;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute}get animVal(){return this[Tt]||(this[Tt]=new _Y(V,this[W],{readOnly:!0,getAttribute:this[M]})),this[Tt]}set animVal(e){}get baseVal(){return this[Mt]||(this[Mt]=new _Y(V,this[W],{getAttribute:this[M],setAttribute:this[L]})),this[Mt]}set baseVal(e){}};G();var T=class{[W];[M];[L];[Mt]=null;[Tt]=null;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute}get animVal(){return this[Tt]||(this[Tt]=new qd(V,this[W],{readOnly:!0,getAttribute:this[M]})),this[Tt]}set animVal(e){}get baseVal(){return this[Mt]||(this[Mt]=new qd(V,this[W],{getAttribute:this[M],setAttribute:this[L]})),this[Mt]}set baseVal(e){}};var eE=class extends Al{[xc]=null;[P]=null;[q]=null;[ce]=null;[ne]=null;[sP]=1;[Gh]=null;get onafterprint(){return E.getEventListener(this,"onafterprint")}set onafterprint(e){this[F].set("onafterprint",e)}get onbeforeprint(){return E.getEventListener(this,"onbeforeprint")}set onbeforeprint(e){this[F].set("onbeforeprint",e)}get onbeforeunload(){return E.getEventListener(this,"onbeforeunload")}set onbeforeunload(e){this[F].set("onbeforeunload",e)}get ongamepadconnected(){return E.getEventListener(this,"ongamepadconnected")}set ongamepadconnected(e){this[F].set("ongamepadconnected",e)}get ongamepaddisconnected(){return E.getEventListener(this,"ongamepaddisconnected")}set ongamepaddisconnected(e){this[F].set("ongamepaddisconnected",e)}get onhashchange(){return E.getEventListener(this,"onhashchange")}set onhashchange(e){this[F].set("onhashchange",e)}get onlanguagechange(){return E.getEventListener(this,"onlanguagechange")}set onlanguagechange(e){this[F].set("onlanguagechange",e)}get onmessage(){return E.getEventListener(this,"onmessage")}set onmessage(e){this[F].set("onmessage",e)}get onmessageerror(){return E.getEventListener(this,"onmessageerror")}set onmessageerror(e){this[F].set("onmessageerror",e)}get onoffline(){return E.getEventListener(this,"onoffline")}set onoffline(e){this[F].set("onoffline",e)}get ononline(){return E.getEventListener(this,"ononline")}set ononline(e){this[F].set("ononline",e)}get onpagehide(){return E.getEventListener(this,"onpagehide")}set onpagehide(e){this[F].set("onpagehide",e)}get onpageshow(){return E.getEventListener(this,"onpageshow")}set onpageshow(e){this[F].set("onpageshow",e)}get onpopstate(){return E.getEventListener(this,"onpopstate")}set onpopstate(e){this[F].set("onpopstate",e)}get onrejectionhandled(){return E.getEventListener(this,"onrejectionhandled")}set onrejectionhandled(e){this[F].set("onrejectionhandled",e)}get onstorage(){return E.getEventListener(this,"onstorage")}set onstorage(e){this[F].set("onstorage",e)}get onunhandledrejection(){return E.getEventListener(this,"onunhandledrejection")}set onunhandledrejection(e){this[F].set("onunhandledrejection",e)}get onunload(){return E.getEventListener(this,"onunload")}set onunload(e){this[F].set("onunload",e)}get preserveAspectRatio(){return this[xc]||(this[xc]=new Ko(V,this[W],{getAttribute:()=>this.getAttribute("preserveAspectRatio"),setAttribute:e=>this.setAttribute("preserveAspectRatio",e)})),this[xc]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}get currentScale(){return this[sP]}set currentScale(e){let I=typeof e!="number"?parseFloat(String(e)):e;if(isNaN(I))throw this[W].TypeError("Failed to set the 'currentScale' property on 'SVGSVGElement': The provided float value is non-finite.");I<1||(this[sP]=I)}get currentTranslate(){return new Fc(V,this[W])}get viewBox(){return this[Gh]||(this[Gh]=new Zu(V,this[W],{getAttribute:()=>this.getAttribute("viewBox"),setAttribute:e=>this.setAttribute("viewBox",e)})),this[Gh]}pauseAnimations(){}unpauseAnimations(){}animationsPaused(){return!1}getCurrentTime(){return 0}setCurrentTime(e){}getIntersectionList(e,I){return new So(V,[])}getEnclosureList(e,I){return new So(V,[])}checkIntersection(e,I){return!1}checkEnclosure(e,I){return!1}deselectAll(){}createSVGNumber(){return new _d(V,this[W])}createSVGLength(){return new qd(V,this[W])}createSVGAngle(){return new Oh(V,this[W])}createSVGPoint(){return new Fc(V,this[W])}createSVGMatrix(){return new Sh(V,this[W])}createSVGRect(){return new Pd(V,this[W])}createSVGTransform(){return new BG(V,this[W])}createSVGTransformFromMatrix(e){let I=new BG(V,this[W]);return I.setMatrix(e),I}getElementsByClassName(e){return Et.getElementsByClassName(this,e)}getElementsByTagName(e){return Et.getElementsByTagName(this,e)}getElementsByTagNameNS(e,I){return Et.getElementsByTagNameNS(this,e,I)}getElementById(e){return Et.getElementById(this,e)}[nI](e=!1){return super[nI](e)}};G();G();var Po=class extends ke{[sh]=null;[rh]=null;get onbegin(){return E.getEventListener(this,"onbegin")}set onbegin(e){this[F].set("onbegin",e)}get onend(){return E.getEventListener(this,"onend")}set onend(e){this[F].set("onend",e)}get onrepeat(){return E.getEventListener(this,"onrepeat")}set onrepeat(e){this[F].set("onrepeat",e)}get requiredExtensions(){return this[sh]||(this[sh]=new Vb(V,this[W],{getAttribute:()=>this.getAttribute("requiredExtensions"),setAttribute:e=>this.setAttribute("requiredExtensions",e)})),this[sh]}get systemLanguage(){return this[rh]||(this[rh]=new Vb(V,this[W],{getAttribute:()=>this.getAttribute("systemLanguage"),setAttribute:e=>this.setAttribute("systemLanguage",e)})),this[rh]}get targetElement(){return null}};var If=class extends Po{};G();var tf=class extends Po{};G();var lf=class extends Po{};G();G();G();var $e=class{[W];[M];[L];[Qr]=0;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute,this[Qr]=l.defaultValue||0}get animVal(){return this.baseVal}set animVal(e){}get baseVal(){let e=this[M]();if(!e)return this[Qr];let I=parseFloat(e);return isNaN(I)?this[Qr]:I}set baseVal(e){let I=typeof e!="number"?parseFloat(e):e;if(isNaN(I))throw new this[W].TypeError("TypeError: Failed to set the 'baseVal' property on 'SVGAnimatedNumber': The provided float value is non-finite.");this[L](String(I))}};var sa=class extends Al{[l3]=null;get pathLength(){return this[l3]||(this[l3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("pathLength"),setAttribute:e=>this.setAttribute("pathLength",e)})),this[l3]}isPointInFill(e){if(!(e instanceof Fc))throw new TypeError("Failed to execute 'isPointInFill' on 'SVGGeometryElement': parameter 1 is not of type 'SVGPoint'.");return!1}isPointInStroke(e){if(!(e instanceof Fc))throw new TypeError("Failed to execute 'isPointInFill' on 'SVGGeometryElement': parameter 1 is not of type 'SVGPoint'.");return!1}getTotalLength(){return 0}getPointAtLength(e){return new Fc(V,this[W])}};var nf=class extends sa{[Ar]=null;[wr]=null;[mh]=null;get cx(){return this[Ar]||(this[Ar]=new T(V,this[W],{getAttribute:()=>this.getAttribute("cx"),setAttribute:e=>this.setAttribute("cx",e)})),this[Ar]}get cy(){return this[wr]||(this[wr]=new T(V,this[W],{getAttribute:()=>this.getAttribute("cy"),setAttribute:e=>this.setAttribute("cy",e)})),this[wr]}get r(){return this[mh]||(this[mh]=new T(V,this[W],{getAttribute:()=>this.getAttribute("r"),setAttribute:e=>this.setAttribute("r",e)})),this[mh]}};G();G();var EI=class{[W];[M];[L];[Vc];[Qr];constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute,this[Vc]=l.values,this[Qr]=l.defaultValue}get animVal(){return this.baseVal}set animVal(e){}get baseVal(){let e=this[M]();if(!e)return this[Vc].indexOf(this[Qr])+1;let I=this[Vc].indexOf(e);if(I===-1){let l=this[Vc].indexOf(null);return l!==-1?l+1:0}return I+1}set baseVal(e){let I=Number(e);if(isNaN(I)&&(I=0),I<1)throw new TypeError(`Failed to set the 'baseVal' property on 'SVGAnimatedEnumeration': The enumeration value provided is ${I}, which is not settable.`);if(I>this[Vc].length)throw new TypeError(`Failed to set the 'baseVal' property on 'SVGAnimatedEnumeration': The enumeration value provided (${I}) is larger than the largest allowed value (${this[Vc].length}).`);let l=this[M](),n=this[Vc][I-1]===null,c=n?"0":this[Vc][I-1];(!l||n&&this[Vc].includes(l)||!n&&l!==c)&&this[L](c||"")}};var cf=class extends ke{[d3]=null;get clipPathUnits(){return this[d3]||(this[d3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("clipPathUnits"),setAttribute:e=>this.setAttribute("clipPathUnits",e),values:["userSpaceOnUse","objectBoundingBox"],defaultValue:"userSpaceOnUse"})),this[d3]}};G();var af=class extends Al{};G();var sf=class extends ke{};G();var rf=class extends sa{[Ar]=null;[wr]=null;[ih]=null;[bh]=null;get cx(){return this[Ar]||(this[Ar]=new T(V,this[W],{getAttribute:()=>this.getAttribute("cx"),setAttribute:e=>this.setAttribute("cx",e)})),this[Ar]}get cy(){return this[wr]||(this[wr]=new T(V,this[W],{getAttribute:()=>this.getAttribute("cy"),setAttribute:e=>this.setAttribute("cy",e)})),this[wr]}get rx(){return this[ih]||(this[ih]=new T(V,this[W],{getAttribute:()=>this.getAttribute("rx"),setAttribute:e=>this.setAttribute("rx",e)})),this[ih]}get ry(){return this[bh]||(this[bh]=new T(V,this[W],{getAttribute:()=>this.getAttribute("ry"),setAttribute:e=>this.setAttribute("ry",e)})),this[bh]}};G();G();var Me=class{[W];[M];[L];constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute}get animVal(){return this.baseVal}set animVal(e){}get baseVal(){let e=this[M]();return e||""}set baseVal(e){this[L](String(e))}};var Gf=class extends ke{static SVG_FEBLEND_MODE_UNKNOWN=0;static SVG_FEBLEND_MODE_NORMAL=1;static SVG_FEBLEND_MODE_MULTIPLY=2;static SVG_FEBLEND_MODE_SCREEN=3;static SVG_FEBLEND_MODE_DARKEN=4;static SVG_FEBLEND_MODE_LIGHTEN=5;static SVG_FEBLEND_MODE_OVERLAY=6;static SVG_FEBLEND_MODE_COLOR_DODGE=7;static SVG_FEBLEND_MODE_COLOR_BURN=8;static SVG_FEBLEND_MODE_HARD_LIGHT=9;static SVG_FEBLEND_MODE_SOFT_LIGHT=10;static SVG_FEBLEND_MODE_DIFFERENCE=11;static SVG_FEBLEND_MODE_EXCLUSION=12;static SVG_FEBLEND_MODE_HUE=13;static SVG_FEBLEND_MODE_SATURATION=14;static SVG_FEBLEND_MODE_COLOR=15;static SVG_FEBLEND_MODE_LUMINOSITY=16;[ne]=null;[De]=null;[Xr]=null;[Bl]=null;[P]=null;[q]=null;[ce]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get in2(){return this[Xr]||(this[Xr]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in2"),setAttribute:e=>this.setAttribute("in2",e)})),this[Xr]}get mode(){return this[Bl]||(this[Bl]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("mode"),setAttribute:e=>this.setAttribute("mode",e),values:["normal","multiply","screen","darken","lighten","overlay","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],defaultValue:"normal"})),this[Bl]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();G();G();var iLI=/[\t\f\n\r, ]+/,$Y=class t{[W];[M];[L];[Ve]=!1;[de]={items:[],attributeValue:""};constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");if(this[W]=I,this[Ve]=!!l.readOnly,this[M]=l.getAttribute,this[L]=l.setAttribute,e!==V)throw new TypeError("Illegal constructor");let n=new Zl(this,[t]);return new Proxy(this,{get:(c,a)=>{if(a==="length"||a==="numberOfItems")return c[We]().length;if(a in c||typeof a=="symbol")return n.bind(a),c[a];let s=Number(a);if(!isNaN(s))return c[We]()[s]},set(c,a,s){if(n.bind(a),typeof a=="symbol")return c[a]=s,!0;let r=Number(a);return isNaN(r)&&(c[a]=s),!0},deleteProperty(c,a){if(typeof a=="symbol")return delete c[a],!0;let s=Number(a);return isNaN(s)&&delete c[a],!0},ownKeys(c){return Object.keys(c[We]())},has(c,a){if(a in c)return!0;if(typeof a=="symbol")return!1;let s=Number(a);return!isNaN(s)&&s>=0&&s<c[We]().length},defineProperty(c,a,s){return n.preventBinding(a),a in c?(Object.defineProperty(c,a,s),!0):!1},getOwnPropertyDescriptor(c,a){if(a in c||typeof a=="symbol")return;let s=Number(a),r=c[We]();if(!isNaN(s)&&r[s])return{value:r[s],writable:!1,enumerable:!0,configurable:!0}}})}get length(){return this[We]().length}get numberOfItems(){return this[We]().length}[Symbol.iterator](){return this[We]().values()}clear(){if(this[Ve])throw new this[W].TypeError("Failed to execute 'clear' on 'SVGNumberList': The object is read-only.");for(let e of this[de].items)e[M]=null,e[L]=null;this[de].items=[],this[de].attributeValue="",this[L]("")}initialize(e){if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'initialize' on 'SVGNumberList': 1 arguments required, but only ${arguments.length} present.`);if(this[Ve])throw new this[W].TypeError("Failed to execute 'initialize' on 'SVGNumberList': The object is read-only.");for(let I of this[de].items)I[M]=null,I[L]=null;return e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(I=>I[$]||"0").join(" "),this[L](this[de].attributeValue)},this[de].items=[e],this[de].attributeValue=e[$],this[L](e[$]||""),e}getItem(e){let I=this[We]();return typeof e=="number"||(e=Number(e),e=isNaN(e)?0:e),I[e]?I[e]:null}insertItemBefore(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'insertItemBefore' on 'SVGNumberList': The object is read-only.");if(arguments.length<2)throw new this[W].TypeError(`Failed to execute 'insertItemBefore' on 'SVGNumberList': 2 arguments required, but only ${arguments.length} present.`);if(!(e instanceof _d))throw new this[W].TypeError("Failed to execute 'insertItemBefore' on 'SVGNumberList': parameter 1 is not of type 'SVGNumber'.");let l=this[We](),n=l.indexOf(e);return n!==-1&&l.splice(n,1),I<0?I=0:I>l.length&&(I=l.length),l.splice(I,0,e),e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(c=>c[$]||"0").join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=l.map(c=>c[$]||"0").join(" "),this[L](this[de].attributeValue),e}replaceItem(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'replaceItem' on 'SVGNumberList': The object is read-only.");if(arguments.length<2)throw new this[W].TypeError(`Failed to execute 'replaceItem' on 'SVGNumberList': 2 arguments required, but only ${arguments.length} present.`);if(!(e instanceof _d))throw new this[W].TypeError("Failed to execute 'replaceItem' on 'SVGNumberList': parameter 1 is not of type 'SVGNumber'.");let l=this[We](),n=l.indexOf(e);if(n===I)return e;n!==-1&&l.splice(n,1),I<0?I=0:I>=l.length&&(I=l.length-1),l[I]&&(l[I][M]=null,l[I][L]=null);let c=l[I];return l[I]=e,e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(a=>a[$]||"0").join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=l.map(a=>a[$]||"0").join(" "),this[L](this[de].attributeValue),c}removeItem(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'removeItem' on 'SVGNumberList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'removeItem' on 'SVGNumberList': 1 argument required, but only ${arguments.length} present.`);let I=this[We]();if(e=Number(e),isNaN(e)&&(e=0),e>=I.length)throw new this[W].DOMException(`Failed to execute 'removeItem' on 'SVGNumberList': The index provided (${e}) is greater than the maximum bound.`,B.indexSizeError);if(e<0)throw new this[W].DOMException(`Failed to execute 'removeItem' on 'SVGNumberList': The index provided (${e}) is negative.`,B.indexSizeError);let l=I[e];return l&&(l[M]=null,l[L]=null),I.splice(e,1),this[L](I.map(n=>n[$]||"0").join(" ")),l}appendItem(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'appendItem' on 'SVGNumberList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'appendItem' on 'SVGNumberList': 1 argument required, but only ${arguments.length} present.`);if(!(e instanceof _d))throw new this[W].TypeError("Failed to execute 'appendItem' on 'SVGNumberList': parameter 1 is not of type 'SVGNumber'.");let I=this[We](),l=I.indexOf(e);return l!==-1&&I.splice(l,1),I.push(e),e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(n=>n[$]||"0").join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=I.map(n=>n[$]||"0").join(" "),this[L](this[de].attributeValue),e}[We](){let e=this[M]()??"",I=this[de];if(I.attributeValue===e)return I.items;if(I.items.length)for(let c of I.items)c[M]=null,c[L]=null;let l=[],n=e.trim();if(n){let c=n.split(iLI);for(let a=0,s=c.length;a<s;a++){let r=new _d(V,this[W],{readOnly:this[Ve],getAttribute:()=>r[$],setAttribute:()=>{this[de].attributeValue=this[We]().map(o=>o[$]||"0").join(" "),this[L](this[de].attributeValue)}});r[$]=String(parseFloat(c[a])),l.push(r)}}return I.attributeValue=e,I.items=l,l}};var Or=class{[W];[M];[L];[Mt]=null;[Tt]=null;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute}get animVal(){return this[Tt]||(this[Tt]=new $Y(V,this[W],{readOnly:!0,getAttribute:this[M],setAttribute:()=>{}})),this[Tt]}set animVal(e){}get baseVal(){return this[Mt]||(this[Mt]=new $Y(V,this[W],{getAttribute:this[M],setAttribute:this[L]})),this[Mt]}set baseVal(e){}};var of=class extends ke{static SVG_FEBLEND_TYPE_UNKNOWN=0;static SVG_FEBLEND_TYPE_MATRIX=1;static SVG_FEBLEND_TYPE_SATURATE=2;static SVG_FEBLEND_TYPE_HUEROTATE=3;static SVG_FEBLEND_TYPE_LUMINANCETOALPHA=4;[ne]=null;[De]=null;[Xr]=null;[Je]=null;[Wt]=null;[Vc]=null;[P]=null;[q]=null;[ce]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get in2(){return this[Xr]||(this[Xr]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in2"),setAttribute:e=>this.setAttribute("in2",e)})),this[Xr]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get type(){return this[Wt]||(this[Wt]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("type"),setAttribute:e=>this.setAttribute("type",e),values:["matrix","saturate","huerotate","luminancetoalpha"],defaultValue:"matrix"})),this[Wt]}get values(){return this[Vc]||(this[Vc]=new Or(V,this[W],{getAttribute:()=>this.getAttribute("values"),setAttribute:e=>this.setAttribute("values",e)})),this[Vc]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var df=class extends ke{[ne]=null;[De]=null;[Je]=null;[P]=null;[q]=null;[ce]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var bf=class extends ke{static SVG_FECOMPOSITE_OPERATOR_UNKNOWN=0;static SVG_FECOMPOSITE_OPERATOR_OVER=1;static SVG_FECOMPOSITE_OPERATOR_IN=2;static SVG_FECOMPOSITE_OPERATOR_OUT=3;static SVG_FECOMPOSITE_OPERATOR_ATOP=4;static SVG_FECOMPOSITE_OPERATOR_XOR=5;static SVG_FECOMPOSITE_OPERATOR_ARITHMETIC=6;[ne]=null;[De]=null;[Je]=null;[Wt]=null;[Vc]=null;[P]=null;[q]=null;[ce]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get type(){return this[Wt]||(this[Wt]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("type"),setAttribute:e=>this.setAttribute("type",e),values:["over","in","out","atop","xor","arithmetic"],defaultValue:"over"})),this[Wt]}get values(){return this[Vc]||(this[Vc]=new Or(V,this[W],{getAttribute:()=>this.getAttribute("values"),setAttribute:e=>this.setAttribute("values",e)})),this[Vc]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();G();var W0=class{[W];[M];[L];constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute}get animVal(){return this.baseVal}set animVal(e){}get baseVal(){return this[M]()==="true"}set baseVal(e){this[L](String(typeof e!="boolean"?!!e:e))}};G();var $d=class{[W];[M];[L];constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute}get animVal(){return this.baseVal}set animVal(e){}get baseVal(){let e=this[M]();if(!e)return 0;let I=parseInt(e);return isNaN(I)?0:I}set baseVal(e){let I=parseInt(String(e));if(isNaN(I))throw new this[W].TypeError("TypeError: Failed to set the 'baseVal' property on 'SVGAnimatedInteger': The provided float value is non-finite.");this[L](String(I))}};var mf=class extends ke{static SVG_EDGEMODE_UNKNOWN=0;static SVG_EDGEMODE_DUPLICATE=1;static SVG_EDGEMODE_WRAP=2;static SVG_EDGEMODE_NONE=3;[H3]=null;[E3]=null;[Yh]=null;[ne]=null;[De]=null;[v3]=null;[Hr]=null;[Er]=null;[C3]=null;[J3]=null;[L3]=null;[Je]=null;[k3]=null;[f3]=null;[ce]=null;[P]=null;[q]=null;get bias(){return this[H3]||(this[H3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("bias"),setAttribute:e=>this.setAttribute("bias",e)})),this[H3]}get divisor(){return this[E3]||(this[E3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("divisor"),setAttribute:e=>this.setAttribute("divisor",e)})),this[E3]}get edgeMode(){return this[Yh]||(this[Yh]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("edgeMode"),setAttribute:e=>this.setAttribute("edgeMode",e),values:["duplicate","wrap","none"],defaultValue:"duplicate"})),this[Yh]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get kernelMatrix(){return this[v3]||(this[v3]=new Or(V,this[W],{getAttribute:()=>this.getAttribute("kernelMatrix"),setAttribute:e=>this.setAttribute("kernelMatrix",e)})),this[v3]}get kernelUnitLengthX(){return this[Hr]||(this[Hr]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("kernelUnitLengthX"),setAttribute:e=>this.setAttribute("kernelUnitLengthX",e)})),this[Hr]}get kernelUnitLengthY(){return this[Er]||(this[Er]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("kernelUnitLengthY"),setAttribute:e=>this.setAttribute("kernelUnitLengthY",e)})),this[Er]}get orderX(){return this[C3]||(this[C3]=new $d(V,this[W],{getAttribute:()=>this.getAttribute("orderX"),setAttribute:e=>this.setAttribute("orderX",e)})),this[C3]}get orderY(){return this[J3]||(this[J3]=new $d(V,this[W],{getAttribute:()=>this.getAttribute("orderY"),setAttribute:e=>this.setAttribute("orderY",e)})),this[J3]}get preserveAlpha(){return this[L3]||(this[L3]=new W0(V,this[W],{getAttribute:()=>this.getAttribute("preserveAlpha"),setAttribute:e=>this.setAttribute("preserveAlpha",e)})),this[L3]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get targetX(){return this[k3]||(this[k3]=new $d(V,this[W],{getAttribute:()=>this.getAttribute("targetX"),setAttribute:e=>this.setAttribute("targetX",e)})),this[k3]}get targetY(){return this[f3]||(this[f3]=new $d(V,this[W],{getAttribute:()=>this.getAttribute("targetY"),setAttribute:e=>this.setAttribute("targetY",e)})),this[f3]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var hf=class extends ke{[x3]=null;[ne]=null;[De]=null;[Hr]=null;[Er]=null;[Je]=null;[Vh]=null;[ce]=null;[P]=null;[q]=null;get diffuseConstant(){return this[x3]||(this[x3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("diffuseConstant"),setAttribute:e=>this.setAttribute("diffuseConstant",e)})),this[x3]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get kernelUnitLengthX(){return this[Hr]||(this[Hr]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("kernelUnitLengthX"),setAttribute:e=>this.setAttribute("kernelUnitLengthX",e)})),this[Hr]}get kernelUnitLengthY(){return this[Er]||(this[Er]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("kernelUnitLengthY"),setAttribute:e=>this.setAttribute("kernelUnitLengthY",e)})),this[Er]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get surfaceScale(){return this[Vh]||(this[Vh]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("surfaceScale"),setAttribute:e=>this.setAttribute("surfaceScale",e)})),this[Vh]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var pf=class extends ke{static SVG_CHANNEL_UNKNOWN=0;static SVG_CHANNEL_R=1;static SVG_CHANNEL_G=2;static SVG_CHANNEL_B=3;static SVG_CHANNEL_A=4;[ne]=null;[De]=null;[Xr]=null;[Je]=null;[B3]=null;[ce]=null;[P]=null;[z3]=null;[q]=null;[U3]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get in2(){return this[Xr]||(this[Xr]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in2"),setAttribute:e=>this.setAttribute("in2",e)})),this[Xr]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get scale(){return this[B3]||(this[B3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("scale"),setAttribute:e=>this.setAttribute("scale",e)})),this[B3]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get xChannelSelector(){return this[z3]||(this[z3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("xChannelSelector"),setAttribute:e=>this.setAttribute("xChannelSelector",e),values:["r","g","b","a"],defaultValue:"r"})),this[z3]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}get yChannelSelector(){return this[U3]||(this[U3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("yChannelSelector"),setAttribute:e=>this.setAttribute("yChannelSelector",e),values:["r","g","b","a"],defaultValue:"r"})),this[U3]}};G();var Zf=class extends ke{[S3]=null;[O3]=null;get azimuth(){return this[S3]||(this[S3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("azimuth"),setAttribute:e=>this.setAttribute("azimuth",e)})),this[S3]}get elevation(){return this[O3]||(this[O3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("elevation"),setAttribute:e=>this.setAttribute("elevation",e)})),this[O3]}};G();var uf=class extends ke{[vr]=null;[Cr]=null;[ne]=null;[De]=null;[Je]=null;[Rh]=null;[yh]=null;[ce]=null;[P]=null;[q]=null;get dx(){return this[vr]||(this[vr]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("dx"),setAttribute:e=>this.setAttribute("dx",e)})),this[vr]}get dy(){return this[Cr]||(this[Cr]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("dy"),setAttribute:e=>this.setAttribute("dy",e)})),this[Cr]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get stdDeviationX(){return this[Rh]||(this[Rh]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("stdDeviationX"),setAttribute:e=>this.setAttribute("stdDeviationX",e),defaultValue:2})),this[Rh]}get stdDeviationY(){return this[yh]||(this[yh]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("stdDeviationY"),setAttribute:e=>this.setAttribute("stdDeviationY",e),defaultValue:2})),this[yh]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}setStdDeviation(e,I){this.stdDeviationX.baseVal=e,this.stdDeviationY.baseVal=I}};G();var Wf=class extends ke{[ne]=null;[Je]=null;[ce]=null;[P]=null;[q]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();G();var qo=class extends ke{static SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN=0;static SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY=1;static SVG_FECOMPONENTTRANSFER_TYPE_TABLE=2;static SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE=3;static SVG_FECOMPONENTTRANSFER_TYPE_LINEAR=4;static SVG_FECOMPONENTTRANSFER_TYPE_GAMMA=5;[Wt]=null;[M3]=null;[T3]=null;[j3]=null;[D3]=null;[K3]=null;[Wh]=null;get type(){return this[Wt]||(this[Wt]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("type"),setAttribute:e=>this.setAttribute("type",e),values:["identity","table","discrete","linear","gamma"],defaultValue:"identity"})),this[Wt]}get tableValues(){return this[M3]||(this[M3]=new Or(V,this[W],{getAttribute:()=>this.getAttribute("tableValues"),setAttribute:e=>this.setAttribute("tableValues",e)})),this[M3]}get slope(){return this[T3]||(this[T3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("slope"),setAttribute:e=>this.setAttribute("slope",e),defaultValue:1})),this[T3]}get intercept(){return this[j3]||(this[j3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("intercept"),setAttribute:e=>this.setAttribute("intercept",e)})),this[j3]}get amplitude(){return this[D3]||(this[D3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("amplitude"),setAttribute:e=>this.setAttribute("amplitude",e),defaultValue:1})),this[D3]}get exponent(){return this[K3]||(this[K3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("exponent"),setAttribute:e=>this.setAttribute("exponent",e),defaultValue:1})),this[K3]}get offset(){return this[Wh]||(this[Wh]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("offset"),setAttribute:e=>this.setAttribute("offset",e)})),this[Wh]}};var Nf=class extends qo{};G();var Yf=class extends qo{};G();var Vf=class extends qo{};G();var Rf=class extends qo{};G();var yf=class extends ke{static SVG_EDGEMODE_UNKNOWN=0;static SVG_EDGEMODE_DUPLICATE=1;static SVG_EDGEMODE_WRAP=2;static SVG_EDGEMODE_NONE=3;[Yh]=null;[ne]=null;[De]=null;[Je]=null;[Rh]=null;[yh]=null;[ce]=null;[P]=null;[q]=null;get edgeMode(){return this[Yh]||(this[Yh]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("edgeMode"),setAttribute:e=>this.setAttribute("edgeMode",e),values:["duplicate","wrap","none"],defaultValue:"duplicate"})),this[Yh]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get stdDeviationX(){return this[Rh]||(this[Rh]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("stdDeviationX")||"2",setAttribute:e=>this.setAttribute("stdDeviationX",e)})),this[Rh]}get stdDeviationY(){return this[yh]||(this[yh]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("stdDeviationY")||"2",setAttribute:e=>this.setAttribute("stdDeviationY",e)})),this[yh]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}setStdDeviation(e,I){this.stdDeviationX.baseVal=e,this.stdDeviationY.baseVal=I}};G();var Ff=class extends ke{[nze]=null;[ne]=null;[SI]=null;[xc]=null;[Je]=null;[ce]=null;[P]=null;[q]=null;get crossOrigin(){return this.getAttribute("crossorigin")}set crossOrigin(e){this.setAttribute("crossorigin",e)}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get href(){return this[SI]||(this[SI]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("href"),setAttribute:e=>this.setAttribute("href",e)})),this[SI]}get preserveAspectRatio(){return this[xc]||(this[xc]=new Ko(V,this[W],{getAttribute:()=>this.getAttribute("preserveAspectRatio"),setAttribute:e=>this.setAttribute("preserveAspectRatio",e)})),this[xc]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var gf=class extends ke{[ne]=null;[Je]=null;[ce]=null;[P]=null;[q]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var Qf=class extends ke{[De]=null;get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}};G();var Af=class extends ke{static SVG_MORPHOLOGY_OPERATOR_UNKNOWN=0;static SVG_MORPHOLOGY_OPERATOR_ERODE=1;static SVG_MORPHOLOGY_OPERATOR_DILATE=2;[ne]=null;[De]=null;[P3]=null;[q3]=null;[_3]=null;[Je]=null;[ce]=null;[P]=null;[q]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get operator(){return this[P3]||(this[P3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("operator"),setAttribute:e=>this.setAttribute("operator",e),values:["erode","dilate"],defaultValue:"erode"})),this[P3]}get radiusX(){return this[q3]||(this[q3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("radiusX"),setAttribute:e=>this.setAttribute("radiusX",e)})),this[q3]}get radiusY(){return this[_3]||(this[_3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("radiusY"),setAttribute:e=>this.setAttribute("radiusY",e)})),this[_3]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var wf=class extends ke{[ne]=null;[De]=null;[vr]=null;[Cr]=null;[Je]=null;[ce]=null;[P]=null;[q]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get dx(){return this[vr]||(this[vr]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("dx"),setAttribute:e=>this.setAttribute("dx",e)})),this[vr]}get dy(){return this[Cr]||(this[Cr]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("dy"),setAttribute:e=>this.setAttribute("dy",e)})),this[Cr]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var Xf=class extends ke{[P]=null;[q]=null;[as]=null;get x(){return this[P]||(this[P]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}get z(){return this[as]||(this[as]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("z"),setAttribute:e=>this.setAttribute("z",e)})),this[as]}};G();var Hf=class extends ke{[ne]=null;[De]=null;[Hr]=null;[Er]=null;[Je]=null;[$3]=null;[Fh]=null;[Vh]=null;[ce]=null;[P]=null;[q]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get kernelUnitLengthX(){return this[Hr]||(this[Hr]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("kernelUnitLengthX"),setAttribute:e=>this.setAttribute("kernelUnitLengthX",e)})),this[Hr]}get kernelUnitLengthY(){return this[Er]||(this[Er]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("kernelUnitLengthY"),setAttribute:e=>this.setAttribute("kernelUnitLengthY",e)})),this[Er]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get specularConstant(){return this[$3]||(this[$3]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("specularConstant"),setAttribute:e=>this.setAttribute("specularConstant",e),defaultValue:1})),this[$3]}get specularExponent(){return this[Fh]||(this[Fh]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("specularExponent"),setAttribute:e=>this.setAttribute("specularExponent",e),defaultValue:1})),this[Fh]}get surfaceScale(){return this[Vh]||(this[Vh]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("surfaceScale"),setAttribute:e=>this.setAttribute("surfaceScale",e),defaultValue:1})),this[Vh]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var Ef=class extends ke{[P]=null;[q]=null;[as]=null;[ek]=null;[Ik]=null;[tk]=null;[Fh]=null;[lk]=null;get x(){return this[P]||(this[P]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}get z(){return this[as]||(this[as]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("z"),setAttribute:e=>this.setAttribute("z",e)})),this[as]}get pointsAtX(){return this[ek]||(this[ek]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("pointsAtX"),setAttribute:e=>this.setAttribute("pointsAtX",e)})),this[ek]}get pointsAtY(){return this[Ik]||(this[Ik]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("pointsAtY"),setAttribute:e=>this.setAttribute("pointsAtY",e)})),this[Ik]}get pointsAtZ(){return this[tk]||(this[tk]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("pointsAtZ"),setAttribute:e=>this.setAttribute("pointsAtZ",e)})),this[tk]}get specularExponent(){return this[Fh]||(this[Fh]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("specularExponent"),setAttribute:e=>this.setAttribute("specularExponent",e),defaultValue:1})),this[Fh]}get limitingConeAngle(){return this[lk]||(this[lk]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("limitingConeAngle"),setAttribute:e=>this.setAttribute("limitingConeAngle",e)})),this[lk]}};G();var vf=class extends ke{[ne]=null;[De]=null;[Je]=null;[ce]=null;[P]=null;[q]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get in1(){return this[De]||(this[De]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("in"),setAttribute:e=>this.setAttribute("in",e)})),this[De]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var Cf=class extends ke{static SVG_TURBULENCE_TYPE_UNKNOWN=0;static SVG_TURBULENCE_TYPE_FRACTALNOISE=1;static SVG_TURBULENCE_TYPE_TURBULENCE=2;static SVG_STITCHTYPE_UNKNOWN=0;static SVG_STITCHTYPE_STITCH=1;static SVG_STITCHTYPE_NOSTITCH=2;[nk]=null;[ck]=null;[ne]=null;[ak]=null;[Je]=null;[sk]=null;[rk]=null;[Wt]=null;[ce]=null;[P]=null;[q]=null;get baseFrequencyX(){return this[nk]||(this[nk]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("baseFrequencyX"),setAttribute:e=>this.setAttribute("baseFrequencyX",e)})),this[nk]}get baseFrequencyY(){return this[ck]||(this[ck]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("baseFrequencyY"),setAttribute:e=>this.setAttribute("baseFrequencyY",e)})),this[ck]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get numOctaves(){return this[ak]||(this[ak]=new $d(V,this[W],{getAttribute:()=>this.getAttribute("numOctaves"),setAttribute:e=>this.setAttribute("numOctaves",e)})),this[ak]}get result(){return this[Je]||(this[Je]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("result"),setAttribute:e=>this.setAttribute("result",e)})),this[Je]}get seed(){return this[sk]||(this[sk]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("seed"),setAttribute:e=>this.setAttribute("seed",e)})),this[sk]}get stitchTiles(){return this[rk]||(this[rk]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("stitchTiles"),setAttribute:e=>this.setAttribute("stitchTiles",e),values:["stitch","noStitch"],defaultValue:"stitch"})),this[rk]}get type(){return this[Wt]||(this[Wt]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("type"),setAttribute:e=>this.setAttribute("type",e),values:["fractalNoise","turbulence"],defaultValue:"turbulence"})),this[Wt]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var Jf=class extends ke{[SI]=null;[m3]=null;[h3]=null;[P]=null;[q]=null;[ce]=null;[ne]=null;get href(){return this[SI]||(this[SI]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("href"),setAttribute:e=>this.setAttribute("href",e)})),this[SI]}get filterUnits(){return this[m3]||(this[m3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("filterUnits"),setAttribute:e=>this.setAttribute("filterUnits",e),values:["userSpaceOnUse","objectBoundingBox"],defaultValue:"userSpaceOnUse"})),this[m3]}get primitiveUnits(){return this[h3]||(this[h3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("primitiveUnits"),setAttribute:e=>this.setAttribute("primitiveUnits",e),values:["userSpaceOnUse","objectBoundingBox"],defaultValue:"userSpaceOnUse"})),this[h3]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var Lf=class extends Al{[P]=null;[q]=null;[ce]=null;[ne]=null;get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var kf=class extends Al{};G();var ff=class extends Al{[SI]=null;[xc]=null;[P]=null;[q]=null;[ce]=null;[ne]=null;get crossOrigin(){return this.getAttribute("crossorigin")}set crossOrigin(e){this.setAttribute("crossorigin",e)}get href(){return this[SI]||(this[SI]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("href"),setAttribute:e=>this.setAttribute("href",e)})),this[SI]}get decoding(){let e=this.getAttribute("decoding");switch(e){case"sync":case"async":case"auto":return e;default:return"auto"}}set decoding(e){this.setAttribute("decoding",e)}get preserveAspectRatio(){return this[xc]||(this[xc]=new Ko(V,this[W],{getAttribute:()=>this.getAttribute("preserveAspectRatio"),setAttribute:e=>this.setAttribute("preserveAspectRatio",e)})),this[xc]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}decode(){return Promise.resolve()}};G();var xf=class extends sa{[hh]=null;[ph]=null;[Zh]=null;[uh]=null;get x1(){return this[hh]||(this[hh]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x1"),setAttribute:e=>this.setAttribute("x1",e)})),this[hh]}get y1(){return this[ph]||(this[ph]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y1"),setAttribute:e=>this.setAttribute("y1",e)})),this[ph]}get x2(){return this[Zh]||(this[Zh]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x2"),setAttribute:e=>this.setAttribute("x2",e)})),this[Zh]}get y2(){return this[uh]||(this[uh]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y2"),setAttribute:e=>this.setAttribute("y2",e)})),this[uh]}};G();G();var Wu=class extends Al{static SVG_SPREADMETHOD_UNKNOWN=0;static SVG_SPREADMETHOD_PAD=1;static SVG_SPREADMETHOD_REFLECT=2;static SVG_SPREADMETHOD_REPEAT=3;[SI]=null;[p3]=null;[Z3]=null;[u3]=null;get href(){return this[SI]||(this[SI]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("href"),setAttribute:e=>this.setAttribute("href",e)})),this[SI]}get gradientUnits(){return this[p3]||(this[p3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("gradientUnits"),setAttribute:e=>this.setAttribute("gradientUnits",e),values:["userSpaceOnUse","objectBoundingBox"],defaultValue:"objectBoundingBox"})),this[p3]}get gradientTransform(){return this[Z3]||(this[Z3]=new Rb(V,this[W],{getAttribute:()=>this.getAttribute("gradientTransform"),setAttribute:e=>this.setAttribute("gradientTransform",e)})),this[Z3]}get spreadMethod(){return this[u3]||(this[u3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("spreadMethod"),setAttribute:e=>this.setAttribute("spreadMethod",e),values:["pad","reflect","repeat"],defaultValue:"pad"})),this[u3]}};var Bf=class extends Wu{[hh]=null;[ph]=null;[Zh]=null;[uh]=null;get x1(){return this[hh]||(this[hh]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x1"),setAttribute:e=>this.setAttribute("x1",e)})),this[hh]}get y1(){return this[ph]||(this[ph]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y1"),setAttribute:e=>this.setAttribute("y1",e)})),this[ph]}get x2(){return this[Zh]||(this[Zh]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x2"),setAttribute:e=>this.setAttribute("x2",e)})),this[Zh]}get y2(){return this[uh]||(this[uh]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y2"),setAttribute:e=>this.setAttribute("y2",e)})),this[uh]}};G();G();var N0=class{[W];[M];[L];[Mt]=null;[Tt]=null;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute}get animVal(){return this[Tt]||(this[Tt]=new Oh(V,this[W],{readOnly:!0,getAttribute:this[M]})),this[Tt]}set animVal(e){}get baseVal(){return this[Mt]||(this[Mt]=new Oh(V,this[W],{getAttribute:this[M],setAttribute:this[L]})),this[Mt]}set baseVal(e){}};var zf=class extends ke{static SVG_MARKER_ORIENT_UNKNOWN=0;static SVG_MARKER_ORIENT_AUTO=1;static SVG_MARKER_ORIENT_ANGLE=2;static SVG_MARKERUNITS_UNKNOWN=0;static SVG_MARKERUNITS_USERSPACEONUSE=1;static SVG_MARKERUNITS_STROKEWIDTH=2;SVG_MARKER_ORIENT_UNKNOWN=0;SVG_MARKER_ORIENT_AUTO=1;SVG_MARKER_ORIENT_ANGLE=2;[n3]=null;[c3]=null;[a3]=null;[s3]=null;[r3]=null;[G3]=null;[o3]=null;[Gh]=null;[xc]=null;get markerUnits(){return this[n3]||(this[n3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("markerUnits"),setAttribute:e=>this.setAttribute("markerUnits",e),values:["userSpaceOnUse","strokeWidth"],defaultValue:"strokeWidth"})),this[n3]}get markerWidth(){return this[c3]||(this[c3]=new T(V,this[W],{getAttribute:()=>this.getAttribute("markerWidth"),setAttribute:e=>this.setAttribute("markerWidth",e)})),this[c3]}get markerHeight(){return this[a3]||(this[a3]=new T(V,this[W],{getAttribute:()=>this.getAttribute("markerHeight"),setAttribute:e=>this.setAttribute("markerHeight",e)})),this[a3]}get orientType(){return this[s3]||(this[s3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("orient"),setAttribute:e=>this.setAttribute("orient",e),values:["auto",null],defaultValue:"auto"})),this[s3]}get orientAngle(){return this[r3]||(this[r3]=new N0(V,this[W],{getAttribute:()=>this.getAttribute("orient"),setAttribute:e=>this.setAttribute("orient",e)})),this[r3]}get refX(){return this[G3]||(this[G3]=new T(V,this[W],{getAttribute:()=>this.getAttribute("refX"),setAttribute:e=>this.setAttribute("refX",e)})),this[G3]}get refY(){return this[o3]||(this[o3]=new T(V,this[W],{getAttribute:()=>this.getAttribute("refY"),setAttribute:e=>this.setAttribute("refY",e)})),this[o3]}get viewBox(){return this[Gh]||(this[Gh]=new Zu(V,this[W],{getAttribute:()=>this.getAttribute("viewBox"),setAttribute:e=>this.setAttribute("viewBox",e)})),this[Gh]}get preserveAspectRatio(){return this[xc]||(this[xc]=new Ko(V,this[W],{getAttribute:()=>this.getAttribute("preserveAspectRatio"),setAttribute:e=>this.setAttribute("preserveAspectRatio",e)})),this[xc]}setOrientToAuto(){this.setAttribute("orient","auto")}setOrientToAngle(e){this.setAttribute("orient",e.valueAsString)}};G();var Uf=class extends ke{[i3]=null;[b3]=null;[P]=null;[q]=null;[ce]=null;[ne]=null;get maskUnits(){return this[i3]||(this[i3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("maskUnits"),setAttribute:e=>this.setAttribute("maskUnits",e),values:["userSpaceOnUse","objectBoundingBox"],defaultValue:"userSpaceOnUse"})),this[i3]}get maskContentUnits(){return this[b3]||(this[b3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("maskContentUnits"),setAttribute:e=>this.setAttribute("maskContentUnits",e),values:["userSpaceOnUse","objectBoundingBox"],defaultValue:"userSpaceOnUse"})),this[b3]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();var Sf=class extends ke{};G();var Of=class extends ke{[SI]=null;get href(){return this[SI]||(this[SI]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("href"),setAttribute:e=>this.setAttribute("href",e)})),this[SI]}};G();var Mf=class extends sa{};G();var Tf=class extends ke{[SI]=null;[W3]=null;[N3]=null;[Y3]=null;[P]=null;[q]=null;[ce]=null;[ne]=null;get href(){return this[SI]||(this[SI]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("href"),setAttribute:e=>this.setAttribute("href",e)})),this[SI]}get patternUnits(){return this[W3]||(this[W3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("patternUnits"),setAttribute:e=>this.setAttribute("patternUnits",e),values:["userSpaceOnUse","objectBoundingBox"],defaultValue:"objectBoundingBox"})),this[W3]}get patternContentUnits(){return this[N3]||(this[N3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("patternContentUnits"),setAttribute:e=>this.setAttribute("patternContentUnits",e),values:["userSpaceOnUse","objectBoundingBox"],defaultValue:"userSpaceOnUse"})),this[N3]}get patternTransform(){return this[Y3]||(this[Y3]=new Rb(V,this[W],{getAttribute:()=>this.getAttribute("patternTransform"),setAttribute:e=>this.setAttribute("patternTransform",e)})),this[Y3]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}};G();G();var bLI=/[\t\f\n\r, ]+/,yb=class t{[W];[M];[L];[Ve]=!1;[de]={items:[],attributeValue:""};constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[Ve]=!!l.readOnly,this[M]=l.getAttribute,this[L]=l.setAttribute;let n=new Zl(this,[t]);return new Proxy(this,{get:(c,a)=>{if(a==="length"||a==="numberOfItems")return c[We]().length;if(a in c||typeof a=="symbol")return n.bind(a),c[a];let s=Number(a);if(!isNaN(s))return c[We]()[s]},set(c,a,s){if(n.bind(a),typeof a=="symbol")return c[a]=s,!0;let r=Number(a);return isNaN(r)&&(c[a]=s),!0},deleteProperty(c,a){if(typeof a=="symbol")return delete c[a],!0;let s=Number(a);return isNaN(s)&&delete c[a],!0},ownKeys(c){return Object.keys(c[We]())},has(c,a){if(a in c)return!0;if(typeof a=="symbol")return!1;let s=Number(a);return!isNaN(s)&&s>=0&&s<c[We]().length},defineProperty(c,a,s){return n.preventBinding(a),a in c?(Object.defineProperty(c,a,s),!0):!1},getOwnPropertyDescriptor(c,a){if(a in c||typeof a=="symbol")return;let s=Number(a),r=c[We]();if(!isNaN(s)&&r[s])return{value:r[s],writable:!1,enumerable:!0,configurable:!0}}})}get length(){return this[We]().length}get numberOfItems(){return this[We]().length}[Symbol.iterator](){return this[We]().values()}clear(){if(this[Ve])throw new this[W].TypeError("Failed to execute 'clear' on 'SVGPointList': The object is read-only.");for(let e of this[de].items)e[M]=null,e[L]=null;this[de].items=[],this[de].attributeValue="",this[L]("")}initialize(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'initialize' on 'SVGPointList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'initialize' on 'SVGPointList': 1 arguments required, but only ${arguments.length} present.`);if(!(e instanceof Fc))throw new this[W].TypeError("Failed to execute 'appendItem' on 'SVGPointList': parameter 1 is not of type 'SVGPoint'.");for(let I of this[de].items)I[M]=null,I[L]=null;return e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(I=>I[$]||"0 0").join(" "),this[L](this[de].attributeValue)},this[de].items=[e],this[de].attributeValue=e[$],this[L](e[$]||""),e}getItem(e){let I=this[We]();return typeof e=="number"||(e=Number(e),e=isNaN(e)?0:e),I[e]?I[e]:null}insertItemBefore(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'insertItemBefore' on 'SVGPointList': The object is read-only.");if(arguments.length<2)throw new this[W].TypeError(`Failed to execute 'insertItemBefore' on 'SVGPointList': 2 arguments required, but only ${arguments.length} present.`);if(!(e instanceof Fc))throw new this[W].TypeError("Failed to execute 'insertItemBefore' on 'SVGPointList': parameter 1 is not of type 'SVGPoint'.");let l=this[We](),n=l.indexOf(e);return n!==-1&&l.splice(n,1),I<0?I=0:I>l.length&&(I=l.length),l.splice(I,0,e),e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(c=>c[$]||"0 0").join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=l.map(c=>c[$]||"0 0").join(" "),this[L](this[de].attributeValue),e}replaceItem(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'replaceItem' on 'SVGPointList': The object is read-only.");if(arguments.length<2)throw new this[W].TypeError(`Failed to execute 'replaceItem' on 'SVGPointList': 2 arguments required, but only ${arguments.length} present.`);if(!(e instanceof Fc))throw new this[W].TypeError("Failed to execute 'replaceItem' on 'SVGPointList': parameter 1 is not of type 'SVGPoint'.");let l=this[We](),n=l.indexOf(e);if(n===I)return e;n!==-1&&l.splice(n,1),I<0?I=0:I>=l.length&&(I=l.length-1),l[I]&&(l[I][M]=null,l[I][L]=null);let c=l[I];return l[I]=e,e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(a=>a[$]||"0 0").join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=l.map(a=>a[$]||"0 0").join(" "),this[L](this[de].attributeValue),c}removeItem(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'removeItem' on 'SVGPointList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'removeItem' on 'SVGPointList': 1 argument required, but only ${arguments.length} present.`);let I=this[We]();if(e=Number(e),isNaN(e)&&(e=0),e>=I.length)throw new this[W].DOMException(`Failed to execute 'removeItem' on 'SVGPointList': The index provided (${e}) is greater than the maximum bound.`,B.indexSizeError);if(e<0)throw new this[W].DOMException(`Failed to execute 'removeItem' on 'SVGPointList': The index provided (${e}) is negative.`,B.indexSizeError);let l=I[e];return l&&(l[M]=null,l[L]=null),I.splice(e,1),this[L](I.map(n=>n[$]||"0 0").join(" ")),l}appendItem(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'appendItem' on 'SVGPointList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'appendItem' on 'SVGPointList': 1 argument required, but only ${arguments.length} present.`);if(!(e instanceof Fc))throw new this[W].TypeError("Failed to execute 'appendItem' on 'SVGPointList': parameter 1 is not of type 'SVGPoint'.");let I=this[We](),l=I.indexOf(e);return l!==-1&&I.splice(l,1),I.push(e),e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(n=>n[$]||"0 0").join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=I.map(n=>n[$]||"0 0").join(" "),this[L](this[de].attributeValue),e}[We](){let e=this[M]()??"",I=this[de];if(I.attributeValue===e)return I.items;if(I.items.length)for(let c of I.items)c[M]=null,c[L]=null;let l=[],n=e.trim();if(n){let c=n.split(bLI);for(let a=0,s=c.length;a<s;a+=2){let r=parseFloat(c[a]),o=c[a+1]!==void 0?" "+parseFloat(c[a+1]):"",d=new Fc(V,this[W],{readOnly:this[Ve],getAttribute:()=>d[$],setAttribute:()=>{this[de].attributeValue=this[We]().map(i=>i[$]||"0 0").join(" "),this[L](this[de].attributeValue)}});d[$]=`${r}${o}`,l.push(d)}}return I.attributeValue=e,I.items=l,l}};var jf=class extends sa{[oh]=null;[dh]=null;get animatedPoints(){return this[oh]||(this[oh]=new yb(V,this[W],{readOnly:!0,getAttribute:()=>this.getAttribute("points"),setAttribute:()=>{}})),this[oh]}get points(){return this[dh]||(this[dh]=new yb(V,this[W],{getAttribute:()=>this.getAttribute("points"),setAttribute:e=>this.setAttribute("points",e)})),this[dh]}};G();var Df=class extends sa{[oh]=null;[dh]=null;get animatedPoints(){return this[oh]||(this[oh]=new yb(V,this[W],{readOnly:!0,getAttribute:()=>this.getAttribute("points"),setAttribute:()=>{}})),this[oh]}get points(){return this[dh]||(this[dh]=new yb(V,this[W],{getAttribute:()=>this.getAttribute("points"),setAttribute:e=>this.setAttribute("points",e)})),this[dh]}};G();var Kf=class extends Wu{[Ar]=null;[wr]=null;[mh]=null;[V3]=null;[R3]=null;get cx(){return this[Ar]||(this[Ar]=new T(V,this[W],{getAttribute:()=>this.getAttribute("cx"),setAttribute:e=>this.setAttribute("cx",e)})),this[Ar]}get cy(){return this[wr]||(this[wr]=new T(V,this[W],{getAttribute:()=>this.getAttribute("cy"),setAttribute:e=>this.setAttribute("cy",e)})),this[wr]}get r(){return this[mh]||(this[mh]=new T(V,this[W],{getAttribute:()=>this.getAttribute("r"),setAttribute:e=>this.setAttribute("r",e)})),this[mh]}get fx(){return this[V3]||(this[V3]=new T(V,this[W],{getAttribute:()=>this.getAttribute("fx"),setAttribute:e=>this.setAttribute("fx",e)})),this[V3]}get fy(){return this[R3]||(this[R3]=new T(V,this[W],{getAttribute:()=>this.getAttribute("fy"),setAttribute:e=>this.setAttribute("fy",e)})),this[R3]}};G();var Pf=class extends sa{[P]=null;[q]=null;[ce]=null;[ne]=null;[ih]=null;[bh]=null;get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get rx(){return this[ih]||(this[ih]=new T(V,this[W],{getAttribute:()=>this.getAttribute("rx"),setAttribute:e=>this.setAttribute("rx",e)})),this[ih]}get ry(){return this[bh]||(this[bh]=new T(V,this[W],{getAttribute:()=>this.getAttribute("ry"),setAttribute:e=>this.setAttribute("ry",e)})),this[bh]}};G();var qf=class extends Al{[SI]=null;get href(){return this[SI]||(this[SI]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("href"),setAttribute:e=>this.setAttribute("href",e)})),this[SI]}get type(){return this.getAttribute("type")||""}set type(e){this.setAttribute("type",e)}};G();var _f=class extends Po{};G();var $f=class extends ke{[Wh]=null;get offset(){return this[Wh]||(this[Wh]=new $e(V,this[W],{getAttribute:()=>this.getAttribute("offset"),setAttribute:e=>this.setAttribute("offset",e)})),this[Wh]}};G();var e9=class extends ke{[ac]=null;[Ca]=this;[oY]=!1;get media(){return this.getAttribute("media")||"all"}set media(e){this.setAttribute("media",e)}get type(){return this.getAttribute("type")||"text/css"}set type(e){this.setAttribute("type",e)}get title(){return this.getAttribute("title")||""}set title(e){this.setAttribute("title",e)}get disabled(){return this[oY]}set disabled(e){this[oY]=!!e}get sheet(){return this[fe]?(this[ac]||(this[ac]=new this[O][W].CSSStyleSheet,this[ac].replaceSync(this.textContent)),this[ac]):null}[ls](){super[ls](),this[ac]=null}[aY](){this[ac]&&this[ac].replaceSync(this.textContent)}};G();var I9=class extends Al{};G();var t9=class extends Al{};G();G();G();var Y0=class extends Al{static LENGTHADJUST_UNKNOWN=0;static LENGTHADJUST_SPACING=1;static LENGTHADJUST_SPACINGANDGLYPHS=2;[y3]=null;[F3]=null;get textLength(){return this[y3]||(this[y3]=new T(V,this[W],{getAttribute:()=>this.getAttribute("textLength"),setAttribute:e=>this.setAttribute("textLength",e)})),this[y3]}get lengthAdjust(){return this[F3]||(this[F3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("lengthAdjust"),setAttribute:e=>this.setAttribute("lengthAdjust",e),values:["spacing","spacingAndGlyphs"],defaultValue:"spacing"})),this[F3]}getNumberOfChars(){return 0}getComputedTextLength(){return 0}getSubStringLength(e,I){return 0}getStartPositionOfChar(e){return new Fc(V,this[W])}getEndPositionOfChar(e){return new Fc(V,this[W])}getExtentOfChar(e){return new Pd(V,this[W])}getRotationOfChar(e){return 0}getCharNumAtPosition(e){return 0}};G();G();var mLI=/[\t\f\n\r, ]+/,eV=class t{[W];[M];[L];[Ve]=!1;[de]={items:[],attributeValue:""};constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[Ve]=!!l.readOnly,this[M]=l.getAttribute,this[L]=l.setAttribute;let n=new Zl(this,[t]);return new Proxy(this,{get:(c,a)=>{if(a==="length"||a==="numberOfItems")return c[We]().length;if(a in c||typeof a=="symbol")return n.bind(a),c[a];let s=Number(a);if(!isNaN(s))return c[We]()[s]},set(c,a,s){if(n.bind(a),typeof a=="symbol")return c[a]=s,!0;let r=Number(a);return isNaN(r)&&(c[a]=s),!0},deleteProperty(c,a){if(typeof a=="symbol")return delete c[a],!0;let s=Number(a);return isNaN(s)&&delete c[a],!0},ownKeys(c){return Object.keys(c[We]())},has(c,a){if(a in c)return!0;if(typeof a=="symbol")return!1;let s=Number(a);return!isNaN(s)&&s>=0&&s<c[We]().length},defineProperty(c,a,s){return n.preventBinding(a),a in c?(Object.defineProperty(c,a,s),!0):!1},getOwnPropertyDescriptor(c,a){if(a in c||typeof a=="symbol")return;let s=Number(a),r=c[We]();if(!isNaN(s)&&r[s])return{value:r[s],writable:!1,enumerable:!0,configurable:!0}}})}get length(){return this[We]().length}get numberOfItems(){return this[We]().length}[Symbol.iterator](){return this[We]().values()}clear(){this[L]("")}initialize(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'initialize' on 'SVGLengthList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'initialize' on 'SVGLengthList': 1 arguments required, but only ${arguments.length} present.`);for(let I of this[de].items)I[M]=null,I[L]=null;return e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(I=>I[$]??"0").join(" "),this[L](this[de].attributeValue)},this[de].items=[e],this[de].attributeValue=e[$],this[L](e[$]||""),e}getItem(e){let I=this[We]();return typeof e=="number"||(e=Number(e),e=isNaN(e)?0:e),I[e]?I[e]:null}insertItemBefore(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'insertItemBefore' on 'SVGLengthList': The object is read-only.");if(arguments.length<2)throw new this[W].TypeError(`Failed to execute 'insertItemBefore' on 'SVGLengthList': 2 arguments required, but only ${arguments.length} present.`);let l=this[We](),n=l.indexOf(e);return n!==-1&&l.splice(n,1),I<0?I=0:I>l.length&&(I=l.length),l.splice(I,0,e),e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(c=>c[$]??"0").join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=l.map(c=>c[$]??"0").join(" "),this[L](this[de].attributeValue),e}replaceItem(e,I){if(this[Ve])throw new this[W].TypeError("Failed to execute 'replaceItem' on 'SVGLengthList': The object is read-only.");if(arguments.length<2)throw new this[W].TypeError(`Failed to execute 'replaceItem' on 'SVGLengthList': 2 arguments required, but only ${arguments.length} present.`);let l=this[We](),n=l.indexOf(e);if(n===I)return e;n!==-1&&l.splice(n,1),I<0?I=0:I>=l.length&&(I=l.length-1),l[I]&&(l[I][M]=null,l[I][L]=null);let c=l[I];return l[I]=e,e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(a=>a[$]??"0").join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=l.map(a=>a[$]??"0").join(" "),this[L](this[de].attributeValue),c}removeItem(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'removeItem' on 'SVGLengthList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'removeItem' on 'SVGLengthList': 1 argument required, but only ${arguments.length} present.`);let I=this[We]();if(e=Number(e),isNaN(e)&&(e=0),e>=I.length)throw new this[W].DOMException(`Failed to execute 'removeItem' on 'SVGLengthList': The index provided (${e}) is greater than the maximum bound.`,B.indexSizeError);if(e<0)throw new this[W].DOMException(`Failed to execute 'removeItem' on 'SVGLengthList': The index provided (${e}) is negative.`,B.indexSizeError);let l=I[e];return l&&(l[M]=null,l[L]=null),I.splice(e,1),this[L](I.map(n=>n[$]??"0").join(" ")),l}appendItem(e){if(this[Ve])throw new this[W].TypeError("Failed to execute 'appendItem' on 'SVGLengthList': The object is read-only.");if(arguments.length<1)throw new this[W].TypeError(`Failed to execute 'appendItem' on 'SVGLengthList': 1 argument required, but only ${arguments.length} present.`);let I=this[We](),l=I.indexOf(e);return l!==-1&&I.splice(l,1),I.push(e),e[M]=()=>e[$],e[L]=()=>{this[de].attributeValue=this[We]().map(n=>n[$]??"0").join(" "),this[L](this[de].attributeValue)},this[de].attributeValue=I.map(n=>n[$]??"0").join(" "),this[L](this[de].attributeValue),e}[We](){let e=this[M]()??"",I=this[de];if(I.attributeValue===e)return I.items;if(I.items.length)for(let c of I.items)c[M]=null,c[L]=null;let l=[],n=e.trim();if(n){let c=n.split(mLI);for(let a=0,s=c.length;a<s;a++){let r=new qd(V,this[W],{readOnly:this[Ve],getAttribute:()=>r[$],setAttribute:o=>{r[$]=o;let d=l.map(i=>i[$]??"0").join(" ");I.attributeValue=d,this[L](d)}});r[$]=c[a],l.push(r)}}return I.attributeValue=e,I.items=l,l}};var Mh=class{[W];[M];[L];[Mt]=null;[Tt]=null;constructor(e,I,l){if(e!==V)throw new TypeError("Illegal constructor");this[W]=I,this[M]=l.getAttribute,this[L]=l.setAttribute}get animVal(){return this[Tt]||(this[Tt]=new eV(V,this[W],{readOnly:!0,getAttribute:this[M],setAttribute:this[L]})),this[Tt]}set animVal(e){}get baseVal(){return this[Mt]||(this[Mt]=new eV(V,this[W],{getAttribute:this[M],setAttribute:this[L]})),this[Mt]}set baseVal(e){}};var Nu=class extends Y0{[P]=null;[q]=null;[vr]=null;[Cr]=null;[bk]=null;get x(){return this[P]||(this[P]=new Mh(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new Mh(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}get dx(){return this[vr]||(this[vr]=new Mh(V,this[W],{getAttribute:()=>this.getAttribute("dx"),setAttribute:e=>this.setAttribute("dx",e)})),this[vr]}get dy(){return this[Cr]||(this[Cr]=new Mh(V,this[W],{getAttribute:()=>this.getAttribute("dy"),setAttribute:e=>this.setAttribute("dy",e)})),this[Cr]}get rotate(){return this[bk]||(this[bk]=new Or(V,this[W],{getAttribute:()=>this.getAttribute("rotate"),setAttribute:e=>this.setAttribute("rotate",e)})),this[bk]}};var l9=class extends Nu{};G();var n9=class extends Y0{static TEXTPATH_METHODTYPE_UNKNOWN=0;static TEXTPATH_METHODTYPE_ALIGN=1;static TEXTPATH_METHODTYPE_STRETCH=2;static TEXTPATH_SPACINGTYPE_UNKNOWN=0;static TEXTPATH_SPACINGTYPE_AUTO=1;static TEXTPATH_SPACINGTYPE_EXACT=2;[SI]=null;[w3]=null;[TZ]=null;[X3]=null;get href(){return this[SI]||(this[SI]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("href"),setAttribute:e=>this.setAttribute("href",e)})),this[SI]}get startOffset(){return this[w3]||(this[w3]=new T(V,this[W],{getAttribute:()=>this.getAttribute("startOffset"),setAttribute:e=>this.setAttribute("startOffset",e)})),this[w3]}get method(){return this[TZ]||(this[TZ]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("method"),setAttribute:e=>this.setAttribute("method",e),values:["align","stretch"],defaultValue:"align"})),this[TZ]}get spacing(){return this[X3]||(this[X3]=new EI(V,this[W],{getAttribute:()=>this.getAttribute("spacing"),setAttribute:e=>this.setAttribute("spacing",e),values:["auto","exact"],defaultValue:"exact"})),this[X3]}};G();var c9=class extends ke{};G();var a9=class extends Nu{};G();var s9=class extends Al{[SI]=null;[P]=null;[q]=null;[ce]=null;[ne]=null;get href(){return this[SI]||(this[SI]=new Me(V,this[W],{getAttribute:()=>this.getAttribute("href"),setAttribute:e=>this.setAttribute("href",e)})),this[SI]}get x(){return this[P]||(this[P]=new T(V,this[W],{getAttribute:()=>this.getAttribute("x"),setAttribute:e=>this.setAttribute("x",e)})),this[P]}get y(){return this[q]||(this[q]=new T(V,this[W],{getAttribute:()=>this.getAttribute("y"),setAttribute:e=>this.setAttribute("y",e)})),this[q]}get width(){return this[ce]||(this[ce]=new T(V,this[W],{getAttribute:()=>this.getAttribute("width"),setAttribute:e=>this.setAttribute("width",e)})),this[ce]}get height(){return this[ne]||(this[ne]=new T(V,this[W],{getAttribute:()=>this.getAttribute("height"),setAttribute:e=>this.setAttribute("height",e)})),this[ne]}};G();var r9=class extends ke{};G();var G9=class{static SVG_UNIT_TYPE_UNKNOWN=0;static SVG_UNIT_TYPE_USERSPACEONUSE=1;static SVG_UNIT_TYPE_OBJECTBOUNDINGBOX=2;SVG_UNIT_TYPE_UNKNOWN=0;SVG_UNIT_TYPE_USERSPACEONUSE=1;SVG_UNIT_TYPE_OBJECTBOUNDINGBOX=2;constructor(e){if(e!==V)throw new TypeError("Illegal constructor")}};G();var o9=class{window;constructor(e){this.window=e}enqueueReaction(e,I,l){let n=this.window.customElements[lb]?.get(e.localName);if(n&&e[O]===this.window.document)switch(I){case"connectedCallback":if(n.livecycleCallbacks.connectedCallback){let c=n.livecycleCallbacks.connectedCallback?.call(e);if(c instanceof Promise){let a=new Ke(this.window).getAsyncTaskManager();if(a){let s=a.startTask();c.then(()=>a.endTask(s)).catch(()=>a.endTask(s))}}}break;case"disconnectedCallback":n.livecycleCallbacks.disconnectedCallback&&n.livecycleCallbacks.disconnectedCallback.call(e);break;case"attributeChangedCallback":n.livecycleCallbacks.attributeChangedCallback&&l?.length&&n.observedAttributes.has(l[0])&&n.livecycleCallbacks.attributeChangedCallback.apply(e,l);break}}};G();var IE=class extends K{state;hasUAVisualTransition;constructor(e,I=null){super(e),this.state=I?.state??null,this.hasUAVisualTransition=I?.hasUAVisualTransition??!1}};var IV={setTimeout:globalThis.setTimeout.bind(globalThis),clearTimeout:globalThis.clearTimeout.bind(globalThis),setInterval:globalThis.setInterval.bind(globalThis),clearInterval:globalThis.clearInterval.bind(globalThis),queueMicrotask:globalThis.queueMicrotask.bind(globalThis),setImmediate:globalThis.setImmediate.bind(globalThis),clearImmediate:globalThis.clearImmediate.bind(globalThis)},qie=setTimeout.toString().includes("new Timeout"),_ie=class{constructor(){throw new TypeError("Illegal constructor")}},QP=class{callback;constructor(e){this.callback=e}},zG=class t extends tt{Node=dI;Attr=yX;ShadowRoot=XH;ProcessingInstruction=wH;Element=aa;CharacterData=ub;DocumentType=Ch;HTMLAnchorElement=FX;HTMLButtonElement=EX;HTMLOptGroupElement=aH;HTMLOptionElement=zh;HTMLElement=ae;HTMLUnknownElement=QH;HTMLTemplateElement=VH;HTMLInputElement=Ss;HTMLSelectElement=mH;HTMLTextAreaElement=ru;HTMLImageElement=OY;HTMLStyleElement=ZH;HTMLLabelElement=KX;HTMLSlotElement=kie;HTMLMetaElement=tH;HTMLMediaElement=xh;HTMLAudioElement=fY;HTMLVideoElement=AH;HTMLBaseElement=AX;HTMLDialogElement=fX;HTMLScriptElement=bH;HTMLLinkElement=$X;HTMLIFrameElement=DX;HTMLFormElement=SX;HTMLUListElement=gH;HTMLTrackElement=FH;HTMLTableRowElement=YH;HTMLTitleElement=yH;HTMLTimeElement=RH;HTMLTableSectionElement=Yb;HTMLTableCellElement=uH;HTMLTableElement=NH;HTMLSpanElement=pH;HTMLSourceElement=hH;HTMLQuoteElement=iH;HTMLProgressElement=dH;HTMLPreElement=oH;HTMLPictureElement=GH;HTMLParamElement=rH;HTMLParagraphElement=sH;HTMLOutputElement=BY;HTMLOListElement=cH;HTMLObjectElement=xY;HTMLMeterElement=lH;HTMLMenuElement=IH;HTMLMapElement=eH;HTMLLIElement=qX;HTMLLegendElement=PX;HTMLModElement=nH;HTMLHtmlElement=jX;HTMLHRElement=TX;HTMLHeadElement=OX;HTMLHeadingElement=MX;HTMLFieldSetElement=zY;HTMLEmbedElement=BX;HTMLDListElement=CX;HTMLDivElement=xX;HTMLDetailsElement=kX;HTMLDataListElement=LX;HTMLDataElement=JX;HTMLTableColElement=WH;HTMLTableCaptionElement=MY;HTMLCanvasElement=vX;HTMLBRElement=XX;HTMLBodyElement=wX;HTMLAreaElement=gX;SVGSVGElement=eE;SVGAnimateElement=If;SVGAnimateMotionElement=tf;SVGAnimateTransformElement=lf;SVGCircleElement=nf;SVGClipPathElement=cf;SVGDefsElement=af;SVGDescElement=sf;SVGEllipseElement=rf;SVGFEBlendElement=Gf;SVGFEColorMatrixElement=of;SVGFEComponentTransferElement=df;SVGFECompositeElement=bf;SVGFEConvolveMatrixElement=mf;SVGFEDiffuseLightingElement=hf;SVGFEDisplacementMapElement=pf;SVGFEDistantLightElement=Zf;SVGFEDropShadowElement=uf;SVGFEFloodElement=Wf;SVGFEFuncAElement=Nf;SVGFEFuncBElement=Yf;SVGFEFuncGElement=Vf;SVGFEFuncRElement=Rf;SVGFEGaussianBlurElement=yf;SVGFEImageElement=Ff;SVGFEMergeElement=gf;SVGFEMergeNodeElement=Qf;SVGFEMorphologyElement=Af;SVGFEOffsetElement=wf;SVGFEPointLightElement=Xf;SVGFESpecularLightingElement=Hf;SVGFESpotLightElement=Ef;SVGFETileElement=vf;SVGFETurbulenceElement=Cf;SVGFilterElement=Jf;SVGForeignObjectElement=Lf;SVGGElement=kf;SVGImageElement=ff;SVGLineElement=xf;SVGLinearGradientElement=Bf;SVGMarkerElement=zf;SVGMaskElement=Uf;SVGMetadataElement=Sf;SVGMPathElement=Of;SVGPathElement=Mf;SVGPatternElement=Tf;SVGPolygonElement=jf;SVGPolylineElement=Df;SVGRadialGradientElement=Kf;SVGRectElement=Pf;SVGScriptElement=qf;SVGSetElement=_f;SVGStopElement=$f;SVGStyleElement=e9;SVGSwitchElement=I9;SVGSymbolElement=t9;SVGTextElement=l9;SVGTextPathElement=n9;SVGTitleElement=c9;SVGTSpanElement=a9;SVGUseElement=s9;SVGViewElement=r9;SVGElement=ke;SVGAnimationElement=Po;SVGComponentTransferFunctionElement=qo;SVGGeometryElement=sa;SVGGradientElement=Wu;SVGTextPositioningElement=Nu;SVGGraphicsElement=Al;Event=K;UIEvent=zc;CustomEvent=bX;AnimationEvent=dX;KeyboardEvent=hX;MessageEvent=pX;MouseEvent=Tn;PointerEvent=AY;FocusEvent=mb;WheelEvent=uX;InputEvent=mX;ErrorEvent=Hh;StorageEvent=gk;SubmitEvent=wY;ProgressEvent=kr;MediaQueryListEvent=ZY;HashChangeEvent=QY;ClipboardEvent=iX;TouchEvent=ZX;PopStateEvent=IE;Touch=oX;AudioProcessingEvent=K;BeforeInputEvent=K;BeforeUnloadEvent=K;BlobEvent=K;CloseEvent=K;CompositionEvent=K;CSSFontFaceLoadEvent=K;DeviceLightEvent=K;DeviceMotionEvent=K;DeviceOrientationEvent=K;DeviceProximityEvent=K;DOMTransactionEvent=K;DragEvent=K;EditingBeforeInputEvent=K;FetchEvent=K;GamepadEvent=K;IDBVersionChangeEvent=K;MediaStreamEvent=K;MutationEvent=K;OfflineAudioCompletionEvent=K;OverconstrainedError=K;PageTransitionEvent=K;PaymentRequestUpdateEvent=K;RelatedEvent=K;RTCDataChannelEvent=K;RTCIdentityErrorEvent=K;RTCIdentityEvent=K;RTCPeerConnectionIceEvent=K;SensorEvent=K;SVGEvent=K;SVGZoomEvent=K;TimeEvent=K;TrackEvent=K;TransitionEvent=K;UserProximityEvent=K;WebGLContextEvent=K;TextEvent=K;Permissions=vY;History=_y;Navigator=RX;Clipboard=hY;TimeRanges=au;TextTrackCueList=iu;ValidityState=ds;MutationRecord=Br;IntersectionObserver=YX;IntersectionObserverEntry=VX;CSSStyleDeclaration=rs;CSSRule=fG;CSSContainerRule=uY;CSSFontFaceRule=WY;CSSKeyframeRule=wh;CSSKeyframesRule=NY;CSSMediaRule=VY;CSSStyleRule=Xh;CSSSupportsRule=FY;CSSConditionRule=Od;CSSGroupingRule=Sd;CSSScopeRule=Ah;DOMRect=Dd;DOMRectReadOnly=CY;Plugin=wk;PluginArray=I0;Location=$y;CustomElementRegistry=Dy;ResizeObserver=HH;Blob=al;File=Lr;Storage=jY;MimeType=Ak;MimeTypeArray=e0;NodeFilter=tl;HTMLCollection=Ql;HTMLFormControlCollection=UY;HTMLOptionsCollection=m0;NodeList=So;RadioNodeList=o0;FileList=su;Screen=h0;DOMMatrixReadOnly=u0;DOMMatrix=Os;NamedNodeMap=kh;TreeWalker=Jh;NodeIterator=JY;DataTransfer=GX;DataTransferItem=bb;DataTransferItemList=gY;Headers=gl;XMLSerializer=EH;ClipboardItem=aX;Selection=LY;CSSUnitValue=Dt;SVGAngle=Oh;SVGAnimatedAngle=N0;SVGAnimatedBoolean=W0;SVGAnimatedEnumeration=EI;SVGAnimatedInteger=$d;SVGAnimatedLength=T;SVGAnimatedNumber=$e;SVGAnimatedNumberList=Or;SVGAnimatedPreserveAspectRatio=Ko;SVGAnimatedRect=Zu;SVGAnimatedString=Me;SVGAnimatedTransformList=Rb;SVGLength=qd;SVGLengthList=eV;SVGMatrix=Sh;SVGNumber=_d;SVGNumberList=$Y;SVGPoint=Fc;SVGPointList=yb;SVGPreserveAspectRatio=_Y;SVGRect=Pd;SVGStringList=Vb;SVGTransform=BG;SVGTransformList=qY;SVGAnimatedLengthList=Mh;SVGUnitTypes=G9;DOMPoint=Z0;StylePropertyMap=yY;StylePropertyMapReadOnly=RY;MediaList=YY;CSSKeywordValue=_Z;CSSStyleValue=$Z;Window=this.constructor;URLSearchParams=NLI;WritableStream=Mze.Writable;ReadableStream=WLI;TransformStream=Mze.Transform;PerformanceObserver=YLI;PerformanceEntry=VLI;PerformanceObserverEntryList=_ie;onload=null;onerror=null;document;customElements=new Dy(this);window=this;globalThis=this;performance=performance;screenLeft=0;screenTop=0;screenX=0;screenY=0;crypto=pLI;TextEncoder=ZLI;TextDecoder=uLI;closed=!1;console;name="";Buffer=hLI;[eY]=[];[AG];[wG];[Yn];[_K];[$K];[eP];[IP];[sY]=this;[sb]=this;[XG]=this;[W]=this;[lie]=this;[DN]=-1;[dY]=new o9(this);[gh]={json:new Map,css:new Map,esm:new Map};[jZ]=null;#e;#I=null;#t=null;#l=null;#n=null;#a=null;#G={timeouts:null};#s=[];#o=[];constructor(e,I){super(),this.#e=e,this.console=e.page.console,this[AG]=new Xk(e),this[_K]=new RX(this),this[$K]=new h0,this[eP]=new jY,this[IP]=new jY,this[wG]=new $y(this.#e,I?.url??"about:blank"),this[Yn]=new _y(this.#e,this),e[Yn].currentItem.href=I?.url??"about:blank",Ke.setWindowBrowserFrameRelation(this,this.#e),this[fL](),_k.extendClasses(this),this.document=new this.HTMLDocument,this.document[ks]=this;let l=e[GI].startTask(()=>this[AG].destroy());this[AG].waitUntilComplete().then(()=>{e[GI].endTask(l),this.document[tY]=NP.complete,this.document.dispatchEvent(new K("readystatechange"));let n=new K("load");n[xo]=this,n[va]=this.document,n[La]=jt.atTarget,this.dispatchEvent(n),n[xo]=null,n[La]=jt.none,n[iY]=!1}),this[Iie]()}get self(){return this[sY]}set self(e){this[sY]=e}get top(){return this[sb]}get parent(){return this[XG]}set parent(e){this[XG]=e}get frames(){return this[lie]}set frames(e){this[XG]=e}get location(){return this[wG]}set location(e){this[wG].href=e}get history(){return this[Yn]}get navigator(){return this[_K]}get screen(){return this[$K]}get sessionStorage(){return this[eP]}get localStorage(){return this[IP]}get opener(){return this.#e[Bd]}get scrollX(){return this.document?.documentElement?.scrollLeft??0}get pageXOffset(){return this.scrollX}get scrollY(){return this.document?.documentElement?.scrollTop??0}get pageYOffset(){return this.scrollY}get CSS(){return new Yk}get innerWidth(){return this.#I===null?this.#e.page.viewport.width:this.#I}set innerWidth(e){this.#I=e}get innerHeight(){return this.#t===null?this.#e.page.viewport.height:this.#t}set innerHeight(e){this.#t=e}get outerWidth(){return this.#l===null?this.#e.page.viewport.width:this.#l}set outerWidth(e){this.#l=e}get outerHeight(){return this.#n===null?this.#e.page.viewport.height:this.#n}set outerHeight(e){this.#n=e}get devicePixelRatio(){return this.#a===null?this.#e.page.viewport.devicePixelRatio:this.#a}set devicePixelRatio(e){this.#a=e}getComputedStyle(e){return e[_w]=e[_w]||new rs(V,this,{element:e,computed:!0}),e[_w]}getSelection(){return this.document.getSelection()}scroll(e,I){if(typeof e!="object"&&arguments.length===1)throw new this.TypeError("Failed to execute 'scroll' on 'Window': The provided value is not of type 'ScrollToOptions'.");let l=typeof e=="object"?e:{left:e,top:I};if(l.behavior==="smooth")this.setTimeout(()=>{if(l.top!==void 0){let n=Number(l.top);this.document.documentElement.scrollTop=isNaN(n)?0:n}if(l.left!==void 0){let n=Number(l.left);this.document.documentElement.scrollLeft=isNaN(n)?0:n}});else{if(l.top!==void 0){let n=Number(l.top);this.document.documentElement.scrollTop=isNaN(n)?0:n}if(l.left!==void 0){let n=Number(l.left);this.document.documentElement.scrollLeft=isNaN(n)?0:n}}}scrollTo(e,I){if(typeof e!="object"&&arguments.length===1)throw new this.TypeError("Failed to execute 'scrollTo' on 'Window': The provided value is not of type 'ScrollToOptions'.");this.scroll(e,I)}scrollBy(e,I){if(typeof e!="object"&&arguments.length===1)throw new this.TypeError("Failed to execute 'scrollBy' on 'Window': The provided value is not of type 'ScrollToOptions'.");let l=typeof e=="object"?e:{left:e,top:I};this.scroll({left:this.document.documentElement.scrollLeft+(l.left??0),top:this.document.documentElement.scrollTop+(l.top??0),behavior:l.behavior})}blur(){}focus(){}open(e,I,l){return Sk.openPage(this.#e,{url:e,target:I,features:l})}close(){this.#e.page.mainFrame===this.#e&&this.#e[Bd]&&(this[En](),this.#e.page.close())}matchMedia(e){return new jy({window:this,media:e})}setTimeout(e,I=0,...l){if(this.closed)return{};let n=this.#e.page.context.browser.settings;if(n.timer.preventTimerLoops){let s=new Error().stack,r=this.#s,o=this.#o,d=r.indexOf(s);if(d!==-1){if(o[d].timeout++,o[d].timeout>=(n.timer.preventTimerLoops===!0?1:n.timer.preventTimerLoops.timeout??1))return{}}else r.push(s),o.push({timeout:0,requestAnimationFrame:0})}if(!I){let s=this.#G;if(!s.timeouts){let o=!n||!n.disableErrorCapturing&&n.errorCapture===Il.tryAndCatch,d=IV.setTimeout(()=>{this.#e[GI].endTimer(d);let i=s.timeouts;s.timeouts=null;for(let h of i)if(o){let p;try{p=h.callback()}catch(Z){this[cl](Z)}p instanceof Promise&&p.catch(Z=>this[cl](Z))}else h.callback()},0);s.timeouts=[],this.#e[GI].startTimer(d)}let r=new QP(()=>e(...l));return s.timeouts.push(r),r}let c=!n||!n.disableErrorCapturing&&n.errorCapture===Il.tryAndCatch,a=IV.setTimeout(()=>{if(this.#e[GI].endTimer(a),c){let s;try{s=e(...l)}catch(r){this[cl](r)}s instanceof Promise&&s.catch(r=>this[cl](r))}else e(...l)},n?.timer.maxTimeout!==-1&&I&&I>n?.timer.maxTimeout?n?.timer.maxTimeout:I);return this.#e[GI].startTimer(a),a}clearTimeout(e){if(e&&e instanceof QP){let I=this.#G;if(!I.timeouts)return;let l=I.timeouts.indexOf(e);l!==-1&&I.timeouts.splice(l,1);return}qie&&(!e||e.constructor.name!=="Timeout")||(IV.clearTimeout(e),this.#e[GI].endTimer(e))}setInterval(e,I=0,...l){if(this.closed)return{};let n=this.#e.page.context.browser.settings,c=!n||!n.disableErrorCapturing&&n.errorCapture===Il.tryAndCatch,a=0,s=IV.setInterval(()=>{if(c){let r;try{r=e(...l)}catch(o){this.clearInterval(s),this[cl](o)}r instanceof Promise&&r.catch(o=>{this.clearInterval(s),this[cl](o)})}else e(...l);n?.timer.maxIntervalIterations!==-1&&(a>=n?.timer.maxIntervalIterations&&this.clearInterval(s),a++)},n?.timer.maxIntervalTime!==-1&&I&&I>n?.timer.maxIntervalTime?n?.timer.maxIntervalTime:I);return this.#e[GI].startTimer(s),s}clearInterval(e){qie&&(!e||e.constructor.name!=="Timeout")||(IV.clearInterval(e),this.#e[GI].endTimer(e))}requestAnimationFrame(e){if(this.closed)return{};let I=this.#e.page.context.browser.settings;if(I.timer.preventTimerLoops){let c=new Error().stack,a=this.#s,s=this.#o,r=a.indexOf(c);if(r!==-1){if(s[r].requestAnimationFrame++,s[r].requestAnimationFrame>=(I.timer.preventTimerLoops===!0?1:I.timer.preventTimerLoops.requestAnimationFrame??1))return{}}else a.push(c),s.push({timeout:0,requestAnimationFrame:0})}let l=!I||!I.disableErrorCapturing&&I.errorCapture===Il.tryAndCatch,n=IV.setImmediate(()=>{if(this.#e[GI].endImmediate(n),l){let c;try{c=e(this.performance.now())}catch(a){this[cl](a)}c instanceof Promise&&c.catch(a=>this[cl](a))}else e(this.performance.now())});return this.#e[GI].startImmediate(n),n}cancelAnimationFrame(e){qie&&(!e||e.constructor.name!=="Immediate")||(IV.clearImmediate(e),this.#e[GI].endImmediate(e))}queueMicrotask(e){if(this.closed)return;let I=!1,l=this.#e[GI].startTask(()=>I=!0),n=this.#e.page.context.browser.settings,c=!n||!n.disableErrorCapturing&&n.errorCapture===Il.tryAndCatch;IV.queueMicrotask(()=>{if(!I)if(this.#e[GI].endTask(l),c){let a;try{a=e()}catch(s){this[cl](s)}a instanceof Promise&&a.catch(s=>this[cl](s))}else e()})}async fetch(e,I){return this.closed?Promise.reject(new this.DOMException("Failed to execute 'fetch' on 'Window': The window is closed.",B.invalidStateError)):await new xr({browserFrame:this.#e,window:this,url:e,init:I}).send()}btoa(e){return cX.btoa(e)}atob(e){return cX.atob(e)}postMessage(e,I="*",l){if(!this.closed){if(I&&I!=="*"&&this.location.origin!==I)throw new this.DOMException(`Failed to execute 'postMessage' on 'Window': The target origin provided ('${I}') does not match the recipient window's origin ('${this.location.origin}').`,B.securityError);try{JSON.stringify(e)}catch{throw new this.DOMException("Failed to execute 'postMessage' on 'Window': The provided message cannot be serialized.",B.invalidStateError)}this.setTimeout(()=>this.dispatchEvent(new pX("message",{data:e,origin:this.#e.parentFrame?this.#e.parentFrame.window.location.origin:this.#e.window.location.origin,source:this.#e.parentFrame?this.#e.parentFrame.window:this.#e.window,lastEventId:""})))}}resizeTo(e,I){if(!this.closed){if(!e||!I)throw new this.DOMException(`Failed to execute 'resizeTo' on 'Window': 2 arguments required, but only ${arguments.length} present.`);this.#e[JZ]&&this.#e.page.setViewport({width:e,height:I})}}resizeBy(e,I){if(!this.closed){if(!e||!I)throw new this.DOMException(`Failed to execute 'resizeBy' on 'Window': 2 arguments required, but only ${arguments.length} present.`);if(this.#e[JZ]){let l=this.#e.page.viewport;this.#e.page.setViewport({width:l.width+e,height:l.height+I})}}}[cl](e){this.#e.page.console.error(e),this.dispatchEvent(new Hh("error",{message:e.message,error:e}))}[fL](){Tze.isContext(this)||(Tze.createContext(this),Qze.runInContext(this))}[En](){if(this.closed)return;this.closed=!0;let e=this[eY];for(let a of e)a[En]&&a[En]();this[eY]=[];let I=this.document[be];for(;I.length>0;)I[0].disconnectedCallback&&delete I[0].disconnectedCallback,this.document[Yc](I[0]);let l=this.document.createElement("html"),n=this.document.createElement("head"),c=this.document.createElement("body");l.appendChild(n),l.appendChild(c),this.document[FI](l),this.location[En]&&this.location[En](),this.customElements[En]&&this.customElements[En](),this.history[En]&&this.history[En](),this[gh].json.clear(),this[gh].css.clear(),this[gh].esm.clear(),this.document[Bs].clear(),this.document[Nn]=null,this.document[qN]=null,this.document[tb]=null,this.document[Ay]=null,Ke.removeWindowBrowserFrameRelation(this)}[Iie](){for(let e of[t,tt]){let I=Object.getOwnPropertyDescriptors(e.prototype),l=Object.keys(I);for(let n of l){let c=I[n];c.get||c.set?Object.defineProperty(this,n,{...c,get:c.get?.bind(this),set:c.set?.bind(this)}):n!=="constructor"&&typeof c.value=="function"&&!c.value.toString().startsWith("class ")&&Object.defineProperty(this,n,{...c,value:c.value.bind(this)})}}}};var tE=class{childFrames=[];parentFrame=null;page;window;closed=!1;[GI]=new db(this);[Dl]={navigation:[]};[fs]=null;[Bd]=null;[JZ]=!1;[Yn]=new G0;constructor(e){this.page=e,this.window=new zG(this),e.context.browser[Ia]&&e.context.browser[Ia].observe(this.window)}get content(){return this.window.document.documentElement.outerHTML}set content(e){this.window.document[_m]=!0,this.window.document[$m]=!1,this.window.document.open(),this.window.document.write(e)}get url(){return this.window.location.href}set url(e){this.window[wG][ns](this,Us.getRelativeURL(this,e).href)}get document(){return this.window?.document??null}async waitUntilComplete(){await Promise.all([this[GI].waitUntilComplete(),...this.childFrames.map(e=>e.waitUntilComplete())])}waitForNavigation(){return new Promise(e=>this[Dl].navigation.push(e))}abort(){return this.childFrames.length?new Promise((e,I)=>{Promise.all(this.childFrames.map(l=>l.abort()).concat([this[GI].abort()])).then(()=>e()).catch(I)}):this[GI].abort()}evaluate(e){return r0.evaluate(this,e)}goto(e,I){return fa.navigate({windowClass:zG,frame:this,url:e,goToOptions:I})}goBack(e){return fa.navigateBack({windowClass:zG,frame:this,goToOptions:e})}goForward(e){return fa.navigateForward({windowClass:zG,frame:this,goToOptions:e})}goSteps(e,I){return fa.navigateSteps({windowClass:zG,frame:this,steps:e,goToOptions:I})}reload(e){return fa.reload({windowClass:zG,frame:this,goToOptions:e})}};G();var tV=class{#e;#I={};#t={};#l=0;#n=[];constructor(e){this.#e=e}assert(e,I,...l){e||this.#e.print({type:Rn.assert,level:Bc.error,message:["Assertion failed:",...I?[I,...l]:l],group:this.#n[this.#n.length-1]||null})}clear(){this.#e.clear()}count(e="default"){this.#I[e]||(this.#I[e]=0),this.#I[e]++,this.#e.print({type:Rn.count,level:Bc.info,message:[`${e}: ${this.#I[e]}`],group:this.#n[this.#n.length-1]||null})}countReset(e="default"){delete this.#I[e],this.#e.print({type:Rn.countReset,level:Bc.warn,message:[`${e}: 0`],group:this.#n[this.#n.length-1]||null})}debug(e,...I){this.#e.print({type:Rn.debug,level:Bc.log,message:e?[e,...I]:I,group:this.#n[this.#n.length-1]||null})}dir(e){this.#e.print({type:Rn.dir,level:Bc.log,message:[e],group:this.#n[this.#n.length-1]||null})}dirxml(e){this.#e.print({type:Rn.dirxml,level:Bc.log,message:[e],group:this.#n[this.#n.length-1]||null})}error(e,...I){this.#e.print({type:Rn.error,level:Bc.error,message:e?[e,...I]:I,group:this.#n[this.#n.length-1]||null})}exception(...e){this.error(...e)}group(e){this.#l++;let I={id:this.#l,label:e||"default",collapsed:!1,parent:this.#n[this.#n.length-1]||null};this.#n.push(I),this.#e.print({type:Rn.group,level:Bc.log,message:[e||"default"],group:I})}groupCollapsed(e){this.#l++;let I={id:this.#l,label:e||"default",collapsed:!0,parent:this.#n[this.#n.length-1]||null};this.#n.push(I),this.#e.print({type:Rn.groupCollapsed,level:Bc.log,message:[e||"default"],group:I})}groupEnd(){this.#n.length!==0&&this.#n.pop()}info(e,...I){this.#e.print({type:Rn.info,level:Bc.info,message:e?[e,...I]:I,group:this.#n[this.#n.length-1]||null})}log(e,...I){this.#e.print({type:Rn.log,level:Bc.log,message:e?[e,...I]:I,group:this.#n[this.#n.length-1]||null})}profile(){throw new Error("Method not implemented.")}profileEnd(){throw new Error("Method not implemented.")}table(e){this.#e.print({type:Rn.table,level:Bc.log,message:[e],group:this.#n[this.#n.length-1]||null})}time(e="default"){this.#t[e]=performance.now()}timeEnd(e="default"){let I=this.#t[e];if(I){let l=performance.now()-I;this.#e.print({type:Rn.timeEnd,level:Bc.info,message:[`${e}: ${l}ms - timer ended`],group:this.#n[this.#n.length-1]||null})}}timeLog(e="default",...I){let l=this.#t[e];if(l){let n=performance.now()-l;this.#e.print({type:Rn.timeLog,level:Bc.info,message:[`${e}: ${n}ms`,...I],group:this.#n[this.#n.length-1]||null})}}timeStamp(){throw new Error("Method not implemented.")}trace(e,...I){this.#e.print({type:Rn.trace,level:Bc.log,message:[...e?[e,...I]:I,new Error("stack").stack.replace("Error: stack","")],group:this.#n[this.#n.length-1]||null})}warn(e,...I){this.#e.print({type:Rn.warn,level:Bc.warn,message:e?[e,...I]:I,group:this.#n[this.#n.length-1]||null})}};G();var Yu=class{static getFrames(e){return this.findFrames(e.mainFrame)}static closePage(e){if(e.closed)return Promise.resolve();e.closed=!0;let I=e.context.pages.indexOf(e);return I!==-1&&e.context.pages.splice(I,1),e.virtualConsolePrinter.close(),Nb.destroyFrame(e.mainFrame)}static findFrames(e){let I=[e];for(let l of e.childFrames)I=I.concat(this.findFrames(l));return I}};var lE=class{virtualConsolePrinter=new mY;mainFrame;context;console;viewport;closed=!1;constructor(e){this.context=e,this.console=e.browser.console??new tV(this.virtualConsolePrinter),this.mainFrame=new tE(this),this.viewport={width:e.browser.settings.viewport.width,height:e.browser.settings.viewport.height,devicePixelRatio:e.browser.settings.viewport.devicePixelRatio}}get frames(){return Yu.getFrames(this)}get content(){return this.mainFrame.content}set content(e){this.mainFrame.content=e}get url(){return this.mainFrame.url}set url(e){this.mainFrame.url=e}close(){return Yu.closePage(this)}waitUntilComplete(){return this.mainFrame.waitUntilComplete()}waitForNavigation(){return this.mainFrame.waitForNavigation()}abort(){return this.mainFrame.abort()}evaluate(e){return this.mainFrame.evaluate(e)}setViewport(e){let I=Object.assign({},this.viewport);Object.assign(this.viewport,e),(I.width!==this.viewport.width||I.height!==this.viewport.height||I.devicePixelRatio!==this.viewport.devicePixelRatio)&&this.mainFrame.window.dispatchEvent(new K("resize"))}goto(e,I){return this.mainFrame.goto(e,I)}goBack(e){return this.mainFrame.goBack(e)}goForward(e){return this.mainFrame.goForward(e)}goSteps(e,I){return this.mainFrame.goSteps(e,I)}reload(e){return this.mainFrame.reload(e)}};G();var V0=class{#e=new Map;get(e){let I=this.#e.get(e.url);return I?I.expires<Date.now()?(this.#e.delete(e.url),null):I:null}add(e,I){if(this.#e.delete(e.url),e.headers.get("Cache-Control")?.includes("no-cache")||I.status<200||I.status>=300)return null;let l=I.headers.get("Access-Control-Max-Age"),n=I.headers.get("Access-Control-Allow-Origin");if(!l||!n)return null;let c=[];if(I.headers.has("Access-Control-Allow-Methods")&&I.headers.get("Access-Control-Allow-Methods")!=="*")for(let r of I.headers.get("Access-Control-Allow-Methods").split(","))c.push(r.trim().toUpperCase());let a={allowOrigin:n,allowMethods:c,expires:Date.now()+parseInt(l)*1e3};return isNaN(a.expires)||a.expires<Date.now()?null:(this.#e.set(e.url,a),a)}clear(){this.#e.clear()}};var R0=class{pages=[];browser;cookieContainer=new Uy;responseCache=new Sy;preflightResponseCache=new V0;closed=!1;constructor(e){this.browser=e}async close(){if(this.closed)return;if(this.browser.contexts[0]===this)throw new Error("Cannot close the default context. Use `browser.close()` to close the browser instead.");this.closed=!0,await Promise.all(this.pages.slice().map(l=>l.close()));let e=this.browser,I=e.contexts.indexOf(this);I!==-1&&e.contexts.splice(I,1),this.pages=[],this.cookieContainer.clearCookies(),this.responseCache.clear(),this.preflightResponseCache.clear()}async waitUntilComplete(){await Promise.all(this.pages.map(e=>e.waitUntilComplete()))}abort(){return new Promise((e,I)=>{if(!this.pages.length){e();return}Promise.all(this.pages.slice().map(l=>l.abort())).then(()=>e()).catch(l=>I(l))})}newPage(){let e=new lE(this);return this.pages.push(e),e}};G();G();G();var jze={version:"19.0.2"};var Th={disableJavaScriptEvaluation:!1,disableJavaScriptFileLoading:!1,disableCSSFileLoading:!1,disableIframePageLoading:!1,disableComputedStyleRendering:!1,handleDisabledFileLoadingAsSuccess:!1,disableErrorCapturing:!1,errorCapture:Il.tryAndCatch,enableFileSystemHttpRequests:!1,timer:{maxTimeout:-1,maxIntervalTime:-1,maxIntervalIterations:-1,preventTimerLoops:!1},fetch:{disableSameOriginPolicy:!1,disableStrictSSL:!1,interceptor:null,requestHeaders:null,virtualServers:null},navigation:{disableMainFrameNavigation:!1,disableChildFrameNavigation:!1,disableChildPageNavigation:!1,disableFallbackToSetURL:!1,crossOriginPolicy:zX.anyOrigin,beforeContentCallback:null},navigator:{userAgent:`Mozilla/5.0 (X11; ${process.platform.charAt(0).toUpperCase()+process.platform.slice(1)+" "+process.arch}) AppleWebKit/537.36 (KHTML, like Gecko) HappyDOM/${jze.version}`,maxTouchPoints:0},device:{prefersColorScheme:"light",prefersReducedMotion:"no-preference",mediaType:"screen",forcedColors:"none"},debug:{traceWaitUntilComplete:-1},viewport:{width:1024,height:768,devicePixelRatio:1}};var y0=class{static createSettings(e){return e&&this.validate(Th,e),{...Th,...e,navigation:{...Th.navigation,...e?.navigation},navigator:{...Th.navigator,...e?.navigator},timer:{...Th.timer,...e?.timer},fetch:{...Th.fetch,...e?.fetch},device:{...Th.device,...e?.device},debug:{...Th.debug,...e?.debug},viewport:{...Th.viewport,...e?.viewport}}}static validate(e,I,l){for(let n of Object.keys(I)){if(e[n]===void 0){let c=l?l+"."+n:n;throw new Error(`Unknown browser setting "${c}"`)}if(typeof e[n]=="object"&&!Array.isArray(e[n])&&e[n]!==null){let c=l?l+"."+n:n;if(typeof I[n]!="object"||Array.isArray(I[n])||I[n]===null)throw new Error(`Browser setting "${c}" cannot be null`);this.validate(e[n],I[n],c)}else if((typeof e[n]=="boolean"||typeof e[n]=="number"||typeof e[n]=="string")&&typeof I[n]!=typeof e[n]&&!(n==="preventTimerLoops"&&typeof I[n]=="object"&&I[n]!==null)){let a=l?l+"."+n:n;throw new Error(`Browser setting "${a}" must be of type "${typeof e[n]}"`)}}}};G();var F0=class{static listenerCount=0;observedWindows=[];uncaughtExceptionListener=null;uncaughtRejectionListener=null;observe(e){if(this.observedWindows.includes(e))throw new Error("Browser window is already being observed.");this.observedWindows.push(e),!this.uncaughtExceptionListener&&(this.uncaughtExceptionListener=(I,l)=>{if(l==="unhandledRejection")return;let n=null;for(let c of this.observedWindows)if(I instanceof c.Error||I instanceof c.DOMException){n=c;break}n?(n.console.error(I),n.dispatchEvent(new n.ErrorEvent("error",{error:I,message:I.message}))):process.listenerCount("uncaughtException")===this.constructor.listenerCount&&(console.error(I),process.exit(1))},this.uncaughtRejectionListener=I=>{let l=null;for(let n of this.observedWindows)if(I instanceof n.Error||I instanceof n.DOMException){l=n;break}l?(l.console.error(I),l.dispatchEvent(new l.ErrorEvent("error",{error:I,message:I.message}))):process.listenerCount("unhandledRejection")===this.constructor.listenerCount&&(console.error(I),process.exit(1))},this.constructor.listenerCount++,process.on("uncaughtException",this.uncaughtExceptionListener),process.on("unhandledRejection",this.uncaughtRejectionListener))}disconnect(e){let I=this.observedWindows.indexOf(e);I!==-1&&(this.observedWindows.splice(I,1),this.observedWindows.length===0&&this.uncaughtExceptionListener&&(this.constructor.listenerCount--,process.off("uncaughtException",this.uncaughtExceptionListener),this.uncaughtRejectionListener&&process.off("unhandledRejection",this.uncaughtRejectionListener),this.uncaughtExceptionListener=null,this.uncaughtRejectionListener=null))}};var AP=class{contexts;settings;console;[Ia]=null;constructor(e){this.console=e?.console||null,this.settings=y0.createSettings(e?.settings),this.settings.errorCapture===Il.processLevel&&(this[Ia]=new F0),this.contexts=[new R0(this)]}get closed(){return this.contexts.length===0}get defaultContext(){if(this.contexts.length===0)throw new Error("No default context. The browser has been closed.");return this.contexts[0]}async close(){if(this.contexts.length===0)return;let e=this.contexts;this.contexts=[],await Promise.all(e.map(I=>I.close()))}async waitUntilComplete(){if(this.contexts.length===0)throw new Error("No default context. The browser has been closed.");await Promise.all(this.contexts.map(e=>e.waitUntilComplete()))}abort(){return new Promise((e,I)=>{if(!this.contexts.length){e();return}Promise.all(this.contexts.slice().map(l=>l.abort())).then(()=>e()).catch(l=>I(l))})}newIncognitoContext(){if(this.contexts.length===0)throw new Error("No default context. The browser has been closed.");let e=new R0(this);return this.contexts.push(e),e}newPage(){if(this.contexts.length===0)throw new Error("No default context. The browser has been closed.");return this.contexts[0].newPage()}};G();G();G();var g0=class{virtualConsolePrinter=new mY;mainFrame;context;console;viewport;closed=!1;constructor(e){this.context=e,this.console=e.browser.console??new tV(this.virtualConsolePrinter),this.mainFrame=new SY(this),this.viewport={width:e.browser.settings.viewport.width,height:e.browser.settings.viewport.height,devicePixelRatio:e.browser.settings.viewport.devicePixelRatio}}get frames(){return Yu.getFrames(this)}get content(){return this.mainFrame.content}set content(e){this.mainFrame.content=e}get url(){return this.mainFrame.url}set url(e){this.mainFrame.url=e}close(){return new Promise((e,I)=>{let l=this.context;Yu.closePage(this).then(()=>{l.pages[0]===this?l.browser.close().then(e).catch(I):e()}).catch(I)})}waitUntilComplete(){return this.mainFrame.waitUntilComplete()}waitForNavigation(){return this.mainFrame.waitForNavigation()}abort(){return this.mainFrame.abort()}evaluate(e){return this.mainFrame.evaluate(e)}setViewport(e){let I=Object.assign({},this.viewport);Object.assign(this.viewport,e),(I.width!==this.viewport.width||I.height!==this.viewport.height||I.devicePixelRatio!==this.viewport.devicePixelRatio)&&this.mainFrame.window.dispatchEvent(new K("resize"))}goto(e,I){return this.mainFrame.goto(e,I)}goBack(e){return this.mainFrame.goBack(e)}goForward(e){return this.mainFrame.goForward(e)}goSteps(e,I){return this.mainFrame.goSteps(e,I)}reload(e){return this.mainFrame.reload(e)}};var nE=class{pages;browser;cookieContainer=new Uy;responseCache=new Sy;preflightResponseCache=new V0;closed=!1;constructor(e){this.browser=e,this.pages=[],this.pages.push(new g0(this))}async close(){if(this.closed)return;if(this.browser.contexts[0]===this)throw new Error("Cannot close the default context. Use `browser.close()` to close the browser instead.");this.closed=!0,await Promise.all(this.pages.slice().map(l=>l.close()));let e=this.browser,I=e.contexts.indexOf(this);I!==-1&&e.contexts.splice(I,1),this.pages=[],this.cookieContainer.clearCookies(),this.responseCache.clear(),this.preflightResponseCache.clear()}async waitUntilComplete(){await Promise.all(this.pages.map(e=>e.waitUntilComplete()))}abort(){return new Promise((e,I)=>{if(!this.pages.length){e();return}Promise.all(this.pages.slice().map(l=>l.abort())).then(()=>e()).catch(l=>I(l))})}newPage(){let e=new g0(this);return this.pages.push(e),e}};var cE=class{contexts;settings;console;windowClass;[Ia]=null;constructor(e,I){this.windowClass=e,this.console=I?.console||null,this.settings=y0.createSettings(I?.settings),this.settings.errorCapture===Il.processLevel&&(this[Ia]=new F0),this.contexts=[],this.contexts.push(new nE(this))}get closed(){return this.contexts.length===0}get defaultContext(){if(this.contexts.length===0)throw new Error("No default context. The browser has been closed.");return this.contexts[0]}async close(){if(this.contexts.length===0)return;let e=this.contexts;this.contexts=[],await Promise.all(e.map(I=>I.close()))}async waitUntilComplete(){await Promise.all(this.contexts.map(e=>e.waitUntilComplete()))}abort(){return new Promise((e,I)=>{if(!this.contexts.length){e();return}Promise.all(this.contexts.slice().map(l=>l.abort())).then(()=>e()).catch(l=>I(l))})}newIncognitoContext(){throw new Error("Not possible to create a new context on a detached browser.")}newPage(){if(this.contexts.length===0)throw new Error("No default context. The browser has been closed.");return this.contexts[0].newPage()}};G();var aE=class{#e;constructor(e){this.#e=e}get settings(){return this.#e.page.context.browser.settings}get virtualConsolePrinter(){return this.#e.page.virtualConsolePrinter}waitUntilComplete(){return this.#e.waitUntilComplete()}whenAsyncComplete(){return this.waitUntilComplete()}abort(){return this.#e.abort()}cancelAsync(){return this.abort()}close(){return this.#e.page.close()}setURL(e){this.#e.url=e}setViewport(e){this.#e.page.setViewport(e)}setWindowSize(e){this.setViewport({width:e?.width,height:e?.height})}setInnerWidth(e){this.setViewport({width:e})}setInnerHeight(e){this.setViewport({height:e})}};G();G();var lV=class extends zG{happyDOM;constructor(e){let l=new cE(zG,{console:e?.console,settings:e?.settings}).defaultContext.pages[0],n=l.mainFrame;e&&(e.width||e.height||e.innerWidth||e.innerHeight)&&Object.assign(l.viewport,{width:e.width||e.innerWidth||l.viewport.width,height:e.height||e.innerHeight||l.viewport.height}),super(n,{url:e?.url}),n.window=this,n.page.context.browser[Ia]&&n.page.context.browser[Ia].observe(this),this.happyDOM=new aE(n)}};import{Buffer as RLI}from"buffer";var wP=class extends lV{Array=globalThis.Array;ArrayBuffer=globalThis.ArrayBuffer;Boolean=globalThis.Boolean;Buffer=RLI;DataView=globalThis.DataView;Date=globalThis.Date;Error=globalThis.Error;EvalError=globalThis.EvalError;Float32Array=globalThis.Float32Array;Float64Array=globalThis.Float64Array;Function=globalThis.Function;Infinity=globalThis.Infinity;Int16Array=globalThis.Int16Array;Int32Array=globalThis.Int32Array;Int8Array=globalThis.Int8Array;Intl=globalThis.Intl;JSON=globalThis.JSON;Map=globalThis.Map;Math=globalThis.Math;NaN=globalThis.NaN;Number=globalThis.Number;Object=globalThis.Object;Promise=globalThis.Promise;RangeError=globalThis.RangeError;ReferenceError=globalThis.ReferenceError;RegExp=globalThis.RegExp;Set=globalThis.Set;String=globalThis.String;Symbol=globalThis.Symbol;SyntaxError=globalThis.SyntaxError;TypeError=globalThis.TypeError;URIError=globalThis.URIError;Uint16Array=globalThis.Uint16Array;Uint32Array=globalThis.Uint32Array;Uint8Array=globalThis.Uint8Array;Uint8ClampedArray=globalThis.Uint8ClampedArray;WeakMap=globalThis.WeakMap;WeakSet=globalThis.WeakSet;decodeURI=globalThis.decodeURI;decodeURIComponent=globalThis.decodeURIComponent;encodeURI=globalThis.encodeURI;encodeURIComponent=globalThis.encodeURIComponent;eval=globalThis.eval;escape=globalThis.escape;global=globalThis;isFinite=globalThis.isFinite;isNaN=globalThis.isNaN;parseFloat=globalThis.parseFloat;parseInt=globalThis.parseInt;undefined=globalThis.undefined;unescape=globalThis.unescape;[fL](){}};var Dze=5e3,yLI,FLI=["b","blockquote","br","code","em","h1","h2","h3","h4","h5","h6","hr","i","li","ol","p","pre","strong","sub","sup","table","tbody","td","th","thead","tr","ul","img","a","#text"],gLI=["href","src"],Kze={img:["src"],a:["href"]};var QLI=new lV,ALI={ALLOWED_TAGS:FLI,ALLOW_DATA_ATTR:!1,ALLOWED_ATTR:gLI,KEEP_CONTENT:!1,RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,WHOLE_DOCUMENT:!1,SANITIZE_DOM:!0,SAFE_FOR_TEMPLATES:!1,SAFE_FOR_XML:!0,RETURN_TRUSTED_TYPE:!1,USE_PROFILES:!1};function wLI(t,e,I){let l=t.tagName.toLowerCase();if(!(l in Kze)){e.forceKeepAttr=!1,e.keepAttr=!1;return}let n=Kze[l],c=e.attrName.toLowerCase();if(!n.includes(c)){e.forceKeepAttr=!1,e.keepAttr=!1;return}if(l==="img"&&c==="src"||l==="a"&&c==="href"){try{let a=URL.parse(e.attrValue);if(a&&(a.protocol==="http:"||a.protocol==="https:"))return}catch{}e.forceKeepAttr=!1,e.keepAttr=!1}}function $ie(t,e){if(!t)return t;try{return Pze(t,e)}catch(I){throw new Error(`Failed to apply content filter: ${I}`)}}function ebe(t){switch(t.toLowerCase()){case"none":return"none";case"markdown":return"markdown";case"hidden_characters":return"hidden_characters";default:return"hidden_characters"}}function Ibe(t,e){if(t===null||typeof t!="object")return t;for(let[I,l]of Object.entries(t))if(typeof l=="string"){let n=$ie(l,e);t[I]=n}else typeof l=="object"&&l!==null&&(t[I]=Ibe(l,e));return t}function Pze(t,e,I=[]){if(!t||e==="none")return t;switch(e||(e="markdown"),e){case"markdown":return Vu(t,I);case"hidden_characters":return qze(t);default:throw new Error(`Unknown filter mode: ${e}`)}}function Vu(t,e=[]){if(!t)return t;let I=qze(t),l=/((?:^|\n)```.*?\n[\s\S\n]+?\n```)|(`[\s\S\n]+?`)/gm,n="",c=0,a=new Map,s=0;for(let r of I.matchAll(l)){let o=r[0],d=r.index,i=d+o.length;n+=I.slice(c,d);let h=`*****__CODE_BLOCK_${s}__*****`;n+=h,a.set(h,o),c=i,s++}n+=I.slice(c),n=n.replace(/!\[(.*?)\]\((\S+?)(?:\s+"[^"]*")?\)/g,'<img src="$2">').replace(/\[(.*?)\]\((\S+?)(?:\s+"[^"]*")?\)/g,'<a href="$2">$1</a>').replace(/<([^!/A-Za-z0-9>])/g,"&lt;$1").replace(/<(https:\/\/.+)>/g,'<a href="$1">$1</a>').replace(/<!--(?!.*-->)[\s\S]*?\.{3}(?:\n|$)/gm,""),n=XLI(n,e);for(let[r,o]of a)n=n.replaceAll(r,o);return n}function XLI(t,e=[]){let I=tze(QLI);I.addHook("uponSanitizeAttribute",wLI),I.setConfig({...ALI,ADD_TAGS:e});let l=!1,n="<__filter_complete__></__filter_complete__>",c=setTimeout(()=>{l=!0},Dze),a=I.sanitize(t+n);for(;!l&&a.endsWith(n);)a=I.sanitize(a);return l&&(yLI?.error(`Content filtering timed out after ${Dze}ms. Returning partially filtered content.`),a=a.slice(0,a.length-n.length)),clearTimeout(c),a}function qze(t){let e=t.normalize("NFD"),I="";do I=e,e=e.replaceAll(/[\u{E0001}\u{E0020}-\u{E007F}\u{2066}-\u{2069}\u{202A}-\u{202E}\u{200B}\u{200C}\u{200E}\u{200F}\u{00AD}\u{FEFF}\u{180E}\u{2060}-\u{2064}]/gu,"");while(e!==I);return e.normalize("NFC")}G();import*as li from"fs";import{existsSync as yu}from"fs";G();G();G();G();var tbe=(t,e,I)=>{let l=t instanceof RegExp?_ze(t,I):t,n=e instanceof RegExp?_ze(e,I):e,c=l!==null&&n!=null&&HLI(l,n,I);return c&&{start:c[0],end:c[1],pre:I.slice(0,c[0]),body:I.slice(c[0]+l.length,c[1]),post:I.slice(c[1]+n.length)}},_ze=(t,e)=>{let I=e.match(t);return I?I[0]:null},HLI=(t,e,I)=>{let l,n,c,a,s,r=I.indexOf(t),o=I.indexOf(e,r+1),d=r;if(r>=0&&o>0){if(t===e)return[r,o];for(l=[],c=I.length;d>=0&&!s;){if(d===r)l.push(d),r=I.indexOf(t,d+1);else if(l.length===1){let i=l.pop();i!==void 0&&(s=[i,o])}else n=l.pop(),n!==void 0&&n<c&&(c=n,a=o),o=I.indexOf(e,d+1);d=r<o&&r>=0?r:o}l.length&&a!==void 0&&(s=[c,a])}return s};var $ze="\0SLASH"+Math.random()+"\0",eUe="\0OPEN"+Math.random()+"\0",nbe="\0CLOSE"+Math.random()+"\0",IUe="\0COMMA"+Math.random()+"\0",tUe="\0PERIOD"+Math.random()+"\0",ELI=new RegExp($ze,"g"),vLI=new RegExp(eUe,"g"),CLI=new RegExp(nbe,"g"),JLI=new RegExp(IUe,"g"),LLI=new RegExp(tUe,"g"),kLI=/\\\\/g,fLI=/\\{/g,xLI=/\\}/g,BLI=/\\,/g,zLI=/\\./g;function lbe(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function ULI(t){return t.replace(kLI,$ze).replace(fLI,eUe).replace(xLI,nbe).replace(BLI,IUe).replace(zLI,tUe)}function SLI(t){return t.replace(ELI,"\\").replace(vLI,"{").replace(CLI,"}").replace(JLI,",").replace(LLI,".")}function lUe(t){if(!t)return[""];let e=[],I=tbe("{","}",t);if(!I)return t.split(",");let{pre:l,body:n,post:c}=I,a=l.split(",");a[a.length-1]+="{"+n+"}";let s=lUe(c);return c.length&&(a[a.length-1]+=s.shift(),a.push.apply(a,s)),e.push.apply(e,a),e}function nUe(t){return t?(t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),d9(ULI(t),!0).map(SLI)):[]}function OLI(t){return"{"+t+"}"}function MLI(t){return/^-?0\d/.test(t)}function TLI(t,e){return t<=e}function jLI(t,e){return t>=e}function d9(t,e){let I=[],l=tbe("{","}",t);if(!l)return[t];let n=l.pre,c=l.post.length?d9(l.post,!1):[""];if(/\$$/.test(l.pre))for(let a=0;a<c.length;a++){let s=n+"{"+l.body+"}"+c[a];I.push(s)}else{let a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(l.body),s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(l.body),r=a||s,o=l.body.indexOf(",")>=0;if(!r&&!o)return l.post.match(/,(?!,).*\}/)?(t=l.pre+"{"+l.body+nbe+l.post,d9(t)):[t];let d;if(r)d=l.body.split(/\.\./);else if(d=lUe(l.body),d.length===1&&d[0]!==void 0&&(d=d9(d[0],!1).map(OLI),d.length===1))return c.map(h=>l.pre+d[0]+h);let i;if(r&&d[0]!==void 0&&d[1]!==void 0){let h=lbe(d[0]),p=lbe(d[1]),Z=Math.max(d[0].length,d[1].length),u=d.length===3&&d[2]!==void 0?Math.abs(lbe(d[2])):1,N=TLI;p<h&&(u*=-1,N=jLI);let y=d.some(MLI);i=[];for(let Q=h;N(Q,p);Q+=u){let A;if(s)A=String.fromCharCode(Q),A==="\\"&&(A="");else if(A=String(Q),y){let w=Z-A.length;if(w>0){let x=new Array(w+1).join("0");Q<0?A="-"+x+A.slice(1):A=x+A}}i.push(A)}}else{i=[];for(let h=0;h<d.length;h++)i.push.apply(i,d9(d[h],!1))}for(let h=0;h<i.length;h++)for(let p=0;p<c.length;p++){let Z=n+i[h]+c[p];(!e||r||Z)&&I.push(Z)}}return I}G();var i9=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};G();G();var DLI={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},b9=t=>t.replace(/[[\]\\-]/g,"\\$&"),KLI=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),cUe=t=>t.join(""),aUe=(t,e)=>{let I=e;if(t.charAt(I)!=="[")throw new Error("not in a brace expression");let l=[],n=[],c=I+1,a=!1,s=!1,r=!1,o=!1,d=I,i="";e:for(;c<t.length;){let u=t.charAt(c);if((u==="!"||u==="^")&&c===I+1){o=!0,c++;continue}if(u==="]"&&a&&!r){d=c+1;break}if(a=!0,u==="\\"&&!r){r=!0,c++;continue}if(u==="["&&!r){for(let[N,[Y,y,Q]]of Object.entries(DLI))if(t.startsWith(N,c)){if(i)return["$.",!1,t.length-I,!0];c+=N.length,Q?n.push(Y):l.push(Y),s=s||y;continue e}}if(r=!1,i){u>i?l.push(b9(i)+"-"+b9(u)):u===i&&l.push(b9(u)),i="",c++;continue}if(t.startsWith("-]",c+1)){l.push(b9(u+"-")),c+=2;continue}if(t.startsWith("-",c+1)){i=u,c+=2;continue}l.push(b9(u)),c++}if(d<c)return["",!1,0,!1];if(!l.length&&!n.length)return["$.",!1,t.length-I,!0];if(n.length===0&&l.length===1&&/^\\?.$/.test(l[0])&&!o){let u=l[0].length===2?l[0].slice(-1):l[0];return[KLI(u),!1,d-I,!1]}let h="["+(o?"^":"")+cUe(l)+"]",p="["+(o?"":"^")+cUe(n)+"]";return[l.length&&n.length?"("+h+"|"+p+")":l.length?h:p,s,d-I,!0]};G();var Fb=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var PLI=new Set(["!","?","+","*","@"]),sUe=t=>PLI.has(t),qLI="(?!(?:^|/)\\.\\.?(?:$|/))",XP="(?!\\.)",_LI=new Set(["[","."]),$LI=new Set(["..","."]),e3I=new Set("().*{}+?[]^$\\!"),I3I=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),cbe="[^/]",rUe=cbe+"*?",GUe=cbe+"+?",sE=class t{type;#e;#I;#t=!1;#l=[];#n;#a;#G;#s=!1;#o;#d;#i=!1;constructor(e,I,l={}){this.type=e,e&&(this.#I=!0),this.#n=I,this.#e=this.#n?this.#n.#e:this,this.#o=this.#e===this?l:this.#e.#o,this.#G=this.#e===this?[]:this.#e.#G,e==="!"&&!this.#e.#s&&this.#G.push(this),this.#a=this.#n?this.#n.#l.length:0}get hasMagic(){if(this.#I!==void 0)return this.#I;for(let e of this.#l)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#I=!0;return this.#I}toString(){return this.#d!==void 0?this.#d:this.type?this.#d=this.type+"("+this.#l.map(e=>String(e)).join("|")+")":this.#d=this.#l.map(e=>String(e)).join("")}#c(){if(this!==this.#e)throw new Error("should only call on root");if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#G.pop();){if(e.type!=="!")continue;let I=e,l=I.#n;for(;l;){for(let n=I.#a+1;!l.type&&n<l.#l.length;n++)for(let c of e.#l){if(typeof c=="string")throw new Error("string part in extglob AST??");c.copyIn(l.#l[n])}I=l,l=I.#n}}return this}push(...e){for(let I of e)if(I!==""){if(typeof I!="string"&&!(I instanceof t&&I.#n===this))throw new Error("invalid part: "+I);this.#l.push(I)}}toJSON(){let e=this.type===null?this.#l.slice().map(I=>typeof I=="string"?I:I.toJSON()):[this.type,...this.#l.map(I=>I.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#n?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#n?.isStart())return!1;if(this.#a===0)return!0;let e=this.#n;for(let I=0;I<this.#a;I++){let l=e.#l[I];if(!(l instanceof t&&l.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#n?.type==="!")return!0;if(!this.#n?.isEnd())return!1;if(!this.type)return this.#n?.isEnd();let e=this.#n?this.#n.#l.length:0;return this.#a===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let I=new t(this.type,e);for(let l of this.#l)I.copyIn(l);return I}static#m(e,I,l,n){let c=!1,a=!1,s=-1,r=!1;if(I.type===null){let p=l,Z="";for(;p<e.length;){let u=e.charAt(p++);if(c||u==="\\"){c=!c,Z+=u;continue}if(a){p===s+1?(u==="^"||u==="!")&&(r=!0):u==="]"&&!(p===s+2&&r)&&(a=!1),Z+=u;continue}else if(u==="["){a=!0,s=p,r=!1,Z+=u;continue}if(!n.noext&&sUe(u)&&e.charAt(p)==="("){I.push(Z),Z="";let N=new t(u,I);p=t.#m(e,N,p,n),I.push(N);continue}Z+=u}return I.push(Z),p}let o=l+1,d=new t(null,I),i=[],h="";for(;o<e.length;){let p=e.charAt(o++);if(c||p==="\\"){c=!c,h+=p;continue}if(a){o===s+1?(p==="^"||p==="!")&&(r=!0):p==="]"&&!(o===s+2&&r)&&(a=!1),h+=p;continue}else if(p==="["){a=!0,s=o,r=!1,h+=p;continue}if(sUe(p)&&e.charAt(o)==="("){d.push(h),h="";let Z=new t(p,d);d.push(Z),o=t.#m(e,Z,o,n);continue}if(p==="|"){d.push(h),h="",i.push(d),d=new t(null,I);continue}if(p===")")return h===""&&I.#l.length===0&&(I.#i=!0),d.push(h),h="",I.push(...i,d),o;h+=p}return I.type=null,I.#I=void 0,I.#l=[e.substring(l-1)],o}static fromGlob(e,I={}){let l=new t(null,void 0,I);return t.#m(e,l,0,I),l}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[I,l,n,c]=this.toRegExpSource();if(!(n||this.#I||this.#o.nocase&&!this.#o.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return l;let s=(this.#o.nocase?"i":"")+(c?"u":"");return Object.assign(new RegExp(`^${I}$`,s),{_src:I,_glob:e})}get options(){return this.#o}toRegExpSource(e){let I=e??!!this.#o.dot;if(this.#e===this&&this.#c(),!this.type){let r=this.isStart()&&this.isEnd(),o=this.#l.map(p=>{let[Z,u,N,Y]=typeof p=="string"?t.#p(p,this.#I,r):p.toRegExpSource(e);return this.#I=this.#I||N,this.#t=this.#t||Y,Z}).join(""),d="";if(this.isStart()&&typeof this.#l[0]=="string"&&!(this.#l.length===1&&$LI.has(this.#l[0]))){let Z=_LI,u=I&&Z.has(o.charAt(0))||o.startsWith("\\.")&&Z.has(o.charAt(2))||o.startsWith("\\.\\.")&&Z.has(o.charAt(4)),N=!I&&!e&&Z.has(o.charAt(0));d=u?qLI:N?XP:""}let i="";return this.isEnd()&&this.#e.#s&&this.#n?.type==="!"&&(i="(?:$|\\/)"),[d+o+i,Fb(o),this.#I=!!this.#I,this.#t]}let l=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",c=this.#W(I);if(this.isStart()&&this.isEnd()&&!c&&this.type!=="!"){let r=this.toString();return this.#l=[r],this.type=null,this.#I=void 0,[r,Fb(this.toString()),!1,!1]}let a=!l||e||I||!XP?"":this.#W(!0);a===c&&(a=""),a&&(c=`(?:${c})(?:${a})*?`);let s="";if(this.type==="!"&&this.#i)s=(this.isStart()&&!I?XP:"")+GUe;else{let r=this.type==="!"?"))"+(this.isStart()&&!I&&!e?XP:"")+rUe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;s=n+c+r}return[s,Fb(c),this.#I=!!this.#I,this.#t]}#W(e){return this.#l.map(I=>{if(typeof I=="string")throw new Error("string type in extglob ast??");let[l,n,c,a]=I.toRegExpSource(e);return this.#t=this.#t||a,l}).filter(I=>!(this.isStart()&&this.isEnd())||!!I).join("|")}static#p(e,I,l=!1){let n=!1,c="",a=!1;for(let s=0;s<e.length;s++){let r=e.charAt(s);if(n){n=!1,c+=(e3I.has(r)?"\\":"")+r;continue}if(r==="\\"){s===e.length-1?c+="\\\\":n=!0;continue}if(r==="["){let[o,d,i,h]=aUe(e,s);if(i){c+=o,a=a||d,s+=i-1,I=I||h;continue}}if(r==="*"){l&&e==="*"?c+=GUe:c+=rUe,I=!0;continue}if(r==="?"){c+=cbe,I=!0;continue}c+=I3I(r)}return[c,Fb(e),!!I,a]}};G();var rE=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var Mr=(t,e,I={})=>(i9(e),!I.nocomment&&e.charAt(0)==="#"?!1:new _o(e,I).match(t)),t3I=/^\*+([^+@!?\*\[\(]*)$/,l3I=t=>e=>!e.startsWith(".")&&e.endsWith(t),n3I=t=>e=>e.endsWith(t),c3I=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),a3I=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),s3I=/^\*+\.\*+$/,r3I=t=>!t.startsWith(".")&&t.includes("."),G3I=t=>t!=="."&&t!==".."&&t.includes("."),o3I=/^\.\*+$/,d3I=t=>t!=="."&&t!==".."&&t.startsWith("."),i3I=/^\*+$/,b3I=t=>t.length!==0&&!t.startsWith("."),m3I=t=>t.length!==0&&t!=="."&&t!=="..",h3I=/^\?+([^+@!?\*\[\(]*)?$/,p3I=([t,e=""])=>{let I=iUe([t]);return e?(e=e.toLowerCase(),l=>I(l)&&l.toLowerCase().endsWith(e)):I},Z3I=([t,e=""])=>{let I=bUe([t]);return e?(e=e.toLowerCase(),l=>I(l)&&l.toLowerCase().endsWith(e)):I},u3I=([t,e=""])=>{let I=bUe([t]);return e?l=>I(l)&&l.endsWith(e):I},W3I=([t,e=""])=>{let I=iUe([t]);return e?l=>I(l)&&l.endsWith(e):I},iUe=([t])=>{let e=t.length;return I=>I.length===e&&!I.startsWith(".")},bUe=([t])=>{let e=t.length;return I=>I.length===e&&I!=="."&&I!==".."},mUe=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",oUe={win32:{sep:"\\"},posix:{sep:"/"}},N3I=mUe==="win32"?oUe.win32.sep:oUe.posix.sep;Mr.sep=N3I;var bs=Symbol("globstar **");Mr.GLOBSTAR=bs;var Y3I="[^/]",V3I=Y3I+"*?",R3I="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",y3I="(?:(?!(?:\\/|^)\\.).)*?",F3I=(t,e={})=>I=>Mr(I,t,e);Mr.filter=F3I;var ei=(t,e={})=>Object.assign({},t,e),g3I=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return Mr;let e=Mr;return Object.assign((l,n,c={})=>e(l,n,ei(t,c)),{Minimatch:class extends e.Minimatch{constructor(n,c={}){super(n,ei(t,c))}static defaults(n){return e.defaults(ei(t,n)).Minimatch}},AST:class extends e.AST{constructor(n,c,a={}){super(n,c,ei(t,a))}static fromGlob(n,c={}){return e.AST.fromGlob(n,ei(t,c))}},unescape:(l,n={})=>e.unescape(l,ei(t,n)),escape:(l,n={})=>e.escape(l,ei(t,n)),filter:(l,n={})=>e.filter(l,ei(t,n)),defaults:l=>e.defaults(ei(t,l)),makeRe:(l,n={})=>e.makeRe(l,ei(t,n)),braceExpand:(l,n={})=>e.braceExpand(l,ei(t,n)),match:(l,n,c={})=>e.match(l,n,ei(t,c)),sep:e.sep,GLOBSTAR:bs})};Mr.defaults=g3I;var hUe=(t,e={})=>(i9(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:nUe(t));Mr.braceExpand=hUe;var Q3I=(t,e={})=>new _o(t,e).makeRe();Mr.makeRe=Q3I;var A3I=(t,e,I={})=>{let l=new _o(e,I);return t=t.filter(n=>l.match(n)),l.options.nonull&&!t.length&&t.push(e),t};Mr.match=A3I;var dUe=/[?*]|[+@!]\(.*?\)|\[|\]/,w3I=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),_o=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,I={}){i9(e),I=I||{},this.options=I,this.pattern=e,this.platform=I.platform||mUe,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!I.windowsPathsNoEscape||I.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!I.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!I.nonegate,this.comment=!1,this.empty=!1,this.partial=!!I.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=I.windowsNoMagicRoot!==void 0?I.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let I of e)if(typeof I!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,I=this.options;if(!I.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],I.debug&&(this.debug=(...c)=>console.error(...c)),this.debug(this.pattern,this.globSet);let l=this.globSet.map(c=>this.slashSplit(c));this.globParts=this.preprocess(l),this.debug(this.pattern,this.globParts);let n=this.globParts.map((c,a,s)=>{if(this.isWindows&&this.windowsNoMagicRoot){let r=c[0]===""&&c[1]===""&&(c[2]==="?"||!dUe.test(c[2]))&&!dUe.test(c[3]),o=/^[a-z]:/i.test(c[0]);if(r)return[...c.slice(0,4),...c.slice(4).map(d=>this.parse(d))];if(o)return[c[0],...c.slice(1).map(d=>this.parse(d))]}return c.map(r=>this.parse(r))});if(this.debug(this.pattern,n),this.set=n.filter(c=>c.indexOf(!1)===-1),this.isWindows)for(let c=0;c<this.set.length;c++){let a=this.set[c];a[0]===""&&a[1]===""&&this.globParts[c][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let l=0;l<e.length;l++)for(let n=0;n<e[l].length;n++)e[l][n]==="**"&&(e[l][n]="*");let{optimizationLevel:I=1}=this.options;return I>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):I>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(I=>{let l=-1;for(;(l=I.indexOf("**",l+1))!==-1;){let n=l;for(;I[n+1]==="**";)n++;n!==l&&I.splice(l,n-l)}return I})}levelOneOptimize(e){return e.map(I=>(I=I.reduce((l,n)=>{let c=l[l.length-1];return n==="**"&&c==="**"?l:n===".."&&c&&c!==".."&&c!=="."&&c!=="**"?(l.pop(),l):(l.push(n),l)},[]),I.length===0?[""]:I))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let I=!1;do{if(I=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let c=e[n];n===1&&c===""&&e[0]===""||(c==="."||c==="")&&(I=!0,e.splice(n,1),n--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(I=!0,e.pop())}let l=0;for(;(l=e.indexOf("..",l+1))!==-1;){let n=e[l-1];n&&n!=="."&&n!==".."&&n!=="**"&&(I=!0,e.splice(l-1,2),l-=2)}}while(I);return e.length===0?[""]:e}firstPhasePreProcess(e){let I=!1;do{I=!1;for(let l of e){let n=-1;for(;(n=l.indexOf("**",n+1))!==-1;){let a=n;for(;l[a+1]==="**";)a++;a>n&&l.splice(n+1,a-n);let s=l[n+1],r=l[n+2],o=l[n+3];if(s!==".."||!r||r==="."||r===".."||!o||o==="."||o==="..")continue;I=!0,l.splice(n,1);let d=l.slice(0);d[n]="**",e.push(d),n--}if(!this.preserveMultipleSlashes){for(let a=1;a<l.length-1;a++){let s=l[a];a===1&&s===""&&l[0]===""||(s==="."||s==="")&&(I=!0,l.splice(a,1),a--)}l[0]==="."&&l.length===2&&(l[1]==="."||l[1]==="")&&(I=!0,l.pop())}let c=0;for(;(c=l.indexOf("..",c+1))!==-1;){let a=l[c-1];if(a&&a!=="."&&a!==".."&&a!=="**"){I=!0;let r=c===1&&l[c+1]==="**"?["."]:[];l.splice(c-1,2,...r),l.length===0&&l.push(""),c-=2}}}}while(I);return e}secondPhasePreProcess(e){for(let I=0;I<e.length-1;I++)for(let l=I+1;l<e.length;l++){let n=this.partsMatch(e[I],e[l],!this.preserveMultipleSlashes);if(n){e[I]=[],e[l]=n;break}}return e.filter(I=>I.length)}partsMatch(e,I,l=!1){let n=0,c=0,a=[],s="";for(;n<e.length&&c<I.length;)if(e[n]===I[c])a.push(s==="b"?I[c]:e[n]),n++,c++;else if(l&&e[n]==="**"&&I[c]===e[n+1])a.push(e[n]),n++;else if(l&&I[c]==="**"&&e[n]===I[c+1])a.push(I[c]),c++;else if(e[n]==="*"&&I[c]&&(this.options.dot||!I[c].startsWith("."))&&I[c]!=="**"){if(s==="b")return!1;s="a",a.push(e[n]),n++,c++}else if(I[c]==="*"&&e[n]&&(this.options.dot||!e[n].startsWith("."))&&e[n]!=="**"){if(s==="a")return!1;s="b",a.push(I[c]),n++,c++}else return!1;return e.length===I.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,I=!1,l=0;for(let n=0;n<e.length&&e.charAt(n)==="!";n++)I=!I,l++;l&&(this.pattern=e.slice(l)),this.negate=I}matchOne(e,I,l=!1){let n=this.options;if(this.isWindows){let u=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),N=!u&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),Y=typeof I[0]=="string"&&/^[a-z]:$/i.test(I[0]),y=!Y&&I[0]===""&&I[1]===""&&I[2]==="?"&&typeof I[3]=="string"&&/^[a-z]:$/i.test(I[3]),Q=N?3:u?0:void 0,A=y?3:Y?0:void 0;if(typeof Q=="number"&&typeof A=="number"){let[w,x]=[e[Q],I[A]];w.toLowerCase()===x.toLowerCase()&&(I[A]=w,A>Q?I=I.slice(A):Q>A&&(e=e.slice(Q)))}}let{optimizationLevel:c=1}=this.options;c>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:I}),this.debug("matchOne",e.length,I.length);for(var a=0,s=0,r=e.length,o=I.length;a<r&&s<o;a++,s++){this.debug("matchOne loop");var d=I[s],i=e[a];if(this.debug(I,d,i),d===!1)return!1;if(d===bs){this.debug("GLOBSTAR",[I,d,i]);var h=a,p=s+1;if(p===o){for(this.debug("** at the end");a<r;a++)if(e[a]==="."||e[a]===".."||!n.dot&&e[a].charAt(0)===".")return!1;return!0}for(;h<r;){var Z=e[h];if(this.debug(`
931
931
  globstar while`,e,h,I,p,Z),this.matchOne(e.slice(h),I.slice(p),l))return this.debug("globstar found match!",h,r,Z),!0;if(Z==="."||Z===".."||!n.dot&&Z.charAt(0)==="."){this.debug("dot detected!",e,h,I,p);break}this.debug("globstar swallow a segment, and continue"),h++}return!!(l&&(this.debug(`
932
932
  >>> no match, partial?`,e,h,I,p),h===r))}let u;if(typeof d=="string"?(u=i===d,this.debug("string match",d,i,u)):(u=d.test(i),this.debug("pattern match",d,i,u)),!u)return!1}if(a===r&&s===o)return!0;if(a===r)return l;if(s===o)return a===r-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return hUe(this.pattern,this.options)}parse(e){i9(e);let I=this.options;if(e==="**")return bs;if(e==="")return"";let l,n=null;(l=e.match(i3I))?n=I.dot?m3I:b3I:(l=e.match(t3I))?n=(I.nocase?I.dot?a3I:c3I:I.dot?n3I:l3I)(l[1]):(l=e.match(h3I))?n=(I.nocase?I.dot?Z3I:p3I:I.dot?u3I:W3I)(l):(l=e.match(s3I))?n=I.dot?G3I:r3I:(l=e.match(o3I))&&(n=d3I);let c=sE.fromGlob(e,this.options).toMMPattern();return n&&typeof c=="object"&&Reflect.defineProperty(c,"test",{value:n}),c}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let I=this.options,l=I.noglobstar?V3I:I.dot?R3I:y3I,n=new Set(I.nocase?["i"]:[]),c=e.map(r=>{let o=r.map(d=>{if(d instanceof RegExp)for(let i of d.flags.split(""))n.add(i);return typeof d=="string"?w3I(d):d===bs?bs:d._src});return o.forEach((d,i)=>{let h=o[i+1],p=o[i-1];d!==bs||p===bs||(p===void 0?h!==void 0&&h!==bs?o[i+1]="(?:\\/|"+l+"\\/)?"+h:o[i]=l:h===void 0?o[i-1]=p+"(?:\\/|"+l+")?":h!==bs&&(o[i-1]=p+"(?:\\/|\\/"+l+"\\/)"+h,o[i+1]=bs))}),o.filter(d=>d!==bs).join("/")}).join("|"),[a,s]=e.length>1?["(?:",")"]:["",""];c="^"+a+c+s+"$",this.negate&&(c="^(?!"+c+").+$");try{this.regexp=new RegExp(c,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,I=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&I)return!0;let l=this.options;this.isWindows&&(e=e.split("\\").join("/"));let n=this.slashSplit(e);this.debug(this.pattern,"split",n);let c=this.set;this.debug(this.pattern,"set",c);let a=n[n.length-1];if(!a)for(let s=n.length-2;!a&&s>=0;s--)a=n[s];for(let s=0;s<c.length;s++){let r=c[s],o=n;if(l.matchBase&&r.length===1&&(o=[a]),this.matchOne(o,r,I))return l.flipNegate?!0:!this.negate}return l.flipNegate?!1:this.negate}static defaults(e){return Mr.defaults(e).Minimatch}};Mr.AST=sE;Mr.Minimatch=_o;Mr.escape=rE;Mr.unescape=Fb;G();import{fileURLToPath as q3I}from"node:url";G();G();var GE=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,ZUe=new Set,abe=typeof process=="object"&&process?process:{},uUe=(t,e,I,l)=>{typeof abe.emitWarning=="function"?abe.emitWarning(t,e,I,l):console.error(`[${I}] ${e}: ${t}`)},HP=globalThis.AbortController,pUe=globalThis.AbortSignal;if(typeof HP>"u"){pUe=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(l,n){this._onabort.push(n)}},HP=class{constructor(){e()}signal=new pUe;abort(l){if(!this.signal.aborted){this.signal.reason=l,this.signal.aborted=!0;for(let n of this.signal._onabort)n(l);this.signal.onabort?.(l)}}};let t=abe.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,uUe("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var X3I=t=>!ZUe.has(t),jSl=Symbol("type"),nV=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),WUe=t=>nV(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?oE:null:null,oE=class extends Array{constructor(e){super(e),this.fill(0)}},sbe=class t{heap;length;static#e=!1;static create(e){let I=WUe(e);if(!I)return[];t.#e=!0;let l=new t(e,I);return t.#e=!1,l}constructor(e,I){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new I(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},m9=class t{#e;#I;#t;#l;#n;#a;#G;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#s;#o;#d;#i;#c;#m;#W;#p;#Z;#Q;#u;#A;#V;#Y;#N;#F;#h;#X;static unsafeExposeInternals(e){return{starts:e.#V,ttls:e.#Y,sizes:e.#A,keyMap:e.#d,keyList:e.#i,valList:e.#c,next:e.#m,prev:e.#W,get head(){return e.#p},get tail(){return e.#Z},free:e.#Q,isBackgroundFetch:I=>e.#b(I),backgroundFetch:(I,l,n,c)=>e.#J(I,l,n,c),moveToTail:I=>e.#f(I),indexes:I=>e.#g(I),rindexes:I=>e.#w(I),isStale:I=>e.#y(I)}}get max(){return this.#e}get maxSize(){return this.#I}get calculatedSize(){return this.#o}get size(){return this.#s}get fetchMethod(){return this.#a}get memoMethod(){return this.#G}get dispose(){return this.#t}get onInsert(){return this.#l}get disposeAfter(){return this.#n}constructor(e){let{max:I=0,ttl:l,ttlResolution:n=1,ttlAutopurge:c,updateAgeOnGet:a,updateAgeOnHas:s,allowStale:r,dispose:o,onInsert:d,disposeAfter:i,noDisposeOnSet:h,noUpdateTTL:p,maxSize:Z=0,maxEntrySize:u=0,sizeCalculation:N,fetchMethod:Y,memoMethod:y,noDeleteOnFetchRejection:Q,noDeleteOnStaleGet:A,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:x,ignoreFetchAbort:C}=e;if(I!==0&&!nV(I))throw new TypeError("max option must be a nonnegative integer");let H=I?WUe(I):Array;if(!H)throw new Error("invalid max value: "+I);if(this.#e=I,this.#I=Z,this.maxEntrySize=u||this.#I,this.sizeCalculation=N,this.sizeCalculation){if(!this.#I&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(y!==void 0&&typeof y!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#G=y,Y!==void 0&&typeof Y!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#a=Y,this.#F=!!Y,this.#d=new Map,this.#i=new Array(I).fill(void 0),this.#c=new Array(I).fill(void 0),this.#m=new H(I),this.#W=new H(I),this.#p=0,this.#Z=0,this.#Q=sbe.create(I),this.#s=0,this.#o=0,typeof o=="function"&&(this.#t=o),typeof d=="function"&&(this.#l=d),typeof i=="function"?(this.#n=i,this.#u=[]):(this.#n=void 0,this.#u=void 0),this.#N=!!this.#t,this.#X=!!this.#l,this.#h=!!this.#n,this.noDisposeOnSet=!!h,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!Q,this.allowStaleOnFetchRejection=!!w,this.allowStaleOnFetchAbort=!!x,this.ignoreFetchAbort=!!C,this.maxEntrySize!==0){if(this.#I!==0&&!nV(this.#I))throw new TypeError("maxSize must be a positive integer if specified");if(!nV(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#B()}if(this.allowStale=!!r,this.noDeleteOnStaleGet=!!A,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!s,this.ttlResolution=nV(n)||n===0?n:1,this.ttlAutopurge=!!c,this.ttl=l||0,this.ttl){if(!nV(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#r()}if(this.#e===0&&this.ttl===0&&this.#I===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#I){let J="LRU_CACHE_UNBOUNDED";X3I(J)&&(ZUe.add(J),uUe("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",J,t))}}getRemainingTTL(e){return this.#d.has(e)?1/0:0}#r(){let e=new oE(this.#e),I=new oE(this.#e);this.#Y=e,this.#V=I,this.#H=(c,a,s=GE.now())=>{if(I[c]=a!==0?s:0,e[c]=a,a!==0&&this.ttlAutopurge){let r=setTimeout(()=>{this.#y(c)&&this.#E(this.#i[c],"expire")},a+1);r.unref&&r.unref()}},this.#v=c=>{I[c]=e[c]!==0?GE.now():0},this.#R=(c,a)=>{if(e[a]){let s=e[a],r=I[a];if(!s||!r)return;c.ttl=s,c.start=r,c.now=l||n();let o=c.now-r;c.remainingTTL=s-o}};let l=0,n=()=>{let c=GE.now();if(this.ttlResolution>0){l=c;let a=setTimeout(()=>l=0,this.ttlResolution);a.unref&&a.unref()}return c};this.getRemainingTTL=c=>{let a=this.#d.get(c);if(a===void 0)return 0;let s=e[a],r=I[a];if(!s||!r)return 1/0;let o=(l||n())-r;return s-o},this.#y=c=>{let a=I[c],s=e[c];return!!s&&!!a&&(l||n())-a>s}}#v=()=>{};#R=()=>{};#H=()=>{};#y=()=>!1;#B(){let e=new oE(this.#e);this.#o=0,this.#A=e,this.#C=I=>{this.#o-=e[I],e[I]=0},this.#z=(I,l,n,c)=>{if(this.#b(l))return 0;if(!nV(n))if(c){if(typeof c!="function")throw new TypeError("sizeCalculation must be a function");if(n=c(l,I),!nV(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return n},this.#L=(I,l,n)=>{if(e[I]=l,this.#I){let c=this.#I-e[I];for(;this.#o>c;)this.#k(!0)}this.#o+=e[I],n&&(n.entrySize=l,n.totalCalculatedSize=this.#o)}}#C=e=>{};#L=(e,I,l)=>{};#z=(e,I,l,n)=>{if(l||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#g({allowStale:e=this.allowStale}={}){if(this.#s)for(let I=this.#Z;!(!this.#U(I)||((e||!this.#y(I))&&(yield I),I===this.#p));)I=this.#W[I]}*#w({allowStale:e=this.allowStale}={}){if(this.#s)for(let I=this.#p;!(!this.#U(I)||((e||!this.#y(I))&&(yield I),I===this.#Z));)I=this.#m[I]}#U(e){return e!==void 0&&this.#d.get(this.#i[e])===e}*entries(){for(let e of this.#g())this.#c[e]!==void 0&&this.#i[e]!==void 0&&!this.#b(this.#c[e])&&(yield[this.#i[e],this.#c[e]])}*rentries(){for(let e of this.#w())this.#c[e]!==void 0&&this.#i[e]!==void 0&&!this.#b(this.#c[e])&&(yield[this.#i[e],this.#c[e]])}*keys(){for(let e of this.#g()){let I=this.#i[e];I!==void 0&&!this.#b(this.#c[e])&&(yield I)}}*rkeys(){for(let e of this.#w()){let I=this.#i[e];I!==void 0&&!this.#b(this.#c[e])&&(yield I)}}*values(){for(let e of this.#g())this.#c[e]!==void 0&&!this.#b(this.#c[e])&&(yield this.#c[e])}*rvalues(){for(let e of this.#w())this.#c[e]!==void 0&&!this.#b(this.#c[e])&&(yield this.#c[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,I={}){for(let l of this.#g()){let n=this.#c[l],c=this.#b(n)?n.__staleWhileFetching:n;if(c!==void 0&&e(c,this.#i[l],this))return this.get(this.#i[l],I)}}forEach(e,I=this){for(let l of this.#g()){let n=this.#c[l],c=this.#b(n)?n.__staleWhileFetching:n;c!==void 0&&e.call(I,c,this.#i[l],this)}}rforEach(e,I=this){for(let l of this.#w()){let n=this.#c[l],c=this.#b(n)?n.__staleWhileFetching:n;c!==void 0&&e.call(I,c,this.#i[l],this)}}purgeStale(){let e=!1;for(let I of this.#w({allowStale:!0}))this.#y(I)&&(this.#E(this.#i[I],"expire"),e=!0);return e}info(e){let I=this.#d.get(e);if(I===void 0)return;let l=this.#c[I],n=this.#b(l)?l.__staleWhileFetching:l;if(n===void 0)return;let c={value:n};if(this.#Y&&this.#V){let a=this.#Y[I],s=this.#V[I];if(a&&s){let r=a-(GE.now()-s);c.ttl=r,c.start=Date.now()}}return this.#A&&(c.size=this.#A[I]),c}dump(){let e=[];for(let I of this.#g({allowStale:!0})){let l=this.#i[I],n=this.#c[I],c=this.#b(n)?n.__staleWhileFetching:n;if(c===void 0||l===void 0)continue;let a={value:c};if(this.#Y&&this.#V){a.ttl=this.#Y[I];let s=GE.now()-this.#V[I];a.start=Math.floor(Date.now()-s)}this.#A&&(a.size=this.#A[I]),e.unshift([l,a])}return e}load(e){this.clear();for(let[I,l]of e){if(l.start){let n=Date.now()-l.start;l.start=GE.now()-n}this.set(I,l.value,l)}}set(e,I,l={}){if(I===void 0)return this.delete(e),this;let{ttl:n=this.ttl,start:c,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:r}=l,{noUpdateTTL:o=this.noUpdateTTL}=l,d=this.#z(e,I,l.size||0,s);if(this.maxEntrySize&&d>this.maxEntrySize)return r&&(r.set="miss",r.maxEntrySizeExceeded=!0),this.#E(e,"set"),this;let i=this.#s===0?void 0:this.#d.get(e);if(i===void 0)i=this.#s===0?this.#Z:this.#Q.length!==0?this.#Q.pop():this.#s===this.#e?this.#k(!1):this.#s,this.#i[i]=e,this.#c[i]=I,this.#d.set(e,i),this.#m[this.#Z]=i,this.#W[i]=this.#Z,this.#Z=i,this.#s++,this.#L(i,d,r),r&&(r.set="add"),o=!1,this.#X&&this.#l?.(I,e,"add");else{this.#f(i);let h=this.#c[i];if(I!==h){if(this.#F&&this.#b(h)){h.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:p}=h;p!==void 0&&!a&&(this.#N&&this.#t?.(p,e,"set"),this.#h&&this.#u?.push([p,e,"set"]))}else a||(this.#N&&this.#t?.(h,e,"set"),this.#h&&this.#u?.push([h,e,"set"]));if(this.#C(i),this.#L(i,d,r),this.#c[i]=I,r){r.set="replace";let p=h&&this.#b(h)?h.__staleWhileFetching:h;p!==void 0&&(r.oldValue=p)}}else r&&(r.set="update");this.#X&&this.onInsert?.(I,e,I===h?"update":"replace")}if(n!==0&&!this.#Y&&this.#r(),this.#Y&&(o||this.#H(i,n,c),r&&this.#R(r,i)),!a&&this.#h&&this.#u){let h=this.#u,p;for(;p=h?.shift();)this.#n?.(...p)}return this}pop(){try{for(;this.#s;){let e=this.#c[this.#p];if(this.#k(!0),this.#b(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#h&&this.#u){let e=this.#u,I;for(;I=e?.shift();)this.#n?.(...I)}}}#k(e){let I=this.#p,l=this.#i[I],n=this.#c[I];return this.#F&&this.#b(n)?n.__abortController.abort(new Error("evicted")):(this.#N||this.#h)&&(this.#N&&this.#t?.(n,l,"evict"),this.#h&&this.#u?.push([n,l,"evict"])),this.#C(I),e&&(this.#i[I]=void 0,this.#c[I]=void 0,this.#Q.push(I)),this.#s===1?(this.#p=this.#Z=0,this.#Q.length=0):this.#p=this.#m[I],this.#d.delete(l),this.#s--,I}has(e,I={}){let{updateAgeOnHas:l=this.updateAgeOnHas,status:n}=I,c=this.#d.get(e);if(c!==void 0){let a=this.#c[c];if(this.#b(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#y(c))n&&(n.has="stale",this.#R(n,c));else return l&&this.#v(c),n&&(n.has="hit",this.#R(n,c)),!0}else n&&(n.has="miss");return!1}peek(e,I={}){let{allowStale:l=this.allowStale}=I,n=this.#d.get(e);if(n===void 0||!l&&this.#y(n))return;let c=this.#c[n];return this.#b(c)?c.__staleWhileFetching:c}#J(e,I,l,n){let c=I===void 0?void 0:this.#c[I];if(this.#b(c))return c;let a=new HP,{signal:s}=l;s?.addEventListener("abort",()=>a.abort(s.reason),{signal:a.signal});let r={signal:a.signal,options:l,context:n},o=(u,N=!1)=>{let{aborted:Y}=a.signal,y=l.ignoreFetchAbort&&u!==void 0;if(l.status&&(Y&&!N?(l.status.fetchAborted=!0,l.status.fetchError=a.signal.reason,y&&(l.status.fetchAbortIgnored=!0)):l.status.fetchResolved=!0),Y&&!y&&!N)return i(a.signal.reason);let Q=p;return this.#c[I]===p&&(u===void 0?Q.__staleWhileFetching?this.#c[I]=Q.__staleWhileFetching:this.#E(e,"fetch"):(l.status&&(l.status.fetchUpdated=!0),this.set(e,u,r.options))),u},d=u=>(l.status&&(l.status.fetchRejected=!0,l.status.fetchError=u),i(u)),i=u=>{let{aborted:N}=a.signal,Y=N&&l.allowStaleOnFetchAbort,y=Y||l.allowStaleOnFetchRejection,Q=y||l.noDeleteOnFetchRejection,A=p;if(this.#c[I]===p&&(!Q||A.__staleWhileFetching===void 0?this.#E(e,"fetch"):Y||(this.#c[I]=A.__staleWhileFetching)),y)return l.status&&A.__staleWhileFetching!==void 0&&(l.status.returnedStale=!0),A.__staleWhileFetching;if(A.__returned===A)throw u},h=(u,N)=>{let Y=this.#a?.(e,c,r);Y&&Y instanceof Promise&&Y.then(y=>u(y===void 0?void 0:y),N),a.signal.addEventListener("abort",()=>{(!l.ignoreFetchAbort||l.allowStaleOnFetchAbort)&&(u(void 0),l.allowStaleOnFetchAbort&&(u=y=>o(y,!0)))})};l.status&&(l.status.fetchDispatched=!0);let p=new Promise(h).then(o,d),Z=Object.assign(p,{__abortController:a,__staleWhileFetching:c,__returned:void 0});return I===void 0?(this.set(e,Z,{...r.options,status:void 0}),I=this.#d.get(e)):this.#c[I]=Z,Z}#b(e){if(!this.#F)return!1;let I=e;return!!I&&I instanceof Promise&&I.hasOwnProperty("__staleWhileFetching")&&I.__abortController instanceof HP}async fetch(e,I={}){let{allowStale:l=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:c=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:r=0,sizeCalculation:o=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,noDeleteOnFetchRejection:i=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:h=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:Z=this.allowStaleOnFetchAbort,context:u,forceRefresh:N=!1,status:Y,signal:y}=I;if(!this.#F)return Y&&(Y.fetch="get"),this.get(e,{allowStale:l,updateAgeOnGet:n,noDeleteOnStaleGet:c,status:Y});let Q={allowStale:l,updateAgeOnGet:n,noDeleteOnStaleGet:c,ttl:a,noDisposeOnSet:s,size:r,sizeCalculation:o,noUpdateTTL:d,noDeleteOnFetchRejection:i,allowStaleOnFetchRejection:h,allowStaleOnFetchAbort:Z,ignoreFetchAbort:p,status:Y,signal:y},A=this.#d.get(e);if(A===void 0){Y&&(Y.fetch="miss");let w=this.#J(e,A,Q,u);return w.__returned=w}else{let w=this.#c[A];if(this.#b(w)){let f=l&&w.__staleWhileFetching!==void 0;return Y&&(Y.fetch="inflight",f&&(Y.returnedStale=!0)),f?w.__staleWhileFetching:w.__returned=w}let x=this.#y(A);if(!N&&!x)return Y&&(Y.fetch="hit"),this.#f(A),n&&this.#v(A),Y&&this.#R(Y,A),w;let C=this.#J(e,A,Q,u),J=C.__staleWhileFetching!==void 0&&l;return Y&&(Y.fetch=x?"stale":"refresh",J&&x&&(Y.returnedStale=!0)),J?C.__staleWhileFetching:C.__returned=C}}async forceFetch(e,I={}){let l=await this.fetch(e,I);if(l===void 0)throw new Error("fetch() returned undefined");return l}memo(e,I={}){let l=this.#G;if(!l)throw new Error("no memoMethod provided to constructor");let{context:n,forceRefresh:c,...a}=I,s=this.get(e,a);if(!c&&s!==void 0)return s;let r=l(e,s,{options:a,context:n});return this.set(e,r,a),r}get(e,I={}){let{allowStale:l=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:c=this.noDeleteOnStaleGet,status:a}=I,s=this.#d.get(e);if(s!==void 0){let r=this.#c[s],o=this.#b(r);return a&&this.#R(a,s),this.#y(s)?(a&&(a.get="stale"),o?(a&&l&&r.__staleWhileFetching!==void 0&&(a.returnedStale=!0),l?r.__staleWhileFetching:void 0):(c||this.#E(e,"expire"),a&&l&&(a.returnedStale=!0),l?r:void 0)):(a&&(a.get="hit"),o?r.__staleWhileFetching:(this.#f(s),n&&this.#v(s),r))}else a&&(a.get="miss")}#S(e,I){this.#W[I]=e,this.#m[e]=I}#f(e){e!==this.#Z&&(e===this.#p?this.#p=this.#m[e]:this.#S(this.#W[e],this.#m[e]),this.#S(this.#Z,e),this.#Z=e)}delete(e){return this.#E(e,"delete")}#E(e,I){let l=!1;if(this.#s!==0){let n=this.#d.get(e);if(n!==void 0)if(l=!0,this.#s===1)this.#x(I);else{this.#C(n);let c=this.#c[n];if(this.#b(c)?c.__abortController.abort(new Error("deleted")):(this.#N||this.#h)&&(this.#N&&this.#t?.(c,e,I),this.#h&&this.#u?.push([c,e,I])),this.#d.delete(e),this.#i[n]=void 0,this.#c[n]=void 0,n===this.#Z)this.#Z=this.#W[n];else if(n===this.#p)this.#p=this.#m[n];else{let a=this.#W[n];this.#m[a]=this.#m[n];let s=this.#m[n];this.#W[s]=this.#W[n]}this.#s--,this.#Q.push(n)}}if(this.#h&&this.#u?.length){let n=this.#u,c;for(;c=n?.shift();)this.#n?.(...c)}return l}clear(){return this.#x("delete")}#x(e){for(let I of this.#w({allowStale:!0})){let l=this.#c[I];if(this.#b(l))l.__abortController.abort(new Error("deleted"));else{let n=this.#i[I];this.#N&&this.#t?.(l,n,e),this.#h&&this.#u?.push([l,n,e])}}if(this.#d.clear(),this.#c.fill(void 0),this.#i.fill(void 0),this.#Y&&this.#V&&(this.#Y.fill(0),this.#V.fill(0)),this.#A&&this.#A.fill(0),this.#p=0,this.#Z=0,this.#Q.length=0,this.#o=0,this.#s=0,this.#h&&this.#u){let I=this.#u,l;for(;l=I?.shift();)this.#n?.(...l)}}};import{posix as H3I,win32 as obe}from"node:path";import{fileURLToPath as E3I}from"node:url";import{lstatSync as v3I,readdir as C3I,readdirSync as J3I,readlinkSync as L3I,realpathSync as k3I}from"fs";import*as f3I from"node:fs";import{lstat as B3I,readdir as z3I,readlink as U3I,realpath as S3I}from"node:fs/promises";var x3I=k3I.native,p9={lstatSync:v3I,readdir:C3I,readdirSync:J3I,readlinkSync:L3I,realpathSync:x3I,promises:{lstat:B3I,readdir:z3I,readlink:U3I,realpath:S3I}},yUe=t=>!t||t===p9||t===f3I?p9:{...p9,...t,promises:{...p9.promises,...t.promises||{}}},FUe=/^\\\\\?\\([a-z]:)\\?$/i,O3I=t=>t.replace(/\//g,"\\").replace(FUe,"$1\\"),M3I=/[\\\/]/,ti=0,gUe=1,QUe=2,jh=4,AUe=6,wUe=8,Q0=10,XUe=12,Ii=15,h9=~Ii,rbe=16,NUe=32,Z9=64,gb=128,EP=256,CP=512,YUe=Z9|gb|CP,T3I=1023,Gbe=t=>t.isFile()?wUe:t.isDirectory()?jh:t.isSymbolicLink()?Q0:t.isCharacterDevice()?QUe:t.isBlockDevice()?AUe:t.isSocket()?XUe:t.isFIFO()?gUe:ti,VUe=new Map,u9=t=>{let e=VUe.get(t);if(e)return e;let I=t.normalize("NFKD");return VUe.set(t,I),I},RUe=new Map,vP=t=>{let e=RUe.get(t);if(e)return e;let I=u9(t.toLowerCase());return RUe.set(t,I),I},JP=class extends m9{constructor(){super({max:256})}},dbe=class extends m9{constructor(e=16*1024){super({maxSize:e,sizeCalculation:I=>I.length+1})}},HUe=Symbol("PathScurry setAsCwd"),Ms=class{name;root;roots;parent;nocase;isCWD=!1;#e;#I;get dev(){return this.#I}#t;get mode(){return this.#t}#l;get nlink(){return this.#l}#n;get uid(){return this.#n}#a;get gid(){return this.#a}#G;get rdev(){return this.#G}#s;get blksize(){return this.#s}#o;get ino(){return this.#o}#d;get size(){return this.#d}#i;get blocks(){return this.#i}#c;get atimeMs(){return this.#c}#m;get mtimeMs(){return this.#m}#W;get ctimeMs(){return this.#W}#p;get birthtimeMs(){return this.#p}#Z;get atime(){return this.#Z}#Q;get mtime(){return this.#Q}#u;get ctime(){return this.#u}#A;get birthtime(){return this.#A}#V;#Y;#N;#F;#h;#X;#r;#v;#R;#H;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,I=ti,l,n,c,a,s){this.name=e,this.#V=c?vP(e):u9(e),this.#r=I&T3I,this.nocase=c,this.roots=n,this.root=l||this,this.#v=a,this.#N=s.fullpath,this.#h=s.relative,this.#X=s.relativePosix,this.parent=s.parent,this.parent?this.#e=this.parent.#e:this.#e=yUe(s.fs)}depth(){return this.#Y!==void 0?this.#Y:this.parent?this.#Y=this.parent.depth()+1:this.#Y=0}childrenCache(){return this.#v}resolve(e){if(!e)return this;let I=this.getRootString(e),n=e.substring(I.length).split(this.splitSep);return I?this.getRoot(I).#y(n):this.#y(n)}#y(e){let I=this;for(let l of e)I=I.child(l);return I}children(){let e=this.#v.get(this);if(e)return e;let I=Object.assign([],{provisional:0});return this.#v.set(this,I),this.#r&=~rbe,I}child(e,I){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let l=this.children(),n=this.nocase?vP(e):u9(e);for(let r of l)if(r.#V===n)return r;let c=this.parent?this.sep:"",a=this.#N?this.#N+c+e:void 0,s=this.newChild(e,ti,{...I,parent:this,fullpath:a});return this.canReaddir()||(s.#r|=gb),l.push(s),s}relative(){if(this.isCWD)return"";if(this.#h!==void 0)return this.#h;let e=this.name,I=this.parent;if(!I)return this.#h=this.name;let l=I.relative();return l+(!l||!I.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#X!==void 0)return this.#X;let e=this.name,I=this.parent;if(!I)return this.#X=this.fullpathPosix();let l=I.relativePosix();return l+(!l||!I.parent?"":"/")+e}fullpath(){if(this.#N!==void 0)return this.#N;let e=this.name,I=this.parent;if(!I)return this.#N=this.name;let n=I.fullpath()+(I.parent?this.sep:"")+e;return this.#N=n}fullpathPosix(){if(this.#F!==void 0)return this.#F;if(this.sep==="/")return this.#F=this.fullpath();if(!this.parent){let n=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(n)?this.#F=`//?/${n}`:this.#F=n}let e=this.parent,I=e.fullpathPosix(),l=I+(!I||!e.parent?"":"/")+this.name;return this.#F=l}isUnknown(){return(this.#r&Ii)===ti}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#r&Ii)===wUe}isDirectory(){return(this.#r&Ii)===jh}isCharacterDevice(){return(this.#r&Ii)===QUe}isBlockDevice(){return(this.#r&Ii)===AUe}isFIFO(){return(this.#r&Ii)===gUe}isSocket(){return(this.#r&Ii)===XUe}isSymbolicLink(){return(this.#r&Q0)===Q0}lstatCached(){return this.#r&NUe?this:void 0}readlinkCached(){return this.#R}realpathCached(){return this.#H}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#R)return!0;if(!this.parent)return!1;let e=this.#r&Ii;return!(e!==ti&&e!==Q0||this.#r&EP||this.#r&gb)}calledReaddir(){return!!(this.#r&rbe)}isENOENT(){return!!(this.#r&gb)}isNamed(e){return this.nocase?this.#V===vP(e):this.#V===u9(e)}async readlink(){let e=this.#R;if(e)return e;if(this.canReadlink()&&this.parent)try{let I=await this.#e.promises.readlink(this.fullpath()),l=(await this.parent.realpath())?.resolve(I);if(l)return this.#R=l}catch(I){this.#k(I.code);return}}readlinkSync(){let e=this.#R;if(e)return e;if(this.canReadlink()&&this.parent)try{let I=this.#e.readlinkSync(this.fullpath()),l=this.parent.realpathSync()?.resolve(I);if(l)return this.#R=l}catch(I){this.#k(I.code);return}}#B(e){this.#r|=rbe;for(let I=e.provisional;I<e.length;I++){let l=e[I];l&&l.#C()}}#C(){this.#r&gb||(this.#r=(this.#r|gb)&h9,this.#L())}#L(){let e=this.children();e.provisional=0;for(let I of e)I.#C()}#z(){this.#r|=CP,this.#g()}#g(){if(this.#r&Z9)return;let e=this.#r;(e&Ii)===jh&&(e&=h9),this.#r=e|Z9,this.#L()}#w(e=""){e==="ENOTDIR"||e==="EPERM"?this.#g():e==="ENOENT"?this.#C():this.children().provisional=0}#U(e=""){e==="ENOTDIR"?this.parent.#g():e==="ENOENT"&&this.#C()}#k(e=""){let I=this.#r;I|=EP,e==="ENOENT"&&(I|=gb),(e==="EINVAL"||e==="UNKNOWN")&&(I&=h9),this.#r=I,e==="ENOTDIR"&&this.parent&&this.parent.#g()}#J(e,I){return this.#S(e,I)||this.#b(e,I)}#b(e,I){let l=Gbe(e),n=this.newChild(e.name,l,{parent:this}),c=n.#r&Ii;return c!==jh&&c!==Q0&&c!==ti&&(n.#r|=Z9),I.unshift(n),I.provisional++,n}#S(e,I){for(let l=I.provisional;l<I.length;l++){let n=I[l];if((this.nocase?vP(e.name):u9(e.name))===n.#V)return this.#f(e,n,l,I)}}#f(e,I,l,n){let c=I.name;return I.#r=I.#r&h9|Gbe(e),c!==e.name&&(I.name=e.name),l!==n.provisional&&(l===n.length-1?n.pop():n.splice(l,1),n.unshift(I)),n.provisional++,I}async lstat(){if((this.#r&gb)===0)try{return this.#E(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#U(e.code)}}lstatSync(){if((this.#r&gb)===0)try{return this.#E(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#U(e.code)}}#E(e){let{atime:I,atimeMs:l,birthtime:n,birthtimeMs:c,blksize:a,blocks:s,ctime:r,ctimeMs:o,dev:d,gid:i,ino:h,mode:p,mtime:Z,mtimeMs:u,nlink:N,rdev:Y,size:y,uid:Q}=e;this.#Z=I,this.#c=l,this.#A=n,this.#p=c,this.#s=a,this.#i=s,this.#u=r,this.#W=o,this.#I=d,this.#a=i,this.#o=h,this.#t=p,this.#Q=Z,this.#m=u,this.#l=N,this.#G=Y,this.#d=y,this.#n=Q;let A=Gbe(e);this.#r=this.#r&h9|A|NUe,A!==ti&&A!==jh&&A!==Q0&&(this.#r|=Z9)}#x=[];#M=!1;#T(e){this.#M=!1;let I=this.#x.slice();this.#x.length=0,I.forEach(l=>l(null,e))}readdirCB(e,I=!1){if(!this.canReaddir()){I?e(null,[]):queueMicrotask(()=>e(null,[]));return}let l=this.children();if(this.calledReaddir()){let c=l.slice(0,l.provisional);I?e(null,c):queueMicrotask(()=>e(null,c));return}if(this.#x.push(e),this.#M)return;this.#M=!0;let n=this.fullpath();this.#e.readdir(n,{withFileTypes:!0},(c,a)=>{if(c)this.#w(c.code),l.provisional=0;else{for(let s of a)this.#J(s,l);this.#B(l)}this.#T(l.slice(0,l.provisional))})}#O;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let I=this.fullpath();if(this.#O)await this.#O;else{let l=()=>{};this.#O=new Promise(n=>l=n);try{for(let n of await this.#e.promises.readdir(I,{withFileTypes:!0}))this.#J(n,e);this.#B(e)}catch(n){this.#w(n.code),e.provisional=0}this.#O=void 0,l()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let I=this.fullpath();try{for(let l of this.#e.readdirSync(I,{withFileTypes:!0}))this.#J(l,e);this.#B(e)}catch(l){this.#w(l.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#r&YUe)return!1;let e=Ii&this.#r;return e===ti||e===jh||e===Q0}shouldWalk(e,I){return(this.#r&jh)===jh&&!(this.#r&YUe)&&!e.has(this)&&(!I||I(this))}async realpath(){if(this.#H)return this.#H;if(!((CP|EP|gb)&this.#r))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#H=this.resolve(e)}catch{this.#z()}}realpathSync(){if(this.#H)return this.#H;if(!((CP|EP|gb)&this.#r))try{let e=this.#e.realpathSync(this.fullpath());return this.#H=this.resolve(e)}catch{this.#z()}}[HUe](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let I=new Set([]),l=[],n=this;for(;n&&n.parent;)I.add(n),n.#h=l.join(this.sep),n.#X=l.join("/"),n=n.parent,l.push("..");for(n=e;n&&n.parent&&!I.has(n);)n.#h=void 0,n.#X=void 0,n=n.parent}},LP=class t extends Ms{sep="\\";splitSep=M3I;constructor(e,I=ti,l,n,c,a,s){super(e,I,l,n,c,a,s)}newChild(e,I=ti,l={}){return new t(e,I,this.root,this.roots,this.nocase,this.childrenCache(),l)}getRootString(e){return obe.parse(e).root}getRoot(e){if(e=O3I(e.toUpperCase()),e===this.root.name)return this.root;for(let[I,l]of Object.entries(this.roots))if(this.sameRoot(e,I))return this.roots[e]=l;return this.roots[e]=new dE(e,this).root}sameRoot(e,I=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(FUe,"$1\\"),e===I}},kP=class t extends Ms{splitSep="/";sep="/";constructor(e,I=ti,l,n,c,a,s){super(e,I,l,n,c,a,s)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,I=ti,l={}){return new t(e,I,this.root,this.roots,this.nocase,this.childrenCache(),l)}},fP=class{root;rootPath;roots;cwd;#e;#I;#t;nocase;#l;constructor(e=process.cwd(),I,l,{nocase:n,childrenCacheSize:c=16*1024,fs:a=p9}={}){this.#l=yUe(a),(e instanceof URL||e.startsWith("file://"))&&(e=E3I(e));let s=I.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(s),this.#e=new JP,this.#I=new JP,this.#t=new dbe(c);let r=s.substring(this.rootPath.length).split(l);if(r.length===1&&!r[0]&&r.pop(),n===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=n,this.root=this.newRoot(this.#l),this.roots[this.rootPath]=this.root;let o=this.root,d=r.length-1,i=I.sep,h=this.rootPath,p=!1;for(let Z of r){let u=d--;o=o.child(Z,{relative:new Array(u).fill("..").join(i),relativePosix:new Array(u).fill("..").join("/"),fullpath:h+=(p?"":i)+Z}),p=!0}this.cwd=o}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#t}resolve(...e){let I="";for(let c=e.length-1;c>=0;c--){let a=e[c];if(!(!a||a===".")&&(I=I?`${a}/${I}`:a,this.isAbsolute(a)))break}let l=this.#e.get(I);if(l!==void 0)return l;let n=this.cwd.resolve(I).fullpath();return this.#e.set(I,n),n}resolvePosix(...e){let I="";for(let c=e.length-1;c>=0;c--){let a=e[c];if(!(!a||a===".")&&(I=I?`${a}/${I}`:a,this.isAbsolute(a)))break}let l=this.#I.get(I);if(l!==void 0)return l;let n=this.cwd.resolve(I).fullpathPosix();return this.#I.set(I,n),n}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,I={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ms||(I=e,e=this.cwd);let{withFileTypes:l}=I;if(e.canReaddir()){let n=await e.readdir();return l?n:n.map(c=>c.name)}else return[]}readdirSync(e=this.cwd,I={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ms||(I=e,e=this.cwd);let{withFileTypes:l=!0}=I;return e.canReaddir()?l?e.readdirSync():e.readdirSync().map(n=>n.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:I}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ms||(I=e.withFileTypes,e=this.cwd);let l=await e.readlink();return I?l:l?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:I}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ms||(I=e.withFileTypes,e=this.cwd);let l=e.readlinkSync();return I?l:l?.fullpath()}async realpath(e=this.cwd,{withFileTypes:I}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ms||(I=e.withFileTypes,e=this.cwd);let l=await e.realpath();return I?l:l?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:I}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ms||(I=e.withFileTypes,e=this.cwd);let l=e.realpathSync();return I?l:l?.fullpath()}async walk(e=this.cwd,I={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ms||(I=e,e=this.cwd);let{withFileTypes:l=!0,follow:n=!1,filter:c,walkFilter:a}=I,s=[];(!c||c(e))&&s.push(l?e:e.fullpath());let r=new Set,o=(i,h)=>{r.add(i),i.readdirCB((p,Z)=>{if(p)return h(p);let u=Z.length;if(!u)return h();let N=()=>{--u===0&&h()};for(let Y of Z)(!c||c(Y))&&s.push(l?Y:Y.fullpath()),n&&Y.isSymbolicLink()?Y.realpath().then(y=>y?.isUnknown()?y.lstat():y).then(y=>y?.shouldWalk(r,a)?o(y,N):N()):Y.shouldWalk(r,a)?o(Y,N):N()},!0)},d=e;return new Promise((i,h)=>{o(d,p=>{if(p)return h(p);i(s)})})}walkSync(e=this.cwd,I={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ms||(I=e,e=this.cwd);let{withFileTypes:l=!0,follow:n=!1,filter:c,walkFilter:a}=I,s=[];(!c||c(e))&&s.push(l?e:e.fullpath());let r=new Set([e]);for(let o of r){let d=o.readdirSync();for(let i of d){(!c||c(i))&&s.push(l?i:i.fullpath());let h=i;if(i.isSymbolicLink()){if(!(n&&(h=i.realpathSync())))continue;h.isUnknown()&&h.lstatSync()}h.shouldWalk(r,a)&&r.add(h)}}return s}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,I={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ms||(I=e,e=this.cwd),this.stream(e,I)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,I={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ms||(I=e,e=this.cwd);let{withFileTypes:l=!0,follow:n=!1,filter:c,walkFilter:a}=I;(!c||c(e))&&(yield l?e:e.fullpath());let s=new Set([e]);for(let r of s){let o=r.readdirSync();for(let d of o){(!c||c(d))&&(yield l?d:d.fullpath());let i=d;if(d.isSymbolicLink()){if(!(n&&(i=d.realpathSync())))continue;i.isUnknown()&&i.lstatSync()}i.shouldWalk(s,a)&&s.add(i)}}}stream(e=this.cwd,I={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ms||(I=e,e=this.cwd);let{withFileTypes:l=!0,follow:n=!1,filter:c,walkFilter:a}=I,s=new Mc({objectMode:!0});(!c||c(e))&&s.write(l?e:e.fullpath());let r=new Set,o=[e],d=0,i=()=>{let h=!1;for(;!h;){let p=o.shift();if(!p){d===0&&s.end();return}d++,r.add(p);let Z=(N,Y,y=!1)=>{if(N)return s.emit("error",N);if(n&&!y){let Q=[];for(let A of Y)A.isSymbolicLink()&&Q.push(A.realpath().then(w=>w?.isUnknown()?w.lstat():w));if(Q.length){Promise.all(Q).then(()=>Z(null,Y,!0));return}}for(let Q of Y)Q&&(!c||c(Q))&&(s.write(l?Q:Q.fullpath())||(h=!0));d--;for(let Q of Y){let A=Q.realpathCached()||Q;A.shouldWalk(r,a)&&o.push(A)}h&&!s.flowing?s.once("drain",i):u||i()},u=!0;p.readdirCB(Z,!0),u=!1}};return i(),s}streamSync(e=this.cwd,I={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ms||(I=e,e=this.cwd);let{withFileTypes:l=!0,follow:n=!1,filter:c,walkFilter:a}=I,s=new Mc({objectMode:!0}),r=new Set;(!c||c(e))&&s.write(l?e:e.fullpath());let o=[e],d=0,i=()=>{let h=!1;for(;!h;){let p=o.shift();if(!p){d===0&&s.end();return}d++,r.add(p);let Z=p.readdirSync();for(let u of Z)(!c||c(u))&&(s.write(l?u:u.fullpath())||(h=!0));d--;for(let u of Z){let N=u;if(u.isSymbolicLink()){if(!(n&&(N=u.realpathSync())))continue;N.isUnknown()&&N.lstatSync()}N.shouldWalk(r,a)&&o.push(N)}}h&&!s.flowing&&s.once("drain",i)};return i(),s}chdir(e=this.cwd){let I=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[HUe](I)}},dE=class extends fP{sep="\\";constructor(e=process.cwd(),I={}){let{nocase:l=!0}=I;super(e,obe,"\\",{...I,nocase:l}),this.nocase=l;for(let n=this.cwd;n;n=n.parent)n.nocase=this.nocase}parseRootPath(e){return obe.parse(e).root.toUpperCase()}newRoot(e){return new LP(this.rootPath,jh,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},iE=class extends fP{sep="/";constructor(e=process.cwd(),I={}){let{nocase:l=!1}=I;super(e,H3I,"/",{...I,nocase:l}),this.nocase=l}parseRootPath(e){return"/"}newRoot(e){return new kP(this.rootPath,jh,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},W9=class extends iE{constructor(e=process.cwd(),I={}){let{nocase:l=!0}=I;super(e,{...I,nocase:l})}},tOl=process.platform==="win32"?LP:kP,EUe=process.platform==="win32"?dE:process.platform==="darwin"?W9:iE;G();var j3I=t=>t.length>=1,D3I=t=>t.length>=1,bE=class t{#e;#I;#t;length;#l;#n;#a;#G;#s;#o;#d=!0;constructor(e,I,l,n){if(!j3I(e))throw new TypeError("empty pattern list");if(!D3I(I))throw new TypeError("empty glob list");if(I.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,l<0||l>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#I=I,this.#t=l,this.#l=n,this.#t===0){if(this.isUNC()){let[c,a,s,r,...o]=this.#e,[d,i,h,p,...Z]=this.#I;o[0]===""&&(o.shift(),Z.shift());let u=[c,a,s,r,""].join("/"),N=[d,i,h,p,""].join("/");this.#e=[u,...o],this.#I=[N,...Z],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[c,...a]=this.#e,[s,...r]=this.#I;a[0]===""&&(a.shift(),r.shift());let o=c+"/",d=s+"/";this.#e=[o,...a],this.#I=[d,...r],this.length=this.#e.length}}}pattern(){return this.#e[this.#t]}isString(){return typeof this.#e[this.#t]=="string"}isGlobstar(){return this.#e[this.#t]===bs}isRegExp(){return this.#e[this.#t]instanceof RegExp}globString(){return this.#a=this.#a||(this.#t===0?this.isAbsolute()?this.#I[0]+this.#I.slice(1).join("/"):this.#I.join("/"):this.#I.slice(this.#t).join("/"))}hasMore(){return this.length>this.#t+1}rest(){return this.#n!==void 0?this.#n:this.hasMore()?(this.#n=new t(this.#e,this.#I,this.#t+1,this.#l),this.#n.#o=this.#o,this.#n.#s=this.#s,this.#n.#G=this.#G,this.#n):this.#n=null}isUNC(){let e=this.#e;return this.#s!==void 0?this.#s:this.#s=this.#l==="win32"&&this.#t===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#G!==void 0?this.#G:this.#G=this.#l==="win32"&&this.#t===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#o!==void 0?this.#o:this.#o=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#t===0?e:""}checkFollowGlobstar(){return!(this.#t===0||!this.isGlobstar()||!this.#d)}markFollowGlobstar(){return this.#t===0||!this.isGlobstar()||!this.#d?!1:(this.#d=!1,!0)}};G();G();var K3I=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",mE=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:I,nocase:l,noext:n,noglobstar:c,platform:a=K3I}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=a,this.mmopts={dot:!0,nobrace:I,nocase:l,noext:n,noglobstar:c,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let s of e)this.add(s)}add(e){let I=new _o(e,this.mmopts);for(let l=0;l<I.set.length;l++){let n=I.set[l],c=I.globParts[l];if(!n||!c)throw new Error("invalid pattern object");for(;n[0]==="."&&c[0]===".";)n.shift(),c.shift();let a=new bE(n,c,0,this.platform),s=new _o(a.globString(),this.mmopts),r=c[c.length-1]==="**",o=a.isAbsolute();o?this.absolute.push(s):this.relative.push(s),r&&(o?this.absoluteChildren.push(s):this.relativeChildren.push(s))}}ignored(e){let I=e.fullpath(),l=`${I}/`,n=e.relative()||".",c=`${n}/`;for(let a of this.relative)if(a.match(n)||a.match(c))return!0;for(let a of this.absolute)if(a.match(I)||a.match(l))return!0;return!1}childrenIgnored(e){let I=e.fullpath()+"/",l=(e.relative()||".")+"/";for(let n of this.relativeChildren)if(n.match(l))return!0;for(let n of this.absoluteChildren)if(n.match(I))return!0;return!1}};G();var ibe=class t{store;constructor(e=new Map){this.store=e}copy(){return new t(new Map(this.store))}hasWalked(e,I){return this.store.get(e.fullpath())?.has(I.globString())}storeWalked(e,I){let l=e.fullpath(),n=this.store.get(l);n?n.add(I.globString()):this.store.set(l,new Set([I.globString()]))}},bbe=class{store=new Map;add(e,I,l){let n=(I?2:0)|(l?1:0),c=this.store.get(e);this.store.set(e,c===void 0?n:n&c)}entries(){return[...this.store.entries()].map(([e,I])=>[e,!!(I&2),!!(I&1)])}},mbe=class{store=new Map;add(e,I){if(!e.canReaddir())return;let l=this.store.get(e);l?l.find(n=>n.globString()===I.globString())||l.push(I):this.store.set(e,[I])}get(e){let I=this.store.get(e);if(!I)throw new Error("attempting to walk unknown path");return I}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},N9=class t{hasWalkedCache;matches=new bbe;subwalks=new mbe;patterns;follow;dot;opts;constructor(e,I){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=I?I.copy():new ibe}processPatterns(e,I){this.patterns=I;let l=I.map(n=>[e,n]);for(let[n,c]of l){this.hasWalkedCache.storeWalked(n,c);let a=c.root(),s=c.isAbsolute()&&this.opts.absolute!==!1;if(a){n=n.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let i=c.rest();if(i)c=i;else{this.matches.add(n,!0,!1);continue}}if(n.isENOENT())continue;let r,o,d=!1;for(;typeof(r=c.pattern())=="string"&&(o=c.rest());)n=n.resolve(r),c=o,d=!0;if(r=c.pattern(),o=c.rest(),d){if(this.hasWalkedCache.hasWalked(n,c))continue;this.hasWalkedCache.storeWalked(n,c)}if(typeof r=="string"){let i=r===".."||r===""||r===".";this.matches.add(n.resolve(r),s,i);continue}else if(r===bs){(!n.isSymbolicLink()||this.follow||c.checkFollowGlobstar())&&this.subwalks.add(n,c);let i=o?.pattern(),h=o?.rest();if(!o||(i===""||i===".")&&!h)this.matches.add(n,s,i===""||i===".");else if(i===".."){let p=n.parent||n;h?this.hasWalkedCache.hasWalked(p,h)||this.subwalks.add(p,h):this.matches.add(p,s,!0)}}else r instanceof RegExp&&this.subwalks.add(n,c)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new t(this.opts,this.hasWalkedCache)}filterEntries(e,I){let l=this.subwalks.get(e),n=this.child();for(let c of I)for(let a of l){let s=a.isAbsolute(),r=a.pattern(),o=a.rest();r===bs?n.testGlobstar(c,a,o,s):r instanceof RegExp?n.testRegExp(c,r,o,s):n.testString(c,r,o,s)}return n}testGlobstar(e,I,l,n){if((this.dot||!e.name.startsWith("."))&&(I.hasMore()||this.matches.add(e,n,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,I):e.isSymbolicLink()&&(l&&I.checkFollowGlobstar()?this.subwalks.add(e,l):I.markFollowGlobstar()&&this.subwalks.add(e,I)))),l){let c=l.pattern();if(typeof c=="string"&&c!==".."&&c!==""&&c!==".")this.testString(e,c,l.rest(),n);else if(c===".."){let a=e.parent||e;this.subwalks.add(a,l)}else c instanceof RegExp&&this.testRegExp(e,c,l.rest(),n)}}testRegExp(e,I,l,n){I.test(e.name)&&(l?this.subwalks.add(e,l):this.matches.add(e,n,!1))}testString(e,I,l,n){e.isNamed(I)&&(l?this.subwalks.add(e,l):this.matches.add(e,n,!1))}};var P3I=(t,e)=>typeof t=="string"?new mE([t],e):Array.isArray(t)?new mE(t,e):t,xP=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#I;#t;signal;maxDepth;includeChildMatches;constructor(e,I,l){if(this.patterns=e,this.path=I,this.opts=l,this.#t=!l.posix&&l.platform==="win32"?"\\":"/",this.includeChildMatches=l.includeChildMatches!==!1,(l.ignore||!this.includeChildMatches)&&(this.#I=P3I(l.ignore??[],l),!this.includeChildMatches&&typeof this.#I.add!="function")){let n="cannot ignore child matches, ignore lacks add() method.";throw new Error(n)}this.maxDepth=l.maxDepth||1/0,l.signal&&(this.signal=l.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#l(e){return this.seen.has(e)||!!this.#I?.ignored?.(e)}#n(e){return!!this.#I?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,I){if(I&&this.opts.nodir)return;let l;if(this.opts.realpath){if(l=e.realpathCached()||await e.realpath(),!l)return;e=l}let c=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&c?.isSymbolicLink()){let a=await c.realpath();a&&(a.isUnknown()||this.opts.stat)&&await a.lstat()}return this.matchCheckTest(c,I)}matchCheckTest(e,I){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!I||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#l(e)?e:void 0}matchCheckSync(e,I){if(I&&this.opts.nodir)return;let l;if(this.opts.realpath){if(l=e.realpathCached()||e.realpathSync(),!l)return;e=l}let c=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&c?.isSymbolicLink()){let a=c.realpathSync();a&&(a?.isUnknown()||this.opts.stat)&&a.lstatSync()}return this.matchCheckTest(c,I)}matchFinish(e,I){if(this.#l(e))return;if(!this.includeChildMatches&&this.#I?.add){let c=`${e.relativePosix()}/**`;this.#I.add(c)}let l=this.opts.absolute===void 0?I:this.opts.absolute;this.seen.add(e);let n=this.opts.mark&&e.isDirectory()?this.#t:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(l){let c=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(c+n)}else{let c=this.opts.posix?e.relativePosix():e.relative(),a=this.opts.dotRelative&&!c.startsWith(".."+this.#t)?"."+this.#t:"";this.matchEmit(c?a+c+n:"."+n)}}async match(e,I,l){let n=await this.matchCheck(e,l);n&&this.matchFinish(n,I)}matchSync(e,I,l){let n=this.matchCheckSync(e,l);n&&this.matchFinish(n,I)}walkCB(e,I,l){this.signal?.aborted&&l(),this.walkCB2(e,I,new N9(this.opts),l)}walkCB2(e,I,l,n){if(this.#n(e))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2(e,I,l,n));return}l.processPatterns(e,I);let c=1,a=()=>{--c===0&&n()};for(let[s,r,o]of l.matches.entries())this.#l(s)||(c++,this.match(s,r,o).then(()=>a()));for(let s of l.subwalkTargets()){if(this.maxDepth!==1/0&&s.depth()>=this.maxDepth)continue;c++;let r=s.readdirCached();s.calledReaddir()?this.walkCB3(s,r,l,a):s.readdirCB((o,d)=>this.walkCB3(s,d,l,a),!0)}a()}walkCB3(e,I,l,n){l=l.filterEntries(e,I);let c=1,a=()=>{--c===0&&n()};for(let[s,r,o]of l.matches.entries())this.#l(s)||(c++,this.match(s,r,o).then(()=>a()));for(let[s,r]of l.subwalks.entries())c++,this.walkCB2(s,r,l.child(),a);a()}walkCBSync(e,I,l){this.signal?.aborted&&l(),this.walkCB2Sync(e,I,new N9(this.opts),l)}walkCB2Sync(e,I,l,n){if(this.#n(e))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2Sync(e,I,l,n));return}l.processPatterns(e,I);let c=1,a=()=>{--c===0&&n()};for(let[s,r,o]of l.matches.entries())this.#l(s)||this.matchSync(s,r,o);for(let s of l.subwalkTargets()){if(this.maxDepth!==1/0&&s.depth()>=this.maxDepth)continue;c++;let r=s.readdirSync();this.walkCB3Sync(s,r,l,a)}a()}walkCB3Sync(e,I,l,n){l=l.filterEntries(e,I);let c=1,a=()=>{--c===0&&n()};for(let[s,r,o]of l.matches.entries())this.#l(s)||this.matchSync(s,r,o);for(let[s,r]of l.subwalks.entries())c++,this.walkCB2Sync(s,r,l.child(),a);a()}},Y9=class extends xP{matches=new Set;constructor(e,I,l){super(e,I,l)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,I)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?I(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},V9=class extends xP{results;constructor(e,I,l){super(e,I,l),this.results=new Mc({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var _3I=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Qb=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,I){if(!I)throw new TypeError("glob options required");if(this.withFileTypes=!!I.withFileTypes,this.signal=I.signal,this.follow=!!I.follow,this.dot=!!I.dot,this.dotRelative=!!I.dotRelative,this.nodir=!!I.nodir,this.mark=!!I.mark,I.cwd?(I.cwd instanceof URL||I.cwd.startsWith("file://"))&&(I.cwd=q3I(I.cwd)):this.cwd="",this.cwd=I.cwd||"",this.root=I.root,this.magicalBraces=!!I.magicalBraces,this.nobrace=!!I.nobrace,this.noext=!!I.noext,this.realpath=!!I.realpath,this.absolute=I.absolute,this.includeChildMatches=I.includeChildMatches!==!1,this.noglobstar=!!I.noglobstar,this.matchBase=!!I.matchBase,this.maxDepth=typeof I.maxDepth=="number"?I.maxDepth:1/0,this.stat=!!I.stat,this.ignore=I.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!I.windowsPathsNoEscape||I.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(r=>r.replace(/\\/g,"/"))),this.matchBase){if(I.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(r=>r.includes("/")?r:`./**/${r}`)}if(this.pattern=e,this.platform=I.platform||_3I,this.opts={...I,platform:this.platform},I.scurry){if(this.scurry=I.scurry,I.nocase!==void 0&&I.nocase!==I.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let r=I.platform==="win32"?dE:I.platform==="darwin"?W9:I.platform?iE:EUe;this.scurry=new r(this.cwd,{nocase:I.nocase,fs:I.fs})}this.nocase=this.scurry.nocase;let l=this.platform==="darwin"||this.platform==="win32",n={...I,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:l,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},c=this.pattern.map(r=>new _o(r,n)),[a,s]=c.reduce((r,o)=>(r[0].push(...o.set),r[1].push(...o.globParts),r),[[],[]]);this.patterns=a.map((r,o)=>{let d=s[o];if(!d)throw new Error("invalid pattern object");return new bE(r,d,0,this.platform)})}async walk(){return[...await new Y9(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new Y9(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new V9(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new V9(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};G();var hbe=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let I of t)if(new _o(I,e).hasMagic())return!0;return!1};function zP(t,e={}){return new Qb(t,e).streamSync()}function CUe(t,e={}){return new Qb(t,e).stream()}function JUe(t,e={}){return new Qb(t,e).walkSync()}async function vUe(t,e={}){return new Qb(t,e).walk()}function UP(t,e={}){return new Qb(t,e).iterateSync()}function LUe(t,e={}){return new Qb(t,e).iterate()}var $3I=zP,ekI=Object.assign(CUe,{sync:zP}),IkI=UP,tkI=Object.assign(LUe,{sync:UP}),lkI=Object.assign(JUe,{stream:zP,iterate:UP}),BP=Object.assign(vUe,{glob:vUe,globSync:JUe,sync:lkI,globStream:CUe,stream:ekI,globStreamSync:zP,streamSync:$3I,globIterate:LUe,iterate:tkI,globIterateSync:UP,iterateSync:IkI,Glob:Qb,hasMagic:hbe,escape:rE,unescape:Fb});BP.glob=BP;var jUe=Gn(MUe(),1);import*as Uc from"path";G();import*as Vbe from"os";import*as Dh from"path";function Rbe(t){return Dh.isAbsolute(t)?t:t.startsWith("~")?Dh.normalize(t.replace("~",Vbe.homedir())):Dh.resolve(t)}function TUe(){let t=process.env.XDG_CONFIG_HOME,e=".copilot";return t?Dh.join(t,e):Dh.join(Vbe.homedir(),e)}var Kh,ZE,ykI=["node_modules",".git","vendor","dist","build",".next",".nuxt","out","coverage"];async function DUe(t,e,I){return ZE||(Kh||(Kh=new Map),ZE=(async()=>{let l=await KUe(t,e,I);Kh.set(`${t}:${e}:${I||t}`,l)})(),ZE)}async function ybe(t,e,I){let l=`${t}:${e}:${I||t}`;if(Kh?.has(l)||ZE&&(await ZE,Kh?.has(l)))return Kh.get(l);let n=await KUe(t,e,I);return Kh||(Kh=new Map),Kh.set(l,n),n}async function KUe(t,e,I){let l=process.env.COPILOT_CUSTOM_INSTRUCTIONS_DIRS?.split(",").map(h=>h.trim()).filter(h=>h.length>0)??[],[n,c]=await Promise.all([EkI(t,I,l),vkI(t,I,l)]),a;n?a={content:n.content,source:"vscode",sourcePath:".github/instructions"}:c&&(a={content:c.content,source:"nested-agents",sourcePath:"nested AGENTS.md"});let s=e?wkI():{exists:!1,path:void 0},r=AkI(t);if(s.exists||r.exists){let h="",p="",Z=!1,[u,N]=await Promise.all([s.exists&&s.path?li.promises.readFile(s.path,"utf-8"):Promise.resolve(null),r.exists&&r.path?li.promises.readFile(r.path,"utf-8"):Promise.resolve(null)]);if(u){h+=Vu(u);let Y=process.env.XDG_CONFIG_HOME;Y?p=`${Y}/.copilot/copilot-instructions.md`:p="~/.copilot/copilot-instructions.md",Z=!0}return N&&(h?(h+=`
933
933
 
@@ -1351,11 +1351,11 @@ Pay attention to the following when using it:
1351
1351
  `,l),a=-1;if(n!==-1&&c!==-1?a=Math.min(n,c):n!==-1?a=n:c!==-1&&(a=c),a===-1){I=t.slice(l);break}else{let s=t.slice(l,a);e.push(s),l=a+1,t[l-1]==="\r"&&t[l]===`
1352
1352
  `&&l++}}return[e,I]}var oq=class extends Event{constructor(e,I){var l,n;super(e),this.code=(l=I?.code)!=null?l:void 0,this.message=(n=I?.message)!=null?n:void 0}[Symbol.for("nodejs.util.inspect.custom")](e,I,l){return l(Pje(this),I)}[Symbol.for("Deno.customInspect")](e,I){return e(Pje(this),I)}};function YTI(t){let e=globalThis.DOMException;return typeof e=="function"?new e(t,"SyntaxError"):new SyntaxError(t)}function npe(t){return t instanceof Error?"errors"in t&&Array.isArray(t.errors)?t.errors.map(npe).join(", "):"cause"in t&&t.cause instanceof Error?`${t}: ${npe(t.cause)}`:t.message:`${t}`}function Pje(t){return{type:t.type,message:t.message,code:t.code,defaultPrevented:t.defaultPrevented,cancelable:t.cancelable,timeStamp:t.timeStamp}}var _je=t=>{throw TypeError(t)},ipe=(t,e,I)=>e.has(t)||_je("Cannot "+I),Bt=(t,e,I)=>(ipe(t,e,"read from private field"),I?I.call(t):e.get(t)),ra=(t,e,I)=>e.has(t)?_je("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,I),Ln=(t,e,I,l)=>(ipe(t,e,"write to private field"),e.set(t,I),I),Cu=(t,e,I)=>(ipe(t,e,"access private method"),I),_G,nF,TE,Gq,dq,dx,KE,ix,uV,jE,PE,DE,Gx,Cb,cpe,ape,spe,qje,rpe,Gpe,ox,ope,dpe,cF=class extends EventTarget{constructor(e,I){var l,n;super(),ra(this,Cb),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,ra(this,_G),ra(this,nF),ra(this,TE),ra(this,Gq),ra(this,dq),ra(this,dx),ra(this,KE),ra(this,ix,null),ra(this,uV),ra(this,jE),ra(this,PE,null),ra(this,DE,null),ra(this,Gx,null),ra(this,ape,async c=>{var a;Bt(this,jE).reset();let{body:s,redirected:r,status:o,headers:d}=c;if(o===204){Cu(this,Cb,ox).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(r?Ln(this,TE,new URL(c.url)):Ln(this,TE,void 0),o!==200){Cu(this,Cb,ox).call(this,`Non-200 status code (${o})`,o);return}if(!(d.get("content-type")||"").startsWith("text/event-stream")){Cu(this,Cb,ox).call(this,'Invalid content type, expected "text/event-stream"',o);return}if(Bt(this,_G)===this.CLOSED)return;Ln(this,_G,this.OPEN);let i=new Event("open");if((a=Bt(this,Gx))==null||a.call(this,i),this.dispatchEvent(i),typeof s!="object"||!s||!("getReader"in s)){Cu(this,Cb,ox).call(this,"Invalid response body, expected a web ReadableStream",o),this.close();return}let h=new TextDecoder,p=s.getReader(),Z=!0;do{let{done:u,value:N}=await p.read();N&&Bt(this,jE).feed(h.decode(N,{stream:!u})),u&&(Z=!1,Bt(this,jE).reset(),Cu(this,Cb,ope).call(this))}while(Z)}),ra(this,spe,c=>{Ln(this,uV,void 0),!(c.name==="AbortError"||c.type==="aborted")&&Cu(this,Cb,ope).call(this,npe(c))}),ra(this,rpe,c=>{typeof c.id=="string"&&Ln(this,ix,c.id);let a=new MessageEvent(c.event||"message",{data:c.data,origin:Bt(this,TE)?Bt(this,TE).origin:Bt(this,nF).origin,lastEventId:c.id||""});Bt(this,DE)&&(!c.event||c.event==="message")&&Bt(this,DE).call(this,a),this.dispatchEvent(a)}),ra(this,Gpe,c=>{Ln(this,dx,c)}),ra(this,dpe,()=>{Ln(this,KE,void 0),Bt(this,_G)===this.CONNECTING&&Cu(this,Cb,cpe).call(this)});try{if(e instanceof URL)Ln(this,nF,e);else if(typeof e=="string")Ln(this,nF,new URL(e,VTI()));else throw new Error("Invalid URL")}catch{throw YTI("An invalid or illegal string was specified")}Ln(this,jE,rq({onEvent:Bt(this,rpe),onRetry:Bt(this,Gpe)})),Ln(this,_G,this.CONNECTING),Ln(this,dx,3e3),Ln(this,dq,(l=I?.fetch)!=null?l:globalThis.fetch),Ln(this,Gq,(n=I?.withCredentials)!=null?n:!1),Cu(this,Cb,cpe).call(this)}get readyState(){return Bt(this,_G)}get url(){return Bt(this,nF).href}get withCredentials(){return Bt(this,Gq)}get onerror(){return Bt(this,PE)}set onerror(e){Ln(this,PE,e)}get onmessage(){return Bt(this,DE)}set onmessage(e){Ln(this,DE,e)}get onopen(){return Bt(this,Gx)}set onopen(e){Ln(this,Gx,e)}addEventListener(e,I,l){let n=I;super.addEventListener(e,n,l)}removeEventListener(e,I,l){let n=I;super.removeEventListener(e,n,l)}close(){Bt(this,KE)&&clearTimeout(Bt(this,KE)),Bt(this,_G)!==this.CLOSED&&(Bt(this,uV)&&Bt(this,uV).abort(),Ln(this,_G,this.CLOSED),Ln(this,uV,void 0))}};_G=new WeakMap,nF=new WeakMap,TE=new WeakMap,Gq=new WeakMap,dq=new WeakMap,dx=new WeakMap,KE=new WeakMap,ix=new WeakMap,uV=new WeakMap,jE=new WeakMap,PE=new WeakMap,DE=new WeakMap,Gx=new WeakMap,Cb=new WeakSet,cpe=function(){Ln(this,_G,this.CONNECTING),Ln(this,uV,new AbortController),Bt(this,dq)(Bt(this,nF),Cu(this,Cb,qje).call(this)).then(Bt(this,ape)).catch(Bt(this,spe))},ape=new WeakMap,spe=new WeakMap,qje=function(){var t;let e={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...Bt(this,ix)?{"Last-Event-ID":Bt(this,ix)}:void 0},cache:"no-store",signal:(t=Bt(this,uV))==null?void 0:t.signal};return"window"in globalThis&&(e.credentials=this.withCredentials?"include":"same-origin"),e},rpe=new WeakMap,Gpe=new WeakMap,ox=function(t,e){var I;Bt(this,_G)!==this.CLOSED&&Ln(this,_G,this.CLOSED);let l=new oq("error",{code:e,message:t});(I=Bt(this,PE))==null||I.call(this,l),this.dispatchEvent(l)},ope=function(t,e){var I;if(Bt(this,_G)===this.CLOSED)return;Ln(this,_G,this.CONNECTING);let l=new oq("error",{code:e,message:t});(I=Bt(this,PE))==null||I.call(this,l),this.dispatchEvent(l),Ln(this,KE,setTimeout(Bt(this,dpe),Bt(this,dx)))},dpe=new WeakMap,cF.CONNECTING=0,cF.OPEN=1,cF.CLOSED=2;function VTI(){let t="document"in globalThis?globalThis.document:void 0;return t&&typeof t=="object"&&"baseURI"in t&&typeof t.baseURI=="string"?t.baseURI:void 0}G();G();var bpe;bpe=globalThis.crypto?.webcrypto??globalThis.crypto??import("node:crypto").then(t=>t.webcrypto);async function RTI(t){return(await bpe).getRandomValues(new Uint8Array(t))}async function yTI(t){let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",I="",l=await RTI(t);for(let n=0;n<t;n++){let c=l[n]%e.length;I+=e[c]}return I}async function FTI(t){return await yTI(t)}async function gTI(t){let e=await(await bpe).subtle.digest("SHA-256",new TextEncoder().encode(t));return btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function mpe(t){if(t||(t=43),t<43||t>128)throw`Expected a length between 43 and 128. Received ${t}.`;let e=await FTI(t),I=await gTI(e);return{code_verifier:e,code_challenge:I}}G();var Ba=R.string().url().superRefine((t,e)=>{if(!URL.canParse(t))return e.addIssue({code:R.ZodIssueCode.custom,message:"URL must be parseable",fatal:!0}),R.NEVER}).refine(t=>{let e=new URL(t);return e.protocol!=="javascript:"&&e.protocol!=="data:"&&e.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),$je=R.object({resource:R.string().url(),authorization_servers:R.array(Ba).optional(),jwks_uri:R.string().url().optional(),scopes_supported:R.array(R.string()).optional(),bearer_methods_supported:R.array(R.string()).optional(),resource_signing_alg_values_supported:R.array(R.string()).optional(),resource_name:R.string().optional(),resource_documentation:R.string().optional(),resource_policy_uri:R.string().url().optional(),resource_tos_uri:R.string().url().optional(),tls_client_certificate_bound_access_tokens:R.boolean().optional(),authorization_details_types_supported:R.array(R.string()).optional(),dpop_signing_alg_values_supported:R.array(R.string()).optional(),dpop_bound_access_tokens_required:R.boolean().optional()}).passthrough(),hpe=R.object({issuer:R.string(),authorization_endpoint:Ba,token_endpoint:Ba,registration_endpoint:Ba.optional(),scopes_supported:R.array(R.string()).optional(),response_types_supported:R.array(R.string()),response_modes_supported:R.array(R.string()).optional(),grant_types_supported:R.array(R.string()).optional(),token_endpoint_auth_methods_supported:R.array(R.string()).optional(),token_endpoint_auth_signing_alg_values_supported:R.array(R.string()).optional(),service_documentation:Ba.optional(),revocation_endpoint:Ba.optional(),revocation_endpoint_auth_methods_supported:R.array(R.string()).optional(),revocation_endpoint_auth_signing_alg_values_supported:R.array(R.string()).optional(),introspection_endpoint:R.string().optional(),introspection_endpoint_auth_methods_supported:R.array(R.string()).optional(),introspection_endpoint_auth_signing_alg_values_supported:R.array(R.string()).optional(),code_challenge_methods_supported:R.array(R.string()).optional()}).passthrough(),QTI=R.object({issuer:R.string(),authorization_endpoint:Ba,token_endpoint:Ba,userinfo_endpoint:Ba.optional(),jwks_uri:Ba,registration_endpoint:Ba.optional(),scopes_supported:R.array(R.string()).optional(),response_types_supported:R.array(R.string()),response_modes_supported:R.array(R.string()).optional(),grant_types_supported:R.array(R.string()).optional(),acr_values_supported:R.array(R.string()).optional(),subject_types_supported:R.array(R.string()),id_token_signing_alg_values_supported:R.array(R.string()),id_token_encryption_alg_values_supported:R.array(R.string()).optional(),id_token_encryption_enc_values_supported:R.array(R.string()).optional(),userinfo_signing_alg_values_supported:R.array(R.string()).optional(),userinfo_encryption_alg_values_supported:R.array(R.string()).optional(),userinfo_encryption_enc_values_supported:R.array(R.string()).optional(),request_object_signing_alg_values_supported:R.array(R.string()).optional(),request_object_encryption_alg_values_supported:R.array(R.string()).optional(),request_object_encryption_enc_values_supported:R.array(R.string()).optional(),token_endpoint_auth_methods_supported:R.array(R.string()).optional(),token_endpoint_auth_signing_alg_values_supported:R.array(R.string()).optional(),display_values_supported:R.array(R.string()).optional(),claim_types_supported:R.array(R.string()).optional(),claims_supported:R.array(R.string()).optional(),service_documentation:R.string().optional(),claims_locales_supported:R.array(R.string()).optional(),ui_locales_supported:R.array(R.string()).optional(),claims_parameter_supported:R.boolean().optional(),request_parameter_supported:R.boolean().optional(),request_uri_parameter_supported:R.boolean().optional(),require_request_uri_registration:R.boolean().optional(),op_policy_uri:Ba.optional(),op_tos_uri:Ba.optional()}).passthrough(),eDe=QTI.merge(hpe.pick({code_challenge_methods_supported:!0})),ppe=R.object({access_token:R.string(),id_token:R.string().optional(),token_type:R.string(),expires_in:R.number().optional(),scope:R.string().optional(),refresh_token:R.string().optional()}).strip(),IDe=R.object({error:R.string(),error_description:R.string().optional(),error_uri:R.string().optional()}),ATI=R.object({redirect_uris:R.array(Ba),token_endpoint_auth_method:R.string().optional(),grant_types:R.array(R.string()).optional(),response_types:R.array(R.string()).optional(),client_name:R.string().optional(),client_uri:Ba.optional(),logo_uri:Ba.optional(),scope:R.string().optional(),contacts:R.array(R.string()).optional(),tos_uri:Ba.optional(),policy_uri:R.string().optional(),jwks_uri:Ba.optional(),jwks:R.any().optional(),software_id:R.string().optional(),software_version:R.string().optional(),software_statement:R.string().optional()}).strip(),wTI=R.object({client_id:R.string(),client_secret:R.string().optional(),client_id_issued_at:R.number().optional(),client_secret_expires_at:R.number().optional()}).strip(),tDe=ATI.merge(wTI),eql=R.object({error:R.string(),error_description:R.string().optional()}).strip(),Iql=R.object({token:R.string(),token_type_hint:R.string().optional()}).strip();G();function lDe(t){let e=typeof t=="string"?new URL(t):new URL(t.href);return e.hash="",e}function nDe({requestedResource:t,configuredResource:e}){let I=typeof t=="string"?new URL(t):new URL(t.href),l=typeof e=="string"?new URL(e):new URL(e.href);if(I.origin!==l.origin||I.pathname.length<l.pathname.length)return!1;let n=I.pathname.endsWith("/")?I.pathname:I.pathname+"/",c=l.pathname.endsWith("/")?l.pathname:l.pathname+"/";return n.startsWith(c)}G();var Sc=class extends Error{constructor(e,I){super(e),this.errorUri=I,this.name=this.constructor.name}toResponseObject(){let e={error:this.errorCode,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}get errorCode(){return this.constructor.errorCode}},bx=class extends Sc{};bx.errorCode="invalid_request";var aF=class extends Sc{};aF.errorCode="invalid_client";var sF=class extends Sc{};sF.errorCode="invalid_grant";var rF=class extends Sc{};rF.errorCode="unauthorized_client";var mx=class extends Sc{};mx.errorCode="unsupported_grant_type";var hx=class extends Sc{};hx.errorCode="invalid_scope";var px=class extends Sc{};px.errorCode="access_denied";var Ju=class extends Sc{};Ju.errorCode="server_error";var Zx=class extends Sc{};Zx.errorCode="temporarily_unavailable";var ux=class extends Sc{};ux.errorCode="unsupported_response_type";var Wx=class extends Sc{};Wx.errorCode="unsupported_token_type";var Nx=class extends Sc{};Nx.errorCode="invalid_token";var Yx=class extends Sc{};Yx.errorCode="method_not_allowed";var Vx=class extends Sc{};Vx.errorCode="too_many_requests";var Rx=class extends Sc{};Rx.errorCode="invalid_client_metadata";var yx=class extends Sc{};yx.errorCode="insufficient_scope";var cDe={[bx.errorCode]:bx,[aF.errorCode]:aF,[sF.errorCode]:sF,[rF.errorCode]:rF,[mx.errorCode]:mx,[hx.errorCode]:hx,[px.errorCode]:px,[Ju.errorCode]:Ju,[Zx.errorCode]:Zx,[ux.errorCode]:ux,[Wx.errorCode]:Wx,[Nx.errorCode]:Nx,[Yx.errorCode]:Yx,[Vx.errorCode]:Vx,[Rx.errorCode]:Rx,[yx.errorCode]:yx};var $G=class extends Error{constructor(e){super(e??"Unauthorized")}};function sDe(t,e){let I=t.client_secret!==void 0;return e.length===0?I?"client_secret_post":"none":I&&e.includes("client_secret_basic")?"client_secret_basic":I&&e.includes("client_secret_post")?"client_secret_post":e.includes("none")?"none":I?"client_secret_post":"none"}function rDe(t,e,I,l){let{client_id:n,client_secret:c}=e;switch(t){case"client_secret_basic":XTI(n,c,I);return;case"client_secret_post":HTI(n,c,l);return;case"none":ETI(n,l);return;default:throw new Error(`Unsupported client authentication method: ${t}`)}}function XTI(t,e,I){if(!e)throw new Error("client_secret_basic authentication requires a client_secret");let l=btoa(`${t}:${e}`);I.set("Authorization",`Basic ${l}`)}function HTI(t,e,I){I.set("client_id",t),e&&I.set("client_secret",e)}function ETI(t,e){e.set("client_id",t)}async function upe(t){let e=t instanceof Response?t.status:void 0,I=t instanceof Response?await t.text():t;try{let l=IDe.parse(JSON.parse(I)),{error:n,error_description:c,error_uri:a}=l,s=cDe[n]||Ju;return new s(c||"",a)}catch(l){let n=`${e?`HTTP ${e}: `:""}Invalid OAuth error response: ${l}. Raw body: ${I}`;return new Ju(n)}}async function WV(t,e){var I,l;try{return await Zpe(t,e)}catch(n){if(n instanceof aF||n instanceof rF)return await((I=t.invalidateCredentials)===null||I===void 0?void 0:I.call(t,"all")),await Zpe(t,e);if(n instanceof sF)return await((l=t.invalidateCredentials)===null||l===void 0?void 0:l.call(t,"tokens")),await Zpe(t,e);throw n}}async function Zpe(t,{serverUrl:e,authorizationCode:I,scope:l,resourceMetadataUrl:n,fetchFn:c}){let a,s;try{a=await CTI(e,{resourceMetadataUrl:n},c),a.authorization_servers&&a.authorization_servers.length>0&&(s=a.authorization_servers[0])}catch{}s||(s=e);let r=await vTI(e,t,a),o=await xTI(s,{fetchFn:c}),d=await Promise.resolve(t.clientInformation());if(!d){if(I!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");if(!t.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");let u=await STI(s,{metadata:o,clientMetadata:t.clientMetadata,fetchFn:c});await t.saveClientInformation(u),d=u}if(I!==void 0){let u=await t.codeVerifier(),N=await zTI(s,{metadata:o,clientInformation:d,authorizationCode:I,codeVerifier:u,redirectUri:t.redirectUrl,resource:r,addClientAuthentication:t.addClientAuthentication,fetchFn:c});return await t.saveTokens(N),"AUTHORIZED"}let i=await t.tokens();if(i?.refresh_token)try{let u=await UTI(s,{metadata:o,clientInformation:d,refreshToken:i.refresh_token,resource:r,addClientAuthentication:t.addClientAuthentication,fetchFn:c});return await t.saveTokens(u),"AUTHORIZED"}catch(u){if(!(!(u instanceof Sc)||u instanceof Ju))throw u}let h=t.state?await t.state():void 0,{authorizationUrl:p,codeVerifier:Z}=await BTI(s,{metadata:o,clientInformation:d,state:h,redirectUrl:t.redirectUrl,scope:l||t.clientMetadata.scope,resource:r});return await t.saveCodeVerifier(Z),await t.redirectToAuthorization(p),"REDIRECT"}async function vTI(t,e,I){let l=lDe(t);if(e.validateResourceURL)return await e.validateResourceURL(l,I?.resource);if(I){if(!nDe({requestedResource:l,configuredResource:I.resource}))throw new Error(`Protected resource ${I.resource} does not match expected ${l} (or origin)`);return new URL(I.resource)}}function Fx(t){let e=t.headers.get("WWW-Authenticate");if(!e)return;let[I,l]=e.split(" ");if(I.toLowerCase()!=="bearer"||!l)return;let c=/resource_metadata="([^"]*)"/.exec(e);if(c)try{return new URL(c[1])}catch{return}}async function CTI(t,e,I=fetch){let l=await kTI(t,"oauth-protected-resource",I,{protocolVersion:e?.protocolVersion,metadataUrl:e?.resourceMetadataUrl});if(!l||l.status===404)throw new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!l.ok)throw new Error(`HTTP ${l.status} trying to load well-known OAuth protected resource metadata.`);return $je.parse(await l.json())}async function Wpe(t,e,I=fetch){try{return await I(t,{headers:e})}catch(l){if(l instanceof TypeError)return e?Wpe(t,void 0,I):void 0;throw l}}function JTI(t,e="",I={}){return e.endsWith("/")&&(e=e.slice(0,-1)),I.prependPathname?`${e}/.well-known/${t}`:`/.well-known/${t}${e}`}async function aDe(t,e,I=fetch){return await Wpe(t,{"MCP-Protocol-Version":e},I)}function LTI(t,e){return!t||t.status>=400&&t.status<500&&e!=="/"}async function kTI(t,e,I,l){var n,c;let a=new URL(t),s=(n=l?.protocolVersion)!==null&&n!==void 0?n:HE,r;if(l?.metadataUrl)r=new URL(l.metadataUrl);else{let d=JTI(e,a.pathname);r=new URL(d,(c=l?.metadataServerUrl)!==null&&c!==void 0?c:a),r.search=a.search}let o=await aDe(r,s,I);if(!l?.metadataUrl&&LTI(o,a.pathname)){let d=new URL(`/.well-known/${e}`,a);o=await aDe(d,s,I)}return o}function fTI(t){let e=typeof t=="string"?new URL(t):t,I=e.pathname!=="/",l=[];if(!I)return l.push({url:new URL("/.well-known/oauth-authorization-server",e.origin),type:"oauth"}),l.push({url:new URL("/.well-known/openid-configuration",e.origin),type:"oidc"}),l;let n=e.pathname;return n.endsWith("/")&&(n=n.slice(0,-1)),l.push({url:new URL(`/.well-known/oauth-authorization-server${n}`,e.origin),type:"oauth"}),l.push({url:new URL("/.well-known/oauth-authorization-server",e.origin),type:"oauth"}),l.push({url:new URL(`/.well-known/openid-configuration${n}`,e.origin),type:"oidc"}),l.push({url:new URL(`${n}/.well-known/openid-configuration`,e.origin),type:"oidc"}),l}async function xTI(t,{fetchFn:e=fetch,protocolVersion:I=HE}={}){var l;let n={"MCP-Protocol-Version":I},c=fTI(t);for(let{url:a,type:s}of c){let r=await Wpe(a,n,e);if(r){if(!r.ok){if(r.status>=400&&r.status<500)continue;throw new Error(`HTTP ${r.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${a}`)}if(s==="oauth")return hpe.parse(await r.json());{let o=eDe.parse(await r.json());if(!(!((l=o.code_challenge_methods_supported)===null||l===void 0)&&l.includes("S256")))throw new Error(`Incompatible OIDC provider at ${a}: does not support S256 code challenge method required by MCP specification`);return o}}}}async function BTI(t,{metadata:e,clientInformation:I,redirectUrl:l,scope:n,state:c,resource:a}){let s="code",r="S256",o;if(e){if(o=new URL(e.authorization_endpoint),!e.response_types_supported.includes(s))throw new Error(`Incompatible auth server: does not support response type ${s}`);if(!e.code_challenge_methods_supported||!e.code_challenge_methods_supported.includes(r))throw new Error(`Incompatible auth server: does not support code challenge method ${r}`)}else o=new URL("/authorize",t);let d=await mpe(),i=d.code_verifier,h=d.code_challenge;return o.searchParams.set("response_type",s),o.searchParams.set("client_id",I.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",r),o.searchParams.set("redirect_uri",String(l)),c&&o.searchParams.set("state",c),n&&o.searchParams.set("scope",n),n?.includes("offline_access")&&o.searchParams.append("prompt","consent"),a&&o.searchParams.set("resource",a.href),{authorizationUrl:o,codeVerifier:i}}async function zTI(t,{metadata:e,clientInformation:I,authorizationCode:l,codeVerifier:n,redirectUri:c,resource:a,addClientAuthentication:s,fetchFn:r}){var o;let d="authorization_code",i=e?.token_endpoint?new URL(e.token_endpoint):new URL("/token",t);if(e?.grant_types_supported&&!e.grant_types_supported.includes(d))throw new Error(`Incompatible auth server: does not support grant type ${d}`);let h=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"}),p=new URLSearchParams({grant_type:d,code:l,code_verifier:n,redirect_uri:String(c)});if(s)s(h,p,t,e);else{let u=(o=e?.token_endpoint_auth_methods_supported)!==null&&o!==void 0?o:[],N=sDe(I,u);rDe(N,I,h,p)}a&&p.set("resource",a.href);let Z=await(r??fetch)(i,{method:"POST",headers:h,body:p});if(!Z.ok)throw await upe(Z);return ppe.parse(await Z.json())}async function UTI(t,{metadata:e,clientInformation:I,refreshToken:l,resource:n,addClientAuthentication:c,fetchFn:a}){var s;let r="refresh_token",o;if(e){if(o=new URL(e.token_endpoint),e.grant_types_supported&&!e.grant_types_supported.includes(r))throw new Error(`Incompatible auth server: does not support grant type ${r}`)}else o=new URL("/token",t);let d=new Headers({"Content-Type":"application/x-www-form-urlencoded"}),i=new URLSearchParams({grant_type:r,refresh_token:l});if(c)c(d,i,t,e);else{let p=(s=e?.token_endpoint_auth_methods_supported)!==null&&s!==void 0?s:[],Z=sDe(I,p);rDe(Z,I,d,i)}n&&i.set("resource",n.href);let h=await(a??fetch)(o,{method:"POST",headers:d,body:i});if(!h.ok)throw await upe(h);return ppe.parse({refresh_token:l,...await h.json()})}async function STI(t,{metadata:e,clientMetadata:I,fetchFn:l}){let n;if(e){if(!e.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");n=new URL(e.registration_endpoint)}else n=new URL("/register",t);let c=await(l??fetch)(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(I)});if(!c.ok)throw await upe(c);return tDe.parse(await c.json())}var Npe=class extends Error{constructor(e,I,l){super(`SSE error: ${I}`),this.code=e,this.event=l}},iq=class{constructor(e,I){this._url=e,this._resourceMetadataUrl=void 0,this._eventSourceInit=I?.eventSourceInit,this._requestInit=I?.requestInit,this._authProvider=I?.authProvider,this._fetch=I?.fetch}async _authThenStart(){var e;if(!this._authProvider)throw new $G("No auth provider");let I;try{I=await WV(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,fetchFn:this._fetch})}catch(l){throw(e=this.onerror)===null||e===void 0||e.call(this,l),l}if(I!=="AUTHORIZED")throw new $G;return await this._startOrAuth()}async _commonHeaders(){var e;let I={};if(this._authProvider){let l=await this._authProvider.tokens();l&&(I.Authorization=`Bearer ${l.access_token}`)}return this._protocolVersion&&(I["mcp-protocol-version"]=this._protocolVersion),new Headers({...I,...(e=this._requestInit)===null||e===void 0?void 0:e.headers})}_startOrAuth(){var e,I,l;let n=(l=(I=(e=this===null||this===void 0?void 0:this._eventSourceInit)===null||e===void 0?void 0:e.fetch)!==null&&I!==void 0?I:this._fetch)!==null&&l!==void 0?l:fetch;return new Promise((c,a)=>{this._eventSource=new cF(this._url.href,{...this._eventSourceInit,fetch:async(s,r)=>{let o=await this._commonHeaders();o.set("Accept","text/event-stream");let d=await n(s,{...r,headers:o});return d.status===401&&d.headers.has("www-authenticate")&&(this._resourceMetadataUrl=Fx(d)),d}}),this._abortController=new AbortController,this._eventSource.onerror=s=>{var r;if(s.code===401&&this._authProvider){this._authThenStart().then(c,a);return}let o=new Npe(s.code,s.message,s);a(o),(r=this.onerror)===null||r===void 0||r.call(this,o)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",s=>{var r;let o=s;try{if(this._endpoint=new URL(o.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(d){a(d),(r=this.onerror)===null||r===void 0||r.call(this,d),this.close();return}c()}),this._eventSource.onmessage=s=>{var r,o;let d=s,i;try{i=oV.parse(JSON.parse(d.data))}catch(h){(r=this.onerror)===null||r===void 0||r.call(this,h);return}(o=this.onmessage)===null||o===void 0||o.call(this,i)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(e){if(!this._authProvider)throw new $G("No auth provider");if(await WV(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,fetchFn:this._fetch})!=="AUTHORIZED")throw new $G("Failed to authorize")}async close(){var e,I,l;(e=this._abortController)===null||e===void 0||e.abort(),(I=this._eventSource)===null||I===void 0||I.close(),(l=this.onclose)===null||l===void 0||l.call(this)}async send(e){var I,l,n;if(!this._endpoint)throw new Error("Not connected");try{let c=await this._commonHeaders();c.set("content-type","application/json");let a={...this._requestInit,method:"POST",headers:c,body:JSON.stringify(e),signal:(I=this._abortController)===null||I===void 0?void 0:I.signal},s=await((l=this._fetch)!==null&&l!==void 0?l:fetch)(this._endpoint,a);if(!s.ok){if(s.status===401&&this._authProvider){if(this._resourceMetadataUrl=Fx(s),await WV(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,fetchFn:this._fetch})!=="AUTHORIZED")throw new $G;return this.send(e)}let r=await s.text().catch(()=>null);throw new Error(`Error POSTing to endpoint (HTTP ${s.status}): ${r}`)}}catch(c){throw(n=this.onerror)===null||n===void 0||n.call(this,c),c}}setProtocolVersion(e){this._protocolVersion=e}};G();var _De=Gn(PDe(),1);import pq from"node:process";import{PassThrough as ZjI}from"node:stream";G();var mq=class{append(e){this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;let e=this._buffer.indexOf(`
1353
1353
  `);if(e===-1)return null;let I=this._buffer.toString("utf8",0,e).replace(/\r$/,"");return this._buffer=this._buffer.subarray(e+1),pjI(I)}clear(){this._buffer=void 0}};function pjI(t){return oV.parse(JSON.parse(t))}function qDe(t){return JSON.stringify(t)+`
1354
- `}var ujI=pq.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];function WjI(){let t={};for(let e of ujI){let I=pq.env[e];I!==void 0&&(I.startsWith("()")||(t[e]=I))}return t}var hq=class{constructor(e){this._abortController=new AbortController,this._readBuffer=new mq,this._stderrStream=null,this._serverParams=e,(e.stderr==="pipe"||e.stderr==="overlapped")&&(this._stderrStream=new ZjI)}async start(){if(this._process)throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,I)=>{var l,n,c,a,s;this._process=(0,_De.default)(this._serverParams.command,(l=this._serverParams.args)!==null&&l!==void 0?l:[],{env:{...WjI(),...this._serverParams.env},stdio:["pipe","pipe",(n=this._serverParams.stderr)!==null&&n!==void 0?n:"inherit"],shell:!1,signal:this._abortController.signal,windowsHide:pq.platform==="win32"&&NjI(),cwd:this._serverParams.cwd}),this._process.on("error",r=>{var o,d;if(r.name==="AbortError"){(o=this.onclose)===null||o===void 0||o.call(this);return}I(r),(d=this.onerror)===null||d===void 0||d.call(this,r)}),this._process.on("spawn",()=>{e()}),this._process.on("close",r=>{var o;this._process=void 0,(o=this.onclose)===null||o===void 0||o.call(this)}),(c=this._process.stdin)===null||c===void 0||c.on("error",r=>{var o;(o=this.onerror)===null||o===void 0||o.call(this,r)}),(a=this._process.stdout)===null||a===void 0||a.on("data",r=>{this._readBuffer.append(r),this.processReadBuffer()}),(s=this._process.stdout)===null||s===void 0||s.on("error",r=>{var o;(o=this.onerror)===null||o===void 0||o.call(this,r)}),this._stderrStream&&this._process.stderr&&this._process.stderr.pipe(this._stderrStream)})}get stderr(){var e,I;return this._stderrStream?this._stderrStream:(I=(e=this._process)===null||e===void 0?void 0:e.stderr)!==null&&I!==void 0?I:null}get pid(){var e,I;return(I=(e=this._process)===null||e===void 0?void 0:e.pid)!==null&&I!==void 0?I:null}processReadBuffer(){for(var e,I;;)try{let l=this._readBuffer.readMessage();if(l===null)break;(e=this.onmessage)===null||e===void 0||e.call(this,l)}catch(l){(I=this.onerror)===null||I===void 0||I.call(this,l)}}async close(){this._abortController.abort(),this._process=void 0,this._readBuffer.clear()}send(e){return new Promise(I=>{var l;if(!(!((l=this._process)===null||l===void 0)&&l.stdin))throw new Error("Not connected");let n=qDe(e);this._process.stdin.write(n)?I():this._process.stdin.once("drain",I)})}};function NjI(){return"type"in pq}G();G();var Zq=class extends TransformStream{constructor({onError:e,onRetry:I,onComment:l}={}){let n;super({start(c){n=rq({onEvent:a=>{c.enqueue(a)},onError(a){e==="terminate"?c.error(a):typeof e=="function"&&e(a)},onRetry:I,onComment:l})},transform(c){n.feed(c)}})}};var YjI={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2},gx=class extends Error{constructor(e,I){super(`Streamable HTTP error: ${I}`),this.code=e}},uq=class{constructor(e,I){var l;this._url=e,this._resourceMetadataUrl=void 0,this._requestInit=I?.requestInit,this._authProvider=I?.authProvider,this._fetch=I?.fetch,this._sessionId=I?.sessionId,this._reconnectionOptions=(l=I?.reconnectionOptions)!==null&&l!==void 0?l:YjI}async _authThenStart(){var e;if(!this._authProvider)throw new $G("No auth provider");let I;try{I=await WV(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,fetchFn:this._fetch})}catch(l){throw(e=this.onerror)===null||e===void 0||e.call(this,l),l}if(I!=="AUTHORIZED")throw new $G;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){var e;let I={};if(this._authProvider){let n=await this._authProvider.tokens();n&&(I.Authorization=`Bearer ${n.access_token}`)}this._sessionId&&(I["mcp-session-id"]=this._sessionId),this._protocolVersion&&(I["mcp-protocol-version"]=this._protocolVersion);let l=this._normalizeHeaders((e=this._requestInit)===null||e===void 0?void 0:e.headers);return new Headers({...I,...l})}async _startOrAuthSse(e){var I,l,n;let{resumptionToken:c}=e;try{let a=await this._commonHeaders();a.set("Accept","text/event-stream"),c&&a.set("last-event-id",c);let s=await((I=this._fetch)!==null&&I!==void 0?I:fetch)(this._url,{method:"GET",headers:a,signal:(l=this._abortController)===null||l===void 0?void 0:l.signal});if(!s.ok){if(s.status===401&&this._authProvider)return await this._authThenStart();if(s.status===405)return;throw new gx(s.status,`Failed to open SSE stream: ${s.statusText}`)}this._handleSseStream(s.body,e,!0)}catch(a){throw(n=this.onerror)===null||n===void 0||n.call(this,a),a}}_getNextReconnectionDelay(e){let I=this._reconnectionOptions.initialReconnectionDelay,l=this._reconnectionOptions.reconnectionDelayGrowFactor,n=this._reconnectionOptions.maxReconnectionDelay;return Math.min(I*Math.pow(l,e),n)}_normalizeHeaders(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}_scheduleReconnection(e,I=0){var l;let n=this._reconnectionOptions.maxRetries;if(n>0&&I>=n){(l=this.onerror)===null||l===void 0||l.call(this,new Error(`Maximum reconnection attempts (${n}) exceeded.`));return}let c=this._getNextReconnectionDelay(I);setTimeout(()=>{this._startOrAuthSse(e).catch(a=>{var s;(s=this.onerror)===null||s===void 0||s.call(this,new Error(`Failed to reconnect SSE stream: ${a instanceof Error?a.message:String(a)}`)),this._scheduleReconnection(e,I+1)})},c)}_handleSseStream(e,I,l){if(!e)return;let{onresumptiontoken:n,replayMessageId:c}=I,a;(async()=>{var r,o,d,i;try{let h=e.pipeThrough(new TextDecoderStream).pipeThrough(new Zq).getReader();for(;;){let{value:p,done:Z}=await h.read();if(Z)break;if(p.id&&(a=p.id,n?.(p.id)),!p.event||p.event==="message")try{let u=oV.parse(JSON.parse(p.data));c!==void 0&&v9(u)&&(u.id=c),(r=this.onmessage)===null||r===void 0||r.call(this,u)}catch(u){(o=this.onerror)===null||o===void 0||o.call(this,u)}}}catch(h){if((d=this.onerror)===null||d===void 0||d.call(this,new Error(`SSE stream disconnected: ${h}`)),l&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:a,onresumptiontoken:n,replayMessageId:c},0)}catch(p){(i=this.onerror)===null||i===void 0||i.call(this,new Error(`Failed to reconnect: ${p instanceof Error?p.message:String(p)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(e){if(!this._authProvider)throw new $G("No auth provider");if(await WV(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,fetchFn:this._fetch})!=="AUTHORIZED")throw new $G("Failed to authorize")}async close(){var e,I;(e=this._abortController)===null||e===void 0||e.abort(),(I=this.onclose)===null||I===void 0||I.call(this)}async send(e,I){var l,n,c,a;try{let{resumptionToken:s,onresumptiontoken:r}=I||{};if(s){this._startOrAuthSse({resumptionToken:s,replayMessageId:p6(e)?e.id:void 0}).catch(N=>{var Y;return(Y=this.onerror)===null||Y===void 0?void 0:Y.call(this,N)});return}let o=await this._commonHeaders();o.set("content-type","application/json"),o.set("accept","application/json, text/event-stream");let d={...this._requestInit,method:"POST",headers:o,body:JSON.stringify(e),signal:(l=this._abortController)===null||l===void 0?void 0:l.signal},i=await((n=this._fetch)!==null&&n!==void 0?n:fetch)(this._url,d),h=i.headers.get("mcp-session-id");if(h&&(this._sessionId=h),!i.ok){if(i.status===401&&this._authProvider){if(this._resourceMetadataUrl=Fx(i),await WV(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,fetchFn:this._fetch})!=="AUTHORIZED")throw new $G;return this.send(e)}let N=await i.text().catch(()=>null);throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${N}`)}if(i.status===202){rMe(e)&&this._startOrAuthSse({resumptionToken:void 0}).catch(N=>{var Y;return(Y=this.onerror)===null||Y===void 0?void 0:Y.call(this,N)});return}let Z=(Array.isArray(e)?e:[e]).filter(N=>"method"in N&&"id"in N&&N.id!==void 0).length>0,u=i.headers.get("content-type");if(Z)if(u?.includes("text/event-stream"))this._handleSseStream(i.body,{onresumptiontoken:r},!1);else if(u?.includes("application/json")){let N=await i.json(),Y=Array.isArray(N)?N.map(y=>oV.parse(y)):[oV.parse(N)];for(let y of Y)(c=this.onmessage)===null||c===void 0||c.call(this,y)}else throw new gx(-1,`Unexpected content type: ${u}`)}catch(s){throw(a=this.onerror)===null||a===void 0||a.call(this,s),s}}get sessionId(){return this._sessionId}async terminateSession(){var e,I,l;if(this._sessionId)try{let n=await this._commonHeaders(),c={...this._requestInit,method:"DELETE",headers:n,signal:(e=this._abortController)===null||e===void 0?void 0:e.signal},a=await((I=this._fetch)!==null&&I!==void 0?I:fetch)(this._url,c);if(!a.ok&&a.status!==405)throw new gx(a.status,`Failed to terminate session: ${a.statusText}`);this._sessionId=void 0}catch(n){throw(l=this.onerror)===null||l===void 0||l.call(this,n),n}}setProtocolVersion(e){this._protocolVersion=e}get protocolVersion(){return this._protocolVersion}};G();var Wq=class{constructor(e){this.server=e}onmessage;onerror;onclose;serverTransport;closed=!1;async start(){if(this.closed)throw new Error("Transport is closed");this.serverTransport=new Xpe(this),await this.server.connect(this.serverTransport)}async send(e){if(this.closed)throw new Error("Transport is closed");setImmediate(()=>{try{this.serverTransport?.onmessage?.(e)}catch(I){this.onerror?.(I instanceof Error?I:new Error(String(I)))}})}receive(e){this.closed||this.onmessage?.(e)}async close(){this.closed||(this.closed=!0,await this.serverTransport?.close(),this.onclose?.())}},Xpe=class{constructor(e){this.clientTransport=e}onmessage;onerror;onclose;closed=!1;async start(){}async send(e){if(this.closed)throw new Error("Transport is closed");setImmediate(()=>{try{this.clientTransport.receive(e)}catch(I){this.onerror?.(I instanceof Error?I:new Error(String(I)))}})}async close(){this.closed||(this.closed=!0,this.onclose?.())}};var Nq=class{createTransport(e){switch(e.type){case"stdio":{let I=new hq({command:e.command,args:e.args,env:e.env,stderr:e.stderr?"pipe":void 0});return I.stderr?.pipe(e.stderr),I}case"http":return new uq(new URL(e.url),{requestInit:{headers:e.headers||{}}});case"sse":return new iq(new URL(e.url),{requestInit:{headers:e.headers||{}}});case"memory":return new Wq(e.server);default:throw new Error(`Unsupported transport type: ${e.type}`)}}};G();var GF="blackbird-mcp-server",$E="github-mcp-server",Hpe="playwright";function e1(t){return t.type===void 0||t.type.toLowerCase()==="local"||t.type.toLowerCase()==="stdio"}function Yq(t){return t.type?.toLowerCase()==="http"}function Vq(t){return t.type?.toLowerCase()==="sse"}function Qx(t){return t.type?.toLowerCase()==="memory"}var Epe=class extends VjI{constructor(I,l){super({decodeStrings:!1});this.serverName=I;this.logger=l}_write(I,l,n){try{let c=I.toString();this.logger.log(`[mcp server ${this.serverName} stderr] ${c}`),n()}catch(c){n(c instanceof Error?c:new Error(String(c)))}}},Rq=class{constructor(e,I=new aq,l=new Nq){this.logger=e;this.clientFactory=I;this.transportFactory=l}clients={};transports={};async startLocalMcpClient(e,I,l,n){this.logger.log(`Starting MCP client for ${e} with command: ${l} and args: ${n}`);let c=new Epe(e,this.logger),a={type:"stdio",command:l,args:n,env:{...I,PATH:process.env.PATH},stderr:c},s=this.transportFactory.createTransport(a);await this.setupAndConnectClient(e,s)}async startHttpMcpClient(e,I){this.logger.log(`Starting remote MCP client for ${e} with url: ${I.url}`);let l={type:"http",url:I.url,headers:I.headers},n=this.transportFactory.createTransport(l);await this.setupAndConnectClient(e,n)}async startSseMcpClient(e,I){this.logger.log(`Starting remote MCP client for ${e} with url: ${I.url}`);let l={type:"sse",url:I.url,headers:I.headers},n=this.transportFactory.createTransport(l);await this.setupAndConnectClient(e,n)}async startInMemoryMcpClient(e,I){this.logger.log(`Starting in-memory MCP client for ${e}`);let l={type:"memory",server:I},n=this.transportFactory.createTransport(l);await this.setupAndConnectClient(e,n)}async setupAndConnectClient(e,I){this.transports[e]=I,I.onclose=()=>{this.logger.log(`MCP transport for ${e} closed`),delete this.transports[e]},this.logger.log(`Creating MCP client for ${e}...`);let l=this.clientFactory.createClient({name:"github-copilot-developer",version:"1.0.0"},{capabilities:{experimental:void 0,roots:void 0,sampling:void 0}}),n=Date.now();this.logger.log(`Connecting MCP client for ${e}...`),await l.connect(I),l.onclose=()=>{this.logger.log(`MCP client for ${e} closed`),delete this.clients[e]},l.onerror=c=>{this.logger.error(`MCP client for ${e} errored ${c}`)},this.logger.log(`MCP client for ${e} connected, took ${Date.now()-n}ms`),this.clients[e]=l}async getTools(e,I){let l={};for(let[n,c]of Object.entries(this.clients)){let a=[];try{this.logger.log(`Fetching tools from client: ${n}`);let s=await c.listTools(),r=e?.mcpServers[n].tools,o=e?.mcpServers[n].filterMapping;for(let i of s.tools){if(i.name==="get_copilot_space")continue;if(!(r?.includes("*")||r?.includes(i.name))){this.logger.log(`Tool ${i.name} is not in the allowed list for client: ${n}`);continue}let p=l6(n,i.name),Z=`${n}-${i.name}`,u;typeof o=="string"?u=ebe(o):u=ebe(o?.[i.name]??"hidden_characters"),l[`${n}/${i.name}`]={name:Z,namespacedName:`${n}/${i.name}`,title:i.title??i.annotations?.title??i.name,description:i.description??Z,input_schema:i.inputSchema,readOnly:i.annotations?.readOnlyHint,safeForTelemetry:{name:!!(e?.mcpServers[n].isDefaultServer||p),inputsNames:!!e?.mcpServers[n].isDefaultServer},filterMode:u},a.push(i.name),this.logger.log(`Tool ${i.name} added to tools list for client: ${n}`)}this.logger.log(`Successfully retrieved ${a.length} tools from client: ${n}`);let d=c.getServerVersion();await this.logServerSuccessWithTools(n,a,d,I)}catch(s){this.logger.error(`Failed to get tools from client: ${n} ${s}`)}}return this.logger.log(`All tools retrieved: ${JSON.stringify(l,null,2)}`),l}async logServerSuccessWithTools(e,I,l,n){if(e!=GF&&n)try{let c=I.map(r=>`- ${r}`).join(`
1354
+ `}var ujI=pq.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];function WjI(){let t={};for(let e of ujI){let I=pq.env[e];I!==void 0&&(I.startsWith("()")||(t[e]=I))}return t}var hq=class{constructor(e){this._abortController=new AbortController,this._readBuffer=new mq,this._stderrStream=null,this._serverParams=e,(e.stderr==="pipe"||e.stderr==="overlapped")&&(this._stderrStream=new ZjI)}async start(){if(this._process)throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,I)=>{var l,n,c,a,s;this._process=(0,_De.default)(this._serverParams.command,(l=this._serverParams.args)!==null&&l!==void 0?l:[],{env:{...WjI(),...this._serverParams.env},stdio:["pipe","pipe",(n=this._serverParams.stderr)!==null&&n!==void 0?n:"inherit"],shell:!1,signal:this._abortController.signal,windowsHide:pq.platform==="win32"&&NjI(),cwd:this._serverParams.cwd}),this._process.on("error",r=>{var o,d;if(r.name==="AbortError"){(o=this.onclose)===null||o===void 0||o.call(this);return}I(r),(d=this.onerror)===null||d===void 0||d.call(this,r)}),this._process.on("spawn",()=>{e()}),this._process.on("close",r=>{var o;this._process=void 0,(o=this.onclose)===null||o===void 0||o.call(this)}),(c=this._process.stdin)===null||c===void 0||c.on("error",r=>{var o;(o=this.onerror)===null||o===void 0||o.call(this,r)}),(a=this._process.stdout)===null||a===void 0||a.on("data",r=>{this._readBuffer.append(r),this.processReadBuffer()}),(s=this._process.stdout)===null||s===void 0||s.on("error",r=>{var o;(o=this.onerror)===null||o===void 0||o.call(this,r)}),this._stderrStream&&this._process.stderr&&this._process.stderr.pipe(this._stderrStream)})}get stderr(){var e,I;return this._stderrStream?this._stderrStream:(I=(e=this._process)===null||e===void 0?void 0:e.stderr)!==null&&I!==void 0?I:null}get pid(){var e,I;return(I=(e=this._process)===null||e===void 0?void 0:e.pid)!==null&&I!==void 0?I:null}processReadBuffer(){for(var e,I;;)try{let l=this._readBuffer.readMessage();if(l===null)break;(e=this.onmessage)===null||e===void 0||e.call(this,l)}catch(l){(I=this.onerror)===null||I===void 0||I.call(this,l)}}async close(){this._abortController.abort(),this._process=void 0,this._readBuffer.clear()}send(e){return new Promise(I=>{var l;if(!(!((l=this._process)===null||l===void 0)&&l.stdin))throw new Error("Not connected");let n=qDe(e);this._process.stdin.write(n)?I():this._process.stdin.once("drain",I)})}};function NjI(){return"type"in pq}G();G();var Zq=class extends TransformStream{constructor({onError:e,onRetry:I,onComment:l}={}){let n;super({start(c){n=rq({onEvent:a=>{c.enqueue(a)},onError(a){e==="terminate"?c.error(a):typeof e=="function"&&e(a)},onRetry:I,onComment:l})},transform(c){n.feed(c)}})}};var YjI={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2},gx=class extends Error{constructor(e,I){super(`Streamable HTTP error: ${I}`),this.code=e}},uq=class{constructor(e,I){var l;this._url=e,this._resourceMetadataUrl=void 0,this._requestInit=I?.requestInit,this._authProvider=I?.authProvider,this._fetch=I?.fetch,this._sessionId=I?.sessionId,this._reconnectionOptions=(l=I?.reconnectionOptions)!==null&&l!==void 0?l:YjI}async _authThenStart(){var e;if(!this._authProvider)throw new $G("No auth provider");let I;try{I=await WV(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,fetchFn:this._fetch})}catch(l){throw(e=this.onerror)===null||e===void 0||e.call(this,l),l}if(I!=="AUTHORIZED")throw new $G;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){var e;let I={};if(this._authProvider){let n=await this._authProvider.tokens();n&&(I.Authorization=`Bearer ${n.access_token}`)}this._sessionId&&(I["mcp-session-id"]=this._sessionId),this._protocolVersion&&(I["mcp-protocol-version"]=this._protocolVersion);let l=this._normalizeHeaders((e=this._requestInit)===null||e===void 0?void 0:e.headers);return new Headers({...I,...l})}async _startOrAuthSse(e){var I,l,n;let{resumptionToken:c}=e;try{let a=await this._commonHeaders();a.set("Accept","text/event-stream"),c&&a.set("last-event-id",c);let s=await((I=this._fetch)!==null&&I!==void 0?I:fetch)(this._url,{method:"GET",headers:a,signal:(l=this._abortController)===null||l===void 0?void 0:l.signal});if(!s.ok){if(s.status===401&&this._authProvider)return await this._authThenStart();if(s.status===405)return;throw new gx(s.status,`Failed to open SSE stream: ${s.statusText}`)}this._handleSseStream(s.body,e,!0)}catch(a){throw(n=this.onerror)===null||n===void 0||n.call(this,a),a}}_getNextReconnectionDelay(e){let I=this._reconnectionOptions.initialReconnectionDelay,l=this._reconnectionOptions.reconnectionDelayGrowFactor,n=this._reconnectionOptions.maxReconnectionDelay;return Math.min(I*Math.pow(l,e),n)}_normalizeHeaders(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}_scheduleReconnection(e,I=0){var l;let n=this._reconnectionOptions.maxRetries;if(n>0&&I>=n){(l=this.onerror)===null||l===void 0||l.call(this,new Error(`Maximum reconnection attempts (${n}) exceeded.`));return}let c=this._getNextReconnectionDelay(I);setTimeout(()=>{this._startOrAuthSse(e).catch(a=>{var s;(s=this.onerror)===null||s===void 0||s.call(this,new Error(`Failed to reconnect SSE stream: ${a instanceof Error?a.message:String(a)}`)),this._scheduleReconnection(e,I+1)})},c)}_handleSseStream(e,I,l){if(!e)return;let{onresumptiontoken:n,replayMessageId:c}=I,a;(async()=>{var r,o,d,i;try{let h=e.pipeThrough(new TextDecoderStream).pipeThrough(new Zq).getReader();for(;;){let{value:p,done:Z}=await h.read();if(Z)break;if(p.id&&(a=p.id,n?.(p.id)),!p.event||p.event==="message")try{let u=oV.parse(JSON.parse(p.data));c!==void 0&&v9(u)&&(u.id=c),(r=this.onmessage)===null||r===void 0||r.call(this,u)}catch(u){(o=this.onerror)===null||o===void 0||o.call(this,u)}}}catch(h){if((d=this.onerror)===null||d===void 0||d.call(this,new Error(`SSE stream disconnected: ${h}`)),l&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:a,onresumptiontoken:n,replayMessageId:c},0)}catch(p){(i=this.onerror)===null||i===void 0||i.call(this,new Error(`Failed to reconnect: ${p instanceof Error?p.message:String(p)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(e){if(!this._authProvider)throw new $G("No auth provider");if(await WV(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,fetchFn:this._fetch})!=="AUTHORIZED")throw new $G("Failed to authorize")}async close(){var e,I;(e=this._abortController)===null||e===void 0||e.abort(),(I=this.onclose)===null||I===void 0||I.call(this)}async send(e,I){var l,n,c,a;try{let{resumptionToken:s,onresumptiontoken:r}=I||{};if(s){this._startOrAuthSse({resumptionToken:s,replayMessageId:p6(e)?e.id:void 0}).catch(N=>{var Y;return(Y=this.onerror)===null||Y===void 0?void 0:Y.call(this,N)});return}let o=await this._commonHeaders();o.set("content-type","application/json"),o.set("accept","application/json, text/event-stream");let d={...this._requestInit,method:"POST",headers:o,body:JSON.stringify(e),signal:(l=this._abortController)===null||l===void 0?void 0:l.signal},i=await((n=this._fetch)!==null&&n!==void 0?n:fetch)(this._url,d),h=i.headers.get("mcp-session-id");if(h&&(this._sessionId=h),!i.ok){if(i.status===401&&this._authProvider){if(this._resourceMetadataUrl=Fx(i),await WV(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,fetchFn:this._fetch})!=="AUTHORIZED")throw new $G;return this.send(e)}let N=await i.text().catch(()=>null);throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${N}`)}if(i.status===202){rMe(e)&&this._startOrAuthSse({resumptionToken:void 0}).catch(N=>{var Y;return(Y=this.onerror)===null||Y===void 0?void 0:Y.call(this,N)});return}let Z=(Array.isArray(e)?e:[e]).filter(N=>"method"in N&&"id"in N&&N.id!==void 0).length>0,u=i.headers.get("content-type");if(Z)if(u?.includes("text/event-stream"))this._handleSseStream(i.body,{onresumptiontoken:r},!1);else if(u?.includes("application/json")){let N=await i.json(),Y=Array.isArray(N)?N.map(y=>oV.parse(y)):[oV.parse(N)];for(let y of Y)(c=this.onmessage)===null||c===void 0||c.call(this,y)}else throw new gx(-1,`Unexpected content type: ${u}`)}catch(s){throw(a=this.onerror)===null||a===void 0||a.call(this,s),s}}get sessionId(){return this._sessionId}async terminateSession(){var e,I,l;if(this._sessionId)try{let n=await this._commonHeaders(),c={...this._requestInit,method:"DELETE",headers:n,signal:(e=this._abortController)===null||e===void 0?void 0:e.signal},a=await((I=this._fetch)!==null&&I!==void 0?I:fetch)(this._url,c);if(!a.ok&&a.status!==405)throw new gx(a.status,`Failed to terminate session: ${a.statusText}`);this._sessionId=void 0}catch(n){throw(l=this.onerror)===null||l===void 0||l.call(this,n),n}}setProtocolVersion(e){this._protocolVersion=e}get protocolVersion(){return this._protocolVersion}};G();var Wq=class{constructor(e){this.server=e}onmessage;onerror;onclose;serverTransport;closed=!1;async start(){if(this.closed)throw new Error("Transport is closed");this.serverTransport=new Xpe(this),await this.server.connect(this.serverTransport)}async send(e){if(this.closed)throw new Error("Transport is closed");setImmediate(()=>{try{this.serverTransport?.onmessage?.(e)}catch(I){this.onerror?.(I instanceof Error?I:new Error(String(I)))}})}receive(e){this.closed||this.onmessage?.(e)}async close(){this.closed||(this.closed=!0,await this.serverTransport?.close(),this.onclose?.())}},Xpe=class{constructor(e){this.clientTransport=e}onmessage;onerror;onclose;closed=!1;async start(){}async send(e){if(this.closed)throw new Error("Transport is closed");setImmediate(()=>{try{this.clientTransport.receive(e)}catch(I){this.onerror?.(I instanceof Error?I:new Error(String(I)))}})}async close(){this.closed||(this.closed=!0,this.onclose?.())}};var Nq=class{createTransport(e){switch(e.type){case"stdio":{let I=new hq({command:e.command,args:e.args,env:e.env,stderr:e.stderr?"pipe":void 0});return I.stderr?.pipe(e.stderr),I}case"http":return new uq(new URL(e.url),{requestInit:{headers:e.headers||{}}});case"sse":return new iq(new URL(e.url),{requestInit:{headers:e.headers||{}}});case"memory":return new Wq(e.server);default:throw new Error(`Unsupported transport type: ${e.type}`)}}};G();var GF="blackbird-mcp-server",$E="github-mcp-server",Hpe="playwright";function e1(t){return t.type===void 0||t.type.toLowerCase()==="local"||t.type.toLowerCase()==="stdio"}function Yq(t){return t.type?.toLowerCase()==="http"}function Vq(t){return t.type?.toLowerCase()==="sse"}function Qx(t){return t.type?.toLowerCase()==="memory"}var Epe=class extends VjI{constructor(I,l){super({decodeStrings:!1});this.serverName=I;this.logger=l}_write(I,l,n){try{let c=I.toString();this.logger.log(`[mcp server ${this.serverName} stderr] ${c}`),n()}catch(c){n(c instanceof Error?c:new Error(String(c)))}}},Rq=class{constructor(e,I=new aq,l=new Nq,n="indirect"){this.logger=e;this.clientFactory=I;this.transportFactory=l;this.envValueMode=n}clients={};transports={};async startLocalMcpClient(e,I,l,n){this.logger.log(`Starting MCP client for ${e} with command: ${l} and args: ${n}`);let c=new Epe(e,this.logger),a={type:"stdio",command:l,args:n,env:{...I,PATH:process.env.PATH},stderr:c},s=this.transportFactory.createTransport(a);await this.setupAndConnectClient(e,s)}async startHttpMcpClient(e,I){this.logger.log(`Starting remote MCP client for ${e} with url: ${I.url}`);let l={type:"http",url:I.url,headers:I.headers},n=this.transportFactory.createTransport(l);await this.setupAndConnectClient(e,n)}async startSseMcpClient(e,I){this.logger.log(`Starting remote MCP client for ${e} with url: ${I.url}`);let l={type:"sse",url:I.url,headers:I.headers},n=this.transportFactory.createTransport(l);await this.setupAndConnectClient(e,n)}async startInMemoryMcpClient(e,I){this.logger.log(`Starting in-memory MCP client for ${e}`);let l={type:"memory",server:I},n=this.transportFactory.createTransport(l);await this.setupAndConnectClient(e,n)}async setupAndConnectClient(e,I){this.transports[e]=I,I.onclose=()=>{this.logger.log(`MCP transport for ${e} closed`),delete this.transports[e]},this.logger.log(`Creating MCP client for ${e}...`);let l=this.clientFactory.createClient({name:"github-copilot-developer",version:"1.0.0"},{capabilities:{experimental:void 0,roots:void 0,sampling:void 0}}),n=Date.now();this.logger.log(`Connecting MCP client for ${e}...`),await l.connect(I),l.onclose=()=>{this.logger.log(`MCP client for ${e} closed`),delete this.clients[e]},l.onerror=c=>{this.logger.error(`MCP client for ${e} errored ${c}`)},this.logger.log(`MCP client for ${e} connected, took ${Date.now()-n}ms`),this.clients[e]=l}async getTools(e,I){let l={};for(let[n,c]of Object.entries(this.clients)){let a=[];try{this.logger.log(`Fetching tools from client: ${n}`);let s=await c.listTools(),r=e?.mcpServers[n].tools,o=e?.mcpServers[n].filterMapping;for(let i of s.tools){if(i.name==="get_copilot_space")continue;if(!(r?.includes("*")||r?.includes(i.name))){this.logger.log(`Tool ${i.name} is not in the allowed list for client: ${n}`);continue}let p=l6(n,i.name),Z=`${n}-${i.name}`,u;typeof o=="string"?u=ebe(o):u=ebe(o?.[i.name]??"hidden_characters"),l[`${n}/${i.name}`]={name:Z,namespacedName:`${n}/${i.name}`,title:i.title??i.annotations?.title??i.name,description:i.description??Z,input_schema:i.inputSchema,readOnly:i.annotations?.readOnlyHint,safeForTelemetry:{name:!!(e?.mcpServers[n].isDefaultServer||p),inputsNames:!!e?.mcpServers[n].isDefaultServer},filterMode:u},a.push(i.name),this.logger.log(`Tool ${i.name} added to tools list for client: ${n}`)}this.logger.log(`Successfully retrieved ${a.length} tools from client: ${n}`);let d=c.getServerVersion();await this.logServerSuccessWithTools(n,a,d,I)}catch(s){this.logger.error(`Failed to get tools from client: ${n} ${s}`)}}return this.logger.log(`All tools retrieved: ${JSON.stringify(l,null,2)}`),l}async logServerSuccessWithTools(e,I,l,n){if(e!=GF&&n)try{let c=I.map(r=>`- ${r}`).join(`
1355
1355
  `),s=`MCP server started successfully${l?` (version ${l.version})`:""} with ${I.length} ${I.length===1?"tool":"tools"} - for the full output, see the verbose logs
1356
1356
 
1357
- ${c}`;await n.logMCPSetup(e,s),this.logger.log(`Updated session log for ${e} with ${I.length} tools`)}catch(c){this.logger.error(`Failed to update session log for ${e}: ${c}`)}}};G();var vpe={mcpServers:{}},yq=class{constructor(e,I,l){this.logger=e;this.registry=I;this.remoteEnabled=l?.remoteEnabled??!1,this.mcp3pEnabled=l?.mcp3pEnabled??!1,this.blackbirdMetisIndexEnabled=l?.blackbirdMetisIndexEnabled??!1,this.sessionClient=l?.sessionClient,this.mcpEnvConfig=void 0}remoteEnabled;mcp3pEnabled;blackbirdMetisIndexEnabled;mcpEnvConfig;sessionClient;ReadMcpConfigFromEnv(e){this.mcpEnvConfig=process.env.GITHUB_COPILOT_MCP_JSON,this.mcp3pEnabled=process.env.GITHUB_COPILOT_3P_MCP_ENABLED==="true",this.remoteEnabled=process.env.GITHUB_COPILOT_REMOTE_MCP_ENABLED==="true",this.blackbirdMetisIndexEnabled=process.env.BLACKBIRD_METIS_INDEX_ENABLED==="true";let I=this.validateEnvConfig();return process.env.GITHUB_COPILOT_CLI_MODE==="true"?this.logger.log("CLI mode detected - skipping default MCP servers"):(this.logger.log("Adding default MCP servers to configuration"),this.configureBlackbirdMcp(I,e),this.configureGitHubMcp(I,e),this.configurePlaywrightMcp(I)),I}validateEnvConfig(){if(!this.mcp3pEnabled)return this.logger.log("User-provided MCPs are disabled"),vpe;if(this.logger.log("User-provided MCPs are enabled, checking for environment variable"),!this.mcpEnvConfig)return this.logger.log("No user-provided MCP servers found"),vpe;try{let e=JSON.parse(this.mcpEnvConfig);if(!e.mcpServers)throw new Error("User-provided config had incorrect format. Missing 'mcpServers' property.");for(let I in e.mcpServers)e.mcpServers[I].isDefaultServer=!1;return e}catch(e){return this.logger.error(`Warning: User-provided MCP servers were defined but invalid: ${e}`),vpe}}configureGitHubMcp(e,I){this.remoteEnabled?this.configureRemoteGitHubMcp(e,I):this.configureLocalGitHubMcp(e)}configureRemoteGitHubMcp(e,I){this.logger.log("Using default remote GitHub MCP server configuration");let l="repos,issues,users,pull_requests,code_security,secret_protection,actions,web_search";process.env.COPILOT_MCP_COPILOT_SPACES_ENABLED==="true"&&(this.logger.log("Enabling Copilot Spaces in GitHub MCP server configuration"),l=l+",copilot_spaces");let n={Authorization:"Bearer "+process.env.GITHUB_PERSONAL_ACCESS_TOKEN,"X-MCP-Toolsets":l,"X-MCP-Host":"github-coding-agent","X-Initiator":"agent"};I&&I.api?.copilot?.integrationId&&(n["Copilot-Integration-Id"]=I.api.copilot.integrationId),process.env.GITHUB_COPILOT_INTERACTION_ID&&(n["X-Interaction-Id"]=process.env.GITHUB_COPILOT_INTERACTION_ID);let c={type:"http",url:this.getCapiMcpUrl(),headers:n,tools:["*"],isDefaultServer:!0,filterMapping:{get_issue:"markdown",get_issue_comments:"markdown",get_pull_request:"markdown",get_pull_request_comments:"markdown",get_pull_request_reviews:"markdown"}};e.mcpServers[$E]=c}configureLocalGitHubMcp(e){if(e.mcpServers[$E]){this.logger.log("Using user-provided GitHub MCP server configuration");let I=e.mcpServers[$E]??{};e1(I)&&!I.command&&(e.mcpServers[$E]={...I,command:"./copilot-developer-action-main/github-mcp-server/github-mcp-server",isDefaultServer:!0},this.logger.log("Added default command to user-provided GitHub MCP server configuration"))}else{this.logger.log("Using default local GitHub MCP server configuration");let I={command:"./copilot-developer-action-main/github-mcp-server/github-mcp-server",args:["stdio","--read-only"],env:{GITHUB_PERSONAL_ACCESS_TOKEN:"GITHUB_PERSONAL_ACCESS_TOKEN",GITHUB_HOST:"GITHUB_SERVER_URL"},tools:["*"],isDefaultServer:!0};e.mcpServers[$E]=I}}configurePlaywrightMcp(e){if(!e.mcpServers[Hpe]){if((process.env.COPILOT_FEATURE_FLAGS??"").split(",").map(l=>l.trim()).includes("copilot_swe_agent_playwright_use_firewall")){this.logger.log("Playwright MCP server is configured to use the firewall, skipping launch.");return}this.logger.log("Enabling Playwright MCP server");let I={command:"npx",args:[...Sbe,"--allowed-origins","localhost;localhost:*;127.0.0.1;127.0.0.1:*"],tools:["*"],isDefaultServer:!0};e.mcpServers[Hpe]=I}}configureBlackbirdMcp(e,I){this.remoteEnabled?this.configureRemoteBlackbirdMcp(e):this.blackbirdMetisIndexEnabled?this.configureLocalMetisBlackbirdMCP(e,I):this.configureLocalBlackbirdMcp(e)}configureLocalMetisBlackbirdMCP(e,I){this.logger.log("Using local Metis Blackbird MCP server configuration"),this.logger.log(`Using blackbird mode: ${I.blackbird?.mode}`);let l=process.env.AGENT_DIR||"/agent";this.logger.log(`Using agent directory: ${l}`);let n=[];I.blackbird?.mode==="tool"&&(n=["*"]),this.logger.log(`Using blackbird Metis server: ${I.blackbird?.mode}`);let c={command:`${l}/blackbird/mcp`,args:["serve","--index",`${l}/blackbird/metis`],env:{GITHUB_PERSONAL_ACCESS_TOKEN:"GITHUB_PERSONAL_ACCESS_TOKEN",COPILOT_API_HMAC_KEY:"CAPI_HMAC_KEY",MODEL_BASED_RETRIEVAL_TOKEN:"BLACKBIRD_AUTH_MODEL_BASED_RETRIEVAL_TOKEN",METIS_API_KEY:"BLACKBIRD_AUTH_METIS_API_KEY"},tools:n,isDefaultServer:!0};e.mcpServers[GF]=c}configureLocalBlackbirdMcp(e){this.logger.log("Using local Blackbird MCP server configuration"),this.logger.log(`Using blackbird mode: ${process.env.BLACKBIRD_MODE}`);let I=[];process.env.BLACKBIRD_MODE==="tool"&&(I=["*"]);let l={command:"./copilot-developer-action-main/blackbird-mcp-server/blackbird-mcp-server",args:["stdio"],env:{GITHUB_PERSONAL_ACCESS_TOKEN:"GITHUB_PERSONAL_ACCESS_TOKEN",CAPI_HOST:"COPILOT_API_URL"},tools:I,isDefaultServer:!0};e.mcpServers[GF]=l}configureRemoteBlackbirdMcp(e){this.logger.log("Using remote Blackbird MCP server configuration"),this.logger.log(`Using blackbird mode: ${process.env.BLACKBIRD_MODE}`);let I=[];process.env.BLACKBIRD_MODE==="tool"&&(I=["*"]);let l={Authorization:"Bearer "+process.env.GITHUB_PERSONAL_ACCESS_TOKEN,"X-MCP-Toolsets":"search_agent","X-MCP-Host":"github-coding-agent"};process.env.GITHUB_COPILOT_INTERACTION_ID&&(l["X-Interaction-Id"]=process.env.GITHUB_COPILOT_INTERACTION_ID);let n={type:"http",url:this.getCapiMcpUrl(),headers:l,tools:I,isDefaultServer:!0};e.mcpServers[GF]=n}getCapiMcpUrl(){return process.env.COPILOT_API_URL?new URL("/mcp/readonly",process.env.COPILOT_API_URL).toString():"https://api.githubcopilot.com/mcp/readonly"}isValidServerType(e){return e1(e)||Yq(e)||Vq(e)||Qx(e)}isValidLocalServerConfig(e){return e.command!==void 0&&e.command.trim()!==""&&Array.isArray(e.args)}isValidRemoteServerConfig(e){return e.url!==void 0&&e.url.trim()!==""}isValidInMemoryServerConfig(e){return e.serverInstance!==void 0&&typeof e.serverInstance=="object"}validateServerConfig(e,I){return this.remoteEnabled&&!this.isValidServerType(I)?(this.logger.error(`Unsupported server type "${I.type}" for server "${e}". Only "Local", "STDIO", "HTTP", "SSE", or "Memory" are supported.`),!1):!this.remoteEnabled&&!e1(I)&&!Qx(I)?(this.logger.error(`Unsupported server type "${I.type}" for server "${e}". Only "Local", "STDIO", or "Memory" are supported.`),!1):I.tools?e1(I)&&!this.isValidLocalServerConfig(I)?(this.logger.error(`Invalid local server configuration for "${e}". Please ensure 'command' and 'args' are provided.`),!1):(Yq(I)||Vq(I))&&!this.isValidRemoteServerConfig(I)?(this.logger.error(`Invalid remote server configuration for "${e}". Please ensure 'url' is provided.`),!1):Qx(I)&&!this.isValidInMemoryServerConfig(I)?(this.logger.error(`Invalid in-memory server configuration for "${e}". Please ensure 'serverInstance' is provided and is an instance of MCPServer.`),!1):!0:(this.logger.error(`No tools specified for server "${e}". Please provide a list of tools or "*" to include all tools.`),!1)}async processHttpServer(e,I){try{let l=this.resolveHeaders(I.headers,process.env),n={...I,headers:l};await this.registry.startHttpMcpClient(e,n),this.logger.log(`Started MCP client for remote server ${e}`)}catch(l){throw this.logger.error(`Failed to start MCP client for remote server ${e}: ${l}`),l}}async processSseServer(e,I){try{let l=this.resolveRemoteServerConfig(I);await this.registry.startSseMcpClient(e,l),this.logger.log(`Started MCP client for remote server ${e}`)}catch(l){throw this.logger.error(`Failed to start MCP client for remote server ${e}: ${l}`),l}}resolveRemoteServerConfig(e){return e.url=this.resolveString(e.url,process.env),e.headers=this.resolveHeaders(e.headers,process.env),{...e,url:e.url,headers:e.headers}}async processInMemoryServer(e,I){try{await this.registry.startInMemoryMcpClient(e,I.serverInstance),this.logger.log(`Started in-memory MCP client for ${e}`)}catch(l){throw this.logger.error(`Failed to start in-memory MCP client for ${e}: ${l}`),l}}async processLocalServer(e,I){let l={...I};if(I.command==="python")try{l=await this.convertPythonToPipx(l)}catch(a){this.logger.error(`Failed to handle Python module for ${e}: ${a}`)}let n=this.buildEnvironment(l),c=this.resolveLocalServerConfig(l,n);this.logger.log(`Starting MCP client for ${e} with command: ${c.command} and args: ${c.args}`);try{await this.registry.startLocalMcpClient(e,n,c.command,c.args),this.logger.log(`Started MCP client for ${e}`)}catch(a){throw this.logger.error(`Failed to start MCP client for ${e}: ${a}`),a}}convertPythonToPipx(e){if(!e||!e.args||e.args.length===0)return e;let I=e.args,l=I.indexOf("-m");if(l===-1||l===I.length-1)throw new Error("Python command with -m flag must specify a module");let n=I[l+1];this.logger.log(`Converting Python module: ${n} to pipx command`);let c=["run",n];for(let a=l+2;a<I.length;a++)c.push(I[a]);for(let a=0;a<l;a++)c.push(I[a]);return{...e,command:"pipx",args:c}}buildEnvironment(e){let I={};if(e.env)for(let[l,n]of Object.entries(e.env)){let c=n.trim(),a=c;if(c.includes("$")&&(a=this.resolveString(c,process.env)),a!==c){I[l]=a;continue}process.env[c]!==void 0&&(I[l]=process.env[c])}return I}resolveLocalServerConfig(e,I){let l=this.resolveString(e.command,I),n=this.resolveArray(e.args,I);return{...e,command:l,args:n}}resolveString(e,I){return I?e.replace(/\$(?:\{([A-Z0-9_]+)(?::-(.*?))?\}|([A-Z0-9_]+))/g,(l,n,c,a)=>{let r=I[n||a];return r!==void 0?r:c!==void 0?c:l}):e}resolveArray(e,I){return e?I?e.map(l=>this.resolveString(l,I)):e:[]}resolveHeaders(e,I){if(!e)return{};if(!I)return e;let l={};for(let[n,c]of Object.entries(e)){let a=this.resolveArray([c],I);l[n]=a[0]}return l}async processServers(e){if(!e)throw new Error("No servers to process");let I=Object.entries(e.mcpServers).map(([l,n])=>this.processServer(l,n));await Promise.all(I)}async processServer(e,I){if(!this.validateServerConfig(e,I)){this.logger.error(`Skipping server "${e}" due to invalid configuration.`);return}try{e1(I)?await this.processLocalServer(e,I):Yq(I)&&this.remoteEnabled?await this.processHttpServer(e,I):Vq(I)&&this.remoteEnabled?await this.processSseServer(e,I):Qx(I)&&await this.processInMemoryServer(e,I)}catch(l){e!==GF&&await this.logServerFailure(e,l)}}async logServerFailure(e,I){if(this.sessionClient)try{await this.sessionClient.logMCPSetup(e,`<error>MCP server failed to start: ${I.message} - for the full output, see the verbose logs</error>`)}catch(l){this.logger.error(`Failed to log failure for MCP Server '${e}': '${l}'`)}}};var Fq=class{constructor(e,I,l){this.logger=e;let n;if(typeof I=="string"){if(n=JSON.parse(I),typeof n!="object")throw new Error("Invalid MCP configuration: must be an object");if(n===null||!("mcpServers"in n)||typeof n.mcpServers!="object")throw new Error("Invalid MCP configuration: missing or invalid mcpServers property");this.config=n}else this.config=I;this.disabledServers=new Set(l||[]),this.registry=new Rq(this.logger),this.processor=new yq(this.logger,this.registry,{mcp3pEnabled:!0,remoteEnabled:!0})}registry;processor;config;startServersPromise=null;allTools=null;disabledServers;async startServers(){return this.startServersPromise||(this.startServersPromise=this.processServersWithExtensions()),this.startServersPromise}async injectDefaultServers(e){}async processServersWithExtensions(){await this.injectDefaultServers(this.config);let e;if(this.disabledServers.size>0){let I={};for(let[l,n]of Object.entries(this.config.mcpServers))this.disabledServers.has(l)?this.logger.log(`Skipping disabled MCP server: ${l}`):I[l]=n;e={...this.config,mcpServers:I}}else e=this.config;return this.processor.processServers(e)}async stopServers(){for(let[e,I]of Object.entries(this.registry.transports))try{await I.close()}catch(l){this.logger.error(`Error closing transport for ${e}: ${l}`)}this.startServersPromise=null,this.allTools=null}async getTools(e,I,l){if(!this.allTools){await this.startServers();let n=new Q9(e,I,l),c=[];for(let a of Object.keys(this.registry.clients)){let s=await n.loadTools({mcpClient:this.registry.clients[a],clientName:a,tools:this.config.mcpServers[a]?.tools||["*"],filterMapping:this.config.mcpServers[a]?.filterMapping||"hidden_characters"});c.push(...s)}this.allTools=c}return this.allTools}getConfig(){return this.config}async startServer(e,I){await this.startServers(),this.config.mcpServers[e]=I,await this.processor.processServer(e,I),this.allTools=null}async stopServer(e){let I=this.registry.transports[e];if(I)try{await I.close(),delete this.registry.transports[e]}catch(l){this.logger.error(`Error closing transport for ${e}: ${l}`)}this.registry.clients[e]&&delete this.registry.clients[e],this.allTools=null}async restartServer(e,I){this.isServerRunning(e)&&await this.stopServer(e),delete this.config.mcpServers[e],await this.startServer(e,I)}isServerRunning(e){return e in this.registry.transports&&e in this.registry.clients}isServerDisabled(e){return this.disabledServers.has(e)}async disableServer(e){if(this.disabledServers.has(e)){this.logger.log(`Server ${e} is already disabled`);return}this.disabledServers.add(e),this.logger.log(`Disabled server ${e} for this session`),this.isServerRunning(e)&&await this.stopServer(e),this.allTools=null}async enableServer(e){if(!this.disabledServers.has(e)){this.logger.log(`Server ${e} is not disabled`);return}this.disabledServers.delete(e),this.logger.log(`Enabled server ${e} for this session`);let I=this.getServerConfig(e);I?await this.startServer(e,I):await this.startBuiltInServer(e),this.allTools=null}async startBuiltInServer(e){}getServerConfig(e){return this.config.mcpServers[e]}};G();var AKe=Gn(QKe(),1);async function hKI(t={}){let e=await uZe();return hZe((0,AKe.default)({},e,t))}async function wKe(t={}){if(Ux())throw new Error("Settings have already been initialized");return hKI(t)}G();async function NV(t,e,I){if(!t||t.length===0)return;let l=!1,n={};for(let c of t)try{let a=await c(e);a&&(l=!0,n={...n,...a})}catch(a){I.error(`Hook execution failed: ${a}`)}return l?n:void 0}G();var n1=class{sessionId;startTime;events=[];_chatMessages=[];_selectedModel;logger;eventCallbacks=[];constructor({sessionId:e,startTime:I,logger:l}={}){this.sessionId=e||kb(),this.startTime=I||new Date,this.logger=l||new ci}static fromEvents({events:e,logger:I}){if(e.length===0)throw new Error("Cannot create session from empty events array");let l=e[0];if(l.type!=="session.start")throw new Error("First event must be session.start");let n=new this({sessionId:l.data.sessionId,startTime:new Date(l.data.startTime),logger:I||new ci});n._selectedModel=l.data.selectedModel,n.events.push(l);for(let c=1;c<e.length;c++){let a=e[c];n.events.push(a),n.processEventForState(a)}return n}addEvent(e){let I=e.id||kb(),l=e.timestamp||new Date().toISOString(),n=e.parentId!==void 0?e.parentId:this.getLastEventId(),c={...e,id:I,timestamp:l,parentId:n};return this.events.push(c),this.processEventForState(c),this.notifyEventCallbacks(c),c}getEvents(){return this.events}onEvent(e){return this.eventCallbacks.push(e),()=>{let I=this.eventCallbacks.indexOf(e);I>-1&&this.eventCallbacks.splice(I,1)}}get chatMessages(){return this._chatMessages}get selectedModel(){return this._selectedModel}setSelectedModel(e){let I=this._selectedModel;this._selectedModel=e,this.addEvent({type:"session.model_change",data:{previousModel:I,newModel:e}})}getChatContextMessages(){return this._chatMessages.filter(e=>e.role!=="system")}getSystemContextMessages(){return this._chatMessages.filter(e=>e.role==="system")}getLastEventId(){return this.events.length===0?null:this.events[this.events.length-1].id}processEventForState(e){switch(e.type){case"session.start":e.data.selectedModel&&(this._selectedModel=e.data.selectedModel);break;case"session.model_change":this._selectedModel=e.data.newModel;break;case"user.message":this._chatMessages.push({role:"user",content:e.data.content});break;case"assistant.message":{let I={role:"assistant",content:e.data.content||null};e.data.toolRequests&&e.data.toolRequests.length>0&&(I.tool_calls=e.data.toolRequests.map(l=>({id:l.toolCallId,type:"function",function:{name:l.name,arguments:typeof l.arguments=="string"?l.arguments:JSON.stringify(l.arguments)}}))),this._chatMessages.push(I);break}case"tool.execution_complete":{this._chatMessages.push({role:"tool",tool_call_id:e.data.toolCallId,content:e.data.success?e.data.result?.content||"":e.data.error?.message||"Tool execution failed"});break}case"system.message":this._chatMessages.push({role:e.data.role,content:e.data.content,...e.data.name&&{name:e.data.name}});break;case"session.resume":case"session.error":case"session.info":case"session.import_legacy":case"assistant.turn_start":case"assistant.turn_end":case"assistant.usage":case"abort":case"tool.execution_start":case"tool.execution_partial_result":case"hook.start":case"hook.end":break;default:{let I=e;this.logger.error(`Unknown event type: ${I.type}`);break}}}notifyEventCallbacks(e){for(let I of this.eventCallbacks)try{I(e)}catch(l){this.logger.error(`Error in event callback: ${l instanceof Error?l.message:String(l)}`)}}};var Cq=class{static name="Copilot";static description="Base Copilot Agent";options;logger;workingDir;session;constructor(e){this.options=e,this.logger=e.logger||new ci,this.workingDir=e.workingDirectory||process.cwd(),this.session=e.session||new n1,nme(this.workingDir).then(I=>{if(I.found)return DUe(I.gitRoot,!0,this.workingDir)}).catch(I=>{this.logger.debug(`Failed to initialize custom instructions cache: ${I}`)})}async*query(e){let I=new Map,l;try{if(this.options.mcpServers&&Object.keys(this.options.mcpServers).length>0)try{l=new Fq(this.logger,{mcpServers:this.options.mcpServers},this.options.disabledTools),await l.startServers()}catch(Ne){this.logger.error(`Failed to initialize MCP host: ${Ne}`)}let n={timestamp:Date.now(),cwd:this.workingDir,prompt:e},a=(await NV(this.options.hooks?.userPromptSubmitted,n,this.logger))?.modifiedPrompt??e;this.session.addEvent({type:"user.message",data:{content:a}});let r=new NF().setProblemStatement(a).setAgentModel(this.buildAgentModelString()).setGithubRepoName("copilot-sdk-session").setGithubRepoCommit("copilot-sdk-commit").setGithubRepoReadWrite(!1).setCopilotIntegrationId(this.options.integrationId||"copilot-developer-cli").setCopilotHmacKey(this.options.hmacKey).setCopilotToken(this.options.copilotToken).build();pZe();let o=await wKe(r),d=o.service?.agent?.model,i=eme(d),h=i.agent,p=i.model?{model:i.model}:void 0,Z=coe(o,this.logger,h,p),u={location:this.workingDir,timeout:3e4,requireReasoning:!0,toolPartialResultCallback:void 0,permissions:this.options.requestPermission?{requestRequired:!0,request:this.options.requestPermission}:{requestRequired:!1},shellConfig:process.platform==="win32"?vi.powerShell:vi.bash},N=await LOe(u,this.logger),Y=[];if(l)try{Y=await l.getTools(o,this.logger,u.permissions)}catch(Ne){this.logger.error(`Failed to get MCP tools: ${Ne}`)}let y=[...N,...Y],Q=this.applyToolFiltering(y,this.options.allowedTools,this.options.disabledTools),A=await nme(this.workingDir),H={...(fOe()["sweagent-capi"]?.["claude-sonnet-4"]??kOe()).supports,reasoning:!0},J=await uOe(A.found?A.gitRoot:"",efe(),this.workingDir,{},H,u,Q,void 0),te=this.session.chatMessages.slice(0,-1),Fe={role:"user",content:YOe({customAgentPrompt:void 0,problemStatement:a,capabilities:H})},ye=[...te,Fe],Ee={timestamp:Date.now(),cwd:this.workingDir,source:"new",initialPrompt:e};await NV(this.options.hooks?.sessionStart,Ee,this.logger);let Qe=Z.getCompletionWithTools(J,ye,Q,{failIfInitialInputsTooLong:!1,processors:{preRequest:[new VE(Fe,this.logger)]},executeToolsInParallel:!1,abortSignal:this.options.abortController?.signal});for await(let Ne of Qe){if(this.options.abortController?.signal.aborted){yield{type:"error",error:new Error("Operation was cancelled")};return}let uI=await this.translateEvent(Ne,I);for(let Ae of uI)Ae.type==="message"&&Ae.role==="assistant"&&this.session.addEvent({type:"assistant.message",data:{messageId:`msg-${Date.now()}`,content:Ae.content}}),yield Ae}yield{type:"complete"}}catch(n){let c={timestamp:Date.now(),cwd:this.workingDir,reason:"error",error:n instanceof Error?n:new Error(String(n))};await NV(this.options.hooks?.sessionEnd,c,this.logger),yield{type:"error",error:n instanceof Error?n:new Error(String(n))}}finally{let n={timestamp:Date.now(),cwd:this.workingDir,reason:"complete"};if(await NV(this.options.hooks?.sessionEnd,n,this.logger),l)try{await l.stopServers(),this.logger.log("MCP host stopped successfully")}catch(c){this.logger.error(`Error stopping MCP host: ${c}`)}}}buildAgentModelString(){switch(this.options.modelProvider.type){case"openai":return`openai:${this.options.modelProvider.model}`;case"anthropic":return`anthropic:${this.options.modelProvider.model}`;case"copilot":return`capi:${this.options.modelProvider.model}`;default:throw new Error(`Unsupported provider: ${this.options.modelProvider.type}`)}}applyToolFiltering(e,I,l){let n=e;return I&&I.length>0&&(n=n.filter(c=>I.includes(c.name))),l&&l.length>0&&(n=n.filter(c=>!l.includes(c.name))),n}async translateEvent(e,I){switch(e.kind){case"message":{if(c6(e)&&e.message.content)return[{type:"message",content:typeof e.message.content=="string"?e.message.content:"",role:"assistant"}];if(XOe(e)){let l=[];for(let n of e.message.tool_calls){let c=DA(n.function.arguments);I.set(n.id,n.function.name);let a={timestamp:Date.now(),cwd:this.workingDir,toolName:n.function.name,toolArgs:c},r=(await NV(this.options.hooks?.preToolUse,a,this.logger))?.modifiedArgs??c;l.push({type:"tool_use",toolName:n.function.name,args:r,toolCallId:n.id})}return l}return[]}case"response":return[];case"model_call_failure":{let l=new Error(e.modelCall?.error||"Model call failed"),n={timestamp:Date.now(),cwd:this.workingDir,error:l,errorContext:"model_call",recoverable:!0};return await NV(this.options.hooks?.errorOccurred,n,this.logger),[{type:"error",error:l}]}case"tool_execution":{let l=I.get(e.toolCallId)||"unknown",n={timestamp:Date.now(),cwd:this.workingDir,toolName:l,toolArgs:{},toolResult:e.toolResult},a=(await NV(this.options.hooks?.postToolUse,n,this.logger))?.modifiedResult??e.toolResult;return[{type:"tool_result",toolName:l,result:a,toolCallId:e.toolCallId}]}default:return[]}}};G();G();var Ope=class{loggers;constructor(e){this.loggers=e}isDebug(){return this.loggers.some(e=>e.isDebug())}debug(e){this.loggers.forEach(I=>I.debug(e))}log(e){this.loggers.forEach(I=>I.log(e))}info(e){this.loggers.forEach(I=>I.info(e))}notice(e){this.loggers.forEach(I=>I.notice(e))}warning(e){this.loggers.forEach(I=>I.warning(e))}error(e){this.loggers.forEach(I=>I.error(e))}startGroup(e,I){this.loggers.forEach(l=>l.startGroup(e,I))}endGroup(e){this.loggers.forEach(I=>I.endGroup(e))}};G();import{appendFile as pKI,access as ZKI,mkdir as uKI}from"fs/promises";import{constants as WKI}from"fs";import{dirname as NKI}from"path";var Mpe=class extends rp{constructor(I,l,n){super(l,n);this.filePath=I;this.writeQueue=YKI(NKI(this.filePath)).catch(()=>{})}writeQueue=Promise.resolve();log(I){this.write("LOG",I)}debug(I){super.shouldLog(8)&&this.write("DEBUG",this.filterSecrets(I).toString())}info(I){super.shouldLog(4)&&this.write("INFO",this.filterSecrets(I).toString())}notice(I){super.shouldLog(2)&&this.write("NOTICE",this.filterSecrets(I).toString())}warning(I){super.shouldLog(2)&&this.write("WARNING",this.filterSecrets(I).toString())}error(I){super.shouldLog(1)&&this.write("ERROR",this.filterSecrets(I).toString())}startGroup(I,l){super.shouldLog(l||4)&&this.write("START-GROUP",I)}endGroup(I){super.shouldLog(I||4)&&this.write("END-GROUP","")}write(I,l){let c=`${new Date().toISOString()} [${I}] ${l}
1358
- `;this.writeQueue=this.writeQueue.then(()=>this.performWrite(c)).catch(()=>{})}async performWrite(I){await pKI(this.filePath,I)}};async function YKI(t){try{await ZKI(t,WKI.F_OK)}catch{await uKI(t,{recursive:!0})}}G();async function*I_l(t){let{prompt:e,...I}=t;yield*new Cq(I).query(e)}G();var XKe=class{sessions;logger;lastAccessedSessionId;constructor({logger:e}={}){this.sessions=new Map,this.logger=e||new ci}async createSession(){let e=new n1({logger:this.logger});return this.sessions.set(e.sessionId,e),this.lastAccessedSessionId=e.sessionId,e}async getSession(e){let I=this.sessions.get(e);return I&&(this.lastAccessedSessionId=e),I}async getLastSession(){if(this.lastAccessedSessionId){let l=this.sessions.get(this.lastAccessedSessionId);if(l)return l}let e=Array.from(this.sessions.values());if(e.length===0)return;e.sort((l,n)=>n.startTime.getTime()-l.startTime.getTime());let I=e[0];return this.lastAccessedSessionId=I.sessionId,I}async listSessions(){return Array.from(this.sessions.values()).map(e=>({sessionId:e.sessionId,startTime:e.startTime}))}async saveSession(e){}async deleteSession(e){this.sessions.delete(e.sessionId),this.lastAccessedSessionId===e.sessionId&&(this.lastAccessedSessionId=void 0)}};export{Cq as Agent,rp as BaseLogger,Ope as CompoundLogger,qV as ConsoleLogger,Mpe as FileLogger,ci as NoopLogger,n1 as Session,XKe as SessionManager,NV as executeHooks,r1 as isDebugEnvironment,I_l as query};
1357
+ ${c}`;await n.logMCPSetup(e,s),this.logger.log(`Updated session log for ${e} with ${I.length} tools`)}catch(c){this.logger.error(`Failed to update session log for ${e}: ${c}`)}}};G();var vpe={mcpServers:{}},yq=class{constructor(e,I,l){this.logger=e;this.registry=I;this.remoteEnabled=l?.remoteEnabled??!1,this.mcp3pEnabled=l?.mcp3pEnabled??!1,this.blackbirdMetisIndexEnabled=l?.blackbirdMetisIndexEnabled??!1,this.sessionClient=l?.sessionClient,this.mcpEnvConfig=void 0,this.envValueMode=l?.envValueMode??this.registry.envValueMode}remoteEnabled;mcp3pEnabled;blackbirdMetisIndexEnabled;mcpEnvConfig;sessionClient;envValueMode;ReadMcpConfigFromEnv(e){this.mcpEnvConfig=process.env.GITHUB_COPILOT_MCP_JSON,this.mcp3pEnabled=process.env.GITHUB_COPILOT_3P_MCP_ENABLED==="true",this.remoteEnabled=process.env.GITHUB_COPILOT_REMOTE_MCP_ENABLED==="true",this.blackbirdMetisIndexEnabled=process.env.BLACKBIRD_METIS_INDEX_ENABLED==="true";let I=this.validateEnvConfig();return process.env.GITHUB_COPILOT_CLI_MODE==="true"?this.logger.log("CLI mode detected - skipping default MCP servers"):(this.logger.log("Adding default MCP servers to configuration"),this.configureBlackbirdMcp(I,e),this.configureGitHubMcp(I,e),this.configurePlaywrightMcp(I)),I}validateEnvConfig(){if(!this.mcp3pEnabled)return this.logger.log("User-provided MCPs are disabled"),vpe;if(this.logger.log("User-provided MCPs are enabled, checking for environment variable"),!this.mcpEnvConfig)return this.logger.log("No user-provided MCP servers found"),vpe;try{let e=JSON.parse(this.mcpEnvConfig);if(!e.mcpServers)throw new Error("User-provided config had incorrect format. Missing 'mcpServers' property.");for(let I in e.mcpServers)e.mcpServers[I].isDefaultServer=!1;return e}catch(e){return this.logger.error(`Warning: User-provided MCP servers were defined but invalid: ${e}`),vpe}}configureGitHubMcp(e,I){this.remoteEnabled?this.configureRemoteGitHubMcp(e,I):this.configureLocalGitHubMcp(e)}configureRemoteGitHubMcp(e,I){this.logger.log("Using default remote GitHub MCP server configuration");let l="repos,issues,users,pull_requests,code_security,secret_protection,actions,web_search";process.env.COPILOT_MCP_COPILOT_SPACES_ENABLED==="true"&&(this.logger.log("Enabling Copilot Spaces in GitHub MCP server configuration"),l=l+",copilot_spaces");let n={Authorization:"Bearer "+process.env.GITHUB_PERSONAL_ACCESS_TOKEN,"X-MCP-Toolsets":l,"X-MCP-Host":"github-coding-agent","X-Initiator":"agent"};I&&I.api?.copilot?.integrationId&&(n["Copilot-Integration-Id"]=I.api.copilot.integrationId),process.env.GITHUB_COPILOT_INTERACTION_ID&&(n["X-Interaction-Id"]=process.env.GITHUB_COPILOT_INTERACTION_ID);let c={type:"http",url:this.getCapiMcpUrl(),headers:n,tools:["*"],isDefaultServer:!0,filterMapping:{get_issue:"markdown",get_issue_comments:"markdown",get_pull_request:"markdown",get_pull_request_comments:"markdown",get_pull_request_reviews:"markdown"}};e.mcpServers[$E]=c}configureLocalGitHubMcp(e){if(e.mcpServers[$E]){this.logger.log("Using user-provided GitHub MCP server configuration");let I=e.mcpServers[$E]??{};e1(I)&&!I.command&&(e.mcpServers[$E]={...I,command:"./copilot-developer-action-main/github-mcp-server/github-mcp-server",isDefaultServer:!0},this.logger.log("Added default command to user-provided GitHub MCP server configuration"))}else{this.logger.log("Using default local GitHub MCP server configuration");let I={command:"./copilot-developer-action-main/github-mcp-server/github-mcp-server",args:["stdio","--read-only"],env:{GITHUB_PERSONAL_ACCESS_TOKEN:"GITHUB_PERSONAL_ACCESS_TOKEN",GITHUB_HOST:"GITHUB_SERVER_URL"},tools:["*"],isDefaultServer:!0};e.mcpServers[$E]=I}}configurePlaywrightMcp(e){if(!e.mcpServers[Hpe]){if((process.env.COPILOT_FEATURE_FLAGS??"").split(",").map(l=>l.trim()).includes("copilot_swe_agent_playwright_use_firewall")){this.logger.log("Playwright MCP server is configured to use the firewall, skipping launch.");return}this.logger.log("Enabling Playwright MCP server");let I={command:"npx",args:[...Sbe,"--allowed-origins","localhost;localhost:*;127.0.0.1;127.0.0.1:*"],tools:["*"],isDefaultServer:!0};e.mcpServers[Hpe]=I}}configureBlackbirdMcp(e,I){this.remoteEnabled?this.configureRemoteBlackbirdMcp(e):this.blackbirdMetisIndexEnabled?this.configureLocalMetisBlackbirdMCP(e,I):this.configureLocalBlackbirdMcp(e)}configureLocalMetisBlackbirdMCP(e,I){this.logger.log("Using local Metis Blackbird MCP server configuration"),this.logger.log(`Using blackbird mode: ${I.blackbird?.mode}`);let l=process.env.AGENT_DIR||"/agent";this.logger.log(`Using agent directory: ${l}`);let n=[];I.blackbird?.mode==="tool"&&(n=["*"]),this.logger.log(`Using blackbird Metis server: ${I.blackbird?.mode}`);let c={command:`${l}/blackbird/mcp`,args:["serve","--index",`${l}/blackbird/metis`],env:{GITHUB_PERSONAL_ACCESS_TOKEN:"GITHUB_PERSONAL_ACCESS_TOKEN",COPILOT_API_HMAC_KEY:"CAPI_HMAC_KEY",MODEL_BASED_RETRIEVAL_TOKEN:"BLACKBIRD_AUTH_MODEL_BASED_RETRIEVAL_TOKEN",METIS_API_KEY:"BLACKBIRD_AUTH_METIS_API_KEY"},tools:n,isDefaultServer:!0};e.mcpServers[GF]=c}configureLocalBlackbirdMcp(e){this.logger.log("Using local Blackbird MCP server configuration"),this.logger.log(`Using blackbird mode: ${process.env.BLACKBIRD_MODE}`);let I=[];process.env.BLACKBIRD_MODE==="tool"&&(I=["*"]);let l={command:"./copilot-developer-action-main/blackbird-mcp-server/blackbird-mcp-server",args:["stdio"],env:{GITHUB_PERSONAL_ACCESS_TOKEN:"GITHUB_PERSONAL_ACCESS_TOKEN",CAPI_HOST:"COPILOT_API_URL"},tools:I,isDefaultServer:!0};e.mcpServers[GF]=l}configureRemoteBlackbirdMcp(e){this.logger.log("Using remote Blackbird MCP server configuration"),this.logger.log(`Using blackbird mode: ${process.env.BLACKBIRD_MODE}`);let I=[];process.env.BLACKBIRD_MODE==="tool"&&(I=["*"]);let l={Authorization:"Bearer "+process.env.GITHUB_PERSONAL_ACCESS_TOKEN,"X-MCP-Toolsets":"search_agent","X-MCP-Host":"github-coding-agent"};process.env.GITHUB_COPILOT_INTERACTION_ID&&(l["X-Interaction-Id"]=process.env.GITHUB_COPILOT_INTERACTION_ID);let n={type:"http",url:this.getCapiMcpUrl(),headers:l,tools:I,isDefaultServer:!0};e.mcpServers[GF]=n}getCapiMcpUrl(){return process.env.COPILOT_API_URL?new URL("/mcp/readonly",process.env.COPILOT_API_URL).toString():"https://api.githubcopilot.com/mcp/readonly"}isValidServerType(e){return e1(e)||Yq(e)||Vq(e)||Qx(e)}isValidLocalServerConfig(e){return e.command!==void 0&&e.command.trim()!==""&&Array.isArray(e.args)}isValidRemoteServerConfig(e){return e.url!==void 0&&e.url.trim()!==""}isValidInMemoryServerConfig(e){return e.serverInstance!==void 0&&typeof e.serverInstance=="object"}validateServerConfig(e,I){return this.remoteEnabled&&!this.isValidServerType(I)?(this.logger.error(`Unsupported server type "${I.type}" for server "${e}". Only "Local", "STDIO", "HTTP", "SSE", or "Memory" are supported.`),!1):!this.remoteEnabled&&!e1(I)&&!Qx(I)?(this.logger.error(`Unsupported server type "${I.type}" for server "${e}". Only "Local", "STDIO", or "Memory" are supported.`),!1):I.tools?e1(I)&&!this.isValidLocalServerConfig(I)?(this.logger.error(`Invalid local server configuration for "${e}". Please ensure 'command' and 'args' are provided.`),!1):(Yq(I)||Vq(I))&&!this.isValidRemoteServerConfig(I)?(this.logger.error(`Invalid remote server configuration for "${e}". Please ensure 'url' is provided.`),!1):Qx(I)&&!this.isValidInMemoryServerConfig(I)?(this.logger.error(`Invalid in-memory server configuration for "${e}". Please ensure 'serverInstance' is provided and is an instance of MCPServer.`),!1):!0:(this.logger.error(`No tools specified for server "${e}". Please provide a list of tools or "*" to include all tools.`),!1)}async processHttpServer(e,I){try{let l=this.resolveHeaders(I.headers,process.env),n={...I,headers:l};await this.registry.startHttpMcpClient(e,n),this.logger.log(`Started MCP client for remote server ${e}`)}catch(l){throw this.logger.error(`Failed to start MCP client for remote server ${e}: ${l}`),l}}async processSseServer(e,I){try{let l=this.resolveRemoteServerConfig(I);await this.registry.startSseMcpClient(e,l),this.logger.log(`Started MCP client for remote server ${e}`)}catch(l){throw this.logger.error(`Failed to start MCP client for remote server ${e}: ${l}`),l}}resolveRemoteServerConfig(e){return e.url=this.resolveString(e.url,process.env),e.headers=this.resolveHeaders(e.headers,process.env),{...e,url:e.url,headers:e.headers}}async processInMemoryServer(e,I){try{await this.registry.startInMemoryMcpClient(e,I.serverInstance),this.logger.log(`Started in-memory MCP client for ${e}`)}catch(l){throw this.logger.error(`Failed to start in-memory MCP client for ${e}: ${l}`),l}}async processLocalServer(e,I){let l={...I};if(I.command==="python")try{l=await this.convertPythonToPipx(l)}catch(a){this.logger.error(`Failed to handle Python module for ${e}: ${a}`)}let n=this.buildEnvironment(l),c=this.resolveLocalServerConfig(l,n);this.logger.log(`Starting MCP client for ${e} with command: ${c.command} and args: ${c.args}`);try{await this.registry.startLocalMcpClient(e,n,c.command,c.args),this.logger.log(`Started MCP client for ${e}`)}catch(a){throw this.logger.error(`Failed to start MCP client for ${e}: ${a}`),a}}convertPythonToPipx(e){if(!e||!e.args||e.args.length===0)return e;let I=e.args,l=I.indexOf("-m");if(l===-1||l===I.length-1)throw new Error("Python command with -m flag must specify a module");let n=I[l+1];this.logger.log(`Converting Python module: ${n} to pipx command`);let c=["run",n];for(let a=l+2;a<I.length;a++)c.push(I[a]);for(let a=0;a<l;a++)c.push(I[a]);return{...e,command:"pipx",args:c}}buildEnvironment(e){let I={};if(e.env)if(this.envValueMode==="direct")for(let[l,n]of Object.entries(e.env))I[l]=this.resolveString(n,process.env);else for(let[l,n]of Object.entries(e.env)){let c=n.trim(),a=c;if(c.includes("$")&&(a=this.resolveString(c,process.env)),a!==c){I[l]=a;continue}process.env[c]!==void 0&&(I[l]=process.env[c])}return I}resolveLocalServerConfig(e,I){let l=this.resolveString(e.command,I),n=this.resolveArray(e.args,I);return{...e,command:l,args:n}}resolveString(e,I){return I?e.replace(/\$(?:\{([A-Z0-9_]+)(?::-(.*?))?\}|([A-Z0-9_]+))/g,(l,n,c,a)=>{let r=I[n||a];return r!==void 0?r:c!==void 0?c:l}):e}resolveArray(e,I){return e?I?e.map(l=>this.resolveString(l,I)):e:[]}resolveHeaders(e,I){if(!e)return{};if(!I)return e;let l={};for(let[n,c]of Object.entries(e)){let a=this.resolveArray([c],I);l[n]=a[0]}return l}async processServers(e){if(!e)throw new Error("No servers to process");let I=Object.entries(e.mcpServers).map(([l,n])=>this.processServer(l,n));await Promise.all(I)}async processServer(e,I){if(!this.validateServerConfig(e,I)){this.logger.error(`Skipping server "${e}" due to invalid configuration.`);return}try{e1(I)?await this.processLocalServer(e,I):Yq(I)&&this.remoteEnabled?await this.processHttpServer(e,I):Vq(I)&&this.remoteEnabled?await this.processSseServer(e,I):Qx(I)&&await this.processInMemoryServer(e,I)}catch(l){e!==GF&&await this.logServerFailure(e,l)}}async logServerFailure(e,I){if(this.sessionClient)try{await this.sessionClient.logMCPSetup(e,`<error>MCP server failed to start: ${I.message} - for the full output, see the verbose logs</error>`)}catch(l){this.logger.error(`Failed to log failure for MCP Server '${e}': '${l}'`)}}};var Fq=class{constructor(e,I,l,n="indirect"){this.logger=e;let c;if(typeof I=="string"){if(c=JSON.parse(I),typeof c!="object")throw new Error("Invalid MCP configuration: must be an object");if(c===null||!("mcpServers"in c)||typeof c.mcpServers!="object")throw new Error("Invalid MCP configuration: missing or invalid mcpServers property");this.config=c}else this.config=I;this.disabledServers=new Set(l||[]),this.registry=new Rq(this.logger,void 0,void 0,n),this.processor=new yq(this.logger,this.registry,{mcp3pEnabled:!0,remoteEnabled:!0})}registry;processor;config;startServersPromise=null;allTools=null;disabledServers;async startServers(){return this.startServersPromise||(this.startServersPromise=this.processServersWithExtensions()),this.startServersPromise}async injectDefaultServers(e){}async processServersWithExtensions(){await this.injectDefaultServers(this.config);let e;if(this.disabledServers.size>0){let I={};for(let[l,n]of Object.entries(this.config.mcpServers))this.disabledServers.has(l)?this.logger.log(`Skipping disabled MCP server: ${l}`):I[l]=n;e={...this.config,mcpServers:I}}else e=this.config;return this.processor.processServers(e)}async stopServers(){for(let[e,I]of Object.entries(this.registry.transports))try{await I.close()}catch(l){this.logger.error(`Error closing transport for ${e}: ${l}`)}this.startServersPromise=null,this.allTools=null}async getTools(e,I,l){if(!this.allTools){await this.startServers();let n=new Q9(e,I,l),c=[];for(let a of Object.keys(this.registry.clients)){let s=await n.loadTools({mcpClient:this.registry.clients[a],clientName:a,tools:this.config.mcpServers[a]?.tools||["*"],filterMapping:this.config.mcpServers[a]?.filterMapping||"hidden_characters"});c.push(...s)}this.allTools=c}return this.allTools}getConfig(){return this.config}async startServer(e,I){await this.startServers(),this.config.mcpServers[e]=I,await this.processor.processServer(e,I),this.allTools=null}async stopServer(e){let I=this.registry.transports[e];if(I)try{await I.close(),delete this.registry.transports[e]}catch(l){this.logger.error(`Error closing transport for ${e}: ${l}`)}this.registry.clients[e]&&delete this.registry.clients[e],this.allTools=null}async restartServer(e,I){this.isServerRunning(e)&&await this.stopServer(e),delete this.config.mcpServers[e],await this.startServer(e,I)}isServerRunning(e){return e in this.registry.transports&&e in this.registry.clients}isServerDisabled(e){return this.disabledServers.has(e)}async disableServer(e){if(this.disabledServers.has(e)){this.logger.log(`Server ${e} is already disabled`);return}this.disabledServers.add(e),this.logger.log(`Disabled server ${e} for this session`),this.isServerRunning(e)&&await this.stopServer(e),this.allTools=null}async enableServer(e){if(!this.disabledServers.has(e)){this.logger.log(`Server ${e} is not disabled`);return}this.disabledServers.delete(e),this.logger.log(`Enabled server ${e} for this session`);let I=this.getServerConfig(e);I?await this.startServer(e,I):await this.startBuiltInServer(e),this.allTools=null}async startBuiltInServer(e){}getServerConfig(e){return this.config.mcpServers[e]}};G();var AKe=Gn(QKe(),1);async function hKI(t={}){let e=await uZe();return hZe((0,AKe.default)({},e,t))}async function wKe(t={}){if(Ux())throw new Error("Settings have already been initialized");return hKI(t)}G();async function NV(t,e,I){if(!t||t.length===0)return;let l=!1,n={};for(let c of t)try{let a=await c(e);a&&(l=!0,n={...n,...a})}catch(a){I.error(`Hook execution failed: ${a}`)}return l?n:void 0}G();var n1=class{sessionId;startTime;events=[];_chatMessages=[];_selectedModel;logger;eventCallbacks=[];constructor({sessionId:e,startTime:I,logger:l}={}){this.sessionId=e||kb(),this.startTime=I||new Date,this.logger=l||new ci}static fromEvents({events:e,logger:I}){if(e.length===0)throw new Error("Cannot create session from empty events array");let l=e[0];if(l.type!=="session.start")throw new Error("First event must be session.start");let n=new this({sessionId:l.data.sessionId,startTime:new Date(l.data.startTime),logger:I||new ci});n._selectedModel=l.data.selectedModel,n.events.push(l);for(let c=1;c<e.length;c++){let a=e[c];n.events.push(a),n.processEventForState(a)}return n}addEvent(e){let I=e.id||kb(),l=e.timestamp||new Date().toISOString(),n=e.parentId!==void 0?e.parentId:this.getLastEventId(),c={...e,id:I,timestamp:l,parentId:n};return this.events.push(c),this.processEventForState(c),this.notifyEventCallbacks(c),c}getEvents(){return this.events}onEvent(e){return this.eventCallbacks.push(e),()=>{let I=this.eventCallbacks.indexOf(e);I>-1&&this.eventCallbacks.splice(I,1)}}get chatMessages(){return this._chatMessages}get selectedModel(){return this._selectedModel}setSelectedModel(e){let I=this._selectedModel;this._selectedModel=e,this.addEvent({type:"session.model_change",data:{previousModel:I,newModel:e}})}getChatContextMessages(){return this._chatMessages.filter(e=>e.role!=="system")}getSystemContextMessages(){return this._chatMessages.filter(e=>e.role==="system")}getLastEventId(){return this.events.length===0?null:this.events[this.events.length-1].id}processEventForState(e){switch(e.type){case"session.start":e.data.selectedModel&&(this._selectedModel=e.data.selectedModel);break;case"session.model_change":this._selectedModel=e.data.newModel;break;case"user.message":this._chatMessages.push({role:"user",content:e.data.content});break;case"assistant.message":{let I={role:"assistant",content:e.data.content||null};e.data.toolRequests&&e.data.toolRequests.length>0&&(I.tool_calls=e.data.toolRequests.map(l=>({id:l.toolCallId,type:"function",function:{name:l.name,arguments:typeof l.arguments=="string"?l.arguments:JSON.stringify(l.arguments)}}))),this._chatMessages.push(I);break}case"tool.execution_complete":{this._chatMessages.push({role:"tool",tool_call_id:e.data.toolCallId,content:e.data.success?e.data.result?.content||"":e.data.error?.message||"Tool execution failed"});break}case"system.message":this._chatMessages.push({role:e.data.role,content:e.data.content,...e.data.name&&{name:e.data.name}});break;case"session.resume":case"session.error":case"session.info":case"session.import_legacy":case"assistant.turn_start":case"assistant.turn_end":case"assistant.usage":case"abort":case"tool.execution_start":case"tool.execution_partial_result":case"hook.start":case"hook.end":break;default:{let I=e;this.logger.error(`Unknown event type: ${I.type}`);break}}}notifyEventCallbacks(e){for(let I of this.eventCallbacks)try{I(e)}catch(l){this.logger.error(`Error in event callback: ${l instanceof Error?l.message:String(l)}`)}}};var Cq=class{static name="Copilot";static description="Base Copilot Agent";options;logger;workingDir;session;constructor(e){this.options=e,this.logger=e.logger||new ci,this.workingDir=e.workingDirectory||process.cwd(),this.session=e.session||new n1,nme(this.workingDir).then(I=>{if(I.found)return DUe(I.gitRoot,!0,this.workingDir)}).catch(I=>{this.logger.debug(`Failed to initialize custom instructions cache: ${I}`)})}async*query(e){let I=new Map,l;try{if(this.options.mcpServers&&Object.keys(this.options.mcpServers).length>0)try{l=new Fq(this.logger,{mcpServers:this.options.mcpServers},this.options.disabledTools),await l.startServers()}catch(Ne){this.logger.error(`Failed to initialize MCP host: ${Ne}`)}let n={timestamp:Date.now(),cwd:this.workingDir,prompt:e},a=(await NV(this.options.hooks?.userPromptSubmitted,n,this.logger))?.modifiedPrompt??e;this.session.addEvent({type:"user.message",data:{content:a}});let r=new NF().setProblemStatement(a).setAgentModel(this.buildAgentModelString()).setGithubRepoName("copilot-sdk-session").setGithubRepoCommit("copilot-sdk-commit").setGithubRepoReadWrite(!1).setCopilotIntegrationId(this.options.integrationId||"copilot-developer-cli").setCopilotHmacKey(this.options.hmacKey).setCopilotToken(this.options.copilotToken).build();pZe();let o=await wKe(r),d=o.service?.agent?.model,i=eme(d),h=i.agent,p=i.model?{model:i.model}:void 0,Z=coe(o,this.logger,h,p),u={location:this.workingDir,timeout:3e4,requireReasoning:!0,toolPartialResultCallback:void 0,permissions:this.options.requestPermission?{requestRequired:!0,request:this.options.requestPermission}:{requestRequired:!1},shellConfig:process.platform==="win32"?vi.powerShell:vi.bash},N=await LOe(u,this.logger),Y=[];if(l)try{Y=await l.getTools(o,this.logger,u.permissions)}catch(Ne){this.logger.error(`Failed to get MCP tools: ${Ne}`)}let y=[...N,...Y],Q=this.applyToolFiltering(y,this.options.allowedTools,this.options.disabledTools),A=await nme(this.workingDir),H={...(fOe()["sweagent-capi"]?.["claude-sonnet-4"]??kOe()).supports,reasoning:!0},J=await uOe(A.found?A.gitRoot:"",efe(),this.workingDir,{},H,u,Q,void 0),te=this.session.chatMessages.slice(0,-1),Fe={role:"user",content:YOe({customAgentPrompt:void 0,problemStatement:a,capabilities:H})},ye=[...te,Fe],Ee={timestamp:Date.now(),cwd:this.workingDir,source:"new",initialPrompt:e};await NV(this.options.hooks?.sessionStart,Ee,this.logger);let Qe=Z.getCompletionWithTools(J,ye,Q,{failIfInitialInputsTooLong:!1,processors:{preRequest:[new VE(Fe,this.logger)]},executeToolsInParallel:!1,abortSignal:this.options.abortController?.signal});for await(let Ne of Qe){if(this.options.abortController?.signal.aborted){yield{type:"error",error:new Error("Operation was cancelled")};return}let uI=await this.translateEvent(Ne,I);for(let Ae of uI)Ae.type==="message"&&Ae.role==="assistant"&&this.session.addEvent({type:"assistant.message",data:{messageId:`msg-${Date.now()}`,content:Ae.content}}),yield Ae}yield{type:"complete"}}catch(n){let c={timestamp:Date.now(),cwd:this.workingDir,reason:"error",error:n instanceof Error?n:new Error(String(n))};await NV(this.options.hooks?.sessionEnd,c,this.logger),yield{type:"error",error:n instanceof Error?n:new Error(String(n))}}finally{let n={timestamp:Date.now(),cwd:this.workingDir,reason:"complete"};if(await NV(this.options.hooks?.sessionEnd,n,this.logger),l)try{await l.stopServers(),this.logger.log("MCP host stopped successfully")}catch(c){this.logger.error(`Error stopping MCP host: ${c}`)}}}buildAgentModelString(){switch(this.options.modelProvider.type){case"openai":return`openai:${this.options.modelProvider.model}`;case"anthropic":return`anthropic:${this.options.modelProvider.model}`;case"copilot":return`capi:${this.options.modelProvider.model}`;default:throw new Error(`Unsupported provider: ${this.options.modelProvider.type}`)}}applyToolFiltering(e,I,l){let n=e;return I&&I.length>0&&(n=n.filter(c=>I.includes(c.name))),l&&l.length>0&&(n=n.filter(c=>!l.includes(c.name))),n}async translateEvent(e,I){switch(e.kind){case"message":{if(c6(e)&&e.message.content)return[{type:"message",content:typeof e.message.content=="string"?e.message.content:"",role:"assistant"}];if(XOe(e)){let l=[];for(let n of e.message.tool_calls){let c=DA(n.function.arguments);I.set(n.id,n.function.name);let a={timestamp:Date.now(),cwd:this.workingDir,toolName:n.function.name,toolArgs:c},r=(await NV(this.options.hooks?.preToolUse,a,this.logger))?.modifiedArgs??c;l.push({type:"tool_use",toolName:n.function.name,args:r,toolCallId:n.id})}return l}return[]}case"response":return[];case"model_call_failure":{let l=new Error(e.modelCall?.error||"Model call failed"),n={timestamp:Date.now(),cwd:this.workingDir,error:l,errorContext:"model_call",recoverable:!0};return await NV(this.options.hooks?.errorOccurred,n,this.logger),[{type:"error",error:l}]}case"tool_execution":{let l=I.get(e.toolCallId)||"unknown",n={timestamp:Date.now(),cwd:this.workingDir,toolName:l,toolArgs:{},toolResult:e.toolResult},a=(await NV(this.options.hooks?.postToolUse,n,this.logger))?.modifiedResult??e.toolResult;return[{type:"tool_result",toolName:l,result:a,toolCallId:e.toolCallId}]}default:return[]}}};G();G();var Ope=class{loggers;constructor(e){this.loggers=e}isDebug(){return this.loggers.some(e=>e.isDebug())}debug(e){this.loggers.forEach(I=>I.debug(e))}log(e){this.loggers.forEach(I=>I.log(e))}info(e){this.loggers.forEach(I=>I.info(e))}notice(e){this.loggers.forEach(I=>I.notice(e))}warning(e){this.loggers.forEach(I=>I.warning(e))}error(e){this.loggers.forEach(I=>I.error(e))}startGroup(e,I){this.loggers.forEach(l=>l.startGroup(e,I))}endGroup(e){this.loggers.forEach(I=>I.endGroup(e))}};G();import{appendFile as pKI,access as ZKI,mkdir as uKI}from"fs/promises";import{constants as WKI}from"fs";import{dirname as NKI}from"path";var Mpe=class extends rp{constructor(I,l,n){super(l,n);this.filePath=I;this.writeQueue=YKI(NKI(this.filePath)).catch(()=>{})}writeQueue=Promise.resolve();log(I){this.write("LOG",I)}debug(I){super.shouldLog(8)&&this.write("DEBUG",this.filterSecrets(I).toString())}info(I){super.shouldLog(4)&&this.write("INFO",this.filterSecrets(I).toString())}notice(I){super.shouldLog(2)&&this.write("NOTICE",this.filterSecrets(I).toString())}warning(I){super.shouldLog(2)&&this.write("WARNING",this.filterSecrets(I).toString())}error(I){super.shouldLog(1)&&this.write("ERROR",this.filterSecrets(I).toString())}startGroup(I,l){super.shouldLog(l||4)&&this.write("START-GROUP",I)}endGroup(I){super.shouldLog(I||4)&&this.write("END-GROUP","")}write(I,l){let c=`${new Date().toISOString()} [${I}] ${l}
1358
+ `;this.writeQueue=this.writeQueue.then(()=>this.performWrite(c)).catch(()=>{})}async performWrite(I){await pKI(this.filePath,I)}};async function YKI(t){try{await ZKI(t,WKI.F_OK)}catch{await uKI(t,{recursive:!0})}}G();async function*t_l(t){let{prompt:e,...I}=t;yield*new Cq(I).query(e)}G();var XKe=class{sessions;logger;lastAccessedSessionId;constructor({logger:e}={}){this.sessions=new Map,this.logger=e||new ci}async createSession(){let e=new n1({logger:this.logger});return this.sessions.set(e.sessionId,e),this.lastAccessedSessionId=e.sessionId,e}async getSession(e){let I=this.sessions.get(e);return I&&(this.lastAccessedSessionId=e),I}async getLastSession(){if(this.lastAccessedSessionId){let l=this.sessions.get(this.lastAccessedSessionId);if(l)return l}let e=Array.from(this.sessions.values());if(e.length===0)return;e.sort((l,n)=>n.startTime.getTime()-l.startTime.getTime());let I=e[0];return this.lastAccessedSessionId=I.sessionId,I}async listSessions(){return Array.from(this.sessions.values()).map(e=>({sessionId:e.sessionId,startTime:e.startTime}))}async saveSession(e){}async deleteSession(e){this.sessions.delete(e.sessionId),this.lastAccessedSessionId===e.sessionId&&(this.lastAccessedSessionId=void 0)}};export{Cq as Agent,rp as BaseLogger,Ope as CompoundLogger,qV as ConsoleLogger,Mpe as FileLogger,ci as NoopLogger,n1 as Session,XKe as SessionManager,NV as executeHooks,r1 as isDebugEnvironment,t_l as query};
1359
1359
  /*! Bundled license information:
1360
1360
 
1361
1361
  tmp/lib/tmp.js: