@openfin/notifications-router 45.1.0-alpha-4875 → 45.1.0-alpha-4882
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.
- package/dist/router/index.d.ts +23 -1
- package/dist/router/index.js +1 -1
- package/dist/template.json +1 -1
- package/package.json +1 -1
package/dist/router/index.d.ts
CHANGED
|
@@ -1090,6 +1090,14 @@ interface ButtonOptions {
|
|
|
1090
1090
|
* @hidden
|
|
1091
1091
|
*/
|
|
1092
1092
|
index?: number;
|
|
1093
|
+
/**
|
|
1094
|
+
* When true, clicking this button does not automatically dismiss the notification.
|
|
1095
|
+
* The notification remains visible in both the toast and Notification Center.
|
|
1096
|
+
*
|
|
1097
|
+
* The X (close) button always dismisses regardless of this flag.
|
|
1098
|
+
* @default false
|
|
1099
|
+
*/
|
|
1100
|
+
persistOnClick?: boolean;
|
|
1093
1101
|
formOptions?: {
|
|
1094
1102
|
/**
|
|
1095
1103
|
* Title to display on a button when form is submitting.
|
|
@@ -1597,6 +1605,12 @@ interface NotificationFormSubmittedEvent {
|
|
|
1597
1605
|
* });
|
|
1598
1606
|
*/
|
|
1599
1607
|
setFormStatus: (formStatusOptions: Omit<FormStatusOptions, '_notificationId'>) => Promise<void>;
|
|
1608
|
+
/**
|
|
1609
|
+
* Resets all form field values to their initial state.
|
|
1610
|
+
* Call this after a successful submission when you want the form cleared for the next entry.
|
|
1611
|
+
* If not called, form values are preserved.
|
|
1612
|
+
*/
|
|
1613
|
+
clearForm: () => Promise<void>;
|
|
1600
1614
|
}
|
|
1601
1615
|
/**
|
|
1602
1616
|
* Event fired whenever the Notification Sound Enabled setting is toggled in Notification Center.
|
|
@@ -2100,9 +2114,11 @@ declare const enum APITopic {
|
|
|
2100
2114
|
REGISTER_PLATFORM = "register-notifications-platform",
|
|
2101
2115
|
DEREGISTER_PLATFORM = "deregister-notifications-platform",
|
|
2102
2116
|
SET_FORM_STATUS_OPTIONS = "set-form-status-options",
|
|
2117
|
+
CLEAR_FORM_VALUES = "clear-form-values",
|
|
2103
2118
|
SET_FORM_VALIDATION_ERRORS = "set-form-validation-errors",
|
|
2104
2119
|
GET_USER_SETTINGS_STATUS = "get-user-settings-status",
|
|
2105
2120
|
SET_DEFAULT_PLATFORM_SHORTCUT = "set-default-platform-shortcut",
|
|
2121
|
+
SET_SHORTCUT = "set-shortcut",
|
|
2106
2122
|
SET_NOTIFICATION_SECURITY_RULE = "set-notification-security-rule"
|
|
2107
2123
|
}
|
|
2108
2124
|
interface API {
|
|
@@ -2126,12 +2142,15 @@ interface API {
|
|
|
2126
2142
|
];
|
|
2127
2143
|
[APITopic.DEREGISTER_PLATFORM]: [PlatformDeregisterPayload, void];
|
|
2128
2144
|
[APITopic.SET_FORM_STATUS_OPTIONS]: [FormStatusOptions, void];
|
|
2145
|
+
[APITopic.CLEAR_FORM_VALUES]: [ClearFormValuesPayload, void];
|
|
2129
2146
|
[APITopic.SET_FORM_VALIDATION_ERRORS]: [SetFormValidationErrorsPayload, void];
|
|
2130
2147
|
[APITopic.GET_USER_SETTINGS_STATUS]: [UserSettings, UserSettingStatus[UserSettings]];
|
|
2131
2148
|
[APITopic.SET_DEFAULT_PLATFORM_SHORTCUT]: [string, void];
|
|
2149
|
+
[APITopic.SET_SHORTCUT]: [string, void];
|
|
2132
2150
|
[APITopic.SET_NOTIFICATION_SECURITY_RULE]: [NotificationSecurityRule, void];
|
|
2133
2151
|
}
|
|
2134
|
-
type Events = NotificationActionEvent | NotificationToastDismissedEvent | NotificationClosedEvent | NotificationCreatedEvent | NotificationsCountChanged |
|
|
2152
|
+
type Events = NotificationActionEvent | NotificationToastDismissedEvent | NotificationClosedEvent | NotificationCreatedEvent | NotificationsCountChanged | NotificationFormSubmittedEventTransport | NotificationReminderCreatedEvent | NotificationReminderRemovedEvent | Omit<NotificationFormValuesChangedEvent, 'setErrors'> | ToggleNotificationSound;
|
|
2153
|
+
type NotificationFormSubmittedEventTransport = Omit<NotificationFormSubmittedEvent, 'setFormStatus' | 'preventDefault' | 'clearForm'>;
|
|
2135
2154
|
type TransportMappings<T> = T extends NotificationActionEvent ? NotificationActionEventTransport : never;
|
|
2136
2155
|
type TransportMemberMappings<T> = T extends Notification ? NotificationInternal : T;
|
|
2137
2156
|
type CreatePayload<T extends NotificationOptions = NotificationOptions> = DistributiveOmit<T, 'date' | 'expires'> & {
|
|
@@ -2139,6 +2158,9 @@ type CreatePayload<T extends NotificationOptions = NotificationOptions> = Distri
|
|
|
2139
2158
|
expires?: number | null;
|
|
2140
2159
|
reminder?: number | null;
|
|
2141
2160
|
};
|
|
2161
|
+
type ClearFormValuesPayload = {
|
|
2162
|
+
_notificationId: string;
|
|
2163
|
+
};
|
|
2142
2164
|
type SetFormValidationErrorsPayload = {
|
|
2143
2165
|
errors: Array<CustomValidationError>;
|
|
2144
2166
|
notificationId: string;
|
package/dist/router/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={7(e){var t,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};t=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function r(){r.init.call(this)}e.exports=r,e.exports.once=function(e,t){return new Promise((function(i,n){function o(i){e.removeListener(t,r),n(i)}function r(){"function"==typeof e.removeListener&&e.removeListener("error",o),i([].slice.call(arguments))}T(e,t,r,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&T(e,"error",t,{once:!0})}(e,o)}))},r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?r.defaultMaxListeners:e._maxListeners}function l(e,t,i,n){var o,r,s,l;if(a(i),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),r=e._events),s=r[t]),void 0===s)s=r[t]=i,++e._eventsCount;else if("function"==typeof s?s=r[t]=n?[i,s]:[s,i]:n?s.unshift(i):s.push(i),(o=c(e))>0&&s.length>o&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},o=u.bind(n);return o.listener=i,n.wrapFn=o,o}function d(e,t,i){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?i?[o.listener||o]:[o]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(o):h(o,o.length)}function p(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function h(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}function T(e,t,i,n){if("function"==typeof e.on)n.once?e.once(t,i):e.on(t,i);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(r){n.once&&e.removeEventListener(t,o),i(r)}))}}Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),r.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},r.prototype.getMaxListeners=function(){return c(this)},r.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var o="error"===e,r=this._events;if(void 0!==r)o=o&&void 0===r.error;else if(!o)return!1;if(o){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=r[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var l=c.length,u=h(c,l);for(i=0;i<l;++i)n(u[i],this,t)}return!0},r.prototype.addListener=function(e,t){return l(this,e,t,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(e,t){return l(this,e,t,!0)},r.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},r.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},r.prototype.removeListener=function(e,t){var i,n,o,r,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(i=n[e]))return this;if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(o=-1,r=i.length-1;r>=0;r--)if(i[r]===t||i[r].listener===t){s=i[r].listener,o=r;break}if(o<0)return this;0===o?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,o),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},r.prototype.off=r.prototype.removeListener,r.prototype.removeAllListeners=function(e){var t,i,n;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var o,r=Object.keys(i);for(n=0;n<r.length;++n)"removeListener"!==(o=r[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},r.prototype.listeners=function(e){return d(this,e,!0)},r.prototype.rawListeners=function(e){return d(this,e,!1)},r.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},r.prototype.listenerCount=p,r.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},89(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DeferredPromise=class{constructor(){const e=new Promise(((e,t)=>{this._resolve=e,this._reject=t}));this._promise=e}get promise(){return this._promise}get resolve(){return this._resolve}get reject(){return this._reject}}},158(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});const n=i(89);async function o(e,t){let i=0;for(const n of e)await t(n,i,e),i++}async function r(e,t){await Promise.all(e.map(t))}function s(e,t,i){const o=new n.DeferredPromise,r=e.add(((...e)=>{t(...e)&&(r.remove(),o.resolve())}));return i&&i.catch((e=>{r.remove(),o.reject(e)})),a(o.promise)}function a(e){return e.catch((()=>{})),e}t.serialForEach=o,t.serialMap=async function(e,t){const i=[];return await o(e,(async(e,n,o)=>{i.push(await t(e,n,o))})),i},t.serialFilter=async function(e,t){const i=[];return await o(e,(async(e,n,o)=>{await t(e,n,o)&&i.push(e)})),i},t.parallelForEach=r,t.parallelMap=async function(e,t){const i=[];return await r(e,(async(e,n,o)=>{i[n]=await t(e,n,o)})),i},t.parallelFilter=async function(e,t){const i=[];return await r(e,(async(e,n,o)=>{i[n]=await t(e,n,o)})),e.filter(((e,t)=>i[t]))},t.withStrictTimeout=function(e,t,i){const n=new Promise(((t,n)=>setTimeout((()=>n(new Error(i))),e)));return a(Promise.race([n,t]))},t.withTimeout=function(e,t){const i=new Promise((t=>setTimeout((()=>t([!0,void 0])),e))),n=t.then((e=>[!1,e]));return Promise.race([i,n])},t.untilTrue=function(e,t,i){return t()?Promise.resolve():s(e,t,i)},t.untilSignal=s,t.allowReject=a},785(e,t,i){function n(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}Object.defineProperty(t,"__esModule",{value:!0}),n(i(158)),n(i(89))},471(e,t,i){var n=this&&this.__rest||function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.getEventRouter=t.eventEmitter=t.EventRouter=void 0;const o=i(7),r=i(902),s=i(349);class a{constructor(e){this._emitterProviders={},this._deserializers={},this._defaultEmitter=e}registerEmitterProvider(e,t){this._emitterProviders[e]=t}registerDeserializer(e,t){this._deserializers[e]=t}dispatchEvent(e){const{type:t,target:i}=e,o=n(e,["type","target"]);let a;if(!i)throw new Error("Invalid event, no target specified");if("default"===i)a=this._defaultEmitter;else{if(!this._emitterProviders[i.type])throw new Error(`Invalid target, no provider registered for '${i.type}'`);a=this._emitterProviders[i.type](i.id)}const c=Object.assign({type:t},o),l=this._deserializers[t];l?a.emit(t,l(c)):"notification-form-submitted"===t?function(e,t){let i=!1;e.preventDefault=()=>i=!0,t.emit("notification-form-submitted",e),i||(0,r.tryServiceDispatch)(s.APITopic.SET_FORM_STATUS_OPTIONS,{formStatus:"submitted",_notificationId:e.notification.id})}(c,a):a.emit(t,c)}}let c;t.EventRouter=a,t.eventEmitter=new o.EventEmitter,t.getEventRouter=function(){return c||(c=new a(t.eventEmitter)),c}},777(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ActionBodyClickType=t.ActionNoopType=t.ActionTrigger=void 0,(i=t.ActionTrigger||(t.ActionTrigger={})).CONTROL="control",i.SELECT="select",i.CLOSE="close",i.EXPIRE="expire",i.PROGRAMMATIC="programmatic",(t.ActionNoopType||(t.ActionNoopType={})).EVENT_DISMISS="event_dismiss",(t.ActionBodyClickType||(t.ActionBodyClickType={})).DISMISS_EVENT="dismiss_event"},578(e,t){Object.defineProperty(t,"__esModule",{value:!0})},902(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.setDispatchMethod=t.tryServiceDispatch=void 0,t.tryServiceDispatch=async(e,t)=>{throw new Error("Environment is not initialized..")},t.setDispatchMethod=e=>{t.tryServiceDispatch=e}},637(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.FieldType=void 0,t.FieldType={string:"string",number:"number",boolean:"boolean",date:"date",checkboxGroup:"checkboxGroup",radioGroup:"radioGroup",time:"time"}},2(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(637),t),o(i(155),t)},155(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetType=t.TimeWidgetType=t.DateWidgetType=t.RadioGroupWidgetType=t.CheckboxGroupWidgetType=t.BooleanWidgetType=t.NumberWidgetType=t.StringWidgetType=void 0,t.StringWidgetType={Text:"Text",Dropdown:"Dropdown"},t.NumberWidgetType={Number:"Number"},t.BooleanWidgetType={Toggle:"Toggle",Checkbox:"Checkbox"},t.CheckboxGroupWidgetType={CheckboxGroup:"CheckboxGroup"},t.RadioGroupWidgetType={RadioGroup:"RadioGroup"},t.DateWidgetType={Date:"Date"},t.TimeWidgetType={Time:"Time"},t.WidgetType=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t.StringWidgetType),t.NumberWidgetType),t.BooleanWidgetType),t.CheckboxGroupWidgetType),t.RadioGroupWidgetType),t.DateWidgetType),t.TimeWidgetType)},403(e,t){var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.IndicatorColor=t.IndicatorType=void 0,(n=t.IndicatorType||(t.IndicatorType={})).FAILURE="failure",n.WARNING="warning",n.SUCCESS="success",(i=t.IndicatorColor||(t.IndicatorColor={})).RED="red",i.GREEN="green",i.YELLOW="yellow",i.BLUE="blue",i.PURPLE="purple",i.GRAY="gray",i.ORANGE="orange",i.MAGENTA="magenta",i.TEAL="teal"},349(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.eventTypes=t.APITopic=t.getChannelName=t.SERVICE_CHANNEL=t.SERVICE_IDENTITY=void 0,t.SERVICE_IDENTITY={uuid:"notifications-service",name:"notifications-service"},t.SERVICE_CHANNEL="of-notifications-service-v1",t.getChannelName=e=>e===t.SERVICE_IDENTITY.uuid?t.SERVICE_CHANNEL:`${e}-${t.SERVICE_CHANNEL}`,(i=t.APITopic||(t.APITopic={})).CREATE_NOTIFICATION="create-notification",i.UPDATE_NOTIFICATION="update-notification",i.CLEAR_NOTIFICATION="clear-notification",i.SET_REMINDER="set-reminder",i.CANCEL_REMINDER="cancel-reminder",i.GET_APP_NOTIFICATIONS="fetch-app-notifications",i.CLEAR_APP_NOTIFICATIONS="clear-app-notifications",i.TOGGLE_NOTIFICATION_CENTER="toggle-notification-center",i.ADD_EVENT_LISTENER="add-event-listener",i.REMOVE_EVENT_LISTENER="remove-event-listener",i.GET_PROVIDER_STATUS="get-provider-status",i.GET_NOTIFICATIONS_COUNT="get-notifications-count",i.SHOW_NOTIFICATION_CENTER="show-notification-center",i.HIDE_NOTIFICATION_CENTER="hide-notification-center",i.REGISTER_PLATFORM="register-notifications-platform",i.DEREGISTER_PLATFORM="deregister-notifications-platform",i.SET_FORM_STATUS_OPTIONS="set-form-status-options",i.SET_FORM_VALIDATION_ERRORS="set-form-validation-errors",i.GET_USER_SETTINGS_STATUS="get-user-settings-status",i.SET_DEFAULT_PLATFORM_SHORTCUT="set-default-platform-shortcut",i.SET_NOTIFICATION_SECURITY_RULE="set-notification-security-rule",t.eventTypes=["notification-created","notification-closed","notification-action","notification-form-submitted","notification-form-values-changed","notifications-count-changed","notification-sound-toggled","notification-reminder-created","notification-reminder-removed","notification-toast-dismissed"]},405(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return o(t,e),t},s=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)},a=this&&this.__rest||function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.setAllowedOrigins=t.getUserSettingStatus=t.UserSettings=t.getNotificationsCount=t.hide=t.show=t.setDefaultPlatformShortcut=t.toggleNotificationCenter=t.clearAll=t.getAll=t.cancelReminder=t.setReminder=t.clear=t.update=t.create=t.removeEventListener=t.addEventListener=t.VERSION=t.NotificationIndicatorType=t.IndicatorColor=t.NotificationIndicatorWithCustomColor=t.NotificationIndicator=t.NotificationOptions=t.provider=t.actions=void 0;const c=i(777),l=i(902),u=i(349),f=i(471),d=r(i(217));t.provider=d;const p=i(855),h=i(403);Object.defineProperty(t,"NotificationIndicator",{enumerable:!0,get:function(){return h.NotificationIndicator}}),Object.defineProperty(t,"NotificationIndicatorWithCustomColor",{enumerable:!0,get:function(){return h.NotificationIndicatorWithCustomColor}}),Object.defineProperty(t,"NotificationIndicatorType",{enumerable:!0,get:function(){return h.IndicatorType}}),Object.defineProperty(t,"IndicatorColor",{enumerable:!0,get:function(){return h.IndicatorColor}});const T=i(965);Object.defineProperty(t,"NotificationOptions",{enumerable:!0,get:function(){return T.NotificationOptions}});const m=r(i(777));t.actions=m,s(i(777),t),s(i(578),t),s(i(93),t),s(i(2),t),s(i(520),t),s(i(96),t),s(i(470),t),t.VERSION="45.1.0-alpha-4875";const v=(0,f.getEventRouter)();function E(e){const{notification:t}=e;return Object.assign(Object.assign({},e),{notification:Object.assign(Object.assign({},t),{date:new Date(t.date),expires:null!==t.expires?new Date(t.expires):null})})}v.registerDeserializer("notification-created",(e=>E(e))),v.registerDeserializer("notification-toast-dismissed",(e=>E(e))),v.registerDeserializer("notification-closed",(e=>E(e))),v.registerDeserializer("notification-action",(e=>{var t;const i=E(e),{controlSource:n,controlIndex:o}=i,r=a(i,["controlSource","controlIndex"]);return e.trigger===c.ActionTrigger.CONTROL?Object.assign(Object.assign({},r),{control:null===(t=e.notification[n])||void 0===t?void 0:t[o]}):r})),v.registerDeserializer("notifications-count-changed",(e=>e)),v.registerDeserializer("notification-reminder-created",(e=>{const t=E(e),{reminderDate:i}=t,n=a(t,["reminderDate"]);return Object.assign(Object.assign({},n),{reminderDate:new Date(i)})})),v.registerDeserializer("notification-reminder-removed",(e=>E(e))),v.registerDeserializer("notification-sound-toggled",(e=>e)),t.addEventListener=async function(e,t){(0,p.validateEnvironment)(),e=(0,p.sanitizeEventType)(e),t=(0,p.sanitizeFunction)(t);const i=f.eventEmitter.listenerCount(e);"notification-form-submitted"===e&&(t=function(e){return t=>{const i=t.notification.id;t.setFormStatus=e=>(0,l.tryServiceDispatch)(u.APITopic.SET_FORM_STATUS_OPTIONS,Object.assign(Object.assign({},e),{_notificationId:i})),e(t)}}(t)),"notification-form-values-changed"===e&&(t=function(e){return t=>{t.setErrors=e=>(0,l.tryServiceDispatch)(u.APITopic.SET_FORM_VALIDATION_ERRORS,{errors:e,notificationId:t.notification.id}),e(t)}}(t)),f.eventEmitter.addListener(e,t),0===i&&1===f.eventEmitter.listenerCount(e)&&await(0,l.tryServiceDispatch)(u.APITopic.ADD_EVENT_LISTENER,e)},t.removeEventListener=async function(e,t){(0,p.validateEnvironment)(),e=(0,p.sanitizeEventType)(e),t=(0,p.sanitizeFunction)(t),1===f.eventEmitter.listenerCount(e)&&f.eventEmitter.listeners(e)[0]===t&&await(0,l.tryServiceDispatch)(u.APITopic.REMOVE_EVENT_LISTENER,e),f.eventEmitter.removeListener(e,t)},t.create=async function(e,t){if("object"!=typeof e||null===e)throw new Error("Invalid argument passed to create: argument must be an object and must not be null");if(void 0!==e.date&&!(e.date instanceof Date))throw new Error('Invalid argument passed to create: "date" must be a valid Date object');if(void 0!==e.expires&&null!==e.expires&&!(e.expires instanceof Date))throw new Error('Invalid argument passed to create: "expires" must be null or a valid Date object');if(t&&t.reminderDate){if(!1===e.allowReminder)throw new Error('You must not specify a reminder date for a notification with "allowReminder" option set to false.');if(!(t.reminderDate instanceof Date))throw new Error('Invalid argument passed to reminder Options: "date" must a valid Date object');if(e.expires&&e.expires.getTime()<t.reminderDate.getTime())throw new Error("Expiration date must not be earlier than reminder date.")}void 0!==e.category&&null!==e.category||(e.category="default");const i=await(0,l.tryServiceDispatch)(u.APITopic.CREATE_NOTIFICATION,Object.assign(Object.assign({},e),{date:e.date&&e.date.getTime(),expires:e.expires&&e.expires.getTime(),reminder:(null==t?void 0:t.reminderDate)&&t.reminderDate.getTime()}));return Object.assign(Object.assign({},i),{date:new Date(i.date),expires:null!==i.expires?new Date(i.expires):null})},t.update=async function(e){if("object"!=typeof e||null===e)throw new Error("Invalid argument passed to create: argument must be an object and must not be null");if(!e.id)throw new Error('Invalid argument passed to create: "id" must be Id of previously created Notification');const t=await(0,l.tryServiceDispatch)(u.APITopic.UPDATE_NOTIFICATION,Object.assign({},e));return Object.assign({},t)},t.clear=async function(e){return(0,l.tryServiceDispatch)(u.APITopic.CLEAR_NOTIFICATION,{id:e})},t.setReminder=async function(e,t){if(!(t instanceof Date))throw new Error('Invalid argument passed to setReminder: "reminderDate" must a valid Date object');if(t.getTime()<Date.now())throw new Error('Invalid argument passed to setReminder: "reminderDate" was set to a Date in the past, must be a Date in the future.');const i=await(0,l.tryServiceDispatch)(u.APITopic.SET_REMINDER,{id:e,reminder:t.getTime()});return i?console.log(`[Client::setReminder] Reminder set for notification: ${e}`):console.log(`[Client::setReminder] Notification not found for id: ${e}`),i},t.cancelReminder=async function(e){const t=await(0,l.tryServiceDispatch)(u.APITopic.CANCEL_REMINDER,{id:e});return t?console.log(`[Client::cancelReminder] Reminder canceled for notification: ${e}`):console.log(`[Client::cancelReminder] Notification not found for id: ${e}`),t},t.getAll=async function(){return(await(0,l.tryServiceDispatch)(u.APITopic.GET_APP_NOTIFICATIONS,void 0)).map((e=>Object.assign(Object.assign({},e),{indicator:e.indicator||null,date:new Date(e.date),expires:null!==e.expires?new Date(e.expires):null})))},t.clearAll=async function(){return(0,l.tryServiceDispatch)(u.APITopic.CLEAR_APP_NOTIFICATIONS,void 0)},t.toggleNotificationCenter=async function(){return(0,l.tryServiceDispatch)(u.APITopic.TOGGLE_NOTIFICATION_CENTER,void 0)},t.setDefaultPlatformShortcut=function(e){return(0,l.tryServiceDispatch)(u.APITopic.SET_DEFAULT_PLATFORM_SHORTCUT,e)},t.show=async function(e){return(0,l.tryServiceDispatch)(u.APITopic.SHOW_NOTIFICATION_CENTER,e)},t.hide=async function(){return(0,l.tryServiceDispatch)(u.APITopic.HIDE_NOTIFICATION_CENTER,void 0)},t.getNotificationsCount=async function(){return(0,l.tryServiceDispatch)(u.APITopic.GET_NOTIFICATIONS_COUNT,void 0)},(t.UserSettings||(t.UserSettings={})).SOUND_ENABLED="soundEnabled",t.getUserSettingStatus=async function(e){return(0,l.tryServiceDispatch)(u.APITopic.GET_USER_SETTINGS_STATUS,e)},t.setAllowedOrigins=async e=>(0,l.tryServiceDispatch)(u.APITopic.SET_NOTIFICATION_SECURITY_RULE,{allowedOrigins:e})},217(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isConnectedToAtLeast=t.getStatus=void 0;const o=n(i(284)),r=i(785),s=i(902),a=i(349);function c(){return(0,r.withStrictTimeout)(500,(0,s.tryServiceDispatch)(a.APITopic.GET_PROVIDER_STATUS,void 0),"").catch((()=>({connected:!1,version:null,templateAPIVersion:null})))}t.getStatus=c,t.isConnectedToAtLeast=async function(e){const t=await c();if(t.connected&&null!==t.version){const i=(0,o.default)(t.version,e);if(0===i||1===i)return!0}return!1}},520(e,t){Object.defineProperty(t,"__esModule",{value:!0})},93(e,t){Object.defineProperty(t,"__esModule",{value:!0})},96(e,t){Object.defineProperty(t,"__esModule",{value:!0})},134(e,t){Object.defineProperty(t,"__esModule",{value:!0})},468(e,t){Object.defineProperty(t,"__esModule",{value:!0})},470(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(134),t),o(i(468),t),o(i(965),t),o(i(929),t)},965(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateFragmentNames=t.PresentationTemplateFragmentNames=t.ContainerTemplateFragmentNames=t.TemplateNames=void 0,t.TemplateNames={markdown:"markdown",list:"list",custom:"custom"},t.ContainerTemplateFragmentNames={container:"container"},t.PresentationTemplateFragmentNames={text:"text",image:"image",list:"list",actionableText:"actionableText"},t.TemplateFragmentNames=Object.assign(Object.assign({},t.ContainerTemplateFragmentNames),t.PresentationTemplateFragmentNames)},929(e,t){Object.defineProperty(t,"__esModule",{value:!0})},855(e,t){function i(e,t){let i;try{i=JSON.stringify(e)}catch(e){i=t}return i}Object.defineProperty(t,"__esModule",{value:!0}),t.setValidationMethod=t.validateEnvironment=t.safeStringify=t.sanitizeEventType=t.sanitizeFunction=void 0,t.sanitizeFunction=function(e){if("function"!=typeof e)throw new Error(`Invalid argument passed: ${i(e,"The provided value")} is not a valid function`);return e},t.sanitizeEventType=function(e){if("notification-action"===e||"notification-created"===e||"notification-toast-dismissed"===e||"notification-closed"===e||"notifications-count-changed"===e||"notification-form-submitted"===e||"notification-reminder-created"===e||"notification-reminder-removed"===e||"notification-form-values-changed"===e||"notification-sound-toggled"===e)return e;throw new Error(`Invalid argument passed: ${i(e,"The provided event type")} is not a valid Notifications event type`)},t.safeStringify=i,t.validateEnvironment=()=>{throw new Error("fin is not defined. The notifications module is only intended for use in an OpenFin application.")},t.setValidationMethod=e=>{t.validateEnvironment=e}},32(e,t,i){var n,o,r,s,a,c,l,u,f,d,p,h,T,m,v,E,I,g,_,y,O,A,w,N,b,P,R,S,C,D,j,L,M,F,x,U=this&&this.__classPrivateFieldGet||function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)},W=this&&this.__classPrivateFieldSet||function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,i):o?o.value=i:t.set(e,i),i};Object.defineProperty(t,"__esModule",{value:!0}),t.APIRouter=t.UpdatableNotificationOptions=t.NotificationOptions=t.API=t.APITopic=t.show=t.cancelReminder=t.setReminder=t.getAll=t.clearAll=t.clear=t.update=t.create=void 0;const G=i(242),k=i(349);Object.defineProperty(t,"API",{enumerable:!0,get:function(){return k.API}}),Object.defineProperty(t,"APITopic",{enumerable:!0,get:function(){return k.APITopic}});const V=i(470);Object.defineProperty(t,"NotificationOptions",{enumerable:!0,get:function(){return V.NotificationOptions}}),Object.defineProperty(t,"UpdatableNotificationOptions",{enumerable:!0,get:function(){return V.UpdatableNotificationOptions}});const $=i(902);var z=i(405);Object.defineProperty(t,"create",{enumerable:!0,get:function(){return z.create}}),Object.defineProperty(t,"update",{enumerable:!0,get:function(){return z.update}}),Object.defineProperty(t,"clear",{enumerable:!0,get:function(){return z.clear}}),Object.defineProperty(t,"clearAll",{enumerable:!0,get:function(){return z.clearAll}}),Object.defineProperty(t,"getAll",{enumerable:!0,get:function(){return z.getAll}}),Object.defineProperty(t,"setReminder",{enumerable:!0,get:function(){return z.setReminder}}),Object.defineProperty(t,"cancelReminder",{enumerable:!0,get:function(){return z.cancelReminder}}),Object.defineProperty(t,"show",{enumerable:!0,get:function(){return z.show}});class H extends Error{constructor(e){super(e),this.name="IdentityError"}}t.APIRouter=class{constructor(e){var t,i;n.add(this),o.set(this,void 0),r.set(this,null),s.set(this,void 0),a.set(this,void 0),c.set(this,void 0),l.set(this,void 0),u.set(this,new Map),f.set(this,new Map),d.set(this,new Set),p.set(this,void 0),h.set(this,void 0),T.set(this,void 0),m.set(this,void 0),v.set(this,void 0),E.set(this,!1),this.onConnection=new G.Signal,this.onDisconnection=new G.Signal,(0,$.setDispatchMethod)(U(this,n,"m",_).bind(this)),U(this,n,"m",L).call(this,e),W(this,a,e.providerChannelName,"f"),W(this,s,(null==e?void 0:e.overrides)||{},"f"),W(this,v,e.customManifest,"f"),W(this,c,U(this,v,"f")?`${U(this,v,"f").manifestUuid}-${k.SERVICE_CHANNEL}`:k.SERVICE_CHANNEL,"f"),W(this,p,e.onWakeUpRequired,"f"),W(this,h,e.onNotificationCenterEvent,"f"),W(this,m,null===(t=e.routerCTAConfig)||void 0===t?void 0:t.routerCTAContentId,"f"),W(this,T,null===(i=e.routerCTAConfig)||void 0===i?void 0:i.onRouterCTAEvent,"f"),console.log(`[Notifications Router] Router launched with provider channel: ${U(this,a,"f")} and target channel: ${U(this,c,"f")}`),console.log("Custom manifest: ",U(this,v,"f")),W(this,l,{[k.APITopic.CREATE_NOTIFICATION]:U(this,n,"m",O).call(this,k.APITopic.CREATE_NOTIFICATION),[k.APITopic.UPDATE_NOTIFICATION]:U(this,n,"m",O).call(this,k.APITopic.UPDATE_NOTIFICATION),[k.APITopic.CLEAR_NOTIFICATION]:U(this,n,"m",O).call(this,k.APITopic.CLEAR_NOTIFICATION),[k.APITopic.SET_REMINDER]:U(this,n,"m",O).call(this,k.APITopic.SET_REMINDER),[k.APITopic.CANCEL_REMINDER]:U(this,n,"m",O).call(this,k.APITopic.CANCEL_REMINDER),[k.APITopic.CLEAR_APP_NOTIFICATIONS]:U(this,n,"m",O).call(this,k.APITopic.CLEAR_APP_NOTIFICATIONS),[k.APITopic.TOGGLE_NOTIFICATION_CENTER]:U(this,n,"m",O).call(this,k.APITopic.TOGGLE_NOTIFICATION_CENTER),[k.APITopic.SHOW_NOTIFICATION_CENTER]:U(this,n,"m",O).call(this,k.APITopic.SHOW_NOTIFICATION_CENTER),[k.APITopic.HIDE_NOTIFICATION_CENTER]:U(this,n,"m",O).call(this,k.APITopic.HIDE_NOTIFICATION_CENTER),[k.APITopic.GET_NOTIFICATIONS_COUNT]:U(this,n,"m",O).call(this,k.APITopic.GET_NOTIFICATIONS_COUNT),[k.APITopic.GET_APP_NOTIFICATIONS]:U(this,n,"m",O).call(this,k.APITopic.GET_APP_NOTIFICATIONS),[k.APITopic.GET_PROVIDER_STATUS]:U(this,n,"m",O).call(this,k.APITopic.GET_PROVIDER_STATUS),[k.APITopic.SET_FORM_STATUS_OPTIONS]:U(this,n,"m",O).call(this,k.APITopic.SET_FORM_STATUS_OPTIONS),[k.APITopic.SET_FORM_VALIDATION_ERRORS]:U(this,n,"m",O).call(this,k.APITopic.SET_FORM_VALIDATION_ERRORS),[k.APITopic.GET_USER_SETTINGS_STATUS]:U(this,n,"m",O).call(this,k.APITopic.GET_USER_SETTINGS_STATUS),[k.APITopic.SET_DEFAULT_PLATFORM_SHORTCUT]:U(this,n,"m",O).call(this,k.APITopic.SET_DEFAULT_PLATFORM_SHORTCUT),[k.APITopic.SET_NOTIFICATION_SECURITY_RULE]:U(this,n,"m",O).call(this,k.APITopic.SET_NOTIFICATION_SECURITY_RULE),[k.APITopic.ADD_EVENT_LISTENER]:U(this,n,"m",A).call(this),[k.APITopic.REMOVE_EVENT_LISTENER]:U(this,n,"m",w).call(this),[k.APITopic.REGISTER_PLATFORM]:U(this,n,"m",O).call(this,k.APITopic.REGISTER_PLATFORM),[k.APITopic.DEREGISTER_PLATFORM]:U(this,n,"m",O).call(this,k.APITopic.DEREGISTER_PLATFORM)},"f")}async initialize(){W(this,o,await fin.InterApplicationBus.Channel.create(U(this,a,"f")),"f"),U(this,o,"f").onConnection(U(this,n,"m",C).bind(this)),U(this,o,"f").onDisconnection(U(this,n,"m",D).bind(this));for(const e in U(this,l,"f"))Object.hasOwnProperty.call(U(this,l,"f"),e)&&U(this,o,"f").register(e,U(this,l,"f")[e]);await U(this,n,"m",x).call(this)}setShuttingDown(){W(this,E,!0,"f")}},o=new WeakMap,r=new WeakMap,s=new WeakMap,a=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,f=new WeakMap,d=new WeakMap,p=new WeakMap,h=new WeakMap,T=new WeakMap,m=new WeakMap,v=new WeakMap,E=new WeakMap,n=new WeakSet,I=function(e){return U(this,d,"f").has(e.name)},g=async function(e,t){var i;const n=t.notification,r=null==n?void 0:n.contentId;return(null==n?void 0:n.contentId)&&delete n.contentId,null===(i=U(this,h,"f"))||void 0===i||i.call(this,t,r),U(this,o,"f").dispatch(e,"event",t)},_=async function(e,t){return(await U(this,r,"f")).dispatch(e,t)},y=async function(e){var t,i;const o=e.type;if("notifications-count-changed"===o||"notification-sound-toggled"===o){const t=[];U(this,u,"f").forEach(((e,i)=>{e.has(o)&&t.push(i)}));for(const i of t){const t={uuid:fin.me.uuid,name:i};U(this,n,"m",I).call(this,t)&&U(this,n,"m",g).call(this,t,e)}}else{const r=e.notification,s=null==r?void 0:r.contentId;if(U(this,m,"f")&&s===U(this,m,"f"))return null===(t=U(this,T,"f"))||void 0===t?void 0:t.call(this,e);if(s){const t={uuid:fin.me.uuid,name:s};if(!U(this,n,"m",I).call(this,t))return U(this,n,"m",b).call(this,s,e.type,e),U(this,p,"f").call(this,s,e.type);if(null===(i=U(this,u,"f").get(s))||void 0===i?void 0:i.has(o))return U(this,n,"m",g).call(this,t,e)}else console.warn(`[Notifications Router] Received event without contentId: ${o}. This event will be ignored.`)}},O=function(e){return async(t,i)=>{U(this,n,"m",j).call(this,i);let o=t;const r=U(this,s,"f")[e];if(r&&(o=await r(t)),e===k.APITopic.CREATE_NOTIFICATION){const e=o;o=U(this,n,"m",N).call(this,e,i.name)}return await U(this,n,"m",_).call(this,e,o)}},A=function(){return async(e,t)=>{U(this,n,"m",j).call(this,t);const i=t.name,o=e;U(this,n,"m",R).call(this,i,o);const r=U(this,n,"m",P).call(this,i,o);for(const e of r)U(this,n,"m",g).call(this,t,e)}},w=function(){return async(e,t)=>{U(this,n,"m",j).call(this,t),U(this,n,"m",S).call(this,t.name,e)}},N=function(e,t){return Object.assign(Object.assign({},e),{contentId:t})},b=function(e,t,i){const n=U(this,f,"f").get(e)||new Map,o=n.get(t)||[];o.push(i),n.set(t,o),U(this,f,"f").set(e,n)},P=function(e,t){const i=U(this,f,"f").get(e);return i&&i.get(t)||[]},R=function(e,t){const i=U(this,u,"f").get(e)||new Set;i.add(t),U(this,u,"f").set(e,i)},S=function(e,t){const i=U(this,u,"f").get(e)||new Set;i.delete(t),U(this,u,"f").set(e,i)},C=function(e,t){e.uuid===fin.me.uuid?(t&&t.version&&t.version.length>0?console.log(`[Notifications Router] Connection from client: ${e.name}, version: ${t.version}`):console.log(`[Notifications Router] Connection from client: ${e.name}, unable to determine version`),setTimeout((()=>{this.onConnection.emit(e)})),U(this,d,"f").add(e.name)):console.warn(`[Notifications Router] Connection attempt from client with different uuid: ${e.uuid}. This connection will be rejected.`)},D=function(e){console.log(`[Notifications Router] Disconnection from client: ${e.name}`),e.uuid===fin.me.uuid&&(U(this,u,"f").delete(e.name),this.onDisconnection.emit(e),U(this,d,"f").delete(e.name))},j=function(e){if(e.uuid!==fin.me.uuid)throw new H("[Notifications Router] Access denied: The router will only serve clients running under the same platform.")},L=function(e){const{providerChannelName:t,onWakeUpRequired:i,customManifest:n}=e;if(!t)throw new Error("API Router provider channel name must be provided and cannot be an empty string.");if(n){if(!n.manifestUrl)throw new Error("When a custom manifest is provided, a valid manifest URL must be specified.");if(!n.manifestUuid)throw new Error("When a custom manifest is provided, a valid manifest UUID must be specified.")}if("function"!=typeof i)throw new Error("onWakeUpRequired callback must be provided and be a function.");if(e.routerCTAConfig){if(!e.routerCTAConfig.routerCTAContentId)throw new Error("When a router CTA config is provided, a valid router CTA content ID must be specified.");if("function"!=typeof e.routerCTAConfig.onRouterCTAEvent)throw new Error("When a router CTA config is provided, a valid onRouterCTAEvent callback function must be specified.")}},M=async function(){var e,t;const i=null!==(t=null===(e=U(this,v,"f"))||void 0===e?void 0:e.manifestUrl)&&void 0!==t?t:"fins://system-apps/notification-center",n=window.navigator.userAgent.toLowerCase().includes("windows");console.log(`[Notifications Router] Launching Notification Center with manifest URL: ${i}`);try{n?await fin.System.launchManifest(i,{noUi:!0}):await fin.System.openUrlWithBrowser(i)}catch(e){throw e instanceof Error?console.error(`[Notifications Router] Failed to launch Notifications - ${e.name}: ${e.message}`):console.error(`[Notifications Router] Failed to launch Notifications - ${JSON.stringify(e)}`),e}},F=async function(){try{if(U(this,r,"f"))return;console.log(`[Notifications Router] Router connecting to Notification Center on channel: ${U(this,c,"f")}`),W(this,r,fin.InterApplicationBus.Channel.connect(U(this,c,"f"),{wait:!0,payload:{version:"45.1.0-alpha-4875"}}),"f"),U(this,r,"f").catch((e=>{W(this,r,null,"f")}));const e=await U(this,r,"f");e.setDefaultAction((()=>!1)),e.register("event",U(this,n,"m",y).bind(this)),e.register("WARN",(e=>console.warn(e))),e.onDisconnection((()=>{U(this,E,"f")||U(this,n,"m",x).call(this)})),k.eventTypes.forEach((t=>{e.dispatch(k.APITopic.ADD_EVENT_LISTENER,t)})),console.log("[Notifications Router] Router successfully connected to Notification Center")}catch(e){throw e instanceof Error?console.error(`[Notifications Router] Failed to connect to Notifications - ${e.name}: ${e.message}`):console.error(`Failed to connect to Notifications - ${JSON.stringify(e)}`),e}},x=async function(){W(this,r,null,"f"),await U(this,n,"m",M).call(this),await U(this,n,"m",F).call(this)}},242(e,t){var i,n,o,r,s=this&&this.__classPrivateFieldSet||function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,i):o?o.value=i:t.set(e,i),i},a=this&&this.__classPrivateFieldGet||function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.Signal=t.Aggregators=void 0,t.Aggregators=class{static ARRAY(e){return e}static AWAIT(e){return Promise.all(e)}static async AWAIT_VOID(e){await Promise.all(e)}},t.Signal=class{constructor(e){i.add(this),n.set(this,void 0),o.set(this,void 0),s(this,n,[],"f"),s(this,o,e||null,"f")}get slots(){return a(this,n,"f")}add(e,t){const o={callback:e,context:t,remove:()=>a(this,i,"m",r).call(this,o)};return a(this,n,"f").push(o),o}remove(e,t){const i=a(this,n,"f").findIndex((i=>i.callback===e&&i.context===t));return i>=0&&(a(this,n,"f").splice(i,1),!0)}has(e,t){return a(this,n,"f").findIndex((i=>i.callback===e&&i.context===t))>=0}emit(...e){const t=a(this,n,"f").slice();return a(this,o,"f")?a(this,o,"f").call(this,t.map((t=>t.callback.apply(t.context,e)))):void t.forEach((t=>t.callback.apply(t.context,e)))}},n=new WeakMap,o=new WeakMap,i=new WeakSet,r=function(e){const t=a(this,n,"f").indexOf(e);t>=0&&a(this,n,"f").splice(t,1)}},284(e){e.exports=require("semver-compare")}},t={},i=function i(n){var o=t[n];if(void 0!==o)return o.exports;var r=t[n]={exports:{}};return e[n].call(r.exports,r,r.exports,i),r.exports}(32);module.exports=i})();
|
|
1
|
+
(()=>{"use strict";var e={7(e){var t,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};t=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function r(){r.init.call(this)}e.exports=r,e.exports.once=function(e,t){return new Promise((function(i,n){function o(i){e.removeListener(t,r),n(i)}function r(){"function"==typeof e.removeListener&&e.removeListener("error",o),i([].slice.call(arguments))}T(e,t,r,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&T(e,"error",t,{once:!0})}(e,o)}))},r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?r.defaultMaxListeners:e._maxListeners}function l(e,t,i,n){var o,r,s,l;if(a(i),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),r=e._events),s=r[t]),void 0===s)s=r[t]=i,++e._eventsCount;else if("function"==typeof s?s=r[t]=n?[i,s]:[s,i]:n?s.unshift(i):s.push(i),(o=c(e))>0&&s.length>o&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},o=u.bind(n);return o.listener=i,n.wrapFn=o,o}function d(e,t,i){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?i?[o.listener||o]:[o]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(o):h(o,o.length)}function p(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function h(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}function T(e,t,i,n){if("function"==typeof e.on)n.once?e.once(t,i):e.on(t,i);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(r){n.once&&e.removeEventListener(t,o),i(r)}))}}Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),r.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},r.prototype.getMaxListeners=function(){return c(this)},r.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var o="error"===e,r=this._events;if(void 0!==r)o=o&&void 0===r.error;else if(!o)return!1;if(o){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=r[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var l=c.length,u=h(c,l);for(i=0;i<l;++i)n(u[i],this,t)}return!0},r.prototype.addListener=function(e,t){return l(this,e,t,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(e,t){return l(this,e,t,!0)},r.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},r.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},r.prototype.removeListener=function(e,t){var i,n,o,r,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(i=n[e]))return this;if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(o=-1,r=i.length-1;r>=0;r--)if(i[r]===t||i[r].listener===t){s=i[r].listener,o=r;break}if(o<0)return this;0===o?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,o),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},r.prototype.off=r.prototype.removeListener,r.prototype.removeAllListeners=function(e){var t,i,n;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var o,r=Object.keys(i);for(n=0;n<r.length;++n)"removeListener"!==(o=r[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},r.prototype.listeners=function(e){return d(this,e,!0)},r.prototype.rawListeners=function(e){return d(this,e,!1)},r.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},r.prototype.listenerCount=p,r.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},89(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DeferredPromise=class{constructor(){const e=new Promise(((e,t)=>{this._resolve=e,this._reject=t}));this._promise=e}get promise(){return this._promise}get resolve(){return this._resolve}get reject(){return this._reject}}},158(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});const n=i(89);async function o(e,t){let i=0;for(const n of e)await t(n,i,e),i++}async function r(e,t){await Promise.all(e.map(t))}function s(e,t,i){const o=new n.DeferredPromise,r=e.add(((...e)=>{t(...e)&&(r.remove(),o.resolve())}));return i&&i.catch((e=>{r.remove(),o.reject(e)})),a(o.promise)}function a(e){return e.catch((()=>{})),e}t.serialForEach=o,t.serialMap=async function(e,t){const i=[];return await o(e,(async(e,n,o)=>{i.push(await t(e,n,o))})),i},t.serialFilter=async function(e,t){const i=[];return await o(e,(async(e,n,o)=>{await t(e,n,o)&&i.push(e)})),i},t.parallelForEach=r,t.parallelMap=async function(e,t){const i=[];return await r(e,(async(e,n,o)=>{i[n]=await t(e,n,o)})),i},t.parallelFilter=async function(e,t){const i=[];return await r(e,(async(e,n,o)=>{i[n]=await t(e,n,o)})),e.filter(((e,t)=>i[t]))},t.withStrictTimeout=function(e,t,i){const n=new Promise(((t,n)=>setTimeout((()=>n(new Error(i))),e)));return a(Promise.race([n,t]))},t.withTimeout=function(e,t){const i=new Promise((t=>setTimeout((()=>t([!0,void 0])),e))),n=t.then((e=>[!1,e]));return Promise.race([i,n])},t.untilTrue=function(e,t,i){return t()?Promise.resolve():s(e,t,i)},t.untilSignal=s,t.allowReject=a},785(e,t,i){function n(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}Object.defineProperty(t,"__esModule",{value:!0}),n(i(158)),n(i(89))},471(e,t,i){var n=this&&this.__rest||function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.getEventRouter=t.eventEmitter=t.EventRouter=void 0;const o=i(7),r=i(902),s=i(349);class a{constructor(e){this._emitterProviders={},this._deserializers={},this._defaultEmitter=e}registerEmitterProvider(e,t){this._emitterProviders[e]=t}registerDeserializer(e,t){this._deserializers[e]=t}dispatchEvent(e){const{type:t,target:i}=e,o=n(e,["type","target"]);let a;if(!i)throw new Error("Invalid event, no target specified");if("default"===i)a=this._defaultEmitter;else{if(!this._emitterProviders[i.type])throw new Error(`Invalid target, no provider registered for '${i.type}'`);a=this._emitterProviders[i.type](i.id)}const c=Object.assign({type:t},o),l=this._deserializers[t];l?a.emit(t,l(c)):"notification-form-submitted"===t?function(e,t){let i=!1;e.preventDefault=()=>i=!0,t.emit("notification-form-submitted",e),i||(0,r.tryServiceDispatch)(s.APITopic.SET_FORM_STATUS_OPTIONS,{formStatus:"submitted",_notificationId:e.notification.id})}(c,a):a.emit(t,c)}}let c;t.EventRouter=a,t.eventEmitter=new o.EventEmitter,t.getEventRouter=function(){return c||(c=new a(t.eventEmitter)),c}},777(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ActionBodyClickType=t.ActionNoopType=t.ActionTrigger=void 0,(i=t.ActionTrigger||(t.ActionTrigger={})).CONTROL="control",i.SELECT="select",i.CLOSE="close",i.EXPIRE="expire",i.PROGRAMMATIC="programmatic",(t.ActionNoopType||(t.ActionNoopType={})).EVENT_DISMISS="event_dismiss",(t.ActionBodyClickType||(t.ActionBodyClickType={})).DISMISS_EVENT="dismiss_event"},578(e,t){Object.defineProperty(t,"__esModule",{value:!0})},902(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.setDispatchMethod=t.tryServiceDispatch=void 0,t.tryServiceDispatch=async(e,t)=>{throw new Error("Environment is not initialized..")},t.setDispatchMethod=e=>{t.tryServiceDispatch=e}},637(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.FieldType=void 0,t.FieldType={string:"string",number:"number",boolean:"boolean",date:"date",checkboxGroup:"checkboxGroup",radioGroup:"radioGroup",time:"time"}},2(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(637),t),o(i(155),t)},155(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetType=t.TimeWidgetType=t.DateWidgetType=t.RadioGroupWidgetType=t.CheckboxGroupWidgetType=t.BooleanWidgetType=t.NumberWidgetType=t.StringWidgetType=void 0,t.StringWidgetType={Text:"Text",Dropdown:"Dropdown"},t.NumberWidgetType={Number:"Number"},t.BooleanWidgetType={Toggle:"Toggle",Checkbox:"Checkbox"},t.CheckboxGroupWidgetType={CheckboxGroup:"CheckboxGroup"},t.RadioGroupWidgetType={RadioGroup:"RadioGroup"},t.DateWidgetType={Date:"Date"},t.TimeWidgetType={Time:"Time"},t.WidgetType=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t.StringWidgetType),t.NumberWidgetType),t.BooleanWidgetType),t.CheckboxGroupWidgetType),t.RadioGroupWidgetType),t.DateWidgetType),t.TimeWidgetType)},403(e,t){var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.IndicatorColor=t.IndicatorType=void 0,(n=t.IndicatorType||(t.IndicatorType={})).FAILURE="failure",n.WARNING="warning",n.SUCCESS="success",(i=t.IndicatorColor||(t.IndicatorColor={})).RED="red",i.GREEN="green",i.YELLOW="yellow",i.BLUE="blue",i.PURPLE="purple",i.GRAY="gray",i.ORANGE="orange",i.MAGENTA="magenta",i.TEAL="teal"},349(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.eventTypes=t.APITopic=t.getChannelName=t.SERVICE_CHANNEL=t.SERVICE_IDENTITY=void 0,t.SERVICE_IDENTITY={uuid:"notifications-service",name:"notifications-service"},t.SERVICE_CHANNEL="of-notifications-service-v1",t.getChannelName=e=>e===t.SERVICE_IDENTITY.uuid?t.SERVICE_CHANNEL:`${e}-${t.SERVICE_CHANNEL}`,(i=t.APITopic||(t.APITopic={})).CREATE_NOTIFICATION="create-notification",i.UPDATE_NOTIFICATION="update-notification",i.CLEAR_NOTIFICATION="clear-notification",i.SET_REMINDER="set-reminder",i.CANCEL_REMINDER="cancel-reminder",i.GET_APP_NOTIFICATIONS="fetch-app-notifications",i.CLEAR_APP_NOTIFICATIONS="clear-app-notifications",i.TOGGLE_NOTIFICATION_CENTER="toggle-notification-center",i.ADD_EVENT_LISTENER="add-event-listener",i.REMOVE_EVENT_LISTENER="remove-event-listener",i.GET_PROVIDER_STATUS="get-provider-status",i.GET_NOTIFICATIONS_COUNT="get-notifications-count",i.SHOW_NOTIFICATION_CENTER="show-notification-center",i.HIDE_NOTIFICATION_CENTER="hide-notification-center",i.REGISTER_PLATFORM="register-notifications-platform",i.DEREGISTER_PLATFORM="deregister-notifications-platform",i.SET_FORM_STATUS_OPTIONS="set-form-status-options",i.CLEAR_FORM_VALUES="clear-form-values",i.SET_FORM_VALIDATION_ERRORS="set-form-validation-errors",i.GET_USER_SETTINGS_STATUS="get-user-settings-status",i.SET_DEFAULT_PLATFORM_SHORTCUT="set-default-platform-shortcut",i.SET_SHORTCUT="set-shortcut",i.SET_NOTIFICATION_SECURITY_RULE="set-notification-security-rule",t.eventTypes=["notification-created","notification-closed","notification-action","notification-form-submitted","notification-form-values-changed","notifications-count-changed","notification-sound-toggled","notification-reminder-created","notification-reminder-removed","notification-toast-dismissed"]},405(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return o(t,e),t},s=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)},a=this&&this.__rest||function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.setAllowedOrigins=t.getUserSettingStatus=t.UserSettings=t.getNotificationsCount=t.hide=t.show=t.setShortcut=t.setDefaultPlatformShortcut=t.toggleNotificationCenter=t.clearAll=t.getAll=t.cancelReminder=t.setReminder=t.clear=t.update=t.create=t.removeEventListener=t.addEventListener=t.VERSION=t.NotificationIndicatorType=t.IndicatorColor=t.NotificationIndicatorWithCustomColor=t.NotificationIndicator=t.NotificationOptions=t.provider=t.actions=void 0;const c=i(777),l=i(902),u=i(349),f=i(471),d=r(i(217));t.provider=d;const p=i(855),h=i(403);Object.defineProperty(t,"NotificationIndicator",{enumerable:!0,get:function(){return h.NotificationIndicator}}),Object.defineProperty(t,"NotificationIndicatorWithCustomColor",{enumerable:!0,get:function(){return h.NotificationIndicatorWithCustomColor}}),Object.defineProperty(t,"NotificationIndicatorType",{enumerable:!0,get:function(){return h.IndicatorType}}),Object.defineProperty(t,"IndicatorColor",{enumerable:!0,get:function(){return h.IndicatorColor}});const T=i(965);Object.defineProperty(t,"NotificationOptions",{enumerable:!0,get:function(){return T.NotificationOptions}});const m=r(i(777));t.actions=m,s(i(777),t),s(i(578),t),s(i(93),t),s(i(2),t),s(i(520),t),s(i(96),t),s(i(470),t),t.VERSION="45.1.0-alpha-4882";const v=(0,f.getEventRouter)();function E(e){const{notification:t}=e;return Object.assign(Object.assign({},e),{notification:Object.assign(Object.assign({},t),{date:new Date(t.date),expires:null!==t.expires?new Date(t.expires):null})})}v.registerDeserializer("notification-created",(e=>E(e))),v.registerDeserializer("notification-toast-dismissed",(e=>E(e))),v.registerDeserializer("notification-closed",(e=>E(e))),v.registerDeserializer("notification-action",(e=>{var t;const i=E(e),{controlSource:n,controlIndex:o}=i,r=a(i,["controlSource","controlIndex"]);return e.trigger===c.ActionTrigger.CONTROL?Object.assign(Object.assign({},r),{control:null===(t=e.notification[n])||void 0===t?void 0:t[o]}):r})),v.registerDeserializer("notifications-count-changed",(e=>e)),v.registerDeserializer("notification-reminder-created",(e=>{const t=E(e),{reminderDate:i}=t,n=a(t,["reminderDate"]);return Object.assign(Object.assign({},n),{reminderDate:new Date(i)})})),v.registerDeserializer("notification-reminder-removed",(e=>E(e))),v.registerDeserializer("notification-sound-toggled",(e=>e)),t.addEventListener=async function(e,t){(0,p.validateEnvironment)(),e=(0,p.sanitizeEventType)(e),t=(0,p.sanitizeFunction)(t);const i=f.eventEmitter.listenerCount(e);"notification-form-submitted"===e&&(t=function(e){return t=>{const i=t.notification.id;t.setFormStatus=e=>(0,l.tryServiceDispatch)(u.APITopic.SET_FORM_STATUS_OPTIONS,Object.assign(Object.assign({},e),{_notificationId:i})),t.clearForm=()=>(0,l.tryServiceDispatch)(u.APITopic.CLEAR_FORM_VALUES,{_notificationId:i}),e(t)}}(t)),"notification-form-values-changed"===e&&(t=function(e){return t=>{t.setErrors=e=>(0,l.tryServiceDispatch)(u.APITopic.SET_FORM_VALIDATION_ERRORS,{errors:e,notificationId:t.notification.id}),e(t)}}(t)),f.eventEmitter.addListener(e,t),0===i&&1===f.eventEmitter.listenerCount(e)&&await(0,l.tryServiceDispatch)(u.APITopic.ADD_EVENT_LISTENER,e)},t.removeEventListener=async function(e,t){(0,p.validateEnvironment)(),e=(0,p.sanitizeEventType)(e),t=(0,p.sanitizeFunction)(t),1===f.eventEmitter.listenerCount(e)&&f.eventEmitter.listeners(e)[0]===t&&await(0,l.tryServiceDispatch)(u.APITopic.REMOVE_EVENT_LISTENER,e),f.eventEmitter.removeListener(e,t)},t.create=async function(e,t){if("object"!=typeof e||null===e)throw new Error("Invalid argument passed to create: argument must be an object and must not be null");if(void 0!==e.date&&!(e.date instanceof Date))throw new Error('Invalid argument passed to create: "date" must be a valid Date object');if(void 0!==e.expires&&null!==e.expires&&!(e.expires instanceof Date))throw new Error('Invalid argument passed to create: "expires" must be null or a valid Date object');if(t&&t.reminderDate){if(!1===e.allowReminder)throw new Error('You must not specify a reminder date for a notification with "allowReminder" option set to false.');if(!(t.reminderDate instanceof Date))throw new Error('Invalid argument passed to reminder Options: "date" must a valid Date object');if(e.expires&&e.expires.getTime()<t.reminderDate.getTime())throw new Error("Expiration date must not be earlier than reminder date.")}void 0!==e.category&&null!==e.category||(e.category="default");const i=await(0,l.tryServiceDispatch)(u.APITopic.CREATE_NOTIFICATION,Object.assign(Object.assign({},e),{date:e.date&&e.date.getTime(),expires:e.expires&&e.expires.getTime(),reminder:(null==t?void 0:t.reminderDate)&&t.reminderDate.getTime()}));return Object.assign(Object.assign({},i),{date:new Date(i.date),expires:null!==i.expires?new Date(i.expires):null})},t.update=async function(e){if("object"!=typeof e||null===e)throw new Error("Invalid argument passed to create: argument must be an object and must not be null");if(!e.id)throw new Error('Invalid argument passed to create: "id" must be Id of previously created Notification');const t=await(0,l.tryServiceDispatch)(u.APITopic.UPDATE_NOTIFICATION,Object.assign({},e));return Object.assign({},t)},t.clear=async function(e){return(0,l.tryServiceDispatch)(u.APITopic.CLEAR_NOTIFICATION,{id:e})},t.setReminder=async function(e,t){if(!(t instanceof Date))throw new Error('Invalid argument passed to setReminder: "reminderDate" must a valid Date object');if(t.getTime()<Date.now())throw new Error('Invalid argument passed to setReminder: "reminderDate" was set to a Date in the past, must be a Date in the future.');const i=await(0,l.tryServiceDispatch)(u.APITopic.SET_REMINDER,{id:e,reminder:t.getTime()});return i?console.log(`[Client::setReminder] Reminder set for notification: ${e}`):console.log(`[Client::setReminder] Notification not found for id: ${e}`),i},t.cancelReminder=async function(e){const t=await(0,l.tryServiceDispatch)(u.APITopic.CANCEL_REMINDER,{id:e});return t?console.log(`[Client::cancelReminder] Reminder canceled for notification: ${e}`):console.log(`[Client::cancelReminder] Notification not found for id: ${e}`),t},t.getAll=async function(){return(await(0,l.tryServiceDispatch)(u.APITopic.GET_APP_NOTIFICATIONS,void 0)).map((e=>Object.assign(Object.assign({},e),{indicator:e.indicator||null,date:new Date(e.date),expires:null!==e.expires?new Date(e.expires):null})))},t.clearAll=async function(){return(0,l.tryServiceDispatch)(u.APITopic.CLEAR_APP_NOTIFICATIONS,void 0)},t.toggleNotificationCenter=async function(){return(0,l.tryServiceDispatch)(u.APITopic.TOGGLE_NOTIFICATION_CENTER,void 0)},t.setDefaultPlatformShortcut=function(e){return(0,l.tryServiceDispatch)(u.APITopic.SET_DEFAULT_PLATFORM_SHORTCUT,e)},t.setShortcut=function(e){return(0,l.tryServiceDispatch)(u.APITopic.SET_SHORTCUT,e)},t.show=async function(e){return(0,l.tryServiceDispatch)(u.APITopic.SHOW_NOTIFICATION_CENTER,e)},t.hide=async function(){return(0,l.tryServiceDispatch)(u.APITopic.HIDE_NOTIFICATION_CENTER,void 0)},t.getNotificationsCount=async function(){return(0,l.tryServiceDispatch)(u.APITopic.GET_NOTIFICATIONS_COUNT,void 0)},(t.UserSettings||(t.UserSettings={})).SOUND_ENABLED="soundEnabled",t.getUserSettingStatus=async function(e){return(0,l.tryServiceDispatch)(u.APITopic.GET_USER_SETTINGS_STATUS,e)},t.setAllowedOrigins=async e=>(0,l.tryServiceDispatch)(u.APITopic.SET_NOTIFICATION_SECURITY_RULE,{allowedOrigins:e})},217(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isConnectedToAtLeast=t.getStatus=void 0;const o=n(i(284)),r=i(785),s=i(902),a=i(349);function c(){return(0,r.withStrictTimeout)(500,(0,s.tryServiceDispatch)(a.APITopic.GET_PROVIDER_STATUS,void 0),"").catch((()=>({connected:!1,version:null,templateAPIVersion:null})))}t.getStatus=c,t.isConnectedToAtLeast=async function(e){const t=await c();if(t.connected&&null!==t.version){const i=(0,o.default)(t.version,e);if(0===i||1===i)return!0}return!1}},520(e,t){Object.defineProperty(t,"__esModule",{value:!0})},93(e,t){Object.defineProperty(t,"__esModule",{value:!0})},96(e,t){Object.defineProperty(t,"__esModule",{value:!0})},134(e,t){Object.defineProperty(t,"__esModule",{value:!0})},468(e,t){Object.defineProperty(t,"__esModule",{value:!0})},470(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(134),t),o(i(468),t),o(i(965),t),o(i(929),t)},965(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateFragmentNames=t.PresentationTemplateFragmentNames=t.ContainerTemplateFragmentNames=t.TemplateNames=void 0,t.TemplateNames={markdown:"markdown",list:"list",custom:"custom"},t.ContainerTemplateFragmentNames={container:"container"},t.PresentationTemplateFragmentNames={text:"text",image:"image",list:"list",actionableText:"actionableText"},t.TemplateFragmentNames=Object.assign(Object.assign({},t.ContainerTemplateFragmentNames),t.PresentationTemplateFragmentNames)},929(e,t){Object.defineProperty(t,"__esModule",{value:!0})},855(e,t){function i(e,t){let i;try{i=JSON.stringify(e)}catch(e){i=t}return i}Object.defineProperty(t,"__esModule",{value:!0}),t.setValidationMethod=t.validateEnvironment=t.safeStringify=t.sanitizeEventType=t.sanitizeFunction=void 0,t.sanitizeFunction=function(e){if("function"!=typeof e)throw new Error(`Invalid argument passed: ${i(e,"The provided value")} is not a valid function`);return e},t.sanitizeEventType=function(e){if("notification-action"===e||"notification-created"===e||"notification-toast-dismissed"===e||"notification-closed"===e||"notifications-count-changed"===e||"notification-form-submitted"===e||"notification-reminder-created"===e||"notification-reminder-removed"===e||"notification-form-values-changed"===e||"notification-sound-toggled"===e)return e;throw new Error(`Invalid argument passed: ${i(e,"The provided event type")} is not a valid Notifications event type`)},t.safeStringify=i,t.validateEnvironment=()=>{throw new Error("fin is not defined. The notifications module is only intended for use in an OpenFin application.")},t.setValidationMethod=e=>{t.validateEnvironment=e}},32(e,t,i){var n,o,r,s,a,c,l,u,f,d,p,h,T,m,v,E,I,_,g,O,y,A,w,N,b,P,R,S,C,D,j,L,M,F,x,U=this&&this.__classPrivateFieldGet||function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)},W=this&&this.__classPrivateFieldSet||function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,i):o?o.value=i:t.set(e,i),i};Object.defineProperty(t,"__esModule",{value:!0}),t.APIRouter=t.UpdatableNotificationOptions=t.NotificationOptions=t.API=t.APITopic=t.show=t.cancelReminder=t.setReminder=t.getAll=t.clearAll=t.clear=t.update=t.create=void 0;const G=i(242),k=i(349);Object.defineProperty(t,"API",{enumerable:!0,get:function(){return k.API}}),Object.defineProperty(t,"APITopic",{enumerable:!0,get:function(){return k.APITopic}});const V=i(470);Object.defineProperty(t,"NotificationOptions",{enumerable:!0,get:function(){return V.NotificationOptions}}),Object.defineProperty(t,"UpdatableNotificationOptions",{enumerable:!0,get:function(){return V.UpdatableNotificationOptions}});const $=i(902);var z=i(405);Object.defineProperty(t,"create",{enumerable:!0,get:function(){return z.create}}),Object.defineProperty(t,"update",{enumerable:!0,get:function(){return z.update}}),Object.defineProperty(t,"clear",{enumerable:!0,get:function(){return z.clear}}),Object.defineProperty(t,"clearAll",{enumerable:!0,get:function(){return z.clearAll}}),Object.defineProperty(t,"getAll",{enumerable:!0,get:function(){return z.getAll}}),Object.defineProperty(t,"setReminder",{enumerable:!0,get:function(){return z.setReminder}}),Object.defineProperty(t,"cancelReminder",{enumerable:!0,get:function(){return z.cancelReminder}}),Object.defineProperty(t,"show",{enumerable:!0,get:function(){return z.show}});class H extends Error{constructor(e){super(e),this.name="IdentityError"}}t.APIRouter=class{constructor(e){var t,i;n.add(this),o.set(this,void 0),r.set(this,null),s.set(this,void 0),a.set(this,void 0),c.set(this,void 0),l.set(this,void 0),u.set(this,new Map),f.set(this,new Map),d.set(this,new Set),p.set(this,void 0),h.set(this,void 0),T.set(this,void 0),m.set(this,void 0),v.set(this,void 0),E.set(this,!1),this.onConnection=new G.Signal,this.onDisconnection=new G.Signal,(0,$.setDispatchMethod)(U(this,n,"m",g).bind(this)),U(this,n,"m",L).call(this,e),W(this,a,e.providerChannelName,"f"),W(this,s,(null==e?void 0:e.overrides)||{},"f"),W(this,v,e.customManifest,"f"),W(this,c,U(this,v,"f")?`${U(this,v,"f").manifestUuid}-${k.SERVICE_CHANNEL}`:k.SERVICE_CHANNEL,"f"),W(this,p,e.onWakeUpRequired,"f"),W(this,h,e.onNotificationCenterEvent,"f"),W(this,m,null===(t=e.routerCTAConfig)||void 0===t?void 0:t.routerCTAContentId,"f"),W(this,T,null===(i=e.routerCTAConfig)||void 0===i?void 0:i.onRouterCTAEvent,"f"),console.log(`[Notifications Router] Router launched with provider channel: ${U(this,a,"f")} and target channel: ${U(this,c,"f")}`),console.log("Custom manifest: ",U(this,v,"f")),W(this,l,{[k.APITopic.CREATE_NOTIFICATION]:U(this,n,"m",y).call(this,k.APITopic.CREATE_NOTIFICATION),[k.APITopic.UPDATE_NOTIFICATION]:U(this,n,"m",y).call(this,k.APITopic.UPDATE_NOTIFICATION),[k.APITopic.CLEAR_NOTIFICATION]:U(this,n,"m",y).call(this,k.APITopic.CLEAR_NOTIFICATION),[k.APITopic.SET_REMINDER]:U(this,n,"m",y).call(this,k.APITopic.SET_REMINDER),[k.APITopic.CANCEL_REMINDER]:U(this,n,"m",y).call(this,k.APITopic.CANCEL_REMINDER),[k.APITopic.CLEAR_APP_NOTIFICATIONS]:U(this,n,"m",y).call(this,k.APITopic.CLEAR_APP_NOTIFICATIONS),[k.APITopic.TOGGLE_NOTIFICATION_CENTER]:U(this,n,"m",y).call(this,k.APITopic.TOGGLE_NOTIFICATION_CENTER),[k.APITopic.SHOW_NOTIFICATION_CENTER]:U(this,n,"m",y).call(this,k.APITopic.SHOW_NOTIFICATION_CENTER),[k.APITopic.HIDE_NOTIFICATION_CENTER]:U(this,n,"m",y).call(this,k.APITopic.HIDE_NOTIFICATION_CENTER),[k.APITopic.GET_NOTIFICATIONS_COUNT]:U(this,n,"m",y).call(this,k.APITopic.GET_NOTIFICATIONS_COUNT),[k.APITopic.GET_APP_NOTIFICATIONS]:U(this,n,"m",y).call(this,k.APITopic.GET_APP_NOTIFICATIONS),[k.APITopic.GET_PROVIDER_STATUS]:U(this,n,"m",y).call(this,k.APITopic.GET_PROVIDER_STATUS),[k.APITopic.SET_FORM_STATUS_OPTIONS]:U(this,n,"m",y).call(this,k.APITopic.SET_FORM_STATUS_OPTIONS),[k.APITopic.CLEAR_FORM_VALUES]:U(this,n,"m",y).call(this,k.APITopic.CLEAR_FORM_VALUES),[k.APITopic.SET_FORM_VALIDATION_ERRORS]:U(this,n,"m",y).call(this,k.APITopic.SET_FORM_VALIDATION_ERRORS),[k.APITopic.GET_USER_SETTINGS_STATUS]:U(this,n,"m",y).call(this,k.APITopic.GET_USER_SETTINGS_STATUS),[k.APITopic.SET_DEFAULT_PLATFORM_SHORTCUT]:U(this,n,"m",y).call(this,k.APITopic.SET_DEFAULT_PLATFORM_SHORTCUT),[k.APITopic.SET_SHORTCUT]:U(this,n,"m",y).call(this,k.APITopic.SET_SHORTCUT),[k.APITopic.SET_NOTIFICATION_SECURITY_RULE]:U(this,n,"m",y).call(this,k.APITopic.SET_NOTIFICATION_SECURITY_RULE),[k.APITopic.ADD_EVENT_LISTENER]:U(this,n,"m",A).call(this),[k.APITopic.REMOVE_EVENT_LISTENER]:U(this,n,"m",w).call(this),[k.APITopic.REGISTER_PLATFORM]:U(this,n,"m",y).call(this,k.APITopic.REGISTER_PLATFORM),[k.APITopic.DEREGISTER_PLATFORM]:U(this,n,"m",y).call(this,k.APITopic.DEREGISTER_PLATFORM)},"f")}async initialize(){W(this,o,await fin.InterApplicationBus.Channel.create(U(this,a,"f")),"f"),U(this,o,"f").onConnection(U(this,n,"m",C).bind(this)),U(this,o,"f").onDisconnection(U(this,n,"m",D).bind(this));for(const e in U(this,l,"f"))Object.hasOwnProperty.call(U(this,l,"f"),e)&&U(this,o,"f").register(e,U(this,l,"f")[e]);await U(this,n,"m",x).call(this)}setShuttingDown(){W(this,E,!0,"f")}},o=new WeakMap,r=new WeakMap,s=new WeakMap,a=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,f=new WeakMap,d=new WeakMap,p=new WeakMap,h=new WeakMap,T=new WeakMap,m=new WeakMap,v=new WeakMap,E=new WeakMap,n=new WeakSet,I=function(e){return U(this,d,"f").has(e.name)},_=async function(e,t){var i;const n=t.notification,r=null==n?void 0:n.contentId;return(null==n?void 0:n.contentId)&&delete n.contentId,null===(i=U(this,h,"f"))||void 0===i||i.call(this,t,r),U(this,o,"f").dispatch(e,"event",t)},g=async function(e,t){return(await U(this,r,"f")).dispatch(e,t)},O=async function(e){var t,i;const o=e.type;if("notifications-count-changed"===o||"notification-sound-toggled"===o){const t=[];U(this,u,"f").forEach(((e,i)=>{e.has(o)&&t.push(i)}));for(const i of t){const t={uuid:fin.me.uuid,name:i};U(this,n,"m",I).call(this,t)&&U(this,n,"m",_).call(this,t,e)}}else{const r=e.notification,s=null==r?void 0:r.contentId;if(U(this,m,"f")&&s===U(this,m,"f"))return null===(t=U(this,T,"f"))||void 0===t?void 0:t.call(this,e);if(s){const t={uuid:fin.me.uuid,name:s};if(!U(this,n,"m",I).call(this,t))return U(this,n,"m",b).call(this,s,e.type,e),U(this,p,"f").call(this,s,e.type);if(null===(i=U(this,u,"f").get(s))||void 0===i?void 0:i.has(o))return U(this,n,"m",_).call(this,t,e)}else console.warn(`[Notifications Router] Received event without contentId: ${o}. This event will be ignored.`)}},y=function(e){return async(t,i)=>{U(this,n,"m",j).call(this,i);let o=t;const r=U(this,s,"f")[e];if(r&&(o=await r(t)),e===k.APITopic.CREATE_NOTIFICATION){const e=o;o=U(this,n,"m",N).call(this,e,i.name)}return await U(this,n,"m",g).call(this,e,o)}},A=function(){return async(e,t)=>{U(this,n,"m",j).call(this,t);const i=t.name,o=e;U(this,n,"m",R).call(this,i,o);const r=U(this,n,"m",P).call(this,i,o);for(const e of r)U(this,n,"m",_).call(this,t,e)}},w=function(){return async(e,t)=>{U(this,n,"m",j).call(this,t),U(this,n,"m",S).call(this,t.name,e)}},N=function(e,t){return Object.assign(Object.assign({},e),{contentId:t})},b=function(e,t,i){const n=U(this,f,"f").get(e)||new Map,o=n.get(t)||[];o.push(i),n.set(t,o),U(this,f,"f").set(e,n)},P=function(e,t){const i=U(this,f,"f").get(e);return i&&i.get(t)||[]},R=function(e,t){const i=U(this,u,"f").get(e)||new Set;i.add(t),U(this,u,"f").set(e,i)},S=function(e,t){const i=U(this,u,"f").get(e)||new Set;i.delete(t),U(this,u,"f").set(e,i)},C=function(e,t){e.uuid===fin.me.uuid?(t&&t.version&&t.version.length>0?console.log(`[Notifications Router] Connection from client: ${e.name}, version: ${t.version}`):console.log(`[Notifications Router] Connection from client: ${e.name}, unable to determine version`),setTimeout((()=>{this.onConnection.emit(e)})),U(this,d,"f").add(e.name)):console.warn(`[Notifications Router] Connection attempt from client with different uuid: ${e.uuid}. This connection will be rejected.`)},D=function(e){console.log(`[Notifications Router] Disconnection from client: ${e.name}`),e.uuid===fin.me.uuid&&(U(this,u,"f").delete(e.name),this.onDisconnection.emit(e),U(this,d,"f").delete(e.name))},j=function(e){if(e.uuid!==fin.me.uuid)throw new H("[Notifications Router] Access denied: The router will only serve clients running under the same platform.")},L=function(e){const{providerChannelName:t,onWakeUpRequired:i,customManifest:n}=e;if(!t)throw new Error("API Router provider channel name must be provided and cannot be an empty string.");if(n){if(!n.manifestUrl)throw new Error("When a custom manifest is provided, a valid manifest URL must be specified.");if(!n.manifestUuid)throw new Error("When a custom manifest is provided, a valid manifest UUID must be specified.")}if("function"!=typeof i)throw new Error("onWakeUpRequired callback must be provided and be a function.");if(e.routerCTAConfig){if(!e.routerCTAConfig.routerCTAContentId)throw new Error("When a router CTA config is provided, a valid router CTA content ID must be specified.");if("function"!=typeof e.routerCTAConfig.onRouterCTAEvent)throw new Error("When a router CTA config is provided, a valid onRouterCTAEvent callback function must be specified.")}},M=async function(){var e,t;const i=null!==(t=null===(e=U(this,v,"f"))||void 0===e?void 0:e.manifestUrl)&&void 0!==t?t:"fins://system-apps/notification-center",n=window.navigator.userAgent.toLowerCase().includes("windows");console.log(`[Notifications Router] Launching Notification Center with manifest URL: ${i}`);try{n?await fin.System.launchManifest(i,{noUi:!0}):await fin.System.openUrlWithBrowser(i)}catch(e){throw e instanceof Error?console.error(`[Notifications Router] Failed to launch Notifications - ${e.name}: ${e.message}`):console.error(`[Notifications Router] Failed to launch Notifications - ${JSON.stringify(e)}`),e}},F=async function(){try{if(U(this,r,"f"))return;console.log(`[Notifications Router] Router connecting to Notification Center on channel: ${U(this,c,"f")}`),W(this,r,fin.InterApplicationBus.Channel.connect(U(this,c,"f"),{wait:!0,payload:{version:"45.1.0-alpha-4882"}}),"f"),U(this,r,"f").catch((e=>{W(this,r,null,"f")}));const e=await U(this,r,"f");e.setDefaultAction((()=>!1)),e.register("event",U(this,n,"m",O).bind(this)),e.register("WARN",(e=>console.warn(e))),e.onDisconnection((()=>{U(this,E,"f")||U(this,n,"m",x).call(this)})),k.eventTypes.forEach((t=>{e.dispatch(k.APITopic.ADD_EVENT_LISTENER,t)})),console.log("[Notifications Router] Router successfully connected to Notification Center")}catch(e){throw e instanceof Error?console.error(`[Notifications Router] Failed to connect to Notifications - ${e.name}: ${e.message}`):console.error(`Failed to connect to Notifications - ${JSON.stringify(e)}`),e}},x=async function(){W(this,r,null,"f"),await U(this,n,"m",M).call(this),await U(this,n,"m",F).call(this)}},242(e,t){var i,n,o,r,s=this&&this.__classPrivateFieldSet||function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,i):o?o.value=i:t.set(e,i),i},a=this&&this.__classPrivateFieldGet||function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.Signal=t.Aggregators=void 0,t.Aggregators=class{static ARRAY(e){return e}static AWAIT(e){return Promise.all(e)}static async AWAIT_VOID(e){await Promise.all(e)}},t.Signal=class{constructor(e){i.add(this),n.set(this,void 0),o.set(this,void 0),s(this,n,[],"f"),s(this,o,e||null,"f")}get slots(){return a(this,n,"f")}add(e,t){const o={callback:e,context:t,remove:()=>a(this,i,"m",r).call(this,o)};return a(this,n,"f").push(o),o}remove(e,t){const i=a(this,n,"f").findIndex((i=>i.callback===e&&i.context===t));return i>=0&&(a(this,n,"f").splice(i,1),!0)}has(e,t){return a(this,n,"f").findIndex((i=>i.callback===e&&i.context===t))>=0}emit(...e){const t=a(this,n,"f").slice();return a(this,o,"f")?a(this,o,"f").call(this,t.map((t=>t.callback.apply(t.context,e)))):void t.forEach((t=>t.callback.apply(t.context,e)))}},n=new WeakMap,o=new WeakMap,i=new WeakSet,r=function(e){const t=a(this,n,"f").indexOf(e);t>=0&&a(this,n,"f").splice(t,1)}},284(e){e.exports=require("semver-compare")}},t={},i=function i(n){var o=t[n];if(void 0!==o)return o.exports;var r=t[n]={exports:{}};return e[n].call(r.exports,r,r.exports,i),r.exports}(32);module.exports=i})();
|
package/dist/template.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"startup_app": {
|
|
6
6
|
"name": "Notifications-Service",
|
|
7
7
|
"description": "OpenFin Notification Center",
|
|
8
|
-
"url": "https://workspace.openfin.co/release/system-apps/notification-center/45.1.0-alpha-
|
|
8
|
+
"url": "https://workspace.openfin.co/release/system-apps/notification-center/45.1.0-alpha-4882/provider.html",
|
|
9
9
|
"uuid": "<your-unique-notification-center-uuid-goes-here>",
|
|
10
10
|
"backgroundThrottling": false,
|
|
11
11
|
"autoShow": false,
|
package/package.json
CHANGED