1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4092,1830,3812],{42713:function(t,e,r){var i=r(71600);e.Z=void 0;var n=i(r(68671)),o=r(52322);e.Z=(0,n.default)((0,o.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check")},16996:function(t,e,r){r.d(e,{n:function(){return u}});var i=r(52322);r(2784);var n=r(92679),o=r(85801),l=r(65992);let c=(0,l.ZP)(o.Z)(t=>{let{theme:e}=t;return{position:"absolute",right:8,top:8,color:e.palette.grey[500],[e.breakpoints.down("sm")]:{right:"2px",top:"2px"}}});function u(t){return(0,i.jsx)(c,{"aria-label":"Close",title:"Close",onClick:t.onClick,children:(0,i.jsx)(n.Z,{htmlColor:t.color})})}},64192:function(t,e,r){r.r(e),r.d(e,{default:function(){return S}});var i=r(52322),n=r(74448),o=r(16996),l=r(65992),c=r(6060),u=r(5971),a=r(35199),s=r(69089),h=r(69692),d=r(29164),p=r(92679),g=r(42713),x=r(2784),C=r(68555),f=r(16331),m=r(93696);r(83128);let j=(0,l.ZP)("img")(()=>({with:"auto",height:"auto",maxWidth:"100%",maxHeight:"80vh"})),w=(0,l.ZP)(h.Z)(()=>({width:"100%",textAlign:"center",boxSizing:"border-box","& .react-crop .ReactCrop__crop-selection":{borderColor:"black",borderWidth:"2px"},"& .react-crop .ReactCrop__drag-handle::after":{width:"20px",height:"20px"}})),k=(0,l.ZP)(c.Z)(t=>{let{}=t;return{boxSizing:"border-box",width:"100%"}});function b(t){let[e,r]=(0,x.useState)(),[l,c]=(0,x.useState)(null),[s,b]=(0,x.useState)(null),S=(0,x.useRef)(null),Z=()=>{S.current&&S.current.click()},R=e=>{let i=e.target.files?e.target.files[0]:null;if(!i){c(null);return}let n=URL.createObjectURL(i),o=new Image;o.onload=function(){let e;let i=o.width;e=t.circularOutputSize&&i>t.circularOutputSize?t.circularOutputSize:i;let n=e/t.aspectRatio;r({x:0,y:0,unit:"px",width:e,height:n})},o.src=n,c(n)},v=()=>{let r,i;if(!s||!e)return;let n=document.createElement("canvas"),o=s.naturalWidth/s.width,l=s.naturalHeight/s.height;n.width=e.width,n.height=e.height;let c=n.getContext("2d");if(!c){f.k.error(Error("Could not find the 2d context."));return}let u=window.devicePixelRatio;n.width=e.width*u,n.height=e.height*u,c.setTransform(u,0,0,u,0,0),c.imageSmoothingQuality="high";let a=e.width*o,h=e.height*l,d=e.x*o,p=e.y*l;if(t.circularOutputSize?(r=t.circularOutputSize,i=t.circularOutputSize):t.outputWidth?(r=t.outputWidth,i=t.outputWidth/t.aspectRatio):(r=a,i=h),n.width=r,n.height=i,t.circularCrop){c.fillStyle="white",c.fillRect(0,0,r,i);let t=r/2;c.beginPath(),c.arc(t,t,t,0,2*Math.PI,!0),c.clip(),c.closePath(),c.restore()}c.drawImage(s,d,p,a,h,0,0,r,i),n.toBlob(e=>{if(!e){f.k.error("Could not generate blob"),t.onClose();return}t.onCropSuccess(e)},"image/jpg")},z=e=>{if(b(e),t.outputWidth&&t.aspectRatio){let i=t.outputWidth,n=e.getBoundingClientRect().width;n<i&&(i=n);let o=i/t.aspectRatio;m.g.executeTaskWhenEverythingIsElseIsDone(()=>{r({width:i,height:o,unit:"px",x:0,y:0})})}};return(0,x.useEffect)(()=>{let e;return t.triggerPickerOnMount&&(e=m.g.executeTaskWhenEverythingIsElseIsDone(Z)),()=>{e&&e.cancel(),l&&URL.revokeObjectURL(l)}},[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.n,{onClick:t.onClose}),(0,i.jsxs)(k,{children:[l?(0,i.jsx)(w,{children:(0,i.jsx)(C.ZP,{crop:e,className:"react-crop",aspect:t.aspectRatio,circularCrop:t.circularCrop,onChange:t=>r(t),children:(0,i.jsx)(j,{src:l,onLoad:t=>z(t.currentTarget)})})}):null,null===l?(0,i.jsx)(h.Z,{textAlign:"center",children:(0,i.jsx)(n.u,{size:"medium",color:"primary",startIcon:(0,i.jsx)(d.Z,{}),onClick:Z,children:"Add photo"})}):null,(0,i.jsx)("input",{style:{display:"none"},ref:S,type:"file",accept:"image/*",onChange:R})]}),l?(0,i.jsx)(u.Z,{sx:{paddingTop:"20px"},children:(0,i.jsxs)(a.Z,{direction:"row",width:"100%",spacing:2,justifyContent:"center",alignItems:"center",children:[(0,i.jsx)(n.u,{variant:"outlined",color:"error",size:"medium",startIcon:(0,i.jsx)(p.Z,{}),onClick:t.onClose,children:"Cancel"}),(0,i.jsx)(n.u,{variant:"contained",color:"success",size:"medium",startIcon:(0,i.jsx)(g.Z,{}),onClick:v,children:"Done"})]})}):null]})}function S(t){return(0,i.jsx)(s.Z,{open:t.open,onClose:t.onClose,maxWidth:"md",fullWidth:!0,keepMounted:!1,children:(0,i.jsx)(b,{onClose:t.onClose,aspectRatio:t.aspectRatio,outputWidth:t.outputWidth,triggerPickerOnMount:t.triggerPickerOnMount,circularCrop:t.circularCrop,circularOutputSize:t.circularOutputSize,onCropSuccess:t.onCropSuccess})})}}}]);
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.