@adaptive-ai/sdk 0.1.18 → 0.1.19

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.
@@ -1,8 +1,8 @@
1
- import {useState,useEffect,useRef,useCallback}from'react';import {useMutation}from'@tanstack/react-query';import {identity}from'lodash';import {nanoid}from'nanoid';import yt from'superjson';import {rpcClient,RpcError}from'typed-rpc';var An=Object.create;var bt=Object.defineProperty;var vn=Object.getOwnPropertyDescriptor;var _n=Object.getOwnPropertyNames;var bn=Object.getPrototypeOf,En=Object.prototype.hasOwnProperty;var Ze=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports);var Sn=(i,r,S,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of _n(r))!En.call(i,e)&&e!==S&&bt(i,e,{get:()=>r[e],enumerable:!(c=vn(r,e))||c.enumerable});return i};var Et=(i,r,S)=>(S=i!=null?An(bn(i)):{},Sn(bt(S,"default",{value:i,enumerable:true}),i));var Ft=Ze((nt,rt)=>{(i=>{let r=(()=>{let R=0;return {escape:function(s){return s.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")},isDataUrl:function(s){return s.search(/^(data:)/)!==-1},canvasToBlob:function(s){return s.toBlob?new Promise(function(w){s.toBlob(w);}):(w=>new Promise(function(b){var A=a(w.toDataURL().split(",")[1]),T=A.length,m=new Uint8Array(T);for(let h=0;h<T;h++)m[h]=A.charCodeAt(h);b(new Blob([m],{type:"image/png"}));}))(s)},resolveUrl:function(s,w){var b=globalThis.document.implementation.createHTMLDocument(),A=b.createElement("base"),T=(b.head.appendChild(A),b.createElement("a"));return b.body.appendChild(T),A.href=w,T.href=s,T.href},getAndEncode:function(s){let w=y.impl.urlCache.find(function(b){return b.url===s});return w||(w={url:s,promise:null},y.impl.urlCache.push(w)),w.promise===null&&(y.impl.options.cacheBust&&(s+=(/\?/.test(s)?"&":"?")+new Date().getTime()),w.promise=new Promise(function(b){let A=new XMLHttpRequest;function T(L){console.error(L),b("");}function m(){var L=y.impl.options.imagePlaceholder;L?b(L):T("Status:"+A.status+" while fetching resource: "+s);}if(A.timeout=y.impl.options.httpTimeout,A.onerror=m,A.ontimeout=m,A.onloadend=function(){if(A.readyState===XMLHttpRequest.DONE){var L=A.status;if(L===0&&s.toLowerCase().startsWith("file://")||200<=L&&L<=300&&A.response!==null){L=A.response,L instanceof Blob||T("Expected response to be a Blob, but got: "+typeof L);let x=new globalThis.FileReader;x.onloadend=function(){var U=x.result;b(U);};try{x.readAsDataURL(L);}catch(U){T("Failed to read the response as Data URL: "+U.toString());}}else m();}},0<y.impl.options.useCredentialsFilters.length&&(y.impl.options.useCredentials=0<y.impl.options.useCredentialsFilters.filter(L=>0<=s.search(L)).length),y.impl.options.useCredentials&&(A.withCredentials=true),y.impl.options.corsImg&&s.indexOf("http")===0&&s.indexOf(globalThis.window.location.origin)===-1){var h=(y.impl.options.corsImg.method||"GET").toUpperCase()==="POST"?"POST":"GET";A.open(h,(y.impl.options.corsImg.url||"").replace("#{cors}",s),true);let L=false,x=y.impl.options.corsImg.headers||{},U=(Object.keys(x).forEach(function(H){x[H].indexOf("application/json")!==-1&&(L=true),A.setRequestHeader(H,x[H]);}),(H=>{try{return JSON.parse(JSON.stringify(H))}catch(D){T("corsImg.data is missing or invalid:"+D.toString());}})(y.impl.options.corsImg.data||""));Object.keys(U).forEach(function(H){typeof U[H]=="string"&&(U[H]=U[H].replace("#{cors}",s));}),A.responseType="blob",A.send(L?JSON.stringify(U):U);}else A.open("GET",s,true),A.responseType="blob",A.send();})),w.promise},uid:function(){return "u"+("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)+R++},asArray:function(s){var w=[],b=s.length;for(let A=0;A<b;A++)w.push(s[A]);return w},escapeXhtml:function(s){return s.replace(/%/g,"%25").replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(s){return s!=="data:,"?new Promise(function(w,b){let A=globalThis.document.createElementNS("http://www.w3.org/2000/svg","svg"),T=new globalThis.Image;y.impl.options.useCredentials&&(T.crossOrigin="use-credentials"),T.onload=function(){globalThis.document.body.removeChild(A),globalThis.window&&globalThis.window.requestAnimationFrame?globalThis.window.requestAnimationFrame(function(){w(T);}):w(T);},T.onerror=m=>{globalThis.document.body.removeChild(A),b(m);},A.appendChild(T),T.src=s,globalThis.document.body.appendChild(A);}):Promise.resolve()},width:function(s){var w=_(s,"width");if(!isNaN(w))return w;var w=_(s,"border-left-width"),b=_(s,"border-right-width");return s.scrollWidth+w+b},height:function(s){var w=_(s,"height");if(!isNaN(w))return w;var w=_(s,"border-top-width"),b=_(s,"border-bottom-width");return s.scrollHeight+w+b},getWindow:p,isElement:u,isElementHostForOpenShadowRoot:function(s){return u(s)&&s.shadowRoot!==null},isShadowRoot:O,isInShadowRoot:f,isHTMLElement:function(s){return s instanceof p(s).HTMLElement},isHTMLCanvasElement:function(s){return s instanceof p(s).HTMLCanvasElement},isHTMLInputElement:function(s){return s instanceof p(s).HTMLInputElement},isHTMLImageElement:function(s){return s instanceof p(s).HTMLImageElement},isHTMLLinkElement:function(s){return s instanceof p(s).HTMLLinkElement},isHTMLScriptElement:function(s){return s instanceof p(s).HTMLScriptElement},isHTMLStyleElement:function(s){return s instanceof p(s).HTMLStyleElement},isHTMLTextAreaElement:function(s){return s instanceof p(s).HTMLTextAreaElement},isShadowSlotElement:function(s){return f(s)&&s instanceof p(s).HTMLSlotElement},isSVGElement:function(s){return s instanceof p(s).SVGElement},isSVGRectElement:function(s){return s instanceof p(s).SVGRectElement},isDimensionMissing:function(s){return isNaN(s)||s<=0}};function p(s){return s=s?s.ownerDocument:void 0,(s?s.defaultView:void 0)||globalThis.window||i}function O(s){return s instanceof p(s).ShadowRoot}function f(s){return s!=null&&s.getRootNode!==void 0&&O(s.getRootNode())}function u(s){return s instanceof p(s).Element}function _(s,w){if(s.nodeType===E){let b=o(s).getPropertyValue(w);if(b.slice(-2)==="px")return b=b.slice(0,-2),parseFloat(b)}return NaN}})(),S=(()=>{let R=/url\(\s*(["']?)((?:\\.|[^\\)])+)\1\s*\)/gm;return {inlineAll:function(_,s,w){return p(_)?Promise.resolve(_).then(O).then(function(b){let A=Promise.resolve(_);return b.forEach(function(T){A=A.then(function(m){return u(m,T,s,w)});}),A}):Promise.resolve(_)},shouldProcess:p,impl:{readUrls:O,inline:u,urlAsRegex:f}};function p(_){return _.search(R)!==-1}function O(_){for(var s,w=[];(s=R.exec(_))!==null;)w.push(s[2]);return w.filter(function(b){return !r.isDataUrl(b)})}function f(_){return new RegExp(`url\\((["']?)(${r.escape(_)})\\1\\)`,"gm")}function u(_,s,w,b){return Promise.resolve(s).then(function(A){return w?r.resolveUrl(A,w):A}).then(b||r.getAndEncode).then(function(A){var T=f(s);return _.replace(T,`url($1${A}$1)`)})}})(),c={resolveAll:function(){return e().then(function(R){return Promise.all(R.map(function(p){return p.resolve()}))}).then(function(R){return R.join(`
2
- `)})},impl:{readAll:e}};function e(){return Promise.resolve(r.asArray(globalThis.document.styleSheets)).then(function(p){let O=[];return p.forEach(function(f){var u=Object.getPrototypeOf(f);if(Object.prototype.hasOwnProperty.call(u,"cssRules"))try{r.asArray(f.cssRules||[]).forEach(O.push.bind(O));}catch(_){console.error("domtoimage: Error while reading CSS rules from: "+f.href,_.toString());}}),O}).then(function(p){return p.filter(function(O){return O.type===CSSRule.FONT_FACE_RULE}).filter(function(O){return S.shouldProcess(O.style.getPropertyValue("src"))})}).then(function(p){return p.map(R)});function R(p){return {resolve:function(){var O=(p.parentStyleSheet||{}).href;return S.inlineAll(p.cssText,O)},src:function(){return p.style.getPropertyValue("src")}}}}let t={inlineAll:function R(p){if(!r.isElement(p))return Promise.resolve(p);return O(p).then(function(){return r.isHTMLImageElement(p)?g(p).inline():Promise.all(r.asArray(p.childNodes).map(function(f){return R(f)}))});function O(f){let u=["background","background-image"],_=u.map(function(s){let w=f.style.getPropertyValue(s),b=f.style.getPropertyPriority(s);return w?S.inlineAll(w).then(function(A){f.style.setProperty(s,A,b);}):Promise.resolve()});return Promise.all(_).then(function(){return f})}},impl:{newImage:g}};function g(R){return {inline:function(p){return r.isDataUrl(R.src)?Promise.resolve():Promise.resolve(R.src).then(p||r.getAndEncode).then(function(O){return new Promise(function(f){R.onload=f,R.onerror=f,R.src=O;})})}}}let l={copyDefaultStyles:true,imagePlaceholder:void 0,cacheBust:false,useCredentials:false,useCredentialsFilters:[],httpTimeout:3e4,styleCaching:"strict",corsImg:void 0},y={toSvg:n,toPng:function(R,p){return d(R,p).then(function(O){return O.toDataURL()})},toJpeg:function(R,p){return d(R,p).then(function(O){return O.toDataURL("image/jpeg",(p?p.quality:void 0)||1)})},toBlob:function(R,p){return d(R,p).then(r.canvasToBlob)},toPixelData:function(R,p){return d(R,p).then(function(O){return O.getContext("2d").getImageData(0,0,r.width(R),r.height(R)).data})},toCanvas:d,impl:{fontFaces:c,images:t,util:r,inliner:S,urlCache:[],options:{},copyOptions:function(R){R.copyDefaultStyles===void 0?y.impl.options.copyDefaultStyles=l.copyDefaultStyles:y.impl.options.copyDefaultStyles=R.copyDefaultStyles,y.impl.options.imagePlaceholder=(R.imagePlaceholder===void 0?l:R).imagePlaceholder,y.impl.options.cacheBust=(R.cacheBust===void 0?l:R).cacheBust,y.impl.options.corsImg=(R.corsImg===void 0?l:R).corsImg,y.impl.options.useCredentials=(R.useCredentials===void 0?l:R).useCredentials,y.impl.options.useCredentialsFilters=(R.useCredentialsFilters===void 0?l:R).useCredentialsFilters,y.impl.options.httpTimeout=(R.httpTimeout===void 0?l:R).httpTimeout,y.impl.options.styleCaching=(R.styleCaching===void 0?l:R).styleCaching;}}},E=(typeof nt=="object"&&typeof rt=="object"?rt.exports=y:i.domtoimage=y,(globalThis.Node===void 0?void 0:globalThis.Node.ELEMENT_NODE)||1),o=(i===void 0?void 0:i.getComputedStyle)||(globalThis.window===void 0?void 0:globalThis.window.getComputedStyle)||globalThis.getComputedStyle,a=(i===void 0?void 0:i.atob)||(globalThis.window===void 0?void 0:globalThis.window.atob)||globalThis.atob;function n(R,p){y.impl.util.getWindow(R);let f=(p=p||{},y.impl.copyOptions(p),[]);return Promise.resolve(R).then(function(u){if(u.nodeType===E)return u;var _=u,s=globalThis.document.createElement("span");return _.replaceWith(s),s.append(u),f.push({child:_,wrapper:s}),s}).then(function(u){return (function _(s,w,b,A){let T=w.filter;if(s===v||r.isHTMLScriptElement(s)||r.isHTMLStyleElement(s)||r.isHTMLLinkElement(s)||b!==null&&T&&!T(s))return Promise.resolve();return Promise.resolve(s).then(m).then(h).then(function(D){return U(D,x(s))}).then(L).then(function(D){return H(D,s)});function m(D){return r.isHTMLCanvasElement(D)?r.makeImage(D.toDataURL()):D.cloneNode(false)}function h(D){return w.adjustClonedNode&&w.adjustClonedNode(s,D,false),Promise.resolve(D)}function L(D){return w.adjustClonedNode&&w.adjustClonedNode(s,D,true),Promise.resolve(D)}function x(D){return r.isElementHostForOpenShadowRoot(D)?D.shadowRoot:D}function U(D,Q){let N=K(Q),F=Promise.resolve();if(N.length!==0){let V=o($(Q));r.asArray(N).forEach(function(z){F=F.then(function(){return _(z,w,V).then(function(q){q&&D.appendChild(q);})});});}return F.then(function(){return D});function $(V){return r.isShadowRoot(V)?V.host:V}function K(V){if(r.isShadowSlotElement(V)){let z=V.assignedNodes();if(z&&0<z.length)return z}return V.childNodes}}function H(D,Q){return !r.isElement(D)||r.isShadowSlotElement(Q)?Promise.resolve(D):Promise.resolve().then(F).then($).then(K).then(V).then(N).then(function(){return D});function N(){r.isHTMLImageElement(D)&&(D.removeAttribute("loading"),Q.srcset||Q.sizes)&&(D.removeAttribute("srcset"),D.removeAttribute("sizes"),D.src=Q.currentSrc||Q.src);}function F(){function z(G,W){W.font=G.font,W.fontFamily=G.fontFamily,W.fontFeatureSettings=G.fontFeatureSettings,W.fontKerning=G.fontKerning,W.fontSize=G.fontSize,W.fontStretch=G.fontStretch,W.fontStyle=G.fontStyle,W.fontVariant=G.fontVariant,W.fontVariantCaps=G.fontVariantCaps,W.fontVariantEastAsian=G.fontVariantEastAsian,W.fontVariantLigatures=G.fontVariantLigatures,W.fontVariantNumeric=G.fontVariantNumeric,W.fontVariationSettings=G.fontVariationSettings,W.fontWeight=G.fontWeight;}function q(G,W){let ie=o(G);ie.cssText?(W.style.cssText=ie.cssText,z(ie,W.style)):(I(w,G,ie,b,W),b===null&&(["inset-block","inset-block-start","inset-block-end"].forEach(ae=>W.style.removeProperty(ae)),["left","right","top","bottom"].forEach(ae=>{W.style.getPropertyValue(ae)&&W.style.setProperty(ae,"0px");})));}q(Q,D);}function $(){let z=r.uid();function q(G){let W=o(Q,G),ie=W.getPropertyValue("content");if(ie!==""&&ie!=="none"){let Y=function(){let J=`.${z}:`+G,ne=(W.cssText?oe:j)();return globalThis.document.createTextNode(J+`{${ne}}`);function oe(){return `${W.cssText} content: ${ie};`}function j(){return r.asArray(W).map(ee).join("; ")+";";function ee(X){let le=W.getPropertyValue(X),ge=W.getPropertyPriority(X)?" !important":"";return X+": "+le+ge}}};let Z=D.getAttribute("class")||"",te=(D.setAttribute("class",Z+" "+z),globalThis.document.createElement("style"));te.appendChild(Y()),D.appendChild(te);}}[":before",":after"].forEach(function(G){q(G);});}function K(){r.isHTMLTextAreaElement(Q)&&(D.innerHTML=Q.value),r.isHTMLInputElement(Q)&&D.setAttribute("value",Q.value);}function V(){r.isSVGElement(D)&&(D.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.isSVGRectElement(D))&&["width","height"].forEach(function(z){let q=D.getAttribute(z);q&&D.style.setProperty(z,q);});}}})(u,p,null)}).then(p.disableEmbedFonts?Promise.resolve(R):C).then(p.disableInlineImages?Promise.resolve(R):M).then(function(u){p.bgcolor&&(u.style.backgroundColor=p.bgcolor),p.width&&(u.style.width=p.width+"px"),p.height&&(u.style.height=p.height+"px"),p.style&&Object.keys(p.style).forEach(function(s){u.style[s]=p.style[s];});let _=null;return typeof p.onclone=="function"&&(_=p.onclone(u)),Promise.resolve(_).then(function(){return u})}).then(function(u){let _=p.width||r.width(R),s=p.height||r.height(R);return Promise.resolve(u).then(function(w){return w.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(w)}).then(r.escapeXhtml).then(function(w){var b=(r.isDimensionMissing(_)?' width="100%"':` width="${_}"`)+(r.isDimensionMissing(s)?' height="100%"':` height="${s}"`);return `<svg xmlns="http://www.w3.org/2000/svg"${(r.isDimensionMissing(_)?"":` width="${_}"`)+(r.isDimensionMissing(s)?"":` height="${s}"`)}><foreignObject${b}>${w}</foreignObject></svg>`}).then(function(w){return "data:image/svg+xml;charset=utf-8,"+w})}).then(function(u){for(;0<f.length;){var _=f.pop();_.wrapper.replaceWith(_.child);}return u}).then(function(u){return y.impl.urlCache=[],v&&(globalThis.document.body.removeChild(v),v=null),B&&clearTimeout(B),B=setTimeout(()=>{B=null,k={};},2e4),u})}function d(R,p){return n(R,p=p||{}).then(r.makeImage).then(function(O){var f=typeof p.scale!="number"?1:p.scale,u=((s,w)=>{let b=p.width||r.width(s),A=p.height||r.height(s);return r.isDimensionMissing(b)&&(b=r.isDimensionMissing(A)?300:2*A),r.isDimensionMissing(A)&&(A=b/2),(s=globalThis.document.createElement("canvas")).width=b*w,s.height=A*w,p.bgcolor&&((w=s.getContext("2d")).fillStyle=p.bgcolor,w.fillRect(0,0,s.width,s.height)),s})(R,f),_=u.getContext("2d");return _.msImageSmoothingEnabled=false,_.imageSmoothingEnabled=false,O&&(_.scale(f,f),_.drawImage(O,0,0)),u})}let v=null;function C(R){return c.resolveAll().then(function(p){var O;return p!==""&&(O=globalThis.document.createElement("style"),R.appendChild(O),O.appendChild(globalThis.document.createTextNode(p))),R})}function M(R){return t.inlineAll(R).then(function(){return R})}function I(R,p,O,f,u){let _=y.impl.options.copyDefaultStyles?((w,b)=>{var A,T=(L=>(w.styleCaching!=="relaxed"?L:L.filter((x,U,H)=>U===0||U===H.length-1)).join(">"))(b=(L=>{var x=[];do if(L.nodeType===E){var U=L.tagName;if(x.push(U),P.includes(U))break}while(L=L.parentNode);return x})(b));{if(k[T])return k[T];b=((L,x)=>{let U=L.body;do{var H=x.pop(),H=L.createElement(H);U.appendChild(H),U=H;}while(0<x.length);return U.textContent="\u200B",U})((A=(()=>{if(v)return v.contentWindow;x=globalThis.document.characterSet||"UTF-8",L=(L=globalThis.document.doctype)?(`<!DOCTYPE ${F(L.name)} ${F(L.publicId)} `+F(L.systemId)).trim()+">":"",(v=globalThis.document.createElement("iframe")).id="domtoimage-sandbox-"+r.uid(),v.style.top="-9999px",v.style.visibility="hidden",v.style.position="fixed",globalThis.document.body.appendChild(v);var L,x,U=v,H="domtoimage-sandbox";try{return U.contentWindow.document.write(L+`<html><head><meta charset='${x}'><title>${H}</title></head><body></body></html>`),U.contentWindow}catch{}var D=globalThis.document.createElement("meta");D.setAttribute("charset",x);try{var Q=globalThis.document.implementation.createHTMLDocument(H),N=(Q.head.appendChild(D),L+Q.documentElement.outerHTML);return U.setAttribute("srcdoc",N),U.contentWindow}catch{}return U.contentDocument.head.appendChild(D),U.contentDocument.title=H,U.contentWindow;function F($){var K;return $?((K=globalThis.document.createElement("div")).innerText=$,K.innerHTML):""}})()).document,b),A=((L,x)=>{let U={},H=L.getComputedStyle(x);return r.asArray(H).forEach(function(D){U[D]=D==="width"||D==="height"?"auto":H.getPropertyValue(D);}),U})(A,b);var m=b;do{var h=m.parentElement;h!==null&&h.removeChild(m),m=h;}while(m&&m.tagName!=="BODY");return k[T]=A}})(R,p):{},s=u.style;r.asArray(O).forEach(function(w){var b,A,T,m;R.filterStyles&&!R.filterStyles(p,w)||(A=O.getPropertyValue(w),T=_[w],b=f?f.getPropertyValue(w):void 0,s.getPropertyValue(w))||(A!==T||f&&A!==b)&&(T=O.getPropertyPriority(w),b=s,A=A,T=T,m=0<=["background-clip"].indexOf(w=w),T?(b.setProperty(w,A,T),m&&b.setProperty("-webkit-"+w,A,T)):(b.setProperty(w,A),m&&b.setProperty("-webkit-"+w,A)));});}let B=null,k={},P=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIALOG","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","SVG","TABLE","UL","math","svg","BODY","HEAD","HTML"];})(nt);});var kt=Ze(()=>{});var on=Ze((Ur,rn)=>{var ht=typeof Map=="function"&&Map.prototype,ot=Object.getOwnPropertyDescriptor&&ht?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ke=ht&&ot&&typeof ot.get=="function"?ot.get:null,Bt=ht&&Map.prototype.forEach,pt=typeof Set=="function"&&Set.prototype,it=Object.getOwnPropertyDescriptor&&pt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Xe=pt&&it&&typeof it.get=="function"?it.get:null,Nt=pt&&Set.prototype.forEach,Mn=typeof WeakMap=="function"&&WeakMap.prototype,ke=Mn?WeakMap.prototype.has:null,Ln=typeof WeakSet=="function"&&WeakSet.prototype,Be=Ln?WeakSet.prototype.has:null,Dn=typeof WeakRef=="function"&&WeakRef.prototype,Ht=Dn?WeakRef.prototype.deref:null,Fn=Boolean.prototype.valueOf,kn=Object.prototype.toString,Bn=Function.prototype.toString,Nn=String.prototype.match,gt=String.prototype.slice,Ee=String.prototype.replace,Hn=String.prototype.toUpperCase,Qt=String.prototype.toLowerCase,Yt=RegExp.prototype.test,$t=Array.prototype.concat,we=Array.prototype.join,Qn=Array.prototype.slice,Wt=Math.floor,lt=typeof BigInt=="function"?BigInt.prototype.valueOf:null,at=Object.getOwnPropertySymbols,ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Me=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ne=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Me||true)?Symbol.toStringTag:null,Jt=Object.prototype.propertyIsEnumerable,zt=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(i){return i.__proto__}:null);function Gt(i,r){if(i===1/0||i===-1/0||i!==i||i&&i>-1e3&&i<1e3||Yt.call(/e/,r))return r;var S=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof i=="number"){var c=i<0?-Wt(-i):Wt(i);if(c!==i){var e=String(c),t=gt.call(r,e.length+1);return Ee.call(e,S,"$&_")+"."+Ee.call(Ee.call(t,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ee.call(r,S,"$&_")}var ut=kt(),Vt=ut.custom,qt=en(Vt)?Vt:null,Zt={__proto__:null,double:'"',single:"'"},$n={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};rn.exports=function i(r,S,c,e){var t=S||{};if(ve(t,"quoteStyle")&&!ve(Zt,t.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ve(t,"maxStringLength")&&(typeof t.maxStringLength=="number"?t.maxStringLength<0&&t.maxStringLength!==1/0:t.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var g=ve(t,"customInspect")?t.customInspect:true;if(typeof g!="boolean"&&g!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ve(t,"indent")&&t.indent!==null&&t.indent!==" "&&!(parseInt(t.indent,10)===t.indent&&t.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ve(t,"numericSeparator")&&typeof t.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=t.numericSeparator;if(typeof r>"u")return "undefined";if(r===null)return "null";if(typeof r=="boolean")return r?"true":"false";if(typeof r=="string")return nn(r,t);if(typeof r=="number"){if(r===0)return 1/0/r>0?"0":"-0";var y=String(r);return l?Gt(r,y):y}if(typeof r=="bigint"){var E=String(r)+"n";return l?Gt(r,E):E}var o=typeof t.depth>"u"?5:t.depth;if(typeof c>"u"&&(c=0),c>=o&&o>0&&typeof r=="object")return ft(r)?"[Array]":"[Object]";var a=ar(t,c);if(typeof e>"u")e=[];else if(tn(e,r)>=0)return "[Circular]";function n(b,A,T){if(A&&(e=Qn.call(e),e.push(A)),T){var m={depth:t.depth};return ve(t,"quoteStyle")&&(m.quoteStyle=t.quoteStyle),i(b,m,c+1,e)}return i(b,t,c+1,e)}if(typeof r=="function"&&!Kt(r)){var d=Jn(r),v=qe(r,n);return "[Function"+(d?": "+d:" (anonymous)")+"]"+(v.length>0?" { "+we.call(v,", ")+" }":"")}if(en(r)){var C=Me?Ee.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):ct.call(r);return typeof r=="object"&&!Me?Fe(C):C}if(rr(r)){for(var M="<"+Qt.call(String(r.nodeName)),I=r.attributes||[],B=0;B<I.length;B++)M+=" "+I[B].name+"="+jt(Wn(I[B].value),"double",t);return M+=">",r.childNodes&&r.childNodes.length&&(M+="..."),M+="</"+Qt.call(String(r.nodeName))+">",M}if(ft(r)){if(r.length===0)return "[]";var k=qe(r,n);return a&&!ir(k)?"["+dt(k,a)+"]":"[ "+we.call(k,", ")+" ]"}if(Gn(r)){var P=qe(r,n);return !("cause"in Error.prototype)&&"cause"in r&&!Jt.call(r,"cause")?"{ ["+String(r)+"] "+we.call($t.call("[cause]: "+n(r.cause),P),", ")+" }":P.length===0?"["+String(r)+"]":"{ ["+String(r)+"] "+we.call(P,", ")+" }"}if(typeof r=="object"&&g){if(qt&&typeof r[qt]=="function"&&ut)return ut(r,{depth:o-c});if(g!=="symbol"&&typeof r.inspect=="function")return r.inspect()}if(Zn(r)){var R=[];return Bt&&Bt.call(r,function(b,A){R.push(n(A,r,true)+" => "+n(b,r));}),Xt("Map",Ke.call(r),R,a)}if(tr(r)){var p=[];return Nt&&Nt.call(r,function(b){p.push(n(b,r));}),Xt("Set",Xe.call(r),p,a)}if(jn(r))return st("WeakMap");if(nr(r))return st("WeakSet");if(er(r))return st("WeakRef");if(qn(r))return Fe(n(Number(r)));if(Xn(r))return Fe(n(lt.call(r)));if(Kn(r))return Fe(Fn.call(r));if(Vn(r))return Fe(n(String(r)));if(typeof globalThis.window<"u"&&r===globalThis.window)return "{ [object Window] }";if(typeof globalThis<"u"&&r===globalThis||typeof global<"u"&&r===global)return "{ [object globalThis] }";if(!zn(r)&&!Kt(r)){var O=qe(r,n),f=zt?zt(r)===Object.prototype:r instanceof Object||r.constructor===Object,u=r instanceof Object?"":"null prototype",_=!f&&Ne&&Object(r)===r&&Ne in r?gt.call(Se(r),8,-1):u?"Object":"",s=f||typeof r.constructor!="function"?"":r.constructor.name?r.constructor.name+" ":"",w=s+(_||u?"["+we.call($t.call([],_||[],u||[]),": ")+"] ":"");return O.length===0?w+"{}":a?w+"{"+dt(O,a)+"}":w+"{ "+we.call(O,", ")+" }"}return String(r)};function jt(i,r,S){var c=S.quoteStyle||r,e=Zt[c];return e+i+e}function Wn(i){return Ee.call(String(i),/"/g,"&quot;")}function Oe(i){return !Ne||!(typeof i=="object"&&(Ne in i||typeof i[Ne]<"u"))}function ft(i){return Se(i)==="[object Array]"&&Oe(i)}function zn(i){return Se(i)==="[object Date]"&&Oe(i)}function Kt(i){return Se(i)==="[object RegExp]"&&Oe(i)}function Gn(i){return Se(i)==="[object Error]"&&Oe(i)}function Vn(i){return Se(i)==="[object String]"&&Oe(i)}function qn(i){return Se(i)==="[object Number]"&&Oe(i)}function Kn(i){return Se(i)==="[object Boolean]"&&Oe(i)}function en(i){if(Me)return i&&typeof i=="object"&&i instanceof Symbol;if(typeof i=="symbol")return true;if(!i||typeof i!="object"||!ct)return false;try{return ct.call(i),!0}catch{}return false}function Xn(i){if(!i||typeof i!="object"||!lt)return false;try{return lt.call(i),!0}catch{}return false}var Yn=Object.prototype.hasOwnProperty||function(i){return i in this};function ve(i,r){return Yn.call(i,r)}function Se(i){return kn.call(i)}function Jn(i){if(i.name)return i.name;var r=Nn.call(Bn.call(i),/^function\s*([\w$]+)/);return r?r[1]:null}function tn(i,r){if(i.indexOf)return i.indexOf(r);for(var S=0,c=i.length;S<c;S++)if(i[S]===r)return S;return -1}function Zn(i){if(!Ke||!i||typeof i!="object")return false;try{Ke.call(i);try{Xe.call(i);}catch{return !0}return i instanceof Map}catch{}return false}function jn(i){if(!ke||!i||typeof i!="object")return false;try{ke.call(i,ke);try{Be.call(i,Be);}catch{return !0}return i instanceof WeakMap}catch{}return false}function er(i){if(!Ht||!i||typeof i!="object")return false;try{return Ht.call(i),!0}catch{}return false}function tr(i){if(!Xe||!i||typeof i!="object")return false;try{Xe.call(i);try{Ke.call(i);}catch{return !0}return i instanceof Set}catch{}return false}function nr(i){if(!Be||!i||typeof i!="object")return false;try{Be.call(i,Be);try{ke.call(i,ke);}catch{return !0}return i instanceof WeakSet}catch{}return false}function rr(i){return !i||typeof i!="object"?false:typeof HTMLElement<"u"&&i instanceof HTMLElement?true:typeof i.nodeName=="string"&&typeof i.getAttribute=="function"}function nn(i,r){if(i.length>r.maxStringLength){var S=i.length-r.maxStringLength,c="... "+S+" more character"+(S>1?"s":"");return nn(gt.call(i,0,r.maxStringLength),r)+c}var e=$n[r.quoteStyle||"single"];e.lastIndex=0;var t=Ee.call(Ee.call(i,e,"\\$1"),/[\x00-\x1f]/g,or);return jt(t,"single",r)}function or(i){var r=i.charCodeAt(0),S={8:"b",9:"t",10:"n",12:"f",13:"r"}[r];return S?"\\"+S:"\\x"+(r<16?"0":"")+Hn.call(r.toString(16))}function Fe(i){return "Object("+i+")"}function st(i){return i+" { ? }"}function Xt(i,r,S,c){var e=c?dt(S,c):we.call(S,", ");return i+" ("+r+") {"+e+"}"}function ir(i){for(var r=0;r<i.length;r++)if(tn(i[r],`
3
- `)>=0)return false;return true}function ar(i,r){var S;if(i.indent===" ")S=" ";else if(typeof i.indent=="number"&&i.indent>0)S=we.call(Array(i.indent+1)," ");else return null;return {base:S,prev:we.call(Array(r+1),S)}}function dt(i,r){if(i.length===0)return "";var S=`
4
- `+r.prev+r.base;return S+we.call(i,","+S)+`
5
- `+r.prev}function qe(i,r){var S=ft(i),c=[];if(S){c.length=i.length;for(var e=0;e<i.length;e++)c[e]=ve(i,e)?r(i[e],i):"";}var t=typeof at=="function"?at(i):[],g;if(Me){g={};for(var l=0;l<t.length;l++)g["$"+t[l]]=t[l];}for(var y in i)ve(i,y)&&(S&&String(Number(y))===y&&y<i.length||Me&&g["$"+y]instanceof Symbol||(Yt.call(/[^\w$]/,y)?c.push(r(y,i)+": "+r(i[y],i)):c.push(y+": "+r(i[y],i))));if(typeof at=="function")for(var E=0;E<t.length;E++)Jt.call(i,t[E])&&c.push("["+r(t[E])+"]: "+r(i[t[E]],i));return c}});function Tn(i,r){return r.forEach((function(S){S&&typeof S!="string"&&!Array.isArray(S)&&Object.keys(S).forEach((function(c){if(c!=="default"&&!(c in i)){var e=Object.getOwnPropertyDescriptor(S,c);Object.defineProperty(i,c,e.get?e:{enumerable:true,get:function(){return S[c]}});}}));})),Object.freeze(i)}function Tt(i,r){return new Promise((function(S,c){let e;return In(i).then((function(t){try{return e=t,S(new Blob([r.slice(0,2),e,r.slice(2)],{type:"image/jpeg"}))}catch(g){return c(g)}}),c)}))}var In=i=>new Promise(((r,S)=>{let c=new globalThis.FileReader;c.addEventListener("load",(({target:{result:e}})=>{let t=new DataView(e),g=0;if(t.getUint16(g)!==65496)return S("not a valid JPEG");for(g+=2;;){let l=t.getUint16(g);if(l===65498)break;let y=t.getUint16(g+2);if(l===65505&&t.getUint32(g+4)===1165519206){let E=g+10,o;switch(t.getUint16(E)){case 18761:o=true;break;case 19789:o=false;break;default:return S("TIFF header contains invalid endian")}if(t.getUint16(E+2,o)!==42)return S("TIFF header contains invalid version");let a=t.getUint32(E+4,o),n=E+a+2+12*t.getUint16(E+a,o);for(let d=E+a+2;d<n;d+=12)if(t.getUint16(d,o)==274){if(t.getUint16(d+2,o)!==3)return S("Orientation data type is invalid");if(t.getUint32(d+4,o)!==1)return S("Orientation data count is invalid");t.setUint16(d+8,1,o);break}return r(e.slice(g,g+2+y))}g+=2+y;}return r(new Blob)})),c.readAsArrayBuffer(i);})),$e={},Rn={get exports(){return $e},set exports(i){$e=i;}};(function(i){var r,S,c={};Rn.exports=c,c.parse=function(e,t){for(var g=c.bin.readUshort,l=c.bin.readUint,y=0,E={},o=new Uint8Array(e),a=o.length-4;l(o,a)!=101010256;)a--;y=a,y+=4;var n=g(o,y+=4);g(o,y+=2);var d=l(o,y+=2),v=l(o,y+=4);y+=4,y=v;for(var C=0;C<n;C++){l(o,y),y+=4,y+=4,y+=4,l(o,y+=4),d=l(o,y+=4);var M=l(o,y+=4),I=g(o,y+=4),B=g(o,y+2),k=g(o,y+4);y+=6;var P=l(o,y+=8);y+=4,y+=I+B+k,c._readLocal(o,P,E,d,M,t);}return E},c._readLocal=function(e,t,g,l,y,E){var o=c.bin.readUshort,a=c.bin.readUint;a(e,t),o(e,t+=4),o(e,t+=2);var n=o(e,t+=2);a(e,t+=2),a(e,t+=4),t+=4;var d=o(e,t+=8),v=o(e,t+=2);t+=2;var C=c.bin.readUTF8(e,t,d);if(t+=d,t+=v,E)g[C]={size:y,csize:l};else {var M=new Uint8Array(e.buffer,t);if(n==0)g[C]=new Uint8Array(M.buffer.slice(t,t+l));else {if(n!=8)throw "unknown compression method: "+n;var I=new Uint8Array(y);c.inflateRaw(M,I),g[C]=I;}}},c.inflateRaw=function(e,t){return c.F.inflate(e,t)},c.inflate=function(e,t){return e[0],e[1],c.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},c.deflate=function(e,t){t==null&&(t={level:6});var g=0,l=new Uint8Array(50+Math.floor(1.1*e.length));l[g]=120,l[g+1]=156,g+=2,g=c.F.deflateRaw(e,l,g,t.level);var y=c.adler(e,0,e.length);return l[g+0]=y>>>24&255,l[g+1]=y>>>16&255,l[g+2]=y>>>8&255,l[g+3]=y>>>0&255,new Uint8Array(l.buffer,0,g+4)},c.deflateRaw=function(e,t){t==null&&(t={level:6});var g=new Uint8Array(50+Math.floor(1.1*e.length)),l=c.F.deflateRaw(e,g,l,t.level);return new Uint8Array(g.buffer,0,l)},c.encode=function(e,t){t==null&&(t=false);var g=0,l=c.bin.writeUint,y=c.bin.writeUshort,E={};for(var o in e){var a=!c._noNeed(o)&&!t,n=e[o],d=c.crc.crc(n,0,n.length);E[o]={cpr:a,usize:n.length,crc:d,file:a?c.deflateRaw(n):n};}for(var o in E)g+=E[o].file.length+30+46+2*c.bin.sizeUTF8(o);g+=22;var v=new Uint8Array(g),C=0,M=[];for(var o in E){var I=E[o];M.push(C),C=c._writeHeader(v,C,o,I,0);}var B=0,k=C;for(var o in E)I=E[o],M.push(C),C=c._writeHeader(v,C,o,I,1,M[B++]);var P=C-k;return l(v,C,101010256),C+=4,y(v,C+=4,B),y(v,C+=2,B),l(v,C+=2,P),l(v,C+=4,k),C+=4,C+=2,v.buffer},c._noNeed=function(e){var t=e.split(".").pop().toLowerCase();return "png,jpg,jpeg,zip".indexOf(t)!=-1},c._writeHeader=function(e,t,g,l,y,E){var o=c.bin.writeUint,a=c.bin.writeUshort,n=l.file;return o(e,t,y==0?67324752:33639248),t+=4,y==1&&(t+=2),a(e,t,20),a(e,t+=2,0),a(e,t+=2,l.cpr?8:0),o(e,t+=2,0),o(e,t+=4,l.crc),o(e,t+=4,n.length),o(e,t+=4,l.usize),a(e,t+=4,c.bin.sizeUTF8(g)),a(e,t+=2,0),t+=2,y==1&&(t+=2,t+=2,o(e,t+=6,E),t+=4),t+=c.bin.writeUTF8(e,t,g),y==0&&(e.set(n,t),t+=n.length),t},c.crc={table:(function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var g=t,l=0;l<8;l++)1&g?g=3988292384^g>>>1:g>>>=1;e[t]=g;}return e})(),update:function(e,t,g,l){for(var y=0;y<l;y++)e=c.crc.table[255&(e^t[g+y])]^e>>>8;return e},crc:function(e,t,g){return 4294967295^c.crc.update(4294967295,e,t,g)}},c.adler=function(e,t,g){for(var l=1,y=0,E=t,o=t+g;E<o;){for(var a=Math.min(E+5552,o);E<a;)y+=l+=e[E++];l%=65521,y%=65521;}return y<<16|l},c.bin={readUshort:function(e,t){return e[t]|e[t+1]<<8},writeUshort:function(e,t,g){e[t]=255&g,e[t+1]=g>>8&255;},readUint:function(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])},writeUint:function(e,t,g){e[t]=255&g,e[t+1]=g>>8&255,e[t+2]=g>>16&255,e[t+3]=g>>24&255;},readASCII:function(e,t,g){for(var l="",y=0;y<g;y++)l+=String.fromCharCode(e[t+y]);return l},writeASCII:function(e,t,g){for(var l=0;l<g.length;l++)e[t+l]=g.charCodeAt(l);},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,t,g){for(var l,y="",E=0;E<g;E++)y+="%"+c.bin.pad(e[t+E].toString(16));try{l=decodeURIComponent(y);}catch{return c.bin.readASCII(e,t,g)}return l},writeUTF8:function(e,t,g){for(var l=g.length,y=0,E=0;E<l;E++){var o=g.charCodeAt(E);if((4294967168&o)==0)e[t+y]=o,y++;else if((4294965248&o)==0)e[t+y]=192|o>>6,e[t+y+1]=128|o>>0&63,y+=2;else if((4294901760&o)==0)e[t+y]=224|o>>12,e[t+y+1]=128|o>>6&63,e[t+y+2]=128|o>>0&63,y+=3;else {if((4292870144&o)!=0)throw "e";e[t+y]=240|o>>18,e[t+y+1]=128|o>>12&63,e[t+y+2]=128|o>>6&63,e[t+y+3]=128|o>>0&63,y+=4;}}return y},sizeUTF8:function(e){for(var t=e.length,g=0,l=0;l<t;l++){var y=e.charCodeAt(l);if((4294967168&y)==0)g++;else if((4294965248&y)==0)g+=2;else if((4294901760&y)==0)g+=3;else {if((4292870144&y)!=0)throw "e";g+=4;}}return g}},c.F={},c.F.deflateRaw=function(e,t,g,l){var y=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][l],E=c.F.U,o=c.F._goodIndex;c.F._hash;var a=c.F._putsE,n=0,d=g<<3,v=0,C=e.length;if(l==0){for(;n<C;)a(t,d,n+(s=Math.min(65535,C-n))==C?1:0),d=c.F._copyExact(e,n,s,t,d+8),n+=s;return d>>>3}var M=E.lits,I=E.strt,B=E.prev,k=0,P=0,R=0,p=0,O=0,f=0;for(C>2&&(I[f=c.F._hash(e,0)]=0),n=0;n<C;n++){if(O=f,n+1<C-2){f=c.F._hash(e,n+1);var u=n+1&32767;B[u]=I[f],I[f]=u;}if(v<=n){(k>14e3||P>26697)&&C-n>100&&(v<n&&(M[k]=n-v,k+=2,v=n),d=c.F._writeBlock(n==C-1||v==C?1:0,M,k,p,e,R,n-R,t,d),k=P=p=0,R=n);var _=0;n<C-2&&(_=c.F._bestMatch(e,n,B,O,Math.min(y[2],C-n),y[3]));var s=_>>>16,w=65535&_;if(_!=0){w=65535&_;var b=o(s=_>>>16,E.of0);E.lhst[257+b]++;var A=o(w,E.df0);E.dhst[A]++,p+=E.exb[b]+E.dxb[A],M[k]=s<<23|n-v,M[k+1]=w<<16|b<<8|A,k+=2,v=n+s;}else E.lhst[e[n]]++;P++;}}for(R==n&&e.length!=0||(v<n&&(M[k]=n-v,k+=2,v=n),d=c.F._writeBlock(1,M,k,p,e,R,n-R,t,d),k=0,P=0,k=P=p=0,R=n);(7&d)!=0;)d++;return d>>>3},c.F._bestMatch=function(e,t,g,l,y,E){var o=32767&t,a=g[o],n=o-a+32768&32767;if(a==o||l!=c.F._hash(e,t-n))return 0;for(var d=0,v=0,C=Math.min(32767,t);n<=C&&--E!=0&&a!=o;){if(d==0||e[t+d]==e[t+d-n]){var M=c.F._howLong(e,t,n);if(M>d){if(v=n,(d=M)>=y)break;n+2<M&&(M=n+2);for(var I=0,B=0;B<M-2;B++){var k=t-n+B+32768&32767,P=k-g[k]+32768&32767;P>I&&(I=P,a=k);}}}n+=(o=a)-(a=g[o])+32768&32767;}return d<<16|v},c.F._howLong=function(e,t,g){if(e[t]!=e[t-g]||e[t+1]!=e[t+1-g]||e[t+2]!=e[t+2-g])return 0;var l=t,y=Math.min(e.length,t+258);for(t+=3;t<y&&e[t]==e[t-g];)t++;return t-l},c.F._hash=function(e,t){return (e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},c.saved=0,c.F._writeBlock=function(e,t,g,l,y,E,o,a,n){var d,v,C,M,I,B,k,P,R,p=c.F.U,O=c.F._putsF,f=c.F._putsE;p.lhst[256]++,v=(d=c.F.getTrees())[0],C=d[1],M=d[2],I=d[3],B=d[4],k=d[5],P=d[6],R=d[7];var u=32+((n+3&7)==0?0:8-(n+3&7))+(o<<3),_=l+c.F.contSize(p.fltree,p.lhst)+c.F.contSize(p.fdtree,p.dhst),s=l+c.F.contSize(p.ltree,p.lhst)+c.F.contSize(p.dtree,p.dhst);s+=14+3*k+c.F.contSize(p.itree,p.ihst)+(2*p.ihst[16]+3*p.ihst[17]+7*p.ihst[18]);for(var w=0;w<286;w++)p.lhst[w]=0;for(w=0;w<30;w++)p.dhst[w]=0;for(w=0;w<19;w++)p.ihst[w]=0;var b=u<_&&u<s?0:_<s?1:2;if(O(a,n,e),O(a,n+1,b),n+=3,b==0){for(;(7&n)!=0;)n++;n=c.F._copyExact(y,E,o,a,n);}else {var A,T;if(b==1&&(A=p.fltree,T=p.fdtree),b==2){c.F.makeCodes(p.ltree,v),c.F.revCodes(p.ltree,v),c.F.makeCodes(p.dtree,C),c.F.revCodes(p.dtree,C),c.F.makeCodes(p.itree,M),c.F.revCodes(p.itree,M),A=p.ltree,T=p.dtree,f(a,n,I-257),f(a,n+=5,B-1),f(a,n+=5,k-4),n+=4;for(var m=0;m<k;m++)f(a,n+3*m,p.itree[1+(p.ordr[m]<<1)]);n+=3*k,n=c.F._codeTiny(P,p.itree,a,n),n=c.F._codeTiny(R,p.itree,a,n);}for(var h=E,L=0;L<g;L+=2){for(var x=t[L],U=x>>>23,H=h+(8388607&x);h<H;)n=c.F._writeLit(y[h++],A,a,n);if(U!=0){var D=t[L+1],Q=D>>16,N=D>>8&255,F=255&D;f(a,n=c.F._writeLit(257+N,A,a,n),U-p.of0[N]),n+=p.exb[N],O(a,n=c.F._writeLit(F,T,a,n),Q-p.df0[F]),n+=p.dxb[F],h+=U;}}n=c.F._writeLit(256,A,a,n);}return n},c.F._copyExact=function(e,t,g,l,y){var E=y>>>3;return l[E]=g,l[E+1]=g>>>8,l[E+2]=255-l[E],l[E+3]=255-l[E+1],E+=4,l.set(new Uint8Array(e.buffer,t,g),E),y+(g+4<<3)},c.F.getTrees=function(){for(var e=c.F.U,t=c.F._hufTree(e.lhst,e.ltree,15),g=c.F._hufTree(e.dhst,e.dtree,15),l=[],y=c.F._lenCodes(e.ltree,l),E=[],o=c.F._lenCodes(e.dtree,E),a=0;a<l.length;a+=2)e.ihst[l[a]]++;for(a=0;a<E.length;a+=2)e.ihst[E[a]]++;for(var n=c.F._hufTree(e.ihst,e.itree,7),d=19;d>4&&e.itree[1+(e.ordr[d-1]<<1)]==0;)d--;return [t,g,n,y,o,d,l,E]},c.F.getSecond=function(e){for(var t=[],g=0;g<e.length;g+=2)t.push(e[g+1]);return t},c.F.nonZero=function(e){for(var t="",g=0;g<e.length;g+=2)e[g+1]!=0&&(t+=(g>>1)+",");return t},c.F.contSize=function(e,t){for(var g=0,l=0;l<t.length;l++)g+=t[l]*e[1+(l<<1)];return g},c.F._codeTiny=function(e,t,g,l){for(var y=0;y<e.length;y+=2){var E=e[y],o=e[y+1];l=c.F._writeLit(E,t,g,l);var a=E==16?2:E==17?3:7;E>15&&(c.F._putsE(g,l,o,a),l+=a);}return l},c.F._lenCodes=function(e,t){for(var g=e.length;g!=2&&e[g-1]==0;)g-=2;for(var l=0;l<g;l+=2){var y=e[l+1],E=l+3<g?e[l+3]:-1,o=l+5<g?e[l+5]:-1,a=l==0?-1:e[l-1];if(y==0&&E==y&&o==y){for(var n=l+5;n+2<g&&e[n+2]==y;)n+=2;(d=Math.min(n+1-l>>>1,138))<11?t.push(17,d-3):t.push(18,d-11),l+=2*d-2;}else if(y==a&&E==y&&o==y){for(n=l+5;n+2<g&&e[n+2]==y;)n+=2;var d=Math.min(n+1-l>>>1,6);t.push(16,d-3),l+=2*d-2;}else t.push(y,0);}return g>>>1},c.F._hufTree=function(e,t,g){var l=[],y=e.length,E=t.length,o=0;for(o=0;o<E;o+=2)t[o]=0,t[o+1]=0;for(o=0;o<y;o++)e[o]!=0&&l.push({lit:o,f:e[o]});var a=l.length,n=l.slice(0);if(a==0)return 0;if(a==1){var d=l[0].lit;return n=d==0?1:0,t[1+(d<<1)]=1,t[1+(n<<1)]=1,1}l.sort((function(P,R){return P.f-R.f}));var v=l[0],C=l[1],M=0,I=1,B=2;for(l[0]={lit:-1,f:v.f+C.f,l:v,r:C,d:0};I!=a-1;)v=M!=I&&(B==a||l[M].f<l[B].f)?l[M++]:l[B++],C=M!=I&&(B==a||l[M].f<l[B].f)?l[M++]:l[B++],l[I++]={lit:-1,f:v.f+C.f,l:v,r:C};var k=c.F.setDepth(l[I-1],0);for(k>g&&(c.F.restrictDepth(n,g,k),k=g),o=0;o<a;o++)t[1+(n[o].lit<<1)]=n[o].d;return k},c.F.setDepth=function(e,t){return e.lit!=-1?(e.d=t,t):Math.max(c.F.setDepth(e.l,t+1),c.F.setDepth(e.r,t+1))},c.F.restrictDepth=function(e,t,g){var l=0,y=1<<g-t,E=0;for(e.sort((function(a,n){return n.d==a.d?a.f-n.f:n.d-a.d})),l=0;l<e.length&&e[l].d>t;l++){var o=e[l].d;e[l].d=t,E+=y-(1<<g-o);}for(E>>>=g-t;E>0;)(o=e[l].d)<t?(e[l].d++,E-=1<<t-o-1):l++;for(;l>=0;l--)e[l].d==t&&E<0&&(e[l].d--,E++);E!=0&&console.log("debt left");},c.F._goodIndex=function(e,t){var g=0;return t[16|g]<=e&&(g|=16),t[8|g]<=e&&(g|=8),t[4|g]<=e&&(g|=4),t[2|g]<=e&&(g|=2),t[1|g]<=e&&(g|=1),g},c.F._writeLit=function(e,t,g,l){return c.F._putsF(g,l,t[e<<1]),l+t[1+(e<<1)]},c.F.inflate=function(e,t){var g=Uint8Array;if(e[0]==3&&e[1]==0)return t||new g(0);var l=c.F,y=l._bitsF,E=l._bitsE,o=l._decodeTiny,a=l.makeCodes,n=l.codes2map,d=l._get17,v=l.U,C=t==null;C&&(t=new g(e.length>>>2<<3));for(var M,I,B=0,k=0,P=0,R=0,p=0,O=0,f=0,u=0,_=0;B==0;)if(B=y(e,_,1),k=y(e,_+1,2),_+=3,k!=0){if(C&&(t=c.F._check(t,u+(1<<17))),k==1&&(M=v.flmap,I=v.fdmap,O=511,f=31),k==2){P=E(e,_,5)+257,R=E(e,_+5,5)+1,p=E(e,_+10,4)+4,_+=14;for(var s=0;s<38;s+=2)v.itree[s]=0,v.itree[s+1]=0;var w=1;for(s=0;s<p;s++){var b=E(e,_+3*s,3);v.itree[1+(v.ordr[s]<<1)]=b,b>w&&(w=b);}_+=3*p,a(v.itree,w),n(v.itree,w,v.imap),M=v.lmap,I=v.dmap,_=o(v.imap,(1<<w)-1,P+R,e,_,v.ttree);var A=l._copyOut(v.ttree,0,P,v.ltree);O=(1<<A)-1;var T=l._copyOut(v.ttree,P,R,v.dtree);f=(1<<T)-1,a(v.ltree,A),n(v.ltree,A,M),a(v.dtree,T),n(v.dtree,T,I);}for(;;){var m=M[d(e,_)&O];_+=15&m;var h=m>>>4;if(!(h>>>8))t[u++]=h;else {if(h==256)break;var L=u+h-254;if(h>264){var x=v.ldef[h-257];L=u+(x>>>3)+E(e,_,7&x),_+=7&x;}var U=I[d(e,_)&f];_+=15&U;var H=U>>>4,D=v.ddef[H],Q=(D>>>4)+y(e,_,15&D);for(_+=15&D,C&&(t=c.F._check(t,u+(1<<17)));u<L;)t[u]=t[u++-Q],t[u]=t[u++-Q],t[u]=t[u++-Q],t[u]=t[u++-Q];u=L;}}}else {(7&_)!=0&&(_+=8-(7&_));var N=4+(_>>>3),F=e[N-4]|e[N-3]<<8;C&&(t=c.F._check(t,u+F)),t.set(new g(e.buffer,e.byteOffset+N,F),u),_=N+F<<3,u+=F;}return t.length==u?t:t.slice(0,u)},c.F._check=function(e,t){var g=e.length;if(t<=g)return e;var l=new Uint8Array(Math.max(g<<1,t));return l.set(e,0),l},c.F._decodeTiny=function(e,t,g,l,y,E){for(var o=c.F._bitsE,a=c.F._get17,n=0;n<g;){var d=e[a(l,y)&t];y+=15&d;var v=d>>>4;if(v<=15)E[n]=v,n++;else {var C=0,M=0;v==16?(M=3+o(l,y,2),y+=2,C=E[n-1]):v==17?(M=3+o(l,y,3),y+=3):v==18&&(M=11+o(l,y,7),y+=7);for(var I=n+M;n<I;)E[n]=C,n++;}}return y},c.F._copyOut=function(e,t,g,l){for(var y=0,E=0,o=l.length>>>1;E<g;){var a=e[E+t];l[E<<1]=0,l[1+(E<<1)]=a,a>y&&(y=a),E++;}for(;E<o;)l[E<<1]=0,l[1+(E<<1)]=0,E++;return y},c.F.makeCodes=function(e,t){for(var g,l,y,E,o=c.F.U,a=e.length,n=o.bl_count,d=0;d<=t;d++)n[d]=0;for(d=1;d<a;d+=2)n[e[d]]++;var v=o.next_code;for(g=0,n[0]=0,l=1;l<=t;l++)g=g+n[l-1]<<1,v[l]=g;for(y=0;y<a;y+=2)(E=e[y+1])!=0&&(e[y]=v[E],v[E]++);},c.F.codes2map=function(e,t,g){for(var l=e.length,y=c.F.U.rev15,E=0;E<l;E+=2)if(e[E+1]!=0)for(var o=E>>1,a=e[E+1],n=o<<4|a,d=t-a,v=e[E]<<d,C=v+(1<<d);v!=C;)g[y[v]>>>15-t]=n,v++;},c.F.revCodes=function(e,t){for(var g=c.F.U.rev15,l=15-t,y=0;y<e.length;y+=2){var E=e[y]<<t-e[y+1];e[y]=g[E]>>>l;}},c.F._putsE=function(e,t,g){g<<=7&t;var l=t>>>3;e[l]|=g,e[l+1]|=g>>>8;},c.F._putsF=function(e,t,g){g<<=7&t;var l=t>>>3;e[l]|=g,e[l+1]|=g>>>8,e[l+2]|=g>>>16;},c.F._bitsE=function(e,t,g){return (e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<g)-1},c.F._bitsF=function(e,t,g){return (e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<g)-1},c.F._get17=function(e,t){return (e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},c.F._get25=function(e,t){return (e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},c.F.U=(r=Uint16Array,S=Uint32Array,{next_code:new r(16),bl_count:new r(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new r(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new S(32),flmap:new r(512),fltree:[],fdmap:new r(32),fdtree:[],lmap:new r(32768),ltree:[],ttree:[],dmap:new r(32768),dtree:[],imap:new r(512),itree:[],rev15:new r(32768),lhst:new S(286),dhst:new S(30),ihst:new S(19),lits:new S(15e3),strt:new r(65536),prev:new r(32768)}),(function(){for(var e=c.F.U,t=0;t<32768;t++){var g=t;g=(4278255360&(g=(4042322160&(g=(3435973836&(g=(2863311530&g)>>>1|(1431655765&g)<<1))>>>2|(858993459&g)<<2))>>>4|(252645135&g)<<4))>>>8|(16711935&g)<<8,e.rev15[t]=(g>>>16|g<<16)>>>17;}function l(y,E,o){for(;E--!=0;)y.push(0,o);}for(t=0;t<32;t++)e.ldef[t]=e.of0[t]<<3|e.exb[t],e.ddef[t]=e.df0[t]<<4|e.dxb[t];l(e.fltree,144,8),l(e.fltree,112,9),l(e.fltree,24,7),l(e.fltree,8,8),c.F.makeCodes(e.fltree,9),c.F.codes2map(e.fltree,9,e.flmap),c.F.revCodes(e.fltree,9),l(e.fdtree,32,5),c.F.makeCodes(e.fdtree,5),c.F.codes2map(e.fdtree,5,e.fdmap),c.F.revCodes(e.fdtree,5),l(e.itree,19,0),l(e.ltree,286,0),l(e.dtree,30,0),l(e.ttree,320,0);})();})();var Cn=Tn({__proto__:null,default:$e},[$e]),pe=(function(){var i={nextZero(o,a){for(;o[a]!=0;)a++;return a},readUshort:(o,a)=>o[a]<<8|o[a+1],writeUshort(o,a,n){o[a]=n>>8&255,o[a+1]=255&n;},readUint:(o,a)=>16777216*o[a]+(o[a+1]<<16|o[a+2]<<8|o[a+3]),writeUint(o,a,n){o[a]=n>>24&255,o[a+1]=n>>16&255,o[a+2]=n>>8&255,o[a+3]=255&n;},readASCII(o,a,n){let d="";for(let v=0;v<n;v++)d+=String.fromCharCode(o[a+v]);return d},writeASCII(o,a,n){for(let d=0;d<n.length;d++)o[a+d]=n.charCodeAt(d);},readBytes(o,a,n){let d=[];for(let v=0;v<n;v++)d.push(o[a+v]);return d},pad:o=>o.length<2?`0${o}`:o,readUTF8(o,a,n){let d,v="";for(let C=0;C<n;C++)v+=`%${i.pad(o[a+C].toString(16))}`;try{d=decodeURIComponent(v);}catch{return i.readASCII(o,a,n)}return d}};function r(o,a,n,d){let v=a*n,C=t(d),M=Math.ceil(a*C/8),I=new Uint8Array(4*v),B=new Uint32Array(I.buffer),{ctype:k}=d,{depth:P}=d,R=i.readUshort;if(k==6){let x=v<<2;if(P==8)for(var p=0;p<x;p+=4)I[p]=o[p],I[p+1]=o[p+1],I[p+2]=o[p+2],I[p+3]=o[p+3];if(P==16)for(p=0;p<x;p++)I[p]=o[p<<1];}else if(k==2){let x=d.tabs.tRNS;if(x==null){if(P==8)for(p=0;p<v;p++){var O=3*p;B[p]=255<<24|o[O+2]<<16|o[O+1]<<8|o[O];}if(P==16)for(p=0;p<v;p++)O=6*p,B[p]=255<<24|o[O+4]<<16|o[O+2]<<8|o[O];}else {var f=x[0];let U=x[1],H=x[2];if(P==8)for(p=0;p<v;p++){var u=p<<2;O=3*p,B[p]=255<<24|o[O+2]<<16|o[O+1]<<8|o[O],o[O]==f&&o[O+1]==U&&o[O+2]==H&&(I[u+3]=0);}if(P==16)for(p=0;p<v;p++)u=p<<2,O=6*p,B[p]=255<<24|o[O+4]<<16|o[O+2]<<8|o[O],R(o,O)==f&&R(o,O+2)==U&&R(o,O+4)==H&&(I[u+3]=0);}}else if(k==3){let x=d.tabs.PLTE,U=d.tabs.tRNS,H=U?U.length:0;if(P==1)for(var _=0;_<n;_++){var s=_*M,w=_*a;for(p=0;p<a;p++){u=w+p<<2;var b=3*(A=o[s+(p>>3)]>>7-((7&p)<<0)&1);I[u]=x[b],I[u+1]=x[b+1],I[u+2]=x[b+2],I[u+3]=A<H?U[A]:255;}}if(P==2)for(_=0;_<n;_++)for(s=_*M,w=_*a,p=0;p<a;p++)u=w+p<<2,b=3*(A=o[s+(p>>2)]>>6-((3&p)<<1)&3),I[u]=x[b],I[u+1]=x[b+1],I[u+2]=x[b+2],I[u+3]=A<H?U[A]:255;if(P==4)for(_=0;_<n;_++)for(s=_*M,w=_*a,p=0;p<a;p++)u=w+p<<2,b=3*(A=o[s+(p>>1)]>>4-((1&p)<<2)&15),I[u]=x[b],I[u+1]=x[b+1],I[u+2]=x[b+2],I[u+3]=A<H?U[A]:255;if(P==8)for(p=0;p<v;p++){var A;u=p<<2,b=3*(A=o[p]),I[u]=x[b],I[u+1]=x[b+1],I[u+2]=x[b+2],I[u+3]=A<H?U[A]:255;}}else if(k==4){if(P==8)for(p=0;p<v;p++){u=p<<2;var T=o[m=p<<1];I[u]=T,I[u+1]=T,I[u+2]=T,I[u+3]=o[m+1];}if(P==16)for(p=0;p<v;p++){var m;u=p<<2,T=o[m=p<<2],I[u]=T,I[u+1]=T,I[u+2]=T,I[u+3]=o[m+2];}}else if(k==0)for(f=d.tabs.tRNS?d.tabs.tRNS:-1,_=0;_<n;_++){let x=_*M,U=_*a;if(P==1)for(var h=0;h<a;h++){var L=(T=255*(o[x+(h>>>3)]>>>7-(7&h)&1))==255*f?0:255;B[U+h]=L<<24|T<<16|T<<8|T;}else if(P==2)for(h=0;h<a;h++)L=(T=85*(o[x+(h>>>2)]>>>6-((3&h)<<1)&3))==85*f?0:255,B[U+h]=L<<24|T<<16|T<<8|T;else if(P==4)for(h=0;h<a;h++)L=(T=17*(o[x+(h>>>1)]>>>4-((1&h)<<2)&15))==17*f?0:255,B[U+h]=L<<24|T<<16|T<<8|T;else if(P==8)for(h=0;h<a;h++)L=(T=o[x+h])==f?0:255,B[U+h]=L<<24|T<<16|T<<8|T;else if(P==16)for(h=0;h<a;h++)T=o[x+(h<<1)],L=R(o,x+(h<<1))==f?0:255,B[U+h]=L<<24|T<<16|T<<8|T;}return I}function S(o,a,n,d){let v=t(o),C=Math.ceil(n*v/8),M=new Uint8Array((C+1+o.interlace)*d);return a=o.tabs.CgBI?e(a,M):c(a,M),o.interlace==0?a=g(a,o,0,n,d):o.interlace==1&&(a=(function(B,k){let P=k.width,R=k.height,p=t(k),O=p>>3,f=Math.ceil(P*p/8),u=new Uint8Array(R*f),_=0,s=[0,0,4,0,2,0,1],w=[0,4,0,2,0,1,0],b=[8,8,8,4,4,2,2],A=[8,8,4,4,2,2,1],T=0;for(;T<7;){let h=b[T],L=A[T],x=0,U=0,H=s[T];for(;H<R;)H+=h,U++;let D=w[T];for(;D<P;)D+=L,x++;let Q=Math.ceil(x*p/8);g(B,k,_,x,U);let N=0,F=s[T];for(;F<R;){let $=w[T],K=_+N*Q<<3;for(;$<P;){var m;if(p==1&&(m=(m=B[K>>3])>>7-(7&K)&1,u[F*f+($>>3)]|=m<<7-((7&$)<<0)),p==2&&(m=(m=B[K>>3])>>6-(7&K)&3,u[F*f+($>>2)]|=m<<6-((3&$)<<1)),p==4&&(m=(m=B[K>>3])>>4-(7&K)&15,u[F*f+($>>1)]|=m<<4-((1&$)<<2)),p>=8){let V=F*f+$*O;for(let z=0;z<O;z++)u[V+z]=B[(K>>3)+z];}K+=p,$+=L;}N++,F+=h;}x*U!=0&&(_+=U*(1+Q)),T+=1;}return u})(a,o)),a}function c(o,a){return e(new Uint8Array(o.buffer,2,o.length-6),a)}var e=(function(){let o={H:{}};return o.H.N=function(a,n){let d=Uint8Array,v,C,M=0,I=0,B=0,k=0,P=0,R=0,p=0,O=0,f=0;if(a[0]==3&&a[1]==0)return n||new d(0);let u=o.H,_=u.b,s=u.e,w=u.R,b=u.n,A=u.A,T=u.Z,m=u.m,h=n==null;for(h&&(n=new d(a.length>>>2<<5));M==0;)if(M=_(a,f,1),I=_(a,f+1,2),f+=3,I!=0){if(h&&(n=o.H.W(n,O+(1<<17))),I==1&&(v=m.J,C=m.h,R=511,p=31),I==2){B=s(a,f,5)+257,k=s(a,f+5,5)+1,P=s(a,f+10,4)+4,f+=14;let x=1;for(var L=0;L<38;L+=2)m.Q[L]=0,m.Q[L+1]=0;for(L=0;L<P;L++){let D=s(a,f+3*L,3);m.Q[1+(m.X[L]<<1)]=D,D>x&&(x=D);}f+=3*P,b(m.Q,x),A(m.Q,x,m.u),v=m.w,C=m.d,f=w(m.u,(1<<x)-1,B+k,a,f,m.v);let U=u.V(m.v,0,B,m.C);R=(1<<U)-1;let H=u.V(m.v,B,k,m.D);p=(1<<H)-1,b(m.C,U),A(m.C,U,v),b(m.D,H),A(m.D,H,C);}for(;;){let x=v[T(a,f)&R];f+=15&x;let U=x>>>4;if(!(U>>>8))n[O++]=U;else {if(U==256)break;{let H=O+U-254;if(U>264){let $=m.q[U-257];H=O+($>>>3)+s(a,f,7&$),f+=7&$;}let D=C[T(a,f)&p];f+=15&D;let Q=D>>>4,N=m.c[Q],F=(N>>>4)+_(a,f,15&N);for(f+=15&N;O<H;)n[O]=n[O++-F],n[O]=n[O++-F],n[O]=n[O++-F],n[O]=n[O++-F];O=H;}}}}else {(7&f)!=0&&(f+=8-(7&f));let x=4+(f>>>3),U=a[x-4]|a[x-3]<<8;h&&(n=o.H.W(n,O+U)),n.set(new d(a.buffer,a.byteOffset+x,U),O),f=x+U<<3,O+=U;}return n.length==O?n:n.slice(0,O)},o.H.W=function(a,n){let d=a.length;if(n<=d)return a;let v=new Uint8Array(d<<1);return v.set(a,0),v},o.H.R=function(a,n,d,v,C,M){let I=o.H.e,B=o.H.Z,k=0;for(;k<d;){let P=a[B(v,C)&n];C+=15&P;let R=P>>>4;if(R<=15)M[k]=R,k++;else {let p=0,O=0;R==16?(O=3+I(v,C,2),C+=2,p=M[k-1]):R==17?(O=3+I(v,C,3),C+=3):R==18&&(O=11+I(v,C,7),C+=7);let f=k+O;for(;k<f;)M[k]=p,k++;}}return C},o.H.V=function(a,n,d,v){let C=0,M=0,I=v.length>>>1;for(;M<d;){let B=a[M+n];v[M<<1]=0,v[1+(M<<1)]=B,B>C&&(C=B),M++;}for(;M<I;)v[M<<1]=0,v[1+(M<<1)]=0,M++;return C},o.H.n=function(a,n){let d=o.H.m,v=a.length,C,M,I,B,k=d.j;for(var P=0;P<=n;P++)k[P]=0;for(P=1;P<v;P+=2)k[a[P]]++;let R=d.K;for(C=0,k[0]=0,M=1;M<=n;M++)C=C+k[M-1]<<1,R[M]=C;for(I=0;I<v;I+=2)B=a[I+1],B!=0&&(a[I]=R[B],R[B]++);},o.H.A=function(a,n,d){let v=a.length,C=o.H.m.r;for(let M=0;M<v;M+=2)if(a[M+1]!=0){let I=M>>1,B=a[M+1],k=I<<4|B,P=n-B,R=a[M]<<P,p=R+(1<<P);for(;R!=p;)d[C[R]>>>15-n]=k,R++;}},o.H.l=function(a,n){let d=o.H.m.r,v=15-n;for(let C=0;C<a.length;C+=2){let M=a[C]<<n-a[C+1];a[C]=d[M]>>>v;}},o.H.M=function(a,n,d){d<<=7&n;let v=n>>>3;a[v]|=d,a[v+1]|=d>>>8;},o.H.I=function(a,n,d){d<<=7&n;let v=n>>>3;a[v]|=d,a[v+1]|=d>>>8,a[v+2]|=d>>>16;},o.H.e=function(a,n,d){return (a[n>>>3]|a[1+(n>>>3)]<<8)>>>(7&n)&(1<<d)-1},o.H.b=function(a,n,d){return (a[n>>>3]|a[1+(n>>>3)]<<8|a[2+(n>>>3)]<<16)>>>(7&n)&(1<<d)-1},o.H.Z=function(a,n){return (a[n>>>3]|a[1+(n>>>3)]<<8|a[2+(n>>>3)]<<16)>>>(7&n)},o.H.i=function(a,n){return (a[n>>>3]|a[1+(n>>>3)]<<8|a[2+(n>>>3)]<<16|a[3+(n>>>3)]<<24)>>>(7&n)},o.H.m=(function(){let a=Uint16Array,n=Uint32Array;return {K:new a(16),j:new a(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new a(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new n(32),J:new a(512),_:[],h:new a(32),$:[],w:new a(32768),C:[],v:[],d:new a(32768),D:[],u:new a(512),Q:[],r:new a(32768),s:new n(286),Y:new n(30),a:new n(19),t:new n(15e3),k:new a(65536),g:new a(32768)}})(),(function(){let a=o.H.m;for(var n=0;n<32768;n++){let v=n;v=(2863311530&v)>>>1|(1431655765&v)<<1,v=(3435973836&v)>>>2|(858993459&v)<<2,v=(4042322160&v)>>>4|(252645135&v)<<4,v=(4278255360&v)>>>8|(16711935&v)<<8,a.r[n]=(v>>>16|v<<16)>>>17;}function d(v,C,M){for(;C--!=0;)v.push(0,M);}for(n=0;n<32;n++)a.q[n]=a.S[n]<<3|a.T[n],a.c[n]=a.p[n]<<4|a.z[n];d(a._,144,8),d(a._,112,9),d(a._,24,7),d(a._,8,8),o.H.n(a._,9),o.H.A(a._,9,a.J),o.H.l(a._,9),d(a.$,32,5),o.H.n(a.$,5),o.H.A(a.$,5,a.h),o.H.l(a.$,5),d(a.Q,19,0),d(a.C,286,0),d(a.D,30,0),d(a.v,320,0);})(),o.H.N})();function t(o){return [1,null,3,1,2,null,4][o.ctype]*o.depth}function g(o,a,n,d,v){let C=t(a),M=Math.ceil(d*C/8),I,B;C=Math.ceil(C/8);let k=o[n],P=0;if(k>1&&(o[n]=[0,0,1][k-2]),k==3)for(P=C;P<M;P++)o[P+1]=o[P+1]+(o[P+1-C]>>>1)&255;for(let R=0;R<v;R++)if(I=n+R*M,B=I+R+1,k=o[B-1],P=0,k==0)for(;P<M;P++)o[I+P]=o[B+P];else if(k==1){for(;P<C;P++)o[I+P]=o[B+P];for(;P<M;P++)o[I+P]=o[B+P]+o[I+P-C];}else if(k==2)for(;P<M;P++)o[I+P]=o[B+P]+o[I+P-M];else if(k==3){for(;P<C;P++)o[I+P]=o[B+P]+(o[I+P-M]>>>1);for(;P<M;P++)o[I+P]=o[B+P]+(o[I+P-M]+o[I+P-C]>>>1);}else {for(;P<C;P++)o[I+P]=o[B+P]+l(0,o[I+P-M],0);for(;P<M;P++)o[I+P]=o[B+P]+l(o[I+P-C],o[I+P-M],o[I+P-C-M]);}return o}function l(o,a,n){let d=o+a-n,v=d-o,C=d-a,M=d-n;return v*v<=C*C&&v*v<=M*M?o:C*C<=M*M?a:n}function y(o,a,n){n.width=i.readUint(o,a),a+=4,n.height=i.readUint(o,a),a+=4,n.depth=o[a],a++,n.ctype=o[a],a++,n.compress=o[a],a++,n.filter=o[a],a++,n.interlace=o[a],a++;}function E(o,a,n,d,v,C,M,I,B){let k=Math.min(a,v),P=Math.min(n,C),R=0,p=0;for(let T=0;T<P;T++)for(let m=0;m<k;m++)if(M>=0&&I>=0?(R=T*a+m<<2,p=(I+T)*v+M+m<<2):(R=(-I+T)*a-M+m<<2,p=T*v+m<<2),B==0)d[p]=o[R],d[p+1]=o[R+1],d[p+2]=o[R+2],d[p+3]=o[R+3];else if(B==1){var O=o[R+3]*.00392156862745098,f=o[R]*O,u=o[R+1]*O,_=o[R+2]*O,s=d[p+3]*(1/255),w=d[p]*s,b=d[p+1]*s,A=d[p+2]*s;let h=1-O,L=O+s*h,x=L==0?0:1/L;d[p+3]=255*L,d[p+0]=(f+w*h)*x,d[p+1]=(u+b*h)*x,d[p+2]=(_+A*h)*x;}else if(B==2)O=o[R+3],f=o[R],u=o[R+1],_=o[R+2],s=d[p+3],w=d[p],b=d[p+1],A=d[p+2],O==s&&f==w&&u==b&&_==A?(d[p]=0,d[p+1]=0,d[p+2]=0,d[p+3]=0):(d[p]=f,d[p+1]=u,d[p+2]=_,d[p+3]=O);else if(B==3){if(O=o[R+3],f=o[R],u=o[R+1],_=o[R+2],s=d[p+3],w=d[p],b=d[p+1],A=d[p+2],O==s&&f==w&&u==b&&_==A)continue;if(O<220&&s>20)return false}return true}return {decode:function(a){let n=new Uint8Array(a),d=8,v=i,C=v.readUshort,M=v.readUint,I={tabs:{},frames:[]},B=new Uint8Array(n.length),k,P=0,R=0,p=[137,80,78,71,13,10,26,10];for(var O=0;O<8;O++)if(n[O]!=p[O])throw "The input is not a PNG file!";for(;d<n.length;){let T=v.readUint(n,d);d+=4;let m=v.readASCII(n,d,4);if(d+=4,m=="IHDR")y(n,d,I);else if(m=="iCCP"){for(var f=d;n[f]!=0;)f++;v.readASCII(n,d,f-d),n[f+1];let h=n.slice(f+2,d+T),L=null;try{L=c(h);}catch{L=e(h);}I.tabs[m]=L;}else if(m=="CgBI")I.tabs[m]=n.slice(d,d+4);else if(m=="IDAT"){for(O=0;O<T;O++)B[P+O]=n[d+O];P+=T;}else if(m=="acTL")I.tabs[m]={num_frames:M(n,d),num_plays:M(n,d+4)},k=new Uint8Array(n.length);else if(m=="fcTL"){R!=0&&((A=I.frames[I.frames.length-1]).data=S(I,k.slice(0,R),A.rect.width,A.rect.height),R=0);let h={x:M(n,d+12),y:M(n,d+16),width:M(n,d+4),height:M(n,d+8)},L=C(n,d+22);L=C(n,d+20)/(L==0?100:L);let x={rect:h,delay:Math.round(1e3*L),dispose:n[d+24],blend:n[d+25]};I.frames.push(x);}else if(m=="fdAT"){for(O=0;O<T-4;O++)k[R+O]=n[d+O+4];R+=T-4;}else if(m=="pHYs")I.tabs[m]=[v.readUint(n,d),v.readUint(n,d+4),n[d+8]];else if(m=="cHRM")for(I.tabs[m]=[],O=0;O<8;O++)I.tabs[m].push(v.readUint(n,d+4*O));else if(m=="tEXt"||m=="zTXt"){I.tabs[m]==null&&(I.tabs[m]={});var u=v.nextZero(n,d),_=v.readASCII(n,d,u-d),s=d+T-u-1;if(m=="tEXt")b=v.readASCII(n,u+1,s);else {var w=c(n.slice(u+2,u+2+s));b=v.readUTF8(w,0,w.length);}I.tabs[m][_]=b;}else if(m=="iTXt"){I.tabs[m]==null&&(I.tabs[m]={}),u=0,f=d,u=v.nextZero(n,f),_=v.readASCII(n,f,u-f);let h=n[f=u+1];var b;n[f+1],f+=2,u=v.nextZero(n,f),v.readASCII(n,f,u-f),f=u+1,u=v.nextZero(n,f),v.readUTF8(n,f,u-f),s=T-((f=u+1)-d),h==0?b=v.readUTF8(n,f,s):(w=c(n.slice(f,f+s)),b=v.readUTF8(w,0,w.length)),I.tabs[m][_]=b;}else if(m=="PLTE")I.tabs[m]=v.readBytes(n,d,T);else if(m=="hIST"){let h=I.tabs.PLTE.length/3;for(I.tabs[m]=[],O=0;O<h;O++)I.tabs[m].push(C(n,d+2*O));}else if(m=="tRNS")I.ctype==3?I.tabs[m]=v.readBytes(n,d,T):I.ctype==0?I.tabs[m]=C(n,d):I.ctype==2&&(I.tabs[m]=[C(n,d),C(n,d+2),C(n,d+4)]);else if(m=="gAMA")I.tabs[m]=v.readUint(n,d)/1e5;else if(m=="sRGB")I.tabs[m]=n[d];else if(m=="bKGD")I.ctype==0||I.ctype==4?I.tabs[m]=[C(n,d)]:I.ctype==2||I.ctype==6?I.tabs[m]=[C(n,d),C(n,d+2),C(n,d+4)]:I.ctype==3&&(I.tabs[m]=n[d]);else if(m=="IEND")break;d+=T,v.readUint(n,d),d+=4;}var A;return R!=0&&((A=I.frames[I.frames.length-1]).data=S(I,k.slice(0,R),A.rect.width,A.rect.height)),I.data=S(I,B,I.width,I.height),delete I.compress,delete I.interlace,delete I.filter,I},toRGBA8:function(a){let n=a.width,d=a.height;if(a.tabs.acTL==null)return [r(a.data,n,d,a).buffer];let v=[];a.frames[0].data==null&&(a.frames[0].data=a.data);let C=n*d*4,M=new Uint8Array(C),I=new Uint8Array(C),B=new Uint8Array(C);for(let P=0;P<a.frames.length;P++){let R=a.frames[P],p=R.rect.x,O=R.rect.y,f=R.rect.width,u=R.rect.height,_=r(R.data,f,u,a);if(P!=0)for(var k=0;k<C;k++)B[k]=M[k];if(R.blend==0?E(_,f,u,M,n,d,p,O,0):R.blend==1&&E(_,f,u,M,n,d,p,O,1),v.push(M.buffer.slice(0)),R.dispose!=0){if(R.dispose==1)E(I,f,u,M,n,d,p,O,0);else if(R.dispose==2)for(k=0;k<C;k++)M[k]=B[k];}}return v},_paeth:l,_copyTile:E,_bin:i}})();(function(){let{_copyTile:i}=pe,{_bin:r}=pe,S=pe._paeth;var c={table:(function(){let f=new Uint32Array(256);for(let u=0;u<256;u++){let _=u;for(let s=0;s<8;s++)1&_?_=3988292384^_>>>1:_>>>=1;f[u]=_;}return f})(),update(f,u,_,s){for(let w=0;w<s;w++)f=c.table[255&(f^u[_+w])]^f>>>8;return f},crc:(f,u,_)=>4294967295^c.update(4294967295,f,u,_)};function e(f,u,_,s){u[_]+=f[0]*s>>4,u[_+1]+=f[1]*s>>4,u[_+2]+=f[2]*s>>4,u[_+3]+=f[3]*s>>4;}function t(f){return Math.max(0,Math.min(255,f))}function g(f,u){let _=f[0]-u[0],s=f[1]-u[1],w=f[2]-u[2],b=f[3]-u[3];return _*_+s*s+w*w+b*b}function l(f,u,_,s,w,b,A){A==null&&(A=1);let T=s.length,m=[];for(var h=0;h<T;h++){let F=s[h];m.push([F>>>0&255,F>>>8&255,F>>>16&255,F>>>24&255]);}for(h=0;h<T;h++){let F=4294967295;for(var L=0,x=0;x<T;x++){var U=g(m[h],m[x]);x!=h&&U<F&&(F=U,L=x);}}let H=new Uint32Array(w.buffer),D=new Int16Array(u*_*4),Q=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(h=0;h<Q.length;h++)Q[h]=255*((Q[h]+.5)/16-.5);for(let F=0;F<_;F++)for(let $=0;$<u;$++){var N;h=4*(F*u+$),A!=2?N=[t(f[h]+D[h]),t(f[h+1]+D[h+1]),t(f[h+2]+D[h+2]),t(f[h+3]+D[h+3])]:(U=Q[4*(3&F)+(3&$)],N=[t(f[h]+U),t(f[h+1]+U),t(f[h+2]+U),t(f[h+3]+U)]),L=0;let K=16777215;for(x=0;x<T;x++){let q=g(N,m[x]);q<K&&(K=q,L=x);}let V=m[L],z=[N[0]-V[0],N[1]-V[1],N[2]-V[2],N[3]-V[3]];A==1&&($!=u-1&&e(z,D,h+4,7),F!=_-1&&($!=0&&e(z,D,h+4*u-4,3),e(z,D,h+4*u,5),$!=u-1&&e(z,D,h+4*u+4,1))),b[h>>2]=L,H[h>>2]=s[L];}}function y(f,u,_,s,w){w==null&&(w={});let{crc:b}=c,A=r.writeUint,T=r.writeUshort,m=r.writeASCII,h=8,L=f.frames.length>1,x,U=false,H=33+(L?20:0);if(w.sRGB!=null&&(H+=13),w.pHYs!=null&&(H+=21),w.iCCP!=null&&(x=pako.deflate(w.iCCP),H+=21+x.length+4),f.ctype==3){for(var D=f.plte.length,Q=0;Q<D;Q++)f.plte[Q]>>>24!=255&&(U=true);H+=8+3*D+4+(U?8+1*D+4:0);}for(var N=0;N<f.frames.length;N++)L&&(H+=38),H+=(V=f.frames[N]).cimg.length+12,N!=0&&(H+=4);H+=12;let F=new Uint8Array(H),$=[137,80,78,71,13,10,26,10];for(Q=0;Q<8;Q++)F[Q]=$[Q];if(A(F,h,13),h+=4,m(F,h,"IHDR"),h+=4,A(F,h,u),h+=4,A(F,h,_),h+=4,F[h]=f.depth,h++,F[h]=f.ctype,h++,F[h]=0,h++,F[h]=0,h++,F[h]=0,h++,A(F,h,b(F,h-17,17)),h+=4,w.sRGB!=null&&(A(F,h,1),h+=4,m(F,h,"sRGB"),h+=4,F[h]=w.sRGB,h++,A(F,h,b(F,h-5,5)),h+=4),w.iCCP!=null){let z=13+x.length;A(F,h,z),h+=4,m(F,h,"iCCP"),h+=4,m(F,h,"ICC profile"),h+=11,h+=2,F.set(x,h),h+=x.length,A(F,h,b(F,h-(z+4),z+4)),h+=4;}if(w.pHYs!=null&&(A(F,h,9),h+=4,m(F,h,"pHYs"),h+=4,A(F,h,w.pHYs[0]),h+=4,A(F,h,w.pHYs[1]),h+=4,F[h]=w.pHYs[2],h++,A(F,h,b(F,h-13,13)),h+=4),L&&(A(F,h,8),h+=4,m(F,h,"acTL"),h+=4,A(F,h,f.frames.length),h+=4,A(F,h,w.loop!=null?w.loop:0),h+=4,A(F,h,b(F,h-12,12)),h+=4),f.ctype==3){for(A(F,h,3*(D=f.plte.length)),h+=4,m(F,h,"PLTE"),h+=4,Q=0;Q<D;Q++){let z=3*Q,q=f.plte[Q],G=255&q,W=q>>>8&255,ie=q>>>16&255;F[h+z+0]=G,F[h+z+1]=W,F[h+z+2]=ie;}if(h+=3*D,A(F,h,b(F,h-3*D-4,3*D+4)),h+=4,U){for(A(F,h,D),h+=4,m(F,h,"tRNS"),h+=4,Q=0;Q<D;Q++)F[h+Q]=f.plte[Q]>>>24&255;h+=D,A(F,h,b(F,h-D-4,D+4)),h+=4;}}let K=0;for(N=0;N<f.frames.length;N++){var V=f.frames[N];L&&(A(F,h,26),h+=4,m(F,h,"fcTL"),h+=4,A(F,h,K++),h+=4,A(F,h,V.rect.width),h+=4,A(F,h,V.rect.height),h+=4,A(F,h,V.rect.x),h+=4,A(F,h,V.rect.y),h+=4,T(F,h,s[N]),h+=2,T(F,h,1e3),h+=2,F[h]=V.dispose,h++,F[h]=V.blend,h++,A(F,h,b(F,h-30,30)),h+=4);let z=V.cimg;A(F,h,(D=z.length)+(N==0?0:4)),h+=4;let q=h;m(F,h,N==0?"IDAT":"fdAT"),h+=4,N!=0&&(A(F,h,K++),h+=4),F.set(z,h),h+=D,A(F,h,b(F,q,h-q)),h+=4;}return A(F,h,0),h+=4,m(F,h,"IEND"),h+=4,A(F,h,b(F,h-4,4)),h+=4,F.buffer}function E(f,u,_){for(let s=0;s<f.frames.length;s++){let w=f.frames[s];w.rect.width;let b=w.rect.height,A=new Uint8Array(b*w.bpl+b);w.cimg=d(w.img,b,w.bpp,w.bpl,A,u,_);}}function o(f,u,_,s,w){let b=w[0],A=w[1],T=w[2],m=w[3],h=w[4],L=w[5],x=6,U=8,H=255;for(var D=0;D<f.length;D++){let te=new Uint8Array(f[D]);for(var Q=te.length,N=0;N<Q;N+=4)H&=te[N+3];}let F=H!=255,$=(function(Y,J,ne,oe,j,ue){let ee=[];for(var X=0;X<Y.length;X++){let ce=new Uint8Array(Y[X]),he=new Uint32Array(ce.buffer);var le;let de=0,Ae=0,me=J,Ie=ne,Ye=oe?1:0;if(X!=0){let yn=ue||oe||X==1||ee[X-2].dispose!=0?1:2,Je=0,vt=1e9;for(let Le=0;Le<yn;Le++){var ge=new Uint8Array(Y[X-1-Le]);let wn=new Uint32Array(Y[X-1-Le]),_e=J,be=ne,Ue=-1,De=-1;for(let Re=0;Re<ne;Re++)for(let Ce=0;Ce<J;Ce++)he[se=Re*J+Ce]!=wn[se]&&(Ce<_e&&(_e=Ce),Ce>Ue&&(Ue=Ce),Re<be&&(be=Re),Re>De&&(De=Re));Ue==-1&&(_e=be=Ue=De=0),j&&((1&_e)==1&&_e--,(1&be)==1&&be--);let _t=(Ue-_e+1)*(De-be+1);_t<vt&&(vt=_t,Je=Le,de=_e,Ae=be,me=Ue-_e+1,Ie=De-be+1);}ge=new Uint8Array(Y[X-1-Je]),Je==1&&(ee[X-1].dispose=2),le=new Uint8Array(me*Ie*4),i(ge,J,ne,le,me,Ie,-de,-Ae,0),Ye=i(ce,J,ne,le,me,Ie,-de,-Ae,3)?1:0,Ye==1?n(ce,J,ne,le,{x:de,y:Ae,width:me,height:Ie}):i(ce,J,ne,le,me,Ie,-de,-Ae,0);}else le=ce.slice(0);ee.push({rect:{x:de,y:Ae,width:me,height:Ie},img:le,blend:Ye,dispose:0});}if(oe)for(X=0;X<ee.length;X++){if((Te=ee[X]).blend==1)continue;let ce=Te.rect,he=ee[X-1].rect,de=Math.min(ce.x,he.x),Ae=Math.min(ce.y,he.y),me={x:de,y:Ae,width:Math.max(ce.x+ce.width,he.x+he.width)-de,height:Math.max(ce.y+ce.height,he.y+he.height)-Ae};ee[X-1].dispose=1,X-1!=0&&a(Y,J,ne,ee,X-1,me,j),a(Y,J,ne,ee,X,me,j);}let He=0;if(Y.length!=1)for(var se=0;se<ee.length;se++){var Te;He+=(Te=ee[se]).rect.width*Te.rect.height;}return ee})(f,u,_,b,A,T),K={},V=[],z=[];if(s!=0){let te=[];for(N=0;N<$.length;N++)te.push($[N].img.buffer);let Y=(function(j){let ue=0;for(var ee=0;ee<j.length;ee++)ue+=j[ee].byteLength;let X=new Uint8Array(ue),le=0;for(ee=0;ee<j.length;ee++){let ge=new Uint8Array(j[ee]),He=ge.length;for(let se=0;se<He;se+=4){let Te=ge[se],ce=ge[se+1],he=ge[se+2],de=ge[se+3];de==0&&(Te=ce=he=0),X[le+se]=Te,X[le+se+1]=ce,X[le+se+2]=he,X[le+se+3]=de;}le+=He;}return X.buffer})(te),J=C(Y,s);for(N=0;N<J.plte.length;N++)V.push(J.plte[N].est.rgba);let ne=0;for(N=0;N<$.length;N++){let oe=(G=$[N]).img.length;var q=new Uint8Array(J.inds.buffer,ne>>2,oe>>2);z.push(q);let j=new Uint8Array(J.abuf,ne,oe);L&&l(G.img,G.rect.width,G.rect.height,V,j,q),G.img.set(j),ne+=oe;}}else for(D=0;D<$.length;D++){var G=$[D];let te=new Uint32Array(G.img.buffer);var W=G.rect.width;for(Q=te.length,q=new Uint8Array(Q),z.push(q),N=0;N<Q;N++){let Y=te[N];if(N!=0&&Y==te[N-1])q[N]=q[N-1];else if(N>W&&Y==te[N-W])q[N]=q[N-W];else {let J=K[Y];if(J==null&&(K[Y]=J=V.length,V.push(Y),V.length>=300))break;q[N]=J;}}}let ie=V.length;for(ie<=256&&h==0&&(U=ie<=2?1:ie<=4?2:ie<=16?4:8,U=Math.max(U,m)),D=0;D<$.length;D++){(G=$[D]).rect.x,G.rect.y,W=G.rect.width;let te=G.rect.height,Y=G.img;new Uint32Array(Y.buffer);let J=4*W,ne=4;if(ie<=256&&h==0){J=Math.ceil(U*W/8);var ae=new Uint8Array(J*te);let oe=z[D];for(let j=0;j<te;j++){N=j*J;let ue=j*W;if(U==8)for(var Z=0;Z<W;Z++)ae[N+Z]=oe[ue+Z];else if(U==4)for(Z=0;Z<W;Z++)ae[N+(Z>>1)]|=oe[ue+Z]<<4-4*(1&Z);else if(U==2)for(Z=0;Z<W;Z++)ae[N+(Z>>2)]|=oe[ue+Z]<<6-2*(3&Z);else if(U==1)for(Z=0;Z<W;Z++)ae[N+(Z>>3)]|=oe[ue+Z]<<7-1*(7&Z);}Y=ae,x=3,ne=1;}else if(F==0&&$.length==1){ae=new Uint8Array(W*te*3);let oe=W*te;for(N=0;N<oe;N++){let j=3*N,ue=4*N;ae[j]=Y[ue],ae[j+1]=Y[ue+1],ae[j+2]=Y[ue+2];}Y=ae,x=2,ne=3,J=3*W;}G.img=Y,G.bpl=J,G.bpp=ne;}return {ctype:x,depth:U,plte:V,frames:$}}function a(f,u,_,s,w,b,A){let T=Uint8Array,m=Uint32Array,h=new T(f[w-1]),L=new m(f[w-1]),x=w+1<f.length?new T(f[w+1]):null,U=new T(f[w]),H=new m(U.buffer),D=u,Q=_,N=-1,F=-1;for(let K=0;K<b.height;K++)for(let V=0;V<b.width;V++){let z=b.x+V,q=b.y+K,G=q*u+z,W=H[G];W==0||s[w-1].dispose==0&&L[G]==W&&(x==null||x[4*G+3]!=0)||(z<D&&(D=z),z>N&&(N=z),q<Q&&(Q=q),q>F&&(F=q));}N==-1&&(D=Q=N=F=0),A&&((1&D)==1&&D--,(1&Q)==1&&Q--),b={x:D,y:Q,width:N-D+1,height:F-Q+1};let $=s[w];$.rect=b,$.blend=1,$.img=new Uint8Array(b.width*b.height*4),s[w-1].dispose==0?(i(h,u,_,$.img,b.width,b.height,-b.x,-b.y,0),n(U,u,_,$.img,b)):i(U,u,_,$.img,b.width,b.height,-b.x,-b.y,0);}function n(f,u,_,s,w){i(f,u,_,s,w.width,w.height,-w.x,-w.y,2);}function d(f,u,_,s,w,b,A){let T=[],m,h=[0,1,2,3,4];b!=-1?h=[b]:(u*s>5e5||_==1)&&(h=[0]),A&&(m={level:0});let L=Cn;for(var x=0;x<h.length;x++){for(let D=0;D<u;D++)v(w,f,D,s,_,h[x]);T.push(L.deflate(w,m));}let U,H=1e9;for(x=0;x<T.length;x++)T[x].length<H&&(U=x,H=T[x].length);return T[U]}function v(f,u,_,s,w,b){let A=_*s,T=A+_;if(f[T]=b,T++,b==0)if(s<500)for(var m=0;m<s;m++)f[T+m]=u[A+m];else f.set(new Uint8Array(u.buffer,A,s),T);else if(b==1){for(m=0;m<w;m++)f[T+m]=u[A+m];for(m=w;m<s;m++)f[T+m]=u[A+m]-u[A+m-w]+256&255;}else if(_==0){for(m=0;m<w;m++)f[T+m]=u[A+m];if(b==2)for(m=w;m<s;m++)f[T+m]=u[A+m];if(b==3)for(m=w;m<s;m++)f[T+m]=u[A+m]-(u[A+m-w]>>1)+256&255;if(b==4)for(m=w;m<s;m++)f[T+m]=u[A+m]-S(u[A+m-w],0,0)+256&255;}else {if(b==2)for(m=0;m<s;m++)f[T+m]=u[A+m]+256-u[A+m-s]&255;if(b==3){for(m=0;m<w;m++)f[T+m]=u[A+m]+256-(u[A+m-s]>>1)&255;for(m=w;m<s;m++)f[T+m]=u[A+m]+256-(u[A+m-s]+u[A+m-w]>>1)&255;}if(b==4){for(m=0;m<w;m++)f[T+m]=u[A+m]+256-S(0,u[A+m-s],0)&255;for(m=w;m<s;m++)f[T+m]=u[A+m]+256-S(u[A+m-w],u[A+m-s],u[A+m-w-s])&255;}}}function C(f,u){let _=new Uint8Array(f),s=_.slice(0),w=new Uint32Array(s.buffer),b=M(s,u),A=b[0],T=b[1],m=_.length,h=new Uint8Array(m>>2),L;if(_.length<2e7)for(var x=0;x<m;x+=4)L=I(A,U=_[x]*(1/255),H=_[x+1]*(1/255),D=_[x+2]*(1/255),Q=_[x+3]*(1/255)),h[x>>2]=L.ind,w[x>>2]=L.est.rgba;else for(x=0;x<m;x+=4){var U=_[x]*.00392156862745098,H=_[x+1]*(1/255),D=_[x+2]*(1/255),Q=_[x+3]*(1/255);for(L=A;L.left;)L=B(L.est,U,H,D,Q)<=0?L.left:L.right;h[x>>2]=L.ind,w[x>>2]=L.est.rgba;}return {abuf:s.buffer,inds:h,plte:T}}function M(f,u,_){_==null&&(_=1e-4);let s=new Uint32Array(f.buffer),w={i0:0,i1:f.length,bst:null,est:null,tdst:0,left:null,right:null};w.bst=R(f,w.i0,w.i1),w.est=p(w.bst);let b=[w];for(;b.length<u;){let T=0,m=0;for(var A=0;A<b.length;A++)b[A].est.L>T&&(T=b[A].est.L,m=A);if(T<_)break;let h=b[m],L=k(f,s,h.i0,h.i1,h.est.e,h.est.eMq255);if(h.i0>=L||h.i1<=L){h.est.L=0;continue}let x={i0:h.i0,i1:L,bst:null,est:null,tdst:0,left:null,right:null};x.bst=R(f,x.i0,x.i1),x.est=p(x.bst);let U={i0:L,i1:h.i1,bst:null,est:null,tdst:0,left:null,right:null};for(U.bst={R:[],m:[],N:h.bst.N-x.bst.N},A=0;A<16;A++)U.bst.R[A]=h.bst.R[A]-x.bst.R[A];for(A=0;A<4;A++)U.bst.m[A]=h.bst.m[A]-x.bst.m[A];U.est=p(U.bst),h.left=x,h.right=U,b[m]=x,b.push(U);}for(b.sort(((T,m)=>m.bst.N-T.bst.N)),A=0;A<b.length;A++)b[A].ind=A;return [w,b]}function I(f,u,_,s,w){if(f.left==null)return f.tdst=(function(x,U,H,D,Q){let N=U-x[0],F=H-x[1],$=D-x[2],K=Q-x[3];return N*N+F*F+$*$+K*K})(f.est.q,u,_,s,w),f;let b=B(f.est,u,_,s,w),A=f.left,T=f.right;b>0&&(A=f.right,T=f.left);let m=I(A,u,_,s,w);if(m.tdst<=b*b)return m;let h=I(T,u,_,s,w);return h.tdst<m.tdst?h:m}function B(f,u,_,s,w){let{e:b}=f;return b[0]*u+b[1]*_+b[2]*s+b[3]*w-f.eMq}function k(f,u,_,s,w,b){for(s-=4;_<s;){for(;P(f,_,w)<=b;)_+=4;for(;P(f,s,w)>b;)s-=4;if(_>=s)break;let A=u[_>>2];u[_>>2]=u[s>>2],u[s>>2]=A,_+=4,s-=4;}for(;P(f,_,w)>b;)_-=4;return _+4}function P(f,u,_){return f[u]*_[0]+f[u+1]*_[1]+f[u+2]*_[2]+f[u+3]*_[3]}function R(f,u,_){let s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=[0,0,0,0],b=_-u>>2;for(let A=u;A<_;A+=4){let T=f[A]*.00392156862745098,m=f[A+1]*(1/255),h=f[A+2]*(1/255),L=f[A+3]*(1/255);w[0]+=T,w[1]+=m,w[2]+=h,w[3]+=L,s[0]+=T*T,s[1]+=T*m,s[2]+=T*h,s[3]+=T*L,s[5]+=m*m,s[6]+=m*h,s[7]+=m*L,s[10]+=h*h,s[11]+=h*L,s[15]+=L*L;}return s[4]=s[1],s[8]=s[2],s[9]=s[6],s[12]=s[3],s[13]=s[7],s[14]=s[11],{R:s,m:w,N:b}}function p(f){let{R:u}=f,{m:_}=f,{N:s}=f,w=_[0],b=_[1],A=_[2],T=_[3],m=s==0?0:1/s,h=[u[0]-w*w*m,u[1]-w*b*m,u[2]-w*A*m,u[3]-w*T*m,u[4]-b*w*m,u[5]-b*b*m,u[6]-b*A*m,u[7]-b*T*m,u[8]-A*w*m,u[9]-A*b*m,u[10]-A*A*m,u[11]-A*T*m,u[12]-T*w*m,u[13]-T*b*m,u[14]-T*A*m,u[15]-T*T*m],L=h,x=O,U=[Math.random(),Math.random(),Math.random(),Math.random()],H=0,D=0;if(s!=0)for(let N=0;N<16&&(U=x.multVec(L,U),D=Math.sqrt(x.dot(U,U)),U=x.sml(1/D,U),!(N!=0&&Math.abs(D-H)<1e-9));N++)H=D;let Q=[w*m,b*m,A*m,T*m];return {Cov:h,q:Q,e:U,L:H,eMq255:x.dot(x.sml(255,Q),U),eMq:x.dot(U,Q),rgba:(Math.round(255*Q[3])<<24|Math.round(255*Q[2])<<16|Math.round(255*Q[1])<<8|Math.round(255*Q[0])<<0)>>>0}}var O={multVec:(f,u)=>[f[0]*u[0]+f[1]*u[1]+f[2]*u[2]+f[3]*u[3],f[4]*u[0]+f[5]*u[1]+f[6]*u[2]+f[7]*u[3],f[8]*u[0]+f[9]*u[1]+f[10]*u[2]+f[11]*u[3],f[12]*u[0]+f[13]*u[1]+f[14]*u[2]+f[15]*u[3]],dot:(f,u)=>f[0]*u[0]+f[1]*u[1]+f[2]*u[2]+f[3]*u[3],sml:(f,u)=>[f*u[0],f*u[1],f*u[2],f*u[3]]};pe.encode=function(u,_,s,w,b,A,T){w==null&&(w=0),T==null&&(T=false);let m=o(u,_,s,w,[false,false,false,0,T,false]);return E(m,-1),y(m,_,s,b,A)},pe.encodeLL=function(u,_,s,w,b,A,T,m){let h={ctype:0+(w==1?0:2)+(b==0?0:4),depth:A,frames:[]},L=(w+b)*A,x=L*_;for(let U=0;U<u.length;U++)h.frames.push({rect:{x:0,y:0,width:_,height:s},img:new Uint8Array(u[U]),blend:0,dispose:1,bpp:Math.ceil(L/8),bpl:Math.ceil(x/8)});return E(h,0,true),y(h,_,s,T,m)},pe.encode.compress=o,pe.encode.dither=l,pe.quantize=C,pe.quantize.getKDtree=M,pe.quantize.getNearest=I;})();var It={toArrayBuffer(i,r){let S=i.width,c=i.height,e=S<<2,t=i.getContext("2d").getImageData(0,0,S,c),g=new Uint32Array(t.data.buffer),l=(32*S+31)/32<<2,y=l*c,E=122+y,o=new ArrayBuffer(E),a=new DataView(o),n=1<<20,d,v,C,M,I=n,B=0,k=0,P=0;function R(f){a.setUint16(k,f,true),k+=2;}function p(f){a.setUint32(k,f,true),k+=4;}function O(f){k+=f;}R(19778),p(E),O(4),p(122),p(108),p(S),p(-c>>>0),R(1),R(32),p(3),p(y),p(2835),p(2835),O(8),p(16711680),p(65280),p(255),p(4278190080),p(1466527264),(function f(){for(;B<c&&I>0;){for(M=122+B*l,d=0;d<e;)I--,v=g[P++],C=v>>>24,a.setUint32(M+d,v<<8|C),d+=4;B++;}P<g.length?(I=n,setTimeout(f,It._dly)):r(o);})();},toBlob(i,r){this.toArrayBuffer(i,(S=>{r(new Blob([S],{type:"image/bmp"}));}));},_dly:9},fe={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},xn={[fe.CHROME]:16384,[fe.FIREFOX]:11180,[fe.DESKTOP_SAFARI]:16384,[fe.IE]:8192,[fe.IOS]:4096,[fe.ETC]:8192},et=typeof globalThis.window<"u",Rt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,We=et&&globalThis.window.cordova&&globalThis.window.cordova.require&&globalThis.window.cordova.require("cordova/modulemapper"),On=(et||Rt)&&(We&&We.getOriginalSymbol(globalThis.window,"File")||typeof File<"u"&&File),Ct=(et||Rt)&&(We&&We.getOriginalSymbol(globalThis.window,"FileReader")||typeof globalThis.FileReader<"u"&&globalThis.FileReader);function tt(i,r,S=Date.now()){return new Promise((c=>{let e=i.split(","),t=e[0].match(/:(.*?);/)[1],g=globalThis.atob(e[1]),l=g.length,y=new Uint8Array(l);for(;l--;)y[l]=g.charCodeAt(l);let E=new Blob([y],{type:t});E.name=r,E.lastModified=S,c(E);}))}function xt(i){return new Promise(((r,S)=>{let c=new Ct;c.onload=()=>r(c.result),c.onerror=e=>S(e),c.readAsDataURL(i);}))}function Ot(i){return new Promise(((r,S)=>{let c=new globalThis.Image;c.onload=()=>r(c),c.onerror=e=>S(e),c.src=i;}))}function xe(){if(xe.cachedResult!==void 0)return xe.cachedResult;let i=fe.ETC,{userAgent:r}=navigator;return /Chrom(e|ium)/i.test(r)?i=fe.CHROME:/iP(ad|od|hone)/i.test(r)&&/WebKit/i.test(r)?i=fe.IOS:/Safari/i.test(r)?i=fe.DESKTOP_SAFARI:/Firefox/i.test(r)?i=fe.FIREFOX:(/MSIE/i.test(r)||globalThis.document.documentMode)&&(i=fe.IE),xe.cachedResult=i,xe.cachedResult}function Ut(i,r){let S=xe(),c=xn[S],e=i,t=r,g=e*t,l=e>t?t/e:e/t;for(;g>c*c;){let y=(c+e)/2,E=(c+t)/2;y<E?(t=E,e=E*l):(t=y*l,e=y),g=e*t;}return {width:e,height:t}}function Ve(i,r){let S,c;try{if(S=new OffscreenCanvas(i,r),c=S.getContext("2d"),c===null)throw new Error("getContext of OffscreenCanvas returns null")}catch{S=globalThis.document.createElement("canvas"),c=S.getContext("2d");}return S.width=i,S.height=r,[S,c]}function Pt(i,r){let{width:S,height:c}=Ut(i.width,i.height),[e,t]=Ve(S,c);return r&&/jpe?g/.test(r)&&(t.fillStyle="white",t.fillRect(0,0,e.width,e.height)),t.drawImage(i,0,0,e.width,e.height),e}function Qe(){return Qe.cachedResult!==void 0||(Qe.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&typeof globalThis.document<"u"&&"ontouchend"in globalThis.document),Qe.cachedResult}function ze(i,r={}){return new Promise((function(S,c){let e,t;var g=function(){try{return t=Pt(e,r.fileType||i.type),S([e,t])}catch(y){return c(y)}},l=function(y){try{var E=function(o){try{throw o}catch(a){return c(a)}};try{let o;return xt(i).then((function(a){try{return o=a,Ot(o).then((function(n){try{return e=n,(function(){try{return g()}catch(d){return c(d)}})()}catch(d){return E(d)}}),E)}catch(n){return E(n)}}),E)}catch(o){E(o);}}catch(o){return c(o)}};try{if(Qe()||[fe.DESKTOP_SAFARI,fe.MOBILE_SAFARI].includes(xe()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(i).then((function(y){try{return e=y,g()}catch{return l()}}),l)}catch{l();}}))}function Ge(i,r,S,c,e=1){return new Promise((function(t,g){let l;if(r==="image/png"){let a,n,d;return a=i.getContext("2d"),{data:n}=a.getImageData(0,0,i.width,i.height),d=pe.encode([n.buffer],i.width,i.height,4096*e),l=new Blob([d],{type:r}),l.name=S,l.lastModified=c,y.call(this)}{let a=function(){return y.call(this)};if(r==="image/bmp")return new Promise((n=>It.toBlob(i,n))).then(function(n){try{return l=n,l.name=S,l.lastModified=c,a.call(this)}catch(d){return g(d)}}.bind(this),g);{let n=function(){return a.call(this)};if(typeof OffscreenCanvas=="function"&&i instanceof OffscreenCanvas)return i.convertToBlob({type:r,quality:e}).then(function(d){try{return l=d,l.name=S,l.lastModified=c,n.call(this)}catch(v){return g(v)}}.bind(this),g);{let d;return d=i.toDataURL(r,e),tt(d,S,c).then(function(v){try{return l=v,n.call(this)}catch(C){return g(C)}}.bind(this),g)}}}function y(){return t(l)}}))}function ye(i){i.width=0,i.height=0;}function Pe(){return new Promise((function(i,r){let c,e,t,g;return Pe.cachedResult!==void 0?i(Pe.cachedResult):(tt("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then((function(l){try{return c=l,ze(c).then((function(y){try{return e=y[1],Ge(e,c.type,c.name,c.lastModified).then((function(E){try{return t=E,ye(e),ze(t).then((function(o){try{return g=o[0],Pe.cachedResult=g.width===1&&g.height===2,i(Pe.cachedResult)}catch(a){return r(a)}}),r)}catch(o){return r(o)}}),r)}catch(E){return r(E)}}),r)}catch(y){return r(y)}}),r))}))}function Mt(i){return new Promise(((r,S)=>{let c=new Ct;c.onload=e=>{let t=new DataView(e.target.result);if(t.getUint16(0,false)!=65496)return r(-2);let g=t.byteLength,l=2;for(;l<g;){if(t.getUint16(l+2,false)<=8)return r(-1);let y=t.getUint16(l,false);if(l+=2,y==65505){if(t.getUint32(l+=2,false)!=1165519206)return r(-1);let E=t.getUint16(l+=6,false)==18761;l+=t.getUint32(l+4,E);let o=t.getUint16(l,E);l+=2;for(let a=0;a<o;a++)if(t.getUint16(l+12*a,E)==274)return r(t.getUint16(l+12*a+8,E))}else {if((65280&y)!=65280)break;l+=t.getUint16(l,false);}}return r(-1)},c.onerror=e=>S(e),c.readAsArrayBuffer(i);}))}function Lt(i,r){let{width:S}=i,{height:c}=i,{maxWidthOrHeight:e}=r,t,g=i;return isFinite(e)&&(S>e||c>e)&&([g,t]=Ve(S,c),S>c?(g.width=e,g.height=c/S*e):(g.width=S/c*e,g.height=e),t.drawImage(i,0,0,g.width,g.height),ye(i)),g}function Dt(i,r){let{width:S}=i,{height:c}=i,[e,t]=Ve(S,c);switch(r>4&&r<9?(e.width=c,e.height=S):(e.width=S,e.height=c),r){case 2:t.transform(-1,0,0,1,S,0);break;case 3:t.transform(-1,0,0,-1,S,c);break;case 4:t.transform(1,0,0,-1,0,c);break;case 5:t.transform(0,1,1,0,0,0);break;case 6:t.transform(0,1,-1,0,c,0);break;case 7:t.transform(0,-1,-1,0,c,S);break;case 8:t.transform(0,-1,1,0,0,S);}return t.drawImage(i,0,0,S,c),ye(i),e}function St(i,r,S=0){return new Promise((function(c,e){let t,g,l,y,E,o,a,n,d,v,C,M,I,B,k,P,R,p,O,f;function u(s=5){if(r.signal&&r.signal.aborted)throw r.signal.reason;t+=s,r.onProgress(Math.min(t,100));}function _(s){if(r.signal&&r.signal.aborted)throw r.signal.reason;t=Math.min(Math.max(s,t),100),r.onProgress(t);}return t=S,g=r.maxIteration||10,l=1024*r.maxSizeMB*1024,u(),ze(i,r).then(function(s){try{return [,y]=s,u(),E=Lt(y,r),u(),new Promise((function(w,b){var A;if(!(A=r.exifOrientation))return Mt(i).then(function(m){try{return A=m,T.call(this)}catch(h){return b(h)}}.bind(this),b);function T(){return w(A)}return T.call(this)})).then(function(w){try{return o=w,u(),Pe().then(function(b){try{return a=b?E:Dt(E,o),u(),n=r.initialQuality||1,d=r.fileType||i.type,Ge(a,d,i.name,i.lastModified,n).then(function(A){try{{let L=function(){if(g--&&(k>l||k>I)){let U,H;return U=f?.95*O.width:O.width,H=f?.95*O.height:O.height,[R,p]=Ve(U,H),p.drawImage(O,0,0,U,H),n*=d==="image/png"?.85:.95,Ge(R,d,i.name,i.lastModified,n).then((function(D){try{return P=D,ye(O),O=R,k=P.size,_(Math.min(99,Math.floor((B-k)/(B-l)*100))),L}catch(Q){return e(Q)}}),e)}return [1]},x=function(){return ye(O),ye(R),ye(E),ye(a),ye(y),_(100),c(P)};var m=L,h=x;if(v=A,u(),C=v.size>l,M=v.size>i.size,!C&&!M)return _(100),c(v);var T;return I=i.size,B=v.size,k=B,O=a,f=!r.alwaysKeepResolution&&C,(T=function(U){for(;U;){if(U.then)return void U.then(T,e);try{if(U.pop){if(U.length)return U.pop()?x.call(this):U;U=L;}else U=U.call(this);}catch(H){return e(H)}}}.bind(this))(L)}}catch(L){return e(L)}}.bind(this),e)}catch(A){return e(A)}}.bind(this),e)}catch(b){return e(b)}}.bind(this),e)}catch(w){return e(w)}}.bind(this),e)}))}var Un=`
1
+ import {useState,useEffect,useRef,useCallback}from'react';import {useMutation}from'@tanstack/react-query';import {identity}from'lodash';import {nanoid}from'nanoid';import yt from'superjson';import {rpcClient,RpcError}from'typed-rpc';var An=Object.create;var bt=Object.defineProperty;var vn=Object.getOwnPropertyDescriptor;var _n=Object.getOwnPropertyNames;var bn=Object.getPrototypeOf,En=Object.prototype.hasOwnProperty;var Ze=(i,o)=>()=>(o||i((o={exports:{}}).exports,o),o.exports);var Sn=(i,o,S,l)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of _n(o))!En.call(i,e)&&e!==S&&bt(i,e,{get:()=>o[e],enumerable:!(l=vn(o,e))||l.enumerable});return i};var Et=(i,o,S)=>(S=i!=null?An(bn(i)):{},Sn(bt(S,"default",{value:i,enumerable:true}),i));var Ft=Ze((nt,rt)=>{(i=>{let o=(()=>{let R=0;return {escape:function(s){return s.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")},isDataUrl:function(s){return s.search(/^(data:)/)!==-1},canvasToBlob:function(s){return s.toBlob?new Promise(function(w){s.toBlob(w);}):(w=>new Promise(function(b){var A=a(w.toDataURL().split(",")[1]),T=A.length,m=new Uint8Array(T);for(let p=0;p<T;p++)m[p]=A.charCodeAt(p);b(new Blob([m],{type:"image/png"}));}))(s)},resolveUrl:function(s,w){var b=globalThis.document.implementation.createHTMLDocument(),A=b.createElement("base"),T=(b.head.appendChild(A),b.createElement("a"));return b.body.appendChild(T),A.href=w,T.href=s,T.href},getAndEncode:function(s){let w=y.impl.urlCache.find(function(b){return b.url===s});return w||(w={url:s,promise:null},y.impl.urlCache.push(w)),w.promise===null&&(y.impl.options.cacheBust&&(s+=(/\?/.test(s)?"&":"?")+new Date().getTime()),w.promise=new Promise(function(b){let A=new XMLHttpRequest;function T(L){console.error(L),b("");}function m(){var L=y.impl.options.imagePlaceholder;L?b(L):T("Status:"+A.status+" while fetching resource: "+s);}if(A.timeout=y.impl.options.httpTimeout,A.onerror=m,A.ontimeout=m,A.onloadend=function(){if(A.readyState===XMLHttpRequest.DONE){var L=A.status;if(L===0&&s.toLowerCase().startsWith("file://")||200<=L&&L<=300&&A.response!==null){L=A.response,L instanceof Blob||T("Expected response to be a Blob, but got: "+typeof L);let O=new globalThis.FileReader;O.onloadend=function(){var U=O.result;b(U);};try{O.readAsDataURL(L);}catch(U){T("Failed to read the response as Data URL: "+U.toString());}}else m();}},0<y.impl.options.useCredentialsFilters.length&&(y.impl.options.useCredentials=0<y.impl.options.useCredentialsFilters.filter(L=>0<=s.search(L)).length),y.impl.options.useCredentials&&(A.withCredentials=true),y.impl.options.corsImg&&s.indexOf("http")===0&&s.indexOf(globalThis.window.location.origin)===-1){var p=(y.impl.options.corsImg.method||"GET").toUpperCase()==="POST"?"POST":"GET";A.open(p,(y.impl.options.corsImg.url||"").replace("#{cors}",s),true);let L=false,O=y.impl.options.corsImg.headers||{},U=(Object.keys(O).forEach(function(H){O[H].indexOf("application/json")!==-1&&(L=true),A.setRequestHeader(H,O[H]);}),(H=>{try{return JSON.parse(JSON.stringify(H))}catch(D){T("corsImg.data is missing or invalid:"+D.toString());}})(y.impl.options.corsImg.data||""));Object.keys(U).forEach(function(H){typeof U[H]=="string"&&(U[H]=U[H].replace("#{cors}",s));}),A.responseType="blob",A.send(L?JSON.stringify(U):U);}else A.open("GET",s,true),A.responseType="blob",A.send();})),w.promise},uid:function(){return "u"+("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)+R++},asArray:function(s){var w=[],b=s.length;for(let A=0;A<b;A++)w.push(s[A]);return w},escapeXhtml:function(s){return s.replace(/%/g,"%25").replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(s){return s!=="data:,"?new Promise(function(w,b){let A=globalThis.document.createElementNS("http://www.w3.org/2000/svg","svg"),T=new globalThis.Image;y.impl.options.useCredentials&&(T.crossOrigin="use-credentials"),T.onload=function(){globalThis.document.body.removeChild(A),globalThis.window&&globalThis.window.requestAnimationFrame?globalThis.window.requestAnimationFrame(function(){w(T);}):w(T);},T.onerror=m=>{globalThis.document.body.removeChild(A),b(m);},A.appendChild(T),T.src=s,globalThis.document.body.appendChild(A);}):Promise.resolve()},width:function(s){var w=_(s,"width");if(!isNaN(w))return w;var w=_(s,"border-left-width"),b=_(s,"border-right-width");return s.scrollWidth+w+b},height:function(s){var w=_(s,"height");if(!isNaN(w))return w;var w=_(s,"border-top-width"),b=_(s,"border-bottom-width");return s.scrollHeight+w+b},getWindow:h,isElement:u,isElementHostForOpenShadowRoot:function(s){return u(s)&&s.shadowRoot!==null},isShadowRoot:x,isInShadowRoot:f,isHTMLElement:function(s){return s instanceof h(s).HTMLElement},isHTMLCanvasElement:function(s){return s instanceof h(s).HTMLCanvasElement},isHTMLInputElement:function(s){return s instanceof h(s).HTMLInputElement},isHTMLImageElement:function(s){return s instanceof h(s).HTMLImageElement},isHTMLLinkElement:function(s){return s instanceof h(s).HTMLLinkElement},isHTMLScriptElement:function(s){return s instanceof h(s).HTMLScriptElement},isHTMLStyleElement:function(s){return s instanceof h(s).HTMLStyleElement},isHTMLTextAreaElement:function(s){return s instanceof h(s).HTMLTextAreaElement},isShadowSlotElement:function(s){return f(s)&&s instanceof h(s).HTMLSlotElement},isSVGElement:function(s){return s instanceof h(s).SVGElement},isSVGRectElement:function(s){return s instanceof h(s).SVGRectElement},isDimensionMissing:function(s){return isNaN(s)||s<=0}};function h(s){return s=s?s.ownerDocument:void 0,(s?s.defaultView:void 0)||globalThis.window||i}function x(s){return s instanceof h(s).ShadowRoot}function f(s){return s!=null&&s.getRootNode!==void 0&&x(s.getRootNode())}function u(s){return s instanceof h(s).Element}function _(s,w){if(s.nodeType===E){let b=r(s).getPropertyValue(w);if(b.slice(-2)==="px")return b=b.slice(0,-2),parseFloat(b)}return NaN}})(),S=(()=>{let R=/url\(\s*(["']?)((?:\\.|[^\\)])+)\1\s*\)/gm;return {inlineAll:function(_,s,w){return h(_)?Promise.resolve(_).then(x).then(function(b){let A=Promise.resolve(_);return b.forEach(function(T){A=A.then(function(m){return u(m,T,s,w)});}),A}):Promise.resolve(_)},shouldProcess:h,impl:{readUrls:x,inline:u,urlAsRegex:f}};function h(_){return _.search(R)!==-1}function x(_){for(var s,w=[];(s=R.exec(_))!==null;)w.push(s[2]);return w.filter(function(b){return !o.isDataUrl(b)})}function f(_){return new RegExp(`url\\((["']?)(${o.escape(_)})\\1\\)`,"gm")}function u(_,s,w,b){return Promise.resolve(s).then(function(A){return w?o.resolveUrl(A,w):A}).then(b||o.getAndEncode).then(function(A){var T=f(s);return _.replace(T,`url($1${A}$1)`)})}})(),l={resolveAll:function(){return e().then(function(R){return Promise.all(R.map(function(h){return h.resolve()}))}).then(function(R){return R.join(`
2
+ `)})},impl:{readAll:e}};function e(){return Promise.resolve(o.asArray(globalThis.document.styleSheets)).then(function(h){let x=[];return h.forEach(function(f){var u=Object.getPrototypeOf(f);if(Object.prototype.hasOwnProperty.call(u,"cssRules"))try{o.asArray(f.cssRules||[]).forEach(x.push.bind(x));}catch(_){console.error("domtoimage: Error while reading CSS rules from: "+f.href,_.toString());}}),x}).then(function(h){return h.filter(function(x){return x.type===CSSRule.FONT_FACE_RULE}).filter(function(x){return S.shouldProcess(x.style.getPropertyValue("src"))})}).then(function(h){return h.map(R)});function R(h){return {resolve:function(){var x=(h.parentStyleSheet||{}).href;return S.inlineAll(h.cssText,x)},src:function(){return h.style.getPropertyValue("src")}}}}let t={inlineAll:function R(h){if(!o.isElement(h))return Promise.resolve(h);return x(h).then(function(){return o.isHTMLImageElement(h)?g(h).inline():Promise.all(o.asArray(h.childNodes).map(function(f){return R(f)}))});function x(f){let u=["background","background-image"],_=u.map(function(s){let w=f.style.getPropertyValue(s),b=f.style.getPropertyPriority(s);return w?S.inlineAll(w).then(function(A){f.style.setProperty(s,A,b);}):Promise.resolve()});return Promise.all(_).then(function(){return f})}},impl:{newImage:g}};function g(R){return {inline:function(h){return o.isDataUrl(R.src)?Promise.resolve():Promise.resolve(R.src).then(h||o.getAndEncode).then(function(x){return new Promise(function(f){R.onload=f,R.onerror=f,R.src=x;})})}}}let c={copyDefaultStyles:true,imagePlaceholder:void 0,cacheBust:false,useCredentials:false,useCredentialsFilters:[],httpTimeout:3e4,styleCaching:"strict",corsImg:void 0},y={toSvg:n,toPng:function(R,h){return d(R,h).then(function(x){return x.toDataURL()})},toJpeg:function(R,h){return d(R,h).then(function(x){return x.toDataURL("image/jpeg",(h?h.quality:void 0)||1)})},toBlob:function(R,h){return d(R,h).then(o.canvasToBlob)},toPixelData:function(R,h){return d(R,h).then(function(x){return x.getContext("2d").getImageData(0,0,o.width(R),o.height(R)).data})},toCanvas:d,impl:{fontFaces:l,images:t,util:o,inliner:S,urlCache:[],options:{},copyOptions:function(R){R.copyDefaultStyles===void 0?y.impl.options.copyDefaultStyles=c.copyDefaultStyles:y.impl.options.copyDefaultStyles=R.copyDefaultStyles,y.impl.options.imagePlaceholder=(R.imagePlaceholder===void 0?c:R).imagePlaceholder,y.impl.options.cacheBust=(R.cacheBust===void 0?c:R).cacheBust,y.impl.options.corsImg=(R.corsImg===void 0?c:R).corsImg,y.impl.options.useCredentials=(R.useCredentials===void 0?c:R).useCredentials,y.impl.options.useCredentialsFilters=(R.useCredentialsFilters===void 0?c:R).useCredentialsFilters,y.impl.options.httpTimeout=(R.httpTimeout===void 0?c:R).httpTimeout,y.impl.options.styleCaching=(R.styleCaching===void 0?c:R).styleCaching;}}},E=(typeof nt=="object"&&typeof rt=="object"?rt.exports=y:i.domtoimage=y,(globalThis.Node===void 0?void 0:globalThis.Node.ELEMENT_NODE)||1),r=(i===void 0?void 0:i.getComputedStyle)||(globalThis.window===void 0?void 0:globalThis.window.getComputedStyle)||globalThis.getComputedStyle,a=(i===void 0?void 0:i.atob)||(globalThis.window===void 0?void 0:globalThis.window.atob)||globalThis.atob;function n(R,h){y.impl.util.getWindow(R);let f=(h=h||{},y.impl.copyOptions(h),[]);return Promise.resolve(R).then(function(u){if(u.nodeType===E)return u;var _=u,s=globalThis.document.createElement("span");return _.replaceWith(s),s.append(u),f.push({child:_,wrapper:s}),s}).then(function(u){return (function _(s,w,b,A){let T=w.filter;if(s===v||o.isHTMLScriptElement(s)||o.isHTMLStyleElement(s)||o.isHTMLLinkElement(s)||b!==null&&T&&!T(s))return Promise.resolve();return Promise.resolve(s).then(m).then(p).then(function(D){return U(D,O(s))}).then(L).then(function(D){return H(D,s)});function m(D){return o.isHTMLCanvasElement(D)?o.makeImage(D.toDataURL()):D.cloneNode(false)}function p(D){return w.adjustClonedNode&&w.adjustClonedNode(s,D,false),Promise.resolve(D)}function L(D){return w.adjustClonedNode&&w.adjustClonedNode(s,D,true),Promise.resolve(D)}function O(D){return o.isElementHostForOpenShadowRoot(D)?D.shadowRoot:D}function U(D,Q){let B=K(Q),F=Promise.resolve();if(B.length!==0){let V=r($(Q));o.asArray(B).forEach(function(z){F=F.then(function(){return _(z,w,V).then(function(q){q&&D.appendChild(q);})});});}return F.then(function(){return D});function $(V){return o.isShadowRoot(V)?V.host:V}function K(V){if(o.isShadowSlotElement(V)){let z=V.assignedNodes();if(z&&0<z.length)return z}return V.childNodes}}function H(D,Q){return !o.isElement(D)||o.isShadowSlotElement(Q)?Promise.resolve(D):Promise.resolve().then(F).then($).then(K).then(V).then(B).then(function(){return D});function B(){o.isHTMLImageElement(D)&&(D.removeAttribute("loading"),Q.srcset||Q.sizes)&&(D.removeAttribute("srcset"),D.removeAttribute("sizes"),D.src=Q.currentSrc||Q.src);}function F(){function z(G,W){W.font=G.font,W.fontFamily=G.fontFamily,W.fontFeatureSettings=G.fontFeatureSettings,W.fontKerning=G.fontKerning,W.fontSize=G.fontSize,W.fontStretch=G.fontStretch,W.fontStyle=G.fontStyle,W.fontVariant=G.fontVariant,W.fontVariantCaps=G.fontVariantCaps,W.fontVariantEastAsian=G.fontVariantEastAsian,W.fontVariantLigatures=G.fontVariantLigatures,W.fontVariantNumeric=G.fontVariantNumeric,W.fontVariationSettings=G.fontVariationSettings,W.fontWeight=G.fontWeight;}function q(G,W){let ie=r(G);ie.cssText?(W.style.cssText=ie.cssText,z(ie,W.style)):(I(w,G,ie,b,W),b===null&&(["inset-block","inset-block-start","inset-block-end"].forEach(ae=>W.style.removeProperty(ae)),["left","right","top","bottom"].forEach(ae=>{W.style.getPropertyValue(ae)&&W.style.setProperty(ae,"0px");})));}q(Q,D);}function $(){let z=o.uid();function q(G){let W=r(Q,G),ie=W.getPropertyValue("content");if(ie!==""&&ie!=="none"){let Y=function(){let J=`.${z}:`+G,ne=(W.cssText?oe:j)();return globalThis.document.createTextNode(J+`{${ne}}`);function oe(){return `${W.cssText} content: ${ie};`}function j(){return o.asArray(W).map(ee).join("; ")+";";function ee(X){let ce=W.getPropertyValue(X),ge=W.getPropertyPriority(X)?" !important":"";return X+": "+ce+ge}}};let Z=D.getAttribute("class")||"",te=(D.setAttribute("class",Z+" "+z),globalThis.document.createElement("style"));te.appendChild(Y()),D.appendChild(te);}}[":before",":after"].forEach(function(G){q(G);});}function K(){o.isHTMLTextAreaElement(Q)&&(D.innerHTML=Q.value),o.isHTMLInputElement(Q)&&D.setAttribute("value",Q.value);}function V(){o.isSVGElement(D)&&(D.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.isSVGRectElement(D))&&["width","height"].forEach(function(z){let q=D.getAttribute(z);q&&D.style.setProperty(z,q);});}}})(u,h,null)}).then(h.disableEmbedFonts?Promise.resolve(R):C).then(h.disableInlineImages?Promise.resolve(R):P).then(function(u){h.bgcolor&&(u.style.backgroundColor=h.bgcolor),h.width&&(u.style.width=h.width+"px"),h.height&&(u.style.height=h.height+"px"),h.style&&Object.keys(h.style).forEach(function(s){u.style[s]=h.style[s];});let _=null;return typeof h.onclone=="function"&&(_=h.onclone(u)),Promise.resolve(_).then(function(){return u})}).then(function(u){let _=h.width||o.width(R),s=h.height||o.height(R);return Promise.resolve(u).then(function(w){return w.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(w)}).then(o.escapeXhtml).then(function(w){var b=(o.isDimensionMissing(_)?' width="100%"':` width="${_}"`)+(o.isDimensionMissing(s)?' height="100%"':` height="${s}"`);return `<svg xmlns="http://www.w3.org/2000/svg"${(o.isDimensionMissing(_)?"":` width="${_}"`)+(o.isDimensionMissing(s)?"":` height="${s}"`)}><foreignObject${b}>${w}</foreignObject></svg>`}).then(function(w){return "data:image/svg+xml;charset=utf-8,"+w})}).then(function(u){for(;0<f.length;){var _=f.pop();_.wrapper.replaceWith(_.child);}return u}).then(function(u){return y.impl.urlCache=[],v&&(globalThis.document.body.removeChild(v),v=null),N&&clearTimeout(N),N=setTimeout(()=>{N=null,k={};},2e4),u})}function d(R,h){return n(R,h=h||{}).then(o.makeImage).then(function(x){var f=typeof h.scale!="number"?1:h.scale,u=((s,w)=>{let b=h.width||o.width(s),A=h.height||o.height(s);return o.isDimensionMissing(b)&&(b=o.isDimensionMissing(A)?300:2*A),o.isDimensionMissing(A)&&(A=b/2),(s=globalThis.document.createElement("canvas")).width=b*w,s.height=A*w,h.bgcolor&&((w=s.getContext("2d")).fillStyle=h.bgcolor,w.fillRect(0,0,s.width,s.height)),s})(R,f),_=u.getContext("2d");return _.msImageSmoothingEnabled=false,_.imageSmoothingEnabled=false,x&&(_.scale(f,f),_.drawImage(x,0,0)),u})}let v=null;function C(R){return l.resolveAll().then(function(h){var x;return h!==""&&(x=globalThis.document.createElement("style"),R.appendChild(x),x.appendChild(globalThis.document.createTextNode(h))),R})}function P(R){return t.inlineAll(R).then(function(){return R})}function I(R,h,x,f,u){let _=y.impl.options.copyDefaultStyles?((w,b)=>{var A,T=(L=>(w.styleCaching!=="relaxed"?L:L.filter((O,U,H)=>U===0||U===H.length-1)).join(">"))(b=(L=>{var O=[];do if(L.nodeType===E){var U=L.tagName;if(O.push(U),M.includes(U))break}while(L=L.parentNode);return O})(b));{if(k[T])return k[T];b=((L,O)=>{let U=L.body;do{var H=O.pop(),H=L.createElement(H);U.appendChild(H),U=H;}while(0<O.length);return U.textContent="\u200B",U})((A=(()=>{if(v)return v.contentWindow;O=globalThis.document.characterSet||"UTF-8",L=(L=globalThis.document.doctype)?(`<!DOCTYPE ${F(L.name)} ${F(L.publicId)} `+F(L.systemId)).trim()+">":"",(v=globalThis.document.createElement("iframe")).id="domtoimage-sandbox-"+o.uid(),v.style.top="-9999px",v.style.visibility="hidden",v.style.position="fixed",globalThis.document.body.appendChild(v);var L,O,U=v,H="domtoimage-sandbox";try{return U.contentWindow.document.write(L+`<html><head><meta charset='${O}'><title>${H}</title></head><body></body></html>`),U.contentWindow}catch{}var D=globalThis.document.createElement("meta");D.setAttribute("charset",O);try{var Q=globalThis.document.implementation.createHTMLDocument(H),B=(Q.head.appendChild(D),L+Q.documentElement.outerHTML);return U.setAttribute("srcdoc",B),U.contentWindow}catch{}return U.contentDocument.head.appendChild(D),U.contentDocument.title=H,U.contentWindow;function F($){var K;return $?((K=globalThis.document.createElement("div")).innerText=$,K.innerHTML):""}})()).document,b),A=((L,O)=>{let U={},H=L.getComputedStyle(O);return o.asArray(H).forEach(function(D){U[D]=D==="width"||D==="height"?"auto":H.getPropertyValue(D);}),U})(A,b);var m=b;do{var p=m.parentElement;p!==null&&p.removeChild(m),m=p;}while(m&&m.tagName!=="BODY");return k[T]=A}})(R,h):{},s=u.style;o.asArray(x).forEach(function(w){var b,A,T,m;R.filterStyles&&!R.filterStyles(h,w)||(A=x.getPropertyValue(w),T=_[w],b=f?f.getPropertyValue(w):void 0,s.getPropertyValue(w))||(A!==T||f&&A!==b)&&(T=x.getPropertyPriority(w),b=s,A=A,T=T,m=0<=["background-clip"].indexOf(w=w),T?(b.setProperty(w,A,T),m&&b.setProperty("-webkit-"+w,A,T)):(b.setProperty(w,A),m&&b.setProperty("-webkit-"+w,A)));});}let N=null,k={},M=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIALOG","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","SVG","TABLE","UL","math","svg","BODY","HEAD","HTML"];})(nt);});var kt=Ze(()=>{});var on=Ze((Ur,rn)=>{var ht=typeof Map=="function"&&Map.prototype,ot=Object.getOwnPropertyDescriptor&&ht?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ke=ht&&ot&&typeof ot.get=="function"?ot.get:null,Nt=ht&&Map.prototype.forEach,pt=typeof Set=="function"&&Set.prototype,it=Object.getOwnPropertyDescriptor&&pt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Xe=pt&&it&&typeof it.get=="function"?it.get:null,Bt=pt&&Set.prototype.forEach,Mn=typeof WeakMap=="function"&&WeakMap.prototype,ke=Mn?WeakMap.prototype.has:null,Ln=typeof WeakSet=="function"&&WeakSet.prototype,Ne=Ln?WeakSet.prototype.has:null,Dn=typeof WeakRef=="function"&&WeakRef.prototype,Ht=Dn?WeakRef.prototype.deref:null,Fn=Boolean.prototype.valueOf,kn=Object.prototype.toString,Nn=Function.prototype.toString,Bn=String.prototype.match,gt=String.prototype.slice,Ee=String.prototype.replace,Hn=String.prototype.toUpperCase,Qt=String.prototype.toLowerCase,Yt=RegExp.prototype.test,$t=Array.prototype.concat,we=Array.prototype.join,Qn=Array.prototype.slice,Wt=Math.floor,ct=typeof BigInt=="function"?BigInt.prototype.valueOf:null,at=Object.getOwnPropertySymbols,lt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Me=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Be=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Me||true)?Symbol.toStringTag:null,Jt=Object.prototype.propertyIsEnumerable,zt=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(i){return i.__proto__}:null);function Gt(i,o){if(i===1/0||i===-1/0||i!==i||i&&i>-1e3&&i<1e3||Yt.call(/e/,o))return o;var S=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof i=="number"){var l=i<0?-Wt(-i):Wt(i);if(l!==i){var e=String(l),t=gt.call(o,e.length+1);return Ee.call(e,S,"$&_")+"."+Ee.call(Ee.call(t,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ee.call(o,S,"$&_")}var ut=kt(),Vt=ut.custom,qt=en(Vt)?Vt:null,Zt={__proto__:null,double:'"',single:"'"},$n={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};rn.exports=function i(o,S,l,e){var t=S||{};if(ve(t,"quoteStyle")&&!ve(Zt,t.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ve(t,"maxStringLength")&&(typeof t.maxStringLength=="number"?t.maxStringLength<0&&t.maxStringLength!==1/0:t.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var g=ve(t,"customInspect")?t.customInspect:true;if(typeof g!="boolean"&&g!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ve(t,"indent")&&t.indent!==null&&t.indent!==" "&&!(parseInt(t.indent,10)===t.indent&&t.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ve(t,"numericSeparator")&&typeof t.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var c=t.numericSeparator;if(typeof o>"u")return "undefined";if(o===null)return "null";if(typeof o=="boolean")return o?"true":"false";if(typeof o=="string")return nn(o,t);if(typeof o=="number"){if(o===0)return 1/0/o>0?"0":"-0";var y=String(o);return c?Gt(o,y):y}if(typeof o=="bigint"){var E=String(o)+"n";return c?Gt(o,E):E}var r=typeof t.depth>"u"?5:t.depth;if(typeof l>"u"&&(l=0),l>=r&&r>0&&typeof o=="object")return ft(o)?"[Array]":"[Object]";var a=ar(t,l);if(typeof e>"u")e=[];else if(tn(e,o)>=0)return "[Circular]";function n(b,A,T){if(A&&(e=Qn.call(e),e.push(A)),T){var m={depth:t.depth};return ve(t,"quoteStyle")&&(m.quoteStyle=t.quoteStyle),i(b,m,l+1,e)}return i(b,t,l+1,e)}if(typeof o=="function"&&!Kt(o)){var d=Jn(o),v=qe(o,n);return "[Function"+(d?": "+d:" (anonymous)")+"]"+(v.length>0?" { "+we.call(v,", ")+" }":"")}if(en(o)){var C=Me?Ee.call(String(o),/^(Symbol\(.*\))_[^)]*$/,"$1"):lt.call(o);return typeof o=="object"&&!Me?Fe(C):C}if(rr(o)){for(var P="<"+Qt.call(String(o.nodeName)),I=o.attributes||[],N=0;N<I.length;N++)P+=" "+I[N].name+"="+jt(Wn(I[N].value),"double",t);return P+=">",o.childNodes&&o.childNodes.length&&(P+="..."),P+="</"+Qt.call(String(o.nodeName))+">",P}if(ft(o)){if(o.length===0)return "[]";var k=qe(o,n);return a&&!ir(k)?"["+dt(k,a)+"]":"[ "+we.call(k,", ")+" ]"}if(Gn(o)){var M=qe(o,n);return !("cause"in Error.prototype)&&"cause"in o&&!Jt.call(o,"cause")?"{ ["+String(o)+"] "+we.call($t.call("[cause]: "+n(o.cause),M),", ")+" }":M.length===0?"["+String(o)+"]":"{ ["+String(o)+"] "+we.call(M,", ")+" }"}if(typeof o=="object"&&g){if(qt&&typeof o[qt]=="function"&&ut)return ut(o,{depth:r-l});if(g!=="symbol"&&typeof o.inspect=="function")return o.inspect()}if(Zn(o)){var R=[];return Nt&&Nt.call(o,function(b,A){R.push(n(A,o,true)+" => "+n(b,o));}),Xt("Map",Ke.call(o),R,a)}if(tr(o)){var h=[];return Bt&&Bt.call(o,function(b){h.push(n(b,o));}),Xt("Set",Xe.call(o),h,a)}if(jn(o))return st("WeakMap");if(nr(o))return st("WeakSet");if(er(o))return st("WeakRef");if(qn(o))return Fe(n(Number(o)));if(Xn(o))return Fe(n(ct.call(o)));if(Kn(o))return Fe(Fn.call(o));if(Vn(o))return Fe(n(String(o)));if(typeof globalThis.window<"u"&&o===globalThis.window)return "{ [object Window] }";if(typeof globalThis<"u"&&o===globalThis||typeof global<"u"&&o===global)return "{ [object globalThis] }";if(!zn(o)&&!Kt(o)){var x=qe(o,n),f=zt?zt(o)===Object.prototype:o instanceof Object||o.constructor===Object,u=o instanceof Object?"":"null prototype",_=!f&&Be&&Object(o)===o&&Be in o?gt.call(Se(o),8,-1):u?"Object":"",s=f||typeof o.constructor!="function"?"":o.constructor.name?o.constructor.name+" ":"",w=s+(_||u?"["+we.call($t.call([],_||[],u||[]),": ")+"] ":"");return x.length===0?w+"{}":a?w+"{"+dt(x,a)+"}":w+"{ "+we.call(x,", ")+" }"}return String(o)};function jt(i,o,S){var l=S.quoteStyle||o,e=Zt[l];return e+i+e}function Wn(i){return Ee.call(String(i),/"/g,"&quot;")}function Oe(i){return !Be||!(typeof i=="object"&&(Be in i||typeof i[Be]<"u"))}function ft(i){return Se(i)==="[object Array]"&&Oe(i)}function zn(i){return Se(i)==="[object Date]"&&Oe(i)}function Kt(i){return Se(i)==="[object RegExp]"&&Oe(i)}function Gn(i){return Se(i)==="[object Error]"&&Oe(i)}function Vn(i){return Se(i)==="[object String]"&&Oe(i)}function qn(i){return Se(i)==="[object Number]"&&Oe(i)}function Kn(i){return Se(i)==="[object Boolean]"&&Oe(i)}function en(i){if(Me)return i&&typeof i=="object"&&i instanceof Symbol;if(typeof i=="symbol")return true;if(!i||typeof i!="object"||!lt)return false;try{return lt.call(i),!0}catch{}return false}function Xn(i){if(!i||typeof i!="object"||!ct)return false;try{return ct.call(i),!0}catch{}return false}var Yn=Object.prototype.hasOwnProperty||function(i){return i in this};function ve(i,o){return Yn.call(i,o)}function Se(i){return kn.call(i)}function Jn(i){if(i.name)return i.name;var o=Bn.call(Nn.call(i),/^function\s*([\w$]+)/);return o?o[1]:null}function tn(i,o){if(i.indexOf)return i.indexOf(o);for(var S=0,l=i.length;S<l;S++)if(i[S]===o)return S;return -1}function Zn(i){if(!Ke||!i||typeof i!="object")return false;try{Ke.call(i);try{Xe.call(i);}catch{return !0}return i instanceof Map}catch{}return false}function jn(i){if(!ke||!i||typeof i!="object")return false;try{ke.call(i,ke);try{Ne.call(i,Ne);}catch{return !0}return i instanceof WeakMap}catch{}return false}function er(i){if(!Ht||!i||typeof i!="object")return false;try{return Ht.call(i),!0}catch{}return false}function tr(i){if(!Xe||!i||typeof i!="object")return false;try{Xe.call(i);try{Ke.call(i);}catch{return !0}return i instanceof Set}catch{}return false}function nr(i){if(!Ne||!i||typeof i!="object")return false;try{Ne.call(i,Ne);try{ke.call(i,ke);}catch{return !0}return i instanceof WeakSet}catch{}return false}function rr(i){return !i||typeof i!="object"?false:typeof HTMLElement<"u"&&i instanceof HTMLElement?true:typeof i.nodeName=="string"&&typeof i.getAttribute=="function"}function nn(i,o){if(i.length>o.maxStringLength){var S=i.length-o.maxStringLength,l="... "+S+" more character"+(S>1?"s":"");return nn(gt.call(i,0,o.maxStringLength),o)+l}var e=$n[o.quoteStyle||"single"];e.lastIndex=0;var t=Ee.call(Ee.call(i,e,"\\$1"),/[\x00-\x1f]/g,or);return jt(t,"single",o)}function or(i){var o=i.charCodeAt(0),S={8:"b",9:"t",10:"n",12:"f",13:"r"}[o];return S?"\\"+S:"\\x"+(o<16?"0":"")+Hn.call(o.toString(16))}function Fe(i){return "Object("+i+")"}function st(i){return i+" { ? }"}function Xt(i,o,S,l){var e=l?dt(S,l):we.call(S,", ");return i+" ("+o+") {"+e+"}"}function ir(i){for(var o=0;o<i.length;o++)if(tn(i[o],`
3
+ `)>=0)return false;return true}function ar(i,o){var S;if(i.indent===" ")S=" ";else if(typeof i.indent=="number"&&i.indent>0)S=we.call(Array(i.indent+1)," ");else return null;return {base:S,prev:we.call(Array(o+1),S)}}function dt(i,o){if(i.length===0)return "";var S=`
4
+ `+o.prev+o.base;return S+we.call(i,","+S)+`
5
+ `+o.prev}function qe(i,o){var S=ft(i),l=[];if(S){l.length=i.length;for(var e=0;e<i.length;e++)l[e]=ve(i,e)?o(i[e],i):"";}var t=typeof at=="function"?at(i):[],g;if(Me){g={};for(var c=0;c<t.length;c++)g["$"+t[c]]=t[c];}for(var y in i)ve(i,y)&&(S&&String(Number(y))===y&&y<i.length||Me&&g["$"+y]instanceof Symbol||(Yt.call(/[^\w$]/,y)?l.push(o(y,i)+": "+o(i[y],i)):l.push(y+": "+o(i[y],i))));if(typeof at=="function")for(var E=0;E<t.length;E++)Jt.call(i,t[E])&&l.push("["+o(t[E])+"]: "+o(i[t[E]],i));return l}});function Tn(i,o){return o.forEach((function(S){S&&typeof S!="string"&&!Array.isArray(S)&&Object.keys(S).forEach((function(l){if(l!=="default"&&!(l in i)){var e=Object.getOwnPropertyDescriptor(S,l);Object.defineProperty(i,l,e.get?e:{enumerable:true,get:function(){return S[l]}});}}));})),Object.freeze(i)}function Tt(i,o){return new Promise((function(S,l){let e;return In(i).then((function(t){try{return e=t,S(new Blob([o.slice(0,2),e,o.slice(2)],{type:"image/jpeg"}))}catch(g){return l(g)}}),l)}))}var In=i=>new Promise(((o,S)=>{let l=new globalThis.FileReader;l.addEventListener("load",(({target:{result:e}})=>{let t=new DataView(e),g=0;if(t.getUint16(g)!==65496)return S("not a valid JPEG");for(g+=2;;){let c=t.getUint16(g);if(c===65498)break;let y=t.getUint16(g+2);if(c===65505&&t.getUint32(g+4)===1165519206){let E=g+10,r;switch(t.getUint16(E)){case 18761:r=true;break;case 19789:r=false;break;default:return S("TIFF header contains invalid endian")}if(t.getUint16(E+2,r)!==42)return S("TIFF header contains invalid version");let a=t.getUint32(E+4,r),n=E+a+2+12*t.getUint16(E+a,r);for(let d=E+a+2;d<n;d+=12)if(t.getUint16(d,r)==274){if(t.getUint16(d+2,r)!==3)return S("Orientation data type is invalid");if(t.getUint32(d+4,r)!==1)return S("Orientation data count is invalid");t.setUint16(d+8,1,r);break}return o(e.slice(g,g+2+y))}g+=2+y;}return o(new Blob)})),l.readAsArrayBuffer(i);})),$e={},Rn={get exports(){return $e},set exports(i){$e=i;}};(function(i){var o,S,l={};Rn.exports=l,l.parse=function(e,t){for(var g=l.bin.readUshort,c=l.bin.readUint,y=0,E={},r=new Uint8Array(e),a=r.length-4;c(r,a)!=101010256;)a--;y=a,y+=4;var n=g(r,y+=4);g(r,y+=2);var d=c(r,y+=2),v=c(r,y+=4);y+=4,y=v;for(var C=0;C<n;C++){c(r,y),y+=4,y+=4,y+=4,c(r,y+=4),d=c(r,y+=4);var P=c(r,y+=4),I=g(r,y+=4),N=g(r,y+2),k=g(r,y+4);y+=6;var M=c(r,y+=8);y+=4,y+=I+N+k,l._readLocal(r,M,E,d,P,t);}return E},l._readLocal=function(e,t,g,c,y,E){var r=l.bin.readUshort,a=l.bin.readUint;a(e,t),r(e,t+=4),r(e,t+=2);var n=r(e,t+=2);a(e,t+=2),a(e,t+=4),t+=4;var d=r(e,t+=8),v=r(e,t+=2);t+=2;var C=l.bin.readUTF8(e,t,d);if(t+=d,t+=v,E)g[C]={size:y,csize:c};else {var P=new Uint8Array(e.buffer,t);if(n==0)g[C]=new Uint8Array(P.buffer.slice(t,t+c));else {if(n!=8)throw "unknown compression method: "+n;var I=new Uint8Array(y);l.inflateRaw(P,I),g[C]=I;}}},l.inflateRaw=function(e,t){return l.F.inflate(e,t)},l.inflate=function(e,t){return e[0],e[1],l.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},l.deflate=function(e,t){t==null&&(t={level:6});var g=0,c=new Uint8Array(50+Math.floor(1.1*e.length));c[g]=120,c[g+1]=156,g+=2,g=l.F.deflateRaw(e,c,g,t.level);var y=l.adler(e,0,e.length);return c[g+0]=y>>>24&255,c[g+1]=y>>>16&255,c[g+2]=y>>>8&255,c[g+3]=y>>>0&255,new Uint8Array(c.buffer,0,g+4)},l.deflateRaw=function(e,t){t==null&&(t={level:6});var g=new Uint8Array(50+Math.floor(1.1*e.length)),c=l.F.deflateRaw(e,g,c,t.level);return new Uint8Array(g.buffer,0,c)},l.encode=function(e,t){t==null&&(t=false);var g=0,c=l.bin.writeUint,y=l.bin.writeUshort,E={};for(var r in e){var a=!l._noNeed(r)&&!t,n=e[r],d=l.crc.crc(n,0,n.length);E[r]={cpr:a,usize:n.length,crc:d,file:a?l.deflateRaw(n):n};}for(var r in E)g+=E[r].file.length+30+46+2*l.bin.sizeUTF8(r);g+=22;var v=new Uint8Array(g),C=0,P=[];for(var r in E){var I=E[r];P.push(C),C=l._writeHeader(v,C,r,I,0);}var N=0,k=C;for(var r in E)I=E[r],P.push(C),C=l._writeHeader(v,C,r,I,1,P[N++]);var M=C-k;return c(v,C,101010256),C+=4,y(v,C+=4,N),y(v,C+=2,N),c(v,C+=2,M),c(v,C+=4,k),C+=4,C+=2,v.buffer},l._noNeed=function(e){var t=e.split(".").pop().toLowerCase();return "png,jpg,jpeg,zip".indexOf(t)!=-1},l._writeHeader=function(e,t,g,c,y,E){var r=l.bin.writeUint,a=l.bin.writeUshort,n=c.file;return r(e,t,y==0?67324752:33639248),t+=4,y==1&&(t+=2),a(e,t,20),a(e,t+=2,0),a(e,t+=2,c.cpr?8:0),r(e,t+=2,0),r(e,t+=4,c.crc),r(e,t+=4,n.length),r(e,t+=4,c.usize),a(e,t+=4,l.bin.sizeUTF8(g)),a(e,t+=2,0),t+=2,y==1&&(t+=2,t+=2,r(e,t+=6,E),t+=4),t+=l.bin.writeUTF8(e,t,g),y==0&&(e.set(n,t),t+=n.length),t},l.crc={table:(function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var g=t,c=0;c<8;c++)1&g?g=3988292384^g>>>1:g>>>=1;e[t]=g;}return e})(),update:function(e,t,g,c){for(var y=0;y<c;y++)e=l.crc.table[255&(e^t[g+y])]^e>>>8;return e},crc:function(e,t,g){return 4294967295^l.crc.update(4294967295,e,t,g)}},l.adler=function(e,t,g){for(var c=1,y=0,E=t,r=t+g;E<r;){for(var a=Math.min(E+5552,r);E<a;)y+=c+=e[E++];c%=65521,y%=65521;}return y<<16|c},l.bin={readUshort:function(e,t){return e[t]|e[t+1]<<8},writeUshort:function(e,t,g){e[t]=255&g,e[t+1]=g>>8&255;},readUint:function(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])},writeUint:function(e,t,g){e[t]=255&g,e[t+1]=g>>8&255,e[t+2]=g>>16&255,e[t+3]=g>>24&255;},readASCII:function(e,t,g){for(var c="",y=0;y<g;y++)c+=String.fromCharCode(e[t+y]);return c},writeASCII:function(e,t,g){for(var c=0;c<g.length;c++)e[t+c]=g.charCodeAt(c);},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,t,g){for(var c,y="",E=0;E<g;E++)y+="%"+l.bin.pad(e[t+E].toString(16));try{c=decodeURIComponent(y);}catch{return l.bin.readASCII(e,t,g)}return c},writeUTF8:function(e,t,g){for(var c=g.length,y=0,E=0;E<c;E++){var r=g.charCodeAt(E);if((4294967168&r)==0)e[t+y]=r,y++;else if((4294965248&r)==0)e[t+y]=192|r>>6,e[t+y+1]=128|r>>0&63,y+=2;else if((4294901760&r)==0)e[t+y]=224|r>>12,e[t+y+1]=128|r>>6&63,e[t+y+2]=128|r>>0&63,y+=3;else {if((4292870144&r)!=0)throw "e";e[t+y]=240|r>>18,e[t+y+1]=128|r>>12&63,e[t+y+2]=128|r>>6&63,e[t+y+3]=128|r>>0&63,y+=4;}}return y},sizeUTF8:function(e){for(var t=e.length,g=0,c=0;c<t;c++){var y=e.charCodeAt(c);if((4294967168&y)==0)g++;else if((4294965248&y)==0)g+=2;else if((4294901760&y)==0)g+=3;else {if((4292870144&y)!=0)throw "e";g+=4;}}return g}},l.F={},l.F.deflateRaw=function(e,t,g,c){var y=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][c],E=l.F.U,r=l.F._goodIndex;l.F._hash;var a=l.F._putsE,n=0,d=g<<3,v=0,C=e.length;if(c==0){for(;n<C;)a(t,d,n+(s=Math.min(65535,C-n))==C?1:0),d=l.F._copyExact(e,n,s,t,d+8),n+=s;return d>>>3}var P=E.lits,I=E.strt,N=E.prev,k=0,M=0,R=0,h=0,x=0,f=0;for(C>2&&(I[f=l.F._hash(e,0)]=0),n=0;n<C;n++){if(x=f,n+1<C-2){f=l.F._hash(e,n+1);var u=n+1&32767;N[u]=I[f],I[f]=u;}if(v<=n){(k>14e3||M>26697)&&C-n>100&&(v<n&&(P[k]=n-v,k+=2,v=n),d=l.F._writeBlock(n==C-1||v==C?1:0,P,k,h,e,R,n-R,t,d),k=M=h=0,R=n);var _=0;n<C-2&&(_=l.F._bestMatch(e,n,N,x,Math.min(y[2],C-n),y[3]));var s=_>>>16,w=65535&_;if(_!=0){w=65535&_;var b=r(s=_>>>16,E.of0);E.lhst[257+b]++;var A=r(w,E.df0);E.dhst[A]++,h+=E.exb[b]+E.dxb[A],P[k]=s<<23|n-v,P[k+1]=w<<16|b<<8|A,k+=2,v=n+s;}else E.lhst[e[n]]++;M++;}}for(R==n&&e.length!=0||(v<n&&(P[k]=n-v,k+=2,v=n),d=l.F._writeBlock(1,P,k,h,e,R,n-R,t,d),k=0,M=0,k=M=h=0,R=n);(7&d)!=0;)d++;return d>>>3},l.F._bestMatch=function(e,t,g,c,y,E){var r=32767&t,a=g[r],n=r-a+32768&32767;if(a==r||c!=l.F._hash(e,t-n))return 0;for(var d=0,v=0,C=Math.min(32767,t);n<=C&&--E!=0&&a!=r;){if(d==0||e[t+d]==e[t+d-n]){var P=l.F._howLong(e,t,n);if(P>d){if(v=n,(d=P)>=y)break;n+2<P&&(P=n+2);for(var I=0,N=0;N<P-2;N++){var k=t-n+N+32768&32767,M=k-g[k]+32768&32767;M>I&&(I=M,a=k);}}}n+=(r=a)-(a=g[r])+32768&32767;}return d<<16|v},l.F._howLong=function(e,t,g){if(e[t]!=e[t-g]||e[t+1]!=e[t+1-g]||e[t+2]!=e[t+2-g])return 0;var c=t,y=Math.min(e.length,t+258);for(t+=3;t<y&&e[t]==e[t-g];)t++;return t-c},l.F._hash=function(e,t){return (e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},l.saved=0,l.F._writeBlock=function(e,t,g,c,y,E,r,a,n){var d,v,C,P,I,N,k,M,R,h=l.F.U,x=l.F._putsF,f=l.F._putsE;h.lhst[256]++,v=(d=l.F.getTrees())[0],C=d[1],P=d[2],I=d[3],N=d[4],k=d[5],M=d[6],R=d[7];var u=32+((n+3&7)==0?0:8-(n+3&7))+(r<<3),_=c+l.F.contSize(h.fltree,h.lhst)+l.F.contSize(h.fdtree,h.dhst),s=c+l.F.contSize(h.ltree,h.lhst)+l.F.contSize(h.dtree,h.dhst);s+=14+3*k+l.F.contSize(h.itree,h.ihst)+(2*h.ihst[16]+3*h.ihst[17]+7*h.ihst[18]);for(var w=0;w<286;w++)h.lhst[w]=0;for(w=0;w<30;w++)h.dhst[w]=0;for(w=0;w<19;w++)h.ihst[w]=0;var b=u<_&&u<s?0:_<s?1:2;if(x(a,n,e),x(a,n+1,b),n+=3,b==0){for(;(7&n)!=0;)n++;n=l.F._copyExact(y,E,r,a,n);}else {var A,T;if(b==1&&(A=h.fltree,T=h.fdtree),b==2){l.F.makeCodes(h.ltree,v),l.F.revCodes(h.ltree,v),l.F.makeCodes(h.dtree,C),l.F.revCodes(h.dtree,C),l.F.makeCodes(h.itree,P),l.F.revCodes(h.itree,P),A=h.ltree,T=h.dtree,f(a,n,I-257),f(a,n+=5,N-1),f(a,n+=5,k-4),n+=4;for(var m=0;m<k;m++)f(a,n+3*m,h.itree[1+(h.ordr[m]<<1)]);n+=3*k,n=l.F._codeTiny(M,h.itree,a,n),n=l.F._codeTiny(R,h.itree,a,n);}for(var p=E,L=0;L<g;L+=2){for(var O=t[L],U=O>>>23,H=p+(8388607&O);p<H;)n=l.F._writeLit(y[p++],A,a,n);if(U!=0){var D=t[L+1],Q=D>>16,B=D>>8&255,F=255&D;f(a,n=l.F._writeLit(257+B,A,a,n),U-h.of0[B]),n+=h.exb[B],x(a,n=l.F._writeLit(F,T,a,n),Q-h.df0[F]),n+=h.dxb[F],p+=U;}}n=l.F._writeLit(256,A,a,n);}return n},l.F._copyExact=function(e,t,g,c,y){var E=y>>>3;return c[E]=g,c[E+1]=g>>>8,c[E+2]=255-c[E],c[E+3]=255-c[E+1],E+=4,c.set(new Uint8Array(e.buffer,t,g),E),y+(g+4<<3)},l.F.getTrees=function(){for(var e=l.F.U,t=l.F._hufTree(e.lhst,e.ltree,15),g=l.F._hufTree(e.dhst,e.dtree,15),c=[],y=l.F._lenCodes(e.ltree,c),E=[],r=l.F._lenCodes(e.dtree,E),a=0;a<c.length;a+=2)e.ihst[c[a]]++;for(a=0;a<E.length;a+=2)e.ihst[E[a]]++;for(var n=l.F._hufTree(e.ihst,e.itree,7),d=19;d>4&&e.itree[1+(e.ordr[d-1]<<1)]==0;)d--;return [t,g,n,y,r,d,c,E]},l.F.getSecond=function(e){for(var t=[],g=0;g<e.length;g+=2)t.push(e[g+1]);return t},l.F.nonZero=function(e){for(var t="",g=0;g<e.length;g+=2)e[g+1]!=0&&(t+=(g>>1)+",");return t},l.F.contSize=function(e,t){for(var g=0,c=0;c<t.length;c++)g+=t[c]*e[1+(c<<1)];return g},l.F._codeTiny=function(e,t,g,c){for(var y=0;y<e.length;y+=2){var E=e[y],r=e[y+1];c=l.F._writeLit(E,t,g,c);var a=E==16?2:E==17?3:7;E>15&&(l.F._putsE(g,c,r,a),c+=a);}return c},l.F._lenCodes=function(e,t){for(var g=e.length;g!=2&&e[g-1]==0;)g-=2;for(var c=0;c<g;c+=2){var y=e[c+1],E=c+3<g?e[c+3]:-1,r=c+5<g?e[c+5]:-1,a=c==0?-1:e[c-1];if(y==0&&E==y&&r==y){for(var n=c+5;n+2<g&&e[n+2]==y;)n+=2;(d=Math.min(n+1-c>>>1,138))<11?t.push(17,d-3):t.push(18,d-11),c+=2*d-2;}else if(y==a&&E==y&&r==y){for(n=c+5;n+2<g&&e[n+2]==y;)n+=2;var d=Math.min(n+1-c>>>1,6);t.push(16,d-3),c+=2*d-2;}else t.push(y,0);}return g>>>1},l.F._hufTree=function(e,t,g){var c=[],y=e.length,E=t.length,r=0;for(r=0;r<E;r+=2)t[r]=0,t[r+1]=0;for(r=0;r<y;r++)e[r]!=0&&c.push({lit:r,f:e[r]});var a=c.length,n=c.slice(0);if(a==0)return 0;if(a==1){var d=c[0].lit;return n=d==0?1:0,t[1+(d<<1)]=1,t[1+(n<<1)]=1,1}c.sort((function(M,R){return M.f-R.f}));var v=c[0],C=c[1],P=0,I=1,N=2;for(c[0]={lit:-1,f:v.f+C.f,l:v,r:C,d:0};I!=a-1;)v=P!=I&&(N==a||c[P].f<c[N].f)?c[P++]:c[N++],C=P!=I&&(N==a||c[P].f<c[N].f)?c[P++]:c[N++],c[I++]={lit:-1,f:v.f+C.f,l:v,r:C};var k=l.F.setDepth(c[I-1],0);for(k>g&&(l.F.restrictDepth(n,g,k),k=g),r=0;r<a;r++)t[1+(n[r].lit<<1)]=n[r].d;return k},l.F.setDepth=function(e,t){return e.lit!=-1?(e.d=t,t):Math.max(l.F.setDepth(e.l,t+1),l.F.setDepth(e.r,t+1))},l.F.restrictDepth=function(e,t,g){var c=0,y=1<<g-t,E=0;for(e.sort((function(a,n){return n.d==a.d?a.f-n.f:n.d-a.d})),c=0;c<e.length&&e[c].d>t;c++){var r=e[c].d;e[c].d=t,E+=y-(1<<g-r);}for(E>>>=g-t;E>0;)(r=e[c].d)<t?(e[c].d++,E-=1<<t-r-1):c++;for(;c>=0;c--)e[c].d==t&&E<0&&(e[c].d--,E++);E!=0&&console.log("debt left");},l.F._goodIndex=function(e,t){var g=0;return t[16|g]<=e&&(g|=16),t[8|g]<=e&&(g|=8),t[4|g]<=e&&(g|=4),t[2|g]<=e&&(g|=2),t[1|g]<=e&&(g|=1),g},l.F._writeLit=function(e,t,g,c){return l.F._putsF(g,c,t[e<<1]),c+t[1+(e<<1)]},l.F.inflate=function(e,t){var g=Uint8Array;if(e[0]==3&&e[1]==0)return t||new g(0);var c=l.F,y=c._bitsF,E=c._bitsE,r=c._decodeTiny,a=c.makeCodes,n=c.codes2map,d=c._get17,v=c.U,C=t==null;C&&(t=new g(e.length>>>2<<3));for(var P,I,N=0,k=0,M=0,R=0,h=0,x=0,f=0,u=0,_=0;N==0;)if(N=y(e,_,1),k=y(e,_+1,2),_+=3,k!=0){if(C&&(t=l.F._check(t,u+(1<<17))),k==1&&(P=v.flmap,I=v.fdmap,x=511,f=31),k==2){M=E(e,_,5)+257,R=E(e,_+5,5)+1,h=E(e,_+10,4)+4,_+=14;for(var s=0;s<38;s+=2)v.itree[s]=0,v.itree[s+1]=0;var w=1;for(s=0;s<h;s++){var b=E(e,_+3*s,3);v.itree[1+(v.ordr[s]<<1)]=b,b>w&&(w=b);}_+=3*h,a(v.itree,w),n(v.itree,w,v.imap),P=v.lmap,I=v.dmap,_=r(v.imap,(1<<w)-1,M+R,e,_,v.ttree);var A=c._copyOut(v.ttree,0,M,v.ltree);x=(1<<A)-1;var T=c._copyOut(v.ttree,M,R,v.dtree);f=(1<<T)-1,a(v.ltree,A),n(v.ltree,A,P),a(v.dtree,T),n(v.dtree,T,I);}for(;;){var m=P[d(e,_)&x];_+=15&m;var p=m>>>4;if(!(p>>>8))t[u++]=p;else {if(p==256)break;var L=u+p-254;if(p>264){var O=v.ldef[p-257];L=u+(O>>>3)+E(e,_,7&O),_+=7&O;}var U=I[d(e,_)&f];_+=15&U;var H=U>>>4,D=v.ddef[H],Q=(D>>>4)+y(e,_,15&D);for(_+=15&D,C&&(t=l.F._check(t,u+(1<<17)));u<L;)t[u]=t[u++-Q],t[u]=t[u++-Q],t[u]=t[u++-Q],t[u]=t[u++-Q];u=L;}}}else {(7&_)!=0&&(_+=8-(7&_));var B=4+(_>>>3),F=e[B-4]|e[B-3]<<8;C&&(t=l.F._check(t,u+F)),t.set(new g(e.buffer,e.byteOffset+B,F),u),_=B+F<<3,u+=F;}return t.length==u?t:t.slice(0,u)},l.F._check=function(e,t){var g=e.length;if(t<=g)return e;var c=new Uint8Array(Math.max(g<<1,t));return c.set(e,0),c},l.F._decodeTiny=function(e,t,g,c,y,E){for(var r=l.F._bitsE,a=l.F._get17,n=0;n<g;){var d=e[a(c,y)&t];y+=15&d;var v=d>>>4;if(v<=15)E[n]=v,n++;else {var C=0,P=0;v==16?(P=3+r(c,y,2),y+=2,C=E[n-1]):v==17?(P=3+r(c,y,3),y+=3):v==18&&(P=11+r(c,y,7),y+=7);for(var I=n+P;n<I;)E[n]=C,n++;}}return y},l.F._copyOut=function(e,t,g,c){for(var y=0,E=0,r=c.length>>>1;E<g;){var a=e[E+t];c[E<<1]=0,c[1+(E<<1)]=a,a>y&&(y=a),E++;}for(;E<r;)c[E<<1]=0,c[1+(E<<1)]=0,E++;return y},l.F.makeCodes=function(e,t){for(var g,c,y,E,r=l.F.U,a=e.length,n=r.bl_count,d=0;d<=t;d++)n[d]=0;for(d=1;d<a;d+=2)n[e[d]]++;var v=r.next_code;for(g=0,n[0]=0,c=1;c<=t;c++)g=g+n[c-1]<<1,v[c]=g;for(y=0;y<a;y+=2)(E=e[y+1])!=0&&(e[y]=v[E],v[E]++);},l.F.codes2map=function(e,t,g){for(var c=e.length,y=l.F.U.rev15,E=0;E<c;E+=2)if(e[E+1]!=0)for(var r=E>>1,a=e[E+1],n=r<<4|a,d=t-a,v=e[E]<<d,C=v+(1<<d);v!=C;)g[y[v]>>>15-t]=n,v++;},l.F.revCodes=function(e,t){for(var g=l.F.U.rev15,c=15-t,y=0;y<e.length;y+=2){var E=e[y]<<t-e[y+1];e[y]=g[E]>>>c;}},l.F._putsE=function(e,t,g){g<<=7&t;var c=t>>>3;e[c]|=g,e[c+1]|=g>>>8;},l.F._putsF=function(e,t,g){g<<=7&t;var c=t>>>3;e[c]|=g,e[c+1]|=g>>>8,e[c+2]|=g>>>16;},l.F._bitsE=function(e,t,g){return (e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<g)-1},l.F._bitsF=function(e,t,g){return (e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<g)-1},l.F._get17=function(e,t){return (e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},l.F._get25=function(e,t){return (e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},l.F.U=(o=Uint16Array,S=Uint32Array,{next_code:new o(16),bl_count:new o(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new o(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new S(32),flmap:new o(512),fltree:[],fdmap:new o(32),fdtree:[],lmap:new o(32768),ltree:[],ttree:[],dmap:new o(32768),dtree:[],imap:new o(512),itree:[],rev15:new o(32768),lhst:new S(286),dhst:new S(30),ihst:new S(19),lits:new S(15e3),strt:new o(65536),prev:new o(32768)}),(function(){for(var e=l.F.U,t=0;t<32768;t++){var g=t;g=(4278255360&(g=(4042322160&(g=(3435973836&(g=(2863311530&g)>>>1|(1431655765&g)<<1))>>>2|(858993459&g)<<2))>>>4|(252645135&g)<<4))>>>8|(16711935&g)<<8,e.rev15[t]=(g>>>16|g<<16)>>>17;}function c(y,E,r){for(;E--!=0;)y.push(0,r);}for(t=0;t<32;t++)e.ldef[t]=e.of0[t]<<3|e.exb[t],e.ddef[t]=e.df0[t]<<4|e.dxb[t];c(e.fltree,144,8),c(e.fltree,112,9),c(e.fltree,24,7),c(e.fltree,8,8),l.F.makeCodes(e.fltree,9),l.F.codes2map(e.fltree,9,e.flmap),l.F.revCodes(e.fltree,9),c(e.fdtree,32,5),l.F.makeCodes(e.fdtree,5),l.F.codes2map(e.fdtree,5,e.fdmap),l.F.revCodes(e.fdtree,5),c(e.itree,19,0),c(e.ltree,286,0),c(e.dtree,30,0),c(e.ttree,320,0);})();})();var Cn=Tn({__proto__:null,default:$e},[$e]),pe=(function(){var i={nextZero(r,a){for(;r[a]!=0;)a++;return a},readUshort:(r,a)=>r[a]<<8|r[a+1],writeUshort(r,a,n){r[a]=n>>8&255,r[a+1]=255&n;},readUint:(r,a)=>16777216*r[a]+(r[a+1]<<16|r[a+2]<<8|r[a+3]),writeUint(r,a,n){r[a]=n>>24&255,r[a+1]=n>>16&255,r[a+2]=n>>8&255,r[a+3]=255&n;},readASCII(r,a,n){let d="";for(let v=0;v<n;v++)d+=String.fromCharCode(r[a+v]);return d},writeASCII(r,a,n){for(let d=0;d<n.length;d++)r[a+d]=n.charCodeAt(d);},readBytes(r,a,n){let d=[];for(let v=0;v<n;v++)d.push(r[a+v]);return d},pad:r=>r.length<2?`0${r}`:r,readUTF8(r,a,n){let d,v="";for(let C=0;C<n;C++)v+=`%${i.pad(r[a+C].toString(16))}`;try{d=decodeURIComponent(v);}catch{return i.readASCII(r,a,n)}return d}};function o(r,a,n,d){let v=a*n,C=t(d),P=Math.ceil(a*C/8),I=new Uint8Array(4*v),N=new Uint32Array(I.buffer),{ctype:k}=d,{depth:M}=d,R=i.readUshort;if(k==6){let O=v<<2;if(M==8)for(var h=0;h<O;h+=4)I[h]=r[h],I[h+1]=r[h+1],I[h+2]=r[h+2],I[h+3]=r[h+3];if(M==16)for(h=0;h<O;h++)I[h]=r[h<<1];}else if(k==2){let O=d.tabs.tRNS;if(O==null){if(M==8)for(h=0;h<v;h++){var x=3*h;N[h]=255<<24|r[x+2]<<16|r[x+1]<<8|r[x];}if(M==16)for(h=0;h<v;h++)x=6*h,N[h]=255<<24|r[x+4]<<16|r[x+2]<<8|r[x];}else {var f=O[0];let U=O[1],H=O[2];if(M==8)for(h=0;h<v;h++){var u=h<<2;x=3*h,N[h]=255<<24|r[x+2]<<16|r[x+1]<<8|r[x],r[x]==f&&r[x+1]==U&&r[x+2]==H&&(I[u+3]=0);}if(M==16)for(h=0;h<v;h++)u=h<<2,x=6*h,N[h]=255<<24|r[x+4]<<16|r[x+2]<<8|r[x],R(r,x)==f&&R(r,x+2)==U&&R(r,x+4)==H&&(I[u+3]=0);}}else if(k==3){let O=d.tabs.PLTE,U=d.tabs.tRNS,H=U?U.length:0;if(M==1)for(var _=0;_<n;_++){var s=_*P,w=_*a;for(h=0;h<a;h++){u=w+h<<2;var b=3*(A=r[s+(h>>3)]>>7-((7&h)<<0)&1);I[u]=O[b],I[u+1]=O[b+1],I[u+2]=O[b+2],I[u+3]=A<H?U[A]:255;}}if(M==2)for(_=0;_<n;_++)for(s=_*P,w=_*a,h=0;h<a;h++)u=w+h<<2,b=3*(A=r[s+(h>>2)]>>6-((3&h)<<1)&3),I[u]=O[b],I[u+1]=O[b+1],I[u+2]=O[b+2],I[u+3]=A<H?U[A]:255;if(M==4)for(_=0;_<n;_++)for(s=_*P,w=_*a,h=0;h<a;h++)u=w+h<<2,b=3*(A=r[s+(h>>1)]>>4-((1&h)<<2)&15),I[u]=O[b],I[u+1]=O[b+1],I[u+2]=O[b+2],I[u+3]=A<H?U[A]:255;if(M==8)for(h=0;h<v;h++){var A;u=h<<2,b=3*(A=r[h]),I[u]=O[b],I[u+1]=O[b+1],I[u+2]=O[b+2],I[u+3]=A<H?U[A]:255;}}else if(k==4){if(M==8)for(h=0;h<v;h++){u=h<<2;var T=r[m=h<<1];I[u]=T,I[u+1]=T,I[u+2]=T,I[u+3]=r[m+1];}if(M==16)for(h=0;h<v;h++){var m;u=h<<2,T=r[m=h<<2],I[u]=T,I[u+1]=T,I[u+2]=T,I[u+3]=r[m+2];}}else if(k==0)for(f=d.tabs.tRNS?d.tabs.tRNS:-1,_=0;_<n;_++){let O=_*P,U=_*a;if(M==1)for(var p=0;p<a;p++){var L=(T=255*(r[O+(p>>>3)]>>>7-(7&p)&1))==255*f?0:255;N[U+p]=L<<24|T<<16|T<<8|T;}else if(M==2)for(p=0;p<a;p++)L=(T=85*(r[O+(p>>>2)]>>>6-((3&p)<<1)&3))==85*f?0:255,N[U+p]=L<<24|T<<16|T<<8|T;else if(M==4)for(p=0;p<a;p++)L=(T=17*(r[O+(p>>>1)]>>>4-((1&p)<<2)&15))==17*f?0:255,N[U+p]=L<<24|T<<16|T<<8|T;else if(M==8)for(p=0;p<a;p++)L=(T=r[O+p])==f?0:255,N[U+p]=L<<24|T<<16|T<<8|T;else if(M==16)for(p=0;p<a;p++)T=r[O+(p<<1)],L=R(r,O+(p<<1))==f?0:255,N[U+p]=L<<24|T<<16|T<<8|T;}return I}function S(r,a,n,d){let v=t(r),C=Math.ceil(n*v/8),P=new Uint8Array((C+1+r.interlace)*d);return a=r.tabs.CgBI?e(a,P):l(a,P),r.interlace==0?a=g(a,r,0,n,d):r.interlace==1&&(a=(function(N,k){let M=k.width,R=k.height,h=t(k),x=h>>3,f=Math.ceil(M*h/8),u=new Uint8Array(R*f),_=0,s=[0,0,4,0,2,0,1],w=[0,4,0,2,0,1,0],b=[8,8,8,4,4,2,2],A=[8,8,4,4,2,2,1],T=0;for(;T<7;){let p=b[T],L=A[T],O=0,U=0,H=s[T];for(;H<R;)H+=p,U++;let D=w[T];for(;D<M;)D+=L,O++;let Q=Math.ceil(O*h/8);g(N,k,_,O,U);let B=0,F=s[T];for(;F<R;){let $=w[T],K=_+B*Q<<3;for(;$<M;){var m;if(h==1&&(m=(m=N[K>>3])>>7-(7&K)&1,u[F*f+($>>3)]|=m<<7-((7&$)<<0)),h==2&&(m=(m=N[K>>3])>>6-(7&K)&3,u[F*f+($>>2)]|=m<<6-((3&$)<<1)),h==4&&(m=(m=N[K>>3])>>4-(7&K)&15,u[F*f+($>>1)]|=m<<4-((1&$)<<2)),h>=8){let V=F*f+$*x;for(let z=0;z<x;z++)u[V+z]=N[(K>>3)+z];}K+=h,$+=L;}B++,F+=p;}O*U!=0&&(_+=U*(1+Q)),T+=1;}return u})(a,r)),a}function l(r,a){return e(new Uint8Array(r.buffer,2,r.length-6),a)}var e=(function(){let r={H:{}};return r.H.N=function(a,n){let d=Uint8Array,v,C,P=0,I=0,N=0,k=0,M=0,R=0,h=0,x=0,f=0;if(a[0]==3&&a[1]==0)return n||new d(0);let u=r.H,_=u.b,s=u.e,w=u.R,b=u.n,A=u.A,T=u.Z,m=u.m,p=n==null;for(p&&(n=new d(a.length>>>2<<5));P==0;)if(P=_(a,f,1),I=_(a,f+1,2),f+=3,I!=0){if(p&&(n=r.H.W(n,x+(1<<17))),I==1&&(v=m.J,C=m.h,R=511,h=31),I==2){N=s(a,f,5)+257,k=s(a,f+5,5)+1,M=s(a,f+10,4)+4,f+=14;let O=1;for(var L=0;L<38;L+=2)m.Q[L]=0,m.Q[L+1]=0;for(L=0;L<M;L++){let D=s(a,f+3*L,3);m.Q[1+(m.X[L]<<1)]=D,D>O&&(O=D);}f+=3*M,b(m.Q,O),A(m.Q,O,m.u),v=m.w,C=m.d,f=w(m.u,(1<<O)-1,N+k,a,f,m.v);let U=u.V(m.v,0,N,m.C);R=(1<<U)-1;let H=u.V(m.v,N,k,m.D);h=(1<<H)-1,b(m.C,U),A(m.C,U,v),b(m.D,H),A(m.D,H,C);}for(;;){let O=v[T(a,f)&R];f+=15&O;let U=O>>>4;if(!(U>>>8))n[x++]=U;else {if(U==256)break;{let H=x+U-254;if(U>264){let $=m.q[U-257];H=x+($>>>3)+s(a,f,7&$),f+=7&$;}let D=C[T(a,f)&h];f+=15&D;let Q=D>>>4,B=m.c[Q],F=(B>>>4)+_(a,f,15&B);for(f+=15&B;x<H;)n[x]=n[x++-F],n[x]=n[x++-F],n[x]=n[x++-F],n[x]=n[x++-F];x=H;}}}}else {(7&f)!=0&&(f+=8-(7&f));let O=4+(f>>>3),U=a[O-4]|a[O-3]<<8;p&&(n=r.H.W(n,x+U)),n.set(new d(a.buffer,a.byteOffset+O,U),x),f=O+U<<3,x+=U;}return n.length==x?n:n.slice(0,x)},r.H.W=function(a,n){let d=a.length;if(n<=d)return a;let v=new Uint8Array(d<<1);return v.set(a,0),v},r.H.R=function(a,n,d,v,C,P){let I=r.H.e,N=r.H.Z,k=0;for(;k<d;){let M=a[N(v,C)&n];C+=15&M;let R=M>>>4;if(R<=15)P[k]=R,k++;else {let h=0,x=0;R==16?(x=3+I(v,C,2),C+=2,h=P[k-1]):R==17?(x=3+I(v,C,3),C+=3):R==18&&(x=11+I(v,C,7),C+=7);let f=k+x;for(;k<f;)P[k]=h,k++;}}return C},r.H.V=function(a,n,d,v){let C=0,P=0,I=v.length>>>1;for(;P<d;){let N=a[P+n];v[P<<1]=0,v[1+(P<<1)]=N,N>C&&(C=N),P++;}for(;P<I;)v[P<<1]=0,v[1+(P<<1)]=0,P++;return C},r.H.n=function(a,n){let d=r.H.m,v=a.length,C,P,I,N,k=d.j;for(var M=0;M<=n;M++)k[M]=0;for(M=1;M<v;M+=2)k[a[M]]++;let R=d.K;for(C=0,k[0]=0,P=1;P<=n;P++)C=C+k[P-1]<<1,R[P]=C;for(I=0;I<v;I+=2)N=a[I+1],N!=0&&(a[I]=R[N],R[N]++);},r.H.A=function(a,n,d){let v=a.length,C=r.H.m.r;for(let P=0;P<v;P+=2)if(a[P+1]!=0){let I=P>>1,N=a[P+1],k=I<<4|N,M=n-N,R=a[P]<<M,h=R+(1<<M);for(;R!=h;)d[C[R]>>>15-n]=k,R++;}},r.H.l=function(a,n){let d=r.H.m.r,v=15-n;for(let C=0;C<a.length;C+=2){let P=a[C]<<n-a[C+1];a[C]=d[P]>>>v;}},r.H.M=function(a,n,d){d<<=7&n;let v=n>>>3;a[v]|=d,a[v+1]|=d>>>8;},r.H.I=function(a,n,d){d<<=7&n;let v=n>>>3;a[v]|=d,a[v+1]|=d>>>8,a[v+2]|=d>>>16;},r.H.e=function(a,n,d){return (a[n>>>3]|a[1+(n>>>3)]<<8)>>>(7&n)&(1<<d)-1},r.H.b=function(a,n,d){return (a[n>>>3]|a[1+(n>>>3)]<<8|a[2+(n>>>3)]<<16)>>>(7&n)&(1<<d)-1},r.H.Z=function(a,n){return (a[n>>>3]|a[1+(n>>>3)]<<8|a[2+(n>>>3)]<<16)>>>(7&n)},r.H.i=function(a,n){return (a[n>>>3]|a[1+(n>>>3)]<<8|a[2+(n>>>3)]<<16|a[3+(n>>>3)]<<24)>>>(7&n)},r.H.m=(function(){let a=Uint16Array,n=Uint32Array;return {K:new a(16),j:new a(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new a(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new n(32),J:new a(512),_:[],h:new a(32),$:[],w:new a(32768),C:[],v:[],d:new a(32768),D:[],u:new a(512),Q:[],r:new a(32768),s:new n(286),Y:new n(30),a:new n(19),t:new n(15e3),k:new a(65536),g:new a(32768)}})(),(function(){let a=r.H.m;for(var n=0;n<32768;n++){let v=n;v=(2863311530&v)>>>1|(1431655765&v)<<1,v=(3435973836&v)>>>2|(858993459&v)<<2,v=(4042322160&v)>>>4|(252645135&v)<<4,v=(4278255360&v)>>>8|(16711935&v)<<8,a.r[n]=(v>>>16|v<<16)>>>17;}function d(v,C,P){for(;C--!=0;)v.push(0,P);}for(n=0;n<32;n++)a.q[n]=a.S[n]<<3|a.T[n],a.c[n]=a.p[n]<<4|a.z[n];d(a._,144,8),d(a._,112,9),d(a._,24,7),d(a._,8,8),r.H.n(a._,9),r.H.A(a._,9,a.J),r.H.l(a._,9),d(a.$,32,5),r.H.n(a.$,5),r.H.A(a.$,5,a.h),r.H.l(a.$,5),d(a.Q,19,0),d(a.C,286,0),d(a.D,30,0),d(a.v,320,0);})(),r.H.N})();function t(r){return [1,null,3,1,2,null,4][r.ctype]*r.depth}function g(r,a,n,d,v){let C=t(a),P=Math.ceil(d*C/8),I,N;C=Math.ceil(C/8);let k=r[n],M=0;if(k>1&&(r[n]=[0,0,1][k-2]),k==3)for(M=C;M<P;M++)r[M+1]=r[M+1]+(r[M+1-C]>>>1)&255;for(let R=0;R<v;R++)if(I=n+R*P,N=I+R+1,k=r[N-1],M=0,k==0)for(;M<P;M++)r[I+M]=r[N+M];else if(k==1){for(;M<C;M++)r[I+M]=r[N+M];for(;M<P;M++)r[I+M]=r[N+M]+r[I+M-C];}else if(k==2)for(;M<P;M++)r[I+M]=r[N+M]+r[I+M-P];else if(k==3){for(;M<C;M++)r[I+M]=r[N+M]+(r[I+M-P]>>>1);for(;M<P;M++)r[I+M]=r[N+M]+(r[I+M-P]+r[I+M-C]>>>1);}else {for(;M<C;M++)r[I+M]=r[N+M]+c(0,r[I+M-P],0);for(;M<P;M++)r[I+M]=r[N+M]+c(r[I+M-C],r[I+M-P],r[I+M-C-P]);}return r}function c(r,a,n){let d=r+a-n,v=d-r,C=d-a,P=d-n;return v*v<=C*C&&v*v<=P*P?r:C*C<=P*P?a:n}function y(r,a,n){n.width=i.readUint(r,a),a+=4,n.height=i.readUint(r,a),a+=4,n.depth=r[a],a++,n.ctype=r[a],a++,n.compress=r[a],a++,n.filter=r[a],a++,n.interlace=r[a],a++;}function E(r,a,n,d,v,C,P,I,N){let k=Math.min(a,v),M=Math.min(n,C),R=0,h=0;for(let T=0;T<M;T++)for(let m=0;m<k;m++)if(P>=0&&I>=0?(R=T*a+m<<2,h=(I+T)*v+P+m<<2):(R=(-I+T)*a-P+m<<2,h=T*v+m<<2),N==0)d[h]=r[R],d[h+1]=r[R+1],d[h+2]=r[R+2],d[h+3]=r[R+3];else if(N==1){var x=r[R+3]*.00392156862745098,f=r[R]*x,u=r[R+1]*x,_=r[R+2]*x,s=d[h+3]*(1/255),w=d[h]*s,b=d[h+1]*s,A=d[h+2]*s;let p=1-x,L=x+s*p,O=L==0?0:1/L;d[h+3]=255*L,d[h+0]=(f+w*p)*O,d[h+1]=(u+b*p)*O,d[h+2]=(_+A*p)*O;}else if(N==2)x=r[R+3],f=r[R],u=r[R+1],_=r[R+2],s=d[h+3],w=d[h],b=d[h+1],A=d[h+2],x==s&&f==w&&u==b&&_==A?(d[h]=0,d[h+1]=0,d[h+2]=0,d[h+3]=0):(d[h]=f,d[h+1]=u,d[h+2]=_,d[h+3]=x);else if(N==3){if(x=r[R+3],f=r[R],u=r[R+1],_=r[R+2],s=d[h+3],w=d[h],b=d[h+1],A=d[h+2],x==s&&f==w&&u==b&&_==A)continue;if(x<220&&s>20)return false}return true}return {decode:function(a){let n=new Uint8Array(a),d=8,v=i,C=v.readUshort,P=v.readUint,I={tabs:{},frames:[]},N=new Uint8Array(n.length),k,M=0,R=0,h=[137,80,78,71,13,10,26,10];for(var x=0;x<8;x++)if(n[x]!=h[x])throw "The input is not a PNG file!";for(;d<n.length;){let T=v.readUint(n,d);d+=4;let m=v.readASCII(n,d,4);if(d+=4,m=="IHDR")y(n,d,I);else if(m=="iCCP"){for(var f=d;n[f]!=0;)f++;v.readASCII(n,d,f-d),n[f+1];let p=n.slice(f+2,d+T),L=null;try{L=l(p);}catch{L=e(p);}I.tabs[m]=L;}else if(m=="CgBI")I.tabs[m]=n.slice(d,d+4);else if(m=="IDAT"){for(x=0;x<T;x++)N[M+x]=n[d+x];M+=T;}else if(m=="acTL")I.tabs[m]={num_frames:P(n,d),num_plays:P(n,d+4)},k=new Uint8Array(n.length);else if(m=="fcTL"){R!=0&&((A=I.frames[I.frames.length-1]).data=S(I,k.slice(0,R),A.rect.width,A.rect.height),R=0);let p={x:P(n,d+12),y:P(n,d+16),width:P(n,d+4),height:P(n,d+8)},L=C(n,d+22);L=C(n,d+20)/(L==0?100:L);let O={rect:p,delay:Math.round(1e3*L),dispose:n[d+24],blend:n[d+25]};I.frames.push(O);}else if(m=="fdAT"){for(x=0;x<T-4;x++)k[R+x]=n[d+x+4];R+=T-4;}else if(m=="pHYs")I.tabs[m]=[v.readUint(n,d),v.readUint(n,d+4),n[d+8]];else if(m=="cHRM")for(I.tabs[m]=[],x=0;x<8;x++)I.tabs[m].push(v.readUint(n,d+4*x));else if(m=="tEXt"||m=="zTXt"){I.tabs[m]==null&&(I.tabs[m]={});var u=v.nextZero(n,d),_=v.readASCII(n,d,u-d),s=d+T-u-1;if(m=="tEXt")b=v.readASCII(n,u+1,s);else {var w=l(n.slice(u+2,u+2+s));b=v.readUTF8(w,0,w.length);}I.tabs[m][_]=b;}else if(m=="iTXt"){I.tabs[m]==null&&(I.tabs[m]={}),u=0,f=d,u=v.nextZero(n,f),_=v.readASCII(n,f,u-f);let p=n[f=u+1];var b;n[f+1],f+=2,u=v.nextZero(n,f),v.readASCII(n,f,u-f),f=u+1,u=v.nextZero(n,f),v.readUTF8(n,f,u-f),s=T-((f=u+1)-d),p==0?b=v.readUTF8(n,f,s):(w=l(n.slice(f,f+s)),b=v.readUTF8(w,0,w.length)),I.tabs[m][_]=b;}else if(m=="PLTE")I.tabs[m]=v.readBytes(n,d,T);else if(m=="hIST"){let p=I.tabs.PLTE.length/3;for(I.tabs[m]=[],x=0;x<p;x++)I.tabs[m].push(C(n,d+2*x));}else if(m=="tRNS")I.ctype==3?I.tabs[m]=v.readBytes(n,d,T):I.ctype==0?I.tabs[m]=C(n,d):I.ctype==2&&(I.tabs[m]=[C(n,d),C(n,d+2),C(n,d+4)]);else if(m=="gAMA")I.tabs[m]=v.readUint(n,d)/1e5;else if(m=="sRGB")I.tabs[m]=n[d];else if(m=="bKGD")I.ctype==0||I.ctype==4?I.tabs[m]=[C(n,d)]:I.ctype==2||I.ctype==6?I.tabs[m]=[C(n,d),C(n,d+2),C(n,d+4)]:I.ctype==3&&(I.tabs[m]=n[d]);else if(m=="IEND")break;d+=T,v.readUint(n,d),d+=4;}var A;return R!=0&&((A=I.frames[I.frames.length-1]).data=S(I,k.slice(0,R),A.rect.width,A.rect.height)),I.data=S(I,N,I.width,I.height),delete I.compress,delete I.interlace,delete I.filter,I},toRGBA8:function(a){let n=a.width,d=a.height;if(a.tabs.acTL==null)return [o(a.data,n,d,a).buffer];let v=[];a.frames[0].data==null&&(a.frames[0].data=a.data);let C=n*d*4,P=new Uint8Array(C),I=new Uint8Array(C),N=new Uint8Array(C);for(let M=0;M<a.frames.length;M++){let R=a.frames[M],h=R.rect.x,x=R.rect.y,f=R.rect.width,u=R.rect.height,_=o(R.data,f,u,a);if(M!=0)for(var k=0;k<C;k++)N[k]=P[k];if(R.blend==0?E(_,f,u,P,n,d,h,x,0):R.blend==1&&E(_,f,u,P,n,d,h,x,1),v.push(P.buffer.slice(0)),R.dispose!=0){if(R.dispose==1)E(I,f,u,P,n,d,h,x,0);else if(R.dispose==2)for(k=0;k<C;k++)P[k]=N[k];}}return v},_paeth:c,_copyTile:E,_bin:i}})();(function(){let{_copyTile:i}=pe,{_bin:o}=pe,S=pe._paeth;var l={table:(function(){let f=new Uint32Array(256);for(let u=0;u<256;u++){let _=u;for(let s=0;s<8;s++)1&_?_=3988292384^_>>>1:_>>>=1;f[u]=_;}return f})(),update(f,u,_,s){for(let w=0;w<s;w++)f=l.table[255&(f^u[_+w])]^f>>>8;return f},crc:(f,u,_)=>4294967295^l.update(4294967295,f,u,_)};function e(f,u,_,s){u[_]+=f[0]*s>>4,u[_+1]+=f[1]*s>>4,u[_+2]+=f[2]*s>>4,u[_+3]+=f[3]*s>>4;}function t(f){return Math.max(0,Math.min(255,f))}function g(f,u){let _=f[0]-u[0],s=f[1]-u[1],w=f[2]-u[2],b=f[3]-u[3];return _*_+s*s+w*w+b*b}function c(f,u,_,s,w,b,A){A==null&&(A=1);let T=s.length,m=[];for(var p=0;p<T;p++){let F=s[p];m.push([F>>>0&255,F>>>8&255,F>>>16&255,F>>>24&255]);}for(p=0;p<T;p++){let F=4294967295;for(var L=0,O=0;O<T;O++){var U=g(m[p],m[O]);O!=p&&U<F&&(F=U,L=O);}}let H=new Uint32Array(w.buffer),D=new Int16Array(u*_*4),Q=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(p=0;p<Q.length;p++)Q[p]=255*((Q[p]+.5)/16-.5);for(let F=0;F<_;F++)for(let $=0;$<u;$++){var B;p=4*(F*u+$),A!=2?B=[t(f[p]+D[p]),t(f[p+1]+D[p+1]),t(f[p+2]+D[p+2]),t(f[p+3]+D[p+3])]:(U=Q[4*(3&F)+(3&$)],B=[t(f[p]+U),t(f[p+1]+U),t(f[p+2]+U),t(f[p+3]+U)]),L=0;let K=16777215;for(O=0;O<T;O++){let q=g(B,m[O]);q<K&&(K=q,L=O);}let V=m[L],z=[B[0]-V[0],B[1]-V[1],B[2]-V[2],B[3]-V[3]];A==1&&($!=u-1&&e(z,D,p+4,7),F!=_-1&&($!=0&&e(z,D,p+4*u-4,3),e(z,D,p+4*u,5),$!=u-1&&e(z,D,p+4*u+4,1))),b[p>>2]=L,H[p>>2]=s[L];}}function y(f,u,_,s,w){w==null&&(w={});let{crc:b}=l,A=o.writeUint,T=o.writeUshort,m=o.writeASCII,p=8,L=f.frames.length>1,O,U=false,H=33+(L?20:0);if(w.sRGB!=null&&(H+=13),w.pHYs!=null&&(H+=21),w.iCCP!=null&&(O=pako.deflate(w.iCCP),H+=21+O.length+4),f.ctype==3){for(var D=f.plte.length,Q=0;Q<D;Q++)f.plte[Q]>>>24!=255&&(U=true);H+=8+3*D+4+(U?8+1*D+4:0);}for(var B=0;B<f.frames.length;B++)L&&(H+=38),H+=(V=f.frames[B]).cimg.length+12,B!=0&&(H+=4);H+=12;let F=new Uint8Array(H),$=[137,80,78,71,13,10,26,10];for(Q=0;Q<8;Q++)F[Q]=$[Q];if(A(F,p,13),p+=4,m(F,p,"IHDR"),p+=4,A(F,p,u),p+=4,A(F,p,_),p+=4,F[p]=f.depth,p++,F[p]=f.ctype,p++,F[p]=0,p++,F[p]=0,p++,F[p]=0,p++,A(F,p,b(F,p-17,17)),p+=4,w.sRGB!=null&&(A(F,p,1),p+=4,m(F,p,"sRGB"),p+=4,F[p]=w.sRGB,p++,A(F,p,b(F,p-5,5)),p+=4),w.iCCP!=null){let z=13+O.length;A(F,p,z),p+=4,m(F,p,"iCCP"),p+=4,m(F,p,"ICC profile"),p+=11,p+=2,F.set(O,p),p+=O.length,A(F,p,b(F,p-(z+4),z+4)),p+=4;}if(w.pHYs!=null&&(A(F,p,9),p+=4,m(F,p,"pHYs"),p+=4,A(F,p,w.pHYs[0]),p+=4,A(F,p,w.pHYs[1]),p+=4,F[p]=w.pHYs[2],p++,A(F,p,b(F,p-13,13)),p+=4),L&&(A(F,p,8),p+=4,m(F,p,"acTL"),p+=4,A(F,p,f.frames.length),p+=4,A(F,p,w.loop!=null?w.loop:0),p+=4,A(F,p,b(F,p-12,12)),p+=4),f.ctype==3){for(A(F,p,3*(D=f.plte.length)),p+=4,m(F,p,"PLTE"),p+=4,Q=0;Q<D;Q++){let z=3*Q,q=f.plte[Q],G=255&q,W=q>>>8&255,ie=q>>>16&255;F[p+z+0]=G,F[p+z+1]=W,F[p+z+2]=ie;}if(p+=3*D,A(F,p,b(F,p-3*D-4,3*D+4)),p+=4,U){for(A(F,p,D),p+=4,m(F,p,"tRNS"),p+=4,Q=0;Q<D;Q++)F[p+Q]=f.plte[Q]>>>24&255;p+=D,A(F,p,b(F,p-D-4,D+4)),p+=4;}}let K=0;for(B=0;B<f.frames.length;B++){var V=f.frames[B];L&&(A(F,p,26),p+=4,m(F,p,"fcTL"),p+=4,A(F,p,K++),p+=4,A(F,p,V.rect.width),p+=4,A(F,p,V.rect.height),p+=4,A(F,p,V.rect.x),p+=4,A(F,p,V.rect.y),p+=4,T(F,p,s[B]),p+=2,T(F,p,1e3),p+=2,F[p]=V.dispose,p++,F[p]=V.blend,p++,A(F,p,b(F,p-30,30)),p+=4);let z=V.cimg;A(F,p,(D=z.length)+(B==0?0:4)),p+=4;let q=p;m(F,p,B==0?"IDAT":"fdAT"),p+=4,B!=0&&(A(F,p,K++),p+=4),F.set(z,p),p+=D,A(F,p,b(F,q,p-q)),p+=4;}return A(F,p,0),p+=4,m(F,p,"IEND"),p+=4,A(F,p,b(F,p-4,4)),p+=4,F.buffer}function E(f,u,_){for(let s=0;s<f.frames.length;s++){let w=f.frames[s];w.rect.width;let b=w.rect.height,A=new Uint8Array(b*w.bpl+b);w.cimg=d(w.img,b,w.bpp,w.bpl,A,u,_);}}function r(f,u,_,s,w){let b=w[0],A=w[1],T=w[2],m=w[3],p=w[4],L=w[5],O=6,U=8,H=255;for(var D=0;D<f.length;D++){let te=new Uint8Array(f[D]);for(var Q=te.length,B=0;B<Q;B+=4)H&=te[B+3];}let F=H!=255,$=(function(Y,J,ne,oe,j,ue){let ee=[];for(var X=0;X<Y.length;X++){let le=new Uint8Array(Y[X]),he=new Uint32Array(le.buffer);var ce;let de=0,Ae=0,me=J,Ie=ne,Ye=oe?1:0;if(X!=0){let yn=ue||oe||X==1||ee[X-2].dispose!=0?1:2,Je=0,vt=1e9;for(let Le=0;Le<yn;Le++){var ge=new Uint8Array(Y[X-1-Le]);let wn=new Uint32Array(Y[X-1-Le]),_e=J,be=ne,Ue=-1,De=-1;for(let Re=0;Re<ne;Re++)for(let Ce=0;Ce<J;Ce++)he[se=Re*J+Ce]!=wn[se]&&(Ce<_e&&(_e=Ce),Ce>Ue&&(Ue=Ce),Re<be&&(be=Re),Re>De&&(De=Re));Ue==-1&&(_e=be=Ue=De=0),j&&((1&_e)==1&&_e--,(1&be)==1&&be--);let _t=(Ue-_e+1)*(De-be+1);_t<vt&&(vt=_t,Je=Le,de=_e,Ae=be,me=Ue-_e+1,Ie=De-be+1);}ge=new Uint8Array(Y[X-1-Je]),Je==1&&(ee[X-1].dispose=2),ce=new Uint8Array(me*Ie*4),i(ge,J,ne,ce,me,Ie,-de,-Ae,0),Ye=i(le,J,ne,ce,me,Ie,-de,-Ae,3)?1:0,Ye==1?n(le,J,ne,ce,{x:de,y:Ae,width:me,height:Ie}):i(le,J,ne,ce,me,Ie,-de,-Ae,0);}else ce=le.slice(0);ee.push({rect:{x:de,y:Ae,width:me,height:Ie},img:ce,blend:Ye,dispose:0});}if(oe)for(X=0;X<ee.length;X++){if((Te=ee[X]).blend==1)continue;let le=Te.rect,he=ee[X-1].rect,de=Math.min(le.x,he.x),Ae=Math.min(le.y,he.y),me={x:de,y:Ae,width:Math.max(le.x+le.width,he.x+he.width)-de,height:Math.max(le.y+le.height,he.y+he.height)-Ae};ee[X-1].dispose=1,X-1!=0&&a(Y,J,ne,ee,X-1,me,j),a(Y,J,ne,ee,X,me,j);}let He=0;if(Y.length!=1)for(var se=0;se<ee.length;se++){var Te;He+=(Te=ee[se]).rect.width*Te.rect.height;}return ee})(f,u,_,b,A,T),K={},V=[],z=[];if(s!=0){let te=[];for(B=0;B<$.length;B++)te.push($[B].img.buffer);let Y=(function(j){let ue=0;for(var ee=0;ee<j.length;ee++)ue+=j[ee].byteLength;let X=new Uint8Array(ue),ce=0;for(ee=0;ee<j.length;ee++){let ge=new Uint8Array(j[ee]),He=ge.length;for(let se=0;se<He;se+=4){let Te=ge[se],le=ge[se+1],he=ge[se+2],de=ge[se+3];de==0&&(Te=le=he=0),X[ce+se]=Te,X[ce+se+1]=le,X[ce+se+2]=he,X[ce+se+3]=de;}ce+=He;}return X.buffer})(te),J=C(Y,s);for(B=0;B<J.plte.length;B++)V.push(J.plte[B].est.rgba);let ne=0;for(B=0;B<$.length;B++){let oe=(G=$[B]).img.length;var q=new Uint8Array(J.inds.buffer,ne>>2,oe>>2);z.push(q);let j=new Uint8Array(J.abuf,ne,oe);L&&c(G.img,G.rect.width,G.rect.height,V,j,q),G.img.set(j),ne+=oe;}}else for(D=0;D<$.length;D++){var G=$[D];let te=new Uint32Array(G.img.buffer);var W=G.rect.width;for(Q=te.length,q=new Uint8Array(Q),z.push(q),B=0;B<Q;B++){let Y=te[B];if(B!=0&&Y==te[B-1])q[B]=q[B-1];else if(B>W&&Y==te[B-W])q[B]=q[B-W];else {let J=K[Y];if(J==null&&(K[Y]=J=V.length,V.push(Y),V.length>=300))break;q[B]=J;}}}let ie=V.length;for(ie<=256&&p==0&&(U=ie<=2?1:ie<=4?2:ie<=16?4:8,U=Math.max(U,m)),D=0;D<$.length;D++){(G=$[D]).rect.x,G.rect.y,W=G.rect.width;let te=G.rect.height,Y=G.img;new Uint32Array(Y.buffer);let J=4*W,ne=4;if(ie<=256&&p==0){J=Math.ceil(U*W/8);var ae=new Uint8Array(J*te);let oe=z[D];for(let j=0;j<te;j++){B=j*J;let ue=j*W;if(U==8)for(var Z=0;Z<W;Z++)ae[B+Z]=oe[ue+Z];else if(U==4)for(Z=0;Z<W;Z++)ae[B+(Z>>1)]|=oe[ue+Z]<<4-4*(1&Z);else if(U==2)for(Z=0;Z<W;Z++)ae[B+(Z>>2)]|=oe[ue+Z]<<6-2*(3&Z);else if(U==1)for(Z=0;Z<W;Z++)ae[B+(Z>>3)]|=oe[ue+Z]<<7-1*(7&Z);}Y=ae,O=3,ne=1;}else if(F==0&&$.length==1){ae=new Uint8Array(W*te*3);let oe=W*te;for(B=0;B<oe;B++){let j=3*B,ue=4*B;ae[j]=Y[ue],ae[j+1]=Y[ue+1],ae[j+2]=Y[ue+2];}Y=ae,O=2,ne=3,J=3*W;}G.img=Y,G.bpl=J,G.bpp=ne;}return {ctype:O,depth:U,plte:V,frames:$}}function a(f,u,_,s,w,b,A){let T=Uint8Array,m=Uint32Array,p=new T(f[w-1]),L=new m(f[w-1]),O=w+1<f.length?new T(f[w+1]):null,U=new T(f[w]),H=new m(U.buffer),D=u,Q=_,B=-1,F=-1;for(let K=0;K<b.height;K++)for(let V=0;V<b.width;V++){let z=b.x+V,q=b.y+K,G=q*u+z,W=H[G];W==0||s[w-1].dispose==0&&L[G]==W&&(O==null||O[4*G+3]!=0)||(z<D&&(D=z),z>B&&(B=z),q<Q&&(Q=q),q>F&&(F=q));}B==-1&&(D=Q=B=F=0),A&&((1&D)==1&&D--,(1&Q)==1&&Q--),b={x:D,y:Q,width:B-D+1,height:F-Q+1};let $=s[w];$.rect=b,$.blend=1,$.img=new Uint8Array(b.width*b.height*4),s[w-1].dispose==0?(i(p,u,_,$.img,b.width,b.height,-b.x,-b.y,0),n(U,u,_,$.img,b)):i(U,u,_,$.img,b.width,b.height,-b.x,-b.y,0);}function n(f,u,_,s,w){i(f,u,_,s,w.width,w.height,-w.x,-w.y,2);}function d(f,u,_,s,w,b,A){let T=[],m,p=[0,1,2,3,4];b!=-1?p=[b]:(u*s>5e5||_==1)&&(p=[0]),A&&(m={level:0});let L=Cn;for(var O=0;O<p.length;O++){for(let D=0;D<u;D++)v(w,f,D,s,_,p[O]);T.push(L.deflate(w,m));}let U,H=1e9;for(O=0;O<T.length;O++)T[O].length<H&&(U=O,H=T[O].length);return T[U]}function v(f,u,_,s,w,b){let A=_*s,T=A+_;if(f[T]=b,T++,b==0)if(s<500)for(var m=0;m<s;m++)f[T+m]=u[A+m];else f.set(new Uint8Array(u.buffer,A,s),T);else if(b==1){for(m=0;m<w;m++)f[T+m]=u[A+m];for(m=w;m<s;m++)f[T+m]=u[A+m]-u[A+m-w]+256&255;}else if(_==0){for(m=0;m<w;m++)f[T+m]=u[A+m];if(b==2)for(m=w;m<s;m++)f[T+m]=u[A+m];if(b==3)for(m=w;m<s;m++)f[T+m]=u[A+m]-(u[A+m-w]>>1)+256&255;if(b==4)for(m=w;m<s;m++)f[T+m]=u[A+m]-S(u[A+m-w],0,0)+256&255;}else {if(b==2)for(m=0;m<s;m++)f[T+m]=u[A+m]+256-u[A+m-s]&255;if(b==3){for(m=0;m<w;m++)f[T+m]=u[A+m]+256-(u[A+m-s]>>1)&255;for(m=w;m<s;m++)f[T+m]=u[A+m]+256-(u[A+m-s]+u[A+m-w]>>1)&255;}if(b==4){for(m=0;m<w;m++)f[T+m]=u[A+m]+256-S(0,u[A+m-s],0)&255;for(m=w;m<s;m++)f[T+m]=u[A+m]+256-S(u[A+m-w],u[A+m-s],u[A+m-w-s])&255;}}}function C(f,u){let _=new Uint8Array(f),s=_.slice(0),w=new Uint32Array(s.buffer),b=P(s,u),A=b[0],T=b[1],m=_.length,p=new Uint8Array(m>>2),L;if(_.length<2e7)for(var O=0;O<m;O+=4)L=I(A,U=_[O]*(1/255),H=_[O+1]*(1/255),D=_[O+2]*(1/255),Q=_[O+3]*(1/255)),p[O>>2]=L.ind,w[O>>2]=L.est.rgba;else for(O=0;O<m;O+=4){var U=_[O]*.00392156862745098,H=_[O+1]*(1/255),D=_[O+2]*(1/255),Q=_[O+3]*(1/255);for(L=A;L.left;)L=N(L.est,U,H,D,Q)<=0?L.left:L.right;p[O>>2]=L.ind,w[O>>2]=L.est.rgba;}return {abuf:s.buffer,inds:p,plte:T}}function P(f,u,_){_==null&&(_=1e-4);let s=new Uint32Array(f.buffer),w={i0:0,i1:f.length,bst:null,est:null,tdst:0,left:null,right:null};w.bst=R(f,w.i0,w.i1),w.est=h(w.bst);let b=[w];for(;b.length<u;){let T=0,m=0;for(var A=0;A<b.length;A++)b[A].est.L>T&&(T=b[A].est.L,m=A);if(T<_)break;let p=b[m],L=k(f,s,p.i0,p.i1,p.est.e,p.est.eMq255);if(p.i0>=L||p.i1<=L){p.est.L=0;continue}let O={i0:p.i0,i1:L,bst:null,est:null,tdst:0,left:null,right:null};O.bst=R(f,O.i0,O.i1),O.est=h(O.bst);let U={i0:L,i1:p.i1,bst:null,est:null,tdst:0,left:null,right:null};for(U.bst={R:[],m:[],N:p.bst.N-O.bst.N},A=0;A<16;A++)U.bst.R[A]=p.bst.R[A]-O.bst.R[A];for(A=0;A<4;A++)U.bst.m[A]=p.bst.m[A]-O.bst.m[A];U.est=h(U.bst),p.left=O,p.right=U,b[m]=O,b.push(U);}for(b.sort(((T,m)=>m.bst.N-T.bst.N)),A=0;A<b.length;A++)b[A].ind=A;return [w,b]}function I(f,u,_,s,w){if(f.left==null)return f.tdst=(function(O,U,H,D,Q){let B=U-O[0],F=H-O[1],$=D-O[2],K=Q-O[3];return B*B+F*F+$*$+K*K})(f.est.q,u,_,s,w),f;let b=N(f.est,u,_,s,w),A=f.left,T=f.right;b>0&&(A=f.right,T=f.left);let m=I(A,u,_,s,w);if(m.tdst<=b*b)return m;let p=I(T,u,_,s,w);return p.tdst<m.tdst?p:m}function N(f,u,_,s,w){let{e:b}=f;return b[0]*u+b[1]*_+b[2]*s+b[3]*w-f.eMq}function k(f,u,_,s,w,b){for(s-=4;_<s;){for(;M(f,_,w)<=b;)_+=4;for(;M(f,s,w)>b;)s-=4;if(_>=s)break;let A=u[_>>2];u[_>>2]=u[s>>2],u[s>>2]=A,_+=4,s-=4;}for(;M(f,_,w)>b;)_-=4;return _+4}function M(f,u,_){return f[u]*_[0]+f[u+1]*_[1]+f[u+2]*_[2]+f[u+3]*_[3]}function R(f,u,_){let s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=[0,0,0,0],b=_-u>>2;for(let A=u;A<_;A+=4){let T=f[A]*.00392156862745098,m=f[A+1]*(1/255),p=f[A+2]*(1/255),L=f[A+3]*(1/255);w[0]+=T,w[1]+=m,w[2]+=p,w[3]+=L,s[0]+=T*T,s[1]+=T*m,s[2]+=T*p,s[3]+=T*L,s[5]+=m*m,s[6]+=m*p,s[7]+=m*L,s[10]+=p*p,s[11]+=p*L,s[15]+=L*L;}return s[4]=s[1],s[8]=s[2],s[9]=s[6],s[12]=s[3],s[13]=s[7],s[14]=s[11],{R:s,m:w,N:b}}function h(f){let{R:u}=f,{m:_}=f,{N:s}=f,w=_[0],b=_[1],A=_[2],T=_[3],m=s==0?0:1/s,p=[u[0]-w*w*m,u[1]-w*b*m,u[2]-w*A*m,u[3]-w*T*m,u[4]-b*w*m,u[5]-b*b*m,u[6]-b*A*m,u[7]-b*T*m,u[8]-A*w*m,u[9]-A*b*m,u[10]-A*A*m,u[11]-A*T*m,u[12]-T*w*m,u[13]-T*b*m,u[14]-T*A*m,u[15]-T*T*m],L=p,O=x,U=[Math.random(),Math.random(),Math.random(),Math.random()],H=0,D=0;if(s!=0)for(let B=0;B<16&&(U=O.multVec(L,U),D=Math.sqrt(O.dot(U,U)),U=O.sml(1/D,U),!(B!=0&&Math.abs(D-H)<1e-9));B++)H=D;let Q=[w*m,b*m,A*m,T*m];return {Cov:p,q:Q,e:U,L:H,eMq255:O.dot(O.sml(255,Q),U),eMq:O.dot(U,Q),rgba:(Math.round(255*Q[3])<<24|Math.round(255*Q[2])<<16|Math.round(255*Q[1])<<8|Math.round(255*Q[0])<<0)>>>0}}var x={multVec:(f,u)=>[f[0]*u[0]+f[1]*u[1]+f[2]*u[2]+f[3]*u[3],f[4]*u[0]+f[5]*u[1]+f[6]*u[2]+f[7]*u[3],f[8]*u[0]+f[9]*u[1]+f[10]*u[2]+f[11]*u[3],f[12]*u[0]+f[13]*u[1]+f[14]*u[2]+f[15]*u[3]],dot:(f,u)=>f[0]*u[0]+f[1]*u[1]+f[2]*u[2]+f[3]*u[3],sml:(f,u)=>[f*u[0],f*u[1],f*u[2],f*u[3]]};pe.encode=function(u,_,s,w,b,A,T){w==null&&(w=0),T==null&&(T=false);let m=r(u,_,s,w,[false,false,false,0,T,false]);return E(m,-1),y(m,_,s,b,A)},pe.encodeLL=function(u,_,s,w,b,A,T,m){let p={ctype:0+(w==1?0:2)+(b==0?0:4),depth:A,frames:[]},L=(w+b)*A,O=L*_;for(let U=0;U<u.length;U++)p.frames.push({rect:{x:0,y:0,width:_,height:s},img:new Uint8Array(u[U]),blend:0,dispose:1,bpp:Math.ceil(L/8),bpl:Math.ceil(O/8)});return E(p,0,true),y(p,_,s,T,m)},pe.encode.compress=r,pe.encode.dither=c,pe.quantize=C,pe.quantize.getKDtree=P,pe.quantize.getNearest=I;})();var It={toArrayBuffer(i,o){let S=i.width,l=i.height,e=S<<2,t=i.getContext("2d").getImageData(0,0,S,l),g=new Uint32Array(t.data.buffer),c=(32*S+31)/32<<2,y=c*l,E=122+y,r=new ArrayBuffer(E),a=new DataView(r),n=1<<20,d,v,C,P,I=n,N=0,k=0,M=0;function R(f){a.setUint16(k,f,true),k+=2;}function h(f){a.setUint32(k,f,true),k+=4;}function x(f){k+=f;}R(19778),h(E),x(4),h(122),h(108),h(S),h(-l>>>0),R(1),R(32),h(3),h(y),h(2835),h(2835),x(8),h(16711680),h(65280),h(255),h(4278190080),h(1466527264),(function f(){for(;N<l&&I>0;){for(P=122+N*c,d=0;d<e;)I--,v=g[M++],C=v>>>24,a.setUint32(P+d,v<<8|C),d+=4;N++;}M<g.length?(I=n,setTimeout(f,It._dly)):o(r);})();},toBlob(i,o){this.toArrayBuffer(i,(S=>{o(new Blob([S],{type:"image/bmp"}));}));},_dly:9},fe={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},xn={[fe.CHROME]:16384,[fe.FIREFOX]:11180,[fe.DESKTOP_SAFARI]:16384,[fe.IE]:8192,[fe.IOS]:4096,[fe.ETC]:8192},et=typeof globalThis.window<"u",Rt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,We=et&&globalThis.window.cordova&&globalThis.window.cordova.require&&globalThis.window.cordova.require("cordova/modulemapper"),On=(et||Rt)&&(We&&We.getOriginalSymbol(globalThis.window,"File")||typeof File<"u"&&File),Ct=(et||Rt)&&(We&&We.getOriginalSymbol(globalThis.window,"FileReader")||typeof globalThis.FileReader<"u"&&globalThis.FileReader);function tt(i,o,S=Date.now()){return new Promise((l=>{let e=i.split(","),t=e[0].match(/:(.*?);/)[1],g=globalThis.atob(e[1]),c=g.length,y=new Uint8Array(c);for(;c--;)y[c]=g.charCodeAt(c);let E=new Blob([y],{type:t});E.name=o,E.lastModified=S,l(E);}))}function xt(i){return new Promise(((o,S)=>{let l=new Ct;l.onload=()=>o(l.result),l.onerror=e=>S(e),l.readAsDataURL(i);}))}function Ot(i){return new Promise(((o,S)=>{let l=new globalThis.Image;l.onload=()=>o(l),l.onerror=e=>S(e),l.src=i;}))}function xe(){if(xe.cachedResult!==void 0)return xe.cachedResult;let i=fe.ETC,{userAgent:o}=navigator;return /Chrom(e|ium)/i.test(o)?i=fe.CHROME:/iP(ad|od|hone)/i.test(o)&&/WebKit/i.test(o)?i=fe.IOS:/Safari/i.test(o)?i=fe.DESKTOP_SAFARI:/Firefox/i.test(o)?i=fe.FIREFOX:(/MSIE/i.test(o)||globalThis.document.documentMode)&&(i=fe.IE),xe.cachedResult=i,xe.cachedResult}function Ut(i,o){let S=xe(),l=xn[S],e=i,t=o,g=e*t,c=e>t?t/e:e/t;for(;g>l*l;){let y=(l+e)/2,E=(l+t)/2;y<E?(t=E,e=E*c):(t=y*c,e=y),g=e*t;}return {width:e,height:t}}function Ve(i,o){let S,l;try{if(S=new OffscreenCanvas(i,o),l=S.getContext("2d"),l===null)throw new Error("getContext of OffscreenCanvas returns null")}catch{S=globalThis.document.createElement("canvas"),l=S.getContext("2d");}return S.width=i,S.height=o,[S,l]}function Pt(i,o){let{width:S,height:l}=Ut(i.width,i.height),[e,t]=Ve(S,l);return o&&/jpe?g/.test(o)&&(t.fillStyle="white",t.fillRect(0,0,e.width,e.height)),t.drawImage(i,0,0,e.width,e.height),e}function Qe(){return Qe.cachedResult!==void 0||(Qe.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&typeof globalThis.document<"u"&&"ontouchend"in globalThis.document),Qe.cachedResult}function ze(i,o={}){return new Promise((function(S,l){let e,t;var g=function(){try{return t=Pt(e,o.fileType||i.type),S([e,t])}catch(y){return l(y)}},c=function(y){try{var E=function(r){try{throw r}catch(a){return l(a)}};try{let r;return xt(i).then((function(a){try{return r=a,Ot(r).then((function(n){try{return e=n,(function(){try{return g()}catch(d){return l(d)}})()}catch(d){return E(d)}}),E)}catch(n){return E(n)}}),E)}catch(r){E(r);}}catch(r){return l(r)}};try{if(Qe()||[fe.DESKTOP_SAFARI,fe.MOBILE_SAFARI].includes(xe()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(i).then((function(y){try{return e=y,g()}catch{return c()}}),c)}catch{c();}}))}function Ge(i,o,S,l,e=1){return new Promise((function(t,g){let c;if(o==="image/png"){let a,n,d;return a=i.getContext("2d"),{data:n}=a.getImageData(0,0,i.width,i.height),d=pe.encode([n.buffer],i.width,i.height,4096*e),c=new Blob([d],{type:o}),c.name=S,c.lastModified=l,y.call(this)}{let a=function(){return y.call(this)};if(o==="image/bmp")return new Promise((n=>It.toBlob(i,n))).then(function(n){try{return c=n,c.name=S,c.lastModified=l,a.call(this)}catch(d){return g(d)}}.bind(this),g);{let n=function(){return a.call(this)};if(typeof OffscreenCanvas=="function"&&i instanceof OffscreenCanvas)return i.convertToBlob({type:o,quality:e}).then(function(d){try{return c=d,c.name=S,c.lastModified=l,n.call(this)}catch(v){return g(v)}}.bind(this),g);{let d;return d=i.toDataURL(o,e),tt(d,S,l).then(function(v){try{return c=v,n.call(this)}catch(C){return g(C)}}.bind(this),g)}}}function y(){return t(c)}}))}function ye(i){i.width=0,i.height=0;}function Pe(){return new Promise((function(i,o){let l,e,t,g;return Pe.cachedResult!==void 0?i(Pe.cachedResult):(tt("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then((function(c){try{return l=c,ze(l).then((function(y){try{return e=y[1],Ge(e,l.type,l.name,l.lastModified).then((function(E){try{return t=E,ye(e),ze(t).then((function(r){try{return g=r[0],Pe.cachedResult=g.width===1&&g.height===2,i(Pe.cachedResult)}catch(a){return o(a)}}),o)}catch(r){return o(r)}}),o)}catch(E){return o(E)}}),o)}catch(y){return o(y)}}),o))}))}function Mt(i){return new Promise(((o,S)=>{let l=new Ct;l.onload=e=>{let t=new DataView(e.target.result);if(t.getUint16(0,false)!=65496)return o(-2);let g=t.byteLength,c=2;for(;c<g;){if(t.getUint16(c+2,false)<=8)return o(-1);let y=t.getUint16(c,false);if(c+=2,y==65505){if(t.getUint32(c+=2,false)!=1165519206)return o(-1);let E=t.getUint16(c+=6,false)==18761;c+=t.getUint32(c+4,E);let r=t.getUint16(c,E);c+=2;for(let a=0;a<r;a++)if(t.getUint16(c+12*a,E)==274)return o(t.getUint16(c+12*a+8,E))}else {if((65280&y)!=65280)break;c+=t.getUint16(c,false);}}return o(-1)},l.onerror=e=>S(e),l.readAsArrayBuffer(i);}))}function Lt(i,o){let{width:S}=i,{height:l}=i,{maxWidthOrHeight:e}=o,t,g=i;return isFinite(e)&&(S>e||l>e)&&([g,t]=Ve(S,l),S>l?(g.width=e,g.height=l/S*e):(g.width=S/l*e,g.height=e),t.drawImage(i,0,0,g.width,g.height),ye(i)),g}function Dt(i,o){let{width:S}=i,{height:l}=i,[e,t]=Ve(S,l);switch(o>4&&o<9?(e.width=l,e.height=S):(e.width=S,e.height=l),o){case 2:t.transform(-1,0,0,1,S,0);break;case 3:t.transform(-1,0,0,-1,S,l);break;case 4:t.transform(1,0,0,-1,0,l);break;case 5:t.transform(0,1,1,0,0,0);break;case 6:t.transform(0,1,-1,0,l,0);break;case 7:t.transform(0,-1,-1,0,l,S);break;case 8:t.transform(0,-1,1,0,0,S);}return t.drawImage(i,0,0,S,l),ye(i),e}function St(i,o,S=0){return new Promise((function(l,e){let t,g,c,y,E,r,a,n,d,v,C,P,I,N,k,M,R,h,x,f;function u(s=5){if(o.signal&&o.signal.aborted)throw o.signal.reason;t+=s,o.onProgress(Math.min(t,100));}function _(s){if(o.signal&&o.signal.aborted)throw o.signal.reason;t=Math.min(Math.max(s,t),100),o.onProgress(t);}return t=S,g=o.maxIteration||10,c=1024*o.maxSizeMB*1024,u(),ze(i,o).then(function(s){try{return [,y]=s,u(),E=Lt(y,o),u(),new Promise((function(w,b){var A;if(!(A=o.exifOrientation))return Mt(i).then(function(m){try{return A=m,T.call(this)}catch(p){return b(p)}}.bind(this),b);function T(){return w(A)}return T.call(this)})).then(function(w){try{return r=w,u(),Pe().then(function(b){try{return a=b?E:Dt(E,r),u(),n=o.initialQuality||1,d=o.fileType||i.type,Ge(a,d,i.name,i.lastModified,n).then(function(A){try{{let L=function(){if(g--&&(k>c||k>I)){let U,H;return U=f?.95*x.width:x.width,H=f?.95*x.height:x.height,[R,h]=Ve(U,H),h.drawImage(x,0,0,U,H),n*=d==="image/png"?.85:.95,Ge(R,d,i.name,i.lastModified,n).then((function(D){try{return M=D,ye(x),x=R,k=M.size,_(Math.min(99,Math.floor((N-k)/(N-c)*100))),L}catch(Q){return e(Q)}}),e)}return [1]},O=function(){return ye(x),ye(R),ye(E),ye(a),ye(y),_(100),l(M)};var m=L,p=O;if(v=A,u(),C=v.size>c,P=v.size>i.size,!C&&!P)return _(100),l(v);var T;return I=i.size,N=v.size,k=N,x=a,f=!o.alwaysKeepResolution&&C,(T=function(U){for(;U;){if(U.then)return void U.then(T,e);try{if(U.pop){if(U.length)return U.pop()?O.call(this):U;U=L;}else U=U.call(this);}catch(H){return e(H)}}}.bind(this))(L)}}catch(L){return e(L)}}.bind(this),e)}catch(A){return e(A)}}.bind(this),e)}catch(b){return e(b)}}.bind(this),e)}catch(w){return e(w)}}.bind(this),e)}))}var Un=`
6
6
  let scriptImported = false
7
7
  self.addEventListener('message', async (e) => {
8
8
  const { file, id, imageCompressionLibUrl, options } = e.data
@@ -21,7 +21,7 @@ self.addEventListener('message', async (e) => {
21
21
  self.postMessage({ error: e.message + '\\n' + e.stack, id })
22
22
  }
23
23
  })
24
- `,je;function Pn(i,r){return new Promise(((S,c)=>{je||(je=(function(g){let l=[];return l.push(g),URL.createObjectURL(new Blob(l))})(Un));let e=new Worker(je);e.addEventListener("message",(function(g){if(r.signal&&r.signal.aborted)e.terminate();else if(g.data.progress===void 0){if(g.data.error)return c(new Error(g.data.error)),void e.terminate();S(g.data.file),e.terminate();}else r.onProgress(g.data.progress);})),e.addEventListener("error",c),r.signal&&r.signal.addEventListener("abort",(()=>{c(r.signal.reason),e.terminate();})),e.postMessage({file:i,imageCompressionLibUrl:r.libURL,options:{...r,onProgress:void 0,signal:void 0}});}))}function re(i,r){return new Promise((function(S,c){let e,t,g,l,y,E;if(e={...r},g=0,{onProgress:l}=e,e.maxSizeMB=e.maxSizeMB||Number.POSITIVE_INFINITY,y=typeof e.useWebWorker!="boolean"||e.useWebWorker,delete e.useWebWorker,e.onProgress=d=>{g=d,typeof l=="function"&&l(g);},!(i instanceof Blob||i instanceof On))return c(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(i.type))return c(new Error("The file given is not an image"));if(E=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!y||typeof Worker!="function"||E)return St(i,e).then(function(d){try{return t=d,n.call(this)}catch(v){return c(v)}}.bind(this),c);var o=function(){try{return n.call(this)}catch(d){return c(d)}}.bind(this),a=function(d){try{return St(i,e).then((function(v){try{return t=v,o()}catch(C){return c(C)}}),c)}catch(v){return c(v)}};try{return e.libURL=e.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",Pn(i,e).then((function(d){try{return t=d,o()}catch{return a()}}),a)}catch{a();}function n(){try{t.name=i.name,t.lastModified=i.lastModified;}catch{}try{e.preserveExif&&i.type==="image/jpeg"&&(!e.fileType||e.fileType&&e.fileType===i.type)&&(t=Tt(i,t));}catch{}return S(t)}}))}re.getDataUrlFromFile=xt,re.getFilefromDataUrl=tt,re.loadImage=Ot,re.drawImageInCanvas=Pt,re.drawFileInCanvas=ze,re.canvasToFile=Ge,re.getExifOrientation=Mt,re.handleMaxWidthOrHeight=Lt,re.followExifOrientation=Dt,re.cleanupCanvasMemory=ye,re.isAutoOrientationInBrowser=Pe,re.approximateBelowMaximumCanvasSizeOfBrowser=Ut,re.copyExifWithoutOrientation=Tt,re.getBrowserName=xe,re.version="2.0.2";var gn=Et(Ft()),mn=Et(on());function cr(i){let r=globalThis.document.getElementById("__AUTH_DRAWER"),S=globalThis.document.querySelector(".__drawer_container"),c=globalThis.document.querySelector(".__auth_close_button");r&&c&&S?.classList.contains("__hidden")&&(S.classList.remove("__hidden"),r.src=i,r.onload=()=>{c.classList.remove("__hidden"),r.classList.remove("__hidden"),r.contentWindow?.focus();});}function an(){if(globalThis.document.getElementById("__AUTH_DRAWER"))return;let i=globalThis.document.createElement("style");i.innerHTML=`
24
+ `,je;function Pn(i,o){return new Promise(((S,l)=>{je||(je=(function(g){let c=[];return c.push(g),URL.createObjectURL(new Blob(c))})(Un));let e=new Worker(je);e.addEventListener("message",(function(g){if(o.signal&&o.signal.aborted)e.terminate();else if(g.data.progress===void 0){if(g.data.error)return l(new Error(g.data.error)),void e.terminate();S(g.data.file),e.terminate();}else o.onProgress(g.data.progress);})),e.addEventListener("error",l),o.signal&&o.signal.addEventListener("abort",(()=>{l(o.signal.reason),e.terminate();})),e.postMessage({file:i,imageCompressionLibUrl:o.libURL,options:{...o,onProgress:void 0,signal:void 0}});}))}function re(i,o){return new Promise((function(S,l){let e,t,g,c,y,E;if(e={...o},g=0,{onProgress:c}=e,e.maxSizeMB=e.maxSizeMB||Number.POSITIVE_INFINITY,y=typeof e.useWebWorker!="boolean"||e.useWebWorker,delete e.useWebWorker,e.onProgress=d=>{g=d,typeof c=="function"&&c(g);},!(i instanceof Blob||i instanceof On))return l(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(i.type))return l(new Error("The file given is not an image"));if(E=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!y||typeof Worker!="function"||E)return St(i,e).then(function(d){try{return t=d,n.call(this)}catch(v){return l(v)}}.bind(this),l);var r=function(){try{return n.call(this)}catch(d){return l(d)}}.bind(this),a=function(d){try{return St(i,e).then((function(v){try{return t=v,r()}catch(C){return l(C)}}),l)}catch(v){return l(v)}};try{return e.libURL=e.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",Pn(i,e).then((function(d){try{return t=d,r()}catch{return a()}}),a)}catch{a();}function n(){try{t.name=i.name,t.lastModified=i.lastModified;}catch{}try{e.preserveExif&&i.type==="image/jpeg"&&(!e.fileType||e.fileType&&e.fileType===i.type)&&(t=Tt(i,t));}catch{}return S(t)}}))}re.getDataUrlFromFile=xt,re.getFilefromDataUrl=tt,re.loadImage=Ot,re.drawImageInCanvas=Pt,re.drawFileInCanvas=ze,re.canvasToFile=Ge,re.getExifOrientation=Mt,re.handleMaxWidthOrHeight=Lt,re.followExifOrientation=Dt,re.cleanupCanvasMemory=ye,re.isAutoOrientationInBrowser=Pe,re.approximateBelowMaximumCanvasSizeOfBrowser=Ut,re.copyExifWithoutOrientation=Tt,re.getBrowserName=xe,re.version="2.0.2";var gn=Et(Ft()),mn=Et(on());function lr(i){let o=globalThis.document.getElementById("__AUTH_DRAWER"),S=globalThis.document.querySelector(".__drawer_container"),l=globalThis.document.querySelector(".__auth_close_button");o&&l&&S?.classList.contains("__hidden")&&(S.classList.remove("__hidden"),o.src=i,o.onload=()=>{l.classList.remove("__hidden"),o.classList.remove("__hidden"),o.contentWindow?.focus();});}function an(){if(globalThis.document.getElementById("__AUTH_DRAWER"))return;let i=globalThis.document.createElement("style");i.innerHTML=`
25
25
  .__button_container * {
26
26
  font-family: -apple-system,
27
27
  BlinkMacSystemFont,
@@ -226,8 +226,8 @@ self.addEventListener('message', async (e) => {
226
226
  max-width: 100%;
227
227
  }
228
228
  }
229
- `,globalThis.document.head.appendChild(i);let r=globalThis.document.createElement("div");r.className="__drawer_container __hidden";let S=globalThis.document.createElement("iframe");S.className="__drawer_frame __hidden",S.id="__AUTH_DRAWER",S.setAttribute("allow","fullscreen; camera; microphone; gyroscope; accelerometer; clipboard-write; clipboard-read; autoplay; geolocation; display-capture; picture-in-picture; payment; midi; bluetooth; web-share; screen-wake-lock; xr-spatial-tracking; encrypted-media; idle-detection; hid; serial; window-management"),S.loading="eager",S.referrerPolicy="unsafe-url",S.title="Login";let c=globalThis.document.createElement("div");c.setAttribute("alt","Close"),c.className="__auth_close_button",r.appendChild(S),r.appendChild(c),globalThis.document.body.appendChild(r);let e=globalThis.document.querySelector(".__auth_close_button"),t=new Map;function g(){r.classList.add("__hidden"),S.classList.add("__hidden"),t.forEach(({popup:y,cleanup:E})=>{E();try{y?.close();}catch{}});}let l=globalThis.document.createElement("iframe");l.style.display="none",l.id="__CONNECT_LISTENER",l.src=`${globalThis.window.__ROOT_URL__}/connect-listener`,globalThis.document.body.appendChild(l),globalThis.window.__REQUEST_CONNECTION__=y=>{let{connectId:E,provider:o,scope:a,mode:n,appId:d}=y,v=new URL("/connect",globalThis.window.__ROOT_URL__);v.searchParams.set("connectId",E),v.searchParams.set("provider",o),a&&v.searchParams.set("scope",a),n&&v.searchParams.set("mode",n),d&&v.searchParams.set("appId",d);let C=Math.min(720,Math.floor(globalThis.window.screen.availWidth*.9)),M=Math.min(800,Math.floor(globalThis.window.screen.availHeight*.9)),I=Math.floor(globalThis.window.screenX+(globalThis.window.outerWidth-C)/2),B=Math.floor(globalThis.window.screenY+(globalThis.window.outerHeight-M)/2),k=`popup=yes,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=${C},height=${M},left=${I},top=${B}`,P=globalThis.window.open(v.toString(),`ac1_connect_${E}`,k);return P?new Promise(R=>{let p=()=>{globalThis.window.removeEventListener("message",O),globalThis.window.clearInterval(f),t.delete(E);},O=u=>{let _=u.data||{};if(_.type==="connect:result"&&_.connectId===E){p();try{P?.close();}catch{}_.status==="error"?R({status:"error",connectId:E,error:_.error,errorDescription:_.errorDescription}):R({status:"connected",connectId:E,connections:_.connections??[]});}},f=globalThis.window.setInterval(()=>{P?.closed&&(p(),R({status:"error",connectId:E,error:"popup_closed",errorDescription:"The connect window was closed before finishing."}));},250);t.set(E,{popup:P,cleanup:p}),globalThis.window.addEventListener("message",O);}):Promise.resolve({status:"error",connectId:E,error:"popup_blocked",errorDescription:"Popup was blocked by the browser."})},globalThis.window.addEventListener("message",y=>{!y.data||typeof y.data!="object"||y.data.type==="closeAuthDrawer"&&g();}),e?.addEventListener("click",g),r.addEventListener("click",y=>{y.target===r&&g();});}var mt=i=>{let{email:r,phoneNumber:S}=i??{},c=r??S,e=new URLSearchParams;i&&"redirectUri"in i&&i.redirectUri?e.set("returnTo",i.redirectUri):e.set("returnTo",globalThis.window.location.pathname+globalThis.window.location.search),c&&e.set("identity",c),e.set("stripped","true");let t=globalThis.window.__APP_ID__;cr(`${globalThis.window.__ROOT_URL__}/setup/${t}?${e.toString()}`);};function ur(i={}){let[r,S]=useState({userId:void 0,status:"loading",signIn:mt,providers:[]});return useEffect(()=>{(async()=>{try{let t=await(await fetch("/api/session",{method:"POST",headers:{"Content-Type":"application/json","x-guest-api-internal":"session",...globalThis.window.__IS_TESTING__?{"x-is-testing":"true"}:{}}})).json()??{};S({userId:t.userId??null,status:"authenticated",signIn:mt,providers:t?.providers??[]});}catch{if(i.required){let t=encodeURIComponent(globalThis.window.location.pathname+globalThis.window.location.search),g=globalThis.window.__APP_ID__;globalThis.window.top?globalThis.window.top.location.href=`${globalThis.window.__ROOT_URL__}/setup/${g}?returnTo=${t}`:globalThis.window.location.href=`${globalThis.window.__ROOT_URL__}/setup/${g}?returnTo=${t}`;}else S({userId:null,status:"unauthenticated",signIn:mt,providers:[]});}})();},[i.required]),r}async function fr(i){let r=`c_${Math.random().toString(36).slice(2)}_${Date.now()}`;return await globalThis.window.__REQUEST_CONNECTION__({connectId:r,provider:i.provider,scope:i.scope?.join(","),mode:i.mode??"get_or_request",appId:globalThis.window.__APP_ID__})}async function ln({channelId:i,initialData:r,broadcastOnly:S,onUpdate:c}){let e=r,t=0,g=globalThis.window.__REALTIME_DOMAIN__;if(S)return {getData(){return e},setData(y){e=y,fetch(`https://${g}/${i}`,{method:"POST",body:yt.stringify(e)}).catch(console.error),c?.(y);},destroy(){}};let l=new WebSocket(`wss://${g}/${i}`);return new Promise((y,E)=>{function o(v){try{let C=JSON.parse(v.data.toString());C?.id&&C.id>t?(e=yt.parse(C.payload),c?.(e),t=C.id):console.error("Invalid message:",v.data);}catch{console.error("Error parsing message:",v.data);}}function a(v){d(),E(v);}function n(){y({getData(){return e},setData(v){e=v,c?.(v),l.send(yt.stringify(v));},destroy:d});}function d(){l.removeEventListener("message",o),l.removeEventListener("error",a),l.removeEventListener("open",n),l.close();}l.addEventListener("message",o),l.addEventListener("error",a),l.addEventListener("open",n);})}function cn(i,r){let S=useRef(null),[c,e]=useState(0);return useEffect(()=>((async()=>i&&(S.current=await ln({channelId:i,initialData:r,onUpdate:()=>{e(t=>t+1);}})))(),S.current?.destroy),[i,e]),[S.current?.getData(),S.current?.setData??identity]}function wr(i){let[r,S]=useState(null),[c]=cn(r,void 0),e=i.mutationFn;if(!e)throw new Error("useRealtimeMutation requires a mutationFn option.");let t=useCallback(async l=>{let y=nanoid(32);return S(y),await e({...l,__channelId:y})},[i?.mutationFn]);return {...useMutation({...i,mutationFn:t}),data:c}}function un(i){return i?.message?.startsWith("__MISSING AUTH FOR SCOPE")}function hn(i){return i[0]}function _r(i){let S=i?.message?.slice("__MISSING AUTH FOR SCOPE:".length+1).trim()??"",c=JSON.parse(atob(S.split(" ")?.[0])),e=c?.provider,t=c?.scope;return {provider:e,scope:t,isPopup:i?.message?.endsWith("--popup"),accountId:c?.accountId}}var br=60,Er=30*1e3,wt=0,pn=Date.now(),At=false;function Sr(){return rpcClient({transport:async(i,r)=>{let S=Date.now();if(S-pn>=Er)pn=S,wt=0,At=false;else if(wt>=br)throw At||(globalThis.window.dispatchEvent(new Event("rate-limit-exceeded")),At=true),new RpcError("Rate limit exceeded",-32e3,{status:429});wt++;let c="/api/"+i.method,e=i.params&&hn(i.params)?.__channelId;e&&delete hn(i.params)?.__channelId;let t=await fetch(c,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...e?{"x-channel-id":e}:{},...globalThis.window.__IS_TESTING__?{"x-is-testing":"true"}:{},"x-boxman-box-id":globalThis.window.__BOX_ID__},body:yt.stringify(i),signal:r});if(!t.ok){let l=t.statusText,y=-32e3;try{let{message:E,code:o}=await t.json();E&&(l=E),o&&(y=o);}catch{}throw l.trim()===""&&(l=`Request failed with status: ${t.status}`),new RpcError(l,y,{status:t.status})}let g=yt.deserialize(await t.json());if(un(g.error)){let l=encodeURIComponent(globalThis.window.location.pathname+globalThis.window.location.search),y=_r(g.error),E=[`returnTo=${l}`,y.provider?`&provider=${y.provider}`:"",y.scope?`&scope=${y.scope.join(",")}`:"",y.accountId?`&accountId=${y.accountId}`:""].filter(Boolean).join("&");if(y.isPopup){globalThis.window.__OPEN_AUTH_DRAWER__(`${globalThis.window.__ROOT_URL__}/setup/${globalThis.window.__APP_ID__}?${E}&stripped=true`);return}let o=globalThis.window.top??globalThis.window;return o.location.href=`${globalThis.window.__ROOT_URL__}/setup/${globalThis.window.__APP_ID__}?${E}`,null}return g}})}function Xr(i){return new Promise(r=>{let S=new globalThis.FileReader;S.onload=()=>{r(S.result);},S.readAsDataURL(i);})}function Tr(){let i={...globalThis.window.console};function r(S,c){let e=(0, mn.default)(c,{depth:5,maxStringLength:512,indent:2});fetch("/_logger",{method:"POST",body:`[console.${S.toLowerCase()}] ${e}`}).catch(()=>{});}globalThis.window.console.log=(...S)=>{r("LOG",S),i.log(...S);},globalThis.window.console.error=(...S)=>{r("ERROR",S),i.error(...S);},globalThis.window.console.info=(...S)=>{r("INFO",S),i.info(...S);},globalThis.window.console.warn=(...S)=>{r("WARN",S),i.warn(...S);};}function Ir(){function i(r,S=globalThis.window.parent,c="*"){S?.postMessage({...r,source:"iframe"},{targetOrigin:c});}globalThis.window.addEventListener("message",async r=>{let{origin:S,source:c,data:e}=r,{type:t}=e;if(t==="screenshot"){let g=globalThis.window.getComputedStyle(globalThis.document.body).backgroundColor,l=await gn.default.toPng(globalThis.document.body,{bgcolor:g,style:{transform:"translateY("+-globalThis.window.scrollY+"px)"},width:globalThis.window.innerWidth,height:globalThis.window.innerHeight,copyDefaultStyles:false}),y=await fetch(l).then(n=>n.blob()),E=await re(y,{maxSizeMB:4,maxWidthOrHeight:1920,useWebWorker:false}),a={type:"screenshot",payload:{screenshot:await re.getDataUrlFromFile(E)}};i(a,c,S);}});}function Yr({appId:i,rootUrl:r,baseUrl:S,isTesting:c,realtimeDomain:e,boxId:t}){typeof globalThis.window>"u"||globalThis.window.__APP_ID__||(globalThis.window.__APP_ID__=i,globalThis.window.__ROOT_URL__=r,globalThis.window.__BASE_URL__=S,globalThis.window.__IS_TESTING__=c,globalThis.window.__REALTIME_DOMAIN__=e,globalThis.window.__BOX_ID__=t,Ir(),Tr(),an(),globalThis.window.onerror=function(g){console.error("Global JS error:",g);},globalThis.window.onunhandledrejection=function(g){console.error("Unhandled promise rejection:",g.reason);});}function Jr(){return globalThis.window.__BASE_URL__}/*! Bundled license information:
229
+ `,globalThis.document.head.appendChild(i);let o=globalThis.document.createElement("div");o.className="__drawer_container __hidden";let S=globalThis.document.createElement("iframe");S.className="__drawer_frame __hidden",S.id="__AUTH_DRAWER",S.setAttribute("allow","fullscreen; camera; microphone; gyroscope; accelerometer; clipboard-write; clipboard-read; autoplay; geolocation; display-capture; picture-in-picture; payment; midi; bluetooth; web-share; screen-wake-lock; xr-spatial-tracking; encrypted-media; idle-detection; hid; serial; window-management"),S.loading="eager",S.referrerPolicy="unsafe-url",S.title="Login";let l=globalThis.document.createElement("div");l.setAttribute("alt","Close"),l.className="__auth_close_button",o.appendChild(S),o.appendChild(l),globalThis.document.body.appendChild(o);let e=globalThis.document.querySelector(".__auth_close_button"),t=new Map;function g(){o.classList.add("__hidden"),S.classList.add("__hidden"),t.forEach(({popup:E,cleanup:r})=>{r();try{E?.close();}catch{}});}let c=globalThis.document.createElement("iframe");c.style.display="none",c.id="__CONNECT_LISTENER",c.src=`${globalThis.window.__ROOT_URL__}/connect-listener`,globalThis.document.body.appendChild(c);let y=new Promise(E=>{globalThis.window.addEventListener("message",r=>{r.data?.type==="connect-listener:ready"&&(console.log("connect listener ready"),E());});});globalThis.window.__REQUEST_CONNECTION__=async E=>{let{connectId:r,provider:a,scope:n,mode:d,appId:v}=E;if(d!=="request_only"){await y;let h=await new Promise(x=>{let f=setTimeout(()=>{globalThis.window.removeEventListener("message",u),x({connections:[]});},3e3),u=_=>{let s=_.data;s?.type!=="connect:check:result"||s?.connectId!==r||(clearTimeout(f),globalThis.window.removeEventListener("message",u),x({connections:s.connections??[]}));};globalThis.window.addEventListener("message",u),c.contentWindow?.postMessage({type:"connect:check",connectId:r,provider:a,scope:n,appId:v},"*");});if(h.connections.length>0)return {status:"connected",connectId:r,connections:h.connections};if(d==="check_only")return {status:"error",connectId:r,error:"no_connections",errorDescription:"No existing connections found."}}let C=new URL("/connect",globalThis.window.__ROOT_URL__);C.searchParams.set("connectId",r),C.searchParams.set("provider",a),n&&C.searchParams.set("scope",n),d&&C.searchParams.set("mode",d),v&&C.searchParams.set("appId",v);let P=Math.min(720,Math.floor(globalThis.window.screen.availWidth*.9)),I=Math.min(800,Math.floor(globalThis.window.screen.availHeight*.9)),N=Math.floor(globalThis.window.screenX+(globalThis.window.outerWidth-P)/2),k=Math.floor(globalThis.window.screenY+(globalThis.window.outerHeight-I)/2),M=`popup=yes,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=${P},height=${I},left=${N},top=${k}`,R=d!=="check_only"?globalThis.window.open(C.toString(),`ac1_connect_${r}`,M):null;return new Promise(h=>{let x=()=>{globalThis.window.removeEventListener("message",f),globalThis.window.clearInterval(u),t.delete(r);},f=_=>{let s=_.data||{};if(s.type==="connect:result"&&s.connectId===r){x();try{R?.close();}catch{}s.status==="error"?h({status:"error",connectId:r,error:s.error,errorDescription:s.errorDescription}):h({status:"connected",connectId:r,connections:s.connections??[]});}},u=globalThis.window.setInterval(()=>{R?.closed&&(x(),h({status:"error",connectId:r,error:"popup_closed",errorDescription:"The connect window was closed before finishing."}));},250);t.set(r,{popup:R,cleanup:x}),globalThis.window.addEventListener("message",f);})},globalThis.window.addEventListener("message",E=>{!E.data||typeof E.data!="object"||E.data.type==="closeAuthDrawer"&&g();}),e?.addEventListener("click",g),o.addEventListener("click",E=>{E.target===o&&g();});}var mt=i=>{let{email:o,phoneNumber:S}=i??{},l=o??S,e=new URLSearchParams;i&&"redirectUri"in i&&i.redirectUri?e.set("returnTo",i.redirectUri):e.set("returnTo",globalThis.window.location.pathname+globalThis.window.location.search),l&&e.set("identity",l),e.set("stripped","true");let t=globalThis.window.__APP_ID__;lr(`${globalThis.window.__ROOT_URL__}/setup/${t}?${e.toString()}`);};function ur(i={}){let[o,S]=useState({userId:void 0,status:"loading",signIn:mt,providers:[]});return useEffect(()=>{(async()=>{try{let t=await(await fetch("/api/session",{method:"POST",headers:{"Content-Type":"application/json","x-guest-api-internal":"session",...globalThis.window.__IS_TESTING__?{"x-is-testing":"true"}:{}}})).json()??{};S({userId:t.userId??null,status:"authenticated",signIn:mt,providers:t?.providers??[]});}catch{if(i.required){let t=encodeURIComponent(globalThis.window.location.pathname+globalThis.window.location.search),g=globalThis.window.__APP_ID__;globalThis.window.top?globalThis.window.top.location.href=`${globalThis.window.__ROOT_URL__}/setup/${g}?returnTo=${t}`:globalThis.window.location.href=`${globalThis.window.__ROOT_URL__}/setup/${g}?returnTo=${t}`;}else S({userId:null,status:"unauthenticated",signIn:mt,providers:[]});}})();},[i.required]),o}async function fr(i){let o=`c_${Math.random().toString(36).slice(2)}_${Date.now()}`;return await globalThis.window.__REQUEST_CONNECTION__({connectId:o,provider:i.provider,scope:i.scope?.join(","),mode:i.mode??"get_or_request",appId:globalThis.window.__APP_ID__})}async function cn({channelId:i,initialData:o,broadcastOnly:S,onUpdate:l}){let e=o,t=0,g=globalThis.window.__REALTIME_DOMAIN__;if(S)return {getData(){return e},setData(y){e=y,fetch(`https://${g}/${i}`,{method:"POST",body:yt.stringify(e)}).catch(console.error),l?.(y);},destroy(){}};let c=new WebSocket(`wss://${g}/${i}`);return new Promise((y,E)=>{function r(v){try{let C=JSON.parse(v.data.toString());C?.id&&C.id>t?(e=yt.parse(C.payload),l?.(e),t=C.id):console.error("Invalid message:",v.data);}catch{console.error("Error parsing message:",v.data);}}function a(v){d(),E(v);}function n(){y({getData(){return e},setData(v){e=v,l?.(v),c.send(yt.stringify(v));},destroy:d});}function d(){c.removeEventListener("message",r),c.removeEventListener("error",a),c.removeEventListener("open",n),c.close();}c.addEventListener("message",r),c.addEventListener("error",a),c.addEventListener("open",n);})}function ln(i,o){let S=useRef(null),[l,e]=useState(0);return useEffect(()=>((async()=>i&&(S.current=await cn({channelId:i,initialData:o,onUpdate:()=>{e(t=>t+1);}})))(),S.current?.destroy),[i,e]),[S.current?.getData(),S.current?.setData??identity]}function wr(i){let[o,S]=useState(null),[l]=ln(o,void 0),e=i.mutationFn;if(!e)throw new Error("useRealtimeMutation requires a mutationFn option.");let t=useCallback(async c=>{let y=nanoid(32);return S(y),await e({...c,__channelId:y})},[i?.mutationFn]);return {...useMutation({...i,mutationFn:t}),data:l}}function un(i){return i?.message?.startsWith("__MISSING AUTH FOR SCOPE")}function hn(i){return i[0]}function _r(i){let S=i?.message?.slice("__MISSING AUTH FOR SCOPE:".length+1).trim()??"",l=JSON.parse(atob(S.split(" ")?.[0])),e=l?.provider,t=l?.scope;return {provider:e,scope:t,isPopup:i?.message?.endsWith("--popup"),accountId:l?.accountId}}var br=60,Er=30*1e3,wt=0,pn=Date.now(),At=false;function Sr(){return rpcClient({transport:async(i,o)=>{let S=Date.now();if(S-pn>=Er)pn=S,wt=0,At=false;else if(wt>=br)throw At||(globalThis.window.dispatchEvent(new Event("rate-limit-exceeded")),At=true),new RpcError("Rate limit exceeded",-32e3,{status:429});wt++;let l="/api/"+i.method,e=i.params&&hn(i.params)?.__channelId;e&&delete hn(i.params)?.__channelId;let t=await fetch(l,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...e?{"x-channel-id":e}:{},...globalThis.window.__IS_TESTING__?{"x-is-testing":"true"}:{},"x-boxman-box-id":globalThis.window.__BOX_ID__},body:yt.stringify(i),signal:o});if(!t.ok){let c=t.statusText,y=-32e3;try{let{message:E,code:r}=await t.json();E&&(c=E),r&&(y=r);}catch{}throw c.trim()===""&&(c=`Request failed with status: ${t.status}`),new RpcError(c,y,{status:t.status})}let g=yt.deserialize(await t.json());if(un(g.error)){let c=encodeURIComponent(globalThis.window.location.pathname+globalThis.window.location.search),y=_r(g.error),E=[`returnTo=${c}`,y.provider?`&provider=${y.provider}`:"",y.scope?`&scope=${y.scope.join(",")}`:"",y.accountId?`&accountId=${y.accountId}`:""].filter(Boolean).join("&");if(y.isPopup){globalThis.window.__OPEN_AUTH_DRAWER__(`${globalThis.window.__ROOT_URL__}/setup/${globalThis.window.__APP_ID__}?${E}&stripped=true`);return}let r=globalThis.window.top??globalThis.window;return r.location.href=`${globalThis.window.__ROOT_URL__}/setup/${globalThis.window.__APP_ID__}?${E}`,null}return g}})}function Xr(i){return new Promise(o=>{let S=new globalThis.FileReader;S.onload=()=>{o(S.result);},S.readAsDataURL(i);})}function Tr(){let i={...globalThis.window.console};function o(S,l){let e=(0, mn.default)(l,{depth:5,maxStringLength:512,indent:2});fetch("/_logger",{method:"POST",body:`[console.${S.toLowerCase()}] ${e}`}).catch(()=>{});}globalThis.window.console.log=(...S)=>{o("LOG",S),i.log(...S);},globalThis.window.console.error=(...S)=>{o("ERROR",S),i.error(...S);},globalThis.window.console.info=(...S)=>{o("INFO",S),i.info(...S);},globalThis.window.console.warn=(...S)=>{o("WARN",S),i.warn(...S);};}function Ir(){function i(o,S=globalThis.window.parent,l="*"){S?.postMessage({...o,source:"iframe"},{targetOrigin:l});}globalThis.window.addEventListener("message",async o=>{let{origin:S,source:l,data:e}=o,{type:t}=e;if(t==="screenshot"){let g=globalThis.window.getComputedStyle(globalThis.document.body).backgroundColor,c=await gn.default.toPng(globalThis.document.body,{bgcolor:g,style:{transform:"translateY("+-globalThis.window.scrollY+"px)"},width:globalThis.window.innerWidth,height:globalThis.window.innerHeight,copyDefaultStyles:false}),y=await fetch(c).then(n=>n.blob()),E=await re(y,{maxSizeMB:4,maxWidthOrHeight:1920,useWebWorker:false}),a={type:"screenshot",payload:{screenshot:await re.getDataUrlFromFile(E)}};i(a,l,S);}});}function Yr({appId:i,rootUrl:o,baseUrl:S,isTesting:l,realtimeDomain:e,boxId:t}){typeof globalThis.window>"u"||globalThis.window.__APP_ID__||(globalThis.window.__APP_ID__=i,globalThis.window.__ROOT_URL__=o,globalThis.window.__BASE_URL__=S,globalThis.window.__IS_TESTING__=l,globalThis.window.__REALTIME_DOMAIN__=e,globalThis.window.__BOX_ID__=t,Ir(),Tr(),an(),globalThis.window.onerror=function(g){console.error("Global JS error:",g);},globalThis.window.onunhandledrejection=function(g){console.error("Unhandled promise rejection:",g.reason);});}function Jr(){return globalThis.window.__BASE_URL__}/*! Bundled license information:
230
230
 
231
231
  dom-to-image-more/dist/dom-to-image-more.min.js:
232
232
  (*! dom-to-image-more 23-10-2025 *)
233
- */export{Sr as apiClient,fr as connect,ln as connectToRealtimeStore,Xr as encodeFileAsBase64DataURL,Jr as getBaseUrl,Yr as initializeClientEnvironment,ur as useAuth,wr as useRealtimeMutation,cn as useRealtimeStore};
233
+ */export{Sr as apiClient,fr as connect,cn as connectToRealtimeStore,Xr as encodeFileAsBase64DataURL,Jr as getBaseUrl,Yr as initializeClientEnvironment,ur as useAuth,wr as useRealtimeMutation,ln as useRealtimeStore};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptive-ai/sdk",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {