﻿average",colorBucketBits:null,paletteSelectionMode:"cluster-then-snap",colorDistanceMode:"oklab",ditheringMode:"none",spatialRegularizationIterations:0,spatialSmoothness:0,spatialEdgeSigma:1},To={id:"zippland",maxColors:null,analysisPixelsPerCell:1,minimumForegroundCoverage:0,outlineDarkLuminance:0,outlineDarkRatio:1,outlineContrast:1,outlineWeight:1,backgroundSeedDeltaE:0,backgroundFillDeltaE:0,backgroundMinimumConfidence:1,cleanupMinimumNeighbors:null,cellSamplingMode:"average",colorBucketBits:null,paletteSelectionMode:"cluster-then-snap",colorDistanceMode:"oklab",ditheringMode:"none",spatialRegularizationIterations:0,spatialSmoothness:0,spatialEdgeSigma:1},_o={zippland:To,simplified:Ao,standard:Do,detailed:Po,legacy:Ro},Wt=200,Mn=10,Io="EMPTY_PATTERN";function Bn(){const t=new Error("Image processing was replaced by a newer task");return t.name="AbortError",t}function Mo(t,a,n){if(n)return{width:n.columns,height:n.rows};const o=t.naturalWidth||t.width,l=t.naturalHeight||t.height,i=Math.max(Mn,Math.min(Wt,a)),c=l/Math.max(o,1),h=Math.max(1,Math.round(i*c));if(h<=Wt)return{width:i,height:h};const u=Math.max(Mn,Math.round(i*(Wt/h)));return{width:Math.min(Wt,u),height:Wt}}function Bo(t,a,n,o,l){if(l)return{width:t.naturalWidth||t.width,height:t.naturalHeight||t.height};if(o.preset==="legacy")return{width:a,height:n};const i=t.naturalWidth||t.width,c=t.naturalHeight||t.height;if(o.preset==="zippland")return{width:i,height:c};const h=_o[o.preset].analysisPixelsPerCell,u=Math.max