@galacean/cli 2.0.0-alpha.16 → 2.0.0-alpha.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.bundle.cjs +1 -1
- package/dist/viewport-client/_static/{Accordion-8e8abfeb.js → Accordion-4581466b.js} +1 -1
- package/dist/viewport-client/_static/{AmbientLightAsset-20ad0c84.js → AmbientLightAsset-52dfaaf8.js} +1 -1
- package/dist/viewport-client/_static/{AnimationClipAsset-fc42dad4.js → AnimationClipAsset-a5adbe0b.js} +1 -1
- package/dist/viewport-client/_static/{AnimatorControllerAsset-2d28e356.js → AnimatorControllerAsset-1b29c766.js} +1 -1
- package/dist/viewport-client/_static/{AnimatorStore-41d7a260.js → AnimatorStore-2bd92a36.js} +1 -1
- package/dist/viewport-client/_static/{AssetViewer-ee5df0a5.js → AssetViewer-a2f4ee75.js} +1 -1
- package/dist/viewport-client/_static/{AudioAsset-4a8dee15.js → AudioAsset-f206da55.js} +1 -1
- package/dist/viewport-client/_static/{AudioComponent-b49da961.js → AudioComponent-a1e6e156.js} +1 -1
- package/dist/viewport-client/_static/{Callout-5731416b.js → Callout-a96a8430.js} +1 -1
- package/dist/viewport-client/_static/{CameraComponent-d400a082.js → CameraComponent-850a5d98.js} +1 -1
- package/dist/viewport-client/_static/{Component-49fa7a68.js → Component-964374b8.js} +1 -1
- package/dist/viewport-client/_static/{DirectLight-33282025.js → DirectLight-8734007f.js} +1 -1
- package/dist/viewport-client/_static/{FontAsset-68e03b27.js → FontAsset-29ed97fd.js} +1 -1
- package/dist/viewport-client/_static/{FormItemArray-1eb0a655.js → FormItemArray-536e9ade.js} +1 -1
- package/dist/viewport-client/_static/{GlTFAsset-f105daea.js → GlTFAsset-84f09723.js} +1 -1
- package/dist/viewport-client/_static/{IconEdit-e6cba426.js → IconEdit-493cbbb3.js} +1 -1
- package/dist/viewport-client/_static/{IconPointFilled-7903ac4b.js → IconPointFilled-71525313.js} +1 -1
- package/dist/viewport-client/_static/{LightBaseComponent-64fe62fe.js → LightBaseComponent-14ad9432.js} +1 -1
- package/dist/viewport-client/_static/{LottieAnimationComponent-5a53d9a8.js → LottieAnimationComponent-163b16fe.js} +1 -1
- package/dist/viewport-client/_static/{LottieAsset-4be66309.js → LottieAsset-898108e3.js} +1 -1
- package/dist/viewport-client/_static/{MarkdownAsset-b5fb62bf.js → MarkdownAsset-707897f5.js} +1 -1
- package/dist/viewport-client/_static/{MaterialAsset-1b309564.js → MaterialAsset-088e8e0a.js} +1 -1
- package/dist/viewport-client/_static/{MaterialInspector-0f1fa214.js → MaterialInspector-93a0838d.js} +1 -1
- package/dist/viewport-client/_static/{Menu-4b6f69f6.js → Menu-d694f08a.js} +1 -1
- package/dist/viewport-client/_static/{MeshAsset-4c7358f8.js → MeshAsset-ff94b6a7.js} +1 -1
- package/dist/viewport-client/_static/{MeshRendererBaseComponent-7d9673f0.js → MeshRendererBaseComponent-b7db519d.js} +1 -1
- package/dist/viewport-client/_static/{MeshRendererComponent-ac7bf46b.js → MeshRendererComponent-7f29ba50.js} +1 -1
- package/dist/viewport-client/_static/{MeshThumbnail-e9c08166.js → MeshThumbnail-768ca939.js} +1 -1
- package/dist/viewport-client/_static/{ParticleRendererComponent-34dd0c15.js → ParticleRendererComponent-9bcd1886.js} +1 -1
- package/dist/viewport-client/_static/{PhysicsMaterialAsset-af1ebf10.js → PhysicsMaterialAsset-291fc997.js} +1 -1
- package/dist/viewport-client/_static/{PhysicsStore-e7d36c5c.js → PhysicsStore-50022658.js} +1 -1
- package/dist/viewport-client/_static/{PointLight-651ea32e.js → PointLight-248fb1a9.js} +1 -1
- package/dist/viewport-client/_static/{PostProcessComponent-fc2f6f21.js → PostProcessComponent-cd6546b3.js} +1 -1
- package/dist/viewport-client/_static/{PrefabAsset-a6b88bbd.js → PrefabAsset-0afc28fa.js} +1 -1
- package/dist/viewport-client/_static/{PrimitiveMesh-dc3ad0fa.js → PrimitiveMesh-10b1161f.js} +1 -1
- package/dist/viewport-client/_static/{ProxyConfigs-85431ba7.js → ProxyConfigs-d85202ac.js} +1 -1
- package/dist/viewport-client/_static/{ReferencedMaterial-b96134c1.js → ReferencedMaterial-659bf0ee.js} +1 -1
- package/dist/viewport-client/_static/{RenderTargetAsset-fab94566.js → RenderTargetAsset-248f1eb5.js} +1 -1
- package/dist/viewport-client/_static/{SceneAsset-7e22b810.js → SceneAsset-c2a6f842.js} +1 -1
- package/dist/viewport-client/_static/{ShaderAsset-c9f375b5.js → ShaderAsset-d1e99a96.js} +1 -1
- package/dist/viewport-client/_static/{ShaderChunkAsset-e6717d7f.js → ShaderChunkAsset-6fc715c5.js} +1 -1
- package/dist/viewport-client/_static/{ShaderUIScriptAsset-259555e9.js → ShaderUIScriptAsset-aa3adb43.js} +1 -1
- package/dist/viewport-client/_static/{SkinnedMeshRendererComponent-d64b225e.js → SkinnedMeshRendererComponent-4a77c8d9.js} +1 -1
- package/dist/viewport-client/_static/{SpineAnimationComponent-ba68382f.js → SpineAnimationComponent-b5de1844.js} +1 -1
- package/dist/viewport-client/_static/{SpineSkeletonDataAsset-8ea5b7b8.js → SpineSkeletonDataAsset-cddcc22b.js} +1 -1
- package/dist/viewport-client/_static/{SpotLight-18d73c78.js → SpotLight-3bb8f39e.js} +1 -1
- package/dist/viewport-client/_static/{SpriteAsset-0c49dc5d.js → SpriteAsset-9b36d0ae.js} +1 -1
- package/dist/viewport-client/_static/{SpriteAtlasAsset-6461f25f.js → SpriteAtlasAsset-3f3112ca.js} +1 -1
- package/dist/viewport-client/_static/{SpriteBaseComponent-f1a5422d.js → SpriteBaseComponent-ab727e8e.js} +1 -1
- package/dist/viewport-client/_static/{SpriteMaskComponent-b2cd1787.js → SpriteMaskComponent-ed64e403.js} +1 -1
- package/dist/viewport-client/_static/{SpriteRendererComponent-503d7e55.js → SpriteRendererComponent-8afb7837.js} +1 -1
- package/dist/viewport-client/_static/{TextBaseComponent-186ad55d.js → TextBaseComponent-13689460.js} +1 -1
- package/dist/viewport-client/_static/{TextRendererComponent-cffe7c03.js → TextRendererComponent-8eb60833.js} +1 -1
- package/dist/viewport-client/_static/{TextureAsset-be48e190.js → TextureAsset-77e6000d.js} +2 -2
- package/dist/viewport-client/_static/{Tooltip-01dd51dc.js → Tooltip-c35612f0.js} +1 -1
- package/dist/viewport-client/_static/{TrailRendererComponent-2bbe404b.js → TrailRendererComponent-cabae051.js} +1 -1
- package/dist/viewport-client/_static/{TransformBaseComponent-4fd596d1.js → TransformBaseComponent-c0a6a3c8.js} +1 -1
- package/dist/viewport-client/_static/{TransformComponent-540cfdc3.js → TransformComponent-d6649e8f.js} +1 -1
- package/dist/viewport-client/_static/{XRReferenceImageAsset-b3c01eec.js → XRReferenceImageAsset-b786aca3.js} +1 -1
- package/dist/viewport-client/_static/{audio-4bf84573.js → audio-7c0ae7d6.js} +1 -1
- package/dist/viewport-client/_static/{index-7e3053d3.js → index-0487cdcf.js} +1 -1
- package/dist/viewport-client/_static/index-06fc94fa.js +1 -0
- package/dist/viewport-client/_static/{index-a6b152de.js → index-24bc6a91.js} +1 -1
- package/dist/viewport-client/_static/{index-adfb8156.js → index-48d557b0.js} +1 -1
- package/dist/viewport-client/_static/{index-07686e59.js → index-6087df7e.js} +1 -1
- package/dist/viewport-client/_static/index-6798427d.js +1 -0
- package/dist/viewport-client/_static/{index-07b22cd4.js → index-7abbe07f.js} +1 -1
- package/dist/viewport-client/_static/index-7b81c737.js +1 -0
- package/dist/viewport-client/_static/{index-f3f5cf05.js → index-8800c7e6.js} +1 -1
- package/dist/viewport-client/_static/index-8b6ebbf6.js +1 -0
- package/dist/viewport-client/_static/index-8b6efd6a.js +1 -0
- package/dist/viewport-client/_static/{index-1844727f.js → index-906d9f78.js} +1 -1
- package/dist/viewport-client/_static/{index-d7bb5fc3.js → index-b731a7fe.js} +1 -1
- package/dist/viewport-client/_static/index-bd2b1247.js +1 -0
- package/dist/viewport-client/_static/{index-3c825346.js → index-ca459192.js} +1 -1
- package/dist/viewport-client/_static/{index-c91bca3c.js → index-d07818b5.js} +3 -3
- package/dist/viewport-client/_static/{index-af55ef2b.js → index-fd599472.js} +1 -1
- package/dist/viewport-client/_static/{ktx2-encoder-486056b9.js → ktx2-encoder-5413e034.js} +1 -1
- package/dist/viewport-client/_static/{module-a20a329a.js → module-4879e776.js} +1 -1
- package/dist/viewport-client/_static/{module-ea41b53d.js → module-7c8b159f.js} +1 -1
- package/dist/viewport-client/_static/{module-b106d3a2.js → module-b565f34f.js} +1 -1
- package/dist/viewport-client/_static/postmen-e6429bad.js +1 -0
- package/dist/viewport-client/index.html +1 -1
- package/package.json +24 -29
- package/dist/viewport-client/_static/index-05673ab3.js +0 -1
- package/dist/viewport-client/_static/index-1aa955ce.js +0 -1
- package/dist/viewport-client/_static/index-39c4a09f.js +0 -1
- package/dist/viewport-client/_static/index-a44cbb78.js +0 -1
- package/dist/viewport-client/_static/index-a5d368cf.js +0 -1
- package/dist/viewport-client/_static/index-ad26cc11.js +0 -1
- package/dist/viewport-client/_static/postmen-c85935a0.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{gR as kt,eO as Nt}from"./index-c91bca3c.js";function Ft(e,r){for(var t=0;t<r.length;t++){const i=r[t];if(typeof i!="string"&&!Array.isArray(i)){for(const n in i)if(n!=="default"&&!(n in e)){const s=Object.getOwnPropertyDescriptor(i,n);s&&Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>i[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const Tt={},Ot=Object.freeze(Object.defineProperty({__proto__:null,default:Tt},Symbol.toStringTag,{value:"Module"})),V=kt(Ot),Lr=function(e){return typeof e<"u"&&e!==null},Ct=function(e){return typeof e=="object"},_t=function(e){return Object.prototype.toString.call(e)==="[object Object]"},Mt=function(e){return typeof e=="function"},Bt=function(e){return typeof e=="boolean"},Dt=function(e){return e instanceof Buffer},zt=function(e){if(Lr(e))switch(e.constructor){case Uint8Array:case Uint8ClampedArray:case Int8Array:case Uint16Array:case Int16Array:case Uint32Array:case Int32Array:case Float32Array:case Float64Array:return!0}return!1},qt=function(e){return e instanceof ArrayBuffer},Gt=function(e){return typeof e=="string"&&e.length>0},Ut=function(e){return typeof e=="number"&&!Number.isNaN(e)},Ht=function(e){return Number.isInteger(e)},Wt=function(e,r,t){return e>=r&&e<=t},Xt=function(e,r){return r.includes(e)},Vt=function(e,r,t){return new Error(`Expected ${r} for ${e} but received ${t} of type ${typeof t}`)},Qt=function(e,r){return r.message=e.message,r};var Q={defined:Lr,object:Ct,plainObject:_t,fn:Mt,bool:Bt,buffer:Dt,typedArray:zt,arrayBuffer:qt,string:Gt,number:Ut,integer:Ht,inRange:Wt,inArray:Xt,invalidParameterError:Vt,nativeError:Qt};function se(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Sr={exports:{}};const jr=()=>process.platform==="linux";let ye=null;const Jt=()=>{if(!ye)if(jr()&&process.report){const e=process.report.excludeNetwork;process.report.excludeNetwork=!0,ye=process.report.getReport(),process.report.excludeNetwork=e}else ye={};return ye};var Kt={isLinux:jr,getReport:Jt};const fe=V,Yt="/usr/bin/ldd",Zt="/proc/self/exe",ke=2048,ei=e=>{const r=fe.openSync(e,"r"),t=Buffer.alloc(ke),i=fe.readSync(r,t,0,ke,0);return fe.close(r,()=>{}),t.subarray(0,i)},ri=e=>new Promise((r,t)=>{fe.open(e,"r",(i,n)=>{if(i)t(i);else{const s=Buffer.alloc(ke);fe.read(n,s,0,ke,0,(o,u)=>{r(s.subarray(0,u)),fe.close(n,()=>{})})}})});var ti={LDD_PATH:Yt,SELF_PATH:Zt,readFileSync:ei,readFile:ri};const ii=e=>{if(e.length<64||e.readUInt32BE(0)!==2135247942||e.readUInt8(4)!==2||e.readUInt8(5)!==1)return null;const r=e.readUInt32LE(32),t=e.readUInt16LE(54),i=e.readUInt16LE(56);for(let n=0;n<i;n++){const s=r+n*t;if(e.readUInt32LE(s)===3){const u=e.readUInt32LE(s+8),l=e.readUInt32LE(s+32);return e.subarray(u,u+l).toString().replace(/\0.*$/g,"")}}return null};var ni={interpreterPath:ii};const kr=V,{isLinux:me,getReport:Nr}=Kt,{LDD_PATH:Oe,SELF_PATH:Fr,readFile:tr,readFileSync:ir}=ti,{interpreterPath:Tr}=ni;let q,G,U;const Or="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true";let Z="";const Cr=()=>Z||new Promise(e=>{kr.exec(Or,(r,t)=>{Z=r?" ":t,e(Z)})}),_r=()=>{if(!Z)try{Z=kr.execSync(Or,{encoding:"utf8"})}catch{Z=" "}return Z},X="glibc",Mr=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,oe="musl",ai=e=>e.includes("libc.musl-")||e.includes("ld-musl-"),Br=()=>{const e=Nr();return e.header&&e.header.glibcVersionRuntime?X:Array.isArray(e.sharedObjects)&&e.sharedObjects.some(ai)?oe:null},Dr=e=>{const[r,t]=e.split(/[\r\n]+/);return r&&r.includes(X)?X:t&&t.includes(oe)?oe:null},zr=e=>{if(e){if(e.includes("/ld-musl-"))return oe;if(e.includes("/ld-linux-"))return X}return null},qr=e=>(e=e.toString(),e.includes("musl")?oe:e.includes("GNU C Library")?X:null),si=async()=>{if(G!==void 0)return G;G=null;try{const e=await tr(Oe);G=qr(e)}catch{}return G},oi=()=>{if(G!==void 0)return G;G=null;try{const e=ir(Oe);G=qr(e)}catch{}return G},li=async()=>{if(q!==void 0)return q;q=null;try{const e=await tr(Fr),r=Tr(e);q=zr(r)}catch{}return q},ci=()=>{if(q!==void 0)return q;q=null;try{const e=ir(Fr),r=Tr(e);q=zr(r)}catch{}return q},Gr=async()=>{let e=null;if(me()&&(e=await li(),!e&&(e=await si(),e||(e=Br()),!e))){const r=await Cr();e=Dr(r)}return e},Ur=()=>{let e=null;if(me()&&(e=ci(),!e&&(e=oi(),e||(e=Br()),!e))){const r=_r();e=Dr(r)}return e},hi=async()=>me()&&await Gr()!==X,fi=()=>me()&&Ur()!==X,ui=async()=>{if(U!==void 0)return U;U=null;try{const r=(await tr(Oe)).match(Mr);r&&(U=r[1])}catch{}return U},di=()=>{if(U!==void 0)return U;U=null;try{const r=ir(Oe).match(Mr);r&&(U=r[1])}catch{}return U},Hr=()=>{const e=Nr();return e.header&&e.header.glibcVersionRuntime?e.header.glibcVersionRuntime:null},fr=e=>e.trim().split(/\s+/)[1],Wr=e=>{const[r,t,i]=e.split(/[\r\n]+/);return r&&r.includes(X)?fr(r):t&&i&&t.includes(oe)?fr(i):null},mi=async()=>{let e=null;if(me()&&(e=await ui(),e||(e=Hr()),!e)){const r=await Cr();e=Wr(r)}return e},gi=()=>{let e=null;if(me()&&(e=di(),e||(e=Hr()),!e)){const r=_r();e=Wr(r)}return e};var nr={GLIBC:X,MUSL:oe,family:Gr,familySync:Ur,isNonGlibcLinux:hi,isNonGlibcLinuxSync:fi,version:mi,versionSync:gi};const bi=typeof process=="object"&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Ce=bi;const pi="2.0.0",Xr=256,wi=Number.MAX_SAFE_INTEGER||9007199254740991,vi=16,Ei=Xr-6,yi=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var ar={MAX_LENGTH:Xr,MAX_SAFE_COMPONENT_LENGTH:vi,MAX_SAFE_BUILD_LENGTH:Ei,MAX_SAFE_INTEGER:wi,RELEASE_TYPES:yi,SEMVER_SPEC_VERSION:pi,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Ve={exports:{}};(function(e,r){const{MAX_SAFE_COMPONENT_LENGTH:t,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:n}=ar,s=Ce;r=e.exports={};const o=r.re=[],u=r.safeRe=[],l=r.src=[],m=r.safeSrc=[],f=r.t={};let $=0;const T="[a-zA-Z0-9-]",De=[["\\s",1],["\\d",n],[T,i]],ze=K=>{for(const[B,ie]of De)K=K.split(`${B}*`).join(`${B}{0,${ie}}`).split(`${B}+`).join(`${B}{1,${ie}}`);return K},x=(K,B,ie)=>{const N=ze(B),Y=$++;s(K,Y,B),f[K]=Y,l[Y]=B,m[Y]=N,o[Y]=new RegExp(B,ie?"g":void 0),u[Y]=new RegExp(N,ie?"g":void 0)};x("NUMERICIDENTIFIER","0|[1-9]\\d*"),x("NUMERICIDENTIFIERLOOSE","\\d+"),x("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${T}*`),x("MAINVERSION",`(${l[f.NUMERICIDENTIFIER]})\\.(${l[f.NUMERICIDENTIFIER]})\\.(${l[f.NUMERICIDENTIFIER]})`),x("MAINVERSIONLOOSE",`(${l[f.NUMERICIDENTIFIERLOOSE]})\\.(${l[f.NUMERICIDENTIFIERLOOSE]})\\.(${l[f.NUMERICIDENTIFIERLOOSE]})`),x("PRERELEASEIDENTIFIER",`(?:${l[f.NONNUMERICIDENTIFIER]}|${l[f.NUMERICIDENTIFIER]})`),x("PRERELEASEIDENTIFIERLOOSE",`(?:${l[f.NONNUMERICIDENTIFIER]}|${l[f.NUMERICIDENTIFIERLOOSE]})`),x("PRERELEASE",`(?:-(${l[f.PRERELEASEIDENTIFIER]}(?:\\.${l[f.PRERELEASEIDENTIFIER]})*))`),x("PRERELEASELOOSE",`(?:-?(${l[f.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[f.PRERELEASEIDENTIFIERLOOSE]})*))`),x("BUILDIDENTIFIER",`${T}+`),x("BUILD",`(?:\\+(${l[f.BUILDIDENTIFIER]}(?:\\.${l[f.BUILDIDENTIFIER]})*))`),x("FULLPLAIN",`v?${l[f.MAINVERSION]}${l[f.PRERELEASE]}?${l[f.BUILD]}?`),x("FULL",`^${l[f.FULLPLAIN]}$`),x("LOOSEPLAIN",`[v=\\s]*${l[f.MAINVERSIONLOOSE]}${l[f.PRERELEASELOOSE]}?${l[f.BUILD]}?`),x("LOOSE",`^${l[f.LOOSEPLAIN]}$`),x("GTLT","((?:<|>)?=?)"),x("XRANGEIDENTIFIERLOOSE",`${l[f.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),x("XRANGEIDENTIFIER",`${l[f.NUMERICIDENTIFIER]}|x|X|\\*`),x("XRANGEPLAIN",`[v=\\s]*(${l[f.XRANGEIDENTIFIER]})(?:\\.(${l[f.XRANGEIDENTIFIER]})(?:\\.(${l[f.XRANGEIDENTIFIER]})(?:${l[f.PRERELEASE]})?${l[f.BUILD]}?)?)?`),x("XRANGEPLAINLOOSE",`[v=\\s]*(${l[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[f.XRANGEIDENTIFIERLOOSE]})(?:${l[f.PRERELEASELOOSE]})?${l[f.BUILD]}?)?)?`),x("XRANGE",`^${l[f.GTLT]}\\s*${l[f.XRANGEPLAIN]}$`),x("XRANGELOOSE",`^${l[f.GTLT]}\\s*${l[f.XRANGEPLAINLOOSE]}$`),x("COERCEPLAIN",`(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`),x("COERCE",`${l[f.COERCEPLAIN]}(?:$|[^\\d])`),x("COERCEFULL",l[f.COERCEPLAIN]+`(?:${l[f.PRERELEASE]})?(?:${l[f.BUILD]})?(?:$|[^\\d])`),x("COERCERTL",l[f.COERCE],!0),x("COERCERTLFULL",l[f.COERCEFULL],!0),x("LONETILDE","(?:~>?)"),x("TILDETRIM",`(\\s*)${l[f.LONETILDE]}\\s+`,!0),r.tildeTrimReplace="$1~",x("TILDE",`^${l[f.LONETILDE]}${l[f.XRANGEPLAIN]}$`),x("TILDELOOSE",`^${l[f.LONETILDE]}${l[f.XRANGEPLAINLOOSE]}$`),x("LONECARET","(?:\\^)"),x("CARETTRIM",`(\\s*)${l[f.LONECARET]}\\s+`,!0),r.caretTrimReplace="$1^",x("CARET",`^${l[f.LONECARET]}${l[f.XRANGEPLAIN]}$`),x("CARETLOOSE",`^${l[f.LONECARET]}${l[f.XRANGEPLAINLOOSE]}$`),x("COMPARATORLOOSE",`^${l[f.GTLT]}\\s*(${l[f.LOOSEPLAIN]})$|^$`),x("COMPARATOR",`^${l[f.GTLT]}\\s*(${l[f.FULLPLAIN]})$|^$`),x("COMPARATORTRIM",`(\\s*)${l[f.GTLT]}\\s*(${l[f.LOOSEPLAIN]}|${l[f.XRANGEPLAIN]})`,!0),r.comparatorTrimReplace="$1$2$3",x("HYPHENRANGE",`^\\s*(${l[f.XRANGEPLAIN]})\\s+-\\s+(${l[f.XRANGEPLAIN]})\\s*$`),x("HYPHENRANGELOOSE",`^\\s*(${l[f.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[f.XRANGEPLAINLOOSE]})\\s*$`),x("STAR","(<|>)?=?\\s*\\*"),x("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),x("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Ve,Ve.exports);var _e=Ve.exports;const xi=Object.freeze({loose:!0}),Pi=Object.freeze({}),$i=e=>e?typeof e!="object"?xi:e:Pi;var sr=$i;const ur=/^[0-9]+$/,Vr=(e,r)=>{if(typeof e=="number"&&typeof r=="number")return e===r?0:e<r?-1:1;const t=ur.test(e),i=ur.test(r);return t&&i&&(e=+e,r=+r),e===r?0:t&&!i?-1:i&&!t?1:e<r?-1:1},Ri=(e,r)=>Vr(r,e);var Ii={compareIdentifiers:Vr,rcompareIdentifiers:Ri};const xe=Ce,{MAX_LENGTH:dr,MAX_SAFE_INTEGER:Pe}=ar,{safeRe:$e,t:Re}=_e,Ai=sr,{compareIdentifiers:qe}=Ii;let Li=class z{constructor(r,t){if(t=Ai(t),r instanceof z){if(r.loose===!!t.loose&&r.includePrerelease===!!t.includePrerelease)return r;r=r.version}else if(typeof r!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof r}".`);if(r.length>dr)throw new TypeError(`version is longer than ${dr} characters`);xe("SemVer",r,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const i=r.trim().match(t.loose?$e[Re.LOOSE]:$e[Re.FULL]);if(!i)throw new TypeError(`Invalid Version: ${r}`);if(this.raw=r,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>Pe||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Pe||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Pe||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){const s=+n;if(s>=0&&s<Pe)return s}return n}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(r){if(xe("SemVer.compare",this.version,this.options,r),!(r instanceof z)){if(typeof r=="string"&&r===this.version)return 0;r=new z(r,this.options)}return r.version===this.version?0:this.compareMain(r)||this.comparePre(r)}compareMain(r){return r instanceof z||(r=new z(r,this.options)),this.major<r.major?-1:this.major>r.major?1:this.minor<r.minor?-1:this.minor>r.minor?1:this.patch<r.patch?-1:this.patch>r.patch?1:0}comparePre(r){if(r instanceof z||(r=new z(r,this.options)),this.prerelease.length&&!r.prerelease.length)return-1;if(!this.prerelease.length&&r.prerelease.length)return 1;if(!this.prerelease.length&&!r.prerelease.length)return 0;let t=0;do{const i=this.prerelease[t],n=r.prerelease[t];if(xe("prerelease compare",t,i,n),i===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(i===void 0)return-1;if(i===n)continue;return qe(i,n)}while(++t)}compareBuild(r){r instanceof z||(r=new z(r,this.options));let t=0;do{const i=this.build[t],n=r.build[t];if(xe("build compare",t,i,n),i===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(i===void 0)return-1;if(i===n)continue;return qe(i,n)}while(++t)}inc(r,t,i){if(r.startsWith("pre")){if(!t&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(t){const n=`-${t}`.match(this.options.loose?$e[Re.PRERELEASELOOSE]:$e[Re.PRERELEASE]);if(!n||n[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(r){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,i),this.inc("pre",t,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,i),this.inc("pre",t,i);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const n=Number(i)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(t===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(t){let s=[t,n];i===!1&&(s=[t]),qe(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${r}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var ve=Li;const mr=ve,Si=(e,r,t=!1)=>{if(e instanceof mr)return e;try{return new mr(e,r)}catch(i){if(!t)return null;throw i}};var ji=Si;const ki=ve,Ni=ji,{safeRe:Ie,t:Ae}=_e,Fi=(e,r)=>{if(e instanceof ki)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;r=r||{};let t=null;if(!r.rtl)t=e.match(r.includePrerelease?Ie[Ae.COERCEFULL]:Ie[Ae.COERCE]);else{const l=r.includePrerelease?Ie[Ae.COERCERTLFULL]:Ie[Ae.COERCERTL];let m;for(;(m=l.exec(e))&&(!t||t.index+t[0].length!==e.length);)(!t||m.index+m[0].length!==t.index+t[0].length)&&(t=m),l.lastIndex=m.index+m[1].length+m[2].length;l.lastIndex=-1}if(t===null)return null;const i=t[2],n=t[3]||"0",s=t[4]||"0",o=r.includePrerelease&&t[5]?`-${t[5]}`:"",u=r.includePrerelease&&t[6]?`+${t[6]}`:"";return Ni(`${i}.${n}.${s}${o}${u}`,r)};var Ti=Fi;const gr=ve,Oi=(e,r,t)=>new gr(e,t).compare(new gr(r,t));var ge=Oi;const Ci=ge,_i=(e,r,t)=>Ci(e,r,t)>=0;var Qr=_i;class Mi{constructor(){this.max=1e3,this.map=new Map}get(r){const t=this.map.get(r);if(t!==void 0)return this.map.delete(r),this.map.set(r,t),t}delete(r){return this.map.delete(r)}set(r,t){if(!this.delete(r)&&t!==void 0){if(this.map.size>=this.max){const n=this.map.keys().next().value;this.delete(n)}this.map.set(r,t)}return this}}var Bi=Mi;const Di=ge,zi=(e,r,t)=>Di(e,r,t)===0;var qi=zi;const Gi=ge,Ui=(e,r,t)=>Gi(e,r,t)!==0;var Hi=Ui;const Wi=ge,Xi=(e,r,t)=>Wi(e,r,t)>0;var Vi=Xi;const Qi=ge,Ji=(e,r,t)=>Qi(e,r,t)<0;var Ki=Ji;const Yi=ge,Zi=(e,r,t)=>Yi(e,r,t)<=0;var en=Zi;const rn=qi,tn=Hi,nn=Vi,an=Qr,sn=Ki,on=en,ln=(e,r,t,i)=>{switch(r){case"===":return typeof e=="object"&&(e=e.version),typeof t=="object"&&(t=t.version),e===t;case"!==":return typeof e=="object"&&(e=e.version),typeof t=="object"&&(t=t.version),e!==t;case"":case"=":case"==":return rn(e,t,i);case"!=":return tn(e,t,i);case">":return nn(e,t,i);case">=":return an(e,t,i);case"<":return sn(e,t,i);case"<=":return on(e,t,i);default:throw new TypeError(`Invalid operator: ${r}`)}};var cn=ln,Ge,br;function hn(){if(br)return Ge;br=1;const e=Symbol("SemVer ANY");class r{static get ANY(){return e}constructor(f,$){if($=t($),f instanceof r){if(f.loose===!!$.loose)return f;f=f.value}f=f.trim().split(/\s+/).join(" "),o("comparator",f,$),this.options=$,this.loose=!!$.loose,this.parse(f),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(f){const $=this.options.loose?i[n.COMPARATORLOOSE]:i[n.COMPARATOR],T=f.match($);if(!T)throw new TypeError(`Invalid comparator: ${f}`);this.operator=T[1]!==void 0?T[1]:"",this.operator==="="&&(this.operator=""),T[2]?this.semver=new u(T[2],this.options.loose):this.semver=e}toString(){return this.value}test(f){if(o("Comparator.test",f,this.options.loose),this.semver===e||f===e)return!0;if(typeof f=="string")try{f=new u(f,this.options)}catch{return!1}return s(f,this.operator,this.semver,this.options)}intersects(f,$){if(!(f instanceof r))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(f.value,$).test(this.value):f.operator===""?f.value===""?!0:new l(this.value,$).test(f.semver):($=t($),$.includePrerelease&&(this.value==="<0.0.0-0"||f.value==="<0.0.0-0")||!$.includePrerelease&&(this.value.startsWith("<0.0.0")||f.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&f.operator.startsWith(">")||this.operator.startsWith("<")&&f.operator.startsWith("<")||this.semver.version===f.semver.version&&this.operator.includes("=")&&f.operator.includes("=")||s(this.semver,"<",f.semver,$)&&this.operator.startsWith(">")&&f.operator.startsWith("<")||s(this.semver,">",f.semver,$)&&this.operator.startsWith("<")&&f.operator.startsWith(">")))}}Ge=r;const t=sr,{safeRe:i,t:n}=_e,s=cn,o=Ce,u=ve,l=Jr();return Ge}var Ue,pr;function Jr(){if(pr)return Ue;pr=1;const e=/\s+/g;class r{constructor(d,E){if(E=n(E),d instanceof r)return d.loose===!!E.loose&&d.includePrerelease===!!E.includePrerelease?d:new r(d.raw,E);if(d instanceof s)return this.raw=d.value,this.set=[[d]],this.formatted=void 0,this;if(this.options=E,this.loose=!!E.loose,this.includePrerelease=!!E.includePrerelease,this.raw=d.trim().replace(e," "),this.set=this.raw.split("||").map(w=>this.parseRange(w.trim())).filter(w=>w.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const w=this.set[0];if(this.set=this.set.filter(y=>!x(y[0])),this.set.length===0)this.set=[w];else if(this.set.length>1){for(const y of this.set)if(y.length===1&&K(y[0])){this.set=[y];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let d=0;d<this.set.length;d++){d>0&&(this.formatted+="||");const E=this.set[d];for(let w=0;w<E.length;w++)w>0&&(this.formatted+=" "),this.formatted+=E[w].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(d){const w=((this.options.includePrerelease&&De)|(this.options.loose&&ze))+":"+d,y=i.get(w);if(y)return y;const v=this.options.loose,P=v?l[m.HYPHENRANGELOOSE]:l[m.HYPHENRANGE];d=d.replace(P,St(this.options.includePrerelease)),o("hyphen replace",d),d=d.replace(l[m.COMPARATORTRIM],f),o("comparator trim",d),d=d.replace(l[m.TILDETRIM],$),o("tilde trim",d),d=d.replace(l[m.CARETTRIM],T),o("caret trim",d);let I=d.split(" ").map(j=>ie(j,this.options)).join(" ").split(/\s+/).map(j=>Lt(j,this.options));v&&(I=I.filter(j=>(o("loose invalid filter",j,this.options),!!j.match(l[m.COMPARATORLOOSE])))),o("range list",I);const R=new Map,L=I.map(j=>new s(j,this.options));for(const j of L){if(x(j))return[j];R.set(j.value,j)}R.size>1&&R.has("")&&R.delete("");const C=[...R.values()];return i.set(w,C),C}intersects(d,E){if(!(d instanceof r))throw new TypeError("a Range is required");return this.set.some(w=>B(w,E)&&d.set.some(y=>B(y,E)&&w.every(v=>y.every(P=>v.intersects(P,E)))))}test(d){if(!d)return!1;if(typeof d=="string")try{d=new u(d,this.options)}catch{return!1}for(let E=0;E<this.set.length;E++)if(jt(this.set[E],d,this.options))return!0;return!1}}Ue=r;const t=Bi,i=new t,n=sr,s=hn(),o=Ce,u=ve,{safeRe:l,t:m,comparatorTrimReplace:f,tildeTrimReplace:$,caretTrimReplace:T}=_e,{FLAG_INCLUDE_PRERELEASE:De,FLAG_LOOSE:ze}=ar,x=g=>g.value==="<0.0.0-0",K=g=>g.value==="",B=(g,d)=>{let E=!0;const w=g.slice();let y=w.pop();for(;E&&w.length;)E=w.every(v=>y.intersects(v,d)),y=w.pop();return E},ie=(g,d)=>(g=g.replace(l[m.BUILD],""),o("comp",g,d),g=Pt(g,d),o("caret",g),g=Y(g,d),o("tildes",g),g=Rt(g,d),o("xrange",g),g=At(g,d),o("stars",g),g),N=g=>!g||g.toLowerCase()==="x"||g==="*",Y=(g,d)=>g.trim().split(/\s+/).map(E=>xt(E,d)).join(" "),xt=(g,d)=>{const E=d.loose?l[m.TILDELOOSE]:l[m.TILDE];return g.replace(E,(w,y,v,P,I)=>{o("tilde",g,w,y,v,P,I);let R;return N(y)?R="":N(v)?R=`>=${y}.0.0 <${+y+1}.0.0-0`:N(P)?R=`>=${y}.${v}.0 <${y}.${+v+1}.0-0`:I?(o("replaceTilde pr",I),R=`>=${y}.${v}.${P}-${I} <${y}.${+v+1}.0-0`):R=`>=${y}.${v}.${P} <${y}.${+v+1}.0-0`,o("tilde return",R),R})},Pt=(g,d)=>g.trim().split(/\s+/).map(E=>$t(E,d)).join(" "),$t=(g,d)=>{o("caret",g,d);const E=d.loose?l[m.CARETLOOSE]:l[m.CARET],w=d.includePrerelease?"-0":"";return g.replace(E,(y,v,P,I,R)=>{o("caret",g,y,v,P,I,R);let L;return N(v)?L="":N(P)?L=`>=${v}.0.0${w} <${+v+1}.0.0-0`:N(I)?v==="0"?L=`>=${v}.${P}.0${w} <${v}.${+P+1}.0-0`:L=`>=${v}.${P}.0${w} <${+v+1}.0.0-0`:R?(o("replaceCaret pr",R),v==="0"?P==="0"?L=`>=${v}.${P}.${I}-${R} <${v}.${P}.${+I+1}-0`:L=`>=${v}.${P}.${I}-${R} <${v}.${+P+1}.0-0`:L=`>=${v}.${P}.${I}-${R} <${+v+1}.0.0-0`):(o("no pr"),v==="0"?P==="0"?L=`>=${v}.${P}.${I}${w} <${v}.${P}.${+I+1}-0`:L=`>=${v}.${P}.${I}${w} <${v}.${+P+1}.0-0`:L=`>=${v}.${P}.${I} <${+v+1}.0.0-0`),o("caret return",L),L})},Rt=(g,d)=>(o("replaceXRanges",g,d),g.split(/\s+/).map(E=>It(E,d)).join(" ")),It=(g,d)=>{g=g.trim();const E=d.loose?l[m.XRANGELOOSE]:l[m.XRANGE];return g.replace(E,(w,y,v,P,I,R)=>{o("xRange",g,w,y,v,P,I,R);const L=N(v),C=L||N(P),j=C||N(I),be=j;return y==="="&&be&&(y=""),R=d.includePrerelease?"-0":"",L?y===">"||y==="<"?w="<0.0.0-0":w="*":y&&be?(C&&(P=0),I=0,y===">"?(y=">=",C?(v=+v+1,P=0,I=0):(P=+P+1,I=0)):y==="<="&&(y="<",C?v=+v+1:P=+P+1),y==="<"&&(R="-0"),w=`${y+v}.${P}.${I}${R}`):C?w=`>=${v}.0.0${R} <${+v+1}.0.0-0`:j&&(w=`>=${v}.${P}.0${R} <${v}.${+P+1}.0-0`),o("xRange return",w),w})},At=(g,d)=>(o("replaceStars",g,d),g.trim().replace(l[m.STAR],"")),Lt=(g,d)=>(o("replaceGTE0",g,d),g.trim().replace(l[d.includePrerelease?m.GTE0PRE:m.GTE0],"")),St=g=>(d,E,w,y,v,P,I,R,L,C,j,be)=>(N(w)?E="":N(y)?E=`>=${w}.0.0${g?"-0":""}`:N(v)?E=`>=${w}.${y}.0${g?"-0":""}`:P?E=`>=${E}`:E=`>=${E}${g?"-0":""}`,N(L)?R="":N(C)?R=`<${+L+1}.0.0-0`:N(j)?R=`<${L}.${+C+1}.0-0`:be?R=`<=${L}.${C}.${j}-${be}`:g?R=`<${L}.${C}.${+j+1}-0`:R=`<=${R}`,`${E} ${R}`.trim()),jt=(g,d,E)=>{for(let w=0;w<g.length;w++)if(!g[w].test(d))return!1;if(d.prerelease.length&&!E.includePrerelease){for(let w=0;w<g.length;w++)if(o(g[w].semver),g[w].semver!==s.ANY&&g[w].semver.prerelease.length>0){const y=g[w].semver;if(y.major===d.major&&y.minor===d.minor&&y.patch===d.patch)return!0}return!1}return!0};return Ue}const fn=Jr(),un=(e,r,t)=>{try{r=new fn(r,t)}catch{return!1}return r.test(e)};var dn=un;const mn="sharp",gn="High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",bn="0.33.5",pn="Lovell Fuller <npm@lovell.info>",wn="https://sharp.pixelplumbing.com",vn=["Pierre Inglebert <pierre.inglebert@gmail.com>","Jonathan Ong <jonathanrichardong@gmail.com>","Chanon Sajjamanochai <chanon.s@gmail.com>","Juliano Julio <julianojulio@gmail.com>","Daniel Gasienica <daniel@gasienica.ch>","Julian Walker <julian@fiftythree.com>","Amit Pitaru <pitaru.amit@gmail.com>","Brandon Aaron <hello.brandon@aaron.sh>","Andreas Lind <andreas@one.com>","Maurus Cuelenaere <mcuelenaere@gmail.com>","Linus Unnebäck <linus@folkdatorn.se>","Victor Mateevitsi <mvictoras@gmail.com>","Alaric Holloway <alaric.holloway@gmail.com>","Bernhard K. Weisshuhn <bkw@codingforce.com>","Chris Riley <criley@primedia.com>","David Carley <dacarley@gmail.com>","John Tobin <john@limelightmobileinc.com>","Kenton Gray <kentongray@gmail.com>","Felix Bünemann <Felix.Buenemann@gmail.com>","Samy Al Zahrani <samyalzahrany@gmail.com>","Chintan Thakkar <lemnisk8@gmail.com>","F. Orlando Galashan <frulo@gmx.de>","Kleis Auke Wolthuizen <info@kleisauke.nl>","Matt Hirsch <mhirsch@media.mit.edu>","Matthias Thoemmes <thoemmes@gmail.com>","Patrick Paskaris <patrick@paskaris.gr>","Jérémy Lal <kapouer@melix.org>","Rahul Nanwani <r.nanwani@gmail.com>","Alice Monday <alice0meta@gmail.com>","Kristo Jorgenson <kristo.jorgenson@gmail.com>","YvesBos <yves_bos@outlook.com>","Guy Maliar <guy@tailorbrands.com>","Nicolas Coden <nicolas@ncoden.fr>","Matt Parrish <matt.r.parrish@gmail.com>","Marcel Bretschneider <marcel.bretschneider@gmail.com>","Matthew McEachen <matthew+github@mceachen.org>","Jarda Kotěšovec <jarda.kotesovec@gmail.com>","Kenric D'Souza <kenric.dsouza@gmail.com>","Oleh Aleinyk <oleg.aleynik@gmail.com>","Marcel Bretschneider <marcel.bretschneider@gmail.com>","Andrea Bianco <andrea.bianco@unibas.ch>","Rik Heywood <rik@rik.org>","Thomas Parisot <hi@oncletom.io>","Nathan Graves <nathanrgraves+github@gmail.com>","Tom Lokhorst <tom@lokhorst.eu>","Espen Hovlandsdal <espen@hovlandsdal.com>","Sylvain Dumont <sylvain.dumont35@gmail.com>","Alun Davies <alun.owain.davies@googlemail.com>","Aidan Hoolachan <ajhoolachan21@gmail.com>","Axel Eirola <axel.eirola@iki.fi>","Freezy <freezy@xbmc.org>","Daiz <taneli.vatanen@gmail.com>","Julian Aubourg <j@ubourg.net>","Keith Belovay <keith@picthrive.com>","Michael B. Klein <mbklein@gmail.com>","Jordan Prudhomme <jordan@raboland.fr>","Ilya Ovdin <iovdin@gmail.com>","Andargor <andargor@yahoo.com>","Paul Neave <paul.neave@gmail.com>","Brendan Kennedy <brenwken@gmail.com>","Brychan Bennett-Odlum <git@brychan.io>","Edward Silverton <e.silverton@gmail.com>","Roman Malieiev <aromaleev@gmail.com>","Tomas Szabo <tomas.szabo@deftomat.com>","Robert O'Rourke <robert@o-rourke.org>","Guillermo Alfonso Varela Chouciño <guillevch@gmail.com>","Christian Flintrup <chr@gigahost.dk>","Manan Jadhav <manan@motionden.com>","Leon Radley <leon@radley.se>","alza54 <alza54@thiocod.in>","Jacob Smith <jacob@frende.me>","Michael Nutt <michael@nutt.im>","Brad Parham <baparham@gmail.com>","Taneli Vatanen <taneli.vatanen@gmail.com>","Joris Dugué <zaruike10@gmail.com>","Chris Banks <christopher.bradley.banks@gmail.com>","Ompal Singh <ompal.hitm09@gmail.com>","Brodan <christopher.hranj@gmail.com>","Ankur Parihar <ankur.github@gmail.com>","Brahim Ait elhaj <brahima@gmail.com>","Mart Jansink <m.jansink@gmail.com>","Lachlan Newman <lachnewman007@gmail.com>","Dennis Beatty <dennis@dcbeatty.com>","Ingvar Stepanyan <me@rreverser.com>","Don Denton <don@happycollision.com>"],En={install:"node install/check",clean:"rm -rf src/build/ .nyc_output/ coverage/ test/fixtures/output.*",test:"npm run test-lint && npm run test-unit && npm run test-licensing && npm run test-types","test-lint":"semistandard && cpplint","test-unit":"nyc --reporter=lcov --reporter=text --check-coverage --branches=100 mocha","test-licensing":'license-checker --production --summary --onlyAllow="Apache-2.0;BSD;ISC;LGPL-3.0-or-later;MIT"',"test-leak":"./test/leak/leak.sh","test-types":"tsd","package-from-local-build":"node npm/from-local-build","package-from-github-release":"node npm/from-github-release","docs-build":"node docs/build && node docs/search-index/build","docs-serve":"cd docs && npx serve","docs-publish":"cd docs && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp"},yn="commonjs",xn="lib/index.js",Pn="lib/index.d.ts",$n=["install","lib","src/*.{cc,h,gyp}"],Rn={type:"git",url:"git://github.com/lovell/sharp.git"},In=["jpeg","png","webp","avif","tiff","gif","svg","jp2","dzi","image","resize","thumbnail","crop","embed","libvips","vips"],An={color:"^4.2.3","detect-libc":"^2.0.3",semver:"^7.6.3"},Ln={"@img/sharp-darwin-arm64":"0.33.5","@img/sharp-darwin-x64":"0.33.5","@img/sharp-libvips-darwin-arm64":"1.0.4","@img/sharp-libvips-darwin-x64":"1.0.4","@img/sharp-libvips-linux-arm":"1.0.5","@img/sharp-libvips-linux-arm64":"1.0.4","@img/sharp-libvips-linux-s390x":"1.0.4","@img/sharp-libvips-linux-x64":"1.0.4","@img/sharp-libvips-linuxmusl-arm64":"1.0.4","@img/sharp-libvips-linuxmusl-x64":"1.0.4","@img/sharp-linux-arm":"0.33.5","@img/sharp-linux-arm64":"0.33.5","@img/sharp-linux-s390x":"0.33.5","@img/sharp-linux-x64":"0.33.5","@img/sharp-linuxmusl-arm64":"0.33.5","@img/sharp-linuxmusl-x64":"0.33.5","@img/sharp-wasm32":"0.33.5","@img/sharp-win32-ia32":"0.33.5","@img/sharp-win32-x64":"0.33.5"},Sn={"@emnapi/runtime":"^1.2.0","@img/sharp-libvips-dev":"1.0.4","@img/sharp-libvips-dev-wasm32":"1.0.5","@img/sharp-libvips-win32-ia32":"1.0.4","@img/sharp-libvips-win32-x64":"1.0.4","@types/node":"*",async:"^3.2.5",cc:"^3.0.1",emnapi:"^1.2.0","exif-reader":"^2.0.1","extract-zip":"^2.0.1",icc:"^3.0.0","jsdoc-to-markdown":"^8.0.3","license-checker":"^25.0.1",mocha:"^10.7.3","node-addon-api":"^8.1.0",nyc:"^17.0.0",prebuild:"^13.0.1",semistandard:"^17.0.0","tar-fs":"^3.0.6",tsd:"^0.31.1"},jn="Apache-2.0",kn={node:"^18.17.0 || ^20.3.0 || >=21.0.0"},Nn={libvips:">=8.15.3"},Fn={url:"https://opencollective.com/libvips"},Tn={napi_versions:[9]},On={env:["mocha"]},Cn={linelength:"120",filter:["build/include"]},_n={include:["lib"]},Mn={directory:"test/types/"},Kr={name:mn,description:gn,version:bn,author:pn,homepage:wn,contributors:vn,scripts:En,type:yn,main:xn,types:Pn,files:$n,repository:Rn,keywords:In,dependencies:An,optionalDependencies:Ln,devDependencies:Sn,license:jn,engines:kn,config:Nn,funding:Fn,binary:Tn,semistandard:On,cc:Cn,nyc:_n,tsd:Mn},{spawnSync:Me}=V,{createHash:Bn}=V,Yr=Ti,Dn=Qr,zn=dn,wr=nr,{config:qn,engines:vr,optionalDependencies:Gn}=Kr,Un={}.npm_package_config_libvips||qn.libvips,Zr=Yr(Un).version,Hn=["darwin-arm64","darwin-x64","linux-arm","linux-arm64","linux-s390x","linux-x64","linuxmusl-arm64","linuxmusl-x64","win32-ia32","win32-x64"],Be={encoding:"utf8",shell:!0},Wn=e=>{e instanceof Error?console.error(`sharp: Installation error: ${e.message}`):console.log(`sharp: ${e}`)},et=()=>wr.isNonGlibcLinuxSync()?wr.familySync():"",Xn=()=>`${process.platform}${et()}-${process.arch}`,de=()=>{if(rt())return"wasm32";const{npm_config_arch:e,npm_config_platform:r,npm_config_libc:t}=process.env,i=typeof t=="string"?t:et();return`${r||process.platform}${i}-${e||process.arch}`},Vn=()=>{try{return se(`@img/sharp-libvips-dev-${de()}/include`)}catch{try{return require("@img/sharp-libvips-dev/include")}catch{}}return""},Qn=()=>{try{return require("@img/sharp-libvips-dev/cplusplus")}catch{}return""},Jn=()=>{try{return se(`@img/sharp-libvips-dev-${de()}/lib`)}catch{try{return se(`@img/sharp-libvips-${de()}/lib`)}catch{}}return""},Kn=()=>{var e;if(((e=process.release)==null?void 0:e.name)==="node"&&process.versions&&!zn(process.versions.node,vr.node))return{found:process.versions.node,expected:vr.node}},rt=()=>{const{CC:e}=process.env;return!!(e&&e.endsWith("/emcc"))},Yn=()=>process.platform==="darwin"&&process.arch==="x64"?(Me("sysctl sysctl.proc_translated",Be).stdout||"").trim()==="sysctl.proc_translated: 1":!1,Er=e=>Bn("sha512").update(e).digest("hex"),Zn=()=>{try{const e=Er(`imgsharp-libvips-${de()}`),r=Yr(Gn[`@img/sharp-libvips-${de()}`]).version;return Er(`${e}npm:${r}`).slice(0,10)}catch{}return""},ea=()=>Me(`node-gyp rebuild --directory=src ${rt()?"--nodedir=emscripten":""}`,{...Be,stdio:"inherit"}).status,tt=()=>process.platform!=="win32"?(Me("pkg-config --modversion vips-cpp",{...Be,env:{...process.env,PKG_CONFIG_PATH:it()}}).stdout||"").trim():"",it=()=>process.platform!=="win32"?[(Me('which brew >/dev/null 2>&1 && brew environment --plain | grep PKG_CONFIG_LIBDIR | cut -d" " -f2',Be).stdout||"").trim(),{}.PKG_CONFIG_PATH,"/usr/local/lib/pkgconfig","/usr/lib/pkgconfig","/usr/local/libdata/pkgconfig","/usr/libdata/pkgconfig"].filter(Boolean).join(":"):"",He=(e,r,t)=>(t&&t(`Detected ${r}, skipping search for globally-installed libvips`),e),ra=e=>{if({}.SHARP_IGNORE_GLOBAL_LIBVIPS)return He(!1,"SHARP_IGNORE_GLOBAL_LIBVIPS",e);if({}.SHARP_FORCE_GLOBAL_LIBVIPS)return He(!0,"SHARP_FORCE_GLOBAL_LIBVIPS",e);if(Yn())return He(!1,"Rosetta",e);const r=tt();return!!r&&Dn(r,Zr)};var nt={minimumLibvipsVersion:Zr,prebuiltPlatforms:Hn,buildPlatformArch:de,buildSharpLibvipsIncludeDir:Vn,buildSharpLibvipsCPlusPlusDir:Qn,buildSharpLibvipsLibDir:Jn,isUnsupportedNodeRuntime:Kn,runtimePlatformArch:Xn,log:Wn,yarnLocator:Zn,spawnRebuild:ea,globalLibvipsVersion:tt,pkgConfigPath:it,useGlobalLibvips:ra};const{familySync:ta,versionSync:ia}=nr,{runtimePlatformArch:na,isUnsupportedNodeRuntime:yr,prebuiltPlatforms:aa,minimumLibvipsVersion:sa}=nt,ne=na(),oa=[`../src/build/Release/sharp-${ne}.node`,"../src/build/Release/sharp-wasm32.node",`@img/sharp-${ne}/sharp.node`,"@img/sharp-wasm32/sharp.node"];let Qe;const je=[];for(const e of oa)try{Qe=se(e);break}catch(r){je.push(r)}if(Qe)Sr.exports=Qe;else{const[e,r,t]=["linux","darwin","win32"].map(s=>ne.startsWith(s)),i=[`Could not load the "sharp" module using the ${ne} runtime`];je.forEach(s=>{s.code!=="MODULE_NOT_FOUND"&&i.push(`${s.code}: ${s.message}`)});const n=je.map(s=>s.message).join(" ");if(i.push("Possible solutions:"),yr()){const{found:s,expected:o}=yr();i.push("- Please upgrade Node.js:",` Found ${s}`,` Requires ${o}`)}else if(aa.includes(ne)){const[s,o]=ne.split("-"),u=s.endsWith("musl")?" --libc=musl":"";i.push("- Ensure optional dependencies can be installed:"," npm install --include=optional sharp","- Ensure your package manager supports multi-platform installation:"," See https://sharp.pixelplumbing.com/install#cross-platform","- Add platform-specific dependencies:",` npm install --os=${s.replace("musl","")}${u} --cpu=${o} sharp`)}else i.push(`- Manually install libvips >= ${sa}`,"- Add experimental WebAssembly-based dependencies:"," npm install --cpu=wasm32 sharp"," npm install @img/sharp-wasm32");if(e&&/(symbol not found|CXXABI_)/i.test(n))try{const{config:s}=se(`@img/sharp-libvips-${ne}/package`),o=`${ta()} ${ia()}`,u=`${s.musl?"musl":"glibc"} ${s.musl||s.glibc}`;i.push("- Update your OS:",` Found ${o}`,` Requires ${u}`)}catch{}throw e&&/\/snap\/core[0-9]{2}/.test(n)&&i.push("- Remove the Node.js Snap, which does not support native modules"," snap remove node"),r&&/Incompatible library version/.test(n)&&i.push("- Update Homebrew:"," brew update && brew upgrade vips"),je.some(s=>s.code==="ERR_DLOPEN_DISABLED")&&i.push("- Run Node.js without using the --no-addons flag"),t&&/The specified procedure could not be found/.test(n)&&i.push("- Using the canvas package on Windows?"," See https://sharp.pixelplumbing.com/install#canvas-and-windows","- Check for outdated versions of sharp in the dependency tree:"," npm ls sharp"),i.push("- Consult the installation documentation:"," See https://sharp.pixelplumbing.com/install"),new Error(i.join(`
|
|
1
|
+
import{gR as kt,eO as Nt}from"./index-d07818b5.js";function Ft(e,r){for(var t=0;t<r.length;t++){const i=r[t];if(typeof i!="string"&&!Array.isArray(i)){for(const n in i)if(n!=="default"&&!(n in e)){const s=Object.getOwnPropertyDescriptor(i,n);s&&Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>i[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const Tt={},Ot=Object.freeze(Object.defineProperty({__proto__:null,default:Tt},Symbol.toStringTag,{value:"Module"})),V=kt(Ot),Lr=function(e){return typeof e<"u"&&e!==null},Ct=function(e){return typeof e=="object"},_t=function(e){return Object.prototype.toString.call(e)==="[object Object]"},Mt=function(e){return typeof e=="function"},Bt=function(e){return typeof e=="boolean"},Dt=function(e){return e instanceof Buffer},zt=function(e){if(Lr(e))switch(e.constructor){case Uint8Array:case Uint8ClampedArray:case Int8Array:case Uint16Array:case Int16Array:case Uint32Array:case Int32Array:case Float32Array:case Float64Array:return!0}return!1},qt=function(e){return e instanceof ArrayBuffer},Gt=function(e){return typeof e=="string"&&e.length>0},Ut=function(e){return typeof e=="number"&&!Number.isNaN(e)},Ht=function(e){return Number.isInteger(e)},Wt=function(e,r,t){return e>=r&&e<=t},Xt=function(e,r){return r.includes(e)},Vt=function(e,r,t){return new Error(`Expected ${r} for ${e} but received ${t} of type ${typeof t}`)},Qt=function(e,r){return r.message=e.message,r};var Q={defined:Lr,object:Ct,plainObject:_t,fn:Mt,bool:Bt,buffer:Dt,typedArray:zt,arrayBuffer:qt,string:Gt,number:Ut,integer:Ht,inRange:Wt,inArray:Xt,invalidParameterError:Vt,nativeError:Qt};function se(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Sr={exports:{}};const jr=()=>process.platform==="linux";let ye=null;const Jt=()=>{if(!ye)if(jr()&&process.report){const e=process.report.excludeNetwork;process.report.excludeNetwork=!0,ye=process.report.getReport(),process.report.excludeNetwork=e}else ye={};return ye};var Kt={isLinux:jr,getReport:Jt};const fe=V,Yt="/usr/bin/ldd",Zt="/proc/self/exe",ke=2048,ei=e=>{const r=fe.openSync(e,"r"),t=Buffer.alloc(ke),i=fe.readSync(r,t,0,ke,0);return fe.close(r,()=>{}),t.subarray(0,i)},ri=e=>new Promise((r,t)=>{fe.open(e,"r",(i,n)=>{if(i)t(i);else{const s=Buffer.alloc(ke);fe.read(n,s,0,ke,0,(o,u)=>{r(s.subarray(0,u)),fe.close(n,()=>{})})}})});var ti={LDD_PATH:Yt,SELF_PATH:Zt,readFileSync:ei,readFile:ri};const ii=e=>{if(e.length<64||e.readUInt32BE(0)!==2135247942||e.readUInt8(4)!==2||e.readUInt8(5)!==1)return null;const r=e.readUInt32LE(32),t=e.readUInt16LE(54),i=e.readUInt16LE(56);for(let n=0;n<i;n++){const s=r+n*t;if(e.readUInt32LE(s)===3){const u=e.readUInt32LE(s+8),l=e.readUInt32LE(s+32);return e.subarray(u,u+l).toString().replace(/\0.*$/g,"")}}return null};var ni={interpreterPath:ii};const kr=V,{isLinux:me,getReport:Nr}=Kt,{LDD_PATH:Oe,SELF_PATH:Fr,readFile:tr,readFileSync:ir}=ti,{interpreterPath:Tr}=ni;let q,G,U;const Or="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true";let Z="";const Cr=()=>Z||new Promise(e=>{kr.exec(Or,(r,t)=>{Z=r?" ":t,e(Z)})}),_r=()=>{if(!Z)try{Z=kr.execSync(Or,{encoding:"utf8"})}catch{Z=" "}return Z},X="glibc",Mr=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,oe="musl",ai=e=>e.includes("libc.musl-")||e.includes("ld-musl-"),Br=()=>{const e=Nr();return e.header&&e.header.glibcVersionRuntime?X:Array.isArray(e.sharedObjects)&&e.sharedObjects.some(ai)?oe:null},Dr=e=>{const[r,t]=e.split(/[\r\n]+/);return r&&r.includes(X)?X:t&&t.includes(oe)?oe:null},zr=e=>{if(e){if(e.includes("/ld-musl-"))return oe;if(e.includes("/ld-linux-"))return X}return null},qr=e=>(e=e.toString(),e.includes("musl")?oe:e.includes("GNU C Library")?X:null),si=async()=>{if(G!==void 0)return G;G=null;try{const e=await tr(Oe);G=qr(e)}catch{}return G},oi=()=>{if(G!==void 0)return G;G=null;try{const e=ir(Oe);G=qr(e)}catch{}return G},li=async()=>{if(q!==void 0)return q;q=null;try{const e=await tr(Fr),r=Tr(e);q=zr(r)}catch{}return q},ci=()=>{if(q!==void 0)return q;q=null;try{const e=ir(Fr),r=Tr(e);q=zr(r)}catch{}return q},Gr=async()=>{let e=null;if(me()&&(e=await li(),!e&&(e=await si(),e||(e=Br()),!e))){const r=await Cr();e=Dr(r)}return e},Ur=()=>{let e=null;if(me()&&(e=ci(),!e&&(e=oi(),e||(e=Br()),!e))){const r=_r();e=Dr(r)}return e},hi=async()=>me()&&await Gr()!==X,fi=()=>me()&&Ur()!==X,ui=async()=>{if(U!==void 0)return U;U=null;try{const r=(await tr(Oe)).match(Mr);r&&(U=r[1])}catch{}return U},di=()=>{if(U!==void 0)return U;U=null;try{const r=ir(Oe).match(Mr);r&&(U=r[1])}catch{}return U},Hr=()=>{const e=Nr();return e.header&&e.header.glibcVersionRuntime?e.header.glibcVersionRuntime:null},fr=e=>e.trim().split(/\s+/)[1],Wr=e=>{const[r,t,i]=e.split(/[\r\n]+/);return r&&r.includes(X)?fr(r):t&&i&&t.includes(oe)?fr(i):null},mi=async()=>{let e=null;if(me()&&(e=await ui(),e||(e=Hr()),!e)){const r=await Cr();e=Wr(r)}return e},gi=()=>{let e=null;if(me()&&(e=di(),e||(e=Hr()),!e)){const r=_r();e=Wr(r)}return e};var nr={GLIBC:X,MUSL:oe,family:Gr,familySync:Ur,isNonGlibcLinux:hi,isNonGlibcLinuxSync:fi,version:mi,versionSync:gi};const bi=typeof process=="object"&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Ce=bi;const pi="2.0.0",Xr=256,wi=Number.MAX_SAFE_INTEGER||9007199254740991,vi=16,Ei=Xr-6,yi=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var ar={MAX_LENGTH:Xr,MAX_SAFE_COMPONENT_LENGTH:vi,MAX_SAFE_BUILD_LENGTH:Ei,MAX_SAFE_INTEGER:wi,RELEASE_TYPES:yi,SEMVER_SPEC_VERSION:pi,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Ve={exports:{}};(function(e,r){const{MAX_SAFE_COMPONENT_LENGTH:t,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:n}=ar,s=Ce;r=e.exports={};const o=r.re=[],u=r.safeRe=[],l=r.src=[],m=r.safeSrc=[],f=r.t={};let $=0;const T="[a-zA-Z0-9-]",De=[["\\s",1],["\\d",n],[T,i]],ze=K=>{for(const[B,ie]of De)K=K.split(`${B}*`).join(`${B}{0,${ie}}`).split(`${B}+`).join(`${B}{1,${ie}}`);return K},x=(K,B,ie)=>{const N=ze(B),Y=$++;s(K,Y,B),f[K]=Y,l[Y]=B,m[Y]=N,o[Y]=new RegExp(B,ie?"g":void 0),u[Y]=new RegExp(N,ie?"g":void 0)};x("NUMERICIDENTIFIER","0|[1-9]\\d*"),x("NUMERICIDENTIFIERLOOSE","\\d+"),x("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${T}*`),x("MAINVERSION",`(${l[f.NUMERICIDENTIFIER]})\\.(${l[f.NUMERICIDENTIFIER]})\\.(${l[f.NUMERICIDENTIFIER]})`),x("MAINVERSIONLOOSE",`(${l[f.NUMERICIDENTIFIERLOOSE]})\\.(${l[f.NUMERICIDENTIFIERLOOSE]})\\.(${l[f.NUMERICIDENTIFIERLOOSE]})`),x("PRERELEASEIDENTIFIER",`(?:${l[f.NONNUMERICIDENTIFIER]}|${l[f.NUMERICIDENTIFIER]})`),x("PRERELEASEIDENTIFIERLOOSE",`(?:${l[f.NONNUMERICIDENTIFIER]}|${l[f.NUMERICIDENTIFIERLOOSE]})`),x("PRERELEASE",`(?:-(${l[f.PRERELEASEIDENTIFIER]}(?:\\.${l[f.PRERELEASEIDENTIFIER]})*))`),x("PRERELEASELOOSE",`(?:-?(${l[f.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[f.PRERELEASEIDENTIFIERLOOSE]})*))`),x("BUILDIDENTIFIER",`${T}+`),x("BUILD",`(?:\\+(${l[f.BUILDIDENTIFIER]}(?:\\.${l[f.BUILDIDENTIFIER]})*))`),x("FULLPLAIN",`v?${l[f.MAINVERSION]}${l[f.PRERELEASE]}?${l[f.BUILD]}?`),x("FULL",`^${l[f.FULLPLAIN]}$`),x("LOOSEPLAIN",`[v=\\s]*${l[f.MAINVERSIONLOOSE]}${l[f.PRERELEASELOOSE]}?${l[f.BUILD]}?`),x("LOOSE",`^${l[f.LOOSEPLAIN]}$`),x("GTLT","((?:<|>)?=?)"),x("XRANGEIDENTIFIERLOOSE",`${l[f.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),x("XRANGEIDENTIFIER",`${l[f.NUMERICIDENTIFIER]}|x|X|\\*`),x("XRANGEPLAIN",`[v=\\s]*(${l[f.XRANGEIDENTIFIER]})(?:\\.(${l[f.XRANGEIDENTIFIER]})(?:\\.(${l[f.XRANGEIDENTIFIER]})(?:${l[f.PRERELEASE]})?${l[f.BUILD]}?)?)?`),x("XRANGEPLAINLOOSE",`[v=\\s]*(${l[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[f.XRANGEIDENTIFIERLOOSE]})(?:${l[f.PRERELEASELOOSE]})?${l[f.BUILD]}?)?)?`),x("XRANGE",`^${l[f.GTLT]}\\s*${l[f.XRANGEPLAIN]}$`),x("XRANGELOOSE",`^${l[f.GTLT]}\\s*${l[f.XRANGEPLAINLOOSE]}$`),x("COERCEPLAIN",`(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`),x("COERCE",`${l[f.COERCEPLAIN]}(?:$|[^\\d])`),x("COERCEFULL",l[f.COERCEPLAIN]+`(?:${l[f.PRERELEASE]})?(?:${l[f.BUILD]})?(?:$|[^\\d])`),x("COERCERTL",l[f.COERCE],!0),x("COERCERTLFULL",l[f.COERCEFULL],!0),x("LONETILDE","(?:~>?)"),x("TILDETRIM",`(\\s*)${l[f.LONETILDE]}\\s+`,!0),r.tildeTrimReplace="$1~",x("TILDE",`^${l[f.LONETILDE]}${l[f.XRANGEPLAIN]}$`),x("TILDELOOSE",`^${l[f.LONETILDE]}${l[f.XRANGEPLAINLOOSE]}$`),x("LONECARET","(?:\\^)"),x("CARETTRIM",`(\\s*)${l[f.LONECARET]}\\s+`,!0),r.caretTrimReplace="$1^",x("CARET",`^${l[f.LONECARET]}${l[f.XRANGEPLAIN]}$`),x("CARETLOOSE",`^${l[f.LONECARET]}${l[f.XRANGEPLAINLOOSE]}$`),x("COMPARATORLOOSE",`^${l[f.GTLT]}\\s*(${l[f.LOOSEPLAIN]})$|^$`),x("COMPARATOR",`^${l[f.GTLT]}\\s*(${l[f.FULLPLAIN]})$|^$`),x("COMPARATORTRIM",`(\\s*)${l[f.GTLT]}\\s*(${l[f.LOOSEPLAIN]}|${l[f.XRANGEPLAIN]})`,!0),r.comparatorTrimReplace="$1$2$3",x("HYPHENRANGE",`^\\s*(${l[f.XRANGEPLAIN]})\\s+-\\s+(${l[f.XRANGEPLAIN]})\\s*$`),x("HYPHENRANGELOOSE",`^\\s*(${l[f.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[f.XRANGEPLAINLOOSE]})\\s*$`),x("STAR","(<|>)?=?\\s*\\*"),x("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),x("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Ve,Ve.exports);var _e=Ve.exports;const xi=Object.freeze({loose:!0}),Pi=Object.freeze({}),$i=e=>e?typeof e!="object"?xi:e:Pi;var sr=$i;const ur=/^[0-9]+$/,Vr=(e,r)=>{if(typeof e=="number"&&typeof r=="number")return e===r?0:e<r?-1:1;const t=ur.test(e),i=ur.test(r);return t&&i&&(e=+e,r=+r),e===r?0:t&&!i?-1:i&&!t?1:e<r?-1:1},Ri=(e,r)=>Vr(r,e);var Ii={compareIdentifiers:Vr,rcompareIdentifiers:Ri};const xe=Ce,{MAX_LENGTH:dr,MAX_SAFE_INTEGER:Pe}=ar,{safeRe:$e,t:Re}=_e,Ai=sr,{compareIdentifiers:qe}=Ii;let Li=class z{constructor(r,t){if(t=Ai(t),r instanceof z){if(r.loose===!!t.loose&&r.includePrerelease===!!t.includePrerelease)return r;r=r.version}else if(typeof r!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof r}".`);if(r.length>dr)throw new TypeError(`version is longer than ${dr} characters`);xe("SemVer",r,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const i=r.trim().match(t.loose?$e[Re.LOOSE]:$e[Re.FULL]);if(!i)throw new TypeError(`Invalid Version: ${r}`);if(this.raw=r,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>Pe||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Pe||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Pe||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){const s=+n;if(s>=0&&s<Pe)return s}return n}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(r){if(xe("SemVer.compare",this.version,this.options,r),!(r instanceof z)){if(typeof r=="string"&&r===this.version)return 0;r=new z(r,this.options)}return r.version===this.version?0:this.compareMain(r)||this.comparePre(r)}compareMain(r){return r instanceof z||(r=new z(r,this.options)),this.major<r.major?-1:this.major>r.major?1:this.minor<r.minor?-1:this.minor>r.minor?1:this.patch<r.patch?-1:this.patch>r.patch?1:0}comparePre(r){if(r instanceof z||(r=new z(r,this.options)),this.prerelease.length&&!r.prerelease.length)return-1;if(!this.prerelease.length&&r.prerelease.length)return 1;if(!this.prerelease.length&&!r.prerelease.length)return 0;let t=0;do{const i=this.prerelease[t],n=r.prerelease[t];if(xe("prerelease compare",t,i,n),i===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(i===void 0)return-1;if(i===n)continue;return qe(i,n)}while(++t)}compareBuild(r){r instanceof z||(r=new z(r,this.options));let t=0;do{const i=this.build[t],n=r.build[t];if(xe("build compare",t,i,n),i===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(i===void 0)return-1;if(i===n)continue;return qe(i,n)}while(++t)}inc(r,t,i){if(r.startsWith("pre")){if(!t&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(t){const n=`-${t}`.match(this.options.loose?$e[Re.PRERELEASELOOSE]:$e[Re.PRERELEASE]);if(!n||n[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(r){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,i),this.inc("pre",t,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,i),this.inc("pre",t,i);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const n=Number(i)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(t===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(t){let s=[t,n];i===!1&&(s=[t]),qe(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${r}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var ve=Li;const mr=ve,Si=(e,r,t=!1)=>{if(e instanceof mr)return e;try{return new mr(e,r)}catch(i){if(!t)return null;throw i}};var ji=Si;const ki=ve,Ni=ji,{safeRe:Ie,t:Ae}=_e,Fi=(e,r)=>{if(e instanceof ki)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;r=r||{};let t=null;if(!r.rtl)t=e.match(r.includePrerelease?Ie[Ae.COERCEFULL]:Ie[Ae.COERCE]);else{const l=r.includePrerelease?Ie[Ae.COERCERTLFULL]:Ie[Ae.COERCERTL];let m;for(;(m=l.exec(e))&&(!t||t.index+t[0].length!==e.length);)(!t||m.index+m[0].length!==t.index+t[0].length)&&(t=m),l.lastIndex=m.index+m[1].length+m[2].length;l.lastIndex=-1}if(t===null)return null;const i=t[2],n=t[3]||"0",s=t[4]||"0",o=r.includePrerelease&&t[5]?`-${t[5]}`:"",u=r.includePrerelease&&t[6]?`+${t[6]}`:"";return Ni(`${i}.${n}.${s}${o}${u}`,r)};var Ti=Fi;const gr=ve,Oi=(e,r,t)=>new gr(e,t).compare(new gr(r,t));var ge=Oi;const Ci=ge,_i=(e,r,t)=>Ci(e,r,t)>=0;var Qr=_i;class Mi{constructor(){this.max=1e3,this.map=new Map}get(r){const t=this.map.get(r);if(t!==void 0)return this.map.delete(r),this.map.set(r,t),t}delete(r){return this.map.delete(r)}set(r,t){if(!this.delete(r)&&t!==void 0){if(this.map.size>=this.max){const n=this.map.keys().next().value;this.delete(n)}this.map.set(r,t)}return this}}var Bi=Mi;const Di=ge,zi=(e,r,t)=>Di(e,r,t)===0;var qi=zi;const Gi=ge,Ui=(e,r,t)=>Gi(e,r,t)!==0;var Hi=Ui;const Wi=ge,Xi=(e,r,t)=>Wi(e,r,t)>0;var Vi=Xi;const Qi=ge,Ji=(e,r,t)=>Qi(e,r,t)<0;var Ki=Ji;const Yi=ge,Zi=(e,r,t)=>Yi(e,r,t)<=0;var en=Zi;const rn=qi,tn=Hi,nn=Vi,an=Qr,sn=Ki,on=en,ln=(e,r,t,i)=>{switch(r){case"===":return typeof e=="object"&&(e=e.version),typeof t=="object"&&(t=t.version),e===t;case"!==":return typeof e=="object"&&(e=e.version),typeof t=="object"&&(t=t.version),e!==t;case"":case"=":case"==":return rn(e,t,i);case"!=":return tn(e,t,i);case">":return nn(e,t,i);case">=":return an(e,t,i);case"<":return sn(e,t,i);case"<=":return on(e,t,i);default:throw new TypeError(`Invalid operator: ${r}`)}};var cn=ln,Ge,br;function hn(){if(br)return Ge;br=1;const e=Symbol("SemVer ANY");class r{static get ANY(){return e}constructor(f,$){if($=t($),f instanceof r){if(f.loose===!!$.loose)return f;f=f.value}f=f.trim().split(/\s+/).join(" "),o("comparator",f,$),this.options=$,this.loose=!!$.loose,this.parse(f),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(f){const $=this.options.loose?i[n.COMPARATORLOOSE]:i[n.COMPARATOR],T=f.match($);if(!T)throw new TypeError(`Invalid comparator: ${f}`);this.operator=T[1]!==void 0?T[1]:"",this.operator==="="&&(this.operator=""),T[2]?this.semver=new u(T[2],this.options.loose):this.semver=e}toString(){return this.value}test(f){if(o("Comparator.test",f,this.options.loose),this.semver===e||f===e)return!0;if(typeof f=="string")try{f=new u(f,this.options)}catch{return!1}return s(f,this.operator,this.semver,this.options)}intersects(f,$){if(!(f instanceof r))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(f.value,$).test(this.value):f.operator===""?f.value===""?!0:new l(this.value,$).test(f.semver):($=t($),$.includePrerelease&&(this.value==="<0.0.0-0"||f.value==="<0.0.0-0")||!$.includePrerelease&&(this.value.startsWith("<0.0.0")||f.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&f.operator.startsWith(">")||this.operator.startsWith("<")&&f.operator.startsWith("<")||this.semver.version===f.semver.version&&this.operator.includes("=")&&f.operator.includes("=")||s(this.semver,"<",f.semver,$)&&this.operator.startsWith(">")&&f.operator.startsWith("<")||s(this.semver,">",f.semver,$)&&this.operator.startsWith("<")&&f.operator.startsWith(">")))}}Ge=r;const t=sr,{safeRe:i,t:n}=_e,s=cn,o=Ce,u=ve,l=Jr();return Ge}var Ue,pr;function Jr(){if(pr)return Ue;pr=1;const e=/\s+/g;class r{constructor(d,E){if(E=n(E),d instanceof r)return d.loose===!!E.loose&&d.includePrerelease===!!E.includePrerelease?d:new r(d.raw,E);if(d instanceof s)return this.raw=d.value,this.set=[[d]],this.formatted=void 0,this;if(this.options=E,this.loose=!!E.loose,this.includePrerelease=!!E.includePrerelease,this.raw=d.trim().replace(e," "),this.set=this.raw.split("||").map(w=>this.parseRange(w.trim())).filter(w=>w.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const w=this.set[0];if(this.set=this.set.filter(y=>!x(y[0])),this.set.length===0)this.set=[w];else if(this.set.length>1){for(const y of this.set)if(y.length===1&&K(y[0])){this.set=[y];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let d=0;d<this.set.length;d++){d>0&&(this.formatted+="||");const E=this.set[d];for(let w=0;w<E.length;w++)w>0&&(this.formatted+=" "),this.formatted+=E[w].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(d){const w=((this.options.includePrerelease&&De)|(this.options.loose&&ze))+":"+d,y=i.get(w);if(y)return y;const v=this.options.loose,P=v?l[m.HYPHENRANGELOOSE]:l[m.HYPHENRANGE];d=d.replace(P,St(this.options.includePrerelease)),o("hyphen replace",d),d=d.replace(l[m.COMPARATORTRIM],f),o("comparator trim",d),d=d.replace(l[m.TILDETRIM],$),o("tilde trim",d),d=d.replace(l[m.CARETTRIM],T),o("caret trim",d);let I=d.split(" ").map(j=>ie(j,this.options)).join(" ").split(/\s+/).map(j=>Lt(j,this.options));v&&(I=I.filter(j=>(o("loose invalid filter",j,this.options),!!j.match(l[m.COMPARATORLOOSE])))),o("range list",I);const R=new Map,L=I.map(j=>new s(j,this.options));for(const j of L){if(x(j))return[j];R.set(j.value,j)}R.size>1&&R.has("")&&R.delete("");const C=[...R.values()];return i.set(w,C),C}intersects(d,E){if(!(d instanceof r))throw new TypeError("a Range is required");return this.set.some(w=>B(w,E)&&d.set.some(y=>B(y,E)&&w.every(v=>y.every(P=>v.intersects(P,E)))))}test(d){if(!d)return!1;if(typeof d=="string")try{d=new u(d,this.options)}catch{return!1}for(let E=0;E<this.set.length;E++)if(jt(this.set[E],d,this.options))return!0;return!1}}Ue=r;const t=Bi,i=new t,n=sr,s=hn(),o=Ce,u=ve,{safeRe:l,t:m,comparatorTrimReplace:f,tildeTrimReplace:$,caretTrimReplace:T}=_e,{FLAG_INCLUDE_PRERELEASE:De,FLAG_LOOSE:ze}=ar,x=g=>g.value==="<0.0.0-0",K=g=>g.value==="",B=(g,d)=>{let E=!0;const w=g.slice();let y=w.pop();for(;E&&w.length;)E=w.every(v=>y.intersects(v,d)),y=w.pop();return E},ie=(g,d)=>(g=g.replace(l[m.BUILD],""),o("comp",g,d),g=Pt(g,d),o("caret",g),g=Y(g,d),o("tildes",g),g=Rt(g,d),o("xrange",g),g=At(g,d),o("stars",g),g),N=g=>!g||g.toLowerCase()==="x"||g==="*",Y=(g,d)=>g.trim().split(/\s+/).map(E=>xt(E,d)).join(" "),xt=(g,d)=>{const E=d.loose?l[m.TILDELOOSE]:l[m.TILDE];return g.replace(E,(w,y,v,P,I)=>{o("tilde",g,w,y,v,P,I);let R;return N(y)?R="":N(v)?R=`>=${y}.0.0 <${+y+1}.0.0-0`:N(P)?R=`>=${y}.${v}.0 <${y}.${+v+1}.0-0`:I?(o("replaceTilde pr",I),R=`>=${y}.${v}.${P}-${I} <${y}.${+v+1}.0-0`):R=`>=${y}.${v}.${P} <${y}.${+v+1}.0-0`,o("tilde return",R),R})},Pt=(g,d)=>g.trim().split(/\s+/).map(E=>$t(E,d)).join(" "),$t=(g,d)=>{o("caret",g,d);const E=d.loose?l[m.CARETLOOSE]:l[m.CARET],w=d.includePrerelease?"-0":"";return g.replace(E,(y,v,P,I,R)=>{o("caret",g,y,v,P,I,R);let L;return N(v)?L="":N(P)?L=`>=${v}.0.0${w} <${+v+1}.0.0-0`:N(I)?v==="0"?L=`>=${v}.${P}.0${w} <${v}.${+P+1}.0-0`:L=`>=${v}.${P}.0${w} <${+v+1}.0.0-0`:R?(o("replaceCaret pr",R),v==="0"?P==="0"?L=`>=${v}.${P}.${I}-${R} <${v}.${P}.${+I+1}-0`:L=`>=${v}.${P}.${I}-${R} <${v}.${+P+1}.0-0`:L=`>=${v}.${P}.${I}-${R} <${+v+1}.0.0-0`):(o("no pr"),v==="0"?P==="0"?L=`>=${v}.${P}.${I}${w} <${v}.${P}.${+I+1}-0`:L=`>=${v}.${P}.${I}${w} <${v}.${+P+1}.0-0`:L=`>=${v}.${P}.${I} <${+v+1}.0.0-0`),o("caret return",L),L})},Rt=(g,d)=>(o("replaceXRanges",g,d),g.split(/\s+/).map(E=>It(E,d)).join(" ")),It=(g,d)=>{g=g.trim();const E=d.loose?l[m.XRANGELOOSE]:l[m.XRANGE];return g.replace(E,(w,y,v,P,I,R)=>{o("xRange",g,w,y,v,P,I,R);const L=N(v),C=L||N(P),j=C||N(I),be=j;return y==="="&&be&&(y=""),R=d.includePrerelease?"-0":"",L?y===">"||y==="<"?w="<0.0.0-0":w="*":y&&be?(C&&(P=0),I=0,y===">"?(y=">=",C?(v=+v+1,P=0,I=0):(P=+P+1,I=0)):y==="<="&&(y="<",C?v=+v+1:P=+P+1),y==="<"&&(R="-0"),w=`${y+v}.${P}.${I}${R}`):C?w=`>=${v}.0.0${R} <${+v+1}.0.0-0`:j&&(w=`>=${v}.${P}.0${R} <${v}.${+P+1}.0-0`),o("xRange return",w),w})},At=(g,d)=>(o("replaceStars",g,d),g.trim().replace(l[m.STAR],"")),Lt=(g,d)=>(o("replaceGTE0",g,d),g.trim().replace(l[d.includePrerelease?m.GTE0PRE:m.GTE0],"")),St=g=>(d,E,w,y,v,P,I,R,L,C,j,be)=>(N(w)?E="":N(y)?E=`>=${w}.0.0${g?"-0":""}`:N(v)?E=`>=${w}.${y}.0${g?"-0":""}`:P?E=`>=${E}`:E=`>=${E}${g?"-0":""}`,N(L)?R="":N(C)?R=`<${+L+1}.0.0-0`:N(j)?R=`<${L}.${+C+1}.0-0`:be?R=`<=${L}.${C}.${j}-${be}`:g?R=`<${L}.${C}.${+j+1}-0`:R=`<=${R}`,`${E} ${R}`.trim()),jt=(g,d,E)=>{for(let w=0;w<g.length;w++)if(!g[w].test(d))return!1;if(d.prerelease.length&&!E.includePrerelease){for(let w=0;w<g.length;w++)if(o(g[w].semver),g[w].semver!==s.ANY&&g[w].semver.prerelease.length>0){const y=g[w].semver;if(y.major===d.major&&y.minor===d.minor&&y.patch===d.patch)return!0}return!1}return!0};return Ue}const fn=Jr(),un=(e,r,t)=>{try{r=new fn(r,t)}catch{return!1}return r.test(e)};var dn=un;const mn="sharp",gn="High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",bn="0.33.5",pn="Lovell Fuller <npm@lovell.info>",wn="https://sharp.pixelplumbing.com",vn=["Pierre Inglebert <pierre.inglebert@gmail.com>","Jonathan Ong <jonathanrichardong@gmail.com>","Chanon Sajjamanochai <chanon.s@gmail.com>","Juliano Julio <julianojulio@gmail.com>","Daniel Gasienica <daniel@gasienica.ch>","Julian Walker <julian@fiftythree.com>","Amit Pitaru <pitaru.amit@gmail.com>","Brandon Aaron <hello.brandon@aaron.sh>","Andreas Lind <andreas@one.com>","Maurus Cuelenaere <mcuelenaere@gmail.com>","Linus Unnebäck <linus@folkdatorn.se>","Victor Mateevitsi <mvictoras@gmail.com>","Alaric Holloway <alaric.holloway@gmail.com>","Bernhard K. Weisshuhn <bkw@codingforce.com>","Chris Riley <criley@primedia.com>","David Carley <dacarley@gmail.com>","John Tobin <john@limelightmobileinc.com>","Kenton Gray <kentongray@gmail.com>","Felix Bünemann <Felix.Buenemann@gmail.com>","Samy Al Zahrani <samyalzahrany@gmail.com>","Chintan Thakkar <lemnisk8@gmail.com>","F. Orlando Galashan <frulo@gmx.de>","Kleis Auke Wolthuizen <info@kleisauke.nl>","Matt Hirsch <mhirsch@media.mit.edu>","Matthias Thoemmes <thoemmes@gmail.com>","Patrick Paskaris <patrick@paskaris.gr>","Jérémy Lal <kapouer@melix.org>","Rahul Nanwani <r.nanwani@gmail.com>","Alice Monday <alice0meta@gmail.com>","Kristo Jorgenson <kristo.jorgenson@gmail.com>","YvesBos <yves_bos@outlook.com>","Guy Maliar <guy@tailorbrands.com>","Nicolas Coden <nicolas@ncoden.fr>","Matt Parrish <matt.r.parrish@gmail.com>","Marcel Bretschneider <marcel.bretschneider@gmail.com>","Matthew McEachen <matthew+github@mceachen.org>","Jarda Kotěšovec <jarda.kotesovec@gmail.com>","Kenric D'Souza <kenric.dsouza@gmail.com>","Oleh Aleinyk <oleg.aleynik@gmail.com>","Marcel Bretschneider <marcel.bretschneider@gmail.com>","Andrea Bianco <andrea.bianco@unibas.ch>","Rik Heywood <rik@rik.org>","Thomas Parisot <hi@oncletom.io>","Nathan Graves <nathanrgraves+github@gmail.com>","Tom Lokhorst <tom@lokhorst.eu>","Espen Hovlandsdal <espen@hovlandsdal.com>","Sylvain Dumont <sylvain.dumont35@gmail.com>","Alun Davies <alun.owain.davies@googlemail.com>","Aidan Hoolachan <ajhoolachan21@gmail.com>","Axel Eirola <axel.eirola@iki.fi>","Freezy <freezy@xbmc.org>","Daiz <taneli.vatanen@gmail.com>","Julian Aubourg <j@ubourg.net>","Keith Belovay <keith@picthrive.com>","Michael B. Klein <mbklein@gmail.com>","Jordan Prudhomme <jordan@raboland.fr>","Ilya Ovdin <iovdin@gmail.com>","Andargor <andargor@yahoo.com>","Paul Neave <paul.neave@gmail.com>","Brendan Kennedy <brenwken@gmail.com>","Brychan Bennett-Odlum <git@brychan.io>","Edward Silverton <e.silverton@gmail.com>","Roman Malieiev <aromaleev@gmail.com>","Tomas Szabo <tomas.szabo@deftomat.com>","Robert O'Rourke <robert@o-rourke.org>","Guillermo Alfonso Varela Chouciño <guillevch@gmail.com>","Christian Flintrup <chr@gigahost.dk>","Manan Jadhav <manan@motionden.com>","Leon Radley <leon@radley.se>","alza54 <alza54@thiocod.in>","Jacob Smith <jacob@frende.me>","Michael Nutt <michael@nutt.im>","Brad Parham <baparham@gmail.com>","Taneli Vatanen <taneli.vatanen@gmail.com>","Joris Dugué <zaruike10@gmail.com>","Chris Banks <christopher.bradley.banks@gmail.com>","Ompal Singh <ompal.hitm09@gmail.com>","Brodan <christopher.hranj@gmail.com>","Ankur Parihar <ankur.github@gmail.com>","Brahim Ait elhaj <brahima@gmail.com>","Mart Jansink <m.jansink@gmail.com>","Lachlan Newman <lachnewman007@gmail.com>","Dennis Beatty <dennis@dcbeatty.com>","Ingvar Stepanyan <me@rreverser.com>","Don Denton <don@happycollision.com>"],En={install:"node install/check",clean:"rm -rf src/build/ .nyc_output/ coverage/ test/fixtures/output.*",test:"npm run test-lint && npm run test-unit && npm run test-licensing && npm run test-types","test-lint":"semistandard && cpplint","test-unit":"nyc --reporter=lcov --reporter=text --check-coverage --branches=100 mocha","test-licensing":'license-checker --production --summary --onlyAllow="Apache-2.0;BSD;ISC;LGPL-3.0-or-later;MIT"',"test-leak":"./test/leak/leak.sh","test-types":"tsd","package-from-local-build":"node npm/from-local-build","package-from-github-release":"node npm/from-github-release","docs-build":"node docs/build && node docs/search-index/build","docs-serve":"cd docs && npx serve","docs-publish":"cd docs && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp"},yn="commonjs",xn="lib/index.js",Pn="lib/index.d.ts",$n=["install","lib","src/*.{cc,h,gyp}"],Rn={type:"git",url:"git://github.com/lovell/sharp.git"},In=["jpeg","png","webp","avif","tiff","gif","svg","jp2","dzi","image","resize","thumbnail","crop","embed","libvips","vips"],An={color:"^4.2.3","detect-libc":"^2.0.3",semver:"^7.6.3"},Ln={"@img/sharp-darwin-arm64":"0.33.5","@img/sharp-darwin-x64":"0.33.5","@img/sharp-libvips-darwin-arm64":"1.0.4","@img/sharp-libvips-darwin-x64":"1.0.4","@img/sharp-libvips-linux-arm":"1.0.5","@img/sharp-libvips-linux-arm64":"1.0.4","@img/sharp-libvips-linux-s390x":"1.0.4","@img/sharp-libvips-linux-x64":"1.0.4","@img/sharp-libvips-linuxmusl-arm64":"1.0.4","@img/sharp-libvips-linuxmusl-x64":"1.0.4","@img/sharp-linux-arm":"0.33.5","@img/sharp-linux-arm64":"0.33.5","@img/sharp-linux-s390x":"0.33.5","@img/sharp-linux-x64":"0.33.5","@img/sharp-linuxmusl-arm64":"0.33.5","@img/sharp-linuxmusl-x64":"0.33.5","@img/sharp-wasm32":"0.33.5","@img/sharp-win32-ia32":"0.33.5","@img/sharp-win32-x64":"0.33.5"},Sn={"@emnapi/runtime":"^1.2.0","@img/sharp-libvips-dev":"1.0.4","@img/sharp-libvips-dev-wasm32":"1.0.5","@img/sharp-libvips-win32-ia32":"1.0.4","@img/sharp-libvips-win32-x64":"1.0.4","@types/node":"*",async:"^3.2.5",cc:"^3.0.1",emnapi:"^1.2.0","exif-reader":"^2.0.1","extract-zip":"^2.0.1",icc:"^3.0.0","jsdoc-to-markdown":"^8.0.3","license-checker":"^25.0.1",mocha:"^10.7.3","node-addon-api":"^8.1.0",nyc:"^17.0.0",prebuild:"^13.0.1",semistandard:"^17.0.0","tar-fs":"^3.0.6",tsd:"^0.31.1"},jn="Apache-2.0",kn={node:"^18.17.0 || ^20.3.0 || >=21.0.0"},Nn={libvips:">=8.15.3"},Fn={url:"https://opencollective.com/libvips"},Tn={napi_versions:[9]},On={env:["mocha"]},Cn={linelength:"120",filter:["build/include"]},_n={include:["lib"]},Mn={directory:"test/types/"},Kr={name:mn,description:gn,version:bn,author:pn,homepage:wn,contributors:vn,scripts:En,type:yn,main:xn,types:Pn,files:$n,repository:Rn,keywords:In,dependencies:An,optionalDependencies:Ln,devDependencies:Sn,license:jn,engines:kn,config:Nn,funding:Fn,binary:Tn,semistandard:On,cc:Cn,nyc:_n,tsd:Mn},{spawnSync:Me}=V,{createHash:Bn}=V,Yr=Ti,Dn=Qr,zn=dn,wr=nr,{config:qn,engines:vr,optionalDependencies:Gn}=Kr,Un={}.npm_package_config_libvips||qn.libvips,Zr=Yr(Un).version,Hn=["darwin-arm64","darwin-x64","linux-arm","linux-arm64","linux-s390x","linux-x64","linuxmusl-arm64","linuxmusl-x64","win32-ia32","win32-x64"],Be={encoding:"utf8",shell:!0},Wn=e=>{e instanceof Error?console.error(`sharp: Installation error: ${e.message}`):console.log(`sharp: ${e}`)},et=()=>wr.isNonGlibcLinuxSync()?wr.familySync():"",Xn=()=>`${process.platform}${et()}-${process.arch}`,de=()=>{if(rt())return"wasm32";const{npm_config_arch:e,npm_config_platform:r,npm_config_libc:t}=process.env,i=typeof t=="string"?t:et();return`${r||process.platform}${i}-${e||process.arch}`},Vn=()=>{try{return se(`@img/sharp-libvips-dev-${de()}/include`)}catch{try{return require("@img/sharp-libvips-dev/include")}catch{}}return""},Qn=()=>{try{return require("@img/sharp-libvips-dev/cplusplus")}catch{}return""},Jn=()=>{try{return se(`@img/sharp-libvips-dev-${de()}/lib`)}catch{try{return se(`@img/sharp-libvips-${de()}/lib`)}catch{}}return""},Kn=()=>{var e;if(((e=process.release)==null?void 0:e.name)==="node"&&process.versions&&!zn(process.versions.node,vr.node))return{found:process.versions.node,expected:vr.node}},rt=()=>{const{CC:e}=process.env;return!!(e&&e.endsWith("/emcc"))},Yn=()=>process.platform==="darwin"&&process.arch==="x64"?(Me("sysctl sysctl.proc_translated",Be).stdout||"").trim()==="sysctl.proc_translated: 1":!1,Er=e=>Bn("sha512").update(e).digest("hex"),Zn=()=>{try{const e=Er(`imgsharp-libvips-${de()}`),r=Yr(Gn[`@img/sharp-libvips-${de()}`]).version;return Er(`${e}npm:${r}`).slice(0,10)}catch{}return""},ea=()=>Me(`node-gyp rebuild --directory=src ${rt()?"--nodedir=emscripten":""}`,{...Be,stdio:"inherit"}).status,tt=()=>process.platform!=="win32"?(Me("pkg-config --modversion vips-cpp",{...Be,env:{...process.env,PKG_CONFIG_PATH:it()}}).stdout||"").trim():"",it=()=>process.platform!=="win32"?[(Me('which brew >/dev/null 2>&1 && brew environment --plain | grep PKG_CONFIG_LIBDIR | cut -d" " -f2',Be).stdout||"").trim(),{}.PKG_CONFIG_PATH,"/usr/local/lib/pkgconfig","/usr/lib/pkgconfig","/usr/local/libdata/pkgconfig","/usr/libdata/pkgconfig"].filter(Boolean).join(":"):"",He=(e,r,t)=>(t&&t(`Detected ${r}, skipping search for globally-installed libvips`),e),ra=e=>{if({}.SHARP_IGNORE_GLOBAL_LIBVIPS)return He(!1,"SHARP_IGNORE_GLOBAL_LIBVIPS",e);if({}.SHARP_FORCE_GLOBAL_LIBVIPS)return He(!0,"SHARP_FORCE_GLOBAL_LIBVIPS",e);if(Yn())return He(!1,"Rosetta",e);const r=tt();return!!r&&Dn(r,Zr)};var nt={minimumLibvipsVersion:Zr,prebuiltPlatforms:Hn,buildPlatformArch:de,buildSharpLibvipsIncludeDir:Vn,buildSharpLibvipsCPlusPlusDir:Qn,buildSharpLibvipsLibDir:Jn,isUnsupportedNodeRuntime:Kn,runtimePlatformArch:Xn,log:Wn,yarnLocator:Zn,spawnRebuild:ea,globalLibvipsVersion:tt,pkgConfigPath:it,useGlobalLibvips:ra};const{familySync:ta,versionSync:ia}=nr,{runtimePlatformArch:na,isUnsupportedNodeRuntime:yr,prebuiltPlatforms:aa,minimumLibvipsVersion:sa}=nt,ne=na(),oa=[`../src/build/Release/sharp-${ne}.node`,"../src/build/Release/sharp-wasm32.node",`@img/sharp-${ne}/sharp.node`,"@img/sharp-wasm32/sharp.node"];let Qe;const je=[];for(const e of oa)try{Qe=se(e);break}catch(r){je.push(r)}if(Qe)Sr.exports=Qe;else{const[e,r,t]=["linux","darwin","win32"].map(s=>ne.startsWith(s)),i=[`Could not load the "sharp" module using the ${ne} runtime`];je.forEach(s=>{s.code!=="MODULE_NOT_FOUND"&&i.push(`${s.code}: ${s.message}`)});const n=je.map(s=>s.message).join(" ");if(i.push("Possible solutions:"),yr()){const{found:s,expected:o}=yr();i.push("- Please upgrade Node.js:",` Found ${s}`,` Requires ${o}`)}else if(aa.includes(ne)){const[s,o]=ne.split("-"),u=s.endsWith("musl")?" --libc=musl":"";i.push("- Ensure optional dependencies can be installed:"," npm install --include=optional sharp","- Ensure your package manager supports multi-platform installation:"," See https://sharp.pixelplumbing.com/install#cross-platform","- Add platform-specific dependencies:",` npm install --os=${s.replace("musl","")}${u} --cpu=${o} sharp`)}else i.push(`- Manually install libvips >= ${sa}`,"- Add experimental WebAssembly-based dependencies:"," npm install --cpu=wasm32 sharp"," npm install @img/sharp-wasm32");if(e&&/(symbol not found|CXXABI_)/i.test(n))try{const{config:s}=se(`@img/sharp-libvips-${ne}/package`),o=`${ta()} ${ia()}`,u=`${s.musl?"musl":"glibc"} ${s.musl||s.glibc}`;i.push("- Update your OS:",` Found ${o}`,` Requires ${u}`)}catch{}throw e&&/\/snap\/core[0-9]{2}/.test(n)&&i.push("- Remove the Node.js Snap, which does not support native modules"," snap remove node"),r&&/Incompatible library version/.test(n)&&i.push("- Update Homebrew:"," brew update && brew upgrade vips"),je.some(s=>s.code==="ERR_DLOPEN_DISABLED")&&i.push("- Run Node.js without using the --no-addons flag"),t&&/The specified procedure could not be found/.test(n)&&i.push("- Using the canvas package on Windows?"," See https://sharp.pixelplumbing.com/install#canvas-and-windows","- Check for outdated versions of sharp in the dependency tree:"," npm ls sharp"),i.push("- Consult the installation documentation:"," See https://sharp.pixelplumbing.com/install"),new Error(i.join(`
|
|
2
2
|
`))}var or=Sr.exports;const la=V,lr=V,ca=Q,ha=la.debuglog("sharp"),ae=function(e,r){if(arguments.length===1&&!ca.defined(e))throw new Error("Invalid input");return this instanceof ae?(lr.Duplex.call(this),this.options={topOffsetPre:-1,leftOffsetPre:-1,widthPre:-1,heightPre:-1,topOffsetPost:-1,leftOffsetPost:-1,widthPost:-1,heightPost:-1,width:-1,height:-1,canvas:"crop",position:0,resizeBackground:[0,0,0,255],useExifOrientation:!1,angle:0,rotationAngle:0,rotationBackground:[0,0,0,255],rotateBeforePreExtract:!1,flip:!1,flop:!1,extendTop:0,extendBottom:0,extendLeft:0,extendRight:0,extendBackground:[0,0,0,255],extendWith:"background",withoutEnlargement:!1,withoutReduction:!1,affineMatrix:[],affineBackground:[0,0,0,255],affineIdx:0,affineIdy:0,affineOdx:0,affineOdy:0,affineInterpolator:this.constructor.interpolators.bilinear,kernel:"lanczos3",fastShrinkOnLoad:!0,tint:[-1,0,0,0],flatten:!1,flattenBackground:[0,0,0],unflatten:!1,negate:!1,negateAlpha:!0,medianSize:0,blurSigma:0,precision:"integer",minAmpl:.2,sharpenSigma:0,sharpenM1:1,sharpenM2:2,sharpenX1:2,sharpenY2:10,sharpenY3:20,threshold:0,thresholdGrayscale:!0,trimBackground:[],trimThreshold:-1,trimLineArt:!1,gamma:0,gammaOut:0,greyscale:!1,normalise:!1,normaliseLower:1,normaliseUpper:99,claheWidth:0,claheHeight:0,claheMaxSlope:3,brightness:1,saturation:1,hue:0,lightness:0,booleanBufferIn:null,booleanFileIn:"",joinChannelIn:[],extractChannel:-1,removeAlpha:!1,ensureAlpha:-1,colourspace:"srgb",colourspacePipeline:"last",composite:[],fileOut:"",formatOut:"input",streamOut:!1,keepMetadata:0,withMetadataOrientation:-1,withMetadataDensity:0,withIccProfile:"",withExif:{},withExifMerge:!0,resolveWithObject:!1,jpegQuality:80,jpegProgressive:!1,jpegChromaSubsampling:"4:2:0",jpegTrellisQuantisation:!1,jpegOvershootDeringing:!1,jpegOptimiseScans:!1,jpegOptimiseCoding:!0,jpegQuantisationTable:0,pngProgressive:!1,pngCompressionLevel:6,pngAdaptiveFiltering:!1,pngPalette:!1,pngQuality:100,pngEffort:7,pngBitdepth:8,pngDither:1,jp2Quality:80,jp2TileHeight:512,jp2TileWidth:512,jp2Lossless:!1,jp2ChromaSubsampling:"4:4:4",webpQuality:80,webpAlphaQuality:100,webpLossless:!1,webpNearLossless:!1,webpSmartSubsample:!1,webpPreset:"default",webpEffort:4,webpMinSize:!1,webpMixed:!1,gifBitdepth:8,gifEffort:7,gifDither:1,gifInterFrameMaxError:0,gifInterPaletteMaxError:3,gifReuse:!0,gifProgressive:!1,tiffQuality:80,tiffCompression:"jpeg",tiffPredictor:"horizontal",tiffPyramid:!1,tiffMiniswhite:!1,tiffBitdepth:8,tiffTile:!1,tiffTileHeight:256,tiffTileWidth:256,tiffXres:1,tiffYres:1,tiffResolutionUnit:"inch",heifQuality:50,heifLossless:!1,heifCompression:"av1",heifEffort:4,heifChromaSubsampling:"4:4:4",heifBitdepth:8,jxlDistance:1,jxlDecodingTier:0,jxlEffort:7,jxlLossless:!1,rawDepth:"uchar",tileSize:256,tileOverlap:0,tileContainer:"fs",tileLayout:"dz",tileFormat:"last",tileDepth:"last",tileAngle:0,tileSkipBlanks:-1,tileBackground:[255,255,255,255],tileCentre:!1,tileId:"https://example.com/iiif",tileBasename:"",timeoutSeconds:0,linearA:[],linearB:[],debuglog:t=>{this.emit("warning",t),ha(t)},queueListener:function(t){ae.queue.emit("change",t)}},this.options.input=this._createInputDescriptor(e,r,{allowStream:!0}),this):new ae(e,r)};Object.setPrototypeOf(ae.prototype,lr.Duplex.prototype);Object.setPrototypeOf(ae,lr.Duplex);function fa(){const e=this.constructor.call(),{debuglog:r,queueListener:t,...i}=this.options;return e.options=structuredClone(i),e.options.debuglog=r,e.options.queueListener=t,this._isStreamInput()&&this.on("finish",()=>{this._flattenBufferIn(),e.options.input.buffer=this.options.input.buffer,e.emit("finish")}),e}Object.assign(ae.prototype,{clone:fa});var ua=ae,at={exports:{}},st={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},ot={exports:{}},da=function(r){return!r||typeof r=="string"?!1:r instanceof Array||Array.isArray(r)||r.length>=0&&(r.splice instanceof Function||Object.getOwnPropertyDescriptor(r,r.length-1)&&r.constructor.name!=="String")},ma=da,ga=Array.prototype.concat,ba=Array.prototype.slice,xr=ot.exports=function(r){for(var t=[],i=0,n=r.length;i<n;i++){var s=r[i];ma(s)?t=ga.call(t,ba.call(s)):t.push(s)}return t};xr.wrap=function(e){return function(){return e(xr(arguments))}};var pa=ot.exports,pe=st,Ee=pa,lt=Object.hasOwnProperty,ct=Object.create(null);for(var We in pe)lt.call(pe,We)&&(ct[pe[We]]=We);var M=at.exports={to:{},get:{}};M.get=function(e){var r=e.substring(0,3).toLowerCase(),t,i;switch(r){case"hsl":t=M.get.hsl(e),i="hsl";break;case"hwb":t=M.get.hwb(e),i="hwb";break;default:t=M.get.rgb(e),i="rgb";break}return t?{model:i,value:t}:null};M.get.rgb=function(e){if(!e)return null;var r=/^#([a-f0-9]{3,4})$/i,t=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,o=[0,0,0,1],u,l,m;if(u=e.match(t)){for(m=u[2],u=u[1],l=0;l<3;l++){var f=l*2;o[l]=parseInt(u.slice(f,f+2),16)}m&&(o[3]=parseInt(m,16)/255)}else if(u=e.match(r)){for(u=u[1],m=u[3],l=0;l<3;l++)o[l]=parseInt(u[l]+u[l],16);m&&(o[3]=parseInt(m+m,16)/255)}else if(u=e.match(i)){for(l=0;l<3;l++)o[l]=parseInt(u[l+1],0);u[4]&&(u[5]?o[3]=parseFloat(u[4])*.01:o[3]=parseFloat(u[4]))}else if(u=e.match(n)){for(l=0;l<3;l++)o[l]=Math.round(parseFloat(u[l+1])*2.55);u[4]&&(u[5]?o[3]=parseFloat(u[4])*.01:o[3]=parseFloat(u[4]))}else return(u=e.match(s))?u[1]==="transparent"?[0,0,0,0]:lt.call(pe,u[1])?(o=pe[u[1]],o[3]=1,o):null:null;for(l=0;l<3;l++)o[l]=re(o[l],0,255);return o[3]=re(o[3],0,1),o};M.get.hsl=function(e){if(!e)return null;var r=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,t=e.match(r);if(t){var i=parseFloat(t[4]),n=(parseFloat(t[1])%360+360)%360,s=re(parseFloat(t[2]),0,100),o=re(parseFloat(t[3]),0,100),u=re(isNaN(i)?1:i,0,1);return[n,s,o,u]}return null};M.get.hwb=function(e){if(!e)return null;var r=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,t=e.match(r);if(t){var i=parseFloat(t[4]),n=(parseFloat(t[1])%360+360)%360,s=re(parseFloat(t[2]),0,100),o=re(parseFloat(t[3]),0,100),u=re(isNaN(i)?1:i,0,1);return[n,s,o,u]}return null};M.to.hex=function(){var e=Ee(arguments);return"#"+Le(e[0])+Le(e[1])+Le(e[2])+(e[3]<1?Le(Math.round(e[3]*255)):"")};M.to.rgb=function(){var e=Ee(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};M.to.rgb.percent=function(){var e=Ee(arguments),r=Math.round(e[0]/255*100),t=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+r+"%, "+t+"%, "+i+"%)":"rgba("+r+"%, "+t+"%, "+i+"%, "+e[3]+")"};M.to.hsl=function(){var e=Ee(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};M.to.hwb=function(){var e=Ee(arguments),r="";return e.length>=4&&e[3]!==1&&(r=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+r+")"};M.to.keyword=function(e){return ct[e.slice(0,3)]};function re(e,r,t){return Math.min(Math.max(r,e),t)}function Le(e){var r=Math.round(e).toString(16).toUpperCase();return r.length<2?"0"+r:r}var wa=at.exports;const we=st,ht={};for(const e of Object.keys(we))ht[we[e]]=e;const b={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var ft=b;for(const e of Object.keys(b)){if(!("channels"in b[e]))throw new Error("missing channels property: "+e);if(!("labels"in b[e]))throw new Error("missing channel labels property: "+e);if(b[e].labels.length!==b[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:r,labels:t}=b[e];delete b[e].channels,delete b[e].labels,Object.defineProperty(b[e],"channels",{value:r}),Object.defineProperty(b[e],"labels",{value:t})}b.rgb.hsl=function(e){const r=e[0]/255,t=e[1]/255,i=e[2]/255,n=Math.min(r,t,i),s=Math.max(r,t,i),o=s-n;let u,l;s===n?u=0:r===s?u=(t-i)/o:t===s?u=2+(i-r)/o:i===s&&(u=4+(r-t)/o),u=Math.min(u*60,360),u<0&&(u+=360);const m=(n+s)/2;return s===n?l=0:m<=.5?l=o/(s+n):l=o/(2-s-n),[u,l*100,m*100]};b.rgb.hsv=function(e){let r,t,i,n,s;const o=e[0]/255,u=e[1]/255,l=e[2]/255,m=Math.max(o,u,l),f=m-Math.min(o,u,l),$=function(T){return(m-T)/6/f+1/2};return f===0?(n=0,s=0):(s=f/m,r=$(o),t=$(u),i=$(l),o===m?n=i-t:u===m?n=1/3+r-i:l===m&&(n=2/3+t-r),n<0?n+=1:n>1&&(n-=1)),[n*360,s*100,m*100]};b.rgb.hwb=function(e){const r=e[0],t=e[1];let i=e[2];const n=b.rgb.hsl(e)[0],s=1/255*Math.min(r,Math.min(t,i));return i=1-1/255*Math.max(r,Math.max(t,i)),[n,s*100,i*100]};b.rgb.cmyk=function(e){const r=e[0]/255,t=e[1]/255,i=e[2]/255,n=Math.min(1-r,1-t,1-i),s=(1-r-n)/(1-n)||0,o=(1-t-n)/(1-n)||0,u=(1-i-n)/(1-n)||0;return[s*100,o*100,u*100,n*100]};function va(e,r){return(e[0]-r[0])**2+(e[1]-r[1])**2+(e[2]-r[2])**2}b.rgb.keyword=function(e){const r=ht[e];if(r)return r;let t=1/0,i;for(const n of Object.keys(we)){const s=we[n],o=va(e,s);o<t&&(t=o,i=n)}return i};b.keyword.rgb=function(e){return we[e]};b.rgb.xyz=function(e){let r=e[0]/255,t=e[1]/255,i=e[2]/255;r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92;const n=r*.4124+t*.3576+i*.1805,s=r*.2126+t*.7152+i*.0722,o=r*.0193+t*.1192+i*.9505;return[n*100,s*100,o*100]};b.rgb.lab=function(e){const r=b.rgb.xyz(e);let t=r[0],i=r[1],n=r[2];t/=95.047,i/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;const s=116*i-16,o=500*(t-i),u=200*(i-n);return[s,o,u]};b.hsl.rgb=function(e){const r=e[0]/360,t=e[1]/100,i=e[2]/100;let n,s,o;if(t===0)return o=i*255,[o,o,o];i<.5?n=i*(1+t):n=i+t-i*t;const u=2*i-n,l=[0,0,0];for(let m=0;m<3;m++)s=r+1/3*-(m-1),s<0&&s++,s>1&&s--,6*s<1?o=u+(n-u)*6*s:2*s<1?o=n:3*s<2?o=u+(n-u)*(2/3-s)*6:o=u,l[m]=o*255;return l};b.hsl.hsv=function(e){const r=e[0];let t=e[1]/100,i=e[2]/100,n=t;const s=Math.max(i,.01);i*=2,t*=i<=1?i:2-i,n*=s<=1?s:2-s;const o=(i+t)/2,u=i===0?2*n/(s+n):2*t/(i+t);return[r,u*100,o*100]};b.hsv.rgb=function(e){const r=e[0]/60,t=e[1]/100;let i=e[2]/100;const n=Math.floor(r)%6,s=r-Math.floor(r),o=255*i*(1-t),u=255*i*(1-t*s),l=255*i*(1-t*(1-s));switch(i*=255,n){case 0:return[i,l,o];case 1:return[u,i,o];case 2:return[o,i,l];case 3:return[o,u,i];case 4:return[l,o,i];case 5:return[i,o,u]}};b.hsv.hsl=function(e){const r=e[0],t=e[1]/100,i=e[2]/100,n=Math.max(i,.01);let s,o;o=(2-t)*i;const u=(2-t)*n;return s=t*n,s/=u<=1?u:2-u,s=s||0,o/=2,[r,s*100,o*100]};b.hwb.rgb=function(e){const r=e[0]/360;let t=e[1]/100,i=e[2]/100;const n=t+i;let s;n>1&&(t/=n,i/=n);const o=Math.floor(6*r),u=1-i;s=6*r-o,o&1&&(s=1-s);const l=t+s*(u-t);let m,f,$;switch(o){default:case 6:case 0:m=u,f=l,$=t;break;case 1:m=l,f=u,$=t;break;case 2:m=t,f=u,$=l;break;case 3:m=t,f=l,$=u;break;case 4:m=l,f=t,$=u;break;case 5:m=u,f=t,$=l;break}return[m*255,f*255,$*255]};b.cmyk.rgb=function(e){const r=e[0]/100,t=e[1]/100,i=e[2]/100,n=e[3]/100,s=1-Math.min(1,r*(1-n)+n),o=1-Math.min(1,t*(1-n)+n),u=1-Math.min(1,i*(1-n)+n);return[s*255,o*255,u*255]};b.xyz.rgb=function(e){const r=e[0]/100,t=e[1]/100,i=e[2]/100;let n,s,o;return n=r*3.2406+t*-1.5372+i*-.4986,s=r*-.9689+t*1.8758+i*.0415,o=r*.0557+t*-.204+i*1.057,n=n>.0031308?1.055*n**(1/2.4)-.055:n*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,n=Math.min(Math.max(0,n),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[n*255,s*255,o*255]};b.xyz.lab=function(e){let r=e[0],t=e[1],i=e[2];r/=95.047,t/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,t=t>.008856?t**(1/3):7.787*t+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;const n=116*t-16,s=500*(r-t),o=200*(t-i);return[n,s,o]};b.lab.xyz=function(e){const r=e[0],t=e[1],i=e[2];let n,s,o;s=(r+16)/116,n=t/500+s,o=s-i/200;const u=s**3,l=n**3,m=o**3;return s=u>.008856?u:(s-16/116)/7.787,n=l>.008856?l:(n-16/116)/7.787,o=m>.008856?m:(o-16/116)/7.787,n*=95.047,s*=100,o*=108.883,[n,s,o]};b.lab.lch=function(e){const r=e[0],t=e[1],i=e[2];let n;n=Math.atan2(i,t)*360/2/Math.PI,n<0&&(n+=360);const o=Math.sqrt(t*t+i*i);return[r,o,n]};b.lch.lab=function(e){const r=e[0],t=e[1],n=e[2]/360*2*Math.PI,s=t*Math.cos(n),o=t*Math.sin(n);return[r,s,o]};b.rgb.ansi16=function(e,r=null){const[t,i,n]=e;let s=r===null?b.rgb.hsv(e)[2]:r;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(n/255)<<2|Math.round(i/255)<<1|Math.round(t/255));return s===2&&(o+=60),o};b.hsv.ansi16=function(e){return b.rgb.ansi16(b.hsv.rgb(e),e[2])};b.rgb.ansi256=function(e){const r=e[0],t=e[1],i=e[2];return r===t&&t===i?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(t/255*5)+Math.round(i/255*5)};b.ansi16.rgb=function(e){let r=e%10;if(r===0||r===7)return e>50&&(r+=3.5),r=r/10.5*255,[r,r,r];const t=(~~(e>50)+1)*.5,i=(r&1)*t*255,n=(r>>1&1)*t*255,s=(r>>2&1)*t*255;return[i,n,s]};b.ansi256.rgb=function(e){if(e>=232){const s=(e-232)*10+8;return[s,s,s]}e-=16;let r;const t=Math.floor(e/36)/5*255,i=Math.floor((r=e%36)/6)/5*255,n=r%6/5*255;return[t,i,n]};b.rgb.hex=function(e){const t=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(t.length)+t};b.hex.rgb=function(e){const r=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!r)return[0,0,0];let t=r[0];r[0].length===3&&(t=t.split("").map(u=>u+u).join(""));const i=parseInt(t,16),n=i>>16&255,s=i>>8&255,o=i&255;return[n,s,o]};b.rgb.hcg=function(e){const r=e[0]/255,t=e[1]/255,i=e[2]/255,n=Math.max(Math.max(r,t),i),s=Math.min(Math.min(r,t),i),o=n-s;let u,l;return o<1?u=s/(1-o):u=0,o<=0?l=0:n===r?l=(t-i)/o%6:n===t?l=2+(i-r)/o:l=4+(r-t)/o,l/=6,l%=1,[l*360,o*100,u*100]};b.hsl.hcg=function(e){const r=e[1]/100,t=e[2]/100,i=t<.5?2*r*t:2*r*(1-t);let n=0;return i<1&&(n=(t-.5*i)/(1-i)),[e[0],i*100,n*100]};b.hsv.hcg=function(e){const r=e[1]/100,t=e[2]/100,i=r*t;let n=0;return i<1&&(n=(t-i)/(1-i)),[e[0],i*100,n*100]};b.hcg.rgb=function(e){const r=e[0]/360,t=e[1]/100,i=e[2]/100;if(t===0)return[i*255,i*255,i*255];const n=[0,0,0],s=r%1*6,o=s%1,u=1-o;let l=0;switch(Math.floor(s)){case 0:n[0]=1,n[1]=o,n[2]=0;break;case 1:n[0]=u,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=o;break;case 3:n[0]=0,n[1]=u,n[2]=1;break;case 4:n[0]=o,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=u}return l=(1-t)*i,[(t*n[0]+l)*255,(t*n[1]+l)*255,(t*n[2]+l)*255]};b.hcg.hsv=function(e){const r=e[1]/100,t=e[2]/100,i=r+t*(1-r);let n=0;return i>0&&(n=r/i),[e[0],n*100,i*100]};b.hcg.hsl=function(e){const r=e[1]/100,i=e[2]/100*(1-r)+.5*r;let n=0;return i>0&&i<.5?n=r/(2*i):i>=.5&&i<1&&(n=r/(2*(1-i))),[e[0],n*100,i*100]};b.hcg.hwb=function(e){const r=e[1]/100,t=e[2]/100,i=r+t*(1-r);return[e[0],(i-r)*100,(1-i)*100]};b.hwb.hcg=function(e){const r=e[1]/100,i=1-e[2]/100,n=i-r;let s=0;return n<1&&(s=(i-n)/(1-n)),[e[0],n*100,s*100]};b.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};b.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};b.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};b.gray.hsl=function(e){return[0,0,e[0]]};b.gray.hsv=b.gray.hsl;b.gray.hwb=function(e){return[0,100,e[0]]};b.gray.cmyk=function(e){return[0,0,0,e[0]]};b.gray.lab=function(e){return[e[0],0,0]};b.gray.hex=function(e){const r=Math.round(e[0]/100*255)&255,i=((r<<16)+(r<<8)+r).toString(16).toUpperCase();return"000000".substring(i.length)+i};b.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const Ne=ft;function Ea(){const e={},r=Object.keys(Ne);for(let t=r.length,i=0;i<t;i++)e[r[i]]={distance:-1,parent:null};return e}function ya(e){const r=Ea(),t=[e];for(r[e].distance=0;t.length;){const i=t.pop(),n=Object.keys(Ne[i]);for(let s=n.length,o=0;o<s;o++){const u=n[o],l=r[u];l.distance===-1&&(l.distance=r[i].distance+1,l.parent=i,t.unshift(u))}}return r}function xa(e,r){return function(t){return r(e(t))}}function Pa(e,r){const t=[r[e].parent,e];let i=Ne[r[e].parent][e],n=r[e].parent;for(;r[n].parent;)t.unshift(r[n].parent),i=xa(Ne[r[n].parent][n],i),n=r[n].parent;return i.conversion=t,i}var $a=function(e){const r=ya(e),t={},i=Object.keys(r);for(let n=i.length,s=0;s<n;s++){const o=i[s];r[o].parent!==null&&(t[o]=Pa(o,r))}return t};const Je=ft,Ra=$a,ce={},Ia=Object.keys(Je);function Aa(e){const r=function(...t){const i=t[0];return i==null?i:(i.length>1&&(t=i),e(t))};return"conversion"in e&&(r.conversion=e.conversion),r}function La(e){const r=function(...t){const i=t[0];if(i==null)return i;i.length>1&&(t=i);const n=e(t);if(typeof n=="object")for(let s=n.length,o=0;o<s;o++)n[o]=Math.round(n[o]);return n};return"conversion"in e&&(r.conversion=e.conversion),r}Ia.forEach(e=>{ce[e]={},Object.defineProperty(ce[e],"channels",{value:Je[e].channels}),Object.defineProperty(ce[e],"labels",{value:Je[e].labels});const r=Ra(e);Object.keys(r).forEach(i=>{const n=r[i];ce[e][i]=La(n),ce[e][i].raw=Aa(n)})});var Sa=ce;const he=wa,_=Sa,ut=["keyword","gray","hex"],Ke={};for(const e of Object.keys(_))Ke[[..._[e].labels].sort().join("")]=e;const Fe={};function F(e,r){if(!(this instanceof F))return new F(e,r);if(r&&r in ut&&(r=null),r&&!(r in _))throw new Error("Unknown model: "+r);let t,i;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof F)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){const n=he.get(e);if(n===null)throw new Error("Unable to parse color from string: "+e);this.model=n.model,i=_[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(e.length>0){this.model=r||"rgb",i=_[this.model].channels;const n=Array.prototype.slice.call(e,0,i);this.color=Ye(n,i),this.valpha=typeof e[i]=="number"?e[i]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;const n=Object.keys(e);"alpha"in e&&(n.splice(n.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);const s=n.sort().join("");if(!(s in Ke))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=Ke[s];const{labels:o}=_[this.model],u=[];for(t=0;t<o.length;t++)u.push(e[o[t]]);this.color=Ye(u)}if(Fe[this.model])for(i=_[this.model].channels,t=0;t<i;t++){const n=Fe[this.model][t];n&&(this.color[t]=n(this.color[t]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}F.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let r=this.model in he.to?this:this.rgb();r=r.round(typeof e=="number"?e:1);const t=r.valpha===1?r.color:[...r.color,this.valpha];return he.to[r.model](t)},percentString(e){const r=this.rgb().round(typeof e=="number"?e:1),t=r.valpha===1?r.color:[...r.color,this.valpha];return he.to.rgb.percent(t)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:r}=_[this.model],{labels:t}=_[this.model];for(let i=0;i<r;i++)e[t[i]]=this.color[i];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new F([...this.color.map(ka(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new F([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:S("rgb",0,k(255)),green:S("rgb",1,k(255)),blue:S("rgb",2,k(255)),hue:S(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:S("hsl",1,k(100)),lightness:S("hsl",2,k(100)),saturationv:S("hsv",1,k(100)),value:S("hsv",2,k(100)),chroma:S("hcg",1,k(100)),gray:S("hcg",2,k(100)),white:S("hwb",1,k(100)),wblack:S("hwb",2,k(100)),cyan:S("cmyk",0,k(100)),magenta:S("cmyk",1,k(100)),yellow:S("cmyk",2,k(100)),black:S("cmyk",3,k(100)),x:S("xyz",0,k(95.047)),y:S("xyz",1,k(100)),z:S("xyz",2,k(108.833)),l:S("lab",0,k(100)),a:S("lab",1),b:S("lab",2),keyword(e){return e!==void 0?new F(e):_[this.model].keyword(this.color)},hex(e){return e!==void 0?new F(e):he.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new F(e);const r=this.rgb().round().color;let t=Math.round(this.valpha*255).toString(16).toUpperCase();return t.length===1&&(t="0"+t),he.to.hex(r)+t},rgbNumber(){const e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){const e=this.rgb().color,r=[];for(const[t,i]of e.entries()){const n=i/255;r[t]=n<=.04045?n/12.92:((n+.055)/1.055)**2.4}return .2126*r[0]+.7152*r[1]+.0722*r[2]},contrast(e){const r=this.luminosity(),t=e.luminosity();return r>t?(r+.05)/(t+.05):(t+.05)/(r+.05)},level(e){const r=this.contrast(e);return r>=7?"AAA":r>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let r=0;r<3;r++)e.color[r]=255-e.color[r];return e},lighten(e){const r=this.hsl();return r.color[2]+=r.color[2]*e,r},darken(e){const r=this.hsl();return r.color[2]-=r.color[2]*e,r},saturate(e){const r=this.hsl();return r.color[1]+=r.color[1]*e,r},desaturate(e){const r=this.hsl();return r.color[1]-=r.color[1]*e,r},whiten(e){const r=this.hwb();return r.color[1]+=r.color[1]*e,r},blacken(e){const r=this.hwb();return r.color[2]+=r.color[2]*e,r},grayscale(){const e=this.rgb().color,r=e[0]*.3+e[1]*.59+e[2]*.11;return F.rgb(r,r,r)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const r=this.hsl();let t=r.color[0];return t=(t+e)%360,t=t<0?360+t:t,r.color[0]=t,r},mix(e,r){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const t=e.rgb(),i=this.rgb(),n=r===void 0?.5:r,s=2*n-1,o=t.alpha()-i.alpha(),u=((s*o===-1?s:(s+o)/(1+s*o))+1)/2,l=1-u;return F.rgb(u*t.red()+l*i.red(),u*t.green()+l*i.green(),u*t.blue()+l*i.blue(),t.alpha()*n+i.alpha()*(1-n))}};for(const e of Object.keys(_)){if(ut.includes(e))continue;const{channels:r}=_[e];F.prototype[e]=function(...t){return this.model===e?new F(this):t.length>0?new F(t,e):new F([...Na(_[this.model][e].raw(this.color)),this.valpha],e)},F[e]=function(...t){let i=t[0];return typeof i=="number"&&(i=Ye(t,r)),new F(i,e)}}function ja(e,r){return Number(e.toFixed(r))}function ka(e){return function(r){return ja(r,e)}}function S(e,r,t){e=Array.isArray(e)?e:[e];for(const i of e)(Fe[i]||(Fe[i]=[]))[r]=t;return e=e[0],function(i){let n;return i!==void 0?(t&&(i=t(i)),n=this[e](),n.color[r]=i,n):(n=this[e]().color[r],t&&(n=t(n)),n)}}function k(e){return function(r){return Math.max(0,Math.min(e,r))}}function Na(e){return Array.isArray(e)?e:[e]}function Ye(e,r){for(let t=0;t<r;t++)typeof e[t]!="number"&&(e[t]=0);return e}var cr=F;const Fa=cr,h=Q,ee=or,Ta={left:"low",center:"centre",centre:"centre",right:"high"};function dt(e){const{raw:r,density:t,limitInputPixels:i,ignoreIcc:n,unlimited:s,sequentialRead:o,failOn:u,failOnError:l,animated:m,page:f,pages:$,subifd:T}=e;return[r,t,i,n,s,o,u,l,m,f,$,T].some(h.defined)?{raw:r,density:t,limitInputPixels:i,ignoreIcc:n,unlimited:s,sequentialRead:o,failOn:u,failOnError:l,animated:m,page:f,pages:$,subifd:T}:void 0}function Oa(e,r,t){const i={failOn:"warning",limitInputPixels:Math.pow(16383,2),ignoreIcc:!1,unlimited:!1,sequentialRead:!0};if(h.string(e))i.file=e;else if(h.buffer(e)){if(e.length===0)throw Error("Input Buffer is empty");i.buffer=e}else if(h.arrayBuffer(e)){if(e.byteLength===0)throw Error("Input bit Array is empty");i.buffer=Buffer.from(e,0,e.byteLength)}else if(h.typedArray(e)){if(e.length===0)throw Error("Input Bit Array is empty");i.buffer=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}else if(h.plainObject(e)&&!h.defined(r))r=e,dt(r)&&(i.buffer=[]);else if(!h.defined(e)&&!h.defined(r)&&h.object(t)&&t.allowStream)i.buffer=[];else throw new Error(`Unsupported input '${e}' of type ${typeof e}${h.defined(r)?` when also providing options of type ${typeof r}`:""}`);if(h.object(r)){if(h.defined(r.failOnError))if(h.bool(r.failOnError))i.failOn=r.failOnError?"warning":"none";else throw h.invalidParameterError("failOnError","boolean",r.failOnError);if(h.defined(r.failOn))if(h.string(r.failOn)&&h.inArray(r.failOn,["none","truncated","error","warning"]))i.failOn=r.failOn;else throw h.invalidParameterError("failOn","one of: none, truncated, error, warning",r.failOn);if(h.defined(r.density))if(h.inRange(r.density,1,1e5))i.density=r.density;else throw h.invalidParameterError("density","number between 1 and 100000",r.density);if(h.defined(r.ignoreIcc))if(h.bool(r.ignoreIcc))i.ignoreIcc=r.ignoreIcc;else throw h.invalidParameterError("ignoreIcc","boolean",r.ignoreIcc);if(h.defined(r.limitInputPixels))if(h.bool(r.limitInputPixels))i.limitInputPixels=r.limitInputPixels?Math.pow(16383,2):0;else if(h.integer(r.limitInputPixels)&&h.inRange(r.limitInputPixels,0,Number.MAX_SAFE_INTEGER))i.limitInputPixels=r.limitInputPixels;else throw h.invalidParameterError("limitInputPixels","positive integer",r.limitInputPixels);if(h.defined(r.unlimited))if(h.bool(r.unlimited))i.unlimited=r.unlimited;else throw h.invalidParameterError("unlimited","boolean",r.unlimited);if(h.defined(r.sequentialRead))if(h.bool(r.sequentialRead))i.sequentialRead=r.sequentialRead;else throw h.invalidParameterError("sequentialRead","boolean",r.sequentialRead);if(h.defined(r.raw))if(h.object(r.raw)&&h.integer(r.raw.width)&&r.raw.width>0&&h.integer(r.raw.height)&&r.raw.height>0&&h.integer(r.raw.channels)&&h.inRange(r.raw.channels,1,4))switch(i.rawWidth=r.raw.width,i.rawHeight=r.raw.height,i.rawChannels=r.raw.channels,i.rawPremultiplied=!!r.raw.premultiplied,e.constructor){case Uint8Array:case Uint8ClampedArray:i.rawDepth="uchar";break;case Int8Array:i.rawDepth="char";break;case Uint16Array:i.rawDepth="ushort";break;case Int16Array:i.rawDepth="short";break;case Uint32Array:i.rawDepth="uint";break;case Int32Array:i.rawDepth="int";break;case Float32Array:i.rawDepth="float";break;case Float64Array:i.rawDepth="double";break;default:i.rawDepth="uchar";break}else throw new Error("Expected width, height and channels for raw pixel input");if(h.defined(r.animated))if(h.bool(r.animated))i.pages=r.animated?-1:1;else throw h.invalidParameterError("animated","boolean",r.animated);if(h.defined(r.pages))if(h.integer(r.pages)&&h.inRange(r.pages,-1,1e5))i.pages=r.pages;else throw h.invalidParameterError("pages","integer between -1 and 100000",r.pages);if(h.defined(r.page))if(h.integer(r.page)&&h.inRange(r.page,0,1e5))i.page=r.page;else throw h.invalidParameterError("page","integer between 0 and 100000",r.page);if(h.defined(r.level))if(h.integer(r.level)&&h.inRange(r.level,0,256))i.level=r.level;else throw h.invalidParameterError("level","integer between 0 and 256",r.level);if(h.defined(r.subifd))if(h.integer(r.subifd)&&h.inRange(r.subifd,-1,1e5))i.subifd=r.subifd;else throw h.invalidParameterError("subifd","integer between -1 and 100000",r.subifd);if(h.defined(r.create))if(h.object(r.create)&&h.integer(r.create.width)&&r.create.width>0&&h.integer(r.create.height)&&r.create.height>0&&h.integer(r.create.channels)){if(i.createWidth=r.create.width,i.createHeight=r.create.height,i.createChannels=r.create.channels,h.defined(r.create.noise)){if(!h.object(r.create.noise))throw new Error("Expected noise to be an object");if(!h.inArray(r.create.noise.type,["gaussian"]))throw new Error("Only gaussian noise is supported at the moment");if(!h.inRange(r.create.channels,1,4))throw h.invalidParameterError("create.channels","number between 1 and 4",r.create.channels);if(i.createNoiseType=r.create.noise.type,h.number(r.create.noise.mean)&&h.inRange(r.create.noise.mean,0,1e4))i.createNoiseMean=r.create.noise.mean;else throw h.invalidParameterError("create.noise.mean","number between 0 and 10000",r.create.noise.mean);if(h.number(r.create.noise.sigma)&&h.inRange(r.create.noise.sigma,0,1e4))i.createNoiseSigma=r.create.noise.sigma;else throw h.invalidParameterError("create.noise.sigma","number between 0 and 10000",r.create.noise.sigma)}else if(h.defined(r.create.background)){if(!h.inRange(r.create.channels,3,4))throw h.invalidParameterError("create.channels","number between 3 and 4",r.create.channels);const n=Fa(r.create.background);i.createBackground=[n.red(),n.green(),n.blue(),Math.round(n.alpha()*255)]}else throw new Error("Expected valid noise or background to create a new input image");delete i.buffer}else throw new Error("Expected valid width, height and channels to create a new input image");if(h.defined(r.text))if(h.object(r.text)&&h.string(r.text.text)){if(i.textValue=r.text.text,h.defined(r.text.height)&&h.defined(r.text.dpi))throw new Error("Expected only one of dpi or height");if(h.defined(r.text.font))if(h.string(r.text.font))i.textFont=r.text.font;else throw h.invalidParameterError("text.font","string",r.text.font);if(h.defined(r.text.fontfile))if(h.string(r.text.fontfile))i.textFontfile=r.text.fontfile;else throw h.invalidParameterError("text.fontfile","string",r.text.fontfile);if(h.defined(r.text.width))if(h.integer(r.text.width)&&r.text.width>0)i.textWidth=r.text.width;else throw h.invalidParameterError("text.width","positive integer",r.text.width);if(h.defined(r.text.height))if(h.integer(r.text.height)&&r.text.height>0)i.textHeight=r.text.height;else throw h.invalidParameterError("text.height","positive integer",r.text.height);if(h.defined(r.text.align))if(h.string(r.text.align)&&h.string(this.constructor.align[r.text.align]))i.textAlign=this.constructor.align[r.text.align];else throw h.invalidParameterError("text.align","valid alignment",r.text.align);if(h.defined(r.text.justify))if(h.bool(r.text.justify))i.textJustify=r.text.justify;else throw h.invalidParameterError("text.justify","boolean",r.text.justify);if(h.defined(r.text.dpi))if(h.integer(r.text.dpi)&&h.inRange(r.text.dpi,1,1e6))i.textDpi=r.text.dpi;else throw h.invalidParameterError("text.dpi","integer between 1 and 1000000",r.text.dpi);if(h.defined(r.text.rgba))if(h.bool(r.text.rgba))i.textRgba=r.text.rgba;else throw h.invalidParameterError("text.rgba","bool",r.text.rgba);if(h.defined(r.text.spacing))if(h.integer(r.text.spacing)&&h.inRange(r.text.spacing,-1e6,1e6))i.textSpacing=r.text.spacing;else throw h.invalidParameterError("text.spacing","integer between -1000000 and 1000000",r.text.spacing);if(h.defined(r.text.wrap))if(h.string(r.text.wrap)&&h.inArray(r.text.wrap,["word","char","word-char","none"]))i.textWrap=r.text.wrap;else throw h.invalidParameterError("text.wrap","one of: word, char, word-char, none",r.text.wrap);delete i.buffer}else throw new Error("Expected a valid string to create an image with text.")}else if(h.defined(r))throw new Error("Invalid input options "+r);return i}function Ca(e,r,t){Array.isArray(this.options.input.buffer)?h.buffer(e)?(this.options.input.buffer.length===0&&this.on("finish",()=>{this.streamInFinished=!0}),this.options.input.buffer.push(e),t()):t(new Error("Non-Buffer data on Writable Stream")):t(new Error("Unexpected data on Writable Stream"))}function _a(){this._isStreamInput()&&(this.options.input.buffer=Buffer.concat(this.options.input.buffer))}function Ma(){return Array.isArray(this.options.input.buffer)}function Ba(e){const r=Error();return h.fn(e)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),ee.metadata(this.options,(t,i)=>{t?e(h.nativeError(t,r)):e(null,i)})}):ee.metadata(this.options,(t,i)=>{t?e(h.nativeError(t,r)):e(null,i)}),this):this._isStreamInput()?new Promise((t,i)=>{const n=()=>{this._flattenBufferIn(),ee.metadata(this.options,(s,o)=>{s?i(h.nativeError(s,r)):t(o)})};this.writableFinished?n():this.once("finish",n)}):new Promise((t,i)=>{ee.metadata(this.options,(n,s)=>{n?i(h.nativeError(n,r)):t(s)})})}function Da(e){const r=Error();return h.fn(e)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),ee.stats(this.options,(t,i)=>{t?e(h.nativeError(t,r)):e(null,i)})}):ee.stats(this.options,(t,i)=>{t?e(h.nativeError(t,r)):e(null,i)}),this):this._isStreamInput()?new Promise((t,i)=>{this.on("finish",function(){this._flattenBufferIn(),ee.stats(this.options,(n,s)=>{n?i(h.nativeError(n,r)):t(s)})})}):new Promise((t,i)=>{ee.stats(this.options,(n,s)=>{n?i(h.nativeError(n,r)):t(s)})})}var za=function(e){Object.assign(e.prototype,{_inputOptionsFromObject:dt,_createInputDescriptor:Oa,_write:Ca,_flattenBufferIn:_a,_isStreamInput:Ma,metadata:Ba,stats:Da}),e.align=Ta};const p=Q,mt={center:0,centre:0,north:1,east:2,south:3,west:4,northeast:5,southeast:6,southwest:7,northwest:8},gt={top:1,right:2,bottom:3,left:4,"right top":5,"right bottom":6,"left bottom":7,"left top":8},Pr={background:"background",copy:"copy",repeat:"repeat",mirror:"mirror"},bt={entropy:16,attention:17},Ze={nearest:"nearest",linear:"linear",cubic:"cubic",mitchell:"mitchell",lanczos2:"lanczos2",lanczos3:"lanczos3"},qa={contain:"contain",cover:"cover",fill:"fill",inside:"inside",outside:"outside"},Ga={contain:"embed",cover:"crop",fill:"ignore_aspect",inside:"max",outside:"min"};function hr(e){return e.angle%360!==0||e.useExifOrientation===!0||e.rotationAngle!==0}function Te(e){return e.width!==-1||e.height!==-1}function Ua(e,r,t){if(Te(this.options)&&this.options.debuglog("ignoring previous resize options"),this.options.widthPost!==-1&&this.options.debuglog("operation order will be: extract, resize, extract"),p.defined(e))if(p.object(e)&&!p.defined(t))t=e;else if(p.integer(e)&&e>0)this.options.width=e;else throw p.invalidParameterError("width","positive integer",e);else this.options.width=-1;if(p.defined(r))if(p.integer(r)&&r>0)this.options.height=r;else throw p.invalidParameterError("height","positive integer",r);else this.options.height=-1;if(p.object(t)){if(p.defined(t.width))if(p.integer(t.width)&&t.width>0)this.options.width=t.width;else throw p.invalidParameterError("width","positive integer",t.width);if(p.defined(t.height))if(p.integer(t.height)&&t.height>0)this.options.height=t.height;else throw p.invalidParameterError("height","positive integer",t.height);if(p.defined(t.fit)){const i=Ga[t.fit];if(p.string(i))this.options.canvas=i;else throw p.invalidParameterError("fit","valid fit",t.fit)}if(p.defined(t.position)){const i=p.integer(t.position)?t.position:bt[t.position]||gt[t.position]||mt[t.position];if(p.integer(i)&&(p.inRange(i,0,8)||p.inRange(i,16,17)))this.options.position=i;else throw p.invalidParameterError("position","valid position/gravity/strategy",t.position)}if(this._setBackgroundColourOption("resizeBackground",t.background),p.defined(t.kernel))if(p.string(Ze[t.kernel]))this.options.kernel=Ze[t.kernel];else throw p.invalidParameterError("kernel","valid kernel name",t.kernel);p.defined(t.withoutEnlargement)&&this._setBooleanOption("withoutEnlargement",t.withoutEnlargement),p.defined(t.withoutReduction)&&this._setBooleanOption("withoutReduction",t.withoutReduction),p.defined(t.fastShrinkOnLoad)&&this._setBooleanOption("fastShrinkOnLoad",t.fastShrinkOnLoad)}return hr(this.options)&&Te(this.options)&&(this.options.rotateBeforePreExtract=!0),this}function Ha(e){if(p.integer(e)&&e>0)this.options.extendTop=e,this.options.extendBottom=e,this.options.extendLeft=e,this.options.extendRight=e;else if(p.object(e)){if(p.defined(e.top))if(p.integer(e.top)&&e.top>=0)this.options.extendTop=e.top;else throw p.invalidParameterError("top","positive integer",e.top);if(p.defined(e.bottom))if(p.integer(e.bottom)&&e.bottom>=0)this.options.extendBottom=e.bottom;else throw p.invalidParameterError("bottom","positive integer",e.bottom);if(p.defined(e.left))if(p.integer(e.left)&&e.left>=0)this.options.extendLeft=e.left;else throw p.invalidParameterError("left","positive integer",e.left);if(p.defined(e.right))if(p.integer(e.right)&&e.right>=0)this.options.extendRight=e.right;else throw p.invalidParameterError("right","positive integer",e.right);if(this._setBackgroundColourOption("extendBackground",e.background),p.defined(e.extendWith))if(p.string(Pr[e.extendWith]))this.options.extendWith=Pr[e.extendWith];else throw p.invalidParameterError("extendWith","one of: background, copy, repeat, mirror",e.extendWith)}else throw p.invalidParameterError("extend","integer or object",e);return this}function Wa(e){const r=Te(this.options)||this.options.widthPre!==-1?"Post":"Pre";return this.options[`width${r}`]!==-1&&this.options.debuglog("ignoring previous extract options"),["left","top","width","height"].forEach(function(t){const i=e[t];if(p.integer(i)&&i>=0)this.options[t+(t==="left"||t==="top"?"Offset":"")+r]=i;else throw p.invalidParameterError(t,"integer",i)},this),hr(this.options)&&!Te(this.options)&&(this.options.widthPre===-1||this.options.widthPost===-1)&&(this.options.rotateBeforePreExtract=!0),this}function Xa(e){if(this.options.trimThreshold=10,p.defined(e))if(p.object(e)){if(p.defined(e.background)&&this._setBackgroundColourOption("trimBackground",e.background),p.defined(e.threshold))if(p.number(e.threshold)&&e.threshold>=0)this.options.trimThreshold=e.threshold;else throw p.invalidParameterError("threshold","positive number",e.threshold);p.defined(e.lineArt)&&this._setBooleanOption("trimLineArt",e.lineArt)}else throw p.invalidParameterError("trim","object",e);return hr(this.options)&&(this.options.rotateBeforePreExtract=!0),this}var Va=function(e){Object.assign(e.prototype,{resize:Ua,extend:Ha,extract:Wa,trim:Xa}),e.gravity=mt,e.strategy=bt,e.kernel=Ze,e.fit=qa,e.position=gt};const A=Q,er={clear:"clear",source:"source",over:"over",in:"in",out:"out",atop:"atop",dest:"dest","dest-over":"dest-over","dest-in":"dest-in","dest-out":"dest-out","dest-atop":"dest-atop",xor:"xor",add:"add",saturate:"saturate",multiply:"multiply",screen:"screen",overlay:"overlay",darken:"darken",lighten:"lighten","colour-dodge":"colour-dodge","color-dodge":"colour-dodge","colour-burn":"colour-burn","color-burn":"colour-burn","hard-light":"hard-light","soft-light":"soft-light",difference:"difference",exclusion:"exclusion"};function Qa(e){if(!Array.isArray(e))throw A.invalidParameterError("images to composite","array",e);return this.options.composite=e.map(r=>{if(!A.object(r))throw A.invalidParameterError("image to composite","object",r);const t=this._inputOptionsFromObject(r),i={input:this._createInputDescriptor(r.input,t,{allowStream:!1}),blend:"over",tile:!1,left:0,top:0,hasOffset:!1,gravity:0,premultiplied:!1};if(A.defined(r.blend))if(A.string(er[r.blend]))i.blend=er[r.blend];else throw A.invalidParameterError("blend","valid blend name",r.blend);if(A.defined(r.tile))if(A.bool(r.tile))i.tile=r.tile;else throw A.invalidParameterError("tile","boolean",r.tile);if(A.defined(r.left))if(A.integer(r.left))i.left=r.left;else throw A.invalidParameterError("left","integer",r.left);if(A.defined(r.top))if(A.integer(r.top))i.top=r.top;else throw A.invalidParameterError("top","integer",r.top);if(A.defined(r.top)!==A.defined(r.left))throw new Error("Expected both left and top to be set");if(i.hasOffset=A.integer(r.top)&&A.integer(r.left),A.defined(r.gravity))if(A.integer(r.gravity)&&A.inRange(r.gravity,0,8))i.gravity=r.gravity;else if(A.string(r.gravity)&&A.integer(this.constructor.gravity[r.gravity]))i.gravity=this.constructor.gravity[r.gravity];else throw A.invalidParameterError("gravity","valid gravity",r.gravity);if(A.defined(r.premultiplied))if(A.bool(r.premultiplied))i.premultiplied=r.premultiplied;else throw A.invalidParameterError("premultiplied","boolean",r.premultiplied);return i}),this}var Ja=function(e){e.prototype.composite=Qa,e.blend=er};const Ka=cr,c=Q,$r={integer:"integer",float:"float",approximate:"approximate"};function Ya(e,r){if((this.options.useExifOrientation||this.options.angle||this.options.rotationAngle)&&this.options.debuglog("ignoring previous rotate options"),!c.defined(e))this.options.useExifOrientation=!0;else if(c.integer(e)&&!(e%90))this.options.angle=e;else if(c.number(e)){if(this.options.rotationAngle=e,c.object(r)&&r.background){const t=Ka(r.background);this.options.rotationBackground=[t.red(),t.green(),t.blue(),Math.round(t.alpha()*255)]}}else throw c.invalidParameterError("angle","numeric",e);return this}function Za(e){return this.options.flip=c.bool(e)?e:!0,this}function es(e){return this.options.flop=c.bool(e)?e:!0,this}function rs(e,r){const t=[].concat(...e);if(t.length===4&&t.every(c.number))this.options.affineMatrix=t;else throw c.invalidParameterError("matrix","1x4 or 2x2 array",e);if(c.defined(r))if(c.object(r)){if(this._setBackgroundColourOption("affineBackground",r.background),c.defined(r.idx))if(c.number(r.idx))this.options.affineIdx=r.idx;else throw c.invalidParameterError("options.idx","number",r.idx);if(c.defined(r.idy))if(c.number(r.idy))this.options.affineIdy=r.idy;else throw c.invalidParameterError("options.idy","number",r.idy);if(c.defined(r.odx))if(c.number(r.odx))this.options.affineOdx=r.odx;else throw c.invalidParameterError("options.odx","number",r.odx);if(c.defined(r.ody))if(c.number(r.ody))this.options.affineOdy=r.ody;else throw c.invalidParameterError("options.ody","number",r.ody);if(c.defined(r.interpolator))if(c.inArray(r.interpolator,Object.values(this.constructor.interpolators)))this.options.affineInterpolator=r.interpolator;else throw c.invalidParameterError("options.interpolator","valid interpolator name",r.interpolator)}else throw c.invalidParameterError("options","object",r);return this}function ts(e,r,t){if(!c.defined(e))this.options.sharpenSigma=-1;else if(c.bool(e))this.options.sharpenSigma=e?-1:0;else if(c.number(e)&&c.inRange(e,.01,1e4)){if(this.options.sharpenSigma=e,c.defined(r))if(c.number(r)&&c.inRange(r,0,1e4))this.options.sharpenM1=r;else throw c.invalidParameterError("flat","number between 0 and 10000",r);if(c.defined(t))if(c.number(t)&&c.inRange(t,0,1e4))this.options.sharpenM2=t;else throw c.invalidParameterError("jagged","number between 0 and 10000",t)}else if(c.plainObject(e)){if(c.number(e.sigma)&&c.inRange(e.sigma,1e-6,10))this.options.sharpenSigma=e.sigma;else throw c.invalidParameterError("options.sigma","number between 0.000001 and 10",e.sigma);if(c.defined(e.m1))if(c.number(e.m1)&&c.inRange(e.m1,0,1e6))this.options.sharpenM1=e.m1;else throw c.invalidParameterError("options.m1","number between 0 and 1000000",e.m1);if(c.defined(e.m2))if(c.number(e.m2)&&c.inRange(e.m2,0,1e6))this.options.sharpenM2=e.m2;else throw c.invalidParameterError("options.m2","number between 0 and 1000000",e.m2);if(c.defined(e.x1))if(c.number(e.x1)&&c.inRange(e.x1,0,1e6))this.options.sharpenX1=e.x1;else throw c.invalidParameterError("options.x1","number between 0 and 1000000",e.x1);if(c.defined(e.y2))if(c.number(e.y2)&&c.inRange(e.y2,0,1e6))this.options.sharpenY2=e.y2;else throw c.invalidParameterError("options.y2","number between 0 and 1000000",e.y2);if(c.defined(e.y3))if(c.number(e.y3)&&c.inRange(e.y3,0,1e6))this.options.sharpenY3=e.y3;else throw c.invalidParameterError("options.y3","number between 0 and 1000000",e.y3)}else throw c.invalidParameterError("sigma","number between 0.01 and 10000",e);return this}function is(e){if(!c.defined(e))this.options.medianSize=3;else if(c.integer(e)&&c.inRange(e,1,1e3))this.options.medianSize=e;else throw c.invalidParameterError("size","integer between 1 and 1000",e);return this}function ns(e){let r;if(c.number(e))r=e;else if(c.plainObject(e)){if(!c.number(e.sigma))throw c.invalidParameterError("options.sigma","number between 0.3 and 1000",r);if(r=e.sigma,"precision"in e)if(c.string($r[e.precision]))this.options.precision=$r[e.precision];else throw c.invalidParameterError("precision","one of: integer, float, approximate",e.precision);if("minAmplitude"in e)if(c.number(e.minAmplitude)&&c.inRange(e.minAmplitude,.001,1))this.options.minAmpl=e.minAmplitude;else throw c.invalidParameterError("minAmplitude","number between 0.001 and 1",e.minAmplitude)}if(!c.defined(e))this.options.blurSigma=-1;else if(c.bool(e))this.options.blurSigma=e?-1:0;else if(c.number(r)&&c.inRange(r,.3,1e3))this.options.blurSigma=r;else throw c.invalidParameterError("sigma","number between 0.3 and 1000",r);return this}function as(e){return this.options.flatten=c.bool(e)?e:!0,c.object(e)&&this._setBackgroundColourOption("flattenBackground",e.background),this}function ss(){return this.options.unflatten=!0,this}function os(e,r){if(!c.defined(e))this.options.gamma=2.2;else if(c.number(e)&&c.inRange(e,1,3))this.options.gamma=e;else throw c.invalidParameterError("gamma","number between 1.0 and 3.0",e);if(!c.defined(r))this.options.gammaOut=this.options.gamma;else if(c.number(r)&&c.inRange(r,1,3))this.options.gammaOut=r;else throw c.invalidParameterError("gammaOut","number between 1.0 and 3.0",r);return this}function ls(e){if(this.options.negate=c.bool(e)?e:!0,c.plainObject(e)&&"alpha"in e)if(c.bool(e.alpha))this.options.negateAlpha=e.alpha;else throw c.invalidParameterError("alpha","should be boolean value",e.alpha);return this}function cs(e){if(c.plainObject(e)){if(c.defined(e.lower))if(c.number(e.lower)&&c.inRange(e.lower,0,99))this.options.normaliseLower=e.lower;else throw c.invalidParameterError("lower","number between 0 and 99",e.lower);if(c.defined(e.upper))if(c.number(e.upper)&&c.inRange(e.upper,1,100))this.options.normaliseUpper=e.upper;else throw c.invalidParameterError("upper","number between 1 and 100",e.upper)}if(this.options.normaliseLower>=this.options.normaliseUpper)throw c.invalidParameterError("range","lower to be less than upper",`${this.options.normaliseLower} >= ${this.options.normaliseUpper}`);return this.options.normalise=!0,this}function hs(e){return this.normalise(e)}function fs(e){if(c.plainObject(e)){if(c.integer(e.width)&&e.width>0)this.options.claheWidth=e.width;else throw c.invalidParameterError("width","integer greater than zero",e.width);if(c.integer(e.height)&&e.height>0)this.options.claheHeight=e.height;else throw c.invalidParameterError("height","integer greater than zero",e.height);if(c.defined(e.maxSlope))if(c.integer(e.maxSlope)&&c.inRange(e.maxSlope,0,100))this.options.claheMaxSlope=e.maxSlope;else throw c.invalidParameterError("maxSlope","integer between 0 and 100",e.maxSlope)}else throw c.invalidParameterError("options","plain object",e);return this}function us(e){if(!c.object(e)||!Array.isArray(e.kernel)||!c.integer(e.width)||!c.integer(e.height)||!c.inRange(e.width,3,1001)||!c.inRange(e.height,3,1001)||e.height*e.width!==e.kernel.length)throw new Error("Invalid convolution kernel");return c.integer(e.scale)||(e.scale=e.kernel.reduce(function(r,t){return r+t},0)),e.scale<1&&(e.scale=1),c.integer(e.offset)||(e.offset=0),this.options.convKernel=e,this}function ds(e,r){if(!c.defined(e))this.options.threshold=128;else if(c.bool(e))this.options.threshold=e?128:0;else if(c.integer(e)&&c.inRange(e,0,255))this.options.threshold=e;else throw c.invalidParameterError("threshold","integer between 0 and 255",e);return!c.object(r)||r.greyscale===!0||r.grayscale===!0?this.options.thresholdGrayscale=!0:this.options.thresholdGrayscale=!1,this}function ms(e,r,t){if(this.options.boolean=this._createInputDescriptor(e,t),c.string(r)&&c.inArray(r,["and","or","eor"]))this.options.booleanOp=r;else throw c.invalidParameterError("operator","one of: and, or, eor",r);return this}function gs(e,r){if(!c.defined(e)&&c.number(r)?e=1:c.number(e)&&!c.defined(r)&&(r=0),!c.defined(e))this.options.linearA=[];else if(c.number(e))this.options.linearA=[e];else if(Array.isArray(e)&&e.length&&e.every(c.number))this.options.linearA=e;else throw c.invalidParameterError("a","number or array of numbers",e);if(!c.defined(r))this.options.linearB=[];else if(c.number(r))this.options.linearB=[r];else if(Array.isArray(r)&&r.length&&r.every(c.number))this.options.linearB=r;else throw c.invalidParameterError("b","number or array of numbers",r);if(this.options.linearA.length!==this.options.linearB.length)throw new Error("Expected a and b to be arrays of the same length");return this}function bs(e){if(!Array.isArray(e))throw c.invalidParameterError("inputMatrix","array",e);if(e.length!==3&&e.length!==4)throw c.invalidParameterError("inputMatrix","3x3 or 4x4 array",e.length);const r=e.flat().map(Number);if(r.length!==9&&r.length!==16)throw c.invalidParameterError("inputMatrix","cardinality of 9 or 16",r.length);return this.options.recombMatrix=r,this}function ps(e){if(!c.plainObject(e))throw c.invalidParameterError("options","plain object",e);if("brightness"in e)if(c.number(e.brightness)&&e.brightness>=0)this.options.brightness=e.brightness;else throw c.invalidParameterError("brightness","number above zero",e.brightness);if("saturation"in e)if(c.number(e.saturation)&&e.saturation>=0)this.options.saturation=e.saturation;else throw c.invalidParameterError("saturation","number above zero",e.saturation);if("hue"in e)if(c.integer(e.hue))this.options.hue=e.hue%360;else throw c.invalidParameterError("hue","number",e.hue);if("lightness"in e)if(c.number(e.lightness))this.options.lightness=e.lightness;else throw c.invalidParameterError("lightness","number",e.lightness);return this}var ws=function(e){Object.assign(e.prototype,{rotate:Ya,flip:Za,flop:es,affine:rs,sharpen:ts,median:is,blur:ns,flatten:as,unflatten:ss,gamma:os,negate:ls,normalise:cs,normalize:hs,clahe:fs,convolve:us,threshold:ds,boolean:ms,linear:gs,recomb:bs,modulate:ps})};const vs=cr,W=Q,Rr={multiband:"multiband","b-w":"b-w",bw:"b-w",cmyk:"cmyk",srgb:"srgb"};function Es(e){return this._setBackgroundColourOption("tint",e),this}function ys(e){return this.options.greyscale=W.bool(e)?e:!0,this}function xs(e){return this.greyscale(e)}function Ps(e){if(!W.string(e))throw W.invalidParameterError("colourspace","string",e);return this.options.colourspacePipeline=e,this}function $s(e){return this.pipelineColourspace(e)}function Rs(e){if(!W.string(e))throw W.invalidParameterError("colourspace","string",e);return this.options.colourspace=e,this}function Is(e){return this.toColourspace(e)}function As(e,r){if(W.defined(r))if(W.object(r)||W.string(r)){const t=vs(r);this.options[e]=[t.red(),t.green(),t.blue(),Math.round(t.alpha()*255)]}else throw W.invalidParameterError("background","object or string",r)}var Ls=function(e){Object.assign(e.prototype,{tint:Es,greyscale:ys,grayscale:xs,pipelineColourspace:Ps,pipelineColorspace:$s,toColourspace:Rs,toColorspace:Is,_setBackgroundColourOption:As}),e.colourspace=Rr,e.colorspace=Rr};const H=Q,Ss={and:"and",or:"or",eor:"eor"};function js(){return this.options.removeAlpha=!0,this}function ks(e){if(H.defined(e))if(H.number(e)&&H.inRange(e,0,1))this.options.ensureAlpha=e;else throw H.invalidParameterError("alpha","number between 0 and 1",e);else this.options.ensureAlpha=1;return this}function Ns(e){const r={red:0,green:1,blue:2,alpha:3};if(Object.keys(r).includes(e)&&(e=r[e]),H.integer(e)&&H.inRange(e,0,4))this.options.extractChannel=e;else throw H.invalidParameterError("channel","integer or one of: red, green, blue, alpha",e);return this}function Fs(e,r){return Array.isArray(e)?e.forEach(function(t){this.options.joinChannelIn.push(this._createInputDescriptor(t,r))},this):this.options.joinChannelIn.push(this._createInputDescriptor(e,r)),this}function Ts(e){if(H.string(e)&&H.inArray(e,["and","or","eor"]))this.options.bandBoolOp=e;else throw H.invalidParameterError("boolOp","one of: and, or, eor",e);return this}var Os=function(e){Object.assign(e.prototype,{removeAlpha:js,ensureAlpha:ks,extractChannel:Ns,joinChannel:Fs,bandbool:Ts}),e.bool=Ss};const Xe=V,a=Q,le=or,Ir=new Map([["heic","heif"],["heif","heif"],["avif","avif"],["jpeg","jpeg"],["jpg","jpeg"],["jpe","jpeg"],["tile","tile"],["dz","tile"],["png","png"],["raw","raw"],["tiff","tiff"],["tif","tiff"],["webp","webp"],["gif","gif"],["jp2","jp2"],["jpx","jp2"],["j2k","jp2"],["j2c","jp2"],["jxl","jxl"]]),Cs=/\.(jp[2x]|j2[kc])$/i,pt=()=>new Error("JP2 output requires libvips with support for OpenJPEG"),wt=e=>1<<31-Math.clz32(Math.ceil(Math.log2(e)));function _s(e,r){let t;if(a.string(e)?a.string(this.options.input.file)&&Xe.resolve(this.options.input.file)===Xe.resolve(e)?t=new Error("Cannot use same file for input and output"):Cs.test(Xe.extname(e))&&!this.constructor.format.jp2k.output.file&&(t=pt()):t=new Error("Missing output file path"),t)if(a.fn(r))r(t);else return Promise.reject(t);else{this.options.fileOut=e;const i=Error();return this._pipeline(r,i)}return this}function Ms(e,r){a.object(e)?this._setBooleanOption("resolveWithObject",e.resolveWithObject):this.options.resolveWithObject&&(this.options.resolveWithObject=!1),this.options.fileOut="";const t=Error();return this._pipeline(a.fn(e)?e:r,t)}function Bs(){return this.options.keepMetadata|=1,this}function Ds(e){if(a.object(e))for(const[r,t]of Object.entries(e))if(a.object(t))for(const[i,n]of Object.entries(t))if(a.string(n))this.options.withExif[`exif-${r.toLowerCase()}-${i}`]=n;else throw a.invalidParameterError(`${r}.${i}`,"string",n);else throw a.invalidParameterError(r,"object",t);else throw a.invalidParameterError("exif","object",e);return this.options.withExifMerge=!1,this.keepExif()}function zs(e){return this.withExif(e),this.options.withExifMerge=!0,this}function qs(){return this.options.keepMetadata|=8,this}function Gs(e,r){if(a.string(e))this.options.withIccProfile=e;else throw a.invalidParameterError("icc","string",e);if(this.keepIccProfile(),a.object(r)&&a.defined(r.attach))if(a.bool(r.attach))r.attach||(this.options.keepMetadata&=-9);else throw a.invalidParameterError("attach","boolean",r.attach);return this}function Us(){return this.options.keepMetadata=31,this}function Hs(e){if(this.keepMetadata(),this.withIccProfile("srgb"),a.object(e)){if(a.defined(e.orientation))if(a.integer(e.orientation)&&a.inRange(e.orientation,1,8))this.options.withMetadataOrientation=e.orientation;else throw a.invalidParameterError("orientation","integer between 1 and 8",e.orientation);if(a.defined(e.density))if(a.number(e.density)&&e.density>0)this.options.withMetadataDensity=e.density;else throw a.invalidParameterError("density","positive number",e.density);a.defined(e.icc)&&this.withIccProfile(e.icc),a.defined(e.exif)&&this.withExifMerge(e.exif)}return this}function Ws(e,r){const t=Ir.get((a.object(e)&&a.string(e.id)?e.id:e).toLowerCase());if(!t)throw a.invalidParameterError("format",`one of: ${[...Ir.keys()].join(", ")}`,e);return this[t](r)}function Xs(e){if(a.object(e)){if(a.defined(e.quality))if(a.integer(e.quality)&&a.inRange(e.quality,1,100))this.options.jpegQuality=e.quality;else throw a.invalidParameterError("quality","integer between 1 and 100",e.quality);if(a.defined(e.progressive)&&this._setBooleanOption("jpegProgressive",e.progressive),a.defined(e.chromaSubsampling))if(a.string(e.chromaSubsampling)&&a.inArray(e.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jpegChromaSubsampling=e.chromaSubsampling;else throw a.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",e.chromaSubsampling);const r=a.bool(e.optimizeCoding)?e.optimizeCoding:e.optimiseCoding;if(a.defined(r)&&this._setBooleanOption("jpegOptimiseCoding",r),a.defined(e.mozjpeg))if(a.bool(e.mozjpeg))e.mozjpeg&&(this.options.jpegTrellisQuantisation=!0,this.options.jpegOvershootDeringing=!0,this.options.jpegOptimiseScans=!0,this.options.jpegProgressive=!0,this.options.jpegQuantisationTable=3);else throw a.invalidParameterError("mozjpeg","boolean",e.mozjpeg);const t=a.bool(e.trellisQuantization)?e.trellisQuantization:e.trellisQuantisation;a.defined(t)&&this._setBooleanOption("jpegTrellisQuantisation",t),a.defined(e.overshootDeringing)&&this._setBooleanOption("jpegOvershootDeringing",e.overshootDeringing);const i=a.bool(e.optimizeScans)?e.optimizeScans:e.optimiseScans;a.defined(i)&&(this._setBooleanOption("jpegOptimiseScans",i),i&&(this.options.jpegProgressive=!0));const n=a.number(e.quantizationTable)?e.quantizationTable:e.quantisationTable;if(a.defined(n))if(a.integer(n)&&a.inRange(n,0,8))this.options.jpegQuantisationTable=n;else throw a.invalidParameterError("quantisationTable","integer between 0 and 8",n)}return this._updateFormatOut("jpeg",e)}function Vs(e){if(a.object(e)){if(a.defined(e.progressive)&&this._setBooleanOption("pngProgressive",e.progressive),a.defined(e.compressionLevel))if(a.integer(e.compressionLevel)&&a.inRange(e.compressionLevel,0,9))this.options.pngCompressionLevel=e.compressionLevel;else throw a.invalidParameterError("compressionLevel","integer between 0 and 9",e.compressionLevel);a.defined(e.adaptiveFiltering)&&this._setBooleanOption("pngAdaptiveFiltering",e.adaptiveFiltering);const r=e.colours||e.colors;if(a.defined(r))if(a.integer(r)&&a.inRange(r,2,256))this.options.pngBitdepth=wt(r);else throw a.invalidParameterError("colours","integer between 2 and 256",r);if(a.defined(e.palette)?this._setBooleanOption("pngPalette",e.palette):[e.quality,e.effort,e.colours,e.colors,e.dither].some(a.defined)&&this._setBooleanOption("pngPalette",!0),this.options.pngPalette){if(a.defined(e.quality))if(a.integer(e.quality)&&a.inRange(e.quality,0,100))this.options.pngQuality=e.quality;else throw a.invalidParameterError("quality","integer between 0 and 100",e.quality);if(a.defined(e.effort))if(a.integer(e.effort)&&a.inRange(e.effort,1,10))this.options.pngEffort=e.effort;else throw a.invalidParameterError("effort","integer between 1 and 10",e.effort);if(a.defined(e.dither))if(a.number(e.dither)&&a.inRange(e.dither,0,1))this.options.pngDither=e.dither;else throw a.invalidParameterError("dither","number between 0.0 and 1.0",e.dither)}}return this._updateFormatOut("png",e)}function Qs(e){if(a.object(e)){if(a.defined(e.quality))if(a.integer(e.quality)&&a.inRange(e.quality,1,100))this.options.webpQuality=e.quality;else throw a.invalidParameterError("quality","integer between 1 and 100",e.quality);if(a.defined(e.alphaQuality))if(a.integer(e.alphaQuality)&&a.inRange(e.alphaQuality,0,100))this.options.webpAlphaQuality=e.alphaQuality;else throw a.invalidParameterError("alphaQuality","integer between 0 and 100",e.alphaQuality);if(a.defined(e.lossless)&&this._setBooleanOption("webpLossless",e.lossless),a.defined(e.nearLossless)&&this._setBooleanOption("webpNearLossless",e.nearLossless),a.defined(e.smartSubsample)&&this._setBooleanOption("webpSmartSubsample",e.smartSubsample),a.defined(e.preset))if(a.string(e.preset)&&a.inArray(e.preset,["default","photo","picture","drawing","icon","text"]))this.options.webpPreset=e.preset;else throw a.invalidParameterError("preset","one of: default, photo, picture, drawing, icon, text",e.preset);if(a.defined(e.effort))if(a.integer(e.effort)&&a.inRange(e.effort,0,6))this.options.webpEffort=e.effort;else throw a.invalidParameterError("effort","integer between 0 and 6",e.effort);a.defined(e.minSize)&&this._setBooleanOption("webpMinSize",e.minSize),a.defined(e.mixed)&&this._setBooleanOption("webpMixed",e.mixed)}return vt(e,this.options),this._updateFormatOut("webp",e)}function Js(e){if(a.object(e)){a.defined(e.reuse)&&this._setBooleanOption("gifReuse",e.reuse),a.defined(e.progressive)&&this._setBooleanOption("gifProgressive",e.progressive);const r=e.colours||e.colors;if(a.defined(r))if(a.integer(r)&&a.inRange(r,2,256))this.options.gifBitdepth=wt(r);else throw a.invalidParameterError("colours","integer between 2 and 256",r);if(a.defined(e.effort))if(a.number(e.effort)&&a.inRange(e.effort,1,10))this.options.gifEffort=e.effort;else throw a.invalidParameterError("effort","integer between 1 and 10",e.effort);if(a.defined(e.dither))if(a.number(e.dither)&&a.inRange(e.dither,0,1))this.options.gifDither=e.dither;else throw a.invalidParameterError("dither","number between 0.0 and 1.0",e.dither);if(a.defined(e.interFrameMaxError))if(a.number(e.interFrameMaxError)&&a.inRange(e.interFrameMaxError,0,32))this.options.gifInterFrameMaxError=e.interFrameMaxError;else throw a.invalidParameterError("interFrameMaxError","number between 0.0 and 32.0",e.interFrameMaxError);if(a.defined(e.interPaletteMaxError))if(a.number(e.interPaletteMaxError)&&a.inRange(e.interPaletteMaxError,0,256))this.options.gifInterPaletteMaxError=e.interPaletteMaxError;else throw a.invalidParameterError("interPaletteMaxError","number between 0.0 and 256.0",e.interPaletteMaxError)}return vt(e,this.options),this._updateFormatOut("gif",e)}function Ks(e){if(!this.constructor.format.jp2k.output.buffer)throw pt();if(a.object(e)){if(a.defined(e.quality))if(a.integer(e.quality)&&a.inRange(e.quality,1,100))this.options.jp2Quality=e.quality;else throw a.invalidParameterError("quality","integer between 1 and 100",e.quality);if(a.defined(e.lossless))if(a.bool(e.lossless))this.options.jp2Lossless=e.lossless;else throw a.invalidParameterError("lossless","boolean",e.lossless);if(a.defined(e.tileWidth))if(a.integer(e.tileWidth)&&a.inRange(e.tileWidth,1,32768))this.options.jp2TileWidth=e.tileWidth;else throw a.invalidParameterError("tileWidth","integer between 1 and 32768",e.tileWidth);if(a.defined(e.tileHeight))if(a.integer(e.tileHeight)&&a.inRange(e.tileHeight,1,32768))this.options.jp2TileHeight=e.tileHeight;else throw a.invalidParameterError("tileHeight","integer between 1 and 32768",e.tileHeight);if(a.defined(e.chromaSubsampling))if(a.string(e.chromaSubsampling)&&a.inArray(e.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jp2ChromaSubsampling=e.chromaSubsampling;else throw a.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",e.chromaSubsampling)}return this._updateFormatOut("jp2",e)}function vt(e,r){if(a.object(e)&&a.defined(e.loop))if(a.integer(e.loop)&&a.inRange(e.loop,0,65535))r.loop=e.loop;else throw a.invalidParameterError("loop","integer between 0 and 65535",e.loop);if(a.object(e)&&a.defined(e.delay))if(a.integer(e.delay)&&a.inRange(e.delay,0,65535))r.delay=[e.delay];else if(Array.isArray(e.delay)&&e.delay.every(a.integer)&&e.delay.every(t=>a.inRange(t,0,65535)))r.delay=e.delay;else throw a.invalidParameterError("delay","integer or an array of integers between 0 and 65535",e.delay)}function Ys(e){if(a.object(e)){if(a.defined(e.quality))if(a.integer(e.quality)&&a.inRange(e.quality,1,100))this.options.tiffQuality=e.quality;else throw a.invalidParameterError("quality","integer between 1 and 100",e.quality);if(a.defined(e.bitdepth))if(a.integer(e.bitdepth)&&a.inArray(e.bitdepth,[1,2,4,8]))this.options.tiffBitdepth=e.bitdepth;else throw a.invalidParameterError("bitdepth","1, 2, 4 or 8",e.bitdepth);if(a.defined(e.tile)&&this._setBooleanOption("tiffTile",e.tile),a.defined(e.tileWidth))if(a.integer(e.tileWidth)&&e.tileWidth>0)this.options.tiffTileWidth=e.tileWidth;else throw a.invalidParameterError("tileWidth","integer greater than zero",e.tileWidth);if(a.defined(e.tileHeight))if(a.integer(e.tileHeight)&&e.tileHeight>0)this.options.tiffTileHeight=e.tileHeight;else throw a.invalidParameterError("tileHeight","integer greater than zero",e.tileHeight);if(a.defined(e.miniswhite)&&this._setBooleanOption("tiffMiniswhite",e.miniswhite),a.defined(e.pyramid)&&this._setBooleanOption("tiffPyramid",e.pyramid),a.defined(e.xres))if(a.number(e.xres)&&e.xres>0)this.options.tiffXres=e.xres;else throw a.invalidParameterError("xres","number greater than zero",e.xres);if(a.defined(e.yres))if(a.number(e.yres)&&e.yres>0)this.options.tiffYres=e.yres;else throw a.invalidParameterError("yres","number greater than zero",e.yres);if(a.defined(e.compression))if(a.string(e.compression)&&a.inArray(e.compression,["none","jpeg","deflate","packbits","ccittfax4","lzw","webp","zstd","jp2k"]))this.options.tiffCompression=e.compression;else throw a.invalidParameterError("compression","one of: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k",e.compression);if(a.defined(e.predictor))if(a.string(e.predictor)&&a.inArray(e.predictor,["none","horizontal","float"]))this.options.tiffPredictor=e.predictor;else throw a.invalidParameterError("predictor","one of: none, horizontal, float",e.predictor);if(a.defined(e.resolutionUnit))if(a.string(e.resolutionUnit)&&a.inArray(e.resolutionUnit,["inch","cm"]))this.options.tiffResolutionUnit=e.resolutionUnit;else throw a.invalidParameterError("resolutionUnit","one of: inch, cm",e.resolutionUnit)}return this._updateFormatOut("tiff",e)}function Zs(e){return this.heif({...e,compression:"av1"})}function eo(e){if(a.object(e)){if(a.string(e.compression)&&a.inArray(e.compression,["av1","hevc"]))this.options.heifCompression=e.compression;else throw a.invalidParameterError("compression","one of: av1, hevc",e.compression);if(a.defined(e.quality))if(a.integer(e.quality)&&a.inRange(e.quality,1,100))this.options.heifQuality=e.quality;else throw a.invalidParameterError("quality","integer between 1 and 100",e.quality);if(a.defined(e.lossless))if(a.bool(e.lossless))this.options.heifLossless=e.lossless;else throw a.invalidParameterError("lossless","boolean",e.lossless);if(a.defined(e.effort))if(a.integer(e.effort)&&a.inRange(e.effort,0,9))this.options.heifEffort=e.effort;else throw a.invalidParameterError("effort","integer between 0 and 9",e.effort);if(a.defined(e.chromaSubsampling))if(a.string(e.chromaSubsampling)&&a.inArray(e.chromaSubsampling,["4:2:0","4:4:4"]))this.options.heifChromaSubsampling=e.chromaSubsampling;else throw a.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",e.chromaSubsampling);if(a.defined(e.bitdepth))if(a.integer(e.bitdepth)&&a.inArray(e.bitdepth,[8,10,12])){if(e.bitdepth!==8&&this.constructor.versions.heif)throw a.invalidParameterError("bitdepth when using prebuilt binaries",8,e.bitdepth);this.options.heifBitdepth=e.bitdepth}else throw a.invalidParameterError("bitdepth","8, 10 or 12",e.bitdepth)}else throw a.invalidParameterError("options","Object",e);return this._updateFormatOut("heif",e)}function ro(e){if(a.object(e)){if(a.defined(e.quality))if(a.integer(e.quality)&&a.inRange(e.quality,1,100))this.options.jxlDistance=e.quality>=30?.1+(100-e.quality)*.09:53/3e3*e.quality*e.quality-23/20*e.quality+25;else throw a.invalidParameterError("quality","integer between 1 and 100",e.quality);else if(a.defined(e.distance))if(a.number(e.distance)&&a.inRange(e.distance,0,15))this.options.jxlDistance=e.distance;else throw a.invalidParameterError("distance","number between 0.0 and 15.0",e.distance);if(a.defined(e.decodingTier))if(a.integer(e.decodingTier)&&a.inRange(e.decodingTier,0,4))this.options.jxlDecodingTier=e.decodingTier;else throw a.invalidParameterError("decodingTier","integer between 0 and 4",e.decodingTier);if(a.defined(e.lossless))if(a.bool(e.lossless))this.options.jxlLossless=e.lossless;else throw a.invalidParameterError("lossless","boolean",e.lossless);if(a.defined(e.effort))if(a.integer(e.effort)&&a.inRange(e.effort,3,9))this.options.jxlEffort=e.effort;else throw a.invalidParameterError("effort","integer between 3 and 9",e.effort)}return this._updateFormatOut("jxl",e)}function to(e){if(a.object(e)&&a.defined(e.depth))if(a.string(e.depth)&&a.inArray(e.depth,["char","uchar","short","ushort","int","uint","float","complex","double","dpcomplex"]))this.options.rawDepth=e.depth;else throw a.invalidParameterError("depth","one of: char, uchar, short, ushort, int, uint, float, complex, double, dpcomplex",e.depth);return this._updateFormatOut("raw")}function io(e){if(a.object(e)){if(a.defined(e.size))if(a.integer(e.size)&&a.inRange(e.size,1,8192))this.options.tileSize=e.size;else throw a.invalidParameterError("size","integer between 1 and 8192",e.size);if(a.defined(e.overlap))if(a.integer(e.overlap)&&a.inRange(e.overlap,0,8192)){if(e.overlap>this.options.tileSize)throw a.invalidParameterError("overlap",`<= size (${this.options.tileSize})`,e.overlap);this.options.tileOverlap=e.overlap}else throw a.invalidParameterError("overlap","integer between 0 and 8192",e.overlap);if(a.defined(e.container))if(a.string(e.container)&&a.inArray(e.container,["fs","zip"]))this.options.tileContainer=e.container;else throw a.invalidParameterError("container","one of: fs, zip",e.container);if(a.defined(e.layout))if(a.string(e.layout)&&a.inArray(e.layout,["dz","google","iiif","iiif3","zoomify"]))this.options.tileLayout=e.layout;else throw a.invalidParameterError("layout","one of: dz, google, iiif, iiif3, zoomify",e.layout);if(a.defined(e.angle))if(a.integer(e.angle)&&!(e.angle%90))this.options.tileAngle=e.angle;else throw a.invalidParameterError("angle","positive/negative multiple of 90",e.angle);if(this._setBackgroundColourOption("tileBackground",e.background),a.defined(e.depth))if(a.string(e.depth)&&a.inArray(e.depth,["onepixel","onetile","one"]))this.options.tileDepth=e.depth;else throw a.invalidParameterError("depth","one of: onepixel, onetile, one",e.depth);if(a.defined(e.skipBlanks))if(a.integer(e.skipBlanks)&&a.inRange(e.skipBlanks,-1,65535))this.options.tileSkipBlanks=e.skipBlanks;else throw a.invalidParameterError("skipBlanks","integer between -1 and 255/65535",e.skipBlanks);else a.defined(e.layout)&&e.layout==="google"&&(this.options.tileSkipBlanks=5);const r=a.bool(e.center)?e.center:e.centre;if(a.defined(r)&&this._setBooleanOption("tileCentre",r),a.defined(e.id))if(a.string(e.id))this.options.tileId=e.id;else throw a.invalidParameterError("id","string",e.id);if(a.defined(e.basename))if(a.string(e.basename))this.options.tileBasename=e.basename;else throw a.invalidParameterError("basename","string",e.basename)}if(a.inArray(this.options.formatOut,["jpeg","png","webp"]))this.options.tileFormat=this.options.formatOut;else if(this.options.formatOut!=="input")throw a.invalidParameterError("format","one of: jpeg, png, webp",this.options.formatOut);return this._updateFormatOut("dz")}function no(e){if(!a.plainObject(e))throw a.invalidParameterError("options","object",e);if(a.integer(e.seconds)&&a.inRange(e.seconds,0,3600))this.options.timeoutSeconds=e.seconds;else throw a.invalidParameterError("seconds","integer between 0 and 3600",e.seconds);return this}function ao(e,r){return a.object(r)&&r.force===!1||(this.options.formatOut=e),this}function so(e,r){if(a.bool(r))this.options[e]=r;else throw a.invalidParameterError(e,"boolean",r)}function oo(){if(!this.options.streamOut){this.options.streamOut=!0;const e=Error();this._pipeline(void 0,e)}}function lo(e,r){return typeof e=="function"?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),le.pipeline(this.options,(t,i,n)=>{t?e(a.nativeError(t,r)):e(null,i,n)})}):le.pipeline(this.options,(t,i,n)=>{t?e(a.nativeError(t,r)):e(null,i,n)}),this):this.options.streamOut?(this._isStreamInput()?(this.once("finish",()=>{this._flattenBufferIn(),le.pipeline(this.options,(t,i,n)=>{t?this.emit("error",a.nativeError(t,r)):(this.emit("info",n),this.push(i)),this.push(null),this.on("end",()=>this.emit("close"))})}),this.streamInFinished&&this.emit("finish")):le.pipeline(this.options,(t,i,n)=>{t?this.emit("error",a.nativeError(t,r)):(this.emit("info",n),this.push(i)),this.push(null),this.on("end",()=>this.emit("close"))}),this):this._isStreamInput()?new Promise((t,i)=>{this.once("finish",()=>{this._flattenBufferIn(),le.pipeline(this.options,(n,s,o)=>{n?i(a.nativeError(n,r)):this.options.resolveWithObject?t({data:s,info:o}):t(s)})})}):new Promise((t,i)=>{le.pipeline(this.options,(n,s,o)=>{n?i(a.nativeError(n,r)):this.options.resolveWithObject?t({data:s,info:o}):t(s)})})}var co=function(e){Object.assign(e.prototype,{toFile:_s,toBuffer:Ms,keepExif:Bs,withExif:Ds,withExifMerge:zs,keepIccProfile:qs,withIccProfile:Gs,keepMetadata:Us,withMetadata:Hs,toFormat:Ws,jpeg:Xs,jp2:Ks,png:Vs,webp:Qs,tiff:Ys,avif:Zs,heif:eo,jxl:ro,gif:Js,raw:to,tile:io,timeout:no,_updateFormatOut:ao,_setBooleanOption:so,_read:oo,_pipeline:lo})};const ho=V,Se=nr,D=Q,{runtimePlatformArch:fo}=nt,O=or,Ar=fo(),rr=O.libvipsVersion(),te=O.format();te.heif.output.alias=["avif","heic"];te.jpeg.output.alias=["jpe","jpg"];te.tiff.output.alias=["tif"];te.jp2k.output.alias=["j2c","j2k","jp2","jpx"];const uo={nearest:"nearest",bilinear:"bilinear",bicubic:"bicubic",locallyBoundedBicubic:"lbb",nohalo:"nohalo",vertexSplitQuadraticBasisSpline:"vsqbs"};let ue={vips:rr.semver};if(!rr.isGlobal)if(rr.isWasm)try{ue=require("@img/sharp-wasm32/versions")}catch{}else try{ue=se(`@img/sharp-${Ar}/versions`)}catch{try{ue=se(`@img/sharp-libvips-${Ar}/versions`)}catch{}}ue.sharp=Kr.version;ue.heif&&te.heif&&(te.heif.input.fileSuffix=[".avif"],te.heif.output.alias=["avif"]);function Et(e){return D.bool(e)?e?O.cache(50,20,100):O.cache(0,0,0):D.object(e)?O.cache(e.memory,e.files,e.items):O.cache()}Et(!0);function mo(e){return O.concurrency(D.integer(e)?e:null)}Se.familySync()===Se.GLIBC&&!O._isUsingJemalloc()?O.concurrency(1):Se.familySync()===Se.MUSL&&O.concurrency()===1024&&O.concurrency(V.availableParallelism());const go=new ho.EventEmitter;function bo(){return O.counters()}function po(e){return O.simd(D.bool(e)?e:null)}function wo(e){if(D.object(e))if(Array.isArray(e.operation)&&e.operation.every(D.string))O.block(e.operation,!0);else throw D.invalidParameterError("operation","Array<string>",e.operation);else throw D.invalidParameterError("options","object",e)}function vo(e){if(D.object(e))if(Array.isArray(e.operation)&&e.operation.every(D.string))O.block(e.operation,!1);else throw D.invalidParameterError("operation","Array<string>",e.operation);else throw D.invalidParameterError("options","object",e)}var Eo=function(e){e.cache=Et,e.concurrency=mo,e.counters=bo,e.simd=po,e.format=te,e.interpolators=uo,e.versions=ue,e.queue=go,e.block=wo,e.unblock=vo};const J=ua;za(J);Va(J);Ja(J);ws(J);Ls(J);Os(J);co(J);Eo(J);var yt=J;const yo=Nt(yt),Po=Ft({__proto__:null,default:yo},[yt]);export{Po as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Cn=Object.defineProperty;var En=(e,t,n)=>t in e?Cn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var x=(e,t,n)=>(En(e,typeof t!="symbol"?t+"":t,n),n);import{CameraComponent as Mi}from"./CameraComponent-
|
|
1
|
+
var Cn=Object.defineProperty;var En=(e,t,n)=>t in e?Cn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var x=(e,t,n)=>(En(e,typeof t!="symbol"?t+"":t,n),n);import{CameraComponent as Mi}from"./CameraComponent-850a5d98.js";import{DirectLightComponent as _i}from"./DirectLight-8734007f.js";import{PointLightComponent as Oi}from"./PointLight-248fb1a9.js";import{SpotLightComponent as Ti}from"./SpotLight-3bb8f39e.js";import{MeshRendererComponent as Ni}from"./MeshRendererComponent-7f29ba50.js";import{SkinnedMeshRendererComponent as zi}from"./SkinnedMeshRendererComponent-4a77c8d9.js";import{A as Fi,a as $i}from"./AnimatorStore-2bd92a36.js";import{SpriteRendererComponent as Xi}from"./SpriteRendererComponent-8afb7837.js";import{SpriteMaskComponent as Yi}from"./SpriteMaskComponent-ed64e403.js";import{C as Ki,D as Vi,F as Gi,H as qi,P as Ji,a as Qi,S as Zi}from"./PhysicsStore-50022658.js";import{ScriptComponent as ts}from"./index-906d9f78.js";import{TextRendererComponent as rs}from"./TextRendererComponent-8eb60833.js";import{LottieAnimationComponent as is}from"./LottieAnimationComponent-163b16fe.js";import{SpineAnimationComponent as as}from"./SpineAnimationComponent-b5de1844.js";import{ParticleRendererComponent as cs}from"./ParticleRendererComponent-9bcd1886.js";import{TrailRendererComponent as ds}from"./TrailRendererComponent-cabae051.js";import{aG as ct,aU as l,bL as X,e7 as pe,aO as ut,aP as Fe,aQ as Dn,aR as Rn,aS as E,aT as Ge,e8 as Pn,e9 as Mn,ea as An,bl as _n,dG as In,bq as On,K as Ln,U as jt,O as Tn,eb as qe,L as Bn,cj as De,dQ as Ft,u as Nn,bs as kn,x as le,bD as zn,aL as ve,bt as jn}from"./index-d07818b5.js";import{u as Fn}from"./index-0487cdcf.js";import"./postmen-e6429bad.js";import{T as Je}from"./Tooltip-c35612f0.js";import{I as hs}from"./index-fd599472.js";import{P as gs}from"./PostProcessComponent-cd6546b3.js";import{AudioComponent as ms}from"./AudioComponent-a1e6e156.js";import{TransformComponent as ys}from"./TransformComponent-d6649e8f.js";import{ButtonComponent as ws,ImageComponent as Ss,TextComponent as Cs,UICanvasComponent as Es,UIGroupComponent as Ds,UITransformComponent as Rs}from"./index-6087df7e.js";import"./Component-964374b8.js";import"./LightBaseComponent-14ad9432.js";import"./createOnModelChange-b57a0da8.js";import"./ReferencedMaterial-659bf0ee.js";import"./MaterialInspector-93a0838d.js";import"./IconPointFilled-71525313.js";import"./MeshRendererBaseComponent-b7db519d.js";import"./SpriteBaseComponent-ab727e8e.js";import"./FormItemArray-536e9ade.js";import"./Accordion-4581466b.js";import"./IconEdit-493cbbb3.js";import"./scriptPropertyActions-d3a583d2.js";import"./TextureAsset-77e6000d.js";import"./enum-58295f88.js";import"./encode-ac4bb64e.js";import"./meshopt_simplifier.module-cd99529d.js";import"./AssetViewer-a2f4ee75.js";import"./ktx2-encoder-5413e034.js";import"./TaskQueue-05c94a4d.js";import"./GlTFAsset-84f09723.js";import"./glTFIO-79bbca27.js";import"./MaterialAsset-088e8e0a.js";import"./ProxyConfigs-d85202ac.js";import"./MeshAsset-ff94b6a7.js";import"./index-ca459192.js";import"./MeshThumbnail-768ca939.js";import"./AnimatorControllerAsset-1b29c766.js";import"./bundlers-9b0d37fc.js";import"./assetEditorActions-c4e5962f.js";import"./AnimationClipAsset-a5adbe0b.js";import"./module-7c8b159f.js";import"./module-4879e776.js";import"./SpriteAsset-9b36d0ae.js";import"./SpriteAtlasAsset-3f3112ca.js";import"./AmbientLightAsset-52dfaaf8.js";import"./LottieAsset-898108e3.js";import"./ShaderChunkAsset-6fc715c5.js";import"./SpineSkeletonDataAsset-cddcc22b.js";import"./FontAsset-29ed97fd.js";import"./SceneAsset-c2a6f842.js";import"./ShaderAsset-d1e99a96.js";import"./ShaderUIScriptAsset-aa3adb43.js";import"./PrimitiveMesh-10b1161f.js";import"./XRReferenceImageAsset-b786aca3.js";import"./module-b565f34f.js";import"./PrefabAsset-0afc28fa.js";import"./PhysicsMaterialAsset-291fc997.js";import"./RenderTargetAsset-248f1eb5.js";import"./AudioAsset-f206da55.js";import"./index-7abbe07f.js";import"./MarkdownAsset-707897f5.js";import"./TextBaseComponent-13689460.js";import"./index-8800c7e6.js";import"./Menu-d694f08a.js";import"./TransformBaseComponent-c0a6a3c8.js";import"./Callout-a96a8430.js";/**
|
|
2
2
|
* @license @tabler/icons-react v3.24.0 - MIT
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license.
|