@openfin/remote-adapter 45.100.72 → 45.100.74

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 (2) hide show
  1. package/out/remote-adapter.js +402 -274
  2. package/package.json +2 -2
@@ -7,13 +7,13 @@ var crypto = require('crypto');
7
7
  var backchannel = require('./backchannel.js');
8
8
  var constants = require('./constants.js');
9
9
 
10
- var __classPrivateFieldSet$i = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10
+ var __classPrivateFieldSet$k = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11
11
  if (kind === "m") throw new TypeError("Private method is not writable");
12
12
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
13
13
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
14
14
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
15
15
  };
16
- var __classPrivateFieldGet$j = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16
+ var __classPrivateFieldGet$l = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17
17
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
18
18
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
19
19
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -94,9 +94,9 @@ class EmitterBase extends Base {
94
94
  this.emit = (eventType, payload, ...args) => {
95
95
  return this.hasEmitter() ? this.getOrCreateEmitter().emit(eventType, payload, ...args) : false;
96
96
  };
97
- this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$j(this, _EmitterBase_emitterAccessor, "f"));
97
+ this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$l(this, _EmitterBase_emitterAccessor, "f"));
98
98
  this.getOrCreateEmitter = () => {
99
- return this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$j(this, _EmitterBase_emitterAccessor, "f"));
99
+ return this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$l(this, _EmitterBase_emitterAccessor, "f"));
100
100
  };
101
101
  this.listeners = (type) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(type) : [];
102
102
  this.listenerCount = (type) => this.hasEmitter() ? this.getOrCreateEmitter().listenerCount(type) : 0;
@@ -134,8 +134,8 @@ class EmitterBase extends Base {
134
134
  // This will only be reached if unsubscribe from event that does not exist but do not want to error here
135
135
  return Promise.resolve();
136
136
  };
137
- __classPrivateFieldSet$i(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
138
- __classPrivateFieldSet$i(this, _EmitterBase_deregisterOnceListeners, new WeakMap(), "f");
137
+ __classPrivateFieldSet$k(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
138
+ __classPrivateFieldSet$k(this, _EmitterBase_deregisterOnceListeners, new WeakMap(), "f");
139
139
  }
140
140
  /**
141
141
  * Adds a listener to the end of the listeners array for the specified event.
@@ -163,7 +163,7 @@ class EmitterBase extends Base {
163
163
  */
164
164
  async once(eventType, listener, options) {
165
165
  const deregister = () => this.deregisterEventListener(eventType);
166
- __classPrivateFieldGet$j(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
166
+ __classPrivateFieldGet$l(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
167
167
  await this.registerEventListener(eventType, options, (emitter) => {
168
168
  emitter.once(eventType, deregister);
169
169
  emitter.once(eventType, listener);
@@ -194,7 +194,7 @@ class EmitterBase extends Base {
194
194
  */
195
195
  async prependOnceListener(eventType, listener, options) {
196
196
  const deregister = () => this.deregisterEventListener(eventType);
197
- __classPrivateFieldGet$j(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
197
+ __classPrivateFieldGet$l(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
198
198
  await this.registerEventListener(eventType, options, (emitter) => {
199
199
  emitter.prependOnceListener(eventType, listener);
200
200
  emitter.once(eventType, deregister);
@@ -213,7 +213,7 @@ class EmitterBase extends Base {
213
213
  const emitter = await this.deregisterEventListener(eventType, options);
214
214
  if (emitter) {
215
215
  emitter.removeListener(eventType, listener);
216
- const deregister = __classPrivateFieldGet$j(this, _EmitterBase_deregisterOnceListeners, "f").get(listener);
216
+ const deregister = __classPrivateFieldGet$l(this, _EmitterBase_deregisterOnceListeners, "f").get(listener);
217
217
  if (deregister) {
218
218
  emitter.removeListener(eventType, deregister);
219
219
  }
@@ -259,7 +259,7 @@ class EmitterBase extends Base {
259
259
  deleteEmitterIfNothingRegistered(emitter) {
260
260
  // TODO: maybe emitterMap should clean up itself..
261
261
  if (emitter.eventNames().length === 0) {
262
- this.wire.eventAggregator.delete(__classPrivateFieldGet$j(this, _EmitterBase_emitterAccessor, "f"));
262
+ this.wire.eventAggregator.delete(__classPrivateFieldGet$l(this, _EmitterBase_emitterAccessor, "f"));
263
263
  }
264
264
  }
265
265
  }
@@ -758,13 +758,13 @@ class AsyncRetryableLazy {
758
758
  }
759
759
  }
760
760
 
761
- var __classPrivateFieldSet$h = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
761
+ var __classPrivateFieldSet$j = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
762
762
  if (kind === "m") throw new TypeError("Private method is not writable");
763
763
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
764
764
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
765
765
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
766
766
  };
767
- var __classPrivateFieldGet$i = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
767
+ var __classPrivateFieldGet$k = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
768
768
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
769
769
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
770
770
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -944,12 +944,12 @@ class InteropBroker extends Base {
944
944
  _InteropBroker_contextGroups.set(this, void 0);
945
945
  _InteropBroker_providerPromise.set(this, void 0);
946
946
  this.getProvider = () => {
947
- return __classPrivateFieldGet$i(this, _InteropBroker_providerPromise, "f").getValue();
947
+ return __classPrivateFieldGet$k(this, _InteropBroker_providerPromise, "f").getValue();
948
948
  };
949
949
  this.interopClients = new Map();
950
950
  this.contextGroupsById = new Map();
951
- __classPrivateFieldSet$h(this, _InteropBroker_contextGroups, options.contextGroups ?? [...defaultContextGroups], "f");
952
- __classPrivateFieldSet$h(this, _InteropBroker_fdc3Info, options.fdc3Info, "f");
951
+ __classPrivateFieldSet$j(this, _InteropBroker_contextGroups, options.contextGroups ?? [...defaultContextGroups], "f");
952
+ __classPrivateFieldSet$j(this, _InteropBroker_fdc3Info, options.fdc3Info, "f");
953
953
  if (options?.logging) {
954
954
  this.logging = options.logging;
955
955
  }
@@ -957,7 +957,7 @@ class InteropBroker extends Base {
957
957
  this.lastContextMap = new Map();
958
958
  this.sessionContextGroupMap = new Map();
959
959
  this.privateChannelProviderMap = new Map();
960
- __classPrivateFieldSet$h(this, _InteropBroker_providerPromise, new Lazy(createProvider), "f");
960
+ __classPrivateFieldSet$j(this, _InteropBroker_providerPromise, new Lazy(createProvider), "f");
961
961
  this.setContextGroupMap();
962
962
  this.setupChannelProvider();
963
963
  }
@@ -1240,7 +1240,7 @@ class InteropBroker extends Base {
1240
1240
  // don't expose, analytics-only call
1241
1241
  });
1242
1242
  // Create copy for immutability
1243
- return __classPrivateFieldGet$i(this, _InteropBroker_contextGroups, "f").map((contextGroup) => {
1243
+ return __classPrivateFieldGet$k(this, _InteropBroker_contextGroups, "f").map((contextGroup) => {
1244
1244
  return { ...contextGroup };
1245
1245
  });
1246
1246
  }
@@ -1651,7 +1651,7 @@ class InteropBroker extends Base {
1651
1651
  const { fdc3Version } = payload;
1652
1652
  return {
1653
1653
  fdc3Version,
1654
- ...__classPrivateFieldGet$i(this, _InteropBroker_fdc3Info, "f"),
1654
+ ...__classPrivateFieldGet$k(this, _InteropBroker_fdc3Info, "f"),
1655
1655
  optionalFeatures: {
1656
1656
  OriginatingAppMetadata: false,
1657
1657
  UserChannelMembershipAPIs: true
@@ -7078,13 +7078,13 @@ function errorToPOJO(error) {
7078
7078
  return errorObj;
7079
7079
  }
7080
7080
 
7081
- var __classPrivateFieldSet$g = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7081
+ var __classPrivateFieldSet$i = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7082
7082
  if (kind === "m") throw new TypeError("Private method is not writable");
7083
7083
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
7084
7084
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
7085
7085
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7086
7086
  };
7087
- var __classPrivateFieldGet$h = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7087
+ var __classPrivateFieldGet$j = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7088
7088
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
7089
7089
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
7090
7090
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -7105,27 +7105,27 @@ class Transport extends events.EventEmitter {
7105
7105
  // Typing as unknown to avoid circular dependency, should not be used directly.
7106
7106
  _Transport_fin.set(this, void 0);
7107
7107
  this.connectSync = () => {
7108
- const wire = __classPrivateFieldGet$h(this, _Transport_wire, "f");
7108
+ const wire = __classPrivateFieldGet$j(this, _Transport_wire, "f");
7109
7109
  wire.connectSync();
7110
7110
  };
7111
7111
  // This function is only used in our tests.
7112
7112
  this.getPort = () => {
7113
- const wire = __classPrivateFieldGet$h(this, _Transport_wire, "f");
7113
+ const wire = __classPrivateFieldGet$j(this, _Transport_wire, "f");
7114
7114
  return wire.getPort();
7115
7115
  };
7116
- __classPrivateFieldSet$g(this, _Transport_wire, factory(this.onmessage.bind(this)), "f");
7116
+ __classPrivateFieldSet$i(this, _Transport_wire, factory(this.onmessage.bind(this)), "f");
7117
7117
  this.environment = environment;
7118
- __classPrivateFieldSet$g(this, _Transport_analyticsEnabled, config.apiDiagnostics !== false, "f");
7119
- this.sendRaw = __classPrivateFieldGet$h(this, _Transport_wire, "f").send.bind(__classPrivateFieldGet$h(this, _Transport_wire, "f"));
7118
+ __classPrivateFieldSet$i(this, _Transport_analyticsEnabled, config.apiDiagnostics !== false, "f");
7119
+ this.sendRaw = __classPrivateFieldGet$j(this, _Transport_wire, "f").send.bind(__classPrivateFieldGet$j(this, _Transport_wire, "f"));
7120
7120
  this.registerMessageHandler(this.handleMessage.bind(this));
7121
- __classPrivateFieldGet$h(this, _Transport_wire, "f").on('disconnected', () => {
7121
+ __classPrivateFieldGet$j(this, _Transport_wire, "f").on('disconnected', () => {
7122
7122
  for (const [, { handleNack }] of this.wireListeners) {
7123
7123
  handleNack({ reason: 'Remote connection has closed' });
7124
7124
  }
7125
7125
  this.wireListeners.clear();
7126
- clearTimeout(__classPrivateFieldGet$h(this, _Transport_analyticsFlushTimeout, "f"));
7127
- __classPrivateFieldSet$g(this, _Transport_analyticsFlushTimeout, undefined, "f");
7128
- __classPrivateFieldGet$h(this, _Transport_analyticsBuffer, "f").clear();
7126
+ clearTimeout(__classPrivateFieldGet$j(this, _Transport_analyticsFlushTimeout, "f"));
7127
+ __classPrivateFieldSet$i(this, _Transport_analyticsFlushTimeout, undefined, "f");
7128
+ __classPrivateFieldGet$j(this, _Transport_analyticsBuffer, "f").clear();
7129
7129
  this.emit('disconnected');
7130
7130
  });
7131
7131
  const { uuid, name } = config;
@@ -7133,36 +7133,36 @@ class Transport extends events.EventEmitter {
7133
7133
  this.me = getBaseMe(entityType, uuid, name);
7134
7134
  }
7135
7135
  getFin() {
7136
- if (!__classPrivateFieldGet$h(this, _Transport_fin, "f")) {
7136
+ if (!__classPrivateFieldGet$j(this, _Transport_fin, "f")) {
7137
7137
  throw new Error('No Fin object registered for this transport');
7138
7138
  }
7139
- return __classPrivateFieldGet$h(this, _Transport_fin, "f");
7139
+ return __classPrivateFieldGet$j(this, _Transport_fin, "f");
7140
7140
  }
7141
7141
  registerFin(_fin) {
7142
- if (__classPrivateFieldGet$h(this, _Transport_fin, "f")) {
7142
+ if (__classPrivateFieldGet$j(this, _Transport_fin, "f")) {
7143
7143
  throw new Error('Fin object has already been registered for this transport');
7144
7144
  }
7145
- __classPrivateFieldSet$g(this, _Transport_fin, _fin, "f");
7145
+ __classPrivateFieldSet$i(this, _Transport_fin, _fin, "f");
7146
7146
  }
7147
7147
  recordAnalytic(action) {
7148
- if (!__classPrivateFieldGet$h(this, _Transport_analyticsEnabled, "f"))
7148
+ if (!__classPrivateFieldGet$j(this, _Transport_analyticsEnabled, "f"))
7149
7149
  return;
7150
- __classPrivateFieldGet$h(this, _Transport_analyticsBuffer, "f").set(action, (__classPrivateFieldGet$h(this, _Transport_analyticsBuffer, "f").get(action) ?? 0) + 1);
7151
- if (__classPrivateFieldGet$h(this, _Transport_analyticsFlushTimeout, "f") === undefined) {
7152
- const timeout = setTimeout(() => __classPrivateFieldGet$h(this, _Transport_instances, "m", _Transport_flushAnalytics).call(this), 30000);
7150
+ __classPrivateFieldGet$j(this, _Transport_analyticsBuffer, "f").set(action, (__classPrivateFieldGet$j(this, _Transport_analyticsBuffer, "f").get(action) ?? 0) + 1);
7151
+ if (__classPrivateFieldGet$j(this, _Transport_analyticsFlushTimeout, "f") === undefined) {
7152
+ const timeout = setTimeout(() => __classPrivateFieldGet$j(this, _Transport_instances, "m", _Transport_flushAnalytics).call(this), 30000);
7153
7153
  if (typeof timeout === 'object' && timeout !== null) {
7154
7154
  timeout.unref?.();
7155
7155
  }
7156
- __classPrivateFieldSet$g(this, _Transport_analyticsFlushTimeout, timeout, "f");
7156
+ __classPrivateFieldSet$i(this, _Transport_analyticsFlushTimeout, timeout, "f");
7157
7157
  }
7158
7158
  }
7159
7159
  shutdown() {
7160
- const wire = __classPrivateFieldGet$h(this, _Transport_wire, "f");
7160
+ const wire = __classPrivateFieldGet$j(this, _Transport_wire, "f");
7161
7161
  return wire.shutdown();
7162
7162
  }
7163
7163
  async connect(config) {
7164
7164
  if (isConfigWithReceiver(config)) {
7165
- await __classPrivateFieldGet$h(this, _Transport_wire, "f").connect(config.receiver);
7165
+ await __classPrivateFieldGet$j(this, _Transport_wire, "f").connect(config.receiver);
7166
7166
  return this.authorize(config);
7167
7167
  }
7168
7168
  if (isRemoteConfig(config)) {
@@ -7178,13 +7178,13 @@ class Transport extends events.EventEmitter {
7178
7178
  return undefined;
7179
7179
  }
7180
7180
  async connectRemote(config) {
7181
- await __classPrivateFieldGet$h(this, _Transport_wire, "f").connect(new (this.environment.getWsConstructor())(config.address));
7181
+ await __classPrivateFieldGet$j(this, _Transport_wire, "f").connect(new (this.environment.getWsConstructor())(config.address));
7182
7182
  return this.authorize(config);
7183
7183
  }
7184
7184
  async connectByPort(config) {
7185
7185
  const { address, uuid } = config;
7186
7186
  const reqAuthPayload = { ...config, type: 'file-token' };
7187
- const wire = __classPrivateFieldGet$h(this, _Transport_wire, "f");
7187
+ const wire = __classPrivateFieldGet$j(this, _Transport_wire, "f");
7188
7188
  await wire.connect(new (this.environment.getWsConstructor())(config.address));
7189
7189
  const requestExtAuthRet = await this.sendAction('request-external-authorization', {
7190
7190
  uuid,
@@ -7220,7 +7220,7 @@ class Transport extends events.EventEmitter {
7220
7220
  payload,
7221
7221
  messageId
7222
7222
  };
7223
- const wire = __classPrivateFieldGet$h(this, _Transport_wire, "f");
7223
+ const wire = __classPrivateFieldGet$j(this, _Transport_wire, "f");
7224
7224
  this.addWireListener(messageId, resolve, (payload) => this.nackHandler(payload, reject, callSites), uncorrelated);
7225
7225
  return wire.send(msg).catch(reject);
7226
7226
  });
@@ -7242,7 +7242,7 @@ class Transport extends events.EventEmitter {
7242
7242
  const resolver = (data) => {
7243
7243
  resolve(data.payload);
7244
7244
  };
7245
- const wire = __classPrivateFieldGet$h(this, _Transport_wire, "f");
7245
+ const wire = __classPrivateFieldGet$j(this, _Transport_wire, "f");
7246
7246
  return wire
7247
7247
  .send(origData)
7248
7248
  .then(() => this.addWireListener(id, resolver, (payload) => this.nackHandler(payload, reject), false))
@@ -7319,11 +7319,11 @@ class Transport extends events.EventEmitter {
7319
7319
  }
7320
7320
  }
7321
7321
  _Transport_wire = new WeakMap(), _Transport_analyticsEnabled = new WeakMap(), _Transport_analyticsBuffer = new WeakMap(), _Transport_analyticsFlushTimeout = new WeakMap(), _Transport_fin = new WeakMap(), _Transport_instances = new WeakSet(), _Transport_flushAnalytics = function _Transport_flushAnalytics() {
7322
- __classPrivateFieldSet$g(this, _Transport_analyticsFlushTimeout, undefined, "f");
7323
- if (__classPrivateFieldGet$h(this, _Transport_analyticsBuffer, "f").size === 0)
7322
+ __classPrivateFieldSet$i(this, _Transport_analyticsFlushTimeout, undefined, "f");
7323
+ if (__classPrivateFieldGet$j(this, _Transport_analyticsBuffer, "f").size === 0)
7324
7324
  return;
7325
- const counts = Object.fromEntries(__classPrivateFieldGet$h(this, _Transport_analyticsBuffer, "f"));
7326
- __classPrivateFieldGet$h(this, _Transport_analyticsBuffer, "f").clear();
7325
+ const counts = Object.fromEntries(__classPrivateFieldGet$j(this, _Transport_analyticsBuffer, "f"));
7326
+ __classPrivateFieldGet$j(this, _Transport_analyticsBuffer, "f").clear();
7327
7327
  this.sendAction('send-analytics-batch', { counts }).catch(() => {
7328
7328
  // analytics flush failure is non-fatal, counts are already cleared
7329
7329
  });
@@ -9954,12 +9954,12 @@ let ChannelError$1 = class ChannelError extends Error {
9954
9954
  }
9955
9955
  };
9956
9956
 
9957
- var __classPrivateFieldGet$g = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9957
+ var __classPrivateFieldGet$i = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9958
9958
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9959
9959
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
9960
9960
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
9961
9961
  };
9962
- var __classPrivateFieldSet$f = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
9962
+ var __classPrivateFieldSet$h = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
9963
9963
  if (kind === "m") throw new TypeError("Private method is not writable");
9964
9964
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
9965
9965
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -9998,7 +9998,7 @@ class ChannelClient extends ChannelBase {
9998
9998
  static closeChannelByEndpointId(id) {
9999
9999
  const channel = channelClientsByEndpointId.get(id);
10000
10000
  if (channel) {
10001
- __classPrivateFieldGet$g(channel, _ChannelClient_close, "f").call(channel);
10001
+ __classPrivateFieldGet$i(channel, _ChannelClient_close, "f").call(channel);
10002
10002
  }
10003
10003
  }
10004
10004
  /**
@@ -10009,7 +10009,7 @@ class ChannelClient extends ChannelBase {
10009
10009
  for (const channelClient of channelClientsByEndpointId.values()) {
10010
10010
  if (channelClient.providerIdentity.channelId === eventPayload.channelId) {
10011
10011
  channelClient.disconnectListener(eventPayload);
10012
- __classPrivateFieldGet$g(channelClient, _ChannelClient_close, "f").call(channelClient);
10012
+ __classPrivateFieldGet$i(channelClient, _ChannelClient_close, "f").call(channelClient);
10013
10013
  }
10014
10014
  }
10015
10015
  }
@@ -10024,12 +10024,12 @@ class ChannelClient extends ChannelBase {
10024
10024
  this.processAction = (action, payload, senderIdentity) => super.processAction(action, payload, senderIdentity);
10025
10025
  _ChannelClient_close.set(this, () => {
10026
10026
  channelClientsByEndpointId.delete(this.endpointId);
10027
- __classPrivateFieldGet$g(this, _ChannelClient_strategy, "f").close();
10027
+ __classPrivateFieldGet$i(this, _ChannelClient_strategy, "f").close();
10028
10028
  });
10029
- __classPrivateFieldSet$f(this, _ChannelClient_protectedObj, new ProtectedItems(routingInfo, close), "f");
10029
+ __classPrivateFieldSet$h(this, _ChannelClient_protectedObj, new ProtectedItems(routingInfo, close), "f");
10030
10030
  this.disconnectListener = () => undefined;
10031
10031
  this.endpointId = routingInfo.endpointId;
10032
- __classPrivateFieldSet$f(this, _ChannelClient_strategy, strategy, "f");
10032
+ __classPrivateFieldSet$h(this, _ChannelClient_strategy, strategy, "f");
10033
10033
  channelClientsByEndpointId.set(this.endpointId, this);
10034
10034
  strategy.receive(this.processAction);
10035
10035
  }
@@ -10037,7 +10037,7 @@ class ChannelClient extends ChannelBase {
10037
10037
  * a read-only provider identity
10038
10038
  */
10039
10039
  get providerIdentity() {
10040
- const protectedObj = __classPrivateFieldGet$g(this, _ChannelClient_protectedObj, "f");
10040
+ const protectedObj = __classPrivateFieldGet$i(this, _ChannelClient_protectedObj, "f");
10041
10041
  return protectedObj.providerIdentity;
10042
10042
  }
10043
10043
  /**
@@ -10066,9 +10066,9 @@ class ChannelClient extends ChannelBase {
10066
10066
  * ```
10067
10067
  */
10068
10068
  async dispatch(action, payload) {
10069
- if (__classPrivateFieldGet$g(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
10069
+ if (__classPrivateFieldGet$i(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
10070
10070
  const callSites = RuntimeError.getCallSite();
10071
- return __classPrivateFieldGet$g(this, _ChannelClient_strategy, "f").send(this.providerIdentity.channelId, action, payload).catch((e) => {
10071
+ return __classPrivateFieldGet$i(this, _ChannelClient_strategy, "f").send(this.providerIdentity.channelId, action, payload).catch((e) => {
10072
10072
  throw new ChannelError$1(e, action, payload, callSites);
10073
10073
  });
10074
10074
  }
@@ -10120,10 +10120,10 @@ class ChannelClient extends ChannelBase {
10120
10120
  */
10121
10121
  async disconnect() {
10122
10122
  await this.sendDisconnectAction();
10123
- __classPrivateFieldGet$g(this, _ChannelClient_close, "f").call(this);
10123
+ __classPrivateFieldGet$i(this, _ChannelClient_close, "f").call(this);
10124
10124
  }
10125
10125
  async sendDisconnectAction() {
10126
- const protectedObj = __classPrivateFieldGet$g(this, _ChannelClient_protectedObj, "f");
10126
+ const protectedObj = __classPrivateFieldGet$i(this, _ChannelClient_protectedObj, "f");
10127
10127
  await protectedObj.close();
10128
10128
  }
10129
10129
  /**
@@ -10146,13 +10146,13 @@ function exhaustiveCheck(value, allowed) {
10146
10146
  throw new Error(`Unsupported value: ${value}${allowed ? `\n Supported values are: ${allowed.join('')}` : ''}`);
10147
10147
  }
10148
10148
 
10149
- var __classPrivateFieldSet$e = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10149
+ var __classPrivateFieldSet$g = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10150
10150
  if (kind === "m") throw new TypeError("Private method is not writable");
10151
10151
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10152
10152
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
10153
10153
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
10154
10154
  };
10155
- var __classPrivateFieldGet$f = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10155
+ var __classPrivateFieldGet$h = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10156
10156
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10157
10157
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10158
10158
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -10175,7 +10175,7 @@ class ClassicStrategy {
10175
10175
  // connection problems occur
10176
10176
  _ClassicStrategy_pendingMessagesByEndpointId.set(this, new Map());
10177
10177
  this.send = async (endpointId, action, payload) => {
10178
- const to = __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10178
+ const to = __classPrivateFieldGet$h(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10179
10179
  if (!to) {
10180
10180
  throw new Error(`Could not locate routing info for endpoint ${endpointId}`);
10181
10181
  }
@@ -10187,13 +10187,13 @@ class ClassicStrategy {
10187
10187
  }
10188
10188
  delete cleanId.isLocalEndpointId;
10189
10189
  // grab the promise before awaiting it to save in our pending messages map
10190
- const p = __classPrivateFieldGet$f(this, _ClassicStrategy_wire, "f").sendAction('send-channel-message', {
10190
+ const p = __classPrivateFieldGet$h(this, _ClassicStrategy_wire, "f").sendAction('send-channel-message', {
10191
10191
  ...cleanId,
10192
10192
  providerIdentity: this.providerIdentity,
10193
10193
  action,
10194
10194
  payload
10195
10195
  });
10196
- __classPrivateFieldGet$f(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
10196
+ __classPrivateFieldGet$h(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
10197
10197
  const raw = await p
10198
10198
  .catch((error) => {
10199
10199
  if ('cause' in error) {
@@ -10203,16 +10203,16 @@ class ClassicStrategy {
10203
10203
  })
10204
10204
  .finally(() => {
10205
10205
  // clean up the pending promise
10206
- __classPrivateFieldGet$f(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
10206
+ __classPrivateFieldGet$h(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
10207
10207
  });
10208
10208
  return raw.payload.data.result;
10209
10209
  };
10210
10210
  this.close = async () => {
10211
10211
  this.messageReceiver.removeEndpoint(this.providerIdentity.channelId, this.endpointId);
10212
- [...__classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
10213
- __classPrivateFieldSet$e(this, _ClassicStrategy_endpointIdentityMap, new Map(), "f");
10212
+ [...__classPrivateFieldGet$h(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
10213
+ __classPrivateFieldSet$g(this, _ClassicStrategy_endpointIdentityMap, new Map(), "f");
10214
10214
  };
10215
- __classPrivateFieldSet$e(this, _ClassicStrategy_wire, wire, "f");
10215
+ __classPrivateFieldSet$g(this, _ClassicStrategy_wire, wire, "f");
10216
10216
  }
10217
10217
  onEndpointDisconnect(endpointId, listener) {
10218
10218
  // Never fires for 'classic'.
@@ -10221,20 +10221,20 @@ class ClassicStrategy {
10221
10221
  this.messageReceiver.addEndpoint(listener, this.providerIdentity.channelId, this.endpointId);
10222
10222
  }
10223
10223
  async closeEndpoint(endpointId) {
10224
- const id = __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10225
- __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").delete(endpointId);
10226
- const pendingSet = __classPrivateFieldGet$f(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId);
10224
+ const id = __classPrivateFieldGet$h(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10225
+ __classPrivateFieldGet$h(this, _ClassicStrategy_endpointIdentityMap, "f").delete(endpointId);
10226
+ const pendingSet = __classPrivateFieldGet$h(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId);
10227
10227
  pendingSet?.forEach((p) => {
10228
10228
  const errorMsg = `Channel connection with identity uuid: ${id?.uuid} / name: ${id?.name} / endpointId: ${endpointId} no longer connected.`;
10229
10229
  p.cancel(new Error(errorMsg));
10230
10230
  });
10231
10231
  }
10232
10232
  isEndpointConnected(endpointId) {
10233
- return __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").has(endpointId);
10233
+ return __classPrivateFieldGet$h(this, _ClassicStrategy_endpointIdentityMap, "f").has(endpointId);
10234
10234
  }
10235
10235
  addEndpoint(endpointId, payload) {
10236
- __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").set(endpointId, payload.endpointIdentity);
10237
- __classPrivateFieldGet$f(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").set(endpointId, new Set());
10236
+ __classPrivateFieldGet$h(this, _ClassicStrategy_endpointIdentityMap, "f").set(endpointId, payload.endpointIdentity);
10237
+ __classPrivateFieldGet$h(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").set(endpointId, new Set());
10238
10238
  }
10239
10239
  isValidEndpointPayload(payload) {
10240
10240
  return (typeof payload?.endpointIdentity?.endpointId === 'string' ||
@@ -10245,12 +10245,12 @@ _ClassicStrategy_wire = new WeakMap(), _ClassicStrategy_endpointIdentityMap = ne
10245
10245
  // Arbitrarily starting at 5 to leave the door open to backfilling pre endpointId etc.
10246
10246
  const ClassicInfo = { version: 5, minimumVersion: 0, type: 'classic' };
10247
10247
 
10248
- var __classPrivateFieldGet$e = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10248
+ var __classPrivateFieldGet$g = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10249
10249
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10250
10250
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10251
10251
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10252
10252
  };
10253
- var __classPrivateFieldSet$d = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10253
+ var __classPrivateFieldSet$f = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10254
10254
  if (kind === "m") throw new TypeError("Private method is not writable");
10255
10255
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10256
10256
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -10281,8 +10281,8 @@ class RTCEndpoint {
10281
10281
  if (this.rtc.rtcClient.connectionState !== 'connected') {
10282
10282
  this.rtc.rtcClient.removeEventListener('connectionstatechange', this.connectionStateChangeHandler);
10283
10283
  this.close();
10284
- if (__classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f")) {
10285
- __classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f").call(this);
10284
+ if (__classPrivateFieldGet$g(this, _RTCEndpoint_disconnectListener, "f")) {
10285
+ __classPrivateFieldGet$g(this, _RTCEndpoint_disconnectListener, "f").call(this);
10286
10286
  }
10287
10287
  }
10288
10288
  };
@@ -10330,9 +10330,9 @@ class RTCEndpoint {
10330
10330
  data = new TextDecoder().decode(e.data);
10331
10331
  }
10332
10332
  const { messageId, action, payload } = JSON.parse(data);
10333
- if (__classPrivateFieldGet$e(this, _RTCEndpoint_processAction, "f")) {
10333
+ if (__classPrivateFieldGet$g(this, _RTCEndpoint_processAction, "f")) {
10334
10334
  try {
10335
- const res = await __classPrivateFieldGet$e(this, _RTCEndpoint_processAction, "f").call(this, action, payload, endpointIdentity);
10335
+ const res = await __classPrivateFieldGet$g(this, _RTCEndpoint_processAction, "f").call(this, action, payload, endpointIdentity);
10336
10336
  this.rtc.channels.response.send(JSON.stringify({
10337
10337
  messageId,
10338
10338
  payload: res,
@@ -10366,25 +10366,25 @@ class RTCEndpoint {
10366
10366
  datachannel.onclose = (e) => {
10367
10367
  [...this.responseMap.values()].forEach((promise) => promise.reject(new Error('RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.')));
10368
10368
  this.close();
10369
- if (__classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f")) {
10370
- __classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f").call(this);
10369
+ if (__classPrivateFieldGet$g(this, _RTCEndpoint_disconnectListener, "f")) {
10370
+ __classPrivateFieldGet$g(this, _RTCEndpoint_disconnectListener, "f").call(this);
10371
10371
  }
10372
10372
  };
10373
10373
  });
10374
10374
  }
10375
10375
  onDisconnect(listener) {
10376
- if (!__classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f")) {
10377
- __classPrivateFieldSet$d(this, _RTCEndpoint_disconnectListener, listener, "f");
10376
+ if (!__classPrivateFieldGet$g(this, _RTCEndpoint_disconnectListener, "f")) {
10377
+ __classPrivateFieldSet$f(this, _RTCEndpoint_disconnectListener, listener, "f");
10378
10378
  }
10379
10379
  else {
10380
10380
  throw new Error('RTCEndpoint disconnectListener cannot be set twice.');
10381
10381
  }
10382
10382
  }
10383
10383
  receive(listener) {
10384
- if (__classPrivateFieldGet$e(this, _RTCEndpoint_processAction, "f")) {
10384
+ if (__classPrivateFieldGet$g(this, _RTCEndpoint_processAction, "f")) {
10385
10385
  throw new Error('You have already set a listener for this RTC Endpoint.');
10386
10386
  }
10387
- __classPrivateFieldSet$d(this, _RTCEndpoint_processAction, listener, "f");
10387
+ __classPrivateFieldSet$f(this, _RTCEndpoint_processAction, listener, "f");
10388
10388
  }
10389
10389
  get connected() {
10390
10390
  return this.rtc.rtcClient.connectionState === 'connected';
@@ -10392,12 +10392,12 @@ class RTCEndpoint {
10392
10392
  }
10393
10393
  _RTCEndpoint_processAction = new WeakMap(), _RTCEndpoint_disconnectListener = new WeakMap();
10394
10394
 
10395
- var __classPrivateFieldGet$d = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10395
+ var __classPrivateFieldGet$f = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10396
10396
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10397
10397
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10398
10398
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10399
10399
  };
10400
- var __classPrivateFieldSet$c = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10400
+ var __classPrivateFieldSet$e = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10401
10401
  if (kind === "m") throw new TypeError("Private method is not writable");
10402
10402
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10403
10403
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -10416,11 +10416,11 @@ class EndpointStrategy {
10416
10416
  return this.getEndpointById(endpointId).send(action, payload);
10417
10417
  };
10418
10418
  this.close = async () => {
10419
- if (__classPrivateFieldGet$d(this, _EndpointStrategy_connected, "f")) {
10420
- __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
10421
- __classPrivateFieldSet$c(this, _EndpointStrategy_endpointMap, new Map(), "f");
10419
+ if (__classPrivateFieldGet$f(this, _EndpointStrategy_connected, "f")) {
10420
+ __classPrivateFieldGet$f(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
10421
+ __classPrivateFieldSet$e(this, _EndpointStrategy_endpointMap, new Map(), "f");
10422
10422
  }
10423
- __classPrivateFieldSet$c(this, _EndpointStrategy_connected, false, "f");
10423
+ __classPrivateFieldSet$e(this, _EndpointStrategy_connected, false, "f");
10424
10424
  };
10425
10425
  this.isValidEndpointPayload = validateEndpoint;
10426
10426
  }
@@ -10428,39 +10428,39 @@ class EndpointStrategy {
10428
10428
  this.getEndpointById(endpointId).onDisconnect(listener);
10429
10429
  }
10430
10430
  receive(listener) {
10431
- if (__classPrivateFieldGet$d(this, _EndpointStrategy_processAction, "f")) {
10431
+ if (__classPrivateFieldGet$f(this, _EndpointStrategy_processAction, "f")) {
10432
10432
  throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);
10433
10433
  }
10434
- __classPrivateFieldSet$c(this, _EndpointStrategy_processAction, listener, "f");
10434
+ __classPrivateFieldSet$e(this, _EndpointStrategy_processAction, listener, "f");
10435
10435
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
10436
- __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.receive(__classPrivateFieldGet$d(this, _EndpointStrategy_processAction, "f")));
10436
+ __classPrivateFieldGet$f(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.receive(__classPrivateFieldGet$f(this, _EndpointStrategy_processAction, "f")));
10437
10437
  }
10438
10438
  getEndpointById(endpointId) {
10439
- const endpoint = __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").get(endpointId);
10439
+ const endpoint = __classPrivateFieldGet$f(this, _EndpointStrategy_endpointMap, "f").get(endpointId);
10440
10440
  if (!endpoint) {
10441
10441
  throw new Error(`Client with endpoint id ${endpointId} is not connected`);
10442
10442
  }
10443
10443
  return endpoint;
10444
10444
  }
10445
10445
  get connected() {
10446
- return __classPrivateFieldGet$d(this, _EndpointStrategy_connected, "f");
10446
+ return __classPrivateFieldGet$f(this, _EndpointStrategy_connected, "f");
10447
10447
  }
10448
10448
  isEndpointConnected(endpointId) {
10449
- return __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").has(endpointId);
10449
+ return __classPrivateFieldGet$f(this, _EndpointStrategy_endpointMap, "f").has(endpointId);
10450
10450
  }
10451
10451
  addEndpoint(endpointId, payload) {
10452
- if (!__classPrivateFieldGet$d(this, _EndpointStrategy_connected, "f")) {
10452
+ if (!__classPrivateFieldGet$f(this, _EndpointStrategy_connected, "f")) {
10453
10453
  console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);
10454
10454
  return;
10455
10455
  }
10456
10456
  const clientStrat = new this.EndpointType(payload);
10457
- if (__classPrivateFieldGet$d(this, _EndpointStrategy_processAction, "f")) {
10458
- clientStrat.receive(__classPrivateFieldGet$d(this, _EndpointStrategy_processAction, "f"));
10457
+ if (__classPrivateFieldGet$f(this, _EndpointStrategy_processAction, "f")) {
10458
+ clientStrat.receive(__classPrivateFieldGet$f(this, _EndpointStrategy_processAction, "f"));
10459
10459
  }
10460
- __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").set(endpointId, clientStrat);
10460
+ __classPrivateFieldGet$f(this, _EndpointStrategy_endpointMap, "f").set(endpointId, clientStrat);
10461
10461
  }
10462
10462
  async closeEndpoint(endpointId) {
10463
- __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").delete(endpointId);
10463
+ __classPrivateFieldGet$f(this, _EndpointStrategy_endpointMap, "f").delete(endpointId);
10464
10464
  }
10465
10465
  }
10466
10466
  _EndpointStrategy_processAction = new WeakMap(), _EndpointStrategy_endpointMap = new WeakMap(), _EndpointStrategy_connected = new WeakMap();
@@ -10621,12 +10621,12 @@ function runtimeUuidMeetsMinimumRuntimeVersion(runtimeUuid, minVersion) {
10621
10621
  return meetsMinimumRuntimeVersion(runtimeVersion, minVersion);
10622
10622
  }
10623
10623
 
10624
- var __classPrivateFieldGet$c = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10624
+ var __classPrivateFieldGet$e = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10625
10625
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10626
10626
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10627
10627
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10628
10628
  };
10629
- var __classPrivateFieldSet$b = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10629
+ var __classPrivateFieldSet$d = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10630
10630
  if (kind === "m") throw new TypeError("Private method is not writable");
10631
10631
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10632
10632
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -10664,19 +10664,19 @@ class ChannelProvider extends ChannelBase {
10664
10664
  * a read-only array containing all the identities of connecting clients.
10665
10665
  */
10666
10666
  get connections() {
10667
- return [...__classPrivateFieldGet$c(this, _ChannelProvider_connections, "f")];
10667
+ return [...__classPrivateFieldGet$e(this, _ChannelProvider_connections, "f")];
10668
10668
  }
10669
10669
  static handleClientDisconnection(channel, payload) {
10670
10670
  if (payload?.endpointId) {
10671
10671
  const { uuid, name, endpointId, isLocalEndpointId } = payload;
10672
- __classPrivateFieldGet$c(channel, _ChannelProvider_removeEndpoint, "f").call(channel, { uuid, name, endpointId, isLocalEndpointId });
10672
+ __classPrivateFieldGet$e(channel, _ChannelProvider_removeEndpoint, "f").call(channel, { uuid, name, endpointId, isLocalEndpointId });
10673
10673
  }
10674
10674
  else {
10675
10675
  // this is here to support older runtimes that did not have endpointId
10676
10676
  const multipleRemoves = channel.connections.filter((identity) => {
10677
10677
  return identity.uuid === payload.uuid && identity.name === payload.name;
10678
10678
  });
10679
- multipleRemoves.forEach(__classPrivateFieldGet$c(channel, _ChannelProvider_removeEndpoint, "f"));
10679
+ multipleRemoves.forEach(__classPrivateFieldGet$e(channel, _ChannelProvider_removeEndpoint, "f"));
10680
10680
  }
10681
10681
  channel.disconnectListener(payload);
10682
10682
  }
@@ -10693,8 +10693,8 @@ class ChannelProvider extends ChannelBase {
10693
10693
  _ChannelProvider_strategy.set(this, void 0);
10694
10694
  _ChannelProvider_removeEndpoint.set(this, (identity) => {
10695
10695
  const remainingConnections = this.connections.filter((clientIdentity) => clientIdentity.endpointId !== identity.endpointId);
10696
- __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
10697
- __classPrivateFieldSet$b(this, _ChannelProvider_connections, remainingConnections, "f");
10696
+ __classPrivateFieldGet$e(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
10697
+ __classPrivateFieldSet$d(this, _ChannelProvider_connections, remainingConnections, "f");
10698
10698
  });
10699
10699
  // Must be bound.
10700
10700
  this.processAction = async (action, payload, senderIdentity) => {
@@ -10708,17 +10708,17 @@ class ChannelProvider extends ChannelBase {
10708
10708
  return super.processAction(action, payload, senderIdentity);
10709
10709
  };
10710
10710
  _ChannelProvider_close.set(this, () => {
10711
- __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").close();
10711
+ __classPrivateFieldGet$e(this, _ChannelProvider_strategy, "f").close();
10712
10712
  const remove = ChannelProvider.removalMap.get(this);
10713
10713
  if (remove) {
10714
10714
  remove();
10715
10715
  }
10716
10716
  });
10717
- __classPrivateFieldSet$b(this, _ChannelProvider_protectedObj, new ProtectedItems(providerIdentity, close), "f");
10717
+ __classPrivateFieldSet$d(this, _ChannelProvider_protectedObj, new ProtectedItems(providerIdentity, close), "f");
10718
10718
  this.connectListener = () => undefined;
10719
10719
  this.disconnectListener = () => undefined;
10720
- __classPrivateFieldSet$b(this, _ChannelProvider_connections, [], "f");
10721
- __classPrivateFieldSet$b(this, _ChannelProvider_strategy, strategy, "f");
10720
+ __classPrivateFieldSet$d(this, _ChannelProvider_connections, [], "f");
10721
+ __classPrivateFieldSet$d(this, _ChannelProvider_strategy, strategy, "f");
10722
10722
  strategy.receive(this.processAction);
10723
10723
  }
10724
10724
  /**
@@ -10749,16 +10749,16 @@ class ChannelProvider extends ChannelBase {
10749
10749
  */
10750
10750
  dispatch(to, action, payload) {
10751
10751
  const endpointId = to.endpointId ?? this.getEndpointIdForOpenFinId(to, action);
10752
- if (endpointId && __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
10752
+ if (endpointId && __classPrivateFieldGet$e(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
10753
10753
  const callSites = RuntimeError.getCallSite();
10754
- return __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").send(endpointId, action, payload).catch((e) => {
10754
+ return __classPrivateFieldGet$e(this, _ChannelProvider_strategy, "f").send(endpointId, action, payload).catch((e) => {
10755
10755
  throw new ChannelError$1(e, action, payload, callSites);
10756
10756
  });
10757
10757
  }
10758
10758
  return Promise.reject(new Error(`Client connection with identity uuid: ${to.uuid} / name: ${to.name} / endpointId: ${endpointId} no longer connected.`));
10759
10759
  }
10760
10760
  async processConnection(senderId, payload) {
10761
- __classPrivateFieldGet$c(this, _ChannelProvider_connections, "f").push(senderId);
10761
+ __classPrivateFieldGet$e(this, _ChannelProvider_connections, "f").push(senderId);
10762
10762
  return this.connectListener(senderId, payload);
10763
10763
  }
10764
10764
  /**
@@ -10781,7 +10781,7 @@ class ChannelProvider extends ChannelBase {
10781
10781
  * ```
10782
10782
  */
10783
10783
  publish(action, payload) {
10784
- return this.connections.map((to) => __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").send(to.endpointId, action, payload));
10784
+ return this.connections.map((to) => __classPrivateFieldGet$e(this, _ChannelProvider_strategy, "f").send(to.endpointId, action, payload));
10785
10785
  }
10786
10786
  /**
10787
10787
  * Register a listener that is called on every new client connection.
@@ -10855,11 +10855,11 @@ class ChannelProvider extends ChannelBase {
10855
10855
  * ```
10856
10856
  */
10857
10857
  async destroy() {
10858
- const protectedObj = __classPrivateFieldGet$c(this, _ChannelProvider_protectedObj, "f");
10858
+ const protectedObj = __classPrivateFieldGet$e(this, _ChannelProvider_protectedObj, "f");
10859
10859
  protectedObj.providerIdentity;
10860
- __classPrivateFieldSet$b(this, _ChannelProvider_connections, [], "f");
10860
+ __classPrivateFieldSet$d(this, _ChannelProvider_connections, [], "f");
10861
10861
  await protectedObj.close();
10862
- __classPrivateFieldGet$c(this, _ChannelProvider_close, "f").call(this);
10862
+ __classPrivateFieldGet$e(this, _ChannelProvider_close, "f").call(this);
10863
10863
  }
10864
10864
  /**
10865
10865
  * Returns an array with info on every Client connected to the Provider
@@ -10929,7 +10929,7 @@ class ChannelProvider extends ChannelBase {
10929
10929
  getEndpointIdForOpenFinId(clientIdentity, action) {
10930
10930
  const matchingConnections = this.connections.filter((c) => c.name === clientIdentity.name && c.uuid === clientIdentity.uuid);
10931
10931
  if (matchingConnections.length >= 2) {
10932
- const protectedObj = __classPrivateFieldGet$c(this, _ChannelProvider_protectedObj, "f");
10932
+ const protectedObj = __classPrivateFieldGet$e(this, _ChannelProvider_protectedObj, "f");
10933
10933
  const { uuid, name } = clientIdentity;
10934
10934
  const providerUuid = protectedObj?.providerIdentity.uuid;
10935
10935
  const providerName = protectedObj?.providerIdentity.name;
@@ -11123,13 +11123,13 @@ class CombinedStrategy {
11123
11123
  }
11124
11124
  }
11125
11125
 
11126
- var __classPrivateFieldSet$a = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11126
+ var __classPrivateFieldSet$c = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11127
11127
  if (kind === "m") throw new TypeError("Private method is not writable");
11128
11128
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
11129
11129
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
11130
11130
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11131
11131
  };
11132
- var __classPrivateFieldGet$b = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11132
+ var __classPrivateFieldGet$d = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11133
11133
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
11134
11134
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11135
11135
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -11164,8 +11164,8 @@ class ConnectionManager extends Base {
11164
11164
  };
11165
11165
  this.providerMap = new Map();
11166
11166
  this.protocolManager = new ProtocolManager(this.wire.environment.type === 'node' ? ['classic'] : ['rtc', 'classic']);
11167
- __classPrivateFieldSet$a(this, _ConnectionManager_messageReceiver, new MessageReceiver(wire), "f");
11168
- __classPrivateFieldSet$a(this, _ConnectionManager_rtcConnectionManager, new RTCICEManager(wire), "f");
11167
+ __classPrivateFieldSet$c(this, _ConnectionManager_messageReceiver, new MessageReceiver(wire), "f");
11168
+ __classPrivateFieldSet$c(this, _ConnectionManager_rtcConnectionManager, new RTCICEManager(wire), "f");
11169
11169
  wire.registerMessageHandler(this.onmessage.bind(this));
11170
11170
  }
11171
11171
  createProvider(options, providerIdentity) {
@@ -11176,7 +11176,7 @@ class ConnectionManager extends Base {
11176
11176
  case 'rtc':
11177
11177
  return new RTCStrategy();
11178
11178
  case 'classic':
11179
- return new ClassicStrategy(this.wire, __classPrivateFieldGet$b(this, _ConnectionManager_messageReceiver, "f"),
11179
+ return new ClassicStrategy(this.wire, __classPrivateFieldGet$d(this, _ConnectionManager_messageReceiver, "f"),
11180
11180
  // Providers do not have an endpointId, use channelId as endpointId in the strategy.
11181
11181
  providerIdentity.channelId, providerIdentity);
11182
11182
  default:
@@ -11212,7 +11212,7 @@ class ConnectionManager extends Base {
11212
11212
  const supportedProtocols = await Promise.all(protocols.map(async (type) => {
11213
11213
  switch (type) {
11214
11214
  case 'rtc': {
11215
- const { rtcClient, channels, offer, rtcConnectionId, channelsOpened } = await __classPrivateFieldGet$b(this, _ConnectionManager_rtcConnectionManager, "f").startClientOffer();
11215
+ const { rtcClient, channels, offer, rtcConnectionId, channelsOpened } = await __classPrivateFieldGet$d(this, _ConnectionManager_rtcConnectionManager, "f").startClientOffer();
11216
11216
  rtcPacket = { rtcClient, channels, channelsOpened };
11217
11217
  return {
11218
11218
  type: 'rtc',
@@ -11239,18 +11239,18 @@ class ConnectionManager extends Base {
11239
11239
  routingInfo.endpointId = this.wire.environment.getNextMessageId();
11240
11240
  // For New Clients connecting to Old Providers. To prevent multi-dispatching and publishing, we delete previously-connected
11241
11241
  // clients that are in the same context as the newly-connected client.
11242
- __classPrivateFieldGet$b(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
11242
+ __classPrivateFieldGet$d(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
11243
11243
  }
11244
11244
  const answer = routingInfo.answer ?? {
11245
11245
  supportedProtocols: [{ type: 'classic', version: 1 }]
11246
11246
  };
11247
11247
  const createStrategyFromAnswer = async (protocol) => {
11248
11248
  if (protocol.type === 'rtc' && rtcPacket) {
11249
- await __classPrivateFieldGet$b(this, _ConnectionManager_rtcConnectionManager, "f").finishClientOffer(rtcPacket.rtcClient, protocol.payload.answer, rtcPacket.channelsOpened);
11249
+ await __classPrivateFieldGet$d(this, _ConnectionManager_rtcConnectionManager, "f").finishClientOffer(rtcPacket.rtcClient, protocol.payload.answer, rtcPacket.channelsOpened);
11250
11250
  return new RTCStrategy();
11251
11251
  }
11252
11252
  if (protocol.type === 'classic') {
11253
- return new ClassicStrategy(this.wire, __classPrivateFieldGet$b(this, _ConnectionManager_messageReceiver, "f"), routingInfo.endpointId, routingInfo);
11253
+ return new ClassicStrategy(this.wire, __classPrivateFieldGet$d(this, _ConnectionManager_messageReceiver, "f"), routingInfo.endpointId, routingInfo);
11254
11254
  }
11255
11255
  return null;
11256
11256
  };
@@ -11318,7 +11318,7 @@ class ConnectionManager extends Base {
11318
11318
  clientAnswer = await overlappingProtocols.reduce(async (accumP, protocolToUse) => {
11319
11319
  const answer = await accumP;
11320
11320
  if (protocolToUse.type === 'rtc') {
11321
- const { answer: rtcAnswer, rtcClient, channels } = await __classPrivateFieldGet$b(this, _ConnectionManager_rtcConnectionManager, "f").createProviderAnswer(protocolToUse.payload.rtcConnectionId, protocolToUse.payload.offer);
11321
+ const { answer: rtcAnswer, rtcClient, channels } = await __classPrivateFieldGet$d(this, _ConnectionManager_rtcConnectionManager, "f").createProviderAnswer(protocolToUse.payload.rtcConnectionId, protocolToUse.payload.offer);
11322
11322
  answer.supportedProtocols.push({
11323
11323
  type: 'rtc',
11324
11324
  version: RTCInfo.version,
@@ -11365,13 +11365,13 @@ _ConnectionManager_messageReceiver = new WeakMap(), _ConnectionManager_rtcConnec
11365
11365
  *
11366
11366
  * @packageDocumentation
11367
11367
  */
11368
- var __classPrivateFieldSet$9 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11368
+ var __classPrivateFieldSet$b = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11369
11369
  if (kind === "m") throw new TypeError("Private method is not writable");
11370
11370
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
11371
11371
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
11372
11372
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11373
11373
  };
11374
- var __classPrivateFieldGet$a = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11374
+ var __classPrivateFieldGet$c = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11375
11375
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
11376
11376
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11377
11377
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -11419,11 +11419,11 @@ class Channel extends EmitterBase {
11419
11419
  ChannelClient.handleProviderDisconnect(eventPayload);
11420
11420
  }),
11421
11421
  this.on('connected', (...args) => {
11422
- __classPrivateFieldGet$a(this, _Channel_internalEmitter, "f").emit('connected', ...args);
11422
+ __classPrivateFieldGet$c(this, _Channel_internalEmitter, "f").emit('connected', ...args);
11423
11423
  })
11424
11424
  ]).catch(() => new Error('error setting up channel connection listeners'));
11425
11425
  }));
11426
- __classPrivateFieldSet$9(this, _Channel_connectionManager, new ConnectionManager(wire), "f");
11426
+ __classPrivateFieldSet$b(this, _Channel_connectionManager, new ConnectionManager(wire), "f");
11427
11427
  }
11428
11428
  /**
11429
11429
  *
@@ -11498,7 +11498,7 @@ class Channel extends EmitterBase {
11498
11498
  resolve(true);
11499
11499
  }
11500
11500
  };
11501
- __classPrivateFieldGet$a(this, _Channel_internalEmitter, "f").on('connected', connectedListener);
11501
+ __classPrivateFieldGet$c(this, _Channel_internalEmitter, "f").on('connected', connectedListener);
11502
11502
  });
11503
11503
  try {
11504
11504
  if (retryInfo.count > 0) {
@@ -11530,7 +11530,7 @@ class Channel extends EmitterBase {
11530
11530
  finally {
11531
11531
  retryInfo.count += 1;
11532
11532
  // in case of other errors, remove our listener
11533
- __classPrivateFieldGet$a(this, _Channel_internalEmitter, "f").removeListener('connected', connectedListener);
11533
+ __classPrivateFieldGet$c(this, _Channel_internalEmitter, "f").removeListener('connected', connectedListener);
11534
11534
  }
11535
11535
  } while (shouldWait); // If we're waiting we retry the above loop
11536
11536
  // Should wait was false, no channel was found.
@@ -11589,12 +11589,12 @@ class Channel extends EmitterBase {
11589
11589
  async connect(channelName, options = {}) {
11590
11590
  // Make sure we don't connect before listeners are set up
11591
11591
  // This also errors if we're not in OpenFin, ensuring we don't run unnecessary code
11592
- await __classPrivateFieldGet$a(this, _Channel_readyToConnect, "f").getValue();
11592
+ await __classPrivateFieldGet$c(this, _Channel_readyToConnect, "f").getValue();
11593
11593
  if (!channelName || typeof channelName !== 'string') {
11594
11594
  throw new Error('Please provide a channelName string to connect to a channel.');
11595
11595
  }
11596
11596
  const opts = { wait: true, ...this.wire.environment.getDefaultChannelOptions().connect, ...options };
11597
- const { offer, rtc: rtcPacket } = await __classPrivateFieldGet$a(this, _Channel_connectionManager, "f").createClientOffer(opts);
11597
+ const { offer, rtc: rtcPacket } = await __classPrivateFieldGet$c(this, _Channel_connectionManager, "f").createClientOffer(opts);
11598
11598
  let connectionUrl;
11599
11599
  if (this.fin.me.isFrame || this.fin.me.isView || this.fin.me.isWindow) {
11600
11600
  connectionUrl = (await this.fin.me.getInfo()).url;
@@ -11606,7 +11606,7 @@ class Channel extends EmitterBase {
11606
11606
  connectionUrl
11607
11607
  };
11608
11608
  const routingInfo = await this.safeConnect(channelName, opts.wait, connectPayload);
11609
- const strategy = await __classPrivateFieldGet$a(this, _Channel_connectionManager, "f").createClientStrategy(rtcPacket, routingInfo);
11609
+ const strategy = await __classPrivateFieldGet$c(this, _Channel_connectionManager, "f").createClientStrategy(rtcPacket, routingInfo);
11610
11610
  const channel = new ChannelClient(routingInfo, () => ChannelClient.wireClose(this.wire, routingInfo, routingInfo.endpointId), strategy);
11611
11611
  // It is the client's responsibility to handle endpoint disconnection to the provider.
11612
11612
  // If the endpoint dies, the client will force a disconnection through the core.
@@ -11675,7 +11675,7 @@ class Channel extends EmitterBase {
11675
11675
  throw new Error('Please provide a channelName to create a channel');
11676
11676
  }
11677
11677
  const { payload: { data: providerIdentity } } = await this.wire.sendAction('create-channel', { channelName });
11678
- const channel = __classPrivateFieldGet$a(this, _Channel_connectionManager, "f").createProvider(options, providerIdentity);
11678
+ const channel = __classPrivateFieldGet$c(this, _Channel_connectionManager, "f").createProvider(options, providerIdentity);
11679
11679
  // TODO: fix typing (internal)
11680
11680
  // @ts-expect-error
11681
11681
  this.on('client-disconnected', (eventPayload) => {
@@ -12214,13 +12214,13 @@ class GlobalHotkey extends EmitterBase {
12214
12214
  }
12215
12215
  }
12216
12216
 
12217
- var __classPrivateFieldSet$8 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12217
+ var __classPrivateFieldSet$a = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12218
12218
  if (kind === "m") throw new TypeError("Private method is not writable");
12219
12219
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
12220
12220
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
12221
12221
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12222
12222
  };
12223
- var __classPrivateFieldGet$9 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12223
+ var __classPrivateFieldGet$b = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12224
12224
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
12225
12225
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
12226
12226
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -12252,24 +12252,24 @@ class Platform extends EmitterBase {
12252
12252
  this.wire.sendAction('platform-get-client', this.identity).catch((e) => {
12253
12253
  // don't expose
12254
12254
  });
12255
- if (!Platform.clientMap.has(__classPrivateFieldGet$9(this, _Platform_channelName, "f"))) {
12256
- const clientPromise = __classPrivateFieldGet$9(this, _Platform_connectToProvider, "f").call(this);
12257
- Platform.clientMap.set(__classPrivateFieldGet$9(this, _Platform_channelName, "f"), clientPromise);
12255
+ if (!Platform.clientMap.has(__classPrivateFieldGet$b(this, _Platform_channelName, "f"))) {
12256
+ const clientPromise = __classPrivateFieldGet$b(this, _Platform_connectToProvider, "f").call(this);
12257
+ Platform.clientMap.set(__classPrivateFieldGet$b(this, _Platform_channelName, "f"), clientPromise);
12258
12258
  }
12259
12259
  // we set it above
12260
12260
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
12261
- return Platform.clientMap.get(__classPrivateFieldGet$9(this, _Platform_channelName, "f"));
12261
+ return Platform.clientMap.get(__classPrivateFieldGet$b(this, _Platform_channelName, "f"));
12262
12262
  };
12263
12263
  _Platform_connectToProvider.set(this, async () => {
12264
12264
  try {
12265
- const client = await this._channel.connect(__classPrivateFieldGet$9(this, _Platform_channelName, "f"), { wait: false });
12265
+ const client = await this._channel.connect(__classPrivateFieldGet$b(this, _Platform_channelName, "f"), { wait: false });
12266
12266
  client.onDisconnection(() => {
12267
- Platform.clientMap.delete(__classPrivateFieldGet$9(this, _Platform_channelName, "f"));
12267
+ Platform.clientMap.delete(__classPrivateFieldGet$b(this, _Platform_channelName, "f"));
12268
12268
  });
12269
12269
  return client;
12270
12270
  }
12271
12271
  catch (e) {
12272
- Platform.clientMap.delete(__classPrivateFieldGet$9(this, _Platform_channelName, "f"));
12272
+ Platform.clientMap.delete(__classPrivateFieldGet$b(this, _Platform_channelName, "f"));
12273
12273
  throw new Error('The targeted Platform is not currently running. Listen for application-started event for the given Uuid.');
12274
12274
  }
12275
12275
  });
@@ -12282,7 +12282,7 @@ class Platform extends EmitterBase {
12282
12282
  if (errorMsg) {
12283
12283
  throw new Error(errorMsg);
12284
12284
  }
12285
- __classPrivateFieldSet$8(this, _Platform_channelName, channelName, "f");
12285
+ __classPrivateFieldSet$a(this, _Platform_channelName, channelName, "f");
12286
12286
  this._channel = this.fin.InterApplicationBus.Channel;
12287
12287
  this.identity = { uuid: identity.uuid };
12288
12288
  this.Layout = this.fin.Platform.Layout;
@@ -13138,13 +13138,13 @@ const createRelayedDispatch = (client, target, relayId, relayErrorMsg) => async
13138
13138
  }
13139
13139
  };
13140
13140
 
13141
- var __classPrivateFieldSet$7 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13141
+ var __classPrivateFieldSet$9 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13142
13142
  if (kind === "m") throw new TypeError("Private method is not writable");
13143
13143
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
13144
13144
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
13145
13145
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
13146
13146
  };
13147
- var __classPrivateFieldGet$8 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13147
+ var __classPrivateFieldGet$a = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13148
13148
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13149
13149
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
13150
13150
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -13194,7 +13194,7 @@ class LayoutNode {
13194
13194
  * console.log(`The parent ColumnOrRow is root: ${parentIsRoot}`);
13195
13195
  * ```
13196
13196
  */
13197
- this.isRoot = () => __classPrivateFieldGet$8(this, _LayoutNode_client, "f").isRoot(this.entityId);
13197
+ this.isRoot = () => __classPrivateFieldGet$a(this, _LayoutNode_client, "f").isRoot(this.entityId);
13198
13198
  /**
13199
13199
  * Checks if the TabStack or ColumnOrRow exists
13200
13200
  *
@@ -13214,7 +13214,7 @@ class LayoutNode {
13214
13214
  * console.log(`The entity exists: ${exists}`);
13215
13215
  * ```
13216
13216
  */
13217
- this.exists = () => __classPrivateFieldGet$8(this, _LayoutNode_client, "f").exists(this.entityId);
13217
+ this.exists = () => __classPrivateFieldGet$a(this, _LayoutNode_client, "f").exists(this.entityId);
13218
13218
  /**
13219
13219
  * Retrieves the parent of the TabStack or ColumnOrRow
13220
13220
  *
@@ -13235,11 +13235,11 @@ class LayoutNode {
13235
13235
  * ```
13236
13236
  */
13237
13237
  this.getParent = async () => {
13238
- const parent = await __classPrivateFieldGet$8(this, _LayoutNode_client, "f").getParent(this.entityId);
13238
+ const parent = await __classPrivateFieldGet$a(this, _LayoutNode_client, "f").getParent(this.entityId);
13239
13239
  if (!parent) {
13240
13240
  return undefined;
13241
13241
  }
13242
- return LayoutNode.getEntity(parent, __classPrivateFieldGet$8(this, _LayoutNode_client, "f"));
13242
+ return LayoutNode.getEntity(parent, __classPrivateFieldGet$a(this, _LayoutNode_client, "f"));
13243
13243
  };
13244
13244
  /**
13245
13245
  * Creates a new TabStack adjacent to the given TabStack or ColumnOrRow. Inputs can be new views to create, or existing views.
@@ -13290,8 +13290,8 @@ class LayoutNode {
13290
13290
  * @experimental
13291
13291
  */
13292
13292
  this.createAdjacentStack = async (views, options) => {
13293
- const entityId = await __classPrivateFieldGet$8(this, _LayoutNode_client, "f").createAdjacentStack(this.entityId, views, options);
13294
- return LayoutNode.getEntity({ entityId, type: 'stack' }, __classPrivateFieldGet$8(this, _LayoutNode_client, "f"));
13293
+ const entityId = await __classPrivateFieldGet$a(this, _LayoutNode_client, "f").createAdjacentStack(this.entityId, views, options);
13294
+ return LayoutNode.getEntity({ entityId, type: 'stack' }, __classPrivateFieldGet$a(this, _LayoutNode_client, "f"));
13295
13295
  };
13296
13296
  /**
13297
13297
  * Retrieves the adjacent TabStacks of the given TabStack or ColumnOrRow.
@@ -13319,16 +13319,16 @@ class LayoutNode {
13319
13319
  * @experimental
13320
13320
  */
13321
13321
  this.getAdjacentStacks = async (edge) => {
13322
- const adjacentStacks = await __classPrivateFieldGet$8(this, _LayoutNode_client, "f").getAdjacentStacks({
13322
+ const adjacentStacks = await __classPrivateFieldGet$a(this, _LayoutNode_client, "f").getAdjacentStacks({
13323
13323
  targetId: this.entityId,
13324
13324
  edge
13325
13325
  });
13326
13326
  return adjacentStacks.map((stack) => LayoutNode.getEntity({
13327
13327
  type: 'stack',
13328
13328
  entityId: stack.entityId
13329
- }, __classPrivateFieldGet$8(this, _LayoutNode_client, "f")));
13329
+ }, __classPrivateFieldGet$a(this, _LayoutNode_client, "f")));
13330
13330
  };
13331
- __classPrivateFieldSet$7(this, _LayoutNode_client, client, "f");
13331
+ __classPrivateFieldSet$9(this, _LayoutNode_client, client, "f");
13332
13332
  this.entityId = entityId;
13333
13333
  }
13334
13334
  }
@@ -13401,7 +13401,7 @@ class TabStack extends LayoutNode {
13401
13401
  * ```
13402
13402
  * @experimental
13403
13403
  */
13404
- this.getViews = () => __classPrivateFieldGet$8(this, _TabStack_client, "f").getStackViews(this.entityId);
13404
+ this.getViews = () => __classPrivateFieldGet$a(this, _TabStack_client, "f").getStackViews(this.entityId);
13405
13405
  /**
13406
13406
  * Adds or creates a view in this {@link TabStack}.
13407
13407
  *
@@ -13432,7 +13432,7 @@ class TabStack extends LayoutNode {
13432
13432
  * ```
13433
13433
  * @experimental
13434
13434
  */
13435
- this.addView = async (view, options = { index: 0 }) => __classPrivateFieldGet$8(this, _TabStack_client, "f").addViewToStack(this.entityId, view, options);
13435
+ this.addView = async (view, options = { index: 0 }) => __classPrivateFieldGet$a(this, _TabStack_client, "f").addViewToStack(this.entityId, view, options);
13436
13436
  /**
13437
13437
  * Removes a view from this {@link TabStack}.
13438
13438
  *
@@ -13462,7 +13462,7 @@ class TabStack extends LayoutNode {
13462
13462
  * ```
13463
13463
  */
13464
13464
  this.removeView = async (view) => {
13465
- await __classPrivateFieldGet$8(this, _TabStack_client, "f").removeViewFromStack(this.entityId, view);
13465
+ await __classPrivateFieldGet$a(this, _TabStack_client, "f").removeViewFromStack(this.entityId, view);
13466
13466
  };
13467
13467
  /**
13468
13468
  * Sets the active view of the {@link TabStack} without focusing it.
@@ -13486,9 +13486,9 @@ class TabStack extends LayoutNode {
13486
13486
  * @experimental
13487
13487
  */
13488
13488
  this.setActiveView = async (view) => {
13489
- await __classPrivateFieldGet$8(this, _TabStack_client, "f").setStackActiveView(this.entityId, view);
13489
+ await __classPrivateFieldGet$a(this, _TabStack_client, "f").setStackActiveView(this.entityId, view);
13490
13490
  };
13491
- __classPrivateFieldSet$7(this, _TabStack_client, client, "f");
13491
+ __classPrivateFieldSet$9(this, _TabStack_client, client, "f");
13492
13492
  }
13493
13493
  }
13494
13494
  _TabStack_client = new WeakMap();
@@ -13526,10 +13526,10 @@ class ColumnOrRow extends LayoutNode {
13526
13526
  * ```
13527
13527
  */
13528
13528
  this.getContent = async () => {
13529
- const contentItemEntities = await __classPrivateFieldGet$8(this, _ColumnOrRow_client, "f").getContent(this.entityId);
13530
- return contentItemEntities.map((entity) => LayoutNode.getEntity(entity, __classPrivateFieldGet$8(this, _ColumnOrRow_client, "f")));
13529
+ const contentItemEntities = await __classPrivateFieldGet$a(this, _ColumnOrRow_client, "f").getContent(this.entityId);
13530
+ return contentItemEntities.map((entity) => LayoutNode.getEntity(entity, __classPrivateFieldGet$a(this, _ColumnOrRow_client, "f")));
13531
13531
  };
13532
- __classPrivateFieldSet$7(this, _ColumnOrRow_client, client, "f");
13532
+ __classPrivateFieldSet$9(this, _ColumnOrRow_client, client, "f");
13533
13533
  this.type = type;
13534
13534
  }
13535
13535
  }
@@ -13539,7 +13539,7 @@ const LAYOUT_CONTROLLER_ID = 'layout-entities';
13539
13539
  // TODO: eventually export this somehow
13540
13540
  const DEFAULT_LAYOUT_KEY = '__default__';
13541
13541
 
13542
- var __classPrivateFieldGet$7 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13542
+ var __classPrivateFieldGet$9 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13543
13543
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13544
13544
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
13545
13545
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -13682,7 +13682,7 @@ class Layout extends Base {
13682
13682
  * @internal
13683
13683
  */
13684
13684
  static getClient(layout) {
13685
- return __classPrivateFieldGet$7(layout, _Layout_layoutClient, "f").getValue();
13685
+ return __classPrivateFieldGet$9(layout, _Layout_layoutClient, "f").getValue();
13686
13686
  }
13687
13687
  /**
13688
13688
  * @internal
@@ -13905,7 +13905,7 @@ class Layout extends Base {
13905
13905
  this.wire.sendAction('layout-get-root-item').catch(() => {
13906
13906
  // don't expose
13907
13907
  });
13908
- const client = await __classPrivateFieldGet$7(this, _Layout_layoutClient, "f").getValue();
13908
+ const client = await __classPrivateFieldGet$9(this, _Layout_layoutClient, "f").getValue();
13909
13909
  const root = await client.getRoot('layoutName' in this.identity ? this.identity : undefined);
13910
13910
  return LayoutNode.getEntity(root, client);
13911
13911
  }
@@ -13923,7 +13923,7 @@ class Layout extends Base {
13923
13923
  this.wire.sendAction('layout-get-stack-by-view').catch(() => {
13924
13924
  // don't expose
13925
13925
  });
13926
- const client = await __classPrivateFieldGet$7(this, _Layout_layoutClient, "f").getValue();
13926
+ const client = await __classPrivateFieldGet$9(this, _Layout_layoutClient, "f").getValue();
13927
13927
  const stack = await client.getStackByView(identity);
13928
13928
  if (!stack) {
13929
13929
  throw new Error(`No stack found for view: ${identity.uuid}/${identity.name}`);
@@ -13943,7 +13943,7 @@ class Layout extends Base {
13943
13943
  this.wire.sendAction('layout-add-view').catch((e) => {
13944
13944
  // don't expose
13945
13945
  });
13946
- const { identity } = await __classPrivateFieldGet$7(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-add-view', {
13946
+ const { identity } = await __classPrivateFieldGet$9(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-add-view', {
13947
13947
  viewOptions,
13948
13948
  location,
13949
13949
  targetView
@@ -13961,7 +13961,7 @@ class Layout extends Base {
13961
13961
  this.wire.sendAction('layout-close-view').catch((e) => {
13962
13962
  // don't expose
13963
13963
  });
13964
- await __classPrivateFieldGet$7(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
13964
+ await __classPrivateFieldGet$9(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
13965
13965
  }
13966
13966
  }
13967
13967
  _Layout_layoutClient = new WeakMap(), _Layout_instances = new WeakSet(), _Layout_forwardLayoutAction =
@@ -13974,12 +13974,12 @@ async function _Layout_forwardLayoutAction(action, payload) {
13974
13974
  return client.dispatch(action, { target: this.identity, opts: payload });
13975
13975
  };
13976
13976
 
13977
- var __classPrivateFieldGet$6 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13977
+ var __classPrivateFieldGet$8 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13978
13978
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13979
13979
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
13980
13980
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
13981
13981
  };
13982
- var __classPrivateFieldSet$6 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13982
+ var __classPrivateFieldSet$8 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13983
13983
  if (kind === "m") throw new TypeError("Private method is not writable");
13984
13984
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
13985
13985
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -14038,23 +14038,23 @@ class LayoutModule extends Base {
14038
14038
  if (!this.wire.environment.layoutAllowedInContext(this.fin)) {
14039
14039
  throw new Error('Layout.init can only be called from a Window context.');
14040
14040
  }
14041
- if (__classPrivateFieldGet$6(this, _LayoutModule_layoutInitializationAttempted, "f")) {
14041
+ if (__classPrivateFieldGet$8(this, _LayoutModule_layoutInitializationAttempted, "f")) {
14042
14042
  throw new Error('Layout.init was already called, please use Layout.create to add additional layouts.');
14043
14043
  }
14044
14044
  if (this.wire.environment.type === 'openfin') {
14045
14045
  // preload the client
14046
14046
  await this.fin.Platform.getCurrentSync().getClient();
14047
14047
  }
14048
- __classPrivateFieldSet$6(this, _LayoutModule_layoutInitializationAttempted, true, "f");
14048
+ __classPrivateFieldSet$8(this, _LayoutModule_layoutInitializationAttempted, true, "f");
14049
14049
  // TODO: rename to createLayoutManager
14050
- __classPrivateFieldSet$6(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
14051
- await this.wire.environment.applyLayoutSnapshot(this.fin, __classPrivateFieldGet$6(this, _LayoutModule_layoutManager, "f"), options);
14050
+ __classPrivateFieldSet$8(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
14051
+ await this.wire.environment.applyLayoutSnapshot(this.fin, __classPrivateFieldGet$8(this, _LayoutModule_layoutManager, "f"), options);
14052
14052
  const meIdentity = { name: this.fin.me.name, uuid: this.fin.me.uuid };
14053
14053
  if (!options.layoutManagerOverride) {
14054
14054
  // CORE-1081 to be removed when we actually delete the `layoutManager` prop
14055
14055
  // in single-layout case, we return the undocumented layoutManager type
14056
14056
  const layoutIdentity = { layoutName: DEFAULT_LAYOUT_KEY, ...meIdentity };
14057
- return __classPrivateFieldGet$6(this, _LayoutModule_getLayoutManagerSpy, "f").call(this, layoutIdentity);
14057
+ return __classPrivateFieldGet$8(this, _LayoutModule_getLayoutManagerSpy, "f").call(this, layoutIdentity);
14058
14058
  }
14059
14059
  return this.wrapSync(meIdentity);
14060
14060
  };
@@ -14083,13 +14083,13 @@ class LayoutModule extends Base {
14083
14083
  * @returns
14084
14084
  */
14085
14085
  this.getCurrentLayoutManagerSync = () => {
14086
- return __classPrivateFieldGet$6(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
14086
+ return __classPrivateFieldGet$8(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
14087
14087
  };
14088
14088
  this.create = async (options) => {
14089
- return this.wire.environment.createLayout(__classPrivateFieldGet$6(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.create()`), options);
14089
+ return this.wire.environment.createLayout(__classPrivateFieldGet$8(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.create()`), options);
14090
14090
  };
14091
14091
  this.destroy = async (layoutIdentity) => {
14092
- return this.wire.environment.destroyLayout(__classPrivateFieldGet$6(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.destroy()`), layoutIdentity);
14092
+ return this.wire.environment.destroyLayout(__classPrivateFieldGet$8(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.destroy()`), layoutIdentity);
14093
14093
  };
14094
14094
  }
14095
14095
  /**
@@ -14219,10 +14219,10 @@ class LayoutModule extends Base {
14219
14219
  }
14220
14220
  }
14221
14221
  _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_getLayoutManagerSpy = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_getSafeLayoutManager = function _LayoutModule_getSafeLayoutManager(method) {
14222
- if (!__classPrivateFieldGet$6(this, _LayoutModule_layoutManager, "f")) {
14222
+ if (!__classPrivateFieldGet$8(this, _LayoutModule_layoutManager, "f")) {
14223
14223
  throw new Error(`You must call init before using the API ${method}`);
14224
14224
  }
14225
- return __classPrivateFieldGet$6(this, _LayoutModule_layoutManager, "f");
14225
+ return __classPrivateFieldGet$8(this, _LayoutModule_layoutManager, "f");
14226
14226
  };
14227
14227
 
14228
14228
  /**
@@ -14489,13 +14489,13 @@ function createWarningObject(message, obj) {
14489
14489
  });
14490
14490
  }
14491
14491
 
14492
- var __classPrivateFieldSet$5 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14492
+ var __classPrivateFieldSet$7 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14493
14493
  if (kind === "m") throw new TypeError("Private method is not writable");
14494
14494
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14495
14495
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
14496
14496
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
14497
14497
  };
14498
- var __classPrivateFieldGet$5 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14498
+ var __classPrivateFieldGet$7 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14499
14499
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
14500
14500
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14501
14501
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -14506,7 +14506,7 @@ class SessionContextGroupClient extends Base {
14506
14506
  super(wire);
14507
14507
  _SessionContextGroupClient_clientPromise.set(this, void 0);
14508
14508
  this.id = id;
14509
- __classPrivateFieldSet$5(this, _SessionContextGroupClient_clientPromise, client, "f");
14509
+ __classPrivateFieldSet$7(this, _SessionContextGroupClient_clientPromise, client, "f");
14510
14510
  }
14511
14511
  /**
14512
14512
  * Sets a context for the session context group.
@@ -14518,7 +14518,7 @@ class SessionContextGroupClient extends Base {
14518
14518
  this.wire.sendAction('interop-session-context-group-set-context').catch((e) => {
14519
14519
  // don't expose, analytics-only call
14520
14520
  });
14521
- const client = await __classPrivateFieldGet$5(this, _SessionContextGroupClient_clientPromise, "f");
14521
+ const client = await __classPrivateFieldGet$7(this, _SessionContextGroupClient_clientPromise, "f");
14522
14522
  return client.dispatch(`sessionContextGroup:setContext-${this.id}`, {
14523
14523
  sessionContextGroupId: this.id,
14524
14524
  context
@@ -14528,7 +14528,7 @@ class SessionContextGroupClient extends Base {
14528
14528
  this.wire.sendAction('interop-session-context-group-get-context').catch((e) => {
14529
14529
  // don't expose, analytics-only call
14530
14530
  });
14531
- const client = await __classPrivateFieldGet$5(this, _SessionContextGroupClient_clientPromise, "f");
14531
+ const client = await __classPrivateFieldGet$7(this, _SessionContextGroupClient_clientPromise, "f");
14532
14532
  return client.dispatch(`sessionContextGroup:getContext-${this.id}`, {
14533
14533
  sessionContextGroupId: this.id,
14534
14534
  type
@@ -14541,7 +14541,7 @@ class SessionContextGroupClient extends Base {
14541
14541
  if (typeof contextHandler !== 'function') {
14542
14542
  throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");
14543
14543
  }
14544
- const client = await __classPrivateFieldGet$5(this, _SessionContextGroupClient_clientPromise, "f");
14544
+ const client = await __classPrivateFieldGet$7(this, _SessionContextGroupClient_clientPromise, "f");
14545
14545
  let handlerId;
14546
14546
  if (contextType) {
14547
14547
  handlerId = `sessionContextHandler:invoke-${this.id}-${contextType}-${generateId()}`;
@@ -14554,7 +14554,7 @@ class SessionContextGroupClient extends Base {
14554
14554
  return { unsubscribe: await this.createUnsubscribeCb(handlerId) };
14555
14555
  }
14556
14556
  async createUnsubscribeCb(handlerId) {
14557
- const client = await __classPrivateFieldGet$5(this, _SessionContextGroupClient_clientPromise, "f");
14557
+ const client = await __classPrivateFieldGet$7(this, _SessionContextGroupClient_clientPromise, "f");
14558
14558
  return async () => {
14559
14559
  client.remove(handlerId);
14560
14560
  await client.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`, { handlerId });
@@ -14571,13 +14571,13 @@ class SessionContextGroupClient extends Base {
14571
14571
  }
14572
14572
  _SessionContextGroupClient_clientPromise = new WeakMap();
14573
14573
 
14574
- var __classPrivateFieldSet$4 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14574
+ var __classPrivateFieldSet$6 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14575
14575
  if (kind === "m") throw new TypeError("Private method is not writable");
14576
14576
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14577
14577
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
14578
14578
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
14579
14579
  };
14580
- var __classPrivateFieldGet$4 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14580
+ var __classPrivateFieldGet$6 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14581
14581
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
14582
14582
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14583
14583
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -14595,11 +14595,11 @@ class ChannelEvents {
14595
14595
  _ChannelEvents_channelClient.set(this, void 0);
14596
14596
  _ChannelEvents_isChannelReady.set(this, false);
14597
14597
  _ChannelEvents_getActions.set(this, async () => {
14598
- const channelClient = await __classPrivateFieldGet$4(this, _ChannelEvents_channelClient, "f");
14599
- let actions = __classPrivateFieldGet$4(ChannelEvents, _a, "f", _ChannelEvents_actionsByClient).get(channelClient);
14598
+ const channelClient = await __classPrivateFieldGet$6(this, _ChannelEvents_channelClient, "f");
14599
+ let actions = __classPrivateFieldGet$6(ChannelEvents, _a, "f", _ChannelEvents_actionsByClient).get(channelClient);
14600
14600
  if (!actions) {
14601
14601
  actions = {};
14602
- __classPrivateFieldGet$4(ChannelEvents, _a, "f", _ChannelEvents_actionsByClient).set(channelClient, actions);
14602
+ __classPrivateFieldGet$6(ChannelEvents, _a, "f", _ChannelEvents_actionsByClient).set(channelClient, actions);
14603
14603
  }
14604
14604
  return actions;
14605
14605
  });
@@ -14616,7 +14616,7 @@ class ChannelEvents {
14616
14616
  if (index >= 0) {
14617
14617
  callbacks.splice(index, 1);
14618
14618
  if (callbacks.length === 0) {
14619
- const client = await __classPrivateFieldGet$4(this, _ChannelEvents_channelClient, "f");
14619
+ const client = await __classPrivateFieldGet$6(this, _ChannelEvents_channelClient, "f");
14620
14620
  client.remove(actionId);
14621
14621
  }
14622
14622
  }
@@ -14625,7 +14625,7 @@ class ChannelEvents {
14625
14625
  // Use lazy eval to only setup and register the channel on first attempt.
14626
14626
  if (!registrationPromise) {
14627
14627
  registrationPromise = (async () => {
14628
- const client = await __classPrivateFieldGet$4(this, _ChannelEvents_channelClient, "f");
14628
+ const client = await __classPrivateFieldGet$6(this, _ChannelEvents_channelClient, "f");
14629
14629
  await client.register(actionId, onChannelAction);
14630
14630
  })();
14631
14631
  }
@@ -14634,14 +14634,14 @@ class ChannelEvents {
14634
14634
  };
14635
14635
  });
14636
14636
  _ChannelEvents_getRegistration.set(this, async (actionId) => {
14637
- const actions = await __classPrivateFieldGet$4(this, _ChannelEvents_getActions, "f").call(this);
14637
+ const actions = await __classPrivateFieldGet$6(this, _ChannelEvents_getActions, "f").call(this);
14638
14638
  return actions[actionId];
14639
14639
  });
14640
14640
  _ChannelEvents_getOrCreateRegistration.set(this, async (actionId) => {
14641
- const actions = await __classPrivateFieldGet$4(this, _ChannelEvents_getActions, "f").call(this);
14642
- const registration = await __classPrivateFieldGet$4(this, _ChannelEvents_getRegistration, "f").call(this, actionId);
14641
+ const actions = await __classPrivateFieldGet$6(this, _ChannelEvents_getActions, "f").call(this);
14642
+ const registration = await __classPrivateFieldGet$6(this, _ChannelEvents_getRegistration, "f").call(this, actionId);
14643
14643
  if (!registration) {
14644
- actions[actionId] = __classPrivateFieldGet$4(this, _ChannelEvents_createRegistration, "f").call(this, actionId);
14644
+ actions[actionId] = __classPrivateFieldGet$6(this, _ChannelEvents_createRegistration, "f").call(this, actionId);
14645
14645
  }
14646
14646
  return actions[actionId];
14647
14647
  });
@@ -14656,7 +14656,7 @@ class ChannelEvents {
14656
14656
  * @param callback Callback to be called whenever the action is dispatched.
14657
14657
  */
14658
14658
  this.addListener = async (action, callback) => {
14659
- const event = await __classPrivateFieldGet$4(this, _ChannelEvents_getOrCreateRegistration, "f").call(this, action);
14659
+ const event = await __classPrivateFieldGet$6(this, _ChannelEvents_getOrCreateRegistration, "f").call(this, action);
14660
14660
  event.callbacks.push(callback);
14661
14661
  // This ensures we only resolve the subscription once the action is registered
14662
14662
  await event.waitForRegistration();
@@ -14670,19 +14670,19 @@ class ChannelEvents {
14670
14670
  * @param callback Callback to remove.
14671
14671
  */
14672
14672
  this.removeListener = async (action, callback) => {
14673
- if (!__classPrivateFieldGet$4(this, _ChannelEvents_isChannelReady, "f")) {
14673
+ if (!__classPrivateFieldGet$6(this, _ChannelEvents_isChannelReady, "f")) {
14674
14674
  return;
14675
14675
  }
14676
- const registration = await __classPrivateFieldGet$4(this, _ChannelEvents_getRegistration, "f").call(this, action);
14676
+ const registration = await __classPrivateFieldGet$6(this, _ChannelEvents_getRegistration, "f").call(this, action);
14677
14677
  if (registration) {
14678
- const event = await __classPrivateFieldGet$4(this, _ChannelEvents_getOrCreateRegistration, "f").call(this, action);
14678
+ const event = await __classPrivateFieldGet$6(this, _ChannelEvents_getOrCreateRegistration, "f").call(this, action);
14679
14679
  await event.dispose(callback);
14680
14680
  }
14681
14681
  };
14682
- __classPrivateFieldSet$4(this, _ChannelEvents_channelClient, channelClient, "f");
14682
+ __classPrivateFieldSet$6(this, _ChannelEvents_channelClient, channelClient, "f");
14683
14683
  Promise.resolve(channelClient)
14684
14684
  .then(() => {
14685
- __classPrivateFieldSet$4(this, _ChannelEvents_isChannelReady, true, "f");
14685
+ __classPrivateFieldSet$6(this, _ChannelEvents_isChannelReady, true, "f");
14686
14686
  })
14687
14687
  .catch(() => {
14688
14688
  // eslint-disable-next-line
@@ -14699,13 +14699,13 @@ _a = ChannelEvents, _ChannelEvents_channelClient = new WeakMap(), _ChannelEvents
14699
14699
  */
14700
14700
  _ChannelEvents_actionsByClient = { value: new WeakMap() };
14701
14701
 
14702
- var __classPrivateFieldSet$3 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14702
+ var __classPrivateFieldSet$5 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14703
14703
  if (kind === "m") throw new TypeError("Private method is not writable");
14704
14704
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14705
14705
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
14706
14706
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
14707
14707
  };
14708
- var __classPrivateFieldGet$3 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14708
+ var __classPrivateFieldGet$5 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14709
14709
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
14710
14710
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14711
14711
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -14781,7 +14781,7 @@ class InteropClient extends Base {
14781
14781
  */
14782
14782
  this.addListener = async (type, listener) => {
14783
14783
  try {
14784
- await __classPrivateFieldGet$3(this, _InteropClient_channelEvents, "f").addListener(type, listener);
14784
+ await __classPrivateFieldGet$5(this, _InteropClient_channelEvents, "f").addListener(type, listener);
14785
14785
  }
14786
14786
  catch (error) {
14787
14787
  throw new Error(`An unexpected error occurred when adding a listener to the event ${type}. \n${error.stack}.`);
@@ -14795,16 +14795,16 @@ class InteropClient extends Base {
14795
14795
  */
14796
14796
  this.removeListener = async (type, listener) => {
14797
14797
  try {
14798
- await __classPrivateFieldGet$3(this, _InteropClient_channelEvents, "f").removeListener(type, listener);
14798
+ await __classPrivateFieldGet$5(this, _InteropClient_channelEvents, "f").removeListener(type, listener);
14799
14799
  }
14800
14800
  catch (error) {
14801
14801
  throw new Error(`An unexpected error occurred when removing a listener for the event ${type}. \n${error.stack}.`);
14802
14802
  }
14803
14803
  };
14804
- __classPrivateFieldSet$3(this, _InteropClient_sessionContextGroups, new Map(), "f");
14805
- __classPrivateFieldSet$3(this, _InteropClient_clientPromise, clientPromise, "f");
14806
- __classPrivateFieldSet$3(this, _InteropClient_fdc3Factory, fdc3Factory, "f");
14807
- __classPrivateFieldSet$3(this, _InteropClient_channelEvents, new ChannelEvents(clientPromise), "f");
14804
+ __classPrivateFieldSet$5(this, _InteropClient_sessionContextGroups, new Map(), "f");
14805
+ __classPrivateFieldSet$5(this, _InteropClient_clientPromise, clientPromise, "f");
14806
+ __classPrivateFieldSet$5(this, _InteropClient_fdc3Factory, fdc3Factory, "f");
14807
+ __classPrivateFieldSet$5(this, _InteropClient_channelEvents, new ChannelEvents(clientPromise), "f");
14808
14808
  }
14809
14809
  /**
14810
14810
  * Sets a context for the context group of the current entity.
@@ -14829,7 +14829,7 @@ class InteropClient extends Base {
14829
14829
  this.wire.sendAction('interop-client-set-context').catch((e) => {
14830
14830
  // don't expose, analytics-only call
14831
14831
  });
14832
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
14832
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
14833
14833
  return client.dispatch('setContext', { context });
14834
14834
  }
14835
14835
  /**
@@ -14896,7 +14896,7 @@ class InteropClient extends Base {
14896
14896
  if (typeof handler !== 'function') {
14897
14897
  throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");
14898
14898
  }
14899
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
14899
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
14900
14900
  let handlerId;
14901
14901
  if (contextType) {
14902
14902
  handlerId = `invokeContextHandler-${contextType}-${generateId()}`;
@@ -14936,7 +14936,7 @@ class InteropClient extends Base {
14936
14936
  this.wire.sendAction('interop-client-get-context-groups').catch((e) => {
14937
14937
  // don't expose, analytics-only call
14938
14938
  });
14939
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
14939
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
14940
14940
  return client.dispatch('getContextGroups');
14941
14941
  }
14942
14942
  /**
@@ -14967,7 +14967,7 @@ class InteropClient extends Base {
14967
14967
  this.wire.sendAction('interop-client-join-context-group').catch((e) => {
14968
14968
  // don't expose, analytics-only call
14969
14969
  });
14970
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
14970
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
14971
14971
  if (!contextGroupId) {
14972
14972
  throw new Error('No contextGroupId specified for joinContextGroup.');
14973
14973
  }
@@ -14996,7 +14996,7 @@ class InteropClient extends Base {
14996
14996
  this.wire.sendAction('interop-client-remove-from-context-group').catch((e) => {
14997
14997
  // don't expose, analytics-only call
14998
14998
  });
14999
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
14999
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15000
15000
  return client.dispatch('removeFromContextGroup', { target });
15001
15001
  }
15002
15002
  /**
@@ -15019,7 +15019,7 @@ class InteropClient extends Base {
15019
15019
  this.wire.sendAction('interop-client-get-all-clients-in-context-group').catch((e) => {
15020
15020
  // don't expose, analytics-only call
15021
15021
  });
15022
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15022
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15023
15023
  if (!contextGroupId) {
15024
15024
  throw new Error('No contextGroupId specified for getAllClientsInContextGroup.');
15025
15025
  }
@@ -15044,7 +15044,7 @@ class InteropClient extends Base {
15044
15044
  this.wire.sendAction('interop-client-get-info-for-context-group').catch((e) => {
15045
15045
  // don't expose, analytics-only call
15046
15046
  });
15047
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15047
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15048
15048
  if (!contextGroupId) {
15049
15049
  throw new Error('No contextGroupId specified for getInfoForContextGroup.');
15050
15050
  }
@@ -15072,7 +15072,7 @@ class InteropClient extends Base {
15072
15072
  this.wire.sendAction('interop-client-fire-intent').catch((e) => {
15073
15073
  // don't expose, this is only for api analytics purposes
15074
15074
  });
15075
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15075
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15076
15076
  return client.dispatch('fireIntent', intent);
15077
15077
  }
15078
15078
  /**
@@ -15099,7 +15099,7 @@ class InteropClient extends Base {
15099
15099
  this.wire.sendAction('interop-client-register-intent-handler').catch((e) => {
15100
15100
  // don't expose, this is only for api analytics purposes
15101
15101
  });
15102
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15102
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15103
15103
  const handlerId = `intent-handler-${intentName}`;
15104
15104
  const wrappedHandler = wrapIntentHandler(handler, handlerId);
15105
15105
  try {
@@ -15137,7 +15137,7 @@ class InteropClient extends Base {
15137
15137
  this.wire.sendAction('interop-client-get-current-context').catch((e) => {
15138
15138
  // don't expose, analytics-only call
15139
15139
  });
15140
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15140
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15141
15141
  return client.dispatch('getCurrentContext', { contextType });
15142
15142
  }
15143
15143
  /**
@@ -15157,7 +15157,7 @@ class InteropClient extends Base {
15157
15157
  this.wire.sendAction('interop-client-get-info-for-intent').catch((e) => {
15158
15158
  // don't expose, analytics-only call
15159
15159
  });
15160
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15160
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15161
15161
  return client.dispatch('getInfoForIntent', options);
15162
15162
  }
15163
15163
  /**
@@ -15188,7 +15188,7 @@ class InteropClient extends Base {
15188
15188
  this.wire.sendAction('interop-client-get-info-for-intents-by-context').catch((e) => {
15189
15189
  // don't expose, analytics-only call
15190
15190
  });
15191
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15191
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15192
15192
  return client.dispatch('getInfoForIntentsByContext', context);
15193
15193
  }
15194
15194
  /**
@@ -15220,7 +15220,7 @@ class InteropClient extends Base {
15220
15220
  this.wire.sendAction('interop-client-fire-intent-for-context').catch((e) => {
15221
15221
  // don't expose, analytics-only call
15222
15222
  });
15223
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15223
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15224
15224
  return client.dispatch('fireIntentForContext', context);
15225
15225
  }
15226
15226
  /**
@@ -15257,19 +15257,19 @@ class InteropClient extends Base {
15257
15257
  */
15258
15258
  async joinSessionContextGroup(sessionContextGroupId) {
15259
15259
  try {
15260
- const currentSessionContextGroup = __classPrivateFieldGet$3(this, _InteropClient_sessionContextGroups, "f").get(sessionContextGroupId);
15260
+ const currentSessionContextGroup = __classPrivateFieldGet$5(this, _InteropClient_sessionContextGroups, "f").get(sessionContextGroupId);
15261
15261
  if (currentSessionContextGroup) {
15262
15262
  return currentSessionContextGroup.getUserInstance();
15263
15263
  }
15264
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15264
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15265
15265
  const { hasConflict } = await client.dispatch('sessionContextGroup:createIfNeeded', {
15266
15266
  sessionContextGroupId
15267
15267
  });
15268
15268
  if (hasConflict) {
15269
15269
  console.warn(`A (non-session) context group with the name "${sessionContextGroupId}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);
15270
15270
  }
15271
- const newSessionContextGroup = new SessionContextGroupClient(this.wire, __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
15272
- __classPrivateFieldGet$3(this, _InteropClient_sessionContextGroups, "f").set(sessionContextGroupId, newSessionContextGroup);
15271
+ const newSessionContextGroup = new SessionContextGroupClient(this.wire, __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
15272
+ __classPrivateFieldGet$5(this, _InteropClient_sessionContextGroups, "f").set(sessionContextGroupId, newSessionContextGroup);
15273
15273
  return newSessionContextGroup.getUserInstance();
15274
15274
  }
15275
15275
  catch (error) {
@@ -15296,14 +15296,14 @@ class InteropClient extends Base {
15296
15296
  this.wire.sendAction('interop-client-add-ondisconnection-listener').catch((e) => {
15297
15297
  // don't expose, analytics-only call
15298
15298
  });
15299
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15299
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15300
15300
  return client.onDisconnection((event) => {
15301
15301
  const { uuid } = event;
15302
15302
  listener({ type: 'interop-broker', topic: 'disconnected', brokerName: uuid });
15303
15303
  });
15304
15304
  }
15305
15305
  getFDC3Sync(version) {
15306
- return __classPrivateFieldGet$3(this, _InteropClient_fdc3Factory, "f").call(this, version, this, this.wire);
15306
+ return __classPrivateFieldGet$5(this, _InteropClient_fdc3Factory, "f").call(this, version, this, this.wire);
15307
15307
  }
15308
15308
  async getFDC3(version) {
15309
15309
  return this.getFDC3Sync(version);
@@ -15314,7 +15314,7 @@ class InteropClient extends Base {
15314
15314
  * Used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
15315
15315
  */
15316
15316
  static async ferryFdc3Call(interopClient, action, payload) {
15317
- const client = await __classPrivateFieldGet$3(interopClient, _InteropClient_clientPromise, "f");
15317
+ const client = await __classPrivateFieldGet$5(interopClient, _InteropClient_clientPromise, "f");
15318
15318
  return client.dispatch(action, payload || null);
15319
15319
  }
15320
15320
  }
@@ -15651,12 +15651,12 @@ const getIntentResolution = async (interopModule, context, app, intent) => {
15651
15651
  return { ...intentResolutionInfoFromBroker, getResult };
15652
15652
  };
15653
15653
 
15654
- var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15654
+ var __classPrivateFieldGet$4 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15655
15655
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
15656
15656
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
15657
15657
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15658
15658
  };
15659
- var __classPrivateFieldSet$2 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
15659
+ var __classPrivateFieldSet$4 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
15660
15660
  if (kind === "m") throw new TypeError("Private method is not writable");
15661
15661
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
15662
15662
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -15665,7 +15665,7 @@ var __classPrivateFieldSet$2 = (undefined && undefined.__classPrivateFieldSet) |
15665
15665
  var _FDC3ModuleBase_producer;
15666
15666
  class FDC3ModuleBase {
15667
15667
  get client() {
15668
- return __classPrivateFieldGet$2(this, _FDC3ModuleBase_producer, "f").call(this);
15668
+ return __classPrivateFieldGet$4(this, _FDC3ModuleBase_producer, "f").call(this);
15669
15669
  }
15670
15670
  get fin() {
15671
15671
  return this.wire.getFin();
@@ -15674,7 +15674,7 @@ class FDC3ModuleBase {
15674
15674
  constructor(producer, wire) {
15675
15675
  this.wire = wire;
15676
15676
  _FDC3ModuleBase_producer.set(this, void 0);
15677
- __classPrivateFieldSet$2(this, _FDC3ModuleBase_producer, producer, "f");
15677
+ __classPrivateFieldSet$4(this, _FDC3ModuleBase_producer, producer, "f");
15678
15678
  }
15679
15679
  /**
15680
15680
  * Broadcasts a context for the channel of the current entity.
@@ -16474,13 +16474,13 @@ class InteropModule extends Base {
16474
16474
  const channelPrefix = 'snapshot-source-provider-';
16475
16475
  const getSnapshotSourceChannelName = (id) => `${channelPrefix}${id.uuid}`;
16476
16476
 
16477
- var __classPrivateFieldSet$1 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16477
+ var __classPrivateFieldSet$3 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16478
16478
  if (kind === "m") throw new TypeError("Private method is not writable");
16479
16479
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
16480
16480
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
16481
16481
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16482
16482
  };
16483
- var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16483
+ var __classPrivateFieldGet$3 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16484
16484
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
16485
16485
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
16486
16486
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -16507,26 +16507,26 @@ class SnapshotSource extends Base {
16507
16507
  return connectionMap.get(this.identity.uuid);
16508
16508
  });
16509
16509
  _SnapshotSource_getClient.set(this, () => {
16510
- if (!__classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise) {
16511
- __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = __classPrivateFieldGet$1(this, _SnapshotSource_startConnection, "f").call(this);
16510
+ if (!__classPrivateFieldGet$3(this, _SnapshotSource_getConnection, "f").call(this).clientPromise) {
16511
+ __classPrivateFieldGet$3(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = __classPrivateFieldGet$3(this, _SnapshotSource_startConnection, "f").call(this);
16512
16512
  }
16513
- return __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise;
16513
+ return __classPrivateFieldGet$3(this, _SnapshotSource_getConnection, "f").call(this).clientPromise;
16514
16514
  });
16515
16515
  _SnapshotSource_startConnection.set(this, async () => {
16516
16516
  const channelName = getSnapshotSourceChannelName(this.identity);
16517
16517
  try {
16518
- if (!__classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired) {
16519
- await __classPrivateFieldGet$1(this, _SnapshotSource_setUpConnectionListener, "f").call(this);
16518
+ if (!__classPrivateFieldGet$3(this, _SnapshotSource_getConnection, "f").call(this).eventFired) {
16519
+ await __classPrivateFieldGet$3(this, _SnapshotSource_setUpConnectionListener, "f").call(this);
16520
16520
  }
16521
16521
  const client = await this.fin.InterApplicationBus.Channel.connect(channelName, { wait: false });
16522
16522
  client.onDisconnection(() => {
16523
- __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
16524
- __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired = null;
16523
+ __classPrivateFieldGet$3(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
16524
+ __classPrivateFieldGet$3(this, _SnapshotSource_getConnection, "f").call(this).eventFired = null;
16525
16525
  });
16526
16526
  return client;
16527
16527
  }
16528
16528
  catch (e) {
16529
- __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
16529
+ __classPrivateFieldGet$3(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
16530
16530
  throw new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.");
16531
16531
  }
16532
16532
  });
@@ -16538,7 +16538,7 @@ class SnapshotSource extends Base {
16538
16538
  resolve = y;
16539
16539
  reject = n;
16540
16540
  });
16541
- __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired = eventFired;
16541
+ __classPrivateFieldGet$3(this, _SnapshotSource_getConnection, "f").call(this).eventFired = eventFired;
16542
16542
  const listener = async (e) => {
16543
16543
  try {
16544
16544
  if (e.channelName === channelName) {
@@ -16552,10 +16552,10 @@ class SnapshotSource extends Base {
16552
16552
  };
16553
16553
  await this.fin.InterApplicationBus.Channel.on('connected', listener);
16554
16554
  });
16555
- __classPrivateFieldSet$1(this, _SnapshotSource_identity, id, "f");
16555
+ __classPrivateFieldSet$3(this, _SnapshotSource_identity, id, "f");
16556
16556
  }
16557
16557
  get identity() {
16558
- return __classPrivateFieldGet$1(this, _SnapshotSource_identity, "f");
16558
+ return __classPrivateFieldGet$3(this, _SnapshotSource_identity, "f");
16559
16559
  }
16560
16560
  /**
16561
16561
  * Method to determine if the SnapshotSource has been initialized.
@@ -16589,11 +16589,11 @@ class SnapshotSource extends Base {
16589
16589
  // eslint-disable-next-line no-async-promise-executor
16590
16590
  try {
16591
16591
  // If getClient was already called before this, do we have a timing issue where the channel might have been created but we missed the event but this still fails?
16592
- await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
16592
+ await __classPrivateFieldGet$3(this, _SnapshotSource_getClient, "f").call(this);
16593
16593
  }
16594
16594
  catch (e) {
16595
16595
  // it was not running.
16596
- await __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired;
16596
+ await __classPrivateFieldGet$3(this, _SnapshotSource_getConnection, "f").call(this).eventFired;
16597
16597
  }
16598
16598
  }
16599
16599
  /**
@@ -16602,7 +16602,7 @@ class SnapshotSource extends Base {
16602
16602
  */
16603
16603
  async getSnapshot() {
16604
16604
  this.wire.recordAnalytic('snapshot-source-get-snapshot');
16605
- const client = await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
16605
+ const client = await __classPrivateFieldGet$3(this, _SnapshotSource_getClient, "f").call(this);
16606
16606
  const response = (await client.dispatch('get-snapshot'));
16607
16607
  return (await response).snapshot;
16608
16608
  }
@@ -16612,7 +16612,7 @@ class SnapshotSource extends Base {
16612
16612
  */
16613
16613
  async applySnapshot(snapshot) {
16614
16614
  this.wire.recordAnalytic('snapshot-source-apply-snapshot');
16615
- const client = await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
16615
+ const client = await __classPrivateFieldGet$3(this, _SnapshotSource_getClient, "f").call(this);
16616
16616
  return client.dispatch('apply-snapshot', { snapshot });
16617
16617
  }
16618
16618
  }
@@ -16689,13 +16689,13 @@ class SnapshotSourceModule extends Base {
16689
16689
  }
16690
16690
  }
16691
16691
 
16692
- var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16692
+ var __classPrivateFieldSet$2 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16693
16693
  if (kind === "m") throw new TypeError("Private method is not writable");
16694
16694
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
16695
16695
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
16696
16696
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16697
16697
  };
16698
- var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16698
+ var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16699
16699
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
16700
16700
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
16701
16701
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -16724,11 +16724,11 @@ class NotificationManagerInstance {
16724
16724
  _NotificationManagerInstance_handler.set(this, void 0);
16725
16725
  _NotificationManagerInstance_id.set(this, void 0);
16726
16726
  _NotificationManagerInstance_isReceivingNotifications.set(this, new Lazy(async () => {
16727
- await __classPrivateFieldGet(this, _NotificationManagerInstance_wire, "f").registerMessageHandler((message) => {
16728
- if (message.action === 'notification-created' && message.payload.managerId === __classPrivateFieldGet(this, _NotificationManagerInstance_id, "f")) {
16727
+ await __classPrivateFieldGet$2(this, _NotificationManagerInstance_wire, "f").registerMessageHandler((message) => {
16728
+ if (message.action === 'notification-created' && message.payload.managerId === __classPrivateFieldGet$2(this, _NotificationManagerInstance_id, "f")) {
16729
16729
  const { notificationId, properties, documentUrl: url, notificationIcon: icon, badge, image } = message.payload;
16730
16730
  try {
16731
- __classPrivateFieldGet(this, _NotificationManagerInstance_handler, "f")?.call(this, {
16731
+ __classPrivateFieldGet$2(this, _NotificationManagerInstance_handler, "f")?.call(this, {
16732
16732
  properties,
16733
16733
  images: {
16734
16734
  image,
@@ -16766,8 +16766,8 @@ class NotificationManagerInstance {
16766
16766
  * ```
16767
16767
  */
16768
16768
  this.setNotificationHandler = async (handler) => {
16769
- await __classPrivateFieldGet(this, _NotificationManagerInstance_isReceivingNotifications, "f").getValue();
16770
- __classPrivateFieldSet(this, _NotificationManagerInstance_handler, handler, "f");
16769
+ await __classPrivateFieldGet$2(this, _NotificationManagerInstance_isReceivingNotifications, "f").getValue();
16770
+ __classPrivateFieldSet$2(this, _NotificationManagerInstance_handler, handler, "f");
16771
16771
  };
16772
16772
  /**
16773
16773
  * Destroys the current NotificationManagerInstance.
@@ -16778,7 +16778,7 @@ class NotificationManagerInstance {
16778
16778
  * ```
16779
16779
  */
16780
16780
  this.destroy = async () => {
16781
- await __classPrivateFieldGet(this, _NotificationManagerInstance_wire, "f").sendAction('destroy-notification-manager', { managerId: __classPrivateFieldGet(this, _NotificationManagerInstance_id, "f") });
16781
+ await __classPrivateFieldGet$2(this, _NotificationManagerInstance_wire, "f").sendAction('destroy-notification-manager', { managerId: __classPrivateFieldGet$2(this, _NotificationManagerInstance_id, "f") });
16782
16782
  };
16783
16783
  /**
16784
16784
  * Dispatches a Notification lifecycle event ('close' | 'click' | 'show').
@@ -16804,13 +16804,13 @@ class NotificationManagerInstance {
16804
16804
  */
16805
16805
  this.dispatch = async (event) => {
16806
16806
  const { notificationId, type } = event;
16807
- await __classPrivateFieldGet(this, _NotificationManagerInstance_wire, "f").sendAction('dispatch-notification-event', {
16807
+ await __classPrivateFieldGet$2(this, _NotificationManagerInstance_wire, "f").sendAction('dispatch-notification-event', {
16808
16808
  notificationId,
16809
16809
  type
16810
16810
  });
16811
16811
  };
16812
- __classPrivateFieldSet(this, _NotificationManagerInstance_wire, wire, "f");
16813
- __classPrivateFieldSet(this, _NotificationManagerInstance_id, id, "f");
16812
+ __classPrivateFieldSet$2(this, _NotificationManagerInstance_wire, wire, "f");
16813
+ __classPrivateFieldSet$2(this, _NotificationManagerInstance_id, id, "f");
16814
16814
  }
16815
16815
  }
16816
16816
  _NotificationManagerInstance_wire = new WeakMap(), _NotificationManagerInstance_handler = new WeakMap(), _NotificationManagerInstance_id = new WeakMap(), _NotificationManagerInstance_isReceivingNotifications = new WeakMap();
@@ -16844,6 +16844,133 @@ class NotificationManagerModule extends Base {
16844
16844
  }
16845
16845
  }
16846
16846
 
16847
+ var __classPrivateFieldSet$1 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16848
+ if (kind === "m") throw new TypeError("Private method is not writable");
16849
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
16850
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
16851
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16852
+ };
16853
+ var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16854
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
16855
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
16856
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
16857
+ };
16858
+ var _Writable_value, _Writable_listeners, _Writable_readonlyWrapper;
16859
+ /**
16860
+ * Internal, a mutable implementation of the observable pattern.
16861
+ * It strictly controls its internal state and provides a secure
16862
+ * read-only wrapper for public consumption.
16863
+ */
16864
+ class Writable {
16865
+ constructor(initialValue) {
16866
+ _Writable_value.set(this, void 0);
16867
+ _Writable_listeners.set(this, new Set());
16868
+ _Writable_readonlyWrapper.set(this, null);
16869
+ this.get = () => {
16870
+ return __classPrivateFieldGet$1(this, _Writable_value, "f");
16871
+ };
16872
+ this.set = (newValue) => {
16873
+ if (__classPrivateFieldGet$1(this, _Writable_value, "f") !== newValue) {
16874
+ __classPrivateFieldSet$1(this, _Writable_value, newValue, "f");
16875
+ // Snapshot listeners before invoking so subscribe/unsubscribe calls
16876
+ // made by a listener affect future emits, not the in-flight one.
16877
+ for (const listener of [...__classPrivateFieldGet$1(this, _Writable_listeners, "f")]) {
16878
+ try {
16879
+ listener();
16880
+ }
16881
+ catch (err) {
16882
+ // A throwing listener must not block later listeners; rethrow async
16883
+ // so the error surfaces via the host's unhandled-error reporter.
16884
+ setTimeout(() => {
16885
+ throw err;
16886
+ }, 0);
16887
+ }
16888
+ }
16889
+ }
16890
+ };
16891
+ this.subscribe = (listener) => {
16892
+ __classPrivateFieldGet$1(this, _Writable_listeners, "f").add(listener);
16893
+ return () => {
16894
+ __classPrivateFieldGet$1(this, _Writable_listeners, "f").delete(listener);
16895
+ };
16896
+ };
16897
+ __classPrivateFieldSet$1(this, _Writable_value, initialValue, "f");
16898
+ }
16899
+ get readonly() {
16900
+ if (!__classPrivateFieldGet$1(this, _Writable_readonlyWrapper, "f")) {
16901
+ __classPrivateFieldSet$1(this, _Writable_readonlyWrapper, {
16902
+ get: this.get,
16903
+ subscribe: this.subscribe
16904
+ }, "f");
16905
+ }
16906
+ return __classPrivateFieldGet$1(this, _Writable_readonlyWrapper, "f");
16907
+ }
16908
+ }
16909
+ _Writable_value = new WeakMap(), _Writable_listeners = new WeakMap(), _Writable_readonlyWrapper = new WeakMap();
16910
+
16911
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16912
+ if (kind === "m") throw new TypeError("Private method is not writable");
16913
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
16914
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
16915
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16916
+ };
16917
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16918
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
16919
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
16920
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
16921
+ };
16922
+ var _ChromeBrowserActionsImpl_wire, _ChromeBrowserActionsImpl_state;
16923
+ class ChromeBrowserActionsImpl {
16924
+ constructor(wire) {
16925
+ _ChromeBrowserActionsImpl_wire.set(this, void 0);
16926
+ _ChromeBrowserActionsImpl_state.set(this, new Writable([]));
16927
+ __classPrivateFieldSet(this, _ChromeBrowserActionsImpl_wire, wire, "f");
16928
+ }
16929
+ get state() {
16930
+ return __classPrivateFieldGet(this, _ChromeBrowserActionsImpl_state, "f").readonly;
16931
+ }
16932
+ /**
16933
+ * @internal Wires up the runtime push-update handler. Called once at construction
16934
+ * for window contexts; views never receive these updates.
16935
+ */
16936
+ static activate(instance) {
16937
+ __classPrivateFieldGet(instance, _ChromeBrowserActionsImpl_wire, "f").registerMessageHandler((msg) => {
16938
+ if (msg?.action === 'chrome-browser-actions-update') {
16939
+ __classPrivateFieldGet(instance, _ChromeBrowserActionsImpl_state, "f").set(msg?.payload?.actions ?? []);
16940
+ return true;
16941
+ }
16942
+ return false;
16943
+ });
16944
+ }
16945
+ async getExtensionActions() {
16946
+ const ack = await __classPrivateFieldGet(this, _ChromeBrowserActionsImpl_wire, "f").sendAction('chrome-browser-get-extension-actions', {});
16947
+ return ack.payload.data.actions;
16948
+ }
16949
+ async invokeExtensionAction(options) {
16950
+ await __classPrivateFieldGet(this, _ChromeBrowserActionsImpl_wire, "f").sendAction('chrome-browser-invoke-extension-action', options);
16951
+ }
16952
+ async hideActiveExtensionPopup() {
16953
+ await __classPrivateFieldGet(this, _ChromeBrowserActionsImpl_wire, "f").sendAction('chrome-browser-hide-active-extension-popup', {});
16954
+ }
16955
+ }
16956
+ _ChromeBrowserActionsImpl_wire = new WeakMap(), _ChromeBrowserActionsImpl_state = new WeakMap();
16957
+
16958
+ /**
16959
+ * Client-side handle for the chrome-browser feature on the current window.
16960
+ *
16961
+ * The window must have been created with `chromeBrowser: true` for these APIs to do
16962
+ * anything meaningful — there is no separate `init()` step. From a view or a non
16963
+ * chrome-browser window, calls into `Actions` will resolve to empty results.
16964
+ */
16965
+ class ChromeBrowserModule {
16966
+ constructor(wire, isWindow) {
16967
+ this.Actions = new ChromeBrowserActionsImpl(wire);
16968
+ if (isWindow) {
16969
+ ChromeBrowserActionsImpl.activate(this.Actions);
16970
+ }
16971
+ }
16972
+ }
16973
+
16847
16974
  /**
16848
16975
  * @internal
16849
16976
  */
@@ -16867,6 +16994,7 @@ class Fin extends events.EventEmitter {
16867
16994
  this.Interop = new InteropModule(wire);
16868
16995
  this.SnapshotSource = new SnapshotSourceModule(wire);
16869
16996
  this.NotificationManager = new NotificationManagerModule(wire);
16997
+ this.ChromeBrowser = new ChromeBrowserModule(wire, wire.me.entityType === 'window');
16870
16998
  wire.registerFin(this);
16871
16999
  this.me = getMe(wire);
16872
17000
  // Handle disconnect events