@microsoft/teams-js 2.31.0-beta.1 → 2.31.0

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 (183) hide show
  1. package/README.md +4 -4
  2. package/dist/esm/packages/teams-js/dts/internal/appHelpers.d.ts +11 -1
  3. package/dist/esm/packages/teams-js/dts/internal/appIdValidation.d.ts +10 -0
  4. package/dist/esm/packages/teams-js/dts/internal/handlers.d.ts +11 -1
  5. package/dist/esm/packages/teams-js/dts/internal/hostToAppTelemetry.d.ts +51 -0
  6. package/dist/esm/packages/teams-js/dts/internal/interfaces.d.ts +11 -0
  7. package/dist/esm/packages/teams-js/dts/internal/messageObjects.d.ts +5 -0
  8. package/dist/esm/packages/teams-js/dts/internal/pagesHelpers.d.ts +24 -0
  9. package/dist/esm/packages/teams-js/dts/internal/profileUtil.d.ts +23 -1
  10. package/dist/esm/packages/teams-js/dts/internal/uint8array-extras/uint8array-extras.d.ts +6 -0
  11. package/dist/esm/packages/teams-js/dts/internal/utils.d.ts +20 -1
  12. package/dist/esm/packages/teams-js/dts/internal/videoEffectsUtils.d.ts +2 -2
  13. package/dist/esm/packages/teams-js/dts/internal/visualMediaHelpers.d.ts +14 -0
  14. package/dist/esm/packages/teams-js/dts/internal/webStorageHelpers.d.ts +4 -0
  15. package/dist/esm/packages/teams-js/dts/private/appEntity.d.ts +61 -61
  16. package/dist/esm/packages/teams-js/dts/private/conversations.d.ts +48 -48
  17. package/dist/esm/packages/teams-js/dts/private/copilot/copilot.d.ts +2 -0
  18. package/dist/esm/packages/teams-js/dts/private/copilot/eligibility.d.ts +29 -0
  19. package/dist/esm/packages/teams-js/dts/private/externalAppAuthentication.d.ts +355 -349
  20. package/dist/esm/packages/teams-js/dts/private/externalAppAuthenticationForCEA.d.ts +70 -68
  21. package/dist/esm/packages/teams-js/dts/private/externalAppCardActions.d.ts +104 -105
  22. package/dist/esm/packages/teams-js/dts/private/externalAppCardActionsForCEA.d.ts +41 -42
  23. package/dist/esm/packages/teams-js/dts/private/externalAppCommands.d.ts +113 -114
  24. package/dist/esm/packages/teams-js/dts/private/files.d.ts +590 -582
  25. package/dist/esm/packages/teams-js/dts/private/hostEntity/hostEntity.d.ts +42 -0
  26. package/dist/esm/packages/teams-js/dts/private/hostEntity/tab.d.ts +134 -0
  27. package/dist/esm/packages/teams-js/dts/private/index.d.ts +19 -18
  28. package/dist/esm/packages/teams-js/dts/private/logs.d.ts +31 -25
  29. package/dist/esm/packages/teams-js/dts/private/meetingRoom.d.ts +147 -142
  30. package/dist/esm/packages/teams-js/dts/private/messageChannels/dataLayer.d.ts +39 -0
  31. package/dist/esm/packages/teams-js/dts/private/messageChannels/messageChannels.d.ts +28 -0
  32. package/dist/esm/packages/teams-js/dts/private/messageChannels/telemetry.d.ts +39 -0
  33. package/dist/esm/packages/teams-js/dts/private/notifications.d.ts +31 -25
  34. package/dist/esm/packages/teams-js/dts/private/otherAppStateChange.d.ts +69 -70
  35. package/dist/esm/packages/teams-js/dts/private/remoteCamera.d.ts +219 -214
  36. package/dist/esm/packages/teams-js/dts/private/teams/fullTrust/fullTrust.d.ts +31 -0
  37. package/dist/esm/packages/teams-js/dts/private/teams/fullTrust/joinedTeams.d.ts +30 -0
  38. package/dist/esm/packages/teams-js/dts/private/teams/teams.d.ts +63 -0
  39. package/dist/esm/packages/teams-js/dts/private/videoEffectsEx.d.ts +192 -186
  40. package/dist/esm/packages/teams-js/dts/public/app/app.d.ts +21 -2
  41. package/dist/esm/packages/teams-js/dts/public/app/lifecycle.d.ts +3 -2
  42. package/dist/esm/packages/teams-js/dts/public/appInitialization.d.ts +1 -1
  43. package/dist/esm/packages/teams-js/dts/public/authentication.d.ts +6 -0
  44. package/dist/esm/packages/teams-js/dts/public/barCode.d.ts +2 -1
  45. package/dist/esm/packages/teams-js/dts/public/calendar.d.ts +1 -0
  46. package/dist/esm/packages/teams-js/dts/public/call.d.ts +1 -0
  47. package/dist/esm/packages/teams-js/dts/public/chat.d.ts +4 -0
  48. package/dist/esm/packages/teams-js/dts/public/clipboard.d.ts +1 -0
  49. package/dist/esm/packages/teams-js/dts/public/dialog/adaptiveCard/adaptiveCard.d.ts +0 -4
  50. package/dist/esm/packages/teams-js/dts/public/dialog/adaptiveCard/bot.d.ts +3 -2
  51. package/dist/esm/packages/teams-js/dts/public/dialog/dialog.d.ts +0 -13
  52. package/dist/esm/packages/teams-js/dts/public/dialog/update.d.ts +2 -1
  53. package/dist/esm/packages/teams-js/dts/public/dialog/url/bot.d.ts +3 -2
  54. package/dist/esm/packages/teams-js/dts/public/dialog/url/parentCommunication.d.ts +2 -1
  55. package/dist/esm/packages/teams-js/dts/public/geoLocation/geoLocation.d.ts +3 -2
  56. package/dist/esm/packages/teams-js/dts/public/geoLocation/map.d.ts +6 -0
  57. package/dist/esm/packages/teams-js/dts/public/index.d.ts +9 -9
  58. package/dist/esm/packages/teams-js/dts/public/interfaces.d.ts +11 -0
  59. package/dist/esm/packages/teams-js/dts/public/liveShareHost.d.ts +1 -0
  60. package/dist/esm/packages/teams-js/dts/public/location.d.ts +4 -3
  61. package/dist/esm/packages/teams-js/dts/public/mail.d.ts +1 -0
  62. package/dist/esm/packages/teams-js/dts/public/marketplace.d.ts +1 -0
  63. package/dist/esm/packages/teams-js/dts/public/media.d.ts +0 -3
  64. package/dist/esm/packages/teams-js/dts/public/meeting/appShareButton.d.ts +51 -0
  65. package/dist/esm/packages/teams-js/dts/public/meeting/meeting.d.ts +854 -0
  66. package/dist/esm/packages/teams-js/dts/public/menus.d.ts +1 -0
  67. package/dist/esm/packages/teams-js/dts/public/monetization.d.ts +8 -0
  68. package/dist/esm/packages/teams-js/dts/public/navigation.d.ts +2 -1
  69. package/dist/esm/packages/teams-js/dts/public/nestedAppAuth.d.ts +1 -0
  70. package/dist/esm/packages/teams-js/dts/public/pages/appButton.d.ts +30 -0
  71. package/dist/esm/packages/teams-js/dts/public/pages/backStack.d.ts +44 -0
  72. package/dist/esm/packages/teams-js/dts/public/pages/config.d.ts +123 -0
  73. package/dist/esm/packages/teams-js/dts/public/pages/currentApp.d.ts +46 -0
  74. package/dist/esm/packages/teams-js/dts/public/pages/fullTrust.d.ts +33 -0
  75. package/dist/esm/packages/teams-js/dts/public/pages/pages.d.ts +253 -0
  76. package/dist/esm/packages/teams-js/dts/public/pages/tabs.d.ts +32 -0
  77. package/dist/esm/packages/teams-js/dts/public/profile.d.ts +81 -103
  78. package/dist/esm/packages/teams-js/dts/public/runtime.d.ts +3 -0
  79. package/dist/esm/packages/teams-js/dts/public/search.d.ts +9 -0
  80. package/dist/esm/packages/teams-js/dts/public/secondaryBrowser.d.ts +1 -0
  81. package/dist/esm/packages/teams-js/dts/public/settings.d.ts +4 -3
  82. package/dist/esm/packages/teams-js/dts/public/sharing/history.d.ts +47 -0
  83. package/dist/esm/packages/teams-js/dts/public/sharing/sharing.d.ts +76 -0
  84. package/dist/esm/packages/teams-js/dts/public/stageView/self.d.ts +23 -0
  85. package/dist/esm/packages/teams-js/dts/public/stageView/stageView.d.ts +81 -0
  86. package/dist/esm/packages/teams-js/dts/public/tasks.d.ts +0 -8
  87. package/dist/esm/packages/teams-js/dts/public/teamsAPIs.d.ts +4 -0
  88. package/dist/esm/packages/teams-js/dts/public/thirdPartyCloudStorage.d.ts +2 -1
  89. package/dist/esm/packages/teams-js/dts/public/videoEffects.d.ts +209 -210
  90. package/dist/esm/packages/teams-js/dts/public/visualMedia/image.d.ts +64 -0
  91. package/dist/esm/packages/teams-js/dts/public/visualMedia/visualMedia.d.ts +116 -0
  92. package/dist/esm/packages/teams-js/dts/public/webStorage.d.ts +20 -22
  93. package/dist/esm/packages/teams-js/src/index.js +1 -1
  94. package/dist/esm/packages/teams-js/src/internal/appHelpers.js +1 -1
  95. package/dist/esm/packages/teams-js/src/internal/appIdValidation.js +1 -1
  96. package/dist/esm/packages/teams-js/src/internal/communication.js +1 -1
  97. package/dist/esm/packages/teams-js/src/internal/handlers.js +1 -1
  98. package/dist/esm/packages/teams-js/src/internal/hostToAppTelemetry.js +1 -0
  99. package/dist/esm/packages/teams-js/src/internal/marketplaceUtils.js +1 -1
  100. package/dist/esm/packages/teams-js/src/internal/messageObjects.js +1 -1
  101. package/dist/esm/packages/teams-js/src/internal/pagesHelpers.js +1 -0
  102. package/dist/esm/packages/teams-js/src/internal/uint8array-extras/uint8array-extras.js +1 -0
  103. package/dist/esm/packages/teams-js/src/internal/utils.js +1 -1
  104. package/dist/esm/packages/teams-js/src/internal/validOrigins.js +1 -1
  105. package/dist/esm/packages/teams-js/src/internal/videoEffectsUtils.js +1 -1
  106. package/dist/esm/packages/teams-js/src/internal/visualMediaHelpers.js +1 -0
  107. package/dist/esm/packages/teams-js/src/internal/webStorageHelpers.js +1 -0
  108. package/dist/esm/packages/teams-js/src/private/appEntity.js +1 -1
  109. package/dist/esm/packages/teams-js/src/private/conversations.js +1 -1
  110. package/dist/esm/packages/teams-js/src/private/copilot/copilot.js +1 -0
  111. package/dist/esm/packages/teams-js/src/private/copilot/eligibility.js +1 -0
  112. package/dist/esm/packages/teams-js/src/private/externalAppAuthentication.js +1 -1
  113. package/dist/esm/packages/teams-js/src/private/externalAppAuthenticationForCEA.js +1 -1
  114. package/dist/esm/packages/teams-js/src/private/externalAppCardActions.js +1 -1
  115. package/dist/esm/packages/teams-js/src/private/externalAppCardActionsForCEA.js +1 -1
  116. package/dist/esm/packages/teams-js/src/private/externalAppCommands.js +1 -1
  117. package/dist/esm/packages/teams-js/src/private/files.js +1 -1
  118. package/dist/esm/packages/teams-js/src/private/hostEntity/hostEntity.js +1 -0
  119. package/dist/esm/packages/teams-js/src/private/hostEntity/tab.js +1 -0
  120. package/dist/esm/packages/teams-js/src/private/logs.js +1 -1
  121. package/dist/esm/packages/teams-js/src/private/meetingRoom.js +1 -1
  122. package/dist/esm/packages/teams-js/src/private/messageChannels/dataLayer.js +1 -0
  123. package/dist/esm/packages/teams-js/src/private/messageChannels/messageChannels.js +1 -0
  124. package/dist/esm/packages/teams-js/src/private/messageChannels/telemetry.js +1 -0
  125. package/dist/esm/packages/teams-js/src/private/notifications.js +1 -1
  126. package/dist/esm/packages/teams-js/src/private/otherAppStateChange.js +1 -1
  127. package/dist/esm/packages/teams-js/src/private/remoteCamera.js +1 -1
  128. package/dist/esm/packages/teams-js/src/private/teams/fullTrust/fullTrust.js +1 -0
  129. package/dist/esm/packages/teams-js/src/private/teams/fullTrust/joinedTeams.js +1 -0
  130. package/dist/esm/packages/teams-js/src/private/teams/teams.js +1 -0
  131. package/dist/esm/packages/teams-js/src/private/videoEffectsEx.js +1 -1
  132. package/dist/esm/packages/teams-js/src/public/app/app.js +1 -1
  133. package/dist/esm/packages/teams-js/src/public/appInitialization.js +1 -1
  134. package/dist/esm/packages/teams-js/src/public/clipboard.js +1 -1
  135. package/dist/esm/packages/teams-js/src/public/meeting/appShareButton.js +1 -0
  136. package/dist/esm/packages/teams-js/src/public/meeting/meeting.js +1 -0
  137. package/dist/esm/packages/teams-js/src/public/navigation.js +1 -1
  138. package/dist/esm/packages/teams-js/src/public/pages/appButton.js +1 -0
  139. package/dist/esm/packages/teams-js/src/public/pages/backStack.js +1 -0
  140. package/dist/esm/packages/teams-js/src/public/pages/config.js +1 -0
  141. package/dist/esm/packages/teams-js/src/public/pages/currentApp.js +1 -0
  142. package/dist/esm/packages/teams-js/src/public/pages/fullTrust.js +1 -0
  143. package/dist/esm/packages/teams-js/src/public/pages/pages.js +1 -0
  144. package/dist/esm/packages/teams-js/src/public/pages/tabs.js +1 -0
  145. package/dist/esm/packages/teams-js/src/public/profile.js +1 -1
  146. package/dist/esm/packages/teams-js/src/public/publicAPIs.js +1 -1
  147. package/dist/esm/packages/teams-js/src/public/runtime.js +1 -1
  148. package/dist/esm/packages/teams-js/src/public/settings.js +1 -1
  149. package/dist/esm/packages/teams-js/src/public/sharing/history.js +1 -0
  150. package/dist/esm/packages/teams-js/src/public/sharing/sharing.js +1 -0
  151. package/dist/esm/packages/teams-js/src/public/stageView/self.js +1 -0
  152. package/dist/esm/packages/teams-js/src/public/stageView/stageView.js +1 -0
  153. package/dist/esm/packages/teams-js/src/public/tasks.js +1 -1
  154. package/dist/esm/packages/teams-js/src/public/version.js +1 -1
  155. package/dist/esm/packages/teams-js/src/public/videoEffects.js +1 -1
  156. package/dist/esm/packages/teams-js/src/public/visualMedia/image.js +1 -0
  157. package/dist/esm/packages/teams-js/src/public/visualMedia/visualMedia.js +1 -0
  158. package/dist/esm/packages/teams-js/src/public/webStorage.js +1 -1
  159. package/dist/umd/MicrosoftTeams.d.ts +5755 -5161
  160. package/dist/umd/MicrosoftTeams.js +6258 -6439
  161. package/dist/umd/MicrosoftTeams.js.map +1 -1
  162. package/dist/umd/MicrosoftTeams.min.js +1 -1
  163. package/dist/umd/MicrosoftTeams.min.js.map +1 -1
  164. package/package.json +50 -1
  165. package/dist/esm/packages/teams-js/dts/private/copilot.d.ts +0 -39
  166. package/dist/esm/packages/teams-js/dts/private/hostEntity.d.ts +0 -176
  167. package/dist/esm/packages/teams-js/dts/private/messageChannels.d.ts +0 -107
  168. package/dist/esm/packages/teams-js/dts/private/teams.d.ts +0 -116
  169. package/dist/esm/packages/teams-js/dts/public/meeting.d.ts +0 -906
  170. package/dist/esm/packages/teams-js/dts/public/pages.d.ts +0 -574
  171. package/dist/esm/packages/teams-js/dts/public/sharing.d.ts +0 -124
  172. package/dist/esm/packages/teams-js/dts/public/stageView.d.ts +0 -104
  173. package/dist/esm/packages/teams-js/dts/public/visualMedia.d.ts +0 -192
  174. package/dist/esm/packages/teams-js/src/private/copilot.js +0 -1
  175. package/dist/esm/packages/teams-js/src/private/hostEntity.js +0 -1
  176. package/dist/esm/packages/teams-js/src/private/messageChannels.js +0 -1
  177. package/dist/esm/packages/teams-js/src/private/teams.js +0 -1
  178. package/dist/esm/packages/teams-js/src/public/meeting.js +0 -1
  179. package/dist/esm/packages/teams-js/src/public/pages.js +0 -1
  180. package/dist/esm/packages/teams-js/src/public/sharing.js +0 -1
  181. package/dist/esm/packages/teams-js/src/public/stageView.js +0 -1
  182. package/dist/esm/packages/teams-js/src/public/visualMedia.js +0 -1
  183. /package/dist/esm/node_modules/.pnpm/{@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5 → @rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5}/node_modules/tslib/tslib.es6.js +0 -0
@@ -1 +1 @@
1
- import{sendMessageToParent as i,sendAndHandleStatusAndReason as e,initializeCommunication as t}from"./communication.js";import{defaultSDKVersionForCompatCheck as n}from"./constants.js";import{GlobalVars as o}from"./globalVars.js";import{registerOnThemeChangeHandler as r,initializeHandlers as s}from"./handlers.js";import{ensureInitializeCalled as a,ensureInitialized as l,processAdditionalValidOrigins as p}from"./internalAPIs.js";import{getLogger as m}from"./telemetry.js";import{isNullOrUndefined as c}from"./typeCheckUtilities.js";import{inServerSideRenderingEnvironment as u,runWithTimeout as f,compareSDKVersions as d}from"./utils.js";import{Messages as g}from"../public/app/app.js";import{initialize as j}from"../public/authentication.js";import{FrameContexts as S}from"../public/constants.js";import{initialize as z}from"../public/dialog/dialog.js";import{initialize as w}from"../public/menus.js";import{pages as b}from"../public/pages.js";import{runtime as h,applyRuntimeConfig as y,generateVersionBasedTeamsRuntimeConfig as v,mapTeamsVersionToSupportedCapabilities as x,versionAndPlatformAgnosticTeamsRuntimeConfig as C}from"../public/runtime.js";import{version as P}from"../public/version.js";const D=m("app");function V(i,e){if(u()){return D.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return f((()=>function(i,e){return new Promise((r=>{o.initializeCalled||(o.initializeCalled=!0,s(),o.initializePromise=t(e,i).then((({context:i,clientType:e,runtimeConfig:t,clientSupportedSDKVersion:r=n})=>{o.frameContext=i,o.hostClientType=e,o.clientSupportedSDKVersion=r;try{N("Parsing %s",t);const i=JSON.parse(t);if(N("Checking if %o is a valid runtime object",null!=i?i:"null"),!i||!i.apiVersion)throw new Error("Received runtime config is invalid");t&&y(i)}catch(i){if(!(i instanceof SyntaxError))throw i;try{N("Attempting to parse %s as an SDK version",t),isNaN(d(t,n))||(o.clientSupportedSDKVersion=t);const i=JSON.parse(r);if(N("givenRuntimeConfig parsed to %o",null!=i?i:"null"),!i)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");y(i)}catch(i){if(!(i instanceof SyntaxError))throw i;y(v(o.clientSupportedSDKVersion,C,x))}}o.initializeCompleted=!0})),j(),w(),b.config.initialize(),z()),Array.isArray(e)&&p(e),void 0!==o.initializePromise?r(o.initializePromise):N("GlobalVars.initializePromise is unexpectedly undefined")}))}(i,e)),5e3,new Error("SDK initialization timed out."))}function E(e){i(e,g.AppLoaded,[P])}function K(e,t){i(e,g.ExpectedFailure,[t.reason,t.message])}function A(e,t){i(e,g.Failure,[t.reason,t.message])}function k(e){i(e,g.Success,[P])}const N=D.extend("initializeHelper");function R(i,e){!c(e)&&a(),r(i,e)}function F(i,t){return new Promise((n=>{l(h,S.content,S.sidePanel,S.settings,S.task,S.stage,S.meetingStage),n(e(i,"executeDeepLink",t))}))}export{V as appInitializeHelper,E as notifyAppLoadedHelper,K as notifyExpectedFailureHelper,A as notifyFailureHelper,k as notifySuccessHelper,F as openLinkHelper,R as registerOnThemeChangeHandlerHelper};
1
+ import{__awaiter as i}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParent as e,sendAndHandleStatusAndReason as t,callFunctionInHostAndHandleResponse as n,initializeCommunication as o}from"./communication.js";import{errorLibraryNotInitialized as r,defaultSDKVersionForCompatCheck as s}from"./constants.js";import{GlobalVars as l}from"./globalVars.js";import{registerOnThemeChangeHandler as a,initializeHandlers as p}from"./handlers.js";import{ensureInitializeCalled as u,ensureInitialized as m,processAdditionalValidOrigins as c}from"./internalAPIs.js";import{getLogger as f}from"./telemetry.js";import{isNullOrUndefined as d}from"./typeCheckUtilities.js";import{inServerSideRenderingEnvironment as g,runWithTimeout as h,compareSDKVersions as j}from"./utils.js";import{Messages as S}from"../public/app/app.js";import{initialize as v}from"../public/authentication.js";import{FrameContexts as w}from"../public/constants.js";import{initialize as y}from"../public/dialog/dialog.js";import{initialize as z}from"../public/menus.js";import{runtime as b,applyRuntimeConfig as P,generateVersionBasedTeamsRuntimeConfig as C,mapTeamsVersionToSupportedCapabilities as x,versionAndPlatformAgnosticTeamsRuntimeConfig as D}from"../public/runtime.js";import{version as E}from"../public/version.js";import{SimpleTypeResponseHandler as V}from"./responseHandler.js";import{initialize as K}from"../public/pages/config.js";const _=f("app");function k(i,e){if(g()){return _.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return h((()=>function(i,e){return new Promise((t=>{l.initializeCalled||(l.initializeCalled=!0,p(),l.initializePromise=o(e,i).then((({context:i,clientType:e,runtimeConfig:t,clientSupportedSDKVersion:n=s})=>{l.frameContext=i,l.hostClientType=e,l.clientSupportedSDKVersion=n;try{J("Parsing %s",t);const i=JSON.parse(t);if(J("Checking if %o is a valid runtime object",null!=i?i:"null"),!i||!i.apiVersion)throw new Error("Received runtime config is invalid");t&&P(i)}catch(i){if(!(i instanceof SyntaxError))throw i;try{J("Attempting to parse %s as an SDK version",t),isNaN(j(t,s))||(l.clientSupportedSDKVersion=t);const i=JSON.parse(n);if(J("givenRuntimeConfig parsed to %o",null!=i?i:"null"),!i)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");P(i)}catch(i){if(!(i instanceof SyntaxError))throw i;P(C(l.clientSupportedSDKVersion,D,x))}}l.initializeCompleted=!0})),v(),z(),K(),y()),Array.isArray(e)&&c(e),void 0!==l.initializePromise?t(l.initializePromise):J("GlobalVars.initializePromise is unexpectedly undefined")}))}(i,e)),6e4,new Error("SDK initialization timed out."))}function A(i){e(i,S.AppLoaded,[E])}function F(i,t){e(i,S.ExpectedFailure,[t.reason,t.message])}function N(i,t){e(i,S.Failure,[t.reason,t.message])}function R(e){return i(this,void 0,void 0,(function*(){if(l.initializeCompleted)return H(e);if(!l.initializePromise)throw new Error(r);return l.initializePromise.then((()=>H(e)))}))}function H(t){return i(this,void 0,void 0,(function*(){return m(b)&&(null===(i=b.supports.app)||void 0===i?void 0:i.notifySuccessResponse)?n(S.Success,[E],new V,t).then((()=>({hasFinishedSuccessfully:!0}))):(e(t,S.Success,[E]),{hasFinishedSuccessfully:"unknown"});var i}))}const J=_.extend("initializeHelper");function L(i,e){!d(e)&&u(),a(i,e)}function O(i,e){return new Promise((n=>{m(b,w.content,w.sidePanel,w.settings,w.task,w.stage,w.meetingStage),n(t(i,"executeDeepLink",e))}))}export{k as appInitializeHelper,H as callNotifySuccessInHost,A as notifyAppLoadedHelper,F as notifyExpectedFailureHelper,N as notifyFailureHelper,R as notifySuccessHelper,O as openLinkHelper,L as registerOnThemeChangeHandlerHelper};
@@ -1 +1 @@
1
- import{hasScriptTags as t}from"./utils.js";function i(i){if(t(i))throw new Error(`Potential app id (${i}) is invalid; it contains script tags.`);if(!o(i))throw new Error(`Potential app id (${i}) is invalid; its length ${i.length} is not within the length limits (${n}-${r}).`);if(e(i))throw new Error(`Potential app id (${i}) is invalid; it contains non-printable characters.`)}const n=4,r=256;function o(t){return t.length<r&&t.length>n}function e(t){return[...t].some((t=>{const i=t.charCodeAt(0);return i<32||i>126}))}export{e as doesStringContainNonPrintableCharacters,o as isStringWithinAppIdLengthLimits,r as maximumValidAppIdLength,n as minimumValidAppIdLength,i as validateStringAsAppId};
1
+ import{AppId as i}from"../public/appId.js";import{hasScriptTags as t}from"./utils.js";function n(i){if(t(i))throw new Error(`Potential app id (${i}) is invalid; it contains script tags.`);if(!a(i))throw new Error(`Potential app id (${i}) is invalid; its length ${i.length} is not within the length limits (${o}-${r}).`);if(e(i))throw new Error(`Potential app id (${i}) is invalid; it contains non-printable characters.`)}const o=4,r=256;function a(i){return i.length<r&&i.length>o}function e(i){return[...i].some((i=>{const t=i.charCodeAt(0);return t<32||t>126}))}function s(t){if(!(t instanceof i))throw new Error(`Potential app id (${t}) is invalid; it is not an instance of AppId class.`)}export{e as doesStringContainNonPrintableCharacters,a as isStringWithinAppIdLengthLimits,r as maximumValidAppIdLength,o as minimumValidAppIdLength,s as validateAppIdInstance,n as validateStringAsAppId};
@@ -1 +1 @@
1
- import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{getLogger as n,isFollowingApiVersionTagFormat as i,getApiVersionTag as t}from"./telemetry.js";import{isSdkError as o,ErrorCode as s}from"../public/interfaces.js";import{latestRuntimeApiVersion as r}from"../public/runtime.js";import{isSerializable as a}from"../public/serializable.interface.js";import{version as d}from"../public/version.js";import{GlobalVars as c}from"./globalVars.js";import{callHandler as u}from"./handlers.js";import{serializeMessageRequest as l,deserializeMessageResponse as g,deserializeMessageRequest as p,serializeMessageResponse as f}from"./messageObjects.js";import{tryPolyfillWithNestedAppAuthBridge as w}from"./nestedAppAuthUtils.js";import{ssrSafeWindow as m}from"./utils.js";import{UUID as h}from"./uuidObject.js";import{validateOrigin as W}from"./validOrigins.js";const v=n("communication");class M{}class b{}function y(n,i){if(b.messageListener=n=>function(n){return e(this,void 0,void 0,(function*(){if(!n||!n.data||"object"!=typeof n.data)return void F("Unrecognized message format received by app, message being ignored. Message: %o",n);const e=n.source||n.originalEvent&&n.originalEvent.source,i=n.origin||n.originalEvent&&n.originalEvent.origin;return q(e,i).then((o=>{o?(function(e,n){c.isFramelessWindow||M.parentWindow&&!M.parentWindow.closed&&e!==M.parentWindow?M.childWindow&&!M.childWindow.closed&&e!==M.childWindow||(M.childWindow=e,M.childOrigin=n):(M.parentWindow=e,M.parentOrigin=n);M.parentWindow&&M.parentWindow.closed&&(M.parentWindow=null,M.parentOrigin=null);M.childWindow&&M.childWindow.closed&&(M.childWindow=null,M.childOrigin=null);ne(M.parentWindow),ne(M.childWindow)}(e,i),e===M.parentWindow?B(n):e===M.childWindow&&function(e){if("id"in e.data&&"func"in e.data){const n=p(e.data),[i,o]=u(n.func,n.args);i&&void 0!==o?(K("Returning message %s from child back to child, action: %s.",se(n),n.func),te(n.id,n.uuid,Array.isArray(o)?o:[o])):(K("Relaying message %s from child to parent, action: %s. Relayed message will have a new id.",se(n),n.func),C(t("v2","tasks.startTask"),n.func,n.args,((...e)=>{if(M.childWindow){const i=e.pop();K("Message from parent being relayed to child, id: %s",se(n)),te(n.id,n.uuid,e,i)}})))}}(n)):F("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin, message: %o, source: %o, origin: %o",n,e,i)}))}))}(n),M.currentWindow=M.currentWindow||m(),M.parentWindow=M.currentWindow.parent!==M.currentWindow.self?M.currentWindow.parent:M.currentWindow.opener,M.topWindow=M.currentWindow.top,(M.parentWindow||n)&&M.currentWindow.addEventListener("message",b.messageListener,!1),!M.parentWindow){const e=M.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));c.isFramelessWindow=!0,e.onNativeMessage=B}try{return M.parentOrigin="*",T(i,"initialize",[d,r,n]).then((([e,n,i,t])=>(w(t,M.currentWindow,{onMessage:_,sendPostMessage:N}),{context:e,clientType:n,runtimeConfig:i,clientSupportedSDKVersion:t})))}finally{M.parentOrigin=null}}function k(){M.currentWindow&&M.currentWindow.removeEventListener("message",b.messageListener,!1),M.currentWindow=null,M.parentWindow=null,M.parentOrigin=null,M.childWindow=null,M.childOrigin=null,b.parentMessageQueue=[],b.childMessageQueue=[],b.nextMessageId=0,b.callbacks.clear(),b.promiseCallbacks.clear(),b.portCallbacks.clear(),b.legacyMessageIdsToUuidMap={}}function I(e,n,...i){return T(e,n,i).then((([e])=>e))}function R(e,n,...i){return T(e,n,i).then((([e,n])=>{if(!e)throw new Error(n)}))}function E(e,n,i,...t){return T(e,n,t).then((([e,n])=>{if(!e)throw new Error(n||i)}))}function O(e,n,...i){return T(e,n,i).then((([e,n])=>{if(e)throw e;return n}))}function T(e,n,t=void 0){if(!i(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return new Promise((i=>{const o=z(e,n,t);var s;i((s=o.uuid,new Promise((e=>{b.promiseCallbacks.set(s,e)}))))}))}function S(e){return e.map((e=>a(e)?e.serialize():e))}function j(n,i,t,r,a){var d;return e(this,void 0,void 0,(function*(){const e=S(i),[c]=yield T(r,n,e);if(a&&a(c)||!a&&o(c))throw new Error(`${c.errorCode}, message: ${null!==(d=c.message)&&void 0!==d?d:"None"}`);if(t.validate(c))return t.deserialize(c);throw new Error(`${s.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(c)}`)}))}function x(n,i,t,r){var a;return e(this,void 0,void 0,(function*(){const e=S(i),[d]=yield T(t,n,e);if(r&&r(d)||!r&&o(d))throw new Error(`${d.errorCode}, message: ${null!==(a=d.message)&&void 0!==a?a:"None"}`);if(void 0!==d)throw new Error(`${s.INTERNAL_ERROR}, message: Invalid response from host`)}))}function A(e,n,t=void 0){if(!i(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const o=z(e,n,t);return s=o.uuid,new Promise(((e,n)=>{b.portCallbacks.set(s,((i,t)=>{i instanceof MessagePort?e(i):n(t&&t.length>0?t[0]:new Error("Host responded without port or error details."))}))}));var s}function C(e,n,t,o){let s;if(t instanceof Function?o=t:t instanceof Array&&(s=t),!i(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const r=z(e,n,s);o&&b.callbacks.set(r.uuid,o)}b.parentMessageQueue=[],b.childMessageQueue=[],b.topMessageQueue=[],b.nextMessageId=0,b.callbacks=new Map,b.promiseCallbacks=new Map,b.portCallbacks=new Map,b.legacyMessageIdsToUuidMap={};const P=v.extend("sendNestedAuthRequestToTopWindow");function N(e){const n=P,i=M.topWindow,t=function(e){const n=b.nextMessageId++,i=new h;return b.legacyMessageIdsToUuidMap[n]=i,{id:n,uuid:i,func:"nestedAppAuth.execute",timestamp:Date.now(),args:[],data:e}}(e);return n("Message %s information: %o",se(t),{actionName:t.func}),U(i,t)}const $=v.extend("sendRequestToTargetWindowHelper");function U(e,n){const i=$,t=Z(e),o=l(n);if(c.isFramelessWindow)M.currentWindow&&M.currentWindow.nativeInterface&&(i("Sending message %s to %s via framelessPostMessage interface",se(o),t),M.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const s=Y(e);e&&s?(i("Sending message %s to %s via postMessage",se(o),t),e.postMessage(o,s)):(i("Adding message %s to %s message queue",se(o),t),X(e).push(n))}return n}const Q=v.extend("sendMessageToParentHelper");function z(e,n,i){const t=Q,o=M.parentWindow,s=function(e,n,i){const t=b.nextMessageId++,o=new h;return b.legacyMessageIdsToUuidMap[t]=o,{id:t,uuid:o,func:n,timestamp:Date.now(),args:i||[],apiVersionTag:e}}(e,n,i);return t("Message %s information: %o",se(s),{actionName:n,args:i}),U(o,s)}const F=v.extend("processIncomingMessage");const L=v.extend("processAuthBridgeMessage");function _(e,n){var i,t;const o=L;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:s}=e.data,[,r]=null!=s?s:[],a=(()=>{try{return JSON.parse(r)}catch(e){return null}})();if(!a||"object"!=typeof a||"NestedAppAuthResponse"!==a.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const d=e.source||(null===(i=null==e?void 0:e.originalEvent)||void 0===i?void 0:i.source),c=e.origin||(null===(t=null==e?void 0:e.originalEvent)||void 0===t?void 0:t.origin);d?q(d,c)?(M.topWindow&&!M.topWindow.closed&&d!==M.topWindow||(M.topWindow=d,M.topOrigin=c),M.topWindow&&M.topWindow.closed&&(M.topWindow=null,M.topOrigin=null),ne(M.topWindow),n(r)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const V=v.extend("shouldProcessIncomingMessage");function q(n,i){return e(this,void 0,void 0,(function*(){if(M.currentWindow&&n===M.currentWindow)return V("Should not process message because it is coming from the current window"),!1;if(M.currentWindow&&M.currentWindow.location&&i&&i===M.currentWindow.location.origin)return!0;{let e;try{e=new URL(i)}catch(e){return V("Message has an invalid origin of %s",i),!1}const n=yield W(e);return n||V("Message has an invalid origin of %s",i),n}}))}const D=v.extend("handleIncomingMessageFromParent");function H(e,n){if(n){const i=[...e].find((([e,i])=>e.toString()===n.toString()));if(i)return i[0]}}function J(e,n){const i=H(n,e.uuid);i&&n.delete(i),e.uuid?b.legacyMessageIdsToUuidMap={}:delete b.legacyMessageIdsToUuidMap[e.id]}function B(e){const n=D;if("id"in e.data&&"number"==typeof e.data.id){const i=e.data,t=g(i),o=function(e){const n=D;if(!e.uuid)return b.legacyMessageIdsToUuidMap[e.id];{const n=e.uuid,i=H(b.callbacks,n);if(i)return i;const t=H(b.promiseCallbacks,n);if(t)return t;const o=H(b.portCallbacks,n);if(o)return o}n("Received message %s that failed to produce a callbackId",se(e))}(t);if(o){const i=b.callbacks.get(o);n("Received a response from parent for message %s",o.toString()),i&&(n("Invoking the registered callback for message %s with arguments %o",o.toString(),t.args),i.apply(null,[...t.args,t.isPartialResponse]),function(e){return!0===e.data.isPartialResponse}(e)||(n("Removing registered callback for message %s",o.toString()),J(t,b.callbacks)));const s=b.promiseCallbacks.get(o);s&&(n("Invoking the registered promise callback for message %s with arguments %o",o.toString(),t.args),s(t.args),n("Removing registered promise callback for message %s",o.toString()),J(t,b.promiseCallbacks));const r=b.portCallbacks.get(o);if(r){let i;n("Invoking the registered port callback for message %s with arguments %o",o.toString(),t.args),e.ports&&e.ports[0]instanceof MessagePort&&(i=e.ports[0]),r(i,t.args),n("Removing registered port callback for message %s",o.toString()),J(t,b.portCallbacks)}t.uuid&&(b.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const i=e.data;n('Received a message from parent %s, action: "%s"',se(i),i.func),u(i.func,i.args)}else n("Received an unknown message: %O",e)}const K=v.extend("handleIncomingMessageFromChild");function G(){return M.topWindow!==M.parentWindow}function X(e){return e===M.topWindow&&G()?b.topMessageQueue:e===M.parentWindow?b.parentMessageQueue:e===M.childWindow?b.childMessageQueue:[]}function Y(e){return e===M.topWindow&&G()?M.topOrigin:e===M.parentWindow?M.parentOrigin:e===M.childWindow?M.childOrigin:null}function Z(e){return e===M.topWindow&&G()?"top":e===M.parentWindow?"parent":e===M.childWindow?"child":null}const ee=v.extend("flushMessageQueue");function ne(e){const n=Y(e),i=X(e),t=Z(e);for(;e&&n&&i.length>0;){const o=i.shift();if(o){const i=l(o);ee("Flushing message %s from %s message queue via postMessage.",se(i),t),e.postMessage(i,n)}}}function ie(e,n){let i;i=M.currentWindow.setInterval((()=>{0===X(e).length&&(clearInterval(i),n())}),100)}function te(e,n,i,t){const o=M.childWindow,s=function(e,n,i,t){return{id:e,uuid:n,args:i||[],isPartialResponse:t}}(e,n,i,t),r=f(s),a=Y(o);o&&a&&o.postMessage(r,a)}function oe(e,n){const i=M.childWindow,t=function(e,n){return{func:e,args:n||[]}}(e,n),o=Y(i);i&&o?i.postMessage(t,o):X(i).push(t)}function se(e){return"uuidAsString"in e?`${e.uuidAsString} (legacy id: ${e.id})`:"uuid"in e&&void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}export{M as Communication,x as callFunctionInHost,j as callFunctionInHostAndHandleResponse,y as initializeCommunication,A as requestPortFromParentWithVersion,O as sendAndHandleSdkError,R as sendAndHandleStatusAndReason,E as sendAndHandleStatusAndReasonWithDefaultError,I as sendAndUnwrap,oe as sendMessageEventToChild,C as sendMessageToParent,T as sendMessageToParentAsync,N as sendNestedAuthRequestToTopWindow,k as uninitializeCommunication,ie as waitForMessageQueue};
1
+ import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{getLogger as n,isFollowingApiVersionTagFormat as i,getApiVersionTag as t}from"./telemetry.js";import{isSdkError as o,ErrorCode as s}from"../public/interfaces.js";import{latestRuntimeApiVersion as r}from"../public/runtime.js";import{isSerializable as a}from"../public/serializable.interface.js";import{version as d}from"../public/version.js";import{GlobalVars as c}from"./globalVars.js";import{callHandler as u}from"./handlers.js";import l from"./hostToAppTelemetry.js";import{serializeMessageRequest as g,deserializeMessageResponse as p,deserializeMessageRequest as f,serializeMessageResponse as m}from"./messageObjects.js";import{tryPolyfillWithNestedAppAuthBridge as w}from"./nestedAppAuthUtils.js";import{getCurrentTimestamp as h,ssrSafeWindow as W}from"./utils.js";import{UUID as v}from"./uuidObject.js";import{validateOrigin as M}from"./validOrigins.js";const b=n("communication");class y{}class k{}function I(n,i){if(k.messageListener=n=>function(n){return e(this,void 0,void 0,(function*(){if(!n||!n.data||"object"!=typeof n.data)return void _("Unrecognized message format received by app, message being ignored. Message: %o",n);const e=n.source||n.originalEvent&&n.originalEvent.source,i=n.origin||n.originalEvent&&n.originalEvent.origin;return H(e,i).then((o=>{o?(function(e,n){c.isFramelessWindow||y.parentWindow&&!y.parentWindow.closed&&e!==y.parentWindow?y.childWindow&&!y.childWindow.closed&&e!==y.childWindow||(y.childWindow=e,y.childOrigin=n):(y.parentWindow=e,y.parentOrigin=n);y.parentWindow&&y.parentWindow.closed&&(y.parentWindow=null,y.parentOrigin=null);y.childWindow&&y.childWindow.closed&&(y.childWindow=null,y.childOrigin=null);te(y.parentWindow),te(y.childWindow)}(e,i),e===y.parentWindow?G(n):e===y.childWindow&&function(e){if("id"in e.data&&"func"in e.data){const n=f(e.data),[i,o]=u(n.func,n.args);i&&void 0!==o?(X("Returning message %s from child back to child, action: %s.",ae(n),n.func),se(n.id,n.uuid,Array.isArray(o)?o:[o])):(X("Relaying message %s from child to parent, action: %s. Relayed message will have a new id.",ae(n),n.func),N(t("v2","tasks.startTask"),n.func,n.args,((...e)=>{if(y.childWindow){const i=e.pop();X("Message from parent being relayed to child, id: %s",ae(n)),se(n.id,n.uuid,e,i)}})))}}(n)):_("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin, message: %o, source: %o, origin: %o",n,e,i)}))}))}(n),y.currentWindow=y.currentWindow||W(),y.parentWindow=y.currentWindow.parent!==y.currentWindow.self?y.currentWindow.parent:y.currentWindow.opener,y.topWindow=y.currentWindow.top,(y.parentWindow||n)&&y.currentWindow.addEventListener("message",k.messageListener,!1),!y.parentWindow){const e=y.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));c.isFramelessWindow=!0,e.onNativeMessage=G}try{return y.parentOrigin="*",S(i,"initialize",[d,r,n]).then((([e,n,i,t])=>(w(t,y.currentWindow,{onMessage:q,sendPostMessage:U}),{context:e,clientType:n,runtimeConfig:i,clientSupportedSDKVersion:t})))}finally{y.parentOrigin=null}}function T(){y.currentWindow&&y.currentWindow.removeEventListener("message",k.messageListener,!1),y.currentWindow=null,y.parentWindow=null,y.parentOrigin=null,y.childWindow=null,y.childOrigin=null,k.parentMessageQueue=[],k.childMessageQueue=[],k.nextMessageId=0,k.callbacks.clear(),k.promiseCallbacks.clear(),k.portCallbacks.clear(),k.legacyMessageIdsToUuidMap={},l.clearMessages()}function R(e,n,...i){return S(e,n,i).then((([e])=>e))}function E(e,n,...i){return S(e,n,i).then((([e,n])=>{if(!e)throw new Error(n)}))}function O(e,n,i,...t){return S(e,n,t).then((([e,n])=>{if(!e)throw new Error(n||i)}))}function j(e,n,...i){return S(e,n,i).then((([e,n])=>{if(e)throw e;return n}))}function S(e,n,t=void 0){if(!i(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return new Promise((i=>{const o=L(e,n,t);var s;i((s=o.uuid,new Promise((e=>{k.promiseCallbacks.set(s,e)}))))}))}function A(e){return e.map((e=>a(e)?e.serialize():e))}function P(n,i,t,r,a){var d;return e(this,void 0,void 0,(function*(){const e=A(i),[c]=yield S(r,n,e);if(a&&a(c)||!a&&o(c))throw new Error(`${c.errorCode}, message: ${null!==(d=c.message)&&void 0!==d?d:"None"}`);if(t.validate(c))return t.deserialize(c);throw new Error(`${s.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(c)}`)}))}function C(n,i,t,r){var a;return e(this,void 0,void 0,(function*(){const e=A(i),[d]=yield S(t,n,e);if(r&&r(d)||!r&&o(d))throw new Error(`${d.errorCode}, message: ${null!==(a=d.message)&&void 0!==a?a:"None"}`);if(void 0!==d)throw new Error(`${s.INTERNAL_ERROR}, message: Invalid response from host`)}))}function x(e,n,t=void 0){if(!i(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const o=L(e,n,t);return s=o.uuid,new Promise(((e,n)=>{k.portCallbacks.set(s,((i,t)=>{i instanceof MessagePort?e(i):n(t&&t.length>0?t[0]:new Error("Host responded without port or error details."))}))}));var s}function N(e,n,t,o){let s;if(t instanceof Function?o=t:t instanceof Array&&(s=t),!i(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const r=L(e,n,s);o&&k.callbacks.set(r.uuid,o)}k.parentMessageQueue=[],k.childMessageQueue=[],k.topMessageQueue=[],k.nextMessageId=0,k.callbacks=new Map,k.promiseCallbacks=new Map,k.portCallbacks=new Map,k.legacyMessageIdsToUuidMap={};const $=b.extend("sendNestedAuthRequestToTopWindow");function U(e){const n=$,i=y.topWindow,t=function(e){const n=k.nextMessageId++,i=new v;return k.legacyMessageIdsToUuidMap[n]=i,{id:n,uuid:i,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:h(),args:[],data:e}}(e);return n("Message %s information: %o",ae(t),{actionName:t.func}),z(i,t)}const Q=b.extend("sendRequestToTargetWindowHelper");function z(e,n){const i=Q,t=ne(e),o=g(n);if(c.isFramelessWindow)y.currentWindow&&y.currentWindow.nativeInterface&&(i("Sending message %s to %s via framelessPostMessage interface",ae(o),t),y.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const s=ee(e);e&&s?(i("Sending message %s to %s via postMessage",ae(o),t),e.postMessage(o,s)):(i("Adding message %s to %s message queue",ae(o),t),Z(e).push(n))}return n}const F=b.extend("sendMessageToParentHelper");function L(e,n,i){const t=F,o=y.parentWindow,s=function(e,n,i){const t=k.nextMessageId++,o=new v;return k.legacyMessageIdsToUuidMap[t]=o,{id:t,uuid:o,func:n,timestamp:Date.now(),monotonicTimestamp:h(),args:i||[],apiVersionTag:e}}(e,n,i);return l.storeCallbackInformation(s.uuid,{name:n,calledAt:s.timestamp}),t("Message %s information: %o",ae(s),{actionName:n,args:i}),z(o,s)}const _=b.extend("processIncomingMessage");const V=b.extend("processAuthBridgeMessage");function q(e,n){var i,t;const o=V;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:s}=e.data,[,r]=null!=s?s:[],a=(()=>{try{return JSON.parse(r)}catch(e){return null}})();if(!a||"object"!=typeof a||"NestedAppAuthResponse"!==a.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const d=e.source||(null===(i=null==e?void 0:e.originalEvent)||void 0===i?void 0:i.source),c=e.origin||(null===(t=null==e?void 0:e.originalEvent)||void 0===t?void 0:t.origin);d?H(d,c)?(y.topWindow&&!y.topWindow.closed&&d!==y.topWindow||(y.topWindow=d,y.topOrigin=c),y.topWindow&&y.topWindow.closed&&(y.topWindow=null,y.topOrigin=null),te(y.topWindow),n(r)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const D=b.extend("shouldProcessIncomingMessage");function H(n,i){return e(this,void 0,void 0,(function*(){if(y.currentWindow&&n===y.currentWindow)return D("Should not process message because it is coming from the current window"),!1;if(y.currentWindow&&y.currentWindow.location&&i&&i===y.currentWindow.location.origin)return!0;{let e;try{e=new URL(i)}catch(e){return D("Message has an invalid origin of %s",i),!1}const n=yield M(e);return n||D("Message has an invalid origin of %s",i),n}}))}const J=b.extend("handleIncomingMessageFromParent");function B(e,n){if(n){const i=[...e].find((([e,i])=>e.toString()===n.toString()));if(i)return i[0]}}function K(e,n){const i=B(n,e.uuid);i&&n.delete(i),e.uuid?k.legacyMessageIdsToUuidMap={}:delete k.legacyMessageIdsToUuidMap[e.id]}function G(e){const n=J,i=h();if("id"in e.data&&"number"==typeof e.data.id){const t=e.data,o=p(t),s=function(e){const n=J;if(!e.uuid)return k.legacyMessageIdsToUuidMap[e.id];{const n=e.uuid,i=B(k.callbacks,n);if(i)return i;const t=B(k.promiseCallbacks,n);if(t)return t;const o=B(k.portCallbacks,n);if(o)return o}n("Received message %s that failed to produce a callbackId",ae(e))}(o);if(s){const t=k.callbacks.get(s);n("Received a response from parent for message %s",s.toString()),l.handlePerformanceMetrics(s,o,n,i),t&&(n("Invoking the registered callback for message %s with arguments %o",s.toString(),o.args),t.apply(null,[...o.args,o.isPartialResponse]),function(e){return!0===e.data.isPartialResponse}(e)||(n("Removing registered callback for message %s",s.toString()),K(o,k.callbacks)));const r=k.promiseCallbacks.get(s);r&&(n("Invoking the registered promise callback for message %s with arguments %o",s.toString(),o.args),r(o.args),n("Removing registered promise callback for message %s",s.toString()),K(o,k.promiseCallbacks));const a=k.portCallbacks.get(s);if(a){let i;n("Invoking the registered port callback for message %s with arguments %o",s.toString(),o.args),e.ports&&e.ports[0]instanceof MessagePort&&(i=e.ports[0]),a(i,o.args),n("Removing registered port callback for message %s",s.toString()),K(o,k.portCallbacks)}o.uuid&&(k.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const t=e.data;l.handleOneWayPerformanceMetrics(t,n,i),n('Received a message from parent %s, action: "%s"',ae(t),t.func),u(t.func,t.args)}else n("Received an unknown message: %O",e)}const X=b.extend("handleIncomingMessageFromChild");function Y(){return y.topWindow!==y.parentWindow}function Z(e){return e===y.topWindow&&Y()?k.topMessageQueue:e===y.parentWindow?k.parentMessageQueue:e===y.childWindow?k.childMessageQueue:[]}function ee(e){return e===y.topWindow&&Y()?y.topOrigin:e===y.parentWindow?y.parentOrigin:e===y.childWindow?y.childOrigin:null}function ne(e){return e===y.topWindow&&Y()?"top":e===y.parentWindow?"parent":e===y.childWindow?"child":null}const ie=b.extend("flushMessageQueue");function te(e){const n=ee(e),i=Z(e),t=ne(e);for(;e&&n&&i.length>0;){const o=i.shift();if(o){const i=g(o);ie("Flushing message %s from %s message queue via postMessage.",ae(i),t),e.postMessage(i,n)}}}function oe(e,n){let i;i=y.currentWindow.setInterval((()=>{0===Z(e).length&&(clearInterval(i),n())}),100)}function se(e,n,i,t){const o=y.childWindow,s=function(e,n,i,t){return{id:e,uuid:n,args:i||[],isPartialResponse:t}}(e,n,i,t),r=m(s),a=ee(o);o&&a&&o.postMessage(r,a)}function re(e,n){const i=y.childWindow,t=function(e,n){return{func:e,args:n||[]}}(e,n),o=ee(i);i&&o?i.postMessage(t,o):Z(i).push(t)}function ae(e){return"uuidAsString"in e?`${e.uuidAsString} (legacy id: ${e.id})`:"uuid"in e&&void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}export{y as Communication,C as callFunctionInHost,P as callFunctionInHostAndHandleResponse,I as initializeCommunication,x as requestPortFromParentWithVersion,j as sendAndHandleSdkError,E as sendAndHandleStatusAndReason,O as sendAndHandleStatusAndReasonWithDefaultError,R as sendAndUnwrap,re as sendMessageEventToChild,N as sendMessageToParent,S as sendMessageToParentAsync,U as sendNestedAuthRequestToTopWindow,T as uninitializeCommunication,oe as waitForMessageQueue};
@@ -1 +1 @@
1
- import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{getLogger as n,getApiVersionTag as r}from"./telemetry.js";import{pages as l}from"../public/pages.js";import{runtime as a}from"../public/runtime.js";import{sendMessageToParent as d,Communication as o,sendMessageEventToChild as i}from"./communication.js";import{ensureInitialized as t}from"./internalAPIs.js";import{isNullOrUndefined as s}from"./typeCheckUtilities.js";const u=n("handlers");class f{static initializeHandlers(){f.handlers.themeChange=y,f.handlers.load=w,f.handlers.beforeUnload=O,l.backStack._initialize()}static uninitializeHandlers(){f.handlers={},f.themeChangeHandler=null,f.loadHandler=null,f.beforeUnloadHandler=null,f.beforeSuspendOrTerminateHandler=null,f.resumeHandler=null}}function m(){f.initializeHandlers()}function c(){f.uninitializeHandlers()}f.handlers={},f.themeChangeHandler=null,f.loadHandler=null,f.beforeUnloadHandler=null,f.beforeSuspendOrTerminateHandler=null,f.resumeHandler=null;const h=u.extend("callHandler");function H(e,n){const r=f.handlers[e];if(r){h("Invoking the registered handler for message %s with arguments %o",e,n);return[!0,r.apply(this,n)]}return o.childWindow?(i(e,n),[!1,void 0]):(h("Handler for action message %s not found.",e),[!1,void 0])}function p(e,n,r,l=!0,a=[]){r?(f.handlers[n]=r,l&&d(e,"registerHandler",[n,...a])):delete f.handlers[n]}function g(e){delete f.handlers[e]}function b(e){return null!=f.handlers[e]}function U(e,n,r,l,d){r&&t(a,...l),d&&d(),p(e,n,r)}function v(e,n){f.themeChangeHandler=n,!s(n)&&d(e,"registerHandler",["themeChange"])}function y(e){f.themeChangeHandler&&f.themeChangeHandler(e),o.childWindow&&i("themeChange",[e])}function C(e,n){f.loadHandler=n,!s(n)&&d(e,"registerHandler",["load"])}function w(e){const n={entityId:(r=e).entityId,contentUrl:new URL(r.contentUrl)};var r;f.resumeHandler?(f.resumeHandler(n),o.childWindow&&i("load",[n])):f.loadHandler&&(f.loadHandler(e),o.childWindow&&i("load",[e]))}function j(e,n){f.beforeUnloadHandler=n,!s(n)&&d(e,"registerHandler",["beforeUnload"])}function O(){return e(this,void 0,void 0,(function*(){const e=()=>{d(r("v2","handleBeforeUnload"),"readyToUnload",[])};f.beforeSuspendOrTerminateHandler?(yield f.beforeSuspendOrTerminateHandler(),o.childWindow?i("beforeUnload"):e()):f.beforeUnloadHandler&&f.beforeUnloadHandler(e)||(o.childWindow?i("beforeUnload"):e())}))}function S(e){f.beforeSuspendOrTerminateHandler=e,!s(e)&&d(r("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function T(e){f.resumeHandler=e,!s(e)&&d(r("v2","registerOnResumeHandler"),"registerHandler",["load"])}export{H as callHandler,b as doesHandlerExist,y as handleThemeChange,m as initializeHandlers,S as registerBeforeSuspendOrTerminateHandler,j as registerBeforeUnloadHandler,p as registerHandler,U as registerHandlerHelper,C as registerOnLoadHandler,T as registerOnResumeHandler,v as registerOnThemeChangeHandler,g as removeHandler,c as uninitializeHandlers};
1
+ import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{getLogger as n,getApiVersionTag as r}from"./telemetry.js";import{runtime as l}from"../public/runtime.js";import{sendMessageToParent as o,Communication as a,sendMessageEventToChild as d}from"./communication.js";import{ensureInitialized as t}from"./internalAPIs.js";import{isNullOrUndefined as i}from"./typeCheckUtilities.js";import{_initialize as s}from"../public/pages/backStack.js";const u=n("handlers");class c{static initializeHandlers(){c.handlers.themeChange=v,c.handlers.load=j,c.handlers.beforeUnload=S,s()}static uninitializeHandlers(){c.handlers={},c.themeChangeHandler=null,c.loadHandler=null,c.beforeUnloadHandler=null,c.beforeSuspendOrTerminateHandler=null,c.resumeHandler=null}}function f(){c.initializeHandlers()}function m(){c.uninitializeHandlers()}c.handlers={},c.themeChangeHandler=null,c.loadHandler=null,c.beforeUnloadHandler=null,c.beforeSuspendOrTerminateHandler=null,c.resumeHandler=null,c.hostToAppPerformanceMetricsHandler=null;const h=u.extend("callHandler");function H(e,n){const r=c.handlers[e];if(r){h("Invoking the registered handler for message %s with arguments %o",e,n);return[!0,r.apply(this,n)]}return a.childWindow?(d(e,n),[!1,void 0]):(h("Handler for action message %s not found.",e),[!1,void 0])}function p(e,n,r,l=!0,a=[]){r?(c.handlers[n]=r,l&&o(e,"registerHandler",[n,...a])):delete c.handlers[n]}function g(e){delete c.handlers[e]}function b(e){return null!=c.handlers[e]}function U(e,n,r,o,a){r&&t(l,...o),a&&a(),p(e,n,r)}function T(e,n){c.themeChangeHandler=n,!i(n)&&o(e,"registerHandler",["themeChange"])}function v(e){c.themeChangeHandler&&c.themeChangeHandler(e),a.childWindow&&d("themeChange",[e])}function y(e){c.hostToAppPerformanceMetricsHandler=e}function C(e){c.hostToAppPerformanceMetricsHandler&&c.hostToAppPerformanceMetricsHandler(e)}function w(e,n){c.loadHandler=n,!i(n)&&o(e,"registerHandler",["load"])}function j(e){const n={entityId:(r=e).entityId,contentUrl:new URL(r.contentUrl)};var r;c.resumeHandler?(c.resumeHandler(n),a.childWindow&&d("load",[n])):c.loadHandler&&(c.loadHandler(e),a.childWindow&&d("load",[e]))}function O(e,n){c.beforeUnloadHandler=n,!i(n)&&o(e,"registerHandler",["beforeUnload"])}function S(){return e(this,void 0,void 0,(function*(){const e=()=>{o(r("v2","handleBeforeUnload"),"readyToUnload",[])};c.beforeSuspendOrTerminateHandler?(yield c.beforeSuspendOrTerminateHandler(),a.childWindow?d("beforeUnload"):e()):c.beforeUnloadHandler&&c.beforeUnloadHandler(e)||(a.childWindow?d("beforeUnload"):e())}))}function W(e){c.beforeSuspendOrTerminateHandler=e,!i(e)&&o(r("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function _(e){c.resumeHandler=e,!i(e)&&o(r("v2","registerOnResumeHandler"),"registerHandler",["load"])}export{H as callHandler,b as doesHandlerExist,C as handleHostToAppPerformanceMetrics,v as handleThemeChange,f as initializeHandlers,W as registerBeforeSuspendOrTerminateHandler,O as registerBeforeUnloadHandler,p as registerHandler,U as registerHandlerHelper,y as registerHostToAppPerformanceMetricsHandler,w as registerOnLoadHandler,_ as registerOnResumeHandler,T as registerOnThemeChangeHandler,g as removeHandler,m as uninitializeHandlers};
@@ -0,0 +1 @@
1
+ import{handleHostToAppPerformanceMetrics as e}from"./handlers.js";class a{static storeCallbackInformation(e,t){a.callbackInformation.set(e,t)}static clearMessages(){a.callbackInformation.clear()}static deleteMessageInformation(e){a.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(a,t,n){const o=a.monotonicTimestamp;o&&n?e({actionName:a.func,messageDelay:n-o,requestStartedAt:o}):t("Unable to send performance metrics for event %s",a.func)}static handlePerformanceMetrics(t,n,o,s){const c=a.callbackInformation.get(t);c&&n.monotonicTimestamp&&s?(e({actionName:c.name,messageDelay:s-n.monotonicTimestamp,requestStartedAt:c.calledAt}),a.deleteMessageInformation(t)):o("Unable to send performance metrics for callback %s with arguments %o",t.toString(),n.args)}}a.callbackInformation=new Map;export{a as default};
@@ -1 +1 @@
1
- import{__rest as r}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{CartStatus as e}from"../public/marketplace.js";import t from"../../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/validate.js";function o(r){try{return r.cartItems=s(r.cartItems),r}catch(r){throw new Error("Error deserializing cart")}}function s(r){return r.map((r=>{if(r.imageURL){const e=new URL(r.imageURL);r.imageURL=e}return r.accessories&&(r.accessories=s(r.accessories)),r}))}const i=e=>{try{return e.map((e=>{const{imageURL:t,accessories:o}=e,s=r(e,["imageURL","accessories"]),n=Object.assign({},s);return t&&(n.imageURL=t.href),o&&(n.accessories=i(o)),n}))}catch(r){throw new Error("Error serializing cart items")}};function n(r){if(!Array.isArray(r)||0===r.length)throw new Error("cartItems must be a non-empty array");for(const e of r)c(e),a(e.accessories)}function a(r){if(null!=r){if(!Array.isArray(r)||0===r.length)throw new Error("CartItem.accessories must be a non-empty array");for(const e of r){if(e.accessories)throw new Error("Item in CartItem.accessories cannot have accessories");c(e)}}}function c(r){if(!r.id)throw new Error("cartItem.id must not be empty");if(!r.name)throw new Error("cartItem.name must not be empty");u(r.price),f(r.quantity)}function m(r){if(null!=r){if(!r)throw new Error("id must not be empty");if(!1===t(r))throw new Error("id must be a valid UUID")}}function u(r){if("number"!=typeof r||r<0)throw new Error(`price ${r} must be a number not less than 0`);if(parseFloat(r.toFixed(3))!==r)throw new Error(`price ${r} must have at most 3 decimal places`)}function f(r){if("number"!=typeof r||r<=0||parseInt(r.toString())!==r)throw new Error(`quantity ${r} must be an integer greater than 0`)}function p(r){if(!Object.values(e).includes(r))throw new Error(`cartStatus ${r} is not valid`)}export{o as deserializeCart,s as deserializeCartItems,i as serializeCartItems,a as validateAccessoryItems,c as validateBasicCartItem,n as validateCartItems,p as validateCartStatus,u as validatePrice,f as validateQuantity,m as validateUuid};
1
+ import{__rest as r}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{CartStatus as e}from"../public/marketplace.js";import t from"../../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/validate.js";function o(r){try{return r.cartItems=s(r.cartItems),r}catch(r){throw new Error("Error deserializing cart")}}function s(r){return r.map((r=>{if(r.imageURL){const e=new URL(r.imageURL);r.imageURL=e}return r.accessories&&(r.accessories=s(r.accessories)),r}))}const i=e=>{try{return e.map((e=>{const{imageURL:t,accessories:o}=e,s=r(e,["imageURL","accessories"]),n=Object.assign({},s);return t&&(n.imageURL=t.href),o&&(n.accessories=i(o)),n}))}catch(r){throw new Error("Error serializing cart items")}};function n(r){if(!Array.isArray(r)||0===r.length)throw new Error("cartItems must be a non-empty array");for(const e of r)c(e),a(e.accessories)}function a(r){if(null!=r){if(!Array.isArray(r)||0===r.length)throw new Error("CartItem.accessories must be a non-empty array");for(const e of r){if(e.accessories)throw new Error("Item in CartItem.accessories cannot have accessories");c(e)}}}function c(r){if(!r.id)throw new Error("cartItem.id must not be empty");if(!r.name)throw new Error("cartItem.name must not be empty");u(r.price),f(r.quantity)}function m(r){if(null!=r){if(!r)throw new Error("id must not be empty");if(!1===t(r))throw new Error("id must be a valid UUID")}}function u(r){if("number"!=typeof r||r<0)throw new Error(`price ${r} must be a number not less than 0`);if(parseFloat(r.toFixed(3))!==r)throw new Error(`price ${r} must have at most 3 decimal places`)}function f(r){if("number"!=typeof r||r<=0||parseInt(r.toString())!==r)throw new Error(`quantity ${r} must be an integer greater than 0`)}function p(r){if(!Object.values(e).includes(r))throw new Error(`cartStatus ${r} is not valid`)}export{o as deserializeCart,s as deserializeCartItems,i as serializeCartItems,a as validateAccessoryItems,c as validateBasicCartItem,n as validateCartItems,p as validateCartStatus,u as validatePrice,f as validateQuantity,m as validateUuid};
@@ -1 +1 @@
1
- import{__rest as i}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{UUID as t}from"./uuidObject.js";const s=t=>{const{uuid:s}=t,u=i(t,["uuid"]),n=null==s?void 0:s.toString();return Object.assign(Object.assign({},u),{uuidAsString:n})},u=s=>{const{uuidAsString:u}=s,n=i(s,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:u?new t(u):void 0})},n=s=>{const{uuidAsString:u}=s,n=i(s,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:u?new t(u):void 0})},r=t=>{const{uuid:s}=t,u=i(t,["uuid"]),n=null==s?void 0:s.toString();return Object.assign(Object.assign({},u),{uuidAsString:n})};export{u as deserializeMessageRequest,n as deserializeMessageResponse,s as serializeMessageRequest,r as serializeMessageResponse};
1
+ import{__rest as i}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{UUID as t}from"./uuidObject.js";const s=t=>{const{uuid:s}=t,u=i(t,["uuid"]),n=null==s?void 0:s.toString();return Object.assign(Object.assign({},u),{uuidAsString:n})},u=s=>{const{uuidAsString:u}=s,n=i(s,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:u?new t(u):void 0})},n=s=>{const{uuidAsString:u}=s,n=i(s,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:u?new t(u):void 0})},r=t=>{const{uuid:s}=t,u=i(t,["uuid"]),n=null==s?void 0:s.toString();return Object.assign(Object.assign({},u),{uuidAsString:n})};export{u as deserializeMessageRequest,n as deserializeMessageResponse,s as serializeMessageRequest,r as serializeMessageResponse};
@@ -0,0 +1 @@
1
+ import{AppId as t}from"../public/appId.js";import{FrameContexts as e,errorNotSupportedOnPlatform as n}from"../public/constants.js";import{isSupported as i}from"../public/pages/pages.js";import{runtime as r}from"../public/runtime.js";import{sendAndHandleStatusAndReasonWithDefaultError as o,sendMessageToParent as s,sendAndUnwrap as a,sendAndHandleStatusAndReason as c}from"./communication.js";import{ensureInitialized as p}from"./internalAPIs.js";import{isSupported as u}from"../public/pages/backStack.js";import{isSupported as g}from"../public/pages/tabs.js";import{isSupported as f}from"../public/pages/config.js";const m="v2";function b(t,s){return new Promise((a=>{if(p(r,e.content,e.sidePanel,e.settings,e.remove,e.task,e.stage,e.meetingStage),!i())throw n;a(o(t,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",s))}))}function w(t){return new Promise((e=>{if(p(r),!u())throw n;e(o(t,"navigateBack","Back navigation is not supported in the current client or context."))}))}function d(t,e){return new Promise((i=>{if(p(r),!g())throw n;i(o(t,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",e))}))}function l(t,e){if(p(r),!i())throw n;s(t,"returnFocus",[e])}function h(t,e){return new Promise((i=>{if(p(r),!g())throw n;i(a(t,"getTabInstances",e))}))}function P(t,e){return new Promise((i=>{if(p(r),!g())throw n;i(a(t,"getMruTabInstances",e))}))}function I(t,o){if(p(r,e.content,e.sidePanel,e.meetingStage),!i())throw n;s(t,"shareDeepLink",[o.subPageId,o.subPageLabel,o.subPageWebUrl])}function j(t,o){if(p(r,e.content),!i())throw n;s(t,"setFrameContext",[o])}function v(t,i){if(p(r,e.settings,e.remove),!f())throw n;s(t,"settings.setValidityState",[i])}function S(t){return new Promise((o=>{if(p(r,e.content,e.settings,e.remove,e.sidePanel),!i())throw n;o(a(t,"settings.getSettings"))}))}function U(t,i){return new Promise((o=>{if(p(r,e.content,e.settings,e.sidePanel),!f())throw n;o(c(t,"settings.setSettings",i))}))}function k(e){return e.appId instanceof t}function T(e){return Object.assign(Object.assign({},e),{appId:new t(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function L(t){return Object.assign(Object.assign({},t),{appId:t.appId.toString(),webUrl:t.webUrl?t.webUrl.toString():void 0})}export{w as backStackNavigateBackHelper,U as configSetConfigHelper,v as configSetValidityStateHelper,L as convertAppNavigationParametersToNavigateToAppParams,T as convertNavigateToAppParamsToAppNavigationParameters,S as getConfigHelper,P as getMruTabInstancesHelper,h as getTabInstancesHelper,k as isAppNavigationParametersObject,b as navigateCrossDomainHelper,m as pagesTelemetryVersionNumber,l as returnFocusHelper,j as setCurrentFrameHelper,I as shareDeepLinkHelper,d as tabsNavigateToTabHelper};
@@ -0,0 +1 @@
1
+ const r=Object.prototype.toString,t="[object Uint8Array]",e="[object ArrayBuffer]",n={utf8:new globalThis.TextDecoder("utf8")};function o(t,e,n){return!!t&&(t.constructor===e||r.call(t)===n)}function c(r){return o(r,Uint8Array,t)}function i(r){if("string"!=typeof r)throw new TypeError(`Expected \`string\`, got \`${typeof r}\``)}function u(r){return i(r),Uint8Array.from(globalThis.atob(r.replaceAll("-","+").replaceAll("_","/")),(r=>{const t=r.codePointAt(0);if(void 0===t)throw new Error("Invalid character encountered");return t}))}function f(r,t="utf8"){var e;return l(r),null!==(e=n[t])&&void 0!==e||(n[t]=new globalThis.TextDecoder(t)),n[t].decode(r)}function a(r){return i(r),f(u(r))}function l(r){if(!function(r){return c(r)||function(r){return o(r,ArrayBuffer,e)}(r)}(r))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof r}\``)}export{l as assertUint8ArrayOrArrayBuffer,a as base64ToString,u as base64ToUint8Array,c as isUint8Array,f as uint8ArrayToString};
@@ -1 +1 @@
1
- import{Buffer as t}from"../../../../_virtual/_polyfill-node.buffer.js";import{minAdaptiveCardVersion as e}from"../public/constants.js";import n from"../../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/v4.js";import r from"../../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/validate.js";function o(t){return(t,e)=>{if(!t)throw new Error(e)}}function i(t,e){if("string"!=typeof t||"string"!=typeof e)return NaN;const n=t.split("."),r=e.split(".");function o(t){return/^\d+$/.test(t)}if(!n.every(o)||!r.every(o))return NaN;for(;n.length<r.length;)n.push("0");for(;r.length<n.length;)r.push("0");for(let t=0;t<n.length;++t)if(Number(n[t])!=Number(r[t]))return Number(n[t])>Number(r[t])?1:-1;return 0}function u(){return n()}function c(t){return Object.keys(t).forEach((e=>{null!==t[e]&&void 0!==t[e]&&"object"==typeof t[e]&&c(t[e])})),Object.freeze(t)}function s(t,e,...n){const r=t(...n);return r.then((t=>{e&&e(void 0,t)})).catch((t=>{e&&e(t)})),r}function l(t,e,...n){const r=t(...n);return r.then((()=>{e&&e(null)})).catch((t=>{e&&e(t)})),r}function a(t,e,...n){const r=t(...n);return r.then((t=>{e&&e(null,t)})).catch((t=>{e&&e(t,null)})),r}function f(t,e,n){return new Promise(((r,o)=>{const i=setTimeout(o,e,n);t().then((t=>{clearTimeout(i),r(t)})).catch((t=>{clearTimeout(i),o(t)}))}))}function d(t){const e=new URL("https://teams.microsoft.com/l/entity/"+encodeURIComponent(t.appId.toString())+"/"+encodeURIComponent(t.pageId));return t.webUrl&&e.searchParams.append("webUrl",t.webUrl.toString()),(t.chatId||t.channelId||t.subPageId)&&e.searchParams.append("context",JSON.stringify({chatId:t.chatId,channelId:t.channelId,subEntityId:t.subPageId})),e.toString()}function h(t){return!(i(`${t.majorVersion}.${t.minorVersion}`,`${e.majorVersion}.${e.minorVersion}`)>=0)}function m(t){return"https:"===t.protocol}function p(e,n){return new Promise(((r,o)=>{if(e||o("MimeType cannot be null or empty."),n||o("Base64 string cannot be null or empty."),e.startsWith("image/")){const t=atob(n),o=new Uint8Array(t.length);for(let e=0;e<t.length;e++)o[e]=t.charCodeAt(e);r(new Blob([o],{type:e}))}const i=t.from(n,"base64").toString();r(new Blob([i],{type:e}))}))}function w(t){return new Promise(((e,n)=>{0===t.size&&n(new Error("Blob cannot be empty."));const r=new FileReader;r.onloadend=()=>{r.result?e(r.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},r.onerror=()=>{n(r.error)},r.readAsDataURL(t)}))}function b(){if(g())throw new Error("window object undefined at SSR check");return window}function g(){return"undefined"==typeof window}function y(t,e){if(U(t)||!function(t){return t.length<256&&t.length>4}(t)||!function(t){for(let e=0;e<t.length;e++){const n=t.charCodeAt(e);if(n<32||n>126)return!1}return!0}(t))throw e||new Error("id is not valid.")}function E(t,e){const n=t.toString().toLocaleLowerCase();if(U(n))throw new Error("Invalid Url");if(n.length>2048)throw new Error("Url exceeds the maximum size of 2048 characters");if(!m(t))throw new Error("Url should be a valid https url")}function I(t){const e=document.createElement("a");return e.href=t,new URL(e.href)}function U(t){return new RegExp(`${/<script[^>]*>|&lt;script[^&]*&gt;|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|&lt;\/script[^&]*&gt;|%3C\/script[^%]*%3E/gi.source}`,"gi").test(t)}function v(t){if(!t)throw new Error("id must not be empty");if(!1===r(t))throw new Error("id must be a valid UUID")}export{p as base64ToBlob,s as callCallbackWithErrorOrResultFromPromiseAndReturnPromise,a as callCallbackWithErrorOrResultOrNullFromPromiseAndReturnPromise,l as callCallbackWithSdkErrorFromPromiseAndReturnPromise,i as compareSDKVersions,d as createTeamsAppLink,c as deepFreeze,I as fullyQualifyUrlString,u as generateGUID,w as getBase64StringFromBlob,o as getGenericOnCompleteHandler,U as hasScriptTags,g as inServerSideRenderingEnvironment,h as isHostAdaptiveCardSchemaVersionUnsupported,m as isValidHttpsURL,f as runWithTimeout,b as ssrSafeWindow,y as validateId,E as validateUrl,v as validateUuid};
1
+ import{minAdaptiveCardVersion as t}from"../public/constants.js";import{base64ToString as e}from"./uint8array-extras/uint8array-extras.js";import r from"../../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/v4.js";import n from"../../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/validate.js";function o(t){return(t,e)=>{if(!t)throw new Error(e)}}function i(t,e){if("string"!=typeof t||"string"!=typeof e)return NaN;const r=t.split("."),n=e.split(".");function o(t){return/^\d+$/.test(t)}if(!r.every(o)||!n.every(o))return NaN;for(;r.length<n.length;)r.push("0");for(;n.length<r.length;)n.push("0");for(let t=0;t<r.length;++t)if(Number(r[t])!=Number(n[t]))return Number(r[t])>Number(n[t])?1:-1;return 0}function c(){return r()}function u(t){return Object.keys(t).forEach((e=>{null!==t[e]&&void 0!==t[e]&&"object"==typeof t[e]&&u(t[e])})),Object.freeze(t)}function s(t,e,...r){const n=t(...r);return n.then((t=>{e&&e(void 0,t)})).catch((t=>{e&&e(t)})),n}function a(t,e,...r){const n=t(...r);return n.then((()=>{e&&e(null)})).catch((t=>{e&&e(t)})),n}function f(t,e,...r){const n=t(...r);return n.then((t=>{e&&e(null,t)})).catch((t=>{e&&e(t,null)})),n}function l(t,e,r){return new Promise(((n,o)=>{const i=setTimeout(o,e,r);t().then((t=>{clearTimeout(i),n(t)})).catch((t=>{clearTimeout(i),o(t)}))}))}function p(t){const e=new URL("https://teams.microsoft.com/l/entity/"+encodeURIComponent(t.appId.toString())+"/"+encodeURIComponent(t.pageId));return t.webUrl&&e.searchParams.append("webUrl",t.webUrl.toString()),(t.chatId||t.channelId||t.subPageId)&&e.searchParams.append("context",JSON.stringify({chatId:t.chatId,channelId:t.channelId,subEntityId:t.subPageId})),e.toString()}function d(e){return!(i(`${e.majorVersion}.${e.minorVersion}`,`${t.majorVersion}.${t.minorVersion}`)>=0)}function m(t){return"https:"===t.protocol}function h(t,r){return new Promise(((n,o)=>{if(t||o("MimeType cannot be null or empty."),r||o("Base64 string cannot be null or empty."),t.startsWith("image/")){const o=e(r),i=new Uint8Array(o.length);for(let t=0;t<o.length;t++)i[t]=o.charCodeAt(t);n(new Blob([i],{type:t}))}const i=e(r);n(new Blob([i],{type:t}))}))}function w(t){return new Promise(((e,r)=>{0===t.size&&r(new Error("Blob cannot be empty."));const n=new FileReader;n.onloadend=()=>{n.result?e(n.result.toString().split(",")[1]):r(new Error("Failed to read the blob"))},n.onerror=()=>{r(n.error)},n.readAsDataURL(t)}))}function b(){if(g())throw new Error("window object undefined at SSR check");return window}function g(){return"undefined"==typeof window}function y(t,e){if(I(t)||!function(t){return t.length<256&&t.length>4}(t)||!function(t){for(let e=0;e<t.length;e++){const r=t.charCodeAt(e);if(r<32||r>126)return!1}return!0}(t))throw e||new Error("id is not valid.")}function j(t,e){const r=t.toString().toLocaleLowerCase();if(I(r))throw new Error("Invalid Url");if(r.length>2048)throw new Error("Url exceeds the maximum size of 2048 characters");if(!m(t))throw new Error("Url should be a valid https url")}function E(t){const e=document.createElement("a");return e.href=t,new URL(e.href)}function I(t){return new RegExp(`${/<script[^>]*>|&lt;script[^&]*&gt;|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|&lt;\/script[^&]*&gt;|%3C\/script[^%]*%3E/gi.source}`,"gi").test(t)}function v(t){if(!t)throw new Error("id must not be empty");if(!1===n(t))throw new Error("id must be a valid UUID")}const U=!!performance&&"now"in performance;function O(){return U?performance.now()+performance.timeOrigin:void 0}function N(t,e=0){if(e>1e3)return!1;if(void 0===t||"boolean"==typeof t||"number"==typeof t||"bigint"==typeof t||"string"==typeof t||null===t)return!0;if(Array.isArray(t))return t.every((t=>N(t,e+1)));return!("object"!=typeof t||"[object Object]"!==Object.prototype.toString.call(t)||Object.getPrototypeOf(t)!==Object.prototype&&null!==Object.getPrototypeOf(t))&&Object.keys(t).every((r=>N(t[r],e+1)))}export{h as base64ToBlob,s as callCallbackWithErrorOrResultFromPromiseAndReturnPromise,f as callCallbackWithErrorOrResultOrNullFromPromiseAndReturnPromise,a as callCallbackWithSdkErrorFromPromiseAndReturnPromise,i as compareSDKVersions,p as createTeamsAppLink,u as deepFreeze,E as fullyQualifyUrlString,c as generateGUID,w as getBase64StringFromBlob,O as getCurrentTimestamp,o as getGenericOnCompleteHandler,I as hasScriptTags,g as inServerSideRenderingEnvironment,d as isHostAdaptiveCardSchemaVersionUnsupported,N as isPrimitiveOrPlainObject,m as isValidHttpsURL,l as runWithTimeout,b as ssrSafeWindow,y as validateId,j as validateUrl,v as validateUuid};
@@ -1 +1 @@
1
- import{__awaiter as i}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{validOriginsCdnEndpoint as t,validOriginsFallback as r}from"./constants.js";import{GlobalVars as n}from"./globalVars.js";import{getLogger as s}from"./telemetry.js";import{inServerSideRenderingEnvironment as o,isValidHttpsURL as e}from"./utils.js";let l=[];const a=s("validateOrigin");function u(){return i(this,void 0,void 0,(function*(){yield d()}))}function d(){return i(this,void 0,void 0,(function*(){return 0!==l.length?l:o()?(l=r,r):fetch(t).then((i=>{if(!i.ok)throw new Error("Invalid Response from Fetch Call");return i.json().then((i=>{if(function(i){let t=JSON.parse(i);try{t=JSON.parse(i)}catch(i){return!1}if(!t.validOrigins)return!1;for(const i of t.validOrigins)try{new URL("https://"+i)}catch(t){return a("isValidOriginsFromCDN call failed to validate origin: %s",i),!1}return!0}(JSON.stringify(i)))return l=i.validOrigins,l;throw new Error("Valid Origins List Is Invalid")}))})).catch((i=>(a("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",i),l=r,l)))}))}function c(i,t){if("*."===i.substring(0,2)){const r=i.substring(1);if(t.length>r.length&&t.split(".").length===r.split(".").length&&t.substring(t.length-r.length)===r)return!0}else if(i===t)return!0;return!1}function f(i){return d().then((t=>{if(!e(i))return a("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",i,i.protocol),!1;const r=i.host;if(t.some((i=>c(i,r))))return!0;for(const i of n.additionalValidOrigins){if(c("https://"===i.substring(0,8)?i.substring(8):i,r))return!0}return a("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",i,t,n.additionalValidOrigins),!1}))}export{u as prefetchOriginsFromCDN,f as validateOrigin};
1
+ import{__awaiter as i}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{validOriginsCdnEndpoint as t,validOriginsFallback as r}from"./constants.js";import{GlobalVars as n}from"./globalVars.js";import{getLogger as s}from"./telemetry.js";import{inServerSideRenderingEnvironment as o,isValidHttpsURL as e}from"./utils.js";let l=[];const a=s("validateOrigin");function u(){return i(this,void 0,void 0,(function*(){yield d()}))}function d(){return i(this,void 0,void 0,(function*(){return 0!==l.length?l:o()?(l=r,r):fetch(t).then((i=>{if(!i.ok)throw new Error("Invalid Response from Fetch Call");return i.json().then((i=>{if(function(i){let t=JSON.parse(i);try{t=JSON.parse(i)}catch(i){return!1}if(!t.validOrigins)return!1;for(const i of t.validOrigins)try{new URL("https://"+i)}catch(t){return a("isValidOriginsFromCDN call failed to validate origin: %s",i),!1}return!0}(JSON.stringify(i)))return l=i.validOrigins,l;throw new Error("Valid Origins List Is Invalid")}))})).catch((i=>(a("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",i),l=r,l)))}))}function c(i,t){if("*."===i.substring(0,2)){const r=i.substring(1);if(t.length>r.length&&t.split(".").length===r.split(".").length&&t.substring(t.length-r.length)===r)return!0}else if(i===t)return!0;return!1}function f(i){return d().then((t=>{if(!e(i))return a("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",i,i.protocol),!1;const r=i.host;if(t.some((i=>c(i,r))))return!0;for(const i of n.additionalValidOrigins){if(c("https://"===i.substring(0,8)?i.substring(8):i,r))return!0}return a("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",i,t,n.additionalValidOrigins),!1}))}export{u as prefetchOriginsFromCDN,f as validateOrigin};
@@ -1 +1 @@
1
- import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{errorNotSupportedOnPlatform as t}from"../public/constants.js";import{videoEffects as r}from"../public/videoEffects.js";import{sendMessageToParent as i}from"./communication.js";import{registerHandler as o}from"./handlers.js";import{getApiVersionTag as a}from"./telemetry.js";import{inServerSideRenderingEnvironment as n,ssrSafeWindow as s}from"./utils.js";const d="v2";function h(t,r,i,o){var a,s;return e(this,void 0,void 0,(function*(){const e=u();!n()&&(null===(s=null===(a=window.chrome)||void 0===a?void 0:a.webview)||void 0===s||s.registerTextureStream(t,e)),l(yield f(t,i,o),new m(i,r),e.writable)}))}function c(t,r,i,o){var a,s;return e(this,void 0,void 0,(function*(){const e=u();!n()&&(null===(s=null===(a=window.chrome)||void 0===a?void 0:a.webview)||void 0===s||s.registerTextureStream(t,e)),l(yield f(t,i,o),new v(i,r),e.writable)}))}function f(r,i,o){return e(this,void 0,void 0,(function*(){if(n())throw t;const e=s().chrome;try{null==o||o.reportGettingTextureStream(r);const t=(yield e.webview.getTextureStream(r)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${r}`);return null==o||o.reportTextureStreamAcquired(),t[0]}catch(e){throw i(`Failed to get video track from stream ${r}, error: ${e}`),new Error(`Internal error: can't get video track from stream ${r}`)}}))}function u(){if(n())throw t;const e=window.MediaStreamTrackGenerator;if(!e)throw t;return new e({kind:"video"})}function l(e,t,r){new(0,s().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(r)}class m{constructor(t,r){this.notifyError=t,this.videoFrameHandler=r,this.transform=(t,r)=>e(this,void 0,void 0,(function*(){const e=t.timestamp;if(null!==e)try{const i=yield this.videoFrameHandler({videoFrame:t}),o=new VideoFrame(i,{timestamp:e});r.enqueue(o),t.close(),i.close()}catch(e){t.close(),this.notifyError(e)}else this.notifyError("timestamp of the original video frame is null")}))}}class w{constructor(e,t){if(this.headerBuffer=e,this.notifyError=t,this.ONE_TEXTURE_INPUT_ID=1869900081,this.INVALID_HEADER_ERROR="Invalid video frame header",this.UNSUPPORTED_LAYOUT_ERROR="Unsupported texture layout",this.headerDataView=new Uint32Array(e),this.headerDataView.length<8)throw this.notifyError(this.INVALID_HEADER_ERROR),new Error(this.INVALID_HEADER_ERROR);if(this.headerDataView[0]!==this.ONE_TEXTURE_INPUT_ID)throw this.notifyError(this.UNSUPPORTED_LAYOUT_ERROR),new Error(this.UNSUPPORTED_LAYOUT_ERROR)}get oneTextureLayoutId(){return this.headerDataView[0]}get version(){return this.headerDataView[1]}get frameRowOffset(){return this.headerDataView[2]}get frameFormat(){return this.headerDataView[3]}get frameWidth(){return this.headerDataView[4]}get frameHeight(){return this.headerDataView[5]}get multiStreamHeaderRowOffset(){return this.headerDataView[6]}get multiStreamCount(){return this.headerDataView[7]}}class E{constructor(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161,this.ATTRIBUTE_ID_MAP_STREAM_ID=1296320833;const r=new Uint32Array(e);for(let i=0,o=0;i<t;i++){const t=r[o++],i=r[o++],a=r[o++],n=new Uint8Array(e,i,a);this.metadataMap.set(t,n)}}get audioInferenceResult(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)}get attributes(){const e=this.metadataMap.get(this.ATTRIBUTE_ID_MAP_STREAM_ID);if(void 0===e)return;const t=new Map,r=new TextDecoder("utf-8");let i=0;const o=e[i]+(e[++i]<<8)+(e[++i]<<16)+(e[++i]<<24);for(let a=0;a<o&&i<e.length-1;a++){const o=e[++i]+(e[++i]<<8)+(e[++i]<<16)+(e[++i]<<24),a=e.findIndex(((e,t,r)=>0==e&&t>i)),n=r.decode(e.slice(++i,a)),s=this.metadataMap.get(o);void 0!==s&&t.set(n,s);i=a+(4-(a-i)%4-1)}return t}}class v{constructor(r,i){this.notifyError=r,this.videoFrameHandler=i,this.shouldDiscardAudioInferenceResult=!1,this.transform=(t,r)=>e(this,void 0,void 0,(function*(){const e=t.timestamp;if(null!==e)try{const{videoFrame:i,metadata:{audioInferenceResult:o,attributes:a}={}}=yield this.extractVideoFrameAndMetadata(t),n=yield this.videoFrameHandler({videoFrame:i,audioInferenceResult:o,attributes:a}),s=new VideoFrame(n,{timestamp:e});r.enqueue(s),i.close(),t.close(),n.close()}catch(e){t.close(),this.notifyError(e)}else this.notifyError("timestamp of the original video frame is null")})),this.extractVideoFrameAndMetadata=r=>e(this,void 0,void 0,(function*(){if(n())throw t;if("NV12"!==r.format)throw this.notifyError("Unsupported video frame pixel format"),new Error("Unsupported video frame pixel format");const e={x:0,y:0,width:r.codedWidth,height:2},i=new ArrayBuffer(e.width*e.height*3/2);yield r.copyTo(i,{rect:e});const o=new w(i,this.notifyError),a={x:0,y:o.multiStreamHeaderRowOffset,width:r.codedWidth,height:r.codedHeight-o.multiStreamHeaderRowOffset},s=new ArrayBuffer(a.width*a.height*3/2);yield r.copyTo(s,{rect:a});const d=new E(s,o.multiStreamCount);return{videoFrame:new VideoFrame(r,{timestamp:r.timestamp,visibleRect:{x:0,y:o.frameRowOffset,width:o.frameWidth,height:o.frameHeight}}),metadata:{audioInferenceResult:this.shouldDiscardAudioInferenceResult?void 0:d.audioInferenceResult,attributes:d.attributes}}})),o(a(d,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function p(e,t){return(o,n)=>{null==t||t.reportApplyingVideoEffect(o||"",n),e(o,n).then((()=>{null==t||t.reportVideoEffectChanged(o||"",n),i(a(d,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,o,void 0,n])})).catch((e=>{const t=e in r.EffectFailureReason?e:r.EffectFailureReason.InitializationFailure;i(a(d,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,o,t,n])}))}}export{p as createEffectParameterChangeCallback,h as processMediaStream,c as processMediaStreamWithMetadata};
1
+ import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{errorNotSupportedOnPlatform as t}from"../public/constants.js";import{EffectFailureReason as r}from"../public/videoEffects.js";import{sendMessageToParent as i}from"./communication.js";import{registerHandler as o}from"./handlers.js";import{getApiVersionTag as a}from"./telemetry.js";import{inServerSideRenderingEnvironment as n,ssrSafeWindow as s}from"./utils.js";const d="v2";function h(t,r,i,o){var a,s;return e(this,void 0,void 0,(function*(){const e=f();!n()&&(null===(s=null===(a=window.chrome)||void 0===a?void 0:a.webview)||void 0===s||s.registerTextureStream(t,e)),l(yield u(t,i,o),new m(i,r),e.writable)}))}function c(t,r,i,o){var a,s;return e(this,void 0,void 0,(function*(){const e=f();!n()&&(null===(s=null===(a=window.chrome)||void 0===a?void 0:a.webview)||void 0===s||s.registerTextureStream(t,e)),l(yield u(t,i,o),new v(i,r),e.writable)}))}function u(r,i,o){return e(this,void 0,void 0,(function*(){if(n())throw t;const e=s().chrome;try{null==o||o.reportGettingTextureStream(r);const t=(yield e.webview.getTextureStream(r)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${r}`);return null==o||o.reportTextureStreamAcquired(),t[0]}catch(e){throw i(`Failed to get video track from stream ${r}, error: ${e}`),new Error(`Internal error: can't get video track from stream ${r}`)}}))}function f(){if(n())throw t;const e=window.MediaStreamTrackGenerator;if(!e)throw t;return new e({kind:"video"})}function l(e,t,r){new(0,s().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(r)}class m{constructor(t,r){this.notifyError=t,this.videoFrameHandler=r,this.transform=(t,r)=>e(this,void 0,void 0,(function*(){const e=t.timestamp;if(null!==e)try{const i=yield this.videoFrameHandler({videoFrame:t}),o=new VideoFrame(i,{timestamp:e});r.enqueue(o),t.close(),i.close()}catch(e){t.close(),this.notifyError(e)}else this.notifyError("timestamp of the original video frame is null")}))}}class w{constructor(e,t){if(this.headerBuffer=e,this.notifyError=t,this.ONE_TEXTURE_INPUT_ID=1869900081,this.INVALID_HEADER_ERROR="Invalid video frame header",this.UNSUPPORTED_LAYOUT_ERROR="Unsupported texture layout",this.headerDataView=new Uint32Array(e),this.headerDataView.length<8)throw this.notifyError(this.INVALID_HEADER_ERROR),new Error(this.INVALID_HEADER_ERROR);if(this.headerDataView[0]!==this.ONE_TEXTURE_INPUT_ID)throw this.notifyError(this.UNSUPPORTED_LAYOUT_ERROR),new Error(this.UNSUPPORTED_LAYOUT_ERROR)}get oneTextureLayoutId(){return this.headerDataView[0]}get version(){return this.headerDataView[1]}get frameRowOffset(){return this.headerDataView[2]}get frameFormat(){return this.headerDataView[3]}get frameWidth(){return this.headerDataView[4]}get frameHeight(){return this.headerDataView[5]}get multiStreamHeaderRowOffset(){return this.headerDataView[6]}get multiStreamCount(){return this.headerDataView[7]}}class E{constructor(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161,this.ATTRIBUTE_ID_MAP_STREAM_ID=1296320833;const r=new Uint32Array(e);for(let i=0,o=0;i<t;i++){const t=r[o++],i=r[o++],a=r[o++],n=new Uint8Array(e,i,a);this.metadataMap.set(t,n)}}get audioInferenceResult(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)}get attributes(){const e=this.metadataMap.get(this.ATTRIBUTE_ID_MAP_STREAM_ID);if(void 0===e)return;const t=new Map,r=new TextDecoder("utf-8");let i=0;const o=e[i]+(e[++i]<<8)+(e[++i]<<16)+(e[++i]<<24);for(let a=0;a<o&&i<e.length-1;a++){const o=e[++i]+(e[++i]<<8)+(e[++i]<<16)+(e[++i]<<24),a=e.findIndex(((e,t,r)=>0==e&&t>i)),n=r.decode(e.slice(++i,a)),s=this.metadataMap.get(o);void 0!==s&&t.set(n,s);i=a+(4-(a-i)%4-1)}return t}}class v{constructor(r,i){this.notifyError=r,this.videoFrameHandler=i,this.shouldDiscardAudioInferenceResult=!1,this.transform=(t,r)=>e(this,void 0,void 0,(function*(){const e=t.timestamp;if(null!==e)try{const{videoFrame:i,metadata:{audioInferenceResult:o,attributes:a}={}}=yield this.extractVideoFrameAndMetadata(t),n=yield this.videoFrameHandler({videoFrame:i,audioInferenceResult:o,attributes:a}),s=new VideoFrame(n,{timestamp:e});r.enqueue(s),i.close(),t.close(),n.close()}catch(e){t.close(),this.notifyError(e)}else this.notifyError("timestamp of the original video frame is null")})),this.extractVideoFrameAndMetadata=r=>e(this,void 0,void 0,(function*(){if(n())throw t;if("NV12"!==r.format)throw this.notifyError("Unsupported video frame pixel format"),new Error("Unsupported video frame pixel format");const e={x:0,y:0,width:r.codedWidth,height:2},i=new ArrayBuffer(e.width*e.height*3/2);yield r.copyTo(i,{rect:e});const o=new w(i,this.notifyError),a={x:0,y:o.multiStreamHeaderRowOffset,width:r.codedWidth,height:r.codedHeight-o.multiStreamHeaderRowOffset},s=new ArrayBuffer(a.width*a.height*3/2);yield r.copyTo(s,{rect:a});const d=new E(s,o.multiStreamCount);return{videoFrame:new VideoFrame(r,{timestamp:r.timestamp,visibleRect:{x:0,y:o.frameRowOffset,width:o.frameWidth,height:o.frameHeight}}),metadata:{audioInferenceResult:this.shouldDiscardAudioInferenceResult?void 0:d.audioInferenceResult,attributes:d.attributes}}})),o(a(d,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function p(e,t){return(o,n)=>{null==t||t.reportApplyingVideoEffect(o||"",n),e(o,n).then((()=>{null==t||t.reportVideoEffectChanged(o||"",n),i(a(d,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,o,void 0,n])})).catch((e=>{const t=e in r?e:r.InitializationFailure;i(a(d,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,o,t,n])}))}}export{p as createEffectParameterChangeCallback,h as processMediaStream,c as processMediaStreamWithMetadata};
@@ -0,0 +1 @@
1
+ const o=10;export{o as maxVisualMediaSelectionLimit};
@@ -0,0 +1 @@
1
+ import{__awaiter as p}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{getContext as l}from"../public/app/app.js";let t=null;function o(){return p(this,void 0,void 0,(function*(){return null===t&&(t=(yield l()).app.host.name),t}))}export{t as cachedHostName,o as getCachedHostName};
@@ -1 +1 @@
1
- import{sendMessageToParent as t}from"../internal/communication.js";import{ensureInitialized as n}from"../internal/internalAPIs.js";import{getApiVersionTag as p}from"../internal/telemetry.js";import{FrameContexts as r,errorNotSupportedOnPlatform as i}from"../public/constants.js";import{runtime as e}from"../public/runtime.js";var o;!function(o){function l(){return!(!n(e)||!e.supports.appEntity)}o.selectAppEntity=function(o,a,c,m){if(n(e,r.content),!l())throw i;if(!o||0==o.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!m)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");t(p("v1","appEntity.selectAppEntity"),"appEntity.selectAppEntity",[o,a,c],m)},o.isSupported=l}(o||(o={}));export{o as appEntity};
1
+ import{sendMessageToParent as t}from"../internal/communication.js";import{ensureInitialized as n}from"../internal/internalAPIs.js";import{getApiVersionTag as r}from"../internal/telemetry.js";import{FrameContexts as p,errorNotSupportedOnPlatform as i}from"../public/constants.js";import{runtime as e}from"../public/runtime.js";function o(o,a,m,c){if(n(e,p.content),!l())throw i;if(!o||0==o.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!c)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");t(r("v1","appEntity.selectAppEntity"),"appEntity.selectAppEntity",[o,a,m],c)}function l(){return!(!n(e)||!e.supports.appEntity)}export{l as isSupported,o as selectAppEntity};
@@ -1 +1 @@
1
- import{sendAndHandleStatusAndReason as n,sendMessageToParent as o,sendAndUnwrap as t}from"../internal/communication.js";import{registerHandler as e,removeHandler as r}from"../internal/handlers.js";import{ensureInitialized as i}from"../internal/internalAPIs.js";import{getApiVersionTag as s}from"../internal/telemetry.js";import{FrameContexts as a,errorNotSupportedOnPlatform as c}from"../public/constants.js";import{runtime as v}from"../public/runtime.js";const l="v1";var d;!function(d){function u(){return!(!i(v)||!v.supports.conversations)}d.openConversation=function(o){return new Promise((t=>{if(i(v,a.content),!u())throw c;const r=n(s(l,"conversations.openConversation"),"conversations.openConversation",{title:o.title,subEntityId:o.subEntityId,conversationId:o.conversationId,channelId:o.channelId,entityId:o.entityId});o.onStartConversation&&e(s(l,"conversations.registerStartConversationHandler"),"startConversation",((n,t,e,r)=>{var i;return null===(i=o.onStartConversation)||void 0===i?void 0:i.call(o,{subEntityId:n,conversationId:t,channelId:e,entityId:r})})),o.onCloseConversation&&e(s(l,"conversations.registerCloseConversationHandler"),"closeConversation",((n,t,e,r)=>{var i;return null===(i=o.onCloseConversation)||void 0===i?void 0:i.call(o,{subEntityId:n,conversationId:t,channelId:e,entityId:r})})),t(r)}))},d.closeConversation=function(){if(i(v,a.content),!u())throw c;o(s(l,"conversations.closeConversation"),"conversations.closeConversation"),r("startConversation"),r("closeConversation")},d.getChatMembers=function(){return new Promise((n=>{if(i(v),!u())throw c;n(t(s(l,"conversations.getChatMember"),"getChatMembers"))}))},d.isSupported=u}(d||(d={}));export{d as conversations};
1
+ import{sendAndHandleStatusAndReason as n,sendMessageToParent as o,sendAndUnwrap as t}from"../internal/communication.js";import{registerHandler as e,removeHandler as r}from"../internal/handlers.js";import{ensureInitialized as i}from"../internal/internalAPIs.js";import{getApiVersionTag as s}from"../internal/telemetry.js";import{FrameContexts as a,errorNotSupportedOnPlatform as c}from"../public/constants.js";import{runtime as v}from"../public/runtime.js";const l="v1";function d(o){return new Promise((t=>{if(i(v,a.content),!C())throw c;const r=n(s(l,"conversations.openConversation"),"conversations.openConversation",{title:o.title,subEntityId:o.subEntityId,conversationId:o.conversationId,channelId:o.channelId,entityId:o.entityId});o.onStartConversation&&e(s(l,"conversations.registerStartConversationHandler"),"startConversation",((n,t,e,r)=>{var i;return null===(i=o.onStartConversation)||void 0===i?void 0:i.call(o,{subEntityId:n,conversationId:t,channelId:e,entityId:r})})),o.onCloseConversation&&e(s(l,"conversations.registerCloseConversationHandler"),"closeConversation",((n,t,e,r)=>{var i;return null===(i=o.onCloseConversation)||void 0===i?void 0:i.call(o,{subEntityId:n,conversationId:t,channelId:e,entityId:r})})),t(r)}))}function m(){if(i(v,a.content),!C())throw c;o(s(l,"conversations.closeConversation"),"conversations.closeConversation"),r("startConversation"),r("closeConversation")}function u(){return new Promise((n=>{if(i(v),!C())throw c;n(t(s(l,"conversations.getChatMember"),"getChatMembers"))}))}function C(){return!(!i(v)||!v.supports.conversations)}export{m as closeConversation,u as getChatMembers,C as isSupported,d as openConversation};
@@ -0,0 +1 @@
1
+ import*as i from"./eligibility.js";export{i as eligibility};
@@ -0,0 +1 @@
1
+ import{__awaiter as i}from"../../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendAndUnwrap as o}from"../../internal/communication.js";import{ensureInitialized as r}from"../../internal/internalAPIs.js";import{getLogger as t,getApiVersionTag as n}from"../../internal/telemetry.js";import{errorNotSupportedOnPlatform as e}from"../../public/constants.js";import{isSdkError as l}from"../../public/interfaces.js";import{runtime as s}from"../../public/runtime.js";const p=t("copilot");function a(){var i,o;return r(s)&&(!!(null===(i=s.hostVersionsInfo)||void 0===i?void 0:i.appEligibilityInformation)||!!(null===(o=s.supports.copilot)||void 0===o?void 0:o.eligibility))}function m(){var t,m;return i(this,void 0,void 0,(function*(){if(r(s),!a())throw new Error(`Error code: ${e.errorCode}, message: Not supported on platform`);if(null===(t=s.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)return p("Eligibility information is already available on runtime."),s.hostVersionsInfo.appEligibilityInformation;p("Eligibility information is not available on runtime. Requesting from host.");const i=yield o(n("v2","copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo");if(l(i))throw new Error(`Error code: ${i.errorCode}, message: ${null!==(m=i.message)&&void 0!==m?m:"Failed to get eligibility information from the host."}`);if(!function(i){if(void 0===i.ageGroup||void 0===i.cohort||void 0===i.userClassification||void 0===i.isCopilotEligible||void 0===i.isCopilotEnabledRegion||void 0===i.isOptedOutByAdmin)return!1;return!0}(i))throw new Error("Error deserializing eligibility information");return i}))}export{m as getEligibilityInfo,a as isSupported};
@@ -1 +1 @@
1
- import{sendMessageToParentAsync as e}from"../internal/communication.js";import{ensureInitialized as t}from"../internal/internalAPIs.js";import{ResponseHandler as n}from"../internal/responseHandler.js";import{getApiVersionTag as i}from"../internal/telemetry.js";import{validateId as o,validateUrl as r}from"../internal/utils.js";import{FrameContexts as s,errorNotSupportedOnPlatform as a}from"../public/constants.js";import{runtime as u}from"../public/runtime.js";import{AppId as c}from"../public/appId.js";const h="v2";var l;!function(l){let p;var f;l.SerializableActionExecuteInvokeRequest=class{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}},l.isActionExecuteResponse=function(e){const t=e;return t.responseType===l.InvokeResponseType.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type},l.ActionExecuteInvokeRequestType="Action.Execute",function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(p=l.OriginalRequestType||(l.OriginalRequestType={})),(f=l.InvokeResponseType||(l.InvokeResponseType={})).ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",f.QueryMessageExtensionResponse="QueryMessageExtensionResponse";let R;function d(e){if(e.requestType===p.ActionExecuteInvokeRequest){const t=e;if(t.type!==l.ActionExecuteInvokeRequestType){throw{errorCode:R.INTERNAL_ERROR,message:`Invalid action type ${t.type}. Action type must be "${l.ActionExecuteInvokeRequestType}"`}}}else if(e.requestType===p.QueryMessageExtensionRequest){if(e.commandId.length>64)throw new Error("originalRequestInfo.commandId exceeds the maximum size of 64 characters");if(e.parameters.length>5)throw new Error("originalRequestInfo.parameters exceeds the maximum size of 5");for(const t of e.parameters){if(t.name.length>64)throw new Error("originalRequestInfo.parameters.name exceeds the maximum size of 64 characters");if(t.value.length>512)throw new Error("originalRequestInfo.parameters.value exceeds the maximum size of 512 characters")}}}function m(){return!(!t(u)||!u.supports.externalAppAuthentication)}l.ActionExecuteResponseHandler=class extends n{validate(e){return l.isActionExecuteResponse(e)}deserialize(e){return e}},l.isInvokeError=function(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(l.InvokeErrorCode).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)},function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(R=l.InvokeErrorCode||(l.InvokeErrorCode={})),l.authenticateAndResendRequest=function(n,o,r){if(t(u,s.content),!m())throw a;const l=new c(n);return d(r),e(i(h,"externalAppAuthentication.authenticateAndResendRequest"),"externalAppAuthentication.authenticateAndResendRequest",[l.toString(),r,o.url.href,o.width,o.height,o.isExternal]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))},l.authenticateWithSSO=function(n,o){if(t(u,s.content),!m())throw a;const r=new c(n);return e(i(h,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[r.toString(),o.claims,o.silent]).then((([e,t])=>{if(!e)throw t}))},l.authenticateWithSSOAndResendRequest=function(n,o,r){if(t(u,s.content),!m())throw a;const l=new c(n);return d(r),e(i(h,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[l.toString(),r,o.claims,o.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))},l.authenticateWithOauth2=function(n,r,c){if(t(u,s.content),!m())throw a;return o(n,new Error("titleId is Invalid.")),o(r,new Error("oauthConfigId is Invalid.")),e(i(h,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[n,r,c.width,c.height,c.isExternal]).then((([e,t])=>{if(!e)throw t}))},l.authenticateWithPowerPlatformConnectorPlugins=function(n,c,l){if(t(u,s.content),!m())throw a;return o(n,new Error("titleId is Invalid.")),c&&r(c),e(i(h,"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins"),"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins",[n,null==c?void 0:c.toString(),null==l?void 0:l.width,null==l?void 0:l.height,null==l?void 0:l.isExternal]).then((([e,t])=>{if(!e)throw t}))},l.isSupported=m}(l||(l={}));export{l as externalAppAuthentication};
1
+ import{sendMessageToParentAsync as e}from"../internal/communication.js";import{ensureInitialized as t}from"../internal/internalAPIs.js";import{ResponseHandler as n}from"../internal/responseHandler.js";import{getApiVersionTag as i}from"../internal/telemetry.js";import{isPrimitiveOrPlainObject as r,validateId as o,validateUrl as s}from"../internal/utils.js";import{FrameContexts as a,errorNotSupportedOnPlatform as u}from"../public/constants.js";import{runtime as c}from"../public/runtime.js";import{AppId as h}from"../public/appId.js";const l="v2";class p{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function f(e){const t=e;return t.responseType===R.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const m="Action.Execute";var d,R,A;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(d||(d={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(R||(R={}));class x extends n{validate(e){return f(e)}deserialize(e){return e}}function w(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(A).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function E(e){e.requestType===d.ActionExecuteInvokeRequest?v(e):e.requestType===d.QueryMessageExtensionRequest&&function(e){if(e.commandId.length>64)throw new Error("originalRequestInfo.commandId exceeds the maximum size of 64 characters");if(e.parameters.length>5)throw new Error("originalRequestInfo.parameters exceeds the maximum size of 5");for(const t of e.parameters){if(t.name.length>64)throw new Error("originalRequestInfo.parameters.name exceeds the maximum size of 64 characters");if(t.value.length>512)throw new Error("originalRequestInfo.parameters.value exceeds the maximum size of 512 characters")}}(e)}function v(e){if(e.type!==m){throw{errorCode:A.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${m}"`}}if(!r(e.data)){throw{errorCode:A.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function g(n,r,o){if(t(c,a.content),!j())throw u;const s=new h(n);return E(o),e(i(l,"externalAppAuthentication.authenticateAndResendRequest"),"externalAppAuthentication.authenticateAndResendRequest",[s.toString(),o,r.url.href,r.width,r.height,r.isExternal]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function I(n,r){if(t(c,a.content),!j())throw u;const o=new h(n);return e(i(l,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[o.toString(),r.claims,r.silent]).then((([e,t])=>{if(!e)throw t}))}function y(n,r,o){if(t(c,a.content),!j())throw u;const s=new h(n);return E(o),e(i(l,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[s.toString(),o,r.claims,r.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function q(n,r,s){if(t(c,a.content),!j())throw u;return o(n,new Error("titleId is Invalid.")),o(r,new Error("oauthConfigId is Invalid.")),e(i(l,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[n,r,s.width,s.height,s.isExternal]).then((([e,t])=>{if(!e)throw t}))}function S(n,r,h){if(t(c,a.content),!j())throw u;return o(n,new Error("titleId is Invalid.")),r&&s(r),e(i(l,"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins"),"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins",[n,null==r?void 0:r.toString(),null==h?void 0:h.width,null==h?void 0:h.height,null==h?void 0:h.isExternal]).then((([e,t])=>{if(!e)throw t}))}function j(){return!(!t(c)||!c.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(A||(A={}));export{m as ActionExecuteInvokeRequestType,x as ActionExecuteResponseHandler,A as InvokeErrorCode,R as InvokeResponseType,d as OriginalRequestType,p as SerializableActionExecuteInvokeRequest,g as authenticateAndResendRequest,q as authenticateWithOauth2,S as authenticateWithPowerPlatformConnectorPlugins,I as authenticateWithSSO,y as authenticateWithSSOAndResendRequest,f as isActionExecuteResponse,w as isInvokeError,j as isSupported,v as validateActionExecuteInvokeRequest};
@@ -1 +1 @@
1
- import{__awaiter as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{callFunctionInHost as e,callFunctionInHostAndHandleResponse as n}from"../internal/communication.js";import{ensureInitialized as i}from"../internal/internalAPIs.js";import{getApiVersionTag as o}from"../internal/telemetry.js";import{validateId as r}from"../internal/utils.js";import{FrameContexts as a,errorNotSupportedOnPlatform as u}from"../public/constants.js";import{runtime as s}from"../public/runtime.js";import{externalAppAuthentication as c}from"./externalAppAuthentication.js";const p="v2";var h;!function(h){function l(){return!(!i(s)||!s.supports.externalAppAuthenticationForCEA)}function A(t){if(t.type!==c.ActionExecuteInvokeRequestType){throw{errorCode:c.InvokeErrorCode.INTERNAL_ERROR,message:`Invalid action type ${t.type}. Action type must be "${c.ActionExecuteInvokeRequestType}"`}}}h.authenticateWithSSO=function(n,h,A){return t(this,void 0,void 0,(function*(){if(i(s,a.content),!l())throw u;return r(h,new Error("conversation id is not valid.")),e("externalAppAuthenticationForCEA.authenticateWithSSO",[n,h,A.claims,A.silent],o(p,"externalAppAuthenticationForCEA.authenticateWithSSO"),c.isInvokeError)}))},h.authenticateWithOauth=function(n,h,A){return t(this,void 0,void 0,(function*(){if(i(s,a.content),!l())throw u;return r(h,new Error("conversation id is not valid.")),e("externalAppAuthenticationForCEA.authenticateWithOauth",[n,h,A.url.href,A.width,A.height,A.isExternal],o(p,"externalAppAuthenticationForCEA.authenticateWithOauth"),c.isInvokeError)}))},h.authenticateAndResendRequest=function(e,h,d,v){return t(this,void 0,void 0,(function*(){if(i(s,a.content),!l())throw u;return r(h,new Error("conversation id is not valid.")),A(v),n("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,h,new c.SerializableActionExecuteInvokeRequest(v),d.url.href,d.width,d.height,d.isExternal],new c.ActionExecuteResponseHandler,o(p,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),c.isInvokeError)}))},h.authenticateWithSSOAndResendRequest=function(e,h,d,v){return t(this,void 0,void 0,(function*(){if(i(s,a.content),!l())throw u;return r(h,new Error("conversation id is not valid.")),A(v),n("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,h,new c.SerializableActionExecuteInvokeRequest(v),d.claims,d.silent],new c.ActionExecuteResponseHandler,o(p,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),c.isInvokeError)}))},h.isSupported=l}(h||(h={}));export{h as externalAppAuthenticationForCEA};
1
+ import{__awaiter as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{validateAppIdInstance as n}from"../internal/appIdValidation.js";import{callFunctionInHost as e,callFunctionInHostAndHandleResponse as i}from"../internal/communication.js";import{ensureInitialized as r}from"../internal/internalAPIs.js";import{getApiVersionTag as o}from"../internal/telemetry.js";import{validateId as u}from"../internal/utils.js";import{FrameContexts as a,errorNotSupportedOnPlatform as p}from"../public/constants.js";import{runtime as s}from"../public/runtime.js";import{validateActionExecuteInvokeRequest as c,ActionExecuteResponseHandler as h,SerializableActionExecuteInvokeRequest as l,isInvokeError as A}from"./externalAppAuthentication.js";const m="v2";function d(n,i,u){return t(this,void 0,void 0,(function*(){if(r(s,a.content),!v())throw p;return w(n,i),e("externalAppAuthenticationForCEA.authenticateWithSSO",[n,i,u.claims,u.silent],o(m,"externalAppAuthenticationForCEA.authenticateWithSSO"),A)}))}function f(n,i,u){return t(this,void 0,void 0,(function*(){if(r(s,a.content),!v())throw p;return w(n,i),e("externalAppAuthenticationForCEA.authenticateWithOauth",[n,i,u.url.href,u.width,u.height,u.isExternal],o(m,"externalAppAuthenticationForCEA.authenticateWithOauth"),A)}))}function x(n,e,u,d){return t(this,void 0,void 0,(function*(){if(r(s,a.content),!v())throw p;return w(n,e),c(d),i("externalAppAuthenticationForCEA.authenticateAndResendRequest",[n,e,new l(d),u.url.href,u.width,u.height,u.isExternal],new h,o(m,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),A)}))}function E(n,e,u,d){return t(this,void 0,void 0,(function*(){if(r(s,a.content),!v())throw p;return w(n,e),c(d),i("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[n,e,new l(d),u.claims,u.silent],new h,o(m,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),A)}))}function v(){return!(!r(s)||!s.supports.externalAppAuthenticationForCEA)}function w(t,e){u(e,new Error("conversation id is not valid.")),n(t)}export{x as authenticateAndResendRequest,f as authenticateWithOauth,d as authenticateWithSSO,E as authenticateWithSSOAndResendRequest,v as isSupported,w as validateInput};
@@ -1 +1 @@
1
- import{sendMessageToParentAsync as r}from"../internal/communication.js";import{ensureInitialized as n}from"../internal/internalAPIs.js";import{getApiVersionTag as e}from"../internal/telemetry.js";import{FrameContexts as t,errorNotSupportedOnPlatform as o}from"../public/constants.js";import{runtime as i}from"../public/runtime.js";import{AppId as p}from"../public/appId.js";var c;!function(c){var s,A;function l(){return!(!n(i)||!i.supports.externalAppCardActions)}(s=c.ActionOpenUrlType||(c.ActionOpenUrlType={})).DeepLinkDialog="DeepLinkDialog",s.DeepLinkOther="DeepLinkOther",s.DeepLinkStageView="DeepLinkStageView",s.GenericUrl="GenericUrl",(A=c.ActionOpenUrlErrorCode||(c.ActionOpenUrlErrorCode={})).INTERNAL_ERROR="INTERNAL_ERROR",A.INVALID_LINK="INVALID_LINK",A.NOT_SUPPORTED="NOT_SUPPORTED",c.processActionSubmit=function(c,s){if(n(i,t.content),!l())throw o;const A=new p(c);return r(e("v2","externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[A.toString(),s]).then((([r,n])=>{if(!r)throw n}))},c.processActionOpenUrl=function(c,s,A){if(n(i,t.content),!l())throw o;const a=new p(c);return r(e("v2","externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[a.toString(),s.href,A]).then((([r,n])=>{if(r)throw r;return n}))},c.isSupported=l}(c||(c={}));export{c as externalAppCardActions};
1
+ import{sendMessageToParentAsync as n}from"../internal/communication.js";import{ensureInitialized as t}from"../internal/internalAPIs.js";import{getApiVersionTag as e}from"../internal/telemetry.js";import{FrameContexts as r,errorNotSupportedOnPlatform as i}from"../public/constants.js";import{runtime as o}from"../public/runtime.js";import{AppId as p}from"../public/appId.js";var c,s;function a(c,s){if(t(o,r.content),!A())throw i;const a=new p(c);return n(e("v2","externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[a.toString(),s]).then((([n,t])=>{if(!n)throw t}))}function l(c,s,a){if(t(o,r.content),!A())throw i;const l=new p(c);return n(e("v2","externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[l.toString(),s.href,a]).then((([n,t])=>{if(n)throw n;return t}))}function A(){return!(!t(o)||!o.supports.externalAppCardActions)}!function(n){n.DeepLinkDialog="DeepLinkDialog",n.DeepLinkOther="DeepLinkOther",n.DeepLinkStageView="DeepLinkStageView",n.GenericUrl="GenericUrl"}(c||(c={})),function(n){n.INTERNAL_ERROR="INTERNAL_ERROR",n.INVALID_LINK="INVALID_LINK",n.NOT_SUPPORTED="NOT_SUPPORTED"}(s||(s={}));export{s as ActionOpenUrlErrorCode,c as ActionOpenUrlType,A as isSupported,l as processActionOpenUrl,a as processActionSubmit};
@@ -1 +1 @@
1
- import{__awaiter as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParentAsync as o,sendAndUnwrap as r}from"../internal/communication.js";import{ensureInitialized as n}from"../internal/internalAPIs.js";import{getApiVersionTag as i}from"../internal/telemetry.js";import{validateId as e}from"../internal/utils.js";import{FrameContexts as s,errorNotSupportedOnPlatform as p}from"../public/constants.js";import{runtime as c}from"../public/runtime.js";var l;!function(l){function u(){return!(!n(c)||!c.supports.externalAppCardActionsForCEA)}l.processActionOpenUrl=function(r,l,m){return t(this,void 0,void 0,(function*(){if(n(c,s.content),!u())throw p;e(l,new Error("conversation id is not valid."));const[t,a]=yield o(i("v2","externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[r.toString(),l,m.href]);if(t)throw t;return a}))},l.processActionSubmit=function(o,l,m){return t(this,void 0,void 0,(function*(){if(n(c,s.content),!u())throw p;e(l,new Error("conversation id is not valid."));const t=yield r(i("v2","externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",o.toString(),l,m);if(t)throw t}))},l.isSupported=u}(l||(l={}));export{l as externalAppCardActionsForCEA};
1
+ import{__awaiter as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParentAsync as o,sendAndUnwrap as r}from"../internal/communication.js";import{ensureInitialized as n}from"../internal/internalAPIs.js";import{getApiVersionTag as i}from"../internal/telemetry.js";import{FrameContexts as e,errorNotSupportedOnPlatform as p}from"../public/constants.js";import{runtime as s}from"../public/runtime.js";import{validateInput as c}from"./externalAppAuthenticationForCEA.js";function l(r,l,m){return t(this,void 0,void 0,(function*(){if(n(s,e.content),!A())throw p;c(r,l);const[t,u]=yield o(i("v2","externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[r.toString(),l,m.href]);if(t)throw t;return u}))}function m(o,l,m){return t(this,void 0,void 0,(function*(){if(n(s,e.content),!A())throw p;c(o,l);const t=yield r(i("v2","externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",o.toString(),l,m);if(t)throw t}))}function A(){return!(!n(s)||!s.supports.externalAppCardActionsForCEA)}export{A as isSupported,l as processActionOpenUrl,m as processActionSubmit};
@@ -1 +1 @@
1
- import{__awaiter as o}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParentAsync as t}from"../internal/communication.js";import{ensureInitialized as n}from"../internal/internalAPIs.js";import{getApiVersionTag as r}from"../internal/telemetry.js";import{FrameContexts as i,errorNotSupportedOnPlatform as p}from"../public/constants.js";import{runtime as m}from"../public/runtime.js";import{AppId as e}from"../public/appId.js";var s;!function(s){function l(){return!(!n(m)||!m.supports.externalAppCommands)}s.processActionCommand=function(s,c,u){return o(this,void 0,void 0,(function*(){if(n(m,i.content),!l())throw p;const o=new e(s),[a,d]=yield t(r("v2","externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[o.toString(),c,u]);if(a)throw a;return d}))},s.isSupported=l}(s||(s={}));export{s as externalAppCommands};
1
+ import{__awaiter as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParentAsync as o}from"../internal/communication.js";import{ensureInitialized as n}from"../internal/internalAPIs.js";import{getApiVersionTag as r}from"../internal/telemetry.js";import{FrameContexts as i,errorNotSupportedOnPlatform as p}from"../public/constants.js";import{runtime as m}from"../public/runtime.js";import{AppId as e}from"../public/appId.js";function s(s,c,u){return t(this,void 0,void 0,(function*(){if(n(m,i.content),!l())throw p;const t=new e(s),[a,d]=yield o(r("v2","externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[t.toString(),c,u]);if(a)throw a;return d}))}function l(){return!(!n(m)||!m.supports.externalAppCommands)}export{l as isSupported,s as processActionCommand};
@@ -1 +1 @@
1
- import{sendMessageToParent as e}from"../internal/communication.js";import{registerHandler as o}from"../internal/handlers.js";import{ensureInitialized as r}from"../internal/internalAPIs.js";import{getApiVersionTag as l}from"../internal/telemetry.js";import{FrameContexts as t}from"../public/constants.js";import{ErrorCode as n}from"../public/interfaces.js";import{runtime as i}from"../public/runtime.js";const d="v1";var a;!function(a){var s,u,c,g;function f(e,o){return{errorCode:e,message:o}}(s=a.CloudStorageProvider||(a.CloudStorageProvider={})).Dropbox="DROPBOX",s.Box="BOX",s.Sharefile="SHAREFILE",s.GoogleDrive="GOOGLEDRIVE",s.Egnyte="EGNYTE",s.SharePoint="SharePoint",(u=a.CloudStorageProviderType||(a.CloudStorageProviderType={}))[u.Sharepoint=0]="Sharepoint",u[u.WopiIntegration=1]="WopiIntegration",u[u.Google=2]="Google",u[u.OneDrive=3]="OneDrive",u[u.Recent=4]="Recent",u[u.Aggregate=5]="Aggregate",u[u.FileSystem=6]="FileSystem",u[u.Search=7]="Search",u[u.AllFiles=8]="AllFiles",u[u.SharedWithMe=9]="SharedWithMe",(a.SpecialDocumentLibraryType||(a.SpecialDocumentLibraryType={})).ClassMaterials="classMaterials",(a.DocumentLibraryAccessType||(a.DocumentLibraryAccessType={})).Readonly="readonly",(c=a.FileDownloadStatus||(a.FileDownloadStatus={})).Downloaded="Downloaded",c.Downloading="Downloading",c.Failed="Failed",(g=a.CloudStorageProviderFileAction||(a.CloudStorageProviderFileAction={})).Download="DOWNLOAD",g.Upload="UPLOAD",g.Delete="DELETE",a.getCloudStorageFolders=function(o,n){if(r(i,t.content),!o||0===o.length)throw new Error("[files.getCloudStorageFolders] channelId name cannot be null or empty");if(!n)throw new Error("[files.getCloudStorageFolders] Callback cannot be null");e(l(d,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[o],n)},a.addCloudStorageFolder=function(o,n){if(r(i,t.content),!o||0===o.length)throw new Error("[files.addCloudStorageFolder] channelId name cannot be null or empty");if(!n)throw new Error("[files.addCloudStorageFolder] Callback cannot be null");e(l(d,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[o],n)},a.deleteCloudStorageFolder=function(o,n,a){if(r(i,t.content),!o)throw new Error("[files.deleteCloudStorageFolder] channelId name cannot be null or empty");if(!n)throw new Error("[files.deleteCloudStorageFolder] folderToDelete cannot be null or empty");if(!a)throw new Error("[files.deleteCloudStorageFolder] Callback cannot be null");e(l(d,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[o,n],a)},a.getCloudStorageFolderContents=function(o,n,a){if(r(i,t.content),!o||!n)throw new Error("[files.getCloudStorageFolderContents] folder/providerCode name cannot be null or empty");if(!a)throw new Error("[files.getCloudStorageFolderContents] Callback cannot be null");if("isSubdirectory"in o&&!o.isSubdirectory)throw new Error("[files.getCloudStorageFolderContents] provided folder is not a subDirectory");e(l(d,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[o,n],a)},a.openCloudStorageFile=function(o,n,a){if(r(i,t.content),!o||!n)throw new Error("[files.openCloudStorageFile] file/providerCode cannot be null or empty");if(o.isSubdirectory)throw new Error("[files.openCloudStorageFile] provided file is a subDirectory");e(l(d,"files.openCloudStorageFile"),"files.openCloudStorageFile",[o,n,a])},a.getExternalProviders=function(o=!1,n){if(r(i,t.content),!n)throw new Error("[files.getExternalProviders] Callback cannot be null");e(l(d,"files.getExternalProviders"),"files.getExternalProviders",[o],n)},a.copyMoveFiles=function(o,n,a,s,u=!1,c){if(r(i,t.content),!o||0===o.length)throw new Error("[files.copyMoveFiles] selectedFiles cannot be null or empty");if(!n)throw new Error("[files.copyMoveFiles] providerCode cannot be null or empty");if(!a)throw new Error("[files.copyMoveFiles] destinationFolder cannot be null or empty");if(!s)throw new Error("[files.copyMoveFiles] destinationProviderCode cannot be null or empty");if(!c)throw new Error("[files.copyMoveFiles] callback cannot be null");e(l(d,"files.copyMoveFiles"),"files.copyMoveFiles",[o,n,a,s,u],c)},a.getFileDownloads=function(o){if(r(i,t.content),!o)throw new Error("[files.getFileDownloads] Callback cannot be null");e(l(d,"files.getFileDownloads"),"files.getFileDownloads",[],o)},a.openDownloadFolder=function(o=void 0,n){if(r(i,t.content),!n)throw new Error("[files.openDownloadFolder] Callback cannot be null");e(l(d,"files.openDownloadFolder"),"files.openDownloadFolder",[o],n)},a.addCloudStorageProvider=function(o){if(r(i,t.content),!o)throw f(n.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");e(l(d,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],o)},a.removeCloudStorageProvider=function(o,a){if(r(i,t.content),!a)throw f(n.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!o||!o.content)throw f(n.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");e(l(d,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[o],a)},a.addCloudStorageProviderFile=function(o,a){if(r(i,t.content),!a)throw f(n.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!o||!o.content)throw f(n.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");e(l(d,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[o],a)},a.renameCloudStorageProviderFile=function(o,a){if(r(i,t.content),!a)throw f(n.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!o||!o.content)throw f(n.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");e(l(d,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[o],a)},a.deleteCloudStorageProviderFile=function(o,a){if(r(i,t.content),!a)throw f(n.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(o&&o.content&&o.content.itemList&&o.content.itemList.length>0))throw f(n.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");e(l(d,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[o],a)},a.downloadCloudStorageProviderFile=function(o,a){if(r(i,t.content),!a)throw f(n.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(o&&o.content&&o.content.itemList&&o.content.itemList.length>0))throw f(n.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");e(l(d,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[o],a)},a.uploadCloudStorageProviderFile=function(o,a){if(r(i,t.content),!a)throw f(n.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(o&&o.content&&o.content.itemList&&o.content.itemList.length>0))throw f(n.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!o.content.destinationFolder)throw f(n.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");e(l(d,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[o],a)},a.registerCloudStorageProviderListChangeHandler=function(e){if(r(i),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");o(l(d,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)},a.registerCloudStorageProviderContentChangeHandler=function(e){if(r(i),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");o(l(d,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}}(a||(a={}));export{a as files};
1
+ import{sendMessageToParent as e}from"../internal/communication.js";import{registerHandler as o}from"../internal/handlers.js";import{ensureInitialized as r}from"../internal/internalAPIs.js";import{getApiVersionTag as l}from"../internal/telemetry.js";import{FrameContexts as t}from"../public/constants.js";import{ErrorCode as n}from"../public/interfaces.js";import{runtime as i}from"../public/runtime.js";const d="v1";var a,s,c,f,u,g;function S(o,n){if(r(i,t.content),!o||0===o.length)throw new Error("[files.getCloudStorageFolders] channelId name cannot be null or empty");if(!n)throw new Error("[files.getCloudStorageFolders] Callback cannot be null");e(l(d,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[o],n)}function C(o,n){if(r(i,t.content),!o||0===o.length)throw new Error("[files.addCloudStorageFolder] channelId name cannot be null or empty");if(!n)throw new Error("[files.addCloudStorageFolder] Callback cannot be null");e(l(d,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[o],n)}function w(o,n,a){if(r(i,t.content),!o)throw new Error("[files.deleteCloudStorageFolder] channelId name cannot be null or empty");if(!n)throw new Error("[files.deleteCloudStorageFolder] folderToDelete cannot be null or empty");if(!a)throw new Error("[files.deleteCloudStorageFolder] Callback cannot be null");e(l(d,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[o,n],a)}function v(o,n,a){if(r(i,t.content),!o||!n)throw new Error("[files.getCloudStorageFolderContents] folder/providerCode name cannot be null or empty");if(!a)throw new Error("[files.getCloudStorageFolderContents] Callback cannot be null");if("isSubdirectory"in o&&!o.isSubdirectory)throw new Error("[files.getCloudStorageFolderContents] provided folder is not a subDirectory");e(l(d,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[o,n],a)}function F(o,n,a){if(r(i,t.content),!o||!n)throw new Error("[files.openCloudStorageFile] file/providerCode cannot be null or empty");if(o.isSubdirectory)throw new Error("[files.openCloudStorageFile] provided file is a subDirectory");e(l(d,"files.openCloudStorageFile"),"files.openCloudStorageFile",[o,n,a])}function h(o=!1,n){if(r(i,t.content),!n)throw new Error("[files.getExternalProviders] Callback cannot be null");e(l(d,"files.getExternalProviders"),"files.getExternalProviders",[o],n)}function p(o,n,a,s,c=!1,f){if(r(i,t.content),!o||0===o.length)throw new Error("[files.copyMoveFiles] selectedFiles cannot be null or empty");if(!n)throw new Error("[files.copyMoveFiles] providerCode cannot be null or empty");if(!a)throw new Error("[files.copyMoveFiles] destinationFolder cannot be null or empty");if(!s)throw new Error("[files.copyMoveFiles] destinationProviderCode cannot be null or empty");if(!f)throw new Error("[files.copyMoveFiles] callback cannot be null");e(l(d,"files.copyMoveFiles"),"files.copyMoveFiles",[o,n,a,s,c],f)}function m(o){if(r(i,t.content),!o)throw new Error("[files.getFileDownloads] Callback cannot be null");e(l(d,"files.getFileDownloads"),"files.getFileDownloads",[],o)}function b(o=void 0,n){if(r(i,t.content),!n)throw new Error("[files.openDownloadFolder] Callback cannot be null");e(l(d,"files.openDownloadFolder"),"files.openDownloadFolder",[o],n)}function E(o){if(r(i,t.content),!o)throw G(n.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");e(l(d,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],o)}function P(o,a){if(r(i,t.content),!a)throw G(n.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!o||!o.content)throw G(n.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");e(l(d,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[o],a)}function D(o,a){if(r(i,t.content),!a)throw G(n.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!o||!o.content)throw G(n.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");e(l(d,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[o],a)}function I(o,a){if(r(i,t.content),!a)throw G(n.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!o||!o.content)throw G(n.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");e(l(d,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[o],a)}function A(o,a){if(r(i,t.content),!a)throw G(n.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(o&&o.content&&o.content.itemList&&o.content.itemList.length>0))throw G(n.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");e(l(d,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[o],a)}function N(o,a){if(r(i,t.content),!a)throw G(n.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(o&&o.content&&o.content.itemList&&o.content.itemList.length>0))throw G(n.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");e(l(d,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[o],a)}function y(o,a){if(r(i,t.content),!a)throw G(n.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(o&&o.content&&o.content.itemList&&o.content.itemList.length>0))throw G(n.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!o.content.destinationFolder)throw G(n.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");e(l(d,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[o],a)}function L(e){if(r(i),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");o(l(d,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function M(e){if(r(i),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");o(l(d,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function G(e,o){return{errorCode:e,message:o}}!function(e){e.Dropbox="DROPBOX",e.Box="BOX",e.Sharefile="SHAREFILE",e.GoogleDrive="GOOGLEDRIVE",e.Egnyte="EGNYTE",e.SharePoint="SharePoint"}(a||(a={})),function(e){e[e.Sharepoint=0]="Sharepoint",e[e.WopiIntegration=1]="WopiIntegration",e[e.Google=2]="Google",e[e.OneDrive=3]="OneDrive",e[e.Recent=4]="Recent",e[e.Aggregate=5]="Aggregate",e[e.FileSystem=6]="FileSystem",e[e.Search=7]="Search",e[e.AllFiles=8]="AllFiles",e[e.SharedWithMe=9]="SharedWithMe"}(s||(s={})),function(e){e.ClassMaterials="classMaterials"}(c||(c={})),function(e){e.Readonly="readonly"}(f||(f={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(u||(u={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(g||(g={}));export{a as CloudStorageProvider,g as CloudStorageProviderFileAction,s as CloudStorageProviderType,f as DocumentLibraryAccessType,u as FileDownloadStatus,c as SpecialDocumentLibraryType,C as addCloudStorageFolder,E as addCloudStorageProvider,D as addCloudStorageProviderFile,p as copyMoveFiles,w as deleteCloudStorageFolder,A as deleteCloudStorageProviderFile,N as downloadCloudStorageProviderFile,v as getCloudStorageFolderContents,S as getCloudStorageFolders,h as getExternalProviders,m as getFileDownloads,F as openCloudStorageFile,b as openDownloadFolder,M as registerCloudStorageProviderContentChangeHandler,L as registerCloudStorageProviderListChangeHandler,P as removeCloudStorageProvider,I as renameCloudStorageProviderFile,y as uploadCloudStorageProviderFile};
@@ -0,0 +1 @@
1
+ import{ensureInitialized as t}from"../../internal/internalAPIs.js";import{runtime as r}from"../../public/runtime.js";import*as o from"./tab.js";export{o as tab};var n;function i(){return!(!t(r)||!r.supports.hostEntity)}!function(t){t.edu="EDU"}(n||(n={}));export{n as AppTypes,i as isSupported};
@@ -0,0 +1 @@
1
+ import{callFunctionInHostAndHandleResponse as t}from"../../internal/communication.js";import{ensureInitialized as r}from"../../internal/internalAPIs.js";import{SimpleTypeResponseHandler as e,ResponseHandler as n}from"../../internal/responseHandler.js";import{getApiVersionTag as o}from"../../internal/telemetry.js";import{runtime as a}from"../../public/runtime.js";import{isSupported as s}from"./hostEntity.js";import{ErrorCode as i}from"../../public/interfaces.js";const l="v2";class d extends n{validate(t){return"ConfigurableTab"===t.tabType}deserialize(t){return t}}class c{constructor(t){this.configurableTabInstance=t}serialize(){return this.configurableTabInstance}}class u{constructor(t){this.hostEntityId=t}serialize(){return this.hostEntityId}}class E extends n{validate(t){return"ConfigurableTab"===t.tabType||"StaticTab"===t.tabType}deserialize(t){return t}}class h{constructor(t){this.hostEntityTabInstance=t}serialize(){return this.hostEntityTabInstance}}class p extends n{validate(t){return t.allTabs&&t.allTabs.forEach((t=>{})),!0}deserialize(t){return t}}function f(e,n){if(r(a),!y())throw new Error(`Error code: ${i.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(I(e.threadId),n&&0===n.length)throw new Error(`Error code: ${i.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return t("hostEntity.tab.addAndConfigure",[new u(e),n],new E,o(l,"hostEntity.tab.addAndConfigure"))}function m(e){if(r(a),!y())throw new Error(`Error code: ${i.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return I(e.threadId),t("hostEntity.tab.getAll",[new u(e)],new p,o(l,"hostEntity.tab.getAll"))}function b(e,n){if(r(a),!y())throw new Error(`Error code: ${i.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return g(e),I(n.threadId),t("hostEntity.tab.reconfigure",[new c(e),new u(n)],new d,o(l,"hostEntity.tab.reconfigure"))}function T(e,n){if(r(a),!y())throw new Error(`Error code: ${i.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return g(e),I(n.threadId),t("hostEntity.tab.rename",[new c(e),new u(n)],new d,o(l,"hostEntity.tab.rename"))}function w(n,s){if(r(a),!y())throw new Error(`Error code: ${i.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return I(s.threadId),g(n),t("hostEntity.tab.remove",[new h(n),new u(s)],new e,o(l,"hostEntity.tab.remove"))}function y(){var t;return!!(r(a)&&s()&&(null===(t=a.supports.hostEntity)||void 0===t?void 0:t.tab))}function I(t){if(!t||0==t.length)throw new Error(`Error code: ${i.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function g(t){if(!(null==t?void 0:t.internalTabInstanceId)||0===t.internalTabInstanceId.length)throw new Error(`Error code: ${i.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}export{f as addAndConfigure,m as getAll,y as isSupported,b as reconfigure,w as remove,T as rename};
@@ -1 +1 @@
1
- import{sendMessageToParent as r}from"../internal/communication.js";import{registerHandler as t,removeHandler as e}from"../internal/handlers.js";import{ensureInitialized as o}from"../internal/internalAPIs.js";import{getApiVersionTag as i}from"../internal/telemetry.js";import{isNullOrUndefined as n}from"../internal/typeCheckUtilities.js";import{errorNotSupportedOnPlatform as s}from"../public/constants.js";import{runtime as l}from"../public/runtime.js";var m;!function(m){function p(){return!(!o(l)||!l.supports.logs)}m.registerGetLogHandler=function(m){if(!n(m)&&o(l),!n(m)&&!p())throw s;m?t(i("v1","log.request"),"log.request",(()=>{const t=m();r(i("v1","log.receive"),"log.receive",[t])})):e("log.request")},m.isSupported=p}(m||(m={}));export{m as logs};
1
+ import{sendMessageToParent as r}from"../internal/communication.js";import{registerHandler as t,removeHandler as o}from"../internal/handlers.js";import{ensureInitialized as e}from"../internal/internalAPIs.js";import{getApiVersionTag as i}from"../internal/telemetry.js";import{isNullOrUndefined as n}from"../internal/typeCheckUtilities.js";import{errorNotSupportedOnPlatform as s}from"../public/constants.js";import{runtime as m}from"../public/runtime.js";function l(l){if(!n(l)&&e(m),!n(l)&&!p())throw s;l?t(i("v1","log.request"),"log.request",(()=>{const t=l();r(i("v1","log.receive"),"log.receive",[t])})):o("log.request")}function p(){return!(!e(m)||!m.supports.logs)}export{p as isSupported,l as registerGetLogHandler};
@@ -1 +1 @@
1
- import{sendAndHandleSdkError as e}from"../internal/communication.js";import{registerHandler as o}from"../internal/handlers.js";import{ensureInitialized as t}from"../internal/internalAPIs.js";import{getApiVersionTag as n}from"../internal/telemetry.js";import{errorNotSupportedOnPlatform as i}from"../public/constants.js";import{runtime as r}from"../public/runtime.js";const m="v1";var a;!function(a){function g(){return!(!t(r)||!r.supports.meetingRoom)}a.getPairedMeetingRoomInfo=function(){return new Promise((o=>{if(t(r),!g())throw i;o(e(n(m,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))},a.sendCommandToPairedMeetingRoom=function(o){return new Promise((a=>{if(!o||0==o.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(t(r),!g())throw i;a(e(n(m,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",o))}))},a.registerMeetingRoomCapabilitiesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(t(r),!g())throw i;o(n(m,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(o=>{t(r),e(o)}))},a.registerMeetingRoomStatesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(t(r),!g())throw i;o(n(m,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(o=>{t(r),e(o)}))},a.isSupported=g}(a||(a={}));export{a as meetingRoom};
1
+ import{sendAndHandleSdkError as e}from"../internal/communication.js";import{registerHandler as o}from"../internal/handlers.js";import{ensureInitialized as n}from"../internal/internalAPIs.js";import{getApiVersionTag as t}from"../internal/telemetry.js";import{errorNotSupportedOnPlatform as i}from"../public/constants.js";import{runtime as r}from"../public/runtime.js";const m="v1";function a(){return new Promise((o=>{if(n(r),!l())throw i;o(e(t(m,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function g(o){return new Promise((a=>{if(!o||0==o.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(n(r),!l())throw i;a(e(t(m,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",o))}))}function s(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(n(r),!l())throw i;o(t(m,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(o=>{n(r),e(o)}))}function d(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(n(r),!l())throw i;o(t(m,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(o=>{n(r),e(o)}))}function l(){return!(!n(r)||!r.supports.meetingRoom)}export{a as getPairedMeetingRoomInfo,l as isSupported,s as registerMeetingRoomCapabilitiesUpdateHandler,d as registerMeetingRoomStatesUpdateHandler,g as sendCommandToPairedMeetingRoom};
@@ -0,0 +1 @@
1
+ import{__awaiter as t}from"../../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{requestPortFromParentWithVersion as r}from"../../internal/communication.js";import{ensureInitialized as e}from"../../internal/internalAPIs.js";import{getLogger as n,getApiVersionTag as o}from"../../internal/telemetry.js";import{errorNotSupportedOnPlatform as a}from"../../public/constants.js";import{runtime as i}from"../../public/runtime.js";let s;const l=n("messageChannels.dataLayer");function m(){return t(this,void 0,void 0,(function*(){if(s)return l("Returning dataLayer port from cache"),s;if(!p())throw a;return s=yield r(o("v1","messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),s}))}function p(){var t;return!(!e(i)||!(null===(t=i.supports.messageChannels)||void 0===t?void 0:t.dataLayer))}function u(){s=void 0}export{u as _clearDataLayerPort,m as getDataLayerPort,p as isSupported};
@@ -0,0 +1 @@
1
+ import{ensureInitialized as r}from"../../internal/internalAPIs.js";import{runtime as t}from"../../public/runtime.js";import*as e from"./dataLayer.js";export{e as dataLayer};import*as o from"./telemetry.js";export{o as telemetry};function s(){return!(!r(t)||!t.supports.messageChannels)}export{s as isSupported};
@@ -0,0 +1 @@
1
+ import{__awaiter as e}from"../../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{requestPortFromParentWithVersion as t}from"../../internal/communication.js";import{ensureInitialized as r}from"../../internal/internalAPIs.js";import{getLogger as n,getApiVersionTag as o}from"../../internal/telemetry.js";import{errorNotSupportedOnPlatform as i}from"../../public/constants.js";import{runtime as s}from"../../public/runtime.js";let l;const m=n("messageChannels.telemetry");function p(){return e(this,void 0,void 0,(function*(){if(l)return m("Returning telemetry port from cache"),l;if(!u())throw i;return l=yield t(o("v1","messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),l}))}function u(){var e;return!(!r(s)||!(null===(e=s.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function a(){l=void 0}export{a as _clearTelemetryPort,p as getTelemetryPort,u as isSupported};
@@ -1 +1 @@
1
- import{sendMessageToParent as i}from"../internal/communication.js";import{ensureInitialized as t}from"../internal/internalAPIs.js";import{getApiVersionTag as o}from"../internal/telemetry.js";import{FrameContexts as n,errorNotSupportedOnPlatform as r}from"../public/constants.js";import{runtime as s}from"../public/runtime.js";var c;!function(c){function f(){return!(!t(s)||!s.supports.notifications)}c.showNotification=function(c){if(t(s,n.content),!f())throw r;i(o("v1","notifications.showNotification"),"notifications.showNotification",[c])},c.isSupported=f}(c||(c={}));export{c as notifications};
1
+ import{sendMessageToParent as t}from"../internal/communication.js";import{ensureInitialized as i}from"../internal/internalAPIs.js";import{getApiVersionTag as o}from"../internal/telemetry.js";import{FrameContexts as n,errorNotSupportedOnPlatform as r}from"../public/constants.js";import{runtime as s}from"../public/runtime.js";function m(m){if(i(s,n.content),!c())throw r;t(o("v1","notifications.showNotification"),"notifications.showNotification",[m])}function c(){return!(!i(s)||!s.supports.notifications)}export{c as isSupported,m as showNotification};
@@ -1 +1 @@
1
- import{sendMessageToParent as r}from"../internal/communication.js";import{registerHandler as t,removeHandler as n}from"../internal/handlers.js";import{ensureInitialized as i}from"../internal/internalAPIs.js";import{getApiVersionTag as e}from"../internal/telemetry.js";import{isNullOrUndefined as o}from"../internal/typeCheckUtilities.js";import{ErrorCode as p}from"../public/interfaces.js";import{runtime as l}from"../public/runtime.js";var s;!function(s){function a(){return!(!i(l)||!l.supports.otherAppStateChange)}s.registerAppInstallationHandler=function(r){if(!a())throw new Error(p.NOT_SUPPORTED_ON_PLATFORM.toString());if(o(r))throw new Error(p.INVALID_ARGUMENTS.toString());t(e("v2","otherApp.install"),"otherApp.install",r)},s.unregisterAppInstallationHandler=function(){if(!a())throw new Error(p.NOT_SUPPORTED_ON_PLATFORM.toString());r(e("v2","otherApp.unregisterInstall"),"otherApp.unregisterInstall"),n("otherApp.install")},s.isSupported=a}(s||(s={}));export{s as otherAppStateChange};
1
+ import{sendMessageToParent as r}from"../internal/communication.js";import{registerHandler as t,removeHandler as n}from"../internal/handlers.js";import{ensureInitialized as i}from"../internal/internalAPIs.js";import{getApiVersionTag as o}from"../internal/telemetry.js";import{isNullOrUndefined as e}from"../internal/typeCheckUtilities.js";import{ErrorCode as p}from"../public/interfaces.js";import{runtime as l}from"../public/runtime.js";function s(r){if(!a())throw new Error(p.NOT_SUPPORTED_ON_PLATFORM.toString());if(e(r))throw new Error(p.INVALID_ARGUMENTS.toString());t(o("v2","otherApp.install"),"otherApp.install",r)}function m(){if(!a())throw new Error(p.NOT_SUPPORTED_ON_PLATFORM.toString());r(o("v2","otherApp.unregisterInstall"),"otherApp.unregisterInstall"),n("otherApp.install")}function a(){return!(!i(l)||!l.supports.otherAppStateChange)}export{a as isSupported,s as registerAppInstallationHandler,m as unregisterAppInstallationHandler};
@@ -1 +1 @@
1
- import{sendMessageToParent as r}from"../internal/communication.js";import{registerHandler as e}from"../internal/handlers.js";import{ensureInitialized as n}from"../internal/internalAPIs.js";import{getApiVersionTag as o}from"../internal/telemetry.js";import{FrameContexts as a,errorNotSupportedOnPlatform as t}from"../public/constants.js";import{runtime as m}from"../public/runtime.js";const i="v1";var l;!function(l){var C,s,d;function c(){return!(!n(m)||!m.supports.remoteCamera)}(C=l.ControlCommand||(l.ControlCommand={})).Reset="Reset",C.ZoomIn="ZoomIn",C.ZoomOut="ZoomOut",C.PanLeft="PanLeft",C.PanRight="PanRight",C.TiltUp="TiltUp",C.TiltDown="TiltDown",(s=l.ErrorReason||(l.ErrorReason={}))[s.CommandResetError=0]="CommandResetError",s[s.CommandZoomInError=1]="CommandZoomInError",s[s.CommandZoomOutError=2]="CommandZoomOutError",s[s.CommandPanLeftError=3]="CommandPanLeftError",s[s.CommandPanRightError=4]="CommandPanRightError",s[s.CommandTiltUpError=5]="CommandTiltUpError",s[s.CommandTiltDownError=6]="CommandTiltDownError",s[s.SendDataError=7]="SendDataError",(d=l.SessionTerminatedReason||(l.SessionTerminatedReason={}))[d.None=0]="None",d[d.ControlDenied=1]="ControlDenied",d[d.ControlNoResponse=2]="ControlNoResponse",d[d.ControlBusy=3]="ControlBusy",d[d.AckTimeout=4]="AckTimeout",d[d.ControlTerminated=5]="ControlTerminated",d[d.ControllerTerminated=6]="ControllerTerminated",d[d.DataChannelError=7]="DataChannelError",d[d.ControllerCancelled=8]="ControllerCancelled",d[d.ControlDisabled=9]="ControlDisabled",d[d.ControlTerminatedToAllowOtherController=10]="ControlTerminatedToAllowOtherController",l.getCapableParticipants=function(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(n(m,a.sidePanel),!c())throw t;r(o(i,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)},l.requestControl=function(e,l){if(!e)throw new Error("[remoteCamera.requestControl] Participant cannot be null");if(!l)throw new Error("[remoteCamera.requestControl] Callback cannot be null");if(n(m,a.sidePanel),!c())throw t;r(o(i,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],l)},l.sendControlCommand=function(e,l){if(!e)throw new Error("[remoteCamera.sendControlCommand] ControlCommand cannot be null");if(!l)throw new Error("[remoteCamera.sendControlCommand] Callback cannot be null");if(n(m,a.sidePanel),!c())throw t;r(o(i,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],l)},l.terminateSession=function(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(n(m,a.sidePanel),!c())throw t;r(o(i,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)},l.registerOnCapableParticipantsChangeHandler=function(r){if(!r)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(n(m,a.sidePanel),!c())throw t;e(o(i,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",r)},l.registerOnErrorHandler=function(r){if(!r)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(n(m,a.sidePanel),!c())throw t;e(o(i,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",r)},l.registerOnDeviceStateChangeHandler=function(r){if(!r)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(n(m,a.sidePanel),!c())throw t;e(o(i,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",r)},l.registerOnSessionStatusChangeHandler=function(r){if(!r)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(n(m,a.sidePanel),!c())throw t;e(o(i,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",r)},l.isSupported=c}(l||(l={}));export{l as remoteCamera};
1
+ import{sendMessageToParent as r}from"../internal/communication.js";import{registerHandler as e}from"../internal/handlers.js";import{ensureInitialized as o}from"../internal/internalAPIs.js";import{getApiVersionTag as n}from"../internal/telemetry.js";import{FrameContexts as t,errorNotSupportedOnPlatform as a}from"../public/constants.js";import{runtime as m}from"../public/runtime.js";const l="v1";var i,C,s;function d(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(o(m,t.sidePanel),!b())throw a;r(n(l,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function c(e,i){if(!e)throw new Error("[remoteCamera.requestControl] Participant cannot be null");if(!i)throw new Error("[remoteCamera.requestControl] Callback cannot be null");if(o(m,t.sidePanel),!b())throw a;r(n(l,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],i)}function u(e,i){if(!e)throw new Error("[remoteCamera.sendControlCommand] ControlCommand cannot be null");if(!i)throw new Error("[remoteCamera.sendControlCommand] Callback cannot be null");if(o(m,t.sidePanel),!b())throw a;r(n(l,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],i)}function f(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(o(m,t.sidePanel),!b())throw a;r(n(l,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function h(r){if(!r)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(o(m,t.sidePanel),!b())throw a;e(n(l,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",r)}function w(r){if(!r)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(o(m,t.sidePanel),!b())throw a;e(n(l,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",r)}function E(r){if(!r)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(o(m,t.sidePanel),!b())throw a;e(n(l,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",r)}function p(r){if(!r)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(o(m,t.sidePanel),!b())throw a;e(n(l,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",r)}function b(){return!(!o(m)||!m.supports.remoteCamera)}!function(r){r.Reset="Reset",r.ZoomIn="ZoomIn",r.ZoomOut="ZoomOut",r.PanLeft="PanLeft",r.PanRight="PanRight",r.TiltUp="TiltUp",r.TiltDown="TiltDown"}(i||(i={})),function(r){r[r.CommandResetError=0]="CommandResetError",r[r.CommandZoomInError=1]="CommandZoomInError",r[r.CommandZoomOutError=2]="CommandZoomOutError",r[r.CommandPanLeftError=3]="CommandPanLeftError",r[r.CommandPanRightError=4]="CommandPanRightError",r[r.CommandTiltUpError=5]="CommandTiltUpError",r[r.CommandTiltDownError=6]="CommandTiltDownError",r[r.SendDataError=7]="SendDataError"}(C||(C={})),function(r){r[r.None=0]="None",r[r.ControlDenied=1]="ControlDenied",r[r.ControlNoResponse=2]="ControlNoResponse",r[r.ControlBusy=3]="ControlBusy",r[r.AckTimeout=4]="AckTimeout",r[r.ControlTerminated=5]="ControlTerminated",r[r.ControllerTerminated=6]="ControllerTerminated",r[r.DataChannelError=7]="DataChannelError",r[r.ControllerCancelled=8]="ControllerCancelled",r[r.ControlDisabled=9]="ControlDisabled",r[r.ControlTerminatedToAllowOtherController=10]="ControlTerminatedToAllowOtherController"}(s||(s={}));export{i as ControlCommand,C as ErrorReason,s as SessionTerminatedReason,d as getCapableParticipants,b as isSupported,h as registerOnCapableParticipantsChangeHandler,E as registerOnDeviceStateChangeHandler,w as registerOnErrorHandler,p as registerOnSessionStatusChangeHandler,c as requestControl,u as sendControlCommand,f as terminateSession};
@@ -0,0 +1 @@
1
+ import{sendAndUnwrap as t}from"../../../internal/communication.js";import{ensureInitialized as r}from"../../../internal/internalAPIs.js";import{getApiVersionTag as o}from"../../../internal/telemetry.js";import{errorNotSupportedOnPlatform as n}from"../../../public/constants.js";import{runtime as i}from"../../../public/runtime.js";import*as e from"./joinedTeams.js";export{e as joinedTeams};function m(e){return new Promise((m=>{if(r(i),!s())throw n;m(t(o("v1","teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function s(){return!(!r(i)||!i.supports.teams)&&!!i.supports.teams.fullTrust}export{m as getConfigSetting,s as isSupported};
@@ -0,0 +1 @@
1
+ import{sendAndUnwrap as t}from"../../../internal/communication.js";import{getUserJoinedTeamsSupportedAndroidClientVersion as r}from"../../../internal/constants.js";import{GlobalVars as e}from"../../../internal/globalVars.js";import{ensureInitialized as s,isCurrentSDKVersionAtLeast as o}from"../../../internal/internalAPIs.js";import{getApiVersionTag as n}from"../../../internal/telemetry.js";import{errorNotSupportedOnPlatform as i,HostClientType as m}from"../../../public/constants.js";import{ErrorCode as a}from"../../../public/interfaces.js";import{runtime as l}from"../../../public/runtime.js";function p(p){return new Promise((f=>{if(s(l),!u())throw i;if((e.hostClientType===m.android||e.hostClientType===m.teamsRoomsAndroid||e.hostClientType===m.teamsPhones||e.hostClientType===m.teamsDisplays)&&!o(r)){const t={errorCode:a.OLD_PLATFORM};throw new Error(JSON.stringify(t))}f(t(n("v1","teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",p))}))}function u(){return!(!s(l)||!l.supports.teams)&&(!!l.supports.teams.fullTrust&&!!l.supports.teams.fullTrust.joinedTeams)}export{p as getUserJoinedTeams,u as isSupported};
@@ -0,0 +1 @@
1
+ import{sendMessageToParent as r}from"../../internal/communication.js";import{ensureInitialized as e}from"../../internal/internalAPIs.js";import{getApiVersionTag as t}from"../../internal/telemetry.js";import{FrameContexts as n,errorNotSupportedOnPlatform as a}from"../../public/constants.js";import{runtime as o}from"../../public/runtime.js";import*as l from"./fullTrust/fullTrust.js";export{l as fullTrust};var i;function m(l,i){if(e(o,n.content),!f())throw a;if(!l)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!i)throw new Error("[teams.getTeamChannels] Callback cannot be null");r(t("v1","teams.getTeamChannels"),"teams.getTeamChannels",[l],i)}function s(n,l){if(e(o),!f())throw a;if(!n)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!l)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");r(t("v1","teams.refreshSiteUrl"),"teams.refreshSiteUrl",[n],l)}function f(){return!(!e(o)||!o.supports.teams)}!function(r){r[r.Regular=0]="Regular",r[r.Private=1]="Private",r[r.Shared=2]="Shared"}(i||(i={}));export{i as ChannelType,m as getTeamChannels,f as isSupported,s as refreshSiteUrl};
@@ -1 +1 @@
1
- import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParent as r}from"../internal/communication.js";import{registerHandler as i}from"../internal/handlers.js";import{ensureInitialized as o}from"../internal/internalAPIs.js";import{getApiVersionTag as t}from"../internal/telemetry.js";import{inServerSideRenderingEnvironment as n}from"../internal/utils.js";import{processMediaStreamWithMetadata as d,processMediaStream as s,createEffectParameterChangeCallback as a}from"../internal/videoEffectsUtils.js";import{VideoPerformanceMonitor as f}from"../internal/videoPerformanceMonitor.js";import{errorNotSupportedOnPlatform as m,FrameContexts as c}from"../public/constants.js";import{runtime as l}from"../public/runtime.js";import{videoEffects as u}from"../public/videoEffects.js";const v="v2";var p;!function(p){p.frameProcessingTimeoutInMs=2e3;const E=n()?void 0:new f(r);let F;function g(){const e=setTimeout((()=>{P(`Frame not processed in ${p.frameProcessingTimeoutInMs}ms`,F.Warn)}),p.frameProcessingTimeoutInMs);return function(){clearTimeout(e)}}function h(){return o(l),u.isSupported()}function P(e,i=F.Warn){r(t(v,"videoEffectsEx.notifyError"),"video.notifyError",[e,i])}!function(e){e.Fatal="fatal",e.Warn="warn"}(F=p.ErrorLevel||(p.ErrorLevel={})),p.registerForVideoFrame=function(n){var a,f;if(!h())throw m;if(!n.videoFrameHandler||!n.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(o(l,c.sidePanel)){if(i(t(v,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==E?void 0:E.setFrameProcessTimeLimit(e)),!1),null===(a=l.supports.video)||void 0===a?void 0:a.mediaStream)i(t(v,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(r=>e(this,void 0,void 0,(function*(){const{streamId:i,metadataInTexture:o}=r,t=E?function(r,i){return o=>e(this,void 0,void 0,(function*(){const e=o.videoFrame;i.reportStartFrameProcessing(e.codedWidth,e.codedHeight);const t=g(),n=yield r(o);return t(),i.reportFrameProcessed(),n}))}(n.videoFrameHandler,E):n.videoFrameHandler;o?yield d(i,t,P,E):yield s(i,t,P,E)}))),!1),r(t(v,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[n.config]);else{if(!(null===(f=l.supports.video)||void 0===f?void 0:f.sharedFrame))throw m;i(t(v,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(e=>{if(e){null==E||E.reportStartFrameProcessing(e.width,e.height);const i=g(),o=e.timestamp;n.videoBufferHandler(function(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}(e),(()=>{i(),null==E||E.reportFrameProcessed(),function(e){r(t(v,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}(o)}),P)}}),!1),r(t(v,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[n.config])}null==E||E.startMonitorSlowFrameProcessing()}},p.notifySelectedVideoEffectChanged=function(e,i,n){if(o(l,c.sidePanel),!h())throw m;r(t(v,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,i,n])},p.registerForVideoEffect=function(e){if(o(l,c.sidePanel),!h())throw m;i(t(v,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",a(e,E),!1),r(t(v,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")},p.updatePersonalizedEffects=function(e){if(o(l,c.sidePanel),!u.isSupported())throw m;r(t(v,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])},p.isSupported=h,p.notifyFatalError=function(e){if(o(l),!u.isSupported())throw m;P(e,F.Fatal)}}(p||(p={}));export{p as videoEffectsEx};
1
+ import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParent as r}from"../internal/communication.js";import{registerHandler as i}from"../internal/handlers.js";import{ensureInitialized as o}from"../internal/internalAPIs.js";import{getApiVersionTag as t}from"../internal/telemetry.js";import{inServerSideRenderingEnvironment as n}from"../internal/utils.js";import{createEffectParameterChangeCallback as d,processMediaStreamWithMetadata as s,processMediaStream as a}from"../internal/videoEffectsUtils.js";import{VideoPerformanceMonitor as f}from"../internal/videoPerformanceMonitor.js";import{errorNotSupportedOnPlatform as m,FrameContexts as c}from"../public/constants.js";import{runtime as l}from"../public/runtime.js";import{isSupported as v}from"../public/videoEffects.js";const u="v2",p=2e3,E=n()?void 0:new f(r);var F;function g(n){var d,f;if(!x())throw m;if(!n.videoFrameHandler||!n.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(o(l,c.sidePanel)){if(i(t(u,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==E?void 0:E.setFrameProcessTimeLimit(e)),!1),null===(d=l.supports.video)||void 0===d?void 0:d.mediaStream)i(t(u,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(r=>e(this,void 0,void 0,(function*(){const{streamId:i,metadataInTexture:o}=r,t=E?function(r,i){return o=>e(this,void 0,void 0,(function*(){const e=o.videoFrame;i.reportStartFrameProcessing(e.codedWidth,e.codedHeight);const t=h(),n=yield r(o);return t(),i.reportFrameProcessed(),n}))}(n.videoFrameHandler,E):n.videoFrameHandler;o?yield s(i,t,y,E):yield a(i,t,y,E)}))),!1),r(t(u,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[n.config]);else{if(!(null===(f=l.supports.video)||void 0===f?void 0:f.sharedFrame))throw m;i(t(u,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(e=>{if(e){null==E||E.reportStartFrameProcessing(e.width,e.height);const i=h(),o=e.timestamp;n.videoBufferHandler(function(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}(e),(()=>{i(),null==E||E.reportFrameProcessed(),function(e){r(t(u,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}(o)}),y)}}),!1),r(t(u,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[n.config])}null==E||E.startMonitorSlowFrameProcessing()}}function h(){const e=setTimeout((()=>{y(`Frame not processed in ${p}ms`,F.Warn)}),p);return function(){clearTimeout(e)}}function P(e,i,n){if(o(l,c.sidePanel),!x())throw m;r(t(u,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,i,n])}function w(e){if(o(l,c.sidePanel),!x())throw m;i(t(u,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",d(e,E),!1),r(t(u,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function V(e){if(o(l,c.sidePanel),!v())throw m;r(t(u,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function x(){return o(l),v()}function y(e,i=F.Warn){r(t(u,"videoEffectsEx.notifyError"),"video.notifyError",[e,i])}function H(e){if(o(l),!v())throw m;y(e,F.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(F||(F={}));export{F as ErrorLevel,p as frameProcessingTimeoutInMs,x as isSupported,H as notifyFatalError,P as notifySelectedVideoEffectChanged,w as registerForVideoEffect,g as registerForVideoFrame,V as updatePersonalizedEffects};