twenty-sdk 2.50.0 → 2.51.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/build/descriptor.json +1 -1
  2. package/dist/{build-snapshot-DlB2VyNd.mjs → build-snapshot--GXJr4vI.mjs} +2 -2
  3. package/dist/{build-snapshot-C-NQg7fn.js → build-snapshot-D38u-ntr.js} +1 -1
  4. package/dist/build.cjs +1 -1
  5. package/dist/build.mjs +2 -2
  6. package/dist/{catalog-sync-DxcdSEBJ.js → catalog-sync-DJgluWIc.js} +1 -1
  7. package/dist/{catalog-sync-C6jv_xoa.mjs → catalog-sync-Z1uWs5Ge.mjs} +1 -1
  8. package/dist/cli/utilities/build/common/front-component-build/css-injection-plugin.d.ts +1 -2
  9. package/dist/cli/utilities/build/common/front-component-build/utils/unwrap-define-front-component-to-direct-export.d.ts +1 -1
  10. package/dist/cli.cjs +11 -11
  11. package/dist/cli.mjs +113 -113
  12. package/dist/{compile-application-BFhqkVqO.js → compile-application-BPxjs2Co.js} +5 -5
  13. package/dist/{compile-application-B2LfsDBX.mjs → compile-application-CU3rJlps.mjs} +1380 -1376
  14. package/dist/define/index.cjs +15 -12
  15. package/dist/define/index.cjs.map +1 -1
  16. package/dist/define/index.d.ts +22 -5
  17. package/dist/define/index.mjs +5555 -5128
  18. package/dist/define/index.mjs.map +1 -1
  19. package/dist/front-component/index.cjs +1 -1
  20. package/dist/front-component/index.cjs.map +1 -1
  21. package/dist/front-component/index.d.ts +6 -1
  22. package/dist/front-component/index.mjs +26 -15
  23. package/dist/front-component/index.mjs.map +1 -1
  24. package/dist/front-component-renderer/build.cjs +1 -1
  25. package/dist/front-component-renderer/build.mjs +1 -1
  26. package/dist/get-front-component-build-plugins-B0LNjbg4.js +883 -0
  27. package/dist/{get-front-component-build-plugins-QXeU8MwC.mjs → get-front-component-build-plugins-CnwC-jU8.mjs} +7178 -6721
  28. package/dist/logic-function/index.cjs.map +1 -1
  29. package/dist/logic-function/index.mjs.map +1 -1
  30. package/dist/{login-_eABINVq.mjs → login-CNV69o8l.mjs} +466 -466
  31. package/dist/{login-DkjpI4jn.js → login-CbjId2Zl.js} +9 -9
  32. package/dist/operations.cjs +1 -1
  33. package/dist/operations.mjs +2 -2
  34. package/dist/{package-DftRfrG7.mjs → package-CEEl5qZD.mjs} +6 -1
  35. package/dist/package-RzehG8GA.js +1 -0
  36. package/dist/{typecheck-application-DIe_vwjU.mjs → typecheck-application-aR7mCSHB.mjs} +1 -1
  37. package/package.json +8 -3
  38. package/dist/get-front-component-build-plugins-BcUjFnki.js +0 -880
  39. package/dist/package-vtLsH5RS.js +0 -1
@@ -1,5 +1,5 @@
1
- const e=require("./isDefined-Dtu5EYqP-CGZoVWsO.js"),t=require("./get-front-component-build-plugins-BcUjFnki.js"),n=require("./typecheck-application-BsaeLeXz.js");let r=require("path");r=e.i(r);let i=require("@sniptt/guards"),a=require("uuid"),o=require("crypto");o=e.i(o);let s=require("node:fs/promises"),c=require("node:fs"),l=require("node:path");l=e.i(l);let u=require("esbuild");u=e.i(u);let d=require("node:child_process"),f=require("sharp");f=e.i(f);let p=require("typescript");p=e.i(p);let m=require("fs/promises");m=e.i(m);let h=require("node:crypto"),g=require("module"),_=require("node:vm");_=e.i(_);let v=require("tinyglobby");var y=process.env.INIT_CWD||process.cwd(),b=448,x=384,S=async e=>{try{return await(0,s.access)(e),!0}catch{return!1}},C=e=>(0,c.existsSync)(e),w=e=>(0,s.mkdir)(e,{recursive:!0}),T=e=>(0,s.mkdir)(e,{recursive:!0,mode:b}),ee=async e=>{await T((0,l.dirname)(e));try{await(0,s.access)(e)}catch{await(0,s.writeFile)(e,``,{mode:x})}},te=async(e,t)=>{await T((0,l.dirname)(e));let n=await(0,s.open)(e,`w`,x);try{await n.chmod(x).catch(()=>void 0),await n.writeFile(t)}finally{await n.close()}},ne=async e=>{let t;try{t=await(0,s.readdir)(e)}catch(t){if(t instanceof Error&&`code`in t&&t.code===`ENOENT`){await(0,s.mkdir)(e,{recursive:!0});return}throw t}await Promise.all(t.map(t=>(0,s.rm)((0,l.join)(e,t),{recursive:!0,force:!0})))},re=(e,t)=>(0,s.cp)(e,t,{recursive:!0}),E=e=>(0,s.rm)(e,{recursive:!0,force:!0}),D=async e=>{let t=await(0,s.readFile)(e,`utf-8`);return JSON.parse(t)},ie=async(e,t)=>{await(0,s.writeFile)(e,JSON.stringify(t,null,2)+`
2
- `)},O=({sourcePath:e,destinationPath:t,dereferenceSymlinks:n=!1})=>n?(0,s.copyFile)(e,t):re(e,t),k=/^readme(\.[^.]+)?$/i,ae=e=>{let t=e.filter(e=>k.test(e));return t.find(e=>/\.md$/i.test(e))??t[0]},oe=async({appPath:e,relativeOutputDir:n=t.E,dereferenceSymlinks:r=!1})=>{let i=ae(await(0,s.readdir)(e));if(i===void 0)return;let a=(0,l.join)(e,n);await w(a),await O({sourcePath:(0,l.join)(e,i),destinationPath:(0,l.join)(a,i),dereferenceSymlinks:r})},se=`twenty-client-sdk`,A=async({result:e,appPath:n,fileFolder:i,lastChecksums:a,onFileBuilt:c})=>{let l=Object.keys(e.metafile?.outputs??{}).filter(e=>e.endsWith(`.mjs`));for(let u of l){let l=r.default.resolve(u),d=r.default.relative(n,l),f=e.metafile?.outputs?.[u]?.entryPoint||``,p=r.default.relative(n,f),m=await(0,s.readFile)(l),h=i===t.ht.BuiltFrontComponent?`sha256`:`md5`,g=o.default.createHash(h).update(m).digest(`hex`);if(a.get(d)===g)continue;a.set(d,g);let _=(e.metafile?.outputs?.[u])?.imports?.some(e=>e.external===!0&&e.path.startsWith(se))??!1;c&&await c({fileFolder:i,builtPath:d,sourcePath:p,checksum:g,usesSdkClient:_})}},ce=async({appPath:e,sourcePaths:t,fileFolder:n,buildOptions:i,onFileBuilt:a})=>{if(t.length===0)return;let o={};for(let n of t){let t=n.replace(/\.tsx?$/,``);o[t]=r.default.join(e,n)}await A({result:await u.build({...i,entryPoints:o}),appPath:e,fileFolder:n,lastChecksums:new Map,onFileBuilt:a})},le=async(e,t,n)=>{let i=new Set(n),a=t.filter(e=>!i.has(e));for(let t of a){let n=t.replace(/\.tsx?$/,`.mjs`),i=r.default.join(e,n),a=`${i}.map`;await E(i),await E(a)}},j=({config:e,errors:t=[],warnings:n=[]})=>({success:t.length===0,config:e,errors:t,warnings:n}),ue=e=>{let n=[],r=[];e.universalIdentifier||n.push(`Agent must have a universalIdentifier`),e.name||n.push(`Agent must have a name`),e.label||n.push(`Agent must have a label`),e.prompt||n.push(`Agent must have a prompt`),e.responseFormat||r.push(`Agent '${e.name}' has no responseFormat, it will default to { type: 'text' }. Set it explicitly to control the agent's output shape.`),(0,i.isNonEmptyString)(e.roleUniversalIdentifier)&&!(0,a.validate)(e.roleUniversalIdentifier)&&n.push(`Agent '${e.name}' roleUniversalIdentifier must be a valid UUID`);let o=e.triggers??[];o.length>t.d.MAX_TRIGGERS_PER_AGENT&&n.push(`Agent '${e.name}' cannot have more than ${t.d.MAX_TRIGGERS_PER_AGENT} triggers`);let s=o.map(e=>e.universalIdentifier);new Set(s).size!==s.length&&n.push(`Agent '${e.name}' trigger universalIdentifiers must be unique`);for(let r of o){(0,a.validate)(r.universalIdentifier)||n.push(`Agent '${e.name}' trigger universalIdentifier must be a valid UUID`),t.y.includes(r.type)||n.push(`Agent '${e.name}' trigger type must be one of: ${t.y.join(`, `)}`);let o=r.type===`DATABASE_EVENT`?r.settings?.eventName:null;r.type===`DATABASE_EVENT`&&(!(0,i.isNonEmptyString)(o)||!t.D.test(o))&&n.push(`Agent '${e.name}' trigger event name '${o}' must look like 'company.created'`),(r.instructions?.length??0)>t.d.MAX_INSTRUCTIONS_LENGTH&&n.push(`Agent '${e.name}' trigger instructions cannot exceed ${t.d.MAX_INSTRUCTIONS_LENGTH} characters`)}return j({config:e,errors:n,warnings:r})},de=e=>{let n=[],r=e.logo;r&&t.J(r)&&(n.push(`Application logo "${r}" is an external URL. External asset URLs are no longer supported and are ignored. Bundle the image in your public/ folder instead.`),r=void 0),!r&&e.logoUrl&&(t.J(e.logoUrl)?n.push(`Application logoUrl "${e.logoUrl}" is an external URL. External asset URLs are no longer supported and are ignored. Bundle the image in your public/ folder and reference it via logo.`):(n.push("`logoUrl` is deprecated. Use `logo` to reference an image bundled in your public/ folder."),r=e.logoUrl)),!e.galleryImages&&(e.screenshots?.length??0)>0&&n.push("`screenshots` is deprecated. Use `galleryImages` referencing images bundled in your public/ folder.");let i=(e.galleryImages??e.screenshots??[]).filter(e=>t.J(e)?(n.push(`Gallery image "${e}" is an external URL. External asset URLs are no longer supported and are ignored.`),!1):!0);return{logo:r,galleryImages:i,warnings:n}},fe=n=>{let r=[],a=[];n.universalIdentifier||r.push(`Application must have a universalIdentifier`),(!n.displayName||n.displayName.length===0)&&r.push(`Application must have a non empty display name`);for(let[i,o]of Object.entries(n.applicationVariables??{}))(o.type===t.It.SELECT||o.type===t.It.MULTI_SELECT)&&!t.q(o.options)&&r.push(`Application variable "${i}" of type ${o.type} must define non-empty options`),o.isRequired&&o.isDeprecated&&a.push(`Application variable "${i}" is both required and deprecated. \`isDeprecated\` wins: the variable is excluded from the application configuration check.`),e.t(o.scope)&&!t.s(o.scope)&&r.push(`Application variable "${i}" must have a known scope (${t.r.join(`, `)})`);let o=n.billing?.operations??{},s=n.billing?.recurring??{};for(let[n,a]of Object.entries(o))e.t(a)&&(t.f(a.operationType)||r.push(`Billable operation "${n}" must map to a known operationType (${t.l.join(`, `)})`),(0,i.isNonEmptyString)(a.label)||r.push(`Billable operation "${n}" must have a non empty label`));for(let[n,a]of Object.entries(s))e.t(a)&&(t.a(a.period)||r.push(`Recurring charge "${n}" must have a known period (${t.g.join(`, `)})`),e.t(a.per)&&!t._(a.per)&&r.push(`Recurring charge "${n}" must be charged per a known unit (${t.M.join(`, `)}) or omit \`per\` for a flat fee`),!Number.isSafeInteger(a.amountMicroCredits)||a.amountMicroCredits<=0?r.push(`Recurring charge "${n}" must have a positive integer amountMicroCredits`):a.amountMicroCredits>1e8&&r.push(`Recurring charge "${n}" exceeds the maximum amountMicroCredits of ${t.u}. A per-member charge declares the rate per member, not the total.`),(0,i.isNonEmptyString)(a.label)||r.push(`Recurring charge "${n}" must have a non empty label`),Object.prototype.hasOwnProperty.call(o,n)&&r.push(`"${n}" is declared both as a recurring charge and as a billable operation. Give them distinct names.`));for(let[e,t]of Object.entries(n.serverVariables??{}))t.isRequired&&t.isDeprecated&&a.push(`Server variable "${e}" is both required and deprecated. \`isDeprecated\` wins: the variable is excluded from the application configuration check.`);n.defaultRoleUniversalIdentifier&&a.push("`defaultRoleUniversalIdentifier` on defineApplication() is deprecated. Use defineApplicationRole() in your role file instead.");let{category:c}=n;(0,i.isNonEmptyString)(c)&&!t.i(c)&&a.push(`Application category "${c}" is not a known ApplicationCategory (${t.m.join(`, `)}). Arbitrary category strings are kept for backward compatibility and may be removed. Ask for a new category at https://github.com/twentyhq/twenty.`);let l=de(n);return a.push(...l.warnings),j({config:{...n,logo:l.logo,galleryImages:l.galleryImages},errors:r,warnings:a})},pe=e=>e.length>=2&&e.startsWith(`'`)&&e.endsWith(`'`),me=e=>Object.values(t.vt).includes(e),he=n=>{let{defaultValue:r,type:a}=n;return e.t(r)?(0,i.isString)(r)?pe(r)||me(r)?[]:[r]:Array.isArray(r)&&(a===t.It.MULTI_SELECT||a===t.It.ARRAY)?r.filter(e=>typeof e==`string`&&!pe(e)):a in t.ct&&t.ot(r)?Object.values(r).filter(e=>typeof e==`string`&&!pe(e)):[]:[]},ge=t=>e.t(t)?t.flatMap(e=>{let t=he(e);if(t.length===0)return[];let n=t[0];return[`Field "${e.label}" has string defaultValue(s) without surrounding single quotes: ${t.map(e=>`"${e}"`).join(`, `)}. Unquoted strings are reserved for computed defaults ('uuid', 'now'). To define a literal string default, wrap it in single quotes: "'${n}'" instead of "${n}".`]}):[],_e=n=>!t.W(n.type)||!Array.isArray(n.options)?[]:n.options.flatMap((r,i)=>t.ot(r)?!(`color`in r)||!e.t(r.color)||t.K(r.color)?[]:[`Field "${n.label}" option "${r.label}" has an unsupported color. Supported colors: ${t.st.join(`, `)}`]:[`Field "${n.label}" option at index ${i} must be an object`]),ve=e=>{if(!e)return[];let n=[];for(let r of e)(0,i.isNonEmptyString)(r.label)||n.push(`Field must have a label`),(0,i.isNonEmptyString)(r.name)||n.push(`Field "${r.label}" must have a name`),(0,i.isNonEmptyString)(r.universalIdentifier)||n.push(`Field "${r.label}" must have a universalIdentifier`),(r.type===t.It.SELECT||r.type===t.It.MULTI_SELECT)&&(!Array.isArray(r.options)||r.options.length===0)&&n.push(`Field "${r.label}" is a SELECT/MULTI_SELECT type and must have options`),n.push(..._e(r)),r.isUnique===!0&&(r.type===t.It.RELATION||r.type===t.It.MORPH_RELATION||r.type===t.It.FILES)&&n.push(`Field "${r.label}" of type ${r.type} cannot be unique`);return n},ye=e=>{let t=[];e.objectUniversalIdentifier||t.push(`Field must have an objectUniversalIdentifier`);let n=ve([e]);return t.push(...n),j({config:e,errors:t,warnings:ge([e])})},be=e=>{let t=[],n=[];return e.universalIdentifier||t.push(`CommandMenuItem must have a universalIdentifier`),e.label||t.push(`CommandMenuItem must have a label`),e.frontComponentUniversalIdentifier||t.push(`CommandMenuItem must have a frontComponentUniversalIdentifier (the universalIdentifier of the front component this command opens)`),e.icon&&n.push(`CommandMenuItem icon will be ignored in favor of application icon, you should remove it`),j({config:e,errors:t,warnings:n})},xe=[`created`,`updated`,`deleted`,`restored`,`linked`,`unlinked`],Se=t=>e.t(t)&&xe.includes(t),Ce=e=>{let n=[];e.universalIdentifier||n.push(`TimelineActivityType must have a universalIdentifier`),e.name||n.push(`TimelineActivityType must have a name`),e.label||n.push(`TimelineActivityType must have a label`),e.emit?.on&&!Se(e.emit.on)&&n.push(`TimelineActivityType emit.on ${e.emit.on} is not supported`),e.emit&&!(0,i.isNonEmptyString)(e.emit.on)&&n.push(`TimelineActivityType emit must have an on action`),e.emit&&!(0,i.isNonEmptyString)(e.emit.objectUniversalIdentifier)&&n.push(`TimelineActivityType emit must have an objectUniversalIdentifier`),e.emit?.through&&!(0,i.isNonEmptyString)(e.emit.through.relationFieldUniversalIdentifier)&&n.push(`TimelineActivityType emit.through must have a relationFieldUniversalIdentifier`),(e.emit?.on===`linked`||e.emit?.on===`unlinked`)&&!e.emit.through&&n.push(`TimelineActivityType linked and unlinked emitters require through routing`);let r=e.emit?.through?.triggerFieldUniversalIdentifiers;return r&&(e.emit?.on!==`updated`||!t.q(r))&&n.push(`TimelineActivityType emit.through.triggerFieldUniversalIdentifiers requires an updated event`),r&&new Set(r).size!==r.length&&n.push(`TimelineActivityType emit.through.triggerFieldUniversalIdentifiers must be unique`),e.replacesTimelineActivityTypeUniversalIdentifier&&!e.emit&&n.push(`TimelineActivityType replacesTimelineActivityTypeUniversalIdentifier requires emit`),j({config:e,errors:n})},we=n=>{let r=[];return(0,i.isNonEmptyString)(n.universalIdentifier)||r.push(`SettingsMenuItem must have a universalIdentifier`),(0,i.isNonEmptyString)(n.title)||r.push(`SettingsMenuItem must have a title`),(0,i.isNonEmptyString)(n.title)&&t.k(n.title)&&r.push(`SettingsMenuItem title "${n.title}" is reserved for the built-in settings menu item`),(0,i.isNonEmptyString)(n.frontComponentUniversalIdentifier)||r.push(`SettingsMenuItem must have a frontComponentUniversalIdentifier (the universalIdentifier of the front component this item renders)`),e.t(n.position)&&!Number.isFinite(n.position)&&r.push(`SettingsMenuItem position must be a number`),e.t(n.scope)&&!t.o.includes(n.scope)&&r.push(`SettingsMenuItem scope must be one of ${t.o.join(`, `)}`),j({config:n,errors:r,warnings:[]})},Te=e=>e===`then`,Ee=e=>typeof e==`symbol`,M=e=>{let t=()=>{throw Error(`"${e}" from twenty-sdk can only be used inside a command's conditionalAvailabilityExpression, not at runtime.`)};return new Proxy(function(){},{get:(e,n)=>{if(!(Te(n)||Ee(n)))return t()},apply:t,construct:t,has:t})},De=M(`pageType`),Oe=M(`isInSidePanel`),ke=M(`isDashboardPageLayoutInEditMode`),Ae=M(`isLayoutCustomizationModeEnabled`),N=M(`favoriteRecordIds`),je=M(`isSelectAll`),P=M(`hasAnySoftDeleteFilterOnView`),Me=M(`numberOfSelectedRecords`),Ne=M(`objectPermissions`),Pe=M(`selectedRecords`),Fe=M(`featureFlags`),Ie=M(`targetObjectReadPermissions`),Le=M(`targetObjectWritePermissions`),Re=M(`canImpersonate`),ze=M(`canAccessFullAdminPanel`),Be=M(`objectMetadataItem`),Ve=M(`objectMetadataLabel`),He=M(`isDefined`),Ue=M(`isNonEmptyString`),We=M(`includes`),Ge=M(`every`),Ke=M(`everyDefined`),qe=M(`everyEquals`),Je=M(`some`),Ye=M(`someDefined`),Xe=M(`someEquals`),Ze=M(`none`),Qe=M(`noneDefined`),$e=M(`noneEquals`),et=M(`someNonEmptyString`),tt=M(`includesEvery`),nt=n=>{let r=[];n.universalIdentifier||r.push(`Front component must have a universalIdentifier`),n.component||r.push(`Front component must have a component`),typeof n.component!=`function`&&r.push(`Front component component must be a React component`);let i=n.widgetAvailability;return e.t(i)&&`objectUniversalIdentifiers`in i&&e.t(i.objectUniversalIdentifiers)&&!t.q(i.objectUniversalIdentifiers)&&r.push(`Front component widgetAvailability.objectUniversalIdentifiers must not be empty: omit it to offer the component on every record page, or omit widgetAvailability to offer it nowhere`),j({config:n,errors:r})},rt=e=>{let t=[];return e.universalIdentifier||t.push(`Settings front component must have a universalIdentifier`),e.component?typeof e.component!=`function`&&t.push(`Settings front component component must be a React component`):t.push(`Settings front component must have a component`),j({config:e,errors:t})},it=e=>typeof e==`string`&&e.trim().length>0,at=e=>{let n=[];if(it(e.universalIdentifier)||n.push(`Index must have a universalIdentifier`),it(e.objectUniversalIdentifier)||n.push(`Index must reference an objectUniversalIdentifier`),!t.q(e.fields))n.push(`Index must have at least one field`);else{for(let t of e.fields)it(t.universalIdentifier)||n.push(`IndexField must have a universalIdentifier`),it(t.fieldUniversalIdentifier)||n.push(`IndexField must reference a fieldUniversalIdentifier`);let t=e.fields.map(e=>`${e.fieldUniversalIdentifier}::${e.subFieldName??``}`);new Set(t).size!==t.length&&n.push(`Index lists the same column twice`)}return j({config:e,errors:n})},ot=e=>{let t=[];return e.universalIdentifier||t.push(`Health check must have a universalIdentifier`),e.handler?typeof e.handler!=`function`&&t.push(`Health check handler must be a function`):t.push(`Health check must have a handler`),j({config:e,errors:t})},st=e=>{let n=[];return e.universalIdentifier||n.push(`Logic function must have a universalIdentifier`),e.handler||n.push(`Logic function must have a handler`),typeof e.handler!=`function`&&n.push(`Logic function handler must be a function`),e.httpRouteTriggerSettings&&(e.httpRouteTriggerSettings.path||n.push(`Route trigger must have a path`),e.httpRouteTriggerSettings.httpMethod||n.push(`Route trigger must have an httpMethod`)),e.serverRouteTriggerSettings?.httpMethods?.some(e=>e!==t.pt.GET&&e!==t.pt.POST)&&n.push(`Server route trigger only supports the GET and POST http methods`),e.cronTriggerSettings&&(e.cronTriggerSettings.pattern||n.push(`Cron trigger must have a pattern`)),e.databaseEventTriggerSettings&&(e.databaseEventTriggerSettings.eventName||n.push(`Database event trigger must have an eventName`)),j({config:e,errors:n})},ct=e=>{let t=[];return e.universalIdentifier||t.push(`Post install logic function must have a universalIdentifier`),e.handler||t.push(`Post install logic function must have a handler`),typeof e.handler!=`function`&&t.push(`Post install logic function handler must be a function`),j({config:e,errors:t})},lt=e=>{let t=[];return e.universalIdentifier||t.push(`Pre install logic function must have a universalIdentifier`),e.handler||t.push(`Pre install logic function must have a handler`),typeof e.handler!=`function`&&t.push(`Pre install logic function handler must be a function`),j({config:e,errors:t})},ut=e=>{let t=[];return e.universalIdentifier||t.push(`Uninstall logic function must have a universalIdentifier`),e.handler||t.push(`Uninstall logic function must have a handler`),typeof e.handler!=`function`&&t.push(`Uninstall logic function handler must be a function`),j({config:e,errors:t})},dt=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,ft=e=>dt.test(e),pt=/^[a-z][a-z0-9-]*$/,mt=[`oauth`],ht=[`identifyAccountLogicFunction`,`onConnectLogicFunction`,`onDisconnectLogicFunction`],gt=n=>{let r=[];n.universalIdentifier?ft(n.universalIdentifier)||r.push(`Connection provider universalIdentifier "${n.universalIdentifier}" must be a UUID. Generate one with \`uuidgen\` or any UUID v4 tool.`):r.push(`Connection provider must have a universalIdentifier`),n.name?pt.test(n.name)||r.push(`Connection provider name "${n.name}" must match ${pt} (used in URLs)`):r.push(`Connection provider must have a name`),n.displayName||r.push(`Connection provider must have a displayName`);for(let t of ht){let i=n[t];e.t(i)&&!ft(i.universalIdentifier)&&r.push(`Connection provider ${t}.universalIdentifier "${i.universalIdentifier}" must be the UUID universalIdentifier of a logic function in this app.`)}if(n.type?mt.includes(n.type)||r.push(`Connection provider type "${n.type}" is not supported. Supported types: ${mt.join(`, `)}.`):r.push("Connection provider must declare a `type` (e.g. 'oauth')"),e.t(n.scope)&&!t.C.includes(n.scope)&&r.push(`Connection provider scope must be one of ${t.C.join(`, `)}`),n.type===`oauth`){let e=n.oauth;e?(e.authorizationEndpoint||r.push(`OAuth connection provider must have an authorizationEndpoint`),e.tokenEndpoint||r.push(`OAuth connection provider must have a tokenEndpoint`),e.clientIdVariable||r.push(`OAuth connection provider must reference a clientIdVariable (key of a serverVariable on defineApplication)`),e.clientSecretVariable||r.push(`OAuth connection provider must reference a clientSecretVariable (key of a serverVariable on defineApplication)`),Array.isArray(e.scopes)||r.push(`OAuth connection provider must declare a scopes array`)):r.push("Connection provider with type 'oauth' must declare an `oauth` config block")}return j({config:n,errors:r})},_t=e=>{let t=[];return e.universalIdentifier||t.push(`NavigationMenuItem must have a universalIdentifier`),typeof e.position!=`number`&&t.push(`NavigationMenuItem must have a position`),j({config:e,errors:t})},vt=({fields:t,labelIdentifierFieldMetadataUniversalIdentifier:n})=>e.t(n)&&!t.some(e=>e.universalIdentifier===n),yt=e=>{let t=[];e.universalIdentifier||t.push(`Object must have a universalIdentifier`),e.nameSingular||t.push(`Object must have a nameSingular`),e.namePlural||t.push(`Object must have a namePlural`),e.labelSingular||t.push(`Object must have a labelSingular`),e.labelPlural||t.push(`Object must have a labelPlural`);let n=ve(e.fields);t.push(...n);let r=vt({fields:e.fields,labelIdentifierFieldMetadataUniversalIdentifier:e.labelIdentifierFieldMetadataUniversalIdentifier});return j({config:e,errors:t,warnings:[...ge(e.fields),...r?[`labelIdentifierFieldMetadataUniversalIdentifier of "${e.nameSingular}" names no field in its fields array; it must name a field the engine derives for this object, or the sync will fail to resolve it`]:[]]})};t.tt(),t.$();var bt=[`id`,`createdAt`,`updatedAt`,`deletedAt`,`createdBy`,`updatedBy`,`position`,`searchVector`],F=e=>Object.fromEntries(bt.map(n=>[n,{universalIdentifier:t.L({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:e,name:n})}])),I=e=>{let{id:t,createdAt:n,updatedAt:r,deletedAt:i}=F(e);return{id:t,createdAt:n,updatedAt:r,deletedAt:i}},L={agentChatThread:`fab0fff8-0c90-4116-9bb0-7dbc07392633`,agentChatThreadTarget:`9f2a5bf4-3a57-4e61-b561-eaf5a5b86973`,agentChatThreadParticipant:`a043622a-48ef-426f-b55d-3fdcf4ae52f2`,agentTurn:`63697477-8606-415e-86cb-be078d7fcf7e`,agentMessage:`62d0354c-3b99-4769-b0f5-4e2651c2ca7d`,agentMessagePart:`214bacb0-df89-494e-be42-e5b11c99cff6`,agentMessageReaction:`7d34e524-cbaf-4a53-b021-eb0313397f22`,campaignDelivery:`0c76066d-26f7-4f57-b0bd-0eb61465fb1a`,messageSuppression:`41410724-723c-48ab-8312-9b85131b4d84`,timelineActivity:`20202020-6736-4337-b5c4-8b39fae325a5`,attachment:`20202020-bd3d-4c60-8dca-571c71d4447a`,blocklist:`20202020-0408-4f38-b8a8-4d5e3e26e24d`,calendarChannelEventAssociation:`20202020-491b-4aaa-9825-afd1bae6ae00`,calendarEvent:`20202020-8f1d-4eef-9f85-0d1965e27221`,calendarEventTarget:`6a9b9656-3e23-4234-94a4-b913c5dde668`,calendarEventParticipant:`20202020-a1c3-47a6-9732-27e5b1e8436d`,callRecording:`ce19efb9-710f-45b2-b141-473abbeea60b`,noteTarget:`20202020-fff0-4b44-be82-bda313884400`,taskTarget:`20202020-5a9a-44e8-95df-771cd06d0fb1`,person:`20202020-e674-48e5-a542-72570eee7213`,recordShare:`fecdb92c-d150-4544-81f8-f1158d18a7a2`,company:`20202020-b374-4779-a561-80086cb2e17f`,opportunity:`20202020-9549-49dd-b2b2-883999db8938`,note:`20202020-0b00-45cd-b6f6-6cd806fc6804`,task:`20202020-1ba1-48ba-bc83-ef7e5990ed10`,workflow:`20202020-62be-406c-b9ca-8caa50d51392`,workflowAutomatedTrigger:`20202020-3319-4234-a34c-7f3b9d2e4d1f`,workflowVersion:`20202020-d65d-4ab9-9344-d77bfb376a3d`,workflowRun:`20202020-4e28-4e95-a9d7-6c00874f843c`,workspaceMember:`20202020-3319-4234-a34c-82d5c0e881a6`,dashboard:`20202020-3840-4b6d-9425-0c5188b05ca8`,message:`20202020-3f6b-4425-80ab-e468899ab4b2`,messageChannelMessageAssociation:`20202020-ad1e-4127-bccb-d83ae04d2ccb`,messageChannelMessageAssociationMessageFolder:`20202020-a1b0-40b0-8ab0-5b6c7d8e9f0a`,messageList:`826561ea-4816-411c-baa0-eec5e6ca8866`,messageListMember:`27773d24-8ce3-40f8-aa6c-1f590f2c08d2`,messageCampaign:`238acb94-dd4c-4036-bc55-19b99d821efd`,shortLink:`22c96608-d1b1-49a2-b328-3e738d61d82d`,messageParticipant:`20202020-a433-4456-aa2d-fd9cb26b774a`,messageThread:`20202020-849a-4c3e-84f5-a25a7d802271`,messageThreadTarget:`378ad1b0-592d-4084-80ee-86fef44725b9`},R={agentChatThread:{...I(L.agentChatThread),archivedAt:{universalIdentifier:`b42eaf6f-240f-41ef-af61-51d5ac9cde7d`},workspaceMember:{universalIdentifier:`6f3ed3b5-0642-4a2a-9558-98376adb60f4`},title:{universalIdentifier:`9283c05e-127c-46ec-82e9-6424a7c0a2f1`},totalInputTokens:{universalIdentifier:`2705f4af-24b8-4660-a8a8-8eff689298d1`},totalOutputTokens:{universalIdentifier:`77790c9c-0e91-4142-8482-d70576b8093b`},contextWindowTokens:{universalIdentifier:`c58dc0b0-bd0e-4ee2-8a80-615a2d8fc7c8`},conversationSize:{universalIdentifier:`f34617ff-a0de-4116-a5ad-7cfd1d0c6d5a`},totalInputCredits:{universalIdentifier:`3c0a9aa3-01b8-4191-bce4-dc9e77e2fe7a`},totalOutputCredits:{universalIdentifier:`40b2f6e5-eced-44f7-b391-0278ea7df7ef`},totalCacheReadTokens:{universalIdentifier:`494abfc8-d2f6-452c-913e-1f55d148f47f`},totalCacheCreationTokens:{universalIdentifier:`68bdb978-5ccb-4f64-9df2-8203b100c76a`},activeStreamId:{universalIdentifier:`bcead20f-75b3-45be-92b9-ea7ec4bddfcd`},pendingQuestionMessageId:{universalIdentifier:`51a9b421-7d90-4a59-9712-036ea9721e65`},turns:{universalIdentifier:`d5c88fbc-d318-4ee1-b70a-751a925bef5b`},messages:{universalIdentifier:`5c851a60-e5d9-4b1e-9926-c2eab6fc9e62`},attachments:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.agentChatThread,relationTargetObjectUniversalIdentifier:L.attachment})},recordTargets:{universalIdentifier:`5b37eceb-2992-4d27-9897-14af3e3ce9b2`},participants:{universalIdentifier:`2ede85e4-216b-4308-8556-b045971414e7`},assignee:{universalIdentifier:`e77858ef-4b01-4a32-b921-8b88b1fd3020`},lastActivityAt:{universalIdentifier:`b3847509-8e98-4038-88de-dd891767d6fc`},lastMessageText:{universalIdentifier:`1c16eaef-172b-4778-b14b-f302bc6021e4`},lastMessageSenderWorkspaceMemberId:{universalIdentifier:`5c3611a7-7324-472e-9b43-4c7779e5e7cf`},writerWorkspaceMemberIds:{universalIdentifier:`c8fe2406-ad9c-4274-aeb5-9beb74d4b353`}},agentChatThreadParticipant:{...I(L.agentChatThreadParticipant),thread:{universalIdentifier:`7d0282a5-11ce-4da8-a165-30909ffdf383`},workspaceMember:{universalIdentifier:`4345764d-878b-4a3a-b1c9-822378f868e6`},lastReadAt:{universalIdentifier:`7e3a8319-c127-4c4f-add4-6feac37ea555`},archivedAt:{universalIdentifier:`ee092c9d-f27e-4fbc-8dad-9ec950936216`},snoozedUntil:{universalIdentifier:`65bc5785-877d-4363-b65c-95175ba20fd0`},isSubscribed:{universalIdentifier:`146b1d5e-6603-4493-944b-c3bd2817569b`},lastMentionedAt:{universalIdentifier:`52a54602-633f-496a-966a-9a70437fa887`}},agentChatThreadTarget:{target:{universalIdentifier:`2c4cc537-39a2-4df9-81a1-dda26eb19658`},...I(L.agentChatThreadTarget),thread:{universalIdentifier:`54664c16-3c3d-4d5e-904c-59e1b3707cfb`},targetPerson:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.agentChatThreadTarget,relationTargetObjectUniversalIdentifier:L.person})},targetCompany:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.agentChatThreadTarget,relationTargetObjectUniversalIdentifier:L.company})},targetOpportunity:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.agentChatThreadTarget,relationTargetObjectUniversalIdentifier:L.opportunity})}},agentTurn:{...I(L.agentTurn),agentId:{universalIdentifier:`4ac55a9a-95e8-4fd9-8c03-47ee3b618ae7`},thread:{universalIdentifier:`4e9b4f1f-c1bb-42d0-bb38-eb2b2f830e64`},messages:{universalIdentifier:`737c3559-ea1a-4269-aea4-e672b17afbb1`},status:{universalIdentifier:`c17a4d49-f4f5-40e2-b084-11c5c4bae431`},error:{universalIdentifier:`b0ed90f6-5953-4c85-aff8-407a28ec8cc7`},startedAt:{universalIdentifier:`578977d7-b0d9-48d1-83f7-29ad6215a6f0`},endedAt:{universalIdentifier:`2b13f528-738b-402c-a033-7bbb0cce73a4`},modelId:{universalIdentifier:`b1e1c27b-03dc-40b1-8052-4474c15b8233`},inputTokens:{universalIdentifier:`0e419986-4255-4858-b252-e6a161d55f58`},outputTokens:{universalIdentifier:`3e7f5fb8-f9cf-45b2-b1a7-b36c1e8ff2fd`},cacheReadTokens:{universalIdentifier:`c2bcbbf5-81ce-4679-8f08-f6a3cc00569c`},cacheCreationTokens:{universalIdentifier:`4d9feae2-2a80-43b2-965d-8ad40f129503`},inputCredits:{universalIdentifier:`740456a7-c0be-4bc9-8429-52dc3e3a3707`},outputCredits:{universalIdentifier:`1ca5da82-b797-43a8-a2ee-d1a062a24ca5`},createdBy:{universalIdentifier:`c3d5e8a2-fde8-452d-a74d-04436aaf17bc`}},agentMessage:{...I(L.agentMessage),agentId:{universalIdentifier:`880a91ad-4ab1-4067-87f6-970a53aa2234`},senderWorkspaceMember:{universalIdentifier:`69bea8e1-451d-4c3c-9d34-505b5a67e06e`},senderApplicationId:{universalIdentifier:`d204d45a-6ccc-40cb-8281-b6ed635c247b`},role:{universalIdentifier:`5dc985f3-edad-4ebf-9844-b34ca686855b`},status:{universalIdentifier:`3845ccfa-9394-4cb9-a75c-4ca704414b83`},processedAt:{universalIdentifier:`b1a72274-095e-41f6-95d3-e5b407ff3f0b`},thread:{universalIdentifier:`48ea202f-ed6d-4ad9-8c9b-71a419b96237`},turn:{universalIdentifier:`b36513fc-ffaf-4e99-8686-b1aefca70b76`},parts:{universalIdentifier:`017e4930-118d-4624-8ce4-4e574f89f86d`},reactions:{universalIdentifier:`945e1e83-af08-45c9-8d6c-fb49f1e4a21c`}},agentMessageReaction:{...I(L.agentMessageReaction),message:{universalIdentifier:`18fec29f-89bd-4f33-8b80-f7a83a9a2e31`},workspaceMember:{universalIdentifier:`77265b6b-b634-426a-8972-8601947ca6ad`},agentId:{universalIdentifier:`08851641-cb7e-442c-a698-145ade9dd611`},emoji:{universalIdentifier:`88eeecdd-08a7-4744-bdd1-86b7f4a14394`}},agentMessagePart:{...I(L.agentMessagePart),orderIndex:{universalIdentifier:`d2b3e277-380c-4133-977d-f23f8092aebc`},type:{universalIdentifier:`16a59a7f-dc43-4483-84be-19c8ffd6c7a7`},textContent:{universalIdentifier:`d66ed60a-6c09-4427-a62a-1735e31b02de`},reasoningContent:{universalIdentifier:`34c24bb6-a34a-4373-b8b3-8be22fea3325`},toolName:{universalIdentifier:`ed705120-349b-4fce-afd4-15b8cab0df07`},toolCallId:{universalIdentifier:`151b6115-7071-4a1b-920d-43818907c69b`},toolInput:{universalIdentifier:`14476bb3-8b73-4428-b138-37bd7931e1d6`},toolOutput:{universalIdentifier:`5fe8ca78-52ab-466f-8fe7-cbfa618c5463`},state:{universalIdentifier:`6fa1fb8e-2335-4b48-838b-dd227958cab2`},providerExecuted:{universalIdentifier:`cbfee5eb-748e-4296-88be-ddc13393d88d`},errorMessage:{universalIdentifier:`f910bb7a-d1f8-4893-ad97-40342af62c21`},errorDetails:{universalIdentifier:`b9e6f2cf-b2ce-44fe-9507-d47805582654`},sourceUrlSourceId:{universalIdentifier:`cb66237e-f48a-4858-a882-2330978dcfdc`},sourceUrlUrl:{universalIdentifier:`31a94d35-03f2-41b7-aa2b-5615f286d2bb`},sourceUrlTitle:{universalIdentifier:`ad17f626-17fc-45e0-a09f-a61790a0f906`},sourceDocumentSourceId:{universalIdentifier:`a2afae35-4e3e-4fe5-bc96-9bb654adb810`},sourceDocumentMediaType:{universalIdentifier:`44a4e4f9-d005-493d-9832-3a217730eaf8`},sourceDocumentTitle:{universalIdentifier:`2951cfaa-d05e-47be-af17-c7af4685e4c0`},sourceDocumentFilename:{universalIdentifier:`2cdea0b3-0a4d-4fa8-b713-c0fbf0e0a2d4`},fileFilename:{universalIdentifier:`e908f82c-88d0-477b-a5f2-1798fc4090b8`},fileId:{universalIdentifier:`060b366e-bb3d-40b5-83e6-166629a40444`},providerMetadata:{universalIdentifier:`689d988e-3883-4ab6-9cf3-c36a3002f865`},message:{universalIdentifier:`efd41407-a49d-4a3a-97b4-94fd180e7652`}},campaignDelivery:{...I(L.campaignDelivery),campaignId:{universalIdentifier:`5b3b48cd-71ec-4ff6-bd4f-8ea99965d611`},personId:{universalIdentifier:`d12ac3bc-7d2c-4317-9c80-663e58ffbea2`},recipientEmail:{universalIdentifier:`28e61664-054b-4b41-b33b-d06b2fc7618f`},state:{universalIdentifier:`668eb863-852e-4846-b3f6-f74fc5d25cf9`},skipReason:{universalIdentifier:`86e995b9-467f-4570-a8f8-a647772e0944`},failureReason:{universalIdentifier:`5a080f14-de17-41a8-a2d7-e9287628db30`},claimToken:{universalIdentifier:`66b78eb0-7a53-4ad6-929a-156183490eb3`},claimExpiresAt:{universalIdentifier:`ba84a4ba-65ca-43dd-b72c-4b0f2f5b2f44`},providerMessageId:{universalIdentifier:`a560bd1a-716b-4fc3-b931-a34ff46bca6f`},sentAt:{universalIdentifier:`c4db7935-d927-49bd-80bd-01a6f39685a4`},deliveredAt:{universalIdentifier:`2cba1c4e-df5c-496d-8d0d-9f43fc371b5f`},bouncedAt:{universalIdentifier:`c3db41d4-3c48-4110-b3b3-a68cb82a1a78`},complainedAt:{universalIdentifier:`322301c5-62d6-428a-bc33-89f8eee75a47`},rejectedAt:{universalIdentifier:`de3599c8-d91b-42fb-a76f-34cd1826dd04`},renderingFailedAt:{universalIdentifier:`eca2b84e-a8d0-4641-bf16-48005e1826bd`}},messageSuppression:{...I(L.messageSuppression),emailAddress:{universalIdentifier:`d44cd615-c3ff-4ac5-a0cc-bfbda700df8e`},reason:{universalIdentifier:`2829a0be-f463-423c-810f-abf7b7a38454`},source:{universalIdentifier:`c0111315-babb-44ab-b4bb-8393ca7a4f98`},providerEventId:{universalIdentifier:`4959b0da-3ce2-42f7-8cc0-36fd20799a20`},unsubscribeTopicId:{universalIdentifier:`42c74315-d6d3-47f7-8f72-d7d40e41cc84`}},timelineActivity:{target:{universalIdentifier:`20202020-9a2b-4c3d-a4e5-f6a7b8c9d0e1`},...F(L.timelineActivity),timelineActivityTypeId:{universalIdentifier:`20202020-e5f8-4839-9dcf-781e260624ee`},timelineActivityTypeSnapshot:{universalIdentifier:`20202020-e006-493a-9b07-f2a768a204ca`},happensAt:{universalIdentifier:`20202020-9526-4993-b339-c4318c4d39f0`},properties:{universalIdentifier:`20202020-f142-4b04-b91b-6a2b4af3bf11`},workspaceMember:{universalIdentifier:`20202020-af23-4479-9a30-868edc474b36`},targetPerson:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.person})},targetCompany:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.company})},targetOpportunity:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.opportunity})},targetTask:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.task})},targetNote:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.note})},targetWorkflow:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.workflow})},targetWorkflowVersion:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.workflowVersion})},targetWorkflowRun:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.workflowRun})},targetDashboard:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.dashboard})},targetMessageList:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.messageList})},targetMessageCampaign:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.messageCampaign})},linkedRecordCachedName:{universalIdentifier:`20202020-cfdb-4bef-bbce-a29f41230934`},linkedRecordId:{universalIdentifier:`20202020-2e0e-48c0-b445-ee6c1e61687d`},linkedObjectMetadataId:{universalIdentifier:`20202020-c595-449d-9f89-562758c9ee69`}},attachment:{target:{universalIdentifier:`20202020-f634-435d-ab8d-e1168b375c69`},...F(L.attachment),name:{universalIdentifier:`20202020-87a5-48f8-bbf7-ade388825a57`},file:{universalIdentifier:`20202020-15db-460e-8166-c7b5d87ad4be`},fullPath:{universalIdentifier:`20202020-0d19-453d-8e8d-fbcda8ca3747`},fileCategory:{universalIdentifier:`20202020-8c3f-4d9e-9a1b-2e5f7a8c9d0e`},targetTask:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.attachment,relationTargetObjectUniversalIdentifier:L.task})},targetNote:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.attachment,relationTargetObjectUniversalIdentifier:L.note})},targetPerson:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.attachment,relationTargetObjectUniversalIdentifier:L.person})},targetCompany:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.attachment,relationTargetObjectUniversalIdentifier:L.company})},targetOpportunity:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.attachment,relationTargetObjectUniversalIdentifier:L.opportunity})},targetDashboard:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.attachment,relationTargetObjectUniversalIdentifier:L.dashboard})},targetWorkflow:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.attachment,relationTargetObjectUniversalIdentifier:L.workflow})},targetAgentChatThread:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.attachment,relationTargetObjectUniversalIdentifier:L.agentChatThread})}},blocklist:{...F(L.blocklist),handle:{universalIdentifier:`20202020-eef3-44ed-aa32-4641d7fd4a3e`},scope:{universalIdentifier:`20202020-1a5f-4c9e-9b3e-7d2a6f4c8e11`},workspaceMember:{universalIdentifier:`20202020-548d-4084-a947-fa20a39f7c06`}},calendarChannelEventAssociation:{...F(L.calendarChannelEventAssociation),calendarChannelId:{universalIdentifier:`20202020-93ee-4da4-8d58-0282c4a9cb7d`},calendarEvent:{universalIdentifier:`20202020-5aa5-437e-bb86-f42d457783e3`},eventExternalId:{universalIdentifier:`20202020-9ec8-48bb-b279-21d0734a75a1`},recurringEventExternalId:{universalIdentifier:`20202020-c58f-4c69-9bf8-9518fa31aa50`}},calendarEventParticipant:{...F(L.calendarEventParticipant),calendarEvent:{universalIdentifier:`20202020-fe3a-401c-b889-af4f4657a861`},handle:{universalIdentifier:`20202020-8692-4580-8210-9e09cbd031a7`},displayName:{universalIdentifier:`20202020-ee1e-4f9f-8ac1-5c0b2f69691e`},isOrganizer:{universalIdentifier:`20202020-66e7-4e00-9e06-d06c92650580`},responseStatus:{universalIdentifier:`20202020-cec0-4be8-8fba-c366abc23147`},person:{universalIdentifier:`20202020-5761-4842-8186-e1898ef93966`},workspaceMember:{universalIdentifier:`20202020-20e4-4591-93ed-aeb17a4dcbd2`}},calendarEvent:{...F(L.calendarEvent),title:{universalIdentifier:`20202020-080e-49d1-b21d-9702a7e2525c`},isCanceled:{universalIdentifier:`20202020-335b-4e04-b470-43b84b64863c`},isFullDay:{universalIdentifier:`20202020-551c-402c-bb6d-dfe9efe86bcb`},startsAt:{universalIdentifier:`20202020-2c57-4c75-93c5-2ac950a6ed67`},endsAt:{universalIdentifier:`20202020-2554-4ee1-a617-17907f6bab21`},externalCreatedAt:{universalIdentifier:`20202020-9f03-4058-a898-346c62181599`},externalUpdatedAt:{universalIdentifier:`20202020-b355-4c18-8825-ef42c8a5a755`},description:{universalIdentifier:`20202020-52c4-4266-a98f-e90af0b4d271`},location:{universalIdentifier:`20202020-641a-4ffe-960d-c3c186d95b17`},iCalUid:{universalIdentifier:`20202020-f24b-45f4-b6a3-d2f9fcb98714`},conferenceSolution:{universalIdentifier:`20202020-1c3f-4b5a-b526-5411a82179eb`},conferenceLink:{universalIdentifier:`20202020-35da-43ef-9ca0-e936e9dc237b`},calendarChannelEventAssociations:{universalIdentifier:`20202020-bdf8-4572-a2cc-ecbb6bcc3a02`},calendarEventParticipants:{universalIdentifier:`20202020-e07e-4ccb-88f5-6f3d00458eec`},calendarEventTargets:{universalIdentifier:`2b4a0785-3462-485f-b1a8-79ebb2078eab`},callRecordings:{universalIdentifier:`48d6d151-18e2-4111-b405-d85fb9d860d8`}},calendarEventTarget:{target:{universalIdentifier:`676e9f68-7b5c-41e6-b46d-2fb9527b7051`},...F(L.calendarEventTarget),calendarEvent:{universalIdentifier:`a47824b0-0e64-4c1f-bbad-ce45209d119b`},isAutomaticallyAssigned:{universalIdentifier:`b6374fed-9cf2-49ef-b45a-1d6814c16264`},isManuallyAssigned:{universalIdentifier:`6afbd5b8-25b5-4c04-82e5-281e6f90f453`},targetPerson:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.calendarEventTarget,relationTargetObjectUniversalIdentifier:L.person})},targetCompany:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.calendarEventTarget,relationTargetObjectUniversalIdentifier:L.company})},targetOpportunity:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.calendarEventTarget,relationTargetObjectUniversalIdentifier:L.opportunity})}},callRecording:{...F(L.callRecording),title:{universalIdentifier:`4cff8863-a1d1-45fd-a370-4eb6aa1f2a5b`},status:{universalIdentifier:`3e617680-d93e-4309-a54f-90f69528bfd7`},recordingRequestStatus:{universalIdentifier:`7fd681c9-244c-4e98-8939-7b175d472638`},applicationId:{universalIdentifier:`24ec1239-1240-42cb-8a2d-302632378e09`},externalBotId:{universalIdentifier:`0a2da128-9bcc-488b-bc31-65318c41bdf9`},externalRecordingId:{universalIdentifier:`6d17fb71-324b-4625-a5be-b3580607e2c7`},startedAt:{universalIdentifier:`6c56c23f-1987-410a-860a-df3b2b3f9a33`},endedAt:{universalIdentifier:`7a38a9cf-8424-4d6e-b80a-6883d3c662ef`},video:{universalIdentifier:`bb9523d3-457e-4f4b-8c79-27a77afb87da`},audio:{universalIdentifier:`2eafc2d0-8fec-430c-a939-65ca5fbc0f08`},transcript:{universalIdentifier:`27b86d68-57d1-4607-aca0-191896b1ad43`},summary:{universalIdentifier:`adb0f472-756b-4d3f-b21e-ea32bf73a5e4`},calendarEvent:{universalIdentifier:`49e64b28-bd98-4775-80ea-4781bdd45e35`}},company:{...F(L.company),name:{universalIdentifier:`20202020-4d99-4e2e-a84c-4a27837b1ece`},domainName:{universalIdentifier:`20202020-0c28-43d8-8ba5-3659924d3489`},address:{universalIdentifier:`20202020-c5ce-4adc-b7b6-9c0979fc55e7`},linkedinLink:{universalIdentifier:`20202020-ebeb-4beb-b9ad-6848036fb451`},annualRevenue:{universalIdentifier:`60f533b7-2166-4071-a767-ceb0286822fd`},people:{universalIdentifier:`20202020-3213-4ddf-9494-6422bcff8d7c`},accountOwner:{universalIdentifier:`20202020-95b8-4e10-9881-edb5d4765f9d`},taskTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.company,relationTargetObjectUniversalIdentifier:L.taskTarget})},noteTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.company,relationTargetObjectUniversalIdentifier:L.noteTarget})},agentChatThreadTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.company,relationTargetObjectUniversalIdentifier:L.agentChatThreadTarget})},calendarEventTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.company,relationTargetObjectUniversalIdentifier:L.calendarEventTarget})},messageThreadTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.company,relationTargetObjectUniversalIdentifier:L.messageThreadTarget})},opportunities:{universalIdentifier:`20202020-add3-4658-8e23-d70dccb6d0ec`},attachments:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.company,relationTargetObjectUniversalIdentifier:L.attachment})},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.company,relationTargetObjectUniversalIdentifier:L.timelineActivity})}},dashboard:{...F(L.dashboard),title:{universalIdentifier:`20202020-20ee-4091-95dc-44b57eda3a89`},pageLayoutId:{universalIdentifier:`20202020-bb53-4648-aa36-1d9d54e6f7f2`},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.dashboard,relationTargetObjectUniversalIdentifier:L.timelineActivity})},attachments:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.dashboard,relationTargetObjectUniversalIdentifier:L.attachment})}},messageCampaign:{...F(L.messageCampaign),name:{universalIdentifier:`dc8bca0e-37c4-4b78-814d-2e91124274e3`},subject:{universalIdentifier:`7251544c-b07a-4f0d-9d0a-48514367f230`},bodyTemplate:{universalIdentifier:`b3a69d08-31ca-4a8d-8359-5ca462899342`},fromAddress:{universalIdentifier:`91e1a33c-c1ff-411a-b720-9085e13c05db`},status:{universalIdentifier:`c7117256-3de6-48e1-87df-c99c32bad610`},scheduledAt:{universalIdentifier:`0b281092-f5a5-4dd6-969b-5229f6620071`},sentAt:{universalIdentifier:`e2315b4f-9edf-4df2-96b9-961e76368671`},sentCount:{universalIdentifier:`2f333d2b-37b8-4ddc-ad0d-c07c6ce066ad`},deliveredCount:{universalIdentifier:`f4ee1d33-7379-42fe-ad63-e023449baea6`},failedCount:{universalIdentifier:`d373fcd7-b1ce-4c77-8031-a5785c475028`},bouncedCount:{universalIdentifier:`20d884a9-34dd-4667-8ecb-ceec224258e2`},complainedCount:{universalIdentifier:`82842cfa-f12a-4bab-bbde-b2cf587d0406`},skippedCount:{universalIdentifier:`a1f4c6d2-5e8b-4a37-9c60-31b7f0d2a984`},uniqueClickCount:{universalIdentifier:`d9a4e1c6-5b3f-4e0a-9c8d-4f7b9a3e6c12`},clickRate:{universalIdentifier:`7999aebc-51f4-4b93-9925-717db707c703`},uniqueOpenCount:{universalIdentifier:`865d188f-3178-4173-a986-80d01a8c7147`},openRate:{universalIdentifier:`77529a55-d723-4c91-9df7-0190fd760e93`},unsubscribeTopicId:{universalIdentifier:`0648e7ad-1769-4ff6-a4d5-72da79ef169c`},list:{universalIdentifier:`cb24dcdf-f0e8-4c71-8cff-70b714e86530`},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.messageCampaign,relationTargetObjectUniversalIdentifier:L.timelineActivity})},messages:{universalIdentifier:`e5a177a7-512b-4778-928e-69777a528f7c`},recipients:{universalIdentifier:`05a3271c-5b91-493c-8f30-2d27b31d019e`}},messageList:{...F(L.messageList),name:{universalIdentifier:`69b9ed8b-7b26-4108-894f-05700ef7e8ee`},description:{universalIdentifier:`2484463a-12e0-411e-9586-81892bd7721c`},members:{universalIdentifier:`92df3493-91cf-4665-8587-1b08917d299b`},campaigns:{universalIdentifier:`e098d838-31ab-4812-91a8-f055f45a6832`},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.messageList,relationTargetObjectUniversalIdentifier:L.timelineActivity})}},messageListMember:{...F(L.messageListMember),person:{universalIdentifier:`34288425-8805-42fb-8b98-ee13d09be3d3`},list:{universalIdentifier:`d5402005-e8f9-4fbe-8696-b6723cd85018`}},messageChannelMessageAssociation:{...F(L.messageChannelMessageAssociation),messageChannelId:{universalIdentifier:`20202020-b658-408f-bd46-3bd2d15d7e52`},message:{universalIdentifier:`20202020-da5d-4ac5-8743-342ab0a0336b`},messageExternalId:{universalIdentifier:`20202020-37d6-438f-b6fd-6503596c8f34`},messageThread:{universalIdentifier:`20202020-fac8-42a8-94dd-44dbc920ae16`},messageThreadExternalId:{universalIdentifier:`20202020-35fb-421e-afa0-0b8e8f7f9018`},direction:{universalIdentifier:`75c9b0f7-9e76-44d4-a2f9-47051e61eec7`},messageFolders:{universalIdentifier:`9bfc9da7-ae2d-44fd-9563-ede90c5d6222`}},messageChannelMessageAssociationMessageFolder:{...F(L.messageChannelMessageAssociationMessageFolder),messageChannelMessageAssociation:{universalIdentifier:`7411cfa3-4fd9-4b90-a636-940015fd7243`},messageFolderId:{universalIdentifier:`b3369d31-3856-4a7a-b007-ee353918127c`}},messageParticipant:{...F(L.messageParticipant),message:{universalIdentifier:`20202020-985b-429a-9db9-9e55f4898a2a`},role:{universalIdentifier:`20202020-65d1-42f4-8729-c9ec1f52aecd`},handle:{universalIdentifier:`20202020-2456-464e-b422-b965a4db4a0b`},displayName:{universalIdentifier:`20202020-36dd-4a4f-ac02-228425be9fac`},person:{universalIdentifier:`20202020-249d-4e0f-82cd-1b9df5cd3da2`},workspaceMember:{universalIdentifier:`20202020-77a7-4845-99ed-1bcbb478be6f`},messageCampaign:{universalIdentifier:`5bc768db-919f-41da-8c43-df08084d526f`}},messageThread:{...F(L.messageThread),messages:{universalIdentifier:`20202020-3115-404f-aade-e1154b28e35a`},messageChannelMessageAssociations:{universalIdentifier:`20202020-314e-40a4-906d-a5d5d6c285f6`},subject:{universalIdentifier:`a8ddbf8c-1137-45d1-b89e-5ffbd83f67c8`},messageThreadTargets:{universalIdentifier:`8d7c8b17-b835-4082-96bd-de704c491d49`}},messageThreadTarget:{target:{universalIdentifier:`e85e853d-c26e-41b3-bec0-7afc4bdbc2f7`},...F(L.messageThreadTarget),messageThread:{universalIdentifier:`23ca09e6-149d-452f-bed7-a4aad24d1314`},isAutomaticallyAssigned:{universalIdentifier:`04403730-e960-415a-8790-f0c0f82f3477`},isManuallyAssigned:{universalIdentifier:`16efa36f-d195-42e9-959f-6928164f2395`},targetPerson:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.messageThreadTarget,relationTargetObjectUniversalIdentifier:L.person})},targetCompany:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.messageThreadTarget,relationTargetObjectUniversalIdentifier:L.company})},targetOpportunity:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.messageThreadTarget,relationTargetObjectUniversalIdentifier:L.opportunity})}},message:{...F(L.message),headerMessageId:{universalIdentifier:`20202020-72b5-416d-aed8-b55609067d01`},messageThread:{universalIdentifier:`20202020-30f2-4ccd-9f5c-e41bb9d26214`},subject:{universalIdentifier:`20202020-52d1-4036-b9ae-84bd722bb37a`},text:{universalIdentifier:`20202020-d2ee-4e7e-89de-9a0a9044a143`},receivedAt:{universalIdentifier:`20202020-140a-4a2a-9f86-f13b6a979afc`},messageParticipants:{universalIdentifier:`20202020-7cff-4a74-b63c-73228448cbd9`},messageChannelMessageAssociations:{universalIdentifier:`20202020-3cef-43a3-82c6-50e7cfbc9ae4`},messageCampaign:{universalIdentifier:`77cff00b-a0ba-48d6-80de-0d5ccf14e45b`},isDraft:{universalIdentifier:`20202020-4d3a-4b6e-9c1f-2a5e7b9d0c34`}},note:{...F(L.note),title:{universalIdentifier:`20202020-faeb-4c76-8ba6-ccbb0b4a965f`},bodyV2:{universalIdentifier:`20202020-a7bb-4d94-be51-8f25181502c8`},noteTargets:{universalIdentifier:`20202020-1f25-43fe-8b00-af212fdde823`},attachments:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.note,relationTargetObjectUniversalIdentifier:L.attachment})},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.note,relationTargetObjectUniversalIdentifier:L.timelineActivity})}},noteTarget:{target:{universalIdentifier:`20202020-f635-435d-ab8d-e1168b375c70`},...F(L.noteTarget),note:{universalIdentifier:`20202020-57f3-4f50-9599-fc0f671df003`},targetPerson:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.noteTarget,relationTargetObjectUniversalIdentifier:L.person})},targetCompany:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.noteTarget,relationTargetObjectUniversalIdentifier:L.company})},targetOpportunity:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.noteTarget,relationTargetObjectUniversalIdentifier:L.opportunity})}},opportunity:{...F(L.opportunity),name:{universalIdentifier:`20202020-8609-4f65-a2d9-44009eb422b5`},amount:{universalIdentifier:`20202020-583e-4642-8533-db761d5fa82f`},closeDate:{universalIdentifier:`20202020-527e-44d6-b1ac-c4158d307b97`},stage:{universalIdentifier:`20202020-6f76-477d-8551-28cd65b2b4b9`},pointOfContact:{universalIdentifier:`20202020-8dfb-42fc-92b6-01afb759ed16`},company:{universalIdentifier:`20202020-cbac-457e-b565-adece5fc815f`},owner:{universalIdentifier:`20202020-be7e-4d1e-8e19-3d5c7c4b9f2a`},taskTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.opportunity,relationTargetObjectUniversalIdentifier:L.taskTarget})},noteTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.opportunity,relationTargetObjectUniversalIdentifier:L.noteTarget})},agentChatThreadTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.opportunity,relationTargetObjectUniversalIdentifier:L.agentChatThreadTarget})},calendarEventTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.opportunity,relationTargetObjectUniversalIdentifier:L.calendarEventTarget})},messageThreadTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.opportunity,relationTargetObjectUniversalIdentifier:L.messageThreadTarget})},attachments:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.opportunity,relationTargetObjectUniversalIdentifier:L.attachment})},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.opportunity,relationTargetObjectUniversalIdentifier:L.timelineActivity})}},person:{...F(L.person),name:{universalIdentifier:`20202020-3875-44d5-8c33-a6239011cab8`},emails:{universalIdentifier:`20202020-3c51-43fa-8b6e-af39e29368ab`},linkedinLink:{universalIdentifier:`20202020-f1af-48f7-893b-2007a73dd508`},jobTitle:{universalIdentifier:`20202020-b0d0-415a-bef9-640a26dacd9b`},phones:{universalIdentifier:`20202020-0638-448e-8825-439134618022`},avatarUrl:{universalIdentifier:`20202020-b8a6-40df-961c-373dc5d2ec21`},avatarFile:{universalIdentifier:`20202020-a7c9-4e3d-8f1b-2d5a6b7c8e9f`},company:{universalIdentifier:`20202020-e2f3-448e-b34c-2d625f0025fd`},pointOfContactForOpportunities:{universalIdentifier:`20202020-911b-4a7d-b67b-918aa9a5b33a`},taskTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.person,relationTargetObjectUniversalIdentifier:L.taskTarget})},noteTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.person,relationTargetObjectUniversalIdentifier:L.noteTarget})},agentChatThreadTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.person,relationTargetObjectUniversalIdentifier:L.agentChatThreadTarget})},calendarEventTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.person,relationTargetObjectUniversalIdentifier:L.calendarEventTarget})},messageThreadTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.person,relationTargetObjectUniversalIdentifier:L.messageThreadTarget})},attachments:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.person,relationTargetObjectUniversalIdentifier:L.attachment})},messageParticipants:{universalIdentifier:`20202020-498e-4c61-8158-fa04f0638334`},calendarEventParticipants:{universalIdentifier:`20202020-52ee-45e9-a702-b64b3753e3a9`},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.person,relationTargetObjectUniversalIdentifier:L.timelineActivity})},listMemberships:{universalIdentifier:`8b8d1be0-4c94-4413-a2c9-c7ede205a81d`}},recordShare:{...F(L.recordShare),recordId:{universalIdentifier:`01edb657-6339-475c-b581-784a0c3e0509`},objectMetadataId:{universalIdentifier:`504cec47-6aae-4e5b-85fd-1581b62602e3`},principalId:{universalIdentifier:`c1849ee2-1d2a-409e-800d-16fc16621257`},principalType:{universalIdentifier:`556161f6-1a01-478e-8f01-acc413102e44`},accessLevel:{universalIdentifier:`943b9926-9620-43de-8a46-8ebfee74dea3`},rowCause:{universalIdentifier:`be27640e-f739-4d07-8979-dba4526e406a`},sourceId:{universalIdentifier:`534a2244-9feb-4d21-afd9-c9a20052b300`}},shortLink:{...F(L.shortLink),authoredTemplateUrl:{universalIdentifier:`6f588340-ddff-4113-984b-c37c045d496c`},resolvedDestinationUrl:{universalIdentifier:`5ba068eb-0594-4945-9183-7174a37a9406`},templateAndResolvedUrlHash:{universalIdentifier:`175f7743-b027-4374-b577-6503679d00fc`}},task:{...F(L.task),title:{universalIdentifier:`20202020-b386-4cb7-aa5a-08d4a4d92680`},bodyV2:{universalIdentifier:`20202020-4aa0-4ae8-898d-7df0afd47ab1`},dueAt:{universalIdentifier:`20202020-fd99-40da-951b-4cb9a352fce3`},status:{universalIdentifier:`20202020-70bc-48f9-89c5-6aa730b151e0`},taskTargets:{universalIdentifier:`20202020-de9c-4d0e-a452-713d4a3e5fc7`},attachments:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.task,relationTargetObjectUniversalIdentifier:L.attachment})},assignee:{universalIdentifier:`20202020-065a-4f42-a906-e20422c1753f`},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.task,relationTargetObjectUniversalIdentifier:L.timelineActivity})}},taskTarget:{target:{universalIdentifier:`20202020-f636-435d-ab8d-e1168b375c71`},...F(L.taskTarget),task:{universalIdentifier:`20202020-e881-457a-8758-74aaef4ae78a`},targetPerson:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.taskTarget,relationTargetObjectUniversalIdentifier:L.person})},targetCompany:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.taskTarget,relationTargetObjectUniversalIdentifier:L.company})},targetOpportunity:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.taskTarget,relationTargetObjectUniversalIdentifier:L.opportunity})}},workflow:{...F(L.workflow),name:{universalIdentifier:`20202020-b3d3-478f-acc0-5d901e725b20`},lastPublishedVersionId:{universalIdentifier:`20202020-326a-4fba-8639-3456c0a169e8`},coreWorkflowId:{universalIdentifier:`20202020-058a-42ad-8eb8-0662a5552aad`},statuses:{universalIdentifier:`20202020-357c-4432-8c50-8c31b4a552d9`},versions:{universalIdentifier:`20202020-9432-416e-8f3c-27ee3153d099`},runs:{universalIdentifier:`20202020-759b-4340-b58b-e73595c4df4f`},automatedTriggers:{universalIdentifier:`20202020-3319-4234-a34c-117ecad2b8a9`},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.workflow,relationTargetObjectUniversalIdentifier:L.timelineActivity})},attachments:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.workflow,relationTargetObjectUniversalIdentifier:L.attachment})}},workflowAutomatedTrigger:{...F(L.workflowAutomatedTrigger),type:{universalIdentifier:`20202020-3319-4234-a34c-3f92c1ab56e7`},settings:{universalIdentifier:`20202020-3319-4234-a34c-bac8f903de12`},workflow:{universalIdentifier:`20202020-3319-4234-a34c-8e1a4d2f7c03`}},workflowRun:{...F(L.workflowRun),name:{universalIdentifier:`20202020-b840-4253-aef9-4e5013694587`},workflowVersion:{universalIdentifier:`20202020-2f52-4ba8-8dc4-d0d6adb9578d`},workflow:{universalIdentifier:`20202020-8c57-4e7f-84f5-f373f68e1b82`},enqueuedAt:{universalIdentifier:`20202020-f1e3-4de1-a461-b5c4fdbc861d`},startedAt:{universalIdentifier:`20202020-a234-4e2d-bd15-85bcea6bb183`},endedAt:{universalIdentifier:`20202020-e1c1-4b6b-bbbd-b2beaf2e159e`},status:{universalIdentifier:`20202020-6b3e-4f9c-8c2b-2e5b8e6d6f3b`},state:{universalIdentifier:`20202020-611f-45f3-9cde-d64927e8ec57`},stepLogs:{universalIdentifier:`20202020-7c4e-4e1a-8fc1-1e3a55d6c2a1`},coreWorkflowId:{universalIdentifier:`e07d8ac0-6b6e-4685-81fa-50d82ae7f880`},coreWorkflowVersionId:{universalIdentifier:`58e3f476-425d-4c66-b391-779d0412e107`},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.workflowRun,relationTargetObjectUniversalIdentifier:L.timelineActivity})}},workflowVersion:{...F(L.workflowVersion),name:{universalIdentifier:`20202020-a12f-4cca-9937-a2e40cc65509`},workflow:{universalIdentifier:`20202020-afa3-46c3-91b0-0631ca6aa1c8`},trigger:{universalIdentifier:`20202020-4eae-43e7-86e0-212b41a30b48`},status:{universalIdentifier:`20202020-5a34-440e-8a25-39d8c3d1d4cf`},runs:{universalIdentifier:`20202020-1d08-46df-901a-85045f18099a`},steps:{universalIdentifier:`20202020-5988-4a64-b94a-1f9b7b989039`},coreWorkflowVersionId:{universalIdentifier:`20202020-58b4-46e8-b6d2-f1f3c74cf7f4`},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.workflowVersion,relationTargetObjectUniversalIdentifier:L.timelineActivity})}},workspaceMember:{...F(L.workspaceMember),name:{universalIdentifier:`20202020-e914-43a6-9c26-3603c59065f4`},colorScheme:{universalIdentifier:`20202020-66bc-47f2-adac-f2ef7c598b63`},uiScale:{universalIdentifier:`20202020-1581-4bfb-b87d-58fa9cd5b817`},openRecordIn:{universalIdentifier:`20202020-1b16-419d-9323-6f3ea850e5d9`},locale:{universalIdentifier:`20202020-402e-4695-b169-794fa015afbe`},avatarUrl:{universalIdentifier:`20202020-0ced-4c4f-a376-c98a966af3f6`},userEmail:{universalIdentifier:`20202020-4c5f-4e09-bebc-9e624e21ecf4`},jobTitle:{universalIdentifier:`20202020-4dd4-4619-826e-08f6c06b374d`},userId:{universalIdentifier:`20202020-75a9-4dfc-bf25-2e4b43e89820`},assignedTasks:{universalIdentifier:`20202020-61dc-4a1c-99e8-38ebf8d2bbeb`},ownedOpportunities:{universalIdentifier:`20202020-9e4d-4b3a-8c1f-6d7e8f9a0b1c`},accountOwnerForCompanies:{universalIdentifier:`20202020-dc29-4bd4-a3c1-29eafa324bee`},messageParticipants:{universalIdentifier:`20202020-8f99-48bc-a5eb-edd33dd54188`},blocklist:{universalIdentifier:`20202020-6cb2-4161-9f29-a4b7f1283859`},calendarEventParticipants:{universalIdentifier:`20202020-0dbc-4841-9ce1-3e793b5b3512`},timelineActivities:{universalIdentifier:`20202020-e15b-47b8-94fe-8200e3c66615`},agentMessages:{universalIdentifier:`211b2717-450a-4f5f-808f-39695c819319`},agentChatThreads:{universalIdentifier:`fbaf92a6-44ae-4b6d-9d10-2c15d84eaea1`},agentChatThreadParticipants:{universalIdentifier:`d1de909f-a0eb-4e94-8903-abec012864c9`},agentMessageReactions:{universalIdentifier:`9242d7b0-bb3a-4bb6-a830-5e84e722c684`},assignedAgentChatThreads:{universalIdentifier:`a89c46f5-cdb7-40e9-9a87-a8ecf0818c3c`},timeZone:{universalIdentifier:`20202020-2d33-4c21-a86e-5943b050dd54`},dateFormat:{universalIdentifier:`20202020-af13-4e11-b1e7-b8cf5ea13dc0`},timeFormat:{universalIdentifier:`20202020-8acb-4cf8-a851-a6ed443c8d81`},calendarStartDay:{universalIdentifier:`20202020-1ecc-4562-84c9-ff3a2f6cce85`},numberFormat:{universalIdentifier:`20202020-7f40-4e7f-b126-11c0eda6b141`}}},z=({objectUniversalIdentifier:e,fields:n,viewFieldNames:r})=>{let i=t.V({objectMetadataApplicationUniversalIdentifier:t.z,objectUniversalIdentifier:e,viewKey:t.I.INDEX});return{universalIdentifier:i,viewFields:Object.fromEntries(r.map(r=>{let a=n[r];if(a===void 0)throw Error(`Missing field "${r}" for the INDEX view of object ${e}`);return[r,{universalIdentifier:t.F({fieldMetadataApplicationUniversalIdentifier:t.z,viewUniversalIdentifier:i,fieldMetadataUniversalIdentifier:a.universalIdentifier})}]}))}},B=({objectUniversalIdentifier:e,fields:n,viewFieldNames:r,viewFieldGroupNames:i})=>{let a=t.V({objectMetadataApplicationUniversalIdentifier:t.z,objectUniversalIdentifier:e,viewKey:t.I.FIELDS_WIDGET});return{universalIdentifier:a,viewFields:Object.fromEntries(r.map(r=>{let i=n[r];if(i===void 0)throw Error(`Missing field "${r}" for the record-page view of object ${e}`);return[r,{universalIdentifier:t.F({fieldMetadataApplicationUniversalIdentifier:t.z,viewUniversalIdentifier:a,fieldMetadataUniversalIdentifier:i.universalIdentifier})}]})),viewFieldGroups:Object.fromEntries(Object.entries(i).map(([e,n])=>[e,{universalIdentifier:t.U({objectMetadataApplicationUniversalIdentifier:t.z,viewUniversalIdentifier:a,name:n})}]))}},xt={attachment:{universalIdentifier:L.attachment,fields:R.attachment,morphIds:{targetMorphId:{morphId:R.attachment.target.universalIdentifier}},indexes:{taskIdIndex:{universalIdentifier:`b8d4f9a3-0c25-4e7b-9f6a-2d3e4c5b6f70`},noteIdIndex:{universalIdentifier:`9d31ea73-13b6-4e06-84ee-c66c72bf7787`},personIdIndex:{universalIdentifier:`55637a5a-1edc-4351-8d76-d40020bf8944`},companyIdIndex:{universalIdentifier:`4137ba06-184d-438f-b484-080f02a97659`},opportunityIdIndex:{universalIdentifier:`8cc162d1-c127-4981-878d-f78622f8f12d`},dashboardIdIndex:{universalIdentifier:`c10eba2d-ff1a-4eab-9285-50481c12a003`},workflowIdIndex:{universalIdentifier:`fadeab4b-79ee-4173-af79-72c51fbad888`},agentChatThreadIdIndex:{universalIdentifier:`69857371-6ff9-48fa-a9de-db4f71593431`}},views:{allAttachments:z({objectUniversalIdentifier:L.attachment,fields:R.attachment,viewFieldNames:[`name`,`file`,`createdBy`,`createdAt`,`targetPerson`,`targetCompany`,`targetOpportunity`,`targetTask`,`targetNote`,`targetDashboard`,`targetWorkflow`]}),attachmentRecordPageFields:B({objectUniversalIdentifier:L.attachment,fields:R.attachment,viewFieldNames:[`createdBy`,`createdAt`],viewFieldGroupNames:{}})}},blocklist:{universalIdentifier:L.blocklist,fields:R.blocklist,indexes:{workspaceMemberIdIndex:{universalIdentifier:`4daf320e-74d0-4f24-a45a-af3a09d741cb`}},views:{allBlocklists:z({objectUniversalIdentifier:L.blocklist,fields:R.blocklist,viewFieldNames:[`handle`,`workspaceMember`,`createdAt`]}),blocklistRecordPageFields:B({objectUniversalIdentifier:L.blocklist,fields:R.blocklist,viewFieldNames:[`workspaceMember`,`createdAt`,`createdBy`],viewFieldGroupNames:{general:`General`,system:`System`}})}},calendarChannelEventAssociation:{universalIdentifier:L.calendarChannelEventAssociation,fields:R.calendarChannelEventAssociation,indexes:{calendarChannelIdIndex:{universalIdentifier:`ff6b86c1-3112-4dfa-b734-c4789111a716`},calendarEventIdIndex:{universalIdentifier:`47a3c8d2-9f14-4b6e-8c5d-1a2b3f4e5c69`},eventExternalIdIndex:{universalIdentifier:`b14d63d0-c1ab-470f-927d-9c0c05277caa`}},views:{allCalendarChannelEventAssociations:z({objectUniversalIdentifier:L.calendarChannelEventAssociation,fields:R.calendarChannelEventAssociation,viewFieldNames:[`calendarChannelId`,`calendarEvent`,`eventExternalId`,`createdAt`]}),calendarChannelEventAssociationRecordPageFields:B({objectUniversalIdentifier:L.calendarChannelEventAssociation,fields:R.calendarChannelEventAssociation,viewFieldNames:[`calendarChannelId`,`calendarEvent`,`eventExternalId`,`createdAt`,`createdBy`],viewFieldGroupNames:{general:`General`,system:`System`}})}},calendarEventParticipant:{universalIdentifier:L.calendarEventParticipant,fields:R.calendarEventParticipant,indexes:{calendarEventIdIndex:{universalIdentifier:`c458ad97-8b95-43de-9003-88eb68576049`},personIdIndex:{universalIdentifier:`30e9b75a-881f-4a85-aaf1-f2d2464be1cf`},workspaceMemberIdIndex:{universalIdentifier:`898aa202-428f-4a7a-a3b3-8f0a17a6658e`}},views:{allCalendarEventParticipants:z({objectUniversalIdentifier:L.calendarEventParticipant,fields:R.calendarEventParticipant,viewFieldNames:[`calendarEvent`,`handle`,`displayName`,`isOrganizer`,`responseStatus`,`person`,`workspaceMember`,`createdAt`]}),calendarEventParticipantRecordPageFields:B({objectUniversalIdentifier:L.calendarEventParticipant,fields:R.calendarEventParticipant,viewFieldNames:[`calendarEvent`,`handle`,`displayName`,`isOrganizer`,`responseStatus`,`person`,`workspaceMember`,`createdAt`,`createdBy`],viewFieldGroupNames:{general:`General`,system:`System`}})}},calendarEvent:{universalIdentifier:L.calendarEvent,fields:R.calendarEvent,indexes:{iCalUidIndex:{universalIdentifier:`e38d1418-f994-4f0d-b0cd-41d4da240ea0`}},views:{allCalendarEvents:z({objectUniversalIdentifier:L.calendarEvent,fields:R.calendarEvent,viewFieldNames:[`title`,`startsAt`,`endsAt`,`isFullDay`,`location`,`conferenceLink`,`isCanceled`,`createdAt`]}),calendarEventRecordPageFields:B({objectUniversalIdentifier:L.calendarEvent,fields:R.calendarEvent,viewFieldNames:[`title`,`startsAt`,`endsAt`,`isFullDay`,`isCanceled`,`conferenceLink`,`location`,`description`,`calendarEventTargets`,`externalCreatedAt`,`externalUpdatedAt`,`iCalUid`,`conferenceSolution`],viewFieldGroupNames:{general:`General`,system:`System`}})}},calendarEventTarget:{universalIdentifier:L.calendarEventTarget,fields:R.calendarEventTarget,morphIds:{targetMorphId:{morphId:R.calendarEventTarget.target.universalIdentifier}},indexes:{calendarEventIdIndex:{universalIdentifier:`ce1c180c-0236-4673-ad1d-359dddf59f93`},personIdIndex:{universalIdentifier:`f151bc84-ba45-40cb-b064-02ef359ac17b`},companyIdIndex:{universalIdentifier:`30413277-505d-4f08-be38-a56257460f9f`},opportunityIdIndex:{universalIdentifier:`7920092d-281f-473a-8ea4-53c209b36a37`},calendarEventPersonUniqueIndex:{universalIdentifier:`15b9e394-d451-4186-aaf0-612f6be1ea91`},calendarEventCompanyUniqueIndex:{universalIdentifier:`3fa22398-6e7d-47a5-95eb-4971f9d62135`},calendarEventOpportunityUniqueIndex:{universalIdentifier:`c8183b17-5dfe-4e02-8d9d-aef8e54ef07d`}},views:{}},callRecording:{universalIdentifier:L.callRecording,fields:R.callRecording,indexes:{calendarEventIdIndex:{universalIdentifier:`8be3cc47-9352-4a1b-ad19-bb186bc0865d`}},views:{allCallRecordings:z({objectUniversalIdentifier:L.callRecording,fields:R.callRecording,viewFieldNames:[`status`,`recordingRequestStatus`,`title`,`startedAt`]}),callRecordingRecordPageFields:B({objectUniversalIdentifier:L.callRecording,fields:R.callRecording,viewFieldNames:[`title`,`status`,`recordingRequestStatus`,`startedAt`,`endedAt`,`video`,`audio`,`transcript`,`summary`],viewFieldGroupNames:{general:`General`}})}},company:{universalIdentifier:L.company,fields:R.company,indexes:{accountOwnerIdIndex:{universalIdentifier:`ec2ebfc9-0c9b-4597-a87d-aa295e2d8bfe`},domainNameUniqueIndex:{universalIdentifier:`dd300c61-f422-467a-91f4-de4f83c4175b`},searchVectorGinIndex:{universalIdentifier:`c3eb62df-2cc1-4cc3-b7aa-e96a4d65c633`}},views:{allCompanies:z({objectUniversalIdentifier:L.company,fields:R.company,viewFieldNames:[`name`,`domainName`,`createdBy`,`accountOwner`,`createdAt`,`linkedinLink`,`address`]}),companyRecordPageFields:B({objectUniversalIdentifier:L.company,fields:R.company,viewFieldNames:[`domainName`,`accountOwner`,`annualRevenue`,`linkedinLink`,`address`,`createdAt`,`createdBy`,`updatedAt`,`updatedBy`,`people`,`taskTargets`,`noteTargets`,`opportunities`,`attachments`,`timelineActivities`],viewFieldGroupNames:{general:`General`,business:`Business`,contact:`Contact`,system:`System`}})}},dashboard:{universalIdentifier:L.dashboard,fields:R.dashboard,indexes:{searchVectorGinIndex:{universalIdentifier:`e69f71aa-de0f-4b70-845f-7a8369c47928`}},views:{allDashboards:z({objectUniversalIdentifier:L.dashboard,fields:R.dashboard,viewFieldNames:[`title`,`createdBy`,`createdAt`,`updatedAt`]})}},messageCampaign:{universalIdentifier:L.messageCampaign,fields:R.messageCampaign,indexes:{unsubscribeTopicIdIndex:{universalIdentifier:`efe8c20e-d12b-4475-969e-e86e0bbfe444`},listIdIndex:{universalIdentifier:`17bffd6a-714a-458d-a547-f9e2183d9520`},searchVectorGinIndex:{universalIdentifier:`975823ad-9b97-4f39-b2c7-fbd7d77f4bd1`}},views:{allMessageCampaigns:z({objectUniversalIdentifier:L.messageCampaign,fields:R.messageCampaign,viewFieldNames:[`name`,`subject`,`status`,`list`,`fromAddress`,`scheduledAt`,`sentAt`,`recipients`,`createdAt`]}),messageCampaignList:{universalIdentifier:`99ca5417-e5e0-4fd4-8e64-67acd7b21e25`,viewFields:{name:{universalIdentifier:`fcda0c3b-7ee3-40dd-b280-da3ff4da5452`},subject:{universalIdentifier:`700087d2-bd10-4ab9-b8a9-b0710146927c`},status:{universalIdentifier:`ff29b192-5a52-42a1-8a1e-1a03d26f5464`},list:{universalIdentifier:`8e28bc70-eaa0-4768-bb13-606571e65ac8`},fromAddress:{universalIdentifier:`b9798ecc-de06-4717-8b42-057181437dbc`},scheduledAt:{universalIdentifier:`caba5417-964d-416c-a5a9-b64ef71e5964`},sentAt:{universalIdentifier:`9d546249-b029-4b01-8389-65a88ae583c8`},recipients:{universalIdentifier:`e065a2d1-1352-4869-b527-58e3c37557c0`},createdAt:{universalIdentifier:`27548f0a-5ed4-4412-b23a-718b99eb697e`}}},messageCampaignRecordPageFields:B({objectUniversalIdentifier:L.messageCampaign,fields:R.messageCampaign,viewFieldNames:[`status`,`scheduledAt`,`sentAt`,`sentCount`,`deliveredCount`,`failedCount`,`skippedCount`,`bouncedCount`,`complainedCount`,`uniqueClickCount`,`clickRate`,`uniqueOpenCount`,`openRate`],viewFieldGroupNames:{stats:`Stats`}})}},messageList:{universalIdentifier:L.messageList,fields:R.messageList,indexes:{searchVectorGinIndex:{universalIdentifier:`8e205171-ed74-4620-b7d2-674aab85033a`}},views:{allMessageLists:z({objectUniversalIdentifier:L.messageList,fields:R.messageList,viewFieldNames:[`name`,`description`,`members`,`campaigns`,`createdAt`]})}},messageListMember:{universalIdentifier:L.messageListMember,fields:R.messageListMember,indexes:{listIdIndex:{universalIdentifier:`61188470-6dcb-4b2a-b1a9-baeb688bccae`},personListUniqueIndex:{universalIdentifier:`e5497dc2-1d72-418c-a389-a0645ca0195a`}},views:{allMessageListMembers:z({objectUniversalIdentifier:L.messageListMember,fields:R.messageListMember,viewFieldNames:[`id`,`person`,`list`,`createdAt`]})}},messageChannelMessageAssociation:{universalIdentifier:L.messageChannelMessageAssociation,fields:R.messageChannelMessageAssociation,indexes:{messageChannelIdIndex:{universalIdentifier:`9894f9a3-0225-4e7b-9f6a-23d4e2576784`},messageIdIndex:{universalIdentifier:`9bb24d40-60dd-4beb-8c64-a74e8c67f9ee`},messageChannelIdMessageIdUniqueIndex:{universalIdentifier:`1b86ece8-7ce3-4df3-8771-fd4b5d45b2f2`}},views:{allMessageChannelMessageAssociations:z({objectUniversalIdentifier:L.messageChannelMessageAssociation,fields:R.messageChannelMessageAssociation,viewFieldNames:[`messageChannelId`,`message`,`messageExternalId`,`direction`,`createdAt`]}),messageChannelMessageAssociationRecordPageFields:B({objectUniversalIdentifier:L.messageChannelMessageAssociation,fields:R.messageChannelMessageAssociation,viewFieldNames:[`messageChannelId`,`message`,`messageExternalId`,`direction`,`createdAt`,`createdBy`],viewFieldGroupNames:{general:`General`,system:`System`}})}},messageChannelMessageAssociationMessageFolder:{universalIdentifier:L.messageChannelMessageAssociationMessageFolder,fields:R.messageChannelMessageAssociationMessageFolder,indexes:{messageChannelMessageAssociationIdIndex:{universalIdentifier:`8e6038aa-1f79-4a84-87b5-f33caa172e98`},messageFolderIdIndex:{universalIdentifier:`905299c3-ca81-435d-901c-f68b87562516`},messageChannelMessageAssociationIdMessageFolderIdUniqueIndex:{universalIdentifier:`a3de1788-5dff-4849-ac5a-0dabe5fab216`}},views:{allMessageChannelMessageAssociationMessageFolders:z({objectUniversalIdentifier:L.messageChannelMessageAssociationMessageFolder,fields:R.messageChannelMessageAssociationMessageFolder,viewFieldNames:[`messageChannelMessageAssociation`,`messageFolderId`,`createdAt`]}),messageChannelMessageAssociationMessageFolderRecordPageFields:B({objectUniversalIdentifier:L.messageChannelMessageAssociationMessageFolder,fields:R.messageChannelMessageAssociationMessageFolder,viewFieldNames:[`messageChannelMessageAssociation`,`messageFolderId`,`createdAt`,`createdBy`],viewFieldGroupNames:{general:`General`,system:`System`}})}},messageParticipant:{universalIdentifier:L.messageParticipant,fields:R.messageParticipant,indexes:{messageIdIndex:{universalIdentifier:`ab0863ba-f95e-493c-b86c-56e1bc7e5bc2`},personIdIndex:{universalIdentifier:`df805c2e-3bfe-4d51-8309-75e5eb4052fe`},workspaceMemberIdIndex:{universalIdentifier:`ce1e3a9e-afe9-439d-abb7-6cc98a6fa405`},messageCampaignIdIndex:{universalIdentifier:`e9bcdd77-cc8b-4532-833c-124dfdc8e5ff`}},views:{allMessageParticipants:z({objectUniversalIdentifier:L.messageParticipant,fields:R.messageParticipant,viewFieldNames:[`message`,`role`,`handle`,`displayName`,`person`,`workspaceMember`,`createdAt`]}),messageParticipantRecordPageFields:B({objectUniversalIdentifier:L.messageParticipant,fields:R.messageParticipant,viewFieldNames:[`message`,`role`,`displayName`,`person`,`workspaceMember`,`createdAt`,`createdBy`],viewFieldGroupNames:{general:`General`,system:`System`}})}},messageThread:{universalIdentifier:L.messageThread,fields:R.messageThread,indexes:{},views:{allMessageThreads:z({objectUniversalIdentifier:L.messageThread,fields:R.messageThread,viewFieldNames:[`subject`,`messages`,`updatedAt`,`createdAt`]})}},messageThreadTarget:{universalIdentifier:L.messageThreadTarget,fields:R.messageThreadTarget,morphIds:{targetMorphId:{morphId:R.messageThreadTarget.target.universalIdentifier}},indexes:{messageThreadIdIndex:{universalIdentifier:`222fdd8b-0863-4f2a-816a-29745537b6b6`},personIdIndex:{universalIdentifier:`280ee419-ac3c-4599-bd62-3e5cb268342c`},companyIdIndex:{universalIdentifier:`b98005e4-3811-41b6-82d0-3ccd27757eba`},opportunityIdIndex:{universalIdentifier:`7679ee05-cf6c-40a7-9ee6-c3e8053caca5`},messageThreadPersonUniqueIndex:{universalIdentifier:`087f97cb-8c3c-4ea1-9556-933acde6c83b`},messageThreadCompanyUniqueIndex:{universalIdentifier:`30d4f1af-8b6f-4685-802f-8a7cf29f318b`},messageThreadOpportunityUniqueIndex:{universalIdentifier:`1dc0e37e-afb1-4e90-90b4-052374126a6a`}},views:{}},message:{universalIdentifier:L.message,fields:R.message,indexes:{messageThreadIdIndex:{universalIdentifier:`7a05b45e-7aa6-4a7e-9bbc-299cbed53c96`},messageCampaignIdIndex:{universalIdentifier:`79e777ca-7008-46c5-b3a6-3108b7c7dfb6`},headerMessageIdIndex:{universalIdentifier:`0904b3e4-6052-4a8d-bf41-f12a27c7e34a`}},views:{allMessages:z({objectUniversalIdentifier:L.message,fields:R.message,viewFieldNames:[`subject`,`messageThread`,`messageParticipants`,`receivedAt`,`headerMessageId`,`text`,`createdAt`]}),messageRecordPageFields:B({objectUniversalIdentifier:L.message,fields:R.message,viewFieldNames:[`messageThread`,`messageParticipants`,`receivedAt`,`text`,`headerMessageId`,`createdAt`,`createdBy`],viewFieldGroupNames:{general:`General`,system:`System`}})}},note:{universalIdentifier:L.note,fields:R.note,indexes:{searchVectorGinIndex:{universalIdentifier:`8183c8d2-9114-4b6e-8c5d-12a3b14a5a13`}},views:{allNotes:z({objectUniversalIdentifier:L.note,fields:R.note,viewFieldNames:[`title`,`noteTargets`,`bodyV2`,`createdBy`,`createdAt`]}),noteRecordPageFields:B({objectUniversalIdentifier:L.note,fields:R.note,viewFieldNames:[`noteTargets`,`attachments`,`timelineActivities`],viewFieldGroupNames:{general:`General`}})}},noteTarget:{universalIdentifier:L.noteTarget,fields:R.noteTarget,morphIds:{targetMorphId:{morphId:R.noteTarget.target.universalIdentifier}},indexes:{noteIdIndex:{universalIdentifier:`9294d9e3-0225-4c7f-9d6e-23b4c25b6b24`},personIdIndex:{universalIdentifier:`7c069dc0-e83b-4cd5-aaa2-cac7f3e00d80`},companyIdIndex:{universalIdentifier:`2d83909a-a383-4e82-b00a-8b7739f3f906`},opportunityIdIndex:{universalIdentifier:`0d1a59b4-cc87-4b7d-804a-656e8504f371`},notePersonUniqueIndex:{universalIdentifier:`29be76d1-ff4f-4f0f-b05c-f679a234e90a`},noteCompanyUniqueIndex:{universalIdentifier:`e3b92659-04cf-4496-8fd4-4f32c747c26a`},noteOpportunityUniqueIndex:{universalIdentifier:`58002741-8aa7-4812-b7af-f4cf98dd2433`}},views:{allNoteTargets:z({objectUniversalIdentifier:L.noteTarget,fields:R.noteTarget,viewFieldNames:[`id`,`note`,`targetPerson`,`targetCompany`,`targetOpportunity`]})}},opportunity:{universalIdentifier:L.opportunity,fields:R.opportunity,indexes:{pointOfContactIdIndex:{universalIdentifier:`b8c2a673-a981-4357-a43d-313a358e4daa`},companyIdIndex:{universalIdentifier:`e161072d-37b1-477a-b944-ef0d65289574`},stageIndex:{universalIdentifier:`ae60d580-b562-44f2-a24d-7b8040063f83`},searchVectorGinIndex:{universalIdentifier:`f53fdd28-a26b-47ba-81b5-6813ad622720`}},views:{allOpportunities:z({objectUniversalIdentifier:L.opportunity,fields:R.opportunity,viewFieldNames:[`name`,`amount`,`createdBy`,`closeDate`,`company`,`pointOfContact`]}),byStage:{universalIdentifier:`20202020-a004-4a04-8a04-0aa0b1ca1ba0`,viewFields:{name:{universalIdentifier:`20202020-af04-4a04-8a04-0aa0b2ca2baf`},amount:{universalIdentifier:`20202020-af04-4a04-8a04-0aa0b2ca2bb0`},createdBy:{universalIdentifier:`20202020-af04-4a04-8a04-0aa0b2ca2bb1`},closeDate:{universalIdentifier:`20202020-af04-4a04-8a04-0aa0b2ca2bb2`},company:{universalIdentifier:`20202020-af04-4a04-8a04-0aa0b2ca2bb3`},pointOfContact:{universalIdentifier:`20202020-af04-4a04-8a04-0aa0b2ca2bb4`}},viewGroups:{new:{universalIdentifier:`20202020-af14-4a04-8a04-0aa0b2ca2bf1`},screening:{universalIdentifier:`20202020-af14-4a04-8a04-0aa0b2ca2bf2`},meeting:{universalIdentifier:`20202020-af14-4a04-8a04-0aa0b2ca2bf3`},proposal:{universalIdentifier:`20202020-af14-4a04-8a04-0aa0b2ca2bf4`},customer:{universalIdentifier:`20202020-af14-4a04-8a04-0aa0b2ca2bf5`}}},opportunityRecordPageFields:B({objectUniversalIdentifier:L.opportunity,fields:R.opportunity,viewFieldNames:[`amount`,`closeDate`,`stage`,`company`,`pointOfContact`,`owner`,`createdAt`,`createdBy`,`updatedAt`,`updatedBy`,`taskTargets`,`noteTargets`,`attachments`,`timelineActivities`],viewFieldGroupNames:{deal:`Deal`,relations:`Relations`,system:`System`}})}},person:{universalIdentifier:L.person,fields:R.person,indexes:{companyIdIndex:{universalIdentifier:`8a265a5c-d3ae-47dc-bdf9-b42cfa2ba639`},emailsUniqueIndex:{universalIdentifier:`8183a8b2-9114-4f6c-8a5b-12e3f14e5e13`},searchVectorGinIndex:{universalIdentifier:`9294b9c3-0225-4a7d-9b6c-23f4a25f6f24`}},views:{allPeople:z({objectUniversalIdentifier:L.person,fields:R.person,viewFieldNames:[`name`,`emails`,`createdBy`,`company`,`phones`,`createdAt`,`jobTitle`,`linkedinLink`]}),personRecordPageFields:B({objectUniversalIdentifier:L.person,fields:R.person,viewFieldNames:[`emails`,`phones`,`company`,`jobTitle`,`linkedinLink`,`avatarUrl`,`createdAt`,`createdBy`,`updatedAt`,`updatedBy`,`avatarFile`,`pointOfContactForOpportunities`,`taskTargets`,`noteTargets`,`attachments`,`messageParticipants`,`calendarEventParticipants`,`timelineActivities`],viewFieldGroupNames:{general:`General`,work:`Work`,social:`Social`,system:`System`}}),messageListRecordPageMembers:{universalIdentifier:`bef79e8e-9ef3-4458-81ed-78a299e2566f`,viewFields:{name:{universalIdentifier:`a4f0d7b4-3956-44a6-8bb2-df45a699609b`},emails:{universalIdentifier:`180e9cbb-34c2-4e27-8648-2915be88a50e`},company:{universalIdentifier:`3db54119-df4d-449b-91c9-22fca1e5d599`}},viewFilters:{listMembershipsListIsCurrentRecord:{universalIdentifier:`256dceea-a9b5-42b7-8461-a6ce62e7fa6c`}}}}},recordShare:{universalIdentifier:L.recordShare,fields:R.recordShare,indexes:{recordPrincipalCauseSourceUniqueIndex:{universalIdentifier:`4580f104-47a7-4110-87a8-26cb6f63ce7b`},principalIdIndex:{universalIdentifier:`66fbc3d2-6126-4e29-a306-dbe9995bf062`},sourceIdIndex:{universalIdentifier:`21b84593-c647-40ce-bdf4-a8b4ac658f57`}},views:{}},shortLink:{universalIdentifier:L.shortLink,fields:R.shortLink,indexes:{templateAndResolvedUrlHashUniqueIndex:{universalIdentifier:`b1330e3c-bd74-4bd1-a9dc-1ecefe41f199`}},views:{}},task:{universalIdentifier:L.task,fields:R.task,indexes:{assigneeIdIndex:{universalIdentifier:`f48fa3b1-0cec-44da-a9e5-f8a5e766637e`},searchVectorGinIndex:{universalIdentifier:`a86b32b3-01d3-4302-a152-8b7f247db7b4`}},views:{allTasks:z({objectUniversalIdentifier:L.task,fields:R.task,viewFieldNames:[`title`,`status`,`taskTargets`,`createdBy`,`dueAt`,`assignee`,`bodyV2`,`createdAt`]}),assignedToMe:{universalIdentifier:`20202020-a007-4a07-8a07-ba5ca551aaed`,viewFields:{title:{universalIdentifier:`20202020-af07-4a07-8a07-ba5ca551aaed`},taskTargets:{universalIdentifier:`20202020-af07-4a07-8a07-ba5ca551aaee`},createdBy:{universalIdentifier:`20202020-af07-4a07-8a07-ba5ca551aaef`},dueAt:{universalIdentifier:`20202020-af07-4a07-8a07-ba5ca551aaf0`},assignee:{universalIdentifier:`20202020-af07-4a07-8a07-ba5ca551aaf1`},bodyV2:{universalIdentifier:`20202020-af07-4a07-8a07-ba5ca551aaf2`},createdAt:{universalIdentifier:`20202020-af07-4a07-8a07-ba5ca551aaf3`}},viewFilters:{assigneeIsMe:{universalIdentifier:`20202020-af17-4a07-8a07-ba5ca551abf1`}},viewGroups:{todo:{universalIdentifier:`20202020-af17-4a07-8a07-ba5ca551abf2`},inProgress:{universalIdentifier:`20202020-af17-4a07-8a07-ba5ca551abf3`},done:{universalIdentifier:`20202020-af17-4a07-8a07-ba5ca551abf4`},empty:{universalIdentifier:`20202020-af17-4a07-8a07-ba5ca551abf5`}}},byStatus:{universalIdentifier:`20202020-a008-4a08-8a08-ba5cba51aba5`,viewFields:{title:{universalIdentifier:`20202020-af08-4a08-8a08-ba5cba5babf0`},status:{universalIdentifier:`20202020-af08-4a08-8a08-ba5cba5babf1`},dueAt:{universalIdentifier:`20202020-af08-4a08-8a08-ba5cba5babf2`},assignee:{universalIdentifier:`20202020-af08-4a08-8a08-ba5cba5babf3`},createdAt:{universalIdentifier:`20202020-af08-4a08-8a08-ba5cba5babf4`}},viewGroups:{todo:{universalIdentifier:`20202020-af18-4a08-8a08-ba5cba5bbf01`},inProgress:{universalIdentifier:`20202020-af18-4a08-8a08-ba5cba5bbf02`},done:{universalIdentifier:`20202020-af18-4a08-8a08-ba5cba5bbf03`}}},taskRecordPageFields:B({objectUniversalIdentifier:L.task,fields:R.task,viewFieldNames:[`dueAt`,`status`,`assignee`,`taskTargets`,`attachments`,`timelineActivities`],viewFieldGroupNames:{general:`General`}})}},taskTarget:{universalIdentifier:L.taskTarget,fields:R.taskTarget,morphIds:{targetMorphId:{morphId:R.taskTarget.target.universalIdentifier}},indexes:{taskIdIndex:{universalIdentifier:`c882f7a4-b025-4d32-aa26-5ef2595bdbf9`},personIdIndex:{universalIdentifier:`b7d305d1-6fae-4ed6-9bdc-354fe9032c0e`},companyIdIndex:{universalIdentifier:`c0af54c7-751b-4bb2-b102-677cc4e47402`},opportunityIdIndex:{universalIdentifier:`6942e0ba-90f6-4c33-bf40-7f00b1ec35ab`},taskPersonUniqueIndex:{universalIdentifier:`4adf4d5a-ad69-4c5c-bc62-2807816b3aa8`},taskCompanyUniqueIndex:{universalIdentifier:`637dce5e-f609-49f4-89e3-c0ef9e330d3a`},taskOpportunityUniqueIndex:{universalIdentifier:`eb5422ff-7a41-48d2-a2df-3de1cbf7bced`}},views:{allTaskTargets:z({objectUniversalIdentifier:L.taskTarget,fields:R.taskTarget,viewFieldNames:[`id`,`task`,`targetPerson`,`targetCompany`,`targetOpportunity`]})}},timelineActivity:{universalIdentifier:L.timelineActivity,fields:R.timelineActivity,morphIds:{targetMorphId:{morphId:R.timelineActivity.target.universalIdentifier}},indexes:{workspaceMemberIdIndex:{universalIdentifier:`5e0b2391-85ca-4a66-aef4-52d74245bec2`},personIdIndex:{universalIdentifier:`3e89a914-7bec-47bd-9cf9-743c6b83d001`},companyIdIndex:{universalIdentifier:`8183e8f2-9114-4d6a-8e5f-12c3d14c5c13`},opportunityIdIndex:{universalIdentifier:`9294f9a3-0225-4e7b-9f6a-23d4e25d6d24`},noteIdIndex:{universalIdentifier:`995db1d8-0d3e-40f7-b0eb-5e6897bc9966`},taskIdIndex:{universalIdentifier:`609cf622-86ef-48d1-812b-e1cab610a46c`},workflowIdIndex:{universalIdentifier:`d6059ec2-92b0-4cfc-9fd8-78050f03108f`},workflowVersionIdIndex:{universalIdentifier:`d94329b3-5dc8-4141-ae28-31afe28f7135`},workflowRunIdIndex:{universalIdentifier:`1a2bd046-7c23-4e0a-9f8a-c3ca3a16d3b9`},dashboardIdIndex:{universalIdentifier:`e8821da9-728d-470a-bf5b-5a981fff7880`},messageListIdIndex:{universalIdentifier:`a251f71a-c698-4526-8817-0e7c803c158e`},messageCampaignIdIndex:{universalIdentifier:`e808e721-91cc-4b9b-b24b-806d64b4d5e2`},linkedRecordIdIndex:{universalIdentifier:`00e9bf50-0e98-4105-8cb7-31c94995ff55`}},views:{allTimelineActivities:z({objectUniversalIdentifier:L.timelineActivity,fields:R.timelineActivity,viewFieldNames:[`linkedRecordCachedName`,`happensAt`,`workspaceMember`,`targetPerson`,`targetCompany`,`targetOpportunity`,`targetTask`,`targetNote`,`targetWorkflow`,`targetWorkflowVersion`,`targetWorkflowRun`,`targetDashboard`]})}},workflow:{universalIdentifier:L.workflow,fields:R.workflow,indexes:{searchVectorGinIndex:{universalIdentifier:`c7e64c55-eb0c-4b93-b076-5cfcf2e2e042`}},views:{allWorkflows:z({objectUniversalIdentifier:L.workflow,fields:R.workflow,viewFieldNames:[`name`,`statuses`,`updatedAt`,`createdBy`,`versions`,`runs`]})}},workflowAutomatedTrigger:{universalIdentifier:L.workflowAutomatedTrigger,fields:R.workflowAutomatedTrigger,indexes:{workflowIdIndex:{universalIdentifier:`7331ff89-a3f9-4ac0-9fa9-0de5663ae7b2`}},views:{allWorkflowAutomatedTriggers:z({objectUniversalIdentifier:L.workflowAutomatedTrigger,fields:R.workflowAutomatedTrigger,viewFieldNames:[`type`,`workflow`,`createdAt`]}),workflowAutomatedTriggerRecordPageFields:B({objectUniversalIdentifier:L.workflowAutomatedTrigger,fields:R.workflowAutomatedTrigger,viewFieldNames:[`type`,`workflow`,`createdAt`,`createdBy`],viewFieldGroupNames:{general:`General`,system:`System`}})}},workflowRun:{universalIdentifier:L.workflowRun,fields:R.workflowRun,indexes:{workflowVersionIdIndex:{universalIdentifier:`8183c8d2-9114-4b6e-8c5d-12a3b14a5a14`},workflowIdIndex:{universalIdentifier:`9294d9e3-0225-4c7f-9d6e-23b4c25b6b25`},searchVectorGinIndex:{universalIdentifier:`e0ac5ad2-d0c8-4f72-b710-8e53b9dc18d9`}},views:{allWorkflowRuns:z({objectUniversalIdentifier:L.workflowRun,fields:R.workflowRun,viewFieldNames:[`name`,`workflow`,`status`]}),workflowRunRecordPageFields:B({objectUniversalIdentifier:L.workflowRun,fields:R.workflowRun,viewFieldNames:[`status`,`workflow`,`workflowVersion`,`startedAt`,`endedAt`,`createdAt`,`createdBy`,`enqueuedAt`,`state`,`updatedAt`,`updatedBy`,`timelineActivities`],viewFieldGroupNames:{general:`General`,system:`System`}})}},workflowVersion:{universalIdentifier:L.workflowVersion,fields:R.workflowVersion,indexes:{workflowIdIndex:{universalIdentifier:`8138c3b3-0b14-4ee1-be0e-debdde6b3219`},searchVectorGinIndex:{universalIdentifier:`6f3a65eb-2aee-4108-b8a0-c62da419d1dc`}},views:{allWorkflowVersions:z({objectUniversalIdentifier:L.workflowVersion,fields:R.workflowVersion,viewFieldNames:[`name`,`workflow`,`status`,`updatedAt`,`runs`]}),workflowVersionRecordPageFields:B({objectUniversalIdentifier:L.workflowVersion,fields:R.workflowVersion,viewFieldNames:[`status`,`workflow`,`trigger`,`createdAt`,`steps`,`createdBy`,`updatedAt`,`updatedBy`,`runs`,`timelineActivities`],viewFieldGroupNames:{general:`General`,system:`System`}})}},workspaceMember:{universalIdentifier:L.workspaceMember,fields:R.workspaceMember,indexes:{userEmailUniqueIndex:{universalIdentifier:`76da5f27-523c-44b6-ad06-12954f6b949f`},searchVectorGinIndex:{universalIdentifier:`8678dde9-a804-4a9e-80e3-9af35e471ec5`}},views:{allWorkspaceMembers:z({objectUniversalIdentifier:L.workspaceMember,fields:R.workspaceMember,viewFieldNames:[`name`,`createdAt`,`ownedOpportunities`,`assignedTasks`]})}},agentChatThread:{universalIdentifier:L.agentChatThread,fields:R.agentChatThread,indexes:{workspaceMemberIndex:{universalIdentifier:`079f2dd7-6c11-4eae-be8a-cce2d1bee0fb`},assigneeIndex:{universalIdentifier:`a65524f8-c999-448b-b9f4-c9ecce15fd13`}}},agentChatThreadParticipant:{universalIdentifier:L.agentChatThreadParticipant,fields:R.agentChatThreadParticipant,indexes:{threadWorkspaceMemberUniqueIndex:{universalIdentifier:`e5bbe244-cf74-49a3-938a-e6fff7a8710b`},workspaceMemberIndex:{universalIdentifier:`73d8bb5d-18eb-47bb-89e6-12d8f89aecf6`}}},agentChatThreadTarget:{universalIdentifier:L.agentChatThreadTarget,fields:R.agentChatThreadTarget,morphIds:{targetMorphId:{morphId:R.agentChatThreadTarget.target.universalIdentifier}},indexes:{threadIdIndex:{universalIdentifier:`19291d2c-15ab-43a0-91f7-1694b34813dd`},personIdIndex:{universalIdentifier:`fe9c48d0-5b2a-4a51-bd47-f9205ea0c09d`},companyIdIndex:{universalIdentifier:`ab45593a-3614-41c8-aab1-20aa91f1095c`},opportunityIdIndex:{universalIdentifier:`b68e2031-73c6-4bc4-b062-5f795539e452`},threadPersonUniqueIndex:{universalIdentifier:`5a12050f-4de2-4076-aecc-959b863e14b2`},threadCompanyUniqueIndex:{universalIdentifier:`d9067628-fd16-4843-955b-5fd47fea52a9`},threadOpportunityUniqueIndex:{universalIdentifier:`1b9bec10-2788-40be-9435-44937b9f7018`}},views:{}},agentTurn:{universalIdentifier:L.agentTurn,fields:R.agentTurn,indexes:{agentIndex:{universalIdentifier:`606e8ba3-f322-426b-bef8-2208f67a541a`},threadIndex:{universalIdentifier:`7d351559-4546-4307-ba28-de9fc4c40ef4`}}},agentMessage:{universalIdentifier:L.agentMessage,fields:R.agentMessage,indexes:{agentIndex:{universalIdentifier:`465b20e1-d4cd-4d80-a85b-78bd1f0e70ad`},threadIndex:{universalIdentifier:`2054f1a5-554f-42ac-a41a-b8ccd6ba72ec`},turnIndex:{universalIdentifier:`dc46f804-a55f-4283-884e-9cb938741da3`},senderWorkspaceMemberIndex:{universalIdentifier:`8ecdac01-7bbe-411e-8461-6ff265c90759`}}},agentMessageReaction:{universalIdentifier:L.agentMessageReaction,fields:R.agentMessageReaction,indexes:{messageWorkspaceMemberEmojiUniqueIndex:{universalIdentifier:`4089a239-e2d0-4e3e-83e8-e9b555a8a31d`},workspaceMemberIndex:{universalIdentifier:`565d89ab-2c11-4ebe-aaaf-8dbc4d79a9e5`}}},agentMessagePart:{universalIdentifier:L.agentMessagePart,fields:R.agentMessagePart,indexes:{messageOrderIndex:{universalIdentifier:`f5a08f6f-cf91-4996-9c21-2af64a17ca83`}}},campaignDelivery:{universalIdentifier:L.campaignDelivery,fields:R.campaignDelivery,indexes:{campaignPersonUniqueIndex:{universalIdentifier:`8d719548-d34f-4891-bbc9-e0e09f0e363b`},expiredClaimIndex:{universalIdentifier:`a4d7e8ed-0008-4f6a-a20c-a2b821487481`},countsIndex:{universalIdentifier:`1ea1ae7a-158f-436a-95a0-e9c998ad94f7`},claimTokenIndex:{universalIdentifier:`91640dcd-3f6b-4378-b284-bb02cc8b81ec`},providerMessageIdUniqueIndex:{universalIdentifier:`4de6f73d-ef3a-4c80-b71a-88739213f1c0`}}},messageSuppression:{universalIdentifier:L.messageSuppression,fields:R.messageSuppression,indexes:{emailAddressTopicUniqueIndex:{universalIdentifier:`a6c1f4dc-d925-49f9-8205-3e7f95545966`}}}},V=({objectUniversalIdentifier:e,tabs:n})=>{let r=t.P({objectMetadataApplicationUniversalIdentifier:t.z,objectUniversalIdentifier:e});return{universalIdentifier:r,tabs:Object.fromEntries(Object.entries(n).map(([e,{title:n,widgets:i}])=>{let a=t.B({objectMetadataApplicationUniversalIdentifier:t.z,pageLayoutUniversalIdentifier:r,title:n});return[e,{universalIdentifier:a,widgets:Object.fromEntries(Object.entries(i).map(([e,n])=>[e,{universalIdentifier:t.H({objectMetadataApplicationUniversalIdentifier:t.z,pageLayoutTabUniversalIdentifier:a,title:n})}]))}]}))}},St={myFirstDashboard:{universalIdentifier:`20202020-d001-4d01-8d01-da5ab0a00001`,tabs:{tab1:{universalIdentifier:`20202020-d011-4d11-8d11-da5ab0a01001`,widgets:{welcomeRichText:{universalIdentifier:`20202020-d111-4d11-8d11-da5ab0a11001`},dealsByCompany:{universalIdentifier:`20202020-d111-4d11-8d11-da5ab0a11002`},pipelineValueByStage:{universalIdentifier:`20202020-d111-4d11-8d11-da5ab0a11003`},revenueTimeline:{universalIdentifier:`20202020-d111-4d11-8d11-da5ab0a11004`},opportunitiesByOwner:{universalIdentifier:`20202020-d111-4d11-8d11-da5ab0a11005`},stockMarketIframe:{universalIdentifier:`20202020-d111-4d11-8d11-da5ab0a11006`},dealsCreatedThisMonth:{universalIdentifier:`20202020-d111-4d11-8d11-da5ab0a11007`},dealValueCreatedThisMonth:{universalIdentifier:`20202020-d111-4d11-8d11-da5ab0a11008`}}}}},attachmentRecordPage:V({objectUniversalIdentifier:L.attachment,tabs:{home:{title:`Home`,widgets:{preview:`Preview`,fields:`Fields`,attachedTo:`Attached to`}}}}),companyRecordPage:V({objectUniversalIdentifier:L.company,tabs:{home:{title:`Home`,widgets:{fields:`Fields`,people:`People`,opportunities:`Opportunities`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}},tasks:{title:`Tasks`,widgets:{tasks:`Tasks`}},notes:{title:`Notes`,widgets:{notes:`Notes`}},files:{title:`Files`,widgets:{files:`Files`}},emails:{title:`Emails`,widgets:{emails:`Emails`}},conversations:{title:`Conversations`,widgets:{conversations:`Conversations`}},calendar:{title:`Calendar`,widgets:{calendar:`Calendar`}}}}),personRecordPage:V({objectUniversalIdentifier:L.person,tabs:{home:{title:`Home`,widgets:{fields:`Fields`,company:`Company`,pointOfContactForOpportunities:`Opportunities`,listMemberships:`Lists`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}},tasks:{title:`Tasks`,widgets:{tasks:`Tasks`}},notes:{title:`Notes`,widgets:{notes:`Notes`}},files:{title:`Files`,widgets:{files:`Files`}},emails:{title:`Emails`,widgets:{emails:`Emails`}},conversations:{title:`Conversations`,widgets:{conversations:`Conversations`}},calendar:{title:`Calendar`,widgets:{calendar:`Calendar`}}}}),opportunityRecordPage:V({objectUniversalIdentifier:L.opportunity,tabs:{home:{title:`Home`,widgets:{fields:`Fields`,pointOfContact:`Point of Contact`,company:`Company`,owner:`Owner`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}},tasks:{title:`Tasks`,widgets:{tasks:`Tasks`}},notes:{title:`Notes`,widgets:{notes:`Notes`}},files:{title:`Files`,widgets:{files:`Files`}},emails:{title:`Emails`,widgets:{emails:`Emails`}},conversations:{title:`Conversations`,widgets:{conversations:`Conversations`}},calendar:{title:`Calendar`,widgets:{calendar:`Calendar`}}}}),noteRecordPage:V({objectUniversalIdentifier:L.note,tabs:{home:{title:`Home`,widgets:{fields:`Fields`,noteRichText:`Note`}},note:{title:`Note`,widgets:{noteRichText:`Note`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}},files:{title:`Files`,widgets:{files:`Files`}}}}),taskRecordPage:V({objectUniversalIdentifier:L.task,tabs:{home:{title:`Home`,widgets:{fields:`Fields`,taskRichText:`Task`}},note:{title:`Note`,widgets:{taskRichText:`Task`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}},files:{title:`Files`,widgets:{files:`Files`}}}}),workflowRecordPage:V({objectUniversalIdentifier:L.workflow,tabs:{flow:{title:`Flow`,widgets:{workflow:`Flow`}}}}),workflowVersionRecordPage:V({objectUniversalIdentifier:L.workflowVersion,tabs:{home:{title:`Home`,widgets:{fields:`Fields`,workflow:`Workflow`}},flow:{title:`Flow`,widgets:{workflowVersion:`Flow`}}}}),workflowRunRecordPage:V({objectUniversalIdentifier:L.workflowRun,tabs:{home:{title:`Home`,widgets:{fields:`Fields`,workflow:`Workflow`}},flow:{title:`Flow`,widgets:{workflowRun:`Flow`}}}}),agentChatThreadRecordPage:V({objectUniversalIdentifier:L.agentChatThread,tabs:{chat:{title:`Chat`,widgets:{chat:`Chat`}}}}),blocklistRecordPage:V({objectUniversalIdentifier:L.blocklist,tabs:{home:{title:`Home`,widgets:{fields:`Fields`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}}}}),calendarChannelEventAssociationRecordPage:V({objectUniversalIdentifier:L.calendarChannelEventAssociation,tabs:{home:{title:`Home`,widgets:{fields:`Fields`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}}}}),calendarEventRecordPage:V({objectUniversalIdentifier:L.calendarEvent,tabs:{home:{title:`Home`,widgets:{fields:`Fields`,participants:`Participants`,callRecordings:`Call Recordings`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}},summary:{title:`Summary`,widgets:{summary:`Summary`}},callRecording:{title:`Call Recording`,widgets:{transcript:`Transcript`}}}}),calendarEventParticipantRecordPage:V({objectUniversalIdentifier:L.calendarEventParticipant,tabs:{home:{title:`Home`,widgets:{fields:`Fields`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}}}}),callRecordingRecordPage:V({objectUniversalIdentifier:L.callRecording,tabs:{home:{title:`Home`,widgets:{fields:`Fields`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}},summary:{title:`Summary`,widgets:{summary:`Summary`}},callRecording:{title:`Call Recording`,widgets:{transcript:`Transcript`}}}}),messageChannelMessageAssociationRecordPage:V({objectUniversalIdentifier:L.messageChannelMessageAssociation,tabs:{home:{title:`Home`,widgets:{fields:`Fields`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}}}}),messageChannelMessageAssociationMessageFolderRecordPage:V({objectUniversalIdentifier:L.messageChannelMessageAssociationMessageFolder,tabs:{home:{title:`Home`,widgets:{fields:`Fields`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}}}}),messageParticipantRecordPage:V({objectUniversalIdentifier:L.messageParticipant,tabs:{home:{title:`Home`,widgets:{fields:`Fields`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}}}}),workflowAutomatedTriggerRecordPage:V({objectUniversalIdentifier:L.workflowAutomatedTrigger,tabs:{home:{title:`Home`,widgets:{fields:`Fields`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}}}}),messageRecordPage:V({objectUniversalIdentifier:L.message,tabs:{home:{title:`Home`,widgets:{fields:`Fields`}}}}),messageThreadRecordPage:V({objectUniversalIdentifier:L.messageThread,tabs:{home:{title:`Home`,widgets:{emailThread:`Thread`}}}}),messageListRecordPage:V({objectUniversalIdentifier:L.messageList,tabs:{home:{title:`Home`,widgets:{fields:`Fields`,members:`Members`}},members:{title:`Members`,widgets:{members:`Members`}}}}),messageCampaignRecordPage:V({objectUniversalIdentifier:L.messageCampaign,tabs:{home:{title:`Home`,widgets:{details:`Details`,list:`List`,recipients:`Recipients`,fields:`Fields`}},composer:{title:`Email`,widgets:{messageCampaign:`Email`}}}})},Ct=t=>{let n=[];if(t.universalIdentifier||n.push(`PageLayoutWidget must have a universalIdentifier`),t.title||n.push(`PageLayoutWidget must have a title`),t.type||n.push(`PageLayoutWidget must have a type`),t.configuration?.configurationType===`FRONT_COMPONENT`&&e.t(t.configuration.headerCommandMenuItemUniversalIdentifiers)){let e=t.configuration.headerCommandMenuItemUniversalIdentifiers;for(let t of e)ft(t)||n.push(`PageLayoutWidget header command menu item universalIdentifier "${t}" must be a UUID`);new Set(e).size!==e.length&&n.push(`PageLayoutWidget header command menu item universalIdentifiers must be unique`)}return n},wt=e=>{let t=[];e.universalIdentifier||t.push(`PageLayout must have a universalIdentifier`),e.name||t.push(`PageLayout must have a name`),e.type||t.push(`PageLayout must have a type`);for(let n of e.tabs??[]){n.universalIdentifier||t.push(`PageLayoutTab must have a universalIdentifier`),n.title||t.push(`PageLayoutTab must have a title`);for(let e of n.widgets??[])t.push(...Ct(e))}return j({config:e,errors:t})},Tt=e=>{let t=[];e.universalIdentifier||t.push(`PageLayoutTab must have a universalIdentifier`),e.title||t.push(`PageLayoutTab must have a title`),e.pageLayoutUniversalIdentifier||t.push(`PageLayoutTab must have a pageLayoutUniversalIdentifier when defined standalone (use the parent page layout universalIdentifier)`);for(let n of e.widgets??[])t.push(...Ct(n));return j({config:e,errors:t})},Et=e=>{let t=Ct(e);return e.pageLayoutTabUniversalIdentifier||t.push(`PageLayoutWidget must have a pageLayoutTabUniversalIdentifier when defined standalone (use the universalIdentifier of the tab it is added to)`),e.position||t.push(`PageLayoutWidget must have a position when defined standalone (its tab is not in the manifest, so the layout mode cannot be inferred)`),j({config:e,errors:t})},Dt=e=>{let t=[];return e.universalIdentifier||t.push(`Permission flag must have a universalIdentifier`),e.key||t.push(`Permission flag must have a key`),e.label||t.push(`Permission flag must have a label`),j({config:e,errors:t})},Ot=e=>{let t=[];if(e.universalIdentifier||t.push(`Role must have a universalIdentifier`),e.label||t.push(`Role must have a label`),e.objectPermissions)for(let n of e.objectPermissions)n.objectUniversalIdentifier||t.push(`Object permission must have an objectUniversalIdentifier`);if(e.fieldPermissions)for(let n of e.fieldPermissions)n.objectUniversalIdentifier||t.push(`Field permission must have an objectUniversalIdentifier`),n.fieldUniversalIdentifier||t.push(`Field permission must have a fieldUniversalIdentifier`);let n=new Set;if(e.rowLevelPermissionPredicateGroups)for(let r of e.rowLevelPermissionPredicateGroups)r.universalIdentifier?n.has(r.universalIdentifier)?t.push(`Duplicate row level permission predicate group universalIdentifier "${r.universalIdentifier}"`):n.add(r.universalIdentifier):t.push(`Row level permission predicate group must have a universalIdentifier`),r.objectUniversalIdentifier||t.push(`Row level permission predicate group must have an objectUniversalIdentifier`),r.logicalOperator||t.push(`Row level permission predicate group must have a logicalOperator`);let r=new Set;if(e.rowLevelPermissionPredicates)for(let i of e.rowLevelPermissionPredicates)i.universalIdentifier?r.has(i.universalIdentifier)?t.push(`Duplicate row level permission predicate universalIdentifier "${i.universalIdentifier}"`):r.add(i.universalIdentifier):t.push(`Row level permission predicate must have a universalIdentifier`),i.objectUniversalIdentifier||t.push(`Row level permission predicate must have an objectUniversalIdentifier`),i.fieldUniversalIdentifier||t.push(`Row level permission predicate must have a fieldUniversalIdentifier`),i.operand||t.push(`Row level permission predicate must have an operand`),i.predicateGroupUniversalIdentifier&&!n.has(i.predicateGroupUniversalIdentifier)&&t.push(`Row level permission predicate references unknown predicate group "${i.predicateGroupUniversalIdentifier}"`);return j({config:e,errors:t})},kt=e=>Ot(e),At=e=>{let t=[];return e.universalIdentifier||t.push(`Skill must have a universalIdentifier`),e.name||t.push(`Skill must have a name`),e.label||t.push(`Skill must have a label`),e.content||t.push(`Skill must have content`),j({config:e,errors:t})},jt=e=>{let n=[];if(e.universalIdentifier||n.push(`View must have a universalIdentifier`),e.name||n.push(`View must have a name`),e.objectUniversalIdentifier||n.push(`View must have an objectUniversalIdentifier`),e.fields)for(let t of e.fields)t.universalIdentifier||n.push(`ViewField must have a universalIdentifier`),t.fieldMetadataUniversalIdentifier||n.push(`ViewField must have a fieldMetadataUniversalIdentifier`);if(e.filters)for(let t of e.filters)t.universalIdentifier||n.push(`ViewFilter must have a universalIdentifier`),t.fieldMetadataUniversalIdentifier||n.push(`ViewFilter must have a fieldMetadataUniversalIdentifier`);if(e.filterGroups)for(let t of e.filterGroups)t.universalIdentifier||n.push(`ViewFilterGroup must have a universalIdentifier`);if(e.groups)for(let t of e.groups)t.universalIdentifier||n.push(`ViewGroup must have a universalIdentifier`);if(e.fieldGroups)for(let t of e.fieldGroups)t.universalIdentifier||n.push(`ViewFieldGroup must have a universalIdentifier`);if(e.sorts)for(let r of e.sorts)r.universalIdentifier||n.push(`ViewSort must have a universalIdentifier`),r.fieldMetadataUniversalIdentifier||n.push(`ViewSort must have a fieldMetadataUniversalIdentifier`),r.direction!==t.mt.ASC&&r.direction!==t.mt.DESC&&n.push(`ViewSort direction must be '${t.mt.ASC}' or '${t.mt.DESC}'`);return j({config:e,errors:n})},Mt=e=>{let t=[];return e.universalIdentifier||t.push(`View field must have a universalIdentifier`),e.viewUniversalIdentifier||t.push(`View field must have a viewUniversalIdentifier`),e.fieldMetadataUniversalIdentifier||t.push(`View field must have a fieldMetadataUniversalIdentifier`),j({config:e,errors:t})},Nt=e=>{let n=t.j.safeParse(e);return j({config:e,errors:n.success?[]:n.error.issues.map(e=>e.path.length>0?`${e.path.join(`.`)}: ${e.message}`:e.message)})},Pt=e.r({AggregateOperations:()=>t.Et,ApplicationHealthStatus:()=>t.w,CommandMenuItemAvailabilityType:()=>t.Lt,DateDisplayFormat:()=>t.Bt,FieldMetadataSettingsOnClickAction:()=>t.ft,FieldType:()=>t.It,HTTPMethod:()=>t.pt,IndexType:()=>t.gt,MetadataReadability:()=>t.Ot,MetadataWritability:()=>t.At,NavigationMenuItemType:()=>t.Pt,NumberDataType:()=>t.bt,ObjectOpenRecordIn:()=>t.Nt,ObjectRecordGroupByDateGranularity:()=>t.jt,ObjectSharingReach:()=>t.Tt,OnDeleteAction:()=>t.dt,PageLayoutTabLayoutMode:()=>t.Dt,PageLayoutType:()=>t.kt,PageLayoutWidgetVerticalListHeightBehavior:()=>t.Rt,RelationType:()=>t.yt,RowLevelPermissionPredicateGroupLogicalOperator:()=>t.Mt,RowLevelPermissionPredicateOperand:()=>t.lt,STANDARD_OBJECT:()=>xt,STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS:()=>xt,STANDARD_PAGE_LAYOUT:()=>St,STANDARD_PAGE_LAYOUT_UNIVERSAL_IDENTIFIERS:()=>St,SYSTEM_VIEW_KEYS:()=>t.I,SystemPermissionFlag:()=>t.it,ViewCalendarLayout:()=>t.Vt,ViewFilterGroupLogicalOperator:()=>t.ut,ViewFilterOperand:()=>t.Ct,ViewKey:()=>t.St,ViewOpenRecordIn:()=>t.wt,ViewSortDirection:()=>t.mt,ViewType:()=>t._t,ViewVisibility:()=>t.Ft,WidgetType:()=>t.xt,canAccessFullAdminPanel:()=>ze,canImpersonate:()=>Re,createValidationResult:()=>j,defineAgent:()=>ue,defineApplication:()=>fe,defineApplicationRole:()=>kt,defineCommandMenuItem:()=>be,defineConnectionProvider:()=>gt,defineField:()=>ye,defineFrontComponent:()=>nt,defineHealthCheck:()=>ot,defineIndex:()=>at,defineLogicFunction:()=>st,defineNavigationMenuItem:()=>_t,defineObject:()=>yt,definePageLayout:()=>wt,definePageLayoutTab:()=>Tt,definePageLayoutWidget:()=>Et,definePermissionFlag:()=>Dt,definePostInstallLogicFunction:()=>ct,definePreInstallLogicFunction:()=>lt,defineRole:()=>Ot,defineSettingsFrontComponent:()=>rt,defineSettingsMenuItem:()=>we,defineSkill:()=>At,defineTimelineActivityType:()=>Ce,defineUninstallLogicFunction:()=>ut,defineView:()=>jt,defineViewField:()=>Mt,defineWorkflow:()=>Nt,every:()=>Ge,everyDefined:()=>Ke,everyEquals:()=>qe,favoriteRecordIds:()=>N,featureFlags:()=>Fe,getFieldUniversalIdentifier:()=>t.L,getSystemPageLayoutTabUniversalIdentifier:()=>t.B,getSystemRecordPageLayoutUniversalIdentifier:()=>t.P,getSystemRelationFieldUniversalIdentifier:()=>t.R,getSystemViewFieldUniversalIdentifier:()=>t.F,getSystemViewUniversalIdentifier:()=>t.V,hasAnySoftDeleteFilterOnView:()=>P,includes:()=>We,includesEvery:()=>tt,isDashboardPageLayoutInEditMode:()=>ke,isDefined:()=>He,isInSidePanel:()=>Oe,isLayoutCustomizationModeEnabled:()=>Ae,isNonEmptyString:()=>Ue,isSelectAll:()=>je,none:()=>Ze,noneDefined:()=>Qe,noneEquals:()=>$e,numberOfSelectedRecords:()=>Me,objectMetadataItem:()=>Be,objectMetadataLabel:()=>Ve,objectPermissions:()=>Ne,pageType:()=>De,selectedRecords:()=>Pe,some:()=>Je,someDefined:()=>Ye,someEquals:()=>Xe,someNonEmptyString:()=>et,targetObjectReadPermissions:()=>Ie,targetObjectWritePermissions:()=>Le,validateFields:()=>ve}),Ft=e=>/^define[A-Z]/.test(e)||e===`createValidationResult`,It=e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`,Lt=e=>It(e)||t.ot(e)&&Object.values(e).every(It),Rt=(e=>{let t=[],n=[],r=[];for(let i of Object.keys(e).sort())Ft(i)?t.push(i):Lt(e[i])?n.push(i):r.push(i);return{factories:t,plainData:n,any:r}})(Pt),zt=`twenty-sdk-define-stub`,Bt=`__twenty-sdk-define-stub__`,Vt=`
1
+ const e=require("./isDefined-Dtu5EYqP-CGZoVWsO.js"),t=require("./get-front-component-build-plugins-B0LNjbg4.js"),n=require("./typecheck-application-BsaeLeXz.js");let r=require("path");r=e.i(r);let i=require("@sniptt/guards"),a=require("uuid"),o=require("crypto");o=e.i(o);let s=require("node:fs/promises"),c=require("node:fs"),l=require("node:path");l=e.i(l);let u=require("esbuild");u=e.i(u);let d=require("node:child_process"),f=require("sharp");f=e.i(f);let p=require("typescript");p=e.i(p);let m=require("fs/promises");m=e.i(m);let h=require("node:crypto"),g=require("module"),_=require("node:vm");_=e.i(_);let v=require("tinyglobby");var y=process.env.INIT_CWD||process.cwd(),b=448,x=384,S=async e=>{try{return await(0,s.access)(e),!0}catch{return!1}},C=e=>(0,c.existsSync)(e),w=e=>(0,s.mkdir)(e,{recursive:!0}),T=e=>(0,s.mkdir)(e,{recursive:!0,mode:b}),ee=async e=>{await T((0,l.dirname)(e));try{await(0,s.access)(e)}catch{await(0,s.writeFile)(e,``,{mode:x})}},te=async(e,t)=>{await T((0,l.dirname)(e));let n=await(0,s.open)(e,`w`,x);try{await n.chmod(x).catch(()=>void 0),await n.writeFile(t)}finally{await n.close()}},ne=async e=>{let t;try{t=await(0,s.readdir)(e)}catch(t){if(t instanceof Error&&`code`in t&&t.code===`ENOENT`){await(0,s.mkdir)(e,{recursive:!0});return}throw t}await Promise.all(t.map(t=>(0,s.rm)((0,l.join)(e,t),{recursive:!0,force:!0})))},re=(e,t)=>(0,s.cp)(e,t,{recursive:!0}),E=e=>(0,s.rm)(e,{recursive:!0,force:!0}),D=async e=>{let t=await(0,s.readFile)(e,`utf-8`);return JSON.parse(t)},ie=async(e,t)=>{await(0,s.writeFile)(e,JSON.stringify(t,null,2)+`
2
+ `)},O=({sourcePath:e,destinationPath:t,dereferenceSymlinks:n=!1})=>n?(0,s.copyFile)(e,t):re(e,t),k=/^readme(\.[^.]+)?$/i,ae=e=>{let t=e.filter(e=>k.test(e));return t.find(e=>/\.md$/i.test(e))??t[0]},oe=async({appPath:e,relativeOutputDir:n=t.E,dereferenceSymlinks:r=!1})=>{let i=ae(await(0,s.readdir)(e));if(i===void 0)return;let a=(0,l.join)(e,n);await w(a),await O({sourcePath:(0,l.join)(e,i),destinationPath:(0,l.join)(a,i),dereferenceSymlinks:r})},se=`twenty-client-sdk`,A=async({result:e,appPath:n,fileFolder:i,lastChecksums:a,onFileBuilt:c})=>{let l=Object.keys(e.metafile?.outputs??{}).filter(e=>e.endsWith(`.mjs`));for(let u of l){let l=r.default.resolve(u),d=r.default.relative(n,l),f=e.metafile?.outputs?.[u]?.entryPoint||``,p=r.default.relative(n,f),m=await(0,s.readFile)(l),h=i===t.St.BuiltFrontComponent?`sha256`:`md5`,g=o.default.createHash(h).update(m).digest(`hex`);if(a.get(d)===g)continue;a.set(d,g);let _=(e.metafile?.outputs?.[u])?.imports?.some(e=>e.external===!0&&e.path.startsWith(se))??!1;c&&await c({fileFolder:i,builtPath:d,sourcePath:p,checksum:g,usesSdkClient:_})}},ce=async({appPath:e,sourcePaths:t,fileFolder:n,buildOptions:i,onFileBuilt:a})=>{if(t.length===0)return;let o={};for(let n of t){let t=n.replace(/\.tsx?$/,``);o[t]=r.default.join(e,n)}await A({result:await u.build({...i,entryPoints:o}),appPath:e,fileFolder:n,lastChecksums:new Map,onFileBuilt:a})},le=async(e,t,n)=>{let i=new Set(n),a=t.filter(e=>!i.has(e));for(let t of a){let n=t.replace(/\.tsx?$/,`.mjs`),i=r.default.join(e,n),a=`${i}.map`;await E(i),await E(a)}},j=({config:e,errors:t=[],warnings:n=[]})=>({success:t.length===0,config:e,errors:t,warnings:n}),ue=e=>{let n=[],r=[];e.universalIdentifier||n.push(`Agent must have a universalIdentifier`),e.name||n.push(`Agent must have a name`),e.label||n.push(`Agent must have a label`),e.prompt||n.push(`Agent must have a prompt`),e.responseFormat||r.push(`Agent '${e.name}' has no responseFormat, it will default to { type: 'text' }. Set it explicitly to control the agent's output shape.`),(0,i.isNonEmptyString)(e.roleUniversalIdentifier)&&!(0,a.validate)(e.roleUniversalIdentifier)&&n.push(`Agent '${e.name}' roleUniversalIdentifier must be a valid UUID`);let o=e.triggers??[];o.length>t.d.MAX_TRIGGERS_PER_AGENT&&n.push(`Agent '${e.name}' cannot have more than ${t.d.MAX_TRIGGERS_PER_AGENT} triggers`);let s=o.map(e=>e.universalIdentifier);new Set(s).size!==s.length&&n.push(`Agent '${e.name}' trigger universalIdentifiers must be unique`);for(let r of o){(0,a.validate)(r.universalIdentifier)||n.push(`Agent '${e.name}' trigger universalIdentifier must be a valid UUID`),t.y.includes(r.type)||n.push(`Agent '${e.name}' trigger type must be one of: ${t.y.join(`, `)}`);let o=r.type===`DATABASE_EVENT`?r.settings?.eventName:null;r.type===`DATABASE_EVENT`&&(!(0,i.isNonEmptyString)(o)||!t.D.test(o))&&n.push(`Agent '${e.name}' trigger event name '${o}' must look like 'company.created'`),(r.instructions?.length??0)>t.d.MAX_INSTRUCTIONS_LENGTH&&n.push(`Agent '${e.name}' trigger instructions cannot exceed ${t.d.MAX_INSTRUCTIONS_LENGTH} characters`)}return j({config:e,errors:n,warnings:r})},de=e=>{let n=[],r=e.logo;r&&t.X(r)&&(n.push(`Application logo "${r}" is an external URL. External asset URLs are no longer supported and are ignored. Bundle the image in your public/ folder instead.`),r=void 0),!r&&e.logoUrl&&(t.X(e.logoUrl)?n.push(`Application logoUrl "${e.logoUrl}" is an external URL. External asset URLs are no longer supported and are ignored. Bundle the image in your public/ folder and reference it via logo.`):(n.push("`logoUrl` is deprecated. Use `logo` to reference an image bundled in your public/ folder."),r=e.logoUrl)),!e.galleryImages&&(e.screenshots?.length??0)>0&&n.push("`screenshots` is deprecated. Use `galleryImages` referencing images bundled in your public/ folder.");let i=(e.galleryImages??e.screenshots??[]).filter(e=>t.X(e)?(n.push(`Gallery image "${e}" is an external URL. External asset URLs are no longer supported and are ignored.`),!1):!0);return{logo:r,galleryImages:i,warnings:n}},fe=n=>{let r=[],a=[];n.universalIdentifier||r.push(`Application must have a universalIdentifier`),(!n.displayName||n.displayName.length===0)&&r.push(`Application must have a non empty display name`);for(let[i,o]of Object.entries(n.applicationVariables??{}))(o.type===t.Rt.SELECT||o.type===t.Rt.MULTI_SELECT)&&!t.K(o.options)&&r.push(`Application variable "${i}" of type ${o.type} must define non-empty options`),o.isRequired&&o.isDeprecated&&a.push(`Application variable "${i}" is both required and deprecated. \`isDeprecated\` wins: the variable is excluded from the application configuration check.`),e.t(o.scope)&&!t.s(o.scope)&&r.push(`Application variable "${i}" must have a known scope (${t.r.join(`, `)})`);let o=n.billing?.operations??{},s=n.billing?.recurring??{};for(let[n,a]of Object.entries(o))e.t(a)&&(t.f(a.operationType)||r.push(`Billable operation "${n}" must map to a known operationType (${t.l.join(`, `)})`),(0,i.isNonEmptyString)(a.label)||r.push(`Billable operation "${n}" must have a non empty label`));for(let[n,a]of Object.entries(s))e.t(a)&&(t.a(a.period)||r.push(`Recurring charge "${n}" must have a known period (${t.g.join(`, `)})`),e.t(a.per)&&!t._(a.per)&&r.push(`Recurring charge "${n}" must be charged per a known unit (${t.M.join(`, `)}) or omit \`per\` for a flat fee`),!Number.isSafeInteger(a.amountMicroCredits)||a.amountMicroCredits<=0?r.push(`Recurring charge "${n}" must have a positive integer amountMicroCredits`):a.amountMicroCredits>1e8&&r.push(`Recurring charge "${n}" exceeds the maximum amountMicroCredits of ${t.u}. A per-member charge declares the rate per member, not the total.`),(0,i.isNonEmptyString)(a.label)||r.push(`Recurring charge "${n}" must have a non empty label`),Object.prototype.hasOwnProperty.call(o,n)&&r.push(`"${n}" is declared both as a recurring charge and as a billable operation. Give them distinct names.`));for(let[e,t]of Object.entries(n.serverVariables??{}))t.isRequired&&t.isDeprecated&&a.push(`Server variable "${e}" is both required and deprecated. \`isDeprecated\` wins: the variable is excluded from the application configuration check.`);n.defaultRoleUniversalIdentifier&&a.push("`defaultRoleUniversalIdentifier` on defineApplication() is deprecated. Use defineApplicationRole() in your role file instead.");let{category:c}=n;(0,i.isNonEmptyString)(c)&&!t.i(c)&&a.push(`Application category "${c}" is not a known ApplicationCategory (${t.m.join(`, `)}). Arbitrary category strings are kept for backward compatibility and may be removed. Ask for a new category at https://github.com/twentyhq/twenty.`);let l=de(n);return a.push(...l.warnings),j({config:{...n,logo:l.logo,galleryImages:l.galleryImages},errors:r,warnings:a})},pe=e=>e.length>=2&&e.startsWith(`'`)&&e.endsWith(`'`),me=e=>Object.values(t.yt).includes(e),he=n=>{let{defaultValue:r,type:a}=n;return e.t(r)?(0,i.isString)(r)?pe(r)||me(r)?[]:[r]:Array.isArray(r)&&(a===t.Rt.MULTI_SELECT||a===t.Rt.ARRAY)?r.filter(e=>typeof e==`string`&&!pe(e)):a in t.st&&t.at(r)?Object.values(r).filter(e=>typeof e==`string`&&!pe(e)):[]:[]},ge=t=>e.t(t)?t.flatMap(e=>{let t=he(e);if(t.length===0)return[];let n=t[0];return[`Field "${e.label}" has string defaultValue(s) without surrounding single quotes: ${t.map(e=>`"${e}"`).join(`, `)}. Unquoted strings are reserved for computed defaults ('uuid', 'now'). To define a literal string default, wrap it in single quotes: "'${n}'" instead of "${n}".`]}):[],_e=n=>!t.G(n.type)||!Array.isArray(n.options)?[]:n.options.flatMap((r,i)=>t.at(r)?!(`color`in r)||!e.t(r.color)||t.Y(r.color)?[]:[`Field "${n.label}" option "${r.label}" has an unsupported color. Supported colors: ${t.it.join(`, `)}`]:[`Field "${n.label}" option at index ${i} must be an object`]),ve=e=>{if(!e)return[];let n=[];for(let r of e)(0,i.isNonEmptyString)(r.label)||n.push(`Field must have a label`),(0,i.isNonEmptyString)(r.name)||n.push(`Field "${r.label}" must have a name`),(0,i.isNonEmptyString)(r.universalIdentifier)||n.push(`Field "${r.label}" must have a universalIdentifier`),(r.type===t.Rt.SELECT||r.type===t.Rt.MULTI_SELECT)&&(!Array.isArray(r.options)||r.options.length===0)&&n.push(`Field "${r.label}" is a SELECT/MULTI_SELECT type and must have options`),n.push(..._e(r)),r.isUnique===!0&&(r.type===t.Rt.RELATION||r.type===t.Rt.MORPH_RELATION||r.type===t.Rt.FILES)&&n.push(`Field "${r.label}" of type ${r.type} cannot be unique`);return n},ye=e=>{let t=[];e.objectUniversalIdentifier||t.push(`Field must have an objectUniversalIdentifier`);let n=ve([e]);return t.push(...n),j({config:e,errors:t,warnings:ge([e])})},be=e=>{let t=[],n=[];return e.universalIdentifier||t.push(`CommandMenuItem must have a universalIdentifier`),e.label||t.push(`CommandMenuItem must have a label`),e.frontComponentUniversalIdentifier||t.push(`CommandMenuItem must have a frontComponentUniversalIdentifier (the universalIdentifier of the front component this command opens)`),e.icon&&n.push(`CommandMenuItem icon will be ignored in favor of application icon, you should remove it`),j({config:e,errors:t,warnings:n})},xe=[`created`,`updated`,`deleted`,`restored`,`linked`,`unlinked`],Se=t=>e.t(t)&&xe.includes(t),Ce=e=>{let n=[];e.universalIdentifier||n.push(`TimelineActivityType must have a universalIdentifier`),e.name||n.push(`TimelineActivityType must have a name`),e.label||n.push(`TimelineActivityType must have a label`),e.emit?.on&&!Se(e.emit.on)&&n.push(`TimelineActivityType emit.on ${e.emit.on} is not supported`),e.emit&&!(0,i.isNonEmptyString)(e.emit.on)&&n.push(`TimelineActivityType emit must have an on action`),e.emit&&!(0,i.isNonEmptyString)(e.emit.objectUniversalIdentifier)&&n.push(`TimelineActivityType emit must have an objectUniversalIdentifier`),e.emit?.through&&!(0,i.isNonEmptyString)(e.emit.through.relationFieldUniversalIdentifier)&&n.push(`TimelineActivityType emit.through must have a relationFieldUniversalIdentifier`),(e.emit?.on===`linked`||e.emit?.on===`unlinked`)&&!e.emit.through&&n.push(`TimelineActivityType linked and unlinked emitters require through routing`);let r=e.emit?.through?.triggerFieldUniversalIdentifiers;return r&&(e.emit?.on!==`updated`||!t.K(r))&&n.push(`TimelineActivityType emit.through.triggerFieldUniversalIdentifiers requires an updated event`),r&&new Set(r).size!==r.length&&n.push(`TimelineActivityType emit.through.triggerFieldUniversalIdentifiers must be unique`),e.replacesTimelineActivityTypeUniversalIdentifier&&!e.emit&&n.push(`TimelineActivityType replacesTimelineActivityTypeUniversalIdentifier requires emit`),j({config:e,errors:n})},we=n=>{let r=[];return(0,i.isNonEmptyString)(n.universalIdentifier)||r.push(`SettingsMenuItem must have a universalIdentifier`),(0,i.isNonEmptyString)(n.title)||r.push(`SettingsMenuItem must have a title`),(0,i.isNonEmptyString)(n.title)&&t.k(n.title)&&r.push(`SettingsMenuItem title "${n.title}" is reserved for the built-in settings menu item`),(0,i.isNonEmptyString)(n.frontComponentUniversalIdentifier)||r.push(`SettingsMenuItem must have a frontComponentUniversalIdentifier (the universalIdentifier of the front component this item renders)`),e.t(n.position)&&!Number.isFinite(n.position)&&r.push(`SettingsMenuItem position must be a number`),e.t(n.scope)&&!t.o.includes(n.scope)&&r.push(`SettingsMenuItem scope must be one of ${t.o.join(`, `)}`),j({config:n,errors:r,warnings:[]})},Te=e=>e===`then`,Ee=e=>typeof e==`symbol`,M=e=>{let t=()=>{throw Error(`"${e}" from twenty-sdk can only be used inside a command's conditionalAvailabilityExpression, not at runtime.`)};return new Proxy(function(){},{get:(e,n)=>{if(!(Te(n)||Ee(n)))return t()},apply:t,construct:t,has:t})},De=M(`pageType`),Oe=M(`isInSidePanel`),ke=M(`isDashboardPageLayoutInEditMode`),Ae=M(`isLayoutCustomizationModeEnabled`),N=M(`favoriteRecordIds`),je=M(`isSelectAll`),P=M(`hasAnySoftDeleteFilterOnView`),Me=M(`numberOfSelectedRecords`),Ne=M(`objectPermissions`),Pe=M(`selectedRecords`),Fe=M(`featureFlags`),Ie=M(`targetObjectReadPermissions`),Le=M(`targetObjectWritePermissions`),Re=M(`canImpersonate`),ze=M(`canAccessFullAdminPanel`),Be=M(`objectMetadataItem`),Ve=M(`objectMetadataLabel`),He=M(`isDefined`),Ue=M(`isNonEmptyString`),We=M(`includes`),Ge=M(`every`),Ke=M(`everyDefined`),qe=M(`everyEquals`),Je=M(`some`),Ye=M(`someDefined`),Xe=M(`someEquals`),Ze=M(`none`),Qe=M(`noneDefined`),$e=M(`noneEquals`),et=M(`someNonEmptyString`),tt=M(`includesEvery`),nt=n=>{let r=[];n.universalIdentifier||r.push(`Front component must have a universalIdentifier`),n.component||r.push(`Front component must have a component`),typeof n.component!=`function`&&r.push(`Front component component must be a React component`);let i=n.widgetAvailability;return e.t(i)&&`objectUniversalIdentifiers`in i&&e.t(i.objectUniversalIdentifiers)&&!t.K(i.objectUniversalIdentifiers)&&r.push(`Front component widgetAvailability.objectUniversalIdentifiers must not be empty: omit it to offer the component on every record page, or omit widgetAvailability to offer it nowhere`),j({config:n,errors:r})},rt=e=>{let t=[];return e.universalIdentifier||t.push(`Settings front component must have a universalIdentifier`),e.component?typeof e.component!=`function`&&t.push(`Settings front component component must be a React component`):t.push(`Settings front component must have a component`),j({config:e,errors:t})},it=e=>typeof e==`string`&&e.trim().length>0,at=e=>{let n=[];if(it(e.universalIdentifier)||n.push(`Index must have a universalIdentifier`),it(e.objectUniversalIdentifier)||n.push(`Index must reference an objectUniversalIdentifier`),!t.K(e.fields))n.push(`Index must have at least one field`);else{for(let t of e.fields)it(t.universalIdentifier)||n.push(`IndexField must have a universalIdentifier`),it(t.fieldUniversalIdentifier)||n.push(`IndexField must reference a fieldUniversalIdentifier`);let t=e.fields.map(e=>`${e.fieldUniversalIdentifier}::${e.subFieldName??``}`);new Set(t).size!==t.length&&n.push(`Index lists the same column twice`)}return j({config:e,errors:n})},ot=e=>{let t=[];return e.universalIdentifier||t.push(`Health check must have a universalIdentifier`),e.handler?typeof e.handler!=`function`&&t.push(`Health check handler must be a function`):t.push(`Health check must have a handler`),j({config:e,errors:t})},st=e=>{let n=[];return e.universalIdentifier||n.push(`Logic function must have a universalIdentifier`),e.handler||n.push(`Logic function must have a handler`),typeof e.handler!=`function`&&n.push(`Logic function handler must be a function`),e.httpRouteTriggerSettings&&(e.httpRouteTriggerSettings.path||n.push(`Route trigger must have a path`),e.httpRouteTriggerSettings.httpMethod||n.push(`Route trigger must have an httpMethod`)),e.serverRouteTriggerSettings?.httpMethods?.some(e=>e!==t._t.GET&&e!==t._t.POST)&&n.push(`Server route trigger only supports the GET and POST http methods`),e.cronTriggerSettings&&(e.cronTriggerSettings.pattern||n.push(`Cron trigger must have a pattern`)),e.databaseEventTriggerSettings&&(e.databaseEventTriggerSettings.eventName||n.push(`Database event trigger must have an eventName`)),j({config:e,errors:n})},ct=e=>{let t=[];return e.universalIdentifier||t.push(`Post install logic function must have a universalIdentifier`),e.handler||t.push(`Post install logic function must have a handler`),typeof e.handler!=`function`&&t.push(`Post install logic function handler must be a function`),j({config:e,errors:t})},lt=e=>{let t=[];return e.universalIdentifier||t.push(`Pre install logic function must have a universalIdentifier`),e.handler||t.push(`Pre install logic function must have a handler`),typeof e.handler!=`function`&&t.push(`Pre install logic function handler must be a function`),j({config:e,errors:t})},ut=e=>{let t=[];return e.universalIdentifier||t.push(`Uninstall logic function must have a universalIdentifier`),e.handler||t.push(`Uninstall logic function must have a handler`),typeof e.handler!=`function`&&t.push(`Uninstall logic function handler must be a function`),j({config:e,errors:t})},dt=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,ft=e=>dt.test(e),pt=/^[a-z][a-z0-9-]*$/,mt=[`oauth`],ht=[`identifyAccountLogicFunction`,`onConnectLogicFunction`,`onDisconnectLogicFunction`],gt=n=>{let r=[];n.universalIdentifier?ft(n.universalIdentifier)||r.push(`Connection provider universalIdentifier "${n.universalIdentifier}" must be a UUID. Generate one with \`uuidgen\` or any UUID v4 tool.`):r.push(`Connection provider must have a universalIdentifier`),n.name?pt.test(n.name)||r.push(`Connection provider name "${n.name}" must match ${pt} (used in URLs)`):r.push(`Connection provider must have a name`),n.displayName||r.push(`Connection provider must have a displayName`);for(let t of ht){let i=n[t];e.t(i)&&!ft(i.universalIdentifier)&&r.push(`Connection provider ${t}.universalIdentifier "${i.universalIdentifier}" must be the UUID universalIdentifier of a logic function in this app.`)}if(n.type?mt.includes(n.type)||r.push(`Connection provider type "${n.type}" is not supported. Supported types: ${mt.join(`, `)}.`):r.push("Connection provider must declare a `type` (e.g. 'oauth')"),e.t(n.scope)&&!t.C.includes(n.scope)&&r.push(`Connection provider scope must be one of ${t.C.join(`, `)}`),n.type===`oauth`){let e=n.oauth;e?(e.authorizationEndpoint||r.push(`OAuth connection provider must have an authorizationEndpoint`),e.tokenEndpoint||r.push(`OAuth connection provider must have a tokenEndpoint`),e.clientIdVariable||r.push(`OAuth connection provider must reference a clientIdVariable (key of a serverVariable on defineApplication)`),e.clientSecretVariable||r.push(`OAuth connection provider must reference a clientSecretVariable (key of a serverVariable on defineApplication)`),Array.isArray(e.scopes)||r.push(`OAuth connection provider must declare a scopes array`)):r.push("Connection provider with type 'oauth' must declare an `oauth` config block")}return j({config:n,errors:r})},_t=e=>{let t=[];return e.universalIdentifier||t.push(`NavigationMenuItem must have a universalIdentifier`),typeof e.position!=`number`&&t.push(`NavigationMenuItem must have a position`),j({config:e,errors:t})},vt=({fields:t,labelIdentifierFieldMetadataUniversalIdentifier:n})=>e.t(n)&&!t.some(e=>e.universalIdentifier===n),yt=e=>{let t=[];e.universalIdentifier||t.push(`Object must have a universalIdentifier`),e.nameSingular||t.push(`Object must have a nameSingular`),e.namePlural||t.push(`Object must have a namePlural`),e.labelSingular||t.push(`Object must have a labelSingular`),e.labelPlural||t.push(`Object must have a labelPlural`);let n=ve(e.fields);t.push(...n);let r=vt({fields:e.fields,labelIdentifierFieldMetadataUniversalIdentifier:e.labelIdentifierFieldMetadataUniversalIdentifier});return j({config:e,errors:t,warnings:[...ge(e.fields),...r?[`labelIdentifierFieldMetadataUniversalIdentifier of "${e.nameSingular}" names no field in its fields array; it must name a field the engine derives for this object, or the sync will fail to resolve it`]:[]]})};t.tt(),t.$();var bt=[`id`,`createdAt`,`updatedAt`,`deletedAt`,`createdBy`,`updatedBy`,`position`,`searchVector`],F=e=>Object.fromEntries(bt.map(n=>[n,{universalIdentifier:t.L({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:e,name:n})}])),I=e=>{let{id:t,createdAt:n,updatedAt:r,deletedAt:i}=F(e);return{id:t,createdAt:n,updatedAt:r,deletedAt:i}},L={agentChatThread:`fab0fff8-0c90-4116-9bb0-7dbc07392633`,agentChatThreadTarget:`9f2a5bf4-3a57-4e61-b561-eaf5a5b86973`,agentChatThreadParticipant:`a043622a-48ef-426f-b55d-3fdcf4ae52f2`,agentTurn:`63697477-8606-415e-86cb-be078d7fcf7e`,agentMessage:`62d0354c-3b99-4769-b0f5-4e2651c2ca7d`,agentMessagePart:`214bacb0-df89-494e-be42-e5b11c99cff6`,agentMessageReaction:`7d34e524-cbaf-4a53-b021-eb0313397f22`,campaignDelivery:`0c76066d-26f7-4f57-b0bd-0eb61465fb1a`,messageSuppression:`41410724-723c-48ab-8312-9b85131b4d84`,timelineActivity:`20202020-6736-4337-b5c4-8b39fae325a5`,attachment:`20202020-bd3d-4c60-8dca-571c71d4447a`,blocklist:`20202020-0408-4f38-b8a8-4d5e3e26e24d`,calendarChannelEventAssociation:`20202020-491b-4aaa-9825-afd1bae6ae00`,calendarEvent:`20202020-8f1d-4eef-9f85-0d1965e27221`,calendarEventTarget:`6a9b9656-3e23-4234-94a4-b913c5dde668`,calendarEventParticipant:`20202020-a1c3-47a6-9732-27e5b1e8436d`,callRecording:`ce19efb9-710f-45b2-b141-473abbeea60b`,noteTarget:`20202020-fff0-4b44-be82-bda313884400`,taskTarget:`20202020-5a9a-44e8-95df-771cd06d0fb1`,person:`20202020-e674-48e5-a542-72570eee7213`,recordShare:`fecdb92c-d150-4544-81f8-f1158d18a7a2`,company:`20202020-b374-4779-a561-80086cb2e17f`,opportunity:`20202020-9549-49dd-b2b2-883999db8938`,note:`20202020-0b00-45cd-b6f6-6cd806fc6804`,task:`20202020-1ba1-48ba-bc83-ef7e5990ed10`,workflow:`20202020-62be-406c-b9ca-8caa50d51392`,workflowAutomatedTrigger:`20202020-3319-4234-a34c-7f3b9d2e4d1f`,workflowVersion:`20202020-d65d-4ab9-9344-d77bfb376a3d`,workflowRun:`20202020-4e28-4e95-a9d7-6c00874f843c`,workspaceMember:`20202020-3319-4234-a34c-82d5c0e881a6`,dashboard:`20202020-3840-4b6d-9425-0c5188b05ca8`,message:`20202020-3f6b-4425-80ab-e468899ab4b2`,messageChannelMessageAssociation:`20202020-ad1e-4127-bccb-d83ae04d2ccb`,messageChannelMessageAssociationMessageFolder:`20202020-a1b0-40b0-8ab0-5b6c7d8e9f0a`,messageList:`826561ea-4816-411c-baa0-eec5e6ca8866`,messageListMember:`27773d24-8ce3-40f8-aa6c-1f590f2c08d2`,messageCampaign:`238acb94-dd4c-4036-bc55-19b99d821efd`,shortLink:`22c96608-d1b1-49a2-b328-3e738d61d82d`,messageParticipant:`20202020-a433-4456-aa2d-fd9cb26b774a`,messageThread:`20202020-849a-4c3e-84f5-a25a7d802271`,messageThreadTarget:`378ad1b0-592d-4084-80ee-86fef44725b9`},R={agentChatThread:{...I(L.agentChatThread),archivedAt:{universalIdentifier:`b42eaf6f-240f-41ef-af61-51d5ac9cde7d`},workspaceMember:{universalIdentifier:`6f3ed3b5-0642-4a2a-9558-98376adb60f4`},title:{universalIdentifier:`9283c05e-127c-46ec-82e9-6424a7c0a2f1`},totalInputTokens:{universalIdentifier:`2705f4af-24b8-4660-a8a8-8eff689298d1`},totalOutputTokens:{universalIdentifier:`77790c9c-0e91-4142-8482-d70576b8093b`},contextWindowTokens:{universalIdentifier:`c58dc0b0-bd0e-4ee2-8a80-615a2d8fc7c8`},conversationSize:{universalIdentifier:`f34617ff-a0de-4116-a5ad-7cfd1d0c6d5a`},totalInputCredits:{universalIdentifier:`3c0a9aa3-01b8-4191-bce4-dc9e77e2fe7a`},totalOutputCredits:{universalIdentifier:`40b2f6e5-eced-44f7-b391-0278ea7df7ef`},totalCacheReadTokens:{universalIdentifier:`494abfc8-d2f6-452c-913e-1f55d148f47f`},totalCacheCreationTokens:{universalIdentifier:`68bdb978-5ccb-4f64-9df2-8203b100c76a`},activeStreamId:{universalIdentifier:`bcead20f-75b3-45be-92b9-ea7ec4bddfcd`},pendingQuestionMessageId:{universalIdentifier:`51a9b421-7d90-4a59-9712-036ea9721e65`},turns:{universalIdentifier:`d5c88fbc-d318-4ee1-b70a-751a925bef5b`},messages:{universalIdentifier:`5c851a60-e5d9-4b1e-9926-c2eab6fc9e62`},attachments:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.agentChatThread,relationTargetObjectUniversalIdentifier:L.attachment})},recordTargets:{universalIdentifier:`5b37eceb-2992-4d27-9897-14af3e3ce9b2`},participants:{universalIdentifier:`2ede85e4-216b-4308-8556-b045971414e7`},assignee:{universalIdentifier:`e77858ef-4b01-4a32-b921-8b88b1fd3020`},channelId:{universalIdentifier:`5a3f55ff-a486-4a69-a673-7873deb306bd`},channelArchivedAt:{universalIdentifier:`ec6f5b94-277e-4f06-85f9-08d724518eda`},channelSnoozedUntil:{universalIdentifier:`6d2963a4-7266-42b9-8d76-a06c3f2b7520`},lastActivityAt:{universalIdentifier:`b3847509-8e98-4038-88de-dd891767d6fc`},lastMessageText:{universalIdentifier:`1c16eaef-172b-4778-b14b-f302bc6021e4`},lastMessageSenderWorkspaceMemberId:{universalIdentifier:`5c3611a7-7324-472e-9b43-4c7779e5e7cf`},writerWorkspaceMemberIds:{universalIdentifier:`c8fe2406-ad9c-4274-aeb5-9beb74d4b353`}},agentChatThreadParticipant:{...I(L.agentChatThreadParticipant),thread:{universalIdentifier:`7d0282a5-11ce-4da8-a165-30909ffdf383`},workspaceMember:{universalIdentifier:`4345764d-878b-4a3a-b1c9-822378f868e6`},lastReadAt:{universalIdentifier:`7e3a8319-c127-4c4f-add4-6feac37ea555`},archivedAt:{universalIdentifier:`ee092c9d-f27e-4fbc-8dad-9ec950936216`},snoozedUntil:{universalIdentifier:`65bc5785-877d-4363-b65c-95175ba20fd0`},isSubscribed:{universalIdentifier:`146b1d5e-6603-4493-944b-c3bd2817569b`},lastMentionedAt:{universalIdentifier:`52a54602-633f-496a-966a-9a70437fa887`}},agentChatThreadTarget:{target:{universalIdentifier:`2c4cc537-39a2-4df9-81a1-dda26eb19658`},...I(L.agentChatThreadTarget),thread:{universalIdentifier:`54664c16-3c3d-4d5e-904c-59e1b3707cfb`},targetPerson:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.agentChatThreadTarget,relationTargetObjectUniversalIdentifier:L.person})},targetCompany:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.agentChatThreadTarget,relationTargetObjectUniversalIdentifier:L.company})},targetOpportunity:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.agentChatThreadTarget,relationTargetObjectUniversalIdentifier:L.opportunity})}},agentTurn:{...I(L.agentTurn),agentId:{universalIdentifier:`4ac55a9a-95e8-4fd9-8c03-47ee3b618ae7`},thread:{universalIdentifier:`4e9b4f1f-c1bb-42d0-bb38-eb2b2f830e64`},messages:{universalIdentifier:`737c3559-ea1a-4269-aea4-e672b17afbb1`},status:{universalIdentifier:`c17a4d49-f4f5-40e2-b084-11c5c4bae431`},error:{universalIdentifier:`b0ed90f6-5953-4c85-aff8-407a28ec8cc7`},startedAt:{universalIdentifier:`578977d7-b0d9-48d1-83f7-29ad6215a6f0`},endedAt:{universalIdentifier:`2b13f528-738b-402c-a033-7bbb0cce73a4`},modelId:{universalIdentifier:`b1e1c27b-03dc-40b1-8052-4474c15b8233`},inputTokens:{universalIdentifier:`0e419986-4255-4858-b252-e6a161d55f58`},outputTokens:{universalIdentifier:`3e7f5fb8-f9cf-45b2-b1a7-b36c1e8ff2fd`},cacheReadTokens:{universalIdentifier:`c2bcbbf5-81ce-4679-8f08-f6a3cc00569c`},cacheCreationTokens:{universalIdentifier:`4d9feae2-2a80-43b2-965d-8ad40f129503`},inputCredits:{universalIdentifier:`740456a7-c0be-4bc9-8429-52dc3e3a3707`},outputCredits:{universalIdentifier:`1ca5da82-b797-43a8-a2ee-d1a062a24ca5`},createdBy:{universalIdentifier:`c3d5e8a2-fde8-452d-a74d-04436aaf17bc`}},agentMessage:{...I(L.agentMessage),agentId:{universalIdentifier:`880a91ad-4ab1-4067-87f6-970a53aa2234`},senderWorkspaceMember:{universalIdentifier:`69bea8e1-451d-4c3c-9d34-505b5a67e06e`},senderApplicationId:{universalIdentifier:`d204d45a-6ccc-40cb-8281-b6ed635c247b`},role:{universalIdentifier:`5dc985f3-edad-4ebf-9844-b34ca686855b`},status:{universalIdentifier:`3845ccfa-9394-4cb9-a75c-4ca704414b83`},processedAt:{universalIdentifier:`b1a72274-095e-41f6-95d3-e5b407ff3f0b`},thread:{universalIdentifier:`48ea202f-ed6d-4ad9-8c9b-71a419b96237`},turn:{universalIdentifier:`b36513fc-ffaf-4e99-8686-b1aefca70b76`},parts:{universalIdentifier:`017e4930-118d-4624-8ce4-4e574f89f86d`},reactions:{universalIdentifier:`945e1e83-af08-45c9-8d6c-fb49f1e4a21c`}},agentMessageReaction:{...I(L.agentMessageReaction),message:{universalIdentifier:`18fec29f-89bd-4f33-8b80-f7a83a9a2e31`},workspaceMember:{universalIdentifier:`77265b6b-b634-426a-8972-8601947ca6ad`},agentId:{universalIdentifier:`08851641-cb7e-442c-a698-145ade9dd611`},emoji:{universalIdentifier:`88eeecdd-08a7-4744-bdd1-86b7f4a14394`}},agentMessagePart:{...I(L.agentMessagePart),orderIndex:{universalIdentifier:`d2b3e277-380c-4133-977d-f23f8092aebc`},type:{universalIdentifier:`16a59a7f-dc43-4483-84be-19c8ffd6c7a7`},textContent:{universalIdentifier:`d66ed60a-6c09-4427-a62a-1735e31b02de`},reasoningContent:{universalIdentifier:`34c24bb6-a34a-4373-b8b3-8be22fea3325`},toolName:{universalIdentifier:`ed705120-349b-4fce-afd4-15b8cab0df07`},toolCallId:{universalIdentifier:`151b6115-7071-4a1b-920d-43818907c69b`},toolInput:{universalIdentifier:`14476bb3-8b73-4428-b138-37bd7931e1d6`},toolOutput:{universalIdentifier:`5fe8ca78-52ab-466f-8fe7-cbfa618c5463`},state:{universalIdentifier:`6fa1fb8e-2335-4b48-838b-dd227958cab2`},providerExecuted:{universalIdentifier:`cbfee5eb-748e-4296-88be-ddc13393d88d`},errorMessage:{universalIdentifier:`f910bb7a-d1f8-4893-ad97-40342af62c21`},errorDetails:{universalIdentifier:`b9e6f2cf-b2ce-44fe-9507-d47805582654`},sourceUrlSourceId:{universalIdentifier:`cb66237e-f48a-4858-a882-2330978dcfdc`},sourceUrlUrl:{universalIdentifier:`31a94d35-03f2-41b7-aa2b-5615f286d2bb`},sourceUrlTitle:{universalIdentifier:`ad17f626-17fc-45e0-a09f-a61790a0f906`},sourceDocumentSourceId:{universalIdentifier:`a2afae35-4e3e-4fe5-bc96-9bb654adb810`},sourceDocumentMediaType:{universalIdentifier:`44a4e4f9-d005-493d-9832-3a217730eaf8`},sourceDocumentTitle:{universalIdentifier:`2951cfaa-d05e-47be-af17-c7af4685e4c0`},sourceDocumentFilename:{universalIdentifier:`2cdea0b3-0a4d-4fa8-b713-c0fbf0e0a2d4`},fileFilename:{universalIdentifier:`e908f82c-88d0-477b-a5f2-1798fc4090b8`},fileId:{universalIdentifier:`060b366e-bb3d-40b5-83e6-166629a40444`},providerMetadata:{universalIdentifier:`689d988e-3883-4ab6-9cf3-c36a3002f865`},message:{universalIdentifier:`efd41407-a49d-4a3a-97b4-94fd180e7652`}},campaignDelivery:{...I(L.campaignDelivery),campaignId:{universalIdentifier:`5b3b48cd-71ec-4ff6-bd4f-8ea99965d611`},personId:{universalIdentifier:`d12ac3bc-7d2c-4317-9c80-663e58ffbea2`},recipientEmail:{universalIdentifier:`28e61664-054b-4b41-b33b-d06b2fc7618f`},state:{universalIdentifier:`668eb863-852e-4846-b3f6-f74fc5d25cf9`},skipReason:{universalIdentifier:`86e995b9-467f-4570-a8f8-a647772e0944`},failureReason:{universalIdentifier:`5a080f14-de17-41a8-a2d7-e9287628db30`},claimToken:{universalIdentifier:`66b78eb0-7a53-4ad6-929a-156183490eb3`},claimExpiresAt:{universalIdentifier:`ba84a4ba-65ca-43dd-b72c-4b0f2f5b2f44`},providerMessageId:{universalIdentifier:`a560bd1a-716b-4fc3-b931-a34ff46bca6f`},sentAt:{universalIdentifier:`c4db7935-d927-49bd-80bd-01a6f39685a4`},deliveredAt:{universalIdentifier:`2cba1c4e-df5c-496d-8d0d-9f43fc371b5f`},bouncedAt:{universalIdentifier:`c3db41d4-3c48-4110-b3b3-a68cb82a1a78`},complainedAt:{universalIdentifier:`322301c5-62d6-428a-bc33-89f8eee75a47`},rejectedAt:{universalIdentifier:`de3599c8-d91b-42fb-a76f-34cd1826dd04`},renderingFailedAt:{universalIdentifier:`eca2b84e-a8d0-4641-bf16-48005e1826bd`}},messageSuppression:{...I(L.messageSuppression),emailAddress:{universalIdentifier:`d44cd615-c3ff-4ac5-a0cc-bfbda700df8e`},reason:{universalIdentifier:`2829a0be-f463-423c-810f-abf7b7a38454`},source:{universalIdentifier:`c0111315-babb-44ab-b4bb-8393ca7a4f98`},providerEventId:{universalIdentifier:`4959b0da-3ce2-42f7-8cc0-36fd20799a20`},unsubscribeTopicId:{universalIdentifier:`42c74315-d6d3-47f7-8f72-d7d40e41cc84`}},timelineActivity:{target:{universalIdentifier:`20202020-9a2b-4c3d-a4e5-f6a7b8c9d0e1`},...F(L.timelineActivity),timelineActivityTypeId:{universalIdentifier:`20202020-e5f8-4839-9dcf-781e260624ee`},timelineActivityTypeSnapshot:{universalIdentifier:`20202020-e006-493a-9b07-f2a768a204ca`},happensAt:{universalIdentifier:`20202020-9526-4993-b339-c4318c4d39f0`},properties:{universalIdentifier:`20202020-f142-4b04-b91b-6a2b4af3bf11`},workspaceMember:{universalIdentifier:`20202020-af23-4479-9a30-868edc474b36`},targetPerson:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.person})},targetCompany:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.company})},targetOpportunity:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.opportunity})},targetTask:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.task})},targetNote:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.note})},targetWorkflow:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.workflow})},targetWorkflowVersion:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.workflowVersion})},targetWorkflowRun:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.workflowRun})},targetDashboard:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.dashboard})},targetMessageList:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.messageList})},targetMessageCampaign:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.timelineActivity,relationTargetObjectUniversalIdentifier:L.messageCampaign})},linkedRecordCachedName:{universalIdentifier:`20202020-cfdb-4bef-bbce-a29f41230934`},linkedRecordId:{universalIdentifier:`20202020-2e0e-48c0-b445-ee6c1e61687d`},linkedObjectMetadataId:{universalIdentifier:`20202020-c595-449d-9f89-562758c9ee69`}},attachment:{target:{universalIdentifier:`20202020-f634-435d-ab8d-e1168b375c69`},...F(L.attachment),name:{universalIdentifier:`20202020-87a5-48f8-bbf7-ade388825a57`},file:{universalIdentifier:`20202020-15db-460e-8166-c7b5d87ad4be`},fullPath:{universalIdentifier:`20202020-0d19-453d-8e8d-fbcda8ca3747`},fileCategory:{universalIdentifier:`20202020-8c3f-4d9e-9a1b-2e5f7a8c9d0e`},targetTask:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.attachment,relationTargetObjectUniversalIdentifier:L.task})},targetNote:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.attachment,relationTargetObjectUniversalIdentifier:L.note})},targetPerson:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.attachment,relationTargetObjectUniversalIdentifier:L.person})},targetCompany:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.attachment,relationTargetObjectUniversalIdentifier:L.company})},targetOpportunity:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.attachment,relationTargetObjectUniversalIdentifier:L.opportunity})},targetDashboard:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.attachment,relationTargetObjectUniversalIdentifier:L.dashboard})},targetWorkflow:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.attachment,relationTargetObjectUniversalIdentifier:L.workflow})},targetAgentChatThread:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.attachment,relationTargetObjectUniversalIdentifier:L.agentChatThread})}},blocklist:{...F(L.blocklist),handle:{universalIdentifier:`20202020-eef3-44ed-aa32-4641d7fd4a3e`},scope:{universalIdentifier:`20202020-1a5f-4c9e-9b3e-7d2a6f4c8e11`},workspaceMember:{universalIdentifier:`20202020-548d-4084-a947-fa20a39f7c06`}},calendarChannelEventAssociation:{...F(L.calendarChannelEventAssociation),calendarChannelId:{universalIdentifier:`20202020-93ee-4da4-8d58-0282c4a9cb7d`},calendarEvent:{universalIdentifier:`20202020-5aa5-437e-bb86-f42d457783e3`},eventExternalId:{universalIdentifier:`20202020-9ec8-48bb-b279-21d0734a75a1`},recurringEventExternalId:{universalIdentifier:`20202020-c58f-4c69-9bf8-9518fa31aa50`}},calendarEventParticipant:{...F(L.calendarEventParticipant),calendarEvent:{universalIdentifier:`20202020-fe3a-401c-b889-af4f4657a861`},handle:{universalIdentifier:`20202020-8692-4580-8210-9e09cbd031a7`},displayName:{universalIdentifier:`20202020-ee1e-4f9f-8ac1-5c0b2f69691e`},isOrganizer:{universalIdentifier:`20202020-66e7-4e00-9e06-d06c92650580`},responseStatus:{universalIdentifier:`20202020-cec0-4be8-8fba-c366abc23147`},person:{universalIdentifier:`20202020-5761-4842-8186-e1898ef93966`},workspaceMember:{universalIdentifier:`20202020-20e4-4591-93ed-aeb17a4dcbd2`}},calendarEvent:{...F(L.calendarEvent),title:{universalIdentifier:`20202020-080e-49d1-b21d-9702a7e2525c`},isCanceled:{universalIdentifier:`20202020-335b-4e04-b470-43b84b64863c`},isFullDay:{universalIdentifier:`20202020-551c-402c-bb6d-dfe9efe86bcb`},startsAt:{universalIdentifier:`20202020-2c57-4c75-93c5-2ac950a6ed67`},endsAt:{universalIdentifier:`20202020-2554-4ee1-a617-17907f6bab21`},externalCreatedAt:{universalIdentifier:`20202020-9f03-4058-a898-346c62181599`},externalUpdatedAt:{universalIdentifier:`20202020-b355-4c18-8825-ef42c8a5a755`},description:{universalIdentifier:`20202020-52c4-4266-a98f-e90af0b4d271`},location:{universalIdentifier:`20202020-641a-4ffe-960d-c3c186d95b17`},iCalUid:{universalIdentifier:`20202020-f24b-45f4-b6a3-d2f9fcb98714`},conferenceSolution:{universalIdentifier:`20202020-1c3f-4b5a-b526-5411a82179eb`},conferenceLink:{universalIdentifier:`20202020-35da-43ef-9ca0-e936e9dc237b`},calendarChannelEventAssociations:{universalIdentifier:`20202020-bdf8-4572-a2cc-ecbb6bcc3a02`},calendarEventParticipants:{universalIdentifier:`20202020-e07e-4ccb-88f5-6f3d00458eec`},calendarEventTargets:{universalIdentifier:`2b4a0785-3462-485f-b1a8-79ebb2078eab`},callRecordings:{universalIdentifier:`48d6d151-18e2-4111-b405-d85fb9d860d8`}},calendarEventTarget:{target:{universalIdentifier:`676e9f68-7b5c-41e6-b46d-2fb9527b7051`},...F(L.calendarEventTarget),calendarEvent:{universalIdentifier:`a47824b0-0e64-4c1f-bbad-ce45209d119b`},isAutomaticallyAssigned:{universalIdentifier:`b6374fed-9cf2-49ef-b45a-1d6814c16264`},isManuallyAssigned:{universalIdentifier:`6afbd5b8-25b5-4c04-82e5-281e6f90f453`},targetPerson:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.calendarEventTarget,relationTargetObjectUniversalIdentifier:L.person})},targetCompany:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.calendarEventTarget,relationTargetObjectUniversalIdentifier:L.company})},targetOpportunity:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.calendarEventTarget,relationTargetObjectUniversalIdentifier:L.opportunity})}},callRecording:{...F(L.callRecording),title:{universalIdentifier:`4cff8863-a1d1-45fd-a370-4eb6aa1f2a5b`},status:{universalIdentifier:`3e617680-d93e-4309-a54f-90f69528bfd7`},recordingRequestStatus:{universalIdentifier:`7fd681c9-244c-4e98-8939-7b175d472638`},applicationId:{universalIdentifier:`24ec1239-1240-42cb-8a2d-302632378e09`},externalBotId:{universalIdentifier:`0a2da128-9bcc-488b-bc31-65318c41bdf9`},externalRecordingId:{universalIdentifier:`6d17fb71-324b-4625-a5be-b3580607e2c7`},startedAt:{universalIdentifier:`6c56c23f-1987-410a-860a-df3b2b3f9a33`},endedAt:{universalIdentifier:`7a38a9cf-8424-4d6e-b80a-6883d3c662ef`},video:{universalIdentifier:`bb9523d3-457e-4f4b-8c79-27a77afb87da`},audio:{universalIdentifier:`2eafc2d0-8fec-430c-a939-65ca5fbc0f08`},transcript:{universalIdentifier:`27b86d68-57d1-4607-aca0-191896b1ad43`},summary:{universalIdentifier:`adb0f472-756b-4d3f-b21e-ea32bf73a5e4`},calendarEvent:{universalIdentifier:`49e64b28-bd98-4775-80ea-4781bdd45e35`}},company:{...F(L.company),name:{universalIdentifier:`20202020-4d99-4e2e-a84c-4a27837b1ece`},domainName:{universalIdentifier:`20202020-0c28-43d8-8ba5-3659924d3489`},address:{universalIdentifier:`20202020-c5ce-4adc-b7b6-9c0979fc55e7`},linkedinLink:{universalIdentifier:`20202020-ebeb-4beb-b9ad-6848036fb451`},annualRevenue:{universalIdentifier:`60f533b7-2166-4071-a767-ceb0286822fd`},people:{universalIdentifier:`20202020-3213-4ddf-9494-6422bcff8d7c`},accountOwner:{universalIdentifier:`20202020-95b8-4e10-9881-edb5d4765f9d`},taskTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.company,relationTargetObjectUniversalIdentifier:L.taskTarget})},noteTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.company,relationTargetObjectUniversalIdentifier:L.noteTarget})},agentChatThreadTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.company,relationTargetObjectUniversalIdentifier:L.agentChatThreadTarget})},calendarEventTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.company,relationTargetObjectUniversalIdentifier:L.calendarEventTarget})},messageThreadTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.company,relationTargetObjectUniversalIdentifier:L.messageThreadTarget})},opportunities:{universalIdentifier:`20202020-add3-4658-8e23-d70dccb6d0ec`},attachments:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.company,relationTargetObjectUniversalIdentifier:L.attachment})},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.company,relationTargetObjectUniversalIdentifier:L.timelineActivity})}},dashboard:{...F(L.dashboard),title:{universalIdentifier:`20202020-20ee-4091-95dc-44b57eda3a89`},pageLayoutId:{universalIdentifier:`20202020-bb53-4648-aa36-1d9d54e6f7f2`},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.dashboard,relationTargetObjectUniversalIdentifier:L.timelineActivity})},attachments:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.dashboard,relationTargetObjectUniversalIdentifier:L.attachment})}},messageCampaign:{...F(L.messageCampaign),name:{universalIdentifier:`dc8bca0e-37c4-4b78-814d-2e91124274e3`},subject:{universalIdentifier:`7251544c-b07a-4f0d-9d0a-48514367f230`},bodyTemplate:{universalIdentifier:`b3a69d08-31ca-4a8d-8359-5ca462899342`},fromAddress:{universalIdentifier:`91e1a33c-c1ff-411a-b720-9085e13c05db`},status:{universalIdentifier:`c7117256-3de6-48e1-87df-c99c32bad610`},scheduledAt:{universalIdentifier:`0b281092-f5a5-4dd6-969b-5229f6620071`},sentAt:{universalIdentifier:`e2315b4f-9edf-4df2-96b9-961e76368671`},sentCount:{universalIdentifier:`2f333d2b-37b8-4ddc-ad0d-c07c6ce066ad`},deliveredCount:{universalIdentifier:`f4ee1d33-7379-42fe-ad63-e023449baea6`},failedCount:{universalIdentifier:`d373fcd7-b1ce-4c77-8031-a5785c475028`},bouncedCount:{universalIdentifier:`20d884a9-34dd-4667-8ecb-ceec224258e2`},complainedCount:{universalIdentifier:`82842cfa-f12a-4bab-bbde-b2cf587d0406`},skippedCount:{universalIdentifier:`a1f4c6d2-5e8b-4a37-9c60-31b7f0d2a984`},uniqueClickCount:{universalIdentifier:`d9a4e1c6-5b3f-4e0a-9c8d-4f7b9a3e6c12`},clickRate:{universalIdentifier:`7999aebc-51f4-4b93-9925-717db707c703`},uniqueOpenCount:{universalIdentifier:`865d188f-3178-4173-a986-80d01a8c7147`},openRate:{universalIdentifier:`77529a55-d723-4c91-9df7-0190fd760e93`},unsubscribeTopicId:{universalIdentifier:`0648e7ad-1769-4ff6-a4d5-72da79ef169c`},list:{universalIdentifier:`cb24dcdf-f0e8-4c71-8cff-70b714e86530`},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.messageCampaign,relationTargetObjectUniversalIdentifier:L.timelineActivity})},messages:{universalIdentifier:`e5a177a7-512b-4778-928e-69777a528f7c`},recipients:{universalIdentifier:`05a3271c-5b91-493c-8f30-2d27b31d019e`}},messageList:{...F(L.messageList),name:{universalIdentifier:`69b9ed8b-7b26-4108-894f-05700ef7e8ee`},description:{universalIdentifier:`2484463a-12e0-411e-9586-81892bd7721c`},members:{universalIdentifier:`92df3493-91cf-4665-8587-1b08917d299b`},campaigns:{universalIdentifier:`e098d838-31ab-4812-91a8-f055f45a6832`},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.messageList,relationTargetObjectUniversalIdentifier:L.timelineActivity})}},messageListMember:{...F(L.messageListMember),person:{universalIdentifier:`34288425-8805-42fb-8b98-ee13d09be3d3`},list:{universalIdentifier:`d5402005-e8f9-4fbe-8696-b6723cd85018`}},messageChannelMessageAssociation:{...F(L.messageChannelMessageAssociation),messageChannelId:{universalIdentifier:`20202020-b658-408f-bd46-3bd2d15d7e52`},message:{universalIdentifier:`20202020-da5d-4ac5-8743-342ab0a0336b`},messageExternalId:{universalIdentifier:`20202020-37d6-438f-b6fd-6503596c8f34`},messageThread:{universalIdentifier:`20202020-fac8-42a8-94dd-44dbc920ae16`},messageThreadExternalId:{universalIdentifier:`20202020-35fb-421e-afa0-0b8e8f7f9018`},direction:{universalIdentifier:`75c9b0f7-9e76-44d4-a2f9-47051e61eec7`},messageFolders:{universalIdentifier:`9bfc9da7-ae2d-44fd-9563-ede90c5d6222`}},messageChannelMessageAssociationMessageFolder:{...F(L.messageChannelMessageAssociationMessageFolder),messageChannelMessageAssociation:{universalIdentifier:`7411cfa3-4fd9-4b90-a636-940015fd7243`},messageFolderId:{universalIdentifier:`b3369d31-3856-4a7a-b007-ee353918127c`}},messageParticipant:{...F(L.messageParticipant),message:{universalIdentifier:`20202020-985b-429a-9db9-9e55f4898a2a`},role:{universalIdentifier:`20202020-65d1-42f4-8729-c9ec1f52aecd`},handle:{universalIdentifier:`20202020-2456-464e-b422-b965a4db4a0b`},displayName:{universalIdentifier:`20202020-36dd-4a4f-ac02-228425be9fac`},person:{universalIdentifier:`20202020-249d-4e0f-82cd-1b9df5cd3da2`},workspaceMember:{universalIdentifier:`20202020-77a7-4845-99ed-1bcbb478be6f`},messageCampaign:{universalIdentifier:`5bc768db-919f-41da-8c43-df08084d526f`}},messageThread:{...F(L.messageThread),messages:{universalIdentifier:`20202020-3115-404f-aade-e1154b28e35a`},messageChannelMessageAssociations:{universalIdentifier:`20202020-314e-40a4-906d-a5d5d6c285f6`},subject:{universalIdentifier:`a8ddbf8c-1137-45d1-b89e-5ffbd83f67c8`},messageThreadTargets:{universalIdentifier:`8d7c8b17-b835-4082-96bd-de704c491d49`}},messageThreadTarget:{target:{universalIdentifier:`e85e853d-c26e-41b3-bec0-7afc4bdbc2f7`},...F(L.messageThreadTarget),messageThread:{universalIdentifier:`23ca09e6-149d-452f-bed7-a4aad24d1314`},isAutomaticallyAssigned:{universalIdentifier:`04403730-e960-415a-8790-f0c0f82f3477`},isManuallyAssigned:{universalIdentifier:`16efa36f-d195-42e9-959f-6928164f2395`},targetPerson:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.messageThreadTarget,relationTargetObjectUniversalIdentifier:L.person})},targetCompany:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.messageThreadTarget,relationTargetObjectUniversalIdentifier:L.company})},targetOpportunity:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.messageThreadTarget,relationTargetObjectUniversalIdentifier:L.opportunity})}},message:{...F(L.message),headerMessageId:{universalIdentifier:`20202020-72b5-416d-aed8-b55609067d01`},messageThread:{universalIdentifier:`20202020-30f2-4ccd-9f5c-e41bb9d26214`},subject:{universalIdentifier:`20202020-52d1-4036-b9ae-84bd722bb37a`},text:{universalIdentifier:`20202020-d2ee-4e7e-89de-9a0a9044a143`},receivedAt:{universalIdentifier:`20202020-140a-4a2a-9f86-f13b6a979afc`},messageParticipants:{universalIdentifier:`20202020-7cff-4a74-b63c-73228448cbd9`},messageChannelMessageAssociations:{universalIdentifier:`20202020-3cef-43a3-82c6-50e7cfbc9ae4`},messageCampaign:{universalIdentifier:`77cff00b-a0ba-48d6-80de-0d5ccf14e45b`},isDraft:{universalIdentifier:`20202020-4d3a-4b6e-9c1f-2a5e7b9d0c34`}},note:{...F(L.note),title:{universalIdentifier:`20202020-faeb-4c76-8ba6-ccbb0b4a965f`},bodyV2:{universalIdentifier:`20202020-a7bb-4d94-be51-8f25181502c8`},noteTargets:{universalIdentifier:`20202020-1f25-43fe-8b00-af212fdde823`},attachments:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.note,relationTargetObjectUniversalIdentifier:L.attachment})},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.note,relationTargetObjectUniversalIdentifier:L.timelineActivity})}},noteTarget:{target:{universalIdentifier:`20202020-f635-435d-ab8d-e1168b375c70`},...F(L.noteTarget),note:{universalIdentifier:`20202020-57f3-4f50-9599-fc0f671df003`},targetPerson:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.noteTarget,relationTargetObjectUniversalIdentifier:L.person})},targetCompany:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.noteTarget,relationTargetObjectUniversalIdentifier:L.company})},targetOpportunity:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.noteTarget,relationTargetObjectUniversalIdentifier:L.opportunity})}},opportunity:{...F(L.opportunity),name:{universalIdentifier:`20202020-8609-4f65-a2d9-44009eb422b5`},amount:{universalIdentifier:`20202020-583e-4642-8533-db761d5fa82f`},closeDate:{universalIdentifier:`20202020-527e-44d6-b1ac-c4158d307b97`},stage:{universalIdentifier:`20202020-6f76-477d-8551-28cd65b2b4b9`},pointOfContact:{universalIdentifier:`20202020-8dfb-42fc-92b6-01afb759ed16`},company:{universalIdentifier:`20202020-cbac-457e-b565-adece5fc815f`},owner:{universalIdentifier:`20202020-be7e-4d1e-8e19-3d5c7c4b9f2a`},taskTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.opportunity,relationTargetObjectUniversalIdentifier:L.taskTarget})},noteTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.opportunity,relationTargetObjectUniversalIdentifier:L.noteTarget})},agentChatThreadTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.opportunity,relationTargetObjectUniversalIdentifier:L.agentChatThreadTarget})},calendarEventTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.opportunity,relationTargetObjectUniversalIdentifier:L.calendarEventTarget})},messageThreadTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.opportunity,relationTargetObjectUniversalIdentifier:L.messageThreadTarget})},attachments:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.opportunity,relationTargetObjectUniversalIdentifier:L.attachment})},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.opportunity,relationTargetObjectUniversalIdentifier:L.timelineActivity})}},person:{...F(L.person),name:{universalIdentifier:`20202020-3875-44d5-8c33-a6239011cab8`},emails:{universalIdentifier:`20202020-3c51-43fa-8b6e-af39e29368ab`},linkedinLink:{universalIdentifier:`20202020-f1af-48f7-893b-2007a73dd508`},jobTitle:{universalIdentifier:`20202020-b0d0-415a-bef9-640a26dacd9b`},phones:{universalIdentifier:`20202020-0638-448e-8825-439134618022`},avatarUrl:{universalIdentifier:`20202020-b8a6-40df-961c-373dc5d2ec21`},avatarFile:{universalIdentifier:`20202020-a7c9-4e3d-8f1b-2d5a6b7c8e9f`},company:{universalIdentifier:`20202020-e2f3-448e-b34c-2d625f0025fd`},pointOfContactForOpportunities:{universalIdentifier:`20202020-911b-4a7d-b67b-918aa9a5b33a`},taskTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.person,relationTargetObjectUniversalIdentifier:L.taskTarget})},noteTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.person,relationTargetObjectUniversalIdentifier:L.noteTarget})},agentChatThreadTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.person,relationTargetObjectUniversalIdentifier:L.agentChatThreadTarget})},calendarEventTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.person,relationTargetObjectUniversalIdentifier:L.calendarEventTarget})},messageThreadTargets:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.person,relationTargetObjectUniversalIdentifier:L.messageThreadTarget})},attachments:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.person,relationTargetObjectUniversalIdentifier:L.attachment})},messageParticipants:{universalIdentifier:`20202020-498e-4c61-8158-fa04f0638334`},calendarEventParticipants:{universalIdentifier:`20202020-52ee-45e9-a702-b64b3753e3a9`},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.person,relationTargetObjectUniversalIdentifier:L.timelineActivity})},listMemberships:{universalIdentifier:`8b8d1be0-4c94-4413-a2c9-c7ede205a81d`}},recordShare:{...F(L.recordShare),recordId:{universalIdentifier:`01edb657-6339-475c-b581-784a0c3e0509`},objectMetadataId:{universalIdentifier:`504cec47-6aae-4e5b-85fd-1581b62602e3`},principalId:{universalIdentifier:`c1849ee2-1d2a-409e-800d-16fc16621257`},principalType:{universalIdentifier:`556161f6-1a01-478e-8f01-acc413102e44`},accessLevel:{universalIdentifier:`943b9926-9620-43de-8a46-8ebfee74dea3`},rowCause:{universalIdentifier:`be27640e-f739-4d07-8979-dba4526e406a`},sourceId:{universalIdentifier:`534a2244-9feb-4d21-afd9-c9a20052b300`}},shortLink:{...F(L.shortLink),authoredTemplateUrl:{universalIdentifier:`6f588340-ddff-4113-984b-c37c045d496c`},resolvedDestinationUrl:{universalIdentifier:`5ba068eb-0594-4945-9183-7174a37a9406`},templateAndResolvedUrlHash:{universalIdentifier:`175f7743-b027-4374-b577-6503679d00fc`}},task:{...F(L.task),title:{universalIdentifier:`20202020-b386-4cb7-aa5a-08d4a4d92680`},bodyV2:{universalIdentifier:`20202020-4aa0-4ae8-898d-7df0afd47ab1`},dueAt:{universalIdentifier:`20202020-fd99-40da-951b-4cb9a352fce3`},status:{universalIdentifier:`20202020-70bc-48f9-89c5-6aa730b151e0`},taskTargets:{universalIdentifier:`20202020-de9c-4d0e-a452-713d4a3e5fc7`},attachments:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.task,relationTargetObjectUniversalIdentifier:L.attachment})},assignee:{universalIdentifier:`20202020-065a-4f42-a906-e20422c1753f`},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.task,relationTargetObjectUniversalIdentifier:L.timelineActivity})}},taskTarget:{target:{universalIdentifier:`20202020-f636-435d-ab8d-e1168b375c71`},...F(L.taskTarget),task:{universalIdentifier:`20202020-e881-457a-8758-74aaef4ae78a`},targetPerson:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.taskTarget,relationTargetObjectUniversalIdentifier:L.person})},targetCompany:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.taskTarget,relationTargetObjectUniversalIdentifier:L.company})},targetOpportunity:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.taskTarget,relationTargetObjectUniversalIdentifier:L.opportunity})}},workflow:{...F(L.workflow),name:{universalIdentifier:`20202020-b3d3-478f-acc0-5d901e725b20`},lastPublishedVersionId:{universalIdentifier:`20202020-326a-4fba-8639-3456c0a169e8`},coreWorkflowId:{universalIdentifier:`20202020-058a-42ad-8eb8-0662a5552aad`},statuses:{universalIdentifier:`20202020-357c-4432-8c50-8c31b4a552d9`},versions:{universalIdentifier:`20202020-9432-416e-8f3c-27ee3153d099`},runs:{universalIdentifier:`20202020-759b-4340-b58b-e73595c4df4f`},automatedTriggers:{universalIdentifier:`20202020-3319-4234-a34c-117ecad2b8a9`},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.workflow,relationTargetObjectUniversalIdentifier:L.timelineActivity})},attachments:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.workflow,relationTargetObjectUniversalIdentifier:L.attachment})}},workflowAutomatedTrigger:{...F(L.workflowAutomatedTrigger),type:{universalIdentifier:`20202020-3319-4234-a34c-3f92c1ab56e7`},settings:{universalIdentifier:`20202020-3319-4234-a34c-bac8f903de12`},workflow:{universalIdentifier:`20202020-3319-4234-a34c-8e1a4d2f7c03`}},workflowRun:{...F(L.workflowRun),name:{universalIdentifier:`20202020-b840-4253-aef9-4e5013694587`},workflowVersion:{universalIdentifier:`20202020-2f52-4ba8-8dc4-d0d6adb9578d`},workflow:{universalIdentifier:`20202020-8c57-4e7f-84f5-f373f68e1b82`},enqueuedAt:{universalIdentifier:`20202020-f1e3-4de1-a461-b5c4fdbc861d`},startedAt:{universalIdentifier:`20202020-a234-4e2d-bd15-85bcea6bb183`},endedAt:{universalIdentifier:`20202020-e1c1-4b6b-bbbd-b2beaf2e159e`},status:{universalIdentifier:`20202020-6b3e-4f9c-8c2b-2e5b8e6d6f3b`},state:{universalIdentifier:`20202020-611f-45f3-9cde-d64927e8ec57`},stepLogs:{universalIdentifier:`20202020-7c4e-4e1a-8fc1-1e3a55d6c2a1`},coreWorkflowId:{universalIdentifier:`e07d8ac0-6b6e-4685-81fa-50d82ae7f880`},coreWorkflowVersionId:{universalIdentifier:`58e3f476-425d-4c66-b391-779d0412e107`},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.workflowRun,relationTargetObjectUniversalIdentifier:L.timelineActivity})}},workflowVersion:{...F(L.workflowVersion),name:{universalIdentifier:`20202020-a12f-4cca-9937-a2e40cc65509`},workflow:{universalIdentifier:`20202020-afa3-46c3-91b0-0631ca6aa1c8`},trigger:{universalIdentifier:`20202020-4eae-43e7-86e0-212b41a30b48`},status:{universalIdentifier:`20202020-5a34-440e-8a25-39d8c3d1d4cf`},runs:{universalIdentifier:`20202020-1d08-46df-901a-85045f18099a`},steps:{universalIdentifier:`20202020-5988-4a64-b94a-1f9b7b989039`},coreWorkflowVersionId:{universalIdentifier:`20202020-58b4-46e8-b6d2-f1f3c74cf7f4`},timelineActivities:{universalIdentifier:t.R({applicationUniversalIdentifier:t.z,objectUniversalIdentifier:L.workflowVersion,relationTargetObjectUniversalIdentifier:L.timelineActivity})}},workspaceMember:{...F(L.workspaceMember),name:{universalIdentifier:`20202020-e914-43a6-9c26-3603c59065f4`},colorScheme:{universalIdentifier:`20202020-66bc-47f2-adac-f2ef7c598b63`},uiScale:{universalIdentifier:`20202020-1581-4bfb-b87d-58fa9cd5b817`},openRecordIn:{universalIdentifier:`20202020-1b16-419d-9323-6f3ea850e5d9`},locale:{universalIdentifier:`20202020-402e-4695-b169-794fa015afbe`},avatarUrl:{universalIdentifier:`20202020-0ced-4c4f-a376-c98a966af3f6`},userEmail:{universalIdentifier:`20202020-4c5f-4e09-bebc-9e624e21ecf4`},jobTitle:{universalIdentifier:`20202020-4dd4-4619-826e-08f6c06b374d`},userId:{universalIdentifier:`20202020-75a9-4dfc-bf25-2e4b43e89820`},assignedTasks:{universalIdentifier:`20202020-61dc-4a1c-99e8-38ebf8d2bbeb`},ownedOpportunities:{universalIdentifier:`20202020-9e4d-4b3a-8c1f-6d7e8f9a0b1c`},accountOwnerForCompanies:{universalIdentifier:`20202020-dc29-4bd4-a3c1-29eafa324bee`},messageParticipants:{universalIdentifier:`20202020-8f99-48bc-a5eb-edd33dd54188`},blocklist:{universalIdentifier:`20202020-6cb2-4161-9f29-a4b7f1283859`},calendarEventParticipants:{universalIdentifier:`20202020-0dbc-4841-9ce1-3e793b5b3512`},timelineActivities:{universalIdentifier:`20202020-e15b-47b8-94fe-8200e3c66615`},agentMessages:{universalIdentifier:`211b2717-450a-4f5f-808f-39695c819319`},agentChatThreads:{universalIdentifier:`fbaf92a6-44ae-4b6d-9d10-2c15d84eaea1`},agentChatThreadParticipants:{universalIdentifier:`d1de909f-a0eb-4e94-8903-abec012864c9`},agentMessageReactions:{universalIdentifier:`9242d7b0-bb3a-4bb6-a830-5e84e722c684`},assignedAgentChatThreads:{universalIdentifier:`a89c46f5-cdb7-40e9-9a87-a8ecf0818c3c`},timeZone:{universalIdentifier:`20202020-2d33-4c21-a86e-5943b050dd54`},dateFormat:{universalIdentifier:`20202020-af13-4e11-b1e7-b8cf5ea13dc0`},timeFormat:{universalIdentifier:`20202020-8acb-4cf8-a851-a6ed443c8d81`},calendarStartDay:{universalIdentifier:`20202020-1ecc-4562-84c9-ff3a2f6cce85`},numberFormat:{universalIdentifier:`20202020-7f40-4e7f-b126-11c0eda6b141`}}},z=({objectUniversalIdentifier:e,fields:n,viewFieldNames:r})=>{let i=t.V({objectMetadataApplicationUniversalIdentifier:t.z,objectUniversalIdentifier:e,viewKey:t.I.INDEX});return{universalIdentifier:i,viewFields:Object.fromEntries(r.map(r=>{let a=n[r];if(a===void 0)throw Error(`Missing field "${r}" for the INDEX view of object ${e}`);return[r,{universalIdentifier:t.F({fieldMetadataApplicationUniversalIdentifier:t.z,viewUniversalIdentifier:i,fieldMetadataUniversalIdentifier:a.universalIdentifier})}]}))}},B=({objectUniversalIdentifier:e,fields:n,viewFieldNames:r,viewFieldGroupNames:i})=>{let a=t.V({objectMetadataApplicationUniversalIdentifier:t.z,objectUniversalIdentifier:e,viewKey:t.I.FIELDS_WIDGET});return{universalIdentifier:a,viewFields:Object.fromEntries(r.map(r=>{let i=n[r];if(i===void 0)throw Error(`Missing field "${r}" for the record-page view of object ${e}`);return[r,{universalIdentifier:t.F({fieldMetadataApplicationUniversalIdentifier:t.z,viewUniversalIdentifier:a,fieldMetadataUniversalIdentifier:i.universalIdentifier})}]})),viewFieldGroups:Object.fromEntries(Object.entries(i).map(([e,n])=>[e,{universalIdentifier:t.U({objectMetadataApplicationUniversalIdentifier:t.z,viewUniversalIdentifier:a,name:n})}]))}},xt={attachment:{universalIdentifier:L.attachment,fields:R.attachment,morphIds:{targetMorphId:{morphId:R.attachment.target.universalIdentifier}},indexes:{taskIdIndex:{universalIdentifier:`b8d4f9a3-0c25-4e7b-9f6a-2d3e4c5b6f70`},noteIdIndex:{universalIdentifier:`9d31ea73-13b6-4e06-84ee-c66c72bf7787`},personIdIndex:{universalIdentifier:`55637a5a-1edc-4351-8d76-d40020bf8944`},companyIdIndex:{universalIdentifier:`4137ba06-184d-438f-b484-080f02a97659`},opportunityIdIndex:{universalIdentifier:`8cc162d1-c127-4981-878d-f78622f8f12d`},dashboardIdIndex:{universalIdentifier:`c10eba2d-ff1a-4eab-9285-50481c12a003`},workflowIdIndex:{universalIdentifier:`fadeab4b-79ee-4173-af79-72c51fbad888`},agentChatThreadIdIndex:{universalIdentifier:`69857371-6ff9-48fa-a9de-db4f71593431`}},views:{allAttachments:z({objectUniversalIdentifier:L.attachment,fields:R.attachment,viewFieldNames:[`name`,`file`,`createdBy`,`createdAt`,`targetPerson`,`targetCompany`,`targetOpportunity`,`targetTask`,`targetNote`,`targetDashboard`,`targetWorkflow`]}),attachmentRecordPageFields:B({objectUniversalIdentifier:L.attachment,fields:R.attachment,viewFieldNames:[`createdBy`,`createdAt`],viewFieldGroupNames:{}})}},blocklist:{universalIdentifier:L.blocklist,fields:R.blocklist,indexes:{workspaceMemberIdIndex:{universalIdentifier:`4daf320e-74d0-4f24-a45a-af3a09d741cb`}},views:{allBlocklists:z({objectUniversalIdentifier:L.blocklist,fields:R.blocklist,viewFieldNames:[`handle`,`workspaceMember`,`createdAt`]}),blocklistRecordPageFields:B({objectUniversalIdentifier:L.blocklist,fields:R.blocklist,viewFieldNames:[`workspaceMember`,`createdAt`,`createdBy`],viewFieldGroupNames:{general:`General`,system:`System`}})}},calendarChannelEventAssociation:{universalIdentifier:L.calendarChannelEventAssociation,fields:R.calendarChannelEventAssociation,indexes:{calendarChannelIdIndex:{universalIdentifier:`ff6b86c1-3112-4dfa-b734-c4789111a716`},calendarEventIdIndex:{universalIdentifier:`47a3c8d2-9f14-4b6e-8c5d-1a2b3f4e5c69`},eventExternalIdIndex:{universalIdentifier:`b14d63d0-c1ab-470f-927d-9c0c05277caa`}},views:{allCalendarChannelEventAssociations:z({objectUniversalIdentifier:L.calendarChannelEventAssociation,fields:R.calendarChannelEventAssociation,viewFieldNames:[`calendarChannelId`,`calendarEvent`,`eventExternalId`,`createdAt`]}),calendarChannelEventAssociationRecordPageFields:B({objectUniversalIdentifier:L.calendarChannelEventAssociation,fields:R.calendarChannelEventAssociation,viewFieldNames:[`calendarChannelId`,`calendarEvent`,`eventExternalId`,`createdAt`,`createdBy`],viewFieldGroupNames:{general:`General`,system:`System`}})}},calendarEventParticipant:{universalIdentifier:L.calendarEventParticipant,fields:R.calendarEventParticipant,indexes:{calendarEventIdIndex:{universalIdentifier:`c458ad97-8b95-43de-9003-88eb68576049`},personIdIndex:{universalIdentifier:`30e9b75a-881f-4a85-aaf1-f2d2464be1cf`},workspaceMemberIdIndex:{universalIdentifier:`898aa202-428f-4a7a-a3b3-8f0a17a6658e`}},views:{allCalendarEventParticipants:z({objectUniversalIdentifier:L.calendarEventParticipant,fields:R.calendarEventParticipant,viewFieldNames:[`calendarEvent`,`handle`,`displayName`,`isOrganizer`,`responseStatus`,`person`,`workspaceMember`,`createdAt`]}),calendarEventParticipantRecordPageFields:B({objectUniversalIdentifier:L.calendarEventParticipant,fields:R.calendarEventParticipant,viewFieldNames:[`calendarEvent`,`handle`,`displayName`,`isOrganizer`,`responseStatus`,`person`,`workspaceMember`,`createdAt`,`createdBy`],viewFieldGroupNames:{general:`General`,system:`System`}})}},calendarEvent:{universalIdentifier:L.calendarEvent,fields:R.calendarEvent,indexes:{iCalUidIndex:{universalIdentifier:`e38d1418-f994-4f0d-b0cd-41d4da240ea0`}},views:{allCalendarEvents:z({objectUniversalIdentifier:L.calendarEvent,fields:R.calendarEvent,viewFieldNames:[`title`,`startsAt`,`endsAt`,`isFullDay`,`location`,`conferenceLink`,`isCanceled`,`createdAt`]}),calendarEventRecordPageFields:B({objectUniversalIdentifier:L.calendarEvent,fields:R.calendarEvent,viewFieldNames:[`title`,`startsAt`,`endsAt`,`isFullDay`,`isCanceled`,`conferenceLink`,`location`,`description`,`calendarEventTargets`,`externalCreatedAt`,`externalUpdatedAt`,`iCalUid`,`conferenceSolution`],viewFieldGroupNames:{general:`General`,system:`System`}})}},calendarEventTarget:{universalIdentifier:L.calendarEventTarget,fields:R.calendarEventTarget,morphIds:{targetMorphId:{morphId:R.calendarEventTarget.target.universalIdentifier}},indexes:{calendarEventIdIndex:{universalIdentifier:`ce1c180c-0236-4673-ad1d-359dddf59f93`},personIdIndex:{universalIdentifier:`f151bc84-ba45-40cb-b064-02ef359ac17b`},companyIdIndex:{universalIdentifier:`30413277-505d-4f08-be38-a56257460f9f`},opportunityIdIndex:{universalIdentifier:`7920092d-281f-473a-8ea4-53c209b36a37`},calendarEventPersonUniqueIndex:{universalIdentifier:`15b9e394-d451-4186-aaf0-612f6be1ea91`},calendarEventCompanyUniqueIndex:{universalIdentifier:`3fa22398-6e7d-47a5-95eb-4971f9d62135`},calendarEventOpportunityUniqueIndex:{universalIdentifier:`c8183b17-5dfe-4e02-8d9d-aef8e54ef07d`}},views:{}},callRecording:{universalIdentifier:L.callRecording,fields:R.callRecording,indexes:{calendarEventIdIndex:{universalIdentifier:`8be3cc47-9352-4a1b-ad19-bb186bc0865d`}},views:{allCallRecordings:z({objectUniversalIdentifier:L.callRecording,fields:R.callRecording,viewFieldNames:[`status`,`recordingRequestStatus`,`title`,`startedAt`]}),callRecordingRecordPageFields:B({objectUniversalIdentifier:L.callRecording,fields:R.callRecording,viewFieldNames:[`title`,`status`,`recordingRequestStatus`,`startedAt`,`endedAt`,`video`,`audio`,`transcript`,`summary`],viewFieldGroupNames:{general:`General`}})}},company:{universalIdentifier:L.company,fields:R.company,indexes:{accountOwnerIdIndex:{universalIdentifier:`ec2ebfc9-0c9b-4597-a87d-aa295e2d8bfe`},domainNameUniqueIndex:{universalIdentifier:`dd300c61-f422-467a-91f4-de4f83c4175b`},searchVectorGinIndex:{universalIdentifier:`c3eb62df-2cc1-4cc3-b7aa-e96a4d65c633`}},views:{allCompanies:z({objectUniversalIdentifier:L.company,fields:R.company,viewFieldNames:[`name`,`domainName`,`createdBy`,`accountOwner`,`createdAt`,`linkedinLink`,`address`]}),companyRecordPageFields:B({objectUniversalIdentifier:L.company,fields:R.company,viewFieldNames:[`domainName`,`accountOwner`,`annualRevenue`,`linkedinLink`,`address`,`createdAt`,`createdBy`,`updatedAt`,`updatedBy`,`people`,`taskTargets`,`noteTargets`,`opportunities`,`attachments`,`timelineActivities`],viewFieldGroupNames:{general:`General`,business:`Business`,contact:`Contact`,system:`System`}})}},dashboard:{universalIdentifier:L.dashboard,fields:R.dashboard,indexes:{searchVectorGinIndex:{universalIdentifier:`e69f71aa-de0f-4b70-845f-7a8369c47928`}},views:{allDashboards:z({objectUniversalIdentifier:L.dashboard,fields:R.dashboard,viewFieldNames:[`title`,`createdBy`,`createdAt`,`updatedAt`]})}},messageCampaign:{universalIdentifier:L.messageCampaign,fields:R.messageCampaign,indexes:{unsubscribeTopicIdIndex:{universalIdentifier:`efe8c20e-d12b-4475-969e-e86e0bbfe444`},listIdIndex:{universalIdentifier:`17bffd6a-714a-458d-a547-f9e2183d9520`},searchVectorGinIndex:{universalIdentifier:`975823ad-9b97-4f39-b2c7-fbd7d77f4bd1`}},views:{allMessageCampaigns:z({objectUniversalIdentifier:L.messageCampaign,fields:R.messageCampaign,viewFieldNames:[`name`,`subject`,`status`,`list`,`fromAddress`,`scheduledAt`,`sentAt`,`recipients`,`createdAt`]}),messageCampaignList:{universalIdentifier:`99ca5417-e5e0-4fd4-8e64-67acd7b21e25`,viewFields:{name:{universalIdentifier:`fcda0c3b-7ee3-40dd-b280-da3ff4da5452`},subject:{universalIdentifier:`700087d2-bd10-4ab9-b8a9-b0710146927c`},status:{universalIdentifier:`ff29b192-5a52-42a1-8a1e-1a03d26f5464`},list:{universalIdentifier:`8e28bc70-eaa0-4768-bb13-606571e65ac8`},fromAddress:{universalIdentifier:`b9798ecc-de06-4717-8b42-057181437dbc`},scheduledAt:{universalIdentifier:`caba5417-964d-416c-a5a9-b64ef71e5964`},sentAt:{universalIdentifier:`9d546249-b029-4b01-8389-65a88ae583c8`},recipients:{universalIdentifier:`e065a2d1-1352-4869-b527-58e3c37557c0`},createdAt:{universalIdentifier:`27548f0a-5ed4-4412-b23a-718b99eb697e`}}},messageCampaignRecordPageFields:B({objectUniversalIdentifier:L.messageCampaign,fields:R.messageCampaign,viewFieldNames:[`status`,`scheduledAt`,`sentAt`,`sentCount`,`deliveredCount`,`failedCount`,`skippedCount`,`bouncedCount`,`complainedCount`,`uniqueClickCount`,`clickRate`,`uniqueOpenCount`,`openRate`],viewFieldGroupNames:{stats:`Stats`}})}},messageList:{universalIdentifier:L.messageList,fields:R.messageList,indexes:{searchVectorGinIndex:{universalIdentifier:`8e205171-ed74-4620-b7d2-674aab85033a`}},views:{allMessageLists:z({objectUniversalIdentifier:L.messageList,fields:R.messageList,viewFieldNames:[`name`,`description`,`members`,`campaigns`,`createdAt`]})}},messageListMember:{universalIdentifier:L.messageListMember,fields:R.messageListMember,indexes:{listIdIndex:{universalIdentifier:`61188470-6dcb-4b2a-b1a9-baeb688bccae`},personListUniqueIndex:{universalIdentifier:`e5497dc2-1d72-418c-a389-a0645ca0195a`}},views:{allMessageListMembers:z({objectUniversalIdentifier:L.messageListMember,fields:R.messageListMember,viewFieldNames:[`id`,`person`,`list`,`createdAt`]})}},messageChannelMessageAssociation:{universalIdentifier:L.messageChannelMessageAssociation,fields:R.messageChannelMessageAssociation,indexes:{messageChannelIdIndex:{universalIdentifier:`9894f9a3-0225-4e7b-9f6a-23d4e2576784`},messageIdIndex:{universalIdentifier:`9bb24d40-60dd-4beb-8c64-a74e8c67f9ee`},messageChannelIdMessageIdUniqueIndex:{universalIdentifier:`1b86ece8-7ce3-4df3-8771-fd4b5d45b2f2`}},views:{allMessageChannelMessageAssociations:z({objectUniversalIdentifier:L.messageChannelMessageAssociation,fields:R.messageChannelMessageAssociation,viewFieldNames:[`messageChannelId`,`message`,`messageExternalId`,`direction`,`createdAt`]}),messageChannelMessageAssociationRecordPageFields:B({objectUniversalIdentifier:L.messageChannelMessageAssociation,fields:R.messageChannelMessageAssociation,viewFieldNames:[`messageChannelId`,`message`,`messageExternalId`,`direction`,`createdAt`,`createdBy`],viewFieldGroupNames:{general:`General`,system:`System`}})}},messageChannelMessageAssociationMessageFolder:{universalIdentifier:L.messageChannelMessageAssociationMessageFolder,fields:R.messageChannelMessageAssociationMessageFolder,indexes:{messageChannelMessageAssociationIdIndex:{universalIdentifier:`8e6038aa-1f79-4a84-87b5-f33caa172e98`},messageFolderIdIndex:{universalIdentifier:`905299c3-ca81-435d-901c-f68b87562516`},messageChannelMessageAssociationIdMessageFolderIdUniqueIndex:{universalIdentifier:`a3de1788-5dff-4849-ac5a-0dabe5fab216`}},views:{allMessageChannelMessageAssociationMessageFolders:z({objectUniversalIdentifier:L.messageChannelMessageAssociationMessageFolder,fields:R.messageChannelMessageAssociationMessageFolder,viewFieldNames:[`messageChannelMessageAssociation`,`messageFolderId`,`createdAt`]}),messageChannelMessageAssociationMessageFolderRecordPageFields:B({objectUniversalIdentifier:L.messageChannelMessageAssociationMessageFolder,fields:R.messageChannelMessageAssociationMessageFolder,viewFieldNames:[`messageChannelMessageAssociation`,`messageFolderId`,`createdAt`,`createdBy`],viewFieldGroupNames:{general:`General`,system:`System`}})}},messageParticipant:{universalIdentifier:L.messageParticipant,fields:R.messageParticipant,indexes:{messageIdIndex:{universalIdentifier:`ab0863ba-f95e-493c-b86c-56e1bc7e5bc2`},personIdIndex:{universalIdentifier:`df805c2e-3bfe-4d51-8309-75e5eb4052fe`},workspaceMemberIdIndex:{universalIdentifier:`ce1e3a9e-afe9-439d-abb7-6cc98a6fa405`},messageCampaignIdIndex:{universalIdentifier:`e9bcdd77-cc8b-4532-833c-124dfdc8e5ff`}},views:{allMessageParticipants:z({objectUniversalIdentifier:L.messageParticipant,fields:R.messageParticipant,viewFieldNames:[`message`,`role`,`handle`,`displayName`,`person`,`workspaceMember`,`createdAt`]}),messageParticipantRecordPageFields:B({objectUniversalIdentifier:L.messageParticipant,fields:R.messageParticipant,viewFieldNames:[`message`,`role`,`displayName`,`person`,`workspaceMember`,`createdAt`,`createdBy`],viewFieldGroupNames:{general:`General`,system:`System`}})}},messageThread:{universalIdentifier:L.messageThread,fields:R.messageThread,indexes:{},views:{allMessageThreads:z({objectUniversalIdentifier:L.messageThread,fields:R.messageThread,viewFieldNames:[`subject`,`messages`,`updatedAt`,`createdAt`]})}},messageThreadTarget:{universalIdentifier:L.messageThreadTarget,fields:R.messageThreadTarget,morphIds:{targetMorphId:{morphId:R.messageThreadTarget.target.universalIdentifier}},indexes:{messageThreadIdIndex:{universalIdentifier:`222fdd8b-0863-4f2a-816a-29745537b6b6`},personIdIndex:{universalIdentifier:`280ee419-ac3c-4599-bd62-3e5cb268342c`},companyIdIndex:{universalIdentifier:`b98005e4-3811-41b6-82d0-3ccd27757eba`},opportunityIdIndex:{universalIdentifier:`7679ee05-cf6c-40a7-9ee6-c3e8053caca5`},messageThreadPersonUniqueIndex:{universalIdentifier:`087f97cb-8c3c-4ea1-9556-933acde6c83b`},messageThreadCompanyUniqueIndex:{universalIdentifier:`30d4f1af-8b6f-4685-802f-8a7cf29f318b`},messageThreadOpportunityUniqueIndex:{universalIdentifier:`1dc0e37e-afb1-4e90-90b4-052374126a6a`}},views:{}},message:{universalIdentifier:L.message,fields:R.message,indexes:{messageThreadIdIndex:{universalIdentifier:`7a05b45e-7aa6-4a7e-9bbc-299cbed53c96`},messageCampaignIdIndex:{universalIdentifier:`79e777ca-7008-46c5-b3a6-3108b7c7dfb6`},headerMessageIdIndex:{universalIdentifier:`0904b3e4-6052-4a8d-bf41-f12a27c7e34a`}},views:{allMessages:z({objectUniversalIdentifier:L.message,fields:R.message,viewFieldNames:[`subject`,`messageThread`,`messageParticipants`,`receivedAt`,`headerMessageId`,`text`,`createdAt`]}),messageRecordPageFields:B({objectUniversalIdentifier:L.message,fields:R.message,viewFieldNames:[`messageThread`,`messageParticipants`,`receivedAt`,`text`,`headerMessageId`,`createdAt`,`createdBy`],viewFieldGroupNames:{general:`General`,system:`System`}})}},note:{universalIdentifier:L.note,fields:R.note,indexes:{searchVectorGinIndex:{universalIdentifier:`8183c8d2-9114-4b6e-8c5d-12a3b14a5a13`}},views:{allNotes:z({objectUniversalIdentifier:L.note,fields:R.note,viewFieldNames:[`title`,`noteTargets`,`bodyV2`,`createdBy`,`createdAt`]}),noteRecordPageFields:B({objectUniversalIdentifier:L.note,fields:R.note,viewFieldNames:[`noteTargets`,`attachments`,`timelineActivities`],viewFieldGroupNames:{general:`General`}})}},noteTarget:{universalIdentifier:L.noteTarget,fields:R.noteTarget,morphIds:{targetMorphId:{morphId:R.noteTarget.target.universalIdentifier}},indexes:{noteIdIndex:{universalIdentifier:`9294d9e3-0225-4c7f-9d6e-23b4c25b6b24`},personIdIndex:{universalIdentifier:`7c069dc0-e83b-4cd5-aaa2-cac7f3e00d80`},companyIdIndex:{universalIdentifier:`2d83909a-a383-4e82-b00a-8b7739f3f906`},opportunityIdIndex:{universalIdentifier:`0d1a59b4-cc87-4b7d-804a-656e8504f371`},notePersonUniqueIndex:{universalIdentifier:`29be76d1-ff4f-4f0f-b05c-f679a234e90a`},noteCompanyUniqueIndex:{universalIdentifier:`e3b92659-04cf-4496-8fd4-4f32c747c26a`},noteOpportunityUniqueIndex:{universalIdentifier:`58002741-8aa7-4812-b7af-f4cf98dd2433`}},views:{allNoteTargets:z({objectUniversalIdentifier:L.noteTarget,fields:R.noteTarget,viewFieldNames:[`id`,`note`,`targetPerson`,`targetCompany`,`targetOpportunity`]})}},opportunity:{universalIdentifier:L.opportunity,fields:R.opportunity,indexes:{pointOfContactIdIndex:{universalIdentifier:`b8c2a673-a981-4357-a43d-313a358e4daa`},companyIdIndex:{universalIdentifier:`e161072d-37b1-477a-b944-ef0d65289574`},stageIndex:{universalIdentifier:`ae60d580-b562-44f2-a24d-7b8040063f83`},searchVectorGinIndex:{universalIdentifier:`f53fdd28-a26b-47ba-81b5-6813ad622720`}},views:{allOpportunities:z({objectUniversalIdentifier:L.opportunity,fields:R.opportunity,viewFieldNames:[`name`,`amount`,`createdBy`,`closeDate`,`company`,`pointOfContact`]}),byStage:{universalIdentifier:`20202020-a004-4a04-8a04-0aa0b1ca1ba0`,viewFields:{name:{universalIdentifier:`20202020-af04-4a04-8a04-0aa0b2ca2baf`},amount:{universalIdentifier:`20202020-af04-4a04-8a04-0aa0b2ca2bb0`},createdBy:{universalIdentifier:`20202020-af04-4a04-8a04-0aa0b2ca2bb1`},closeDate:{universalIdentifier:`20202020-af04-4a04-8a04-0aa0b2ca2bb2`},company:{universalIdentifier:`20202020-af04-4a04-8a04-0aa0b2ca2bb3`},pointOfContact:{universalIdentifier:`20202020-af04-4a04-8a04-0aa0b2ca2bb4`}},viewGroups:{new:{universalIdentifier:`20202020-af14-4a04-8a04-0aa0b2ca2bf1`},screening:{universalIdentifier:`20202020-af14-4a04-8a04-0aa0b2ca2bf2`},meeting:{universalIdentifier:`20202020-af14-4a04-8a04-0aa0b2ca2bf3`},proposal:{universalIdentifier:`20202020-af14-4a04-8a04-0aa0b2ca2bf4`},customer:{universalIdentifier:`20202020-af14-4a04-8a04-0aa0b2ca2bf5`}}},opportunityRecordPageFields:B({objectUniversalIdentifier:L.opportunity,fields:R.opportunity,viewFieldNames:[`amount`,`closeDate`,`stage`,`company`,`pointOfContact`,`owner`,`createdAt`,`createdBy`,`updatedAt`,`updatedBy`,`taskTargets`,`noteTargets`,`attachments`,`timelineActivities`],viewFieldGroupNames:{deal:`Deal`,relations:`Relations`,system:`System`}})}},person:{universalIdentifier:L.person,fields:R.person,indexes:{companyIdIndex:{universalIdentifier:`8a265a5c-d3ae-47dc-bdf9-b42cfa2ba639`},emailsUniqueIndex:{universalIdentifier:`8183a8b2-9114-4f6c-8a5b-12e3f14e5e13`},searchVectorGinIndex:{universalIdentifier:`9294b9c3-0225-4a7d-9b6c-23f4a25f6f24`}},views:{allPeople:z({objectUniversalIdentifier:L.person,fields:R.person,viewFieldNames:[`name`,`emails`,`createdBy`,`company`,`phones`,`createdAt`,`jobTitle`,`linkedinLink`]}),personRecordPageFields:B({objectUniversalIdentifier:L.person,fields:R.person,viewFieldNames:[`emails`,`phones`,`company`,`jobTitle`,`linkedinLink`,`avatarUrl`,`createdAt`,`createdBy`,`updatedAt`,`updatedBy`,`avatarFile`,`pointOfContactForOpportunities`,`taskTargets`,`noteTargets`,`attachments`,`messageParticipants`,`calendarEventParticipants`,`timelineActivities`],viewFieldGroupNames:{general:`General`,work:`Work`,social:`Social`,system:`System`}}),messageListRecordPageMembers:{universalIdentifier:`bef79e8e-9ef3-4458-81ed-78a299e2566f`,viewFields:{name:{universalIdentifier:`a4f0d7b4-3956-44a6-8bb2-df45a699609b`},emails:{universalIdentifier:`180e9cbb-34c2-4e27-8648-2915be88a50e`},company:{universalIdentifier:`3db54119-df4d-449b-91c9-22fca1e5d599`}},viewFilters:{listMembershipsListIsCurrentRecord:{universalIdentifier:`256dceea-a9b5-42b7-8461-a6ce62e7fa6c`}}}}},recordShare:{universalIdentifier:L.recordShare,fields:R.recordShare,indexes:{recordPrincipalCauseSourceUniqueIndex:{universalIdentifier:`4580f104-47a7-4110-87a8-26cb6f63ce7b`},principalIdIndex:{universalIdentifier:`66fbc3d2-6126-4e29-a306-dbe9995bf062`},sourceIdIndex:{universalIdentifier:`21b84593-c647-40ce-bdf4-a8b4ac658f57`}},views:{}},shortLink:{universalIdentifier:L.shortLink,fields:R.shortLink,indexes:{templateAndResolvedUrlHashUniqueIndex:{universalIdentifier:`b1330e3c-bd74-4bd1-a9dc-1ecefe41f199`}},views:{}},task:{universalIdentifier:L.task,fields:R.task,indexes:{assigneeIdIndex:{universalIdentifier:`f48fa3b1-0cec-44da-a9e5-f8a5e766637e`},searchVectorGinIndex:{universalIdentifier:`a86b32b3-01d3-4302-a152-8b7f247db7b4`}},views:{allTasks:z({objectUniversalIdentifier:L.task,fields:R.task,viewFieldNames:[`title`,`status`,`taskTargets`,`createdBy`,`dueAt`,`assignee`,`bodyV2`,`createdAt`]}),assignedToMe:{universalIdentifier:`20202020-a007-4a07-8a07-ba5ca551aaed`,viewFields:{title:{universalIdentifier:`20202020-af07-4a07-8a07-ba5ca551aaed`},taskTargets:{universalIdentifier:`20202020-af07-4a07-8a07-ba5ca551aaee`},createdBy:{universalIdentifier:`20202020-af07-4a07-8a07-ba5ca551aaef`},dueAt:{universalIdentifier:`20202020-af07-4a07-8a07-ba5ca551aaf0`},assignee:{universalIdentifier:`20202020-af07-4a07-8a07-ba5ca551aaf1`},bodyV2:{universalIdentifier:`20202020-af07-4a07-8a07-ba5ca551aaf2`},createdAt:{universalIdentifier:`20202020-af07-4a07-8a07-ba5ca551aaf3`}},viewFilters:{assigneeIsMe:{universalIdentifier:`20202020-af17-4a07-8a07-ba5ca551abf1`}},viewGroups:{todo:{universalIdentifier:`20202020-af17-4a07-8a07-ba5ca551abf2`},inProgress:{universalIdentifier:`20202020-af17-4a07-8a07-ba5ca551abf3`},done:{universalIdentifier:`20202020-af17-4a07-8a07-ba5ca551abf4`},empty:{universalIdentifier:`20202020-af17-4a07-8a07-ba5ca551abf5`}}},byStatus:{universalIdentifier:`20202020-a008-4a08-8a08-ba5cba51aba5`,viewFields:{title:{universalIdentifier:`20202020-af08-4a08-8a08-ba5cba5babf0`},status:{universalIdentifier:`20202020-af08-4a08-8a08-ba5cba5babf1`},dueAt:{universalIdentifier:`20202020-af08-4a08-8a08-ba5cba5babf2`},assignee:{universalIdentifier:`20202020-af08-4a08-8a08-ba5cba5babf3`},createdAt:{universalIdentifier:`20202020-af08-4a08-8a08-ba5cba5babf4`}},viewGroups:{todo:{universalIdentifier:`20202020-af18-4a08-8a08-ba5cba5bbf01`},inProgress:{universalIdentifier:`20202020-af18-4a08-8a08-ba5cba5bbf02`},done:{universalIdentifier:`20202020-af18-4a08-8a08-ba5cba5bbf03`}}},taskRecordPageFields:B({objectUniversalIdentifier:L.task,fields:R.task,viewFieldNames:[`dueAt`,`status`,`assignee`,`taskTargets`,`attachments`,`timelineActivities`],viewFieldGroupNames:{general:`General`}})}},taskTarget:{universalIdentifier:L.taskTarget,fields:R.taskTarget,morphIds:{targetMorphId:{morphId:R.taskTarget.target.universalIdentifier}},indexes:{taskIdIndex:{universalIdentifier:`c882f7a4-b025-4d32-aa26-5ef2595bdbf9`},personIdIndex:{universalIdentifier:`b7d305d1-6fae-4ed6-9bdc-354fe9032c0e`},companyIdIndex:{universalIdentifier:`c0af54c7-751b-4bb2-b102-677cc4e47402`},opportunityIdIndex:{universalIdentifier:`6942e0ba-90f6-4c33-bf40-7f00b1ec35ab`},taskPersonUniqueIndex:{universalIdentifier:`4adf4d5a-ad69-4c5c-bc62-2807816b3aa8`},taskCompanyUniqueIndex:{universalIdentifier:`637dce5e-f609-49f4-89e3-c0ef9e330d3a`},taskOpportunityUniqueIndex:{universalIdentifier:`eb5422ff-7a41-48d2-a2df-3de1cbf7bced`}},views:{allTaskTargets:z({objectUniversalIdentifier:L.taskTarget,fields:R.taskTarget,viewFieldNames:[`id`,`task`,`targetPerson`,`targetCompany`,`targetOpportunity`]})}},timelineActivity:{universalIdentifier:L.timelineActivity,fields:R.timelineActivity,morphIds:{targetMorphId:{morphId:R.timelineActivity.target.universalIdentifier}},indexes:{workspaceMemberIdIndex:{universalIdentifier:`5e0b2391-85ca-4a66-aef4-52d74245bec2`},personIdIndex:{universalIdentifier:`3e89a914-7bec-47bd-9cf9-743c6b83d001`},companyIdIndex:{universalIdentifier:`8183e8f2-9114-4d6a-8e5f-12c3d14c5c13`},opportunityIdIndex:{universalIdentifier:`9294f9a3-0225-4e7b-9f6a-23d4e25d6d24`},noteIdIndex:{universalIdentifier:`995db1d8-0d3e-40f7-b0eb-5e6897bc9966`},taskIdIndex:{universalIdentifier:`609cf622-86ef-48d1-812b-e1cab610a46c`},workflowIdIndex:{universalIdentifier:`d6059ec2-92b0-4cfc-9fd8-78050f03108f`},workflowVersionIdIndex:{universalIdentifier:`d94329b3-5dc8-4141-ae28-31afe28f7135`},workflowRunIdIndex:{universalIdentifier:`1a2bd046-7c23-4e0a-9f8a-c3ca3a16d3b9`},dashboardIdIndex:{universalIdentifier:`e8821da9-728d-470a-bf5b-5a981fff7880`},messageListIdIndex:{universalIdentifier:`a251f71a-c698-4526-8817-0e7c803c158e`},messageCampaignIdIndex:{universalIdentifier:`e808e721-91cc-4b9b-b24b-806d64b4d5e2`},linkedRecordIdIndex:{universalIdentifier:`00e9bf50-0e98-4105-8cb7-31c94995ff55`}},views:{allTimelineActivities:z({objectUniversalIdentifier:L.timelineActivity,fields:R.timelineActivity,viewFieldNames:[`linkedRecordCachedName`,`happensAt`,`workspaceMember`,`targetPerson`,`targetCompany`,`targetOpportunity`,`targetTask`,`targetNote`,`targetWorkflow`,`targetWorkflowVersion`,`targetWorkflowRun`,`targetDashboard`]})}},workflow:{universalIdentifier:L.workflow,fields:R.workflow,indexes:{searchVectorGinIndex:{universalIdentifier:`c7e64c55-eb0c-4b93-b076-5cfcf2e2e042`}},views:{allWorkflows:z({objectUniversalIdentifier:L.workflow,fields:R.workflow,viewFieldNames:[`name`,`statuses`,`updatedAt`,`createdBy`,`versions`,`runs`]})}},workflowAutomatedTrigger:{universalIdentifier:L.workflowAutomatedTrigger,fields:R.workflowAutomatedTrigger,indexes:{workflowIdIndex:{universalIdentifier:`7331ff89-a3f9-4ac0-9fa9-0de5663ae7b2`}},views:{allWorkflowAutomatedTriggers:z({objectUniversalIdentifier:L.workflowAutomatedTrigger,fields:R.workflowAutomatedTrigger,viewFieldNames:[`type`,`workflow`,`createdAt`]}),workflowAutomatedTriggerRecordPageFields:B({objectUniversalIdentifier:L.workflowAutomatedTrigger,fields:R.workflowAutomatedTrigger,viewFieldNames:[`type`,`workflow`,`createdAt`,`createdBy`],viewFieldGroupNames:{general:`General`,system:`System`}})}},workflowRun:{universalIdentifier:L.workflowRun,fields:R.workflowRun,indexes:{workflowVersionIdIndex:{universalIdentifier:`8183c8d2-9114-4b6e-8c5d-12a3b14a5a14`},workflowIdIndex:{universalIdentifier:`9294d9e3-0225-4c7f-9d6e-23b4c25b6b25`},searchVectorGinIndex:{universalIdentifier:`e0ac5ad2-d0c8-4f72-b710-8e53b9dc18d9`}},views:{allWorkflowRuns:z({objectUniversalIdentifier:L.workflowRun,fields:R.workflowRun,viewFieldNames:[`name`,`workflow`,`status`]}),workflowRunRecordPageFields:B({objectUniversalIdentifier:L.workflowRun,fields:R.workflowRun,viewFieldNames:[`status`,`workflow`,`workflowVersion`,`startedAt`,`endedAt`,`createdAt`,`createdBy`,`enqueuedAt`,`state`,`updatedAt`,`updatedBy`,`timelineActivities`],viewFieldGroupNames:{general:`General`,system:`System`}})}},workflowVersion:{universalIdentifier:L.workflowVersion,fields:R.workflowVersion,indexes:{workflowIdIndex:{universalIdentifier:`8138c3b3-0b14-4ee1-be0e-debdde6b3219`},searchVectorGinIndex:{universalIdentifier:`6f3a65eb-2aee-4108-b8a0-c62da419d1dc`}},views:{allWorkflowVersions:z({objectUniversalIdentifier:L.workflowVersion,fields:R.workflowVersion,viewFieldNames:[`name`,`workflow`,`status`,`updatedAt`,`runs`]}),workflowVersionRecordPageFields:B({objectUniversalIdentifier:L.workflowVersion,fields:R.workflowVersion,viewFieldNames:[`status`,`workflow`,`trigger`,`createdAt`,`steps`,`createdBy`,`updatedAt`,`updatedBy`,`runs`,`timelineActivities`],viewFieldGroupNames:{general:`General`,system:`System`}})}},workspaceMember:{universalIdentifier:L.workspaceMember,fields:R.workspaceMember,indexes:{userEmailUniqueIndex:{universalIdentifier:`76da5f27-523c-44b6-ad06-12954f6b949f`},searchVectorGinIndex:{universalIdentifier:`8678dde9-a804-4a9e-80e3-9af35e471ec5`}},views:{allWorkspaceMembers:z({objectUniversalIdentifier:L.workspaceMember,fields:R.workspaceMember,viewFieldNames:[`name`,`createdAt`,`ownedOpportunities`,`assignedTasks`]})}},agentChatThread:{universalIdentifier:L.agentChatThread,fields:R.agentChatThread,indexes:{workspaceMemberIndex:{universalIdentifier:`079f2dd7-6c11-4eae-be8a-cce2d1bee0fb`},assigneeIndex:{universalIdentifier:`a65524f8-c999-448b-b9f4-c9ecce15fd13`},channelLastActivityIndex:{universalIdentifier:`bd129bd1-db66-4c74-a64e-819d2edd3062`}}},agentChatThreadParticipant:{universalIdentifier:L.agentChatThreadParticipant,fields:R.agentChatThreadParticipant,indexes:{threadWorkspaceMemberUniqueIndex:{universalIdentifier:`e5bbe244-cf74-49a3-938a-e6fff7a8710b`},workspaceMemberIndex:{universalIdentifier:`73d8bb5d-18eb-47bb-89e6-12d8f89aecf6`}}},agentChatThreadTarget:{universalIdentifier:L.agentChatThreadTarget,fields:R.agentChatThreadTarget,morphIds:{targetMorphId:{morphId:R.agentChatThreadTarget.target.universalIdentifier}},indexes:{threadIdIndex:{universalIdentifier:`19291d2c-15ab-43a0-91f7-1694b34813dd`},personIdIndex:{universalIdentifier:`fe9c48d0-5b2a-4a51-bd47-f9205ea0c09d`},companyIdIndex:{universalIdentifier:`ab45593a-3614-41c8-aab1-20aa91f1095c`},opportunityIdIndex:{universalIdentifier:`b68e2031-73c6-4bc4-b062-5f795539e452`},threadPersonUniqueIndex:{universalIdentifier:`5a12050f-4de2-4076-aecc-959b863e14b2`},threadCompanyUniqueIndex:{universalIdentifier:`d9067628-fd16-4843-955b-5fd47fea52a9`},threadOpportunityUniqueIndex:{universalIdentifier:`1b9bec10-2788-40be-9435-44937b9f7018`}},views:{}},agentTurn:{universalIdentifier:L.agentTurn,fields:R.agentTurn,indexes:{agentIndex:{universalIdentifier:`606e8ba3-f322-426b-bef8-2208f67a541a`},threadIndex:{universalIdentifier:`7d351559-4546-4307-ba28-de9fc4c40ef4`}}},agentMessage:{universalIdentifier:L.agentMessage,fields:R.agentMessage,indexes:{agentIndex:{universalIdentifier:`465b20e1-d4cd-4d80-a85b-78bd1f0e70ad`},threadIndex:{universalIdentifier:`2054f1a5-554f-42ac-a41a-b8ccd6ba72ec`},turnIndex:{universalIdentifier:`dc46f804-a55f-4283-884e-9cb938741da3`},senderWorkspaceMemberIndex:{universalIdentifier:`8ecdac01-7bbe-411e-8461-6ff265c90759`}}},agentMessageReaction:{universalIdentifier:L.agentMessageReaction,fields:R.agentMessageReaction,indexes:{messageWorkspaceMemberEmojiUniqueIndex:{universalIdentifier:`4089a239-e2d0-4e3e-83e8-e9b555a8a31d`},workspaceMemberIndex:{universalIdentifier:`565d89ab-2c11-4ebe-aaaf-8dbc4d79a9e5`}}},agentMessagePart:{universalIdentifier:L.agentMessagePart,fields:R.agentMessagePart,indexes:{messageOrderIndex:{universalIdentifier:`f5a08f6f-cf91-4996-9c21-2af64a17ca83`}}},campaignDelivery:{universalIdentifier:L.campaignDelivery,fields:R.campaignDelivery,indexes:{campaignPersonUniqueIndex:{universalIdentifier:`8d719548-d34f-4891-bbc9-e0e09f0e363b`},expiredClaimIndex:{universalIdentifier:`a4d7e8ed-0008-4f6a-a20c-a2b821487481`},countsIndex:{universalIdentifier:`1ea1ae7a-158f-436a-95a0-e9c998ad94f7`},claimTokenIndex:{universalIdentifier:`91640dcd-3f6b-4378-b284-bb02cc8b81ec`},providerMessageIdUniqueIndex:{universalIdentifier:`4de6f73d-ef3a-4c80-b71a-88739213f1c0`}}},messageSuppression:{universalIdentifier:L.messageSuppression,fields:R.messageSuppression,indexes:{emailAddressTopicUniqueIndex:{universalIdentifier:`a6c1f4dc-d925-49f9-8205-3e7f95545966`}}}},V=({objectUniversalIdentifier:e,tabs:n})=>{let r=t.P({objectMetadataApplicationUniversalIdentifier:t.z,objectUniversalIdentifier:e});return{universalIdentifier:r,tabs:Object.fromEntries(Object.entries(n).map(([e,{title:n,widgets:i}])=>{let a=t.B({objectMetadataApplicationUniversalIdentifier:t.z,pageLayoutUniversalIdentifier:r,title:n});return[e,{universalIdentifier:a,widgets:Object.fromEntries(Object.entries(i).map(([e,n])=>[e,{universalIdentifier:t.H({objectMetadataApplicationUniversalIdentifier:t.z,pageLayoutTabUniversalIdentifier:a,title:n})}]))}]}))}},St={myFirstDashboard:{universalIdentifier:`20202020-d001-4d01-8d01-da5ab0a00001`,tabs:{tab1:{universalIdentifier:`20202020-d011-4d11-8d11-da5ab0a01001`,widgets:{welcomeRichText:{universalIdentifier:`20202020-d111-4d11-8d11-da5ab0a11001`},dealsByCompany:{universalIdentifier:`20202020-d111-4d11-8d11-da5ab0a11002`},pipelineValueByStage:{universalIdentifier:`20202020-d111-4d11-8d11-da5ab0a11003`},revenueTimeline:{universalIdentifier:`20202020-d111-4d11-8d11-da5ab0a11004`},opportunitiesByOwner:{universalIdentifier:`20202020-d111-4d11-8d11-da5ab0a11005`},stockMarketIframe:{universalIdentifier:`20202020-d111-4d11-8d11-da5ab0a11006`},dealsCreatedThisMonth:{universalIdentifier:`20202020-d111-4d11-8d11-da5ab0a11007`},dealValueCreatedThisMonth:{universalIdentifier:`20202020-d111-4d11-8d11-da5ab0a11008`}}}}},attachmentRecordPage:V({objectUniversalIdentifier:L.attachment,tabs:{home:{title:`Home`,widgets:{preview:`Preview`,fields:`Fields`,attachedTo:`Attached to`}}}}),companyRecordPage:V({objectUniversalIdentifier:L.company,tabs:{home:{title:`Home`,widgets:{fields:`Fields`,people:`People`,opportunities:`Opportunities`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}},tasks:{title:`Tasks`,widgets:{tasks:`Tasks`}},notes:{title:`Notes`,widgets:{notes:`Notes`}},files:{title:`Files`,widgets:{files:`Files`}},emails:{title:`Emails`,widgets:{emails:`Emails`}},conversations:{title:`Conversations`,widgets:{conversations:`Conversations`}},calendar:{title:`Calendar`,widgets:{calendar:`Calendar`}}}}),personRecordPage:V({objectUniversalIdentifier:L.person,tabs:{home:{title:`Home`,widgets:{fields:`Fields`,company:`Company`,pointOfContactForOpportunities:`Opportunities`,listMemberships:`Lists`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}},tasks:{title:`Tasks`,widgets:{tasks:`Tasks`}},notes:{title:`Notes`,widgets:{notes:`Notes`}},files:{title:`Files`,widgets:{files:`Files`}},emails:{title:`Emails`,widgets:{emails:`Emails`}},conversations:{title:`Conversations`,widgets:{conversations:`Conversations`}},calendar:{title:`Calendar`,widgets:{calendar:`Calendar`}}}}),opportunityRecordPage:V({objectUniversalIdentifier:L.opportunity,tabs:{home:{title:`Home`,widgets:{fields:`Fields`,pointOfContact:`Point of Contact`,company:`Company`,owner:`Owner`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}},tasks:{title:`Tasks`,widgets:{tasks:`Tasks`}},notes:{title:`Notes`,widgets:{notes:`Notes`}},files:{title:`Files`,widgets:{files:`Files`}},emails:{title:`Emails`,widgets:{emails:`Emails`}},conversations:{title:`Conversations`,widgets:{conversations:`Conversations`}},calendar:{title:`Calendar`,widgets:{calendar:`Calendar`}}}}),noteRecordPage:V({objectUniversalIdentifier:L.note,tabs:{home:{title:`Home`,widgets:{fields:`Fields`,noteRichText:`Note`}},note:{title:`Note`,widgets:{noteRichText:`Note`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}},files:{title:`Files`,widgets:{files:`Files`}}}}),taskRecordPage:V({objectUniversalIdentifier:L.task,tabs:{home:{title:`Home`,widgets:{fields:`Fields`,taskRichText:`Task`}},note:{title:`Note`,widgets:{taskRichText:`Task`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}},files:{title:`Files`,widgets:{files:`Files`}}}}),workflowRecordPage:V({objectUniversalIdentifier:L.workflow,tabs:{flow:{title:`Flow`,widgets:{workflow:`Flow`}}}}),workflowVersionRecordPage:V({objectUniversalIdentifier:L.workflowVersion,tabs:{home:{title:`Home`,widgets:{fields:`Fields`,workflow:`Workflow`}},flow:{title:`Flow`,widgets:{workflowVersion:`Flow`}}}}),workflowRunRecordPage:V({objectUniversalIdentifier:L.workflowRun,tabs:{home:{title:`Home`,widgets:{fields:`Fields`,workflow:`Workflow`}},flow:{title:`Flow`,widgets:{workflowRun:`Flow`}}}}),agentChatThreadRecordPage:V({objectUniversalIdentifier:L.agentChatThread,tabs:{chat:{title:`Chat`,widgets:{chat:`Chat`}}}}),blocklistRecordPage:V({objectUniversalIdentifier:L.blocklist,tabs:{home:{title:`Home`,widgets:{fields:`Fields`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}}}}),calendarChannelEventAssociationRecordPage:V({objectUniversalIdentifier:L.calendarChannelEventAssociation,tabs:{home:{title:`Home`,widgets:{fields:`Fields`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}}}}),calendarEventRecordPage:V({objectUniversalIdentifier:L.calendarEvent,tabs:{home:{title:`Home`,widgets:{fields:`Fields`,participants:`Participants`,callRecordings:`Call Recordings`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}},summary:{title:`Summary`,widgets:{summary:`Summary`}},callRecording:{title:`Call Recording`,widgets:{transcript:`Transcript`}}}}),calendarEventParticipantRecordPage:V({objectUniversalIdentifier:L.calendarEventParticipant,tabs:{home:{title:`Home`,widgets:{fields:`Fields`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}}}}),callRecordingRecordPage:V({objectUniversalIdentifier:L.callRecording,tabs:{home:{title:`Home`,widgets:{fields:`Fields`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}},summary:{title:`Summary`,widgets:{summary:`Summary`}},callRecording:{title:`Call Recording`,widgets:{transcript:`Transcript`}}}}),messageChannelMessageAssociationRecordPage:V({objectUniversalIdentifier:L.messageChannelMessageAssociation,tabs:{home:{title:`Home`,widgets:{fields:`Fields`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}}}}),messageChannelMessageAssociationMessageFolderRecordPage:V({objectUniversalIdentifier:L.messageChannelMessageAssociationMessageFolder,tabs:{home:{title:`Home`,widgets:{fields:`Fields`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}}}}),messageParticipantRecordPage:V({objectUniversalIdentifier:L.messageParticipant,tabs:{home:{title:`Home`,widgets:{fields:`Fields`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}}}}),workflowAutomatedTriggerRecordPage:V({objectUniversalIdentifier:L.workflowAutomatedTrigger,tabs:{home:{title:`Home`,widgets:{fields:`Fields`}},timeline:{title:`Timeline`,widgets:{timeline:`Timeline`}}}}),messageRecordPage:V({objectUniversalIdentifier:L.message,tabs:{home:{title:`Home`,widgets:{fields:`Fields`}}}}),messageThreadRecordPage:V({objectUniversalIdentifier:L.messageThread,tabs:{home:{title:`Home`,widgets:{emailThread:`Thread`}}}}),messageListRecordPage:V({objectUniversalIdentifier:L.messageList,tabs:{home:{title:`Home`,widgets:{fields:`Fields`,members:`Members`}},members:{title:`Members`,widgets:{members:`Members`}}}}),messageCampaignRecordPage:V({objectUniversalIdentifier:L.messageCampaign,tabs:{home:{title:`Home`,widgets:{details:`Details`,list:`List`,recipients:`Recipients`,fields:`Fields`}},composer:{title:`Email`,widgets:{messageCampaign:`Email`}}}})},Ct=t=>{let n=[];if(t.universalIdentifier||n.push(`PageLayoutWidget must have a universalIdentifier`),t.title||n.push(`PageLayoutWidget must have a title`),t.type||n.push(`PageLayoutWidget must have a type`),t.configuration?.configurationType===`FRONT_COMPONENT`&&e.t(t.configuration.headerCommandMenuItemUniversalIdentifiers)){let e=t.configuration.headerCommandMenuItemUniversalIdentifiers;for(let t of e)ft(t)||n.push(`PageLayoutWidget header command menu item universalIdentifier "${t}" must be a UUID`);new Set(e).size!==e.length&&n.push(`PageLayoutWidget header command menu item universalIdentifiers must be unique`)}return n},wt=e=>{let t=[];e.universalIdentifier||t.push(`PageLayout must have a universalIdentifier`),e.name||t.push(`PageLayout must have a name`),e.type||t.push(`PageLayout must have a type`);for(let n of e.tabs??[]){n.universalIdentifier||t.push(`PageLayoutTab must have a universalIdentifier`),n.title||t.push(`PageLayoutTab must have a title`);for(let e of n.widgets??[])t.push(...Ct(e))}return j({config:e,errors:t})},Tt=e=>{let t=[];e.universalIdentifier||t.push(`PageLayoutTab must have a universalIdentifier`),e.title||t.push(`PageLayoutTab must have a title`),e.pageLayoutUniversalIdentifier||t.push(`PageLayoutTab must have a pageLayoutUniversalIdentifier when defined standalone (use the parent page layout universalIdentifier)`);for(let n of e.widgets??[])t.push(...Ct(n));return j({config:e,errors:t})},Et=e=>{let t=Ct(e);return e.pageLayoutTabUniversalIdentifier||t.push(`PageLayoutWidget must have a pageLayoutTabUniversalIdentifier when defined standalone (use the universalIdentifier of the tab it is added to)`),e.position||t.push(`PageLayoutWidget must have a position when defined standalone (its tab is not in the manifest, so the layout mode cannot be inferred)`),j({config:e,errors:t})},Dt=e=>{let t=[];return e.universalIdentifier||t.push(`Permission flag must have a universalIdentifier`),e.key||t.push(`Permission flag must have a key`),e.label||t.push(`Permission flag must have a label`),j({config:e,errors:t})},Ot=e=>{let t=[];if(e.universalIdentifier||t.push(`Role must have a universalIdentifier`),e.label||t.push(`Role must have a label`),e.objectPermissions)for(let n of e.objectPermissions)n.objectUniversalIdentifier||t.push(`Object permission must have an objectUniversalIdentifier`);if(e.fieldPermissions)for(let n of e.fieldPermissions)n.objectUniversalIdentifier||t.push(`Field permission must have an objectUniversalIdentifier`),n.fieldUniversalIdentifier||t.push(`Field permission must have a fieldUniversalIdentifier`);let n=new Set;if(e.rowLevelPermissionPredicateGroups)for(let r of e.rowLevelPermissionPredicateGroups)r.universalIdentifier?n.has(r.universalIdentifier)?t.push(`Duplicate row level permission predicate group universalIdentifier "${r.universalIdentifier}"`):n.add(r.universalIdentifier):t.push(`Row level permission predicate group must have a universalIdentifier`),r.objectUniversalIdentifier||t.push(`Row level permission predicate group must have an objectUniversalIdentifier`),r.logicalOperator||t.push(`Row level permission predicate group must have a logicalOperator`);let r=new Set;if(e.rowLevelPermissionPredicates)for(let i of e.rowLevelPermissionPredicates)i.universalIdentifier?r.has(i.universalIdentifier)?t.push(`Duplicate row level permission predicate universalIdentifier "${i.universalIdentifier}"`):r.add(i.universalIdentifier):t.push(`Row level permission predicate must have a universalIdentifier`),i.objectUniversalIdentifier||t.push(`Row level permission predicate must have an objectUniversalIdentifier`),i.fieldUniversalIdentifier||t.push(`Row level permission predicate must have a fieldUniversalIdentifier`),i.operand||t.push(`Row level permission predicate must have an operand`),i.predicateGroupUniversalIdentifier&&!n.has(i.predicateGroupUniversalIdentifier)&&t.push(`Row level permission predicate references unknown predicate group "${i.predicateGroupUniversalIdentifier}"`);return j({config:e,errors:t})},kt=e=>Ot(e),At=e=>{let t=[];return e.universalIdentifier||t.push(`Skill must have a universalIdentifier`),e.name||t.push(`Skill must have a name`),e.label||t.push(`Skill must have a label`),e.content||t.push(`Skill must have content`),j({config:e,errors:t})},jt=e=>{let n=[];if(e.universalIdentifier||n.push(`View must have a universalIdentifier`),e.name||n.push(`View must have a name`),e.objectUniversalIdentifier||n.push(`View must have an objectUniversalIdentifier`),e.fields)for(let t of e.fields)t.universalIdentifier||n.push(`ViewField must have a universalIdentifier`),t.fieldMetadataUniversalIdentifier||n.push(`ViewField must have a fieldMetadataUniversalIdentifier`);if(e.filters)for(let t of e.filters)t.universalIdentifier||n.push(`ViewFilter must have a universalIdentifier`),t.fieldMetadataUniversalIdentifier||n.push(`ViewFilter must have a fieldMetadataUniversalIdentifier`);if(e.filterGroups)for(let t of e.filterGroups)t.universalIdentifier||n.push(`ViewFilterGroup must have a universalIdentifier`);if(e.groups)for(let t of e.groups)t.universalIdentifier||n.push(`ViewGroup must have a universalIdentifier`);if(e.fieldGroups)for(let t of e.fieldGroups)t.universalIdentifier||n.push(`ViewFieldGroup must have a universalIdentifier`);if(e.sorts)for(let r of e.sorts)r.universalIdentifier||n.push(`ViewSort must have a universalIdentifier`),r.fieldMetadataUniversalIdentifier||n.push(`ViewSort must have a fieldMetadataUniversalIdentifier`),r.direction!==t.vt.ASC&&r.direction!==t.vt.DESC&&n.push(`ViewSort direction must be '${t.vt.ASC}' or '${t.vt.DESC}'`);return j({config:e,errors:n})},Mt=e=>{let t=[];return e.universalIdentifier||t.push(`View field must have a universalIdentifier`),e.viewUniversalIdentifier||t.push(`View field must have a viewUniversalIdentifier`),e.fieldMetadataUniversalIdentifier||t.push(`View field must have a fieldMetadataUniversalIdentifier`),j({config:e,errors:t})},Nt=e=>{let n=t.j.safeParse(e);return j({config:e,errors:n.success?[]:n.error.issues.map(e=>e.path.length>0?`${e.path.join(`.`)}: ${e.message}`:e.message)})},Pt=e.r({AggregateOperations:()=>t.At,ApplicationHealthStatus:()=>t.w,CommandMenuItemAvailabilityType:()=>t.Pt,DateDisplayFormat:()=>t.ut,FieldMetadataSettingsOnClickAction:()=>t.ht,FieldType:()=>t.Rt,HTTPMethod:()=>t._t,IndexType:()=>t.It,MetadataReadability:()=>t.Ot,MetadataWritability:()=>t.Ft,NavigationMenuItemType:()=>t.Nt,NumberDataType:()=>t.Vt,ObjectOpenRecordIn:()=>t.kt,ObjectRecordGroupByDateGranularity:()=>t.Tt,ObjectSharingReach:()=>t.zt,OnDeleteAction:()=>t.bt,PageLayoutTabLayoutMode:()=>t.Bt,PageLayoutType:()=>t.Dt,PageLayoutWidgetVerticalListHeightBehavior:()=>t.xt,RelationType:()=>t.Mt,RowLevelPermissionPredicateGroupLogicalOperator:()=>t.lt,RowLevelPermissionPredicateOperand:()=>t.jt,STANDARD_OBJECT:()=>xt,STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS:()=>xt,STANDARD_PAGE_LAYOUT:()=>St,STANDARD_PAGE_LAYOUT_UNIVERSAL_IDENTIFIERS:()=>St,SYSTEM_VIEW_KEYS:()=>t.I,SystemPermissionFlag:()=>t.ct,ViewCalendarLayout:()=>t.dt,ViewFilterGroupLogicalOperator:()=>t.Ct,ViewFilterOperand:()=>t.mt,ViewKey:()=>t.wt,ViewOpenRecordIn:()=>t.pt,ViewSortDirection:()=>t.vt,ViewType:()=>t.Lt,ViewVisibility:()=>t.gt,WidgetType:()=>t.ft,canAccessFullAdminPanel:()=>ze,canImpersonate:()=>Re,createValidationResult:()=>j,defineAgent:()=>ue,defineApplication:()=>fe,defineApplicationRole:()=>kt,defineCommandMenuItem:()=>be,defineConnectionProvider:()=>gt,defineField:()=>ye,defineFrontComponent:()=>nt,defineHealthCheck:()=>ot,defineIndex:()=>at,defineLogicFunction:()=>st,defineNavigationMenuItem:()=>_t,defineObject:()=>yt,definePageLayout:()=>wt,definePageLayoutTab:()=>Tt,definePageLayoutWidget:()=>Et,definePermissionFlag:()=>Dt,definePostInstallLogicFunction:()=>ct,definePreInstallLogicFunction:()=>lt,defineRole:()=>Ot,defineSettingsFrontComponent:()=>rt,defineSettingsMenuItem:()=>we,defineSkill:()=>At,defineTimelineActivityType:()=>Ce,defineUninstallLogicFunction:()=>ut,defineView:()=>jt,defineViewField:()=>Mt,defineWorkflow:()=>Nt,every:()=>Ge,everyDefined:()=>Ke,everyEquals:()=>qe,favoriteRecordIds:()=>N,featureFlags:()=>Fe,getFieldUniversalIdentifier:()=>t.L,getSystemPageLayoutTabUniversalIdentifier:()=>t.B,getSystemRecordPageLayoutUniversalIdentifier:()=>t.P,getSystemRelationFieldUniversalIdentifier:()=>t.R,getSystemViewFieldUniversalIdentifier:()=>t.F,getSystemViewUniversalIdentifier:()=>t.V,hasAnySoftDeleteFilterOnView:()=>P,includes:()=>We,includesEvery:()=>tt,isDashboardPageLayoutInEditMode:()=>ke,isDefined:()=>He,isInSidePanel:()=>Oe,isLayoutCustomizationModeEnabled:()=>Ae,isNonEmptyString:()=>Ue,isSelectAll:()=>je,none:()=>Ze,noneDefined:()=>Qe,noneEquals:()=>$e,numberOfSelectedRecords:()=>Me,objectMetadataItem:()=>Be,objectMetadataLabel:()=>Ve,objectPermissions:()=>Ne,pageType:()=>De,selectedRecords:()=>Pe,some:()=>Je,someDefined:()=>Ye,someEquals:()=>Xe,someNonEmptyString:()=>et,targetObjectReadPermissions:()=>Ie,targetObjectWritePermissions:()=>Le,validateFields:()=>ve}),Ft=e=>/^define[A-Z]/.test(e)||e===`createValidationResult`,It=e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`,Lt=e=>It(e)||t.at(e)&&Object.values(e).every(It),Rt=(e=>{let t=[],n=[],r=[];for(let i of Object.keys(e).sort())Ft(i)?t.push(i):Lt(e[i])?n.push(i):r.push(i);return{factories:t,plainData:n,any:r}})(Pt),zt=`twenty-sdk-define-stub`,Bt=`__twenty-sdk-define-stub__`,Vt=`
3
3
  // Auto-generated stub for twenty-sdk/define injected by the SDK CLI build.
4
4
  // Real implementations would pull in zod, twenty-shared and ~1MB of code; at
5
5
  // runtime only \`default.config.handler\` is consumed, so tiny no-ops suffice.
@@ -23,8 +23,8 @@ const __anyHandler = {
23
23
  const __anyStub = new Proxy(() => undefined, __anyHandler);
24
24
  `,Ht=()=>{let e=[];for(let t of Rt.factories)e.push(`export const ${t} = __defineFactoryStub;`);for(let t of Rt.plainData){let n=Pt[t];e.push(`export const ${t} = ${JSON.stringify(n)};`)}for(let t of Rt.any)e.push(`export const ${t} = __anyStub;`);return`${Vt}\n${e.join(`
25
25
  `)}\n`},Ut=()=>({name:`twenty-sdk-define-stub`,setup(e){e.onResolve({filter:/^twenty-sdk\/define$/},()=>({path:Bt,namespace:zt})),e.onLoad({filter:/.*/,namespace:zt},()=>({contents:Ht(),loader:`js`}))}}),Wt=/^(.+)\((\d+),(\d+)\): error TS\d+: (.+)$/,Gt=e=>{let t=e.match(Wt);if(!t)return null;let[,n,r,i,a]=t;return{text:a,file:n,line:Number(r),column:Number(i)-1}},Kt=e=>{let t=[];for(let n of e.split(`
26
- `)){let e=Gt(n);e&&t.push(e)}return t},qt=e=>{let t=l.default.join(e,`tsconfig.json`),n=l.default.join(e,`node_modules`,`.bin`,`tsc`);return new Promise(r=>{(0,d.execFile)(n,[`--noEmit`,`--pretty`,`false`,`-p`,t],{cwd:e},(e,t,n)=>{r(Kt(n||t))})})},Jt=e=>e.map(e=>({text:e.text,location:{file:e.file,line:e.line,column:e.column,lineText:``,length:0,namespace:``,suggestion:``}})),Yt=(e,t)=>({name:`typecheck`,setup:n=>{n.onStart(async()=>{if(!t())return{errors:Jt(await qt(e))}})}}),Xt=[`twenty-client-sdk/core`,`twenty-client-sdk/metadata`,`path`,`fs`,`crypto`,`stream`,`util`,`os`,`url`,`http`,`https`,`events`,`buffer`,`querystring`,`assert`,`zlib`,`net`,`tls`,`child_process`,`worker_threads`],Zt=class{constructor(e){this.esBuildContext=null,this.isRestarting=!1,this.pendingRestartSourcePaths=null,this.lastChecksums=new Map,this.buildCompletePromise=Promise.resolve(),this.resolveBuildComplete=null,this.appPath=e.appPath,this.sourcePaths=e.sourcePaths,this.watchMode=e.watch??!0,this.onFileBuilt=e.handleFileBuilt,this.onBuildError=e.handleBuildError,this.config=e.config}shouldRestart(e){return this.sourcePaths.sort().join(`,`)!==[...e].sort().join(`,`)}async start(){this.sourcePaths.length>0&&await this.createContext()}async close(){await this.esBuildContext?.dispose(),this.esBuildContext=null}async restart(n){if(this.isRestarting){this.pendingRestartSourcePaths=n;return}this.isRestarting=!0;try{await this.close(),await le(r.default.join(this.appPath,t.E),this.sourcePaths,n),this.sourcePaths=n,this.lastChecksums.clear(),this.sourcePaths.length>0&&await this.createContext()}finally{this.isRestarting=!1;let t=this.pendingRestartSourcePaths;e.t(t)&&(this.pendingRestartSourcePaths=null,await this.restart(t))}}async createContext(){let e=r.default.join(this.appPath,t.E),n={};for(let e of this.sourcePaths){let t=e.replace(/\.tsx?$/,``);n[t]=r.default.join(this.appPath,e)}let i=this,a=[...this.config.extraPlugins??[],{name:`build-notifications`,setup:e=>{e.onEnd(async e=>{try{if(e.errors.length>0){e.errors[0].text.includes(`Could not resolve`)||await this.onBuildError?.(e.errors.map(e=>({error:e.text,location:e.location})));return}await A({result:e,appPath:this.appPath,fileFolder:this.config.fileFolder,lastChecksums:i.lastChecksums,onFileBuilt:i.onFileBuilt})}finally{i.resolveBuildComplete?.()}})}}];this.esBuildContext=await u.context({entryPoints:n,bundle:!0,splitting:!1,format:`esm`,platform:this.config.platform,outdir:e,outExtension:{".js":`.mjs`},external:this.config.externalModules,tsconfig:r.default.join(this.appPath,`tsconfig.json`),jsx:this.config.jsx,sourcemap:!0,metafile:!0,logLevel:`silent`,minify:this.config.minify,banner:this.config.banner,plugins:a}),this.buildCompletePromise=new Promise(e=>{this.resolveBuildComplete=e}),await this.esBuildContext.rebuild(),await this.buildCompletePromise,this.watchMode&&await this.esBuildContext.watch()}},Qt=e=>new Zt({...e,config:{externalModules:Xt,fileFolder:t.ht.BuiltLogicFunction,platform:`node`,extraPlugins:[Yt(e.appPath,e.shouldSkipTypecheck),Ut()],banner:t.b}}),$t=[`twenty-client-sdk/core`,`twenty-client-sdk/metadata`,t.T],en=()=>({bundle:!0,splitting:!1,format:`esm`,outExtension:{".js":`.mjs`},external:$t,jsx:`automatic`,sourcemap:!0,metafile:!0,logLevel:`silent`,minify:!0,define:{"process.env.NODE_ENV":`"production"`},plugins:[...t.t()]}),tn=`default`,nn=`sharedDependenciesNamespace`,rn=e=>`import * as ${nn} from ${JSON.stringify(e)};\nexport { ${nn} };`,an=async({appPath:e,specifier:t})=>{try{return(await u.build({...en(),stdin:{contents:rn(t),resolveDir:e,sourcefile:`shared-dependencies-export-probe.js`,loader:`js`},write:!1,outfile:`shared-dependencies-export-probe-out.js`,outExtension:void 0,external:[],sourcemap:!1})).outputFiles?.find(e=>e.path.endsWith(`.js`))?.text??null}catch{return null}},on=async e=>{try{return(await import(`data:text/javascript;base64,${Buffer.from(e).toString(`base64`)}`))[nn]??null}catch{return null}},sn=async({appPath:t,specifier:n})=>{let r=await an({appPath:t,specifier:n}),i=e.t(r)?await on(r):null;if(!e.t(i))throw Error(`Unable to determine the exports of shared dependency "${n}". Check that it is installed and importable from the application.`);return{namedExports:Object.keys(i).filter(e=>e!==tn).sort(),hasDefaultExport:tn in i}},cn=e=>e.map(e=>{let n=t.n(e);return`import * as ${n} from ${JSON.stringify(e)};\nexport { ${n} };`}).join(`
27
- `),ln=e=>{let n=new Map;for(let r of e){let e=t.n(r),i=n.get(e)??[];i.push(r),n.set(e,i)}return[...n.values()].filter(e=>e.length>1)},un=async({appPath:e,sharedDependencies:n,outputDir:a=t.E,onFileBuilt:c})=>{let l=ln(n.dependencies);if((0,i.isNonEmptyArray)(l))throw Error(`Shared dependencies map to the same bundle namespace: ${l.map(e=>e.join(` and `)).join(`, `)}`);let d=(0,r.join)(a,n.builtPath),f=(0,r.join)(e,d);await w((0,r.dirname)(f)),await u.build({...en(),stdin:{contents:cn(n.dependencies),resolveDir:e,sourcefile:`twenty-shared-dependencies-entry.js`,loader:`js`},outfile:f,outExtension:void 0,external:[]});let p=new Map(await Promise.all(n.dependencies.map(async t=>[t,await sn({appPath:e,specifier:t})]))),m=await(0,s.readFile)(f),h=o.default.createHash(`sha256`).update(m).digest(`hex`);return await c({fileFolder:t.ht.BuiltFrontComponent,builtPath:d,sourcePath:`package.json`,checksum:h}),{exportNamesBySpecifier:p}},dn=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),fn=dn(((e,t)=>{(function(e,n){typeof define==`function`&&define.amd?define([],n):typeof t==`object`&&t.exports?t.exports=n():e.moo=n()})(e,function(){var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=typeof RegExp().sticky==`boolean`;function r(e){return e&&t.call(e)===`[object RegExp]`}function i(e){return e&&typeof e==`object`&&!r(e)&&!Array.isArray(e)}function a(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,`\\$&`)}function o(e){return RegExp(`|`+e).exec(``).length-1}function s(e){return`(`+e+`)`}function c(e){return e.length?`(?:`+e.map(function(e){return`(?:`+e+`)`}).join(`|`)+`)`:`(?!)`}function l(e){if(typeof e==`string`)return`(?:`+a(e)+`)`;if(r(e)){if(e.ignoreCase)throw Error(`RegExp /i flag not allowed`);if(e.global)throw Error(`RegExp /g flag is implied`);if(e.sticky)throw Error(`RegExp /y flag is implied`);if(e.multiline)throw Error(`RegExp /m flag is implied`);return e.source}else throw Error(`Not a pattern: `+e)}function u(e,t){return e.length>t?e:Array(t-e.length+1).join(` `)+e}function d(e,t){for(var n=e.length,r=0;;){var i=e.lastIndexOf(`
26
+ `)){let e=Gt(n);e&&t.push(e)}return t},qt=e=>{let t=l.default.join(e,`tsconfig.json`),n=l.default.join(e,`node_modules`,`.bin`,`tsc`);return new Promise(r=>{(0,d.execFile)(n,[`--noEmit`,`--pretty`,`false`,`-p`,t],{cwd:e},(e,t,n)=>{r(Kt(n||t))})})},Jt=e=>e.map(e=>({text:e.text,location:{file:e.file,line:e.line,column:e.column,lineText:``,length:0,namespace:``,suggestion:``}})),Yt=(e,t)=>({name:`typecheck`,setup:n=>{n.onStart(async()=>{if(!t())return{errors:Jt(await qt(e))}})}}),Xt=[`twenty-client-sdk/core`,`twenty-client-sdk/metadata`,`path`,`fs`,`crypto`,`stream`,`util`,`os`,`url`,`http`,`https`,`events`,`buffer`,`querystring`,`assert`,`zlib`,`net`,`tls`,`child_process`,`worker_threads`],Zt=class{constructor(e){this.esBuildContext=null,this.isRestarting=!1,this.pendingRestartSourcePaths=null,this.lastChecksums=new Map,this.buildCompletePromise=Promise.resolve(),this.resolveBuildComplete=null,this.appPath=e.appPath,this.sourcePaths=e.sourcePaths,this.watchMode=e.watch??!0,this.onFileBuilt=e.handleFileBuilt,this.onBuildError=e.handleBuildError,this.config=e.config}shouldRestart(e){return this.sourcePaths.sort().join(`,`)!==[...e].sort().join(`,`)}async start(){this.sourcePaths.length>0&&await this.createContext()}async close(){await this.esBuildContext?.dispose(),this.esBuildContext=null}async restart(n){if(this.isRestarting){this.pendingRestartSourcePaths=n;return}this.isRestarting=!0;try{await this.close(),await le(r.default.join(this.appPath,t.E),this.sourcePaths,n),this.sourcePaths=n,this.lastChecksums.clear(),this.sourcePaths.length>0&&await this.createContext()}finally{this.isRestarting=!1;let t=this.pendingRestartSourcePaths;e.t(t)&&(this.pendingRestartSourcePaths=null,await this.restart(t))}}async createContext(){let e=r.default.join(this.appPath,t.E),n={};for(let e of this.sourcePaths){let t=e.replace(/\.tsx?$/,``);n[t]=r.default.join(this.appPath,e)}let i=this,a=[...this.config.extraPlugins??[],{name:`build-notifications`,setup:e=>{e.onEnd(async e=>{try{if(e.errors.length>0){e.errors[0].text.includes(`Could not resolve`)||await this.onBuildError?.(e.errors.map(e=>({error:e.text,location:e.location})));return}await A({result:e,appPath:this.appPath,fileFolder:this.config.fileFolder,lastChecksums:i.lastChecksums,onFileBuilt:i.onFileBuilt})}finally{i.resolveBuildComplete?.()}})}}];this.esBuildContext=await u.context({entryPoints:n,bundle:!0,splitting:!1,format:`esm`,platform:this.config.platform,outdir:e,outExtension:{".js":`.mjs`},external:this.config.externalModules,tsconfig:r.default.join(this.appPath,`tsconfig.json`),jsx:this.config.jsx,sourcemap:!0,metafile:!0,logLevel:`silent`,minify:this.config.minify,banner:this.config.banner,plugins:a}),this.buildCompletePromise=new Promise(e=>{this.resolveBuildComplete=e}),await this.esBuildContext.rebuild(),await this.buildCompletePromise,this.watchMode&&await this.esBuildContext.watch()}},Qt=e=>new Zt({...e,config:{externalModules:Xt,fileFolder:t.St.BuiltLogicFunction,platform:`node`,extraPlugins:[Yt(e.appPath,e.shouldSkipTypecheck),Ut()],banner:t.b}}),$t=[`twenty-client-sdk/core`,`twenty-client-sdk/metadata`,t.T],en=()=>({bundle:!0,splitting:!1,format:`esm`,outExtension:{".js":`.mjs`},external:$t,jsx:`automatic`,sourcemap:!0,metafile:!0,logLevel:`silent`,minify:!0,define:{"process.env.NODE_ENV":`"production"`},plugins:[...t.t()]}),tn=`default`,nn=`sharedDependenciesNamespace`,rn=e=>`import * as ${nn} from ${JSON.stringify(e)};\nexport { ${nn} };`,an=async({appPath:e,specifier:t})=>{try{return(await u.build({...en(),stdin:{contents:rn(t),resolveDir:e,sourcefile:`shared-dependencies-export-probe.js`,loader:`js`},write:!1,outfile:`shared-dependencies-export-probe-out.js`,outExtension:void 0,external:[],sourcemap:!1})).outputFiles?.find(e=>e.path.endsWith(`.js`))?.text??null}catch{return null}},on=async e=>{try{return(await import(`data:text/javascript;base64,${Buffer.from(e).toString(`base64`)}`))[nn]??null}catch{return null}},sn=async({appPath:t,specifier:n})=>{let r=await an({appPath:t,specifier:n}),i=e.t(r)?await on(r):null;if(!e.t(i))throw Error(`Unable to determine the exports of shared dependency "${n}". Check that it is installed and importable from the application.`);return{namedExports:Object.keys(i).filter(e=>e!==tn).sort(),hasDefaultExport:tn in i}},cn=e=>e.map(e=>{let n=t.n(e);return`import * as ${n} from ${JSON.stringify(e)};\nexport { ${n} };`}).join(`
27
+ `),ln=e=>{let n=new Map;for(let r of e){let e=t.n(r),i=n.get(e)??[];i.push(r),n.set(e,i)}return[...n.values()].filter(e=>e.length>1)},un=async({appPath:e,sharedDependencies:n,outputDir:a=t.E,onFileBuilt:c})=>{let l=ln(n.dependencies);if((0,i.isNonEmptyArray)(l))throw Error(`Shared dependencies map to the same bundle namespace: ${l.map(e=>e.join(` and `)).join(`, `)}`);let d=(0,r.join)(a,n.builtPath),f=(0,r.join)(e,d);await w((0,r.dirname)(f)),await u.build({...en(),stdin:{contents:cn(n.dependencies),resolveDir:e,sourcefile:`twenty-shared-dependencies-entry.js`,loader:`js`},outfile:f,outExtension:void 0,external:[]});let p=new Map(await Promise.all(n.dependencies.map(async t=>[t,await sn({appPath:e,specifier:t})]))),m=await(0,s.readFile)(f),h=o.default.createHash(`sha256`).update(m).digest(`hex`);return await c({fileFolder:t.St.BuiltFrontComponent,builtPath:d,sourcePath:`package.json`,checksum:h}),{exportNamesBySpecifier:p}},dn=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),fn=dn(((e,t)=>{(function(e,n){typeof define==`function`&&define.amd?define([],n):typeof t==`object`&&t.exports?t.exports=n():e.moo=n()})(e,function(){var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=typeof RegExp().sticky==`boolean`;function r(e){return e&&t.call(e)===`[object RegExp]`}function i(e){return e&&typeof e==`object`&&!r(e)&&!Array.isArray(e)}function a(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,`\\$&`)}function o(e){return RegExp(`|`+e).exec(``).length-1}function s(e){return`(`+e+`)`}function c(e){return e.length?`(?:`+e.map(function(e){return`(?:`+e+`)`}).join(`|`)+`)`:`(?!)`}function l(e){if(typeof e==`string`)return`(?:`+a(e)+`)`;if(r(e)){if(e.ignoreCase)throw Error(`RegExp /i flag not allowed`);if(e.global)throw Error(`RegExp /g flag is implied`);if(e.sticky)throw Error(`RegExp /y flag is implied`);if(e.multiline)throw Error(`RegExp /m flag is implied`);return e.source}else throw Error(`Not a pattern: `+e)}function u(e,t){return e.length>t?e:Array(t-e.length+1).join(` `)+e}function d(e,t){for(var n=e.length,r=0;;){var i=e.lastIndexOf(`
28
28
  `,n-1);if(i===-1||(r++,n=i,r===t)||n===0)break}var a=r<t?0:n+1;return e.substring(a).split(`
29
29
  `)}function f(e){for(var t=Object.getOwnPropertyNames(e),n=[],r=0;r<t.length;r++){var a=t[r],o=e[a],s=[].concat(o);if(a===`include`){for(var c=0;c<s.length;c++)n.push({include:s[c]});continue}var l=[];s.forEach(function(e){i(e)?(l.length&&n.push(m(a,l)),n.push(m(a,e)),l=[]):l.push(e)}),l.length&&n.push(m(a,l))}return n}function p(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(r.include){for(var i=[].concat(r.include),a=0;a<i.length;a++)t.push({include:i[a]});continue}if(!r.type)throw Error(`Rule has no type: `+JSON.stringify(r));t.push(m(r.type,r))}return t}function m(t,n){if(i(n)||(n={match:n}),n.include)throw Error(`Matching rules cannot also include states`);var a={defaultType:t,lineBreaks:!!n.error||!!n.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var o in n)e.call(n,o)&&(a[o]=n[o]);if(typeof a.type==`string`&&t!==a.type)throw Error(`Type transform cannot be a string (type '`+a.type+`' for token '`+t+`')`);var s=a.match;return a.match=Array.isArray(s)?s:s?[s]:[],a.match.sort(function(e,t){return r(e)&&r(t)?0:r(t)?-1:r(e)?1:t.length-e.length}),a}function h(e){return Array.isArray(e)?p(e):f(e)}var g=m(`error`,{lineBreaks:!0,shouldThrow:!0});function _(e,t){for(var i=null,a=Object.create(null),u=!0,d=null,f=[],p=[],m=0;m<e.length;m++)e[m].fallback&&(u=!1);for(var m=0;m<e.length;m++){var h=e[m];if(h.include)throw Error(`Inheritance is not allowed in stateless lexers`);if(h.error||h.fallback){if(i)throw!h.fallback==!i.fallback?Error(`Multiple `+(h.fallback?`fallback`:`error`)+` rules not allowed (for token '`+h.defaultType+`')`):Error(`fallback and error are mutually exclusive (for token '`+h.defaultType+`')`);i=h}var _=h.match.slice();if(u)for(;_.length&&typeof _[0]==`string`&&_[0].length===1;){var v=_.shift();a[v.charCodeAt(0)]=h}if(h.pop||h.push||h.next){if(!t)throw Error(`State-switching options are not allowed in stateless lexers (for token '`+h.defaultType+`')`);if(h.fallback)throw Error(`State-switching options are not allowed on fallback tokens (for token '`+h.defaultType+`')`)}if(_.length!==0){u=!1,f.push(h);for(var y=0;y<_.length;y++){var b=_[y];if(r(b)){if(d===null)d=b.unicode;else if(d!==b.unicode&&h.fallback===!1)throw Error(`If one rule is /u then all must be`)}}var x=c(_.map(l)),S=new RegExp(x);if(S.test(``))throw Error(`RegExp matches empty string: `+S);if(o(x)>0)throw Error(`RegExp has capture groups: `+S+`
30
30
  Use (?: … ) instead`);if(!h.lineBreaks&&S.test(`
@@ -43,5 +43,5 @@ That means you use raw catalog or your catalog doesn't have a translation for th
43
43
  ICU features such as interpolation and plurals will not work properly for that message.
44
44
 
45
45
  Please compile your catalog first.
46
- `)),U(s)&&Gn.test(s)?Kn(s):U(s)?s:Xn(s,this._locale,this._locales)(t,n?.formats)}date(e,t){return zn(this._locales||this._locale,e,t)}number(e,t){return Vn(this._locales||this._locale,e,t)}};function ir(e={}){return new rr(e)}ir();function ar(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`}function or(e,...t){if(!ar(e))throw Error(`Uint8Array expected`);if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length `+t+`, got length=`+e.length)}function sr(e,t=!0){if(e.destroyed)throw Error(`Hash instance has been destroyed`);if(t&&e.finished)throw Error(`Hash#digest() has already been called`)}function cr(e,t){or(e);let n=t.outputLen;if(e.length<n)throw Error(`digestInto() expects output buffer of length at least `+n)}function lr(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function ur(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function G(e,t){return e<<32-t|e>>>t}function dr(e){if(typeof e!=`string`)throw Error(`string expected`);return new Uint8Array(new TextEncoder().encode(e))}function fr(e){return typeof e==`string`&&(e=dr(e)),or(e),e}var pr=class{};function mr(e){let t=t=>e().update(fr(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function hr(e,t,n,r){if(typeof e.setBigUint64==`function`)return e.setBigUint64(t,n,r);let i=BigInt(32),a=BigInt(4294967295),o=Number(n>>i&a),s=Number(n&a),c=r?4:0,l=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+l,s,r)}function gr(e,t,n){return e&t^~e&n}function _r(e,t,n){return e&t^e&n^t&n}var vr=class extends pr{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=ur(this.buffer)}update(e){sr(this),e=fr(e),or(e);let{view:t,buffer:n,blockLen:r}=this,i=e.length;for(let a=0;a<i;){let o=Math.min(r-this.pos,i-a);if(o===r){let t=ur(e);for(;r<=i-a;a+=r)this.process(t,a);continue}n.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){sr(this),cr(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,lr(this.buffer.subarray(a)),this.padOffset>r-a&&(this.process(n,0),a=0);for(let e=a;e<r;e++)t[e]=0;hr(n,r-8,BigInt(this.length*8),i),this.process(n,0);let o=ur(e),s=this.outputLen;if(s%4)throw Error(`_sha2: outputLen should be aligned to 32bit`);let c=s/4,l=this.get();if(c>l.length)throw Error(`_sha2: outputLen bigger than state`);for(let e=0;e<c;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:o}=this;return e.destroyed=a,e.finished=i,e.length=r,e.pos=o,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}},K=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),yr=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),q=new Uint32Array(64),br=class extends vr{constructor(e=32){super(64,e,8,!1),this.A=K[0]|0,this.B=K[1]|0,this.C=K[2]|0,this.D=K[3]|0,this.E=K[4]|0,this.F=K[5]|0,this.G=K[6]|0,this.H=K[7]|0}get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:o,H:s}=this;return[e,t,n,r,i,a,o,s]}set(e,t,n,r,i,a,o,s){this.A=e|0,this.B=t|0,this.C=n|0,this.D=r|0,this.E=i|0,this.F=a|0,this.G=o|0,this.H=s|0}process(e,t){for(let n=0;n<16;n++,t+=4)q[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=q[e-15],n=q[e-2],r=G(t,7)^G(t,18)^t>>>3;q[e]=(G(n,17)^G(n,19)^n>>>10)+q[e-7]+r+q[e-16]|0}let{A:n,B:r,C:i,D:a,E:o,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){let t=G(o,6)^G(o,11)^G(o,25),u=l+t+gr(o,s,c)+yr[e]+q[e]|0,d=(G(n,2)^G(n,13)^G(n,22))+_r(n,r,i)|0;l=c,c=s,s=o,o=a+u|0,a=i,i=r,r=n,n=u+d|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,a=a+this.D|0,o=o+this.E|0,s=s+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(n,r,i,a,o,s,c,l)}roundClean(){lr(q)}destroy(){this.set(0,0,0,0,0,0,0,0),lr(this.buffer)}},xr=mr(()=>new br),Sr=``,Cr=5e4,wr=new Map,Tr=e=>typeof Buffer<`u`?Buffer.from(e).toString(`base64`):btoa(String.fromCharCode(...e)),Er=(t,n=``)=>{let r=t+Sr+(n||``),i=wr.get(r);if(e.t(i))return i;let a=Tr(xr(dr(r))).slice(0,6);return wr.size>=Cr&&wr.clear(),wr.set(r,a),a},Dr=(e,t)=>`${e}.${t}`,Or=[`objectLabel`,`objectLabelSingular`,`objectLabelPlural`,`objectIcon`],kr=e=>`{${e}}`;Object.fromEntries(Or.map(e=>[e,kr(e)]));var Ar={objectMetadata:[`labelSingular`,`labelPlural`,`description`],fieldMetadata:[`label`,`description`],view:[`name`],viewFieldGroup:[`name`],pageLayout:[`name`],pageLayoutTab:[`title`],pageLayoutWidget:[`title`],commandMenuItem:[`label`,`shortLabel`],navigationMenuItem:[`name`],timelineActivityType:[`label`],settingsMenuItem:[`title`],skill:[`label`,`description`]},jr=t=>{let n=[];for(let[r,i]of Object.entries(t)){if(typeof i==`string`){n.push({message:r,translation:i});continue}if(e.t(i)&&typeof i==`object`)for(let[e,t]of Object.entries(i))typeof t==`string`&&n.push({message:e,context:r,translation:t})}return n},Mr=t=>{let n={},r=[...t].sort((e,t)=>(e.context??``).localeCompare(t.context??``)||e.message.localeCompare(t.message));for(let{message:t,context:i,translation:a}of r){if(!e.t(i)){n[t]=a;continue}let r=n[i];typeof r==`object`&&e.t(r)?r[t]=a:n[i]={[t]:a}}return n},Nr=({catalog:t,onCollision:n})=>{let r={},i=new Map;for(let{message:a,context:o,translation:s}of jr(t)){if(s.length===0)continue;let t=e.t(o)?`${o} ${a}`:a,c=Er(a,o),l=i.get(c);e.t(l)&&l!==t&&n?.({messageId:c,keptKey:t,droppedKey:l}),i.set(c,t),r[c]=s}return r},Pr=`locales`,Fr=l.posix.join(Pr,`compiled`),Ir=e=>Object.prototype.hasOwnProperty.call(t.rt,e),Lr=async e=>{let t=r.default.join(e,Pr);if(!await S(t))return{};let n=(await(0,s.readdir)(t)).filter(e=>e.endsWith(`.json`)),i={};for(let e of n){let n=r.default.basename(e,`.json`);if(n===`en`||!Ir(n))continue;let a=Nr({catalog:await D(r.default.join(t,e))??{}});Object.keys(a).length>0&&(i[n]=a)}return i},Rr=`__twentySdkFrontComponentTranslations__`,zr=async n=>{let i=n.outputDir??`.twenty/output`,a=(0,r.join)(n.appPath,i);await w(a),await ne(a);let o=new Map,s=e=>{o.set(e.builtPath,{checksum:e.checksum,builtPath:e.builtPath,sourcePath:e.sourcePath,fileFolder:e.fileFolder,usesSdkClient:e.usesSdkClient})},{logicFunctions:c,frontComponents:l}=n.filePaths,u=n.manifest.application.frontComponentSharedDependencies,d=await Lr(n.appPath),f=Object.keys(d).length?{js:`globalThis[${JSON.stringify(Rr)}]=${JSON.stringify(d)};`}:void 0;await ce({appPath:n.appPath,sourcePaths:c,fileFolder:t.ht.BuiltLogicFunction,buildOptions:{bundle:!0,splitting:!1,format:`esm`,platform:`node`,outdir:a,outExtension:{".js":`.mjs`},external:Xt,tsconfig:(0,r.join)(n.appPath,`tsconfig.json`),sourcemap:!0,metafile:!0,logLevel:`silent`,banner:t.b,plugins:[Ut()]},onFileBuilt:s});let p=e.t(u)?await un({appPath:n.appPath,outputDir:i,sharedDependencies:u,onFileBuilt:s}):null;await ce({appPath:n.appPath,sourcePaths:l,fileFolder:t.ht.BuiltFrontComponent,buildOptions:{...en(),outdir:a,tsconfig:(0,r.join)(n.appPath,`tsconfig.json`),jsx:`automatic`,sourcemap:!0,metafile:!0,logLevel:`silent`,...f===void 0?{}:{banner:f},plugins:[...t.t({getSharedDependenciesBuildContext:()=>p}),Ut()]},onFileBuilt:s}),await Vr({appPath:n.appPath,fileFolder:t.ht.Source,filePaths:[...new Set([...c,...l])],collectFileBuilt:s,outputDir:i,dereferenceSymlinks:n.dereferenceSymlinks}),await Vr({appPath:n.appPath,fileFolder:t.ht.PublicAsset,filePaths:n.filePaths.publicAssets,collectFileBuilt:s,outputDir:i,dereferenceSymlinks:n.dereferenceSymlinks}),await Vr({appPath:n.appPath,fileFolder:t.ht.Dependencies,filePaths:[`package.json`,`yarn.lock`].filter(e=>C((0,r.join)(n.appPath,e))),collectFileBuilt:s,outputDir:i,dereferenceSymlinks:n.dereferenceSymlinks});for(let e of n.generatedAssets??[])await Br({appPath:n.appPath,generatedAsset:e,outputDir:i,collectFileBuilt:s});return await oe({appPath:n.appPath,relativeOutputDir:i,dereferenceSymlinks:n.dereferenceSymlinks}),{builtFileInfos:o}},Br=async({appPath:e,generatedAsset:n,outputDir:i,collectFileBuilt:a})=>{let c=(0,r.join)(i,n.relativePath),l=(0,r.join)(e,c);await w((0,r.dirname)(l)),await(0,s.writeFile)(l,n.content);let u=o.default.createHash(`md5`).update(n.content).digest(`hex`);a({fileFolder:t.ht.PublicAsset,builtPath:c,sourcePath:n.relativePath,checksum:u})},Vr=async({appPath:e,fileFolder:t,filePaths:n,outputDir:i,dereferenceSymlinks:a=!1,collectFileBuilt:c})=>{for(let l of n){let n=(0,r.join)(e,l);if(!await S(n))continue;let u=(0,r.join)(i,l),d=(0,r.join)(e,u);await w((0,r.dirname)(d)),await O({sourcePath:n,destinationPath:d,dereferenceSymlinks:a});let f=await(0,s.readFile)(d);c({fileFolder:t,builtPath:u,sourcePath:l,checksum:o.default.createHash(`md5`).update(f).digest(`hex`)})}},Hr=`M6.822 14.174c0-2.435 1.996-4.411 4.456-4.411h8.574c.125 0 .241.075.293.19a.31.31 0 0 1-.056.344l-1.88 2.023c-.326.35-.787.552-1.27.552H11.3c-.738 0-1.338.594-1.338 1.325v3.336a.78.78 0 0 1-.783.777H7.61a.78.78 0 0 1-.783-.777v-3.36zM33.5 25.553c0 2.434-1.996 4.411-4.456 4.411h-3.642c-2.46 0-4.454-1.977-4.454-4.411v-6.315c0-.43.16-.842.456-1.16l2.124-2.285a.33.33 0 0 1 .355-.081.32.32 0 0 1 .205.295v9.527c0 .73.598 1.322 1.337 1.322h3.6a1.33 1.33 0 0 0 1.337-1.322V14.197c0-.73-.599-1.325-1.337-1.325H24.84c-.481 0-.938.201-1.265.547L11.088 26.856h7.503a.78.78 0 0 1 .784.778v1.552a.78.78 0 0 1-.784.778H8.481a1.655 1.655 0 0 1-1.662-1.644v-.824c0-.412.156-.809.44-1.114l13.999-15.06a4.9 4.9 0 0 1 3.594-1.56h4.189c2.46 0 4.454 1.977 4.454 4.412v11.379z`,Ur=async()=>`data:image/png;base64,${(await(0,s.readFile)((0,l.join)(__dirname,`assets`,`halftone-backdrop.png`))).toString(`base64`)}`,Wr=1388,Gr=858,J=156,Kr=16,Y=351,qr=434,Jr=798,Yr=Wr/2,Xr=Gr/2,Zr=19,Qr=8,$r=`#b3b3b3`,ei=J/40,ti=async({logoBuffer:e})=>{let t=`data:image/png;base64,${(await(0,f.default)(e).resize(J,J,{fit:`cover`,position:`centre`}).png().toBuffer()).toString(`base64`)}`,n=await Ur(),r=[`<svg xmlns="http://www.w3.org/2000/svg" width="${Wr}" height="${Gr}" viewBox="0 0 ${Wr} ${Gr}">`,`<image href="${n}" x="0" y="0" width="${Wr}" height="${Gr}" preserveAspectRatio="none" />`,`<defs>`,`<filter id="tileShadow" x="-40%" y="-40%" width="180%" height="180%">`,`<feDropShadow dx="0" dy="6" stdDeviation="10" flood-color="#0b0b0f" flood-opacity="0.14" />`,`</filter>`,`<clipPath id="leftLogoClip"><rect x="${qr}" y="${Y}" width="${J}" height="${J}" rx="${Kr}" /></clipPath>`,`</defs>`,`<g filter="url(#tileShadow)">`,`<rect x="${qr}" y="${Y}" width="${J}" height="${J}" rx="${Kr}" fill="#ffffff" />`,`<rect x="${Jr}" y="${Y}" width="${J}" height="${J}" rx="${Kr}" fill="#000000" />`,`</g>`,`<image href="${t}" x="${qr}" y="${Y}" width="${J}" height="${J}" preserveAspectRatio="xMidYMid slice" clip-path="url(#leftLogoClip)" />`,`<rect x="${qr}" y="${Y}" width="${J}" height="${J}" rx="${Kr}" fill="none" stroke="#000000" stroke-opacity="0.08" stroke-width="1" />`,`<g transform="translate(${Jr} ${Y}) scale(${ei})"><path d="${Hr}" fill="#ffffff" /></g>`,`<line x1="${Yr-Zr}" y1="${Xr-Zr}" x2="713" y2="448" stroke="${$r}" stroke-width="${Qr}" stroke-linecap="round" />`,`<line x1="${Yr-Zr}" y1="448" x2="713" y2="${Xr-Zr}" stroke="${$r}" stroke-width="${Qr}" stroke-linecap="round" />`,`</svg>`].join(``);return(0,f.default)(Buffer.from(r)).png().toBuffer()},X=`${t.h}/cover.generated.png`,ni=e=>e.startsWith(`http://`)||e.startsWith(`https://`),ri=async({appPath:t,manifest:n})=>{let{logo:i,galleryImages:a}=n.application;if(!e.t(i)||ni(i)||(a??[]).length>0)return{manifest:n,generatedAssets:[]};let o=(0,r.join)(t,i);if(!await S(o))return{manifest:n,generatedAssets:[]};let c=await ti({logoBuffer:await(0,s.readFile)(o)}),l={filePath:X,fileName:(0,r.basename)(X),fileType:(0,r.extname)(X).replace(/^\./,``),checksum:null},u=[...n.publicAssets.filter(e=>e.filePath!==X),l];return{manifest:{...n,application:{...n.application,galleryImages:[X]},publicAssets:u},generatedAssets:[{relativePath:X,content:c}]}},Z=function(e){return e.DefineApplication=`defineApplication`,e.DefineApplicationRole=`defineApplicationRole`,e.DefineField=`defineField`,e.DefineIndex=`defineIndex`,e.DefineLogicFunction=`defineLogicFunction`,e.DefinePostInstallLogicFunction=`definePostInstallLogicFunction`,e.DefinePreInstallLogicFunction=`definePreInstallLogicFunction`,e.DefineUninstallLogicFunction=`defineUninstallLogicFunction`,e.DefineHealthCheck=`defineHealthCheck`,e.DefineObject=`defineObject`,e.DefinePermissionFlag=`definePermissionFlag`,e.DefineRole=`defineRole`,e.DefineSkill=`defineSkill`,e.DefineAgent=`defineAgent`,e.DefineWorkflow=`defineWorkflow`,e.DefineConnectionProvider=`defineConnectionProvider`,e.DefineFrontComponent=`defineFrontComponent`,e.DefineSettingsFrontComponent=`defineSettingsFrontComponent`,e.DefineView=`defineView`,e.DefineViewField=`defineViewField`,e.DefineNavigationMenuItem=`defineNavigationMenuItem`,e.DefinePageLayout=`definePageLayout`,e.DefinePageLayoutTab=`definePageLayoutTab`,e.DefinePageLayoutWidget=`definePageLayoutWidget`,e.DefineCommandMenuItem=`defineCommandMenuItem`,e.DefineTimelineActivityType=`defineTimelineActivityType`,e.DefineSettingsMenuItem=`defineSettingsMenuItem`,e}({}),Q=function(e){return e.Application=`application`,e.Fields=`fields`,e.Indexes=`indexes`,e.LogicFunctions=`logicFunctions`,e.Objects=`objects`,e.PermissionFlags=`permissionFlags`,e.Roles=`roles`,e.Skills=`skills`,e.Agents=`agents`,e.Workflows=`workflows`,e.ConnectionProviders=`connectionProviders`,e.FrontComponents=`frontComponents`,e.PublicAssets=`publicAssets`,e.Views=`views`,e.ViewFields=`viewFields`,e.NavigationMenuItems=`navigationMenuItems`,e.PageLayouts=`pageLayouts`,e.PageLayoutTabs=`pageLayoutTabs`,e.PageLayoutWidgets=`pageLayoutWidgets`,e.CommandMenuItems=`commandMenuItems`,e.TimelineActivityTypes=`timelineActivityTypes`,e.SettingsMenuItems=`settingsMenuItems`,e}({}),ii={defineApplication:`application`,defineApplicationRole:`roles`,defineField:`fields`,defineIndex:`indexes`,defineLogicFunction:`logicFunctions`,definePostInstallLogicFunction:`logicFunctions`,definePreInstallLogicFunction:`logicFunctions`,defineUninstallLogicFunction:`logicFunctions`,defineHealthCheck:`logicFunctions`,defineObject:`objects`,definePermissionFlag:`permissionFlags`,defineRole:`roles`,defineSkill:`skills`,defineAgent:`agents`,defineWorkflow:`workflows`,defineConnectionProvider:`connectionProviders`,defineFrontComponent:`frontComponents`,defineSettingsFrontComponent:`frontComponents`,defineView:`views`,defineViewField:`viewFields`,defineNavigationMenuItem:`navigationMenuItems`,definePageLayout:`pageLayouts`,definePageLayoutTab:`pageLayoutTabs`,definePageLayoutWidget:`pageLayoutWidgets`,defineCommandMenuItem:`commandMenuItems`,defineTimelineActivityType:`timelineActivityTypes`,defineSettingsMenuItem:`settingsMenuItems`},ai=e=>{if(!p.isCallExpression(e))return;let t=e.expression;if(p.isIdentifier(t)&&Object.values(Z).includes(t.text))return t.text},oi=e=>{let t=p.createSourceFile(`temp.ts`,e,p.ScriptTarget.Latest,!0),n=[];p.forEachChild(t,e=>{n.push(e)});for(let e of n)if(p.isExportAssignment(e)){if(e.isExportEquals||!e.expression)return;let t=ai(e.expression);if(t)return t}},si=[[/\bfavoriteRecordIds\.length\b/g,`arrayLength(favoriteRecordIds)`],[/\bselectedRecords\.length\b/g,`arrayLength(selectedRecords)`]],ci=e=>si.reduce((e,[t,n])=>e.replace(t,n),e.replace(/!==/g,`!=`).replace(/===/g,`==`).replace(/&&/g,`and`).replace(/\|\|/g,`or`).replace(/!(?!=)/g,`not `).replace(/,(\s*\))/g,`$1`)),li=/(conditionalAvailabilityExpression\s*:\s*)(?!['"`])((?:[^,}()]|\([^()]*\))+)/g,ui=e=>e.replace(li,(e,t,n)=>t+JSON.stringify(ci(n.trim()))),di={name:`conditional-availability-transform`,setup:e=>{e.onLoad({filter:/\.tsx?$/},async e=>{let t=await m.readFile(e.path,`utf8`);if(!t.includes(`conditionalAvailabilityExpression`))return null;let n=ui(t);return n===t?null:{contents:n,loader:e.path.endsWith(`.tsx`)?`tsx`:`ts`}})}},fi=new Map,pi=(t,n)=>{let r=(0,h.createHash)(`sha1`).update(t).digest(`hex`),i=fi.get(n);if(e.t(i)&&i.outputHash===r)return i.wrapper;let a=_.default.compileFunction(t,[`exports`,`require`,`module`,`__filename`,`__dirname`],{filename:n});return fi.set(n,{outputHash:r,wrapper:a}),a},mi=[`twenty-ui`,`twenty-client-sdk/core`,`twenty-client-sdk/metadata`],hi=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),gi={name:`manifest-mock`,setup:e=>{let t=mi.map(hi),n=RegExp(`^(${t.join(`|`)})(/.*)?$`);e.onResolve({filter:n},({path:e})=>e.endsWith(`.css`)?null:{path:e,namespace:`manifest-mock`}),e.onLoad({filter:/.*/,namespace:`manifest-mock`},()=>({contents:`module.exports = new Proxy({}, { get: () => () => {} });`,loader:`js`}))}},$=async({filePath:e,appPath:t})=>vi(await _i({filePath:e,appPath:t}),e),_i=async({filePath:e,appPath:t})=>{let n=r.default.join(t,`tsconfig.json`),i=await S(n),a=(0,g.createRequire)(r.default.join(t,`package.json`)),o,s;try{o=r.default.dirname(a.resolve(`react/package.json`)),s=r.default.dirname(a.resolve(`react-dom/package.json`))}catch{}let c=(await u.build({entryPoints:[e],bundle:!0,write:!1,format:`cjs`,platform:`node`,target:`node18`,jsx:`automatic`,tsconfig:i?n:void 0,loader:{".css":`empty`},alias:{...o&&{react:o},...s&&{"react-dom":s}},plugins:[di,gi],logLevel:`silent`})).outputFiles[0].text,l=pi(c,e),d={exports:{}};return l(d.exports,a,d,e,r.default.dirname(e)),d.exports},vi=(n,r)=>{if(e.t(n.default)&&t.ot(n.default))return n.default;throw Error(`Config file ${r} must export a config object default export`)},yi=`a80ff791-b940-4c47-a522-2bb478515415`,bi=e=>e.type!==t.It.SELECT&&e.type!==t.It.MULTI_SELECT||e.options===void 0||e.options===null?e:{...e,options:e.options.map(t=>({...t,id:t.id??(0,a.v5)(`${t.label}-${e.universalIdentifier}`,yi)}))},xi=({roleConfig:e,applicationUniversalIdentifier:n})=>({...e,objectPermissions:(e.objectPermissions??[]).map(r=>({...r,universalIdentifier:r.universalIdentifier??t.N({applicationUniversalIdentifier:n,roleUniversalIdentifier:e.universalIdentifier,objectUniversalIdentifier:r.objectUniversalIdentifier})})),fieldPermissions:(e.fieldPermissions??[]).map(r=>({...r,universalIdentifier:r.universalIdentifier??t.S({applicationUniversalIdentifier:n,roleUniversalIdentifier:e.universalIdentifier,fieldUniversalIdentifier:r.fieldUniversalIdentifier})})),rowLevelPermissionPredicateGroups:e.rowLevelPermissionPredicateGroups??[],rowLevelPermissionPredicates:e.rowLevelPermissionPredicates??[],permissionFlagUniversalIdentifiers:e.permissionFlagUniversalIdentifiers??[]}),Si=({objectConfig:e,applicationUniversalIdentifier:n})=>({name:`name`,label:`Name`,description:`Name`,icon:`IconAbc`,isNullable:!0,defaultValue:null,type:t.It.TEXT,universalIdentifier:t.L({applicationUniversalIdentifier:n,objectUniversalIdentifier:e.universalIdentifier,name:`name`})}),Ci=({objectConfig:e,applicationUniversalIdentifier:t})=>{let n=(e.fields??[]).map(e=>e.name),r=[...e.fields],i=Si({objectConfig:e,applicationUniversalIdentifier:t}),a=vt({fields:e.fields,labelIdentifierFieldMetadataUniversalIdentifier:e.labelIdentifierFieldMetadataUniversalIdentifier});return!n.includes(i.name)&&!a&&r.push(i),{objectFields:r}},wi=e=>{let t=new Set(e);return t.has(`react`)&&t.add(`react/jsx-runtime`),[...t].sort()},Ti=[`twenty-client-sdk`,`twenty-sdk`],Ei=e=>{let t=[],n=new Set;for(let r of e){if(!(0,i.isNonEmptyString)(r)){t.push(`"frontComponentSharedDependencies" entries in package.json must be non-empty strings`);continue}if(r.startsWith(`.`)||r.startsWith(`/`)){t.push(`Shared dependency "${r}" must be a package specifier, not a relative or absolute path`);continue}if(r===`twenty:front-component-shared-dependencies`){t.push(`Shared dependency "${r}" is reserved and cannot be shared`);continue}if(Ti.some(e=>r===e||r.startsWith(`${e}/`))){t.push(`Shared dependency "${r}" is already served separately and cannot be shared`);continue}if(n.has(r)){t.push(`Shared dependency "${r}" is declared twice`);continue}n.add(r)}return t},Di=async e=>{let n=r.default.join(e,`package.json`);if(!await S(n))return{errors:[]};let a=(await D(n)).frontComponentSharedDependencies;if(a===void 0)return{errors:[]};if(!Array.isArray(a))return{errors:[`"frontComponentSharedDependencies" in package.json must be an array of package specifiers`]};if(!(0,i.isNonEmptyArray)(a))return{errors:[]};let o=Ei(a);return(0,i.isNonEmptyArray)(o)?{errors:o}:{sharedDependencies:{dependencies:wi(a),builtPath:t.A,builtChecksum:null},errors:[]}},Oi=`pageType.isInSidePanel.isDashboardPageLayoutInEditMode.isLayoutCustomizationModeEnabled.favoriteRecordIds.isSelectAll.hasAnySoftDeleteFilterOnView.numberOfSelectedRecords.objectPermissions.selectedRecords.featureFlags.targetObjectReadPermissions.targetObjectWritePermissions.canImpersonate.canAccessFullAdminPanel.objectMetadataItem.objectMetadataLabel.isDefined.isNonEmptyString.includes.every.everyDefined.everyEquals.some.someDefined.someEquals.none.noneDefined.noneEquals.someNonEmptyString.includesEvery`.split(`.`),ki=`conditionalAvailabilityExpression`,Ai=[`twenty-sdk/define`,`twenty-sdk`],ji=new Set(Oi),Mi=t=>{let n=[];for(let r of t.statements){if(!p.default.isImportDeclaration(r)||!p.default.isStringLiteral(r.moduleSpecifier)||!Ai.includes(r.moduleSpecifier.text))continue;let i=r.importClause;if(!e.t(i)||i.phaseModifier===p.default.SyntaxKind.TypeKeyword)continue;let a=i.namedBindings;if(e.t(a)){if(p.default.isNamespaceImport(a)){let e=a.name.text,r=t=>{p.default.isPropertyAccessExpression(t)&&p.default.isIdentifier(t.expression)&&t.expression.text===e&&ji.has(t.name.text)&&n.push({importedName:t.name.text,node:t}),p.default.forEachChild(t,r)};r(t);continue}if(p.default.isNamedImports(a))for(let e of a.elements){if(e.isTypeOnly)continue;let t=(e.propertyName??e.name).text;ji.has(t)&&n.push({importedName:t,node:e})}}}return n},Ni=e=>{let t=!1,n=e=>{if(!t){if((p.default.isPropertyAssignment(e)||p.default.isShorthandPropertyAssignment(e))&&(p.default.isIdentifier(e.name)||p.default.isStringLiteral(e.name))&&e.name.text===ki){t=!0;return}p.default.forEachChild(e,n)}};return n(e),t},Pi=(e,t)=>{if(!Oi.some(t=>e.includes(t)))return[];let n=p.default.createSourceFile(t,e,p.default.ScriptTarget.Latest,!0,t.endsWith(`.tsx`)?p.default.ScriptKind.TSX:p.default.ScriptKind.TS),r=Mi(n);return r.length===0||Ni(n)?[]:r.map(({importedName:e,node:r})=>{let{line:i,character:a}=n.getLineAndCharacterOfPosition(r.getStart(n));return`${t}:${i+1}:${a+1} - "${e}" is a conditional-availability expression variable from twenty-sdk but this file has no ${ki}. These variables can only be used inside a command's ${ki}, not at runtime.`})},Fi={canReadObjectRecords:`read`,canUpdateObjectRecords:`update`,canSoftDeleteObjectRecords:`soft-delete`,canDestroyObjectRecords:`destroy`},Ii=Object.fromEntries(Object.entries(t.it).map(([e,t])=>[t,e])),Li=Object.fromEntries(Object.entries(xt).map(([e,{universalIdentifier:t}])=>[t,e])),Ri=({grant:e,objects:t,permissionFlags:n})=>{let r=e=>t.find(t=>t.universalIdentifier===e)?.nameSingular??Li[e]??e;switch(e.type){case`ALL_OBJECT_RECORDS`:return`${Fi[e.action]} all object records`;case`ALL_SETTINGS`:return`update all settings`;case`ALL_TOOLS`:return`access all tools`;case`PERMISSION_FLAG`:return`permission flag ${n.find(t=>t.universalIdentifier===e.permissionFlagUniversalIdentifier)?.key??Ii[e.permissionFlagUniversalIdentifier]??e.permissionFlagUniversalIdentifier}`;case`OBJECT_RECORDS`:return`${Fi[e.action]} ${r(e.objectUniversalIdentifier)} records`;case`FIELD_VALUE`:return`${e.action===`canReadFieldValue`?`read`:`update`} field ${e.fieldUniversalIdentifier} of ${r(e.objectUniversalIdentifier)}`;case`ROW_LEVEL_RESTRICTION`:return`${r(e.objectUniversalIdentifier)} records without the row-level restriction`}},zi=e=>e.map(e=>`"${e}"`).join(`, `),Bi=({agents:t,defaultRoleUniversalIdentifier:n})=>{let r=new Map;for(let i of t)!e.t(i.roleUniversalIdentifier)||i.roleUniversalIdentifier===n||r.set(i.roleUniversalIdentifier,[...r.get(i.roleUniversalIdentifier)??[],i.name]);return r},Vi=({applicationRole:t,defaultRoleUniversalIdentifier:n})=>e.t(t)?[]:[`Application default role "${n}" is not defined by this application.`],Hi=({agentNamesByRoleUniversalIdentifier:e,roles:t})=>[...e].filter(([e])=>!t.some(t=>t.universalIdentifier===e)).map(([e,t])=>`Agent ${zi(t)} references role "${e}", which is not defined by this application.`),Ui=({agentNamesByRoleUniversalIdentifier:n,applicationRole:r,roles:i,objects:a,permissionFlags:o})=>{let s=o.filter(e=>(e.permissionType??`tool`)===`tool`).map(e=>e.universalIdentifier);return[...n].flatMap(([n,c])=>{let l=i.find(e=>e.universalIdentifier===n);if(!e.t(l))return[];let u=t.O({role:l,superset:r,toolPermissionFlagUniversalIdentifiers:s});if(u.length===0)return[];let d=u.map(e=>Ri({grant:e,objects:a,permissionFlags:o})).join(`, `);return[`Role "${l.label}" used by agent ${zi(c)} grants more than the application role "${r.label}": ${d}. The application role must cover every permission an agent role grants.`]})},Wi=({agents:t,roles:n,objects:r,permissionFlags:i,defaultRoleUniversalIdentifier:a})=>{let o=n.find(e=>e.universalIdentifier===a),s=Bi({agents:t,defaultRoleUniversalIdentifier:a});return[...Vi({applicationRole:o,defaultRoleUniversalIdentifier:a}),...Hi({agentNamesByRoleUniversalIdentifier:s,roles:n}),...e.t(o)?Ui({agentNamesByRoleUniversalIdentifier:s,applicationRole:o,roles:n,objects:r,permissionFlags:i}):[]]},Gi=({views:n,objects:r,fields:i})=>{let a=[],o=new Map;for(let e of i)o.set(e.universalIdentifier,e);for(let e of r)for(let t of e.fields)o.set(t.universalIdentifier,t);for(let r of n)for(let n of r.filters??[]){let r=o.get(n.fieldMetadataUniversalIdentifier);if(!e.t(r))continue;let i=r.type===t.It.RELATION?o.get(r.relationTargetFieldMetadataUniversalIdentifier)?.type??r.type:r.type;if(!(i in t.Z))continue;let s=t.X({filterType:i,subFieldName:n.subFieldName});s.includes(n.operand)||a.push(`Operand "${n.operand}" is not supported on field "${r.name}" (type "${i}"). Supported operands: ${s.join(`, `)}.`)}return a},Ki=(e=y)=>{try{let t=JSON.parse((0,c.readFileSync)((0,l.join)(e,`package.json`),`utf-8`)).engines?.twenty;return typeof t==`string`&&t.trim()!==``?t.trim():null}catch{return null}},qi=e=>(e?.type===`record`||e?.type===`object`)&&(0,i.isNonEmptyString)(e.objectUniversalIdentifier),Ji=(e,t)=>{let n=(0,i.isNonEmptyString)(e)?t?.(e):void 0;return`Id of the ${(0,i.isNonEmptyString)(n)?n:`linked`} record`},Yi=(t,n)=>{if(qi(t))return{type:`string`,description:Ji(t.objectUniversalIdentifier,n)};if(t.type===`records`)return{type:`array`,items:{type:`string`,description:Ji(t.objectUniversalIdentifier,n)}};let{objectUniversalIdentifier:r,multiline:a,label:o,items:s,properties:c,additionalProperties:l,...u}=t,d={...u};return e.t(s)&&(d.items=Yi(s,n)),e.t(c)&&(d.properties=Object.fromEntries(Object.entries(c).map(([e,t])=>[e,Yi(t,n)]))),e.t(l)&&(d.additionalProperties=(0,i.isObject)(l)?Yi(l,n):l),d},Xi={type:`object`,properties:{}},Zi=e=>{let t={type:`unknown`};switch(e.type){case`string`:t.type=`string`;break;case`number`:case`integer`:t.type=`number`;break;case`boolean`:t.type=`boolean`;break;case`array`:t.type=`array`,e.items&&(t.items=Zi(e.items));break;case`object`:t.type=`object`,e.properties&&(t.properties=Object.fromEntries(Object.entries(e.properties).map(([e,t])=>[e,Zi(t)])));break;case`record`:t.type=`record`;break;case`records`:t.type=`records`;break;default:t.type=`unknown`}return Array.isArray(e.enum)&&(t.enum=e.enum.filter(e=>typeof e==`string`)),e.multiline===!0&&(t.multiline=!0),(0,i.isNonEmptyString)(e.label)&&(t.label=e.label),(0,i.isNonEmptyString)(e.objectUniversalIdentifier)&&(t.objectUniversalIdentifier=e.objectUniversalIdentifier),t},Qi=e=>[Zi(e)];Qi({type:`object`,properties:{a:{type:`string`},b:{type:`number`}}});var $i=async t=>{let{getFunctionInputSchema:n}=await Promise.resolve().then(()=>require("./get-function-input-schema-GNk3NRLJ-_NPeFkfJ.js")),r=n(t)[0];return r?.type===`object`&&e.t(r.properties)?{type:`object`,properties:r.properties}:Xi},ea=t=>!e.t(t)||t===null?`unknown`:typeof t==`string`?`string`:typeof t==`number`?`number`:typeof t==`boolean`?`boolean`:Array.isArray(t)?`array`:`unknown`,ta=e=>e?Object.entries(e).reduce((e,[t,n])=>((0,i.isObject)(n)&&!Array.isArray(n)?e[t]={isLeaf:!1,type:`object`,label:t,value:ta(n)}:e[t]={isLeaf:!0,value:n,type:ea(n),label:t},e),{}):{},na=(e,t)=>e?`${e}.${t}`:t,ra=(t,n,r=``)=>{let i=[];for(let[a,o]of Object.entries(n)){let n=na(r,a),s=t[a];if(!e.t(s)){i.push(`Missing key "${n}" in declared output schema.`);continue}if(o.isLeaf!==s.isLeaf){i.push(`Type mismatch at "${n}": expected ${o.isLeaf?o.type:`object`} but declared ${s.isLeaf?s.type:`object`}.`);continue}if(!o.isLeaf&&!s.isLeaf){i.push(...ra(s.value,o.value,n));continue}o.isLeaf&&s.isLeaf&&o.type!==`unknown`&&s.type!==`unknown`&&o.type!==s.type&&i.push(`Type mismatch at "${n}": expected ${o.type} but declared ${s.type}.`)}return i},ia=[`string`,`number`,`boolean`,`array`,`unknown`],aa=e=>ia.includes(e),oa=(e,t)=>{let n=t.label??e;return t.type===`record`?{isLeaf:!0,type:`string`,label:n,value:null}:t.type===`records`?{isLeaf:!0,type:`array`,label:n,value:null}:t.type===`object`?{isLeaf:!1,type:`object`,label:n,value:(0,i.isObject)(t.properties)?sa(t.properties):{}}:{isLeaf:!0,type:aa(t.type)?t.type:`unknown`,label:n,value:null}},sa=e=>Object.entries(e).reduce((e,[t,n])=>(e[t]=oa(t,n),e),{}),ca=async e=>await(0,v.glob)([`**/*.ts`,`**/*.tsx`],{cwd:e,absolute:!0,ignore:[`**/node_modules/**`,`**/*.d.ts`,`**/dist/**`,`**/.twenty/**`],onlyFiles:!0}),la=async e=>await(0,v.glob)([`${t.h}/**/*`],{cwd:e,absolute:!0,onlyFiles:!0}),ua=async e=>{try{let t=await(0,s.readFile)((0,r.join)(e,`README.md`),`utf-8`);return t.trim().length>0?t:void 0}catch{return}},da=async n=>{let i=await ca(n),a=await ua(n),o=[],c=[],l,u=[],d=[],f=[],p=[],m=[],h=[],g=[],_=[],v=[],y=[],b=[],x=[],S=[],C=[],w=[],T=[],ee=[],te=[],ne=[],re=[],E=[],D=[],ie=[],O=[],k=[],ae=[],oe=[],se=[],A=[],ce=[],le=[],j=[],ue=[],de=[],fe=[],pe=[],me=[],he=[],ge=[],_e=[],ve=[],ye=[],be=[],xe=[],Se=[],Ce=[],we=[],Te=[],Ee=[],M=[],De=[];for(let e of i){let i=await(0,s.readFile)(e,`utf-8`),a=(0,r.relative)(n,e);o.push(...Pi(i,a));let f=oi(i);if(!f)continue;let g=ii[f];switch(g){case Q.Application:{let t=await $({appPath:n,filePath:e});l=t.config,o.push(...t.errors),c.push(...t.warnings??[]),ce.push(a);break}case Q.Objects:{let t=await $({appPath:n,filePath:e});u.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),le.push(a);break}case Q.Fields:{let t=await $({appPath:n,filePath:e}),r=bi(t.config);p.push(r),o.push(...t.errors),c.push(...t.warnings??[]),j.push(a);break}case Q.PermissionFlags:{let t=await $({appPath:n,filePath:e});h.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),de.push(a);break}case Q.Roles:{let t=await $({appPath:n,filePath:e});d.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),fe.push(a),f===Z.DefineApplicationRole&&A.push(t.config.universalIdentifier);break}case Q.Skills:{let t=await $({appPath:n,filePath:e});_.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),pe.push(a);break}case Q.Agents:{let t=await $({appPath:n,filePath:e});v.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),me.push(a);break}case Q.Workflows:{let t=await $({appPath:n,filePath:e});y.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),he.push(a);break}case Q.ConnectionProviders:{let t=await $({appPath:n,filePath:e});b.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),ge.push(a);break}case Q.LogicFunctions:{let t=await $({appPath:n,filePath:e});o.push(...t.errors),c.push(...t.warnings??[]);let{handler:r,...s}=t.config,l=s.toolTriggerSettings&&!s.toolTriggerSettings.inputSchema||s.workflowActionTriggerSettings&&!s.workflowActionTriggerSettings.inputSchema?await $i(i):null,u=s.toolTriggerSettings?{...s.toolTriggerSettings,inputSchema:s.toolTriggerSettings.inputSchema??l??void 0}:void 0,d=s.workflowActionTriggerSettings?{...s.workflowActionTriggerSettings,inputSchema:s.workflowActionTriggerSettings.inputSchema??(l?Qi(l):void 0)}:void 0,p={...s,...u?{toolTriggerSettings:u}:{},...d?{workflowActionTriggerSettings:d}:{},handlerName:`default.config.handler`,sourceHandlerPath:a,builtHandlerPath:a.replace(/\.tsx?$/,`.mjs`),builtHandlerChecksum:`[default-checksum]`};if(x.push(p),_e.push(a),f===Z.DefinePostInstallLogicFunction){let e=t.config;O.push({universalIdentifier:t.config.universalIdentifier,shouldRunOnVersionUpgrade:e.shouldRunOnVersionUpgrade??!1,shouldRunSynchronously:e.shouldRunSynchronously??!1})}if(f===Z.DefinePreInstallLogicFunction){let e=t.config;k.push({universalIdentifier:t.config.universalIdentifier,shouldRunOnVersionUpgrade:e.shouldRunOnVersionUpgrade??!1})}f===Z.DefineUninstallLogicFunction&&ae.push({universalIdentifier:t.config.universalIdentifier}),f===Z.DefineHealthCheck&&oe.push({universalIdentifier:t.config.universalIdentifier});break}case Q.FrontComponents:{let t=await $({appPath:n,filePath:e});o.push(...t.errors),c.push(...t.warnings??[]);let{component:i,...s}=t.config,l=(0,r.relative)(n,e),u={...s,componentName:i.name,sourceComponentPath:l,builtComponentPath:l.replace(/\.tsx?$/,`.mjs`),builtComponentChecksum:``,isHeadless:s.isHeadless??!1};S.push(u),ve.push(a),f===Z.DefineSettingsFrontComponent&&se.push(t.config.universalIdentifier);break}case Q.Views:{let t=await $({appPath:n,filePath:e}),r={...t.config};w.push(r),o.push(...t.errors),c.push(...t.warnings??[]),be.push(a);break}case Q.ViewFields:{let t=await $({appPath:n,filePath:e});T.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),xe.push(a);break}case Q.NavigationMenuItems:{let t=await $({appPath:n,filePath:e});ee.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),Se.push(a);break}case Q.PageLayouts:{let t=await $({appPath:n,filePath:e}),r={...t.config};te.push(r),o.push(...t.errors),c.push(...t.warnings??[]),Ce.push(a);break}case Q.Indexes:{let t=await $({appPath:n,filePath:e}),r={...t.config};m.push(r),o.push(...t.errors),c.push(...t.warnings??[]),ue.push(a);break}case Q.PageLayoutTabs:{let t=await $({appPath:n,filePath:e}),r={...t.config};ne.push(r),o.push(...t.errors),c.push(...t.warnings??[]),we.push(a);break}case Q.PageLayoutWidgets:{let t=await $({appPath:n,filePath:e});re.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),Te.push(a);break}case Q.CommandMenuItems:{let t=await $({appPath:n,filePath:e});E.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),Ee.push(a);break}case Q.TimelineActivityTypes:{let t=await $({appPath:n,filePath:e});D.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),M.push(a);break}case Q.SettingsMenuItems:{let t=await $({appPath:n,filePath:e});ie.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),De.push(a);break}case Q.PublicAssets:break;default:t.Q(g)}}let Oe=await la(n);for(let e of Oe){let t=(0,r.relative)(n,e);C.push({filePath:t,fileName:(0,r.basename)(e),fileType:(0,r.extname)(e).replace(/^\./,``),checksum:null}),ye.push(t)}if(l||o.push(`Cannot build application, please export default defineApplication() to define an application`),l){for(let e of u){let{objectFields:t}=Ci({objectConfig:e,applicationUniversalIdentifier:l.universalIdentifier}),n=e.labelIdentifierFieldMetadataUniversalIdentifier??t.find(e=>e.name===`name`)?.universalIdentifier;if(!n){o.push(`No label identifier field found for object ${e.nameSingular}. Please add a field with name "name" to your object.`);continue}let r={...e,fields:t.map(bi),labelIdentifierFieldMetadataUniversalIdentifier:n};f.push(r)}for(let e of d)g.push(xi({roleConfig:e,applicationUniversalIdentifier:l.universalIdentifier}))}O.length>1&&o.push(`Only one post install logic function is allowed per application`),k.length>1&&o.push(`Only one pre install logic function is allowed per application`),ae.length>1&&o.push(`Only one uninstall logic function is allowed per application`),oe.length>1&&o.push(`Only one health check is allowed per application`),se.length>1&&o.push(`Only one settings front component is allowed per application`),A.length>1&&o.push(`Only one defineApplicationRole is allowed per application`);let{sharedDependencies:ke,errors:Ae}=await Di(n);o.push(...Ae);let N=l?.defaultRoleUniversalIdentifier??(A.length===1?A[0]:void 0);l&&!N&&o.push("Application must declare a default role: either pass `defaultRoleUniversalIdentifier` to defineApplication() or mark a role file with defineApplicationRole()"),o.push(...Gi({views:w,objects:f,fields:p})),e.t(l)&&e.t(N)&&o.push(...Wi({agents:v,roles:g,objects:f,permissionFlags:h,defaultRoleUniversalIdentifier:N}));let je=l&&N?(()=>{let{logoUrl:t,screenshots:r,...i}=l;return{...i,logo:l.logo,galleryImages:l.galleryImages??[],defaultRoleUniversalIdentifier:N,aboutDescription:a,yarnLockChecksum:null,packageJsonChecksum:null,requiredServerVersionRange:Ki(n),...O.length>=1?{postInstallLogicFunction:O[0]}:{},...k.length>=1?{preInstallLogicFunction:k[0]}:{},...ae.length>=1?{uninstallLogicFunction:ae[0]}:{},...oe.length>=1?{healthCheckLogicFunction:oe[0]}:{},...se.length>=1?{settingsFrontComponent:{universalIdentifier:se[0]}}:{},...e.t(ke)?{frontComponentSharedDependencies:ke}:{}}})():void 0,P=(e,t)=>e.universalIdentifier.localeCompare(t.universalIdentifier);return{manifest:je?{application:je,objects:f.sort(P),fields:p.sort(P),indexes:m.sort(P),permissionFlags:h.sort(P),roles:g.sort(P),skills:_.sort(P),agents:v.sort(P),workflows:y.sort(P),connectionProviders:b.sort(P),logicFunctions:x.sort(P),frontComponents:S.sort(P),publicAssets:C.sort((e,t)=>e.filePath.localeCompare(t.filePath)),views:w.sort(P),viewFields:T.sort(P),navigationMenuItems:ee.sort(P),pageLayouts:te.sort(P),pageLayoutTabs:ne.sort(P),pageLayoutWidgets:re.sort(P),commandMenuItems:E.sort(P),timelineActivityTypes:D.sort(P),settingsMenuItems:ie.sort(P)}:null,filePaths:{application:ce,objects:le,fields:j,indexes:ue,permissionFlags:de,roles:fe,skills:pe,agents:me,workflows:he,connectionProviders:ge,logicFunctions:_e,frontComponents:ve,publicAssets:ye,views:be,viewFields:xe,navigationMenuItems:Se,pageLayouts:Ce,pageLayoutTabs:we,pageLayoutWidgets:Te,commandMenuItems:Ee,timelineActivityTypes:M,settingsMenuItems:De},errors:o,warnings:c}},fa=[t.It.RELATION,t.It.MORPH_RELATION],pa=e=>fa.includes(e.type),ma=e=>{let t=new Set,n=new Set;for(let r of e)t.has(r)?n.add(r):t.add(r);return Array.from(n)},ha=({manifest:t,pageLayoutWidgets:n})=>{let r=new Set([t.application.settingsFrontComponent?.universalIdentifier,...t.settingsMenuItems.map(e=>e.frontComponentUniversalIdentifier),...t.commandMenuItems.map(e=>e.frontComponentUniversalIdentifier),...t.timelineActivityTypes.map(e=>e.frontComponentUniversalIdentifier),...n.map(({configuration:t})=>e.t(t)&&`frontComponentUniversalIdentifier`in t?t.frontComponentUniversalIdentifier:void 0)].filter(e.t));return t.frontComponents.filter(t=>!t.isHeadless&&!e.t(t.widgetAvailability)&&!r.has(t.universalIdentifier)).map(e=>`Front component "${e.name??e.componentName}" declares no widgetAvailability, so it is not offered in any widget picker. Set widgetAvailability to let users add it to record pages or dashboards.`)},ga=n=>{let r=[],i=[...n.pageLayouts.flatMap(({tabs:e})=>e??[]),...n.pageLayoutTabs];for(let n of i){n.layoutMode===t.Dt.CANVAS&&r.push(`Page layout tab "${n.title}" uses deprecated CANVAS. For a full-height widget, use VERTICAL_LIST and set the widget's heightBehavior to 'TAB_VIEWPORT'. Existing Canvas layouts remain supported and are not converted.`);for(let i of n.widgets??[])i.position?.layoutMode===t.Dt.VERTICAL_LIST&&r.push(`Page layout widget "${i.title}" uses a deprecated vertical-list position. Order the widgets array by position.index, remove position, and move any position.heightBehavior to heightBehavior. Existing positions remain supported and keep their indices.`),`gridPosition`in i&&e.t(i.gridPosition)&&r.push(`Page layout widget "${i.title}" uses deprecated gridPosition. Use position with layoutMode: 'GRID' and the same row, column, rowSpan and columnSpan. Existing gridPosition remains supported.`)}return r},_a=n=>{let r=[],a=ma(n.timelineActivityTypes.map(e=>e.name)),o=new Set(n.frontComponents.map(e=>e.universalIdentifier));for(let e of a)r.push(`Timeline activity type name "${e}" is used more than once. Names must be unique within an application.`);for(let a of n.timelineActivityTypes){e.t(a.frontComponentUniversalIdentifier)&&!o.has(a.frontComponentUniversalIdentifier)&&r.push(`Timeline activity type "${a.name}" references front component "${a.frontComponentUniversalIdentifier}", which is not defined by this application.`);let s=a.emit,c=a.replacesTimelineActivityTypeUniversalIdentifier;if(!e.t(s)){e.t(c)&&r.push(`Timeline activity type "${a.name}" declares replacesTimelineActivityTypeUniversalIdentifier without an automatic emit contract.`);continue}let l=s.through,u=l?.triggerFieldUniversalIdentifiers,d=t.x(s.objectUniversalIdentifier);d||r.push(`Timeline activity type "${a.name}" references an invalid object universal identifier "${s.objectUniversalIdentifier}".`),(s.on===`linked`||s.on===`unlinked`)&&!e.t(l)&&r.push(`Timeline activity type "${a.name}" must declare emit.through for a ${s.on} event.`),e.t(u)&&(s.on!==`updated`||!t.q(u)||new Set(u).size!==u.length)&&r.push(`Timeline activity type "${a.name}" trigger fields must be a non-empty list of unique fields on an updated through event.`);let f=d?n.objects.find(e=>e.universalIdentifier===s.objectUniversalIdentifier):void 0;if(!e.t(f)){d&&!e.t(c)&&r.push(`Timeline activity type "${a.name}" targets object "${s.objectUniversalIdentifier}", which is not defined by this application. Types targeting another application's object must declare replacesTimelineActivityTypeUniversalIdentifier.`),e.t(c)&&!t.x(c)&&r.push(`Timeline activity type "${a.name}" references an invalid replacement universal identifier "${c}".`),e.t(l)&&!t.x(l.relationFieldUniversalIdentifier)&&r.push(`Timeline activity type "${a.name}" references an invalid through relation field universal identifier "${l.relationFieldUniversalIdentifier}".`);let n=u?.filter(e=>!t.x(e))??[];n.length>0&&r.push(`Timeline activity type "${a.name}" references invalid trigger field universal identifiers: ${n.join(`, `)}.`);continue}e.t(c)&&r.push(`Timeline activity type "${a.name}" targets an object defined by this application and must not replace another application's type.`);let p=[...f.fields,...n.fields.filter(e=>e.objectUniversalIdentifier===f.universalIdentifier)];if(!e.t(l))continue;let m=p.find(e=>e.universalIdentifier===l.relationFieldUniversalIdentifier);if(e.t(m)?pa(m)&&e.t(m.universalSettings)&&(m.universalSettings.relationType===t.yt.MANY_TO_ONE||m.universalSettings.relationType===t.yt.ONE_TO_MANY&&(0,i.isNonEmptyString)(m.universalSettings.junctionTargetFieldUniversalIdentifier))||r.push(`Timeline activity type "${a.name}" must route through a MANY_TO_ONE relation or a junction-backed ONE_TO_MANY relation.`):r.push(`Timeline activity type "${a.name}" references relation field "${l.relationFieldUniversalIdentifier}", which is not defined on object "${f.nameSingular}".`),e.t(u)){let e=new Set(p.map(e=>e.universalIdentifier)),t=u.filter(t=>!e.has(t));t.length>0&&r.push(`Timeline activity type "${a.name}" references trigger fields that are not defined on object "${f.nameSingular}": ${t.join(`, `)}.`)}}return r},va=[t.yt.MANY_TO_ONE,t.yt.ONE_TO_MANY],ya=`aggregateFieldMetadataId`,ba=n=>e.t(n)&&t.zt.some(e=>e===n.configurationType),xa=e=>{let t=[];if(!e)return[];for(let[n,r]of Object.entries(e))n===`universalIdentifier`&&typeof r==`string`&&t.push(r),!(n===`postInstallLogicFunction`||n===`preInstallLogicFunction`||n===`uninstallLogicFunction`||n===`healthCheckLogicFunction`||n===`identifyAccountLogicFunction`||n===`onConnectLogicFunction`||n===`onDisconnectLogicFunction`||n===`settingsFrontComponent`||n===`input`||n===`expectedBody`||n===`outputSchema`||n===`expectedOutputSchema`)&&typeof r==`object`&&t.push(...xa(r));return t},Sa=e=>{let n=[];for(let r of e){if(!pa(r))continue;let e=r.universalSettings;if(!e?.relationType){n.push(`Relation field "${r.name}" is missing relationType. ${r.type} fields must declare a relationType (${va.join(` or `)}) in universalSettings.`);continue}if(!va.includes(e.relationType)){n.push(`Relation field "${r.name}" has invalid relationType "${e.relationType}". Expected ${va.join(` or `)}.`);continue}e.relationType===t.yt.MANY_TO_ONE&&!e.joinColumnName&&n.push(`MANY_TO_ONE relation field "${r.name}" is missing joinColumnName. MANY_TO_ONE relations must declare a joinColumnName in universalSettings.`)}return n},Ca=e=>{let t=e.pageLayouts.flatMap(e=>e.tabs?.flatMap(e=>e.widgets??[])??[]),n=e.pageLayoutTabs.flatMap(e=>e.widgets??[]);return[...t,...n,...e.pageLayoutWidgets??[]]},wa=e=>{let t=[];for(let n of e){let e=n.configuration;if(ba(e)&&!(0,i.isNonEmptyString)(e.aggregateFieldMetadataUniversalIdentifier)){let r=ya in e?` Reference the aggregate field with "aggregateFieldMetadataUniversalIdentifier" (not "${ya}").`:``;t.push(`Graph widget "${n.title}" is missing aggregateFieldMetadataUniversalIdentifier.${r}`)}}return t},Ta=({pageLayoutTab:e,pageLayoutType:n})=>{let r=t.v({pageLayoutTabManifest:e,pageLayoutType:n});return r.status===`fail`?r.errors:[]},Ea=t=>{let n=new Map(t.pageLayouts.map(e=>[e.universalIdentifier,e.type])),r=t.pageLayouts.flatMap(e=>(e.tabs??[]).flatMap(t=>Ta({pageLayoutTab:t,pageLayoutType:e.type}))),i=t.pageLayoutTabs.flatMap(t=>Ta({pageLayoutTab:t,pageLayoutType:e.t(t.pageLayoutUniversalIdentifier)?n.get(t.pageLayoutUniversalIdentifier):void 0}));return[...r,...i]},Da=e=>{let n=[],r=new Set;for(let i of e)if(!r.has(i)){if(r.add(i),!(0,a.validate)(i)){n.push(`Universal identifier "${i}" is not a valid UUID.`);continue}if(!t.x(i)){let e=(0,a.version)(i);n.push(`Universal identifier "${i}" is UUID version ${e}. Only UUID version 4 or higher is allowed.`)}}return n},Oa=e=>{let t=[],n=Ca(e),r=[...ga(e),...ha({manifest:e,pageLayoutWidgets:n})],i=xa(e),a=ma(i);a.length>0&&t.push(`Duplicate universal identifiers: ${a.join(`, `)}`);let o=Da(i);o.length>0&&t.push(`Invalid universal identifiers: ${o.join(`, `)}`);let s=[...e.fields,...e.objects.flatMap(e=>e.fields)];return t.push(...Sa(s)),t.push(...Ea(e)),t.push(...wa(n)),t.push(..._a(e)),{errors:t,warnings:r,isValid:t.length===0}},ka={"twenty-sdk":`"twenty-sdk" is listed under "dependencies" in package.json. It is a build-time only tool and should be moved to "devDependencies".`,"twenty-client-sdk":`"twenty-client-sdk" is listed under "dependencies" in package.json. It is provided at runtime by Twenty's injected SDK and should be moved to "devDependencies".`},Aa=async t=>{let n=r.default.join(t,`package.json`);if(!await S(n))return[];let i=await D(n);return Object.entries(ka).filter(([t])=>e.t(i.dependencies?.[t])).map(([,e])=>e)},ja=async e=>await S(e)&&(await(0,s.stat)(e)).size===0?[`yarn.lock is empty. Run "yarn install" to regenerate it before building.`]:[],Ma=e=>ja(r.default.join(e,`yarn.lock`)),Na=async e=>{let t=await da(e);if(t.errors.length>0||!t.manifest)return{success:!1,errors:t.errors.length>0?t.errors:[`Failed to build manifest.`]};let n=Oa(t.manifest);if(!n.isValid)return{success:!1,errors:n.errors};let r=await Ma(e);if(r.length>0)return{success:!1,errors:r};let i=await Aa(e);return{success:!0,manifest:t.manifest,filePaths:t.filePaths,warnings:[...t.warnings,...n.warnings,...i]}},Pa=({manifest:n,builtFileInfos:i,outputDir:a=t.E})=>{let o=structuredClone(n);for(let[n,{fileFolder:s,checksum:c}]of i.entries()){let l=(0,r.relative)(a,n);if(s===t.ht.BuiltLogicFunction){let e=o.logicFunctions,t=e.findIndex(e=>e.builtHandlerPath===l);if(t===-1)continue;o={...o,logicFunctions:e.map((e,n)=>n===t?{...e,builtHandlerChecksum:c}:e)}}if(s===t.ht.PublicAsset){let e=o.publicAssets,t=e.findIndex(e=>e.filePath===l);if(t===-1)continue;o={...o,publicAssets:e.map((e,n)=>n===t?{...e,checksum:c}:e)};continue}if(s===t.ht.BuiltFrontComponent){let t=o.application.frontComponentSharedDependencies;if(e.t(t)&&t.builtPath===l){o={...o,application:{...o.application,frontComponentSharedDependencies:{...t,builtChecksum:c}}};continue}let r=o.frontComponents,a=r.findIndex(e=>e.builtComponentPath===l)??-1;if(a===-1)continue;let s=i.get(n);o={...o,frontComponents:r.map((e,t)=>t===a?{...e,builtComponentChecksum:c,usesSdkClient:s?.usesSdkClient??!1}:e)}}s===t.ht.Dependencies&&(l===`package.json`&&(o.application.packageJsonChecksum=c),l===`yarn.lock`&&(o.application.yarnLockChecksum=c))}return o},Fa=async({appPath:e,manifest:n,relativeOutputDir:i=t.E})=>{let a=r.default.join(e,i);await w(a);let o=r.default.join(a,`manifest.json`);return await ie(o,n),o},Ia=e=>Object.prototype.hasOwnProperty.call(t.rt,e),La=async({filePath:t,onWarning:n})=>{let i;try{i=await D(t)}catch{return n(`Skipping translation file "${r.default.basename(t)}": it is not valid JSON.`),null}return!e.t(i)||typeof i!=`object`||Array.isArray(i)?(n(`Skipping translation file "${r.default.basename(t)}": expected a JSON object.`),null):i},Ra=async({appPath:e,onWarning:t})=>{let n=r.default.join(e,Fr);if(!await S(n))return{};let i={};for(let e of(await(0,s.readdir)(n)).filter(e=>e.endsWith(`.json`))){let a=r.default.basename(e,`.json`);if(a===`en`)continue;if(!Ia(a)){t(`Skipping compiled translation file "${e}": "${a}" is not a supported locale.`);continue}let o=await La({filePath:r.default.join(n,e),onWarning:t});if(o===null)continue;let s=Object.fromEntries(Object.entries(o).filter(e=>typeof e[1]==`string`&&e[1].length>0));Object.keys(s).length>0&&(i[a]=s)}return i},za=async({appPath:e,onWarning:t=e=>console.warn(e)})=>{let n=r.default.join(e,Pr);if(!await S(n))return;let i=(await(0,s.readdir)(n)).filter(e=>e.endsWith(`.json`)),a={};for(let e of i){let i=r.default.basename(e,`.json`);if(i===`en`)continue;if(!Ia(i)){t(`Skipping translation file "${e}": "${i}" is not a supported locale.`);continue}let o=await La({filePath:r.default.join(n,e),onWarning:t});if(o===null)continue;let s=Nr({catalog:o,onCollision:({messageId:n,keptKey:r,droppedKey:i})=>t(`Message id collision in "${e}": "${r}" and "${i}" share id "${n}". Keeping "${r}".`)});Object.keys(s).length>0&&(a[i]=s)}for(let[n,r]of Object.entries(await Ra({appPath:e,onWarning:t})))a[n]={...r,...a[n]??{}};return a},Ba=async({appPath:e,outputDir:r=t.E,dereferenceSymlinks:i=!1,onProgress:a,onTranslationWarning:o,signal:s,typecheck:c=n.t})=>{let l=[],u=e=>{l.push({severity:`warning`,code:`BUILD_WARNING`,message:e}),a?.(`⚠ ${e}`)};s?.throwIfAborted(),a?.(`Building manifest...`);let d=await Na(e);if(!d.success)return{success:!1,error:{code:`MANIFEST_BUILD_FAILED`,message:d.errors.join(`
46
+ `)),U(s)&&Gn.test(s)?Kn(s):U(s)?s:Xn(s,this._locale,this._locales)(t,n?.formats)}date(e,t){return zn(this._locales||this._locale,e,t)}number(e,t){return Vn(this._locales||this._locale,e,t)}};function ir(e={}){return new rr(e)}ir();function ar(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`}function or(e,...t){if(!ar(e))throw Error(`Uint8Array expected`);if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length `+t+`, got length=`+e.length)}function sr(e,t=!0){if(e.destroyed)throw Error(`Hash instance has been destroyed`);if(t&&e.finished)throw Error(`Hash#digest() has already been called`)}function cr(e,t){or(e);let n=t.outputLen;if(e.length<n)throw Error(`digestInto() expects output buffer of length at least `+n)}function lr(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function ur(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function G(e,t){return e<<32-t|e>>>t}function dr(e){if(typeof e!=`string`)throw Error(`string expected`);return new Uint8Array(new TextEncoder().encode(e))}function fr(e){return typeof e==`string`&&(e=dr(e)),or(e),e}var pr=class{};function mr(e){let t=t=>e().update(fr(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function hr(e,t,n,r){if(typeof e.setBigUint64==`function`)return e.setBigUint64(t,n,r);let i=BigInt(32),a=BigInt(4294967295),o=Number(n>>i&a),s=Number(n&a),c=r?4:0,l=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+l,s,r)}function gr(e,t,n){return e&t^~e&n}function _r(e,t,n){return e&t^e&n^t&n}var vr=class extends pr{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=ur(this.buffer)}update(e){sr(this),e=fr(e),or(e);let{view:t,buffer:n,blockLen:r}=this,i=e.length;for(let a=0;a<i;){let o=Math.min(r-this.pos,i-a);if(o===r){let t=ur(e);for(;r<=i-a;a+=r)this.process(t,a);continue}n.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){sr(this),cr(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,lr(this.buffer.subarray(a)),this.padOffset>r-a&&(this.process(n,0),a=0);for(let e=a;e<r;e++)t[e]=0;hr(n,r-8,BigInt(this.length*8),i),this.process(n,0);let o=ur(e),s=this.outputLen;if(s%4)throw Error(`_sha2: outputLen should be aligned to 32bit`);let c=s/4,l=this.get();if(c>l.length)throw Error(`_sha2: outputLen bigger than state`);for(let e=0;e<c;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:o}=this;return e.destroyed=a,e.finished=i,e.length=r,e.pos=o,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}},K=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),yr=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),q=new Uint32Array(64),br=class extends vr{constructor(e=32){super(64,e,8,!1),this.A=K[0]|0,this.B=K[1]|0,this.C=K[2]|0,this.D=K[3]|0,this.E=K[4]|0,this.F=K[5]|0,this.G=K[6]|0,this.H=K[7]|0}get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:o,H:s}=this;return[e,t,n,r,i,a,o,s]}set(e,t,n,r,i,a,o,s){this.A=e|0,this.B=t|0,this.C=n|0,this.D=r|0,this.E=i|0,this.F=a|0,this.G=o|0,this.H=s|0}process(e,t){for(let n=0;n<16;n++,t+=4)q[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=q[e-15],n=q[e-2],r=G(t,7)^G(t,18)^t>>>3;q[e]=(G(n,17)^G(n,19)^n>>>10)+q[e-7]+r+q[e-16]|0}let{A:n,B:r,C:i,D:a,E:o,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){let t=G(o,6)^G(o,11)^G(o,25),u=l+t+gr(o,s,c)+yr[e]+q[e]|0,d=(G(n,2)^G(n,13)^G(n,22))+_r(n,r,i)|0;l=c,c=s,s=o,o=a+u|0,a=i,i=r,r=n,n=u+d|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,a=a+this.D|0,o=o+this.E|0,s=s+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(n,r,i,a,o,s,c,l)}roundClean(){lr(q)}destroy(){this.set(0,0,0,0,0,0,0,0),lr(this.buffer)}},xr=mr(()=>new br),Sr=``,Cr=5e4,wr=new Map,Tr=e=>typeof Buffer<`u`?Buffer.from(e).toString(`base64`):btoa(String.fromCharCode(...e)),Er=(t,n=``)=>{let r=t+Sr+(n||``),i=wr.get(r);if(e.t(i))return i;let a=Tr(xr(dr(r))).slice(0,6);return wr.size>=Cr&&wr.clear(),wr.set(r,a),a},Dr=(e,t)=>`${e}.${t}`,Or=[`objectLabel`,`objectLabelSingular`,`objectLabelPlural`,`objectIcon`],kr=e=>`{${e}}`;Object.fromEntries(Or.map(e=>[e,kr(e)]));var Ar={objectMetadata:[`labelSingular`,`labelPlural`,`description`],fieldMetadata:[`label`,`description`],view:[`name`],viewFieldGroup:[`name`],pageLayout:[`name`],pageLayoutTab:[`title`],pageLayoutWidget:[`title`],commandMenuItem:[`label`,`shortLabel`],navigationMenuItem:[`name`],timelineActivityType:[`label`],settingsMenuItem:[`title`],skill:[`label`,`description`]},jr=t=>{let n=[];for(let[r,i]of Object.entries(t)){if(typeof i==`string`){n.push({message:r,translation:i});continue}if(e.t(i)&&typeof i==`object`)for(let[e,t]of Object.entries(i))typeof t==`string`&&n.push({message:e,context:r,translation:t})}return n},Mr=t=>{let n={},r=[...t].sort((e,t)=>(e.context??``).localeCompare(t.context??``)||e.message.localeCompare(t.message));for(let{message:t,context:i,translation:a}of r){if(!e.t(i)){n[t]=a;continue}let r=n[i];typeof r==`object`&&e.t(r)?r[t]=a:n[i]={[t]:a}}return n},Nr=({catalog:t,onCollision:n})=>{let r={},i=new Map;for(let{message:a,context:o,translation:s}of jr(t)){if(s.length===0)continue;let t=e.t(o)?`${o} ${a}`:a,c=Er(a,o),l=i.get(c);e.t(l)&&l!==t&&n?.({messageId:c,keptKey:t,droppedKey:l}),i.set(c,t),r[c]=s}return r},Pr=`locales`,Fr=l.posix.join(Pr,`compiled`),Ir=e=>Object.prototype.hasOwnProperty.call(t.rt,e),Lr=async e=>{let t=r.default.join(e,Pr);if(!await S(t))return{};let n=(await(0,s.readdir)(t)).filter(e=>e.endsWith(`.json`)),i={};for(let e of n){let n=r.default.basename(e,`.json`);if(n===`en`||!Ir(n))continue;let a=Nr({catalog:await D(r.default.join(t,e))??{}});Object.keys(a).length>0&&(i[n]=a)}return i},Rr=`__twentySdkFrontComponentTranslations__`,zr=async n=>{let i=n.outputDir??`.twenty/output`,a=(0,r.join)(n.appPath,i);await w(a),await ne(a);let o=new Map,s=e=>{o.set(e.builtPath,{checksum:e.checksum,builtPath:e.builtPath,sourcePath:e.sourcePath,fileFolder:e.fileFolder,usesSdkClient:e.usesSdkClient})},{logicFunctions:c,frontComponents:l}=n.filePaths,u=n.manifest.application.frontComponentSharedDependencies,d=await Lr(n.appPath),f=Object.keys(d).length?{js:`globalThis[${JSON.stringify(Rr)}]=${JSON.stringify(d)};`}:void 0;await ce({appPath:n.appPath,sourcePaths:c,fileFolder:t.St.BuiltLogicFunction,buildOptions:{bundle:!0,splitting:!1,format:`esm`,platform:`node`,outdir:a,outExtension:{".js":`.mjs`},external:Xt,tsconfig:(0,r.join)(n.appPath,`tsconfig.json`),sourcemap:!0,metafile:!0,logLevel:`silent`,banner:t.b,plugins:[Ut()]},onFileBuilt:s});let p=e.t(u)?await un({appPath:n.appPath,outputDir:i,sharedDependencies:u,onFileBuilt:s}):null;await ce({appPath:n.appPath,sourcePaths:l,fileFolder:t.St.BuiltFrontComponent,buildOptions:{...en(),outdir:a,tsconfig:(0,r.join)(n.appPath,`tsconfig.json`),jsx:`automatic`,sourcemap:!0,metafile:!0,logLevel:`silent`,...f===void 0?{}:{banner:f},plugins:[...t.t({getSharedDependenciesBuildContext:()=>p}),Ut()]},onFileBuilt:s}),await Vr({appPath:n.appPath,fileFolder:t.St.Source,filePaths:[...new Set([...c,...l])],collectFileBuilt:s,outputDir:i,dereferenceSymlinks:n.dereferenceSymlinks}),await Vr({appPath:n.appPath,fileFolder:t.St.PublicAsset,filePaths:n.filePaths.publicAssets,collectFileBuilt:s,outputDir:i,dereferenceSymlinks:n.dereferenceSymlinks}),await Vr({appPath:n.appPath,fileFolder:t.St.Dependencies,filePaths:[`package.json`,`yarn.lock`].filter(e=>C((0,r.join)(n.appPath,e))),collectFileBuilt:s,outputDir:i,dereferenceSymlinks:n.dereferenceSymlinks});for(let e of n.generatedAssets??[])await Br({appPath:n.appPath,generatedAsset:e,outputDir:i,collectFileBuilt:s});return await oe({appPath:n.appPath,relativeOutputDir:i,dereferenceSymlinks:n.dereferenceSymlinks}),{builtFileInfos:o}},Br=async({appPath:e,generatedAsset:n,outputDir:i,collectFileBuilt:a})=>{let c=(0,r.join)(i,n.relativePath),l=(0,r.join)(e,c);await w((0,r.dirname)(l)),await(0,s.writeFile)(l,n.content);let u=o.default.createHash(`md5`).update(n.content).digest(`hex`);a({fileFolder:t.St.PublicAsset,builtPath:c,sourcePath:n.relativePath,checksum:u})},Vr=async({appPath:e,fileFolder:t,filePaths:n,outputDir:i,dereferenceSymlinks:a=!1,collectFileBuilt:c})=>{for(let l of n){let n=(0,r.join)(e,l);if(!await S(n))continue;let u=(0,r.join)(i,l),d=(0,r.join)(e,u);await w((0,r.dirname)(d)),await O({sourcePath:n,destinationPath:d,dereferenceSymlinks:a});let f=await(0,s.readFile)(d);c({fileFolder:t,builtPath:u,sourcePath:l,checksum:o.default.createHash(`md5`).update(f).digest(`hex`)})}},Hr=`M6.822 14.174c0-2.435 1.996-4.411 4.456-4.411h8.574c.125 0 .241.075.293.19a.31.31 0 0 1-.056.344l-1.88 2.023c-.326.35-.787.552-1.27.552H11.3c-.738 0-1.338.594-1.338 1.325v3.336a.78.78 0 0 1-.783.777H7.61a.78.78 0 0 1-.783-.777v-3.36zM33.5 25.553c0 2.434-1.996 4.411-4.456 4.411h-3.642c-2.46 0-4.454-1.977-4.454-4.411v-6.315c0-.43.16-.842.456-1.16l2.124-2.285a.33.33 0 0 1 .355-.081.32.32 0 0 1 .205.295v9.527c0 .73.598 1.322 1.337 1.322h3.6a1.33 1.33 0 0 0 1.337-1.322V14.197c0-.73-.599-1.325-1.337-1.325H24.84c-.481 0-.938.201-1.265.547L11.088 26.856h7.503a.78.78 0 0 1 .784.778v1.552a.78.78 0 0 1-.784.778H8.481a1.655 1.655 0 0 1-1.662-1.644v-.824c0-.412.156-.809.44-1.114l13.999-15.06a4.9 4.9 0 0 1 3.594-1.56h4.189c2.46 0 4.454 1.977 4.454 4.412v11.379z`,Ur=async()=>`data:image/png;base64,${(await(0,s.readFile)((0,l.join)(__dirname,`assets`,`halftone-backdrop.png`))).toString(`base64`)}`,Wr=1388,Gr=858,J=156,Kr=16,Y=351,qr=434,Jr=798,Yr=Wr/2,Xr=Gr/2,Zr=19,Qr=8,$r=`#b3b3b3`,ei=J/40,ti=async({logoBuffer:e})=>{let t=`data:image/png;base64,${(await(0,f.default)(e).resize(J,J,{fit:`cover`,position:`centre`}).png().toBuffer()).toString(`base64`)}`,n=await Ur(),r=[`<svg xmlns="http://www.w3.org/2000/svg" width="${Wr}" height="${Gr}" viewBox="0 0 ${Wr} ${Gr}">`,`<image href="${n}" x="0" y="0" width="${Wr}" height="${Gr}" preserveAspectRatio="none" />`,`<defs>`,`<filter id="tileShadow" x="-40%" y="-40%" width="180%" height="180%">`,`<feDropShadow dx="0" dy="6" stdDeviation="10" flood-color="#0b0b0f" flood-opacity="0.14" />`,`</filter>`,`<clipPath id="leftLogoClip"><rect x="${qr}" y="${Y}" width="${J}" height="${J}" rx="${Kr}" /></clipPath>`,`</defs>`,`<g filter="url(#tileShadow)">`,`<rect x="${qr}" y="${Y}" width="${J}" height="${J}" rx="${Kr}" fill="#ffffff" />`,`<rect x="${Jr}" y="${Y}" width="${J}" height="${J}" rx="${Kr}" fill="#000000" />`,`</g>`,`<image href="${t}" x="${qr}" y="${Y}" width="${J}" height="${J}" preserveAspectRatio="xMidYMid slice" clip-path="url(#leftLogoClip)" />`,`<rect x="${qr}" y="${Y}" width="${J}" height="${J}" rx="${Kr}" fill="none" stroke="#000000" stroke-opacity="0.08" stroke-width="1" />`,`<g transform="translate(${Jr} ${Y}) scale(${ei})"><path d="${Hr}" fill="#ffffff" /></g>`,`<line x1="${Yr-Zr}" y1="${Xr-Zr}" x2="713" y2="448" stroke="${$r}" stroke-width="${Qr}" stroke-linecap="round" />`,`<line x1="${Yr-Zr}" y1="448" x2="713" y2="${Xr-Zr}" stroke="${$r}" stroke-width="${Qr}" stroke-linecap="round" />`,`</svg>`].join(``);return(0,f.default)(Buffer.from(r)).png().toBuffer()},X=`${t.h}/cover.generated.png`,ni=e=>e.startsWith(`http://`)||e.startsWith(`https://`),ri=async({appPath:t,manifest:n})=>{let{logo:i,galleryImages:a}=n.application;if(!e.t(i)||ni(i)||(a??[]).length>0)return{manifest:n,generatedAssets:[]};let o=(0,r.join)(t,i);if(!await S(o))return{manifest:n,generatedAssets:[]};let c=await ti({logoBuffer:await(0,s.readFile)(o)}),l={filePath:X,fileName:(0,r.basename)(X),fileType:(0,r.extname)(X).replace(/^\./,``),checksum:null},u=[...n.publicAssets.filter(e=>e.filePath!==X),l];return{manifest:{...n,application:{...n.application,galleryImages:[X]},publicAssets:u},generatedAssets:[{relativePath:X,content:c}]}},Z=function(e){return e.DefineApplication=`defineApplication`,e.DefineApplicationRole=`defineApplicationRole`,e.DefineField=`defineField`,e.DefineIndex=`defineIndex`,e.DefineLogicFunction=`defineLogicFunction`,e.DefinePostInstallLogicFunction=`definePostInstallLogicFunction`,e.DefinePreInstallLogicFunction=`definePreInstallLogicFunction`,e.DefineUninstallLogicFunction=`defineUninstallLogicFunction`,e.DefineHealthCheck=`defineHealthCheck`,e.DefineObject=`defineObject`,e.DefinePermissionFlag=`definePermissionFlag`,e.DefineRole=`defineRole`,e.DefineSkill=`defineSkill`,e.DefineAgent=`defineAgent`,e.DefineWorkflow=`defineWorkflow`,e.DefineConnectionProvider=`defineConnectionProvider`,e.DefineFrontComponent=`defineFrontComponent`,e.DefineSettingsFrontComponent=`defineSettingsFrontComponent`,e.DefineView=`defineView`,e.DefineViewField=`defineViewField`,e.DefineNavigationMenuItem=`defineNavigationMenuItem`,e.DefinePageLayout=`definePageLayout`,e.DefinePageLayoutTab=`definePageLayoutTab`,e.DefinePageLayoutWidget=`definePageLayoutWidget`,e.DefineCommandMenuItem=`defineCommandMenuItem`,e.DefineTimelineActivityType=`defineTimelineActivityType`,e.DefineSettingsMenuItem=`defineSettingsMenuItem`,e}({}),Q=function(e){return e.Application=`application`,e.Fields=`fields`,e.Indexes=`indexes`,e.LogicFunctions=`logicFunctions`,e.Objects=`objects`,e.PermissionFlags=`permissionFlags`,e.Roles=`roles`,e.Skills=`skills`,e.Agents=`agents`,e.Workflows=`workflows`,e.ConnectionProviders=`connectionProviders`,e.FrontComponents=`frontComponents`,e.PublicAssets=`publicAssets`,e.Views=`views`,e.ViewFields=`viewFields`,e.NavigationMenuItems=`navigationMenuItems`,e.PageLayouts=`pageLayouts`,e.PageLayoutTabs=`pageLayoutTabs`,e.PageLayoutWidgets=`pageLayoutWidgets`,e.CommandMenuItems=`commandMenuItems`,e.TimelineActivityTypes=`timelineActivityTypes`,e.SettingsMenuItems=`settingsMenuItems`,e}({}),ii={defineApplication:`application`,defineApplicationRole:`roles`,defineField:`fields`,defineIndex:`indexes`,defineLogicFunction:`logicFunctions`,definePostInstallLogicFunction:`logicFunctions`,definePreInstallLogicFunction:`logicFunctions`,defineUninstallLogicFunction:`logicFunctions`,defineHealthCheck:`logicFunctions`,defineObject:`objects`,definePermissionFlag:`permissionFlags`,defineRole:`roles`,defineSkill:`skills`,defineAgent:`agents`,defineWorkflow:`workflows`,defineConnectionProvider:`connectionProviders`,defineFrontComponent:`frontComponents`,defineSettingsFrontComponent:`frontComponents`,defineView:`views`,defineViewField:`viewFields`,defineNavigationMenuItem:`navigationMenuItems`,definePageLayout:`pageLayouts`,definePageLayoutTab:`pageLayoutTabs`,definePageLayoutWidget:`pageLayoutWidgets`,defineCommandMenuItem:`commandMenuItems`,defineTimelineActivityType:`timelineActivityTypes`,defineSettingsMenuItem:`settingsMenuItems`},ai=e=>{if(!p.isCallExpression(e))return;let t=e.expression;if(p.isIdentifier(t)&&Object.values(Z).includes(t.text))return t.text},oi=e=>{let t=p.createSourceFile(`temp.ts`,e,p.ScriptTarget.Latest,!0),n=[];p.forEachChild(t,e=>{n.push(e)});for(let e of n)if(p.isExportAssignment(e)){if(e.isExportEquals||!e.expression)return;let t=ai(e.expression);if(t)return t}},si=[[/\bfavoriteRecordIds\.length\b/g,`arrayLength(favoriteRecordIds)`],[/\bselectedRecords\.length\b/g,`arrayLength(selectedRecords)`]],ci=e=>si.reduce((e,[t,n])=>e.replace(t,n),e.replace(/!==/g,`!=`).replace(/===/g,`==`).replace(/&&/g,`and`).replace(/\|\|/g,`or`).replace(/!(?!=)/g,`not `).replace(/,(\s*\))/g,`$1`)),li=/(conditionalAvailabilityExpression\s*:\s*)(?!['"`])((?:[^,}()]|\([^()]*\))+)/g,ui=e=>e.replace(li,(e,t,n)=>t+JSON.stringify(ci(n.trim()))),di={name:`conditional-availability-transform`,setup:e=>{e.onLoad({filter:/\.tsx?$/},async e=>{let t=await m.readFile(e.path,`utf8`);if(!t.includes(`conditionalAvailabilityExpression`))return null;let n=ui(t);return n===t?null:{contents:n,loader:e.path.endsWith(`.tsx`)?`tsx`:`ts`}})}},fi=new Map,pi=(t,n)=>{let r=(0,h.createHash)(`sha1`).update(t).digest(`hex`),i=fi.get(n);if(e.t(i)&&i.outputHash===r)return i.wrapper;let a=_.default.compileFunction(t,[`exports`,`require`,`module`,`__filename`,`__dirname`],{filename:n});return fi.set(n,{outputHash:r,wrapper:a}),a},mi=[`twenty-ui`,`twenty-client-sdk/core`,`twenty-client-sdk/metadata`],hi=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),gi={name:`manifest-mock`,setup:e=>{let t=mi.map(hi),n=RegExp(`^(${t.join(`|`)})(/.*)?$`);e.onResolve({filter:n},({path:e})=>e.endsWith(`.css`)?null:{path:e,namespace:`manifest-mock`}),e.onLoad({filter:/.*/,namespace:`manifest-mock`},()=>({contents:`module.exports = new Proxy({}, { get: () => () => {} });`,loader:`js`}))}},$=async({filePath:e,appPath:t})=>vi(await _i({filePath:e,appPath:t}),e),_i=async({filePath:e,appPath:t})=>{let n=r.default.join(t,`tsconfig.json`),i=await S(n),a=(0,g.createRequire)(r.default.join(t,`package.json`)),o,s;try{o=r.default.dirname(a.resolve(`react/package.json`)),s=r.default.dirname(a.resolve(`react-dom/package.json`))}catch{}let c=(await u.build({entryPoints:[e],bundle:!0,write:!1,format:`cjs`,platform:`node`,target:`node18`,jsx:`automatic`,tsconfig:i?n:void 0,loader:{".css":`empty`},alias:{...o&&{react:o},...s&&{"react-dom":s}},plugins:[di,gi],logLevel:`silent`})).outputFiles[0].text,l=pi(c,e),d={exports:{}};return l(d.exports,a,d,e,r.default.dirname(e)),d.exports},vi=(n,r)=>{if(e.t(n.default)&&t.at(n.default))return n.default;throw Error(`Config file ${r} must export a config object default export`)},yi=`a80ff791-b940-4c47-a522-2bb478515415`,bi=e=>e.type!==t.Rt.SELECT&&e.type!==t.Rt.MULTI_SELECT||e.options===void 0||e.options===null?e:{...e,options:e.options.map(t=>({...t,id:t.id??(0,a.v5)(`${t.label}-${e.universalIdentifier}`,yi)}))},xi=({roleConfig:e,applicationUniversalIdentifier:n})=>({...e,objectPermissions:(e.objectPermissions??[]).map(r=>({...r,universalIdentifier:r.universalIdentifier??t.N({applicationUniversalIdentifier:n,roleUniversalIdentifier:e.universalIdentifier,objectUniversalIdentifier:r.objectUniversalIdentifier})})),fieldPermissions:(e.fieldPermissions??[]).map(r=>({...r,universalIdentifier:r.universalIdentifier??t.S({applicationUniversalIdentifier:n,roleUniversalIdentifier:e.universalIdentifier,fieldUniversalIdentifier:r.fieldUniversalIdentifier})})),rowLevelPermissionPredicateGroups:e.rowLevelPermissionPredicateGroups??[],rowLevelPermissionPredicates:e.rowLevelPermissionPredicates??[],permissionFlagUniversalIdentifiers:e.permissionFlagUniversalIdentifiers??[]}),Si=({objectConfig:e,applicationUniversalIdentifier:n})=>({name:`name`,label:`Name`,description:`Name`,icon:`IconAbc`,isNullable:!0,defaultValue:null,type:t.Rt.TEXT,universalIdentifier:t.L({applicationUniversalIdentifier:n,objectUniversalIdentifier:e.universalIdentifier,name:`name`})}),Ci=({objectConfig:e,applicationUniversalIdentifier:t})=>{let n=(e.fields??[]).map(e=>e.name),r=[...e.fields],i=Si({objectConfig:e,applicationUniversalIdentifier:t}),a=vt({fields:e.fields,labelIdentifierFieldMetadataUniversalIdentifier:e.labelIdentifierFieldMetadataUniversalIdentifier});return!n.includes(i.name)&&!a&&r.push(i),{objectFields:r}},wi=e=>{let t=new Set(e);return t.has(`react`)&&t.add(`react/jsx-runtime`),[...t].sort()},Ti=[`twenty-client-sdk`,`twenty-sdk`],Ei=e=>{let t=[],n=new Set;for(let r of e){if(!(0,i.isNonEmptyString)(r)){t.push(`"frontComponentSharedDependencies" entries in package.json must be non-empty strings`);continue}if(r.startsWith(`.`)||r.startsWith(`/`)){t.push(`Shared dependency "${r}" must be a package specifier, not a relative or absolute path`);continue}if(r===`twenty:front-component-shared-dependencies`){t.push(`Shared dependency "${r}" is reserved and cannot be shared`);continue}if(Ti.some(e=>r===e||r.startsWith(`${e}/`))){t.push(`Shared dependency "${r}" is already served separately and cannot be shared`);continue}if(n.has(r)){t.push(`Shared dependency "${r}" is declared twice`);continue}n.add(r)}return t},Di=async e=>{let n=r.default.join(e,`package.json`);if(!await S(n))return{errors:[]};let a=(await D(n)).frontComponentSharedDependencies;if(a===void 0)return{errors:[]};if(!Array.isArray(a))return{errors:[`"frontComponentSharedDependencies" in package.json must be an array of package specifiers`]};if(!(0,i.isNonEmptyArray)(a))return{errors:[]};let o=Ei(a);return(0,i.isNonEmptyArray)(o)?{errors:o}:{sharedDependencies:{dependencies:wi(a),builtPath:t.A,builtChecksum:null},errors:[]}},Oi=`pageType.isInSidePanel.isDashboardPageLayoutInEditMode.isLayoutCustomizationModeEnabled.favoriteRecordIds.isSelectAll.hasAnySoftDeleteFilterOnView.numberOfSelectedRecords.objectPermissions.selectedRecords.featureFlags.targetObjectReadPermissions.targetObjectWritePermissions.canImpersonate.canAccessFullAdminPanel.objectMetadataItem.objectMetadataLabel.isDefined.isNonEmptyString.includes.every.everyDefined.everyEquals.some.someDefined.someEquals.none.noneDefined.noneEquals.someNonEmptyString.includesEvery`.split(`.`),ki=`conditionalAvailabilityExpression`,Ai=[`twenty-sdk/define`,`twenty-sdk`],ji=new Set(Oi),Mi=t=>{let n=[];for(let r of t.statements){if(!p.default.isImportDeclaration(r)||!p.default.isStringLiteral(r.moduleSpecifier)||!Ai.includes(r.moduleSpecifier.text))continue;let i=r.importClause;if(!e.t(i)||i.phaseModifier===p.default.SyntaxKind.TypeKeyword)continue;let a=i.namedBindings;if(e.t(a)){if(p.default.isNamespaceImport(a)){let e=a.name.text,r=t=>{p.default.isPropertyAccessExpression(t)&&p.default.isIdentifier(t.expression)&&t.expression.text===e&&ji.has(t.name.text)&&n.push({importedName:t.name.text,node:t}),p.default.forEachChild(t,r)};r(t);continue}if(p.default.isNamedImports(a))for(let e of a.elements){if(e.isTypeOnly)continue;let t=(e.propertyName??e.name).text;ji.has(t)&&n.push({importedName:t,node:e})}}}return n},Ni=e=>{let t=!1,n=e=>{if(!t){if((p.default.isPropertyAssignment(e)||p.default.isShorthandPropertyAssignment(e))&&(p.default.isIdentifier(e.name)||p.default.isStringLiteral(e.name))&&e.name.text===ki){t=!0;return}p.default.forEachChild(e,n)}};return n(e),t},Pi=(e,t)=>{if(!Oi.some(t=>e.includes(t)))return[];let n=p.default.createSourceFile(t,e,p.default.ScriptTarget.Latest,!0,t.endsWith(`.tsx`)?p.default.ScriptKind.TSX:p.default.ScriptKind.TS),r=Mi(n);return r.length===0||Ni(n)?[]:r.map(({importedName:e,node:r})=>{let{line:i,character:a}=n.getLineAndCharacterOfPosition(r.getStart(n));return`${t}:${i+1}:${a+1} - "${e}" is a conditional-availability expression variable from twenty-sdk but this file has no ${ki}. These variables can only be used inside a command's ${ki}, not at runtime.`})},Fi={canReadObjectRecords:`read`,canUpdateObjectRecords:`update`,canSoftDeleteObjectRecords:`soft-delete`,canDestroyObjectRecords:`destroy`},Ii=Object.fromEntries(Object.entries(t.ct).map(([e,t])=>[t,e])),Li=Object.fromEntries(Object.entries(xt).map(([e,{universalIdentifier:t}])=>[t,e])),Ri=({grant:e,objects:t,permissionFlags:n})=>{let r=e=>t.find(t=>t.universalIdentifier===e)?.nameSingular??Li[e]??e;switch(e.type){case`ALL_OBJECT_RECORDS`:return`${Fi[e.action]} all object records`;case`ALL_SETTINGS`:return`update all settings`;case`ALL_TOOLS`:return`access all tools`;case`PERMISSION_FLAG`:return`permission flag ${n.find(t=>t.universalIdentifier===e.permissionFlagUniversalIdentifier)?.key??Ii[e.permissionFlagUniversalIdentifier]??e.permissionFlagUniversalIdentifier}`;case`OBJECT_RECORDS`:return`${Fi[e.action]} ${r(e.objectUniversalIdentifier)} records`;case`FIELD_VALUE`:return`${e.action===`canReadFieldValue`?`read`:`update`} field ${e.fieldUniversalIdentifier} of ${r(e.objectUniversalIdentifier)}`;case`ROW_LEVEL_RESTRICTION`:return`${r(e.objectUniversalIdentifier)} records without the row-level restriction`}},zi=e=>e.map(e=>`"${e}"`).join(`, `),Bi=({agents:t,defaultRoleUniversalIdentifier:n})=>{let r=new Map;for(let i of t)!e.t(i.roleUniversalIdentifier)||i.roleUniversalIdentifier===n||r.set(i.roleUniversalIdentifier,[...r.get(i.roleUniversalIdentifier)??[],i.name]);return r},Vi=({applicationRole:t,defaultRoleUniversalIdentifier:n})=>e.t(t)?[]:[`Application default role "${n}" is not defined by this application.`],Hi=({agentNamesByRoleUniversalIdentifier:e,roles:t})=>[...e].filter(([e])=>!t.some(t=>t.universalIdentifier===e)).map(([e,t])=>`Agent ${zi(t)} references role "${e}", which is not defined by this application.`),Ui=({agentNamesByRoleUniversalIdentifier:n,applicationRole:r,roles:i,objects:a,permissionFlags:o})=>{let s=o.filter(e=>(e.permissionType??`tool`)===`tool`).map(e=>e.universalIdentifier);return[...n].flatMap(([n,c])=>{let l=i.find(e=>e.universalIdentifier===n);if(!e.t(l))return[];let u=t.O({role:l,superset:r,toolPermissionFlagUniversalIdentifiers:s});if(u.length===0)return[];let d=u.map(e=>Ri({grant:e,objects:a,permissionFlags:o})).join(`, `);return[`Role "${l.label}" used by agent ${zi(c)} grants more than the application role "${r.label}": ${d}. The application role must cover every permission an agent role grants.`]})},Wi=({agents:t,roles:n,objects:r,permissionFlags:i,defaultRoleUniversalIdentifier:a})=>{let o=n.find(e=>e.universalIdentifier===a),s=Bi({agents:t,defaultRoleUniversalIdentifier:a});return[...Vi({applicationRole:o,defaultRoleUniversalIdentifier:a}),...Hi({agentNamesByRoleUniversalIdentifier:s,roles:n}),...e.t(o)?Ui({agentNamesByRoleUniversalIdentifier:s,applicationRole:o,roles:n,objects:r,permissionFlags:i}):[]]},Gi=({views:n,objects:r,fields:i})=>{let a=[],o=new Map;for(let e of i)o.set(e.universalIdentifier,e);for(let e of r)for(let t of e.fields)o.set(t.universalIdentifier,t);for(let r of n)for(let n of r.filters??[]){let r=o.get(n.fieldMetadataUniversalIdentifier);if(!e.t(r))continue;let i=r.type===t.Rt.RELATION?o.get(r.relationTargetFieldMetadataUniversalIdentifier)?.type??r.type:r.type;if(!(i in t.J))continue;let s=t.Q({filterType:i,subFieldName:n.subFieldName});s.includes(n.operand)||a.push(`Operand "${n.operand}" is not supported on field "${r.name}" (type "${i}"). Supported operands: ${s.join(`, `)}.`)}return a},Ki=(e=y)=>{try{let t=JSON.parse((0,c.readFileSync)((0,l.join)(e,`package.json`),`utf-8`)).engines?.twenty;return typeof t==`string`&&t.trim()!==``?t.trim():null}catch{return null}},qi=e=>(e?.type===`record`||e?.type===`object`)&&(0,i.isNonEmptyString)(e.objectUniversalIdentifier),Ji=(e,t)=>{let n=(0,i.isNonEmptyString)(e)?t?.(e):void 0;return`Id of the ${(0,i.isNonEmptyString)(n)?n:`linked`} record`},Yi=(t,n)=>{if(qi(t))return{type:`string`,description:Ji(t.objectUniversalIdentifier,n)};if(t.type===`records`)return{type:`array`,items:{type:`string`,description:Ji(t.objectUniversalIdentifier,n)}};let{objectUniversalIdentifier:r,multiline:a,label:o,items:s,properties:c,additionalProperties:l,...u}=t,d={...u};return e.t(s)&&(d.items=Yi(s,n)),e.t(c)&&(d.properties=Object.fromEntries(Object.entries(c).map(([e,t])=>[e,Yi(t,n)]))),e.t(l)&&(d.additionalProperties=(0,i.isObject)(l)?Yi(l,n):l),d},Xi={type:`object`,properties:{}},Zi=e=>{let t={type:`unknown`};switch(e.type){case`string`:t.type=`string`;break;case`number`:case`integer`:t.type=`number`;break;case`boolean`:t.type=`boolean`;break;case`array`:t.type=`array`,e.items&&(t.items=Zi(e.items));break;case`object`:t.type=`object`,e.properties&&(t.properties=Object.fromEntries(Object.entries(e.properties).map(([e,t])=>[e,Zi(t)])));break;case`record`:t.type=`record`;break;case`records`:t.type=`records`;break;default:t.type=`unknown`}return Array.isArray(e.enum)&&(t.enum=e.enum.filter(e=>typeof e==`string`)),e.multiline===!0&&(t.multiline=!0),(0,i.isNonEmptyString)(e.label)&&(t.label=e.label),(0,i.isNonEmptyString)(e.objectUniversalIdentifier)&&(t.objectUniversalIdentifier=e.objectUniversalIdentifier),t},Qi=e=>[Zi(e)];Qi({type:`object`,properties:{a:{type:`string`},b:{type:`number`}}});var $i=async t=>{let{getFunctionInputSchema:n}=await Promise.resolve().then(()=>require("./get-function-input-schema-GNk3NRLJ-_NPeFkfJ.js")),r=n(t)[0];return r?.type===`object`&&e.t(r.properties)?{type:`object`,properties:r.properties}:Xi},ea=t=>!e.t(t)||t===null?`unknown`:typeof t==`string`?`string`:typeof t==`number`?`number`:typeof t==`boolean`?`boolean`:Array.isArray(t)?`array`:`unknown`,ta=e=>e?Object.entries(e).reduce((e,[t,n])=>((0,i.isObject)(n)&&!Array.isArray(n)?e[t]={isLeaf:!1,type:`object`,label:t,value:ta(n)}:e[t]={isLeaf:!0,value:n,type:ea(n),label:t},e),{}):{},na=(e,t)=>e?`${e}.${t}`:t,ra=(t,n,r=``)=>{let i=[];for(let[a,o]of Object.entries(n)){let n=na(r,a),s=t[a];if(!e.t(s)){i.push(`Missing key "${n}" in declared output schema.`);continue}if(o.isLeaf!==s.isLeaf){i.push(`Type mismatch at "${n}": expected ${o.isLeaf?o.type:`object`} but declared ${s.isLeaf?s.type:`object`}.`);continue}if(!o.isLeaf&&!s.isLeaf){i.push(...ra(s.value,o.value,n));continue}o.isLeaf&&s.isLeaf&&o.type!==`unknown`&&s.type!==`unknown`&&o.type!==s.type&&i.push(`Type mismatch at "${n}": expected ${o.type} but declared ${s.type}.`)}return i},ia=[`string`,`number`,`boolean`,`array`,`unknown`],aa=e=>ia.includes(e),oa=(e,t)=>{let n=t.label??e;return t.type===`record`?{isLeaf:!0,type:`string`,label:n,value:null}:t.type===`records`?{isLeaf:!0,type:`array`,label:n,value:null}:t.type===`object`?{isLeaf:!1,type:`object`,label:n,value:(0,i.isObject)(t.properties)?sa(t.properties):{}}:{isLeaf:!0,type:aa(t.type)?t.type:`unknown`,label:n,value:null}},sa=e=>Object.entries(e).reduce((e,[t,n])=>(e[t]=oa(t,n),e),{}),ca=async e=>await(0,v.glob)([`**/*.ts`,`**/*.tsx`],{cwd:e,absolute:!0,ignore:[`**/node_modules/**`,`**/*.d.ts`,`**/dist/**`,`**/.twenty/**`],onlyFiles:!0}),la=async e=>await(0,v.glob)([`${t.h}/**/*`],{cwd:e,absolute:!0,onlyFiles:!0}),ua=async e=>{try{let t=await(0,s.readFile)((0,r.join)(e,`README.md`),`utf-8`);return t.trim().length>0?t:void 0}catch{return}},da=async n=>{let i=await ca(n),a=await ua(n),o=[],c=[],l,u=[],d=[],f=[],p=[],m=[],h=[],g=[],_=[],v=[],y=[],b=[],x=[],S=[],C=[],w=[],T=[],ee=[],te=[],ne=[],re=[],E=[],D=[],ie=[],O=[],k=[],ae=[],oe=[],se=[],A=[],ce=[],le=[],j=[],ue=[],de=[],fe=[],pe=[],me=[],he=[],ge=[],_e=[],ve=[],ye=[],be=[],xe=[],Se=[],Ce=[],we=[],Te=[],Ee=[],M=[],De=[];for(let e of i){let i=await(0,s.readFile)(e,`utf-8`),a=(0,r.relative)(n,e);o.push(...Pi(i,a));let f=oi(i);if(!f)continue;let g=ii[f];switch(g){case Q.Application:{let t=await $({appPath:n,filePath:e});l=t.config,o.push(...t.errors),c.push(...t.warnings??[]),ce.push(a);break}case Q.Objects:{let t=await $({appPath:n,filePath:e});u.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),le.push(a);break}case Q.Fields:{let t=await $({appPath:n,filePath:e}),r=bi(t.config);p.push(r),o.push(...t.errors),c.push(...t.warnings??[]),j.push(a);break}case Q.PermissionFlags:{let t=await $({appPath:n,filePath:e});h.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),de.push(a);break}case Q.Roles:{let t=await $({appPath:n,filePath:e});d.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),fe.push(a),f===Z.DefineApplicationRole&&A.push(t.config.universalIdentifier);break}case Q.Skills:{let t=await $({appPath:n,filePath:e});_.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),pe.push(a);break}case Q.Agents:{let t=await $({appPath:n,filePath:e});v.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),me.push(a);break}case Q.Workflows:{let t=await $({appPath:n,filePath:e});y.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),he.push(a);break}case Q.ConnectionProviders:{let t=await $({appPath:n,filePath:e});b.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),ge.push(a);break}case Q.LogicFunctions:{let t=await $({appPath:n,filePath:e});o.push(...t.errors),c.push(...t.warnings??[]);let{handler:r,...s}=t.config,l=s.toolTriggerSettings&&!s.toolTriggerSettings.inputSchema||s.workflowActionTriggerSettings&&!s.workflowActionTriggerSettings.inputSchema?await $i(i):null,u=s.toolTriggerSettings?{...s.toolTriggerSettings,inputSchema:s.toolTriggerSettings.inputSchema??l??void 0}:void 0,d=s.workflowActionTriggerSettings?{...s.workflowActionTriggerSettings,inputSchema:s.workflowActionTriggerSettings.inputSchema??(l?Qi(l):void 0)}:void 0,p={...s,...u?{toolTriggerSettings:u}:{},...d?{workflowActionTriggerSettings:d}:{},handlerName:`default.config.handler`,sourceHandlerPath:a,builtHandlerPath:a.replace(/\.tsx?$/,`.mjs`),builtHandlerChecksum:`[default-checksum]`};if(x.push(p),_e.push(a),f===Z.DefinePostInstallLogicFunction){let e=t.config;O.push({universalIdentifier:t.config.universalIdentifier,shouldRunOnVersionUpgrade:e.shouldRunOnVersionUpgrade??!1,shouldRunSynchronously:e.shouldRunSynchronously??!1})}if(f===Z.DefinePreInstallLogicFunction){let e=t.config;k.push({universalIdentifier:t.config.universalIdentifier,shouldRunOnVersionUpgrade:e.shouldRunOnVersionUpgrade??!1})}f===Z.DefineUninstallLogicFunction&&ae.push({universalIdentifier:t.config.universalIdentifier}),f===Z.DefineHealthCheck&&oe.push({universalIdentifier:t.config.universalIdentifier});break}case Q.FrontComponents:{let t=await $({appPath:n,filePath:e});o.push(...t.errors),c.push(...t.warnings??[]);let{component:i,...s}=t.config,l=(0,r.relative)(n,e),u={...s,componentName:i.name,sourceComponentPath:l,builtComponentPath:l.replace(/\.tsx?$/,`.mjs`),builtComponentChecksum:``,isHeadless:s.isHeadless??!1};S.push(u),ve.push(a),f===Z.DefineSettingsFrontComponent&&se.push(t.config.universalIdentifier);break}case Q.Views:{let t=await $({appPath:n,filePath:e}),r={...t.config};w.push(r),o.push(...t.errors),c.push(...t.warnings??[]),be.push(a);break}case Q.ViewFields:{let t=await $({appPath:n,filePath:e});T.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),xe.push(a);break}case Q.NavigationMenuItems:{let t=await $({appPath:n,filePath:e});ee.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),Se.push(a);break}case Q.PageLayouts:{let t=await $({appPath:n,filePath:e}),r={...t.config};te.push(r),o.push(...t.errors),c.push(...t.warnings??[]),Ce.push(a);break}case Q.Indexes:{let t=await $({appPath:n,filePath:e}),r={...t.config};m.push(r),o.push(...t.errors),c.push(...t.warnings??[]),ue.push(a);break}case Q.PageLayoutTabs:{let t=await $({appPath:n,filePath:e}),r={...t.config};ne.push(r),o.push(...t.errors),c.push(...t.warnings??[]),we.push(a);break}case Q.PageLayoutWidgets:{let t=await $({appPath:n,filePath:e});re.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),Te.push(a);break}case Q.CommandMenuItems:{let t=await $({appPath:n,filePath:e});E.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),Ee.push(a);break}case Q.TimelineActivityTypes:{let t=await $({appPath:n,filePath:e});D.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),M.push(a);break}case Q.SettingsMenuItems:{let t=await $({appPath:n,filePath:e});ie.push(t.config),o.push(...t.errors),c.push(...t.warnings??[]),De.push(a);break}case Q.PublicAssets:break;default:t.W(g)}}let Oe=await la(n);for(let e of Oe){let t=(0,r.relative)(n,e);C.push({filePath:t,fileName:(0,r.basename)(e),fileType:(0,r.extname)(e).replace(/^\./,``),checksum:null}),ye.push(t)}if(l||o.push(`Cannot build application, please export default defineApplication() to define an application`),l){for(let e of u){let{objectFields:t}=Ci({objectConfig:e,applicationUniversalIdentifier:l.universalIdentifier}),n=e.labelIdentifierFieldMetadataUniversalIdentifier??t.find(e=>e.name===`name`)?.universalIdentifier;if(!n){o.push(`No label identifier field found for object ${e.nameSingular}. Please add a field with name "name" to your object.`);continue}let r={...e,fields:t.map(bi),labelIdentifierFieldMetadataUniversalIdentifier:n};f.push(r)}for(let e of d)g.push(xi({roleConfig:e,applicationUniversalIdentifier:l.universalIdentifier}))}O.length>1&&o.push(`Only one post install logic function is allowed per application`),k.length>1&&o.push(`Only one pre install logic function is allowed per application`),ae.length>1&&o.push(`Only one uninstall logic function is allowed per application`),oe.length>1&&o.push(`Only one health check is allowed per application`),se.length>1&&o.push(`Only one settings front component is allowed per application`),A.length>1&&o.push(`Only one defineApplicationRole is allowed per application`);let{sharedDependencies:ke,errors:Ae}=await Di(n);o.push(...Ae);let N=l?.defaultRoleUniversalIdentifier??(A.length===1?A[0]:void 0);l&&!N&&o.push("Application must declare a default role: either pass `defaultRoleUniversalIdentifier` to defineApplication() or mark a role file with defineApplicationRole()"),o.push(...Gi({views:w,objects:f,fields:p})),e.t(l)&&e.t(N)&&o.push(...Wi({agents:v,roles:g,objects:f,permissionFlags:h,defaultRoleUniversalIdentifier:N}));let je=l&&N?(()=>{let{logoUrl:t,screenshots:r,...i}=l;return{...i,logo:l.logo,galleryImages:l.galleryImages??[],defaultRoleUniversalIdentifier:N,aboutDescription:a,yarnLockChecksum:null,packageJsonChecksum:null,requiredServerVersionRange:Ki(n),...O.length>=1?{postInstallLogicFunction:O[0]}:{},...k.length>=1?{preInstallLogicFunction:k[0]}:{},...ae.length>=1?{uninstallLogicFunction:ae[0]}:{},...oe.length>=1?{healthCheckLogicFunction:oe[0]}:{},...se.length>=1?{settingsFrontComponent:{universalIdentifier:se[0]}}:{},...e.t(ke)?{frontComponentSharedDependencies:ke}:{}}})():void 0,P=(e,t)=>e.universalIdentifier.localeCompare(t.universalIdentifier);return{manifest:je?{application:je,objects:f.sort(P),fields:p.sort(P),indexes:m.sort(P),permissionFlags:h.sort(P),roles:g.sort(P),skills:_.sort(P),agents:v.sort(P),workflows:y.sort(P),connectionProviders:b.sort(P),logicFunctions:x.sort(P),frontComponents:S.sort(P),publicAssets:C.sort((e,t)=>e.filePath.localeCompare(t.filePath)),views:w.sort(P),viewFields:T.sort(P),navigationMenuItems:ee.sort(P),pageLayouts:te.sort(P),pageLayoutTabs:ne.sort(P),pageLayoutWidgets:re.sort(P),commandMenuItems:E.sort(P),timelineActivityTypes:D.sort(P),settingsMenuItems:ie.sort(P)}:null,filePaths:{application:ce,objects:le,fields:j,indexes:ue,permissionFlags:de,roles:fe,skills:pe,agents:me,workflows:he,connectionProviders:ge,logicFunctions:_e,frontComponents:ve,publicAssets:ye,views:be,viewFields:xe,navigationMenuItems:Se,pageLayouts:Ce,pageLayoutTabs:we,pageLayoutWidgets:Te,commandMenuItems:Ee,timelineActivityTypes:M,settingsMenuItems:De},errors:o,warnings:c}},fa=[t.Rt.RELATION,t.Rt.MORPH_RELATION],pa=e=>fa.includes(e.type),ma=e=>{let t=new Set,n=new Set;for(let r of e)t.has(r)?n.add(r):t.add(r);return Array.from(n)},ha=({manifest:t,pageLayoutWidgets:n})=>{let r=new Set([t.application.settingsFrontComponent?.universalIdentifier,...t.settingsMenuItems.map(e=>e.frontComponentUniversalIdentifier),...t.commandMenuItems.map(e=>e.frontComponentUniversalIdentifier),...t.timelineActivityTypes.map(e=>e.frontComponentUniversalIdentifier),...n.map(({configuration:t})=>e.t(t)&&`frontComponentUniversalIdentifier`in t?t.frontComponentUniversalIdentifier:void 0)].filter(e.t));return t.frontComponents.filter(t=>!t.isHeadless&&!e.t(t.widgetAvailability)&&!r.has(t.universalIdentifier)).map(e=>`Front component "${e.name??e.componentName}" declares no widgetAvailability, so it is not offered in any widget picker. Set widgetAvailability to let users add it to record pages or dashboards.`)},ga=n=>{let r=[],i=[...n.pageLayouts.flatMap(({tabs:e})=>e??[]),...n.pageLayoutTabs];for(let n of i){n.layoutMode===t.Bt.CANVAS&&r.push(`Page layout tab "${n.title}" uses deprecated CANVAS. For a full-height widget, use VERTICAL_LIST and set the widget's heightBehavior to 'TAB_VIEWPORT'. Existing Canvas layouts remain supported and are not converted.`);for(let i of n.widgets??[])i.position?.layoutMode===t.Bt.VERTICAL_LIST&&r.push(`Page layout widget "${i.title}" uses a deprecated vertical-list position. Order the widgets array by position.index, remove position, and move any position.heightBehavior to heightBehavior. Existing positions remain supported and keep their indices.`),`gridPosition`in i&&e.t(i.gridPosition)&&r.push(`Page layout widget "${i.title}" uses deprecated gridPosition. Use position with layoutMode: 'GRID' and the same row, column, rowSpan and columnSpan. Existing gridPosition remains supported.`)}return r},_a=n=>{let r=[],a=ma(n.timelineActivityTypes.map(e=>e.name)),o=new Set(n.frontComponents.map(e=>e.universalIdentifier));for(let e of a)r.push(`Timeline activity type name "${e}" is used more than once. Names must be unique within an application.`);for(let a of n.timelineActivityTypes){e.t(a.frontComponentUniversalIdentifier)&&!o.has(a.frontComponentUniversalIdentifier)&&r.push(`Timeline activity type "${a.name}" references front component "${a.frontComponentUniversalIdentifier}", which is not defined by this application.`);let s=a.emit,c=a.replacesTimelineActivityTypeUniversalIdentifier;if(!e.t(s)){e.t(c)&&r.push(`Timeline activity type "${a.name}" declares replacesTimelineActivityTypeUniversalIdentifier without an automatic emit contract.`);continue}let l=s.through,u=l?.triggerFieldUniversalIdentifiers,d=t.x(s.objectUniversalIdentifier);d||r.push(`Timeline activity type "${a.name}" references an invalid object universal identifier "${s.objectUniversalIdentifier}".`),(s.on===`linked`||s.on===`unlinked`)&&!e.t(l)&&r.push(`Timeline activity type "${a.name}" must declare emit.through for a ${s.on} event.`),e.t(u)&&(s.on!==`updated`||!t.K(u)||new Set(u).size!==u.length)&&r.push(`Timeline activity type "${a.name}" trigger fields must be a non-empty list of unique fields on an updated through event.`);let f=d?n.objects.find(e=>e.universalIdentifier===s.objectUniversalIdentifier):void 0;if(!e.t(f)){d&&!e.t(c)&&r.push(`Timeline activity type "${a.name}" targets object "${s.objectUniversalIdentifier}", which is not defined by this application. Types targeting another application's object must declare replacesTimelineActivityTypeUniversalIdentifier.`),e.t(c)&&!t.x(c)&&r.push(`Timeline activity type "${a.name}" references an invalid replacement universal identifier "${c}".`),e.t(l)&&!t.x(l.relationFieldUniversalIdentifier)&&r.push(`Timeline activity type "${a.name}" references an invalid through relation field universal identifier "${l.relationFieldUniversalIdentifier}".`);let n=u?.filter(e=>!t.x(e))??[];n.length>0&&r.push(`Timeline activity type "${a.name}" references invalid trigger field universal identifiers: ${n.join(`, `)}.`);continue}e.t(c)&&r.push(`Timeline activity type "${a.name}" targets an object defined by this application and must not replace another application's type.`);let p=[...f.fields,...n.fields.filter(e=>e.objectUniversalIdentifier===f.universalIdentifier)];if(!e.t(l))continue;let m=p.find(e=>e.universalIdentifier===l.relationFieldUniversalIdentifier);if(e.t(m)?pa(m)&&e.t(m.universalSettings)&&(m.universalSettings.relationType===t.Mt.MANY_TO_ONE||m.universalSettings.relationType===t.Mt.ONE_TO_MANY&&(0,i.isNonEmptyString)(m.universalSettings.junctionTargetFieldUniversalIdentifier))||r.push(`Timeline activity type "${a.name}" must route through a MANY_TO_ONE relation or a junction-backed ONE_TO_MANY relation.`):r.push(`Timeline activity type "${a.name}" references relation field "${l.relationFieldUniversalIdentifier}", which is not defined on object "${f.nameSingular}".`),e.t(u)){let e=new Set(p.map(e=>e.universalIdentifier)),t=u.filter(t=>!e.has(t));t.length>0&&r.push(`Timeline activity type "${a.name}" references trigger fields that are not defined on object "${f.nameSingular}": ${t.join(`, `)}.`)}}return r},va=[t.Mt.MANY_TO_ONE,t.Mt.ONE_TO_MANY],ya=`aggregateFieldMetadataId`,ba=n=>e.t(n)&&t.Et.some(e=>e===n.configurationType),xa=e=>{let t=[];if(!e)return[];for(let[n,r]of Object.entries(e))n===`universalIdentifier`&&typeof r==`string`&&t.push(r),!(n===`postInstallLogicFunction`||n===`preInstallLogicFunction`||n===`uninstallLogicFunction`||n===`healthCheckLogicFunction`||n===`identifyAccountLogicFunction`||n===`onConnectLogicFunction`||n===`onDisconnectLogicFunction`||n===`settingsFrontComponent`||n===`input`||n===`expectedBody`||n===`outputSchema`||n===`expectedOutputSchema`)&&typeof r==`object`&&t.push(...xa(r));return t},Sa=e=>{let n=[];for(let r of e){if(!pa(r))continue;let e=r.universalSettings;if(!e?.relationType){n.push(`Relation field "${r.name}" is missing relationType. ${r.type} fields must declare a relationType (${va.join(` or `)}) in universalSettings.`);continue}if(!va.includes(e.relationType)){n.push(`Relation field "${r.name}" has invalid relationType "${e.relationType}". Expected ${va.join(` or `)}.`);continue}e.relationType===t.Mt.MANY_TO_ONE&&!e.joinColumnName&&n.push(`MANY_TO_ONE relation field "${r.name}" is missing joinColumnName. MANY_TO_ONE relations must declare a joinColumnName in universalSettings.`)}return n},Ca=e=>{let t=e.pageLayouts.flatMap(e=>e.tabs?.flatMap(e=>e.widgets??[])??[]),n=e.pageLayoutTabs.flatMap(e=>e.widgets??[]);return[...t,...n,...e.pageLayoutWidgets??[]]},wa=e=>{let t=[];for(let n of e){let e=n.configuration;if(ba(e)&&!(0,i.isNonEmptyString)(e.aggregateFieldMetadataUniversalIdentifier)){let r=ya in e?` Reference the aggregate field with "aggregateFieldMetadataUniversalIdentifier" (not "${ya}").`:``;t.push(`Graph widget "${n.title}" is missing aggregateFieldMetadataUniversalIdentifier.${r}`)}}return t},Ta=({pageLayoutTab:e,pageLayoutType:n})=>{let r=t.v({pageLayoutTabManifest:e,pageLayoutType:n});return r.status===`fail`?r.errors:[]},Ea=t=>{let n=new Map(t.pageLayouts.map(e=>[e.universalIdentifier,e.type])),r=t.pageLayouts.flatMap(e=>(e.tabs??[]).flatMap(t=>Ta({pageLayoutTab:t,pageLayoutType:e.type}))),i=t.pageLayoutTabs.flatMap(t=>Ta({pageLayoutTab:t,pageLayoutType:e.t(t.pageLayoutUniversalIdentifier)?n.get(t.pageLayoutUniversalIdentifier):void 0}));return[...r,...i]},Da=e=>{let n=[],r=new Set;for(let i of e)if(!r.has(i)){if(r.add(i),!(0,a.validate)(i)){n.push(`Universal identifier "${i}" is not a valid UUID.`);continue}if(!t.x(i)){let e=(0,a.version)(i);n.push(`Universal identifier "${i}" is UUID version ${e}. Only UUID version 4 or higher is allowed.`)}}return n},Oa=e=>{let t=[],n=Ca(e),r=[...ga(e),...ha({manifest:e,pageLayoutWidgets:n})],i=xa(e),a=ma(i);a.length>0&&t.push(`Duplicate universal identifiers: ${a.join(`, `)}`);let o=Da(i);o.length>0&&t.push(`Invalid universal identifiers: ${o.join(`, `)}`);let s=[...e.fields,...e.objects.flatMap(e=>e.fields)];return t.push(...Sa(s)),t.push(...Ea(e)),t.push(...wa(n)),t.push(..._a(e)),{errors:t,warnings:r,isValid:t.length===0}},ka={"twenty-sdk":`"twenty-sdk" is listed under "dependencies" in package.json. It is a build-time only tool and should be moved to "devDependencies".`,"twenty-client-sdk":`"twenty-client-sdk" is listed under "dependencies" in package.json. It is provided at runtime by Twenty's injected SDK and should be moved to "devDependencies".`},Aa=async t=>{let n=r.default.join(t,`package.json`);if(!await S(n))return[];let i=await D(n);return Object.entries(ka).filter(([t])=>e.t(i.dependencies?.[t])).map(([,e])=>e)},ja=async e=>await S(e)&&(await(0,s.stat)(e)).size===0?[`yarn.lock is empty. Run "yarn install" to regenerate it before building.`]:[],Ma=e=>ja(r.default.join(e,`yarn.lock`)),Na=async e=>{let t=await da(e);if(t.errors.length>0||!t.manifest)return{success:!1,errors:t.errors.length>0?t.errors:[`Failed to build manifest.`]};let n=Oa(t.manifest);if(!n.isValid)return{success:!1,errors:n.errors};let r=await Ma(e);if(r.length>0)return{success:!1,errors:r};let i=await Aa(e);return{success:!0,manifest:t.manifest,filePaths:t.filePaths,warnings:[...t.warnings,...n.warnings,...i]}},Pa=({manifest:n,builtFileInfos:i,outputDir:a=t.E})=>{let o=structuredClone(n);for(let[n,{fileFolder:s,checksum:c}]of i.entries()){let l=(0,r.relative)(a,n);if(s===t.St.BuiltLogicFunction){let e=o.logicFunctions,t=e.findIndex(e=>e.builtHandlerPath===l);if(t===-1)continue;o={...o,logicFunctions:e.map((e,n)=>n===t?{...e,builtHandlerChecksum:c}:e)}}if(s===t.St.PublicAsset){let e=o.publicAssets,t=e.findIndex(e=>e.filePath===l);if(t===-1)continue;o={...o,publicAssets:e.map((e,n)=>n===t?{...e,checksum:c}:e)};continue}if(s===t.St.BuiltFrontComponent){let t=o.application.frontComponentSharedDependencies;if(e.t(t)&&t.builtPath===l){o={...o,application:{...o.application,frontComponentSharedDependencies:{...t,builtChecksum:c}}};continue}let r=o.frontComponents,a=r.findIndex(e=>e.builtComponentPath===l)??-1;if(a===-1)continue;let s=i.get(n);o={...o,frontComponents:r.map((e,t)=>t===a?{...e,builtComponentChecksum:c,usesSdkClient:s?.usesSdkClient??!1}:e)}}s===t.St.Dependencies&&(l===`package.json`&&(o.application.packageJsonChecksum=c),l===`yarn.lock`&&(o.application.yarnLockChecksum=c))}return o},Fa=async({appPath:e,manifest:n,relativeOutputDir:i=t.E})=>{let a=r.default.join(e,i);await w(a);let o=r.default.join(a,`manifest.json`);return await ie(o,n),o},Ia=e=>Object.prototype.hasOwnProperty.call(t.rt,e),La=async({filePath:t,onWarning:n})=>{let i;try{i=await D(t)}catch{return n(`Skipping translation file "${r.default.basename(t)}": it is not valid JSON.`),null}return!e.t(i)||typeof i!=`object`||Array.isArray(i)?(n(`Skipping translation file "${r.default.basename(t)}": expected a JSON object.`),null):i},Ra=async({appPath:e,onWarning:t})=>{let n=r.default.join(e,Fr);if(!await S(n))return{};let i={};for(let e of(await(0,s.readdir)(n)).filter(e=>e.endsWith(`.json`))){let a=r.default.basename(e,`.json`);if(a===`en`)continue;if(!Ia(a)){t(`Skipping compiled translation file "${e}": "${a}" is not a supported locale.`);continue}let o=await La({filePath:r.default.join(n,e),onWarning:t});if(o===null)continue;let s=Object.fromEntries(Object.entries(o).filter(e=>typeof e[1]==`string`&&e[1].length>0));Object.keys(s).length>0&&(i[a]=s)}return i},za=async({appPath:e,onWarning:t=e=>console.warn(e)})=>{let n=r.default.join(e,Pr);if(!await S(n))return;let i=(await(0,s.readdir)(n)).filter(e=>e.endsWith(`.json`)),a={};for(let e of i){let i=r.default.basename(e,`.json`);if(i===`en`)continue;if(!Ia(i)){t(`Skipping translation file "${e}": "${i}" is not a supported locale.`);continue}let o=await La({filePath:r.default.join(n,e),onWarning:t});if(o===null)continue;let s=Nr({catalog:o,onCollision:({messageId:n,keptKey:r,droppedKey:i})=>t(`Message id collision in "${e}": "${r}" and "${i}" share id "${n}". Keeping "${r}".`)});Object.keys(s).length>0&&(a[i]=s)}for(let[n,r]of Object.entries(await Ra({appPath:e,onWarning:t})))a[n]={...r,...a[n]??{}};return a},Ba=async({appPath:e,outputDir:r=t.E,dereferenceSymlinks:i=!1,onProgress:a,onTranslationWarning:o,signal:s,typecheck:c=n.t})=>{let l=[],u=e=>{l.push({severity:`warning`,code:`BUILD_WARNING`,message:e}),a?.(`⚠ ${e}`)};s?.throwIfAborted(),a?.(`Building manifest...`);let d=await Na(e);if(!d.success)return{success:!1,error:{code:`MANIFEST_BUILD_FAILED`,message:d.errors.join(`
47
47
  `)},diagnostics:d.errors.map(e=>({severity:`error`,code:`MANIFEST_BUILD_FAILED`,message:e}))};d.warnings.forEach(u),s?.throwIfAborted();let{manifest:f,generatedAssets:p}=await ri({appPath:e,manifest:d.manifest}).catch(e=>(u(`Skipped cover image generation: ${e instanceof Error?e.message:String(e)}`),{manifest:d.manifest,generatedAssets:[]}));p.length>0&&a?.(`Generated cover image from logo`);let m=await za({appPath:e,onWarning:o??u});s?.throwIfAborted(),a?.(`Building application files...`);let{builtFileInfos:h}=await zr({appPath:e,manifest:f,filePaths:d.filePaths,generatedAssets:p,outputDir:r,dereferenceSymlinks:i});a?.(`Running typecheck...`);let g=await c({appPath:e,signal:s});if(l.push(...g.diagnostics),!g.success)return{...g,diagnostics:l};let _={...Pa({manifest:f,builtFileInfos:h,outputDir:r}),translations:m};return await Fa({appPath:e,manifest:_,relativeOutputDir:r}),{success:!0,data:{manifest:_,builtFileInfos:h},diagnostics:l}};Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"B",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return $t}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return Gt}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return Yt}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"H",{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"L",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return qt}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,"R",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return un}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return Qt}}),Object.defineProperty(exports,"U",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"V",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return Mr}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return Pa}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return Ar}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return da}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return ii}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return Pr}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return Fr}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Fa}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return St}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return Ut}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return Ki}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return zr}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return za}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return Na}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return oi}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return Ia}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return ja}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Ba}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return jr}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return Zt}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return Er}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return Dr}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return D}});