1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="151ddd2c-0b10-4e56-b1b5-f74a4448af90",e._sentryDebugIdIdentifier="sentry-dbid-151ddd2c-0b10-4e56-b1b5-f74a4448af90")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9088],{9088:(e,t,l)=>{l.r(t),l.d(t,{default:()=>h});var i=l(54568),r=l(7620),n=l(59428),u=l(95025),a=l(58867);let s=e=>{let{shape:t,imageWidth:l,imageHeight:s,imageElement:d,filterKind:h="blur",filterSize:o=50}=e,c=(0,r.useRef)(null);if((0,r.useEffect)(()=>{d&&c.current&&c.current.cache()},[d]),!d)return null;let f=(e=>{let{x:t,y:l,width:i,height:r}=e;return r<0&&(r*=-1,l-=r),i<0&&(i*=-1,t-=i),{x:t,y:l,width:i,height:r}})(t);return(0,i.jsxs)(n.YJ,{clip:f,children:[(0,i.jsx)(n._V,{..."pixelate"===h?{filters:[null===u.A||void 0===u.A?void 0:u.A.Filters.Pixelate],pixelSize:o}:"blur"===h||"blur-xs"===h?{filters:[null===u.A||void 0===u.A?void 0:u.A.Filters.Blur],blurRadius:o}:{},height:s,image:d,ref:c,width:l,x:0,y:0}),(0,i.jsx)(n.rw,{width:f.width,height:f.height,x:f.x,y:f.y,fill:a.X1,listening:!1})]},t.id)},d=e=>{let{shape:t,isSelected:l,onSelect:u,onChange:a}=e,s=(0,r.useRef)(null),d=(0,r.useRef)(null),{id:h,...o}=t;return(0,r.useEffect)(()=>{if(l&&s.current&&d.current){var e;d.current.nodes([s.current]),null==(e=d.current.getLayer())||e.batchDraw()}},[l]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.rw,{onClick:u,onTa
1p:u,ref:s,...o,draggable:!0,fill:"transparent",onDragEnd:e=>{a({...t,x:e.target.x(),y:e.target.y()})},onDragStart:u,onTransformEnd:()=>{let e=s.current;if(!e)return;let l=e.scaleX(),i=e.scaleY();e.scaleX(1),e.scaleY(1),a({...t,x:e.x(),y:e.y(),width:Math.max(10,e.width()*l),height:Math.max(10,e.height()*i)})},stroke:"var(--color-primary)",strokeWidth:2*!!l}),l&&(0,i.jsx)(n.Ge,{boundBoxFunc:(e,t)=>t.width<5||t.height<5?e:t,keepRatio:!1,ref:d,rotateEnabled:!1})]})},h=e=>{let{imageElement:t,stageWidth:l,stageHeight:u,shapes:h,setShapes:o,filterKind:c="pixelate",filterSize:f=20,disabled:g=!1}=e,x=(0,r.useRef)(null),[b,y]=(0,r.useState)(null),[p,w]=(0,r.useState)(null),m=e=>{w(e),null!==e&&o(t=>{let l=t.slice(),i=l.findIndex(t=>t.id===e);if(i>-1){let[e]=l.splice(i,1);l.push(e)}return l})},v=e=>{var t,l;if(g||(null==e||null==(t=e.target)?void 0:t.index)!==0)return;w(null);let i=null==(l=x.current)?void 0:l.getPointerPosition();if(!i)return;let r=h.reduce((e,t)=>Math.max(e,t.id??0),0)+1;o(e=>[...e,{id:r,x:i.x,y:i.y,width:0,height:0}]),y(r)},j=()=>{var e;if(null===b)return;let t=null==(e=x.current)?void 0:e.getPointerPosition();t&&o(e=>e.map(e=>e.id===b?{...e,width:t.x-(e.x??0),height:t.y-(e.y??0)}:e))},M=()=>{if(null===b)return;let e=h.find(e=>e.id===b);!e||10>Math.abs(e.width??0)&&10>Math.abs(e.height??0)?o(e=>e.filter(e=>e.id!==b)):m(b),y(null)};return!t||l<=0||u<=0?null:(0,i.jsx)(n.BI,{height:u,width:l,ref:x,style:{cursor:g?"default":"crosshair"},onMouseDown:v,onMouseMove:j,onMouseUp:M,onTouchStart:v,onTouchMove:j,onTouchEnd:M,children:(0,i.jsxs)(n.Wd,{children:[(0,i.jsx)(n.YJ,{children:(0,i.jsx)(n._V,{height:u,image:t,width:l,x:0,y:0})}),h.map(e=>!(0,a.JF)(e)||10>=Math.abs(e.height)||10>=Math.abs(e.width)?null:(0,i.jsx)(s,{filterKind:c,filterSize:f,imageElement:t,imageHeight:u,imageWidth:l,shape:e},e.id)),(0,i.jsx)(n.YJ,{children:h.map(e=>(0,a.JF)(e)?(0,i.jsx)(d,{isSelected:!g&&e.id===p,onChange:t=>o(l=>l.map(l=>l.id===e.id?{...t,id:e.id}:l)),onSelect:()=>!g&&m(e.id??null),shape:e},e.id):null)})]})})}}}]);
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.