{"version":3,"file":"FileUploader.mkkit5ce.mjs","names":["useState","useRef","error","files","ls","p","uuidv4"],"sources":["https:/framerusercontent.com/modules/ePKL3xcdOCHWSoLlsfeh/ouaa8vBnc2OewLsU7sHQ/FileUploader.js"],"sourcesContent":["function _define_property(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,useRef}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^0.3.0\";import ls from\"local-storage\";import{v4 as uuidv4}from\"uuid\";import{addPropertyControls,ControlType}from\"framer\";const useStore=createStore();const TRACKING_URL=\"https://cluster.mage.ai/mageai-3345-dev/api/pipeline_schedules/1/pipeline_runs/07af532756ce4ff3bd1a31b96805a400\";class SessionTracker{getSessionUUID(){if(typeof window===\"undefined\"||!window.localStorage){// throw new Error(\"localStorage is not available\")\nconsole.log(\"localStorage is not available, but it's okay because it's available when the page is live\");}// @ts-ignore\nconst uuid=ls.get(this.STORAGE_KEY)??uuidv4();// @ts-ignore\nls.set(this.STORAGE_KEY,uuid);return uuid;}constructor(){_define_property(this,\"STORAGE_KEY\",\"__planeswalker_power_level\");}}export const sessionTracker=new SessionTracker;function dig(obj,path){if(!obj)return undefined;const keys=path.toString().split(\".\");let result=obj;for(const key of keys){if(result===undefined||result===null)return undefined;result=result[key];}return result;}function sortByKey(arr,sort,opts={}){const{ascending=true,absoluteValue=false}=opts;if(!arr){return[];}const sortingFunc=typeof sort===\"string\"||typeof sort===\"number\"?val=>absoluteValue?Math.abs(dig(val,sort)):dig(val,sort):val=>absoluteValue?Math.abs(sort(val)):sort(val);return[...arr].sort((a,b)=>{let sortingOrder=0;if(sortingFunc(a)>sortingFunc(b)){sortingOrder=ascending?1:-1;}else if(sortingFunc(a)<sortingFunc(b)){sortingOrder=ascending?-1:1;}return sortingOrder;});}async function track(event,props){const{action,uuid,component,section,shadow,payload:_payload,...rest}=props;const session=sessionTracker.getSessionUUID();const tags={action,uuid,component,section:section??props?.ariaLabel,path:null,url:null,payload:_payload};if(typeof window!==\"undefined\"){const path=typeof window!==\"undefined\"?window.location.pathname:\"\";const url=window.location.href;tags.path=path;tags.url=url;}const payload={event:{action,tags},source:\"marketing\",service:\"framer\",ts:Number(new Date),user:{uuid:session}};// console.log(payload)\nreturn await window.fetch(TRACKING_URL,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify(payload)}).then(data=>{// console.log(\"SUCCESS\", data)\n// timeoutRef.current = setTimeout(() => {\n//     setStore({ modalVisible: false })\n// }, 3000)\n}).catch(error=>{console.error(\"ERROR\",error);throw error;}).finally(()=>{// console.log(\"FINALLY\")\n});}function Grid({children,style}){return /*#__PURE__*/_jsx(\"div\",{style:{display:\"grid\",gridAutoFlow:\"row\",gridTemplateColumns:\"1fr\",justifyContent:\"start\",gridRowGap:24,...style},children:children});}function Headline({children,h=3}){const style={color:\"#202020\",fontFamily:\"Satoshi, sans-serif\",fontSize:\"40px\",fontWeight:400,lineHeight:\"48px\",margin:\"0 0 22px 0\"};if(h===1){return /*#__PURE__*/_jsx(\"h1\",{style:{...style,fontSize:56,lineHeight:\"64px\"},children:children});}return /*#__PURE__*/_jsx(\"h3\",{style:style,children:children});}function Text({children,style}){return /*#__PURE__*/_jsx(\"p\",{style:{color:\"#202020\",fontFamily:\"Satoshi, sans-serif\",fontSize:\"18px\",fontWeight:500,lineHeight:\"32px\",margin:0,...style},children:children});}export default function S3Uploader({objectKey,artifactType,userUUID,folder,onUploadComplete,onUploadStart,internal}){const[files,setFiles]=useState([]);const[uploading,setUploading]=useState(false);const[error,setError]=useState(null);const[fileMetadata,setFileMetadata]=useState([]);const[store,setStore]=useStore();const[imageUrls,setImageUrls]=useState({});const[generateFetched,setGenerateFetched]=useState(false);const[progress,setProgress]=useState({});const uploadedFilesRef=useRef({});useEffect(()=>{if(files.length>0){extractMetadata(files);}else{setFileMetadata([]);}},[files]);const extractMetadata=fileObjs=>{const metadataList=fileObjs.map(fileObj=>{// Basic metadata available directly from the File object\nconst metadata={name:fileObj.name,size:fileObj.size,type:fileObj.type,lastModified:new Date(fileObj.lastModified).toLocaleString()};// Extract file extension\nconst fileExtension=fileObj.name.split(\".\").pop().toLowerCase();metadata.extension=fileExtension;return metadata;});setFileMetadata(metadataList);// For images, we can get additional metadata\nfileObjs.forEach((fileObj,index)=>{if(fileObj.type.startsWith(\"image/\")){const img=new Image;img.onload=()=>{setFileMetadata(prev=>{const newMetadata=[...prev];newMetadata[index]={...newMetadata[index],dimensions:{width:img.width,height:img.height}};return newMetadata;});URL.revokeObjectURL(img.src)// Clean up\n;};img.src=URL.createObjectURL(fileObj);}});};const formatFileSize=bytes=>{if(bytes<1024)return bytes+\" bytes\";else if(bytes<1048576)return(bytes/1024).toFixed(2)+\" KB\";else if(bytes<1073741824)return(bytes/1048576).toFixed(2)+\" MB\";else return(bytes/1073741824).toFixed(2)+\" GB\";};const handleFileChange=async e=>{const selectedFiles=Array.from(e.target.files||[]);let processedFiles=[...selectedFiles];let processingError=null;// Check if there are any zip files that need to be processed\nconst zipFiles=selectedFiles.filter(file=>file.name.toLowerCase().endsWith(\".zip\"));if(zipFiles.length>0){try{// For each zip file, we'll try to process it\nfor(const zipFile of zipFiles){// Remove the zip file from the processed files array\nprocessedFiles=processedFiles.filter(file=>file!==zipFile);try{// Try to extract files from the ZIP\nconst extractedFiles=await extractFilesFromZip(zipFile);console.log(`Extracted ${extractedFiles.length} files from ${zipFile.name}`);// Add the extracted files to our processed files array\nprocessedFiles=[...processedFiles,...extractedFiles];}catch(zipError){console.error(\"Failed to extract zip:\",zipError);// If zip extraction fails, keep the original zip file\nprocessedFiles.push(zipFile);processingError=`Failed to extract zip file: ${zipError.message}`;}}}catch(error){console.error(\"Error in zip processing:\",error);processingError=`Error processing files: ${error instanceof Error?error.message:String(error)}`;}}// Update the state with the processed files\nsetFiles(processedFiles);setError(processingError);};// Very basic ZIP extraction function (limited capability)\nconst extractFilesFromZip=async zipFile=>{const buffer=await readFileAsArrayBuffer(zipFile);const dataView=new DataView(buffer);const extractedFiles=[];// This is a very simplified approach and will only work for the most basic ZIP files\ntry{// Find the central directory\nlet offset=findEndOfCentralDirectory(dataView,buffer.byteLength);if(offset===-1){throw new Error(\"Cannot find central directory\");}// Read the number of entries from the central directory\noffset+=10// Skip to the number of entries\n;const numEntries=dataView.getUint16(offset,true);offset+=2// Move past the number of entries\n;// Skip to the central directory offset\noffset+=4;const centralDirOffset=dataView.getUint32(offset,true);// Process each file in the central directory\nlet fileOffset=centralDirOffset;for(let i=0;i<numEntries;i++){// Check for central directory header signature\nif(dataView.getUint32(fileOffset,true)!==33639248){throw new Error(\"Invalid central directory header\");}// Skip to the file name length\nfileOffset+=28;const fileNameLength=dataView.getUint16(fileOffset,true);fileOffset+=2;// Read extra field length and comment length\nconst extraFieldLength=dataView.getUint16(fileOffset,true);fileOffset+=2;const commentLength=dataView.getUint16(fileOffset,true);fileOffset+=2;// Skip to the local file header offset\nfileOffset+=8;const localHeaderOffset=dataView.getUint32(fileOffset,true);fileOffset+=4;// Read the file name\nconst fileNameBytes=new Uint8Array(buffer,fileOffset,fileNameLength);const fileName=new TextDecoder().decode(fileNameBytes);fileOffset+=fileNameLength;// Skip extra field and comment\nfileOffset+=extraFieldLength+commentLength;// Create a placeholder file (in a real implementation, we'd extract the actual data)\nextractedFiles.push(new File([new Blob([\"Extracted file content would go here\"])],fileName,{type:\"application/octet-stream\"}));}return extractedFiles;}catch(error){console.error(\"ZIP parsing error:\",error);throw new Error(\"Failed to parse ZIP format: \"+error.message);}};// Helper to find the end of central directory\nconst findEndOfCentralDirectory=(dataView,fileLength)=>{// The end of central directory record is at the end of the file\n// We'll search for the signature backwards from the end\nconst signature=101010256// End of central directory signature\n;const maxCommentLength=65535// Maximum length of the ZIP comment\n;const searchSize=Math.min(maxCommentLength+22,fileLength);const startIndex=fileLength-searchSize;for(let i=fileLength-22;i>=startIndex;i--){if(dataView.getUint32(i,true)===signature){return i;}}return-1// Not found\n;};// Helper function to read a file as an array buffer\nconst readFileAsArrayBuffer=file=>{return new Promise((resolve,reject)=>{const reader=new FileReader;reader.onload=event=>resolve(event.target.result);reader.onerror=error=>reject(error);reader.readAsArrayBuffer(file);});};const uploadFileToS3=async files=>{try{uploadedFilesRef.current={};setUploading(true);setProgress(files?.reduce((acc,f)=>({...acc,[f.name]:0}),{}));setError(null);setImageUrls({});const uploadPayload={object_key:objectKey,artifact_type:artifactType,user_uuid:userUUID??sessionTracker.getSessionUUID(),folder};// Create an array of promises for concurrent uploads\nconst uploadPromises=files.map(async(file,index)=>{return window.fetch(\"https://cluster.mage.ai/mageai-3345-dev/api/runs\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\",Authorization:\"Bearer 1a5576c748ee4044b7536940b0a4dc25\"},body:JSON.stringify({run:{record:false,variables:{...uploadPayload,content_type:file.type,artifact_uuid:file.name},pipeline_uuid:\"upload\",block_uuid:\"upload_handshake\"}})}).then(async response=>{const resp=await response.json();const{url,content_type}=resp?.run?.output?.[0]??{};if(internal){setStore({upload:{content_type,url}});const iurl=url?.split?.(\"?\")?.[0];const arr=ls.get(\"booking_image_urls\")??[];arr.push(iurl);ls.set(\"booking_image_urls\",arr);setImageUrls(prev=>({...prev,[file.name]:iurl}));}const xhr=new XMLHttpRequest;xhr.open(\"PUT\",url,true);xhr.setRequestHeader(\"Content-Type\",\"application/octet-stream\");onUploadStart?.(file);xhr.upload.onprogress=progressEvent=>{const percentCompleted=Math.round(progressEvent.loaded*100/progressEvent.total);setProgress(prev=>({...prev,[file.name]:percentCompleted}));};xhr.onload=async()=>{if(xhr.status===200){setProgress(prev=>({...prev,[file.name]:100}));console.log(`Upload successful for file ${index+1}/${files.length}`);await track(null,{action:\"upload\",payload:{content_type,url}});uploadedFilesRef.current[file.name]=url;onUploadComplete?.({[file.name]:url});if(Object.values(uploadedFilesRef.current).length===files?.length){setUploading(false);if(userUUID){return await window.fetch(\"https://cluster.mage.ai/mageai-3345-dev/api/pipeline_schedules/10/pipeline_runs/64b32034e87c4eeb831e21a1af07868f\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({payload:{...uploadPayload,files:uploadedFilesRef.current}})}).then(response=>{setGenerateFetched(true);}).catch(error=>{console.error(\"Form submission error:\",error);throw error;}).finally(()=>{});}}}else{// Capture and log the error response\nconsole.error(`Upload failed with status: ${xhr.status}`);console.error(\"Error response:\",xhr.responseText);setError(`Error ${xhr.status}: ${xhr.responseText}`);setUploading(false);}};xhr.onerror=e=>{console.error(\"XHR error:\",e);setError(\"Upload error: Network error or CORS issue\");setUploading(false);};xhr.send(file);});});// Execute all upload promises concurrently\nawait Promise.all(uploadPromises);}catch(err){setUploading(false);setError(err.response?.data?.error||\"Error uploading file. Please try again.\");console.error(\"Upload error:\",err);}};const cancelUpload=()=>{setFiles([]);setImageUrls({});setProgress({});setError(null);};useEffect(()=>{if(files.length>0&&!uploading){uploadFileToS3(files);}},[files]);const successCount=Object.values(progress||{}).filter(p=>p===100).length;return /*#__PURE__*/_jsxs(Grid,{className:\"upload-container\",style:{justifyContent:\"start\"},children:[/*#__PURE__*/_jsx(\"label\",{htmlFor:\"fileInput\",children:/*#__PURE__*/_jsxs(Grid,{style:{gridTemplateColumns:\"1fr\",gridTemplateRows:\"1fr\",gridColumnGap:12,alignItems:\"center\",justifyContent:\"start\",alignContent:\"center\",minHeight:120,minWidth:200,width:\"100%\",height:\"100%\",borderRadius:10,border:\"1px dashed rgba(0,0,0,0.5)\",cursor:\"pointer\"},children:[Object.values(imageUrls??{}).map((iurl,idx)=>/*#__PURE__*/_jsx(\"input\",{type:\"hidden\",name:`image_urls_${idx}`,value:iurl},iurl)),/*#__PURE__*/_jsxs(Text,{style:{textAlign:\"center\"},children:[\"Drag and drop files\",/*#__PURE__*/_jsx(\"br\",{}),\"or Click here to upload\"]}),/*#__PURE__*/_jsx(\"input\",{type:\"file\",id:\"fileInput\",onChange:handleFileChange,disabled:uploading,className:\"file-input\",multiple:true,style:{borderTopWidth:\"0px\",opacity:1,display:\"none\",alignContent:\"center\",alignItems:\"center\",cursor:\"pointer\",// display: \"flex\",\nappearance:\"none\",flexDirection:\"row\",flexWrap:\"nowrap\",gap:\"12px\",justifyContent:\"center\",overflow:\"visible\",position:\"relative\",fontFamily:\"Satoshi\",MozAppearance:\"none\",WebkitAppearance:\"none\",boxSizing:\"border-box\",WebkitFontSmoothing:\"inherit\",transform:\"none\",color:\"rgba(0,0,0,0.5)\",fontSize:\"14px\",fontStyle:\"normal\",transition:\"0.3s ease-in-out\",borderRadius:\"8px\",borderStyle:\"solid\",borderWidth:\"1px\",padding:\"8px 12px\",width:\"100%\",lineHeight:\"26px\",textAlign:\"left\"}},successCount===files.length?\"default\":\"active\")]})}),imageUrls&&/*#__PURE__*/_jsx(\"ol\",{style:{padding:\"0px 0px 0px 20px\",width:\"100%\",maxHeight:240,overflow:\"auto\"},children:Object.entries(imageUrls??{})?.map(([filename,url],idx)=>{const parts=decodeURIComponent(url)?.split?.(\"/\");const iurl=parts?.[parts?.length-1];const progress2=progress?.[filename]??0;return /*#__PURE__*/_jsxs(\"li\",{style:{padding:\"2px 0px\",width:\"100%\"},children:[/*#__PURE__*/_jsxs(Grid,{style:{gridTemplateColumns:\"1fr auto\",gridColumnGap:12},children:[/*#__PURE__*/_jsx(Text,{style:{fontSize:14,lineHeight:\"26px\",overflow:\"hidden\",textOverflow:\"ellipsis\",whiteSpace:\"nowrap\"},children:iurl}),/*#__PURE__*/_jsx(Text,{style:{fontSize:14,lineHeight:\"26px\"},children:progress2===100?\"✅\":`${progress2}%`})]}),progress2<100&&/*#__PURE__*/_jsx(\"div\",{className:\"progress-bar\",style:{width:\"100%\",height:4,backgroundColor:\"rgba(0, 0, 0, 0.3)\"},children:/*#__PURE__*/_jsx(\"div\",{className:\"progress-fill\",style:{width:`${progress2}%`,backgroundColor:\"#2FCB52\",height:\"inherit\"}})})]},`${iurl}-${idx}`);})}),files?.length>0&&/*#__PURE__*/_jsx(Grid,{className:\"action-buttons\",style:{gridTemplateColumns:\"auto auto\",gridColumnGap:12},children:/*#__PURE__*/_jsxs(Text,{style:{fontSize:14,lineHeight:\"26px\"},children:[\"✅\",\" \",Object.values(progress??{}).filter(p=>p===100).length,\" \",\"of \",Object.values(progress??{}).length,\" uploaded.\"]})}),error&&/*#__PURE__*/_jsx(\"div\",{className:\"error-message\",children:/*#__PURE__*/_jsxs(Text,{style:{fontSize:14,lineHeight:\"26px\"},children:[\"❌ \",error]})})]});}addPropertyControls(S3Uploader,{objectKey:{title:\"Object key (don't change unless you know what you're doing)\",type:ControlType.String,defaultValue:\"users\"},artifactType:{title:\"Image type\",type:ControlType.String,defaultValue:\"photos\"},userUUID:{title:\"Customer UUID\",type:ControlType.String},folder:{title:\"Folder\",type:ControlType.String},internal:{title:\"Internal\",type:ControlType.Boolean}});\nexport const __FramerMetadata__ = {\"exports\":{\"sessionTracker\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"S3Uploader\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FileUploader.map"],"mappings":"yUAAA,SAAS,EAAiB,EAAI,EAAI,EAAM,CAAmI,OAA/H,KAAO,EAAK,OAAO,eAAe,EAAI,EAAI,CAAO,QAAM,WAAW,GAAK,aAAa,GAAK,SAAS,GAAK,CAAC,CAAO,EAAI,GAAK,EAAc,EAG2qB,eAAe,EAAM,EAAM,EAAM,CAAC,GAAK,CAAC,SAAO,OAAK,YAAU,UAAQ,SAAO,QAAQ,EAAS,GAAG,GAAM,EAAY,EAAQ,EAAe,gBAAgB,CAAO,EAAK,CAAC,SAAO,OAAK,YAAU,QAAQ,GAAS,GAAO,UAAU,KAAK,KAAK,IAAI,KAAK,QAAQ,EAAS,CAAC,GAAU,IAAS,OAAY,CAAC,IAAM,EAAY,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