@mercuryworkshop/scramjet 2.0.6-alpha → 2.0.67-alpha
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/scramjet.js +1 -1
- package/dist/scramjet.js.map +1 -1
- package/dist/scramjet.mjs +1 -1
- package/dist/scramjet.mjs.map +1 -1
- package/dist/scramjet_bundled.js +1 -1
- package/dist/scramjet_bundled.js.map +1 -1
- package/dist/scramjet_bundled.mjs +1 -1
- package/dist/scramjet_bundled.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@ return { apply, construct };
|
|
|
23
23
|
font-weight: bold;
|
|
24
24
|
font-family: monospace;
|
|
25
25
|
font-size: 0.9em;
|
|
26
|
-
`,`${"debug"===A?"color: gray":""}`,...C)},log:function(A,...I){this.fmt("log",A,...I)},warn:function(A,...I){this.fmt("warn",A,...I)},error:function(A,...I){this.fmt("error",A,...I)},debug:function(A,...I){this.fmt("debug",A,...I)},time(A,I,g){let Q,B=(0,C.wU)()-I;Q=B<1?"BLAZINGLY FAST":B<500?"decent speed":"really slow",this.print("debug","[time]",`${g} was ${Q} (${B.toFixed(2)}ms)`)}}},6372(A,I,g){g.d(I,{c:()=>B});var C=g(5994),Q=g(2075);class B{cookies={};byDomain=new Map;defaultPath(A){let I=A.pathname;if(!I||!I.startsWith("/"))return"/";let g=I.lastIndexOf("/");return g<=0?"/":I.slice(0,g)}pathMatches(A,I){return A===I||!!A.startsWith(I)&&(!!I.endsWith("/")||"/"===A.charAt(I.length))}indexCookie(A){let I=A.domain.slice(1),g=this.byDomain.get(I);g||(g=[],this.byDomain.set(I,g)),g.push(A)}unindexCookie(A){let I=A.domain.slice(1),g=this.byDomain.get(I);if(!g)return;let C=g.indexOf(A);C>=0&&g.splice(C,1),0===g.length&&this.byDomain.delete(I)}removeById(A){let I=this.cookies[A];I&&this.unindexCookie(I),delete this.cookies[A]}setCookies(A,I){for(let g of(0,Q.Ay)(A)){let A=g.name.toLowerCase();if(A.startsWith("__secure-")){if(!g.secure)continue}else if(A.startsWith("__host-")&&(!g.secure||g.domain||"/"!==g.path))continue;let Q=!g.domain,B=g.expires?.getTime(),E=Number.isFinite(B)?B:void 0,i={...g,hostOnly:Q,expires:E};i.domain||(i.domain=I.hostname),i.domain.startsWith(".")||(i.domain="."+i.domain),i.path&&i.path.startsWith("/")||(i.path=this.defaultPath(I)),i.sameSite||(i.sameSite="lax");let D=`${i.domain}@${i.path}@${i.name}`;if("number"==typeof i.maxAge)if(Number.isFinite(i.maxAge))if(i.maxAge<=0){this.removeById(D);continue}else i.expires=C.mR.now()+1e3*i.maxAge;else delete i.maxAge;let o=this.cookies[D];o&&this.unindexCookie(o),this.cookies[D]=i,this.indexCookie(i)}}getCookies(A,I,g="strict"){let Q=C.mR.now(),B=A.hostname,E=A.pathname,i=[],D=B;for(;void 0!==D;){let A=this.byDomain.get(D);if(A)for(let C of A){if(void 0!==C.expires&&C.expires<Q||C.hostOnly&&D!==B||C.httpOnly&&I||!this.pathMatches(E,C.path))continue;let A=(C.sameSite??"lax").toLowerCase();if("cross-site"===g){if("none"!==A)continue}else if("lax"===g&&"strict"===A)continue;i.push(C)}let C=D.indexOf(".");D=-1===C?void 0:D.slice(C+1)}return i.map(A=>A.name?`${A.name}=${A.value}`:A.value).join("; ")}load(A){if("object"==typeof A)return void console.error("??");let I=(0,C.P4)(A);this.cookies={},this.byDomain.clear();let g=Object.keys(I);for(let A=0;A<g.length;A++){let C=g[A],Q=I[C];if("string"==typeof Q.expires){let A=Date.parse(Q.expires);Q.expires=Number.isFinite(A)?A:void 0}this.cookies[C]=Q,this.indexCookie(Q)}}clear(){this.cookies={},this.byDomain.clear()}dump(){return(0,C.Xj)(this.cookies)}}},3786(A,I,g){g.d(I,{u:()=>C});class C{headers={};set(A,I){this.headers[A.toLowerCase()]=I}get(A){let I=A.toLowerCase();return I in this.headers?this.headers[I]:null}delete(A){delete this.headers[A.toLowerCase()]}has(A){return A.toLowerCase()in this.headers}toRawHeaders(){let A=[];for(let I in this.headers)A.push([I,this.headers[I]]);return A}toNativeHeaders(){let A=new Headers;for(let I in this.headers)A.set(I,this.headers[I]);return A}static fromRawHeaders(A){let I=new C;for(let[g,C]of A)I.has(g),I.set(g,C);return I}static fromNativeHeaders(A){let I=new C;for(let[g,C]of A.entries())I.set(g,C);return I}clone(){let A=new C;for(let I in this.headers)A.set(I,this.headers[I]);return A}}},1496(A,I,g){g.d(I,{V:()=>i});var C=g(4795),Q=g(3515),B=g(5657),E=g(5994);let i=[{fn:(A,I,g)=>(0,B.Oy)(A,I,g,{navigateType:"location"}),src:["embed","img","frame","input","track"],href:["a","area","image"],data:["object"],action:["form"],formaction:["button","input","textarea","submit"],poster:["video"],"xlink:href":["image"]},{fn:(A,I,g,C)=>{let Q=C?.type?.toLowerCase()==="module"||C?.rel?.toLowerCase()==="modulepreload";return(0,B.Oy)(A,I,g,{isModule:Q})},src:["script"],href:["link"]},{fn:(A,I,g)=>(0,B.Oy)(A,I,g,{topFrame:g.topFrameName,parentFrame:g.parentFrameName,isIframe:"1"}),src:["iframe"]},{fn:(A,I,g)=>null,sandbox:["iframe"]},{fn:(A,I,g)=>A.startsWith("blob:")?(0,B.$n)(A,I,g):(0,B.Oy)(A,I,g),src:["video","audio","source"]},{fn:()=>"",integrity:["script","link"]},{fn:()=>null,nonce:"*",csp:["iframe"],credentialless:["iframe"]},{fn:(A,I,g)=>(0,Q.PV)(A,I,g),srcset:["img","source"],imagesrcset:["link"]},{fn:(A,I,g)=>(0,Q.Qs)(A,I,{origin:new E.xP(g.origin.origin),base:new E.xP(g.origin.origin),topFrameName:g.topFrameName,parentFrameName:g.parentFrameName,referrerPolicy:g.referrerPolicy},{loadScripts:!0,inline:!0,source:g.origin.href,apisource:"set HTMLIFrameElement.prototype.srcdoc"}),srcdoc:["iframe"]},{fn:(A,I,g)=>(0,C.s)(A,I,g),style:"*"},{fn:(A,I,g)=>"_top"===A||"_unfencedTop"===A?g.topFrameName:"_parent"===A?g.parentFrameName:A,target:["a","base"]},{fn:(A,I,g)=>A.startsWith("#")?A:(0,B.Oy)(A,I,g),href:["use","textPath","mpath","feImage","animate","animateMotion","animateTransform","set","discard","linearGradient","radialGradient","pattern","filter"]}]},4e3(A,I,g){g.d(I,{$H:()=>i.$H,$n:()=>D.$n,Ej:()=>i.Ej,GZ:()=>i.GZ,Gx:()=>i.Gx,IP:()=>D.IP,Kq:()=>D.Kq,Kx:()=>i.Kx,Lw:()=>i.Lw,OV:()=>i.OV,Oy:()=>D.Oy,PV:()=>D.PV,QU:()=>i.QU,Qs:()=>D.Qs,Tc:()=>w,U5:()=>o,UV:()=>i.UV,VP:()=>E.V,cP:()=>Q.c,dJ:()=>i.dJ,f9:()=>D.f9,g:()=>i.g,gP:()=>D.gP,ht:()=>D.ht,iP:()=>D.iP,j5:()=>i.j5,nK:()=>D.nK,nb:()=>D.nb,on:()=>D.on,s5:()=>i.s5,sM:()=>D.sM,u3:()=>i.u3,uh:()=>B.u,v2:()=>D.v2});var C=g(5994),Q=g(6372),B=g(3786),E=g(1496),i=g(6965),D=g(2348);function o(A,I,g){let Q=I.config.flags[A];for(let Q in I.config.siteFlags){let B=I.config.siteFlags[Q];if(new C.fs(Q).test(g.href)&&A in B)return B[A]}return Q}let w={version:"2.0.6-alpha",build:"485c623",date:"2026-05-24T14:39:43.900Z"}},6965(A,I,g){g.d(I,{$H:()=>F,Ej:()=>i,GZ:()=>r,Gx:()=>c,Kx:()=>G,Lw:()=>h,OV:()=>K,QU:()=>N,UV:()=>y,dJ:()=>a,g:()=>R,j5:()=>S,s5:()=>e,u3:()=>s});var C=g(5994);let Q=/^[\t\n\f\r ]+|[\t\n\f\r ]+$/g;function B(A){return A.replace(Q,"")}function E(A){return A.toLowerCase()}function i(A){let I=B(A);if(!I)return null;let g=I.indexOf(";"),C=B(-1===g?I:I.slice(0,g));if(!C)return null;let Q=C.indexOf("/");if(Q<=0||Q===C.length-1)return null;let i=B(C.slice(0,Q)),D=B(C.slice(Q+1));return i&&D?{type:i,subtype:D,essence:`${E(i)}/${E(D)}`}:null}function D(A){return"string"==typeof A?i(A):A}let o=new C.YG(["application/font-cff","application/font-otf","application/font-sfnt","application/font-ttf","application/font-woff","application/vnd.ms-fontobject","application/vnd.ms-opentype"]),w=new C.YG(["application/x-rar-compressed","application/zip","application/x-gzip"]),t=new C.YG(["application/ecmascript","application/javascript","application/x-ecmascript","application/x-javascript","text/ecmascript","text/javascript","text/javascript1.0","text/javascript1.1","text/javascript1.2","text/javascript1.3","text/javascript1.4","text/javascript1.5","text/jscript","text/livescript","text/x-ecmascript","text/x-javascript"]);function s(A){let I=D(A);return null!==I&&"image"===E(I.type)}function h(A){let I=D(A);if(!I)return!1;let g=E(I.type);return"audio"===g||"video"===g||"application/ogg"===I.essence}function e(A){let I=D(A);return!!I&&("font"===E(I.type)||o.has(I.essence))}function a(A){let I=D(A);return!!I&&("application/zip"===I.essence||E(I.subtype).endsWith("+zip"))}function S(A){let I=D(A);return null!==I&&w.has(I.essence)}function c(A){let I=D(A);return!!I&&(!!E(I.subtype).endsWith("+xml")||"text/xml"===I.essence||"application/xml"===I.essence)}function y(A){let I=D(A);return null!==I&&"text/html"===I.essence}function r(A){let I=D(A);return!!I&&(!!(c(I)||y(I))||"application/pdf"===I.essence)}function N(A){let I=D(A);return null!==I&&t.has(I.essence)}function F(A){let I=B(A);return!!I&&t.has(E(I))}function G(A){if(null==A)return!0;let I=B(A);return!I||"module"===E(I)||F(I)}function R(A){if(null==A)return!1;let I=B(A);return""!==I&&"module"===E(I)}function K(A){let I=D(A);return!!I&&(!!("text"===E(I.type)||s(I)||e(I)||h(I)||y(I)||N(I)||c(I))||"application/pdf"===I.essence||"application/json"===I.essence)}},6879(A,I,g){g.d(I,{n:()=>D});var C=g(5994);function Q(A){return 9===A||10===A||12===A||13===A||32===A}function B(A,I){for(;I<A.length&&Q(A.charCodeAt(I));)I+=1;return I}function E(A){return A>=48&&A<=57}function i(A){return A>=65&&A<=90||A>=97&&A<=122}function D(A){if(0===A.length)return null;let I=0,g=I=B(A,0);for(;I<A.length&&E(A.charCodeAt(I));)I+=1;let D=A.slice(g,I);if(0===D.length&&46!==A.charCodeAt(I))return null;let o=D.length>0?(0,C.dE)(D,10):0;for(;I<A.length;){let g=A.charCodeAt(I);if(E(g)||46===g){I+=1;continue}break}if(I>=A.length)return{time:o,urlStart:-1,urlEnd:-1,url:null};let w=A.charCodeAt(I);if(59!==w&&44!==w&&!Q(w))return null;if((I=B(A,I))<A.length){let g=A.charCodeAt(I);(59===g||44===g)&&(I+=1)}if((I=B(A,I))>=A.length)return{time:o,urlStart:-1,urlEnd:-1,url:null};let t=I,s=A.slice(I,I+3);if(3===s.length){let g=A.charCodeAt(I),C=A.charCodeAt(I+1),Q=A.charCodeAt(I+2);if(i(g)&&i(C)&&i(Q)&&("U"===s[0]||"u"===s[0])&&("R"===s[1]||"r"===s[1])&&("L"===s[2]||"l"===s[2])){let g=I+3;g=B(A,g),61===A.charCodeAt(g)&&(g+=1,t=g=B(A,g))}}let h="";if(t<A.length){let I=A.charCodeAt(t);(34===I||39===I)&&(h=A[t],t+=1)}let e=A.length;if(""!==h){let I=A.indexOf(h,t);-1!==I&&(e=I)}let a=A.slice(t,e);return{time:o,urlStart:t,urlEnd:e,url:a}}},4795(A,I,g){g.d(I,{f:()=>E,s:()=>B});var C=g(5657),Q=g(5994);function B(A,I,g){return i("rewrite",A,I,g)}function E(A,I){return i("unrewrite",A,I)}function i(A,I,g,B){return(I=(I=(0,Q.Qf)(I)).replace(/(?i:url)\(['"]?(.+?)['"]?\)/gm,(I,Q)=>{let E="rewrite"===A?(0,C.Oy)(Q.trim(),g,B):(0,C.v2)(Q.trim(),g);return I.replace(Q,E)})).replace(/@import\s+((?i:url)\s*?\(.{0,9999}?\)|['"].{0,9999}?['"]|.{0,9999}?)($|\s|;)/gm,(I,Q)=>I.replace(Q,Q.replace(/^(url\(['"]?|['"]|)(.+?)(['"]|['"]?\)|)$/gm,(I,Q,E,i)=>{if(Q.startsWith("url"))return I;let D="rewrite"===A?(0,C.Oy)(E.trim(),g,B):(0,C.v2)(E.trim(),g);return`${Q}${D}${i}`})))}},3515(A,I,g){g.d(I,{Kq:()=>r,PV:()=>R,Qs:()=>F,nK:()=>G});var C=g(1894),Q=g(5883),B=g(2026),E=g(1258),i=g(5657),D=g(4795),o=g(6549),w=g(1496),t=g(6879),s=g(8254),h=g(3129),e=g(5994),a=g(4e3),S=g(6965),c=g(7742).A;let y={encodeEntities:"utf8",decodeEntities:!1};class r{context;meta;htmlcontext;handler;parser;completedElements=new WeakSet;emittedLengths=new WeakMap;rewrittenNodes=new WeakMap;ended=!1;constructor(A,I,g){this.context=A,this.meta=I,this.htmlcontext=g,this.handler=new B.DV(void 0,void 0,A=>{this.completedElements.add(A)}),this.parser=new Q.i(this.handler,{startingForeignContext:g.foreignContext})}write(A){if(this.ended)throw Error("IncrementalHtmlRewriter stream already ended");return this.parser.write(A),this.flush()}end(A=""){return this.ended?"":(A&&this.parser.write(A),this.parser.end(),this.ended=!0,this.flush())}flush(){let A="";for(let I of this.handler.root.childNodes){let g=this.getAvailableOutput(I);if(null===g)break;let C=this.emittedLengths.get(I)??0;g.length>C&&(A+=g.slice(C),this.emittedLengths.set(I,g.length))}return A}getAvailableOutput(A){if(A.type!==C.vw&&A.type!==C.eF&&A.type!==C.OF)return(0,E.A)(A,y);if(!this.completedElements.has(A))return null;let I=this.rewrittenNodes.get(A);return void 0===I&&(I=N(A,this.context,this.meta,this.htmlcontext),this.rewrittenNodes.set(A,I)),I}}function N(A,I,g,a){var r;let N,F,G;"string"!=typeof A&&(r=A,A=(0,E.A)(r,y));let R=new B.DV((A,I)=>I),M=new Q.i(R,{startingForeignContext:a.foreignContext});M.write(A),M.end(),h.C.dispatch(I.hooks.rewriter.html.pre,{handler:R,meta:g,htmlcontext:a,origHtml:A},void 0),function A(I,g,C){if("base"===I.name&&void 0!==I.attribs.href&&(C.base=new e.xP(I.attribs.href,C.origin)),I.attribs){for(let A of w.V)for(let Q in A){let B=A[Q.toLowerCase()];if("function"!=typeof B&&("*"===B||B.includes(I.name))&&void 0!==I.attribs[Q]){let B=I.attribs[Q],E=A.fn(B,g,C,I.attribs);null===E?delete I.attribs[Q]:I.attribs[Q]=E,I.attribs[`scramjet-attr-${Q}`]=B}}for(let[A,Q]of(0,e.nJ)(I.attribs))K.includes(A)&&(I.attribs[`scramjet-attr-${A}`]=Q,I.attribs[A]=(0,o.o)(Q,`(inline ${A} on element)`,g,C))}if("style"===I.name&&void 0!==I.children[0]&&(I.children[0].data=(0,D.s)(I.children[0].data,g,C)),"script"===I.name&&I.attribs.type?.toLowerCase()==="importmap"&&void 0!==I.children[0]){let A=I.children[0].data;try{let Q=(0,e.P4)(A);if(Q.imports)for(let A in Q.imports){let I=Q.imports[A];"string"==typeof I&&(I=(0,i.Oy)(I,g,C,{isModule:!0}),Q.imports[A]=I)}I.children[0].data=(0,e.Xj)(Q)}catch(A){c.error("Failed to parse importmap JSON:",A)}}if("script"===I.name&&(0,S.Kx)(I.attribs.type)&&void 0!==I.children[0]){let A=I.children[0].data,Q=(0,S.g)(I.attribs.type);I.attribs["scramjet-attr-script-source-src"]=(0,s.i)((0,e.vh)(A)),A=A.replace(/<!--[\s\S]*?-->/g,""),I.children[0].data=(0,o.o)(A,"(inline script element)",g,C,Q)}if("meta"===I.name&&void 0!==I.attribs["http-equiv"]){if("content-security-policy"===I.attribs["http-equiv"].toLowerCase())I=new B.Mw(I.attribs.content);else if("refresh"===I.attribs["http-equiv"].toLowerCase()){let A=(0,t.n)(I.attribs.content||"");if(A&&null!==A.url&&A.url.length>0){let Q=(0,i.Oy)(A.url.trim(),g,C);I.attribs.content=I.attribs.content.slice(0,A.urlStart)+Q+I.attribs.content.slice(A.urlEnd)}}}if(I.childNodes)for(let Q in I.childNodes)I.childNodes[Q]=A(I.childNodes[Q],g,C);return I}(R.root,I,g);let k=function(){for(let A of R.root.childNodes)if(A.type!==C.WL&&A.type!==C.Mw&&A.type!==C.EY)if(A.type!==C.vw||"html"!==A.name)return!0;else N=A;if(!N)return!0;for(let A of N.childNodes)if(A.type!==C.WL&&A.type!==C.Mw&&A.type!==C.EY){if(A.type===C.vw&&"head"===A.name){if(G)return!0;F=A}else if(A.type===C.vw&&"body"===A.name)G=A;else if(!F)return!0;return!1}}();if(a.loadScripts){let A=I.interface.getInjectScripts(g,R,a,A=>new B.Hg("script",{src:A,"scramjet-injected":"true"}));k?(c.warn(`detected quirky document structure parsing @ ${g.origin.href}!`),R.root.children.unshift(...A)):(F||(F=new B.Hg("head",{},[]),N.children.unshift(F)),F.children.unshift(...A))}let U={};return(h.C.dispatch(I.hooks.rewriter.html.post,{handler:R,meta:g,htmlcontext:a,origHtml:A},U),void 0!==U.setRawHtml)?U.setRawHtml:(0,E.A)(R.root,y)}function F(A,I,g,C){let Q=(0,e.wU)(),B=N(A,I,g,C);return(0,a.U5)("rewriterLogs",I,g.base)&&c.time(g,Q,"html rewrite"),B}function G(A,I){let g=new B.DV((A,I)=>I),C=new Q.i(g,{startingForeignContext:I});return C.write(A),C.end(),!function A(I){if("attribs"in I)for(let A in I.attribs){if("scramjet-attr-script-source-src"==A){I.children[0]&&"data"in I.children[0]&&(I.children[0].data=(0,e.lw)(I.attribs[A]));continue}A.startsWith("scramjet-attr-")&&(I.attribs[A.slice(14)]=I.attribs[A],delete I.attribs[A])}if("childNodes"in I)for(let g of I.childNodes)A(g)}(g.root),(0,E.A)(g.root,{...y})}function R(A,I,g){return A.split(/ .*,/).map(A=>A.trim()).map(A=>{let[C,...Q]=A.split(/\s+/),B=(0,i.Oy)(C.trim(),I,g);return Q.length>0?`${B} ${Q.join(" ")}`:B}).join(", ")}let K=["onbeforexrselect","onabort","onbeforeinput","onbeforematch","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontentvisibilityautostatechange","oncontextlost","oncontextmenu","oncontextrestored","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel","onauxclick","ongotpointercapture","onlostpointercapture","onpointerdown","onpointermove","onpointerrawupdate","onpointerup","onpointercancel","onpointerover","onpointerout","onpointerenter","onpointerleave","onselectstart","onselectionchange","onanimationend","onanimationiteration","onanimationstart","ontransitionrun","ontransitionstart","ontransitionend","ontransitioncancel","oncopy","oncut","onpaste","onscrollend","onscrollsnapchange","onscrollsnapchanging"]},2348(A,I,g){g.d(I,{$n:()=>E.$n,IP:()=>E.IP,Kq:()=>Q.Kq,Oy:()=>E.Oy,PV:()=>Q.PV,Qs:()=>Q.Qs,f9:()=>C.f,gP:()=>B.g,ht:()=>D.h,iP:()=>i.i,nK:()=>Q.nK,nb:()=>D.n,on:()=>B.o,sM:()=>C.s,v2:()=>E.v2});var C=g(4795),Q=g(3515),B=g(6549),E=g(5657),i=g(1668),D=g(3430)},6549(A,I,g){g.d(I,{g:()=>i,o:()=>D});var C=g(4e3),Q=g(3430),B=g(5994),E=g(7742).A;function i(A,I,g,D,o=!1){return function(A,I,g,i,D){let[o,w]=(0,Q.n)(g,i),t={};for(let A of(0,B.BR)(g.config.flags))t[A]=(0,C.U5)(A,g,i.base);try{let Q,w=(0,B.wU)();Q="string"==typeof A?o.rewrite_js({...g.config.globals,prefix:g.prefix.pathname},t,g.interface.codecEncode,A,i.base.href,I||"(unknown)",D):o.rewrite_js_bytes({...g.config.globals,prefix:g.prefix.pathname},t,g.interface.codecEncode,A,i.base.href,I||"(unknown)",D),(0,C.U5)("rewriterLogs",g,i.base)&&E.time(i,w,`oxc rewrite for "${I||"(unknown)"}"`);let{js:s,map:h,scramtag:e,errors:a}=Q;return{js:"string"==typeof A?(0,B.hS)(s):s,tag:e,map:h,errors:a}}finally{w()}}(A,I,g,D,o)}function D(A,I,g,Q,o=!1){try{let D=i(A,I,g,Q,o),w=D.js;if((0,C.U5)("sourcemaps",g,Q.base)){let A=globalThis[g.config.globals.pushsourcemapfn];if(A)A((0,B.Z7)(D.map),D.tag);else{"string"!=typeof w&&(w=(0,B.hS)(w));let A=`${g.config.globals.pushsourcemapfn}([${D.map.join(",")}], "${D.tag}");`,I=new B.fs(/^\s*(['"])use strict\1;?/);w=I.test(w)?w.replace(I,`$&
|
|
26
|
+
`,`${"debug"===A?"color: gray":""}`,...C)},log:function(A,...I){this.fmt("log",A,...I)},warn:function(A,...I){this.fmt("warn",A,...I)},error:function(A,...I){this.fmt("error",A,...I)},debug:function(A,...I){this.fmt("debug",A,...I)},time(A,I,g){let Q,B=(0,C.wU)()-I;Q=B<1?"BLAZINGLY FAST":B<500?"decent speed":"really slow",this.print("debug","[time]",`${g} was ${Q} (${B.toFixed(2)}ms)`)}}},6372(A,I,g){g.d(I,{c:()=>B});var C=g(5994),Q=g(2075);class B{cookies={};byDomain=new Map;defaultPath(A){let I=A.pathname;if(!I||!I.startsWith("/"))return"/";let g=I.lastIndexOf("/");return g<=0?"/":I.slice(0,g)}pathMatches(A,I){return A===I||!!A.startsWith(I)&&(!!I.endsWith("/")||"/"===A.charAt(I.length))}indexCookie(A){let I=A.domain.slice(1),g=this.byDomain.get(I);g||(g=[],this.byDomain.set(I,g)),g.push(A)}unindexCookie(A){let I=A.domain.slice(1),g=this.byDomain.get(I);if(!g)return;let C=g.indexOf(A);C>=0&&g.splice(C,1),0===g.length&&this.byDomain.delete(I)}removeById(A){let I=this.cookies[A];I&&this.unindexCookie(I),delete this.cookies[A]}setCookies(A,I){for(let g of(0,Q.Ay)(A)){let A=g.name.toLowerCase();if(A.startsWith("__secure-")){if(!g.secure)continue}else if(A.startsWith("__host-")&&(!g.secure||g.domain||"/"!==g.path))continue;let Q=!g.domain,B=g.expires?.getTime(),E=Number.isFinite(B)?B:void 0,i={...g,hostOnly:Q,expires:E};i.domain||(i.domain=I.hostname),i.domain.startsWith(".")||(i.domain="."+i.domain),i.path&&i.path.startsWith("/")||(i.path=this.defaultPath(I)),i.sameSite||(i.sameSite="lax");let D=`${i.domain}@${i.path}@${i.name}`;if("number"==typeof i.maxAge)if(Number.isFinite(i.maxAge))if(i.maxAge<=0){this.removeById(D);continue}else i.expires=C.mR.now()+1e3*i.maxAge;else delete i.maxAge;let o=this.cookies[D];o&&this.unindexCookie(o),this.cookies[D]=i,this.indexCookie(i)}}getCookies(A,I,g="strict"){let Q=C.mR.now(),B=A.hostname,E=A.pathname,i=[],D=B;for(;void 0!==D;){let A=this.byDomain.get(D);if(A)for(let C of A){if(void 0!==C.expires&&C.expires<Q||C.hostOnly&&D!==B||C.httpOnly&&I||!this.pathMatches(E,C.path))continue;let A=(C.sameSite??"lax").toLowerCase();if("cross-site"===g){if("none"!==A)continue}else if("lax"===g&&"strict"===A)continue;i.push(C)}let C=D.indexOf(".");D=-1===C?void 0:D.slice(C+1)}return i.map(A=>A.name?`${A.name}=${A.value}`:A.value).join("; ")}load(A){if("object"==typeof A)return void console.error("??");let I=(0,C.P4)(A);this.cookies={},this.byDomain.clear();let g=Object.keys(I);for(let A=0;A<g.length;A++){let C=g[A],Q=I[C];if("string"==typeof Q.expires){let A=Date.parse(Q.expires);Q.expires=Number.isFinite(A)?A:void 0}this.cookies[C]=Q,this.indexCookie(Q)}}clear(){this.cookies={},this.byDomain.clear()}dump(){return(0,C.Xj)(this.cookies)}}},3786(A,I,g){g.d(I,{u:()=>C});class C{headers={};set(A,I){this.headers[A.toLowerCase()]=I}get(A){let I=A.toLowerCase();return I in this.headers?this.headers[I]:null}delete(A){delete this.headers[A.toLowerCase()]}has(A){return A.toLowerCase()in this.headers}toRawHeaders(){let A=[];for(let I in this.headers)A.push([I,this.headers[I]]);return A}toNativeHeaders(){let A=new Headers;for(let I in this.headers)A.set(I,this.headers[I]);return A}static fromRawHeaders(A){let I=new C;for(let[g,C]of A)I.has(g),I.set(g,C);return I}static fromNativeHeaders(A){let I=new C;for(let[g,C]of A.entries())I.set(g,C);return I}clone(){let A=new C;for(let I in this.headers)A.set(I,this.headers[I]);return A}}},1496(A,I,g){g.d(I,{V:()=>i});var C=g(4795),Q=g(3515),B=g(5657),E=g(5994);let i=[{fn:(A,I,g)=>(0,B.Oy)(A,I,g,{navigateType:"location"}),src:["embed","img","frame","input","track"],href:["a","area","image"],data:["object"],action:["form"],formaction:["button","input","textarea","submit"],poster:["video"],"xlink:href":["image"]},{fn:(A,I,g,C)=>{let Q=C?.type?.toLowerCase()==="module"||C?.rel?.toLowerCase()==="modulepreload";return(0,B.Oy)(A,I,g,{isModule:Q})},src:["script"],href:["link"]},{fn:(A,I,g)=>(0,B.Oy)(A,I,g,{topFrame:g.topFrameName,parentFrame:g.parentFrameName,isIframe:"1"}),src:["iframe"]},{fn:(A,I,g)=>null,sandbox:["iframe"]},{fn:(A,I,g)=>A.startsWith("blob:")?(0,B.$n)(A,I,g):(0,B.Oy)(A,I,g),src:["video","audio","source"]},{fn:()=>"",integrity:["script","link"]},{fn:()=>null,nonce:"*",csp:["iframe"],credentialless:["iframe"]},{fn:(A,I,g)=>(0,Q.PV)(A,I,g),srcset:["img","source"],imagesrcset:["link"]},{fn:(A,I,g)=>(0,Q.Qs)(A,I,{origin:new E.xP(g.origin.origin),base:new E.xP(g.origin.origin),topFrameName:g.topFrameName,parentFrameName:g.parentFrameName,referrerPolicy:g.referrerPolicy},{loadScripts:!0,inline:!0,source:g.origin.href,apisource:"set HTMLIFrameElement.prototype.srcdoc"}),srcdoc:["iframe"]},{fn:(A,I,g)=>(0,C.s)(A,I,g),style:"*"},{fn:(A,I,g)=>"_top"===A||"_unfencedTop"===A?g.topFrameName:"_parent"===A?g.parentFrameName:A,target:["a","base"]},{fn:(A,I,g)=>A.startsWith("#")?A:(0,B.Oy)(A,I,g),href:["use","textPath","mpath","feImage","animate","animateMotion","animateTransform","set","discard","linearGradient","radialGradient","pattern","filter"]}]},4e3(A,I,g){g.d(I,{$H:()=>i.$H,$n:()=>D.$n,Ej:()=>i.Ej,GZ:()=>i.GZ,Gx:()=>i.Gx,IP:()=>D.IP,Kq:()=>D.Kq,Kx:()=>i.Kx,Lw:()=>i.Lw,OV:()=>i.OV,Oy:()=>D.Oy,PV:()=>D.PV,QU:()=>i.QU,Qs:()=>D.Qs,Tc:()=>w,U5:()=>o,UV:()=>i.UV,VP:()=>E.V,cP:()=>Q.c,dJ:()=>i.dJ,f9:()=>D.f9,g:()=>i.g,gP:()=>D.gP,ht:()=>D.ht,iP:()=>D.iP,j5:()=>i.j5,nK:()=>D.nK,nb:()=>D.nb,on:()=>D.on,s5:()=>i.s5,sM:()=>D.sM,u3:()=>i.u3,uh:()=>B.u,v2:()=>D.v2});var C=g(5994),Q=g(6372),B=g(3786),E=g(1496),i=g(6965),D=g(2348);function o(A,I,g){let Q=I.config.flags[A];for(let Q in I.config.siteFlags){let B=I.config.siteFlags[Q];if(new C.fs(Q).test(g.href)&&A in B)return B[A]}return Q}let w={version:"2.0.67-alpha",build:"64137c2",date:"2026-05-24T14:59:24.450Z"}},6965(A,I,g){g.d(I,{$H:()=>F,Ej:()=>i,GZ:()=>r,Gx:()=>c,Kx:()=>G,Lw:()=>h,OV:()=>K,QU:()=>N,UV:()=>y,dJ:()=>a,g:()=>R,j5:()=>S,s5:()=>e,u3:()=>s});var C=g(5994);let Q=/^[\t\n\f\r ]+|[\t\n\f\r ]+$/g;function B(A){return A.replace(Q,"")}function E(A){return A.toLowerCase()}function i(A){let I=B(A);if(!I)return null;let g=I.indexOf(";"),C=B(-1===g?I:I.slice(0,g));if(!C)return null;let Q=C.indexOf("/");if(Q<=0||Q===C.length-1)return null;let i=B(C.slice(0,Q)),D=B(C.slice(Q+1));return i&&D?{type:i,subtype:D,essence:`${E(i)}/${E(D)}`}:null}function D(A){return"string"==typeof A?i(A):A}let o=new C.YG(["application/font-cff","application/font-otf","application/font-sfnt","application/font-ttf","application/font-woff","application/vnd.ms-fontobject","application/vnd.ms-opentype"]),w=new C.YG(["application/x-rar-compressed","application/zip","application/x-gzip"]),t=new C.YG(["application/ecmascript","application/javascript","application/x-ecmascript","application/x-javascript","text/ecmascript","text/javascript","text/javascript1.0","text/javascript1.1","text/javascript1.2","text/javascript1.3","text/javascript1.4","text/javascript1.5","text/jscript","text/livescript","text/x-ecmascript","text/x-javascript"]);function s(A){let I=D(A);return null!==I&&"image"===E(I.type)}function h(A){let I=D(A);if(!I)return!1;let g=E(I.type);return"audio"===g||"video"===g||"application/ogg"===I.essence}function e(A){let I=D(A);return!!I&&("font"===E(I.type)||o.has(I.essence))}function a(A){let I=D(A);return!!I&&("application/zip"===I.essence||E(I.subtype).endsWith("+zip"))}function S(A){let I=D(A);return null!==I&&w.has(I.essence)}function c(A){let I=D(A);return!!I&&(!!E(I.subtype).endsWith("+xml")||"text/xml"===I.essence||"application/xml"===I.essence)}function y(A){let I=D(A);return null!==I&&"text/html"===I.essence}function r(A){let I=D(A);return!!I&&(!!(c(I)||y(I))||"application/pdf"===I.essence)}function N(A){let I=D(A);return null!==I&&t.has(I.essence)}function F(A){let I=B(A);return!!I&&t.has(E(I))}function G(A){if(null==A)return!0;let I=B(A);return!I||"module"===E(I)||F(I)}function R(A){if(null==A)return!1;let I=B(A);return""!==I&&"module"===E(I)}function K(A){let I=D(A);return!!I&&(!!("text"===E(I.type)||s(I)||e(I)||h(I)||y(I)||N(I)||c(I))||"application/pdf"===I.essence||"application/json"===I.essence)}},6879(A,I,g){g.d(I,{n:()=>D});var C=g(5994);function Q(A){return 9===A||10===A||12===A||13===A||32===A}function B(A,I){for(;I<A.length&&Q(A.charCodeAt(I));)I+=1;return I}function E(A){return A>=48&&A<=57}function i(A){return A>=65&&A<=90||A>=97&&A<=122}function D(A){if(0===A.length)return null;let I=0,g=I=B(A,0);for(;I<A.length&&E(A.charCodeAt(I));)I+=1;let D=A.slice(g,I);if(0===D.length&&46!==A.charCodeAt(I))return null;let o=D.length>0?(0,C.dE)(D,10):0;for(;I<A.length;){let g=A.charCodeAt(I);if(E(g)||46===g){I+=1;continue}break}if(I>=A.length)return{time:o,urlStart:-1,urlEnd:-1,url:null};let w=A.charCodeAt(I);if(59!==w&&44!==w&&!Q(w))return null;if((I=B(A,I))<A.length){let g=A.charCodeAt(I);(59===g||44===g)&&(I+=1)}if((I=B(A,I))>=A.length)return{time:o,urlStart:-1,urlEnd:-1,url:null};let t=I,s=A.slice(I,I+3);if(3===s.length){let g=A.charCodeAt(I),C=A.charCodeAt(I+1),Q=A.charCodeAt(I+2);if(i(g)&&i(C)&&i(Q)&&("U"===s[0]||"u"===s[0])&&("R"===s[1]||"r"===s[1])&&("L"===s[2]||"l"===s[2])){let g=I+3;g=B(A,g),61===A.charCodeAt(g)&&(g+=1,t=g=B(A,g))}}let h="";if(t<A.length){let I=A.charCodeAt(t);(34===I||39===I)&&(h=A[t],t+=1)}let e=A.length;if(""!==h){let I=A.indexOf(h,t);-1!==I&&(e=I)}let a=A.slice(t,e);return{time:o,urlStart:t,urlEnd:e,url:a}}},4795(A,I,g){g.d(I,{f:()=>E,s:()=>B});var C=g(5657),Q=g(5994);function B(A,I,g){return i("rewrite",A,I,g)}function E(A,I){return i("unrewrite",A,I)}function i(A,I,g,B){return(I=(I=(0,Q.Qf)(I)).replace(/(?i:url)\(['"]?(.+?)['"]?\)/gm,(I,Q)=>{let E="rewrite"===A?(0,C.Oy)(Q.trim(),g,B):(0,C.v2)(Q.trim(),g);return I.replace(Q,E)})).replace(/@import\s+((?i:url)\s*?\(.{0,9999}?\)|['"].{0,9999}?['"]|.{0,9999}?)($|\s|;)/gm,(I,Q)=>I.replace(Q,Q.replace(/^(url\(['"]?|['"]|)(.+?)(['"]|['"]?\)|)$/gm,(I,Q,E,i)=>{if(Q.startsWith("url"))return I;let D="rewrite"===A?(0,C.Oy)(E.trim(),g,B):(0,C.v2)(E.trim(),g);return`${Q}${D}${i}`})))}},3515(A,I,g){g.d(I,{Kq:()=>r,PV:()=>R,Qs:()=>F,nK:()=>G});var C=g(1894),Q=g(5883),B=g(2026),E=g(1258),i=g(5657),D=g(4795),o=g(6549),w=g(1496),t=g(6879),s=g(8254),h=g(3129),e=g(5994),a=g(4e3),S=g(6965),c=g(7742).A;let y={encodeEntities:"utf8",decodeEntities:!1};class r{context;meta;htmlcontext;handler;parser;completedElements=new WeakSet;emittedLengths=new WeakMap;rewrittenNodes=new WeakMap;ended=!1;constructor(A,I,g){this.context=A,this.meta=I,this.htmlcontext=g,this.handler=new B.DV(void 0,void 0,A=>{this.completedElements.add(A)}),this.parser=new Q.i(this.handler,{startingForeignContext:g.foreignContext})}write(A){if(this.ended)throw Error("IncrementalHtmlRewriter stream already ended");return this.parser.write(A),this.flush()}end(A=""){return this.ended?"":(A&&this.parser.write(A),this.parser.end(),this.ended=!0,this.flush())}flush(){let A="";for(let I of this.handler.root.childNodes){let g=this.getAvailableOutput(I);if(null===g)break;let C=this.emittedLengths.get(I)??0;g.length>C&&(A+=g.slice(C),this.emittedLengths.set(I,g.length))}return A}getAvailableOutput(A){if(A.type!==C.vw&&A.type!==C.eF&&A.type!==C.OF)return(0,E.A)(A,y);if(!this.completedElements.has(A))return null;let I=this.rewrittenNodes.get(A);return void 0===I&&(I=N(A,this.context,this.meta,this.htmlcontext),this.rewrittenNodes.set(A,I)),I}}function N(A,I,g,a){var r;let N,F,G;"string"!=typeof A&&(r=A,A=(0,E.A)(r,y));let R=new B.DV((A,I)=>I),M=new Q.i(R,{startingForeignContext:a.foreignContext});M.write(A),M.end(),h.C.dispatch(I.hooks.rewriter.html.pre,{handler:R,meta:g,htmlcontext:a,origHtml:A},void 0),function A(I,g,C){if("base"===I.name&&void 0!==I.attribs.href&&(C.base=new e.xP(I.attribs.href,C.origin)),I.attribs){for(let A of w.V)for(let Q in A){let B=A[Q.toLowerCase()];if("function"!=typeof B&&("*"===B||B.includes(I.name))&&void 0!==I.attribs[Q]){let B=I.attribs[Q],E=A.fn(B,g,C,I.attribs);null===E?delete I.attribs[Q]:I.attribs[Q]=E,I.attribs[`scramjet-attr-${Q}`]=B}}for(let[A,Q]of(0,e.nJ)(I.attribs))K.includes(A)&&(I.attribs[`scramjet-attr-${A}`]=Q,I.attribs[A]=(0,o.o)(Q,`(inline ${A} on element)`,g,C))}if("style"===I.name&&void 0!==I.children[0]&&(I.children[0].data=(0,D.s)(I.children[0].data,g,C)),"script"===I.name&&I.attribs.type?.toLowerCase()==="importmap"&&void 0!==I.children[0]){let A=I.children[0].data;try{let Q=(0,e.P4)(A);if(Q.imports)for(let A in Q.imports){let I=Q.imports[A];"string"==typeof I&&(I=(0,i.Oy)(I,g,C,{isModule:!0}),Q.imports[A]=I)}I.children[0].data=(0,e.Xj)(Q)}catch(A){c.error("Failed to parse importmap JSON:",A)}}if("script"===I.name&&(0,S.Kx)(I.attribs.type)&&void 0!==I.children[0]){let A=I.children[0].data,Q=(0,S.g)(I.attribs.type);I.attribs["scramjet-attr-script-source-src"]=(0,s.i)((0,e.vh)(A)),A=A.replace(/<!--[\s\S]*?-->/g,""),I.children[0].data=(0,o.o)(A,"(inline script element)",g,C,Q)}if("meta"===I.name&&void 0!==I.attribs["http-equiv"]){if("content-security-policy"===I.attribs["http-equiv"].toLowerCase())I=new B.Mw(I.attribs.content);else if("refresh"===I.attribs["http-equiv"].toLowerCase()){let A=(0,t.n)(I.attribs.content||"");if(A&&null!==A.url&&A.url.length>0){let Q=(0,i.Oy)(A.url.trim(),g,C);I.attribs.content=I.attribs.content.slice(0,A.urlStart)+Q+I.attribs.content.slice(A.urlEnd)}}}if(I.childNodes)for(let Q in I.childNodes)I.childNodes[Q]=A(I.childNodes[Q],g,C);return I}(R.root,I,g);let k=function(){for(let A of R.root.childNodes)if(A.type!==C.WL&&A.type!==C.Mw&&A.type!==C.EY)if(A.type!==C.vw||"html"!==A.name)return!0;else N=A;if(!N)return!0;for(let A of N.childNodes)if(A.type!==C.WL&&A.type!==C.Mw&&A.type!==C.EY){if(A.type===C.vw&&"head"===A.name){if(G)return!0;F=A}else if(A.type===C.vw&&"body"===A.name)G=A;else if(!F)return!0;return!1}}();if(a.loadScripts){let A=I.interface.getInjectScripts(g,R,a,A=>new B.Hg("script",{src:A,"scramjet-injected":"true"}));k?(c.warn(`detected quirky document structure parsing @ ${g.origin.href}!`),R.root.children.unshift(...A)):(F||(F=new B.Hg("head",{},[]),N.children.unshift(F)),F.children.unshift(...A))}let U={};return(h.C.dispatch(I.hooks.rewriter.html.post,{handler:R,meta:g,htmlcontext:a,origHtml:A},U),void 0!==U.setRawHtml)?U.setRawHtml:(0,E.A)(R.root,y)}function F(A,I,g,C){let Q=(0,e.wU)(),B=N(A,I,g,C);return(0,a.U5)("rewriterLogs",I,g.base)&&c.time(g,Q,"html rewrite"),B}function G(A,I){let g=new B.DV((A,I)=>I),C=new Q.i(g,{startingForeignContext:I});return C.write(A),C.end(),!function A(I){if("attribs"in I)for(let A in I.attribs){if("scramjet-attr-script-source-src"==A){I.children[0]&&"data"in I.children[0]&&(I.children[0].data=(0,e.lw)(I.attribs[A]));continue}A.startsWith("scramjet-attr-")&&(I.attribs[A.slice(14)]=I.attribs[A],delete I.attribs[A])}if("childNodes"in I)for(let g of I.childNodes)A(g)}(g.root),(0,E.A)(g.root,{...y})}function R(A,I,g){return A.split(/ .*,/).map(A=>A.trim()).map(A=>{let[C,...Q]=A.split(/\s+/),B=(0,i.Oy)(C.trim(),I,g);return Q.length>0?`${B} ${Q.join(" ")}`:B}).join(", ")}let K=["onbeforexrselect","onabort","onbeforeinput","onbeforematch","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontentvisibilityautostatechange","oncontextlost","oncontextmenu","oncontextrestored","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel","onauxclick","ongotpointercapture","onlostpointercapture","onpointerdown","onpointermove","onpointerrawupdate","onpointerup","onpointercancel","onpointerover","onpointerout","onpointerenter","onpointerleave","onselectstart","onselectionchange","onanimationend","onanimationiteration","onanimationstart","ontransitionrun","ontransitionstart","ontransitionend","ontransitioncancel","oncopy","oncut","onpaste","onscrollend","onscrollsnapchange","onscrollsnapchanging"]},2348(A,I,g){g.d(I,{$n:()=>E.$n,IP:()=>E.IP,Kq:()=>Q.Kq,Oy:()=>E.Oy,PV:()=>Q.PV,Qs:()=>Q.Qs,f9:()=>C.f,gP:()=>B.g,ht:()=>D.h,iP:()=>i.i,nK:()=>Q.nK,nb:()=>D.n,on:()=>B.o,sM:()=>C.s,v2:()=>E.v2});var C=g(4795),Q=g(3515),B=g(6549),E=g(5657),i=g(1668),D=g(3430)},6549(A,I,g){g.d(I,{g:()=>i,o:()=>D});var C=g(4e3),Q=g(3430),B=g(5994),E=g(7742).A;function i(A,I,g,D,o=!1){return function(A,I,g,i,D){let[o,w]=(0,Q.n)(g,i),t={};for(let A of(0,B.BR)(g.config.flags))t[A]=(0,C.U5)(A,g,i.base);try{let Q,w=(0,B.wU)();Q="string"==typeof A?o.rewrite_js({...g.config.globals,prefix:g.prefix.pathname},t,g.interface.codecEncode,A,i.base.href,I||"(unknown)",D):o.rewrite_js_bytes({...g.config.globals,prefix:g.prefix.pathname},t,g.interface.codecEncode,A,i.base.href,I||"(unknown)",D),(0,C.U5)("rewriterLogs",g,i.base)&&E.time(i,w,`oxc rewrite for "${I||"(unknown)"}"`);let{js:s,map:h,scramtag:e,errors:a}=Q;return{js:"string"==typeof A?(0,B.hS)(s):s,tag:e,map:h,errors:a}}finally{w()}}(A,I,g,D,o)}function D(A,I,g,Q,o=!1){try{let D=i(A,I,g,Q,o),w=D.js;if((0,C.U5)("sourcemaps",g,Q.base)){let A=globalThis[g.config.globals.pushsourcemapfn];if(A)A((0,B.Z7)(D.map),D.tag);else{"string"!=typeof w&&(w=(0,B.hS)(w));let A=`${g.config.globals.pushsourcemapfn}([${D.map.join(",")}], "${D.tag}");`,I=new B.fs(/^\s*(['"])use strict\1;?/);w=I.test(w)?w.replace(I,`$&
|
|
27
27
|
${A}`):`${A}
|
|
28
28
|
${w}`}}if((0,C.U5)("rewriterLogs",g,Q.base))for(let A of D.errors)E.error("oxc parse error",A);return w}catch(i){if(E.warn("failed rewriting js for",I||"(unknown)",i.message,"string"!=typeof A?(0,B.hS)(A):A),(0,C.U5)("allowInvalidJs",g,Q.base))return A;throw i}}Error.stackTraceLimit=50},5657(A,I,g){g.d(I,{$n:()=>o,IP:()=>D,Oy:()=>w,v2:()=>t});var C=g(6549),Q=g(7492),B=g(5994),E=g(7742).A;function i(A,I){try{return new B.xP(A,I)}catch{return null}}function D(A,I,g){let C=new B.xP(A.substring(5));return"blob:"+g.origin.origin+C.pathname}function o(A,I,g){let C=new B.xP(A.substring(5));return"blob:"+I.prefix.origin+C.pathname}function w(A,I,g,E){if((A=(0,B.Qf)(A)).startsWith("javascript:"))return"javascript:"+(0,C.o)(A.slice(11),"(javascript: url)",I,g);if(A.startsWith("blob:"))return I.prefix.href+A;if(A.startsWith("data:")){if(A.length+I.prefix.href.length+1024>2097152){let{objectUrl:C}=function(A){let I,g=A.indexOf(",");if(-1===g)return null;let C=A.slice(5,g),Q=A.slice(g+1),E=C.split(";"),i=E.shift()||"",D=E.some(A=>"base64"===A.toLowerCase()),o=E.filter(A=>A&&"base64"!==A.toLowerCase()),w=i||"text/plain";if(!i&&(o.some(A=>A.toLowerCase().startsWith("charset="))||o.push("charset=US-ASCII")),o.length&&(w+=";"+o.join(";")),D){let A=Q.replace(/\s/g,"");A=A.replace(/-/g,"+").replace(/_/g,"/");let g=(0,B.lw)(A);I=new Uint8Array(g.length);for(let A=0;A<g.length;A++)I[A]=g.charCodeAt(A)}else{let A=Q;try{A=decodeURIComponent(Q)}catch{}I=(0,B.vh)(A)}let t=new Blob([I],{type:w}),s=(0,B.FA)(t);return{blob:t,objectUrl:s}}(A);return I.prefix.href+D(C,I,g)+"?"+Q.QP.fakeDataURL+"=1"}return I.prefix.href+A}{if(A.startsWith("mailto:")||A.startsWith("about:"))return A;let C=g.base.href;C.startsWith("about:")&&(C=t(self.location.href,I));let D=i(A,C);if(!D||"http:"!=D.protocol&&"https:"!=D.protocol)return A;let o=I.interface.codecEncode(D.hash.slice(1));D.hash="";let w=new B.JE,s=E?.referrerPolicy??g.referrerPolicy;s&&w.set(Q.QP.referrerPolicy,s),E?.isModule&&w.set(Q.QP.isModule,"module"),E?.topFrame&&w.set(Q.QP.topFrame,E.topFrame),E?.parentFrame&&w.set(Q.QP.parentFrame,E.parentFrame),E?.isIframe&&w.set(Q.QP.isIframe,E.isIframe),E?.mode&&w.set(Q.QP.mode,E.mode),E?.credentials&&w.set(Q.QP.credentials,E.credentials),E?.destination&&w.set(Q.QP.destination,E.destination),g.origin.origin!==I.prefix.origin&&w.set(Q.QP.initiatorOrigin,g.origin.origin);let h="";return w.toString()&&(h="?"+w.toString()),I.prefix.href+I.interface.codecEncode(D.href)+h+(o?"#"+o:"")}}function t(A,I){if((A=(0,B.Qf)(A)).startsWith("javascript:")||A.startsWith("blob:"))return A;if(A.startsWith(I.prefix.href+"blob:"))return A.substring(I.prefix.href.length);if(A.startsWith(I.prefix.href+"data:"))return A.substring(I.prefix.href.length);if(A.startsWith("mailto:")||A.startsWith("about:"))return A;else{if(!(A.startsWith("http:")||A.startsWith("https:")))return""==A||E.error("unrewriteurl: unexpected url",A),A;let g=i(A);if(!g||"http:"!=g.protocol&&"https:"!=g.protocol)return A;if(!g.href.startsWith(I.prefix.href))return E.error("unrewriteurl: unexpected url",A),A;let C=I.interface.codecDecode(g.hash.slice(1));return g.hash="",g.search="",I.interface.codecDecode(g.href.slice(I.prefix.href.length))+(C?"#"+C:"")}}},3430(A,I,g){let C;g.d(I,{h:()=>D,n:()=>t});var Q=g(5469),B=g(4e3),E=g(5994),i=g(7742).A;function D(A){C=A instanceof Uint8Array?A:new Uint8Array(A)}let o="\0asm".split("").map(A=>A.charCodeAt(0)),w=[];function t(A,I){let g;if(!(C instanceof Uint8Array))throw new E.$D("rewriter wasm not found (was setWasm called?)");if(![...C.slice(0,4)].every((A,I)=>A===o[I]))throw new E.$D("rewriter wasm does not have wasm magic (was it fetched correctly?)\nrewriter wasm contents: "+(0,E.hS)(C));(0,Q.QR)({module:new WebAssembly.Module(C)});let D=w.findIndex(A=>!A.inUse),t=w.length;return -1===D?((0,B.U5)("rewriterLogs",A,I.base)&&i.log(`creating new rewriter, ${t} rewriters made already`),g={rewriter:new Q.LW,inUse:!1},w.push(g)):g=w[D],g.inUse=!0,[g.rewriter,()=>g.inUse=!1]}},1668(A,I,g){g.d(I,{i:()=>i});var C=g(4e3),Q=g(6549),B=g(5994),E=g(8254);function i(A,I,g,i,D){let o="module"===g,w=A=>o?`import "${A}"
|
|
29
29
|
`:`importScripts("${A}");
|