@webqit/fetch-plus 0.1.29 → 0.1.30

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/dist/main.js CHANGED
@@ -1,2 +1,2 @@
1
- (()=>{var wr=Object.defineProperty;var Be=(r,e)=>{for(var t in e)wr(r,t,{get:e[t],enumerable:!0})};var $t={};Be($t,{FormDataPlus:()=>B,HeadersPlus:()=>W,LiveResponse:()=>He,Observer:()=>or,RequestPlus:()=>Ne,ResponsePlus:()=>V,fetchPlus:()=>lr});function v(r){return!Array.isArray(r)&&typeof r=="object"&&r}function pe(r){return typeof r}function R(r){return Array.isArray(r)}function $e(r){return r===!0||r===!1}function me(r){return typeof r=="function"}function We(r){return r===null||r===""}function te(r){return arguments.length&&(r===void 0||typeof r>"u")}function x(r){return Array.isArray(r)||typeof r=="object"&&r||me(r)}function Ve(r){return We(r)||te(r)||r===!1||r===0||x(r)&&!Object.keys(r).length}function G(r){return me(r)||r&&{}.toString.call(r)==="[object function]"}function de(r){return r instanceof Number||typeof r=="number"}function J(r){return de(r)||r!==!0&&r!==!1&&r!==null&&r!==""&&!isNaN(r*1)}function Ge(r){return R(r)&&Object.getPrototypeOf(r)===Array.prototype}function Je(r){return v(r)&&Object.getPrototypeOf(r)===Object.prototype}function K(r){return r instanceof String||typeof r=="string"&&r!==null}function Ke(r){return!K(r)&&!te(r.length)}function D(r,...e){if(!r||!["object","function"].includes(typeof r))throw new Error("Argument #1 must be of type object");let t=r[Symbol.for("wq")];if(t||(t=new je,Object.defineProperty(r,Symbol.for("wq"),{value:t,enumerable:!1,configurable:!1,writable:!1})),!e.length)return t;let s,n;for(;s=e.shift();)(n=t)&&!(t=t.get(s))&&(t=new je,n.set(s,t));return t}var je=class extends Map{};function ge(r,e,t=!1){if(e=="")return r;var s=t?r.lastIndexOf(e):r.indexOf(e);return s===-1?"":r.substr(s+e.length)}function Re(r,e,t=!1){if(e=="")return r;var s=t?r.lastIndexOf(e):r.indexOf(e);return s===-1?r:r.substr(0,s)}var Ar=Object.defineProperty,g=(r,e)=>Ar(r,"name",{value:e,configurable:!0}),we=class{type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(r,e,t,s,n,o){this.type=r,this.name=e,this.prefix=t,this.value=s,this.suffix=n,this.modifier=o}hasCustomName(){return this.name!==""&&typeof this.name!="number"}};g(we,"Part");var Cr=/[$_\p{ID_Start}]/u,Tr=/[$_\u200C\u200D\p{ID_Continue}]/u,Qe=".*";function It(r,e){return(e?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(r)}g(It,"isASCII");function et(r,e=!1){let t=[],s=0;for(;s<r.length;){let n=r[s],o=g(function(a){if(!e)throw new TypeError(a);t.push({type:"INVALID_CHAR",index:s,value:r[s++]})},"ErrorOrInvalid");if(n==="*"){t.push({type:"ASTERISK",index:s,value:r[s++]});continue}if(n==="+"||n==="?"){t.push({type:"OTHER_MODIFIER",index:s,value:r[s++]});continue}if(n==="\\"){t.push({type:"ESCAPED_CHAR",index:s++,value:r[s++]});continue}if(n==="{"){t.push({type:"OPEN",index:s,value:r[s++]});continue}if(n==="}"){t.push({type:"CLOSE",index:s,value:r[s++]});continue}if(n===":"){let a="",i=s+1;for(;i<r.length;){let f=r.substr(i,1);if(i===s+1&&Cr.test(f)||i!==s+1&&Tr.test(f)){a+=r[i++];continue}break}if(!a){o(`Missing parameter name at ${s}`);continue}t.push({type:"NAME",index:s,value:a}),s=i;continue}if(n==="("){let a=1,i="",f=s+1,u=!1;if(r[f]==="?"){o(`Pattern cannot start with "?" at ${f}`);continue}for(;f<r.length;){if(!It(r[f],!1)){o(`Invalid character '${r[f]}' at ${f}.`),u=!0;break}if(r[f]==="\\"){i+=r[f++]+r[f++];continue}if(r[f]===")"){if(a--,a===0){f++;break}}else if(r[f]==="("&&(a++,r[f+1]!=="?")){o(`Capturing groups are not allowed at ${f}`),u=!0;break}i+=r[f++]}if(u)continue;if(a){o(`Unbalanced pattern at ${s}`);continue}if(!i){o(`Missing pattern at ${s}`);continue}t.push({type:"REGEX",index:s,value:i}),s=f;continue}t.push({type:"CHAR",index:s,value:r[s++]})}return t.push({type:"END",index:s,value:""}),t}g(et,"lexer");function tt(r,e={}){let t=et(r);e.delimiter??="/#?",e.prefixes??="./";let s=`[^${$(e.delimiter)}]+?`,n=[],o=0,a=0,i="",f=new Set,u=g(d=>{if(a<t.length&&t[a].type===d)return t[a++].value},"tryConsume"),c=g(()=>u("OTHER_MODIFIER")??u("ASTERISK"),"tryConsumeModifier"),l=g(d=>{let P=u(d);if(P!==void 0)return P;let{type:E,index:U}=t[a];throw new TypeError(`Unexpected ${E} at ${U}, expected ${d}`)},"mustConsume"),p=g(()=>{let d="",P;for(;P=u("CHAR")??u("ESCAPED_CHAR");)d+=P;return d},"consumeText"),h=g(d=>d,"DefaultEncodePart"),m=e.encodePart||h,y="",b=g(d=>{y+=d},"appendToPendingFixedValue"),_=g(()=>{y.length&&(n.push(new we(3,"","",m(y),"",3)),y="")},"maybeAddPartFromPendingFixedValue"),w=g((d,P,E,U,N)=>{let L=3;switch(N){case"?":L=1;break;case"*":L=0;break;case"+":L=2;break}if(!P&&!E&&L===3){b(d);return}if(_(),!P&&!E){if(!d)return;n.push(new we(3,"","",m(d),"",L));return}let j;E?E==="*"?j=Qe:j=E:j=s;let _e=2;j===s?(_e=1,j=""):j===Qe&&(_e=0,j="");let Z;if(P?Z=P:E&&(Z=o++),f.has(Z))throw new TypeError(`Duplicate name '${Z}'.`);f.add(Z),n.push(new we(_e,Z,m(d),j,m(U),L))},"addPart");for(;a<t.length;){let d=u("CHAR"),P=u("NAME"),E=u("REGEX");if(!P&&!E&&(E=u("ASTERISK")),P||E){let N=d??"";e.prefixes.indexOf(N)===-1&&(b(N),N=""),_();let L=c();w(N,P,E,"",L);continue}let U=d??u("ESCAPED_CHAR");if(U){b(U);continue}if(u("OPEN")){let N=p(),L=u("NAME"),j=u("REGEX");!L&&!j&&(j=u("ASTERISK"));let _e=p();l("CLOSE");let Z=c();w(N,L,j,_e,Z);continue}_(),l("END")}return n}g(tt,"parse");function $(r){return r.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}g($,"escapeString");function Ze(r){return r&&r.ignoreCase?"ui":"u"}g(Ze,"flags");function Lt(r,e,t){return rt(tt(r,t),e,t)}g(Lt,"stringToRegexp");function re(r){switch(r){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}g(re,"modifierToString");function rt(r,e,t={}){t.delimiter??="/#?",t.prefixes??="./",t.sensitive??=!1,t.strict??=!1,t.end??=!0,t.start??=!0,t.endsWith="";let s=t.start?"^":"";for(let i of r){if(i.type===3){i.modifier===3?s+=$(i.value):s+=`(?:${$(i.value)})${re(i.modifier)}`;continue}e&&e.push(i.name);let f=`[^${$(t.delimiter)}]+?`,u=i.value;if(i.type===1?u=f:i.type===0&&(u=Qe),!i.prefix.length&&!i.suffix.length){i.modifier===3||i.modifier===1?s+=`(${u})${re(i.modifier)}`:s+=`((?:${u})${re(i.modifier)})`;continue}if(i.modifier===3||i.modifier===1){s+=`(?:${$(i.prefix)}(${u})${$(i.suffix)})`,s+=re(i.modifier);continue}s+=`(?:${$(i.prefix)}`,s+=`((?:${u})(?:`,s+=$(i.suffix),s+=$(i.prefix),s+=`(?:${u}))*)${$(i.suffix)})`,i.modifier===0&&(s+="?")}let n=`[${$(t.endsWith)}]|$`,o=`[${$(t.delimiter)}]`;if(t.end)return t.strict||(s+=`${o}?`),t.endsWith.length?s+=`(?=${n})`:s+="$",new RegExp(s,Ze(t));t.strict||(s+=`(?:${o}(?=${n}))?`);let a=!1;if(r.length){let i=r[r.length-1];i.type===3&&i.modifier===3&&(a=t.delimiter.indexOf(i)>-1)}return a||(s+=`(?=${o}|${n})`),new RegExp(s,Ze(t))}g(rt,"partsToRegexp");var ee={delimiter:"",prefixes:"",sensitive:!0,strict:!0},Mr={delimiter:".",prefixes:"",sensitive:!0,strict:!0},$r={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function Dt(r,e){return r.length?r[0]==="/"?!0:!e||r.length<2?!1:(r[0]=="\\"||r[0]=="{")&&r[1]=="/":!1}g(Dt,"isAbsolutePathname");function st(r,e){return r.startsWith(e)?r.substring(e.length,r.length):r}g(st,"maybeStripPrefix");function kt(r,e){return r.endsWith(e)?r.substr(0,r.length-e.length):r}g(kt,"maybeStripSuffix");function nt(r){return!r||r.length<2?!1:r[0]==="["||(r[0]==="\\"||r[0]==="{")&&r[1]==="["}g(nt,"treatAsIPv6Hostname");var qt=["ftp","file","http","https","ws","wss"];function it(r){if(!r)return!0;for(let e of qt)if(r.test(e))return!0;return!1}g(it,"isSpecialScheme");function Ut(r,e){if(r=st(r,"#"),e||r==="")return r;let t=new URL("https://example.com");return t.hash=r,t.hash?t.hash.substring(1,t.hash.length):""}g(Ut,"canonicalizeHash");function Nt(r,e){if(r=st(r,"?"),e||r==="")return r;let t=new URL("https://example.com");return t.search=r,t.search?t.search.substring(1,t.search.length):""}g(Nt,"canonicalizeSearch");function Ft(r,e){return e||r===""?r:nt(r)?ut(r):at(r)}g(Ft,"canonicalizeHostname");function zt(r,e){if(e||r==="")return r;let t=new URL("https://example.com");return t.password=r,t.password}g(zt,"canonicalizePassword");function Ht(r,e){if(e||r==="")return r;let t=new URL("https://example.com");return t.username=r,t.username}g(Ht,"canonicalizeUsername");function Bt(r,e,t){if(t||r==="")return r;if(e&&!qt.includes(e))return new URL(`${e}:${r}`).pathname;let s=r[0]=="/";return r=new URL(s?r:"/-"+r,"https://example.com").pathname,s||(r=r.substring(2,r.length)),r}g(Bt,"canonicalizePathname");function Wt(r,e,t){return ot(e)===r&&(r=""),t||r===""?r:ft(r)}g(Wt,"canonicalizePort");function Vt(r,e){return r=kt(r,":"),e||r===""?r:Ie(r)}g(Vt,"canonicalizeProtocol");function ot(r){switch(r){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}g(ot,"defaultPortForProtocol");function Ie(r){if(r==="")return r;if(/^[-+.A-Za-z0-9]*$/.test(r))return r.toLowerCase();throw new TypeError(`Invalid protocol '${r}'.`)}g(Ie,"protocolEncodeCallback");function Gt(r){if(r==="")return r;let e=new URL("https://example.com");return e.username=r,e.username}g(Gt,"usernameEncodeCallback");function Jt(r){if(r==="")return r;let e=new URL("https://example.com");return e.password=r,e.password}g(Jt,"passwordEncodeCallback");function at(r){if(r==="")return r;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(r))throw new TypeError(`Invalid hostname '${r}'`);let e=new URL("https://example.com");return e.hostname=r,e.hostname}g(at,"hostnameEncodeCallback");function ut(r){if(r==="")return r;if(/[^0-9a-fA-F[\]:]/g.test(r))throw new TypeError(`Invalid IPv6 hostname '${r}'`);return r.toLowerCase()}g(ut,"ipv6HostnameEncodeCallback");function ft(r){if(r===""||/^[0-9]*$/.test(r)&&parseInt(r)<=65535)return r;throw new TypeError(`Invalid port '${r}'.`)}g(ft,"portEncodeCallback");function Kt(r){if(r==="")return r;let e=new URL("https://example.com");return e.pathname=r[0]!=="/"?"/-"+r:r,r[0]!=="/"?e.pathname.substring(2,e.pathname.length):e.pathname}g(Kt,"standardURLPathnameEncodeCallback");function Xt(r){return r===""?r:new URL(`data:${r}`).pathname}g(Xt,"pathURLPathnameEncodeCallback");function Qt(r){if(r==="")return r;let e=new URL("https://example.com");return e.search=r,e.search.substring(1,e.search.length)}g(Qt,"searchEncodeCallback");function Zt(r){if(r==="")return r;let e=new URL("https://example.com");return e.hash=r,e.hash.substring(1,e.hash.length)}g(Zt,"hashEncodeCallback");var Yt=class{#s;#e=[];#r={};#t=0;#n=1;#u=0;#o=0;#f=0;#c=0;#h=!1;constructor(r){this.#s=r}get result(){return this.#r}parse(){for(this.#e=et(this.#s,!0);this.#t<this.#e.length;this.#t+=this.#n){if(this.#n=1,this.#e[this.#t].type==="END"){if(this.#o===0){this.#p(),this.#y()?this.#i(9,1):this.#b()?this.#i(8,1):this.#i(7,0);continue}else if(this.#o===2){this.#l(5);continue}this.#i(10,0);break}if(this.#f>0)if(this.#O())this.#f-=1;else continue;if(this.#S()){this.#f+=1;continue}switch(this.#o){case 0:this.#_()&&this.#l(1);break;case 1:if(this.#_()){this.#T();let r=7,e=1;this.#v()?(r=2,e=3):this.#h&&(r=2),this.#i(r,e)}break;case 2:this.#w()?this.#l(3):(this.#x()||this.#b()||this.#y())&&this.#l(5);break;case 3:this.#P()?this.#i(4,1):this.#w()&&this.#i(5,1);break;case 4:this.#w()&&this.#i(5,1);break;case 5:this.#A()?this.#c+=1:this.#C()&&(this.#c-=1),this.#E()&&!this.#c?this.#i(6,1):this.#x()?this.#i(7,0):this.#b()?this.#i(8,1):this.#y()&&this.#i(9,1);break;case 6:this.#x()?this.#i(7,0):this.#b()?this.#i(8,1):this.#y()&&this.#i(9,1);break;case 7:this.#b()?this.#i(8,1):this.#y()&&this.#i(9,1);break;case 8:this.#y()&&this.#i(9,1);break;case 9:break;case 10:break}}this.#r.hostname!==void 0&&this.#r.port===void 0&&(this.#r.port="")}#i(r,e){switch(this.#o){case 0:break;case 1:this.#r.protocol=this.#m();break;case 2:break;case 3:this.#r.username=this.#m();break;case 4:this.#r.password=this.#m();break;case 5:this.#r.hostname=this.#m();break;case 6:this.#r.port=this.#m();break;case 7:this.#r.pathname=this.#m();break;case 8:this.#r.search=this.#m();break;case 9:this.#r.hash=this.#m();break;case 10:break}this.#o!==0&&r!==10&&([1,2,3,4].includes(this.#o)&&[6,7,8,9].includes(r)&&(this.#r.hostname??=""),[1,2,3,4,5,6].includes(this.#o)&&[8,9].includes(r)&&(this.#r.pathname??=this.#h?"/":""),[1,2,3,4,5,6,7].includes(this.#o)&&r===9&&(this.#r.search??="")),this.#d(r,e)}#d(r,e){this.#o=r,this.#u=this.#t+e,this.#t+=e,this.#n=0}#p(){this.#t=this.#u,this.#n=0}#l(r){this.#p(),this.#o=r}#g(r){return r<0&&(r=this.#e.length-r),r<this.#e.length?this.#e[r]:this.#e[this.#e.length-1]}#a(r,e){let t=this.#g(r);return t.value===e&&(t.type==="CHAR"||t.type==="ESCAPED_CHAR"||t.type==="INVALID_CHAR")}#_(){return this.#a(this.#t,":")}#v(){return this.#a(this.#t+1,"/")&&this.#a(this.#t+2,"/")}#w(){return this.#a(this.#t,"@")}#P(){return this.#a(this.#t,":")}#E(){return this.#a(this.#t,":")}#x(){return this.#a(this.#t,"/")}#b(){if(this.#a(this.#t,"?"))return!0;if(this.#e[this.#t].value!=="?")return!1;let r=this.#g(this.#t-1);return r.type!=="NAME"&&r.type!=="REGEX"&&r.type!=="CLOSE"&&r.type!=="ASTERISK"}#y(){return this.#a(this.#t,"#")}#S(){return this.#e[this.#t].type=="OPEN"}#O(){return this.#e[this.#t].type=="CLOSE"}#A(){return this.#a(this.#t,"[")}#C(){return this.#a(this.#t,"]")}#m(){let r=this.#e[this.#t],e=this.#g(this.#u).index;return this.#s.substring(e,r.index)}#T(){let r={};Object.assign(r,ee),r.encodePart=Ie;let e=Lt(this.#m(),void 0,r);this.#h=it(e)}};g(Yt,"Parser");var Xe=["protocol","username","password","hostname","port","pathname","search","hash"],Y="*";function Ye(r,e){if(typeof r!="string")throw new TypeError("parameter 1 is not of type 'string'.");let t=new URL(r,e);return{protocol:t.protocol.substring(0,t.protocol.length-1),username:t.username,password:t.password,hostname:t.hostname,port:t.port,pathname:t.pathname,search:t.search!==""?t.search.substring(1,t.search.length):void 0,hash:t.hash!==""?t.hash.substring(1,t.hash.length):void 0}}g(Ye,"extractValues");function F(r,e){return e?be(r):r}g(F,"processBaseURLString");function ye(r,e,t){let s;if(typeof e.baseURL=="string")try{s=new URL(e.baseURL),e.protocol===void 0&&(r.protocol=F(s.protocol.substring(0,s.protocol.length-1),t)),!t&&e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.username===void 0&&(r.username=F(s.username,t)),!t&&e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.username===void 0&&e.password===void 0&&(r.password=F(s.password,t)),e.protocol===void 0&&e.hostname===void 0&&(r.hostname=F(s.hostname,t)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&(r.port=F(s.port,t)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&(r.pathname=F(s.pathname,t)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&e.search===void 0&&(r.search=F(s.search.substring(1,s.search.length),t)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&e.search===void 0&&e.hash===void 0&&(r.hash=F(s.hash.substring(1,s.hash.length),t))}catch{throw new TypeError(`invalid baseURL '${e.baseURL}'.`)}if(typeof e.protocol=="string"&&(r.protocol=Vt(e.protocol,t)),typeof e.username=="string"&&(r.username=Ht(e.username,t)),typeof e.password=="string"&&(r.password=zt(e.password,t)),typeof e.hostname=="string"&&(r.hostname=Ft(e.hostname,t)),typeof e.port=="string"&&(r.port=Wt(e.port,r.protocol,t)),typeof e.pathname=="string"){if(r.pathname=e.pathname,s&&!Dt(r.pathname,t)){let n=s.pathname.lastIndexOf("/");n>=0&&(r.pathname=F(s.pathname.substring(0,n+1),t)+r.pathname)}r.pathname=Bt(r.pathname,r.protocol,t)}return typeof e.search=="string"&&(r.search=Nt(e.search,t)),typeof e.hash=="string"&&(r.hash=Ut(e.hash,t)),r}g(ye,"applyInit");function be(r){return r.replace(/([+*?:{}()\\])/g,"\\$1")}g(be,"escapePatternString");function er(r){return r.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}g(er,"escapeRegexpString");function tr(r,e){e.delimiter??="/#?",e.prefixes??="./",e.sensitive??=!1,e.strict??=!1,e.end??=!0,e.start??=!0,e.endsWith="";let t=".*",s=`[^${er(e.delimiter)}]+?`,n=/[$_\u200C\u200D\p{ID_Continue}]/u,o="";for(let a=0;a<r.length;++a){let i=r[a];if(i.type===3){if(i.modifier===3){o+=be(i.value);continue}o+=`{${be(i.value)}}${re(i.modifier)}`;continue}let f=i.hasCustomName(),u=!!i.suffix.length||!!i.prefix.length&&(i.prefix.length!==1||!e.prefixes.includes(i.prefix)),c=a>0?r[a-1]:null,l=a<r.length-1?r[a+1]:null;if(!u&&f&&i.type===1&&i.modifier===3&&l&&!l.prefix.length&&!l.suffix.length)if(l.type===3){let p=l.value.length>0?l.value[0]:"";u=n.test(p)}else u=!l.hasCustomName();if(!u&&!i.prefix.length&&c&&c.type===3){let p=c.value[c.value.length-1];u=e.prefixes.includes(p)}u&&(o+="{"),o+=be(i.prefix),f&&(o+=`:${i.name}`),i.type===2?o+=`(${i.value})`:i.type===1?f||(o+=`(${s})`):i.type===0&&(!f&&(!c||c.type===3||c.modifier!==3||u||i.prefix!=="")?o+="*":o+=`(${t})`),i.type===1&&f&&i.suffix.length&&n.test(i.suffix[0])&&(o+="\\"),o+=be(i.suffix),u&&(o+="}"),i.modifier!==3&&(o+=re(i.modifier))}return o}g(tr,"partsToPattern");var ct=class{#s;#e={};#r={};#t={};#n={};#u=!1;constructor(r={},e,t){try{let s;if(typeof e=="string"?s=e:t=e,typeof r=="string"){let i=new Yt(r);if(i.parse(),r=i.result,s===void 0&&typeof r.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");r.baseURL=s}else{if(!r||typeof r!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(s)throw new TypeError("parameter 1 is not of type 'string'.")}typeof t>"u"&&(t={ignoreCase:!1});let n={ignoreCase:t.ignoreCase===!0},o={pathname:Y,protocol:Y,username:Y,password:Y,hostname:Y,port:Y,search:Y,hash:Y};this.#s=ye(o,r,!0),ot(this.#s.protocol)===this.#s.port&&(this.#s.port="");let a;for(a of Xe){if(!(a in this.#s))continue;let i={},f=this.#s[a];switch(this.#r[a]=[],a){case"protocol":Object.assign(i,ee),i.encodePart=Ie;break;case"username":Object.assign(i,ee),i.encodePart=Gt;break;case"password":Object.assign(i,ee),i.encodePart=Jt;break;case"hostname":Object.assign(i,Mr),nt(f)?i.encodePart=ut:i.encodePart=at;break;case"port":Object.assign(i,ee),i.encodePart=ft;break;case"pathname":it(this.#e.protocol)?(Object.assign(i,$r,n),i.encodePart=Kt):(Object.assign(i,ee,n),i.encodePart=Xt);break;case"search":Object.assign(i,ee,n),i.encodePart=Qt;break;case"hash":Object.assign(i,ee,n),i.encodePart=Zt;break}try{this.#n[a]=tt(f,i),this.#e[a]=rt(this.#n[a],this.#r[a],i),this.#t[a]=tr(this.#n[a],i),this.#u=this.#u||this.#n[a].some(u=>u.type===2)}catch{throw new TypeError(`invalid ${a} pattern '${this.#s[a]}'.`)}}}catch(s){throw new TypeError(`Failed to construct 'URLPattern': ${s.message}`)}}get[Symbol.toStringTag](){return"URLPattern"}test(r={},e){let t={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof r!="string"&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof r>"u")return!1;try{typeof r=="object"?t=ye(t,r,!1):t=ye(t,Ye(r,e),!1)}catch{return!1}let s;for(s of Xe)if(!this.#e[s].exec(t[s]))return!1;return!0}exec(r={},e){let t={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof r!="string"&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof r>"u")return;try{typeof r=="object"?t=ye(t,r,!1):t=ye(t,Ye(r,e),!1)}catch{return null}let s={};e?s.inputs=[r,e]:s.inputs=[r];let n;for(n of Xe){let o=this.#e[n].exec(t[n]);if(!o)return null;let a={};for(let[i,f]of this.#r[n].entries())if(typeof f=="string"||typeof f=="number"){let u=o[i+1];a[f]=u}s[n]={input:t[n]??"",groups:a}}return s}static compareComponent(r,e,t){let s=g((i,f)=>{for(let u of["type","modifier","prefix","value","suffix"]){if(i[u]<f[u])return-1;if(i[u]!==f[u])return 1}return 0},"comparePart"),n=new we(3,"","","","",3),o=new we(0,"","","","",3),a=g((i,f)=>{let u=0;for(;u<Math.min(i.length,f.length);++u){let c=s(i[u],f[u]);if(c)return c}return i.length===f.length?0:s(i[u]??n,f[u]??n)},"comparePartList");return!e.#t[r]&&!t.#t[r]?0:e.#t[r]&&!t.#t[r]?a(e.#n[r],[o]):!e.#t[r]&&t.#t[r]?a([o],t.#n[r]):a(e.#n[r],t.#n[r])}get protocol(){return this.#t.protocol}get username(){return this.#t.username}get password(){return this.#t.password}get hostname(){return this.#t.hostname}get port(){return this.#t.port}get pathname(){return this.#t.pathname}get search(){return this.#t.search}get hash(){return this.#t.hash}get hasRegExpGroups(){return this.#u}};g(ct,"URLPattern");globalThis.URLPattern||(globalThis.URLPattern=ct);var lt=class extends URLPattern{#s;constructor(e,t=null){typeof e=="object"&&e?.baseURL&&({baseURL:t,...e}=e),super(e,t),this.#s=new URL(e,t)}isPattern(){let e=(n,o)=>{if(!n)return!1;let a=!1;for(let i of n){if(a){a=!1;continue}if(i==="\\"){a=!0;continue}if(o.has(i))return!0}return!1},t={protocol:new Set(["*"]),username:new Set(["*"]),password:new Set(["*"]),hostname:new Set(["*","{"]),port:new Set(["*","{"]),pathname:new Set(["*",":","{","("]),search:new Set(["*","{"]),hash:new Set(["*","{"])},s=this.#s;return e(s.protocol,t.protocol)||e(s.username,t.username)||e(s.password,t.password)||e(s.hostname,t.hostname)||e(s.port,t.port)||e(s.pathname,t.pathname)||e(s.search,t.search)||e(s.hash,t.hash)}exec(...e){let t=super.exec(...e);if(!t)return;let s={};for(let a of Object.values(t))a?.groups&&Object.assign(s,a.groups);let n={named:s};return{...t,vars:n,render:a=>a.replace(/\$(\$|[A-Z0-9_]+)/gi,(i,f)=>f==="$"?"$":n.named[f]??"")}}};var Ot={};Be(Ot,{any:()=>Wr,apply:()=>xt,batch:()=>St,construct:()=>wt,defineProperties:()=>Kr,defineProperty:()=>Se,deleteProperties:()=>Xr,deleteProperty:()=>Oe,get:()=>Q,getOwnPropertyDescriptor:()=>De,getOwnPropertyDescriptors:()=>Gr,getPrototypeOf:()=>gt,has:()=>ke,intercept:()=>Vr,isExtensible:()=>yt,map:()=>Jr,observe:()=>Et,ownKeys:()=>bt,path:()=>Hr,preventExtensions:()=>vt,reduce:()=>Pt,set:()=>ie,setPrototypeOf:()=>_t,subtree:()=>Br});function z(r,e=!0){return R(r)?r:!e&&v(r)?[r]:r!==!1&&r!==0&&Ve(r)?[]:Ke(r)?Array.prototype.slice.call(r):v(r)?Object.values(r):[r]}var O=(r,...e)=>D(r,"observerAPI",...e),xe=(r,e)=>r instanceof Promise?r.then(e):e(r),Le={};var se=class{constructor(e,t){this.registry=e,Object.assign(this,{...t,target:e.target}),this.params.signal&&this.params.signal.addEventListener("abort",()=>this.remove())}remove(){return this.removed=!0,this.registry.removeRegistration(this)}};var ve=class extends se{constructor(){super(...arguments),this.emit.currentRegistration=this,Object.defineProperty(this,"abortController",{value:new AbortController}),Object.defineProperty(this,"signal",{value:this.abortController.signal}),Le.setMaxListeners?.(0,this.signal)}remove(){this.abortController.abort(),super.remove()}fire(e){if(this.emit.recursionTarget&&!["inject","force-async","force-sync"].includes(this.params.recursions))return;let t=e,s=this.filter;if(s!==1/0&&(s=z(s,!1))&&(t=e.filter(o=>s.includes(o.key))),this.params.diff&&(t=t.filter(o=>o.type!=="set"||o.value!==o.oldValue)),!t.length)return;if(["inject","defer"].includes(this.params.recursions)){if(this.emit.recursionTarget){this.emit.recursionTarget.push(...t);return}this.emit.recursionTarget=this.params.recursions==="inject"?t:[]}let n=this.filter===1/0||Array.isArray(this.filter)?this.emit(t,this):this.emit(t[0],this);return xe(n,o=>{let a=this.emit.recursionTarget;return delete this.emit.recursionTarget,this.params.recursions==="defer"&&a?.length?this.emit.currentRegistration.fire(a):o})}};var ne=class{constructor(e){this.target=e,this.entries=[]}addRegistration(e){return this.entries.push(e),e}removeRegistration(e){this.entries=this.entries.filter(t=>t!==e)}static _getInstance(e,t,s=!0,n=this.__namespace){if(!x(t))throw new Error(`Subject must be of type object; "${pe(t)}" given!`);let o=this;return n&&O(globalThis,"observerAPI","namespaces").has(e+"-"+n)&&(o=O(globalThis,"observerAPI","namespaces").get(e+"-"+n),e+="-"+n),!O(t,"registry").has(e)&&s&&O(t,"registry").set(e,new o(t)),O(t,"registry").get(e)}static _namespace(e,t,s=null){if(e+="-"+t,arguments.length===2)return O(globalThis,"observerAPI","namespaces").get(e);if(!(s.prototype instanceof this))throw new Error(`The implementation of the namespace ${this.name}.${t} must be a subclass of ${this.name}.`);O(globalThis,"observerAPI","namespaces").set(e,s),s.__namespace=t}};var A=class{constructor(e,t){if(this.target=e,!t.operation)throw new Error("Descriptor operation must be given in definition!");Object.assign(this,t)}get[Symbol.toStringTag](){return"Descriptor"}static[Symbol.hasInstance](e){return e?.[Symbol.toStringTag]==="Descriptor"&&e.operation}};var I=class extends ne{static getInstance(e,t=!0,s=null){return super._getInstance("listeners",...arguments)}static namespace(e,t=null){return super._namespace("listeners",...arguments)}constructor(e){super(e),this.batches=[]}addRegistration(e,t,s){return super.addRegistration(new ve(this,{filter:e,emit:t,params:s}))}emit(e,{eventsArePropertyDescriptors:t=!1,eventIsArrayMethodDescriptor:s=!1}={}){if(this.batches.length){let n=this.batches[0].params.arrayMethodName;this.batches[0].snapshots.push({events:[...e],arrayMethodName:n,eventsArePropertyDescriptors:t,eventIsArrayMethodDescriptor:s});return}this.$emit(this.entries,[{events:e,eventsArePropertyDescriptors:t,eventIsArrayMethodDescriptor:s}])}$emit(e,t){let s=0,n=0,o=0;for(let c of e)s+=1,c.params.withPropertyDescriptors&&(n+=1),c.params.withArrayMethodDescriptors&&(o+=1);let a=[],i=[],f=[],u=[];for(let c of t){let l=c.arrayMethodName,p=c.eventsArePropertyDescriptors,h=c.eventIsArrayMethodDescriptor;for(let m of c.events)if(l&&(m.operation=l),n&&(o&&a.push(m),h||o!==s&&i.push(m)),n!==s){let y=m;if(p){let{target:b,type:_,...w}=m;y=new A(b,{type:"set",...w}),Object.defineProperty(y,"value","get"in w.value?{get:()=>w.value.get()}:{value:w.value.value}),w.oldValue&&Object.defineProperty(y,"oldValue","get"in w.oldValue?{get:()=>w.oldValue.get()}:{value:w.oldValue.value})}o&&f.push(y),h||o!==s&&u.push(y)}}for(let c of e)c.params.withPropertyDescriptors?c.params.withArrayMethodDescriptors?a.length&&c.fire(a):i.length&&c.fire(i):c.params.withArrayMethodDescriptors?f.length&&c.fire(f):u.length&&c.fire(u)}batch(e,t={}){this.batches.unshift({entries:[...this.entries],snapshots:[],params:t});let s=e();return xe(s,n=>{let o=this.batches.shift();return o.snapshots.length&&this.$emit(o.entries,o.snapshots),n})}};var Pe=class extends se{exec(e,t,s){return this.running||!this.traps[e.operation]?t(...Array.prototype.slice.call(arguments,2)):(this.running=!0,this.traps[e.operation](e,s,(...n)=>(this.running=!1,t(...n))))}};var X=class extends ne{static getInstance(e,t=!0,s=null){return super._getInstance("traps",...arguments)}static namespace(e,t=null){return super._namespace("traps",...arguments)}addRegistration(e){return super.addRegistration(new Pe(this,e))}emit(e,t=null){let s=this;return function n(o,...a){let i=s.entries[o];return i?i.exec(e,(...f)=>n(o+1,...f),...a):t?t(e,...a):a[0]}(0)}};var dt={};Be(dt,{accessorize:()=>Fr,proxy:()=>pt,unaccessorize:()=>zr,unproxy:()=>Ee});var nr=Symbol("wqOriginal");function Fr(r,e,t={}){r=mt(r);let s=O(r,"accessorizedProps");function n(f){let u,c=r;do u=Object.getOwnPropertyDescriptor(c,f);while(!u&&(c=Object.getPrototypeOf(c)));return u?{proto:c,descriptor:u}:{descriptor:{value:void 0,configurable:!0,enumerable:!0,writable:!0}}}function o(f){if(s.has(f+""))return!0;let u=n(f);u.getValue=function(p=!1){return p?this.descriptor:this.descriptor.get?this.descriptor.get():this.descriptor.value},u.setValue=function(p,h=!1){if(this.dirty=!0,h){this.descriptor=p;return}return this.descriptor.set?this.descriptor.set(p)!==!1:(this.descriptor.value=p,!0)},u.intact=function(){let p=Object.getOwnPropertyDescriptor(r,f);return p?.get===l.get&&p?.set===l.set&&s.get(f+"")===this},u.restore=function(){return this.intact()?(this.proto&&this.proto!==r||!this.proto&&!this.dirty?delete r[f]:Object.defineProperty(r,f,this.descriptor),s.delete(f+""),!0):!1},s.set(isNaN(f)?f:parseInt(f),u);let{enumerable:c=!0}=u.descriptor,l={enumerable:c,configurable:!0};("value"in u.descriptor||u.descriptor.set)&&(l.set=function(p){return ie(this,f,p,t)}),("value"in u.descriptor||u.descriptor.get)&&(l.get=function(){return Q(this,f,t)});try{return Object.defineProperty(r,f,l),!0}catch{return s.delete(f+""),!1}}let i=(Array.isArray(e)?e:e===void 0?Object.keys(r):[e]).map(o);return e===void 0||Array.isArray(e)?i:i[0]}function zr(r,e,t={}){r=mt(r);let s=O(r,"accessorizedProps");function n(i){return s.has(i+"")?s.get(i+"").restore():!0}let a=(Array.isArray(e)?e:e===void 0?Object.keys(r):[e]).map(n);return e===void 0||Array.isArray(e)?a:a[0]}function pt(r,e={},t=void 0){let s=mt(r);if(typeof e.membrane=="boolean")throw new Error("The params.membrane parameter cannot be of type boolean.");if(e.membrane&&O(s,"membraneRef").has(e.membrane))return O(s,"membraneRef").get(e.membrane);let n={apply:(i,f,u)=>xt(i,f,u,void 0,e),construct:(i,f,u=null)=>wt(i,f,u,e),defineProperty:(i,f,u)=>Se(i,f,u,e),deleteProperty:(i,f)=>Oe(i,f,e),get:(i,f,u=null)=>{if(f===nr)return s;let c={...e,receiver:u},l=Q(i,f,c);return Array.isArray(i)&&typeof l=="function"&&!/^class\s?/.test(Function.prototype.toString.call(l))?pt(l,{...e,arrayMethodName:f,membrane:u},t):e.chainable&&x(l)&&f!=="prototype"&&!(typeof l=="function"&&/^class\s?|\{\s\[native\scode\]\s\}$/.test(Function.prototype.toString.call(l)))?pt(l,e,t):l},getOwnPropertyDescriptor:(i,f)=>De(i,f,e),getPrototypeOf:i=>gt(i,e),has:(i,f)=>ke(i,f,e),isExtensible:i=>yt(i,e),ownKeys:i=>bt(i,e),preventExtensions:i=>vt(i,e),set:(i,f,u,c=null)=>ie(i,f,u,{...e,receiver:c}),setPrototypeOf:(i,f)=>_t(i,f,e)},o=t?.(n)||n,a=new Proxy(s,o);return e.membrane&&O(s,"membraneRef").set(e.membrane,a),a}function Ee(r){return r&&r[nr]||r}function mt(r){if(!r||!x(r))throw new Error("Target must be of type object!");return Ee(r)}var Ae=class extends Array{get[Symbol.toStringTag](){return"Path"}static[Symbol.hasInstance](e){return Array.isArray(e)&&e[Symbol.toStringTag]==="Path"}};function Hr(...r){return new Ae(...r)}var oe=class extends Array{get[Symbol.toStringTag](){return"Subtree"}static[Symbol.hasInstance](e){return Array.isArray(e)&&e[Symbol.toStringTag]==="Subtree"}};function Br(){return new oe}function Wr(){return 1/0}function Pt(r,e,t,s=o=>o,n={}){let o=e instanceof oe;if(!(!o&&!e?.length))return function a(i,f,u,c){let l=c||f[u.level]instanceof oe,p=l?1/0:f[u.level],h=l?!1:u.level===f.length-1;return i instanceof A&&i.operation!=="get"?u={...u,probe:"always"}:u.probe!=="always"&&(u={...u,probe:!h}),t(i,p,(m,...y)=>{let b=d=>{d instanceof A&&(d.path="key"in d?[d.key]:[],i instanceof A&&(d.path="key"in d?i.path.concat(d.key):i.path.slice(0),Object.defineProperty(d,"context",{get:()=>i,configurable:!0})))},_=y[0]||{},w=d=>{if(d instanceof A&&"argumentsList"in d)return;let P=H(d,!1);return xe(P,E=>(d instanceof A?d.value=E:d=E,a(d,f,{...u,..._,keyInParent:d.key,level:u.level+1},l)))};if(Ce(p)&&Array.isArray(m)){if(m.forEach(b),h)return s(m,...y);l&&m[0]instanceof A&&(m[0].operation!=="get"||n.asGet)&&s(m,...y);for(let d of m)w(d);return}return b(m),h?s(m,...y):w(m)},u)}(r,e.slice(0),{...n,level:0},o)}function Et(r,e,t,s={}){let n=H(r,!s.level);if(G(arguments[1])&&([,t,s={}]=arguments,e=1/0),!G(t))throw new Error(`Handler must be a function; "${pe(t)}" given!`);if(e instanceof Ae||e instanceof oe)return Pt(n,e,Et,t,s);if(s={...s,descripted:!0},delete s.live,!x(n))return s.probe&&Q(n,e,t,s)||void 0;let o=ir(n,e,t,s);return s.probe?Q(n,e,o,s):o()}function Vr(r,e,t={}){let s=H(r);return v(e)||([,,,t={}]=arguments,e={[arguments[1]]:arguments[2]}),X.getInstance(s,!0,t.namespace).addRegistration({traps:e,params:t})}function De(r,e,t=n=>n,s={}){return k(r,"getOwnPropertyDescriptor",{key:e},t,s)}function Gr(r,e,t=n=>n,s={}){return k(r,"getOwnPropertyDescriptors",{key:e},t,s)}function gt(r,e=s=>s,t={}){return k(r,"getPrototypeOf",{},e,t)}function yt(r,e=s=>s,t={}){return k(r,"isExtensible",{},e,t)}function bt(r,e=s=>s,t={}){return k(r,"ownKeys",{},e,t)}function ke(r,e,t=n=>n,s={}){return k(r,"has",{key:e},t,s)}function Q(r,e,t=n=>n,s={}){let n,o=H(r,!s.level);return v(t)?[s,t]=[t,a=>a]:s.live&&(n=!0),e instanceof Ae||e instanceof oe?Pt(o,e,Q,t,{...s,asGet:!0}):Qr(o,e,a=>{let i=[...a];return function f(u,c,l){if(!c.length)return l(u);let p=c.shift();if(!["string","number","symbol"].includes(typeof p))throw new Error(`Property name/key ${p} invalid.`);function h(b,_=void 0){let w=E=>(b.value=E,f([...u,s.live||s.descripted?b:E],c,l));if(arguments.length>1)return w(_);if(!x(o))return w(o?.[b.key]);let d=O(o,"accessorizedProps",!1),P=d&&d.get(b.key);if(P&&P.intact())return w(P.getValue(s.withPropertyDescriptors));if(s.withPropertyDescriptors){let E=Object.getOwnPropertyDescriptor(o,b.key);return w(E)}return w(Reflect.get(o,b.key))}let m=new A(o,{type:"get",key:p,value:void 0,operation:"get",related:i});if(!x(o))return h(m);let y=X.getInstance(o,!1,s.namespace);return y?y.emit(m,h):h(m)}([],a.slice(0),f=>{let u=Ce(e)?f:f[0];return n&&x(o)?ir(o,e,t,s,r.key)(u):t(u)})},s)}function St(r,e,t={}){let s=H(r);return I.getInstance(s,!0,t.namespace).batch(e,t)}function Jr(r,e,t={}){e=H(e),r=H(r);let s=(t.only||[]).slice(0),n=(t.except||[]).slice(0),o=Object.keys(t.spread?[...r]:r).map(u=>isNaN(u)?u:parseInt(u)),a=s.length?s.filter(u=>o.includes(u)):o.filter(u=>!n.includes(u)),i=u=>!Array.isArray(e)||isNaN(u)?u:u-n.filter(c=>c<u).length,f=u=>{let c=De(r,u,t);"value"in c&&c.writable&&c.enumerable&&c.configurable?ie(e,i(u),c.value,t):(c.enumerable||t.onlyEnumerable===!1)&&Se(e,u,{...c,configurable:!0},t)};return St(e,()=>{a.forEach(f)}),Et(r,u=>{u.filter(c=>s.length?s.includes(c.key):!n.includes(c.key)).forEach(c=>{if(c.type==="delete")return Oe(e,i(c.key),t);if(c.type==="def"){(c.value.enumerable||t.onlyEnumerable===!1)&&Se(e,i(c.key),{...c.value,configurable:!0},t);return}f(c.key)})},{...t,withPropertyDescriptors:!0})}function ie(r,e,t,s=a=>a,n={},o=!1){let a=H(r),i=[[e,t]];v(e)&&([,,s=u=>u,n={},o=!1]=arguments,i=Object.entries(e)),v(s)&&([o,n,s]=[typeof n=="boolean"?n:o,s,u=>u]);let f=i.map(([u])=>u);return function u(c,l,p){if(!l.length)return p(c);let[h,m]=l.shift();function y(_,w=void 0){let d=U=>(_.status=U,u(c.concat(_),l,p));if(arguments.length>1)return d(_,w);let P=O(a,"accessorizedProps",!1),E=P&&P.get(_.key);return _.type==="def"?(E&&!E.restore()&&d(!1),Object.defineProperty(a,_.key,_.value),d(!0)):E&&E.intact()?d(E.setValue(_.value)):d(Reflect.set(a,_.key,_.value))}function b(_,w){if(n.diff&&m===w)return u(c,l,p);let d=new A(a,{type:o?"def":"set",key:h,value:m,isUpdate:_,oldValue:w,related:[...f],operation:o?"defineProperty":"set",detail:n.detail}),P=X.getInstance(a,!1,n.namespace);return P?P.emit(d,y):y(d)}return ke(a,h,_=>{if(!_)return b(_);if(h==="length"&&Array.isArray(a)&&O(a).has("$length"))return b(!0,O(a).get("$length"));let w={...n,withPropertyDescriptors:o};return Q(a,h,d=>b(_,d),w)},n)}([],i.slice(0),u=>{let c=I.getInstance(a,!1,n.namespace);return c&&c.emit(u,{eventsArePropertyDescriptors:!!o}),s(Ce(e)?u.map(l=>l.status):u[0]?.status)})}function Se(r,e,t,s=o=>o,n={}){return ie(r,e,t,s,n,!0)}function Kr(r,e,t=n=>n,s={}){return ie(r,e,t,s,!0)}function Oe(r,e,t=n=>n,s={}){let n=H(r);v(t)&&([s,t]=[t,i=>i]);let o=z(e,!1),a=[...o];return function i(f,u,c){if(!u.length)return c(f);let l=u.shift();function p(m,y=void 0){let b=d=>(m.status=d,i(f.concat(m),u,c));if(arguments.length>1)return b(m,y);let _=O(n,"accessorizedProps",!1),w=_&&_.get(m.key);return w&&!w.restore()&&b(!1),b(Reflect.deleteProperty(n,m.key))}function h(m){let y=new A(n,{type:"delete",key:l,oldValue:m,related:[...a],operation:"deleteProperty",detail:s.detail}),b=X.getInstance(n,!1,s.namespace);return b?b.emit(y,p):p(y)}return Q(n,l,h,s)}([],o.slice(0),i=>{let f=I.getInstance(n,!1,s.namespace);return f&&f.emit(i),t(Ce(e)?i.map(u=>u.status):i[0].status)})}function Xr(r,e,t=n=>n,s={}){return Oe(...arguments)}function wt(r,e,t=null,s=o=>o,n={}){return k(r,"construct",arguments.length>2?{argumentsList:e,newTarget:t}:{argumentsList:e},s,n)}function xt(r,e,t,s=o=>o,n={}){let o=Ee(e),a;if(Array.isArray(e)){if(n.arrayMethodName){let i=new A(o,{operation:n.arrayMethodName,argumentsList:t});I.getInstance(o,!1,n.namespace)?.emit([i],{eventIsArrayMethodDescriptor:!0})}O(o).set("$length",o.length),a=St(o,()=>k(r,"apply",{thisArgument:e,argumentsList:t},s,n),n),O(o).delete("$length")}else a=k(r,"apply",{thisArgument:o,argumentsList:t},s,n);return a}function _t(r,e,t=n=>n,s={}){return k(r,"setPrototypeOf",{proto:e},t,s)}function vt(r,e=s=>s,t={}){return k(r,"preventExtensions",{},e,t)}function ir(r,e,t,s={}){let n=new AbortController;Le.setMaxListeners?.(0,n.signal),s.signal&&s.signal.addEventListener("abort",()=>n.abort());let o={...s,signal:n.signal},a=I.getInstance(r,!0,o.namespace),i=new Map;return function f(u=[],c=null){let l,p,h;if(Ce(e)){if(c){h=!0,p=c;for(let m of u)i.get(m.key)?.remove(),i.delete(m.key)}else p=a.addRegistration(e,f,o);l={signal:p.signal,childRegistrations:i}}else c?.remove(),p=a.addRegistration(e,f,o),l={signal:p.signal};if(o.childRegistrations&&o.keyInParent&&o.childRegistrations.set(o.keyInParent,p),arguments.length){let m=t(u,l);if(arguments.length>1)return m}return n}}function k(r,e,t={},s=o=>o,n={}){r=H(r),v(s)&&([n,s]=[s,f=>f]);function o(f,u){return arguments.length>1?s(u):s((Reflect[e]||Object[e])(r,...Object.values(t)))}let a=new A(r,{operation:e,...t}),i=X.getInstance(r,!1,n.namespace);return i?i.emit(a,o):o(a)}function Ce(r){return r===1/0||Array.isArray(r)}function H(r,e=!0,t=!0){if((!r||!x(r))&&e)throw new Error(`Object must be of type object or array! "${pe(r)}" given.`);return r instanceof A&&(r.type==="def"&&t?r=typeof r.value.get=="function"?r.value.get():r.value.value:r=r.value),r&&Ee(r)}function Qr(r,e,t,s={}){return e===1/0?s.level&&!x(r)?t([]):t(Object.entries(Object.getOwnPropertyDescriptors(r)).filter(([,n])=>n.writable!==!1&&!n.get&&!n.set).map(([n])=>n)):t(z(e,!1))}var S={...Ot,...dt},or=S;var ae=class r extends URLSearchParams{#s={};#e;get compatMode(){return this.#e}#r=new Set;#t;#n=!1;constructor(e={},{compatMode:t=!0,prettyPrint:s=!1}={}){super(),this.#e=t,this.#t=s;let n;if(e instanceof r)n=structuredClone(e.json()),t&&(this.#r=new Set(e.keys()));else if(e instanceof URLSearchParams||e instanceof FormData)n=Object.fromEntries(e),t&&(this.#r=new Set(e.keys()));else if(K(e)){let o;[n,o]=this.constructor.parse(e,!t,!0),t&&(this.#r=o)}else Array.isArray(e)?(n=this.constructor.fromEntries(e),t&&(this.#r=new Set(e.map(([o])=>o)))):v(e)?(n=e,t&&this.constructor.reduceValue(e,"",(o,a,i)=>{if(i)return i;/\[\d+\]$/.test(a)&&([,a]=/^(.*)\[\d+\]$/.exec(a)),this.#r.add(a)})):n={};this._resetJson(n)}_resetJson(e,t={}){if(!v(e))throw new Error("Argument must be a JSON object");let s=Object.keys(this.#s).filter(n=>!(n in e));return S.batch(this.#s,()=>(s.length&&S.deleteProperties(this.#s,s,t),S.set(this.#s,e,t)),t)}get(e){let t=this.#u(e);return this.#e&&Array.isArray(t)?t[0]:t}#u(e,t=!1){if(this.#e&&!this.#r.has(e))return null;let s=this.constructor.get(this.#s,e,t);return s===void 0?null:Array.isArray(s)?this.#e?s.map(n=>typeof n=="number"?n+"":n):s.map(n=>v(n)?new r(n,{compatMode:this.#e}):n):!this.#e&&v(s)?new r(s,{compatMode:this.#e}):this.#e&&typeof s=="number"?s+"":s}getAll(e){let t=this.#u(e,!0);return t===null?[]:Array.isArray(t)?t:[t]}set(e,t){return this.#e&&this.#r.add(e),this.constructor.set(this.#s,e,t),this}append(e,t){return this.#e&&this.#r.add(e),this.constructor.set(this.#s,e,t,!0),this}has(e){return this.#e&&!this.#r.has(e)?!1:this.constructor.get(this.#s,e)!==void 0}delete(e){if(this.#e&&!this.#r.has(e))return;let t=this.constructor.parsePath(e),s=t.pop(),n=t.length?this.constructor.get(this.#s,t):this.#s;v(n)&&S.deleteProperty(n,s)}sort(){return this.#n=!0,this}json(){return this.#s}stringify({prettyPrint:e=this.#t,sort:t=this.#n}={}){return this.constructor.stringify(this.#s,{only:this.#e&&this.#r,sort:t,prettyPrint:e})}toString(){return this.stringify()}entries(){let e=[];return this.constructor.reduceValue(this.#s,"",(t,s,n)=>{if(n)return n;if(this.#e&&!this.#r.has(s))if(/\[\d+\]$/.test(s)){if([,s]=/^(.*)\[\d+\]$/.exec(s),!this.#r.has(s)&&!this.#r.has(s=`${s}[]`))return}else return;this.#e&&typeof t=="number"&&(t=t+""),e.push([s,t])}),e[Symbol.iterator]()}keys(){return Array.from(this.entries(),([e])=>e)[Symbol.iterator]()}values(){return Array.from(this.entries(),([,e])=>e)[Symbol.iterator]()}forEach(e,t){for(let[s,n]of this.entries())e.call(t,n,s,this)}[Symbol.iterator](){return this.entries()}get size(){let e=0;return this.forEach(()=>e++),e}static parse(e,t=!1,s=!1){let n={},o=new Set;for(let[a,i]of new URLSearchParams(e).entries())this.set(n,a,i,!0,t),s&&o.add(a);return s?[n,o]:n}static fromEntries(e){let t={};for(let[s,n]of e)this.set(t,s,n,!0);return t}static stringify(e,{sort:t=!1,only:s=null,prettyPrint:n=!1}={}){let o={},a=[],i=Object.keys(e);return t&&i.sort(),i.forEach(f=>{this.reduceValue(e[f],f,(u,c,l)=>{if(l)return t?[...l].sort():l;if(s&&!s.has(c))if(/\[\d+\]$/.test(c)){if([,c]=/^(.*)\[\d+\]$/.exec(c),!s.has(c)&&!s.has(c=`${c}[]`))return}else return;n?a.push(c+"="+new URLSearchParams({k:u||""}).toString().split("=")[1]):o[c]=u})}),n?a.join("&"):new URLSearchParams(o).toString()}static get(e,t,s=!1){return this.reducePath(t,e,(n,o,a)=>a||(n===""?s?o:o?.[0]:o?.[n]))}static set(e,t,s,n=!1,o=!1){this.reducePath(t,e,(a,i,f)=>{let u=f??s;return o&&/^-?\d+(\.\d+)?$/.test(u+"")&&(u=parseFloat(u)),a===""&&Array.isArray(i)?S.proxy(i).push(u):n&&i?.[a]?Array.isArray(i[a])?S.proxy(i[a]).push(u):S.set(i,a,[i[a],u]):S.set(i,a,u),u})}static reduceValue(e,t,s){if(x(e)){let n=Object.keys(e),o=s(e,t,n);if(Array.isArray(o)){o.forEach(a=>{this.reduceValue(e[a],t?`${t}[${a}]`:a,s)});return}}s(e,t)}static reducePath(e,t,s){let n=this.parsePath(e),o=t;for(let a=0;a<n.length;a++){let i=n[a];if(J(i)&&(i=+i),a===n.length-1)return s(i,o);if(!x(o))return;if(!x(o[i])){let f=n[a+1];o[i]=s(i,o,J(f)||f===""?[]:{})}o=o[i]}}static parsePath(e){if(Array.isArray(e))return e;if(!K(e))return[];let t=[];return e.replace(/\[([^\]]*)\]|([^[\]]+)/g,(s,n,o)=>{t.push(n??o)}),t}};var B=class r extends FormData{static upgradeInPlace(e){return e instanceof r?e:Object.setPrototypeOf(e,r.prototype)}static json(e={},{encodeLiterals:t=!0,meta:s=!1}={}){let n=new r,o=!0;return ae.reduceValue(e,"",(a,i,f=void 0)=>{if(f){let u=qe(a)==="json";return o=o&&u,u&&f}t&&[!0,!1,null].includes(a)&&(a=new Blob([a+""],{type:"application/json"})),n.append(i,a)}),s?{result:n,isDirectlySerializable:o}:n}async json({decodeLiterals:e=!0,meta:t=!1}={}){let s=!0,n;for(let[o,a]of this.entries()){n||(n=J(Re(o,"["))?[]:{});let i=qe(a);if(e&&["Blob","File"].includes(i)&&a.type==="application/json"&&[4,5].includes(a.size)){let f=JSON.parse(await a.text());[null,!0,!1].includes(f)&&(a=f,i="json")}s=s&&i==="json",/^[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?$/.test(a)&&(a=Number(a)),ae.set(n,o,a)}return t?{result:n,isDirectlySerializable:s}:n}};var ue=(r,...e)=>D(r,"fetch+",...e),C=(r,...e)=>D(r,"fetch+","meta",...e);function Ue(r){return class extends r{static from(e){let t=e.headers instanceof Headers?[...e.headers.entries()].reduce((o,[a,i])=>{let f=a.toLowerCase();return o[f]=o[f]?[].concat(o[f],i):i,o},{}):Object.keys(e.headers||{}).reduce((o,a)=>(o[a.toLowerCase()]=e.headers[a],o),{}),s=e.body,n=[null,void 0].includes(s)?null:qe(s);if(["Blob","File"].includes(n))t["content-type"]??=s.type,t["content-length"]??=s.size;else if(["Uint8Array","Uint16Array","Uint32Array","ArrayBuffer"].includes(n))t["content-length"]??=s.byteLength;else if(n==="json"&&x(s)){let{result:o,isDirectlySerializable:a}=B.json(s,{encodeLiterals:!0,meta:!0});a?(s=JSON.stringify(s,(i,f)=>f instanceof Error?{...f,message:f.message}:f),t["content-type"]="application/json",t["content-length"]=new Blob([s]).size):(s=o,n="FormData")}else["text","json"].includes(n)&&!t["content-length"]&&(t["content-length"]=new Blob([s]).size);return!["FormData",null].includes(n)&&!["function"].includes(typeof s)&&!t["content-type"]&&(t["content-type"]="application/octet-stream"),{body:s,headers:new Headers(t),$type:n}}async formData(){let e=await super.formData();return B.upgradeInPlace(e),e}async any({to:e=null,memo:t=!1}={}){if(e&&!["blob","text","json","arrayBuffer","bytes","formData"].includes(e))throw new Error(`Invalid target type specified: ${e}`);if(this.body===null)return null;let s=C(this,"cache"),n=async i=>{if(!t)return await this[i||"bytes"]();let f=c=>{if(c instanceof FormData){let l=new B;for(let[p,h]of c.entries())l.append(p,h);return l}return(!i||i==="json")&&(Je(c)||Ge(c))?structuredClone(c):c};if(!i&&s.has("original"))return f(s.has("original"));if(i??="bytes",s.has(i))return f(s.get(i));let u;return s.has("memo")?u=s.get("memo").clone()[i]():(s.set("memo",this.clone()),u=await this[i]()),s.set(i,u),f(u)},o=(this.headers.get("Content-Type")||"").split(";")[0].trim(),a;if((!e||["formData","json"].includes(e))&&["multipart/form-data","application/x-www-form-urlencoded"].includes(o)){let i=await n("formData");B.upgradeInPlace(i),e==="json"&&(i=await i.json({decodeLiterals:!0})),a=i}else if((!e||["formData","json"].includes(e))&&o==="application/json"){let i=await n("json");e==="formData"&&(i=B.json(i,{encodeLiterals:!0})),a=i}else if(!e&&(o.startsWith("image/")||o.startsWith("video/")||o.startsWith("audio/")||o.startsWith("application/")&&!["xml","json","javascript","x-www-form-urlencoded"].some(i=>o.includes(i))))a=await n("blob");else if(!e&&(o.startsWith("text/")||o.startsWith("application/")&&["xml","javascript"].some(i=>o.includes(i))))a=await n("text");else{if(["json","formData"].includes(e))throw new Error(`Cannot convert body of type ${o} to ${e}`);a=await n(e)}return a}forget(){C(this,"cache").clear()}}}function qe(r){if(r instanceof FormData)return"FormData";if(r===null||de(r)||$e(r))return"json";if(K(r))return"text";if(x(r)){let e=r[Symbol.toStringTag],t=["Uint8Array","Uint16Array","Uint32Array","ArrayBuffer","Blob","File","FormData","Stream","ReadableStream"].reduce((s,n)=>s||(e===n?n:null),null);if(t)return t;if(v(r)||Array.isArray(r))return"json";if("toString"in r)return"text"}return null}function Zr(r){return r!==null&&typeof r=="object"&&typeof r.read=="function"&&typeof r.pipe=="function"&&typeof r.on=="function"}function At(r){return r instanceof ReadableStream||Zr(r)}var W=class r extends Headers{static upgradeInPlace(e){return e instanceof r?e:Object.setPrototypeOf(e,r.prototype)}set(e,t){if(/^Set-Cookie$/i.test(e)){if(Array.isArray(t)){this.delete(e);for(let s of t)this.append(e,s);return}v(t)&&(t=Ct(t))}return/Cookie/i.test(e)&&(t=ar(t)),/^Content-Range$/i.test(e)&&(t=fr(t)),/^Range$/i.test(e)&&(t=ur(t)),/^Accept$/i.test(e)&&(t=cr(t)),super.set(e,t)}append(e,t){if(/^Set-Cookie$/i.test(e)){if(Array.isArray(t)){for(let s of t)this.append(e,s);return}v(t)&&(t=Ct(t))}return/Cookie/i.test(e)&&(t=ar(t)),/^Content-Range$/i.test(e)&&(t=fr(t)),/^Range$/i.test(e)&&(t=ur(t)),/^Accept$/i.test(e)&&(t=cr(t)),super.append(e,t)}get(e,t=!1){let s=super.get(e);if(/^Set-Cookie$/i.test(e)&&t&&(s=this.getSetCookie().map(n=>{let[o,...a]=n.split(";"),[i,f]=o.split("=").map(c=>c.trim()),u={name:i,value:f};return a.map(c=>c.trim().split("=")).forEach(c=>{u[c[0][0].toLowerCase()+c[0].substring(1).replace("-","")]=c.length===1?!0:c[1]}),u})),/^Cookie$/i.test(e)&&t&&(s=s?.split(";").map(n=>{let[o,a]=n.split("=").map(i=>i.trim());return{name:o,value:a}})||[]),/^Content-Range$/i.test(e)&&s&&t&&(s=ge(s,"bytes ").split("/")),/^Range$/i.test(e)&&t&&(s=s?ge(s,"bytes=").split(",").map(n=>{let o=n.trim().split("-").map(a=>a?parseInt(a,10):null);return o.resolveAgainst=a=>{let i=[...o];return i[1]===null?i[1]=a-1:i[1]=Math.min(i[1],a)-1,i[0]===null&&(i[0]=i[1]?a-i[1]-1:0),i},o.canResolveAgainst=(a,i)=>{let f=[typeof o[0]=="number"?o[0]:a,typeof o[1]=="number"?o[1]:i-1];return!(f[0]>f[1]||f[0]<a||f[1]>=i)},o.toString=()=>n,o}):[]),/^Accept$/i.test(e)&&s&&t){let n=a=>{let[i,f]=a.trim().split(";").map(u=>u.trim());return[i,parseFloat((f||"q=1").replace("q=",""))]},o=s;s=s.split(",").map(a=>n(a)).sort((a,i)=>a[1]>i[1]?-1:1)||[],s.match=a=>{if(!a)return 0;let i=u=>u.split("/").map(c=>c.trim()),f=i(a+"");return s.reduce((u,[c,l])=>{if(u)return u;let p=i(c);return[0,1].every(h=>f[h]===p[h]||f[h]==="*"||p[h]==="*")?l:0},0)},s.toString=()=>o}return s}};function Ct(r){let e=[`${r.name}=${r.value}`];for(let t in r){if(["name","value"].includes(t))continue;let s=t[0].toUpperCase()+t.substring(1);s==="MaxAge"&&(s="Max-Age"),r[t]!==!1&&e.push(r[t]===!0?s:`${s}=${r[t]}`)}return e.join("; ")}function ar(r){return x(r)&&(r=[].concat(r).map(Ct).join("; ")),r}function ur(r){let e=[];return z(r).forEach((t,s)=>{let n=Array.isArray(t)?t.map(o=>[null,void 0].includes(o)?"":o).join("-"):t+"";s===0&&!n.includes("bytes=")&&(n=`bytes=${n}`),e.push(n)}),e.join(", ")}function fr(r){if(Array.isArray(r)){if(r.length<2||!r[0].includes("-"))throw new Error("A Content-Range array must be in the format: [ 'start-end', 'total' ]");r=`bytes ${r.join("/")}`}return r}function cr(r){return Array.isArray(r)&&(r=r.map(e=>Array.isArray(e)?e.map((t,s)=>s===1&&(t=parseFloat(t),!0)?t===1?"":`;q=${t}`:t.trim()).join(""):e.trim()).join(",")),r}var V=class r extends Ue(Response){constructor(e,t={}){super(e,t),W.upgradeInPlace(this.headers)}static upgradeInPlace(e){return e instanceof r||(Object.setPrototypeOf(e,r.prototype),W.upgradeInPlace(e.headers)),e}static from(e,{memoize:t=!1,...s}={}){if(e instanceof Response)return e;let n;if(typeof e<"u"){let a;({body:e,headers:a,$type:n}=super.from({body:e,headers:s.headers})),s={...s,headers:a}}let o=new this(e,s);if(t){let a=C(o,"cache"),i={json:"json",FormData:"formData",text:"text",ArrayBuffer:"arrayBuffer",Blob:"blob",Bytes:"bytes"};a.set(i[n]||"original",e)}return o}get status(){return this.headers.has("X-Redirect-Code")?200:super.status}clone(){let e=super.clone();r.upgradeInPlace(e);let t=C(this);return ue(e).set("meta",new Map(t)),C(e).has("cache")&&C(e).set("cache",new Map(t.get("cache"))),e}};async function lr(r,e={}){let t=await fetch(r,e);return V.upgradeInPlace(t),t}var Ne=class r extends Ue(Request){constructor(e,t={}){super(e,t),W.upgradeInPlace(this.headers)}static upgradeInPlace(e){return e instanceof r||(Object.setPrototypeOf(e,r.prototype),W.upgradeInPlace(e.headers)),e}static from(e,{memoize:t=!1,...s}={}){if(e instanceof Request)return e;let n,o=s.body;if("body"in s){let{body:i,headers:f,$type:u}=super.from(s);s={...s,body:i,headers:f},n=u}let a=new this(e,s);if(t){let i=C(a,"cache"),f={json:"json",FormData:"formData",text:"text",ArrayBuffer:"arrayBuffer",Blob:"blob",Bytes:"bytes"};i.set(f[n]||"original",o)}return a}static async copy(e,t={}){let n=["method","headers","mode","credentials","cache","redirect","referrer","integrity"].reduce((o,a)=>({...o,[a]:a in t?t[a]:a==="headers"?new Headers(e[a]):e[a]}),{});return["GET","HEAD"].includes(n.method.toUpperCase())?n.body=null:"body"in t?(n.body=t.body,"headers"in t||(n.headers.delete("Content-Type"),n.headers.delete("Content-Length"))):n.body=await e.clone().arrayBuffer(),n.mode==="navigate"&&(n.mode="cors"),{url:t.url||e.url,...n}}clone(){let e=super.clone();r.upgradeInPlace(e);let t=C(this);return ue(e).set("meta",new Map(t)),C(e).has("cache")&&C(e).set("cache",new Map(t.get("cache"))),e}};var q=class extends MessageEvent{static setCurrentTarget(e,t){e.#s=t,e.#e||(e.#e=t)}#s;get currentTarget(){return this.#s}#e;get target(){return this.#e}#r;get eventID(){return this.#r}#t;get data(){return this.#t}#n;get live(){return this.#n}#u;get bubbles(){return this.#u}#o;get forwarded(){return this.#o}#f;get honourDoneMutationFlags(){return this.#f}#c=[];get ports(){return this.#c}constructor(e,{target:t=null,type:s="message",eventID:n,live:o=!1,honourDoneMutationFlags:a=!1,bubbles:i=!1,forwarded:f=!1,ports:u=[]}={}){if(s&&typeof s!="string")throw new TypeError("Where specified, wqEventOptions.type must be a string");if(super(s),this.#t=e,this.#e=t,this.#r=n,this.#n=o,this.#u=i,this.#o=f,this.#f=a,this.#c=u,this.#c.forEach(c=>T.upgradeInPlace(c)),x(this.#t)&&this.#n){if(typeof n!="string")throw new TypeError("eventID must be a non-empty string");Tt.call(t,this.#t,this.#r,{honourDoneMutationFlags:this.#f})}}#h=!1;get immediatePropagationStopped(){return this.#h}stopImmediatePropagation(){this.#h=!0,this.#i=!0,super.stopImmediatePropagation()}#i=!1;get propagationStopped(){return this.#i}stopPropagation(){this.#i=!0,super.stopPropagation()}#d=!1;get defaultPrevented(){return this.#d}preventDefault(){this.#d=!0,super.preventDefault()}respondWith(e,t=[]){for(let s of this.#c)s.postMessage(e,t);return!!this.#c.length}};var fe=class extends Fe(EventTarget){#s;#e;constructor(e,{handshake:t=0,postAwaitsOpen:s=!1}={}){if(super(),typeof t!="number")throw new Error("handshake must be a number");if(t<0||t>2)throw new Error("handshake must be between 0 and 2");if(M(this).set("options",{handshake:t,postAwaitsOpen:s}),this.#s=typeof e=="string"?new WebSocket(e):e,this.constructor.upgradeEvents(this.#s,this),this.#e=new Promise(o=>{this.#s.readyState===WebSocket.OPEN?o():this.#s.addEventListener("open",()=>o(),{once:!0})}),t===0&&this.#e.then(()=>this.start()),this.#s.readyState===WebSocket.CLOSED)try{this.close()}catch{}else this.#s.addEventListener("close",()=>{try{this.close()}catch{}},{once:!0})}static _hydrateMessage(e,t){try{let s;if(typeof t.data=="string"&&v(s=JSON.parse(t.data))&&s[".wq"])return Object.defineProperty(t,"data",{value:s,configurable:!0}),super._hydrateMessage(e,t)}catch{}return t}__postMessage(e,t){this.#e.then(()=>{this.#s.send(JSON.stringify(e),t)})}_close(){this.#s.close()}};var hr=(r,...e)=>D(r,"port+",...e),M=(r,...e)=>D(r,"port+","meta",...e),ce=r=>D(r,"port+","meta").get("options")||{},pr=["addEventListener","addRequestListener","postMessage","postRequest","dispatchEvent","relay","start","readyStateChange","removeEventListener","close"],mr=["options","readyState","onmessage","onmessageerror"],T=class extends dr(EventTarget){constructor({handshake:e=0,postAwaitsOpen:t=!1,...s}={}){if(typeof e!="number")throw new Error("handshake must be a number");if(e<0||e>2)throw new Error("handshake must be between 0 and 2");super(),hr(this,"meta").set("options",{handshake:e,postAwaitsOpen:t,...s})}static[Symbol.hasInstance](e){return Function.prototype[Symbol.hasInstance].call(this,e)?!0:pr.every(t=>typeof e[t]=="function")||mr.every(t=>t in e)}};function dr(r){return class extends r{static upgradeInPlace(e,{handshake:t=0,postAwaitsOpen:s=!1}={}){if(e instanceof T)return e;if(typeof t!="number")throw new Error("handshake must be a number");if(t<0||t>2)throw new Error("handshake must be between 0 and 2");let n=this.prototype;for(let a of pr.concat("_autoStart")){let i=e[a],f=n[a];i&&Object.defineProperty(e,`_${a}`,{value:i.bind(e),configurable:!0}),Object.defineProperty(e,a,{value:f.bind(e),configurable:!0})}for(let a of mr){let i=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),a),f=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(n),a);i&&Object.defineProperty(e,`_${a}`,{...i,configurable:!0}),Object.defineProperty(e,a,{...f,configurable:!0})}return hr(e,"meta").set("options",{handshake:t,postAwaitsOpen:s}),this.upgradeEvents(e),t===0&&e.start(),e}static upgradeEvents(e,t=null){t||(t=e);let s=M(e);if(s.get("events+"))return;let n=M(t),o=ce(t),a=he.call(t),i=le.call(t);e instanceof BroadcastChannel&&(o.clientServerMode==="server"?n.set("clients",new Set):o.clientServerMode==="client"&&n.set("client_id",`client-${(0|Math.random()*9e6).toString(36)}`));let f=c=>{if(c instanceof q)return;if(e===t&&c.stopImmediatePropagation?.(),c=this._hydrateMessage?.(t,c)||c,c.data.ping==="connect"&&typeof c.data?.[".wq"]?.eventID=="string"&&(!(e instanceof WebSocket)||o.handshake)){let m=o.handshake===0||n.get("start.called"),y={isOpen:m};e instanceof BroadcastChannel&&(o.clientServerMode==="server"&&typeof c.data.id=="string"?(n.get("clients").add(c.data.id),y.id="server"):c.data.id==="server"&&n.has("client_id")&&(y.id=n.get("client_id"))),c.ports?.forEach(b=>b.postMessage(y)),m&&(n.set("remote.open.called",!0),t.start());return}if(c.data.ping==="disconnect"&&typeof c.data?.[".wq"]?.eventID=="string"){let m=()=>{n.set("remote.close.called",!0),t.close()};e instanceof BroadcastChannel?o.clientServerMode==="server"&&typeof c.data.id=="string"?(n.get("clients").delete(c.data.id),!n.get("clients").size&&o.autoClose&&!i.close.state&&m()):o.clientServerMode==="client"&&c.data.id==="server"&&m():e instanceof MessagePort&&m();return}let l=c.data,p={};typeof c.data?.[".wq"]?.eventID=="string"&&({message:l,".wq":p}=c.data);let h=new q(l,{target:t,...p,ports:c.ports});t.dispatchEvent(h)},u=c=>{};s.set("internal_call",!0),e.addEventListener("message",f),e.addEventListener("error",u),s.delete("internal_call"),a.add(()=>{e.removeEventListener("message",f),e.removeEventListener("error",u),s.set("events+",!1)}),s.set("events+",!0)}get options(){return{...ce(this)}}get onmessageerror(){return typeof super.onmessageerror<"u"?super.onmessageerror:typeof this._onmessageerror<"u"?this._onmessageerror:null}set onmessageerror(e){if(typeof super.onmessageerror<"u"){super.onmessageerror=e;return}if(e!==null&&typeof e!="function")throw new TypeError("onmessageerror must be a function");if(Object.getOwnPropertyDescriptor(this,"_onmessageerror")?.set){this._onmessageerror=e;return}this._onmessageerror&&this.removeEventListener("messageerror",this._onmessageerror),this.addEventListener("messageerror",e),this._onmessageerror=e}get onmessage(){return typeof super.onmessage<"u"?super.onmessage:typeof this._onmessage<"u"?this._onmessage:null}set onmessage(e){if(typeof super.onmessage<"u"){super.onmessage=e,this._autoStart();return}if(e!==null&&typeof e!="function")throw new TypeError("onmessage must be a function");if(Object.getOwnPropertyDescriptor(this,"_onmessage")?.set){this._onmessage=e,this._autoStart();return}this._onmessage&&this.removeEventListener("message",this._onmessage),this.addEventListener("message",e),this._onmessage=e,this._autoStart()}addEventListener(...e){he.call(this).add(()=>{this._removeEventListener?this._removeEventListener(...e):super.removeEventListener(...e)});let s=this._addEventListener?this._addEventListener(...e):super.addEventListener(...e);return this._autoStart(),s}dispatchEvent(e){e instanceof q&&q.setCurrentTarget(e,this);let t=this._dispatchEvent?this._dispatchEvent(e):super.dispatchEvent(e);return e instanceof q&&Yr.call(this,e),t}postMessage(e,t={}){this._autoStart();let s;t?.portPlusIgnore&&({portPlusIgnore:s,...t}=t);let n=le.call(this);n.messaging.state=!0,n.messaging.resolve(this);let o;if(!s){let{portOptions:f,wqOptions:{relayedFrom:u,...c}}=ze.call(this,e,t);(c.type!=="message"||c.live||c.bubbles||f.transfer?.length&&(this instanceof BroadcastChannel||this instanceof fe))&&(e={message:e,".wq":c}),t=f,o=u}let a=()=>{this._postMessage?this._postMessage(e,t,o):super.postMessage(e,t)};ce(this).postAwaitsOpen?n.open.promise.then(a):a()}addRequestListener(e,t,s={}){let n=async o=>{let a=await t(o);for(let i of o.ports)i.postMessage(a)};this.addEventListener(e,n,s)}postRequest(e,t,s={}){let n;v(t)&&(s={once:!0,...t},n=new Promise(c=>{t=c}));let o=new MessageChannel;T.upgradeInPlace(o.port1),o.port1.start();let{signal:a,once:i=!1,transfer:f=[],...u}=s;return o.port1.addEventListener("message",c=>t(c),{signal:a||void 0,once:i}),a?.addEventListener("abort",()=>{o.port1.close(),o.port2.close()}),this.postMessage(e,{...u,transfer:[o.port2].concat(f)}),n}relay({to:e,from:t,types:s="*",channel:n=null,resolveMessage:o=null,bidirectional:a=!1}={}){if(e&&t)throw new Error('Only one of "to" and "from" may be specified');if(t?e=this:t=this,e===t)throw new Error("Source and target ports cannot be the same");if(!(t instanceof T)||!(e instanceof T))throw new Error("Both source and target ports must be instance of MessagePortPlus.");if(typeof s!="function"&&!(s=[].concat(s)).length)throw new Error("Event types must be specified.");if(typeof n=="string")n={from:n};else if(v(n)){if(Object.keys(n).filter(c=>!["from","to"].includes(c)).length)throw new Error('Channel must be a string or an object of "from"/"to" members')}else if(n)throw new Error("Invalid channel parameter");let i=gr.call(t),f={targetPort:e,types:s,channel:n,resolveMessage:o};i.add(f);let u;return a&&(u=e.relay({to:t,types:s,channel:n&&{to:n.from,from:n.to},resolveMessage:o,bidirectional:!1})),()=>{i.delete(f),u?.()}}channel(e,t=null,{handshake:s=0,postAwaitsOpen:n=!1}={}){let o=new MessageChannel;return T.upgradeInPlace(o.port1,{handshake:s,postAwaitsOpen:n}),T.upgradeInPlace(o.port2,{handshake:s,postAwaitsOpen:n}),he.call(this).add(this.relay({channel:e,to:o.port2,bidirectional:!0,resolveMessage:t})),o.port2.start(),this.readyStateChange("close").then(()=>{o.port2.close()}),o.port1}projectMutations({from:e,to:t,...s}){if(!e||!t||typeof e=="string"&&typeof t=="string"||x(e)&&x(t))throw new Error('Invalid "from"/"to" parameters');if(typeof e=="string"){if(!x(t))throw new Error('Invalid "to" parameter. Object/array expected');return Tt.call(this,t,e,s)}if(typeof t=="string"){if(!x(e))throw new Error('Invalid "from" parameter. Object/array expected');return yr.call(this,e,t,s)}throw new Error('Invalid "from"/"to" parameters')}get readyState(){let e=le.call(this);return e.close.state?"closed":e.open.state?"open":"connecting"}readyStateChange(e){if(!["open","messaging","close"].includes(e))throw new Error(`Invalid readyState query "${e}"`);return le.call(this)[e].promise}_autoStart(){let e=M(this),t=ce(this);!e.get("internal_call")&&t.handshake===1&&this.start()}start(){let e=le.call(this);if(e.open.state)return;let t=M(this),s=ce(this),n=u=>{u&&(e.open.state=!0,e.open.resolve(this));let c=t.get("handshake_channel");setTimeout(()=>{c?.port1.close(),c?.port2.close(),t.delete("handshake_channel")},100)};if(t.get("remote.open.called")){n(!0);return}if(t.get("start.called"))return;if(t.set("start.called",!0),this._start?this._start():super.start?.(),s.handshake===0){n(!0);return}let o=new MessageChannel;t.set("handshake_channel",o),o.port1.onmessage=u=>{this instanceof BroadcastChannel&&s.clientServerMode==="server"&&typeof u.data?.id=="string"&&t.get("clients").add(u.data.id),u.data?.isOpen,n(!0)};let{wqOptions:a}=ze.call(this),i=s.clientServerMode==="server"?"server":s.clientServerMode==="client"?t.get("client_id"):null,f={".wq":a,ping:"connect",id:i};this._postMessage?this._postMessage(f,{transfer:[o.port2]}):super.postMessage(f,{transfer:[o.port2]})}close(...e){let t=le.call(this);if(t.close.state)return;t.close.state=!0;let s=M(this),n=ce(this);if(n.handshake>0&&!s.get("remote.close.called")&&(this instanceof BroadcastChannel||this instanceof MessagePort)){let{wqOptions:o}=ze.call(this),a=n.clientServerMode==="server"?"server":n.clientServerMode==="client"?s.get("client_id"):null,i={".wq":o,ping:"disconnect",id:a};this._postMessage?this._postMessage(i):super.postMessage(i)}this._close?this._close(...e):super.close(...e),t.close.resolve(this),es.call(this)}}}function Fe(r){return class extends dr(r){static _hydrateMessage(e,t){if(typeof t.data?.[".wq"]?.numPorts!="number"||typeof t.data[".wq"].eventID!="string")return t;let s=he.call(e),n=t.data[".wq"].numPorts;Object.defineProperty(t,"ports",{value:[],configurable:!0});for(let o=0;o<n;o++){let a=e.channel(`${t.data[".wq"].eventID}:${o}`);t.ports.push(a)}return t}_postMessage(e,t={}){let{transfer:s=[],...n}=t;if(typeof e?.[".wq"]?.eventID=="string"){let o=he.call(this),a=s.filter(f=>f instanceof MessagePort),i=a.length;for(let f=0;f<i;f++)T.upgradeInPlace(a[f]),o.add(this.relay({channel:`${e[".wq"].eventID}:${f}`,to:a[f],bidirectional:!0})),a[f].start(),a[f].readyStateChange("close").then(()=>{let{wqOptions:u}=ze.call(this),c={".wq":u,ping:"disconnect"};this.postMessage(c,{type:`${e[".wq"].eventID}:${f}:message`})});e[".wq"].numPorts=i}return this.__postMessage(e,n)}}}function Yr(r){if(r.propagationStopped)return;let e=M(this);e.get("parentPort")instanceof EventTarget&&(r.bubbles||e.get("parentPort")?.findPort?.(s=>s===this)&&r instanceof q)&&e.get("parentPort").dispatchEvent(r);let t=gr.call(this);if(t.size&&r instanceof q){let{type:s,eventID:n,data:o,live:a,bubbles:i,ports:f}=r,u=new WeakSet;for(let{targetPort:c,types:l,channel:p,resolveMessage:h}of t){if(u.has(c))continue;let m=s;p.from&&([,m]=new RegExp(`^${p.from.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}:([^:]+)$`).exec(s)||[],!m)||!(typeof l=="function"?l(m,this,c,p):[].concat(l).find(b=>b===m||b==="*"))||(u.add(c),c.postMessage(h?h(o,this,c,p):o,{transfer:f,type:p.to?`${p.to}:${m}`:m,eventID:n,bubbles:i,live:a,forwarded:!0,relayedFrom:this}))}}}function he(){let r=M(this);return r.has("garbage_collection")||r.set("garbage_collection",new Set),r.get("garbage_collection")}function gr(){let r=M(this);return r.has("downstream_registry")||r.set("downstream_registry",new Set),r.get("downstream_registry")}function le(){let r=M(this);if(!r.has("readystate_registry")){let e=t=>(t.promise=new Promise((s,n)=>(t.resolve=s,t.reject=n)),t);r.set("readystate_registry",{open:e({}),messaging:e({}),close:e({})})}return r.get("readystate_registry")}function es(){let r=M(this);for(let e of r.get("garbage_collection")||[])e instanceof AbortController?e.abort():typeof e=="function"&&e();r.get("garbage_collection")?.clear(),r.get("downstream_registry")?.clear()}function ze(r=void 0,e={}){if(Array.isArray(e))e={transfer:e};else if(!e||typeof e!="object")throw new TypeError("transferOrOptions must be an array or an object");let{type:t="message",eventID:s=null,live:n=!1,observing:o=!1,bubbles:a=!1,forwarded:i=!1,relayedFrom:f=null,signal:u=void 0,withArrayMethodDescriptors:c=!1,honourDoneMutationFlags:l=!1,...p}=e;return s||(s=`${t}-${(0|Math.random()*9e6).toString(36)}`),!o&&!i&&x(r)&&n&&!t?.endsWith(".mutate")&&(yr.call(this,r,s,{signal:u||void 0,withArrayMethodDescriptors:c,honourDoneMutationFlags:l}),o=!0),{portOptions:p,wqOptions:{type:t,eventID:s,live:n,observing:o,honourDoneMutationFlags:l,bubbles:a,forwarded:i,relayedFrom:f}}}function yr(r,e,{signal:t,withArrayMethodDescriptors:s=!0,honourDoneMutationFlags:n=!1}={}){if(!x(r))throw new TypeError("data must be a plain object and not a stream");if(typeof e!="string")throw new TypeError("eventID must be a non-empty string");let o=f=>{let u;s&&Array.isArray(f[0].target)&&!f[0].argumentsList&&!["set","defineProperty","deleteProperty"].includes(f[0].operation)||(this.postMessage(f.map(c=>(u=!u&&n&&c.detail?.done,{...c,target:void 0})),{type:`${e}.mutate`}),u&&a.abort())},a=S.observe(r,S.subtree(),o,{signal:t||void 0,withArrayMethodDescriptors:s});return he.call(this).add(a),a}function Tt(r,e,{signal:t,honourDoneMutationFlags:s=!1}={}){if(!x(r))throw new TypeError("data must be a plain object and not a stream");if(typeof e!="string")throw new TypeError("eventID must be a non-empty string");let n=i=>{if(!i.data?.length)return;let f;S.batch(r,()=>{for(let u of i.data){if(f=!f&&s&&u.detail?.done,u.argumentsList){let c=u.path.length?S.get(r,S.path(...u.path)):r;S.proxy(c)[u.operation](...u.argumentsList);continue}if(u.key!=="length"||["set","defineProperty","deleteProperty"].includes(u.operation)){let c=u.path.length===1?r:S.get(r,S.path(...u.path.slice(0,-1)));u.type==="delete"?S.deleteProperty(c,u.key):S.set(c,u.key,u.value)}}}),f&&o()};this.addEventListener(`${e}.mutate`,n,{signal:t||void 0});let o=()=>this.removeEventListener(`${e}.mutate`,n);return he.call(this).add(o),o}var Te=class extends Fe(BroadcastChannel){constructor(e,{handshake:t=0,postAwaitsOpen:s=!1,clientServerMode:n=null,autoClose:o=!1}={}){super(e);let a=M(this);if(typeof t!="number")throw new Error("handshake must be a number");if(t<0||t>2)throw new Error("handshake must be between 0 and 2");if(n&&!["server","client"].includes(n))throw new Error('clientServerMode must be "server" or "client"');a.set("options",{handshake:t,postAwaitsOpen:s,clientServerMode:n,autoClose:o}),this.constructor.upgradeEvents(this),t===0&&this.start()}__postMessage(e,t){BroadcastChannel.prototype.postMessage.call(this,e)}};var He=class r extends EventTarget{get[Symbol.toStringTag](){return"LiveResponse"}static[Symbol.hasInstance](e){return e instanceof EventTarget&&e?.[Symbol.toStringTag]==="LiveResponse"&&typeof e.replaceWith=="function"&&typeof e.now=="function"}static get xHeaderName(){return"X-Message-Port"}static test(e){return e instanceof r?"LiveResponse":e instanceof Me?"LiveProgramHandle":e instanceof Response?"Response":br(e)?"Generator":"Default"}static hasPort(e){return e instanceof r&&e.#p?!0:!!C(e).get("port")||!!e.headers?.get?.(this.xHeaderName)?.trim()}static getPort(e,{handshake:t=1}={}){if(e instanceof r&&e.#p)return e.#p;if(!(e instanceof Response||e instanceof r))return;let s=C(e);if(!s.has("port")){let n=e.headers.get(this.xHeaderName)?.trim();if(!n)return;let[,o,a]=/^(socket|channel):\/\/(.*)$/.exec(n)||[];if(!o||!a)throw new Error(`Unknown port messaging protocol: ${n}`);let i=o==="channel"?new Te(a,{handshake:t,postAwaitsOpen:!0,clientServerMode:"client"}):new fe(a,{handshake:t,postAwaitsOpen:!0});s.set("port",i)}return s.get("port")}static attachPort(e,t){if(t&&!(t instanceof T))throw new Error("Client must be a MessagePortPlus interface");if(e instanceof r){e.#p=t;return}C(e).set("port",t)}static from(e,...t){return e instanceof r?e.clone(...t):new this(e,...t)}#s;#e;#r=new AbortController;#t=new AbortController;constructor(e,...t){super(),this.#s=I.getInstance(this,!0);let s=a=>(a.promise=new Promise((i,f)=>(a.resolve=i,a.reject=f)),a);this.#e={live:s({}),done:s({})};let n=this.#e;(function a(){return n.now=s({}),n.now.refresh=a,n.now})();let o=this.#e.now;this.#a(o,e,...t).catch(a=>{o.reject(a)})}#n=null;get body(){return this.#n}#u=!1;get concurrent(){return this.#u}get bodyUsed(){return!0}#o=new Headers;get headers(){return this.#o}#f=200;get status(){return this.#f}#c="";get statusText(){return this.#c}#h="basic";get type(){return this.#h}#i=!1;get redirected(){return this.#i}#d=null;get url(){return this.#d}get ok(){return this.#f>=200&&this.#f<299}#p;get port(){return this.#p}get readyState(){return this.#e.done.state?"done":this.#e.live.state?"live":"waiting"}readyStateChange(e){if(!["live","now","done"].includes(e))throw new Error(`Invalid readyState query "${e}"`);return this.#e[e].promise}disconnect(e=!1){this.#r.abort(),this.#r=new AbortController,e&&(this.#t.abort(),this.#t=new AbortController)}#l;#g(e){if(this.#e.done.state)throw new Error("Response already done.");return this.#l=e,e.then(t=>{this.#l===e&&(this.#l=null,this.#e.done.state=!0,this.#e.done.resolve(t))}).catch(t=>{this.#l===e&&(this.#l=null,this.#e.done.state=!0,this.#e.done.reject(t))}),e}async now(){return this.#e.now.promise}async replaceWith(e,...t){if(this.readyState==="done")throw new Error("Response already done.");this.disconnect(),await this.#a(null,e,...t)}async#a(e,t,...s){let n=e||this.#e.now.refresh();if(t instanceof Promise)return this.#g(new Promise((p,h)=>{this.#r.signal.addEventListener("abort",()=>{n.aborted=!0,p()}),t.then(async m=>{await this.#a(n,m,...s),p()}).catch(m=>h(m))}));let o=(p,h)=>{if(h=Object.freeze({...h,ok:h.status>=200&&h.status<299,bodyUsed:!0}),p?.aborted){p.resolve(h);return}let m=p||this.#e.now.refresh(),y=h.body;this.#f=h.status,this.#c=h.statusText;for(let[w]of[...this.#o.entries()])this.#o.delete(w);for(let[w,d]of h.headers.entries())this.#o.append(w,d);this.#h=h.type,this.#i=h.redirected,this.#d=h.url;let b=this.#n;this.#n=y,this.#u=!!h.concurrent,this.#p=h.port,this.#u||(this.#t.abort(),this.#t=new AbortController);let _=new A(this,{type:"set",key:"body",value:y,oldValue:b,isUpdate:!0,related:[],operation:"set",detail:null});this.#e.live.state=!0,this.#e.live.resolve(this),m.resolve(h),this.#s.emit([_]),this.dispatchEvent(new Mt(h))},a=(p,h,m)=>{o(p,{body:h,status:200,statusText:"",...m,headers:m.headers instanceof Headers?m.headers:new Headers(m.headers||{}),type:"basic",redirected:!1,url:null})},i=async(p,h,m)=>{let y,b,_=!0;if(h instanceof Response){if(h.bodyUsed)throw new Error("Response body already used");try{y=await V.prototype.any.call(h,{to:"json"})}catch{_=!1,y=await V.prototype.any.call(h)}b=this.constructor.getPort(h,{handshake:2})}else y=(await h.readyStateChange("live")).body,b=h.port;if(o(p,{body:y,status:h.status,statusText:h.statusText,headers:h.headers,concurrent:h.concurrent,...m,port:b,type:h.type,redirected:h.redirected,url:h.url}),h instanceof r){let w=()=>{a(null,h.body,h)};return h.addEventListener("replace",w,{signal:this.#r.signal}),await h.readyStateChange("done"),h.removeEventListener("replace",w),h}if(b){_&&y!==null&&b.projectMutations({from:"initial_response",to:y,signal:this.#t.signal});let w=new Promise(d=>{let P=E=>{let{body:U,...N}=E.data;a(null,U,{...N})};b.addEventListener("response.replace",P,{signal:this.#r.signal}),b.addEventListener("response.done",()=>{b.removeEventListener("response.replace",P),d(this)},{once:!0}),b.readyStateChange("close").then(d)});return b.start(),w}},f=async(p,h,m)=>{let y=await h.next(),b=await y.value;await this.#a(p,b,{done:y.done,...m});let _=y,w=b;for(;!_.done&&!this.#r.signal.aborted;)_=await h.next(),w=await _.value,this.#r.signal.aborted||await this.#a(null,w,{concurrent:m.concurrent,done:m.done===!1?!1:_.done})},u=async(p,h,m)=>(await this.#a(p,h.value,m),S.observe(h,"value",y=>this.#a(null,y.value,{concurrent:m.concurrent,done:!1}),{signal:this.#r.signal}),new Promise(()=>{})),c=typeof s[0]=="function"?s.shift():null,l=v(s[0])?{...s.shift()}:{};if("status"in l&&(l.status=parseInt(l.status),l.status<200||l.status>599))throw new Error(`The status provided (${l.status}) is outside the range [200, 599].`);if("statusText"in l&&(l.statusText=String(l.statusText)),l.headers&&!(l.headers instanceof Headers)&&(l.headers=new Headers(l.headers)),"concurrent"in l&&(l.concurrent=!!l.concurrent),t instanceof Response||t instanceof r){if(c)throw new Error("frameClosure is not supported for responses.");n.donePromise=i(n,t,l)}else if(br(t)){if(c)throw new Error("frameClosure is not supported for generators.");n.donePromise=f(n,t,l)}else if(t instanceof Me){if(c)throw new Error("frameClosure is not supported for live program handles.");n.donePromise=u(n,t,l)}else if(n.donePromise=Promise.resolve(a(n,t,l)),c){let p=x(t)&&!At(t)?S.proxy(t,{chainable:!0,membrane:t}):t;n.donePromise=Promise.resolve(c.call(this,p,this.#t.signal))}return this.#g(l.done===!1?new Promise(()=>{}):n.donePromise),await new Promise((p,h)=>{this.#r.signal.addEventListener("abort",()=>p(!1)),n.donePromise.then(()=>p(!0)).catch(h)})}toResponse({port:e,signal:t}={}){if(e&&!(e instanceof T))throw new Error("Client must be a MessagePortPlus interface");let s=V.from(this.body,{status:this.#f,statusText:this.#c,headers:this.#o}),n=C(this);if(ue(s).set("meta",new Map(n)),!e)return s;x(this.#n)&&!At(this.#n)&&e.projectMutations({from:this.#n,to:"initial_response",signal:AbortSignal.any([this.#t.signal].concat(t||[]))});let o=()=>{let a=Object.fromEntries([...this.headers.entries()]);a?.["set-cookie"]&&(delete a["set-cookie"],console.warn('Warning: The "set-cookie" header is not supported for security reasons and has been removed from the response.')),e.postMessage({body:this.#n,status:this.#f,statusText:this.#c,headers:a,type:this.type,url:this.url,redirect:this.redirect,concurrent:this.#u},{type:"response.replace",live:!0,signal:AbortSignal.any([this.#t.signal].concat(t||[]))})};return this.addEventListener("replace",o,{signal:t||void 0}),this.readyStateChange("done").then(()=>{e.postMessage(null,{type:"response.done"})}),s}async*toGenerator({signal:e}={}){do yield this.body;while(await new Promise(t=>{this.addEventListener("replace",()=>t(!0),{once:!0,signal:e||void 0}),this.readyStateChange("done").then(()=>t(!1))}))}toLiveProgramHandle({signal:e}={}){let t=new Me,s=()=>S.defineProperty(t,"value",{value:this.body,enumerable:!1,configurable:!0});return this.addEventListener("replace",s,{signal:e||void 0}),s(),t}clone(e={}){let t=new this.constructor,s=C(this);return ue(t).set("meta",new Map(s)),t.replaceWith(this,e),t}},br=r=>typeof r?.next=="function"&&typeof r?.throw=="function"&&typeof r?.return=="function",Mt=class extends Event{[Symbol.toStringTag]="ReplaceEvent";static[Symbol.hasInstance](e){return e instanceof Event&&e[Symbol.toStringTag]==="ReplaceEvent"}#s;get data(){return this.#s}constructor(e){super("replace"),this.#s=e}},Me=class{[Symbol.toStringTag]="LiveProgramHandle";static[Symbol.hasInstance](e){return e?.[Symbol.toStringTag]==="LiveProgramHandle"}abort(){}};globalThis.webqit||(globalThis.webqit={});Object.assign(globalThis.webqit,$t);})();
1
+ (()=>{var wr=Object.defineProperty;var Be=(r,e)=>{for(var t in e)wr(r,t,{get:e[t],enumerable:!0})};var $t={};Be($t,{FormDataPlus:()=>B,HeadersPlus:()=>W,LiveResponse:()=>He,Observer:()=>or,RequestPlus:()=>Ne,ResponsePlus:()=>V,fetchPlus:()=>lr});function v(r){return!Array.isArray(r)&&typeof r=="object"&&r}function pe(r){return typeof r}function R(r){return Array.isArray(r)}function $e(r){return r===!0||r===!1}function me(r){return typeof r=="function"}function We(r){return r===null||r===""}function te(r){return arguments.length&&(r===void 0||typeof r>"u")}function x(r){return Array.isArray(r)||typeof r=="object"&&r||me(r)}function Ve(r){return We(r)||te(r)||r===!1||r===0||x(r)&&!Object.keys(r).length}function G(r){return me(r)||r&&{}.toString.call(r)==="[object function]"}function de(r){return r instanceof Number||typeof r=="number"}function J(r){return de(r)||r!==!0&&r!==!1&&r!==null&&r!==""&&!isNaN(r*1)}function Ge(r){return R(r)&&Object.getPrototypeOf(r)===Array.prototype}function Je(r){return v(r)&&Object.getPrototypeOf(r)===Object.prototype}function K(r){return r instanceof String||typeof r=="string"&&r!==null}function Ke(r){return!K(r)&&!te(r.length)}function D(r,...e){if(!r||!["object","function"].includes(typeof r))throw new Error("Argument #1 must be of type object");let t=r[Symbol.for("wq")];if(t||(t=new je,Object.defineProperty(r,Symbol.for("wq"),{value:t,enumerable:!1,configurable:!1,writable:!1})),!e.length)return t;let s,n;for(;s=e.shift();)(n=t)&&!(t=t.get(s))&&(t=new je,n.set(s,t));return t}var je=class extends Map{};function ge(r,e,t=!1){if(e=="")return r;var s=t?r.lastIndexOf(e):r.indexOf(e);return s===-1?"":r.substr(s+e.length)}function Re(r,e,t=!1){if(e=="")return r;var s=t?r.lastIndexOf(e):r.indexOf(e);return s===-1?r:r.substr(0,s)}var Ar=Object.defineProperty,g=(r,e)=>Ar(r,"name",{value:e,configurable:!0}),we=class{type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(r,e,t,s,n,o){this.type=r,this.name=e,this.prefix=t,this.value=s,this.suffix=n,this.modifier=o}hasCustomName(){return this.name!==""&&typeof this.name!="number"}};g(we,"Part");var Cr=/[$_\p{ID_Start}]/u,Tr=/[$_\u200C\u200D\p{ID_Continue}]/u,Qe=".*";function It(r,e){return(e?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(r)}g(It,"isASCII");function et(r,e=!1){let t=[],s=0;for(;s<r.length;){let n=r[s],o=g(function(a){if(!e)throw new TypeError(a);t.push({type:"INVALID_CHAR",index:s,value:r[s++]})},"ErrorOrInvalid");if(n==="*"){t.push({type:"ASTERISK",index:s,value:r[s++]});continue}if(n==="+"||n==="?"){t.push({type:"OTHER_MODIFIER",index:s,value:r[s++]});continue}if(n==="\\"){t.push({type:"ESCAPED_CHAR",index:s++,value:r[s++]});continue}if(n==="{"){t.push({type:"OPEN",index:s,value:r[s++]});continue}if(n==="}"){t.push({type:"CLOSE",index:s,value:r[s++]});continue}if(n===":"){let a="",i=s+1;for(;i<r.length;){let f=r.substr(i,1);if(i===s+1&&Cr.test(f)||i!==s+1&&Tr.test(f)){a+=r[i++];continue}break}if(!a){o(`Missing parameter name at ${s}`);continue}t.push({type:"NAME",index:s,value:a}),s=i;continue}if(n==="("){let a=1,i="",f=s+1,u=!1;if(r[f]==="?"){o(`Pattern cannot start with "?" at ${f}`);continue}for(;f<r.length;){if(!It(r[f],!1)){o(`Invalid character '${r[f]}' at ${f}.`),u=!0;break}if(r[f]==="\\"){i+=r[f++]+r[f++];continue}if(r[f]===")"){if(a--,a===0){f++;break}}else if(r[f]==="("&&(a++,r[f+1]!=="?")){o(`Capturing groups are not allowed at ${f}`),u=!0;break}i+=r[f++]}if(u)continue;if(a){o(`Unbalanced pattern at ${s}`);continue}if(!i){o(`Missing pattern at ${s}`);continue}t.push({type:"REGEX",index:s,value:i}),s=f;continue}t.push({type:"CHAR",index:s,value:r[s++]})}return t.push({type:"END",index:s,value:""}),t}g(et,"lexer");function tt(r,e={}){let t=et(r);e.delimiter??="/#?",e.prefixes??="./";let s=`[^${$(e.delimiter)}]+?`,n=[],o=0,a=0,i="",f=new Set,u=g(d=>{if(a<t.length&&t[a].type===d)return t[a++].value},"tryConsume"),c=g(()=>u("OTHER_MODIFIER")??u("ASTERISK"),"tryConsumeModifier"),l=g(d=>{let P=u(d);if(P!==void 0)return P;let{type:E,index:U}=t[a];throw new TypeError(`Unexpected ${E} at ${U}, expected ${d}`)},"mustConsume"),p=g(()=>{let d="",P;for(;P=u("CHAR")??u("ESCAPED_CHAR");)d+=P;return d},"consumeText"),h=g(d=>d,"DefaultEncodePart"),m=e.encodePart||h,y="",b=g(d=>{y+=d},"appendToPendingFixedValue"),_=g(()=>{y.length&&(n.push(new we(3,"","",m(y),"",3)),y="")},"maybeAddPartFromPendingFixedValue"),w=g((d,P,E,U,N)=>{let L=3;switch(N){case"?":L=1;break;case"*":L=0;break;case"+":L=2;break}if(!P&&!E&&L===3){b(d);return}if(_(),!P&&!E){if(!d)return;n.push(new we(3,"","",m(d),"",L));return}let j;E?E==="*"?j=Qe:j=E:j=s;let _e=2;j===s?(_e=1,j=""):j===Qe&&(_e=0,j="");let Z;if(P?Z=P:E&&(Z=o++),f.has(Z))throw new TypeError(`Duplicate name '${Z}'.`);f.add(Z),n.push(new we(_e,Z,m(d),j,m(U),L))},"addPart");for(;a<t.length;){let d=u("CHAR"),P=u("NAME"),E=u("REGEX");if(!P&&!E&&(E=u("ASTERISK")),P||E){let N=d??"";e.prefixes.indexOf(N)===-1&&(b(N),N=""),_();let L=c();w(N,P,E,"",L);continue}let U=d??u("ESCAPED_CHAR");if(U){b(U);continue}if(u("OPEN")){let N=p(),L=u("NAME"),j=u("REGEX");!L&&!j&&(j=u("ASTERISK"));let _e=p();l("CLOSE");let Z=c();w(N,L,j,_e,Z);continue}_(),l("END")}return n}g(tt,"parse");function $(r){return r.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}g($,"escapeString");function Ze(r){return r&&r.ignoreCase?"ui":"u"}g(Ze,"flags");function Lt(r,e,t){return rt(tt(r,t),e,t)}g(Lt,"stringToRegexp");function re(r){switch(r){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}g(re,"modifierToString");function rt(r,e,t={}){t.delimiter??="/#?",t.prefixes??="./",t.sensitive??=!1,t.strict??=!1,t.end??=!0,t.start??=!0,t.endsWith="";let s=t.start?"^":"";for(let i of r){if(i.type===3){i.modifier===3?s+=$(i.value):s+=`(?:${$(i.value)})${re(i.modifier)}`;continue}e&&e.push(i.name);let f=`[^${$(t.delimiter)}]+?`,u=i.value;if(i.type===1?u=f:i.type===0&&(u=Qe),!i.prefix.length&&!i.suffix.length){i.modifier===3||i.modifier===1?s+=`(${u})${re(i.modifier)}`:s+=`((?:${u})${re(i.modifier)})`;continue}if(i.modifier===3||i.modifier===1){s+=`(?:${$(i.prefix)}(${u})${$(i.suffix)})`,s+=re(i.modifier);continue}s+=`(?:${$(i.prefix)}`,s+=`((?:${u})(?:`,s+=$(i.suffix),s+=$(i.prefix),s+=`(?:${u}))*)${$(i.suffix)})`,i.modifier===0&&(s+="?")}let n=`[${$(t.endsWith)}]|$`,o=`[${$(t.delimiter)}]`;if(t.end)return t.strict||(s+=`${o}?`),t.endsWith.length?s+=`(?=${n})`:s+="$",new RegExp(s,Ze(t));t.strict||(s+=`(?:${o}(?=${n}))?`);let a=!1;if(r.length){let i=r[r.length-1];i.type===3&&i.modifier===3&&(a=t.delimiter.indexOf(i)>-1)}return a||(s+=`(?=${o}|${n})`),new RegExp(s,Ze(t))}g(rt,"partsToRegexp");var ee={delimiter:"",prefixes:"",sensitive:!0,strict:!0},Mr={delimiter:".",prefixes:"",sensitive:!0,strict:!0},$r={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function Dt(r,e){return r.length?r[0]==="/"?!0:!e||r.length<2?!1:(r[0]=="\\"||r[0]=="{")&&r[1]=="/":!1}g(Dt,"isAbsolutePathname");function st(r,e){return r.startsWith(e)?r.substring(e.length,r.length):r}g(st,"maybeStripPrefix");function kt(r,e){return r.endsWith(e)?r.substr(0,r.length-e.length):r}g(kt,"maybeStripSuffix");function nt(r){return!r||r.length<2?!1:r[0]==="["||(r[0]==="\\"||r[0]==="{")&&r[1]==="["}g(nt,"treatAsIPv6Hostname");var qt=["ftp","file","http","https","ws","wss"];function it(r){if(!r)return!0;for(let e of qt)if(r.test(e))return!0;return!1}g(it,"isSpecialScheme");function Ut(r,e){if(r=st(r,"#"),e||r==="")return r;let t=new URL("https://example.com");return t.hash=r,t.hash?t.hash.substring(1,t.hash.length):""}g(Ut,"canonicalizeHash");function Nt(r,e){if(r=st(r,"?"),e||r==="")return r;let t=new URL("https://example.com");return t.search=r,t.search?t.search.substring(1,t.search.length):""}g(Nt,"canonicalizeSearch");function Ft(r,e){return e||r===""?r:nt(r)?ut(r):at(r)}g(Ft,"canonicalizeHostname");function zt(r,e){if(e||r==="")return r;let t=new URL("https://example.com");return t.password=r,t.password}g(zt,"canonicalizePassword");function Ht(r,e){if(e||r==="")return r;let t=new URL("https://example.com");return t.username=r,t.username}g(Ht,"canonicalizeUsername");function Bt(r,e,t){if(t||r==="")return r;if(e&&!qt.includes(e))return new URL(`${e}:${r}`).pathname;let s=r[0]=="/";return r=new URL(s?r:"/-"+r,"https://example.com").pathname,s||(r=r.substring(2,r.length)),r}g(Bt,"canonicalizePathname");function Wt(r,e,t){return ot(e)===r&&(r=""),t||r===""?r:ft(r)}g(Wt,"canonicalizePort");function Vt(r,e){return r=kt(r,":"),e||r===""?r:Ie(r)}g(Vt,"canonicalizeProtocol");function ot(r){switch(r){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}g(ot,"defaultPortForProtocol");function Ie(r){if(r==="")return r;if(/^[-+.A-Za-z0-9]*$/.test(r))return r.toLowerCase();throw new TypeError(`Invalid protocol '${r}'.`)}g(Ie,"protocolEncodeCallback");function Gt(r){if(r==="")return r;let e=new URL("https://example.com");return e.username=r,e.username}g(Gt,"usernameEncodeCallback");function Jt(r){if(r==="")return r;let e=new URL("https://example.com");return e.password=r,e.password}g(Jt,"passwordEncodeCallback");function at(r){if(r==="")return r;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(r))throw new TypeError(`Invalid hostname '${r}'`);let e=new URL("https://example.com");return e.hostname=r,e.hostname}g(at,"hostnameEncodeCallback");function ut(r){if(r==="")return r;if(/[^0-9a-fA-F[\]:]/g.test(r))throw new TypeError(`Invalid IPv6 hostname '${r}'`);return r.toLowerCase()}g(ut,"ipv6HostnameEncodeCallback");function ft(r){if(r===""||/^[0-9]*$/.test(r)&&parseInt(r)<=65535)return r;throw new TypeError(`Invalid port '${r}'.`)}g(ft,"portEncodeCallback");function Kt(r){if(r==="")return r;let e=new URL("https://example.com");return e.pathname=r[0]!=="/"?"/-"+r:r,r[0]!=="/"?e.pathname.substring(2,e.pathname.length):e.pathname}g(Kt,"standardURLPathnameEncodeCallback");function Xt(r){return r===""?r:new URL(`data:${r}`).pathname}g(Xt,"pathURLPathnameEncodeCallback");function Qt(r){if(r==="")return r;let e=new URL("https://example.com");return e.search=r,e.search.substring(1,e.search.length)}g(Qt,"searchEncodeCallback");function Zt(r){if(r==="")return r;let e=new URL("https://example.com");return e.hash=r,e.hash.substring(1,e.hash.length)}g(Zt,"hashEncodeCallback");var Yt=class{#s;#e=[];#r={};#t=0;#n=1;#u=0;#o=0;#f=0;#c=0;#h=!1;constructor(r){this.#s=r}get result(){return this.#r}parse(){for(this.#e=et(this.#s,!0);this.#t<this.#e.length;this.#t+=this.#n){if(this.#n=1,this.#e[this.#t].type==="END"){if(this.#o===0){this.#p(),this.#y()?this.#i(9,1):this.#b()?this.#i(8,1):this.#i(7,0);continue}else if(this.#o===2){this.#l(5);continue}this.#i(10,0);break}if(this.#f>0)if(this.#O())this.#f-=1;else continue;if(this.#S()){this.#f+=1;continue}switch(this.#o){case 0:this.#_()&&this.#l(1);break;case 1:if(this.#_()){this.#T();let r=7,e=1;this.#v()?(r=2,e=3):this.#h&&(r=2),this.#i(r,e)}break;case 2:this.#w()?this.#l(3):(this.#x()||this.#b()||this.#y())&&this.#l(5);break;case 3:this.#P()?this.#i(4,1):this.#w()&&this.#i(5,1);break;case 4:this.#w()&&this.#i(5,1);break;case 5:this.#A()?this.#c+=1:this.#C()&&(this.#c-=1),this.#E()&&!this.#c?this.#i(6,1):this.#x()?this.#i(7,0):this.#b()?this.#i(8,1):this.#y()&&this.#i(9,1);break;case 6:this.#x()?this.#i(7,0):this.#b()?this.#i(8,1):this.#y()&&this.#i(9,1);break;case 7:this.#b()?this.#i(8,1):this.#y()&&this.#i(9,1);break;case 8:this.#y()&&this.#i(9,1);break;case 9:break;case 10:break}}this.#r.hostname!==void 0&&this.#r.port===void 0&&(this.#r.port="")}#i(r,e){switch(this.#o){case 0:break;case 1:this.#r.protocol=this.#m();break;case 2:break;case 3:this.#r.username=this.#m();break;case 4:this.#r.password=this.#m();break;case 5:this.#r.hostname=this.#m();break;case 6:this.#r.port=this.#m();break;case 7:this.#r.pathname=this.#m();break;case 8:this.#r.search=this.#m();break;case 9:this.#r.hash=this.#m();break;case 10:break}this.#o!==0&&r!==10&&([1,2,3,4].includes(this.#o)&&[6,7,8,9].includes(r)&&(this.#r.hostname??=""),[1,2,3,4,5,6].includes(this.#o)&&[8,9].includes(r)&&(this.#r.pathname??=this.#h?"/":""),[1,2,3,4,5,6,7].includes(this.#o)&&r===9&&(this.#r.search??="")),this.#d(r,e)}#d(r,e){this.#o=r,this.#u=this.#t+e,this.#t+=e,this.#n=0}#p(){this.#t=this.#u,this.#n=0}#l(r){this.#p(),this.#o=r}#g(r){return r<0&&(r=this.#e.length-r),r<this.#e.length?this.#e[r]:this.#e[this.#e.length-1]}#a(r,e){let t=this.#g(r);return t.value===e&&(t.type==="CHAR"||t.type==="ESCAPED_CHAR"||t.type==="INVALID_CHAR")}#_(){return this.#a(this.#t,":")}#v(){return this.#a(this.#t+1,"/")&&this.#a(this.#t+2,"/")}#w(){return this.#a(this.#t,"@")}#P(){return this.#a(this.#t,":")}#E(){return this.#a(this.#t,":")}#x(){return this.#a(this.#t,"/")}#b(){if(this.#a(this.#t,"?"))return!0;if(this.#e[this.#t].value!=="?")return!1;let r=this.#g(this.#t-1);return r.type!=="NAME"&&r.type!=="REGEX"&&r.type!=="CLOSE"&&r.type!=="ASTERISK"}#y(){return this.#a(this.#t,"#")}#S(){return this.#e[this.#t].type=="OPEN"}#O(){return this.#e[this.#t].type=="CLOSE"}#A(){return this.#a(this.#t,"[")}#C(){return this.#a(this.#t,"]")}#m(){let r=this.#e[this.#t],e=this.#g(this.#u).index;return this.#s.substring(e,r.index)}#T(){let r={};Object.assign(r,ee),r.encodePart=Ie;let e=Lt(this.#m(),void 0,r);this.#h=it(e)}};g(Yt,"Parser");var Xe=["protocol","username","password","hostname","port","pathname","search","hash"],Y="*";function Ye(r,e){if(typeof r!="string")throw new TypeError("parameter 1 is not of type 'string'.");let t=new URL(r,e);return{protocol:t.protocol.substring(0,t.protocol.length-1),username:t.username,password:t.password,hostname:t.hostname,port:t.port,pathname:t.pathname,search:t.search!==""?t.search.substring(1,t.search.length):void 0,hash:t.hash!==""?t.hash.substring(1,t.hash.length):void 0}}g(Ye,"extractValues");function F(r,e){return e?be(r):r}g(F,"processBaseURLString");function ye(r,e,t){let s;if(typeof e.baseURL=="string")try{s=new URL(e.baseURL),e.protocol===void 0&&(r.protocol=F(s.protocol.substring(0,s.protocol.length-1),t)),!t&&e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.username===void 0&&(r.username=F(s.username,t)),!t&&e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.username===void 0&&e.password===void 0&&(r.password=F(s.password,t)),e.protocol===void 0&&e.hostname===void 0&&(r.hostname=F(s.hostname,t)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&(r.port=F(s.port,t)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&(r.pathname=F(s.pathname,t)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&e.search===void 0&&(r.search=F(s.search.substring(1,s.search.length),t)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&e.search===void 0&&e.hash===void 0&&(r.hash=F(s.hash.substring(1,s.hash.length),t))}catch{throw new TypeError(`invalid baseURL '${e.baseURL}'.`)}if(typeof e.protocol=="string"&&(r.protocol=Vt(e.protocol,t)),typeof e.username=="string"&&(r.username=Ht(e.username,t)),typeof e.password=="string"&&(r.password=zt(e.password,t)),typeof e.hostname=="string"&&(r.hostname=Ft(e.hostname,t)),typeof e.port=="string"&&(r.port=Wt(e.port,r.protocol,t)),typeof e.pathname=="string"){if(r.pathname=e.pathname,s&&!Dt(r.pathname,t)){let n=s.pathname.lastIndexOf("/");n>=0&&(r.pathname=F(s.pathname.substring(0,n+1),t)+r.pathname)}r.pathname=Bt(r.pathname,r.protocol,t)}return typeof e.search=="string"&&(r.search=Nt(e.search,t)),typeof e.hash=="string"&&(r.hash=Ut(e.hash,t)),r}g(ye,"applyInit");function be(r){return r.replace(/([+*?:{}()\\])/g,"\\$1")}g(be,"escapePatternString");function er(r){return r.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}g(er,"escapeRegexpString");function tr(r,e){e.delimiter??="/#?",e.prefixes??="./",e.sensitive??=!1,e.strict??=!1,e.end??=!0,e.start??=!0,e.endsWith="";let t=".*",s=`[^${er(e.delimiter)}]+?`,n=/[$_\u200C\u200D\p{ID_Continue}]/u,o="";for(let a=0;a<r.length;++a){let i=r[a];if(i.type===3){if(i.modifier===3){o+=be(i.value);continue}o+=`{${be(i.value)}}${re(i.modifier)}`;continue}let f=i.hasCustomName(),u=!!i.suffix.length||!!i.prefix.length&&(i.prefix.length!==1||!e.prefixes.includes(i.prefix)),c=a>0?r[a-1]:null,l=a<r.length-1?r[a+1]:null;if(!u&&f&&i.type===1&&i.modifier===3&&l&&!l.prefix.length&&!l.suffix.length)if(l.type===3){let p=l.value.length>0?l.value[0]:"";u=n.test(p)}else u=!l.hasCustomName();if(!u&&!i.prefix.length&&c&&c.type===3){let p=c.value[c.value.length-1];u=e.prefixes.includes(p)}u&&(o+="{"),o+=be(i.prefix),f&&(o+=`:${i.name}`),i.type===2?o+=`(${i.value})`:i.type===1?f||(o+=`(${s})`):i.type===0&&(!f&&(!c||c.type===3||c.modifier!==3||u||i.prefix!=="")?o+="*":o+=`(${t})`),i.type===1&&f&&i.suffix.length&&n.test(i.suffix[0])&&(o+="\\"),o+=be(i.suffix),u&&(o+="}"),i.modifier!==3&&(o+=re(i.modifier))}return o}g(tr,"partsToPattern");var ct=class{#s;#e={};#r={};#t={};#n={};#u=!1;constructor(r={},e,t){try{let s;if(typeof e=="string"?s=e:t=e,typeof r=="string"){let i=new Yt(r);if(i.parse(),r=i.result,s===void 0&&typeof r.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");r.baseURL=s}else{if(!r||typeof r!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(s)throw new TypeError("parameter 1 is not of type 'string'.")}typeof t>"u"&&(t={ignoreCase:!1});let n={ignoreCase:t.ignoreCase===!0},o={pathname:Y,protocol:Y,username:Y,password:Y,hostname:Y,port:Y,search:Y,hash:Y};this.#s=ye(o,r,!0),ot(this.#s.protocol)===this.#s.port&&(this.#s.port="");let a;for(a of Xe){if(!(a in this.#s))continue;let i={},f=this.#s[a];switch(this.#r[a]=[],a){case"protocol":Object.assign(i,ee),i.encodePart=Ie;break;case"username":Object.assign(i,ee),i.encodePart=Gt;break;case"password":Object.assign(i,ee),i.encodePart=Jt;break;case"hostname":Object.assign(i,Mr),nt(f)?i.encodePart=ut:i.encodePart=at;break;case"port":Object.assign(i,ee),i.encodePart=ft;break;case"pathname":it(this.#e.protocol)?(Object.assign(i,$r,n),i.encodePart=Kt):(Object.assign(i,ee,n),i.encodePart=Xt);break;case"search":Object.assign(i,ee,n),i.encodePart=Qt;break;case"hash":Object.assign(i,ee,n),i.encodePart=Zt;break}try{this.#n[a]=tt(f,i),this.#e[a]=rt(this.#n[a],this.#r[a],i),this.#t[a]=tr(this.#n[a],i),this.#u=this.#u||this.#n[a].some(u=>u.type===2)}catch{throw new TypeError(`invalid ${a} pattern '${this.#s[a]}'.`)}}}catch(s){throw new TypeError(`Failed to construct 'URLPattern': ${s.message}`)}}get[Symbol.toStringTag](){return"URLPattern"}test(r={},e){let t={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof r!="string"&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof r>"u")return!1;try{typeof r=="object"?t=ye(t,r,!1):t=ye(t,Ye(r,e),!1)}catch{return!1}let s;for(s of Xe)if(!this.#e[s].exec(t[s]))return!1;return!0}exec(r={},e){let t={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof r!="string"&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof r>"u")return;try{typeof r=="object"?t=ye(t,r,!1):t=ye(t,Ye(r,e),!1)}catch{return null}let s={};e?s.inputs=[r,e]:s.inputs=[r];let n;for(n of Xe){let o=this.#e[n].exec(t[n]);if(!o)return null;let a={};for(let[i,f]of this.#r[n].entries())if(typeof f=="string"||typeof f=="number"){let u=o[i+1];a[f]=u}s[n]={input:t[n]??"",groups:a}}return s}static compareComponent(r,e,t){let s=g((i,f)=>{for(let u of["type","modifier","prefix","value","suffix"]){if(i[u]<f[u])return-1;if(i[u]!==f[u])return 1}return 0},"comparePart"),n=new we(3,"","","","",3),o=new we(0,"","","","",3),a=g((i,f)=>{let u=0;for(;u<Math.min(i.length,f.length);++u){let c=s(i[u],f[u]);if(c)return c}return i.length===f.length?0:s(i[u]??n,f[u]??n)},"comparePartList");return!e.#t[r]&&!t.#t[r]?0:e.#t[r]&&!t.#t[r]?a(e.#n[r],[o]):!e.#t[r]&&t.#t[r]?a([o],t.#n[r]):a(e.#n[r],t.#n[r])}get protocol(){return this.#t.protocol}get username(){return this.#t.username}get password(){return this.#t.password}get hostname(){return this.#t.hostname}get port(){return this.#t.port}get pathname(){return this.#t.pathname}get search(){return this.#t.search}get hash(){return this.#t.hash}get hasRegExpGroups(){return this.#u}};g(ct,"URLPattern");globalThis.URLPattern||(globalThis.URLPattern=ct);var lt=class extends URLPattern{#s;constructor(e,t=null){typeof e=="object"&&e?.baseURL&&({baseURL:t,...e}=e),super(e,t),this.#s=new URL(e,t)}isPattern(){let e=(n,o)=>{if(!n)return!1;let a=!1;for(let i of n){if(a){a=!1;continue}if(i==="\\"){a=!0;continue}if(o.has(i))return!0}return!1},t={protocol:new Set(["*"]),username:new Set(["*"]),password:new Set(["*"]),hostname:new Set(["*","{"]),port:new Set(["*","{"]),pathname:new Set(["*",":","{","("]),search:new Set(["*","{"]),hash:new Set(["*","{"])},s=this.#s;return e(s.protocol,t.protocol)||e(s.username,t.username)||e(s.password,t.password)||e(s.hostname,t.hostname)||e(s.port,t.port)||e(s.pathname,t.pathname)||e(s.search,t.search)||e(s.hash,t.hash)}exec(...e){let t=super.exec(...e);if(!t)return;let s={};for(let a of Object.values(t))a?.groups&&Object.assign(s,a.groups);let n={named:s};return{...t,vars:n,render:a=>a.replace(/\$(\$|[A-Z0-9_]+)/gi,(i,f)=>f==="$"?"$":n.named[f]??"")}}};var Ot={};Be(Ot,{any:()=>Wr,apply:()=>xt,batch:()=>St,construct:()=>wt,defineProperties:()=>Kr,defineProperty:()=>Se,deleteProperties:()=>Xr,deleteProperty:()=>Oe,get:()=>Q,getOwnPropertyDescriptor:()=>De,getOwnPropertyDescriptors:()=>Gr,getPrototypeOf:()=>gt,has:()=>ke,intercept:()=>Vr,isExtensible:()=>yt,map:()=>Jr,observe:()=>Et,ownKeys:()=>bt,path:()=>Hr,preventExtensions:()=>vt,reduce:()=>Pt,set:()=>ie,setPrototypeOf:()=>_t,subtree:()=>Br});function z(r,e=!0){return R(r)?r:!e&&v(r)?[r]:r!==!1&&r!==0&&Ve(r)?[]:Ke(r)?Array.prototype.slice.call(r):v(r)?Object.values(r):[r]}var O=(r,...e)=>D(r,"observerAPI",...e),xe=(r,e)=>r instanceof Promise?r.then(e):e(r),Le={};var se=class{constructor(e,t){this.registry=e,Object.assign(this,{...t,target:e.target}),this.params.signal&&this.params.signal.addEventListener("abort",()=>this.remove())}remove(){return this.removed=!0,this.registry.removeRegistration(this)}};var ve=class extends se{constructor(){super(...arguments),this.emit.currentRegistration=this,Object.defineProperty(this,"abortController",{value:new AbortController}),Object.defineProperty(this,"signal",{value:this.abortController.signal}),Le.setMaxListeners?.(0,this.signal)}remove(){this.abortController.abort(),super.remove()}fire(e){if(this.emit.recursionTarget&&!["inject","force-async","force-sync"].includes(this.params.recursions))return;let t=e,s=this.filter;if(s!==1/0&&(s=z(s,!1))&&(t=e.filter(o=>s.includes(o.key))),this.params.diff&&(t=t.filter(o=>o.type!=="set"||o.value!==o.oldValue)),!t.length)return;if(["inject","defer"].includes(this.params.recursions)){if(this.emit.recursionTarget){this.emit.recursionTarget.push(...t);return}this.emit.recursionTarget=this.params.recursions==="inject"?t:[]}let n=this.filter===1/0||Array.isArray(this.filter)?this.emit(t,this):this.emit(t[0],this);return xe(n,o=>{let a=this.emit.recursionTarget;return delete this.emit.recursionTarget,this.params.recursions==="defer"&&a?.length?this.emit.currentRegistration.fire(a):o})}};var ne=class{constructor(e){this.target=e,this.entries=[]}addRegistration(e){return this.entries.push(e),e}removeRegistration(e){this.entries=this.entries.filter(t=>t!==e)}static _getInstance(e,t,s=!0,n=this.__namespace){if(!x(t))throw new Error(`Subject must be of type object; "${pe(t)}" given!`);let o=this;return n&&O(globalThis,"observerAPI","namespaces").has(e+"-"+n)&&(o=O(globalThis,"observerAPI","namespaces").get(e+"-"+n),e+="-"+n),!O(t,"registry").has(e)&&s&&O(t,"registry").set(e,new o(t)),O(t,"registry").get(e)}static _namespace(e,t,s=null){if(e+="-"+t,arguments.length===2)return O(globalThis,"observerAPI","namespaces").get(e);if(!(s.prototype instanceof this))throw new Error(`The implementation of the namespace ${this.name}.${t} must be a subclass of ${this.name}.`);O(globalThis,"observerAPI","namespaces").set(e,s),s.__namespace=t}};var A=class{constructor(e,t){if(this.target=e,!t.operation)throw new Error("Descriptor operation must be given in definition!");Object.assign(this,t)}get[Symbol.toStringTag](){return"Descriptor"}static[Symbol.hasInstance](e){return e?.[Symbol.toStringTag]==="Descriptor"&&e.operation}};var I=class extends ne{static getInstance(e,t=!0,s=null){return super._getInstance("listeners",...arguments)}static namespace(e,t=null){return super._namespace("listeners",...arguments)}constructor(e){super(e),this.batches=[]}addRegistration(e,t,s){return super.addRegistration(new ve(this,{filter:e,emit:t,params:s}))}emit(e,{eventsArePropertyDescriptors:t=!1,eventIsArrayMethodDescriptor:s=!1}={}){if(this.batches.length){let n=this.batches[0].params.arrayMethodName;this.batches[0].snapshots.push({events:[...e],arrayMethodName:n,eventsArePropertyDescriptors:t,eventIsArrayMethodDescriptor:s});return}this.$emit(this.entries,[{events:e,eventsArePropertyDescriptors:t,eventIsArrayMethodDescriptor:s}])}$emit(e,t){let s=0,n=0,o=0;for(let c of e)s+=1,c.params.withPropertyDescriptors&&(n+=1),c.params.withArrayMethodDescriptors&&(o+=1);let a=[],i=[],f=[],u=[];for(let c of t){let l=c.arrayMethodName,p=c.eventsArePropertyDescriptors,h=c.eventIsArrayMethodDescriptor;for(let m of c.events)if(l&&(m.operation=l),n&&(o&&a.push(m),h||o!==s&&i.push(m)),n!==s){let y=m;if(p){let{target:b,type:_,...w}=m;y=new A(b,{type:"set",...w}),Object.defineProperty(y,"value","get"in w.value?{get:()=>w.value.get()}:{value:w.value.value}),w.oldValue&&Object.defineProperty(y,"oldValue","get"in w.oldValue?{get:()=>w.oldValue.get()}:{value:w.oldValue.value})}o&&f.push(y),h||o!==s&&u.push(y)}}for(let c of e)c.params.withPropertyDescriptors?c.params.withArrayMethodDescriptors?a.length&&c.fire(a):i.length&&c.fire(i):c.params.withArrayMethodDescriptors?f.length&&c.fire(f):u.length&&c.fire(u)}batch(e,t={}){this.batches.unshift({entries:[...this.entries],snapshots:[],params:t});let s=e();return xe(s,n=>{let o=this.batches.shift();return o.snapshots.length&&this.$emit(o.entries,o.snapshots),n})}};var Pe=class extends se{exec(e,t,s){return this.running||!this.traps[e.operation]?t(...Array.prototype.slice.call(arguments,2)):(this.running=!0,this.traps[e.operation](e,s,(...n)=>(this.running=!1,t(...n))))}};var X=class extends ne{static getInstance(e,t=!0,s=null){return super._getInstance("traps",...arguments)}static namespace(e,t=null){return super._namespace("traps",...arguments)}addRegistration(e){return super.addRegistration(new Pe(this,e))}emit(e,t=null){let s=this;return function n(o,...a){let i=s.entries[o];return i?i.exec(e,(...f)=>n(o+1,...f),...a):t?t(e,...a):a[0]}(0)}};var dt={};Be(dt,{accessorize:()=>Fr,proxy:()=>pt,unaccessorize:()=>zr,unproxy:()=>Ee});var nr=Symbol("wqOriginal");function Fr(r,e,t={}){r=mt(r);let s=O(r,"accessorizedProps");function n(f){let u,c=r;do u=Object.getOwnPropertyDescriptor(c,f);while(!u&&(c=Object.getPrototypeOf(c)));return u?{proto:c,descriptor:u}:{descriptor:{value:void 0,configurable:!0,enumerable:!0,writable:!0}}}function o(f){if(s.has(f+""))return!0;let u=n(f);u.getValue=function(p=!1){return p?this.descriptor:this.descriptor.get?this.descriptor.get():this.descriptor.value},u.setValue=function(p,h=!1){if(this.dirty=!0,h){this.descriptor=p;return}return this.descriptor.set?this.descriptor.set(p)!==!1:(this.descriptor.value=p,!0)},u.intact=function(){let p=Object.getOwnPropertyDescriptor(r,f);return p?.get===l.get&&p?.set===l.set&&s.get(f+"")===this},u.restore=function(){return this.intact()?(this.proto&&this.proto!==r||!this.proto&&!this.dirty?delete r[f]:Object.defineProperty(r,f,this.descriptor),s.delete(f+""),!0):!1},s.set(isNaN(f)?f:parseInt(f),u);let{enumerable:c=!0}=u.descriptor,l={enumerable:c,configurable:!0};("value"in u.descriptor||u.descriptor.set)&&(l.set=function(p){return ie(this,f,p,t)}),("value"in u.descriptor||u.descriptor.get)&&(l.get=function(){return Q(this,f,t)});try{return Object.defineProperty(r,f,l),!0}catch{return s.delete(f+""),!1}}let i=(Array.isArray(e)?e:e===void 0?Object.keys(r):[e]).map(o);return e===void 0||Array.isArray(e)?i:i[0]}function zr(r,e,t={}){r=mt(r);let s=O(r,"accessorizedProps");function n(i){return s.has(i+"")?s.get(i+"").restore():!0}let a=(Array.isArray(e)?e:e===void 0?Object.keys(r):[e]).map(n);return e===void 0||Array.isArray(e)?a:a[0]}function pt(r,e={},t=void 0){let s=mt(r);if(typeof e.membrane=="boolean")throw new Error("The params.membrane parameter cannot be of type boolean.");if(e.membrane&&O(s,"membraneRef").has(e.membrane))return O(s,"membraneRef").get(e.membrane);let n={apply:(i,f,u)=>xt(i,f,u,void 0,e),construct:(i,f,u=null)=>wt(i,f,u,e),defineProperty:(i,f,u)=>Se(i,f,u,e),deleteProperty:(i,f)=>Oe(i,f,e),get:(i,f,u=null)=>{if(f===nr)return s;let c={...e,receiver:u},l=Q(i,f,c);return Array.isArray(i)&&typeof l=="function"&&!/^class\s?/.test(Function.prototype.toString.call(l))?pt(l,{...e,arrayMethodName:f,membrane:u},t):e.chainable&&x(l)&&f!=="prototype"&&!(typeof l=="function"&&/^class\s?|\{\s\[native\scode\]\s\}$/.test(Function.prototype.toString.call(l)))?pt(l,e,t):l},getOwnPropertyDescriptor:(i,f)=>De(i,f,e),getPrototypeOf:i=>gt(i,e),has:(i,f)=>ke(i,f,e),isExtensible:i=>yt(i,e),ownKeys:i=>bt(i,e),preventExtensions:i=>vt(i,e),set:(i,f,u,c=null)=>ie(i,f,u,{...e,receiver:c}),setPrototypeOf:(i,f)=>_t(i,f,e)},o=t?.(n)||n,a=new Proxy(s,o);return e.membrane&&O(s,"membraneRef").set(e.membrane,a),a}function Ee(r){return r&&r[nr]||r}function mt(r){if(!r||!x(r))throw new Error("Target must be of type object!");return Ee(r)}var Ae=class extends Array{get[Symbol.toStringTag](){return"Path"}static[Symbol.hasInstance](e){return Array.isArray(e)&&e[Symbol.toStringTag]==="Path"}};function Hr(...r){return new Ae(...r)}var oe=class extends Array{get[Symbol.toStringTag](){return"Subtree"}static[Symbol.hasInstance](e){return Array.isArray(e)&&e[Symbol.toStringTag]==="Subtree"}};function Br(){return new oe}function Wr(){return 1/0}function Pt(r,e,t,s=o=>o,n={}){let o=e instanceof oe;if(!(!o&&!e?.length))return function a(i,f,u,c){let l=c||f[u.level]instanceof oe,p=l?1/0:f[u.level],h=l?!1:u.level===f.length-1;return i instanceof A&&i.operation!=="get"?u={...u,probe:"always"}:u.probe!=="always"&&(u={...u,probe:!h}),t(i,p,(m,...y)=>{let b=d=>{d instanceof A&&(d.path="key"in d?[d.key]:[],i instanceof A&&(d.path="key"in d?i.path.concat(d.key):i.path.slice(0),Object.defineProperty(d,"context",{get:()=>i,configurable:!0})))},_=y[0]||{},w=d=>{if(d instanceof A&&"argumentsList"in d)return;let P=H(d,!1);return xe(P,E=>(d instanceof A?d.value=E:d=E,a(d,f,{...u,..._,keyInParent:d.key,level:u.level+1},l)))};if(Ce(p)&&Array.isArray(m)){if(m.forEach(b),h)return s(m,...y);l&&m[0]instanceof A&&(m[0].operation!=="get"||n.asGet)&&s(m,...y);for(let d of m)w(d);return}return b(m),h?s(m,...y):w(m)},u)}(r,e.slice(0),{...n,level:0},o)}function Et(r,e,t,s={}){let n=H(r,!s.level);if(G(arguments[1])&&([,t,s={}]=arguments,e=1/0),!G(t))throw new Error(`Handler must be a function; "${pe(t)}" given!`);if(e instanceof Ae||e instanceof oe)return Pt(n,e,Et,t,s);if(s={...s,descripted:!0},delete s.live,!x(n))return s.probe&&Q(n,e,t,s)||void 0;let o=ir(n,e,t,s);return s.probe?Q(n,e,o,s):o()}function Vr(r,e,t={}){let s=H(r);return v(e)||([,,,t={}]=arguments,e={[arguments[1]]:arguments[2]}),X.getInstance(s,!0,t.namespace).addRegistration({traps:e,params:t})}function De(r,e,t=n=>n,s={}){return k(r,"getOwnPropertyDescriptor",{key:e},t,s)}function Gr(r,e,t=n=>n,s={}){return k(r,"getOwnPropertyDescriptors",{key:e},t,s)}function gt(r,e=s=>s,t={}){return k(r,"getPrototypeOf",{},e,t)}function yt(r,e=s=>s,t={}){return k(r,"isExtensible",{},e,t)}function bt(r,e=s=>s,t={}){return k(r,"ownKeys",{},e,t)}function ke(r,e,t=n=>n,s={}){return k(r,"has",{key:e},t,s)}function Q(r,e,t=n=>n,s={}){let n,o=H(r,!s.level);return v(t)?[s,t]=[t,a=>a]:s.live&&(n=!0),e instanceof Ae||e instanceof oe?Pt(o,e,Q,t,{...s,asGet:!0}):Qr(o,e,a=>{let i=[...a];return function f(u,c,l){if(!c.length)return l(u);let p=c.shift();if(!["string","number","symbol"].includes(typeof p))throw new Error(`Property name/key ${p} invalid.`);function h(b,_=void 0){let w=E=>(b.value=E,f([...u,s.live||s.descripted?b:E],c,l));if(arguments.length>1)return w(_);if(!x(o))return w(o?.[b.key]);let d=O(o,"accessorizedProps",!1),P=d&&d.get(b.key);if(P&&P.intact())return w(P.getValue(s.withPropertyDescriptors));if(s.withPropertyDescriptors){let E=Object.getOwnPropertyDescriptor(o,b.key);return w(E)}return w(Reflect.get(o,b.key))}let m=new A(o,{type:"get",key:p,value:void 0,operation:"get",related:i});if(!x(o))return h(m);let y=X.getInstance(o,!1,s.namespace);return y?y.emit(m,h):h(m)}([],a.slice(0),f=>{let u=Ce(e)?f:f[0];return n&&x(o)?ir(o,e,t,s,r.key)(u):t(u)})},s)}function St(r,e,t={}){let s=H(r);return I.getInstance(s,!0,t.namespace).batch(e,t)}function Jr(r,e,t={}){e=H(e),r=H(r);let s=(t.only||[]).slice(0),n=(t.except||[]).slice(0),o=Object.keys(t.spread?[...r]:r).map(u=>isNaN(u)?u:parseInt(u)),a=s.length?s.filter(u=>o.includes(u)):o.filter(u=>!n.includes(u)),i=u=>!Array.isArray(e)||isNaN(u)?u:u-n.filter(c=>c<u).length,f=u=>{let c=De(r,u,t);"value"in c&&c.writable&&c.enumerable&&c.configurable?ie(e,i(u),c.value,t):(c.enumerable||t.onlyEnumerable===!1)&&Se(e,u,{...c,configurable:!0},t)};return St(e,()=>{a.forEach(f)}),Et(r,u=>{u.filter(c=>s.length?s.includes(c.key):!n.includes(c.key)).forEach(c=>{if(c.type==="delete")return Oe(e,i(c.key),t);if(c.type==="def"){(c.value.enumerable||t.onlyEnumerable===!1)&&Se(e,i(c.key),{...c.value,configurable:!0},t);return}f(c.key)})},{...t,withPropertyDescriptors:!0})}function ie(r,e,t,s=a=>a,n={},o=!1){let a=H(r),i=[[e,t]];v(e)&&([,,s=u=>u,n={},o=!1]=arguments,i=Object.entries(e)),v(s)&&([o,n,s]=[typeof n=="boolean"?n:o,s,u=>u]);let f=i.map(([u])=>u);return function u(c,l,p){if(!l.length)return p(c);let[h,m]=l.shift();function y(_,w=void 0){let d=U=>(_.status=U,u(c.concat(_),l,p));if(arguments.length>1)return d(_,w);let P=O(a,"accessorizedProps",!1),E=P&&P.get(_.key);return _.type==="def"?(E&&!E.restore()&&d(!1),Object.defineProperty(a,_.key,_.value),d(!0)):E&&E.intact()?d(E.setValue(_.value)):d(Reflect.set(a,_.key,_.value))}function b(_,w){if(n.diff&&m===w)return u(c,l,p);let d=new A(a,{type:o?"def":"set",key:h,value:m,isUpdate:_,oldValue:w,related:[...f],operation:o?"defineProperty":"set",detail:n.detail}),P=X.getInstance(a,!1,n.namespace);return P?P.emit(d,y):y(d)}return ke(a,h,_=>{if(!_)return b(_);if(h==="length"&&Array.isArray(a)&&O(a).has("$length"))return b(!0,O(a).get("$length"));let w={...n,withPropertyDescriptors:o};return Q(a,h,d=>b(_,d),w)},n)}([],i.slice(0),u=>{let c=I.getInstance(a,!1,n.namespace);return c&&c.emit(u,{eventsArePropertyDescriptors:!!o}),s(Ce(e)?u.map(l=>l.status):u[0]?.status)})}function Se(r,e,t,s=o=>o,n={}){return ie(r,e,t,s,n,!0)}function Kr(r,e,t=n=>n,s={}){return ie(r,e,t,s,!0)}function Oe(r,e,t=n=>n,s={}){let n=H(r);v(t)&&([s,t]=[t,i=>i]);let o=z(e,!1),a=[...o];return function i(f,u,c){if(!u.length)return c(f);let l=u.shift();function p(m,y=void 0){let b=d=>(m.status=d,i(f.concat(m),u,c));if(arguments.length>1)return b(m,y);let _=O(n,"accessorizedProps",!1),w=_&&_.get(m.key);return w&&!w.restore()&&b(!1),b(Reflect.deleteProperty(n,m.key))}function h(m){let y=new A(n,{type:"delete",key:l,oldValue:m,related:[...a],operation:"deleteProperty",detail:s.detail}),b=X.getInstance(n,!1,s.namespace);return b?b.emit(y,p):p(y)}return Q(n,l,h,s)}([],o.slice(0),i=>{let f=I.getInstance(n,!1,s.namespace);return f&&f.emit(i),t(Ce(e)?i.map(u=>u.status):i[0].status)})}function Xr(r,e,t=n=>n,s={}){return Oe(...arguments)}function wt(r,e,t=null,s=o=>o,n={}){return k(r,"construct",arguments.length>2?{argumentsList:e,newTarget:t}:{argumentsList:e},s,n)}function xt(r,e,t,s=o=>o,n={}){let o=Ee(e),a;if(Array.isArray(e)){if(n.arrayMethodName){let i=new A(o,{operation:n.arrayMethodName,argumentsList:t});I.getInstance(o,!1,n.namespace)?.emit([i],{eventIsArrayMethodDescriptor:!0})}O(o).set("$length",o.length),a=St(o,()=>k(r,"apply",{thisArgument:e,argumentsList:t},s,n),n),O(o).delete("$length")}else a=k(r,"apply",{thisArgument:o,argumentsList:t},s,n);return a}function _t(r,e,t=n=>n,s={}){return k(r,"setPrototypeOf",{proto:e},t,s)}function vt(r,e=s=>s,t={}){return k(r,"preventExtensions",{},e,t)}function ir(r,e,t,s={}){let n=new AbortController;Le.setMaxListeners?.(0,n.signal),s.signal&&s.signal.addEventListener("abort",()=>n.abort());let o={...s,signal:n.signal},a=I.getInstance(r,!0,o.namespace),i=new Map;return function f(u=[],c=null){let l,p,h;if(Ce(e)){if(c){h=!0,p=c;for(let m of u)i.get(m.key)?.remove(),i.delete(m.key)}else p=a.addRegistration(e,f,o);l={signal:p.signal,childRegistrations:i}}else c?.remove(),p=a.addRegistration(e,f,o),l={signal:p.signal};if(o.childRegistrations&&o.keyInParent&&o.childRegistrations.set(o.keyInParent,p),arguments.length){let m=t(u,l);if(arguments.length>1)return m}return n}}function k(r,e,t={},s=o=>o,n={}){r=H(r),v(s)&&([n,s]=[s,f=>f]);function o(f,u){return arguments.length>1?s(u):s((Reflect[e]||Object[e])(r,...Object.values(t)))}let a=new A(r,{operation:e,...t}),i=X.getInstance(r,!1,n.namespace);return i?i.emit(a,o):o(a)}function Ce(r){return r===1/0||Array.isArray(r)}function H(r,e=!0,t=!0){if((!r||!x(r))&&e)throw new Error(`Object must be of type object or array! "${pe(r)}" given.`);return r instanceof A&&(r.type==="def"&&t?r=typeof r.value.get=="function"?r.value.get():r.value.value:r=r.value),r&&Ee(r)}function Qr(r,e,t,s={}){return e===1/0?s.level&&!x(r)?t([]):t(Object.entries(Object.getOwnPropertyDescriptors(r)).filter(([,n])=>n.writable!==!1&&!n.get&&!n.set).map(([n])=>n)):t(z(e,!1))}var S={...Ot,...dt},or=S;var ae=class r extends URLSearchParams{#s={};#e;get compatMode(){return this.#e}#r=new Set;#t;#n=!1;constructor(e={},{compatMode:t=!0,prettyPrint:s=!1}={}){super(),this.#e=t,this.#t=s;let n;if(e instanceof r)n=structuredClone(e.json()),t&&(this.#r=new Set(e.keys()));else if(e instanceof URLSearchParams||e instanceof FormData)n=Object.fromEntries(e),t&&(this.#r=new Set(e.keys()));else if(K(e)){let o;[n,o]=this.constructor.parse(e,!t,!0),t&&(this.#r=o)}else Array.isArray(e)?(n=this.constructor.fromEntries(e),t&&(this.#r=new Set(e.map(([o])=>o)))):v(e)?(n=e,t&&this.constructor.reduceValue(e,"",(o,a,i)=>{if(i)return i;/\[\d+\]$/.test(a)&&([,a]=/^(.*)\[\d+\]$/.exec(a)),this.#r.add(a)})):n={};this._resetJson(n)}_resetJson(e,t={}){if(!v(e))throw new Error("Argument must be a JSON object");let s=Object.keys(this.#s).filter(n=>!(n in e));return S.batch(this.#s,()=>(s.length&&S.deleteProperties(this.#s,s,t),S.set(this.#s,e,t)),t)}get(e){let t=this.#u(e);return this.#e&&Array.isArray(t)?t[0]:t}#u(e,t=!1){if(this.#e&&!this.#r.has(e))return null;let s=this.constructor.get(this.#s,e,t);return s===void 0?null:Array.isArray(s)?this.#e?s.map(n=>typeof n=="number"?n+"":n):s.map(n=>v(n)?new r(n,{compatMode:this.#e}):n):!this.#e&&v(s)?new r(s,{compatMode:this.#e}):this.#e&&typeof s=="number"?s+"":s}getAll(e){let t=this.#u(e,!0);return t===null?[]:Array.isArray(t)?t:[t]}set(e,t){return this.#e&&this.#r.add(e),this.constructor.set(this.#s,e,t),this}append(e,t){return this.#e&&this.#r.add(e),this.constructor.set(this.#s,e,t,!0),this}has(e){return this.#e&&!this.#r.has(e)?!1:this.constructor.get(this.#s,e)!==void 0}delete(e){if(this.#e&&!this.#r.has(e))return;let t=this.constructor.parsePath(e),s=t.pop(),n=t.length?this.constructor.get(this.#s,t):this.#s;v(n)&&S.deleteProperty(n,s)}sort(){return this.#n=!0,this}json(){return this.#s}stringify({prettyPrint:e=this.#t,sort:t=this.#n}={}){return this.constructor.stringify(this.#s,{only:this.#e&&this.#r,sort:t,prettyPrint:e})}toString(){return this.stringify()}entries(){let e=[];return this.constructor.reduceValue(this.#s,"",(t,s,n)=>{if(n)return n;if(this.#e&&!this.#r.has(s))if(/\[\d+\]$/.test(s)){if([,s]=/^(.*)\[\d+\]$/.exec(s),!this.#r.has(s)&&!this.#r.has(s=`${s}[]`))return}else return;this.#e&&typeof t=="number"&&(t=t+""),e.push([s,t])}),e[Symbol.iterator]()}keys(){return Array.from(this.entries(),([e])=>e)[Symbol.iterator]()}values(){return Array.from(this.entries(),([,e])=>e)[Symbol.iterator]()}forEach(e,t){for(let[s,n]of this.entries())e.call(t,n,s,this)}[Symbol.iterator](){return this.entries()}get size(){let e=0;return this.forEach(()=>e++),e}static parse(e,t=!1,s=!1){let n={},o=new Set;for(let[a,i]of new URLSearchParams(e).entries())this.set(n,a,i,!0,t),s&&o.add(a);return s?[n,o]:n}static fromEntries(e){let t={};for(let[s,n]of e)this.set(t,s,n,!0);return t}static stringify(e,{sort:t=!1,only:s=null,prettyPrint:n=!1}={}){let o={},a=[],i=Object.keys(e);return t&&i.sort(),i.forEach(f=>{this.reduceValue(e[f],f,(u,c,l)=>{if(l)return t?[...l].sort():l;if(s&&!s.has(c))if(/\[\d+\]$/.test(c)){if([,c]=/^(.*)\[\d+\]$/.exec(c),!s.has(c)&&!s.has(c=`${c}[]`))return}else return;n?a.push(c+"="+new URLSearchParams({k:u||""}).toString().split("=")[1]):o[c]=u})}),n?a.join("&"):new URLSearchParams(o).toString()}static get(e,t,s=!1){return this.reducePath(t,e,(n,o,a)=>a||(n===""?s?o:o?.[0]:o?.[n]))}static set(e,t,s,n=!1,o=!1){this.reducePath(t,e,(a,i,f)=>{let u=f??s;return o&&/^-?\d+(\.\d+)?$/.test(u+"")&&(u=parseFloat(u)),a===""&&Array.isArray(i)?S.proxy(i).push(u):n&&i?.[a]?Array.isArray(i[a])?S.proxy(i[a]).push(u):S.set(i,a,[i[a],u]):S.set(i,a,u),u})}static reduceValue(e,t,s){if(x(e)){let n=Object.keys(e),o=s(e,t,n);if(Array.isArray(o)){o.forEach(a=>{this.reduceValue(e[a],t?`${t}[${a}]`:a,s)});return}}s(e,t)}static reducePath(e,t,s){let n=this.parsePath(e),o=t;for(let a=0;a<n.length;a++){let i=n[a];if(J(i)&&(i=+i),a===n.length-1)return s(i,o);if(!x(o))return;if(!x(o[i])){let f=n[a+1];o[i]=s(i,o,J(f)||f===""?[]:{})}o=o[i]}}static parsePath(e){if(Array.isArray(e))return e;if(!K(e))return[];let t=[];return e.replace(/\[([^\]]*)\]|([^[\]]+)/g,(s,n,o)=>{t.push(n??o)}),t}};var B=class r extends FormData{static upgradeInPlace(e){return e instanceof r?e:Object.setPrototypeOf(e,r.prototype)}static json(e={},{encodeLiterals:t=!0,meta:s=!1}={}){let n=new r,o=!0;return ae.reduceValue(e,"",(a,i,f=void 0)=>{if(f){let u=qe(a)==="json";return o=o&&u,u&&f}t&&[!0,!1,null].includes(a)&&(a=new Blob([a+""],{type:"application/json"})),n.append(i,a)}),s?{result:n,isDirectlySerializable:o}:n}async json({decodeLiterals:e=!0,meta:t=!1}={}){let s=!0,n;for(let[o,a]of this.entries()){n||(n=J(Re(o,"["))?[]:{});let i=qe(a);if(e&&["Blob","File"].includes(i)&&a.type==="application/json"&&[4,5].includes(a.size)){let f=JSON.parse(await a.text());[null,!0,!1].includes(f)&&(a=f,i="json")}s=s&&i==="json",/^[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?$/.test(a)&&(a=Number(a)),ae.set(n,o,a)}return t?{result:n,isDirectlySerializable:s}:n}};var ue=(r,...e)=>D(r,"fetch+",...e),C=(r,...e)=>D(r,"fetch+","meta",...e);function Ue(r){return class extends r{static from(e){let t=e.headers instanceof Headers?[...e.headers.entries()].reduce((o,[a,i])=>{let f=a.toLowerCase();return o[f]=o[f]?[].concat(o[f],i):i,o},{}):Object.keys(e.headers||{}).reduce((o,a)=>(o[a.toLowerCase()]=e.headers[a],o),{}),s=e.body,n=[null,void 0].includes(s)?null:qe(s);if(["Blob","File"].includes(n))t["content-type"]??=s.type,t["content-length"]??=s.size;else if(["Uint8Array","Uint16Array","Uint32Array","ArrayBuffer"].includes(n))t["content-length"]??=s.byteLength;else if(n==="json"&&x(s)){let{result:o,isDirectlySerializable:a}=B.json(s,{encodeLiterals:!0,meta:!0});a?(s=JSON.stringify(s,(i,f)=>f instanceof Error?{...f,message:f.message}:f),t["content-type"]="application/json",t["content-length"]=new Blob([s]).size):(s=o,n="FormData")}else["text","json"].includes(n)&&!t["content-length"]&&(t["content-length"]=new Blob([s]).size);return!["FormData",null].includes(n)&&!["function"].includes(typeof s)&&!t["content-type"]&&(t["content-type"]="application/octet-stream"),{body:s,headers:new Headers(t),$type:n}}async formData(){let e=await super.formData();return B.upgradeInPlace(e),e}async any({to:e=null,memo:t=!1}={}){if(e&&!["blob","text","json","arrayBuffer","bytes","formData"].includes(e))throw new Error(`Invalid target type specified: ${e}`);if(this.body===null)return null;let s=C(this,"cache"),n=async i=>{if(!t)return await this[i||"bytes"]();let f=c=>{if(c instanceof FormData){let l=new B;for(let[p,h]of c.entries())l.append(p,h);return l}return(!i||i==="json")&&(Je(c)||Ge(c))?structuredClone(c):c};if(!i&&s.has("original"))return f(s.has("original"));if(i??="bytes",s.has(i))return f(s.get(i));let u;return s.has("memo")?u=s.get("memo").clone()[i]():(s.set("memo",this.clone()),u=await this[i]()),s.set(i,u),f(u)},o=(this.headers.get("Content-Type")||"").split(";")[0].trim(),a;if((!e||["formData","json"].includes(e))&&["multipart/form-data","application/x-www-form-urlencoded"].includes(o)){let i=await n("formData");B.upgradeInPlace(i),e==="json"&&(i=await i.json({decodeLiterals:!0})),a=i}else if((!e||["formData","json"].includes(e))&&o==="application/json"){let i=await n("json");e==="formData"&&(i=B.json(i,{encodeLiterals:!0})),a=i}else if(!e&&(o.startsWith("image/")||o.startsWith("video/")||o.startsWith("audio/")||o.startsWith("application/")&&!["xml","json","javascript","x-www-form-urlencoded"].some(i=>o.includes(i))))a=await n("blob");else if(!e&&(o.startsWith("text/")||o.startsWith("application/")&&["xml","javascript"].some(i=>o.includes(i))))a=await n("text");else{if(["json","formData"].includes(e))throw new Error(`Cannot convert body of type ${o} to ${e}`);a=await n(e)}return a}forget(){C(this,"cache").clear()}}}function qe(r){if(r instanceof FormData)return"FormData";if(r===null||de(r)||$e(r))return"json";if(K(r))return"text";if(x(r)){let e=r[Symbol.toStringTag],t=["Uint8Array","Uint16Array","Uint32Array","ArrayBuffer","Blob","File","FormData","Stream","ReadableStream"].reduce((s,n)=>s||(e===n?n:null),null);if(t)return t;if(v(r)||Array.isArray(r))return"json";if("toString"in r)return"text"}return null}function Zr(r){return r!==null&&typeof r=="object"&&typeof r.read=="function"&&typeof r.pipe=="function"&&typeof r.on=="function"}function At(r){return r instanceof ReadableStream||Zr(r)}var W=class r extends Headers{static upgradeInPlace(e){return e instanceof r?e:Object.setPrototypeOf(e,r.prototype)}set(e,t){if(/^Set-Cookie$/i.test(e)){if(Array.isArray(t)){this.delete(e);for(let s of t)this.append(e,s);return}v(t)&&(t=Ct(t))}return/Cookie/i.test(e)&&(t=ar(t)),/^Content-Range$/i.test(e)&&(t=fr(t)),/^Range$/i.test(e)&&(t=ur(t)),/^Accept$/i.test(e)&&(t=cr(t)),super.set(e,t)}append(e,t){if(/^Set-Cookie$/i.test(e)){if(Array.isArray(t)){for(let s of t)this.append(e,s);return}v(t)&&(t=Ct(t))}return/Cookie/i.test(e)&&(t=ar(t)),/^Content-Range$/i.test(e)&&(t=fr(t)),/^Range$/i.test(e)&&(t=ur(t)),/^Accept$/i.test(e)&&(t=cr(t)),super.append(e,t)}get(e,t=!1){let s=super.get(e);if(/^Set-Cookie$/i.test(e)&&t&&(s=this.getSetCookie().map(n=>{let[o,...a]=n.split(";"),[i,f]=o.split("=").map(c=>c.trim()),u={name:i,value:f};return a.map(c=>c.trim().split("=")).forEach(c=>{u[c[0][0].toLowerCase()+c[0].substring(1).replace("-","")]=c.length===1?!0:c[1]}),u})),/^Cookie$/i.test(e)&&t&&(s=s?.split(";").map(n=>{let[o,a]=n.split("=").map(i=>i.trim());return{name:o,value:a}})||[]),/^Content-Range$/i.test(e)&&s&&t&&(s=ge(s,"bytes ").split("/")),/^Range$/i.test(e)&&t&&(s=s?ge(s,"bytes=").split(",").map(n=>{let o=n.trim().split("-").map(a=>a?parseInt(a,10):null);return o.resolveAgainst=a=>{let i=[...o];return typeof i[1]!="number"?i[1]=a-1:i[1]=Math.min(i[1],a)-1,typeof i[0]!="number"&&(i[0]=i[1]?a-i[1]-1:0),i},o.canResolveAgainst=(a,i)=>{let f=[typeof o[0]=="number"?o[0]:a,typeof o[1]=="number"?o[1]:i-1];return!(f[0]>f[1]||f[0]<a||f[1]>=i)},o.toString=()=>n,o}):[]),/^Accept$/i.test(e)&&s&&t){let n=a=>{let[i,f]=a.trim().split(";").map(u=>u.trim());return[i,parseFloat((f||"q=1").replace("q=",""))]},o=s;s=s.split(",").map(a=>n(a)).sort((a,i)=>a[1]>i[1]?-1:1)||[],s.match=a=>{if(!a)return 0;let i=u=>u.split("/").map(c=>c.trim()),f=i(a+"");return s.reduce((u,[c,l])=>{if(u)return u;let p=i(c);return[0,1].every(h=>f[h]===p[h]||f[h]==="*"||p[h]==="*")?l:0},0)},s.toString=()=>o}return s}};function Ct(r){let e=[`${r.name}=${r.value}`];for(let t in r){if(["name","value"].includes(t))continue;let s=t[0].toUpperCase()+t.substring(1);s==="MaxAge"&&(s="Max-Age"),r[t]!==!1&&e.push(r[t]===!0?s:`${s}=${r[t]}`)}return e.join("; ")}function ar(r){return x(r)&&(r=[].concat(r).map(Ct).join("; ")),r}function ur(r){let e=[];return z(r).forEach((t,s)=>{let n=Array.isArray(t)?t.map(o=>[null,void 0].includes(o)?"":o).join("-"):t+"";s===0&&!n.includes("bytes=")&&(n=`bytes=${n}`),e.push(n)}),e.join(", ")}function fr(r){if(Array.isArray(r)){if(r.length<2||!r[0].includes("-"))throw new Error("A Content-Range array must be in the format: [ 'start-end', 'total' ]");r=`bytes ${r.join("/")}`}return r}function cr(r){return Array.isArray(r)&&(r=r.map(e=>Array.isArray(e)?e.map((t,s)=>s===1&&(t=parseFloat(t),!0)?t===1?"":`;q=${t}`:t.trim()).join(""):e.trim()).join(",")),r}var V=class r extends Ue(Response){constructor(e,t={}){super(e,t),W.upgradeInPlace(this.headers)}static upgradeInPlace(e){return e instanceof r||(Object.setPrototypeOf(e,r.prototype),W.upgradeInPlace(e.headers)),e}static from(e,{memoize:t=!1,...s}={}){if(e instanceof Response)return e;let n;if(typeof e<"u"){let a;({body:e,headers:a,$type:n}=super.from({body:e,headers:s.headers})),s={...s,headers:a}}let o=new this(e,s);if(t){let a=C(o,"cache"),i={json:"json",FormData:"formData",text:"text",ArrayBuffer:"arrayBuffer",Blob:"blob",Bytes:"bytes"};a.set(i[n]||"original",e)}return o}get status(){return this.headers.has("X-Redirect-Code")?200:super.status}clone(){let e=super.clone();r.upgradeInPlace(e);let t=C(this);return ue(e).set("meta",new Map(t)),C(e).has("cache")&&C(e).set("cache",new Map(t.get("cache"))),e}};async function lr(r,e={}){let t=await fetch(r,e);return V.upgradeInPlace(t),t}var Ne=class r extends Ue(Request){constructor(e,t={}){super(e,t),W.upgradeInPlace(this.headers)}static upgradeInPlace(e){return e instanceof r||(Object.setPrototypeOf(e,r.prototype),W.upgradeInPlace(e.headers)),e}static from(e,{memoize:t=!1,...s}={}){if(e instanceof Request)return e;let n,o=s.body;if("body"in s){let{body:i,headers:f,$type:u}=super.from(s);s={...s,body:i,headers:f},n=u}let a=new this(e,s);if(t){let i=C(a,"cache"),f={json:"json",FormData:"formData",text:"text",ArrayBuffer:"arrayBuffer",Blob:"blob",Bytes:"bytes"};i.set(f[n]||"original",o)}return a}static async copy(e,t={}){let n=["method","headers","mode","credentials","cache","redirect","referrer","integrity"].reduce((o,a)=>({...o,[a]:a in t?t[a]:a==="headers"?new Headers(e[a]):e[a]}),{});return["GET","HEAD"].includes(n.method.toUpperCase())?n.body=null:"body"in t?(n.body=t.body,"headers"in t||(n.headers.delete("Content-Type"),n.headers.delete("Content-Length"))):n.body=await e.clone().arrayBuffer(),n.mode==="navigate"&&(n.mode="cors"),{url:t.url||e.url,...n}}clone(){let e=super.clone();r.upgradeInPlace(e);let t=C(this);return ue(e).set("meta",new Map(t)),C(e).has("cache")&&C(e).set("cache",new Map(t.get("cache"))),e}};var q=class extends MessageEvent{static setCurrentTarget(e,t){e.#s=t,e.#e||(e.#e=t)}#s;get currentTarget(){return this.#s}#e;get target(){return this.#e}#r;get eventID(){return this.#r}#t;get data(){return this.#t}#n;get live(){return this.#n}#u;get bubbles(){return this.#u}#o;get forwarded(){return this.#o}#f;get honourDoneMutationFlags(){return this.#f}#c=[];get ports(){return this.#c}constructor(e,{target:t=null,type:s="message",eventID:n,live:o=!1,honourDoneMutationFlags:a=!1,bubbles:i=!1,forwarded:f=!1,ports:u=[]}={}){if(s&&typeof s!="string")throw new TypeError("Where specified, wqEventOptions.type must be a string");if(super(s),this.#t=e,this.#e=t,this.#r=n,this.#n=o,this.#u=i,this.#o=f,this.#f=a,this.#c=u,this.#c.forEach(c=>T.upgradeInPlace(c)),x(this.#t)&&this.#n){if(typeof n!="string")throw new TypeError("eventID must be a non-empty string");Tt.call(t,this.#t,this.#r,{honourDoneMutationFlags:this.#f})}}#h=!1;get immediatePropagationStopped(){return this.#h}stopImmediatePropagation(){this.#h=!0,this.#i=!0,super.stopImmediatePropagation()}#i=!1;get propagationStopped(){return this.#i}stopPropagation(){this.#i=!0,super.stopPropagation()}#d=!1;get defaultPrevented(){return this.#d}preventDefault(){this.#d=!0,super.preventDefault()}respondWith(e,t=[]){for(let s of this.#c)s.postMessage(e,t);return!!this.#c.length}};var fe=class extends Fe(EventTarget){#s;#e;constructor(e,{handshake:t=0,postAwaitsOpen:s=!1}={}){if(super(),typeof t!="number")throw new Error("handshake must be a number");if(t<0||t>2)throw new Error("handshake must be between 0 and 2");if(M(this).set("options",{handshake:t,postAwaitsOpen:s}),this.#s=typeof e=="string"?new WebSocket(e):e,this.constructor.upgradeEvents(this.#s,this),this.#e=new Promise(o=>{this.#s.readyState===WebSocket.OPEN?o():this.#s.addEventListener("open",()=>o(),{once:!0})}),t===0&&this.#e.then(()=>this.start()),this.#s.readyState===WebSocket.CLOSED)try{this.close()}catch{}else this.#s.addEventListener("close",()=>{try{this.close()}catch{}},{once:!0})}static _hydrateMessage(e,t){try{let s;if(typeof t.data=="string"&&v(s=JSON.parse(t.data))&&s[".wq"])return Object.defineProperty(t,"data",{value:s,configurable:!0}),super._hydrateMessage(e,t)}catch{}return t}__postMessage(e,t){this.#e.then(()=>{this.#s.send(JSON.stringify(e),t)})}_close(){this.#s.close()}};var hr=(r,...e)=>D(r,"port+",...e),M=(r,...e)=>D(r,"port+","meta",...e),ce=r=>D(r,"port+","meta").get("options")||{},pr=["addEventListener","addRequestListener","postMessage","postRequest","dispatchEvent","relay","start","readyStateChange","removeEventListener","close"],mr=["options","readyState","onmessage","onmessageerror"],T=class extends dr(EventTarget){constructor({handshake:e=0,postAwaitsOpen:t=!1,...s}={}){if(typeof e!="number")throw new Error("handshake must be a number");if(e<0||e>2)throw new Error("handshake must be between 0 and 2");super(),hr(this,"meta").set("options",{handshake:e,postAwaitsOpen:t,...s})}static[Symbol.hasInstance](e){return Function.prototype[Symbol.hasInstance].call(this,e)?!0:pr.every(t=>typeof e[t]=="function")||mr.every(t=>t in e)}};function dr(r){return class extends r{static upgradeInPlace(e,{handshake:t=0,postAwaitsOpen:s=!1}={}){if(e instanceof T)return e;if(typeof t!="number")throw new Error("handshake must be a number");if(t<0||t>2)throw new Error("handshake must be between 0 and 2");let n=this.prototype;for(let a of pr.concat("_autoStart")){let i=e[a],f=n[a];i&&Object.defineProperty(e,`_${a}`,{value:i.bind(e),configurable:!0}),Object.defineProperty(e,a,{value:f.bind(e),configurable:!0})}for(let a of mr){let i=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),a),f=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(n),a);i&&Object.defineProperty(e,`_${a}`,{...i,configurable:!0}),Object.defineProperty(e,a,{...f,configurable:!0})}return hr(e,"meta").set("options",{handshake:t,postAwaitsOpen:s}),this.upgradeEvents(e),t===0&&e.start(),e}static upgradeEvents(e,t=null){t||(t=e);let s=M(e);if(s.get("events+"))return;let n=M(t),o=ce(t),a=he.call(t),i=le.call(t);e instanceof BroadcastChannel&&(o.clientServerMode==="server"?n.set("clients",new Set):o.clientServerMode==="client"&&n.set("client_id",`client-${(0|Math.random()*9e6).toString(36)}`));let f=c=>{if(c instanceof q)return;if(e===t&&c.stopImmediatePropagation?.(),c=this._hydrateMessage?.(t,c)||c,c.data.ping==="connect"&&typeof c.data?.[".wq"]?.eventID=="string"&&(!(e instanceof WebSocket)||o.handshake)){let m=o.handshake===0||n.get("start.called"),y={isOpen:m};e instanceof BroadcastChannel&&(o.clientServerMode==="server"&&typeof c.data.id=="string"?(n.get("clients").add(c.data.id),y.id="server"):c.data.id==="server"&&n.has("client_id")&&(y.id=n.get("client_id"))),c.ports?.forEach(b=>b.postMessage(y)),m&&(n.set("remote.open.called",!0),t.start());return}if(c.data.ping==="disconnect"&&typeof c.data?.[".wq"]?.eventID=="string"){let m=()=>{n.set("remote.close.called",!0),t.close()};e instanceof BroadcastChannel?o.clientServerMode==="server"&&typeof c.data.id=="string"?(n.get("clients").delete(c.data.id),!n.get("clients").size&&o.autoClose&&!i.close.state&&m()):o.clientServerMode==="client"&&c.data.id==="server"&&m():e instanceof MessagePort&&m();return}let l=c.data,p={};typeof c.data?.[".wq"]?.eventID=="string"&&({message:l,".wq":p}=c.data);let h=new q(l,{target:t,...p,ports:c.ports});t.dispatchEvent(h)},u=c=>{};s.set("internal_call",!0),e.addEventListener("message",f),e.addEventListener("error",u),s.delete("internal_call"),a.add(()=>{e.removeEventListener("message",f),e.removeEventListener("error",u),s.set("events+",!1)}),s.set("events+",!0)}get options(){return{...ce(this)}}get onmessageerror(){return typeof super.onmessageerror<"u"?super.onmessageerror:typeof this._onmessageerror<"u"?this._onmessageerror:null}set onmessageerror(e){if(typeof super.onmessageerror<"u"){super.onmessageerror=e;return}if(e!==null&&typeof e!="function")throw new TypeError("onmessageerror must be a function");if(Object.getOwnPropertyDescriptor(this,"_onmessageerror")?.set){this._onmessageerror=e;return}this._onmessageerror&&this.removeEventListener("messageerror",this._onmessageerror),this.addEventListener("messageerror",e),this._onmessageerror=e}get onmessage(){return typeof super.onmessage<"u"?super.onmessage:typeof this._onmessage<"u"?this._onmessage:null}set onmessage(e){if(typeof super.onmessage<"u"){super.onmessage=e,this._autoStart();return}if(e!==null&&typeof e!="function")throw new TypeError("onmessage must be a function");if(Object.getOwnPropertyDescriptor(this,"_onmessage")?.set){this._onmessage=e,this._autoStart();return}this._onmessage&&this.removeEventListener("message",this._onmessage),this.addEventListener("message",e),this._onmessage=e,this._autoStart()}addEventListener(...e){he.call(this).add(()=>{this._removeEventListener?this._removeEventListener(...e):super.removeEventListener(...e)});let s=this._addEventListener?this._addEventListener(...e):super.addEventListener(...e);return this._autoStart(),s}dispatchEvent(e){e instanceof q&&q.setCurrentTarget(e,this);let t=this._dispatchEvent?this._dispatchEvent(e):super.dispatchEvent(e);return e instanceof q&&Yr.call(this,e),t}postMessage(e,t={}){this._autoStart();let s;t?.portPlusIgnore&&({portPlusIgnore:s,...t}=t);let n=le.call(this);n.messaging.state=!0,n.messaging.resolve(this);let o;if(!s){let{portOptions:f,wqOptions:{relayedFrom:u,...c}}=ze.call(this,e,t);(c.type!=="message"||c.live||c.bubbles||f.transfer?.length&&(this instanceof BroadcastChannel||this instanceof fe))&&(e={message:e,".wq":c}),t=f,o=u}let a=()=>{this._postMessage?this._postMessage(e,t,o):super.postMessage(e,t)};ce(this).postAwaitsOpen?n.open.promise.then(a):a()}addRequestListener(e,t,s={}){let n=async o=>{let a=await t(o);for(let i of o.ports)i.postMessage(a)};this.addEventListener(e,n,s)}postRequest(e,t,s={}){let n;v(t)&&(s={once:!0,...t},n=new Promise(c=>{t=c}));let o=new MessageChannel;T.upgradeInPlace(o.port1),o.port1.start();let{signal:a,once:i=!1,transfer:f=[],...u}=s;return o.port1.addEventListener("message",c=>t(c),{signal:a||void 0,once:i}),a?.addEventListener("abort",()=>{o.port1.close(),o.port2.close()}),this.postMessage(e,{...u,transfer:[o.port2].concat(f)}),n}relay({to:e,from:t,types:s="*",channel:n=null,resolveMessage:o=null,bidirectional:a=!1}={}){if(e&&t)throw new Error('Only one of "to" and "from" may be specified');if(t?e=this:t=this,e===t)throw new Error("Source and target ports cannot be the same");if(!(t instanceof T)||!(e instanceof T))throw new Error("Both source and target ports must be instance of MessagePortPlus.");if(typeof s!="function"&&!(s=[].concat(s)).length)throw new Error("Event types must be specified.");if(typeof n=="string")n={from:n};else if(v(n)){if(Object.keys(n).filter(c=>!["from","to"].includes(c)).length)throw new Error('Channel must be a string or an object of "from"/"to" members')}else if(n)throw new Error("Invalid channel parameter");let i=gr.call(t),f={targetPort:e,types:s,channel:n,resolveMessage:o};i.add(f);let u;return a&&(u=e.relay({to:t,types:s,channel:n&&{to:n.from,from:n.to},resolveMessage:o,bidirectional:!1})),()=>{i.delete(f),u?.()}}channel(e,t=null,{handshake:s=0,postAwaitsOpen:n=!1}={}){let o=new MessageChannel;return T.upgradeInPlace(o.port1,{handshake:s,postAwaitsOpen:n}),T.upgradeInPlace(o.port2,{handshake:s,postAwaitsOpen:n}),he.call(this).add(this.relay({channel:e,to:o.port2,bidirectional:!0,resolveMessage:t})),o.port2.start(),this.readyStateChange("close").then(()=>{o.port2.close()}),o.port1}projectMutations({from:e,to:t,...s}){if(!e||!t||typeof e=="string"&&typeof t=="string"||x(e)&&x(t))throw new Error('Invalid "from"/"to" parameters');if(typeof e=="string"){if(!x(t))throw new Error('Invalid "to" parameter. Object/array expected');return Tt.call(this,t,e,s)}if(typeof t=="string"){if(!x(e))throw new Error('Invalid "from" parameter. Object/array expected');return yr.call(this,e,t,s)}throw new Error('Invalid "from"/"to" parameters')}get readyState(){let e=le.call(this);return e.close.state?"closed":e.open.state?"open":"connecting"}readyStateChange(e){if(!["open","messaging","close"].includes(e))throw new Error(`Invalid readyState query "${e}"`);return le.call(this)[e].promise}_autoStart(){let e=M(this),t=ce(this);!e.get("internal_call")&&t.handshake===1&&this.start()}start(){let e=le.call(this);if(e.open.state)return;let t=M(this),s=ce(this),n=u=>{u&&(e.open.state=!0,e.open.resolve(this));let c=t.get("handshake_channel");setTimeout(()=>{c?.port1.close(),c?.port2.close(),t.delete("handshake_channel")},100)};if(t.get("remote.open.called")){n(!0);return}if(t.get("start.called"))return;if(t.set("start.called",!0),this._start?this._start():super.start?.(),s.handshake===0){n(!0);return}let o=new MessageChannel;t.set("handshake_channel",o),o.port1.onmessage=u=>{this instanceof BroadcastChannel&&s.clientServerMode==="server"&&typeof u.data?.id=="string"&&t.get("clients").add(u.data.id),u.data?.isOpen,n(!0)};let{wqOptions:a}=ze.call(this),i=s.clientServerMode==="server"?"server":s.clientServerMode==="client"?t.get("client_id"):null,f={".wq":a,ping:"connect",id:i};this._postMessage?this._postMessage(f,{transfer:[o.port2]}):super.postMessage(f,{transfer:[o.port2]})}close(...e){let t=le.call(this);if(t.close.state)return;t.close.state=!0;let s=M(this),n=ce(this);if(n.handshake>0&&!s.get("remote.close.called")&&(this instanceof BroadcastChannel||this instanceof MessagePort)){let{wqOptions:o}=ze.call(this),a=n.clientServerMode==="server"?"server":n.clientServerMode==="client"?s.get("client_id"):null,i={".wq":o,ping:"disconnect",id:a};this._postMessage?this._postMessage(i):super.postMessage(i)}this._close?this._close(...e):super.close(...e),t.close.resolve(this),es.call(this)}}}function Fe(r){return class extends dr(r){static _hydrateMessage(e,t){if(typeof t.data?.[".wq"]?.numPorts!="number"||typeof t.data[".wq"].eventID!="string")return t;let s=he.call(e),n=t.data[".wq"].numPorts;Object.defineProperty(t,"ports",{value:[],configurable:!0});for(let o=0;o<n;o++){let a=e.channel(`${t.data[".wq"].eventID}:${o}`);t.ports.push(a)}return t}_postMessage(e,t={}){let{transfer:s=[],...n}=t;if(typeof e?.[".wq"]?.eventID=="string"){let o=he.call(this),a=s.filter(f=>f instanceof MessagePort),i=a.length;for(let f=0;f<i;f++)T.upgradeInPlace(a[f]),o.add(this.relay({channel:`${e[".wq"].eventID}:${f}`,to:a[f],bidirectional:!0})),a[f].start(),a[f].readyStateChange("close").then(()=>{let{wqOptions:u}=ze.call(this),c={".wq":u,ping:"disconnect"};this.postMessage(c,{type:`${e[".wq"].eventID}:${f}:message`})});e[".wq"].numPorts=i}return this.__postMessage(e,n)}}}function Yr(r){if(r.propagationStopped)return;let e=M(this);e.get("parentPort")instanceof EventTarget&&(r.bubbles||e.get("parentPort")?.findPort?.(s=>s===this)&&r instanceof q)&&e.get("parentPort").dispatchEvent(r);let t=gr.call(this);if(t.size&&r instanceof q){let{type:s,eventID:n,data:o,live:a,bubbles:i,ports:f}=r,u=new WeakSet;for(let{targetPort:c,types:l,channel:p,resolveMessage:h}of t){if(u.has(c))continue;let m=s;p.from&&([,m]=new RegExp(`^${p.from.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}:([^:]+)$`).exec(s)||[],!m)||!(typeof l=="function"?l(m,this,c,p):[].concat(l).find(b=>b===m||b==="*"))||(u.add(c),c.postMessage(h?h(o,this,c,p):o,{transfer:f,type:p.to?`${p.to}:${m}`:m,eventID:n,bubbles:i,live:a,forwarded:!0,relayedFrom:this}))}}}function he(){let r=M(this);return r.has("garbage_collection")||r.set("garbage_collection",new Set),r.get("garbage_collection")}function gr(){let r=M(this);return r.has("downstream_registry")||r.set("downstream_registry",new Set),r.get("downstream_registry")}function le(){let r=M(this);if(!r.has("readystate_registry")){let e=t=>(t.promise=new Promise((s,n)=>(t.resolve=s,t.reject=n)),t);r.set("readystate_registry",{open:e({}),messaging:e({}),close:e({})})}return r.get("readystate_registry")}function es(){let r=M(this);for(let e of r.get("garbage_collection")||[])e instanceof AbortController?e.abort():typeof e=="function"&&e();r.get("garbage_collection")?.clear(),r.get("downstream_registry")?.clear()}function ze(r=void 0,e={}){if(Array.isArray(e))e={transfer:e};else if(!e||typeof e!="object")throw new TypeError("transferOrOptions must be an array or an object");let{type:t="message",eventID:s=null,live:n=!1,observing:o=!1,bubbles:a=!1,forwarded:i=!1,relayedFrom:f=null,signal:u=void 0,withArrayMethodDescriptors:c=!1,honourDoneMutationFlags:l=!1,...p}=e;return s||(s=`${t}-${(0|Math.random()*9e6).toString(36)}`),!o&&!i&&x(r)&&n&&!t?.endsWith(".mutate")&&(yr.call(this,r,s,{signal:u||void 0,withArrayMethodDescriptors:c,honourDoneMutationFlags:l}),o=!0),{portOptions:p,wqOptions:{type:t,eventID:s,live:n,observing:o,honourDoneMutationFlags:l,bubbles:a,forwarded:i,relayedFrom:f}}}function yr(r,e,{signal:t,withArrayMethodDescriptors:s=!0,honourDoneMutationFlags:n=!1}={}){if(!x(r))throw new TypeError("data must be a plain object and not a stream");if(typeof e!="string")throw new TypeError("eventID must be a non-empty string");let o=f=>{let u;s&&Array.isArray(f[0].target)&&!f[0].argumentsList&&!["set","defineProperty","deleteProperty"].includes(f[0].operation)||(this.postMessage(f.map(c=>(u=!u&&n&&c.detail?.done,{...c,target:void 0})),{type:`${e}.mutate`}),u&&a.abort())},a=S.observe(r,S.subtree(),o,{signal:t||void 0,withArrayMethodDescriptors:s});return he.call(this).add(a),a}function Tt(r,e,{signal:t,honourDoneMutationFlags:s=!1}={}){if(!x(r))throw new TypeError("data must be a plain object and not a stream");if(typeof e!="string")throw new TypeError("eventID must be a non-empty string");let n=i=>{if(!i.data?.length)return;let f;S.batch(r,()=>{for(let u of i.data){if(f=!f&&s&&u.detail?.done,u.argumentsList){let c=u.path.length?S.get(r,S.path(...u.path)):r;S.proxy(c)[u.operation](...u.argumentsList);continue}if(u.key!=="length"||["set","defineProperty","deleteProperty"].includes(u.operation)){let c=u.path.length===1?r:S.get(r,S.path(...u.path.slice(0,-1)));u.type==="delete"?S.deleteProperty(c,u.key):S.set(c,u.key,u.value)}}}),f&&o()};this.addEventListener(`${e}.mutate`,n,{signal:t||void 0});let o=()=>this.removeEventListener(`${e}.mutate`,n);return he.call(this).add(o),o}var Te=class extends Fe(BroadcastChannel){constructor(e,{handshake:t=0,postAwaitsOpen:s=!1,clientServerMode:n=null,autoClose:o=!1}={}){super(e);let a=M(this);if(typeof t!="number")throw new Error("handshake must be a number");if(t<0||t>2)throw new Error("handshake must be between 0 and 2");if(n&&!["server","client"].includes(n))throw new Error('clientServerMode must be "server" or "client"');a.set("options",{handshake:t,postAwaitsOpen:s,clientServerMode:n,autoClose:o}),this.constructor.upgradeEvents(this),t===0&&this.start()}__postMessage(e,t){BroadcastChannel.prototype.postMessage.call(this,e)}};var He=class r extends EventTarget{get[Symbol.toStringTag](){return"LiveResponse"}static[Symbol.hasInstance](e){return e instanceof EventTarget&&e?.[Symbol.toStringTag]==="LiveResponse"&&typeof e.replaceWith=="function"&&typeof e.now=="function"}static get xHeaderName(){return"X-Message-Port"}static test(e){return e instanceof r?"LiveResponse":e instanceof Me?"LiveProgramHandle":e instanceof Response?"Response":br(e)?"Generator":"Default"}static hasPort(e){return e instanceof r&&e.#p?!0:!!C(e).get("port")||!!e.headers?.get?.(this.xHeaderName)?.trim()}static getPort(e,{handshake:t=1}={}){if(e instanceof r&&e.#p)return e.#p;if(!(e instanceof Response||e instanceof r))return;let s=C(e);if(!s.has("port")){let n=e.headers.get(this.xHeaderName)?.trim();if(!n)return;let[,o,a]=/^(socket|channel):\/\/(.*)$/.exec(n)||[];if(!o||!a)throw new Error(`Unknown port messaging protocol: ${n}`);let i=o==="channel"?new Te(a,{handshake:t,postAwaitsOpen:!0,clientServerMode:"client"}):new fe(a,{handshake:t,postAwaitsOpen:!0});s.set("port",i)}return s.get("port")}static attachPort(e,t){if(t&&!(t instanceof T))throw new Error("Client must be a MessagePortPlus interface");if(e instanceof r){e.#p=t;return}C(e).set("port",t)}static from(e,...t){return e instanceof r?e.clone(...t):new this(e,...t)}#s;#e;#r=new AbortController;#t=new AbortController;constructor(e,...t){super(),this.#s=I.getInstance(this,!0);let s=a=>(a.promise=new Promise((i,f)=>(a.resolve=i,a.reject=f)),a);this.#e={live:s({}),done:s({})};let n=this.#e;(function a(){return n.now=s({}),n.now.refresh=a,n.now})();let o=this.#e.now;this.#a(o,e,...t).catch(a=>{o.reject(a)})}#n=null;get body(){return this.#n}#u=!1;get concurrent(){return this.#u}get bodyUsed(){return!0}#o=new Headers;get headers(){return this.#o}#f=200;get status(){return this.#f}#c="";get statusText(){return this.#c}#h="basic";get type(){return this.#h}#i=!1;get redirected(){return this.#i}#d=null;get url(){return this.#d}get ok(){return this.#f>=200&&this.#f<299}#p;get port(){return this.#p}get readyState(){return this.#e.done.state?"done":this.#e.live.state?"live":"waiting"}readyStateChange(e){if(!["live","now","done"].includes(e))throw new Error(`Invalid readyState query "${e}"`);return this.#e[e].promise}disconnect(e=!1){this.#r.abort(),this.#r=new AbortController,e&&(this.#t.abort(),this.#t=new AbortController)}#l;#g(e){if(this.#e.done.state)throw new Error("Response already done.");return this.#l=e,e.then(t=>{this.#l===e&&(this.#l=null,this.#e.done.state=!0,this.#e.done.resolve(t))}).catch(t=>{this.#l===e&&(this.#l=null,this.#e.done.state=!0,this.#e.done.reject(t))}),e}async now(){return this.#e.now.promise}async replaceWith(e,...t){if(this.readyState==="done")throw new Error("Response already done.");this.disconnect(),await this.#a(null,e,...t)}async#a(e,t,...s){let n=e||this.#e.now.refresh();if(t instanceof Promise)return this.#g(new Promise((p,h)=>{this.#r.signal.addEventListener("abort",()=>{n.aborted=!0,p()}),t.then(async m=>{await this.#a(n,m,...s),p()}).catch(m=>h(m))}));let o=(p,h)=>{if(h=Object.freeze({...h,ok:h.status>=200&&h.status<299,bodyUsed:!0}),p?.aborted){p.resolve(h);return}let m=p||this.#e.now.refresh(),y=h.body;this.#f=h.status,this.#c=h.statusText;for(let[w]of[...this.#o.entries()])this.#o.delete(w);for(let[w,d]of h.headers.entries())this.#o.append(w,d);this.#h=h.type,this.#i=h.redirected,this.#d=h.url;let b=this.#n;this.#n=y,this.#u=!!h.concurrent,this.#p=h.port,this.#u||(this.#t.abort(),this.#t=new AbortController);let _=new A(this,{type:"set",key:"body",value:y,oldValue:b,isUpdate:!0,related:[],operation:"set",detail:null});this.#e.live.state=!0,this.#e.live.resolve(this),m.resolve(h),this.#s.emit([_]),this.dispatchEvent(new Mt(h))},a=(p,h,m)=>{o(p,{body:h,status:200,statusText:"",...m,headers:m.headers instanceof Headers?m.headers:new Headers(m.headers||{}),type:"basic",redirected:!1,url:null})},i=async(p,h,m)=>{let y,b,_=!0;if(h instanceof Response){if(h.bodyUsed)throw new Error("Response body already used");try{y=await V.prototype.any.call(h,{to:"json"})}catch{_=!1,y=await V.prototype.any.call(h)}b=this.constructor.getPort(h,{handshake:2})}else y=(await h.readyStateChange("live")).body,b=h.port;if(o(p,{body:y,status:h.status,statusText:h.statusText,headers:h.headers,concurrent:h.concurrent,...m,port:b,type:h.type,redirected:h.redirected,url:h.url}),h instanceof r){let w=()=>{a(null,h.body,h)};return h.addEventListener("replace",w,{signal:this.#r.signal}),await h.readyStateChange("done"),h.removeEventListener("replace",w),h}if(b){_&&y!==null&&b.projectMutations({from:"initial_response",to:y,signal:this.#t.signal});let w=new Promise(d=>{let P=E=>{let{body:U,...N}=E.data;a(null,U,{...N})};b.addEventListener("response.replace",P,{signal:this.#r.signal}),b.addEventListener("response.done",()=>{b.removeEventListener("response.replace",P),d(this)},{once:!0}),b.readyStateChange("close").then(d)});return b.start(),w}},f=async(p,h,m)=>{let y=await h.next(),b=await y.value;await this.#a(p,b,{done:y.done,...m});let _=y,w=b;for(;!_.done&&!this.#r.signal.aborted;)_=await h.next(),w=await _.value,this.#r.signal.aborted||await this.#a(null,w,{concurrent:m.concurrent,done:m.done===!1?!1:_.done})},u=async(p,h,m)=>(await this.#a(p,h.value,m),S.observe(h,"value",y=>this.#a(null,y.value,{concurrent:m.concurrent,done:!1}),{signal:this.#r.signal}),new Promise(()=>{})),c=typeof s[0]=="function"?s.shift():null,l=v(s[0])?{...s.shift()}:{};if("status"in l&&(l.status=parseInt(l.status),l.status<200||l.status>599))throw new Error(`The status provided (${l.status}) is outside the range [200, 599].`);if("statusText"in l&&(l.statusText=String(l.statusText)),l.headers&&!(l.headers instanceof Headers)&&(l.headers=new Headers(l.headers)),"concurrent"in l&&(l.concurrent=!!l.concurrent),t instanceof Response||t instanceof r){if(c)throw new Error("frameClosure is not supported for responses.");n.donePromise=i(n,t,l)}else if(br(t)){if(c)throw new Error("frameClosure is not supported for generators.");n.donePromise=f(n,t,l)}else if(t instanceof Me){if(c)throw new Error("frameClosure is not supported for live program handles.");n.donePromise=u(n,t,l)}else if(n.donePromise=Promise.resolve(a(n,t,l)),c){let p=x(t)&&!At(t)?S.proxy(t,{chainable:!0,membrane:t}):t;n.donePromise=Promise.resolve(c.call(this,p,this.#t.signal))}return this.#g(l.done===!1?new Promise(()=>{}):n.donePromise),await new Promise((p,h)=>{this.#r.signal.addEventListener("abort",()=>p(!1)),n.donePromise.then(()=>p(!0)).catch(h)})}toResponse({port:e,signal:t}={}){if(e&&!(e instanceof T))throw new Error("Client must be a MessagePortPlus interface");let s=V.from(this.body,{status:this.#f,statusText:this.#c,headers:this.#o}),n=C(this);if(ue(s).set("meta",new Map(n)),!e)return s;x(this.#n)&&!At(this.#n)&&e.projectMutations({from:this.#n,to:"initial_response",signal:AbortSignal.any([this.#t.signal].concat(t||[]))});let o=()=>{let a=Object.fromEntries([...this.headers.entries()]);a?.["set-cookie"]&&(delete a["set-cookie"],console.warn('Warning: The "set-cookie" header is not supported for security reasons and has been removed from the response.')),e.postMessage({body:this.#n,status:this.#f,statusText:this.#c,headers:a,type:this.type,url:this.url,redirect:this.redirect,concurrent:this.#u},{type:"response.replace",live:!0,signal:AbortSignal.any([this.#t.signal].concat(t||[]))})};return this.addEventListener("replace",o,{signal:t||void 0}),this.readyStateChange("done").then(()=>{e.postMessage(null,{type:"response.done"})}),s}async*toGenerator({signal:e}={}){do yield this.body;while(await new Promise(t=>{this.addEventListener("replace",()=>t(!0),{once:!0,signal:e||void 0}),this.readyStateChange("done").then(()=>t(!1))}))}toLiveProgramHandle({signal:e}={}){let t=new Me,s=()=>S.defineProperty(t,"value",{value:this.body,enumerable:!1,configurable:!0});return this.addEventListener("replace",s,{signal:e||void 0}),s(),t}clone(e={}){let t=new this.constructor,s=C(this);return ue(t).set("meta",new Map(s)),t.replaceWith(this,e),t}},br=r=>typeof r?.next=="function"&&typeof r?.throw=="function"&&typeof r?.return=="function",Mt=class extends Event{[Symbol.toStringTag]="ReplaceEvent";static[Symbol.hasInstance](e){return e instanceof Event&&e[Symbol.toStringTag]==="ReplaceEvent"}#s;get data(){return this.#s}constructor(e){super("replace"),this.#s=e}},Me=class{[Symbol.toStringTag]="LiveProgramHandle";static[Symbol.hasInstance](e){return e?.[Symbol.toStringTag]==="LiveProgramHandle"}abort(){}};globalThis.webqit||(globalThis.webqit={});Object.assign(globalThis.webqit,$t);})();
2
2
  //# sourceMappingURL=main.js.map