1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="10bc491f-0186-56db-b2e4-c3b924498e6b")}catch(e){}}(); 3import { o as __toESM, t as __commonJSMin } from "./rolldown-runtime.D1cXj70v.js"; 4import { X as require_jsx_runtime, dt as require_react, t as require_material } from "./vendor~index~newNavigation~AccountTierManagementPage~AdminContainer~AISystemPromptManager~C~h0mf93xb.B-8UGg7U.js"; 5import { t as require_dist } from "./vendor~index~newNavigation~AccountTierManagementPage~AdminContainer~AISystemPromptManager~S~d59nl763.C6LdGoX3.js"; 6import { Br as isFeatureEnabled, Qg as permissions, Z as setErrorNotification, Zg as isPermitted, lt as NotificationSuccessText, so as featureFlagConst, st as NotificationErrorText, tt as setSuccessNotification } from "./logReportUtils.Ca-hg6bk.js"; 7import { a as SskyErrorCode } from "./errors.BNgEQKEw.js"; 8import { c as useAccountFeatureFullData, s as useAccountFeaturesAndPacksData } from "./faFilm.Dzt69dT8.js"; 9import { t as TruffleCircularProgress } from "./TruffleCircularProgress.C8BTwqVq.js"; 10import { o as openArticleInHelpCenter, t as InAppHelpCenterTrackingSource } from "./helpCenter.B-FM_f9-.js"; 11//#region client/utils/permissionUtils.ts 12var isPermittedToReadOnly = (userRoles) => isPermitted(userRoles, permissions.getEditorPrograms) && !isPermitted(userRoles, permissions.editEditorPrograms) && !isPermitted(userRoles, permissions.editProjects) || isPermitted(userRoles, permissions.getProjects) && !isPermitted(userRoles, permissions.editProjects) && !isPermitted(userRoles, permissions.editEditorPrograms); 13var isAiFeatureBlocked = (accountData, featureDefinition) => { 14 return accountData?.find((feature) => feature.featureTypeDefinition === featureDefinition)?.featureRestrictionValue.value; 15}; 16//#endregion 17//#region client/components/editor/Components/TruffleEditingWorkSpace/common/CommonSxProps.ts 18var selectedCheckIconSxProps = { 19 minWidth: "16px", 20 width: "16px", 21 height: "16px", 22 backgroundColor: "primary.main", 23 color: "common.white", 24 borderRadius: "16px", 25 display: "flex", 26 alignItems: "center", 27 justifyContent: "center", 28 "& svg": { 29 width: "8px", 30 height: "8px" 31 } 32}; 33var dialogTitleWithXSxProps = { 34 display: "flex", 35 justifyContent: "space-between", 36 alignItems: "center", 37 padding: "8px 4px 8px 32px" 38}; 39var dialogTitleTextSxProps = { padding: "10px 10px 10px 0" }; 40var dialogXButtonSxProps = { 41 width: "32px", 42 height: "32px", 43 gap: "10px", 44 ":hover": { 45 color: "primary.main", 46 backgroundColor: "action.hover" 47 } 48}; 49var tabsSxProps = { 50 height: "32px", 51 minHeight: "32px", 52 "& .MuiTabs-flexContainer": { 53 height: "32px", 54 gap: "4px" 55 } 56}; 57var tabSxProps = { 58 minHeight: "32px", 59 height: "32px", 60 textTransform: "unset", 61 borderBottom: (theme) => `2px solid ${theme.palette.divider}`, 62 "&:not(.Mui-selected)": { color: "secondary.light" }, 63 "&.Mui-selected": { color: "secondary.main" } 64}; 65//#endregion 66//#region node_modules/@fortawesome/pro-regular-svg-icons/faCloudArrowUp.js 67var require_faCloudArrowUp = /* @__PURE__ */ __commonJSMin(((exports) => { 68 Object.defineProperty(exports, "__esModule", { value: true }); 69 var prefix = "far"; 70 var iconName = "cloud-arrow-up"; 71 var width = 576; 72 var height = 512; 73 var aliases = [ 74 62338, 75 "cloud-upload", 76 "cloud-upload-alt" 77 ]; 78 var unicode = "f0ee"; 79 var svgPathData = "M240 32c-88.4 0-160 71.6-160 160 0 4.9 .2 9.8 .7 14.6-47.8 23.4-80.7 72.5-80.7 129.4 0 79.5 64.5 144 144 144l304 0c70.7 0 128-57.3 128-128 0-49.9-28.5-93-70.1-114.2 4-11.9 6.1-24.6 6.1-37.8 0-66.3-53.7-120-120-120-11.5 0-22.7 1.6-33.3 4.7-29.3-32.3-71.6-52.7-118.7-52.7zM128 192c0-61.9 50.1-112 112-112 37.7 0 71 18.6 91.3 47.1 6.7 9.5 19.3 12.8 29.8 7.8 9.3-4.4 19.7-6.9 30.8-6.9 39.8 0 72 32.2 72 72 0 14.1-4 27.2-11 38.3-4.1 6.5-4.8 14.6-2 21.7s9 12.5 16.5 14.3c34.8 8.7 60.5 40.2 60.5 77.6 0 44.2-35.8 80-80 80l-304 0c-53 0-96-43-96-96 0-42.7 27.9-79 66.6-91.4 11.8-3.8 18.8-16 16.1-28.1-1.8-7.9-2.7-16.1-2.7-24.5zm177 7c-9.4-9.4-24.6-9.4-33.9 0l-64 64c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l23-23 0 86.1c0 13.3 10.7 24 24 24s24-10.7 24-24l0-86.1 23 23c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-64-64z"; 80 exports.definition = { 81 prefix, 82 iconName, 83 icon: [ 84 width, 85 height, 86 aliases, 87 unicode, 88 svgPathData 89 ] 90 }; 91 exports.faCloudArrowUp = exports.definition; 92 exports.prefix = prefix; 93 exports.iconName = iconName; 94 exports.width = width; 95 exports.height = height; 96 exports.ligatures = aliases; 97 exports.unicode = unicode;
98 exports.svgPathData = svgPathData; 99 exports.aliases = aliases; 100})); 101//#endregion 102//#region client/components/common/TierRestrictionOutOfUsageDialog.tsx 103var import_react = /* @__PURE__ */ __toESM(require_react()); 104var import_material = require_material(); 105var import_dist = require_dist(); 106var import_jsx_runtime = require_jsx_runtime(); 107var defaultIcon = new URL("/client/images/tier-out-of-usage.DglLAKuW.svg", "" + import.meta.url).href; 108var DialogContentSxProps = { 109 display: "flex", 110 flexDirection: "column", 111 gap: "16px", 112 alignItems: "center", 113 justifyContent: "center", 114 padding: "8px 32px 32px 32px" 115}; 116var TierRestrictionOutOfUsageDialog = (props) => { 117 const [isContactSalesButtonLoading, setIsContactSalesButtonLoading] = (0, import_react.useState)(false); 118 const handleContactSales = async () => { 119 setIsContactSalesButtonLoading(true); 120 try { 121 if ((await props.onContactSalesButtonClick()).success) setSuccessNotification({ message: NotificationSuccessText.MailSentConfirmation }); 122 else setErrorNotification({ message: NotificationErrorText[SskyErrorCode.MailSendingFailed] }); 123 } finally { 124 setIsContactSalesButtonLoading(false); 125 } 126 props.onClose(); 127 }; 128 return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Dialog, { 129 open: props.open, 130 onClose: props.onClose, 131 maxWidth: "xs", 132 fullWidth: true, 133 children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dist.TruffleDialogTitle, { 134 CloseIconButtonProps: { onClick: props.onClose }, 135 HelpCenterIconButtonProps: { onClick: (event) => { 136 openArticleInHelpCenter({ 137 buttonId: props.helpCenterArticleButtonId, 138 anchorRef: event.currentTarget, 139 trackingSource: InAppHelpCenterTrackingSource.Editor, 140 trackingDialogName: props.primaryText 141 }); 142 } } 143 }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.DialogContent, { 144 sx: DialogContentSxProps,
145 children: props.loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TruffleCircularProgress, { size: "40px" }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [ 146 props.icon ? props.icon : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { 147 src: defaultIcon, 148 alt: "out of usage icon" 149 }), 150 !!props.creditsLabel && props.creditsLabel, 151 /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { 152 variant: "h3", 153 align: "center", 154 children: props.primaryText 155 }), 156 /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { 157 align: "center", 158 sx: { whiteSpace: "pre-line" }, 159 variant: "body1", 160 children: props.secondaryText 161 }), 162 /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Button, { 163 color: "primary", 164 variant: "contained", 165 onClick: handleContactSales, 166 "data-tracking-id": props.dataTrackingId, 167 loading: isContactSalesButtonLoading, 168 children: props.contactSalesButtonText ?? "Contact Sales" 169 }) 170 ] }) 171 })] 172 }); 173}; 174//#endregion 175//#region client/components/newNav/hooks/UseAccountCreditsInformation/useAccountCreditsAndFeatures.ts 176/** 177* Hook that combines useAccountFeatureFullData and useAccountFeaturesAndPacksData 178* Returns data from the appropriate source based on the feature flag 179*/ 180var useAccountCreditsAndFeatures = () => { 181 const isImprovedTiersAndCreditsEnabled = isFeatureEnabled(featureFlagConst._IMPROVED_TIERS_AND_CREDITS); 182 const { accountFeatureFullData, loading: oldDataLoading } = useAccountFeatureFullData(); 183 const { accountFeaturesAndPacksData, loading: newDataLoading } = useAccountFeaturesAndPacksData(!isImprovedTiersAndCreditsEnabled); 184 const loading = isImprovedTiersAndCreditsEnabled ? newDataLoading : oldDataLoading; 185 /** 186 * Gets the feature restriction value from the appropriate data source 187 * @param featureDefinition The feature definition to look for 188 * @param valueType The type of value to retrieve (allocated, usage, balance) 189 * @returns The feature restriction value 190 */ 191 const getFeatureValue = (featureDefinition, valueType = "allocated") => { 192 if (isImprovedTiersAndCreditsEnabled && newDataLoading) return; 193 if (isImprovedTiersAndCreditsEnabled) { 194 const feature = accountFeaturesAndPacksData?.find((feature) => feature.featureTypeDefinition === featureDefinition); 195 if (!feature) return; 196 return feature[valueType]; 197 } else if (accountFeatureFullData) { 198 const feature = accountFeatureFullData.find((feature) => feature.featureTypeDefinition === featureDefinition); 199 if (!feature) return; 200 if (valueType === "allocated") return feature.featureRestrictionValue?.value; 201 else if (valueType === "usage") return feature.featureCurrentUsageInfo?.value; 202 else if (valueType === "balance") return feature.featureRestrictionValue?.value - feature.featureCurrentUsageInfo?.value; 203 } 204 }; 205 /** 206 * Checks if a feature is blocked (for boolean features) 207 * @param featureDefinition The feature definition to check 208 * @returns True if the feature is blocked, false otherwise 209 */ 210 const isFeatureBlocked = (featureDefinition) => { 211 return !!getFeatureValue(featureDefinition); 212 }; 213 /** 214 * Gets all feature data for a specific feature 215 * @param featureDefinition The feature definition to get data for 216 * @returns An object with all feature data 217 */ 218 const getFeatureData = (featureDefinition) => { 219 if (isImprovedTiersAndCreditsEnabled && newDataLoading) return; 220 if (isImprovedTiersAndCreditsEnabled) return accountFeaturesAndPacksData?.find((feature) => feature.featureTypeDefinition === featureDefinition); 221 else { 222 const feature = accountFeatureFullData?.find((feature) => feature.featureTypeDefinition === featureDefinition); 223 if (!feature) return; 224 return { 225 id: feature.id, 226 accountId: feature.accountId, 227 featureTypeDefinition: feature.featureTypeDefinition, 228 allocated: feature.featureRestrictionValue?.value, 229 usage: feature.featureCurrentUsageInfo?.value, 230 balance: feature.featureRestrictionValue?.value - feature.featureCurrentUsageInfo?.value 231 }; 232 } 233 }; 234 return { 235 accountFeatureFullData, 236 accountFeaturesAndPacksData, 237 loading, 238 isImprovedTiersAndCreditsEnabled, 239 getFeatureValue, 240 isFeatureBlocked, 241 getFeatureData 242 }; 243}; 244//#endregion 245//#region node_modules/@fortawesome/pro-regular-svg-icons/faImage.js 246var require_faImage = /* @__PURE__ */ __commonJSMin(((exports) => { 247 Object.defineProperty(exports, "__esModule", { value: true }); 248 var prefix = "far"; 249 var iconName = "image"; 250 var width = 448; 251 var height = 512; 252 var aliases = []; 253 var unicode = "f03e"; 254 var svgPathData = "M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80zM0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm128 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm136 72c8.5 0 16.4 4.5 20.7 11.8l80 136c4.4 7.4 4.4 16.6 .1 24.1S352.6 384 344 384l-240 0c-8.9 0-17.2-5-21.3-12.9s-3.5-17.5 1.6-24.8l56-80c4.5-6.4 11.8-10.2 19.7-10.2s15.2 3.8 19.7 10.2l17.2 24.6 46.5-79c4.3-7.3 12.2-11.8 20.7-11.8z"; 255 exports.definition = { 256 prefix, 257 iconName, 258 icon: [ 259 width, 260 height, 261 aliases, 262 unicode, 263 svgPathData 264 ] 265 }; 266 exports.faImage = exports.definition; 267 exports.prefix = prefix; 268 exports.iconName = iconName; 269 exports.width = width; 270 exports.height = height; 271 exports.ligatures = aliases; 272 exports.unicode = unicode;
273 exports.svgPathData = svgPathData; 274 exports.aliases = aliases; 275})); 276//#endregion 277export { dialogTitleTextSxProps as a, selectedCheckIconSxProps as c, isAiFeatureBlocked as d, isPermittedToReadOnly as f, require_faCloudArrowUp as i, tabSxProps as l, useAccountCreditsAndFeatures as n, dialogTitleWithXSxProps as o, TierRestrictionOutOfUsageDialog as r, dialogXButtonSxProps as s, require_faImage as t, tabsSxProps as u }; 278 279//# sourceMappingURL=faImage.B8oHjXUm.js.map 280//# debugId=10bc491f-0186-56db-b2e4-c3b924498e6b
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.