PageSourceSearch

https://www.cornify.com/_nuxt/BC8Zm7uz.js

js cornify.com collected 2026-10-01 12:27:50 UTC 2,240 bytes, 1 lines download raw bytes

1import{M as f,G as g}from"./BkgQnyNq.js";import{l as p}from"./DMRkitRb.js";function l(o){const t="touches"in o?o.touches[0]??o.changedTouches[0]:o;return t?{x:t.pageX,y:t.pageY}:null}function b(o){let t=null,n=!1;function i(a){const e=l(a);!t||!e||(n||(n=!0,o.start?.(t,a)),o.move(e,t,a))}function s(){document.body.removeEventListener("mousemove",i),document.body.removeEventListener("touchmove",i),document.body.removeEventListener("mouseup",s),document.body.removeEventListener("touchend",s),n&&o.end?.(),t=null,n=!1}function r(a){t=l(a),document.body.addEventListener("mousemove",i),document.body.addEventListener("touchmove",i,{passive:!1}),document.body.addEventListener("mouseup",s),document.body.addEventListener("touchend",s)}return f(s),{begin:r}}function E(o){if(!o)return;const t=o.getBoundingClientRect();g.call("glitter-sparkle",{x:t.left+t.width/2,y:t.top+t.height/2})}const v=1200,x="bold 48px 'Comic Sans', 'Comic Sans MS', 'Comic Neue', sans-serif";async function P(o,t){const{width:n,height:i,stickers:s,text:r}=o.editor,a=document.createElement("canvas");a.width=n,a.height=i;const e=a.getContext("2d");e.drawImage(await p(o.file.dataUrl),0,0,n,i);for(const c of s){if(!c.image)continue;const{naturalWidth:m,naturalHeight:h}=c.image;e.save(),e.translate(c.x,c.y),e.rotate(c.rotation*Math.PI/180),e.scale(c.scale,c.scale),e.drawImage(c.image,-m/2,-h/2,m,h),e.restore()}if(t&&e.drawImage(t,0,0,n,i),r.text.trim()){e.font=x,e.textAlign="center",e.lineWidth=8,e.strokeStyle="white",e.fillStyle="#ff00ff";const c=(r.y??50)+r.height/2;e.strokeText(r.text,r.x??n/2,c),e.fillText(r.text,r.x??n/2,c)}let d=a;const u=Math.min(1,v/Math.max(n,i));return u<1&&(d=document.createElement("canvas"),d.width=Math.round(n*u),d.height=Math.round(i*u),d.getContext("2d").drawImage(a,0,0,d.width,d.height)),d}async function C(o,t,n=""){const i=await new Promise((r,a)=>o.toBlob(e=>e?r(e):a(new Error("Could not export the canvas")),"image/jpeg",.85)),s=new FormData;return s.append("photo",i,"photo.jpg"),s.append("text",t),s.append("type",n),await $fetch("/api/photos",{method:"POST",body:s})}const M=(o,t)=>$fetch(`/api/photos/${o.id}`,{method:"PATCH",body:{editToken:o.editToken,...t}});export{C as a,P as c,M as n,l as p,E as s,b as u};

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.