| 6117 | `)}`)}catch(w){_(`Error loading marketplaces: ${d6(w)}`)}})()},Y=[_],K[0]=_,K[1]=z,K[2]=Y;else z=K[1],Y=K[2];lD.useEffect(z,Y);let $;if(K[3]===Symbol.for("react.memo_cache_sentinel"))$=u1.createElement(k,null,"Loading marketplaces..."),K[3]=$;else $=K[3];return $}function wXY(q){return` • ${q}`}function jXY(){return null}function r47(q){let K=[],_=[{source:"userSettings",scope:"user"},{source:"projectSettings",scope:"project"},{source:"localSettings",scope:"local"}];for(let{source:$,scope:A}of _)if(v1($)?.extraKnownMarketplaces?.[q])K.push({source:$,scope:A});let z=v1("policySettings"),Y=Boolean(z?.extraKnownMarketplaces?.[q]);return{editableSources:K,isInPolicy:Y}}function myK(q){let{editableSources:K,isInPolicy:_}=r47(q);if(K.length>0)return{kind:"remove-extra-marketplace",name:q,sources:K};if(_)return{kind:"managed-only",name:q};return{kind:"navigate",tab:"marketplaces",viewState:{type:"manage-marketplaces",targetMarketplace:q,action:"remove"}}}function HXY(q){return{kind:"navigate",tab:"installed",viewState:{type:"manage-plugins",targetPlugin:q,action:"uninstall"}}}function o47(q){return JXY.has(q.type)}function a47(q){if("pluginId"in q&&q.pluginId)return q.pluginId;if("plugin"in q&&q.plugin)return q.plugin;if(q.source.includes("@"))return q.source.split("@")[0];return}function MXY(q,K,_,z,Y,$,A){let O=[];for(let H of $){let J="pluginId"in H?H.pluginId:("plugin"in H)?H.plugin:void 0;O.push({label:J??H.source,message:k56(H),guidance:"Restart to retry loading plugins",action:{kind:"none"}})}let w=new Set;for(let H of q){w.add(H.name);let J=myK(H.name),M=r47(H.name),X=M.isInPolicy?"managed":M.editableSources[0]?.scope;O.push({label:H.name,message:H.error??"Installation failed",guidance:J.kind==="managed-only"?"Managed by your organization — contact your admin":void 0,action:J,scope:X})}for(let H of K){let J="marketplace"in H?H.marketplace:H.source;if(w.has(J))continue;w.add(J);let M=myK(J),X=r47(J),P=X.isInPolicy?"managed":X.editableSources[0]?.scope;O.push({label:J,message:k56(H),guidance:M.kind==="managed-only"?"Managed by your organization — contact your admin":_S6(H),action:M,scope:P})}for(let H of Y){if(w.has(H.name))continue;w.add(H.name),O.push({label:H.name,message:H.error,action:{kind:"remove-installed-marketplace",name:H.name}})}let j=new Set;for(let H of _){let J=a47(H);if(J&&j.has(J))continue;if(J)j.add(J);let M="marketplace"in H?H.marketplace:void 0,X=J?A.get(H.source)??A.get(J):void 0;O.push({label:J?M?`${J} @ ${M}`:J:H.source,message:k56(H),guidance:_S6(H),action:J?HXY(J):{kind:"none"},scope:X})}for(let H of z)O.push({label:H.source,message:k56(H),guidance:_S6(H),action:{kind:"none"}});return O}function XXY(q,K){for(let{source:_}of K){let z=v1(_);if(!z)continue;let Y={};if(z.extraKnownMarketplaces?.[q])Y.extraKnownMarketplaces={...z.extraKnownMarketplaces,[q]:void 0};if(z.enabledPlugins){let $=`@${q}`,A=!1,O={...z.enabledPlugins};for(let w in O)if(w.endsWith($))O[w]=void 0,A=!0;if(A)Y.enabledPlugins=O}if(Object.keys(Y).length>0)W7(_,Y)}}function PXY(q){let K=z6(26),{setViewState:_,setActiveTab:z,markPluginsChanged:Y}=q,$=P8(kXY),A=P8(vXY),O=s7(),[w,j]=lD.useState(0),[H,J]=lD.useState(null),M;if(K[0]===Symbol.for("react.memo_cache_sentinel"))M=[],K[0]=M;else M=K[0];let[X,P]=lD.useState(M),W,D;if(K[1]===Symbol.for("react.memo_cache_sentinel"))W=()=>{(async()=>{try{let w6=await r_(),{failures:o}=await Xp(w6);P(o)}catch{}})()},D=[],K[1]=W,K[2]=D;else W=K[1],D=K[2];lD.useEffect(W,D);let f=A.marketplaces.filter(TXY),G=new Set(f.map(GXY)),Z=$.filter(o47),T=$.filter((w6)=>(w6.type==="marketplace-not-found"||w6.type==="marketplace-load-failed"||w6.type==="marketplace-blocked-by-policy")&&!G.has(w6.marketplace)),v=$.filter(ZXY),V=$.filter(fXY),E=G56(),S=MXY(f,T,v,V,X,Z,E),R;if(K[3]!==_)R=()=>{_({type:"menu"})},K[3]=_,K[4]=R;else R=K[4];let x;if(K[5]===Symbol.for("react.memo_cache_sentinel"))x={context:"Confirmation"},K[5]=x;else x=K[5];P1("confirm:no",R,x);let I=()=>{let w6=S[w];if(!w6)return;let{action:o}=w6;q:switch(o.kind){case"navigate":{z(o.tab),_(o.viewState);break q}case"remove-extra-marketplace":{let s=o.sources.map(DXY).join(", ");XXY(o.name,o.sources),Sz(),O((a)=>({...a,plugins:{...a.plugins,errors:a.plugins.errors.filter((n)=>!(("marketplace"in n)&&n.marketplace===o.name)),installationStatus:{...a.plugins.installationStatus,marketplaces:a.plugins.installationStatus.marketplaces.filter((n)=>n.name!==o.name)}}})),J(`${t6.tick} Removed "${o.name}" from ${s} settings`),Y();break q}case"remove-installed-marketplace":{(async()=>{try{await Mh6(o.name),Sz(),P((s)=>s.filter((a)=>a.name!==o.name)),J(`${t6.tick} Removed marketplace "${o.name}"`),Y()}catch(s){let a=s;J(`Failed to remove "${o.name}": ${a instanceof Error?a.message:String(a)}`)}})();break q}case"managed-only":break q;case"none":}},B;if(K[6]===Symbol.for("react.memo_cache_sentinel"))B=()=>j(WXY),K[6]=B;else B=K[6];let p=S.length>0,C;if(K[7]!==p)C={context:"Select",isActive:p},K[7]=p,K[8]=C;else C=K[8];o7({"select:previous":B,"select:next":()=>j((w6)=>Math.min(S.length-1,w6+1)),"select:accept":I},C);let g=Math.min(w,Math.max(0,S.length-1));if(g!==w)j(g);let F=S[g]?.action,U=F&&F.kind!=="none"&&F.kind!=="managed-only";if(S.length===0){let w6;if(K[9]===Symbol.for("react.memo_cache_sentinel"))w6=u1.createElement(u,{marginLeft:1},u1.createElement(k,{dimColor:!0},"No plugin errors")),K[9]=w6;else w6=K[9];let o;if(K[10]===Symbol.for("react.memo_cache_sentinel"))o=u1.createElement(u,{flexDirection:"column"},w6,u1.createElement(u,{marginTop:1},u1.createElement(k,{dimColor:!0,italic:!0},u1.createElement(W1,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"back"})))),K[10]=o;else o=K[10];return o}let c=u,K6="column",t;if(K[11]!==g)t=(w6,o)=>{let s=o===g;return u1.createElement(u,{key:o,marginLeft:1,flexDirection:"column",marginBottom:1},u1.createElement(k,null,u1.createElement(k,{color:s?"suggestion":"error"},s?t6.pointer:t6.cross," "),u1.createElement(k,{bold:s},w6.label),w6.scope&&u1.createElement(k,{dimColor:!0}," (",w6.scope,")")),u1.createElement(u,{marginLeft:3},u1.createElement(k,{color:"error"},w6.message)),w6.guidance&&u1.createElement(u,{marginLeft:3},u1.createElement(k,{dimColor:!0,italic:!0},w6.guidance)))},K[11]=g,K[12]=t;else t=K[12];let q6=S.map(t),e;if(K[13]!==H)e=H&&u1.createElement(u,{marginTop:1,marginLeft:1},u1.createElement(k,{color:"claude"},H)),K[13]=H,K[14]=e;else e=K[14];let i;if(K[15]===Symbol.for("react.memo_cache_sentinel"))i=u1.createElement(W1,{action:"select:previous",context:"Select",fallback:"↑",description:"navigate"}),K[15]=i;else i=K[15];let $6;if(K[16]!==U)$6=U&&u1.createElement(W1,{action:"select:accept",context:"Select",fallback:"Enter",description:"resolve"}),K[16]=U,K[17]=$6;else $6=K[17];let M6;if(K[18]===Symbol.for("react.memo_cache_sentinel"))M6=u1.createElement(W1,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"back"}),K[18]=M6;else M6=K[18];let j6;if(K[19]!==$6)j6=u1.createElement(u,{marginTop:1},u1.createElement(k,{dimColor:!0,italic:!0},u1.createElement(I1,null,i,$6,M6))),K[19]=$6,K[20]=j6;else j6=K[20];let G6;if(K[21]!==c||K[22]!==q6||K[23]!==e||K[24]!==j6)G6=u1.createElement(c,{flexDirection:K6},q6,e,j6),K[21]=c,K[22]=q6,K[23]=e,K[24]=j6,K[25]=G6;else G6=K[25];return G6}function WXY(q){return Math.max(0,q-1)}function DXY(q){return q.scope}function fXY(q){if(o47(q))return!1;if(q.type==="marketplace-not-found"||q.type==="marketplace-load-failed"||q.type==="marketplace-blocked-by-policy")return!1;return a47(q)===void 0}function ZXY(q){if(o47(q))return!1;if(q.type==="marketplace-not-found"||q.type==="marketplace-load-failed"||q.type==="marketplace-blocked-by-policy")return!1;return a47(q)!==void 0}function GXY(q){return q.name}function TXY(q){return q.status==="failed"}function vXY(q){return q.plugins.installationStatus}function kXY(q){return q.plugins.errors}function VXY(q){switch(q.type){case"help":return{type:"help"};case"validate":return{type:"validate",path:q.path};case"install":if(q.marketplace)return{type:"browse-marketplace",targetMarketplace:q.marketplace,targetPlugin:q.plugin};if(q.plugin)return{type:"discover-plugins",targetPlugin:q.plugin};return{type:"discover-plugins"};case"manage":return{type:"manage-plugins"};case"uninstall":return{type:"manage-plugins",targetPlugin:q.plugin,action:"uninstall"};case"enable":return{type:"manage-plugins",targetPlugin:q.plugin,action:"enable"};case"disable":return{type:"manage-plugins",targetPlugin:q.plugin,action:"disable"};case"marketplace":if(q.action==="list")return{type:"marketplace-list"};if(q.action==="add")return{type:"add-marketplace",initialValue:q.target};if(q.action==="remove")return{type:"manage-marketplaces",targetMarketplace:q.target,action:"remove"};if(q.action==="update")return{type:"manage-marketplaces",targetMarketplace:q.target,action:"update"};return{type:"marketplace-menu"};case"menu":default:return{type:"discover-plugins"}}}function NXY(q){if(q.type==="manage-plugins")return"installed";if(q.type==="manage-marketplaces")return"marketplaces";return"discover"}function pyK(q){let K=z6(75),{onComplete:_,args:z,showMcpRedirectMessage:Y}=q,$,A;if(K[0]!==z)$=SyK(z),A=VXY($),K[0]=z,K[1]=$,K[2]=A;else $=K[1],A=K[2];let O=A,[w,j]=lD.useState(O),H;if(K[3]!==O)H=NXY(O),K[3]=O,K[4]=H;else H=K[4];let[J,M]=lD.useState(H),[X,P]=lD.useState(w.type==="add-marketplace"?w.initialValue||"":""),[W,D]=lD.useState(0),[f,G]=lD.useState(null),[Z,T]=lD.useState(null),[v,V]=lD.useState(!1),E=s7(),S=P8(EXY),R=S>0?`Errors (${S})`:"Errors",x=o5(),I=$.type==="marketplace"&&$.action==="add"&&$.target!==void 0,B;if(K[5]!==E)B=()=>{E(yXY)},K[5]=E,K[6]=B;else B=K[6];let p=B,C;if(K[7]===Symbol.for("react.memo_cache_sentinel"))C=(V6)=>{let y6=V6;M(y6),G(null);q:switch(y6){case"discover":{j({type:"discover-plugins"});break q}case"installed":{j({type:"manage-plugins"});break q}case"marketplaces":{j({type:"manage-marketplaces"});break q}case"errors":}},K[7]=C;else C=K[7];let g=C,F,U;if(K[8]!==_||K[9]!==Z||K[10]!==w.type)F=()=>{if(w.type==="menu"&&!Z)_()},U=[w.type,Z,_],K[8]=_,K[9]=Z,K[10]=w.type,K[11]=F,K[12]=U;else F=K[11],U=K[12];lD.useEffect(F,U);let c,K6;if(K[13]!==J||K[14]!==w.type)c=()=>{if(w.type==="browse-marketplace"&&J!=="discover")M("discover")},K6=[w.type,J],K[13]=J,K[14]=w.type,K[15]=c,K[16]=K6;else c=K[15],K6=K[16];lD.useEffect(c,K6);let t;if(K[17]===Symbol.for("react.memo_cache_sentinel"))t=()=>{M("marketplaces"),j({type:"manage-marketplaces"}),P(""),G(null)},K[17]=t;else t=K[17];let q6=t,e=w.type==="add-marketplace",i;if(K[18]!==e)i={context:"Settings",isActive:e},K[18]=e,K[19]=i;else i=K[19];P1("confirm:no",q6,i);let $6,M6;if(K[20]!==_||K[21]!==Z)$6=()=>{if(Z)_(Z)},M6=[Z,_],K[20]=_,K[21]=Z,K[22]=$6,K[23]=M6;else $6=K[22],M6=K[23];lD.useEffect($6,M6);let j6,G6;if(K[24]!==_||K[25]!==w.type)j6=()=>{if(w.type==="help")_()},G6=[w.type,_],K[24]=_,K[25]=w.type,K[26]=j6,K[27]=G6;else j6=K[26],G6=K[27];if(lD.useEffect(j6,G6),w.type==="help"){let V6;if(K[28]===Symbol.for("react.memo_cache_sentinel"))V6=u1.createElement(u,{flexDirection:"column"},u1.createElement(k,{bold:!0},"Plugin Command Usage:"),u1.createElement(k,null," "),u1.createElement(k,{dimColor:!0},"Installation:"),u1.createElement(k,null," /plugin install - Browse and install plugins"),u1.createElement(k,null," ","/plugin install <marketplace> - Install from specific marketplace"),u1.createElement(k,null," /plugin install <plugin> - Install specific plugin"),u1.createElement(k,null," ","/plugin install <plugin>@<market> - Install plugin from marketplace"),u1.createElement(k,null," "),u1.createElement(k,{dimColor:!0},"Management:"),u1.createElement(k,null," /plugin manage - Manage installed plugins"),u1.createElement(k,null," /plugin enable <plugin> - Enable a plugin"),u1.createElement(k,null," /plugin disable <plugin> - Disable a plugin"),u1.createElement(k,null," /plugin uninstall <plugin> - Uninstall a plugin"),u1.createElement(k,null," "),u1.createElement(k,{dimColor:!0},"Marketplaces:"),u1.createElement(k,null," /plugin marketplace - Marketplace management menu"),u1.createElement(k,null," /plugin marketplace add - Add a marketplace"),u1.createElement(k,null," ","/plugin marketplace add <path/url> - Add marketplace directly"),u1.createElement(k,null," /plugin marketplace update - Update marketplaces"),u1.createElement(k,null," ","/plugin marketplace update <name> - Update specific marketplace"),u1.createElement(k,null," /plugin marketplace remove - Remove a marketplace"),u1.createElement(k,null," ","/plugin marketplace remove <name> - Remove specific marketplace"),u1.createElement(k,null," /plugin marketplace list - List all marketplaces"),u1.createElement(k,null," "),u1.createElement(k,{dimColor:!0},"Validation:"),u1.createElement(k,null," ","/plugin validate <path> - Validate a manifest file or directory"),u1.createElement(k,null," "),u1.createElement(k,{dimColor:!0},"Other:"),u1.createElement(k,null," /plugin - Main plugin menu"),u1.createElement(k,null," /plugin help - Show this help"),u1.createElement(k,null," /plugins - Alias for /plugin")),K[28]=V6;else V6=K[28];return V6}if(w.type==="validate"){let V6;if(K[29]!==_||K[30]!==w.path)V6=u1.createElement(IyK,{onComplete:_,path:w.path}),K[29]=_,K[30]=w.path,K[31]=V6;else V6=K[31];return V6}if(w.type==="marketplace-menu")return j({type:"menu"}),null;if(w.type==="marketplace-list"){let V6;if(K[32]!==_)V6=u1.createElement(OXY,{onComplete:_}),K[32]=_,K[33]=V6;else V6=K[33];return V6}if(w.type==="add-marketplace"){let V6;if(K[34]!==I||K[35]!==W||K[36]!==f||K[37]!==X||K[38]!==p||K[39]!==Z)V6=u1.createElement(zyK,{inputValue:X,setInputValue:P,cursorOffset:W,setCursorOffset:D,error:f,setError:G,result:Z,setResult:T,setViewState:j,onAddComplete:p,cliMode:I}),K[34]=I,K[35]=W,K[36]=f,K[37]=X,K[38]=p,K[39]=Z,K[40]=V6;else V6=K[40];return V6}let w6;if(K[41]!==J||K[42]!==Y)w6=Y&&J==="installed"?u1.createElement(jXY,null):void 0,K[41]=J,K[42]=Y,K[43]=w6;else w6=K[43];let o;if(K[44]!==f||K[45]!==p||K[46]!==Z||K[47]!==w.targetMarketplace||K[48]!==w.targetPlugin||K[49]!==w.type)o=u1.createElement(cO,{id:"discover",title:"Discover"},w.type==="browse-marketplace"?u1.createElement(OyK,{error:f,setError:G,result:Z,setResult:T,setViewState:j,onInstallComplete:p,targetMarketplace:w.targetMarketplace,targetPlugin:w.targetPlugin}):u1.createElement(jyK,{error:f,setError:G,result:Z,setResult:T,setViewState:j,onInstallComplete:p,onSearchModeChange:V,targetPlugin:w.type==="discover-plugins"?w.targetPlugin:void 0})),K[44]=f,K[45]=p,K[46]=Z,K[47]=w.targetMarketplace,K[48]=w.targetPlugin,K[49]=w.type,K[50]=o;else o=K[50];let s=w.type==="manage-plugins"?w.targetPlugin:void 0,a=w.type==="manage-plugins"?w.targetMarketplace:void 0,n=w.type==="manage-plugins"?w.action:void 0,l;if(K[51]!==p||K[52]!==s||K[53]!==a||K[54]!==n)l=u1.createElement(cO,{id:"installed",title:"Installed"},u1.createElement(RyK,{setViewState:j,setResult:T,onManageComplete:p,onSearchModeChange:V,targetPlugin:s,targetMarketplace:a,action:n})),K[51]=p,K[52]=s,K[53]=a,K[54]=n,K[55]=l;else l=K[55];let A6=w.type==="manage-marketplaces"?w.targetMarketplace:void 0,J6=w.type==="manage-marketplaces"?w.action:void 0,X6;if(K[56]!==f||K[57]!==x||K[58]!==p||K[59]!==A6||K[60]!==J6)X6=u1.createElement(cO,{id:"marketplaces",title:"Marketplaces"},u1.createElement(ZyK,{setViewState:j,error:f,setError:G,setResult:T,exitState:x,onManageComplete:p,targetMarketplace:A6,action:J6})),K[56]=f,K[57]=x,K[58]=p,K[59]=A6,K[60]=J6,K[61]=X6;else X6=K[61];let f6;if(K[62]!==p)f6=u1.createElement(PXY,{setViewState:j,setActiveTab:M,markPluginsChanged:p}),K[62]=p,K[63]=f6;else f6=K[63];let N6;if(K[64]!==R||K[65]!==f6)N6=u1.createElement(cO,{id:"errors",title:R},f6),K[64]=R,K[65]=f6,K[66]=N6;else N6=K[66];let Z6;if(K[67]!==J||K[68]!==v||K[69]!==w6||K[70]!==o||K[71]!==l||K[72]!==X6||K[73]!==N6)Z6=u1.createElement(Q_,{color:"suggestion"},u1.createElement(Bb,{title:"Plugins",selectedTab:J,onTabChange:g,color:"suggestion",disableNavigation:v,banner:w6},o,l,X6,N6)),K[67]=J,K[68]=v,K[69]=w6,K[70]=o,K[71]=l,K[72]=X6,K[73]=N6,K[74]=Z6;else Z6=K[74];return Z6}function yXY(q){return q.plugins.needsRefresh?q:{...q,plugins:{...q.plugins,needsRefresh:!0}}}function EXY(q){let K=q.plugins.errors.length;for(let _ of q.plugins.installationStatus.marketplaces)if(_.status==="failed")K++;return K}var u1,lD,JXY;var s47=y(()=>{q8();bq();a5();QK();pP();gb();z2();s6();Oq();C7();y8();Jy();qd();Nw();nh6();U1();YyK();wyK();HyK();GyK();hyK();d47();uyK();u1=O6(D6(),1),lD=O6(D6(),1);JXY=new Set(["git-auth-failed","git-timeout","network-error"])});var ByK={};T8(ByK,{call:()=>SXY});function LXY(q){let K=z6(7),{action:_,target:z,onComplete:Y}=q,$=P8(hXY),A=f56(),O=zs.useRef(!1),w,j;if(K[0]!==_||K[1]!==$||K[2]!==Y||K[3]!==z||K[4]!==A)w=()=>{if(O.current)return;O.current=!0;let H=_==="enable",J=$.filter(RXY),M=z==="all"?J.filter((X)=>H?X.type==="disabled":X.type!=="disabled"):J.filter((X)=>X.name===z);if(M.length===0){Y(z==="all"?`All MCP servers are already ${H?"enabled":"disabled"}`:`MCP server "${z}" not found`);return}for(let X of M)A(X.name);Y(z==="all"?`${H?"Enabled":"Disabled"} ${M.length} MCP server(s)`:`MCP server "${z}" ${H?"enabled":"disabled"}`)},j=[_,z,$,A,Y],K[0]=_,K[1]=$,K[2]=Y,K[3]=z,K[4]=A,K[5]=w,K[6]=j;else w=K[5],j=K[6];return zs.useEffect(w,j),null}function RXY(q){return q.name!=="ide"}function hXY(q){return q.mcp.clients}async function SXY(q,K,_){if(_){let z=_.trim().split(/\s+/);if(z[0]==="no-redirect")return zs.default.createElement($F8,{onComplete:q});if(z[0]==="reconnect"&&z[1])return zs.default.createElement(C47,{serverName:z.slice(1).join(" "),onComplete:q});if(z[0]==="enable"||z[0]==="disable")return zs.default.createElement(LXY,{action:z[0],target:z.length>1?z.slice(1).join(" "):"all",onComplete:q})}return zs.default.createElement($F8,{onComplete:q})}var zs;var gyK=y(()=>{q8();qyK();b47();Z56();C7();s47();zs=O6(D6(),1)});var CXY,FyK;var UyK=y(()=>{CXY={type:"local-jsx",name:"mcp",description:"Manage MCP servers",immediate:!0,argumentHint:"[enable|disable [server-name]]",load:()=>Promise.resolve().then(() => (gyK(),ByK))},FyK=CXY});var t47=m((OJ2,QyK)=>{QyK.exports=function(){return typeof Promise==="function"&&Promise.prototype&&Promise.prototype.then}});var V56=m((xXY)=>{var e47,bXY=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];xXY.getSymbolSize=function(K){if(!K)throw Error('"version" cannot be null or undefined');if(K<1||K>40)throw Error('"version" should be in range from 1 to 40');return K*4+17};xXY.getSymbolTotalCodewords=function(K){return bXY[K]};xXY.getBCHDigit=function(q){let K=0;while(q!==0)K++,q>>>=1;return K};xXY.setToSJISFunction=function(K){if(typeof K!=="function")throw Error('"toSJISFunc" is not a valid function.');e47=K};xXY.isKanjiModeEnabled=function(){return typeof e47<"u"};xXY.toSJIS=function(K){return e47(K)}});var TF8=m((UXY)=>{UXY.L={bit:1};UXY.M={bit:0};UXY.Q={bit:3};UXY.H={bit:2};function FXY(q){if(typeof q!=="string")throw Error("Param is not a string");switch(q.toLowerCase()){case"l":case"low":return UXY.L;case"m":case"medium":return UXY.M;case"q":case"quartile":return UXY.Q;case"h":case"high":return UXY.H;default:throw Error("Unknown EC Level: "+q)}}UXY.isValid=function(K){return K&&typeof K.bit<"u"&&K.bit>=0&&K.bit<4};UXY.from=function(K,_){if(UXY.isValid(K))return K;try{return FXY(K)}catch(z){return _}}});var ayK=m((HJ2,oyK)=>{function ryK(){this.buffer=[],this.length=0}ryK.prototype={get:function(q){let K=Math.floor(q/8);return(this.buffer[K]>>>7-q%8&1)===1},put:function(q,K){for(let _=0;_<K;_++)this.putBit((q>>>K-_-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(q){let K=Math.floor(this.length/8);if(this.buffer.length<=K)this.buffer.push(0);if(q)this.buffer[K]|=128>>>this.length%8;this.length++}};oyK.exports=ryK});var tyK=m((JJ2,syK)=>{function F78(q){if(!q||q<1)throw Error("BitMatrix size must be defined and greater than 0");this.size=q,this.data=new Uint8Array(q*q),this.reservedBit=new Uint8Array(q*q)}F78.prototype.set=function(q,K,_,z){let Y=q*this.size+K;if(this.data[Y]=_,z)this.reservedBit[Y]=!0};F78.prototype.get=function(q,K){return this.data[q*this.size+K]};F78.prototype.xor=function(q,K,_){this.data[q*this.size+K]^=_};F78.prototype.isReserved=function(q,K){return this.reservedBit[q*this.size+K]};syK.exports=F78});var qEK=m((cXY)=>{var dXY=V56().getSymbolSize;cXY.getRowColCoords=function(K){if(K===1)return[];let _=Math.floor(K/7)+2,z=dXY(K),Y=z===145?26:Math.ceil((z-13)/(2*_-2))*2,$=[z-7];for(let A=1;A<_-1;A++)$[A]=$[A-1]-Y;return $.push(6),$.reverse()};cXY.getPositions=function(K){let _=[],z=cXY.getRowColCoords(K),Y=z.length;for(let $=0;$<Y;$++)for(let A=0;A<Y;A++){if($===0&&A===0||$===0&&A===Y-1||$===Y-1&&A===0)continue;_.push([z[$],z[A]])}return _}});var KEK=m((iXY)=>{var nXY=V56().getSymbolSize;iXY.getPositions=function(K){let _=nXY(K);return[[0,0],[_-7,0],[0,_-7]]}});var OEK=m((aXY)=>{aXY.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var aH6={N1:3,N2:3,N3:40,N4:10};aXY.isValid=function(K){return K!=null&&K!==""&&!isNaN(K)&&K>=0&&K<=7};aXY.from=function(K){return aXY.isValid(K)?parseInt(K,10):void 0};aXY.getPenaltyN1=function(K){let _=K.size,z=0,Y=0,$=0,A=null,O=null;for(let w=0;w<_;w++){Y=$=0,A=O=null;for(let j=0;j<_;j++){let H=K.get(w,j);if(H===A)Y++;else{if(Y>=5)z+=aH6.N1+(Y-5);A=H,Y=1}if(H=K.get(j,w),H===O)$++;else{if($>=5)z+=aH6.N1+($-5);O=H,$=1}}if(Y>=5)z+=aH6.N1+(Y-5);if($>=5)z+=aH6.N1+($-5)}return z};aXY.getPenaltyN2=function(K){let _=K.size,z=0;for(let Y=0;Y<_-1;Y++)for(let $=0;$<_-1;$++){let A=K.get(Y,$)+K.get(Y,$+1)+K.get(Y+1,$)+K.get(Y+1,$+1);if(A===4||A===0)z++}return z*aH6.N2};aXY.getPenaltyN3=function(K){let _=K.size,z=0,Y=0,$=0;for(let A=0;A<_;A++){Y=$=0;for(let O=0;O<_;O++){if(Y=Y<<1&2047|K.get(A,O),O>=10&&(Y===1488||Y===93))z++;if($=$<<1&2047|K.get(O,A),O>=10&&($===1488||$===93))z++}}return z*aH6.N3};aXY.getPenaltyN4=function(K){let _=0,z=K.data.length;for(let $=0;$<z;$++)_+=K.data[$];return Math.abs(Math.ceil(_*100/z/5)-10)*aH6.N4};function oXY(q,K,_){switch(q){case aXY.Patterns.PATTERN000:return(K+_)%2===0;case aXY.Patterns.PATTERN001:return K%2===0;case aXY.Patterns.PATTERN010:return _%3===0;case aXY.Patterns.PATTERN011:return(K+_)%3===0;case aXY.Patterns.PATTERN100:return(Math.floor(K/2)+Math.floor(_/3))%2===0;case aXY.Patterns.PATTERN101:return K*_%2+K*_%3===0;case aXY.Patterns.PATTERN110:return(K*_%2+K*_%3)%2===0;case aXY.Patterns.PATTERN111:return(K*_%3+(K+_)%2)%2===0;default:throw Error("bad maskPattern:"+q)}}aXY.applyMask=function(K,_){let z=_.size;for(let Y=0;Y<z;Y++)for(let $=0;$<z;$++){if(_.isReserved($,Y))continue;_.xor($,Y,oXY(K,$,Y))}};aXY.getBestMask=function(K,_){let z=Object.keys(aXY.Patterns).length,Y=0,$=1/0;for(let A=0;A<z;A++){_(A),aXY.applyMask(A,K);let O=aXY.getPenaltyN1(K)+aXY.getPenaltyN2(K)+aXY.getPenaltyN3(K)+aXY.getPenaltyN4(K);if(aXY.applyMask(A,K),O<$)$=O,Y=A}return Y}});var KK7=m((eXY)=>{var N56=TF8(),vF8=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],kF8=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];eXY.getBlocksCount=function(K,_){switch(_){case N56.L:return vF8[(K-1)*4+0];case N56.M:return vF8[(K-1)*4+1];case N56.Q:return vF8[(K-1)*4+2];case N56.H:return vF8[(K-1)*4+3];default:return}};eXY.getTotalCodewordsCount=function(K,_){switch(_){case N56.L:return kF8[(K-1)*4+0];case N56.M:return kF8[(K-1)*4+1];case N56.Q:return kF8[(K-1)*4+2];case N56.H:return kF8[(K-1)*4+3];default:return}}});var wEK=m((_PY)=>{var U78=new Uint8Array(512),VF8=new Uint8Array(256);(function(){let K=1;for(let _=0;_<255;_++)if(U78[_]=K,VF8[K]=_,K<<=1,K&256)K^=285;for(let _=255;_<512;_++)U78[_]=U78[_-255]})();_PY.log=function(K){if(K<1)throw Error("log("+K+")");return VF8[K]};_PY.exp=function(K){return U78[K]};_PY.mul=function(K,_){if(K===0||_===0)return 0;return U78[VF8[K]+VF8[_]]}});var HEK=m((APY)=>{var _K7=wEK();APY.mul=function(K,_){let z=new Uint8Array(K.length+_.length-1);for(let Y=0;Y<K.length;Y++)for(let $=0;$<_.length;$++)z[Y+$]^=_K7.mul(K[Y],_[$]);return z};APY.mod=function(K,_){let z=new Uint8Array(K);while(z.length-_.length>=0){let Y=z[0];for(let A=0;A<_.length;A++)z[A]^=_K7.mul(_[A],Y);let $=0;while($<z.length&&z[$]===0)$++;z=z.slice($)}return z};APY.generateECPolynomial=function(K){let _=new Uint8Array([1]);for(let z=0;z<K;z++)_=APY.mul(_,new Uint8Array([1,_K7.exp(z)]));return _}});var XEK=m((ZJ2,MEK)=>{var JEK=HEK();function zK7(q){if(this.genPoly=void 0,this.degree=q,this.degree)this.initialize(this.degree)}zK7.prototype.initialize=function(K){this.degree=K,this.genPoly=JEK.generateECPolynomial(this.degree)};zK7.prototype.encode=function(K){if(!this.genPoly)throw Error("Encoder not initialized");let _=new Uint8Array(K.length+this.degree);_.set(K);let z=JEK.mod(_,this.genPoly),Y=this.degree-z.length;if(Y>0){let $=new Uint8Array(this.degree);return $.set(z,Y),$}return z};MEK.exports=zK7});var YK7=m((jPY)=>{jPY.isValid=function(K){return!isNaN(K)&&K>=1&&K<=40}});var $K7=m((WPY)=>{var Q78="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Q78=Q78.replace(/u/g,"\\u");var JPY="(?:(?![A-Z0-9 $%*+\\-./:]|"+Q78+`)(?:.|[\r |
| 6118 | ]))+`;WPY.KANJI=new RegExp(Q78,"g");WPY.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");WPY.BYTE=new RegExp(JPY,"g");WPY.NUMERIC=new RegExp("[0-9]+","g");WPY.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var MPY=new RegExp("^"+Q78+"$"),XPY=new RegExp("^[0-9]+$"),PPY=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");WPY.testKanji=function(K){return MPY.test(K)};WPY.testNumeric=function(K){return XPY.test(K)};WPY.testAlphanumeric=function(K){return PPY.test(K)}});var y56=m((EPY)=>{var NPY=YK7(),AK7=$K7();EPY.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};EPY.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};EPY.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};EPY.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};EPY.MIXED={bit:-1};EPY.getCharCountIndicator=function(K,_){if(!K.ccBits)throw Error("Invalid mode: "+K);if(!NPY.isValid(_))throw Error("Invalid version: "+_);if(_>=1&&_<10)return K.ccBits[0];else if(_<27)return K.ccBits[1];return K.ccBits[2]};EPY.getBestModeForData=function(K){if(AK7.testNumeric(K))return EPY.NUMERIC;else if(AK7.testAlphanumeric(K))return EPY.ALPHANUMERIC;else if(AK7.testKanji(K))return EPY.KANJI;else return EPY.BYTE};EPY.toString=function(K){if(K&&K.id)return K.id;throw Error("Invalid mode")};EPY.isValid=function(K){return K&&K.bit&&K.ccBits};function yPY(q){if(typeof q!=="string")throw Error("Param is not a string");switch(q.toLowerCase()){case"numeric":return EPY.NUMERIC;case"alphanumeric":return EPY.ALPHANUMERIC;case"kanji":return EPY.KANJI;case"byte":return EPY.BYTE;default:throw Error("Unknown mode: "+q)}}EPY.from=function(K,_){if(EPY.isValid(K))return K;try{return yPY(K)}catch(z){return _}}});var GEK=m((mPY)=>{var NF8=V56(),bPY=KK7(),WEK=TF8(),E56=y56(),JK7=YK7(),DEK=NF8.getBCHDigit(7973);function xPY(q,K,_){for(let z=1;z<=40;z++)if(K<=mPY.getCapacity(z,_,q))return z;return}function fEK(q,K){return E56.getCharCountIndicator(q,K)+4}function IPY(q,K){let _=0;return q.forEach(function(z){let Y=fEK(z.mode,K);_+=Y+z.getBitsLength()}),_}function uPY(q,K){for(let _=1;_<=40;_++)if(IPY(q,_)<=mPY.getCapacity(_,K,E56.MIXED))return _;return}mPY.from=function(K,_){if(JK7.isValid(K))return parseInt(K,10);return _};mPY.getCapacity=function(K,_,z){if(!JK7.isValid(K))throw Error("Invalid QR Code version");if(typeof z>"u")z=E56.BYTE;let Y=NF8.getSymbolTotalCodewords(K),$=bPY.getTotalCodewordsCount(K,_),A=(Y-$)*8;if(z===E56.MIXED)return A;let O=A-fEK(z,K);switch(z){case E56.NUMERIC:return Math.floor(O/10*3);case E56.ALPHANUMERIC:return Math.floor(O/11*2);case E56.KANJI:return Math.floor(O/13);case E56.BYTE:default:return Math.floor(O/8)}};mPY.getBestVersionForData=function(K,_){let z,Y=WEK.from(_,WEK.M);if(Array.isArray(K)){if(K.length>1)return uPY(K,Y);if(K.length===0)return 1;z=K[0]}else z=K;return xPY(z.mode,z.getLength(),Y)};mPY.getEncodedBits=function(K){if(!JK7.isValid(K)||K<7)throw Error("Invalid QR Code version");let _=K<<12;while(NF8.getBCHDigit(_)-DEK>=0)_^=7973<<NF8.getBCHDigit(_)-DEK;return K<<12|_}});var vEK=m((FPY)=>{var MK7=V56(),TEK=MK7.getBCHDigit(1335);FPY.getEncodedBits=function(K,_){let z=K.bit<<3|_,Y=z<<10;while(MK7.getBCHDigit(Y)-TEK>=0)Y^=1335<<MK7.getBCHDigit(Y)-TEK;return(z<<10|Y)^21522}});var VEK=m((NJ2,kEK)=>{var QPY=y56();function $S6(q){this.mode=QPY.NUMERIC,this.data=q.toString()}$S6.getBitsLength=function(K){return 10*Math.floor(K/3)+(K%3?K%3*3+1:0)};$S6.prototype.getLength=function(){return this.data.length};$S6.prototype.getBitsLength=function(){return $S6.getBitsLength(this.data.length)};$S6.prototype.write=function(K){let _,z,Y;for(_=0;_+3<=this.data.length;_+=3)z=this.data.substr(_,3),Y=parseInt(z,10),K.put(Y,10);let $=this.data.length-_;if($>0)z=this.data.substr(_),Y=parseInt(z,10),K.put(Y,$*3+1)};kEK.exports=$S6});var yEK=m((yJ2,NEK)=>{var dPY=y56(),XK7=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function AS6(q){this.mode=dPY.ALPHANUMERIC,this.data=q}AS6.getBitsLength=function(K){return 11*Math.floor(K/2)+6*(K%2)};AS6.prototype.getLength=function(){return this.data.length};AS6.prototype.getBitsLength=function(){return AS6.getBitsLength(this.data.length)};AS6.prototype.write=function(K){let _;for(_=0;_+2<=this.data.length;_+=2){let z=XK7.indexOf(this.data[_])*45;z+=XK7.indexOf(this.data[_+1]),K.put(z,11)}if(this.data.length%2)K.put(XK7.indexOf(this.data[_]),6)};NEK.exports=AS6});var LEK=m((EJ2,EEK)=>{var cPY=y56();function OS6(q){if(this.mode=cPY.BYTE,typeof q==="string")this.data=new TextEncoder().encode(q);else this.data=new Uint8Array(q)}OS6.getBitsLength=function(K){return K*8};OS6.prototype.getLength=function(){return this.data.length};OS6.prototype.getBitsLength=function(){return OS6.getBitsLength(this.data.length)};OS6.prototype.write=function(q){for(let K=0,_=this.data.length;K<_;K++)q.put(this.data[K],8)};EEK.exports=OS6});var hEK=m((LJ2,REK)=>{var lPY=y56(),nPY=V56();function wS6(q){this.mode=lPY.KANJI,this.data=q}wS6.getBitsLength=function(K){return K*13};wS6.prototype.getLength=function(){return this.data.length};wS6.prototype.getBitsLength=function(){return wS6.getBitsLength(this.data.length)};wS6.prototype.write=function(q){let K;for(K=0;K<this.data.length;K++){let _=nPY.toSJIS(this.data[K]);if(_>=33088&&_<=40956)_-=33088;else if(_>=57408&&_<=60351)_-=49472;else throw Error("Invalid SJIS character: "+this.data[K]+` |
| 6119 | Make sure your charset is UTF-8`);_=(_>>>8&255)*192+(_&255),q.put(_,13)}};REK.exports=wS6});var SEK=m((RJ2,PK7)=>{var d78={single_source_shortest_paths:function(q,K,_){var z={},Y={};Y[K]=0;var $=d78.PriorityQueue.make();$.push(K,0);var A,O,w,j,H,J,M,X,P;while(!$.empty()){A=$.pop(),O=A.value,j=A.cost,H=q[O]||{};for(w in H)if(H.hasOwnProperty(w)){if(J=H[w],M=j+J,X=Y[w],P=typeof Y[w]>"u",P||X>M)Y[w]=M,$.push(w,M),z[w]=O}}if(typeof _<"u"&&typeof Y[_]>"u"){var W=["Could not find a path from ",K," to ",_,"."].join("");throw Error(W)}return z},extract_shortest_path_from_predecessor_list:function(q,K){var _=[],z=K,Y;while(z)_.push(z),Y=q[z],z=q[z];return _.reverse(),_},find_path:function(q,K,_){var z=d78.single_source_shortest_paths(q,K,_);return d78.extract_shortest_path_from_predecessor_list(z,_)},PriorityQueue:{make:function(q){var K=d78.PriorityQueue,_={},z;q=q||{};for(z in K)if(K.hasOwnProperty(z))_[z]=K[z];return _.queue=[],_.sorter=q.sorter||K.default_sorter,_},default_sorter:function(q,K){return q.cost-K.cost},push:function(q,K){var _={value:q,cost:K};this.queue.push(_),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};if(typeof PK7<"u")PK7.exports=d78});var BEK=m((sPY)=>{var IA=y56(),xEK=VEK(),IEK=yEK(),uEK=LEK(),mEK=hEK(),c78=$K7(),yF8=V56(),iPY=SEK();function CEK(q){return unescape(encodeURIComponent(q)).length}function l78(q,K,_){let z=[],Y;while((Y=q.exec(_))!==null)z.push({data:Y[0],index:Y.index,mode:K,length:Y[0].length});return z}function pEK(q){let K=l78(c78.NUMERIC,IA.NUMERIC,q),_=l78(c78.ALPHANUMERIC,IA.ALPHANUMERIC,q),z,Y;if(yF8.isKanjiModeEnabled())z=l78(c78.BYTE,IA.BYTE,q),Y=l78(c78.KANJI,IA.KANJI,q);else z=l78(c78.BYTE_KANJI,IA.BYTE,q),Y=[];return K.concat(_,z,Y).sort(function(A,O){return A.index-O.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function WK7(q,K){switch(K){case IA.NUMERIC:return xEK.getBitsLength(q);case IA.ALPHANUMERIC:return IEK.getBitsLength(q);case IA.KANJI:return mEK.getBitsLength(q);case IA.BYTE:return uEK.getBitsLength(q)}}function rPY(q){return q.reduce(function(K,_){let z=K.length-1>=0?K[K.length-1]:null;if(z&&z.mode===_.mode)return K[K.length-1].data+=_.data,K;return K.push(_),K},[])}function oPY(q){let K=[];for(let _=0;_<q.length;_++){let z=q[_];switch(z.mode){case IA.NUMERIC:K.push([z,{data:z.data,mode:IA.ALPHANUMERIC,length:z.length},{data:z.data,mode:IA.BYTE,length:z.length}]);break;case IA.ALPHANUMERIC:K.push([z,{data:z.data,mode:IA.BYTE,length:z.length}]);break;case IA.KANJI:K.push([z,{data:z.data,mode:IA.BYTE,length:CEK(z.data)}]);break;case IA.BYTE:K.push([{data:z.data,mode:IA.BYTE,length:CEK(z.data)}])}}return K}function aPY(q,K){let _={},z={start:{}},Y=["start"];for(let $=0;$<q.length;$++){let A=q[$],O=[];for(let w=0;w<A.length;w++){let j=A[w],H=""+$+w;O.push(H),_[H]={node:j,lastCount:0},z[H]={};for(let J=0;J<Y.length;J++){let M=Y[J];if(_[M]&&_[M].node.mode===j.mode)z[M][H]=WK7(_[M].lastCount+j.length,j.mode)-WK7(_[M].lastCount,j.mode),_[M].lastCount+=j.length;else{if(_[M])_[M].lastCount=j.length;z[M][H]=WK7(j.length,j.mode)+4+IA.getCharCountIndicator(j.mode,K)}}}Y=O}for(let $=0;$<Y.length;$++)z[Y[$]].end=0;return{map:z,table:_}}function bEK(q,K){let _,z=IA.getBestModeForData(q);if(_=IA.from(K,z),_!==IA.BYTE&&_.bit<z.bit)throw Error('"'+q+'" cannot be encoded with mode '+IA.toString(_)+`. |
| 6120 | Suggested mode is: `+IA.toString(z));if(_===IA.KANJI&&!yF8.isKanjiModeEnabled())_=IA.BYTE;switch(_){case IA.NUMERIC:return new xEK(q);case IA.ALPHANUMERIC:return new IEK(q);case IA.KANJI:return new mEK(q);case IA.BYTE:return new uEK(q)}}sPY.fromArray=function(K){return K.reduce(function(_,z){if(typeof z==="string")_.push(bEK(z,null));else if(z.data)_.push(bEK(z.data,z.mode));return _},[])};sPY.fromString=function(K,_){let z=pEK(K,yF8.isKanjiModeEnabled()),Y=oPY(z),$=aPY(Y,_),A=iPY.find_path($.map,"start","end"),O=[];for(let w=1;w<A.length-1;w++)O.push($.table[A[w]].node);return sPY.fromArray(rPY(O))};sPY.rawSplit=function(K){return sPY.fromArray(pEK(K,yF8.isKanjiModeEnabled()))}});var kK7=m((WWY)=>{var LF8=V56(),fK7=TF8(),qWY=ayK(),KWY=tyK(),_WY=qEK(),zWY=KEK(),TK7=OEK(),vK7=KK7(),YWY=XEK(),EF8=GEK(),$WY=vEK(),AWY=y56(),ZK7=BEK();function OWY(q,K){let _=q.size,z=zWY.getPositions(K);for(let Y=0;Y<z.length;Y++){let $=z[Y][0],A=z[Y][1];for(let O=-1;O<=7;O++){if($+O<=-1||_<=$+O)continue;for(let w=-1;w<=7;w++){if(A+w<=-1||_<=A+w)continue;if(O>=0&&O<=6&&(w===0||w===6)||w>=0&&w<=6&&(O===0||O===6)||O>=2&&O<=4&&w>=2&&w<=4)q.set($+O,A+w,!0,!0);else q.set($+O,A+w,!1,!0)}}}}function wWY(q){let K=q.size;for(let _=8;_<K-8;_++){let z=_%2===0;q.set(_,6,z,!0),q.set(6,_,z,!0)}}function jWY(q,K){let _=_WY.getPositions(K);for(let z=0;z<_.length;z++){let Y=_[z][0],$=_[z][1];for(let A=-2;A<=2;A++)for(let O=-2;O<=2;O++)if(A===-2||A===2||O===-2||O===2||A===0&&O===0)q.set(Y+A,$+O,!0,!0);else q.set(Y+A,$+O,!1,!0)}}function HWY(q,K){let _=q.size,z=EF8.getEncodedBits(K),Y,$,A;for(let O=0;O<18;O++)Y=Math.floor(O/3),$=O%3+_-8-3,A=(z>>O&1)===1,q.set(Y,$,A,!0),q.set($,Y,A,!0)}function GK7(q,K,_){let z=q.size,Y=$WY.getEncodedBits(K,_),$,A;for($=0;$<15;$++){if(A=(Y>>$&1)===1,$<6)q.set($,8,A,!0);else if($<8)q.set($+1,8,A,!0);else q.set(z-15+$,8,A,!0);if($<8)q.set(8,z-$-1,A,!0);else if($<9)q.set(8,15-$-1+1,A,!0);else q.set(8,15-$-1,A,!0)}q.set(z-8,8,1,!0)}function JWY(q,K){let _=q.size,z=-1,Y=_-1,$=7,A=0;for(let O=_-1;O>0;O-=2){if(O===6)O--;while(!0){for(let w=0;w<2;w++)if(!q.isReserved(Y,O-w)){let j=!1;if(A<K.length)j=(K[A]>>>$&1)===1;if(q.set(Y,O-w,j),$--,$===-1)A++,$=7}if(Y+=z,Y<0||_<=Y){Y-=z,z=-z;break}}}}function MWY(q,K,_){let z=new qWY;_.forEach(function(w){z.put(w.mode.bit,4),z.put(w.getLength(),AWY.getCharCountIndicator(w.mode,q)),w.write(z)});let Y=LF8.getSymbolTotalCodewords(q),$=vK7.getTotalCodewordsCount(q,K),A=(Y-$)*8;if(z.getLengthInBits()+4<=A)z.put(0,4);while(z.getLengthInBits()%8!==0)z.putBit(0);let O=(A-z.getLengthInBits())/8;for(let w=0;w<O;w++)z.put(w%2?17:236,8);return XWY(z,q,K)}function XWY(q,K,_){let z=LF8.getSymbolTotalCodewords(K),Y=vK7.getTotalCodewordsCount(K,_),$=z-Y,A=vK7.getBlocksCount(K,_),O=z%A,w=A-O,j=Math.floor(z/A),H=Math.floor($/A),J=H+1,M=j-H,X=new YWY(M),P=0,W=Array(A),D=Array(A),f=0,G=new Uint8Array(q.buffer);for(let E=0;E<A;E++){let S=E<w?H:J;W[E]=G.slice(P,P+S),D[E]=X.encode(W[E]),P+=S,f=Math.max(f,S)}let Z=new Uint8Array(z),T=0,v,V;for(v=0;v<f;v++)for(V=0;V<A;V++)if(v<W[V].length)Z[T++]=W[V][v];for(v=0;v<M;v++)for(V=0;V<A;V++)Z[T++]=D[V][v];return Z}function PWY(q,K,_,z){let Y;if(Array.isArray(q))Y=ZK7.fromArray(q);else if(typeof q==="string"){let j=K;if(!j){let H=ZK7.rawSplit(q);j=EF8.getBestVersionForData(H,_)}Y=ZK7.fromString(q,j||40)}else throw Error("Invalid data");let $=EF8.getBestVersionForData(Y,_);if(!$)throw Error("The amount of data is too big to be stored in a QR Code");if(!K)K=$;else if(K<$)throw Error(` |
| 6121 | The chosen QR Code version cannot contain this amount of data. |
| 6122 | Minimum version required to store current data is: `+$+`. |
| 6123 | `);let A=MWY(K,_,Y),O=LF8.getSymbolSize(K),w=new KWY(O);if(OWY(w,K),wWY(w),jWY(w,K),GK7(w,_,0),K>=7)HWY(w,K);if(JWY(w,A),isNaN(z))z=TK7.getBestMask(w,GK7.bind(null,w,_));return TK7.applyMask(z,w),GK7(w,_,z),{modules:w,version:K,errorCorrectionLevel:_,maskPattern:z,segments:Y}}WWY.create=function(K,_){if(typeof K>"u"||K==="")throw Error("No input text");let z=fK7.M,Y,$;if(typeof _<"u"){if(z=fK7.from(_.errorCorrectionLevel,fK7.M),Y=EF8.from(_.version),$=TK7.from(_.maskPattern),_.toSJISFunc)LF8.setToSJISFunction(_.toSJISFunc)}return PWY(K,Y,z,$)}});var VK7=m((CJ2,FEK)=>{var fWY=U6("util"),gEK=U6("stream"),kp=FEK.exports=function(){gEK.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};fWY.inherits(kp,gEK);kp.prototype.read=function(q,K){this._reads.push({length:Math.abs(q),allowLess:q<0,func:K}),process.nextTick(function(){if(this._process(),this._paused&&this._reads&&this._reads.length>0)this._paused=!1,this.emit("drain")}.bind(this))};kp.prototype.write=function(q,K){if(!this.writable)return this.emit("error",Error("Stream not writable")),!1;let _;if(Buffer.isBuffer(q))_=q;else _=Buffer.from(q,K||this._encoding);if(this._buffers.push(_),this._buffered+=_.length,this._process(),this._reads&&this._reads.length===0)this._paused=!0;return this.writable&&!this._paused};kp.prototype.end=function(q,K){if(q)this.write(q,K);if(this.writable=!1,!this._buffers)return;if(this._buffers.length===0)this._end();else this._buffers.push(null),this._process()};kp.prototype.destroySoon=kp.prototype.end;kp.prototype._end=function(){if(this._reads.length>0)this.emit("error",Error("Unexpected end of input"));this.destroy()};kp.prototype.destroy=function(){if(!this._buffers)return;this.writable=!1,this._reads=null,this._buffers=null,this.emit("close")};kp.prototype._processReadAllowingLess=function(q){this._reads.shift();let K=this._buffers[0];if(K.length>q.length)this._buffered-=q.length,this._buffers[0]=K.slice(q.length),q.func.call(this,K.slice(0,q.length));else this._buffered-=K.length,this._buffers.shift(),q.func.call(this,K)};kp.prototype._processRead=function(q){this._reads.shift();let K=0,_=0,z=Buffer.alloc(q.length);while(K<q.length){let Y=this._buffers[_++],$=Math.min(Y.length,q.length-K);if(Y.copy(z,K,0,$),K+=$,$!==Y.length)this._buffers[--_]=Y.slice($)}if(_>0)this._buffers.splice(0,_);this._buffered-=q.length,q.func.call(this,z)};kp.prototype._process=function(){try{while(this._buffered>0&&this._reads&&this._reads.length>0){let q=this._reads[0];if(q.allowLess)this._processReadAllowingLess(q);else if(this._buffered>=q.length)this._processRead(q);else break}if(this._buffers&&!this.writable)this._end()}catch(q){this.emit("error",q)}}});var NK7=m((ZWY)=>{var L56=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];ZWY.getImagePasses=function(q,K){let _=[],z=q%8,Y=K%8,$=(q-z)/8,A=(K-Y)/8;for(let O=0;O<L56.length;O++){let w=L56[O],j=$*w.x.length,H=A*w.y.length;for(let J=0;J<w.x.length;J++)if(w.x[J]<z)j++;else break;for(let J=0;J<w.y.length;J++)if(w.y[J]<Y)H++;else break;if(j>0&&H>0)_.push({width:j,height:H,index:O})}return _};ZWY.getInterlaceIterator=function(q){return function(K,_,z){let Y=K%L56[z].x.length,$=(K-Y)/L56[z].x.length*8+L56[z].x[Y],A=_%L56[z].y.length,O=(_-A)/L56[z].y.length*8+L56[z].y[A];return $*4+O*q*4}}});var yK7=m((xJ2,UEK)=>{UEK.exports=function(K,_,z){let Y=K+_-z,$=Math.abs(Y-K),A=Math.abs(Y-_),O=Math.abs(Y-z);if($<=A&&$<=O)return K;if(A<=O)return _;return z}});var EK7=m((IJ2,dEK)=>{var vWY=NK7(),kWY=yK7();function QEK(q,K,_){let z=q*K;if(_!==8)z=Math.ceil(z/(8/_));return z}var jS6=dEK.exports=function(q,K){let{width:_,height:z,interlace:Y,bpp:$,depth:A}=q;if(this.read=K.read,this.write=K.write,this.complete=K.complete,this._imageIndex=0,this._images=[],Y){let O=vWY.getImagePasses(_,z);for(let w=0;w<O.length;w++)this._images.push({byteWidth:QEK(O[w].width,$,A),height:O[w].height,lineIndex:0})}else this._images.push({byteWidth:QEK(_,$,A),height:z,lineIndex:0});if(A===8)this._xComparison=$;else if(A===16)this._xComparison=$*2;else this._xComparison=1};jS6.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))};jS6.prototype._unFilterType1=function(q,K,_){let z=this._xComparison,Y=z-1;for(let $=0;$<_;$++){let A=q[1+$],O=$>Y?K[$-z]:0;K[$]=A+O}};jS6.prototype._unFilterType2=function(q,K,_){let z=this._lastLine;for(let Y=0;Y<_;Y++){let $=q[1+Y],A=z?z[Y]:0;K[Y]=$+A}};jS6.prototype._unFilterType3=function(q,K,_){let z=this._xComparison,Y=z-1,$=this._lastLine;for(let A=0;A<_;A++){let O=q[1+A],w=$?$[A]:0,j=A>Y?K[A-z]:0,H=Math.floor((j+w)/2);K[A]=O+H}};jS6.prototype._unFilterType4=function(q,K,_){let z=this._xComparison,Y=z-1,$=this._lastLine;for(let A=0;A<_;A++){let O=q[1+A],w=$?$[A]:0,j=A>Y?K[A-z]:0,H=A>Y&&$?$[A-z]:0,J=kWY(j,w,H);K[A]=O+J}};jS6.prototype._reverseFilterLine=function(q){let K=q[0],_,z=this._images[this._imageIndex],Y=z.byteWidth;if(K===0)_=q.slice(1,Y+1);else switch(_=Buffer.alloc(Y),K){case 1:this._unFilterType1(q,_,Y);break;case 2:this._unFilterType2(q,_,Y);break;case 3:this._unFilterType3(q,_,Y);break;case 4:this._unFilterType4(q,_,Y);break;default:throw Error("Unrecognised filter type - "+K)}if(this.write(_),z.lineIndex++,z.lineIndex>=z.height)this._lastLine=null,this._imageIndex++,z=this._images[this._imageIndex];else this._lastLine=_;if(z)this.read(z.byteWidth+1,this._reverseFilterLine.bind(this));else this._lastLine=null,this.complete()}});var nEK=m((uJ2,lEK)=>{var VWY=U6("util"),cEK=VK7(),NWY=EK7(),yWY=lEK.exports=function(q){cEK.call(this);let K=[],_=this;this._filter=new NWY(q,{read:this.read.bind(this),write:function(z){K.push(z)},complete:function(){_.emit("complete",Buffer.concat(K))}}),this._filter.start()};VWY.inherits(yWY,cEK)});var HS6=m((mJ2,iEK)=>{iEK.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}});var hK7=m((pJ2,rEK)=>{var LK7=[];(function(){for(let q=0;q<256;q++){let K=q;for(let _=0;_<8;_++)if(K&1)K=3988292384^K>>>1;else K=K>>>1;LK7[q]=K}})();var RK7=rEK.exports=function(){this._crc=-1};RK7.prototype.write=function(q){for(let K=0;K<q.length;K++)this._crc=LK7[(this._crc^q[K])&255]^this._crc>>>8;return!0};RK7.prototype.crc32=function(){return this._crc^-1};RK7.crc32=function(q){let K=-1;for(let _=0;_<q.length;_++)K=LK7[(K^q[_])&255]^K>>>8;return K^-1}});var SK7=m((BJ2,oEK)=>{var zW=HS6(),EWY=hK7(),nD=oEK.exports=function(q,K){this._options=q,q.checkCRC=q.checkCRC!==!1,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[zW.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[zW.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[zW.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[zW.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[zW.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[zW.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=K.read,this.error=K.error,this.metadata=K.metadata,this.gamma=K.gamma,this.transColor=K.transColor,this.palette=K.palette,this.parsed=K.parsed,this.inflateData=K.inflateData,this.finished=K.finished,this.simpleTransparency=K.simpleTransparency,this.headersFinished=K.headersFinished||function(){}};nD.prototype.start=function(){this.read(zW.PNG_SIGNATURE.length,this._parseSignature.bind(this))};nD.prototype._parseSignature=function(q){let K=zW.PNG_SIGNATURE;for(let _=0;_<K.length;_++)if(q[_]!==K[_]){this.error(Error("Invalid file signature"));return}this.read(8,this._parseChunkBegin.bind(this))};nD.prototype._parseChunkBegin=function(q){let K=q.readUInt32BE(0),_=q.readUInt32BE(4),z="";for(let $=4;$<8;$++)z+=String.fromCharCode(q[$]);let Y=Boolean(q[4]&32);if(!this._hasIHDR&&_!==zW.TYPE_IHDR){this.error(Error("Expected IHDR on beggining"));return}if(this._crc=new EWY,this._crc.write(Buffer.from(z)),this._chunks[_])return this._chunks[_](K);if(!Y){this.error(Error("Unsupported critical chunk type "+z));return}this.read(K+4,this._skipChunk.bind(this))};nD.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))};nD.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))};nD.prototype._parseChunkEnd=function(q){let K=q.readInt32BE(0),_=this._crc.crc32();if(this._options.checkCRC&&_!==K){this.error(Error("Crc error - "+K+" - "+_));return}if(!this._hasIEND)this.read(8,this._parseChunkBegin.bind(this))};nD.prototype._handleIHDR=function(q){this.read(q,this._parseIHDR.bind(this))};nD.prototype._parseIHDR=function(q){this._crc.write(q);let K=q.readUInt32BE(0),_=q.readUInt32BE(4),z=q[8],Y=q[9],$=q[10],A=q[11],O=q[12];if(z!==8&&z!==4&&z!==2&&z!==1&&z!==16){this.error(Error("Unsupported bit depth "+z));return}if(!(Y in zW.COLORTYPE_TO_BPP_MAP)){this.error(Error("Unsupported color type"));return}if($!==0){this.error(Error("Unsupported compression method"));return}if(A!==0){this.error(Error("Unsupported filter method"));return}if(O!==0&&O!==1){this.error(Error("Unsupported interlace method"));return}this._colorType=Y;let w=zW.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:K,height:_,depth:z,interlace:Boolean(O),palette:Boolean(Y&zW.COLORTYPE_PALETTE),color:Boolean(Y&zW.COLORTYPE_COLOR),alpha:Boolean(Y&zW.COLORTYPE_ALPHA),bpp:w,colorType:Y}),this._handleChunkEnd()};nD.prototype._handlePLTE=function(q){this.read(q,this._parsePLTE.bind(this))};nD.prototype._parsePLTE=function(q){this._crc.write(q);let K=Math.floor(q.length/3);for(let _=0;_<K;_++)this._palette.push([q[_*3],q[_*3+1],q[_*3+2],255]);this.palette(this._palette),this._handleChunkEnd()};nD.prototype._handleTRNS=function(q){this.simpleTransparency(),this.read(q,this._parseTRNS.bind(this))};nD.prototype._parseTRNS=function(q){if(this._crc.write(q),this._colorType===zW.COLORTYPE_PALETTE_COLOR){if(this._palette.length===0){this.error(Error("Transparency chunk must be after palette"));return}if(q.length>this._palette.length){this.error(Error("More transparent colors than palette size"));return}for(let K=0;K<q.length;K++)this._palette[K][3]=q[K];this.palette(this._palette)}if(this._colorType===zW.COLORTYPE_GRAYSCALE)this.transColor([q.readUInt16BE(0)]);if(this._colorType===zW.COLORTYPE_COLOR)this.transColor([q.readUInt16BE(0),q.readUInt16BE(2),q.readUInt16BE(4)]);this._handleChunkEnd()};nD.prototype._handleGAMA=function(q){this.read(q,this._parseGAMA.bind(this))};nD.prototype._parseGAMA=function(q){this._crc.write(q),this.gamma(q.readUInt32BE(0)/zW.GAMMA_DIVISION),this._handleChunkEnd()};nD.prototype._handleIDAT=function(q){if(!this._emittedHeadersFinished)this._emittedHeadersFinished=!0,this.headersFinished();this.read(-q,this._parseIDAT.bind(this,q))};nD.prototype._parseIDAT=function(q,K){if(this._crc.write(K),this._colorType===zW.COLORTYPE_PALETTE_COLOR&&this._palette.length===0)throw Error("Expected palette not found");this.inflateData(K);let _=q-K.length;if(_>0)this._handleIDAT(_);else this._handleChunkEnd()};nD.prototype._handleIEND=function(q){this.read(q,this._parseIEND.bind(this))};nD.prototype._parseIEND=function(q){if(this._crc.write(q),this._hasIEND=!0,this._handleChunkEnd(),this.finished)this.finished()}});var CK7=m((bWY)=>{var aEK=NK7(),LWY=[function(){},function(q,K,_,z){if(z===K.length)throw Error("Ran out of data");let Y=K[z];q[_]=Y,q[_+1]=Y,q[_+2]=Y,q[_+3]=255},function(q,K,_,z){if(z+1>=K.length)throw Error("Ran out of data");let Y=K[z];q[_]=Y,q[_+1]=Y,q[_+2]=Y,q[_+3]=K[z+1]},function(q,K,_,z){if(z+2>=K.length)throw Error("Ran out of data");q[_]=K[z],q[_+1]=K[z+1],q[_+2]=K[z+2],q[_+3]=255},function(q,K,_,z){if(z+3>=K.length)throw Error("Ran out of data");q[_]=K[z],q[_+1]=K[z+1],q[_+2]=K[z+2],q[_+3]=K[z+3]}],RWY=[function(){},function(q,K,_,z){let Y=K[0];q[_]=Y,q[_+1]=Y,q[_+2]=Y,q[_+3]=z},function(q,K,_){let z=K[0];q[_]=z,q[_+1]=z,q[_+2]=z,q[_+3]=K[1]},function(q,K,_,z){q[_]=K[0],q[_+1]=K[1],q[_+2]=K[2],q[_+3]=z},function(q,K,_){q[_]=K[0],q[_+1]=K[1],q[_+2]=K[2],q[_+3]=K[3]}];function hWY(q,K){let _=[],z=0;function Y(){if(z===q.length)throw Error("Ran out of data");let $=q[z];z++;let A,O,w,j,H,J,M,X;switch(K){default:throw Error("unrecognised depth");case 16:M=q[z],z++,_.push(($<<8)+M);break;case 4:M=$&15,X=$>>4,_.push(X,M);break;case 2:H=$&3,J=$>>2&3,M=$>>4&3,X=$>>6&3,_.push(X,M,J,H);break;case 1:A=$&1,O=$>>1&1,w=$>>2&1,j=$>>3&1,H=$>>4&1,J=$>>5&1,M=$>>6&1,X=$>>7&1,_.push(X,M,J,H,j,w,O,A);break}}return{get:function($){while(_.length<$)Y();let A=_.slice(0,$);return _=_.slice($),A},resetAfterLine:function(){_.length=0},end:function(){if(z!==q.length)throw Error("extra data found")}}}function SWY(q,K,_,z,Y,$){let{width:A,height:O,index:w}=q;for(let j=0;j<O;j++)for(let H=0;H<A;H++){let J=_(H,j,w);LWY[z](K,Y,J,$),$+=z}return $}function CWY(q,K,_,z,Y,$){let{width:A,height:O,index:w}=q;for(let j=0;j<O;j++){for(let H=0;H<A;H++){let J=Y.get(z),M=_(H,j,w);RWY[z](K,J,M,$)}Y.resetAfterLine()}}bWY.dataToBitMap=function(q,K){let{width:_,height:z,depth:Y,bpp:$,interlace:A}=K,O;if(Y!==8)O=hWY(q,Y);let w;if(Y<=8)w=Buffer.alloc(_*z*4);else w=new Uint16Array(_*z*4);let j=Math.pow(2,Y)-1,H=0,J,M;if(A)J=aEK.getImagePasses(_,z),M=aEK.getInterlaceIterator(_,z);else{let X=0;M=function(){let P=X;return X+=4,P},J=[{width:_,height:z}]}for(let X=0;X<J.length;X++)if(Y===8)H=SWY(J[X],w,M,$,q,H);else CWY(J[X],w,M,$,O,j);if(Y===8){if(H!==q.length)throw Error("extra data found")}else O.end();return w}});var bK7=m((FJ2,sEK)=>{function IWY(q,K,_,z,Y){let $=0;for(let A=0;A<z;A++)for(let O=0;O<_;O++){let w=Y[q[$]];if(!w)throw Error("index "+q[$]+" not in palette");for(let j=0;j<4;j++)K[$+j]=w[j];$+=4}}function uWY(q,K,_,z,Y){let $=0;for(let A=0;A<z;A++)for(let O=0;O<_;O++){let w=!1;if(Y.length===1){if(Y[0]===q[$])w=!0}else if(Y[0]===q[$]&&Y[1]===q[$+1]&&Y[2]===q[$+2])w=!0;if(w)for(let j=0;j<4;j++)K[$+j]=0;$+=4}}function mWY(q,K,_,z,Y){let $=255,A=Math.pow(2,Y)-1,O=0;for(let w=0;w<z;w++)for(let j=0;j<_;j++){for(let H=0;H<4;H++)K[O+H]=Math.floor(q[O+H]*$/A+0.5);O+=4}}sEK.exports=function(q,K){let{depth:_,width:z,height:Y,colorType:$,transColor:A,palette:O}=K,w=q;if($===3)IWY(q,w,z,Y,O);else{if(A)uWY(q,w,z,Y,A);if(_!==8){if(_===16)w=Buffer.alloc(z*Y*4);mWY(q,w,z,Y,_)}}return w}});var qLK=m((UJ2,eEK)=>{var pWY=U6("util"),xK7=U6("zlib"),tEK=VK7(),BWY=nEK(),gWY=SK7(),FWY=CK7(),UWY=bK7(),Td=eEK.exports=function(q){tEK.call(this),this._parser=new gWY(q,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=q,this.writable=!0,this._parser.start()};pWY.inherits(Td,tEK);Td.prototype._handleError=function(q){if(this.emit("error",q),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy)this._inflate.destroy();if(this._filter)this._filter.destroy(),this._filter.on("error",function(){});this.errord=!0};Td.prototype._inflateData=function(q){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=xK7.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let _=((this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1)*this._bitmapInfo.height,z=Math.max(_,xK7.Z_MIN_CHUNK);this._inflate=xK7.createInflate({chunkSize:z});let Y=_,$=this.emit.bind(this,"error");this._inflate.on("error",function(O){if(!Y)return;$(O)}),this._filter.on("complete",this._complete.bind(this));let A=this._filter.write.bind(this._filter);this._inflate.on("data",function(O){if(!Y)return;if(O.length>Y)O=O.slice(0,Y);Y-=O.length,A(O)}),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(q)};Td.prototype._handleMetaData=function(q){this._metaData=q,this._bitmapInfo=Object.create(q),this._filter=new BWY(this._bitmapInfo)};Td.prototype._handleTransColor=function(q){this._bitmapInfo.transColor=q};Td.prototype._handlePalette=function(q){this._bitmapInfo.palette=q};Td.prototype._simpleTransparency=function(){this._metaData.alpha=!0};Td.prototype._headersFinished=function(){this.emit("metadata",this._metaData)};Td.prototype._finished=function(){if(this.errord)return;if(!this._inflate)this.emit("error","No Inflate block");else this._inflate.end()};Td.prototype._complete=function(q){if(this.errord)return;let K;try{let _=FWY.dataToBitMap(q,this._bitmapInfo);K=UWY(_,this._bitmapInfo),_=null}catch(_){this._handleError(_);return}this.emit("parsed",K)}});var _LK=m((QJ2,KLK)=>{var Ub=HS6();KLK.exports=function(q,K,_,z){let Y=[Ub.COLORTYPE_COLOR_ALPHA,Ub.COLORTYPE_ALPHA].indexOf(z.colorType)!==-1;if(z.colorType===z.inputColorType){let P=function(){let W=new ArrayBuffer(2);return new DataView(W).setInt16(0,256,!0),new Int16Array(W)[0]!==256}();if(z.bitDepth===8||z.bitDepth===16&&P)return q}let $=z.bitDepth!==16?q:new Uint16Array(q.buffer),A=255,O=Ub.COLORTYPE_TO_BPP_MAP[z.inputColorType];if(O===4&&!z.inputHasAlpha)O=3;let w=Ub.COLORTYPE_TO_BPP_MAP[z.colorType];if(z.bitDepth===16)A=65535,w*=2;let j=Buffer.alloc(K*_*w),H=0,J=0,M=z.bgColor||{};if(M.red===void 0)M.red=A;if(M.green===void 0)M.green=A;if(M.blue===void 0)M.blue=A;function X(){let P,W,D,f=A;switch(z.inputColorType){case Ub.COLORTYPE_COLOR_ALPHA:f=$[H+3],P=$[H],W=$[H+1],D=$[H+2];break;case Ub.COLORTYPE_COLOR:P=$[H],W=$[H+1],D=$[H+2];break;case Ub.COLORTYPE_ALPHA:f=$[H+1],P=$[H],W=P,D=P;break;case Ub.COLORTYPE_GRAYSCALE:P=$[H],W=P,D=P;break;default:throw Error("input color type:"+z.inputColorType+" is not supported at present")}if(z.inputHasAlpha){if(!Y)f/=A,P=Math.min(Math.max(Math.round((1-f)*M.red+f*P),0),A),W=Math.min(Math.max(Math.round((1-f)*M.green+f*W),0),A),D=Math.min(Math.max(Math.round((1-f)*M.blue+f*D),0),A)}return{red:P,green:W,blue:D,alpha:f}}for(let P=0;P<_;P++)for(let W=0;W<K;W++){let D=X($,H);switch(z.colorType){case Ub.COLORTYPE_COLOR_ALPHA:case Ub.COLORTYPE_COLOR:if(z.bitDepth===8){if(j[J]=D.red,j[J+1]=D.green,j[J+2]=D.blue,Y)j[J+3]=D.alpha}else if(j.writeUInt16BE(D.red,J),j.writeUInt16BE(D.green,J+2),j.writeUInt16BE(D.blue,J+4),Y)j.writeUInt16BE(D.alpha,J+6);break;case Ub.COLORTYPE_ALPHA:case Ub.COLORTYPE_GRAYSCALE:{let f=(D.red+D.green+D.blue)/3;if(z.bitDepth===8){if(j[J]=f,Y)j[J+1]=D.alpha}else if(j.writeUInt16BE(f,J),Y)j.writeUInt16BE(D.alpha,J+2);break}default:throw Error("unrecognised color Type "+z.colorType)}H+=O,J+=w}return j}});var $LK=m((dJ2,YLK)=>{var zLK=yK7();function QWY(q,K,_,z,Y){for(let $=0;$<_;$++)z[Y+$]=q[K+$]}function dWY(q,K,_){let z=0,Y=K+_;for(let $=K;$<Y;$++)z+=Math.abs(q[$]);return z}function cWY(q,K,_,z,Y,$){for(let A=0;A<_;A++){let O=A>=$?q[K+A-$]:0,w=q[K+A]-O;z[Y+A]=w}}function lWY(q,K,_,z){let Y=0;for(let $=0;$<_;$++){let A=$>=z?q[K+$-z]:0,O=q[K+$]-A;Y+=Math.abs(O)}return Y}function nWY(q,K,_,z,Y){for(let $=0;$<_;$++){let A=K>0?q[K+$-_]:0,O=q[K+$]-A;z[Y+$]=O}}function iWY(q,K,_){let z=0,Y=K+_;for(let $=K;$<Y;$++){let A=K>0?q[$-_]:0,O=q[$]-A;z+=Math.abs(O)}return z}function rWY(q,K,_,z,Y,$){for(let A=0;A<_;A++){let O=A>=$?q[K+A-$]:0,w=K>0?q[K+A-_]:0,j=q[K+A]-(O+w>>1);z[Y+A]=j}}function oWY(q,K,_,z){let Y=0;for(let $=0;$<_;$++){let A=$>=z?q[K+$-z]:0,O=K>0?q[K+$-_]:0,w=q[K+$]-(A+O>>1);Y+=Math.abs(w)}return Y}function aWY(q,K,_,z,Y,$){for(let A=0;A<_;A++){let O=A>=$?q[K+A-$]:0,w=K>0?q[K+A-_]:0,j=K>0&&A>=$?q[K+A-(_+$)]:0,H=q[K+A]-zLK(O,w,j);z[Y+A]=H}}function sWY(q,K,_,z){let Y=0;for(let $=0;$<_;$++){let A=$>=z?q[K+$-z]:0,O=K>0?q[K+$-_]:0,w=K>0&&$>=z?q[K+$-(_+z)]:0,j=q[K+$]-zLK(A,O,w);Y+=Math.abs(j)}return Y}var tWY={0:QWY,1:cWY,2:nWY,3:rWY,4:aWY},eWY={0:dWY,1:lWY,2:iWY,3:oWY,4:sWY};YLK.exports=function(q,K,_,z,Y){let $;if(!("filterType"in z)||z.filterType===-1)$=[0,1,2,3,4];else if(typeof z.filterType==="number")$=[z.filterType];else throw Error("unrecognised filter types");if(z.bitDepth===16)Y*=2;let A=K*Y,O=0,w=0,j=Buffer.alloc((A+1)*_),H=$[0];for(let J=0;J<_;J++){if($.length>1){let M=1/0;for(let X=0;X<$.length;X++){let P=eWY[$[X]](q,w,A,Y);if(P<M)H=$[X],M=P}}j[O]=H,O++,tWY[H](q,w,A,j,O,Y),O+=A,w+=A}return j}});var IK7=m((cJ2,ALK)=>{var jT=HS6(),qDY=hK7(),KDY=_LK(),_DY=$LK(),zDY=U6("zlib"),R56=ALK.exports=function(q){if(this._options=q,q.deflateChunkSize=q.deflateChunkSize||32768,q.deflateLevel=q.deflateLevel!=null?q.deflateLevel:9,q.deflateStrategy=q.deflateStrategy!=null?q.deflateStrategy:3,q.inputHasAlpha=q.inputHasAlpha!=null?q.inputHasAlpha:!0,q.deflateFactory=q.deflateFactory||zDY.createDeflate,q.bitDepth=q.bitDepth||8,q.colorType=typeof q.colorType==="number"?q.colorType:jT.COLORTYPE_COLOR_ALPHA,q.inputColorType=typeof q.inputColorType==="number"?q.inputColorType:jT.COLORTYPE_COLOR_ALPHA,[jT.COLORTYPE_GRAYSCALE,jT.COLORTYPE_COLOR,jT.COLORTYPE_COLOR_ALPHA,jT.COLORTYPE_ALPHA].indexOf(q.colorType)===-1)throw Error("option color type:"+q.colorType+" is not supported at present");if([jT.COLORTYPE_GRAYSCALE,jT.COLORTYPE_COLOR,jT.COLORTYPE_COLOR_ALPHA,jT.COLORTYPE_ALPHA].indexOf(q.inputColorType)===-1)throw Error("option input color type:"+q.inputColorType+" is not supported at present");if(q.bitDepth!==8&&q.bitDepth!==16)throw Error("option bit depth:"+q.bitDepth+" is not supported at present")};R56.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}};R56.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())};R56.prototype.filterData=function(q,K,_){let z=KDY(q,K,_,this._options),Y=jT.COLORTYPE_TO_BPP_MAP[this._options.colorType];return _DY(z,K,_,this._options,Y)};R56.prototype._packChunk=function(q,K){let _=K?K.length:0,z=Buffer.alloc(_+12);if(z.writeUInt32BE(_,0),z.writeUInt32BE(q,4),K)K.copy(z,8);return z.writeInt32BE(qDY.crc32(z.slice(4,z.length-4)),z.length-4),z};R56.prototype.packGAMA=function(q){let K=Buffer.alloc(4);return K.writeUInt32BE(Math.floor(q*jT.GAMMA_DIVISION),0),this._packChunk(jT.TYPE_gAMA,K)};R56.prototype.packIHDR=function(q,K){let _=Buffer.alloc(13);return _.writeUInt32BE(q,0),_.writeUInt32BE(K,4),_[8]=this._options.bitDepth,_[9]=this._options.colorType,_[10]=0,_[11]=0,_[12]=0,this._packChunk(jT.TYPE_IHDR,_)};R56.prototype.packIDAT=function(q){return this._packChunk(jT.TYPE_IDAT,q)};R56.prototype.packIEND=function(){return this._packChunk(jT.TYPE_IEND,null)}});var HLK=m((lJ2,jLK)=>{var YDY=U6("util"),OLK=U6("stream"),$DY=HS6(),ADY=IK7(),wLK=jLK.exports=function(q){OLK.call(this);let K=q||{};this._packer=new ADY(K),this._deflate=this._packer.createDeflate(),this.readable=!0};YDY.inherits(wLK,OLK);wLK.prototype.pack=function(q,K,_,z){if(this.emit("data",Buffer.from($DY.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(K,_)),z)this.emit("data",this._packer.packGAMA(z));let Y=this._packer.filterData(q,K,_);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",function($){this.emit("data",this._packer.packIDAT($))}.bind(this)),this._deflate.on("end",function(){this.emit("data",this._packer.packIEND()),this.emit("end")}.bind(this)),this._deflate.end(Y)}});var DLK=m((n78,WLK)=>{var JLK=U6("assert").ok,JS6=U6("zlib"),ODY=U6("util"),MLK=U6("buffer").kMaxLength;function sH6(q){if(!(this instanceof sH6))return new sH6(q);if(q&&q.chunkSize<JS6.Z_MIN_CHUNK)q.chunkSize=JS6.Z_MIN_CHUNK;if(JS6.Inflate.call(this,q),this._offset=this._offset===void 0?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,q&&q.maxLength!=null)this._maxLength=q.maxLength}function wDY(q){return new sH6(q)}function XLK(q,K){if(K)process.nextTick(K);if(!q._handle)return;q._handle.close(),q._handle=null}sH6.prototype._processChunk=function(q,K,_){if(typeof _==="function")return JS6.Inflate._processChunk.call(this,q,K,_);let z=this,Y=q&&q.length,$=this._chunkSize-this._offset,A=this._maxLength,O=0,w=[],j=0,H;this.on("error",function(P){H=P});function J(P,W){if(z._hadError)return;let D=$-W;if(JLK(D>=0,"have should not go down"),D>0){let f=z._buffer.slice(z._offset,z._offset+D);if(z._offset+=D,f.length>A)f=f.slice(0,A);if(w.push(f),j+=f.length,A-=f.length,A===0)return!1}if(W===0||z._offset>=z._chunkSize)$=z._chunkSize,z._offset=0,z._buffer=Buffer.allocUnsafe(z._chunkSize);if(W===0)return O+=Y-P,Y=P,!0;return!1}JLK(this._handle,"zlib binding closed");let M;do M=this._handle.writeSync(K,q,O,Y,this._buffer,this._offset,$),M=M||this._writeState;while(!this._hadError&&J(M[0],M[1]));if(this._hadError)throw H;if(j>=MLK)throw XLK(this),RangeError("Cannot create final Buffer. It would be larger than 0x"+MLK.toString(16)+" bytes");let X=Buffer.concat(w,j);return XLK(this),X};ODY.inherits(sH6,JS6.Inflate);function jDY(q,K){if(typeof K==="string")K=Buffer.from(K);if(!(K instanceof Buffer))throw TypeError("Not a string or buffer");let _=q._finishFlushFlag;if(_==null)_=JS6.Z_FINISH;return q._processChunk(K,_)}function PLK(q,K){return jDY(new sH6(K),q)}WLK.exports=n78=PLK;n78.Inflate=sH6;n78.createInflate=wDY;n78.inflateSync=PLK});var uK7=m((nJ2,ZLK)=>{var fLK=ZLK.exports=function(q){this._buffer=q,this._reads=[]};fLK.prototype.read=function(q,K){this._reads.push({length:Math.abs(q),allowLess:q<0,func:K})};fLK.prototype.process=function(){while(this._reads.length>0&&this._buffer.length){let q=this._reads[0];if(this._buffer.length&&(this._buffer.length>=q.length||q.allowLess)){this._reads.shift();let K=this._buffer;this._buffer=K.slice(q.length),q.func.call(this,K.slice(0,q.length))}else break}if(this._reads.length>0)return Error("There are some read requests waitng on finished stream");if(this._buffer.length>0)return Error("unrecognised content at end of stream")}});var GLK=m((MDY)=>{var HDY=uK7(),JDY=EK7();MDY.process=function(q,K){let _=[],z=new HDY(q);return new JDY(K,{read:z.read.bind(z),write:function($){_.push($)},complete:function(){}}).start(),z.process(),Buffer.concat(_)}});var VLK=m((rJ2,kLK)=>{var TLK=!0,vLK=U6("zlib"),PDY=DLK();if(!vLK.deflateSync)TLK=!1;var WDY=uK7(),DDY=GLK(),fDY=SK7(),ZDY=CK7(),GDY=bK7();kLK.exports=function(q,K){if(!TLK)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let _;function z(T){_=T}let Y;function $(T){Y=T}function A(T){Y.transColor=T}function O(T){Y.palette=T}function w(){Y.alpha=!0}let j;function H(T){j=T}let J=[];function M(T){J.push(T)}let X=new WDY(q);if(new fDY(K,{read:X.read.bind(X),error:z,metadata:$,gamma:H,palette:O,transColor:A,inflateData:M,simpleTransparency:w}).start(),X.process(),_)throw _;let W=Buffer.concat(J);J.length=0;let D;if(Y.interlace)D=vLK.inflateSync(W);else{let v=((Y.width*Y.bpp*Y.depth+7>>3)+1)*Y.height;D=PDY(W,{chunkSize:v,maxLength:v})}if(W=null,!D||!D.length)throw Error("bad png - invalid inflate data response");let f=DDY.process(D,Y);W=null;let G=ZDY.dataToBitMap(f,Y);f=null;let Z=GDY(G,Y);return Y.data=Z,Y.gamma=j||0,Y}});var LLK=m((oJ2,ELK)=>{var NLK=!0,yLK=U6("zlib");if(!yLK.deflateSync)NLK=!1;var TDY=HS6(),vDY=IK7();ELK.exports=function(q,K){if(!NLK)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let z=new vDY(K||{}),Y=[];if(Y.push(Buffer.from(TDY.PNG_SIGNATURE)),Y.push(z.packIHDR(q.width,q.height)),q.gamma)Y.push(z.packGAMA(q.gamma));let $=z.filterData(q.data,q.width,q.height),A=yLK.deflateSync($,z.getDeflateOptions());if($=null,!A||!A.length)throw Error("bad png - invalid compressed data response");return Y.push(z.packIDAT(A)),Y.push(z.packIEND()),Buffer.concat(Y)}});var RLK=m((NDY)=>{var kDY=VLK(),VDY=LLK();NDY.read=function(q,K){return kDY(q,K||{})};NDY.write=function(q,K){return VDY(q,K)}});var SLK=m((CDY)=>{var LDY=U6("util"),hLK=U6("stream"),RDY=qLK(),hDY=HLK(),SDY=RLK(),Hk=CDY.PNG=function(q){if(hLK.call(this),q=q||{},this.width=q.width|0,this.height=q.height|0,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,q.fill&&this.data)this.data.fill(0);this.gamma=0,this.readable=this.writable=!0,this._parser=new RDY(q),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",function(K){this.data=K,this.emit("parsed",K)}.bind(this)),this._packer=new hDY(q),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};LDY.inherits(Hk,hLK);Hk.sync=SDY;Hk.prototype.pack=function(){if(!this.data||!this.data.length)return this.emit("error","No data provided"),this;return process.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this};Hk.prototype.parse=function(q,K){if(K){let _,z;_=function(Y){this.removeListener("error",z),this.data=Y,K(null,this)}.bind(this),z=function(Y){this.removeListener("parsed",_),K(Y,null)}.bind(this),this.once("parsed",_),this.once("error",z)}return this.end(q),this};Hk.prototype.write=function(q){return this._parser.write(q),!0};Hk.prototype.end=function(q){this._parser.end(q)};Hk.prototype._metadata=function(q){this.width=q.width,this.height=q.height,this.emit("metadata",q)};Hk.prototype._gamma=function(q){this.gamma=q};Hk.prototype._handleClose=function(){if(!this._parser.writable&&!this._packer.readable)this.emit("close")};Hk.bitblt=function(q,K,_,z,Y,$,A,O){if(_|=0,z|=0,Y|=0,$|=0,A|=0,O|=0,_>q.width||z>q.height||_+Y>q.width||z+$>q.height)throw Error("bitblt reading outside image");if(A>K.width||O>K.height||A+Y>K.width||O+$>K.height)throw Error("bitblt writing outside image");for(let w=0;w<$;w++)q.data.copy(K.data,(O+w)*K.width+A<<2,(z+w)*q.width+_<<2,(z+w)*q.width+_+Y<<2)};Hk.prototype.bitblt=function(q,K,_,z,Y,$,A){return Hk.bitblt(this,q,K,_,z,Y,$,A),this};Hk.adjustGamma=function(q){if(q.gamma){for(let K=0;K<q.height;K++)for(let _=0;_<q.width;_++){let z=q.width*K+_<<2;for(let Y=0;Y<3;Y++){let $=q.data[z+Y]/255;$=Math.pow($,0.45454545454545453/q.gamma),q.data[z+Y]=Math.round($*255)}}q.gamma=0}};Hk.prototype.adjustGamma=function(){Hk.adjustGamma(this)}});var i78=m((bDY)=>{function CLK(q){if(typeof q==="number")q=q.toString();if(typeof q!=="string")throw Error("Color should be defined as hex string");let K=q.slice().replace("#","").split("");if(K.length<3||K.length===5||K.length>8)throw Error("Invalid hex color: "+q);if(K.length===3||K.length===4)K=Array.prototype.concat.apply([],K.map(function(z){return[z,z]}));if(K.length===6)K.push("F","F");let _=parseInt(K.join(""),16);return{r:_>>24&255,g:_>>16&255,b:_>>8&255,a:_&255,hex:"#"+K.slice(0,6).join("")}}bDY.getOptions=function(K){if(!K)K={};if(!K.color)K.color={};let _=typeof K.margin>"u"||K.margin===null||K.margin<0?4:K.margin,z=K.width&&K.width>=21?K.width:void 0,Y=K.scale||4;return{width:z,scale:z?4:Y,margin:_,color:{dark:CLK(K.color.dark||"#000000ff"),light:CLK(K.color.light||"#ffffffff")},type:K.type,rendererOpts:K.rendererOpts||{}}};bDY.getScale=function(K,_){return _.width&&_.width>=K+_.margin*2?_.width/(K+_.margin*2):_.scale};bDY.getImageWidth=function(K,_){let z=bDY.getScale(K,_);return Math.floor((K+_.margin*2)*z)};bDY.qrToImageData=function(K,_,z){let Y=_.modules.size,$=_.modules.data,A=bDY.getScale(Y,z),O=Math.floor((Y+z.margin*2)*A),w=z.margin*A,j=[z.color.light,z.color.dark];for(let H=0;H<O;H++)for(let J=0;J<O;J++){let M=(H*O+J)*4,X=z.color.light;if(H>=w&&J>=w&&H<O-w&&J<O-w){let P=Math.floor((H-w)/A),W=Math.floor((J-w)/A);X=j[$[P*Y+W]?1:0]}K[M++]=X.r,K[M++]=X.g,K[M++]=X.b,K[M]=X.a}}});var bLK=m((BDY)=>{var mDY=U6("fs"),pDY=SLK().PNG,pK7=i78();BDY.render=function(K,_){let z=pK7.getOptions(_),Y=z.rendererOpts,$=pK7.getImageWidth(K.modules.size,z);Y.width=$,Y.height=$;let A=new pDY(Y);return pK7.qrToImageData(A.data,K,z),A};BDY.renderToDataURL=function(K,_,z){if(typeof z>"u")z=_,_=void 0;BDY.renderToBuffer(K,_,function(Y,$){if(Y)z(Y);let A="data:image/png;base64,";A+=$.toString("base64"),z(null,A)})};BDY.renderToBuffer=function(K,_,z){if(typeof z>"u")z=_,_=void 0;let Y=BDY.render(K,_),$=[];Y.on("error",z),Y.on("data",function(A){$.push(A)}),Y.on("end",function(){z(null,Buffer.concat($))}),Y.pack()};BDY.renderToFile=function(K,_,z,Y){if(typeof Y>"u")Y=z,z=void 0;let $=!1,A=(...w)=>{if($)return;$=!0,Y.apply(null,w)},O=mDY.createWriteStream(K);O.on("error",A),O.on("close",A),BDY.renderToFileStream(O,_,z)};BDY.renderToFileStream=function(K,_,z){BDY.render(_,z).pack().pipe(K)}});var ILK=m((iDY)=>{var dDY=i78(),cDY={WW:" ",WB:"▄",BB:"█",BW:"▀"},lDY={BB:" ",BW:"▄",WW:"█",WB:"▀"};function nDY(q,K,_){if(q&&K)return _.BB;if(q&&!K)return _.BW;if(!q&&K)return _.WB;return _.WW}iDY.render=function(q,K,_){let z=dDY.getOptions(K),Y=cDY;if(z.color.dark.hex==="#ffffff"||z.color.light.hex==="#000000")Y=lDY;let $=q.modules.size,A=q.modules.data,O="",w=Array($+z.margin*2+1).join(Y.WW);w=Array(z.margin/2+1).join(w+` |
| 6124 | `);let j=Array(z.margin+1).join(Y.WW);O+=w;for(let H=0;H<$;H+=2){O+=j;for(let J=0;J<$;J++){let M=A[H*$+J],X=A[(H+1)*$+J];O+=nDY(M,X,Y)}O+=j+` |
| 6125 | `}if(O+=w.slice(0,-1),typeof _==="function")_(null,O);return O};iDY.renderToFile=function(K,_,z,Y){if(typeof Y>"u")Y=z,z=void 0;let $=U6("fs"),A=iDY.render(_,z);$.writeFile(K,A,Y)}});var uLK=m((oDY)=>{oDY.render=function(q,K,_){let z=q.modules.size,Y=q.modules.data,$="\x1B[40m \x1B[0m",A="\x1B[47m \x1B[0m",O="",w=Array(z+3).join("\x1B[47m \x1B[0m"),j=Array(2).join("\x1B[47m \x1B[0m");O+=w+` |