b0VIM 9.0      fÄ²j¤ ]t  git                                     localhost                               ~git/storage/VDMDI/Comms/src/Model/Files/fileModel.ts                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        utf-8 3210    #"! U                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 tp           Q                            +       K                     g       v                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ad     ü     Q       ì  ë  Ð  —  Ž  w  b  L  =     Ý  Æ  ¬  �  |  G      ú  Ñ  ¦  ¥  ‚  K  J  =    ù  Ò  �  ’  Œ  ‹  U        ì  Ç  ²  l  e  d  )  ð
  é
  è
  Ä
  ¬
  �
  x
  ;
  
  
  
  ö	  È	   	  �	  E	  !	  ÿ  ô  Ë  Ê  �  –  •  F     Ù  Ø  »  £  �  U  L  6    ÿ  ü  ³  s  l  k  \    È  ¨  �  v  u  F    Þ  §  ¦  c           Ó  �  –  •  S    å  Þ  Ý  ²  �  q  7  0  /  ð      readonly getFileContent = <T extends FileContent<string>>(      };         return fileContentIds[fileContentIds.length - 1];     ): string | undefined => {         fileContentIds: string[],     readonly selectLatestFileContentId = (      };         return this.storageModel.list(filePath);         const filePath: string[] = this.getFilePath(fileId);     readonly listFileContentIds = (fileId: string): string[] => {      };         return this.storageModel.list(this.basePath);     readonly listFileIds = (): string[] => {      };         return true;         this.storageModel.write(fileContentPath, stringifiedContent);         const stringifiedContent: string = stringify(fileContent);          if (existingFileContent != null) return false;             this.storageModel.read(fileContentPath);         const existingFileContent: string | null =         // check if fileContent already exists          );             fileContent.fileContentId,             fileContent.fileId,         const fileContentPath: string[] = this.getFileContentPath(     readonly storeFileContent = (fileContent: FileContent<string>): boolean => {     // storage      };         this.chatModel.sendMessage("", undefined, fileContent);         this.handleFileConte	} 		break;       	} 			} 		break; 		this.c	} 		break; 		this.chatModel.handleReaction(fileContent); 	    case "reaction": 		break; 		this.boardsAndTasksModel.handleFileContent(fileContent); 	    case "task":  	    case "board-info": 	switch (fileContent.type) {          if (didStore == false) return;         const didStore: boolean = this.storeFileContent(fileContent);     readonly handleFileContent = (fileContent: FileContent<string>): void => {      };         this.handleFileContent(fileContent);          if (fileContent == null) return;         );             FileContentReference,             stringifiedFileContent,         const fileContent: FileContent<string> | null = parseValidObject(     ): void => {         stringifiedFileContent: string,     readonly handleStringifiedFileContent = (     // handlers      };         return [...filePath, fileContentId];         const filePath: string[] = this.getFilePath(fileId);     ): string[] => {         fileContentId: string,         fileId: string,     readonly getFileContentPath = (      };         return [...this.getFileContainerPath(), fileId];     readonly getFilePath = (fileId: string): string[] => {      };         return [...this.basePath, FileModelSubPath.Model, modelName];     ): string[] => {         modelName: FileModelSubPath,     readonly getModelContainerPath = (      };         return [...this.basePath, FileModelSubPath.Data];     readonly getFileContainerPath = (): string[] => {      }         );             filePaths.chat.files(this.chatModel.id),             StorageModelSubPaths.Chat,         return StorageModel.getPath(     get basePath(): string[] {     // paths      readonly boardsAndTasksModel: BoardsAndTasksModel;     readonly chatModel: ChatModel;      readonly settingsModel: SettingsModel;     readonly storageModel: StorageModel; export default class FileModel {  import ChatModel from "../Chat/chatModel"; import SettingsModel from "../Global/settingsModel"; } from "../Global/storageModel";     filePaths,     StorageModelSubPaths, import StorageModel, { import { DATA_VERSION, ValidObject } from "../Utility/typeSafety"; } from "../Utility/utility";     stringify,     parseValidObject,     createTimestamp,     StringEntryObject, import { import BoardsAndTasksModel from "./boardsAndTasksModel"; import { v4 } from "uuid";  // cleanup: Phase A ad  µ  i     g       ï  Õ  Æ  ±  |  o  Y  U    ü  ì  è  Í  Æ  Å  €  o  `  K    Ö     l  k  7  *       ü  ç  à  ß  Ó  Â  ¥  †  o  g  J  %      Ì  ´  ›  ‹  €  |  v  u  f      û
  ú
  Ç
  ¶
  ¬
  ‘
  `
  A
  
  
  
  â	  á	  Ô	  À	  ­	  ¢	  ž	  —	  •	  ”	  ‹	  l	  Y	  G	  2	  	  ÿ  ý  ü  ó  Ä  —  }  \  <  ;  (  "  !    Ø  ¹  ¸  ¨  ‘  {  z  l  i  ý                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     };     }; }; }; }; }; }; };};     type: "",      creationDate: "",     fileContentId: "",     fileId: "",      dataVersion: DATA_VERSION, export const FileContentReference: FileContent<string> = { // references      } 	readonly type: T;  	readonly creationDate: string; 	readonly fileContentId: string; 	readonly fileId: string;     extends ValidObject, StringEntryObject { export interface FileContent<T extends string> // types  } 	ModelCalendar = "calendar", 	ModelTask = "tasks", 	ModelView = "view", 	Model = "model",     Data = "data", export enum FileModelSubPath { // paths  }     }; 	}; 	    type, 	    creationDate, 	    fileContentId, 	    fileId,  	    dataVersion: DATA_VERSION, 	return {  	    FileModel.generateFileContentId(creationDate); 	const fileContentId: string = 	const creationDate: string = createTimestamp();     ): FileContent<T> => { 	type: T, 	fileId: string,     static createFileContent = <T extends string>(      }; 	return creationDate + v4();     static generateFileContentId = (creationDate: string): string => {     // utility      } 	); 	    this, 	    chatModel, 	    this.settingsModel, 	    this.storageModel, 	this.boardsAndTasksModel = new BoardsAndTasksModel(  	this.storageModel = storageModel; 	this.settingsModel = settingsModel; 	this.chatModel = chatModel;     ) { 	chatModel: ChatModel, 	settingsModel: SettingsModel, 	storageModel: StorageModel,     constructor(     // init      }; 	return fileContent; 	); 	    reference, 	    latestFileContentId, 	    fileId, 	const fileContent: T | null = this.getFileContent(  	if (latestFileContentId == undefined) return null; 	    this.selectLatestFileContentId(fileContentsIds); 	const latestFileContentId: string | undefined = 	const fileContentsIds: string[] = this.listFileContentIds(fileId);     ): T | null => { 	reference: T, 	fileId: string,     readonly getLatestFileContent = <T extends FileContent<string>>(      }; 	return fileContentOrNull; 	); 	    reference, 	    filePath, 	const fileContentOrNull: T | null = this.storageModel.readStringifiable( 	); 	    fileContentName, 	    fileId, 	const filePath: string[] = this.getFileContentPath(     ): T | null => { 	reference: T, 	fileContentName: string, 	fileId: string, ad  X
       +       ù  ø  é  Â  Ÿ  Ž  h  /  (  '    Ç  ‹  r  R  N  M  %  ù  Ë  ›  š  ^      
  	  Ü  ­  ¦  ¥  c  -    ü  û  Ð  µ  –  c  \  [    c
  "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            readonly getFileContent = <T extends FileContent<string>>(       readonly getFileContent = <T extends FileContent    rea    rea    rea    rea    rea    rea    rea    rea    rea    rea    rea    rea    rea    rea    rea    rea    rea    rea    rea    readonly getFileContent = <T extends FileContent<string>>(      }; 	return fileContentIds[fileContentIds.length - 1];     ): string | undefined => { 	fileContentIds: string[],     readonly selectLatestFileContentId = (      }; 	return this.storageModel.list(filePath); 	const filePath: string[] = this.getFilePath(fileId);     readonly listFileContentIds = (fileId: string): string[] => {      }; 	return this.storageModel.list(this.basePath);     readonly listFileIds = (): string[] => {      }; 	return true; 	this.storageModel.write(fileContentPath, stringifiedContent); 	const stringifiedContent: string = stringify(fileContent);  	if (existingFileContent != null) return false; 	    this.storageModel.read(fileContentPath); 	const existingFileContent: string | null = 	// check if fileContent already exists  	); 	    fileContent.fileContentId, 	    fileContent.fileId, 	const fileContentPath: string[] = this.getFileContentPath(     readonly storeFileContent = (fileContent: FileContent<string>): boolean => {     // storage      }; 	this.chatModel.sendMessage("", undefined, fileContent); 	this.handleFileContent(fileContent);     ): void => { 	fileContent: FileContent<string>,     readonly addFileContentAndSend = (     // methods      }; 