1"use strict";(self.rspackChunkvagaro_websitebuilder_consumer=self.rspackChunkvagaro_websitebuilder_consumer||[]).push([[6693],{18068(e,t,r){r.r(t),r.d(t,{default:()=>I});var i=r(74848),o=r(96540);r(48586),r(31510),r(80726);var l=r(88816),n=r(85345),s=r(60067),a=r(8025),c=r(80401),d=r(66380),p=r(8818),u=r(43385),h=r(56902),m=r(78714),g=r(17044);function v(e){let{swiper:t,extendParams:r,on:i}=e;function o(e,t){let r,i,o,l,n;return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(r=(i=((e,t)=>{for(l=-1,o=e.length;o-l>1;)e[n=o+l>>1]<=t?l=n:o=n;return o})(this.x,e))-1,(e-this.x[r])*(this.y[i]-this.y[r])/(this.x[i]-this.x[r])+this.y[r]):0},this}function l(){t.controller.control&&t.controller.spline&&(t.controller.spline=void 0,delete t.controller.spline)}r({controller:{control:void 0,inverse:!1,by:"slide"}}),t.controller={control:void 0},i("beforeInit",()=>{"u">typeof window&&("string"==typeof t.params.controller.control||t.params.controller.control instanceof HTMLElement)?("string"==typeof t.params.controller.control?[...document.querySelectorAll(t.params.controller.control)]:[t.params.controller.control]).forEach(e=>{if(t.controller.control||(t.controller.control=[]),e&&e.swiper)t.controller.control.push(e.swiper);else if(e){let r=`${t.params.eventsPrefix}init`,i=o=>{t.controller.control.push(o.detail[0]),t.update(),e.removeEventListener(r,i)};e.addEventListener(r,i)}}):t.controller.control=t.params.controller.control}),i("update",()=>{l()}),i("resize",()=>{l()}),i("observerUpdate",()=>{l()}),i("setTranslate",(e,r,i)=>{t.controller.control&&!t.controller.control.destroyed&&t.controller.setTranslate(r,i)}),i("setTransition",(e,r,i)=>{t.controller.control&&!t.controller.control.destroyed&&t.controller.setTransition(r,i)}),Object.assign(t.controller,{setTranslate:function(e,r){let i,l,n=t.controller.control,s=t.constructor;function a(e){if(e.destroyed)return;let r=t.rtlTranslate?-t.translate:t.translate;"slide"===t.params.controller.by&&(t.controller.spline=t.params.loop?new o(t.slidesGrid,e.slidesGrid):new o(t.snapGrid,e.snapGrid),l=-t.controller.spline.interpolate(-r));l&&"container"!==t.params.controller.by||((Number.isNaN(i=(e.maxTranslate()-e.minTranslate())/(t.maxTranslate()-t.minTranslate()))||!Number.isFinite(i))&&(i=1),l=(r-t.minTranslate())*i+e.minTranslate()),t.params.controller.inverse&&(l=e.maxTranslate()-l),e.updateProgress(l),e.setTranslate(l,t),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(n))for(let e=0;e<n.length;e+=1)n[e]!==r&&n[e]instanceof s&&a(n[e]);else n instanceof s&&r!==n&&a(n)},setTransition:function(e,r){let i,o=t.constructor,l=t.controller.control;function n(r){r.destroyed||(r.setTransition(e,t),0!==e&&(r.transitionStart(),r.params.autoHeight&&(0,g.n)(()=>{r.updateAutoHeight()}),(0,g.l)(r.wrapperEl,()=>{l&&r.transitionEnd()})))}if(Array.isArray(l))for(i=0;i<l.length;i+=1)l[i]!==r&&l[i]instanceof o&&n(l[i]);else l instanceof o&&r!==l&&n(l)}})}function f({inBounds:e,canvasDom:t,onUpdateCropBounds:r}){let[l,n]=(0,o.useState)({x:0,y:0,width:0,height:0}),[s,a]=(0,o.useState)({...e}),c=(0,o.useRef)({...e}),d=(0,o.useRef)({left:!1,right:!1,top:!1,bottom:!1}),p=(0,o.useRef)(!1),u=(0,o.useRef)({x:0,y:0}),h=(0,o.useRef)({left:15,top:15,right:75,bottom:75}),[m,g]=(0,o.useState)("normal"),v={background:"rgba(0,0,0,0.5)"},x=e=>{d.current=e,p.current=!0},w=()=>{d.current={left:!1,right:!1,top:!1,bottom:!1},p.current=!1};function j(e){y(new MouseEvent("mousemove",{clientX:e.touches[0].clientX,clientY:e.touches[0].clientY})),e.preventDefault()}let y=(0,o.useCallback)(e=>{if(!p.current)return;let i=e.clientX,o=e.clientY,l=t.getBoundingClientRect(),n={...c.current},s=d.current;if(s.left&&s.right&&s.top&&s.bottom){let e=i-u.current.x,t=o-u.current.y;n.left=h.current.left+e/l.width*100,n.top=h.current.top+t/l.height*100,n.right=h.current.right+e/l.width*100,n.bottom=h.current.bottom+t/l.height*100,n.left<0&&(n.left=0,n.right=n.left+(h.current.right-h.current.left)),n.top<0&&(n.top=0,n.bottom=n.top+(h.current.bottom-h.current.top)),n.right>100&&(n.right=100,n.left=n.right-(h.current.right-h.current.left)),n.bottom>100&&(n.bottom=100,n.top=n.bottom-(h.current.bottom-h.current.top)),c.current=n,a(n),r(n);return}
1d.current.left&&(n.left=(i-l.x)/l.width*100,n.left>n.right-5&&(n.left=n.right-5)),d.current.top&&(n.top=(o-l.y)/l.height*100,n.top>n.bottom-5&&(n.top=n.bottom-5)),d.current.right&&(n.right=(i-l.x)/l.width*100,n.right<n.left+5&&(n.right=n.left+5)),d.current.bottom&&(n.bottom=(o-l.y)/l.height*100,n.bottom<n.top+5&&(n.bottom=n.top+5)),n.left<0&&(n.left=0),n.top<0&&(n.top=0),n.right>100&&(n.right=100),n.bottom>100&&(n.bottom=100),a(n),c.current=n,r(n)},[p,d,s,t]);(0,o.useEffect)(()=>{let e=!0,r=()=>{e&&n(t.getBoundingClientRect())};window.addEventListener("resize",r),document.addEventListener("pointermove",y,{passive:!1}),document.addEventListener("pointerup",w),document.addEventListener("pointerdown",()=>x(d.current)),document.addEventListener("touchmove",j,{passive:!1}),r();let i=new ResizeObserver(r);return i.observe(t),()=>{e=!1,window.removeEventListener("resize",r),document.removeEventListener("pointermove",y),document.removeEventListener("pointerup",w),document.removeEventListener("pointerdown",()=>x(d.current)),document.removeEventListener("touchmove",j),i.disconnect()}},[t]);let b=e=>{if(p.current)return;let r=e.clientX,i=e.clientY,o=t.getBoundingClientRect(),l=o.left+s.left*o.width/100,n=o.top+s.top*o.height/100,a=o.left+s.right*o.width/100,c=o.top+s.bottom*o.height/100;l+=10,n+=10,c-=10,r>(a-=10)?i>c?(g("se-resize"),d.current={left:!1,right:!0,top:!1,bottom:!0}):i<n?(g("ne-resize"),d.current={left:!1,right:!0,top:!0,bottom:!1}):(g("ew-resize"),d.current={left:!1,right:!0,top:!1,bottom:!1}):r<l?i>c?(g("sw-resize"),d.current={left:!0,right:!1,top:!1,bottom:!0}):i<n?(g("nw-resize"),d.current={left:!0,right:!1,top:!0,bottom:!1}):(g("ew-resize"),d.current={left:!0,right:!1,top:!1,bottom:!1}):i>c?(g("ns-resize"),d.current={left:!1,right:!1,top:!1,bottom:!0}):i<n?(g("ns-resize"),d.current={left:!1,right:!1,top:!0,bottom:!1}):(g("move"),d.current={left:!0,right:!0,top:!0,bottom:!0},u.current={x:r,y:i},h.current={...s})},C={position:"absolute",height:"10px",width:"10px",borderRadius:"50%",background:"white",border:"1px solid green"};return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("div",{className:"outline-container-wrapper",style:{position:"fixed",top:l.y-24+"px",left:l.x-24+"px",width:l.width+48+"px",height:l.height+48+"px",cursor:m},onMouseMove:b,onPointerDown:b,children:(0,i.jsxs)("div",{className:"outline-container",style:{position:"fixed",top:l.y+"px",left:l.x+"px",width:l.width+"px",height:l.height+"px"},children:[s.left>0&&(0,i.jsx)("div",{className:"left-dark",style:{...v,position:"absolute",left:0,top:0,height:"100%",width:s.left+"%"}}),s.right<100&&(0,i.jsx)("div",{className:"right-dark",style:{...v,position:"absolute",right:0,top:0,height:"100%",width:100-s.right+.01+"%"}}),s.top>0&&(0,i.jsx)("div",{className:"top-dark",style:{...v,position:"absolute",left:s.left+"%",top:0,width:s.right-s.left+"%",height:s.top+"%"}}),s.bottom<100&&(0,i.jsx)("div",{className:"bottom-dark",style:{...v,position:"absolute",left:s.left+"%",bottom:0,width:s.right-s.left+"%",height:100-s.bottom+"%"}}),(0,i.jsxs)("div",{className:"outline",style:{position:"absolute",top:s.top+"%",left:s.left+"%",width:s.right-s.left+"%",height:s.bottom-s.top+"%",border:"2px solid green"},children:[(0,i.jsx)("div",{className:"outline-dot top-left",style:{...C,left:"-5px",top:"-5px"}}),(0,i.jsx)("div",{className:"outline-dot top-right",style:{...C,right:"-5px",top:"-5px"}}),(0,i.jsx)("div",{className:"outline-dot bottom-left",style:{...C,left:"-5px",bottom:"-5px"}}),(0,i.jsx)("div",{className:"outline-dot bottom-right",style:{...C,right:"-5px",bottom:"-5px"}}),(0,i.jsx)("div",{className:"outline-dot left",style:{...C,left:"-5px",top:"calc(50% - 5px)"}}),(0,i.jsx)("div",{className:"outline-dot right",style:{...C,right:"-5px",top:"calc(50% - 5px)"}}),(0,i.jsx)("div",{className:"outline-dot top",style:{...C,left:"calc(50% - 5px)",top:"-5px"}}),(0,i.jsx)("div",{className:"outline-dot bottom",style:{...C,left:"calc(50% - 5px)",bottom:"-5px"}})]})]})})})}function x({src:e,onSave:t,onClose:r,forceMaxSize:l}){let n=l||1600,s=(0,o.useRef)(null),a=(0,o.useRef)(null),[d,p]=(0,o.useState)(0),[u,h]=(0,o.useState)(0),m=(0,o.useRef)({left:0,top:0,right:100,bottom:100}),g=(0,o.useRef)(0),[v,w]=(0,o.useState)(0),[j,y]=(0,o.useState)(!1),[b,C]=(0,o.useState)(!1),N=(0,o.useRef)(null),[S,k]=(0,o.useState)({x:1,y:1}),[B,T]=(0,o.useState)(!1),z=()=>{let t=new Image;N.current=t,t.src=e,t.onload=()=>{let e=t.width,r=t.height;p(e),h(r);let i=a.current;i&&(i.width=e,i.height=r)},C(!0)},I=()=>{let t=new Image;t.src=e,t.onload=()=>{let e=t.width,r=t.height;g.current>3&&(g.current=0),g.current<0&&(g.current=3),w(90*g.current);let i=a.current;if(!i)return;let o=g.current%2==1;i.width=o?r:e,i.height=o?e:r,p(i.width),h(i.height);let l=i.getContext("2d");l&&(l.setTransform(1,0,0,1,0,0),l.translate(i.width/2,i.height/2),l.rotate(Math.PI/2*g.current),l.scale(S.x,S.y),l.drawImage(t,-e/2,-r/2,e,r))}},L=(e=1)=>{g.current+=e,I()};return(0,o.useEffect)(()=>{j&&I()},[S,j,v,I]),(0,o.useEffect)(()=>{j||(z(),g.current=0,y(!0))},[e,j,z]),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("div",{className:"block-edit simple-image-editor-container vanimation-fade-in no-delay",children:(0,i.jsxs)("div",{className:"simple-image-editor no-delay",children:[(0,i.jsxs)("div",{className:"editor-header-row",children:[(0,i.jsx)("div",{className:"editor-header-title",children:(0,i.jsx)("h4",{children:"Upload Image"})}),(0,i.jsx)("button",{className:"close-button",onClick:r,children:"Ã"})]}),(0,i.jsxs)("div",{className:"canvas-row",ref:s,children:[!b&&(0,i.jsx)("p",{style:{color:"#fff"},children:"Loading..."}),B?(0,i.jsx)("p",{style:{color:"#fff"},children:"Saving Changes..."}):(0,i.jsx)("canvas",{width:d,height:u,ref:a})]}),a.current&&!B&&(0,i.jsx)(f,{inBounds:m.current,canvasDom:a.current,onUpdateCropBounds:e=>{m.current=e}}),(0,i.jsxs)("div",{className:"toolbar-row",children:[(0,i.jsxs)("div",{className:"mobileRow",children:[(0,i.jsx)("div",{className:"toolbar-row-left t-row",children:(0,i.jsx)("button",{style:S.x>0?{opacity:.5}:{},className:"invisible-button",onClick:()=>k({x:-1*S.x,y:S.y}),children:(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1.4em",fill:"
1currentColor",viewBox:"0 0 512 512",children:(0,i.jsx)("path",{d:"M493.5 181.5c12 22.6 18.7 48.4 18.5 75.8C511.3 345.4 438.6 416 350.4 416H192v47.5c0 22.5-26.2 32.3-41 17.5l-80-80c-9.4-9.4-9.4-24.6 0-33.9l80-80C166.1 271.9 192 282.7 192 304v48h158.9c52.8 0 96.6-42.2 97.1-95 .2-15-3.2-29.3-9.2-42-4.4-9.2-2.4-20.1 4.8-27.3 4.7-4.7 8.6-8.6 11.9-11.8 11.4-11.4 30.6-8.6 38.1 5.6zM64 255c.5-52.8 44.3-95 97.1-95H320v47.5c0 22.4 26.1 32.3 41 17.5l80-80c9.4-9.4 9.4-24.6 0-33.9l-80-80C346 16.1 320 26.3 320 48.5V96H161.6C73.4 96 .7 166.6 0 254.8c-.2 27.4 6.5 53.1 18.5 75.8 7.5 14.2 26.7 16.9 38.1 5.6 3.2-3.2 7.1-7.1 11.9-11.8 7.2-7.2 9.2-18.1 4.8-27.3-6-12.7-9.4-27-9.2-42z"})})})}),(0,i.jsxs)("div",{className:"toolbar-row-center t-row rotationWrap",children:[(0,i.jsx)("button",{className:"rotate-button invisible-button",onClick:()=>L(-1),children:(0,i.jsx)("svg",{fill:"currentColor",height:"1em",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,i.jsx)("path",{d:"M212.3 224.3H12c-6.6 0-12-5.4-12-12V12C0 5.4 5.4 0 12 0h48c6.6 0 12 5.4 12 12v78.1C117.8 39.3 184.3 7.5 258.2 8c136.9 1 246.4 111.6 246.2 248.5C504 393.3 393.1 504 256.3 504c-64.1 0-122.5-24.3-166.5-64.2-5.1-4.6-5.3-12.6-.5-17.4l34-34c4.5-4.5 11.7-4.7 16.4-.5C170.8 415.3 211.6 432 256.3 432c97.3 0 176-78.7 176-176 0-97.3-78.7-176-176-176-58.5 0-110.3 28.5-142.3 72.3h98.3c6.6 0 12 5.4 12 12v48c0 6.6-5.4 12-12 12z"})})}),(0,i.jsxs)("div",{style:{width:"60px",textAlign:"center",marginLeft:".2em"},children:[" ",v,"°"]}),(0,i.jsx)("button",{className:"rotate-button invisible-button right",onClick:()=>L(1),children:(0,i.jsx)("svg",{fill:"currentColor",height:"1em",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,i.jsx)("path",{d:"M212.3 224.3H12c-6.6 0-12-5.4-12-12V12C0 5.4 5.4 0 12 0h48c6.6 0 12 5.4 12 12v78.1C117.8 39.3 184.3 7.5 258.2 8c136.9 1 246.4 111.6 246.2 248.5C504 393.3 393.1 504 256.3 504c-64.1 0-122.5-24.3-166.5-64.2-5.1-4.6-5.3-12.6-.5-17.4l34-34c4.5-4.5 11.7-4.7 16.4-.5C170.8 415.3 211.6 432 256.3 432c97.3 0 176-78.7 176-176 0-97.3-78.7-176-176-176-58.5 0-110.3 28.5-142.3 72.3h98.3c6.6 0 12 5.4 12 12v48c0 6.6-5.4 12-12 12z"})})})]})]}),(0,i.jsxs)("div",{className:"toolbar-save-close-row t-row",children:[(0,i.jsx)(c.default,{ButtonVariant:"secondary",ButtononClick:r,children:"Cancel"}),(0,i.jsx)(c.default,{ButtonVariant:"primary",ButtononClick:()=>{T(!0);let e=a.current;if(!e)return;let r=(m.current.right-m.current.left)/100*d,i=(m.current.bottom-m.current.top)/100*u,o=m.current.left/100*d,l=m.current.top/100*u,s=e.toDataURL(),c=new Image;c.src=s,c.onload=()=>{c.width,c.height;let s=1;(r>n||i>n)&&(s=n/Math.max(r,i),c.width,c.height),e.width=r*s,e.height=i*s,e.getContext("2d")?.drawImage(c,o,l,r,i,0,0,r*s,i*s);let a=e.toDataURL(),d=a.split(",")[1],p=new Blob([a],{type:"image/png"});t(a,d,c.width,c.height,p),T(!1)}},children:"Save"})]})]})]})})})}var w=r(24288);let j=["gif","jpg","jpeg","png","bmp"].map(e=>`image/${e}`),y=["webm","mpg","mp2","mpeg","mpe","mpv","ogg","mp4","m4p","m4v","avi","wmv","mov","qt","flv","swf","avchd","3gp","3g2"].map(e=>`video/${e}`),b=["doc","dot","wbk","docx","docm","dotx","dotm","docb"].map(e=>"application/msword"),C=["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>"application/vnd.ms-excel"),N=["prn","txt","dif","slk"].map(e=>"text/plain"),S=["csv"].map(e=>"text/csv"),k=["pdf"].map(e=>"application/pdf"),B=["exe","dob"],T=[...j,...y,...b,...C,...N,...S,...k],z=y.reduce((e,t)=>{let r=t?.split("/")?.[1];return{...e,[r]:`${t}`}},{}),I=(0,o.forwardRef)(({ImagePosition:e="External",MaxFileSize:t=4,SupportedFileFormate:r=["image/jpeg","image/png","image/heic","image/jpg"],Disabled:g=!1,Editor:f=!0,ImageUploaderId:j="",Name:b="",StoreOnAzureContainer:C=!1,GetContainerNameAPIUrl:N="",GetContainerNameAPIPayload:S={},DriveContainerName:k="",OnChange:I,FileCount:L,ImageDelete:P=!1,ImageUrl:E,MaxFilePopupText:M="",AllowMultipleUpload:$=!1,Width:D="",Height:F="",DeleteConfirmationPopup:A=!1,PlaceholderText:R="",OnDelete:O,popupConfig:U},H)=>{let V=L>1,[Z,Y]=(0,o.useState)(""),[G,_]=(0,o.useState)(null),[X,q]=(0,o.useState)(!1),[K,W]=(0,o.useState)(!1),[J,Q]=(0,o.useState)(!1),[ee,et]=(0,o.useState)(!1),[er,ei]=(0,o.useState)(!1),[eo,el]=(0,o.useState)([]),[en,es]=(0,o.useState)([]),[ea,ec]=(0,o.useState)(!1),[ed,ep]=(0,o.useState)({show:!1,src:""}),[eu,eh]=(0,o.useState)([]),[em,eg]=(0,o.useState)(0),[ev,ef]=(0,o.useState)(!1),[ex,ew]=(0,o.useState)(null),[ej,ey]=(0,o.useState)(-1),[eb,eC]=(0,o.useState)(!1),[eN,eS]=(0,o.useState)(""),[ek,eB]=(0,o.useState)(!1),[eT,ez]=(0,o.useState)(!1),[eI,eL]=(0,o.useState)(!1),[eP,eE]=(0,o.useState)(!1),[eM,e$]=(0,o.useState)(-1),eD=(0,o.useRef)(null),eF=(0,o.useRef)(null),eA=()=>{_(null),W(!1),Q(!1),q(!1)},eR=e=>e.slice((e.lastIndexOf(".")-1>>>0)+2).toLowerCase(),eO=e=>new Promise((t,r)=>{let i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=e=>r(e)});(0,o.useImperativeHandle)(H,()=>({validate:()=>({[j]:Z,IsValidate:!0,IsRequired:!0,images:eo,id:j,uploadImages:async()=>
1{if(C)for(let e of eo)await e0(e.file,e.name),el([])}})}));let eU=async e=>{try{let t=await l({blob:e,toType:"image/jpeg",quality:.8});return new File([t],e.name.replace(/\.heic$/i,".jpg"),{type:"image/jpeg"})}catch(e){throw Error("Failed to convert HEIC file")}},eH=async(e,i)=>{if(i&&"string"==typeof i)try{if(!/^https?:\/\/.+\.(jpg|jpeg|png|heic|gif|webp|bmp|svg)$/i.test(i)||!await new Promise(e=>{let t=new Image;t.src=i,t.onload=()=>e(!0),t.onerror=()=>e(!1)}))return void W(!0);Y(i);let e={file:new File([],i),id:i,name:i.split("/").pop()||"image",size:0,description:"",type:"url",preview:i,slide:i};if(el(t=>V?[...t,e]:[e]),!f){let t={target:{files:V?[...eo,e]:[e],value:i}};I(t)}return}catch(e){W(!0);return}if(!e)return;let o=eR(e.name).toLowerCase(),l=e.type.toLowerCase(),n={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",heic:"image/heic",gif:"image/gif",...z};if("heic"===o)try{e=await eU(e),o="jpg",l="image/jpeg"}catch(e){W(!0);return}let s=Object.keys(n).includes(o),a=r.includes(l);if(!s||!a)return void W(!0);if(e.size/1048576>t){W(!0),Q(!0);return}try{let t=await eO(e);f?(z?.[o]?Y(t):(q(!0),_(t)),q(!0),_(t)):Y(t);let r={file:e,id:URL.createObjectURL(e),name:e.name,size:e.size,description:"",type:e.type,preview:URL.createObjectURL(e),slide:t};if(ej>-1&&V){let e=[...eo];e[ej]=r,el(e),ey(-1);return}if(el(e=>V?[...e,r]:[r]),!f){let e={target:{files:V?[...eo,r]:[r],value:t}};I(e)}}catch(e){el([])}};(0,o.useEffect)(()=>{if(!E)return;let t=Array.isArray(E)?E:[E];el(e=>{let r=new Set(e.map(e=>e.preview));return[...e,...t.filter(e=>"string"==typeof e&&!r.has(e)).map(e=>{let t=e.split("/").pop()||"image";return{file:new File([],t),id:e,name:t,size:0,description:"",type:"url",preview:e,slide:e}})]}),"Internal"===e&&t.length&&Y(t[t.length-1])},[E]);let eV=async e=>{let t=e.target.files?.[0];t&&eH(t),eD.current&&(eD.current.value="")},eZ=e=>{eB(!0),et(!1),_(eo[e]?.preview??null),ey(e),f?setTimeout(()=>{q(!0)},0):eD.current?.click()},eY=e=>{let t=eo[e],r=eo.filter((t,r)=>r!==e);Y(""),_(null),el(r);let i={target:{files:r,value:""},deletedFile:t};P&&eL(!1),I(i),O&&O(i.deletedFile)};(0,o.useEffect)(()=>{let e=e=>{let t=e.target;ee&&t instanceof Node&&eF.current&&!eF.current.contains(t)&&!t.closest(".vg-doticon")&&et(!1)};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}},[ee]);let[eG,e_]=(0,o.useState)(!1),[eX,eq]=(0,o.useState)("left"),eK=e=>{e?.stopPropagation();let t=e.currentTarget.getBoundingClientRect().left,r="left";t<142&&(r="right"),eq(r),e_(!0)},eW=async(e,t)=>{if(e)return{};try{let{SASString:e,AzureStorageAccountName:r,containerName:i}=(await s.A.post(N,{DriveContainerName:k,...t})).data;return{SASString:e,AzureStorageAccountName:r,containerName:i}}catch(e){return{}}};async function eJ(e){let t=await e.arrayBuffer();return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",t))).map(e=>e.toString(16).padStart(2,"0")).join("")}async function eQ(e){let t=e.name.split(".")[0],r=e.name.split(".").pop(),i=await eJ(e),o=Object.keys(localStorage).filter(e=>e.startsWith(t));for(let e of o)if(JSON.parse(localStorage.getItem(e)??"").fileHash===i)return e;let l=Math.max(...o.map(e=>{let t=e.match(/_v(\d+)$/);return t?parseInt(t[1],10):0}),0)+1;return`${t}_v${l}.${r}`}let e0=async(e,t)=>{ec(!0);let r={retryOptions:{maxTries:4,retryDelayInMs:3e3,maxRetryDelayInMs:12e4,retryPolicyType:a.uD.EXPONENTIAL}},i=(0,a.vC)(new a.tv,r),o=await eW(N,S);if(!o&&!Object.keys(o||{}).length)throw Error("Could not get the SASString");let{SASString:l,AzureStorageAccountName:n,containerName:s}=o,c=new a.wS("https://vagarotestaccount.blob.core.windows.net?sp=racwdl&st=2025-01-09T11:39:36Z&se=2025-01-09T19:39:36Z&sv=2022-11-02&sr=c&sig=IvnNKug3sO%2B3slwjK0dDwEx4vxSEvkdnoZYwbHbPstM%3D",i).getContainerClient("blobcontainer").getBlockBlobClient(t),d=await eJ(e),p=Math.ceil(e.size/4194304),u=await eQ(e),h=[],m=localStorage.getItem(u);if(m)try{let e=JSON.parse(m);e.fileHash===d&&(h=e.uploadedChunks)}catch(e){localStorage.removeItem(u)}let g=`${new Date().valueOf()}`;if(e.size<=4194304){let r=`${t}-${g}-block`;r.length>64&&(r=r.substring(0,64));try{await c.uploadBrowserData(e,{blobHTTPHeaders:{blobContentType:e.type}}),localStorage.removeItem(u)}catch(e){throw e}}else{for(let t=0;t<p;t++){if(h?.map(e=>e.count).includes(t))continue;let r=4194304*t,i=Math.min(r+4194304,e.size),o=e.slice(r,i),l=`${String(t).padStart(5,"0")}${g}`;l.length>64&&(l=l.substring(0,64));try{await c.stageBlock(btoa(l),o,o.size),h.push({count:t,blockId:btoa(l)}),localStorage.setItem(u,JSON.stringify({uploadedChunks:h,fileHash:d}))}catch(e){throw e}}let t=h.map(e=>{let t=`${String(e.count).padStart(5,"0")}${g}`;return t.length>64&&(t=t.substring(0,64)),e?.blockId?e?.blockId:btoa(t)});try{await c.commitBlockList(t,{blobHTTPHeaders:{blobContentType:e.type}})}catch(e){throw localStorage.removeItem(u),Error("Error committing block list: "+e)}}localStorage.removeItem(u),ec(!1)},e1=async e=>{if(!e.target.files)return;let r=Array.from(e.target.files),i=(await Promise.all(r.map(async e=>{try{let r,i=e;"image/heic"===e.type||/\.heic$/i.test(e.name)?(i=await eU(e),r=URL.createObjectURL(i)):(e.type.startsWith("image/")||/\.(jpe?g|png|gif|dng)$/i.test(e.name))&&(r=URL.createObjectURL(e));let o=await eO(i);if(i.size/1048576>t)return Q(!0),null;if(!(e=>{let t=e.name.split(".").pop()?.toLowerCase();if(t&&B.includes(t))return!1;let r=e.type.toLowerCase();
1return T.some(e=>r.includes(e.toLowerCase()))})(i))return W(!0),null;return{file:i,id:URL.createObjectURL(i),name:i.name,size:i.size,description:"",type:i.type,preview:r,slide:o}}catch(e){return null}}))).filter(e=>null!==e);el(e=>[...e,...i]);let o=Array.from(e.target.files).filter(e=>e.size<=0x6400000);es(e=>[...e,...o.map(e=>({fileName:e.name,progress:0,status:"pending"}))])},e2=async e=>{let t=[];for(let r of e)if(r.slide)t.push({...r,fileDescription:r?.name,fileName:r?.type,fileType:eR(r?.name)??"",slide:r?.slide});else{let e=await eO(r.file);t.push({...r,fileDescription:r?.name,fileName:r?.type,fileType:eR(r?.name)??"",slide:e,size:150})}return t},e5=async(e,t,r,i,o)=>{-1===ej&&(Y(e),ep(t=>({...t,src:e})));try{q(!1);let t=[...eo],r=t[ej>-1?ej:eo?.length-1],{width:i,height:o}=await new Promise((t,r)=>{let i=new Image;i.onload=()=>{let{width:e,height:r}=i;t({width:e,height:r})},i.onerror=()=>{Error("Image load error")},i.src=e});if(t[ej>-1?ej:eo?.length-1]={...r,slide:e,height:o,width:i,preview:e},ej>-1){let e=await e2(t);eh(e)}I({target:{files:t,value:e}}),el(t),ey(-1)}catch(e){}},e3=e=>Object.keys(z)?.includes(eR(e??""));(0,o.useEffect)(()=>{let e=()=>{ey(-1)};return eD.current?.addEventListener("cancel",e),()=>{eD.current?.removeEventListener("cancel",e)}},[]),(0,o.useEffect)(()=>(ed.show?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[ed.show]);let e4=e=>{eL(!0),e$(e)};return(0,i.jsxs)("div",{className:`vg-upload-group ${!V?`${"Internal"===e?"vg-imageposition-internal":""} ${"Internal"===e&&Z?"vg-image-uploader-space":""}`:""}`,children:[(0,i.jsxs)("div",{className:"vg-upload-flex",children:[(0,i.jsxs)("div",{className:`vg-upload-drop horizontal ${er?"drag-file":""} ${g?"vg-image-uploader-disabled":""}`,onDragOver:e=>{e.preventDefault(),e.stopPropagation(),g||ei(!0),g||ei(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),g||ei(!1)},onDrop:e=>{if(e.preventDefault(),g)return;if(ei(!1),V)return void e1({...e,target:{...e.target,files:e?.dataTransfer?.files}});let t=e.dataTransfer.files?.[0];t&&eH(t)},onClick:e=>{e?.stopPropagation(),g&&(e.preventDefault(),e.stopPropagation())},style:{display:eo?.length<L||!V?"":"none",width:D,height:F},children:[(0,i.jsx)("input",{"aria-label":"Upload a file",type:"file",ref:eD,disabled:g,id:"fileupload",accept:r.join(", "),onChange:$?e1:eV,className:"vg-input-file",name:b,multiple:$}),"External"===e&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"vg-upload-icon",children:(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",fill:"currentColor",children:(0,i.jsx)("path",{d:"M354.9 121.7c13.8 16 36.5 21.1 55.9 12.5c8.9-3.9 18.7-6.2 29.2-6.2c39.8 0 72 32.2 72 72c0 4-.3 7.9-.9 11.7c-3.5 21.6 8.1 42.9 28.1 51.7C570.4 276.9 592 308 592 344c0 46.8-36.6 85.2-82.8 87.8c-.6 0-1.3 .1-1.9 .2l-3.3 0-360 0c-53 0-96-43-96-96c0-41.7 26.6-77.3 64-90.5c19.2-6.8 32-24.9 32-45.3l0-.2s0 0 0 0s0 0 0 0c0-66.3 53.7-120 120-120c36.3 0 68.8 16.1 90.9 41.7zM512 480l0-.2c71.4-4.1 128-63.3 128-135.8c0-55.7-33.5-103.7-81.5-124.7c1-6.3 1.5-12.8 1.5-19.3c0-66.3-53.7-120-120-120c-17.4 0-33.8 3.7-48.7 10.3C360.4 54.6 314.9 32 264 32C171.2 32 96 107.2 96 200l0 .2C40.1 220 0 273.3 0 336c0 79.5 64.5 144 144 144l320 0 40 0 8 0zM223 255c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l39-39L296 384c0 13.3 10.7 24 24 24s24-10.7 24-24l0-134.1 39 39c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-80-80c-9.4-9.4-24.6-9.4-33.9 0l-80 80z"})})}),(0,i.jsxs)("div",{className:"vg-upload-decs",children:[(0,i.jsx)("p",{children:R}),(0,i.jsx)("a",{className:"vg-choose-file",onClick:e=>{e.preventDefault(),e.stopPropagation(),g||eD.current?.click()},children:"Choose File"})]})]}),"Internal"===e&&(0,i.jsx)(i.Fragment,{children:!Z||V?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"vg-upload-icon",children:(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",fill:"currentColor",children:(0,i.jsx)("path",{d:"M354.9 121.7c13.8 16 36.5 21.1 55.9 12.5c8.9-3.9 18.7-6.2 29.2-6.2c39.8 0 72 32.2 72 72c0 4-.3 7.9-.9 11.7c-3.5 21.6 8.1 42.9 28.1 51.7C570.4 276.9 592 308 592 344c0 46.8-36.6 85.2-82.8 87.8c-.6 0-1.3 .1-1.9 .2l-3.3 0-360 0c-53 0-96-43-96-96c0-41.7 26.6-77.3 64-90.5c19.2-6.8 32-24.9 32-45.3l0-.2s0 0 0 0s0 0 0 0c0-66.3 53.7-120 120-120c36.3 0 68.8 16.1 90.9 41.7zM512 480l0-.2c71.4-4.1 128-63.3 128-135.8c0-55.7-33.5-103.7-81.5-124.7c1-6.3 1.5-12.8 1.5-19.3c0-66.3-53.7-120-120-120c-17.4 0-33.8 3.7-48.7 10.3C360.4 54.6 314.9 32 264 32C171.2 32 96 107.2 96 200l0 .2C40.1 220 0 273.3 0 336c0 79.5 64.5 144 144 144l320 0 40 0 8 0zM223 255c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l39-39L296 384c0 13.3 10.7 24 24 24s24-10.7 24-24l0-134.1 39 39c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-80-80c-9.4-9.4-24.6-9.4-33.9 0l-80 80z"})})}),(0,i.jsxs)("div",{className:"vg-upload-decs",children:[(0,i.jsx)("p",{children:R}),(0,i.jsx)("a",{className:"vg-choose-file",onClick:e=>{e.preventDefault(),e.stopPropagation(),g||eD.current?.click()},children:"Choose File"})]})]}):(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"vg-upload-drop horizontal uploaded-pics",onMouseLeave:()=>e_(!1),style:{width:D,height:F,backgroundImage:`url(${eo[eo?.length-1]?.preview})`},children:[!g&&!P&&(0,i.jsxs)("div",{className:"vg-dot-dropdown dropdown",ref:eF,children:[(0,i.jsx)("div",{className:"vg-tk-btn vg-btn-action vg-doticon",onClick:eK,children:(0,i.jsx)("svg",{viewBox:"0 0 14 4",fill:"
1currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M10.5 2C10.5 1.1875 11.1562 0.5 12 0.5C12.8125 0.5 13.5 1.1875 13.5 2C13.5 2.84375 12.8125 3.5 12 3.5C11.1562 3.5 10.5 2.84375 10.5 2ZM5.5 2C5.5 1.1875 6.15625 0.5 7 0.5C7.8125 0.5 8.5 1.1875 8.5 2C8.5 2.84375 7.8125 3.5 7 3.5C6.15625 3.5 5.5 2.84375 5.5 2ZM3.5 2C3.5 2.84375 2.8125 3.5 2 3.5C1.15625 3.5 0.5 2.84375 0.5 2C0.5 1.1875 1.15625 0.5 2 0.5C2.8125 0.5 3.5 1.1875 3.5 2Z"})})}),eG&&(0,i.jsxs)("div",{className:`vg-dropdown-menu ${eX}`,children:[(0,i.jsx)("a",{className:"vg-dropdown-item",onClick:e=>{e?.stopPropagation(),eZ(0)},children:"Edit"}),(0,i.jsx)("a",{className:"vg-dropdown-item vg-dropdown-del",onClick:e=>{e?.stopPropagation(),A?eE(!0):eY(0)},children:"Delete"})]})]}),!g&&P&&(0,i.jsx)("div",{className:"vg-delete-dropdown",onClick:()=>e4(0),children:(0,i.jsx)("span",{children:"Delete"})})]})})})]}),V&&"Internal"===e?eo?.map((e,t)=>(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:`vg-upload-drop horizontal uploaded-pics ${g?"vg-pics-disabled":""}`,onMouseLeave:()=>e_(!1),style:{backgroundImage:e3(eo[eo?.length-1]?.name)?"":`url(${e?.slide})`,marginLeft:"8px",width:D,height:F},onClick:t=>{e3(e?.name)&&(eC(!0),eS(e?.preview??""))},children:[e3(e?.name)&&(0,i.jsx)("video",{style:{width:"100%",height:"auto"},children:(0,i.jsx)("source",{src:e.preview,type:`${e.type.toLowerCase()}`})}),!g&&!P&&(0,i.jsxs)("div",{className:"vg-dot-dropdown dropdown",children:[(0,i.jsx)("div",{className:"vg-tk-btn vg-btn-action vg-doticon",onClick:eK,children:(0,i.jsx)("svg",{viewBox:"0 0 14 4",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M10.5 2C10.5 1.1875 11.1562 0.5 12 0.5C12.8125 0.5 13.5 1.1875 13.5 2C13.5 2.84375 12.8125 3.5 12 3.5C11.1562 3.5 10.5 2.84375 10.5 2ZM5.5 2C5.5 1.1875 6.15625 0.5 7 0.5C7.8125 0.5 8.5 1.1875 8.5 2C8.5 2.84375 7.8125 3.5 7 3.5C6.15625 3.5 5.5 2.84375 5.5 2ZM3.5 2C3.5 2.84375 2.8125 3.5 2 3.5C1.15625 3.5 0.5 2.84375 0.5 2C0.5 1.1875 1.15625 0.5 2 0.5C2.8125 0.5 3.5 1.1875 3.5 2Z"})})}),eG&&(0,i.jsxs)("div",{className:`vg-dropdown-menu ${eX}`,children:[(0,i.jsx)("a",{className:"vg-dropdown-item",onClick:e=>{e?.stopPropagation(),eZ(t)},children:"Edit"}),(0,i.jsx)("a",{className:"vg-dropdown-item vg-dropdown-del",onClick:e=>{e?.stopPropagation(),eY(t)},children:"Delete"})]})]}),!g&&P&&(0,i.jsx)("div",{className:"vg-delete-dropdown",onClick:()=>e4(t),children:(0,i.jsx)("span",{children:"Delete"})})]})})):null,"External"===e&&(0,i.jsxs)("div",{className:"vg-upload-photo vg-appdragphoto",onClick:async()=>{ep(e=>({...e,show:!0})),eh(await e2(eo)),ef(!0)},style:{height:eo?.length<L||!V?"":F,width:eo?.length<L||!V?"":D,display:eo?.length?"block":"none",backgroundImage:e3(eo[eo?.length-1]?.name)?"":`url(${eo[eo?.length-1]?.preview})`},children:[e3(eo[eo?.length-1]?.name)&&(0,i.jsx)("div",{className:"upload-icon-box type-video",children:(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:(0,i.jsx)("path",{d:"M336.2 64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h288.2c26.4 0 47.8-21.3 47.8-47.7V111.7c0-26.4-21.4-47.7-47.8-47.7zM528 96c-14.2 0-28.4 4.7-39.6 14.2L416 176v160l72.4 65.8c11.2 9.5 25.4 14.2 39.6 14.2c26.5 0 48-21.5 48-48V144c0-26.5-21.5-48-48-48z"})})}),(0,i.jsx)("div",{className:"vg-appdragphoto-hover",style:eo?.length>1?{backgroundColor:"rgba(0,0,0,0.5)",display:"flex"}:{display:"none"},children:(0,i.jsxs)("div",{className:"vg-numofPhotos",children:[(0,i.jsx)("strong",{children:eo?.length}),(0,i.jsx)("span",{children:"Files"})]})})]})]}),X&&(0,i.jsx)(x,{src:G,onClose:()=>{if(_(null),(!ek||eT)&&el([]),q(!1),V){if(ej>-1)return void ey(-1);let e=[...eo];e.splice(-1),el(e)}},onSave:e5}),(0,i.jsx)(n.default,{ButtonPrimary:"OK",CloseBackTitle:"From Control",CloseButton:!0,Footer:2,FooterButton:"primaryButton",OnClickPrimary:eA,PopupId:"img-uploader-Popup",PopupTitle:J?`${M}`:"Invalid File Type",PopupType:"default",Popupopen:K,PrimaryButtonVariant:"primary",Size:"small",TextDescription:(0,i.jsx)("div",{children:J?`File size limit exceeds ${t}
1 MB`:`Upload a valid ${r?.map(e=>e?.split("/")?.[1]?.toUpperCase()??"").join(", ")} file`}),ThirdButtonVariant:"primary",onClose:eA}),eb&&(0,i.jsx)(n.default,{CloseBackTitle:"From Control",CloseButton:!0,Footer:2,FooterButton:"none",Popupopen:eb,PopupId:"video-popup",Size:"medium",PopupBody:()=>(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("video",{controls:!0,style:{width:"100%",height:"auto"},children:(0,i.jsx)("source",{src:eN})})}),TimerCount:0,VagaroToolkit:1,customClassName:"",onClose:()=>{eS(""),eC(!1)}}),ed?.show&&(0,i.jsx)("div",{className:` ${ed?.show?"full-screen":"vg-group"}`,children:(0,i.jsxs)("div",{className:"vg-image-wrapper",children:[(0,i.jsxs)("div",{className:"vg-video-grid-toolbar",children:[(0,i.jsx)("div",{className:"vg-video-header",children:(0,i.jsxs)("div",{className:"vg-video-filter-button",children:[(0,i.jsx)("div",{className:"vg-video-action",id:"download-button",onClick:()=>((e,t)=>{if(e){let r=document.createElement("a");r.href=e,r.download=t||"demo",document.body.appendChild(r),r.click(),document.body.removeChild(r)}else alert("No video source available to download.")})(eu[em]?.slide,eu[em]?.name),children:(0,i.jsx)(d.default,{name:"download"})}),!g&&(0,i.jsx)("div",{className:"vg-video-action",onClick:()=>{ez(!0);let e=eu?.[em]?.id,t=eo.filter(t=>t.id!==e),r=eu.filter(t=>t.id!==e),i=em;if(0===t.length?(i=0,ep(e=>({...e,show:!1}))):i=em>=t.length?t.length-1:Math.min(em,t.length-1),el(t),eh(r),eg(i),t.length>0){let e=r[i]?.slide||"";ep(t=>({...t,src:e}))}I({target:{files:t,value:""}})},children:(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",fill:"currentcolor",children:(0,i.jsx)("path",{d:"M135.2 17.7L128 32 32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0-7.2-14.3C307.4 6.8 296.3 0 284.2 0L163.8 0c-12.1 0-23.2 6.8-28.6 17.7zM416 128L32 128 53.2 467c1.6 25.3 22.6 45 47.9 45l245.8 0c25.3 0 46.3-19.7 47.9-45L416 128z"})})}),(0,i.jsx)("div",{className:`vg-video-action ${ev?"active":""}`,onClick:()=>{ef(e=>!e)},children:(0,i.jsx)(d.default,{name:"info_circle"})}),!e3(eu?.[em]?.name)&&!g&&f&&(0,i.jsx)("div",{className:"vg-video-action ",onClick:()=>{eB(!0),_(eu?.[em]?.slide),ey(em),setTimeout(()=>{q(!0)},0)},children:(0,i.jsx)(d.default,{name:"edit"})})]})}),(0,i.jsx)("div",{className:"vg-video-action vg-video-ml-auto",children:(0,i.jsx)(c.default,{ButtonIcon:"",ButtonVariant:"close",ButtononClick:()=>{ep(e=>({...e,show:!1})),eg(0)},ButtononHover:()=>{}})})]}),(0,i.jsxs)("div",{className:"vg-image-with-info",children:[(0,i.jsx)("div",{className:`vg-fullscreen-image-container ${eo?.length===1?"single-file":""}`,children:(0,i.jsxs)(p.RC,{controller:{control:ex},centeredSlides:!0,modules:[u.A,h.A,m.A,v],pagination:{clickable:!0,renderBullet:function(e,t){return y.includes(eo[e]?.type)?`<span class="${t} video-bullet"></span>`:`<span class="${t}"></span>`}},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},onSlideChange:e=>{eg(e.activeIndex)},onSwiper:ew,initialSlide:em,children:[eu.map((e,t)=>(0,i.jsx)(p.qr,{children:(0,i.jsx)("div",{className:"swiper-zoom-container",children:y.includes(e.type)?(0,i.jsx)("video",{controls:!0,style:{width:"100%",height:"auto"},id:`swiper-video-${t}`,children:(0,i.jsx)("source",{src:e.preview,type:"video/mp4"})}):(0,i.jsx)("img",{src:e.slide,alt:e.name,onError:()=>void 0})})},t)),(0,i.jsx)("div",{className:"swiper-button-prev custom-nav-button",children:(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",children:(0,i.jsx)("path",{d:"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"})})}),(0,i.jsx)("div",{className:"swiper-button-next custom-nav-button",children:(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",children:(0,i.jsx)("path",{d:"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"})})})]})}),ev&&(0,i.jsxs)("div",{className:"vg-image-info",children:[(0,i.jsxs)("div",{className:"vg-image-fileinfro-section",children:[(0,i.jsx)("div",{className:"fileinfor-heading",children:"File Name"}
1),(0,i.jsx)("div",{className:"fileinfo-details",children:eu?.[em]?.name})]}),(0,i.jsxs)("div",{className:"vg-image-fileinfro-section",children:[(0,i.jsx)("div",{className:"fileinfor-heading",children:"File Type"}),(0,i.jsx)("div",{className:"fileinfo-details",children:eu?.[em]?.fileType?.toUpperCase()??"-"})]}),(0,i.jsxs)("div",{className:"vg-image-fileinfro-section",children:[(0,i.jsx)("div",{className:"fileinfor-heading",children:"File Dimensions"}),(0,i.jsx)("div",{className:"fileinfo-details",children:`${eu?.[em]?.width&&eu?.[em]?.height?`${eu?.[em]?.width} X ${eu?.[em].height??""}`:"-"} `})]}),(0,i.jsxs)("div",{className:"vg-image-fileinfro-section",children:[(0,i.jsx)("div",{className:"fileinfor-heading",children:"File Size"}),(0,i.jsx)("div",{className:"fileinfo-details",children:function(e,t=2){if(0===e)return"0 Bytes";let r=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,r)).toFixed(t))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]}`}(eu?.[em]?.file?.size)})]})]})]})]})}),eI&&(0,i.jsx)(n.default,{ButtonPrimary:"Delete",ButtonSecondary:"Cancel",CloseBackTitle:"From Control",CloseButton:!0,Footer:2,FooterButton:"both",OnClickPrimary:()=>eY(eM),OnClickSecondary:()=>{eL(!1),e$(-1)},PopupId:"DeletePopup",PopupTitle:U?.PopupTitle??"Delete Profile Picture",Popupopen:!0,PrimaryButtonVariant:"primary",SecondaryButtonVariant:"secondary",Size:"small",TextDescription:U?.TextDescription??"Your photo will be permanently removed from the database. Are you sure you want to remove photo?",TimerCount:0,VagaroToolkit:1,customClassName:"",onClose:()=>{eL(!1),e$(-1)}}),eP&&(0,i.jsx)(w.default,{CancelText:"No",ConfirmText:"Yes",Description:"Are you sure you want to delete this image ?",Icon:"warning",OnCancel:()=>eE(!1),OnClose:()=>eE(!1),OnConfirm:()=>{eY(0)},Title:"Alert"})]})})}}]);
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.