PageSourceSearch

https://pixelartnow.com/_next/static/chunks/204.e89216b23e1e7153.js

js pixelartnow.com collected 2026-10-07 20:53:25 UTC 5,736 bytes, 1 lines download raw bytes

1(()=>{var t={204:(t,e,r)=>{"use strict";var i=r(1228);class o extends Error{constructor(t){super("grid_bounds:".concat(t)),this.reason=t}}function a(t,e,r,i,o,a,n,h,s){if(i<0||i>=e||o>=r)return;let l=t[o*e+i];l.transparent||(l.r+=a*s,l.g+=n*s,l.b+=h*s)}var n=r(3734);class h extends Error{constructor(t){super("preprocess_".concat(t)),this.reason=t}}self.onmessage=t=>{try{self.postMessage({result:function(t,e){let r=t.preparation,s=r.rotation||r.mirrorX||r.mirrorY||r.crop?function(t,e){var r,i;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0x10000000,a=function(t){if(!t||"object"!=typeof t||![0,90,180,270].includes(t.rotation)||"boolean"!=typeof t.mirrorX||"boolean"!=typeof t.mirrorY)throw new h("settings");let e=null;if(null!==t.crop){if(!t.crop||"object"!=typeof t.crop)throw new h("settings");let r=t.crop;for(let t of["x","y","width","height"])if("number"!=typeof r[t]||!Number.isFinite(r[t]))throw new h("settings");if((e={x:r.x,y:r.y,width:r.width,height:r.height}).x<0||e.x>=1||e.y<0||e.y>=1||e.width<=0||e.height<=0||e.x+e.width>1+1e-10||e.y+e.height>1+1e-10)throw new h("settings")}return{rotation:t.rotation,mirrorX:t.mirrorX,mirrorY:t.mirrorY,crop:e}}(e);if(!Number.isInteger(t.width)||!Number.isInteger(t.height)||t.width<1||t.height<1||t.width>8192||t.height>8192||t.width*t.height>4e7||t.data.length!==t.width*t.height*4)throw new h("source");let n=90===(i=a.rotation)||270===i?{width:t.height,height:t.width}:{width:t.width,height:t.height},s=null!=(r=a.crop)?r:{x:0,y:0,width:1,height:1},l=Math.floor(s.x*n.width),d=Math.floor(s.y*n.height),c=Math.min(n.width,Math.ceil((s.x+s.width)*n.width-1e-10)),f=Math.min(n.height,Math.ceil((s.y+s.height)*n.height-1e-10)),g=Math.max(1,c-l),p=Math.max(1,f-d);if(!Number.isFinite(o)||o<1||t.data.byteLength+g*p*4>o)throw new h("memory");let u=new Uint8ClampedArray(g*p*4);for(let e=0;e<p;e++)for(let r=0;r<g;r++){let i=a.mirrorX?n.width-1-(r+l):r+l,o=a.mirrorY?n.height-1-(e+d):e+d,h=i,s=o;90===a.rotation?(h=o,s=t.height-1-i):180===a.rotation?(h=t.width-1-i,s=t.height-1-o):270===a.rotation&&(h=t.width-1-o,s=i);let c=(s*t.width+h)*4,f=(e*g+r)*4;u[f]=t.data[c],u[f+1]=t.data[c+1],u[f+2]=t.data[c+2],u[f+3]=t.data[c+3]}return{width:g,height:p,data:u}}(t.source,r,e):t.source;return"pixel_art"===t.tool?function(t,e){var r,n;let h=Math.max(16,Math.min(128,Math.round(e.gridWidth))),s=(r=t.width,n=t.height,Math.max(1,Math.round(n/(r/h))));if(s>1024)throw new o("rows");if(h*s>131072)throw new o("cells");let l=function(t,e,r){let i=t.width/e,o=t.height/r,a=Array(e*r);for(let n=0;n<r;n++){let r=Math.floor(n*o),h=Math.max(r+1,Math.min(t.height,Math.ceil((n+1)*o)));for(let o=0;o<e;o++){let s=Math.floor(o*i),l=Math.max(s+1,Math.min(t.width,Math.ceil((o+1)*i))),d=0,c=0,f=0,g=0,p=0;for(let e=r;e<h;e++){let r=e*t.width;for(let e=s;e<l;e++){let i=(r+e)*4,o=t.data[i+3];p++,o>=128&&(d+=t.data[i],c+=t.data[i+1],f+=t.data[i+2],g++)}}let u=2*g<p;0===g?a[n*e+o]={r:0,g:0,b:0,transparent:!0}:a[n*e+o]={r:d/g,g:c/g,b:f/g,transparent:u}}}return a}(t,h,s);if("transparent"!==e.background)for(let t of l)t.transparent&&(t.transparent=!1,t.r=255,t.g=255,t.b=255);let d=l.filter(t=>!t.transparent),c=new Uint8ClampedArray(3*d.length);d.forEach((t,e)=>{c[3*e]=t.r,c[3*e+1]=t.g,c[3*e+2]=t.b});let f=(0,i.pu)(c,d.length,e.paletteCount),g=new Int16Array(h*s);if("floyd-steinberg"===e.dithering){let t=l.map(t=>({r:t.r,g:t.g,b:t.b,transparent:t.transparent}));for(let e=0;e<s;e++)for(let r=0;r<h;r++){let o=e*h+r,n=t[o];if(n.transparent){g[o]=-1;continue}let l=Math.max(0,Math.min(255,n.r)),d=Math.max(0,Math.min(255,n.g)),c=Math.max(0,Math.min(255,n.b)),p=(0,i.Ks)(f,l,d,c);g[o]=p;let u=l-f.colors[3*p],w=d-f.colors[3*p+1],m=c-f.colors[3*p+2];a(t,h,s,r+1,e,u,w,m,7/16),a(t,h,s,r-1,e+1,u,w,m,3/16),a(t,h,s,r,e+1,u,w,m,5/16),a(t,h,s,r+1,e+1,u,w,m,1/16)}}else for(let t=0;t<l.length;t++){let e=l[t];e.transparent?g[t]=-1:g[t]=(0,i.Ks)(f,e.r,e.g,e.b)}return{grid:{cols:h,rows:s,cells:g},palette:f}}(s,t.settings):(0,n.tX)(s,t.settings)}(t.data.request,t.data.budget)})}catch(t){self.postMessage({error:function(t){return t instanceof o?{kind:"grid",reason:t.reason}:t instanceof h?{kind:"preprocess",reason:t.reason}:{kind:"processing",reason:t instanceof Error?t.message:"processing_error"}}(t)})}}}},e={};function r(i){var o=e[i];if(void 0!==o)return o.exports;var a=e[i]={exports:{}},n=!0;try{t[i](a,a.exports,r),n=!1}finally{n&&delete e[i]}return a.exports}r.m=t,r.x=()=>{var t=r.O(void 0,[62,153],()=>r(204));return r.O(t)},(()=>{var t=[];r.O=(e,i,o,a)=>
1{if(i){a=a||0;for(var n=t.length;n>0&&t[n-1][2]>a;n--)t[n]=t[n-1];t[n]=[i,o,a];return}for(var h=1/0,n=0;n<t.length;n++){for(var[i,o,a]=t[n],s=!0,l=0;l<i.length;l++)(!1&a||h>=a)&&Object.keys(r.O).every(t=>r.O[t](i[l]))?i.splice(l--,1):(s=!1,a<h&&(h=a));if(s){t.splice(n--,1);var d=o();void 0!==d&&(e=d)}}return e}})(),r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.f={},r.e=t=>Promise.all(Object.keys(r.f).reduce((e,i)=>(r.f[i](t,e),e),[])),r.u=t=>62===t?"static/chunks/62-01e072ed7cd4a901.js":"static/chunks/"+t+".71d3c38641737ee8.js",r.miniCssF=t=>{},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t;r.tt=()=>(void 0===t&&(t={createScriptURL:t=>t},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(t=trustedTypes.createPolicy("nextjs#bundler",t))),t)})(),r.tu=t=>r.tt().createScriptURL(t),r.p="/_next/",(()=>{var t={204:1};r.f.i=(e,i)=>{t[e]||importScripts(r.tu(r.p+r.u(e)))};var e=self.webpackChunk_N_E=self.webpackChunk_N_E||[],i=e.push.bind(e);e.push=e=>{var[o,a,n]=e;for(var h in a)r.o(a,h)&&(r.m[h]=a[h]);for(n&&n(r);o.length;)t[o.pop()]=1;i(e)}})(),(()=>{var t=r.x;r.x=()=>Promise.all([r.e(62),r.e(153)]).then(t)})(),_N_E=r.x()})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.