{"version":3,"file":"alfresco-aca-shared-rules.mjs","sources":["../../../../projects/aca-shared/rules/src/navigation.rules.ts","../../../../projects/aca-shared/rules/src/repository.rules.ts","../../../../projects/aca-shared/rules/src/user.rules.ts","../../../../projects/aca-shared/rules/src/app.rules.ts","../../../../projects/aca-shared/rules/src/public-api.ts","../../../../projects/aca-shared/rules/src/alfresco-aca-shared-rules.ts"],"sourcesContent":["/*!\n * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Alfresco Example Content Application\n *\n * This file is part of the Alfresco Example Content Application.\n * If the software was purchased under a paid Alfresco license, the terms of\n * the paid license agreement will prevail. Otherwise, the software is\n * provided under the following open source license terms:\n *\n * The Alfresco Example Content Application is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * The Alfresco Example Content Application is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { RuleContext } from '@alfresco/adf-extensions';\n\n/**\n * Checks if a Preview route is activated.\n * JSON ref: `app.navigation.isPreview`\n */\nexport function isPreview(context: RuleContext): boolean {\n  const { url } = context.navigation;\n  return url && (url.includes('/preview/') || url.includes('viewer:view') || url.includes('/view/'));\n}\n\n/**\n * Checks if a **Favorites** route is activated.\n * JSON ref: `app.navigation.isFavorites`\n */\nexport function isFavorites(context: RuleContext): boolean {\n  const { url } = context.navigation;\n  return url?.startsWith('/favorites') && !isPreview(context);\n}\n\n/**\n * Checks if a **Shared Files** route is activated.\n * JSON ref: `app.navigation.isSharedFiles`\n */\nexport function isSharedFiles(context: RuleContext): boolean {\n  const { url } = context.navigation;\n  return url?.startsWith('/shared') && !isPreview(context);\n}\n\n/**\n * Checks if a **Trashcan** route is activated.\n * JSON ref: `app.navigation.isTrashcan`\n */\nexport function isTrashcan(context: RuleContext): boolean {\n  const { url } = context.navigation;\n  return url?.startsWith('/trashcan');\n}\n\n/**\n * Checks if a **Personal Files** route is activated.\n * JSON ref: `app.navigation.isPersonalFiles`\n */\nexport function isPersonalFiles(context: RuleContext): boolean {\n  const { url } = context.navigation;\n  return url?.startsWith('/personal-files');\n}\n\n/**\n * Checks if a **Repository View** route is activated.\n * JSON ref: `app.navigation.isRepositoryView`\n */\nexport function isRepositoryView(context: RuleContext): boolean {\n  const { url } = context.navigation;\n  return url?.startsWith('/repository');\n}\n\n/**\n * Checks if a **Library Files** or **Library Search Result** route is activated.\n * JSON ref: `app.navigation.isLibraryFiles`\n */\nexport function isLibraries(context: RuleContext): boolean {\n  const { url } = context.navigation;\n  return url?.endsWith('/libraries') || url?.startsWith('/search-libraries');\n}\n\nexport function isLibraryContent(context: RuleContext): boolean {\n  const { url } = context.navigation;\n  return url?.endsWith('/libraries') || url?.includes('/libraries/') || url?.startsWith('/search-libraries');\n}\n\nexport function isDetails(context: RuleContext): boolean {\n  const { url } = context.navigation;\n  return url?.includes('/details');\n}\n\n/**\n * Checks if a **Recent Files** route is activated.\n * JSON ref: `app.navigation.isRecentFiles`\n */\nexport function isRecentFiles(context: RuleContext): boolean {\n  const { url } = context.navigation;\n  return url?.startsWith('/recent-files');\n}\n\n/**\n * Checks if a **Search Results** route is activated.\n * JSON ref: `app.navigation.isSearchResults`\n */\nexport function isSearchResults(\n  context: RuleContext\n  // ...args: RuleParameter[]\n): boolean {\n  const { url } = context.navigation;\n  return url?.startsWith('/search');\n}\n","/*!\n * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Alfresco Example Content Application\n *\n * This file is part of the Alfresco Example Content Application.\n * If the software was purchased under a paid Alfresco license, the terms of\n * the paid license agreement will prevail. Otherwise, the software is\n * provided under the following open source license terms:\n *\n * The Alfresco Example Content Application is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * The Alfresco Example Content Application is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { RuleContext } from '@alfresco/adf-extensions';\n\n/**\n * Checks if the quick share repository option is enabled or not.\n * JSON ref: `repository.isQuickShareEnabled`\n */\nexport const hasQuickShareEnabled = (context: RuleContext): boolean => context.repository.status.isQuickShareEnabled;\n\nexport function isMajorVersionAvailable(context: RuleContext, versionNumber: string): boolean {\n  const majorVersion = context.repository.version?.major ? parseInt(context.repository.version.major, 10) : 0;\n  return majorVersion >= parseInt(versionNumber, 10);\n}\n","/*!\n * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Alfresco Example Content Application\n *\n * This file is part of the Alfresco Example Content Application.\n * If the software was purchased under a paid Alfresco license, the terms of\n * the paid license agreement will prevail. Otherwise, the software is\n * provided under the following open source license terms:\n *\n * The Alfresco Example Content Application is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * The Alfresco Example Content Application is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { RuleContext } from '@alfresco/adf-extensions';\n\n/**\n * Checks if user is admin.\n * JSON ref: `user.isAdmin`\n */\nexport const isAdmin = (context: RuleContext): boolean => context.profile.isAdmin;\n","/*!\n * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Alfresco Example Content Application\n *\n * This file is part of the Alfresco Example Content Application.\n * If the software was purchased under a paid Alfresco license, the terms of\n * the paid license agreement will prevail. Otherwise, the software is\n * provided under the following open source license terms:\n *\n * The Alfresco Example Content Application is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * The Alfresco Example Content Application is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { AppConfigService } from '@alfresco/adf-core';\nimport { RuleContext } from '@alfresco/adf-extensions';\nimport * as navigation from './navigation.rules';\nimport * as repository from './repository.rules';\nimport { isAdmin } from './user.rules';\n\n/* cspell:disable */\nexport const supportedExtensions = {\n  doc: 'ms-word',\n  docx: 'ms-word',\n  docm: 'ms-word',\n  dot: 'ms-word',\n  dotx: 'ms-word',\n  dotm: 'ms-word',\n  rtf: 'ms-word',\n  xls: 'ms-excel',\n  xlsx: 'ms-excel',\n  xlsb: 'ms-excel',\n  xlsm: 'ms-excel',\n  xlt: 'ms-excel',\n  xltx: 'ms-excel',\n  xltm: 'ms-excel',\n  xlam: 'ms-excel',\n  ppt: 'ms-powerpoint',\n  pptx: 'ms-powerpoint',\n  pot: 'ms-powerpoint',\n  potx: 'ms-powerpoint',\n  potm: 'ms-powerpoint',\n  pptm: 'ms-powerpoint',\n  pps: 'ms-powerpoint',\n  ppsx: 'ms-powerpoint',\n  ppam: 'ms-powerpoint',\n  ppsm: 'ms-powerpoint',\n  sldx: 'ms-powerpoint',\n  sldm: 'ms-powerpoint',\n  vsd: 'ms-visio',\n  vss: 'ms-visio',\n  vst: 'ms-visio',\n  vsdx: 'ms-visio',\n  vsdm: 'ms-visio',\n  vssx: 'ms-visio',\n  vssm: 'ms-visio',\n  vstx: 'ms-visio',\n  vstm: 'ms-visio'\n};\n\n/* cspell:enable */\n\nexport function getFileExtension(fileName: string): string | null {\n  if (fileName) {\n    const match = fileName.toLowerCase().match(/\\.([^\\./\\?\\#]+)($|\\?|\\#)/);\n\n    return match ? match[1] : null;\n  }\n\n  return null;\n}\n\nexport interface AcaRuleContext extends RuleContext {\n  withCredentials: boolean;\n  appConfig: AppConfigService;\n}\n\n/**\n * Checks if the content plugin is enabled.\n * JSON ref: `app.isContentServiceEnabled`\n */\nexport const isContentServiceEnabled = (context: AcaRuleContext): boolean => {\n  const flag = context.appConfig.get<boolean | string>('plugins.contentService');\n  return flag === true || flag === 'true';\n};\n\n/**\n * Checks if user can mark selected nodes as **Favorite**.\n * JSON ref: `app.selection.canAddFavorite`\n */\nexport function canAddFavorite(context: RuleContext): boolean {\n  if (navigation.isFavorites(context) || navigation.isLibraries(context) || navigation.isTrashcan(context)) {\n    return false;\n  }\n  return context.selection.nodes.some((node) => !node.entry.isFavorite);\n}\n\n/**\n * Checks if user can un-mark selected nodes as **Favorite**.\n * JSON ref: `app.selection.canRemoveFavorite`\n */\nexport function canRemoveFavorite(context: RuleContext): boolean {\n  if (navigation.isFavorites(context)) {\n    return true;\n  }\n  return context.selection.nodes.every((node) => node.entry.isFavorite);\n}\n\n/**\n * Checks if user can share selected file.\n * JSON ref: `app.selection.file.canShare`\n */\nexport const canShareFile = (context: RuleContext): boolean =>\n  [context.selection.file, !navigation.isTrashcan(context), repository.hasQuickShareEnabled(context), !isShared(context)].every(Boolean);\n\n/**\n * Checks if user can perform \"Join\" or \"Cancel Join Request\" on a library.\n * JSON ref: `canToggleJoinLibrary`\n */\nexport const canToggleJoinLibrary = (context: RuleContext): boolean =>\n  !isPrivateLibrary(context) || [isPrivateLibrary(context), isAdmin(context)].every(Boolean);\n\n/**\n * Checks if user can edit the selected folder.\n * JSON ref: `canEditFolder`\n *\n * @param context Rule execution context\n */\nexport const canEditFolder = (context: RuleContext): boolean => [canUpdateSelectedFolder(context), !navigation.isTrashcan(context)].every(Boolean);\n\n/**\n * Checks if the selected file is already shared.\n * JSON ref: `app.selection.file.isShared`\n */\nexport function isShared(context: RuleContext): boolean {\n  if (navigation.isSharedFiles(context) && context.selection.file) {\n    return true;\n  }\n\n  if (!navigation.isTrashcan(context) && hasSelection(context) && context.selection.file) {\n    return !!context.selection.file.entry?.properties?.['qshare:sharedId'];\n  }\n\n  return false;\n}\n\n/**\n * Checks if user can delete selected nodes.\n * JSON ref: `app.selection.canDelete`\n */\nexport function canDeleteSelection(context: RuleContext): boolean {\n  if (hasLockedFiles(context)) {\n    return false;\n  }\n\n  // temp workaround for Favorites api\n  if (navigation.isFavorites(context)) {\n    return true;\n  }\n\n  if (navigation.isPreview(context)) {\n    return context.permissions.check(context.selection.nodes, ['delete']);\n  }\n\n  // workaround for Shared Files\n  if (navigation.isSharedFiles(context)) {\n    return context.permissions.check(context.selection.nodes, ['delete'], {\n      target: 'allowableOperationsOnTarget'\n    });\n  }\n\n  return context.permissions.check(context.selection.nodes, ['delete']);\n}\n\n/**\n * Checks if user selected anything.\n * JSON ref: `app.selection.notEmpty`\n */\nexport const hasSelection = (context: RuleContext): boolean => !context.selection.isEmpty;\n\n/**\n * Checks if user can create a new folder with current path.\n * JSON ref: `app.navigation.folder.canCreate`\n */\nexport function canCreateFolder(context: AcaRuleContext): boolean {\n  if (navigation.isPersonalFiles(context) || navigation.isLibraryContent(context) || navigation.isRepositoryView(context)) {\n    const { currentFolder } = context.navigation;\n\n    if (currentFolder) {\n      return context.permissions.check(currentFolder, ['create']);\n    }\n  }\n  return false;\n}\n\n/**\n * Checks if user can download selected nodes (either files or folders).\n * JSON ref: `app.selection.canDownload`\n */\nexport function canDownloadSelection(context: RuleContext): boolean {\n  return context.selection.nodes.every((node: any) => node.entry && (node.entry.isFile || node.entry.isFolder || !!node.entry.nodeId));\n}\n\n/**\n * Checks if user has selected a folder.\n * JSON ref: `app.selection.folder`\n */\nexport const hasFolderSelected = (context: RuleContext): boolean => !!context.selection.folder;\n\n/**\n * Checks if user has selected a library (site).\n * JSON ref: `app.selection.library`\n */\nexport const hasLibrarySelected = (context: RuleContext): boolean => !!context.selection.library;\n\n/**\n * Checks if user has selected a **private** library (site)\n * JSON ref: `app.selection.isPrivateLibrary`\n */\nexport function isPrivateLibrary(context: RuleContext): boolean {\n  return context.selection.library?.entry?.visibility === 'PRIVATE';\n}\n\n/**\n * Checks if the selected library has a **role** property defined.\n * JSON ref: `app.selection.hasLibraryRole`\n */\nexport function hasLibraryRole(context: RuleContext): boolean {\n  const library = context.selection.library;\n  return library ? !!library.entry?.role : false;\n}\n\n/**\n * Checks if user has selected a file.\n * JSON ref: `app.selection.file`\n */\nexport const hasFileSelected = (context: RuleContext): boolean => !!context?.selection?.file;\n\n/**\n * Checks if user can update the first selected node.\n * JSON ref: `app.selection.first.canUpdate`\n */\nexport function canUpdateSelectedNode(context: RuleContext): boolean {\n  if (context.selection && hasSelection(context)) {\n    const node = context.selection.first;\n\n    if (node?.entry.isFile && hasLockedFiles(context)) {\n      return false;\n    }\n\n    return context.permissions.check(node, ['update']);\n  }\n  return false;\n}\n\nexport function isMultiselection(context: RuleContext): boolean {\n  let isMultiNodeSelected = false;\n  if (context.selection && hasSelection(context)) {\n    isMultiNodeSelected = context.selection.count > 1;\n  }\n  return isMultiNodeSelected;\n}\n\n/**\n * Checks if user can update the first selected folder.\n * JSON ref: `app.selection.folder.canUpdate`\n */\nexport function canUpdateSelectedFolder(context: RuleContext): boolean {\n  const { folder } = context.selection;\n  if (folder) {\n    return (\n      // workaround for Favorites Api\n      navigation.isFavorites(context) || context.permissions.check(folder.entry, ['update'])\n    );\n  }\n  return false;\n}\n\n/**\n * Checks if user has selected a **locked** file node.\n * JSON ref: `app.selection.file.isLocked`\n */\nexport function hasLockedFiles(context: RuleContext): boolean {\n  if (context?.selection?.nodes) {\n    return context.selection.nodes.some((node) => {\n      if (!node.entry.isFile) {\n        return false;\n      }\n\n      return node.entry.isLocked || node.entry.properties?.['cm:lockType'] === 'READ_ONLY_LOCK';\n    });\n  }\n\n  return false;\n}\n\n/**\n * Checks if the selected file has **write** or **read-only** locks specified.\n * JSON ref: `app.selection.file.isLocked`\n */\nexport const isWriteLocked = (context: RuleContext): boolean =>\n  !!(\n    context?.selection?.file?.entry?.properties?.['cm:lockType'] === 'WRITE_LOCK' ||\n    context?.selection?.file?.entry?.properties?.['cm:lockType'] === 'READ_ONLY_LOCK'\n  );\n\n/**\n * Checks if the selected file has **write** or **read-only** locks specified,\n * and that current user is the owner of the lock.\n * JSON ref: `app.selection.file.isLockOwner`\n */\nexport const isUserWriteLockOwner = (context: RuleContext): boolean =>\n  isWriteLocked(context) &&\n  context.selection.file?.entry.properties['cm:lockOwner'] &&\n  context.selection.file?.entry.properties['cm:lockOwner'].id === context.profile.id;\n\n/**\n * Checks if user can lock selected file.\n * JSON ref: `app.selection.file.canLock`\n */\nexport const canLockFile = (context: RuleContext): boolean => !isWriteLocked(context) && canUpdateSelectedNode(context);\n\n/**\n * Checks if user can unlock selected file.\n * JSON ref: `app.selection.file.canUnlock`\n */\nexport function canUnlockFile(context: RuleContext): boolean {\n  const { file } = context.selection;\n  return isWriteLocked(context) && (context.permissions.check(file?.entry, ['delete']) || isUserWriteLockOwner(context));\n}\n\n/**\n * Checks if user can upload a new version of the file.\n * JSON ref: `app.selection.file.canUploadVersion`\n */\nexport function canUploadVersion(context: RuleContext): boolean {\n  if (navigation.isFavorites(context) || navigation.isSharedFiles(context)) {\n    return hasFileSelected(context);\n  }\n\n  return [\n    hasFileSelected(context),\n    !navigation.isTrashcan(context),\n    isWriteLocked(context) ? isUserWriteLockOwner(context) : canUpdateSelectedNode(context)\n  ].every(Boolean);\n}\n\n/**\n * Checks if user can print the file.\n * JSON ref: `canPrintFile`\n *\n * @param context Rule execution context\n */\nexport const canPrintFile = (context: RuleContext): boolean => {\n  const nodeEntry = context.selection.file.entry;\n  const mediaMimeTypes = ['video/mp4', 'video/webm', 'video/ogg', 'audio/mpeg', 'audio/mp3', 'audio/ogg', 'audio/wav'];\n  return !mediaMimeTypes.includes(nodeEntry.content.mimeType);\n};\n\n/**\n * Checks if user can toggle shared link mode.\n * JSON ref: `canToggleSharedLink`\n *\n * @param context Rule execution context\n */\nexport const canToggleSharedLink = (context: RuleContext): boolean => [canShareFile(context), isShared(context)].some(Boolean);\n\n/**\n * Checks if user can edit aspects for the selected node.\n * JSON ref: `canEditAspects`\n *\n * @param context Rule execution context\n */\nexport const canEditAspects = (context: RuleContext): boolean =>\n  [\n    !isMultiselection(context),\n    canUpdateSelectedNode(context),\n    !isWriteLocked(context),\n    !navigation.isTrashcan(context),\n    repository.isMajorVersionAvailable(context, '7')\n  ].every(Boolean);\n\nexport const canToggleFileLock = (context: RuleContext): boolean => [canLockFile(context) || canUnlockFile(context)].some(Boolean);\n\n/**\n * @deprecated Uses workarounds for for recent files and search api issues.\n * Checks if user can toggle **Favorite** state for a node.\n * @param context Rule execution context\n */\nexport const canToggleFavorite = (context: RuleContext): boolean =>\n  [\n    [canAddFavorite(context), canRemoveFavorite(context)].some(Boolean),\n    [navigation.isRecentFiles(context), navigation.isSharedFiles(context), navigation.isSearchResults(context), navigation.isFavorites(context)].some(\n      Boolean\n    )\n  ].every(Boolean);\n\n/**\n * Checks if application should render logout option.\n * JSON ref: `canShowLogout`\n *\n * @param context Rule execution context\n */\nexport const canShowLogout = (context: AcaRuleContext): boolean => !context.withCredentials;\n\n/**\n * Checks if user is library manager\n * JSON ref: `isLibraryManager`\n *\n * @param context Rule execution context\n */\nexport const isLibraryManager = (context: RuleContext): boolean => context.selection.library?.entry.role === 'SiteManager' || isAdmin(context);\n\n/**\n * Checks if the file can be opened with MS Office\n * JSON ref: `aos.canOpenWithOffice`\n *\n * @param context Rule execution context\n */\nexport function canOpenWithOffice(context: AcaRuleContext): boolean {\n  const flag = `${context.appConfig.get<boolean | string>('plugins.aosPlugin', false)}`;\n\n  if (flag !== 'true') {\n    return false;\n  }\n\n  if (context.navigation?.url?.startsWith('/trashcan')) {\n    return false;\n  }\n\n  if (!context?.selection) {\n    return false;\n  }\n\n  const { file } = context.selection;\n\n  if (!file?.entry) {\n    return false;\n  }\n\n  const extension = getFileExtension(file.entry.name);\n  if (!extension || !supportedExtensions[extension]) {\n    return false;\n  }\n\n  if (!file.entry.properties) {\n    return false;\n  }\n\n  if (file.entry.isLocked) {\n    return false;\n  }\n\n  if (file.entry.properties['cm:lockType'] === 'WRITE_LOCK' || file.entry.properties['cm:lockType'] === 'READ_ONLY_LOCK') {\n    return false;\n  }\n\n  const lockOwner = file.entry.properties['cm:lockOwner'];\n  if (lockOwner && lockOwner.id !== context.profile.id) {\n    return false;\n  }\n\n  // workaround for Shared files\n  if (context.navigation?.url?.startsWith('/shared')) {\n    // eslint-disable-next-line no-prototype-builtins\n    if (file.entry.hasOwnProperty('allowableOperationsOnTarget')) {\n      return context.permissions.check(file, ['update'], {\n        target: 'allowableOperationsOnTarget'\n      });\n    }\n  }\n\n  return context.permissions.check(file, ['update']);\n}\n\n/**\n * Checks if user savedSearches are supported by current ACS version.\n * JSON ref: `isPreferencesApiAvailable`\n */\nexport const isPreferencesApiAvailable = createVersionRule('25.1.0');\n\n/**\n * Checks if node info modal is supported by current ACS version.\n * JSON ref: `isNodeInfoAvailable`\n */\nexport const isNodeInfoAvailable = createVersionRule('23.4.0');\n\n/**\n * Checks if bulk update feature for legal holds is supported by current ACS version.\n * JSON ref: `isBulkActionsAvailable`\n */\nexport const isBulkActionsAvailable = createVersionRule('23.3.0');\n\n/**\n * Partially applies minimal version of a feature against a core compatibility evaluation.\n * @param minimalVersion The minimal version to check against.\n */\nexport function createVersionRule(minimalVersion: string): (context: RuleContext) => boolean {\n  return (context: RuleContext): boolean => {\n    const acsVersion = context.repository.version?.display?.split(' ')[0];\n    return isVersionCompatible(acsVersion, minimalVersion);\n  };\n}\n\nfunction isVersionCompatible(currentVersion: string, minimalVersion: string): boolean {\n  if (!currentVersion || !minimalVersion) {\n    return false;\n  }\n\n  const currentParts = currentVersion.split('.').map(Number);\n  const minimalParts = minimalVersion.split('.').map(Number);\n  const maxLength = Math.max(currentParts.length, minimalParts.length);\n\n  for (let i = 0; i < maxLength; i++) {\n    const currentSegment = currentParts[i] ?? 0;\n    const minimalSegment = minimalParts[i] ?? 0;\n\n    if (currentSegment > minimalSegment) {\n      return true;\n    }\n\n    if (currentSegment < minimalSegment) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nexport function isSmartFolder(context: RuleContext): boolean {\n  if (!context.selection?.isEmpty) {\n    const node = context.selection.first;\n    if (!node?.entry.isFolder) {\n      return false;\n    }\n    const nodeAspects = node.entry?.aspectNames ?? [];\n    return nodeAspects.includes('smf:customConfigSmartFolder') || nodeAspects.includes('smf:systemConfigSmartFolder');\n  }\n  return false;\n}\n\nexport const areTagsEnabled = (context: AcaRuleContext): boolean => context.appConfig.get('plugins.tagsEnabled', true);\n\nexport const areCategoriesEnabled = (context: AcaRuleContext): boolean => context.appConfig.get('plugins.categoriesEnabled', true);\n\nexport const canDisplayKnowledgeRetrievalButton = (context: AcaRuleContext): boolean =>\n  context.appConfig.get('plugins.knowledgeRetrievalEnabled', false) &&\n  (navigation.isPersonalFiles(context) ||\n    navigation.isRepositoryView(context) ||\n    navigation.isSharedFiles(context) ||\n    navigation.isRecentFiles(context) ||\n    navigation.isFavorites(context) ||\n    ((navigation.isSearchResults(context) || navigation.isLibraryContent(context)) && !navigation.isLibraries(context)));\n\nexport const isSSOEnabled = (context: AcaRuleContext): boolean => context.appConfig.get('authType') === 'OAUTH';\n\n/**\n * Checks if node contains checked out aspect.\n * JSON ref: `app.selection.isCheckedOut`\n *\n * @param context Rule execution context\n */\nexport const isCheckedOut = (context: RuleContext): boolean => {\n  if (!context.selection?.isEmpty) {\n    const nodeAspects = context.selection.first.entry?.aspectNames ?? [];\n    return nodeAspects.includes('cm:checkedOut');\n  }\n  return false;\n};\n","/*!\n * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Alfresco Example Content Application\n *\n * This file is part of the Alfresco Example Content Application.\n * If the software was purchased under a paid Alfresco license, the terms of\n * the paid license agreement will prevail. Otherwise, the software is\n * provided under the following open source license terms:\n *\n * The Alfresco Example Content Application is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * The Alfresco Example Content Application is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport * from './app.rules';\nexport * from './navigation.rules';\nexport * from './repository.rules';\nexport * from './user.rules';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["navigation.isFavorites","navigation.isLibraries","navigation.isTrashcan","repository.hasQuickShareEnabled","navigation.isSharedFiles","navigation.isPreview","navigation.isPersonalFiles","navigation.isLibraryContent","navigation.isRepositoryView","repository.isMajorVersionAvailable","navigation.isRecentFiles","navigation.isSearchResults"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;AAsBG;AAIH;;;AAGG;AACG,SAAU,SAAS,CAAC,OAAoB,EAAA;AAC5C,IAAA,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,UAAU;IAClC,OAAO,GAAG,KAAK,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACpG;AAEA;;;AAGG;AACG,SAAU,WAAW,CAAC,OAAoB,EAAA;AAC9C,IAAA,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,UAAU;AA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