PageSourceSearch

https://111cuts.com/static/js/async/4028.abfc7315fd.js

js 111cuts.com collected 2026-09-24 12:47:48 UTC 40,965 bytes, 20 lines download raw bytes

1"use strict";(self.rspackChunkvagaro_websitebuilder_consumer=self.rspackChunkvagaro_websitebuilder_consumer||[]).push([[4028],{62456(){},59090(e,t,r){r.r(t),r.d(t,{default:()=>a});var o=r(74848),l=r(96540),i=r(31123),n=r(65195),s=r(5338);let a=({Icon:e="none",Title:t="Alert",Description:r="",ConfirmText:a="",CancelText:c="",OnConfirm:d,OnCancel:u,OnClose:p,ShowFooter:m=!0,Duration:h=0,CloseButton:g=!0,Varient:f="default",DisableHeightAuto:v=!1})=>{let x=(0,l.useRef)(null),w=(0,l.useRef)(null),b=(0,l.useRef)(null),y=(0,l.useRef)(d),j=(0,l.useRef)(u),C=(0,l.useRef)(p);(0,l.useEffect)(()=>{y.current=d,j.current=u,C.current=p},[d,u,p]);let N="information"===f?`<div class="bg-bkg_neutral_default py-4 px-5">
2        ${"success"===e?'<div id="vg-alert-icon-placeholder" class="vg-alert-icon-placeholder mb-1"></div>':""}
3        <h2 class="text-[20px] leading-7 font-semibold m-0 text-text_neutral_default mb-1">${t}</h2>
4        <div class="text-[16px] leading-5 font-normal text-text_neutral_secondary m-0 mb-5">${r}</div>
5        <div id="vg-alert-confirm-btn" class="flex flex-wrap justify-end gap-4"></div>
6    </div>`:void 0;return(0,l.useEffect)(()=>{let l={warning:"warning",success:"success",delete:"error",none:void 0};return w.current&&clearTimeout(w.current),i.close(),w.current=setTimeout(()=>{i.fire({icon:"information"===f?void 0:l[e],html:N||`
7          <div class="bg-bkg_components_button_neutral_default p-0 overflow-hidden">
8            <div class="text-left text-[18px] font-medium leading-[24px] text-text_neutral_default px-5 pb-[0px] pt-3">
9              ${t}
10            </div>
11            <div id="vg-alert-icon-placeholder" class="vg-alert-icon-placeholder"></div>
12            <div class="text-left text-[15px] font-normal leading-[20px] text-text-secondary m-0 p-[20px] pt-[16px]">
13              ${r}
14            </div>
15            ${m?'<div id="vg-alert-button-container" class="bg-bkg_neutral_secondary border-t border-border-default px-5 py-4 flex flex-wrap justify-end gap-4"></div>':""}
16          </div>
17        `,showCloseButton:g,showConfirmButton:!1,showCancelButton:!1,allowOutsideClick:!1,customClass:{popup:`p-0 w-[415px] max-w-[95%] rounded-md bg-bkg_components_button_neutral_default ${"information"===f?"w-[500px]":""}`,htmlContainer:"p-0 rounded-md",closeButton:"vg-custom-close-button"},didOpen:()=>{let t=document.getElementById("vg-alert-icon-placeholder");if("information"===f&&t)(0,s.createRoot)(t).render((0,o.jsx)("i",{className:"fa-solid fa-circle-check text-[44px] text-text_green_default"}));else{let r=document.querySelector(".swal2-icon");r&&t&&"none"!==e?t.appendChild(r):t?.remove()}let r=document.querySelector(".vg-custom-close-button");if(r&&(r.innerHTML=`
18              <svg viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
19                <path d="M12.3945 11.4805C12.7754 11.832 12.7754 12.4473 12.3945 12.7988C12.2188 12.9746 11.9844 13.0625 11.75 13.0625C11.4863 13.0625 11.252 12.9746 11.0762 12.7988L8 9.72266L4.89453 12.7988C4.71875 12.9746 4.48438 13.0625 4.25 13.0625C3.98633 13.0625 3.75195 12.9746 3.57617 12.7988C3.19531 12.4473 3.19531 11.832 3.57617 11.4805L6.65234 8.375L3.57617 5.29883C3.19531 4.94727 3.19531 4.33203 3.57617 3.98047C3.92773 3.59961 4.54297 3.59961 4.89453 3.98047L8 7.05664L11.0762 3.98047C11.4277 3.59961 12.043 3.59961 12.3945 3.98047C12.7754 4.33203 12.7754 4.94727 12.3945 5.29883L9.31836 8.4043L12.3945 11.4805Z"/>
20              </svg>`,r.addEventListener("click",()=>{i.close(),C.current?.("close")})),"information"===f){let e=document.getElementById("vg-alert-confirm-btn");e&&(0,s.createRoot)(e).render((0,o.jsx)(n.default,{ButtonVariant:"primary",ButtononClick:()=>{i.close(),y.current?.(),C.current?.("confirm")},children:a||"Cancel"}))}let l=document.getElementById("vg-alert-button-container");l&&(m?(x.current||(x.current=(0,s.createRoot)(l)),x.current.render((0,o.jsxs)(o.Fragment,{children:[c&&(0,o.jsx)(n.default,{ButtonVariant:"secondary",ButtononClick:()=>{i.close(),j.current?.(),C.current?.("cancel")},children:c}),a&&(0,o.jsx)(n.default,{ButtonVariant:"primary",ButtononClick:()=>{i.close(),y.current?.(),C.current?.("confirm")},children:a})]}))):l.style.display="none"),h>0&&(b.current=setTimeout(()=>{i.close(),C.current?.("close")},h))},willClose:()=>{x.current?.unmount(),x.current=null},heightAuto:!v})},500),()=>{w.current&&clearTimeout(w.current),b.current&&clearTimeout(b.current),i.isVisible()&&i.close()}},[e,t,r,a,c,h,m]),null}},57143(e,t,r){r.r(t),r.d(t,{default:()=>I});var o=r(74848),l=r(96540);r(62456),r(39020),r(55260);
20var i=r(27598),n=r(84955),s=r(86172),a=r(35478),c=r(65195),d=r(27142),u=r(83967),p=r(67871),m=r(64367),h=r(87144),g=r(57106);function f(e){let{swiper:t,extendParams:r,on:o}=e;function l(e,t){let r,o,l,i,n;return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(r=(o=((e,t)=>{for(i=-1,l=e.length;l-i>1;)e[n=l+i>>1]<=t?i=n:l=n;return l})(this.x,e))-1,(e-this.x[r])*(this.y[o]-this.y[r])/(this.x[o]-this.x[r])+this.y[r]):0},this}function i(){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},o("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`,o=l=>{t.controller.control.push(l.detail[0]),t.update(),e.removeEventListener(r,o)};e.addEventListener(r,o)}}):t.controller.control=t.params.controller.control}),o("update",()=>{i()}),o("resize",()=>{i()}),o("observerUpdate",()=>{i()}),o("setTranslate",(e,r,o)=>{t.controller.control&&!t.controller.control.destroyed&&t.controller.setTranslate(r,o)}),o("setTransition",(e,r,o)=>{t.controller.control&&!t.controller.control.destroyed&&t.controller.setTransition(r,o)}),Object.assign(t.controller,{setTranslate:function(e,r){let o,i,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 l(t.slidesGrid,e.slidesGrid):new l(t.snapGrid,e.snapGrid),i=-t.controller.spline.interpolate(-r));i&&"container"!==t.params.controller.by||((Number.isNaN(o=(e.maxTranslate()-e.minTranslate())/(t.maxTranslate()-t.minTranslate()))||!Number.isFinite(o))&&(o=1),i=(r-t.minTranslate())*o+e.minTranslate()),t.params.controller.inverse&&(i=e.maxTranslate()-i),e.updateProgress(i),e.setTranslate(i,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 o,l=t.constructor,i=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,()=>{i&&r.transitionEnd()})))}if(Array.isArray(i))for(o=0;o<i.length;o+=1)i[o]!==r&&i[o]instanceof l&&n(i[o]);else i instanceof l&&r!==i&&n(i)}})}function v({inBounds:e,canvasDom:t,onUpdateCropBounds:r}){let[i,n]=(0,l.useState)({x:0,y:0,width:0,height:0}),[s,a]=(0,l.useState)({...e}),c=(0,l.useRef)({...e}),d=(0,l.useRef)({left:!1,right:!1,top:!1,bottom:!1}),u=(0,l.useRef)(!1),p=(0,l.useRef)({x:0,y:0}),m=(0,l.useRef)({left:15,top:15,right:75,bottom:75}),[h,g]=(0,l.useState)("normal"),f={background:"rgba(0,0,0,0.5)"},x=e=>{d.current=e,u.current=!0},w=()=>{d.current={left:!1,right:!1,top:!1,bottom:!1},u.current=!1};function b(e){y(new MouseEvent("mousemove",{clientX:e.touches[0].clientX,clientY:e.touches[0].clientY})),e.preventDefault()}let y=(0,l.useCallback)(e=>{if(!u.current)return;let o=e.clientX,l=e.clientY,i=t.getBoundingClientRect(),n={...c.current},s=d.current;if(s.left&&s.right&&s.top&&s.bottom){let e=o-p.current.x,t=l-p.current.y;n.left=m.current.left+e/i.width*100,n.top=m.current.top+t/i.height*100,n.right=m.current.right+e/i.width*100,n.bottom=m.current.bottom+t/i.height*100,n.left<0&&(n.left=0,n.right=n.left+(m.current.right-m.current.left)),n.top<0&&(n.top=0,n.bottom=n.top+(m.current.bottom-m.current.top)),n.right>100&&(n.right=100,n.left=n.right-(m.current.right-m.current.left)),n.bottom>100&&(n.bottom=100,n.top=n.bottom-(m.current.bottom-m.current.top)),c.current=n,a(n),r(n);return}d.current.left&&(n.left=(o-i.x)/i.width*100,n.left>n.right-5&&(n.left=n.right-5)),d.current.top&&(n.top=(l-i.y)/i.height*100,n.top>
20n.bottom-5&&(n.top=n.bottom-5)),d.current.right&&(n.right=(o-i.x)/i.width*100,n.right<n.left+5&&(n.right=n.left+5)),d.current.bottom&&(n.bottom=(l-i.y)/i.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)},[u,d,s,t]);(0,l.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",b,{passive:!1}),r();let o=new ResizeObserver(r);return o.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",b),o.disconnect()}},[t]);let j=e=>{if(u.current)return;let r=e.clientX,o=e.clientY,l=t.getBoundingClientRect(),i=l.left+s.left*l.width/100,n=l.top+s.top*l.height/100,a=l.left+s.right*l.width/100,c=l.top+s.bottom*l.height/100;i+=10,n+=10,c-=10,r>(a-=10)?o>c?(g("se-resize"),d.current={left:!1,right:!0,top:!1,bottom:!0}):o<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<i?o>c?(g("sw-resize"),d.current={left:!0,right:!1,top:!1,bottom:!0}):o<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}):o>c?(g("ns-resize"),d.current={left:!1,right:!1,top:!1,bottom:!0}):o<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},p.current={x:r,y:o},m.current={...s})},C={position:"absolute",height:"10px",width:"10px",borderRadius:"50%",background:"white",border:"1px solid green"};return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{className:"outline-container-wrapper",style:{position:"fixed",top:i.y-24+"px",left:i.x-24+"px",width:i.width+48+"px",height:i.height+48+"px",cursor:h},onMouseMove:j,onPointerDown:j,children:(0,o.jsxs)("div",{className:"outline-container",style:{position:"fixed",top:i.y+"px",left:i.x+"px",width:i.width+"px",height:i.height+"px"},children:[s.left>0&&(0,o.jsx)("div",{className:"left-dark",style:{...f,position:"absolute",left:0,top:0,height:"100%",width:s.left+"%"}}),s.right<100&&(0,o.jsx)("div",{className:"right-dark",style:{...f,position:"absolute",right:0,top:0,height:"100%",width:100-s.right+.01+"%"}}),s.top>0&&(0,o.jsx)("div",{className:"top-dark",style:{...f,position:"absolute",left:s.left+"%",top:0,width:s.right-s.left+"%",height:s.top+"%"}}),s.bottom<100&&(0,o.jsx)("div",{className:"bottom-dark",style:{...f,position:"absolute",left:s.left+"%",bottom:0,width:s.right-s.left+"%",height:100-s.bottom+"%"}}),(0,o.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,o.jsx)("div",{className:"outline-dot top-left",style:{...C,left:"-5px",top:"-5px"}}),(0,o.jsx)("div",{className:"outline-dot top-right",style:{...C,right:"-5px",top:"-5px"}}),(0,o.jsx)("div",{className:"outline-dot bottom-left",style:{...C,left:"-5px",bottom:"-5px"}}),(0,o.jsx)("div",{className:"outline-dot bottom-right",style:{...C,right:"-5px",bottom:"-5px"}}),(0,o.jsx)("div",{className:"outline-dot left",style:{...C,left:"-5px",top:"calc(50% - 5px)"}}),(0,o.jsx)("div",{className:"outline-dot right",style:{...C,right:"-5px",top:"calc(50% - 5px)"}}),(0,o.jsx)("div",{className:"outline-dot top",style:{...C,left:"calc(50% - 5px)",top:"-5px"}}),(0,o.jsx)("div",{className:"outline-dot bottom",style:{...C,left:"calc(50% - 5px)",bottom:"-5px"}})]})]})})})}function x({src:e,onSave:t,onClose:r,forceMaxSize:i}){let n=i||1600,s=(0,l.useRef)(null),a=(0,l.useRef)(null),[d,u]=(0,l.useState)(0),[p,m]=(0,l.useState)(0),h=(0,l.useRef)({left:0,top:0,right:100,bottom:100}),g=(0,l.useRef)(0),[f,w]=(0,l.useState)(0),[b,y]=(0,l.useState)(!1),[j,C]=(0,l.useState)(!1),N=(0,l.useRef)(null),[S,k]=(0,l.useState)({x:1,y:1}),[B,T]=(0,l.useState)(!1),L=()=>{let t=new Image;N.current=t,t.src=e,t.onload=()=>{let e=t.width,r=t.height;u(e),m(r);let o=a.current;o&&(o.width=e,o.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 o=a.current;if(!o)return;let l=g.current%2==1;o.width=l?r:e,o.height=l?e:r,u(o.width),m(o.height);let i=o.getContext("2d");i&&(i.setTransform(1,0,0,1,0,0),i.translate(o.width/2,o.height/2),i.rotate(Math.PI/2*g.current),i.scale(S.x,S.y),i.drawImage(t,-e/2,-r/2,e,r))}},z=(e=1)=>{g.current+=e,I()};return(0,l.useEffect)(()=>{b&&I()},[S,b,f,I]),(0,l.useEffect)(()=>{b||(L(),g.current=0,y(!0))},[e,b,L]),(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{className:"block-edit simple-image-editor-container vanimation-fade-in no-delay",children:(0,o.jsxs)("div",{className:"simple-image-editor no-delay",children:[(0,o.jsxs)("div",{className:"editor-header-row",children:[(0,o.jsx)("div",{className:"editor-header-title",children:(0,o.jsx)("h4",{children:"Upload Image"})}),(0,o.jsx)("button",{className:"close-button",onClick:r,children:"×"})]}),(0,o.jsxs)("div",{className:"canvas-row",ref:s,children:[!j&&(0,o.jsx)("p",{style:{color:"#fff"},children:"Loading..."}),B?(0,o.jsx)("p",{style:{color:"#fff"},children:"Saving Changes..."}):(0,o.jsx)("canvas",{width:d,height:p,ref:a})]}),a.current&&!B&&(0,o.jsx)(v,{inBounds:h.current,canvasDom:a.current,onUpdateCropBounds:e=>{h.current=e}}),(0,o.jsxs)("div",{className:"toolbar-row",children:[(0,o.jsxs)("div",{className:"mobileRow",children:[(0,o.jsx)("div",{className:"toolbar-row-left t-row",children:(0,o.jsx)("button",{style:S.x>0?{opacity:.5}:{},className:"invisible-button",onClick:()=>k({x:-1*S.x,y:S.y}),children:(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1.4em",fill:"
20currentColor",viewBox:"0 0 512 512",children:(0,o.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,o.jsxs)("div",{className:"toolbar-row-center t-row rotationWrap",children:[(0,o.jsx)("button",{className:"rotate-button invisible-button",onClick:()=>z(-1),children:(0,o.jsx)("svg",{fill:"currentColor",height:"1em",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,o.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,o.jsxs)("div",{style:{width:"60px",textAlign:"center",marginLeft:".2em"},children:[" ",f,"°"]}),(0,o.jsx)("button",{className:"rotate-button invisible-button right",onClick:()=>z(1),children:(0,o.jsx)("svg",{fill:"currentColor",height:"1em",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,o.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,o.jsxs)("div",{className:"toolbar-save-close-row t-row",children:[(0,o.jsx)(c.default,{ButtonVariant:"secondary",ButtononClick:r,children:"Cancel"}),(0,o.jsx)(c.default,{ButtonVariant:"primary",ButtononClick:()=>{T(!0);let e=a.current;if(!e)return;let r=(h.current.right-h.current.left)/100*d,o=(h.current.bottom-h.current.top)/100*p,l=h.current.left/100*d,i=h.current.top/100*p,s=e.toDataURL(),c=new Image;c.src=s,c.onload=()=>{c.width,c.height;let s=1;(r>n||o>n)&&(s=n/Math.max(r,o),c.width,c.height),e.width=r*s,e.height=o*s,e.getContext("2d")?.drawImage(c,l,i,r,o,0,0,r*s,o*s);let a=e.toDataURL(),d=a.split(",")[1],u=new Blob([a],{type:"image/png"});t(a,d,c.width,c.height,u),T(!1)}},children:"Save"})]})]})]})})})}var w=r(59090);let b=["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}`),j=["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=[...b,...y,...j,...C,...N,...S,...k],L=y.reduce((e,t)=>{let r=t?.split("/")?.[1];return{...e,[r]:`${t}`}},{}),I=(0,l.forwardRef)(({ImagePosition:e="External",MaxFileSize:t=4,SupportedFileFormate:r=["image/jpeg","image/png","image/heic","image/jpg"],Disabled:g=!1,Editor:v=!0,ImageUploaderId:b="",Name:j="",StoreOnAzureContainer:C=!1,GetContainerNameAPIUrl:N="",GetContainerNameAPIPayload:S={},DriveContainerName:k="",OnChange:I,FileCount:z,ImageDelete:E=!1,ImageUrl:P,MaxFilePopupText:$="",AllowMultipleUpload:M=!1,Width:D="",Height:R="",DeleteConfirmationPopup:F=!1,PlaceholderText:A="",OnDelete:O,popupConfig:_},U)=>{let H=z>1,[V,Z]=(0,l.useState)(""),[Y,q]=(0,l.useState)(null),[G,X]=(0,l.useState)(!1),[K,W]=(0,l.useState)(!1),[J,Q]=(0,l.useState)(!1),[ee,et]=(0,l.useState)(!1),[er,eo]=(0,l.useState)(!1),[el,ei]=(0,l.useState)([]),[en,es]=(0,l.useState)([]),[ea,ec]=(0,l.useState)(!1),[ed,eu]=(0,l.useState)({show:!1,src:""}),[ep,em]=(0,l.useState)([]),[eh,eg]=(0,l.useState)(0),[ef,ev]=(0,l.useState)(!1),[ex,ew]=(0,l.useState)(null),[eb,ey]=(0,l.useState)(-1),[ej,eC]=(0,l.useState)(!1),[eN,eS]=(0,l.useState)(""),[ek,eB]=(0,l.useState)(!1),[eT,eL]=(0,l.useState)(!1),[eI,ez]=(0,l.useState)(!1),[eE,eP]=(0,l.useState)(!1),[e$,eM]=(0,l.useState)(-1),eD=(0,l.useRef)(null),eR=(0,l.useRef)(null),eF=()=>{q(null),W(!1),Q(!1),X(!1)},eA=e=>e.slice((e.lastIndexOf(".")-1>>>0)+2).toLowerCase(),eO=e=>new Promise((t,r)=>{let o=new FileReader;o.readAsDataURL(e),o.onload=()=>t(o.result),o.onerror=e=>r(e)});(0,l.useImperativeHandle)(U,()=>({validate:()=>({[b]:V,IsValidate:!0,IsRequired:!0,images:el,id:b,uploadImages:async()=>
20{if(C)for(let e of el)await e0(e.file,e.name),ei([])}})}));let e_=async e=>{try{let t=await i({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")}},eU=async(e,o)=>{if(o&&"string"==typeof o)try{if(!/^https?:\/\/.+\.(jpg|jpeg|png|heic|gif|webp|bmp|svg)$/i.test(o)||!await new Promise(e=>{let t=new Image;t.src=o,t.onload=()=>e(!0),t.onerror=()=>e(!1)}))return void W(!0);Z(o);let e={file:new File([],o),id:o,name:o.split("/").pop()||"image",size:0,description:"",type:"url",preview:o,slide:o};if(ei(t=>H?[...t,e]:[e]),!v){let t={target:{files:H?[...el,e]:[e],value:o}};I(t)}return}catch(e){W(!0);return}if(!e)return;let l=eA(e.name).toLowerCase(),i=e.type.toLowerCase(),n={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",heic:"image/heic",gif:"image/gif",...L};if("heic"===l)try{e=await e_(e),l="jpg",i="image/jpeg"}catch(e){W(!0);return}let s=Object.keys(n).includes(l),a=r.includes(i);if(!s||!a)return void W(!0);if(e.size/1048576>t){W(!0),Q(!0);return}try{let t=await eO(e);v?(L?.[l]?Z(t):(X(!0),q(t)),X(!0),q(t)):Z(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(eb>-1&&H){let e=[...el];e[eb]=r,ei(e),ey(-1);return}if(ei(e=>H?[...e,r]:[r]),!v){let e={target:{files:H?[...el,r]:[r],value:t}};I(e)}}catch(e){ei([])}};(0,l.useEffect)(()=>{if(!P)return;let t=Array.isArray(P)?P:[P];ei(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&&Z(t[t.length-1])},[P]);let eH=async e=>{let t=e.target.files?.[0];t&&eU(t),eD.current&&(eD.current.value="")},eV=e=>{eB(!0),et(!1),q(el[e]?.preview??null),ey(e),v?setTimeout(()=>{X(!0)},0):eD.current?.click()},eZ=e=>{let t=el[e],r=el.filter((t,r)=>r!==e);Z(""),q(null),ei(r);let o={target:{files:r,value:""},deletedFile:t};E&&ez(!1),I(o),O&&O(o.deletedFile)};(0,l.useEffect)(()=>{let e=e=>{let t=e.target;ee&&t instanceof Node&&eR.current&&!eR.current.contains(t)&&!t.closest(".vg-doticon")&&et(!1)};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}},[ee]);let[eY,eq]=(0,l.useState)(!1),[eG,eX]=(0,l.useState)("left"),eK=e=>{e?.stopPropagation();let t=e.currentTarget.getBoundingClientRect().left,r="left";t<142&&(r="right"),eX(r),eq(!0)},eW=async(e,t)=>{if(e)return{};try{let{SASString:e,AzureStorageAccountName:r,containerName:o}=(await s.A.post(N,{DriveContainerName:k,...t})).data;return{SASString:e,AzureStorageAccountName:r,containerName:o}}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(),o=await eJ(e),l=Object.keys(localStorage).filter(e=>e.startsWith(t));for(let e of l)if(JSON.parse(localStorage.getItem(e)??"").fileHash===o)return e;let i=Math.max(...l.map(e=>{let t=e.match(/_v(\d+)$/);return t?parseInt(t[1],10):0}),0)+1;return`${t}_v${i}.${r}`}let e0=async(e,t)=>{ec(!0);let r={retryOptions:{maxTries:4,retryDelayInMs:3e3,maxRetryDelayInMs:12e4,retryPolicyType:a.uD.EXPONENTIAL}},o=(0,a.vC)(new a.tv,r),l=await eW(N,S);if(!l&&!Object.keys(l||{}).length)throw Error("Could not get the SASString");let{SASString:i,AzureStorageAccountName:n,containerName:s}=l,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",o).getContainerClient("blobcontainer").getBlockBlobClient(t),d=await eJ(e),u=Math.ceil(e.size/4194304),p=await eQ(e),m=[],h=localStorage.getItem(p);if(h)try{let e=JSON.parse(h);e.fileHash===d&&(m=e.uploadedChunks)}catch(e){localStorage.removeItem(p)}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(p)}catch(e){throw e}}else{for(let t=0;t<u;t++){if(m?.map(e=>e.count).includes(t))continue;let r=4194304*t,o=Math.min(r+4194304,e.size),l=e.slice(r,o),i=`${String(t).padStart(5,"0")}${g}`;i.length>64&&(i=i.substring(0,64));try{await c.stageBlock(btoa(i),l,l.size),m.push({count:t,blockId:btoa(i)}),localStorage.setItem(p,JSON.stringify({uploadedChunks:m,fileHash:d}))}catch(e){throw e}}let t=m.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(p),Error("Error committing block list: "+e)}}localStorage.removeItem(p),ec(!1)},e1=async e=>{if(!e.target.files)return;let r=Array.from(e.target.files),o=(await Promise.all(r.map(async e=>{try{let r,o=e;"image/heic"===e.type||/\.heic$/i.test(e.name)?(o=await e_(e),r=URL.createObjectURL(o)):(e.type.startsWith("image/")||/\.(jpe?g|png|gif|dng)$/i.test(e.name))&&(r=URL.createObjectURL(e));let l=await eO(o);if(o.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();
20return T.some(e=>r.includes(e.toLowerCase()))})(o))return W(!0),null;return{file:o,id:URL.createObjectURL(o),name:o.name,size:o.size,description:"",type:o.type,preview:r,slide:l}}catch(e){return null}}))).filter(e=>null!==e);ei(e=>[...e,...o]);let l=Array.from(e.target.files).filter(e=>e.size<=0x6400000);es(e=>[...e,...l.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:eA(r?.name)??"",slide:r?.slide});else{let e=await eO(r.file);t.push({...r,fileDescription:r?.name,fileName:r?.type,fileType:eA(r?.name)??"",slide:e,size:150})}return t},e5=async(e,t,r,o,l)=>{-1===eb&&(Z(e),eu(t=>({...t,src:e})));try{X(!1);let t=[...el],r=t[eb>-1?eb:el?.length-1],{width:o,height:l}=await new Promise((t,r)=>{let o=new Image;o.onload=()=>{let{width:e,height:r}=o;t({width:e,height:r})},o.onerror=()=>{Error("Image load error")},o.src=e});if(t[eb>-1?eb:el?.length-1]={...r,slide:e,height:l,width:o,preview:e},eb>-1){let e=await e2(t);em(e)}I({target:{files:t,value:e}}),ei(t),ey(-1)}catch(e){}},e3=e=>Object.keys(L)?.includes(eA(e??""));(0,l.useEffect)(()=>{let e=()=>{ey(-1)};return eD.current?.addEventListener("cancel",e),()=>{eD.current?.removeEventListener("cancel",e)}},[]),(0,l.useEffect)(()=>(ed.show?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[ed.show]);let e4=e=>{ez(!0),eM(e)};return(0,o.jsxs)("div",{className:`vg-upload-group ${!H?`${"Internal"===e?"vg-imageposition-internal":""} ${"Internal"===e&&V?"vg-image-uploader-space":""}`:""}`,children:[(0,o.jsxs)("div",{className:"vg-upload-flex",children:[(0,o.jsxs)("div",{className:`vg-upload-drop horizontal ${er?"drag-file":""} ${g?"vg-image-uploader-disabled":""}`,onDragOver:e=>{e.preventDefault(),e.stopPropagation(),g||eo(!0),g||eo(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),g||eo(!1)},onDrop:e=>{if(e.preventDefault(),g)return;if(eo(!1),H)return void e1({...e,target:{...e.target,files:e?.dataTransfer?.files}});let t=e.dataTransfer.files?.[0];t&&eU(t)},onClick:e=>{e?.stopPropagation(),g&&(e.preventDefault(),e.stopPropagation())},style:{display:el?.length<z||!H?"":"none",width:D,height:R},children:[(0,o.jsx)("input",{"aria-label":"Upload a file",type:"file",ref:eD,disabled:g,id:"fileupload",accept:r.join(", "),onChange:M?e1:eH,className:"vg-input-file",name:j,multiple:M}),"External"===e&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"vg-upload-icon",children:(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",fill:"currentColor",children:(0,o.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,o.jsxs)("div",{className:"vg-upload-decs",children:[(0,o.jsx)("p",{children:A}),(0,o.jsx)("a",{className:"vg-choose-file",onClick:e=>{e.preventDefault(),e.stopPropagation(),g||eD.current?.click()},children:"Choose File"})]})]}),"Internal"===e&&(0,o.jsx)(o.Fragment,{children:!V||H?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"vg-upload-icon",children:(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",fill:"currentColor",children:(0,o.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,o.jsxs)("div",{className:"vg-upload-decs",children:[(0,o.jsx)("p",{children:A}),(0,o.jsx)("a",{className:"vg-choose-file",onClick:e=>{e.preventDefault(),e.stopPropagation(),g||eD.current?.click()},children:"Choose File"})]})]}):(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{className:"vg-upload-drop horizontal uploaded-pics",onMouseLeave:()=>eq(!1),style:{width:D,height:R,backgroundImage:`url(${el[el?.length-1]?.preview})`},children:[!g&&!E&&(0,o.jsxs)("div",{className:"vg-dot-dropdown dropdown",ref:eR,children:[(0,o.jsx)("div",{className:"vg-tk-btn vg-btn-action vg-doticon",onClick:eK,children:(0,o.jsx)("svg",{viewBox:"0 0 14 4",fill:"
20currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,o.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"})})}),eY&&(0,o.jsxs)("div",{className:`vg-dropdown-menu ${eG}`,children:[(0,o.jsx)("a",{className:"vg-dropdown-item",onClick:e=>{e?.stopPropagation(),eV(0)},children:"Edit"}),(0,o.jsx)("a",{className:"vg-dropdown-item vg-dropdown-del",onClick:e=>{e?.stopPropagation(),F?eP(!0):eZ(0)},children:"Delete"})]})]}),!g&&E&&(0,o.jsx)("div",{className:"vg-delete-dropdown",onClick:()=>e4(0),children:(0,o.jsx)("span",{children:"Delete"})})]})})})]}),H&&"Internal"===e?el?.map((e,t)=>(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{className:`vg-upload-drop horizontal uploaded-pics ${g?"vg-pics-disabled":""}`,onMouseLeave:()=>eq(!1),style:{backgroundImage:e3(el[el?.length-1]?.name)?"":`url(${e?.slide})`,marginLeft:"8px",width:D,height:R},onClick:t=>{e3(e?.name)&&(eC(!0),eS(e?.preview??""))},children:[e3(e?.name)&&(0,o.jsx)("video",{style:{width:"100%",height:"auto"},children:(0,o.jsx)("source",{src:e.preview,type:`${e.type.toLowerCase()}`})}),!g&&!E&&(0,o.jsxs)("div",{className:"vg-dot-dropdown dropdown",children:[(0,o.jsx)("div",{className:"vg-tk-btn vg-btn-action vg-doticon",onClick:eK,children:(0,o.jsx)("svg",{viewBox:"0 0 14 4",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,o.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"})})}),eY&&(0,o.jsxs)("div",{className:`vg-dropdown-menu ${eG}`,children:[(0,o.jsx)("a",{className:"vg-dropdown-item",onClick:e=>{e?.stopPropagation(),eV(t)},children:"Edit"}),(0,o.jsx)("a",{className:"vg-dropdown-item vg-dropdown-del",onClick:e=>{e?.stopPropagation(),eZ(t)},children:"Delete"})]})]}),!g&&E&&(0,o.jsx)("div",{className:"vg-delete-dropdown",onClick:()=>e4(t),children:(0,o.jsx)("span",{children:"Delete"})})]})})):null,"External"===e&&(0,o.jsxs)("div",{className:"vg-upload-photo vg-appdragphoto",onClick:async()=>{eu(e=>({...e,show:!0})),em(await e2(el)),ev(!0)},style:{height:el?.length<z||!H?"":R,width:el?.length<z||!H?"":D,display:el?.length?"block":"none",backgroundImage:e3(el[el?.length-1]?.name)?"":`url(${el[el?.length-1]?.preview})`},children:[e3(el[el?.length-1]?.name)&&(0,o.jsx)("div",{className:"upload-icon-box type-video",children:(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:(0,o.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,o.jsx)("div",{className:"vg-appdragphoto-hover",style:el?.length>1?{backgroundColor:"rgba(0,0,0,0.5)",display:"flex"}:{display:"none"},children:(0,o.jsxs)("div",{className:"vg-numofPhotos",children:[(0,o.jsx)("strong",{children:el?.length}),(0,o.jsx)("span",{children:"Files"})]})})]})]}),G&&(0,o.jsx)(x,{src:Y,onClose:()=>{if(q(null),(!ek||eT)&&ei([]),X(!1),H){if(eb>-1)return void ey(-1);let e=[...el];e.splice(-1),ei(e)}},onSave:e5}),(0,o.jsx)(n.default,{ButtonPrimary:"OK",CloseBackTitle:"From Control",CloseButton:!0,Footer:2,FooterButton:"primaryButton",OnClickPrimary:eF,PopupId:"img-uploader-Popup",PopupTitle:J?`${$}`:"Invalid File Type",PopupType:"default",Popupopen:K,PrimaryButtonVariant:"primary",Size:"small",TextDescription:(0,o.jsx)("div",{children:J?`File size limit exceeds ${t}
20 MB`:`Upload a valid ${r?.map(e=>e?.split("/")?.[1]?.toUpperCase()??"").join(", ")} file`}),ThirdButtonVariant:"primary",onClose:eF}),ej&&(0,o.jsx)(n.default,{CloseBackTitle:"From Control",CloseButton:!0,Footer:2,FooterButton:"none",Popupopen:ej,PopupId:"video-popup",Size:"medium",PopupBody:()=>(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("video",{controls:!0,style:{width:"100%",height:"auto"},children:(0,o.jsx)("source",{src:eN})})}),TimerCount:0,VagaroToolkit:1,customClassName:"",onClose:()=>{eS(""),eC(!1)}}),ed?.show&&(0,o.jsx)("div",{className:` ${ed?.show?"full-screen":"vg-group"}`,children:(0,o.jsxs)("div",{className:"vg-image-wrapper",children:[(0,o.jsxs)("div",{className:"vg-video-grid-toolbar",children:[(0,o.jsx)("div",{className:"vg-video-header",children:(0,o.jsxs)("div",{className:"vg-video-filter-button",children:[(0,o.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.")})(ep[eh]?.slide,ep[eh]?.name),children:(0,o.jsx)(d.default,{name:"download"})}),!g&&(0,o.jsx)("div",{className:"vg-video-action",onClick:()=>{eL(!0);let e=ep?.[eh]?.id,t=el.filter(t=>t.id!==e),r=ep.filter(t=>t.id!==e),o=eh;if(0===t.length?(o=0,eu(e=>({...e,show:!1}))):o=eh>=t.length?t.length-1:Math.min(eh,t.length-1),ei(t),em(r),eg(o),t.length>0){let e=r[o]?.slide||"";eu(t=>({...t,src:e}))}I({target:{files:t,value:""}})},children:(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",fill:"currentcolor",children:(0,o.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,o.jsx)("div",{className:`vg-video-action ${ef?"active":""}`,onClick:()=>{ev(e=>!e)},children:(0,o.jsx)(d.default,{name:"info_circle"})}),!e3(ep?.[eh]?.name)&&!g&&v&&(0,o.jsx)("div",{className:"vg-video-action ",onClick:()=>{eB(!0),q(ep?.[eh]?.slide),ey(eh),setTimeout(()=>{X(!0)},0)},children:(0,o.jsx)(d.default,{name:"edit"})})]})}),(0,o.jsx)("div",{className:"vg-video-action vg-video-ml-auto",children:(0,o.jsx)(c.default,{ButtonIcon:"",ButtonVariant:"close",ButtononClick:()=>{eu(e=>({...e,show:!1})),eg(0)},ButtononHover:()=>{}})})]}),(0,o.jsxs)("div",{className:"vg-image-with-info",children:[(0,o.jsx)("div",{className:`vg-fullscreen-image-container ${el?.length===1?"single-file":""}`,children:(0,o.jsxs)(u.RC,{controller:{control:ex},centeredSlides:!0,modules:[p.A,m.A,h.A,f],pagination:{clickable:!0,renderBullet:function(e,t){return y.includes(el[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:eh,children:[ep.map((e,t)=>(0,o.jsx)(u.qr,{children:(0,o.jsx)("div",{className:"swiper-zoom-container",children:y.includes(e.type)?(0,o.jsx)("video",{controls:!0,style:{width:"100%",height:"auto"},id:`swiper-video-${t}`,children:(0,o.jsx)("source",{src:e.preview,type:"video/mp4"})}):(0,o.jsx)("img",{src:e.slide,alt:e.name,onError:()=>void 0})})},t)),(0,o.jsx)("div",{className:"swiper-button-prev custom-nav-button",children:(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",children:(0,o.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,o.jsx)("div",{className:"swiper-button-next custom-nav-button",children:(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",children:(0,o.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"})})})]})}),ef&&(0,o.jsxs)("div",{className:"vg-image-info",children:[(0,o.jsxs)("div",{className:"vg-image-fileinfro-section",children:[(0,o.jsx)("div",{className:"fileinfor-heading",children:"File Name"}
20),(0,o.jsx)("div",{className:"fileinfo-details",children:ep?.[eh]?.name})]}),(0,o.jsxs)("div",{className:"vg-image-fileinfro-section",children:[(0,o.jsx)("div",{className:"fileinfor-heading",children:"File Type"}),(0,o.jsx)("div",{className:"fileinfo-details",children:ep?.[eh]?.fileType?.toUpperCase()??"-"})]}),(0,o.jsxs)("div",{className:"vg-image-fileinfro-section",children:[(0,o.jsx)("div",{className:"fileinfor-heading",children:"File Dimensions"}),(0,o.jsx)("div",{className:"fileinfo-details",children:`${ep?.[eh]?.width&&ep?.[eh]?.height?`${ep?.[eh]?.width} X ${ep?.[eh].height??""}`:"-"} `})]}),(0,o.jsxs)("div",{className:"vg-image-fileinfro-section",children:[(0,o.jsx)("div",{className:"fileinfor-heading",children:"File Size"}),(0,o.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]}`}(ep?.[eh]?.file?.size)})]})]})]})]})}),eI&&(0,o.jsx)(n.default,{ButtonPrimary:"Delete",ButtonSecondary:"Cancel",CloseBackTitle:"From Control",CloseButton:!0,Footer:2,FooterButton:"both",OnClickPrimary:()=>eZ(e$),OnClickSecondary:()=>{ez(!1),eM(-1)},PopupId:"DeletePopup",PopupTitle:_?.PopupTitle??"Delete Profile Picture",Popupopen:!0,PrimaryButtonVariant:"primary",SecondaryButtonVariant:"secondary",Size:"small",TextDescription:_?.TextDescription??"Your photo will be permanently removed from the database. Are you sure you want to remove photo?",TimerCount:0,VagaroToolkit:1,customClassName:"",onClose:()=>{ez(!1),eM(-1)}}),eE&&(0,o.jsx)(w.default,{CancelText:"No",ConfirmText:"Yes",Description:"Are you sure you want to delete this image ?",Icon:"warning",OnCancel:()=>eP(!1),OnClose:()=>eP(!1),OnConfirm:()=>{eZ(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.