NCGlobal.swift 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515
  1. //
  2. // NCGlobal.swift
  3. // Nextcloud
  4. //
  5. // Created by Marino Faggiana on 22/02/21.
  6. // Copyright © 2021 Marino Faggiana. All rights reserved.
  7. //
  8. // Author Marino Faggiana <marino.faggiana@nextcloud.com>
  9. //
  10. // This program is free software: you can redistribute it and/or modify
  11. // it under the terms of the GNU General Public License as published by
  12. // the Free Software Foundation, either version 3 of the License, or
  13. // (at your option) any later version.
  14. //
  15. // This program is distributed in the hope that it will be useful,
  16. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. // GNU General Public License for more details.
  19. //
  20. // You should have received a copy of the GNU General Public License
  21. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. //
  23. import UIKit
  24. class NCGlobal: NSObject {
  25. @objc static let shared: NCGlobal = {
  26. let instance = NCGlobal()
  27. return instance
  28. }()
  29. func usernameToColor(_ username: String) -> CGColor {
  30. // Normalize hash
  31. let lowerUsername = username.lowercased()
  32. var hash: String
  33. let regex = try! NSRegularExpression(pattern: "^([0-9a-f]{4}-?){8}$")
  34. let matches = regex.matches(
  35. in: username,
  36. range: NSRange(username.startIndex..., in: username))
  37. if !matches.isEmpty {
  38. // Already a md5 hash?
  39. // done, use as is.
  40. hash = lowerUsername
  41. } else {
  42. hash = lowerUsername.md5()
  43. }
  44. hash = hash.replacingOccurrences(of: "[^0-9a-f]", with: "", options: .regularExpression)
  45. // userColors has 18 colors by default
  46. let userColorIx = NCGlobal.hashToInt(hash: hash, maximum: 18)
  47. return NCBrandColor.shared.userColors[userColorIx]
  48. }
  49. func getHeightHeaderEmptyData(view: UIView, portraitOffset: CGFloat, landscapeOffset: CGFloat, isHeaderMenuTransferViewEnabled: Bool = false) -> CGFloat {
  50. var height: CGFloat = 0
  51. if UIDevice.current.orientation.isPortrait {
  52. height = (view.frame.height / 2) - (view.safeAreaInsets.top / 2) + portraitOffset
  53. } else {
  54. height = (view.frame.height / 2) + landscapeOffset + CGFloat(isHeaderMenuTransferViewEnabled ? 35 : 0)
  55. }
  56. return height
  57. }
  58. // Convert a string to an integer evenly
  59. // hash is hex string
  60. static func hashToInt(hash: String, maximum: Int) -> Int {
  61. let result = hash.compactMap(\.hexDigitValue)
  62. return result.reduce(0, { $0 + $1 }) % maximum
  63. }
  64. // ENUM
  65. //
  66. public enum TypeFilterScanDocument: String {
  67. case document = "document"
  68. case original = "original"
  69. }
  70. // Directory on Group
  71. //
  72. @objc let directoryProviderStorage = "File Provider Storage"
  73. @objc let appApplicationSupport = "Library/Application Support"
  74. @objc let appCertificates = "Library/Application Support/Certificates"
  75. @objc let appDatabaseNextcloud = "Library/Application Support/Nextcloud"
  76. @objc let appScan = "Library/Application Support/Scan"
  77. @objc let appUserData = "Library/Application Support/UserData"
  78. // Service
  79. //
  80. let metadataKeyedUnarchiver = "it.twsweb.nextcloud.metadata"
  81. let refreshTask = "com.nextcloud.refreshTask"
  82. let processingTask = "com.nextcloud.processingTask"
  83. // App
  84. //
  85. let appName = "files"
  86. let appScheme = "nextcloud"
  87. let talkName = "talk-message"
  88. let spreedName = "spreed"
  89. let twoFactorNotificatioName = "twofactor_nextcloud_notification"
  90. // Nextcloud version
  91. //
  92. let nextcloudVersion12: Int = 12
  93. let nextcloudVersion15: Int = 15
  94. let nextcloudVersion17: Int = 17
  95. let nextcloudVersion18: Int = 18
  96. let nextcloudVersion20: Int = 20
  97. let nextcloudVersion23: Int = 23
  98. let nextcloudVersion24: Int = 24
  99. let nextcloudVersion25: Int = 25
  100. let nextcloudVersion26: Int = 26
  101. let nextcloudVersion27: Int = 27
  102. let nextcloudVersion28: Int = 28
  103. // Nextcloud unsupported
  104. //
  105. let nextcloud_unsupported_version: Int = 16
  106. // Intro selector
  107. //
  108. @objc let introLogin: Int = 0
  109. let introSignup: Int = 1
  110. // Varie size GUI
  111. //
  112. @objc let heightCellSettings: CGFloat = 50
  113. // Avatar & Preview size
  114. //
  115. let avatarSize: Int = 128 * Int(UIScreen.main.scale)
  116. let avatarSizeRounded: Int = 128
  117. let sizePreview: Int = 1024
  118. let sizeIcon: Int = 512
  119. // E2EE
  120. //
  121. let e2eePassphraseTest = "more over television factory tendency independence international intellectual impress interest sentence pony"
  122. @objc let e2eeVersions = ["1.1", "1.2", "2.0"]
  123. let e2eeVersionV11 = "1.1"
  124. let e2eeVersionV12 = "1.2"
  125. let e2eeVersionV20 = "2.0"
  126. // CHUNK
  127. let chunkSizeMBCellular = 10000000
  128. let chunkSizeMBEthernetOrWiFi = 100000000
  129. // Video
  130. //
  131. let maxHTTPCache: Int64 = 10000000000 // 10 GB
  132. let fileNameVideoEncoded: String = "video_encoded.mp4"
  133. // NCViewerProviderContextMenu
  134. //
  135. let maxAutoDownload: UInt64 = 50000000 // 50MB
  136. let maxAutoDownloadCellular: UInt64 = 10000000 // 10MB
  137. // Layout
  138. //
  139. let layoutList = "typeLayoutList"
  140. let layoutGrid = "typeLayoutGrid"
  141. let layoutViewTrash = "LayoutTrash"
  142. let layoutViewOffline = "LayoutOffline"
  143. let layoutViewFavorite = "LayoutFavorite"
  144. let layoutViewFiles = "LayoutFiles"
  145. let layoutViewTransfers = "LayoutTransfers"
  146. let layoutViewRecent = "LayoutRecent"
  147. let layoutViewShares = "LayoutShares"
  148. let layoutViewShareExtension = "LayoutShareExtension"
  149. let layoutViewGroupfolders = "LayoutGroupfolders"
  150. // Button Type in Cell list/grid
  151. //
  152. let buttonMoreMore = "more"
  153. let buttonMoreStop = "stop"
  154. let buttonMoreLock = "moreLock"
  155. // Standard height sections header/footer
  156. //
  157. let heightButtonsView: CGFloat = 50
  158. let heightHeaderTransfer: CGFloat = 50
  159. let heightSection: CGFloat = 30
  160. let heightFooter: CGFloat = 1
  161. let heightFooterButton: CGFloat = 30
  162. let endHeightFooter: CGFloat = 85
  163. // Text - OnlyOffice - Collabora - QuickLook
  164. //
  165. let editorText = "text"
  166. let editorOnlyoffice = "onlyoffice"
  167. let editorCollabora = "collabora"
  168. let editorQuickLook = "quicklook"
  169. let onlyofficeDocx = "onlyoffice_docx"
  170. let onlyofficeXlsx = "onlyoffice_xlsx"
  171. let onlyofficePptx = "onlyoffice_pptx"
  172. // Template
  173. //
  174. let templateDocument = "document"
  175. let templateSpreadsheet = "spreadsheet"
  176. let templatePresentation = "presentation"
  177. // Rich Workspace
  178. //
  179. let fileNameRichWorkspace = "Readme.md"
  180. // ContentPresenter
  181. //
  182. @objc let dismissAfterSecond: TimeInterval = 4
  183. @objc let dismissAfterSecondLong: TimeInterval = 10
  184. // Error
  185. //
  186. @objc let errorRequestExplicityCancelled: Int = 15
  187. @objc let errorNotModified: Int = 304
  188. @objc let errorBadRequest: Int = 400
  189. @objc let errorUnauthorized401: Int = 401
  190. @objc let errorForbidden: Int = 403
  191. @objc let errorResourceNotFound: Int = 404
  192. @objc let errorMethodNotSupported: Int = 405
  193. @objc let errorConflict: Int = 409
  194. @objc let errorPreconditionFailed: Int = 412
  195. @objc let errorUnsupportedMediaType: Int = 415
  196. @objc let errorInternalServerError: Int = 500
  197. @objc let errorQuota: Int = 507
  198. @objc let errorUnauthorized997: Int = 997
  199. @objc let errorExplicitlyCancelled: Int = -999
  200. @objc let errorConnectionLost: Int = -1005
  201. @objc let errorNetworkNotAvailable: Int = -1009
  202. @objc let errorBadServerResponse: Int = -1011
  203. @objc let errorInternalError: Int = -99999
  204. @objc let errorFileNotSaved: Int = -99998
  205. @objc let errorOffline: Int = -99997
  206. @objc let errorCharactersForbidden: Int = -99996
  207. @objc let errorCreationFile: Int = -99995
  208. @objc let errorReadFile: Int = -99994
  209. @objc let errorUnauthorizedFilesPasscode: Int = -99993
  210. @objc let errorDisableFilesApp: Int = -99992
  211. @objc let errorUnexpectedResponseFromDB: Int = -99991
  212. // E2EE
  213. @objc let errorE2EENotEnabled: Int = -98000
  214. @objc let errorE2EEVersion: Int = -98001
  215. @objc let errorE2EEKeyChecksums: Int = -98002
  216. @objc let errorE2EEKeyEncodeMetadata: Int = -98003
  217. @objc let errorE2EEKeyDecodeMetadata: Int = -98004
  218. @objc let errorE2EEKeyVerifySignature: Int = -98005
  219. @objc let errorE2EEKeyCiphertext: Int = -98006
  220. @objc let errorE2EEKeyFiledropCiphertext: Int = -98007
  221. @objc let errorE2EEJSon: Int = -98008
  222. @objc let errorE2EELock: Int = -98009
  223. @objc let errorE2EEEncryptFile: Int = -98010
  224. @objc let errorE2EEEncryptPayloadFile: Int = -98011
  225. @objc let errorE2EECounter: Int = -98012
  226. @objc let errorE2EEGenerateKey: Int = -98013
  227. @objc let errorE2EEEncodedKey: Int = -98014
  228. @objc let errorE2EENoUserFound: Int = -98015
  229. @objc let errorE2EEUploadInProgress: Int = -98016
  230. // Constants to identify the different permissions of a file
  231. //
  232. @objc let permissionShared = "S"
  233. @objc let permissionCanShare = "R"
  234. @objc let permissionMounted = "M"
  235. @objc let permissionFileCanWrite = "W"
  236. @objc let permissionCanCreateFile = "C"
  237. @objc let permissionCanCreateFolder = "K"
  238. @objc let permissionCanDelete = "D"
  239. @objc let permissionCanRename = "N"
  240. @objc let permissionCanMove = "V"
  241. // Share permission
  242. // permissions - (int) 1 = read; 2 = update; 4 = create; 8 = delete; 16 = share; 31 = all
  243. //
  244. @objc let permissionReadShare: Int = 1
  245. @objc let permissionUpdateShare: Int = 2
  246. @objc let permissionCreateShare: Int = 4
  247. @objc let permissionDeleteShare: Int = 8
  248. @objc let permissionShareShare: Int = 16
  249. @objc let permissionMinFileShare: Int = 1
  250. @objc let permissionMaxFileShare: Int = 19
  251. @objc let permissionMinFolderShare: Int = 1
  252. @objc let permissionMaxFolderShare: Int = 31
  253. @objc let permissionDefaultFileRemoteShareNoSupportShareOption: Int = 3
  254. @objc let permissionDefaultFolderRemoteShareNoSupportShareOption: Int = 15
  255. // ATTRIBUTES
  256. @objc let permissionDownloadShare: Int = 0
  257. // Filename Mask and Type
  258. //
  259. let keyFileNameMask = "fileNameMask"
  260. let keyFileNameType = "fileNameType"
  261. let keyFileNameAutoUploadMask = "fileNameAutoUploadMask"
  262. let keyFileNameAutoUploadType = "fileNameAutoUploadType"
  263. let keyFileNameOriginal = "fileNameOriginal"
  264. let keyFileNameOriginalAutoUpload = "fileNameOriginalAutoUpload"
  265. // Selector
  266. //
  267. let selectorDownloadFile = "downloadFile"
  268. let selectorReadFile = "readFile"
  269. let selectorListingFavorite = "listingFavorite"
  270. let selectorLoadFileView = "loadFileView"
  271. let selectorLoadFileQuickLook = "loadFileQuickLook"
  272. let selectorOpenIn = "openIn"
  273. let selectorPrint = "print"
  274. let selectorUploadAutoUpload = "uploadAutoUpload"
  275. let selectorUploadAutoUploadAll = "uploadAutoUploadAll"
  276. let selectorUploadFile = "uploadFile"
  277. let selectorUploadFileNODelete = "UploadFileNODelete"
  278. let selectorUploadFileShareExtension = "uploadFileShareExtension"
  279. let selectorSaveAlbum = "saveAlbum"
  280. let selectorSaveAsScan = "saveAsScan"
  281. let selectorOpenDetail = "openDetail"
  282. let selectorSynchronizationOffline = "synchronizationOffline"
  283. // Metadata : Status
  284. //
  285. // 1) wait download/upload
  286. // 2) in download/upload
  287. // 3) downloading/uploading
  288. // 4) done or error
  289. //
  290. let metadataStatusNormal: Int = 0
  291. let metadataStatusWaitDownload: Int = -1
  292. let metadataStatusDownloading: Int = -2
  293. let metadataStatusDownloadError: Int = -3
  294. let metadataStatusWaitUpload: Int = 1
  295. let metadataStatusUploading: Int = 2
  296. let metadataStatusUploadError: Int = 3
  297. // Hidden files included in the read
  298. //
  299. let includeHiddenFiles: [String] = [".LivePhoto"]
  300. // Auto upload subfolder granularity
  301. //
  302. @objc let subfolderGranularityDaily = 2
  303. @objc let subfolderGranularityMonthly = 1
  304. @objc let subfolderGranularityYearly = 0
  305. // Notification Center
  306. //
  307. @objc let notificationCenterApplicationDidEnterBackground = "applicationDidEnterBackground"
  308. @objc let notificationCenterApplicationDidBecomeActive = "applicationDidBecomeActive"
  309. @objc let notificationCenterApplicationWillResignActive = "applicationWillResignActive"
  310. @objc let notificationCenterApplicationWillEnterForeground = "applicationWillEnterForeground"
  311. @objc let notificationCenterChangeUser = "changeUser"
  312. @objc let notificationCenterChangeTheming = "changeTheming"
  313. let notificationCenterRichdocumentGrabFocus = "richdocumentGrabFocus"
  314. let notificationCenterReloadDataNCShare = "reloadDataNCShare"
  315. let notificationCenterCloseRichWorkspaceWebView = "closeRichWorkspaceWebView"
  316. let notificationCenterReloadAvatar = "reloadAvatar"
  317. let notificationCenterCreateMediaCacheEnded = "createMediaCacheEnded"
  318. @objc let notificationCenterReloadDataSource = "reloadDataSource"
  319. let notificationCenterReloadDataSourceNetwork = "reloadDataSourceNetwork"
  320. let notificationCenterChangeStatusFolderE2EE = "changeStatusFolderE2EE" // userInfo: serverUrl
  321. let notificationCenterDownloadStartFile = "downloadStartFile" // userInfo: ocId, serverUrl, account
  322. let notificationCenterDownloadedFile = "downloadedFile" // userInfo: ocId, serverUrl, account, selector, error
  323. let notificationCenterDownloadCancelFile = "downloadCancelFile" // userInfo: ocId, serverUrl, account
  324. let notificationCenterUploadStartFile = "uploadStartFile" // userInfo: ocId, serverUrl, account, fileName, sessionSelector
  325. @objc let notificationCenterUploadedFile = "uploadedFile" // userInfo: ocId, serverUrl, account, fileName, ocIdTemp, error
  326. let notificationCenterUploadedLivePhoto = "uploadedLivePhoto" // userInfo: ocId, serverUrl, account, fileName, ocIdTemp, error
  327. let notificationCenterUploadCancelFile = "uploadCancelFile" // userInfo: ocId, serverUrl, account
  328. let notificationCenterProgressTask = "progressTask" // userInfo: account, ocId, serverUrl, status, chunk, e2eEncrypted, progress, totalBytes, totalBytesExpected
  329. let notificationCenterUpdateBadgeNumber = "updateBadgeNumber" // userInfo: counterDownload, counterUpload
  330. let notificationCenterCreateFolder = "createFolder" // userInfo: ocId, serverUrl, account, withPush
  331. let notificationCenterDeleteFile = "deleteFile" // userInfo: [ocId], onlyLocalCache, error
  332. let notificationCenterMoveFile = "moveFile" // userInfo: [ocId], error
  333. let notificationCenterCopyFile = "copyFile" // userInfo: [ocId], error
  334. let notificationCenterRenameFile = "renameFile" // userInfo: ocId, account, indexPath
  335. let notificationCenterFavoriteFile = "favoriteFile" // userInfo: ocId, serverUrl
  336. let notificationCenterOperationReadFile = "operationReadFile" // userInfo: ocId
  337. let notificationCenterMenuSearchTextPDF = "menuSearchTextPDF"
  338. let notificationCenterMenuGotToPageInPDF = "menuGotToPageInPDF"
  339. let notificationCenterOpenMediaDetail = "openMediaDetail" // userInfo: ocId
  340. let notificationCenterDismissScanDocument = "dismissScanDocument"
  341. let notificationCenterDismissUploadAssets = "dismissUploadAssets"
  342. let notificationCenterEnableSwipeGesture = "enableSwipeGesture"
  343. let notificationCenterDisableSwipeGesture = "disableSwipeGesture"
  344. // TIP
  345. //
  346. let tipNCViewerPDFThumbnail = "tipncviewerpdfthumbnail"
  347. let tipNCCollectionViewCommonAccountRequest = "tipnccollectionviewcommonaccountrequest"
  348. let tipNCScanAddImage = "tipncscanaddimage"
  349. let tipNCViewerMediaDetailView = "tipncviewermediadetailview"
  350. // ACTION
  351. //
  352. let actionNoAction = "no-action"
  353. let actionUploadAsset = "upload-asset"
  354. let actionScanDocument = "add-scan-document"
  355. let actionTextDocument = "create-text-document"
  356. let actionVoiceMemo = "create-voice-memo"
  357. // WIDGET ACTION
  358. //
  359. let widgetActionNoAction = "nextcloud://open-action?action=no-action"
  360. let widgetActionUploadAsset = "nextcloud://open-action?action=upload-asset"
  361. let widgetActionScanDocument = "nextcloud://open-action?action=add-scan-document"
  362. let widgetActionTextDocument = "nextcloud://open-action?action=create-text-document"
  363. let widgetActionVoiceMemo = "nextcloud://open-action?action=create-voice-memo"
  364. // APPCONFIG
  365. //
  366. let configuration_brand = "brand"
  367. let configuration_serverUrl = "serverUrl"
  368. let configuration_username = "username"
  369. let configuration_password = "password"
  370. let configuration_apppassword = "apppassword"
  371. let configuration_disable_intro = "disable_intro"
  372. let configuration_disable_multiaccount = "disable_multiaccount"
  373. let configuration_disable_crash_service = "disable_crash_service"
  374. let configuration_disable_log = "disable_log"
  375. let configuration_disable_manage_account = "disable_manage_account"
  376. let configuration_disable_more_external_site = "disable_more_external_site"
  377. let configuration_disable_openin_file = "disable_openin_file"
  378. // CAPABILITIES
  379. //
  380. var capabilityServerVersionMajor: Int = 0
  381. @objc var capabilityServerVersion: String = ""
  382. var capabilityFileSharingApiEnabled: Bool = false
  383. var capabilityFileSharingPubPasswdEnforced: Bool = false
  384. var capabilityFileSharingPubExpireDateEnforced: Bool = false
  385. var capabilityFileSharingPubExpireDateDays: Int = 0
  386. var capabilityFileSharingInternalExpireDateEnforced: Bool = false
  387. var capabilityFileSharingInternalExpireDateDays: Int = 0
  388. var capabilityFileSharingRemoteExpireDateEnforced: Bool = false
  389. var capabilityFileSharingRemoteExpireDateDays: Int = 0
  390. var capabilityFileSharingDefaultPermission: Int = 0
  391. var capabilityThemingColor: String = ""
  392. var capabilityThemingColorElement: String = ""
  393. var capabilityThemingColorText: String = ""
  394. @objc var capabilityThemingName: String = ""
  395. @objc var capabilityThemingSlogan: String = ""
  396. @objc var capabilityE2EEEnabled: Bool = false
  397. @objc var capabilityE2EEApiVersion: String = ""
  398. var capabilityRichdocumentsEnabled: Bool = false
  399. var capabilityRichdocumentsMimetypes = ThreadSafeArray<String>()
  400. var capabilityActivity = ThreadSafeArray<String>()
  401. var capabilityNotification = ThreadSafeArray<String>()
  402. var capabilityFilesUndelete: Bool = false
  403. var capabilityFilesLockVersion: String = "" // NC 24
  404. var capabilityFilesComments: Bool = false // NC 20
  405. var capabilityFilesBigfilechunking: Bool = false
  406. @objc var capabilityUserStatusEnabled: Bool = false
  407. var capabilityExternalSites: Bool = false
  408. var capabilityGroupfoldersEnabled: Bool = false // NC27
  409. var isLivePhotoServerAvailable: Bool { // NC28
  410. return capabilityServerVersionMajor >= nextcloudVersion28
  411. }
  412. var capabilitySecurityGuardDiagnostics = false
  413. // MORE NEXTCLOUD APPS
  414. let talkSchemeUrl = "nextcloudtalk://"
  415. let notesSchemeUrl = "nextcloudnotes://"
  416. let talkAppStoreUrl = "https://apps.apple.com/de/app/nextcloud-talk/id1296825574"
  417. let notesAppStoreUrl = "https://apps.apple.com/de/app/nextcloud-notes/id813973264"
  418. let moreAppsUrl = "itms-apps://search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?media=software&term=nextcloud"
  419. // SNAPSHOT PREVIEW
  420. //
  421. let defaultSnapshotConfiguration = "DefaultPreviewConfiguration"
  422. // FORBIDDEN CHARACTERS
  423. //
  424. let forbiddenCharacters = ["/", "\\", ":", "\"", "|", "?", "*", "<", ">"]
  425. // DIAGNOSTICS CLIENTS
  426. //
  427. let diagnosticIssueSyncConflicts = "sync_conflicts"
  428. let diagnosticIssueProblems = "problems"
  429. let diagnosticIssueVirusDetected = "virus_detected"
  430. let diagnosticIssueE2eeErrors = "e2ee_errors"
  431. let diagnosticProblemsForbidden = "CHARACTERS_FORBIDDEN"
  432. let diagnosticProblemsBadResponse = "BAD_SERVER_RESPONSE"
  433. let diagnosticProblemsUploadServerError = "UploadError.SERVER_ERROR"
  434. // MEDIA LAYOUT
  435. //
  436. let mediaLayoutRatio = "mediaLayoutRatio"
  437. let mediaLayoutSquare = "mediaLayoutSquare"
  438. }