(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5078],{23113:function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"}},75703:function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"}},2212:function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"}},57815:function(e,n,l){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;let c=_interopRequireDefault(l(92589));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}n.default=c,e.exports=c},47450:function(e,n,l){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;let c=_interopRequireDefault(l(38241));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}n.default=c,e.exports=c},19607:function(e,n,l){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;let c=_interopRequireDefault(l(60501));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}n.default=c,e.exports=c},92589:function(e,n,l){"use strict";var c=l(18864).default,d=l(74698).default;Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var f=d(l(41029)),y=c(l(11798)),g=d(l(23113)),b=d(l(72994)),N=y.forwardRef(function(e,n){return y.createElement(b.default,(0,f.default)({},e,{ref:n,icon:g.default}))});n.default=N},38241:function(e,n,l){"use strict";var c=l(18864).default,d=l(74698).default;Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var f=d(l(41029)),y=c(l(11798)),g=d(l(75703)),b=d(l(72994)),N=y.forwardRef(function(e,n){return y.createElement(b.default,(0,f.default)({},e,{ref:n,icon:g.default}))});n.default=N},60501:function(e,n,l){"use strict";var c=l(18864).default,d=l(74698).default;Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var f=d(l(41029)),y=c(l(11798)),g=d(l(2212)),b=d(l(72994)),N=y.forwardRef(function(e,n){return y.createElement(b.default,(0,f.default)({},e,{ref:n,icon:g.default}))});n.default=N},54541:function(e,n,l){"use strict";let c,d;l.d(n,{w:function(){return NovuProvider}});var f,y,g,b,N,k,S,A,E,R,w,O,_,C,P,x,B,U,L,F,K,Q,z,H,V,Y,X,et,ei,es,en,er,ea,eo,el,ec,eu,ed,eh,ep,ef,ey,em,eg,ev,eb,eN,ek,eS,eA,eE,eR,ew,eO,e_,eI,eC,eP,eT,ex,eM,eB,eq,eU,eD,eL,eF,ej,eK,eQ,ez,eG,eH,eW,eV,eY,eZ,e$,eX,eJ,e0,e1,e4,e2,e6,e8,e3,e9,e5,e7,te,tt,ti,ts,tn,tr,ta,to,tl,tc,tu,td,th,tp,tf,ty,tm,tg,tv,tb,tN,tk,tS,tA,tE,tR,tw,tO,t_,tI={};l.r(tI),l.d(tI,{Decoder:function(){return Decoder},Encoder:function(){return Encoder},PacketType:function(){return t_},protocol:function(){return sC}});var tC=l(11798);let tP="undefined"==typeof window||"Deno"in window;function noop(){}function functionalUpdate(e,n){return"function"==typeof e?e(n):e}function isValidTimeout(e){return"number"==typeof e&&e>=0&&e!==1/0}function timeUntilStale(e,n){return Math.max(e+(n||0)-Date.now(),0)}function parseQueryArgs(e,n,l){return isQueryKey(e)?"function"==typeof n?{...l,queryKey:e,queryFn:n}:{...n,queryKey:e}:e}function parseMutationArgs(e,n,l){return isQueryKey(e)?"function"==typeof n?{...l,mutationKey:e,mutationFn:n}:{...n,mutationKey:e}:"function"==typeof e?{...n,mutationFn:e}:{...e}}function parseFilterArgs(e,n,l){return isQueryKey(e)?[{...n,queryKey:e},l]:[e||{},n]}function matchQuery(e,n){let{type:l="all",exact:c,fetchStatus:d,predicate:f,queryKey:y,stale:g}=e;if(isQueryKey(y)){if(c){if(n.queryHash!==hashQueryKeyByOptions(y,n.options))return!1}else{if(!partialDeepEqual(n.queryKey,y))return!1}}if("all"!==l){let e=n.isActive();if("active"===l&&!e||"inactive"===l&&e)return!1}return("boolean"!=typeof g||n.isStale()===g)&&(void 0===d||d===n.state.fetchStatus)&&(!f||!!f(n))}function matchMutation(e,n){let{exact:l,fetching:c,predicate:d,mutationKey:f}=e;if(isQueryKey(f)){if(!n.options.mutationKey)return!1;if(l){if(hashQueryKey(n.options.mutationKey)!==hashQueryKey(f))return!1}else{if(!partialDeepEqual(n.options.mutationKey,f))return!1}}return("boolean"!=typeof c||"loading"===n.state.status===c)&&(!d||!!d(n))}function hashQueryKeyByOptions(e,n){let l=(null==n?void 0:n.queryKeyHashFn)||hashQueryKey;return l(e)}function hashQueryKey(e){return JSON.stringify(e,(e,n)=>isPlainObject(n)?Object.keys(n).sort().reduce((e,l)=>(e[l]=n[l],e),{}):n)}function partialDeepEqual(e,n){return e===n||typeof e==typeof n&&!!e&&!!n&&"object"==typeof e&&"object"==typeof n&&!Object.keys(n).some(l=>!partialDeepEqual(e[l],n[l]))}function replaceEqualDeep(e,n){if(e===n)return e;let l=isPlainArray(e)&&isPlainArray(n);if(l||isPlainObject(e)&&isPlainObject(n)){let c=l?e.length:Object.keys(e).length,d=l?n:Object.keys(n),f=d.length,y=l?[]:{},g=0;for(let c=0;c<f;c++){let f=l?c:d[c];y[f]=replaceEqualDeep(e[f],n[f]),y[f]===e[f]&&g++}return c===f&&g===c?e:y}return n}function shallowEqualObjects(e,n){if(e&&!n||n&&!e)return!1;for(let l in e)if(e[l]!==n[l])return!1;return!0}function isPlainArray(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function isPlainObject(e){if(!hasObjectPrototype(e))return!1;let n=e.constructor;if(void 0===n)return!0;let l=n.prototype;return!!(hasObjectPrototype(l)&&l.hasOwnProperty("isPrototypeOf"))}function hasObjectPrototype(e){return"[object Object]"===Object.prototype.toString.call(e)}function isQueryKey(e){return Array.isArray(e)}function sleep(e){return new Promise(n=>{setTimeout(n,e)})}function scheduleMicrotask(e){sleep(0).then(e)}function getAbortController(){if("function"==typeof AbortController)return new AbortController}function replaceData(e,n,l){return null!=l.isDataEqual&&l.isDataEqual(e,n)?e:"function"==typeof l.structuralSharing?l.structuralSharing(e,n):!1!==l.structuralSharing?replaceEqualDeep(e,n):n}let tT=console;function createNotifyManager(){let e=[],n=0,notifyFn=e=>{e()},batchNotifyFn=e=>{e()},schedule=l=>{n?e.push(l):scheduleMicrotask(()=>{notifyFn(l)})},flush=()=>{let n=e;e=[],n.length&&scheduleMicrotask(()=>{batchNotifyFn(()=>{n.forEach(e=>{notifyFn(e)})})})};return{batch:e=>{let l;n++;try{l=e()}finally{--n||flush()}return l},batchCalls:e=>(...n)=>{schedule(()=>{e(...n)})},schedule,setNotifyFunction:e=>{notifyFn=e},setBatchNotifyFunction:e=>{batchNotifyFn=e}}}let tx=createNotifyManager();let Subscribable=class Subscribable{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){let n={listener:e};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};let FocusManager=class FocusManager extends Subscribable{constructor(){super(),this.setup=e=>{if(!tP&&window.addEventListener){let listener=()=>e();return window.addEventListener("visibilitychange",listener,!1),window.addEventListener("focus",listener,!1),()=>{window.removeEventListener("visibilitychange",listener),window.removeEventListener("focus",listener)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.cleanup)||e.call(this),this.cleanup=void 0}}setEventListener(e){var n;this.setup=e,null==(n=this.cleanup)||n.call(this),this.cleanup=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){let n=this.focused!==e;n&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)}};let tM=new FocusManager,tB=["online","offline"];let OnlineManager=class OnlineManager extends Subscribable{constructor(){super(),this.setup=e=>{if(!tP&&window.addEventListener){let listener=()=>e();return tB.forEach(e=>{window.addEventListener(e,listener,!1)}),()=>{tB.forEach(e=>{window.removeEventListener(e,listener)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.cleanup)||e.call(this),this.cleanup=void 0}}setEventListener(e){var n;this.setup=e,null==(n=this.cleanup)||n.call(this),this.cleanup=e(e=>{"boolean"==typeof e?this.setOnline(e):this.onOnline()})}setOnline(e){let n=this.online!==e;n&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine}};let tq=new OnlineManager;function defaultRetryDelay(e){return Math.min(1e3*2**e,3e4)}function canFetch(e){return(null!=e?e:"online")!=="online"||tq.isOnline()}let CancelledError=class CancelledError{constructor(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}};function isCancelledError(e){return e instanceof CancelledError}function createRetryer(e){let n,l,c,d=!1,f=0,y=!1,g=new Promise((e,n)=>{l=e,c=n}),shouldPause=()=>!tM.isFocused()||"always"!==e.networkMode&&!tq.isOnline(),resolve=c=>{y||(y=!0,null==e.onSuccess||e.onSuccess(c),null==n||n(),l(c))},reject=l=>{y||(y=!0,null==e.onError||e.onError(l),null==n||n(),c(l))},pause=()=>new Promise(l=>{n=e=>{let n=y||!shouldPause();return n&&l(e),n},null==e.onPause||e.onPause()}).then(()=>{n=void 0,y||null==e.onContinue||e.onContinue()}),run=()=>{let n;if(!y){try{n=e.fn()}catch(e){n=Promise.reject(e)}Promise.resolve(n).then(resolve).catch(n=>{var l,c;if(y)return;let g=null!=(l=e.retry)?l:3,b=null!=(c=e.retryDelay)?c:defaultRetryDelay,N="function"==typeof b?b(f,n):b,k=!0===g||"number"==typeof g&&f<g||"function"==typeof g&&g(f,n);if(d||!k){reject(n);return}f++,null==e.onFail||e.onFail(f,n),sleep(N).then(()=>{if(shouldPause())return pause()}).then(()=>{d?reject(n):run()})})}};return canFetch(e.networkMode)?run():pause().then(run),{promise:g,cancel:n=>{y||(reject(new CancelledError(n)),null==e.abort||e.abort())},continue:()=>{let e=null==n?void 0:n();return e?g:Promise.resolve()},cancelRetry:()=>{d=!0},continueRetry:()=>{d=!1}}}let Removable=class Removable{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),isValidTimeout(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,null!=e?e:tP?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}};let Query=class Query extends Removable{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||tT,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||getDefaultState(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.cache.remove(this)}setData(e,n){let l=replaceData(this.state.data,e,this.options);return this.dispatch({data:l,type:"success",dataUpdatedAt:null==n?void 0:n.updatedAt,manual:null==n?void 0:n.manual}),l}setState(e,n){this.dispatch({type:"setState",state:e,setStateOptions:n})}cancel(e){var n;let l=this.promise;return null==(n=this.retryer)||n.cancel(e),l?l.then(noop).catch(noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>!1!==e.options.enabled)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!timeUntilStale(this.state.dataUpdatedAt,e)}onFocus(){var e;let n=this.observers.find(e=>e.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}onOnline(){var e;let n=this.observers.find(e=>e.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,n){var l,c,d,f;if("idle"!==this.state.fetchStatus){if(this.state.dataUpdatedAt&&null!=n&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise)return null==(d=this.retryer)||d.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let y=getAbortController(),g={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},addSignalProperty=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>{if(y)return this.abortSignalConsumed=!0,y.signal}})};addSignalProperty(g);let b={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(g)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'")};addSignalProperty(b),null==(l=this.options.behavior)||l.onFetch(b),this.revertState=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(c=b.fetchOptions)?void 0:c.meta))&&this.dispatch({type:"fetch",meta:null==(f=b.fetchOptions)?void 0:f.meta});let onError=e=>{if(isCancelledError(e)&&e.silent||this.dispatch({type:"error",error:e}),!isCancelledError(e)){var n,l,c,d;null==(n=(l=this.cache.config).onError)||n.call(l,e,this),null==(c=(d=this.cache.config).onSettled)||c.call(d,this.state.data,e,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=createRetryer({fn:b.fetchFn,abort:null==y?void 0:y.abort.bind(y),onSuccess:e=>{var n,l,c,d;if(void 0===e){onError(Error(this.queryHash+" data is undefined"));return}this.setData(e),null==(n=(l=this.cache.config).onSuccess)||n.call(l,e,this),null==(c=(d=this.cache.config).onSettled)||c.call(d,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError,onFail:(e,n)=>{this.dispatch({type:"failed",failureCount:e,error:n})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:b.options.retry,retryDelay:b.options.retryDelay,networkMode:b.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){this.state=(n=>{var l,c;switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!=(l=e.meta)?l:null,fetchStatus:canFetch(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:null!=(c=e.dataUpdatedAt)?c:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let d=e.error;if(isCancelledError(d)&&d.revert&&this.revertState)return{...this.revertState,fetchStatus:"idle"};return{...n,error:d,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}})(this.state),tx.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}};function getDefaultState(e){let n="function"==typeof e.initialData?e.initialData():e.initialData,l=void 0!==n,c=l?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:l?null!=c?c:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:l?"success":"loading",fetchStatus:"idle"}}let QueryCache=class QueryCache extends Subscribable{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,n,l){var c;let d=n.queryKey,f=null!=(c=n.queryHash)?c:hashQueryKeyByOptions(d,n),y=this.get(f);return y||(y=new Query({cache:this,logger:e.getLogger(),queryKey:d,queryHash:f,options:e.defaultQueryOptions(n),state:l,defaultOptions:e.getQueryDefaults(d)}),this.add(y)),y}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){let n=this.queriesMap[e.queryHash];n&&(e.destroy(),this.queries=this.queries.filter(n=>n!==e),n===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){tx.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,n){let[l]=parseFilterArgs(e,n);return void 0===l.exact&&(l.exact=!0),this.queries.find(e=>matchQuery(l,e))}findAll(e,n){let[l]=parseFilterArgs(e,n);return Object.keys(l).length>0?this.queries.filter(e=>matchQuery(l,e)):this.queries}notify(e){tx.batch(()=>{this.listeners.forEach(({listener:n})=>{n(e)})})}onFocus(){tx.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){tx.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}};let Mutation=class Mutation extends Removable{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||tT,this.observers=[],this.state=e.state||mutation_getDefaultState(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(n=>n!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||("loading"===this.state.status?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,n;return null!=(e=null==(n=this.retryer)?void 0:n.continue())?e:this.execute()}async execute(){var e,n,l,c,d,f,y,g,b,N,k,S,A,E,R,w,O,_,C,P;let x="loading"===this.state.status;try{if(!x){this.dispatch({type:"loading",variables:this.options.variables}),await (null==(b=(N=this.mutationCache.config).onMutate)?void 0:b.call(N,this.state.variables,this));let e=await (null==(k=(S=this.options).onMutate)?void 0:k.call(S,this.state.variables));e!==this.state.context&&this.dispatch({type:"loading",context:e,variables:this.state.variables})}let A=await (()=>{var e;return this.retryer=createRetryer({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(e,n)=>{this.dispatch({type:"failed",failureCount:e,error:n})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise})();return await (null==(e=(n=this.mutationCache.config).onSuccess)?void 0:e.call(n,A,this.state.variables,this.state.context,this)),await (null==(l=(c=this.options).onSuccess)?void 0:l.call(c,A,this.state.variables,this.state.context)),await (null==(d=(f=this.mutationCache.config).onSettled)?void 0:d.call(f,A,null,this.state.variables,this.state.context,this)),await (null==(y=(g=this.options).onSettled)?void 0:y.call(g,A,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:A}),A}catch(e){try{throw await (null==(A=(E=this.mutationCache.config).onError)?void 0:A.call(E,e,this.state.variables,this.state.context,this)),await (null==(R=(w=this.options).onError)?void 0:R.call(w,e,this.state.variables,this.state.context)),await (null==(O=(_=this.mutationCache.config).onSettled)?void 0:O.call(_,void 0,e,this.state.variables,this.state.context,this)),await (null==(C=(P=this.options).onSettled)?void 0:C.call(P,void 0,e,this.state.variables,this.state.context)),e}finally{this.dispatch({type:"error",error:e})}}}dispatch(e){this.state=(n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!canFetch(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...n,...e.state}}})(this.state),tx.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}};function mutation_getDefaultState(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}let MutationCache=class MutationCache extends Subscribable{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,n,l){let c=new Mutation({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(n),state:l,defaultOptions:n.mutationKey?e.getMutationDefaults(n.mutationKey):void 0});return this.add(c),c}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(n=>n!==e),this.notify({type:"removed",mutation:e})}clear(){tx.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find(n=>matchMutation(e,n))}findAll(e){return this.mutations.filter(n=>matchMutation(e,n))}notify(e){tx.batch(()=>{this.listeners.forEach(({listener:n})=>{n(e)})})}resumePausedMutations(){var e;return this.resuming=(null!=(e=this.resuming)?e:Promise.resolve()).then(()=>{let e=this.mutations.filter(e=>e.state.isPaused);return tx.batch(()=>e.reduce((e,n)=>e.then(()=>n.continue().catch(noop)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}};function infiniteQueryBehavior(){return{onFetch:e=>{e.fetchFn=()=>{var n,l,c,d,f,y;let g;let b=null==(n=e.fetchOptions)?void 0:null==(l=n.meta)?void 0:l.refetchPage,N=null==(c=e.fetchOptions)?void 0:null==(d=c.meta)?void 0:d.fetchMore,k=null==N?void 0:N.pageParam,S=(null==N?void 0:N.direction)==="forward",A=(null==N?void 0:N.direction)==="backward",E=(null==(f=e.state.data)?void 0:f.pages)||[],R=(null==(y=e.state.data)?void 0:y.pageParams)||[],w=R,O=!1,addSignalProperty=n=>{Object.defineProperty(n,"signal",{enumerable:!0,get:()=>{var n,l;return null!=(n=e.signal)&&n.aborted?O=!0:null==(l=e.signal)||l.addEventListener("abort",()=>{O=!0}),e.signal}})},_=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),buildNewPages=(e,n,l,c)=>(w=c?[n,...w]:[...w,n],c?[l,...e]:[...e,l]),fetchPage=(n,l,c,d)=>{if(O)return Promise.reject("Cancelled");if(void 0===c&&!l&&n.length)return Promise.resolve(n);let f={queryKey:e.queryKey,pageParam:c,meta:e.options.meta};addSignalProperty(f);let y=_(f),g=Promise.resolve(y).then(e=>buildNewPages(n,c,e,d));return g};if(E.length){if(S){let n=void 0!==k,l=n?k:getNextPageParam(e.options,E);g=fetchPage(E,n,l)}else if(A){let n=void 0!==k,l=n?k:getPreviousPageParam(e.options,E);g=fetchPage(E,n,l,!0)}else{w=[];let n=void 0===e.options.getNextPageParam,l=!b||!E[0]||b(E[0],0,E);g=l?fetchPage([],n,R[0]):Promise.resolve(buildNewPages([],R[0],E[0]));for(let l=1;l<E.length;l++)g=g.then(c=>{let d=!b||!E[l]||b(E[l],l,E);if(d){let d=n?R[l]:getNextPageParam(e.options,c);return fetchPage(c,n,d)}return Promise.resolve(buildNewPages(c,R[l],E[l]))})}}else g=fetchPage([]);let C=g.then(e=>({pages:e,pageParams:w}));return C}}}}function getNextPageParam(e,n){return null==e.getNextPageParam?void 0:e.getNextPageParam(n[n.length-1],n)}function getPreviousPageParam(e,n){return null==e.getPreviousPageParam?void 0:e.getPreviousPageParam(n[0],n)}function hasNextPage(e,n){if(e.getNextPageParam&&Array.isArray(n)){let l=getNextPageParam(e,n);return null!=l&&!1!==l}}function hasPreviousPage(e,n){if(e.getPreviousPageParam&&Array.isArray(n)){let l=getPreviousPageParam(e,n);return null!=l&&!1!==l}}let QueryClient=class QueryClient{constructor(e={}){this.queryCache=e.queryCache||new QueryCache,this.mutationCache=e.mutationCache||new MutationCache,this.logger=e.logger||tT,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=tM.subscribe(()=>{tM.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=tq.subscribe(()=>{tq.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,n;this.mountCount--,0===this.mountCount&&(null==(e=this.unsubscribeFocus)||e.call(this),this.unsubscribeFocus=void 0,null==(n=this.unsubscribeOnline)||n.call(this),this.unsubscribeOnline=void 0)}isFetching(e,n){let[l]=parseFilterArgs(e,n);return l.fetchStatus="fetching",this.queryCache.findAll(l).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,n){var l;return null==(l=this.queryCache.find(e,n))?void 0:l.state.data}ensureQueryData(e,n,l){let c=parseQueryArgs(e,n,l),d=this.getQueryData(c.queryKey);return d?Promise.resolve(d):this.fetchQuery(c)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:e,state:n})=>{let l=n.data;return[e,l]})}setQueryData(e,n,l){let c=this.queryCache.find(e),d=null==c?void 0:c.state.data,f=functionalUpdate(n,d);if(void 0===f)return;let y=parseQueryArgs(e),g=this.defaultQueryOptions(y);return this.queryCache.build(this,g).setData(f,{...l,manual:!0})}setQueriesData(e,n,l){return tx.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,n,l)]))}getQueryState(e,n){var l;return null==(l=this.queryCache.find(e,n))?void 0:l.state}removeQueries(e,n){let[l]=parseFilterArgs(e,n),c=this.queryCache;tx.batch(()=>{c.findAll(l).forEach(e=>{c.remove(e)})})}resetQueries(e,n,l){let[c,d]=parseFilterArgs(e,n,l),f=this.queryCache,y={type:"active",...c};return tx.batch(()=>(f.findAll(c).forEach(e=>{e.reset()}),this.refetchQueries(y,d)))}cancelQueries(e,n,l){let[c,d={}]=parseFilterArgs(e,n,l);void 0===d.revert&&(d.revert=!0);let f=tx.batch(()=>this.queryCache.findAll(c).map(e=>e.cancel(d)));return Promise.all(f).then(noop).catch(noop)}invalidateQueries(e,n,l){let[c,d]=parseFilterArgs(e,n,l);return tx.batch(()=>{var e,n;if(this.queryCache.findAll(c).forEach(e=>{e.invalidate()}),"none"===c.refetchType)return Promise.resolve();let l={...c,type:null!=(e=null!=(n=c.refetchType)?n:c.type)?e:"active"};return this.refetchQueries(l,d)})}refetchQueries(e,n,l){let[c,d]=parseFilterArgs(e,n,l),f=tx.batch(()=>this.queryCache.findAll(c).filter(e=>!e.isDisabled()).map(e=>{var n;return e.fetch(void 0,{...d,cancelRefetch:null==(n=null==d?void 0:d.cancelRefetch)||n,meta:{refetchPage:c.refetchPage}})})),y=Promise.all(f).then(noop);return null!=d&&d.throwOnError||(y=y.catch(noop)),y}fetchQuery(e,n,l){let c=parseQueryArgs(e,n,l),d=this.defaultQueryOptions(c);void 0===d.retry&&(d.retry=!1);let f=this.queryCache.build(this,d);return f.isStaleByTime(d.staleTime)?f.fetch(d):Promise.resolve(f.state.data)}prefetchQuery(e,n,l){return this.fetchQuery(e,n,l).then(noop).catch(noop)}fetchInfiniteQuery(e,n,l){let c=parseQueryArgs(e,n,l);return c.behavior=infiniteQueryBehavior(),this.fetchQuery(c)}prefetchInfiniteQuery(e,n,l){return this.fetchInfiniteQuery(e,n,l).then(noop).catch(noop)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,n){let l=this.queryDefaults.find(n=>hashQueryKey(e)===hashQueryKey(n.queryKey));l?l.defaultOptions=n:this.queryDefaults.push({queryKey:e,defaultOptions:n})}getQueryDefaults(e){if(!e)return;let n=this.queryDefaults.find(n=>partialDeepEqual(e,n.queryKey));return null==n?void 0:n.defaultOptions}setMutationDefaults(e,n){let l=this.mutationDefaults.find(n=>hashQueryKey(e)===hashQueryKey(n.mutationKey));l?l.defaultOptions=n:this.mutationDefaults.push({mutationKey:e,defaultOptions:n})}getMutationDefaults(e){if(!e)return;let n=this.mutationDefaults.find(n=>partialDeepEqual(e,n.mutationKey));return null==n?void 0:n.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;let n={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=hashQueryKeyByOptions(n.queryKey,n)),void 0===n.refetchOnReconnect&&(n.refetchOnReconnect="always"!==n.networkMode),void 0===n.useErrorBoundary&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}};let tU=tC.createContext(void 0),tD=tC.createContext(!1);function getQueryClientContext(e,n){return e||(n&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=tU),window.ReactQueryClientContext):tU)}let useQueryClient=({context:e}={})=>{let n=tC.useContext(getQueryClientContext(e,tC.useContext(tD)));if(!n)throw Error("No QueryClient set, use QueryClientProvider to set one");return n},QueryClientProvider=({client:e,children:n,context:l,contextSharing:c=!1})=>{tC.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);let d=getQueryClientContext(l,c);return tC.createElement(tD.Provider,{value:!l&&c},tC.createElement(d.Provider,{value:e},n))};(f=eP||(eP={})).GOOGLE="google",f.GITHUB="github",(eT||(eT={})).USER="user",(y=ex||(ex={})).ADMIN="admin",y.MEMBER="member",(g=eM||(eM={})).NEW="new",g.ACTIVE="active",g.INVITED="invited",(eB||(eB={})).EVENT="event",(b=eq||(eq={})).TENANT="tenant",b.ACTOR="actor",(N=eU||(eU={})).CREDENTIALS="Credentials",N.INTERNAL="Internal",N.PAYLOAD="Payload",N.WEBHOOK="Webhook",(k=eD||(eD={})).SUCCESS="Success",k.WARNING="Warning",k.FAILED="Failed",k.PENDING="Pending",k.QUEUED="Queued",k.READ_CONFIRMATION="ReadConfirmation",(S=eL||(eL={})).PRIMARY="primary",S.SECONDARY="secondary",S.CLICKED="clicked",(A=eF||(eF={})).PENDING="pending",A.DONE="done",(E=ej||(ej={})).ALL_IN="ALL_IN",E.ANY_IN="ANY_IN",E.BETWEEN="BETWEEN",E.EQUAL="EQUAL",E.IN="IN",E.IS_DEFINED="IS_DEFINED",E.LARGER="LARGER",E.LARGER_EQUAL="LARGER_EQUAL",E.LIKE="LIKE",E.NOT_BETWEEN="NOT_BETWEEN",E.NOT_EQUAL="NOT_EQUAL",E.NOT_IN="NOT_IN",E.NOT_LIKE="NOT_LIKE",E.SMALLER="SMALLER",E.SMALLER_EQUAL="SMALLER_EQUAL",(R=eK||(eK={})).AND="AND",R.OR="OR",(w=eQ||(eQ={})).DAYS="days",w.HOURS="hours",w.MINUTES="minutes",(O=ez||(ez={})).PAYLOAD="payload",O.SUBSCRIBER="subscriber",O.WEBHOOK="webhook",O.IS_ONLINE="isOnline",O.IS_ONLINE_IN_LAST="isOnlineInLast",O.PREVIOUS_STEP="previousStep",O.TENANT="tenant",(_=eG||(eG={})).READ="read",_.UNREAD="unread",_.SEEN="seen",_.UNSEEN="unseen",(C=eH||(eH={})).IN_APP="in_app",C.EMAIL="email",C.SMS="sms",C.CHAT="chat",C.PUSH="push",(P=eW||(eW={})).IN_APP="in_app",P.EMAIL="email",P.SMS="sms",P.CHAT="chat",P.PUSH="push",P.DIGEST="digest",P.TRIGGER="trigger",P.DELAY="delay",eW.IN_APP,eH.IN_APP,eW.EMAIL,eH.EMAIL,eW.SMS,eH.SMS,eW.CHAT,eH.CHAT,eW.PUSH,eH.PUSH,(eV||(eV={})).REDIRECT="redirect",(x=eY||(eY={})).STRING="String",x.ARRAY="Array",x.BOOLEAN="Boolean",(B=eZ||(eZ={})).NONE="none",B.USER="user",B.SYSTEM_ICON="system_icon",B.SYSTEM_CUSTOM="system_custom",(U=e$||(e$={})).WARNING="warning",U.INFO="info",U.ERROR="error",U.SUCCESS="success",U.UP="up",U.QUESTION="question",eH.EMAIL,eH.SMS,eW.DELAY,eW.DIGEST,(L=eX||(eX={})).ERROR="error",L.NOT_ACTIVE="trigger_not_active",L.NO_WORKFLOW_ACTIVE_STEPS="no_workflow_active_steps_defined",L.NO_WORKFLOW_STEPS="no_workflow_steps_defined",L.PROCESSED="processed",L.SUBSCRIBER_MISSING="subscriber_id_missing",L.TENANT_MISSING="no_tenant_found",(F=eJ||(eJ={})).SUBSCRIBER="Subscriber",F.TOPIC="Topic",(K=e0||(e0={})).BROADCAST="broadcast",K.MULTICAST="multicast",(Q=e1||(e1={})).IS_TEMPLATE_STORE_ENABLED="IS_TEMPLATE_STORE_ENABLED",Q.IS_TOPIC_NOTIFICATION_ENABLED="IS_TOPIC_NOTIFICATION_ENABLED",Q.IS_MULTI_TENANCY_ENABLED="IS_MULTI_TENANCY_ENABLED",Q.IS_USE_MERGED_DIGEST_ID_ENABLED="IS_USE_MERGED_DIGEST_ID_ENABLED",Q.IS_API_RATE_LIMITING_ENABLED="IS_API_RATE_LIMITING_ENABLED",(e4||(e4={})).IS_IN_MEMORY_CLUSTER_MODE_ENABLED="IS_IN_MEMORY_CLUSTER_MODE_ENABLED",(z=e2||(e2={})).BUTTON="button",z.TEXT="text",(H=e6||(e6={})).CENTER="center",H.LEFT="left",H.RIGHT="right",(V=e8||(e8={})).FREE="free",V.BUSINESS="business",V.UNLIMITED="unlimited",(Y=e3||(e3={}))[Y.ASC=1]="ASC",Y[Y.DESC=-1]="DESC",(X=e9||(e9={})).SUBSCRIBER="subscriber",X.TEMPLATE="template",X.WORKFLOW_OVERRIDE="workflowOverride",(et=e5||(e5={})).WEB="web",et.CLI="cli",et.VERCEL="vercel",(ei=e7||(e7={})).READ="read",ei.SEEN="seen",ei.UNREAD="unread",ei.UNSEEN="unseen",(es=te||(te={})).RECEIVED="notification_received",es.UNREAD="unread_count_changed",es.UNSEEN="unseen_count_changed",(en=tt||(tt={})).BURST_ALLOWANCE="burst_allowance",en.WINDOW_DURATION="window_duration",tt.BURST_ALLOWANCE,tt.WINDOW_DURATION,(er=ti||(ti={})).ALGORITHM="algorithm",er.COST="cost",er.MAXIMUM="maximum",(ea=ts||(ts={})).SINGLE="single",ea.BULK="bulk",(eo=tn||(tn={})).TRIGGER="trigger",eo.CONFIGURATION="configuration",eo.GLOBAL="global",eq.TENANT,eY.STRING,eq.ACTOR,eY.STRING,(el=tr||(tr={})).ERROR="error",el.SUCCESS="success",el.INFO="info",(ec=ta||(ta={}))[ec.TRIGGER_RECEIVED=1e3]="TRIGGER_RECEIVED",ec[ec.TEMPLATE_NOT_ACTIVE=1001]="TEMPLATE_NOT_ACTIVE",ec[ec.TEMPLATE_NOT_FOUND=1002]="TEMPLATE_NOT_FOUND",ec[ec.SMS_ERROR=1004]="SMS_ERROR",ec[ec.CHAT_ERROR=1005]="CHAT_ERROR",ec[ec.MISSING_SMS_PROVIDER=1006]="MISSING_SMS_PROVIDER",ec[ec.IN_APP_MESSAGE_CREATED=1007]="IN_APP_MESSAGE_CREATED",ec[ec.MAIL_PROVIDER_DELIVERY_ERROR=1008]="MAIL_PROVIDER_DELIVERY_ERROR",ec[ec.TRIGGER_PROCESSED=1009]="TRIGGER_PROCESSED",ec[ec.PUSH_ERROR=1010]="PUSH_ERROR",ec[ec.MISSING_PUSH_PROVIDER=1011]="MISSING_PUSH_PROVIDER",ec[ec.SUBSCRIBER_NOT_FOUND=3001]="SUBSCRIBER_NOT_FOUND",ec[ec.SUBSCRIBER_MISSING_EMAIL=3002]="SUBSCRIBER_MISSING_EMAIL",ec[ec.SUBSCRIBER_MISSING_PHONE=3003]="SUBSCRIBER_MISSING_PHONE",ec[ec.SUBSCRIBER_MISSING_CHAT_CHANNEL_ID=3006]="SUBSCRIBER_MISSING_CHAT_CHANNEL_ID",ec[ec.SUBSCRIBER_ID_MISSING=3004]="SUBSCRIBER_ID_MISSING",ec[ec.MISSING_EMAIL_INTEGRATION=3005]="MISSING_EMAIL_INTEGRATION",ec[ec.MISSING_SMS_INTEGRATION=3007]="MISSING_SMS_INTEGRATION",ec[ec.MISSING_CHAT_INTEGRATION=3008]="MISSING_CHAT_INTEGRATION",ec[ec.MISSING_PUSH_INTEGRATION=3009]="MISSING_PUSH_INTEGRATION",ec[ec.SUBSCRIBER_MISSING_PUSH=3010]="SUBSCRIBER_MISSING_PUSH",ec[ec.MISSING_PAYLOAD_VARIABLE=3011]="MISSING_PAYLOAD_VARIABLE",ec[ec.AVATAR_ACTOR_ERROR=3012]="AVATAR_ACTOR_ERROR",ec[ec.SYNTAX_ERROR_IN_EMAIL_EDITOR=3013]="SYNTAX_ERROR_IN_EMAIL_EDITOR",ec[ec.TOPIC_ERROR=4001]="TOPIC_ERROR",ec[ec.TOPIC_SUBSCRIBERS_ERROR=4002]="TOPIC_SUBSCRIBERS_ERROR",(eu=to||(to={})).FEED="Feed",eu.MESSAGE_TEMPLATE="MessageTemplate",eu.LAYOUT="Layout",eu.DEFAULT_LAYOUT="DefaultLayout",eu.NOTIFICATION_TEMPLATE="NotificationTemplate",eu.NOTIFICATION_GROUP="NotificationGroup",(ed=tl||(tl={})).SECONDS="seconds",ed.MINUTES="minutes",ed.HOURS="hours",ed.DAYS="days",ed.WEEKS="weeks",ed.MONTHS="months",(eh=tc||(tc={})).MONDAY="monday",eh.TUESDAY="tuesday",eh.WEDNESDAY="wednesday",eh.THURSDAY="thursday",eh.FRIDAY="friday",eh.SATURDAY="saturday",eh.SUNDAY="sunday",(ep=tu||(tu={})).REGULAR="regular",ep.BACKOFF="backoff",ep.TIMED="timed",(ef=td||(td={})).REGULAR="regular",ef.SCHEDULED="scheduled",(ey=th||(th={})).EACH="each",ey.ON="on",(em=tp||(tp={})).FIRST="1",em.SECOND="2",em.THIRD="3",em.FOURTH="4",em.FIFTH="5",em.LAST="last",(eg=tf||(tf={})).DAY="day",eg.WEEKDAY="weekday",eg.WEEKEND="weekend",eg.SUNDAY="sunday",eg.MONDAY="monday",eg.TUESDAY="tuesday",eg.WEDNESDAY="wednesday",eg.THURSDAY="thursday",eg.FRIDAY="friday",eg.SATURDAY="saturday",(ev=ty||(ty={})).PENDING="pending",ev.QUEUED="queued",ev.RUNNING="running",ev.COMPLETED="completed",ev.FAILED="failed",ev.DELAYED="delayed",ev.CANCELED="canceled",ev.MERGED="merged",ev.SKIPPED="skipped",(eb=tm||(tm={})).MERGED="MERGED",eb.CREATED="CREATED",eb.SKIPPED="SKIPPED",(eN=tg||(tg={})).GLOBAL="global",eN.TEMPLATE="template",(ek=tv||(tv={})).ApiKey="apiKey",ek.User="user",ek.SecretKey="secretKey",ek.Domain="domain",ek.Password="password",ek.Host="host",ek.Port="port",ek.Secure="secure",ek.Region="region",ek.AccountSid="accountSid",ek.MessageProfileId="messageProfileId",ek.Token="token",ek.From="from",ek.SenderName="senderName",ek.ApplicationId="applicationId",ek.ClientId="clientId",ek.ProjectName="projectName",ek.ServiceAccount="serviceAccount",ek.BaseUrl="baseUrl",ek.WebhookUrl="webhookUrl",ek.RequireTls="requireTls",ek.IgnoreTls="ignoreTls",ek.TlsOptions="tlsOptions",ek.RedirectUrl="redirectUrl",ek.Hmac="hmac",ek.IpPoolName="ipPoolName",ek.ApiKeyRequestHeader="apiKeyRequestHeader",ek.SecretKeyRequestHeader="secretKeyRequestHeader",ek.IdPath="idPath",ek.DatePath="datePath",ek.AuthenticateByToken="authenticateByToken",ek.AuthenticationTokenKey="authenticationTokenKey",ek.AccessKey="accessKey",ek.InstanceId="instanceId",ek.ApiToken="apiToken",ek.ApiURL="apiURL",ek.AppID="appID",ek.alertUid="alertUid",ek.title="title",ek.imageUrl="imageUrl",ek.state="state",ek.externalLink="externalLink",(eS=tb||(tb={})).EmailJS="emailjs",eS.Mailgun="mailgun",eS.Mailjet="mailjet",eS.Mandrill="mandrill",eS.CustomSMTP="nodemailer",eS.Postmark="postmark",eS.SendGrid="sendgrid",eS.Sendinblue="sendinblue",eS.SES="ses",eS.NetCore="netcore",eS.Infobip="infobip-email",eS.Resend="resend",eS.Plunk="plunk",eS.MailerSend="mailersend",eS.Mailtrap="mailtrap",eS.Clickatell="clickatell",eS.Outlook365="outlook365",eS.Novu="novu-email",eS.SparkPost="sparkpost",eS.EmailWebhook="email-webhook",eS.Braze="braze",(eA=tN||(tN={})).Nexmo="nexmo",eA.Plivo="plivo",eA.Sms77="sms77",eA.SmsCentral="sms-central",eA.SNS="sns",eA.Telnyx="telnyx",eA.Twilio="twilio",eA.Gupshup="gupshup",eA.Firetext="firetext",eA.Infobip="infobip-sms",eA.BurstSms="burst-sms",eA.BulkSms="bulk-sms",eA.Clickatell="clickatell",eA.FortySixElks="forty-six-elks",eA.Kannel="kannel",eA.Maqsam="maqsam",eA.Termii="termii",eA.AfricasTalking="africas-talking",eA.Novu="novu-sms",eA.Sendchamp="sendchamp",eA.GenericSms="generic-sms",eA.Clicksend="clicksend",eA.Bandwidth="bandwidth",eA.MessageBird="messagebird",eA.Simpletexting="simpletexting",eA.AzureSms="azure-sms",(eE=tk||(tk={})).Slack="slack",eE.Discord="discord",eE.MsTeams="msteams",eE.Mattermost="mattermost",eE.Ryver="ryver",eE.Zulip="zulip",eE.GrafanaOnCall="grafana-on-call",eE.GetStream="getstream",(eR=tS||(tS={})).FCM="fcm",eR.APNS="apns",eR.EXPO="expo",eR.OneSignal="one-signal",eR.Pushpad="pushpad",eR.PushWebhook="push-webhook",eR.PusherBeams="pusher-beams",(tA||(tA={})).Novu="novu",tv.ApiKey,tv.SecretKey,tv.Token,tv.Password,tv.ServiceAccount;let tL=[{key:tv.From,displayName:"From email address",description:"Use the same email address you used to authenticate your delivery provider",type:"string",required:!0},{key:tv.SenderName,displayName:"Sender name",type:"string",required:!0}],tF=[{key:tv.From,displayName:"From",type:"string",required:!0}],tj=[];[tv.ApiKey,tv.SecretKey,...tL];let tK=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},{key:tv.BaseUrl,displayName:"Base URL",type:"string",required:!1},{key:tv.User,displayName:"User name",type:"string",required:!0},{key:tv.Domain,displayName:"Domain",type:"string",required:!0},...tL],tQ=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},{key:tv.SecretKey,displayName:"API Secret",type:"string",required:!0},...tL],tz=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},{key:tv.SecretKey,displayName:"API secret",type:"string",required:!0},...tF],tG=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},...tL],tH=[{key:tv.User,displayName:"User",type:"string",required:!1},{key:tv.Password,displayName:"Password",type:"string",required:!1},{key:tv.Host,displayName:"Host",type:"string",required:!0},{key:tv.Port,displayName:"Port",type:"number",required:!0},{key:tv.Secure,displayName:"Secure",type:"boolean",required:!1},{key:tv.RequireTls,displayName:"Require TLS",type:"switch",required:!1},{key:tv.IgnoreTls,displayName:"Ignore TLS",type:"switch",required:!1},{key:tv.TlsOptions,displayName:"TLS options",type:"object",required:!1},{key:tv.Domain,displayName:"DKIM: Domain name",type:"string",required:!1},{key:tv.SecretKey,displayName:"DKIM: Private key",type:"string",required:!1},{key:tv.AccountSid,displayName:"DKIM: Key selector",type:"string",required:!1},...tL],tW=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},...tL],tV=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},{key:tv.IpPoolName,displayName:"IP Pool Name",type:"string",required:!1},...tL],tY=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},...tL],tZ=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},...tL],t$=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},...tL],tX=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},{key:tv.Region,displayName:"Region",description:"Use EU if your account is registered to SparkPost EU",type:"dropdown",required:!1,value:null,dropdown:[{name:"Default",value:null},{name:"EU",value:"eu"}]},...tL],tJ=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},...tL],t0=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},...tL],t1=[{key:tv.ApiKey,displayName:"Access key ID",type:"string",required:!0},{key:tv.SecretKey,displayName:"Secret access key",type:"string",required:!0},{key:tv.Region,displayName:"Region",type:"string",required:!0},...tL],t4=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},...tL],t2=[{key:tv.AccountSid,displayName:"Account SID",type:"string",required:!0},{key:tv.Token,displayName:"Auth token",type:"string",required:!0},...tF],t6=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},...tF],t8=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},...tF],t3=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},{key:tv.SecretKey,displayName:"API Secret",type:"string",required:!0}],t9=[{key:tv.ApiToken,displayName:"API Token",type:"string",required:!0}],t5=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0}],t7=[{key:tv.ApiKey,displayName:"Access key ID",type:"string",required:!0},{key:tv.SecretKey,displayName:"Secret access key",type:"string",required:!0},{key:tv.Region,displayName:"AWS region",type:"string",required:!0}],ie=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},{key:tv.MessageProfileId,displayName:"Message profile ID",type:"string",required:!0},...tF],it=[{key:tv.AccountSid,displayName:"Account SID",type:"string",required:!0},{key:tv.Token,displayName:"Auth token",type:"string",required:!0},...tF],ii=[{key:tv.AccessKey,displayName:"Access key",type:"string",required:!0},...tF],is=[{key:tv.ApplicationId,displayName:"Application Id",type:"string",required:!0},{key:tv.ClientId,displayName:"Client ID",type:"string",required:!0},{key:tv.SecretKey,displayName:"Client Secret",type:"string",required:!0},{key:tv.RedirectUrl,displayName:"Redirect URL",description:"Redirect after Slack OAuth flow finished (default behaviour will close the tab)",type:"string",required:!1},{key:tv.Hmac,displayName:"HMAC",type:"switch",required:!1}],ir=[{key:tv.alertUid,displayName:"Alert UID",type:"string",description:"a unique alert ID for grouping, maps to alert_uid of grafana webhook body content",required:!1},{key:tv.title,displayName:"Title.",type:"string",description:"title for the alert",required:!1},{key:tv.imageUrl,displayName:"Image URL",type:"string",description:"a URL for an image attached to alert, maps to image_url of grafana webhook body content",required:!1},{key:tv.state,displayName:"Alert State",type:"string",description:'either "ok" or "alerting". Helpful for auto-resolving',required:!1},{key:tv.externalLink,displayName:"External Link",type:"string",description:'link back to your monitoring system, maps to "link_to_upstream_details" of grafana webhook body content',required:!1}],ia=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0}],io=[{key:tv.ServiceAccount,displayName:"Service Account (entire JSON file)",type:"text",required:!0},...tj],il=[{key:tv.ApiKey,displayName:"Access Token",type:"text",required:!0},...tj],ic=[{key:tv.WebhookUrl,displayName:"Webhook URL",type:"string",description:"the webhook URL to call to trigger push notifications",required:!0},{key:tv.SecretKey,displayName:"Secret Hmac Key",type:"string",description:"the secret used to sign webhooks calls",required:!0},...tj],iu=[{key:tv.ApplicationId,displayName:"Application ID",type:"text",required:!0},{key:tv.ApiKey,displayName:"API Key",type:"text",required:!0},...tj],id=[{key:tv.ApiKey,displayName:"Auth Token",type:"text",required:!0},{key:tv.ApplicationId,displayName:"Project ID",type:"text",required:!0},...tj],ih=[{key:tv.SecretKey,displayName:"Private Key",type:"text",required:!0},{key:tv.ApiKey,displayName:"Key ID",type:"string",required:!0},{key:tv.ProjectName,displayName:"Team ID",type:"string",required:!0},{key:tv.ApplicationId,displayName:"Bundle ID",type:"string",required:!0},{key:tv.Secure,displayName:"Production",type:"switch",required:!0},...tj],ip=[{key:tv.User,displayName:"User id",type:"string",required:!0},{key:tv.Password,displayName:"Password",type:"string",required:!0}],iy=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},...tF],im=[{key:tv.Password,displayName:"Password",type:"string",required:!0},...tL],ig=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},{key:tv.BaseUrl,displayName:"Base URL",type:"string",required:!0},...tF],iv=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},{key:tv.BaseUrl,displayName:"Base URL",type:"string",required:!0},...tL],ib=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},{key:tv.ApiURL,displayName:"Base URL",type:"string",required:!0},{key:tv.AppID,displayName:"Base URL",type:"string",required:!0},...tL],iN=[{key:tv.User,displayName:"Username",type:"string",required:!0},{key:tv.Password,displayName:"Password",type:"string",required:!0},...tF],ik=[{key:tv.Host,displayName:"Host",type:"string",required:!0},{key:tv.Port,displayName:"Port",type:"number",required:!0},{key:tv.User,displayName:"Username",type:"string",required:!1},{key:tv.Password,displayName:"Password",type:"string",required:!1},...tF],iS=[{key:tv.ApiKey,displayName:"Access Key ID",type:"string",required:!0},{key:tv.SecretKey,displayName:"Access Secret",type:"string",required:!0},...tF],iA=[{key:tv.User,displayName:"Username",type:"string",required:!0},{key:tv.Password,displayName:"Password",type:"string",required:!0},{key:tv.BaseUrl,displayName:"Base URL",type:"string",required:!1},...tF],iE=[{key:tv.WebhookUrl,displayName:"Webhook URL",type:"string",description:"the webhook URL to call instead of sending the email",required:!0},{key:tv.SecretKey,displayName:"Secret Hmac Key",type:"string",description:"the secret used to sign webhooks calls",required:!0},...tL],iR=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},{key:tv.User,displayName:"Username",type:"string",required:!0},...tF],iw=[{key:tv.Hmac,displayName:"Security HMAC encryption",type:"switch",required:!1,tooltip:{text:"When active it verifies if a request is performed by a specific user",when:!1}}],iO=[{key:tv.ApiKey,displayName:"API Key",type:"string",required:!0},...tF],i_=[{key:tv.User,displayName:"Username",description:"Your Clicksend API username",type:"text",required:!0},{key:tv.ApiKey,displayName:"API Key",type:"text",required:!0},...tF],iI=[{key:tv.ApiKey,displayName:"API Key",type:"text",required:!0},...tF],iC=[{key:tv.User,displayName:"Username",description:"Your Bandwidth account username",type:"text",required:!0},{key:tv.Password,displayName:"Password",type:"password",required:!0},{key:tv.AccountSid,displayName:"Account ID",type:"text",required:!0},...tF],iP=[{key:tv.BaseUrl,displayName:"Base URL",type:"string",required:!0},{key:tv.ApiKeyRequestHeader,displayName:"API Key Request Header",type:"string",description:"The name of the header attribute to use for the API key ex. (X-API-KEY, apiKey, ...)",required:!0},{key:tv.ApiKey,displayName:"API Key",type:"string",description:"The value of the header attribute to use for the API key.",required:!0},{key:tv.SecretKeyRequestHeader,displayName:"Secret Key Request Header",type:"string",description:"The name of the header attribute to use for the secret key ex. (X-SECRET-KEY, secretKey, ...)",required:!1},{key:tv.SecretKey,displayName:"Secret Key",type:"string",description:"The value of the header attribute to use for the secret key",required:!1},{key:tv.IdPath,displayName:"Id Path",type:"string",value:"data.id",description:"The path to the id field in the response data ex. (id, message.id, ...)",required:!0},{key:tv.DatePath,displayName:"Date Path",type:"string",value:"data.date",description:"The path to the date field in the response data ex. (date, message.date, ...)",required:!0},{key:tv.AuthenticateByToken,displayName:"Authenticate by token",type:"switch",description:"If enabled, the API key and secret key will be sent as a token in the Authorization header",required:!0},{key:tv.Domain,displayName:"Auth URL",type:"string",description:"The URL to use for authentication in case the Authenticate by token option is enabled",required:!1,tooltip:{text:"The URL to use for authentication in case the Authenticate by token option is enabled",when:!0}},{key:tv.AuthenticationTokenKey,displayName:"Authentication Token Key",type:"string",description:"The name of the header attribute to use for the authentication token ex. (X-AUTH-TOKEN, auth-token, ...)",required:!1},...tF],iT=[{key:tv.InstanceId,displayName:"Instance ID",description:"The unique identifier for your Beams instance",type:"string",required:!0},{key:tv.SecretKey,displayName:"Secret Key",description:"The secret key your server will use to access your Beams instance",type:"string",required:!0},...tj],ix=[{key:tv.AccessKey,displayName:"Connection string",description:"Your Azure account connection string",type:"text",required:!0},...tF],iM=[{id:tb.Novu,displayName:"Novu Email",channel:eH.EMAIL,credentials:[],docReference:"https://docs.novu.co/channels-and-providers/default-providers#novu-email-provider",logoFileName:{light:"novu.png",dark:"novu.png"}},{id:tb.Mailgun,displayName:"Mailgun",channel:eH.EMAIL,credentials:tK,docReference:"https://docs.novu.co/channels-and-providers/email/mailgun",logoFileName:{light:"mailgun.svg",dark:"mailgun.svg"}},{id:tb.Mailjet,displayName:"Mailjet",channel:eH.EMAIL,credentials:tQ,docReference:"https://docs.novu.co/channels-and-providers/email/mailjet",logoFileName:{light:"mailjet.png",dark:"mailjet.png"}},{id:tb.Mailtrap,displayName:"Mailtrap",channel:eH.EMAIL,credentials:tZ,docReference:"https://docs.novu.co/channels-and-providers/email/mailtrap",logoFileName:{light:"mailtrap.svg",dark:"mailtrap.svg"}},{id:tb.Mandrill,displayName:"Mandrill",channel:eH.EMAIL,credentials:tG,docReference:"https://docs.novu.co/channels-and-providers/email/mandrill",logoFileName:{light:"mandrill.svg",dark:"mandrill.svg"}},{id:tb.Postmark,displayName:"Postmark",channel:eH.EMAIL,credentials:tW,docReference:"https://docs.novu.co/channels-and-providers/email/postmark",logoFileName:{light:"postmark.png",dark:"postmark.png"}},{id:tb.SendGrid,displayName:"SendGrid",channel:eH.EMAIL,credentials:tV,docReference:"https://docs.novu.co/channels-and-providers/email/sendgrid",logoFileName:{light:"sendgrid.png",dark:"sendgrid.png"}},{id:tb.Sendinblue,displayName:"Sendinblue",channel:eH.EMAIL,credentials:t0,docReference:"https://docs.novu.co/channels-and-providers/email/sendinblue",logoFileName:{light:"sendinblue.png",dark:"sendinblue.png"}},{id:tb.SES,displayName:"SES",channel:eH.EMAIL,credentials:t1,docReference:"https://docs.novu.co/channels-and-providers/email/amazonses",logoFileName:{light:"ses.svg",dark:"ses.svg"}},{id:tb.NetCore,displayName:"Netcore",channel:eH.EMAIL,credentials:tJ,docReference:"https://docs.novu.co/channels-and-providers/email/netcore",logoFileName:{light:"netcore.png",dark:"netcore.png"}},{id:tb.CustomSMTP,displayName:"Custom SMTP",channel:eH.EMAIL,credentials:tH,docReference:"https://docs.novu.co/channels-and-providers/email/custom-smtp",logoFileName:{light:"custom_smtp.svg",dark:"custom_smtp.svg"}},{id:tb.MailerSend,displayName:"MailerSend",channel:eH.EMAIL,credentials:t4,docReference:"https://docs.novu.co/channels-and-providers/email/mailersend",logoFileName:{light:"mailersend.svg",dark:"mailersend.svg"}},{id:tb.Outlook365,displayName:"Microsoft Outlook365",channel:eH.EMAIL,credentials:im,docReference:"https://docs.novu.co/channels-and-providers/email/outlook365",logoFileName:{light:"outlook365.png",dark:"outlook365.png"}},{id:tb.Infobip,displayName:"Infobip",channel:eH.EMAIL,credentials:iv,docReference:"https://docs.novu.co/channels-and-providers/email/infobip",logoFileName:{light:"infobip.png",dark:"infobip.png"}},{id:tb.Braze,displayName:"Braze",channel:eH.EMAIL,credentials:ib,docReference:"https://www.braze.com/docs/api/endpoints/messaging/send_messages/post_send_messages/",logoFileName:{light:"braze.svg",dark:"braze.svg"}},{id:tb.Resend,displayName:"Resend",channel:eH.EMAIL,credentials:tY,docReference:"https://docs.novu.co/channels-and-providers/email/resend",logoFileName:{light:"resend.svg",dark:"resend.svg"}},{id:tb.Plunk,displayName:"Plunk",channel:eH.EMAIL,credentials:t$,docReference:"https://docs.novu.co/channels/email/plunk",logoFileName:{light:"plunk.png",dark:"plunk.png"}},{id:tb.SparkPost,displayName:"SparkPost",channel:eH.EMAIL,credentials:tX,docReference:"https://docs.novu.co/channels-and-providers/email/sparkpost",logoFileName:{light:"sparkpost.svg",dark:"sparkpost.svg"}},{id:tb.EmailWebhook,displayName:"Email Webhook",channel:eH.EMAIL,credentials:iE,betaVersion:!0,docReference:"https://docs.novu.co/channels/email/email-webhook/",logoFileName:{light:"email_webhook.svg",dark:"email_webhook.svg"}}],iB=[{id:tN.Novu,displayName:"Novu SMS",channel:eH.SMS,credentials:[],docReference:"https://docs.novu.co/channels-and-providers/default-providers#novu-sms-provider",logoFileName:{light:"novu.png",dark:"novu.png"}},{id:tN.Nexmo,displayName:"Nexmo",channel:eH.SMS,credentials:tz,docReference:"https://docs.novu.co/channels-and-providers/sms/nexmo",logoFileName:{light:"nexmo.png",dark:"nexmo.png"}},{id:tN.Plivo,displayName:"Plivo",channel:eH.SMS,credentials:t2,docReference:"https://docs.novu.co/channels-and-providers/sms/plivo",logoFileName:{light:"plivo.png",dark:"plivo.png"}},{id:tN.Sms77,displayName:"sms77",channel:eH.SMS,credentials:t6,docReference:"https://docs.novu.co/channels-and-providers/sms/sms77",logoFileName:{light:"sms77.svg",dark:"sms77.svg"}},{id:tN.SNS,displayName:"SNS",channel:eH.SMS,credentials:t7,docReference:"https://docs.novu.co/channels-and-providers/sms/aws-sns",logoFileName:{light:"sns.svg",dark:"sns.svg"}},{id:tN.Telnyx,displayName:"Telnyx",channel:eH.SMS,credentials:ie,docReference:"https://docs.novu.co/channels-and-providers/sms/telnyx",logoFileName:{light:"telnyx.png",dark:"telnyx.png"}},{id:tN.MessageBird,displayName:"MessageBird",channel:eH.SMS,credentials:ii,docReference:"https://developers.messagebird.com/quickstarts/sms-overview/",logoFileName:{light:"messagebird.png",dark:"messagebird.png"}},{id:tN.Twilio,displayName:"Twilio",channel:eH.SMS,credentials:it,docReference:"https://docs.novu.co/channels-and-providers/sms/twilio",logoFileName:{light:"twilio.png",dark:"twilio.png"}},{id:tN.Gupshup,displayName:"Gupshup",channel:eH.SMS,credentials:ip,docReference:"https://docs.gupshup.io/docs/send-single-message",logoFileName:{light:"gupshup.png",dark:"gupshup.png"}},{id:tN.Firetext,displayName:"Firetext",channel:eH.SMS,credentials:iy,docReference:"https://www.firetext.co.uk/docs",logoFileName:{light:"firetext.svg",dark:"firetext.svg"}},{id:tN.Infobip,displayName:"Infobip",channel:eH.SMS,credentials:ig,docReference:"https://docs.novu.co/channels-and-providers/sms/infobip",logoFileName:{light:"infobip.png",dark:"infobip.png"}},{id:tN.BurstSms,displayName:"BurstSMS",channel:eH.SMS,credentials:t3,docReference:"https://developer.transmitsms.com/",logoFileName:{light:"burst-sms.svg",dark:"burst-sms.svg"}},{id:tN.BulkSms,displayName:"BulkSMS",channel:eH.SMS,credentials:t9,docReference:"https://www.bulksms.com/developer/json/v1/",logoFileName:{light:"bulk-sms.png",dark:"bulk-sms.png"}},{id:tN.Clickatell,displayName:"clickatell",channel:eH.SMS,credentials:t5,betaVersion:!0,docReference:"https://docs.clickatell.com/",logoFileName:{light:"clickatell.png",dark:"clickatell.png"}},{id:tN.FortySixElks,displayName:"46elks",channel:eH.SMS,credentials:iN,docReference:"https://46elks.com/docs/send-sms",logoFileName:{light:"46elks.png",dark:"46elks.png"}},{id:tN.Kannel,displayName:"Kannel SMS",channel:eH.SMS,credentials:ik,betaVersion:!0,docReference:"https://www.kannel.org/doc.shtml",logoFileName:{light:"kannel.png",dark:"kannel.png"}},{id:tN.Maqsam,displayName:"Maqsam",channel:eH.SMS,credentials:iS,docReference:"https://portal.maqsam.com/docs/v2/sms",logoFileName:{light:"maqsam.png",dark:"maqsam.png"}},{id:tN.SmsCentral,displayName:"SMS Central",channel:eH.SMS,credentials:iA,docReference:"https://www.smscentral.com.au/sms-api/",logoFileName:{light:"sms-central.png",dark:"sms-central.png"}},{id:tN.Termii,displayName:"Termii",channel:eH.SMS,credentials:t8,docReference:"https://docs.novu.co/channels-and-providers/sms/termii",logoFileName:{light:"termii.png",dark:"termii.png"}},{id:tN.AfricasTalking,displayName:"Africa's Talking",channel:eH.SMS,credentials:iR,docReference:"https://docs.novu.co/channels-and-providers/sms/africas-talking",logoFileName:{light:"africas-talking.svg",dark:"africas-talking.svg"}},{id:tN.Sendchamp,displayName:"Sendchamp",channel:eH.SMS,credentials:iO,docReference:"https://docs.novu.co/channels-and-providers/sms/sendchamp",logoFileName:{light:"sendchamp.svg",dark:"sendchamp.svg"}},{id:tN.GenericSms,displayName:"Generic SMS",channel:eH.SMS,credentials:iP,docReference:"https://docs.novu.co/channels/sms/generic-sms",logoFileName:{light:"generic-sms.svg",dark:"generic-sms.svg"}},{id:tN.Clicksend,displayName:"Clicksend",channel:eH.SMS,credentials:i_,docReference:"https://developers.clicksend.com/docs/rest/v3/?javascript--nodejs#send-sms",logoFileName:{light:"clicksend.png",dark:"clicksend.png"}},{id:tN.Simpletexting,displayName:"SimpleTexting",channel:eH.SMS,credentials:iI,docReference:"https://simpletexting.com/api/docs/v2/",logoFileName:{light:"simpletexting.png",dark:"simpletexting.png"}},{id:tN.Bandwidth,displayName:"Bandwidth",channel:eH.SMS,credentials:iC,betaVersion:!0,docReference:"https://dev.bandwidth.com/docs/messaging/createMessage",logoFileName:{light:"bandwidth.png",dark:"bandwidth.png"}},{id:tN.AzureSms,displayName:"Azure Sms",channel:eH.SMS,credentials:ix,docReference:"https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/sms/receive-sms",logoFileName:{light:"azure-sms.png",dark:"azure-sms.png"}}],iq=[{id:tk.Slack,displayName:"Slack",channel:eH.CHAT,credentials:is,docReference:"https://docs.novu.co/channels-and-providers/chat/slack",logoFileName:{light:"slack.svg",dark:"slack.svg"}},{id:tk.Discord,displayName:"Discord",channel:eH.CHAT,credentials:[],docReference:"https://docs.novu.co/channels-and-providers/chat/discord",logoFileName:{light:"discord.svg",dark:"discord.svg"}},{id:tk.GrafanaOnCall,displayName:"Grafana On Call Webhook",channel:eH.CHAT,credentials:ir,docReference:"https://grafana.com/docs/oncall/latest/integrations/webhook/",logoFileName:{light:"grafana-on-call.png",dark:"grafana-on-call.png"}},{id:tk.MsTeams,displayName:"MSTeams",channel:eH.CHAT,credentials:[],docReference:"https://docs.novu.co/channels-and-providers/chat/ms-teams",logoFileName:{light:"msteams.svg",dark:"msteams.svg"}},{id:tk.Mattermost,displayName:"Mattermost",channel:eH.CHAT,credentials:[],docReference:"https://developers.mattermost.com/integrate/webhooks/incoming/",logoFileName:{light:"mattermost.svg",dark:"mattermost.svg"}},{id:tk.Ryver,displayName:"Ryver",channel:eH.CHAT,credentials:[],docReference:"https://api.ryver.com/ryvrest_api_examples.html#create-chat-message",logoFileName:{light:"ryver.png",dark:"ryver.png"}},{id:tk.Zulip,displayName:"Zulip",channel:eH.CHAT,credentials:[],docReference:"https://docs.novu.co/channels-and-providers/chat/zulip",logoFileName:{light:"zulip.svg",dark:"zulip.svg"}},{id:tk.GetStream,displayName:"GetStream",channel:eH.CHAT,credentials:ia,docReference:"https://getstream.io/chat/docs/node/?language=javascript",logoFileName:{light:"getstream.svg",dark:"getstream.svg"}}],iU=[{id:tS.OneSignal,displayName:"OneSignal",channel:eH.PUSH,credentials:iu,docReference:"https://docs.novu.co/channels-and-providers/push/onesignal",logoFileName:{light:"one-signal.svg",dark:"one-signal.svg"}},{id:tS.Pushpad,displayName:"Pushpad",channel:eH.PUSH,credentials:id,docReference:"https://docs.novu.co/channels-and-providers/push/pushpad",logoFileName:{light:"pushpad.svg",dark:"pushpad.svg"}},{id:tS.FCM,displayName:"Firebase Cloud Messaging",channel:eH.PUSH,credentials:io,docReference:"https://docs.novu.co/channels-and-providers/push/fcm",logoFileName:{light:"fcm.svg",dark:"fcm.svg"}},{id:tS.EXPO,displayName:"Expo Push",channel:eH.PUSH,credentials:il,docReference:"https://docs.novu.co/channels-and-providers/push/expo-push",logoFileName:{light:"expo.svg",dark:"expo.svg"}},{id:tS.APNS,displayName:"APNs",channel:eH.PUSH,credentials:ih,docReference:"https://docs.novu.co/channels-and-providers/push/apns",logoFileName:{light:"apns.png",dark:"apns.png"},betaVersion:!0},{id:tS.PushWebhook,displayName:"Push Webhook",channel:eH.PUSH,credentials:ic,docReference:"https://docs.novu.co/channels-and-providers/push/push-webhook",logoFileName:{light:"push-webhook.svg",dark:"push-webhook.svg"},betaVersion:!0},{id:tS.PusherBeams,displayName:"Pusher Beams",channel:eH.PUSH,credentials:iT,docReference:"https://docs.novu.co/channels-and-providers/push/pusher-beams",logoFileName:{light:"pusher-beams.svg",dark:"pusher-beams.svg"}}],iD=[{id:tA.Novu,displayName:"Novu In-App",channel:eH.IN_APP,credentials:iw,docReference:"https://docs.novu.co/notification-center/introduction",logoFileName:{light:"novu.png",dark:"novu.png"}}];[...iM,...iB,...iq,...iU,...iD],tA.Novu,tN.Novu,tb.Novu,tN.Novu,tb.Novu,eL.PRIMARY,eL.SECONDARY,(ew=tE||(tE={})).EQUALS="equals",ew.TITLECASE="titlecase",ew.UPPERCASE="uppercase",ew.LOWERCASE="lowercase",ew.PLURALIZE="pluralize",ew.DATEFORMAT="dateFormat",ew.UNIQUE="unique",ew.GROUP_BY="groupBy",ew.SORT_BY="sortBy",ew.NUMBERFORMAT="numberFormat",tE.EQUALS,tE.TITLECASE,tE.UPPERCASE,tE.LOWERCASE,tE.PLURALIZE,tE.DATEFORMAT,tE.UNIQUE,tE.GROUP_BY,tE.SORT_BY,tE.NUMBERFORMAT,ez.PAYLOAD,ez.TENANT,ez.SUBSCRIBER,ez.WEBHOOK,ez.IS_ONLINE,ez.IS_ONLINE_IN_LAST,ez.PREVIOUS_STEP,e8.FREE,tn.TRIGGER,tn.CONFIGURATION,tn.GLOBAL,e8.BUSINESS,tn.TRIGGER,tn.CONFIGURATION,tn.GLOBAL,e8.UNLIMITED,tn.TRIGGER,tn.CONFIGURATION,tn.GLOBAL,tt.BURST_ALLOWANCE,tt.WINDOW_DURATION,ts.SINGLE,ts.BULK;var iL=l(29578),__awaiter=function(e,n,l,c){function adopt(e){return e instanceof l?e:new l(function(n){n(e)})}return new(l||(l=Promise))(function(l,d){function fulfilled(e){try{step(c.next(e))}catch(e){d(e)}}function rejected(e){try{step(c.throw(e))}catch(e){d(e)}}function step(e){e.done?l(e.value):adopt(e.value).then(fulfilled,rejected)}step((c=c.apply(e,n||[])).next())})};let HttpClient=class HttpClient{constructor(e){this.backendUrl=e,this.axiosClient=iL.Z.create({baseURL:e+"/v1"})}setAuthorizationToken(e){this.axiosClient.defaults.headers.common.Authorization=`Bearer ${e}`}disposeAuthorizationToken(){delete this.axiosClient.defaults.headers.common.Authorization}getFullResponse(e,n){return __awaiter(this,void 0,void 0,function*(){return yield this.axiosClient.get(e,{params:n}).then(e=>e.data)})}get(e,n){return __awaiter(this,void 0,void 0,function*(){return yield this.axiosClient.get(e,{params:n}).then(e=>e.data.data)})}post(e,n={}){return __awaiter(this,void 0,void 0,function*(){return yield this.axiosClient.post(e,n).then(e=>e.data.data)})}patch(e,n={}){return __awaiter(this,void 0,void 0,function*(){return yield this.axiosClient.patch(e,n).then(e=>e.data.data)})}delete(e,n={}){return __awaiter(this,void 0,void 0,function*(){return yield this.axiosClient.delete(e,n).then(e=>e.data.data)})}};l(9684),(eO=tR||(tR={}))[eO.WEB=0]="WEB",eO[eO.API=1]="API",eO[eO.WIDGET=2]="WIDGET",eO[eO.WS=3]="WS",(e_=tw||(tw={})).EXECUTION_LOG="execution-logs",e_.ACTIVE_JOBS_METRIC="metric-active-jobs",e_.INBOUND_PARSE_MAIL="inbound-parse-mail",e_.STANDARD="standard",e_.WEB_SOCKETS="ws_socket_queue",e_.WORKFLOW="trigger-handler",e_.PROCESS_SUBSCRIBER="process-subscriber",(eI=tO||(tO={})).JOB_PROCESSING_QUEUE="job-processing-queue",eI.SUBSCRIBER_PROCESSING_QUEUE="subscriber-processing-queue",eI.TRIGGER_HANDLER_QUEUE="trigger-handler-queue",eI.EXECUTION_LOG_QUEUE="execution-log-queue",eI.WS_SOCKET_QUEUE="ws_socket_queue",eI.WS_SOCKET_SOCKET_CONNECTION="ws_socket_handle_connection",eI.WS_SOCKET_HANDLE_DISCONNECT="ws_socket_handle_disconnect",l(9684);var api_service_awaiter=function(e,n,l,c){function adopt(e){return e instanceof l?e:new l(function(n){n(e)})}return new(l||(l=Promise))(function(l,d){function fulfilled(e){try{step(c.next(e))}catch(e){d(e)}}function rejected(e){try{step(c.throw(e))}catch(e){d(e)}}function step(e){e.done?l(e.value):adopt(e.value).then(fulfilled,rejected)}step((c=c.apply(e,n||[])).next())})},__rest=function(e,n){var l={};for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&0>n.indexOf(c)&&(l[c]=e[c]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var d=0,c=Object.getOwnPropertySymbols(e);d<c.length;d++)0>n.indexOf(c[d])&&Object.prototype.propertyIsEnumerable.call(e,c[d])&&(l[c[d]]=e[c[d]]);return l};let ApiService=class ApiService{constructor(e){this.backendUrl=e,this.isAuthenticated=!1,this.httpClient=new HttpClient(e)}setAuthorizationToken(e){this.httpClient.setAuthorizationToken(e),this.isAuthenticated=!0}disposeAuthorizationToken(){this.httpClient.disposeAuthorizationToken(),this.isAuthenticated=!1}updateAction(e,n,l,c){return api_service_awaiter(this,void 0,void 0,function*(){return yield this.httpClient.post(`/widgets/messages/${e}/actions/${n}`,{executedType:n,status:l,payload:c})})}markMessageAs(e,n){return api_service_awaiter(this,void 0,void 0,function*(){let l=void 0===n.seen&&void 0===n.read?{seen:!0}:n;return yield this.httpClient.post("/widgets/messages/markAs",{messageId:e,mark:l})})}removeMessage(e){return api_service_awaiter(this,void 0,void 0,function*(){return yield this.httpClient.delete(`/widgets/messages/${e}`,{})})}removeAllMessages(e){return api_service_awaiter(this,void 0,void 0,function*(){let n=e?`/widgets/messages?feedId=${e}`:"/widgets/messages";return yield this.httpClient.delete(n)})}markAllMessagesAsRead(e){return api_service_awaiter(this,void 0,void 0,function*(){return yield this.httpClient.post("/widgets/messages/read",{feedId:e})})}markAllMessagesAsSeen(e){return api_service_awaiter(this,void 0,void 0,function*(){return yield this.httpClient.post("/widgets/messages/seen",{feedId:e})})}getNotificationsList(e,n={}){var{payload:l}=n,c=__rest(n,["payload"]);return api_service_awaiter(this,void 0,void 0,function*(){let n=l?btoa(JSON.stringify(l)):void 0;return yield this.httpClient.getFullResponse("/widgets/notifications/feed",Object.assign({page:e,payload:n},c))})}initializeSession(e,n,l=null){return api_service_awaiter(this,void 0,void 0,function*(){return yield this.httpClient.post("/widgets/session/initialize",{applicationIdentifier:e,subscriberId:n,hmacHash:l})})}postUsageLog(e,n){return api_service_awaiter(this,void 0,void 0,function*(){return yield this.httpClient.post("/widgets/usage/log",{name:`[Widget] - ${e}`,payload:n})})}getUnseenCount(e={}){return api_service_awaiter(this,void 0,void 0,function*(){return yield this.httpClient.get("/widgets/notifications/unseen",e)})}getUnreadCount(e={}){return api_service_awaiter(this,void 0,void 0,function*(){return yield this.httpClient.get("/widgets/notifications/unread",e)})}getTabCount(e={}){return api_service_awaiter(this,void 0,void 0,function*(){return yield this.httpClient.get("/widgets/notifications/count",e)})}getOrganization(){return api_service_awaiter(this,void 0,void 0,function*(){return this.httpClient.get("/widgets/organization")})}getUserPreference(){return api_service_awaiter(this,void 0,void 0,function*(){return this.httpClient.get("/widgets/preferences")})}getUserGlobalPreference(){return api_service_awaiter(this,void 0,void 0,function*(){return this.httpClient.get("/widgets/preferences/global")})}updateSubscriberPreference(e,n,l){return api_service_awaiter(this,void 0,void 0,function*(){return yield this.httpClient.patch(`/widgets/preferences/${e}`,{channel:{type:n,enabled:l}})})}updateSubscriberGlobalPreference(e,n){return api_service_awaiter(this,void 0,void 0,function*(){return yield this.httpClient.patch("/widgets/preferences",{preferences:e.map(e=>Object.assign(Object.assign({},e),{type:e.channelType})),enabled:n})})}};let iF=tC.createContext(null);let QueryObserver=class QueryObserver extends Subscribable{constructor(e,n){super(),this.client=e,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.currentQuery.addObserver(this),shouldFetchOnMount(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return shouldFetchOn(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return shouldFetchOn(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,n){let l=this.options,c=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),shallowEqualObjects(l,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=l.queryKey),this.updateQuery();let d=this.hasListeners();d&&shouldFetchOptionally(this.currentQuery,c,this.options,l)&&this.executeFetch(),this.updateResult(n),d&&(this.currentQuery!==c||this.options.enabled!==l.enabled||this.options.staleTime!==l.staleTime)&&this.updateStaleTimeout();let f=this.computeRefetchInterval();d&&(this.currentQuery!==c||this.options.enabled!==l.enabled||f!==this.currentRefetchInterval)&&this.updateRefetchInterval(f)}getOptimisticResult(e){let n=this.client.getQueryCache().build(this.client,e),l=this.createResult(n,e);return shouldAssignObserverCurrentProperties(this,l,e)&&(this.currentResult=l,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),l}getCurrentResult(){return this.currentResult}trackResult(e){let n={};return Object.keys(e).forEach(l=>{Object.defineProperty(n,l,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(l),e[l])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...n}={}){return this.fetch({...n,meta:{refetchPage:e}})}fetchOptimistic(e){let n=this.client.defaultQueryOptions(e),l=this.client.getQueryCache().build(this.client,n);return l.isFetchingOptimistic=!0,l.fetch().then(()=>this.createResult(l,n))}fetch(e){var n;return this.executeFetch({...e,cancelRefetch:null==(n=e.cancelRefetch)||n}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let n=this.currentQuery.fetch(this.options,e);return null!=e&&e.throwOnError||(n=n.catch(noop)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),tP||this.currentResult.isStale||!isValidTimeout(this.options.staleTime))return;let e=timeUntilStale(this.currentResult.dataUpdatedAt,this.options.staleTime);this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},e+1)}computeRefetchInterval(){var e;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!tP&&!1!==this.options.enabled&&isValidTimeout(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||tM.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,n){let l;let c=this.currentQuery,d=this.options,f=this.currentResult,y=this.currentResultState,g=this.currentResultOptions,b=e!==c,N=b?e.state:this.currentQueryInitialState,k=b?this.currentResult:this.previousQueryResult,{state:S}=e,{dataUpdatedAt:A,error:E,errorUpdatedAt:R,fetchStatus:w,status:O}=S,_=!1,C=!1;if(n._optimisticResults){let l=this.hasListeners(),f=!l&&shouldFetchOnMount(e,n),y=l&&shouldFetchOptionally(e,c,n,d);(f||y)&&(w=canFetch(e.options.networkMode)?"fetching":"paused",A||(O="loading")),"isRestoring"===n._optimisticResults&&(w="idle")}if(n.keepPreviousData&&!S.dataUpdatedAt&&null!=k&&k.isSuccess&&"error"!==O)l=k.data,A=k.dataUpdatedAt,O=k.status,_=!0;else if(n.select&&void 0!==S.data){if(f&&S.data===(null==y?void 0:y.data)&&n.select===this.selectFn)l=this.selectResult;else try{this.selectFn=n.select,l=n.select(S.data),l=replaceData(null==f?void 0:f.data,l,n),this.selectResult=l,this.selectError=null}catch(e){this.selectError=e}}else l=S.data;if(void 0!==n.placeholderData&&void 0===l&&"loading"===O){let e;if(null!=f&&f.isPlaceholderData&&n.placeholderData===(null==g?void 0:g.placeholderData))e=f.data;else if(e="function"==typeof n.placeholderData?n.placeholderData():n.placeholderData,n.select&&void 0!==e)try{e=n.select(e),this.selectError=null}catch(e){this.selectError=e}void 0!==e&&(O="success",l=replaceData(null==f?void 0:f.data,e,n),C=!0)}this.selectError&&(E=this.selectError,l=this.selectResult,R=Date.now(),O="error");let P="fetching"===w,x="loading"===O,B="error"===O,U={status:O,fetchStatus:w,isLoading:x,isSuccess:"success"===O,isError:B,isInitialLoading:x&&P,data:l,dataUpdatedAt:A,error:E,errorUpdatedAt:R,failureCount:S.fetchFailureCount,failureReason:S.fetchFailureReason,errorUpdateCount:S.errorUpdateCount,isFetched:S.dataUpdateCount>0||S.errorUpdateCount>0,isFetchedAfterMount:S.dataUpdateCount>N.dataUpdateCount||S.errorUpdateCount>N.errorUpdateCount,isFetching:P,isRefetching:P&&!x,isLoadingError:B&&0===S.dataUpdatedAt,isPaused:"paused"===w,isPlaceholderData:C,isPreviousData:_,isRefetchError:B&&0!==S.dataUpdatedAt,isStale:isStale(e,n),refetch:this.refetch,remove:this.remove};return U}updateResult(e){let n=this.currentResult,l=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,shallowEqualObjects(l,n))return;this.currentResult=l;let c={cache:!0};(null==e?void 0:e.listeners)!==!1&&(()=>{if(!n)return!0;let{notifyOnChangeProps:e}=this.options,l="function"==typeof e?e():e;if("all"===l||!l&&!this.trackedProps.size)return!0;let c=new Set(null!=l?l:this.trackedProps);return this.options.useErrorBoundary&&c.add("error"),Object.keys(this.currentResult).some(e=>{let l=this.currentResult[e]!==n[e];return l&&c.has(e)})})()&&(c.listeners=!0),this.notify({...c,...e})}updateQuery(){let e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;let n=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==n||n.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){let n={};"success"===e.type?n.onSuccess=!e.manual:"error"!==e.type||isCancelledError(e.error)||(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(e){tx.batch(()=>{var n,l,c,d,f,y,g,b;e.onSuccess?(null==(n=(l=this.options).onSuccess)||n.call(l,this.currentResult.data),null==(c=(d=this.options).onSettled)||c.call(d,this.currentResult.data,null)):e.onError&&(null==(f=(y=this.options).onError)||f.call(y,this.currentResult.error),null==(g=(b=this.options).onSettled)||g.call(b,void 0,this.currentResult.error)),e.listeners&&this.listeners.forEach(({listener:e})=>{e(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}};function shouldLoadOnMount(e,n){return!1!==n.enabled&&!e.state.dataUpdatedAt&&!("error"===e.state.status&&!1===n.retryOnMount)}function shouldFetchOnMount(e,n){return shouldLoadOnMount(e,n)||e.state.dataUpdatedAt>0&&shouldFetchOn(e,n,n.refetchOnMount)}function shouldFetchOn(e,n,l){if(!1!==n.enabled){let c="function"==typeof l?l(e):l;return"always"===c||!1!==c&&isStale(e,n)}return!1}function shouldFetchOptionally(e,n,l,c){return!1!==l.enabled&&(e!==n||!1===c.enabled)&&(!l.suspense||"error"!==e.state.status)&&isStale(e,l)}function isStale(e,n){return e.isStaleByTime(n.staleTime)}function shouldAssignObserverCurrentProperties(e,n,l){return!l.keepPreviousData&&(void 0!==l.placeholderData?n.isPlaceholderData:!shallowEqualObjects(e.getCurrentResult(),n))}let InfiniteQueryObserver=class InfiniteQueryObserver extends QueryObserver{constructor(e,n){super(e,n)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,n){super.setOptions({...e,behavior:infiniteQueryBehavior()},n)}getOptimisticResult(e){return e.behavior=infiniteQueryBehavior(),super.getOptimisticResult(e)}fetchNextPage({pageParam:e,...n}={}){return this.fetch({...n,meta:{fetchMore:{direction:"forward",pageParam:e}}})}fetchPreviousPage({pageParam:e,...n}={}){return this.fetch({...n,meta:{fetchMore:{direction:"backward",pageParam:e}}})}createResult(e,n){var l,c,d,f,y,g;let{state:b}=e,N=super.createResult(e,n),{isFetching:k,isRefetching:S}=N,A=k&&(null==(l=b.fetchMeta)?void 0:null==(c=l.fetchMore)?void 0:c.direction)==="forward",E=k&&(null==(d=b.fetchMeta)?void 0:null==(f=d.fetchMore)?void 0:f.direction)==="backward";return{...N,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:hasNextPage(n,null==(y=b.data)?void 0:y.pages),hasPreviousPage:hasPreviousPage(n,null==(g=b.data)?void 0:g.pages),isFetchingNextPage:A,isFetchingPreviousPage:E,isRefetching:S&&!A&&!E}}};var ij=l(6916);let iK=ij.useSyncExternalStore;function createValue(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}let iQ=tC.createContext(createValue()),useQueryErrorResetBoundary=()=>tC.useContext(iQ),iz=tC.createContext(!1),useIsRestoring=()=>tC.useContext(iz);function shouldThrowError(e,n){return"function"==typeof e?e(...n):!!e}iz.Provider;let ensurePreventErrorBoundaryRetry=(e,n)=>{(e.suspense||e.useErrorBoundary)&&!n.isReset()&&(e.retryOnMount=!1)},useClearResetErrorBoundary=e=>{tC.useEffect(()=>{e.clearReset()},[e])},getHasError=({result:e,errorResetBoundary:n,useErrorBoundary:l,query:c})=>e.isError&&!n.isReset()&&!e.isFetching&&shouldThrowError(l,[e.error,c]),ensureStaleTime=e=>{e.suspense&&"number"!=typeof e.staleTime&&(e.staleTime=1e3)},willFetch=(e,n)=>e.isLoading&&e.isFetching&&!n,shouldSuspend=(e,n,l)=>(null==e?void 0:e.suspense)&&willFetch(n,l),fetchOptimistic=(e,n,l)=>n.fetchOptimistic(e).then(({data:n})=>{null==e.onSuccess||e.onSuccess(n),null==e.onSettled||e.onSettled(n,null)}).catch(n=>{l.clearReset(),null==e.onError||e.onError(n),null==e.onSettled||e.onSettled(void 0,n)});function useBaseQuery(e,n){let l=useQueryClient({context:e.context}),c=useIsRestoring(),d=useQueryErrorResetBoundary(),f=l.defaultQueryOptions(e);f._optimisticResults=c?"isRestoring":"optimistic",f.onError&&(f.onError=tx.batchCalls(f.onError)),f.onSuccess&&(f.onSuccess=tx.batchCalls(f.onSuccess)),f.onSettled&&(f.onSettled=tx.batchCalls(f.onSettled)),ensureStaleTime(f),ensurePreventErrorBoundaryRetry(f,d),useClearResetErrorBoundary(d);let[y]=tC.useState(()=>new n(l,f)),g=y.getOptimisticResult(f);if(iK(tC.useCallback(e=>{let n=c?()=>void 0:y.subscribe(tx.batchCalls(e));return y.updateResult(),n},[y,c]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),tC.useEffect(()=>{y.setOptions(f,{listeners:!1})},[f,y]),shouldSuspend(f,g,c))throw fetchOptimistic(f,y,d);if(getHasError({result:g,errorResetBoundary:d,useErrorBoundary:f.useErrorBoundary,query:y.getCurrentQuery()}))throw g.error;return f.notifyOnChangeProps?g:y.trackResult(g)}function useInfiniteQuery(e,n,l){let c=parseQueryArgs(e,n,l);return useBaseQuery(c,InfiniteQueryObserver)}var iG=l(18140);let pagination_getNextPageParam=e=>e.hasMore?e.page+1:void 0,iH=["session"],iW=["organization"],iV=["infinite_notifications"],iY=["unseen_count"],iZ=["unread_count"],i$=["feed_unseen_count"],useSetQueryKey=()=>{let{subscriberId:e,subscriberHash:n,applicationIdentifier:l}=(0,iG.i)(),c=(0,tC.useCallback)(c=>[...c,e,l,n],[e,n,l]);return c},iX=tC.createContext(null),useStore=()=>(0,tC.useContext)(iX),useFetchNotificationsQueryKey=()=>{let{storeQuery:e}=useStore(),n=useSetQueryKey(),l=(0,tC.useMemo)(()=>n([...iV,e]),[n,e]);return l};var useFetchNotifications_rest=function(e,n){var l={};for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&0>n.indexOf(c)&&(l[c]=e[c]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var d=0,c=Object.getOwnPropertySymbols(e);d<c.length;d++)0>n.indexOf(c[d])&&Object.prototype.propertyIsEnumerable.call(e,c[d])&&(l[c[d]]=e[c[d]]);return l};let useFetchNotifications=({query:e}={},n={})=>{let{apiService:l,isSessionInitialized:c,fetchingStrategy:d}=(0,iG.i)(),f=useFetchNotificationsQueryKey(),y=useInfiniteQuery(f,({pageParam:n=0})=>l.getNotificationsList(n,e),Object.assign(Object.assign({},n),{enabled:c&&d.fetchNotifications,getNextPageParam:pagination_getNextPageParam}));return Object.assign(Object.assign({},y),{refetch:(e={})=>{var{page:n}=e,l=useFetchNotifications_rest(e,["page"]);void 0!==n?y.fetchNextPage(Object.assign({pageParam:n},l)):y.refetch(l)}})};function useQuery(e,n,l){let c=parseQueryArgs(e,n,l);return useBaseQuery(c,QueryObserver)}var iJ=l(20490),i0=l.n(iJ);let useUnseenCountQueryKey=()=>{let{storeQuery:e}=useStore(),n=useSetQueryKey(),l=(0,tC.useMemo)(()=>n([...iY,e]),[n,e]);return l},useDataRef=e=>{let n=(0,tC.useRef)(e);return n.current=e,n};var useUnseenCount_rest=function(e,n){var l={};for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&0>n.indexOf(c)&&(l[c]=e[c]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var d=0,c=Object.getOwnPropertySymbols(e);d<c.length;d++)0>n.indexOf(c[d])&&Object.prototype.propertyIsEnumerable.call(e,c[d])&&(l[c[d]]=e[c[d]]);return l};let dispatchUnseenCountEvent=e=>{document.dispatchEvent(new CustomEvent("novu:unseen_count_changed",{detail:e}))},i1="undefined"!=typeof window&&(null==window?void 0:window.Cypress)?1e3:100,useUnseenCount=(e={})=>{var{onSuccess:n}=e,l=useUnseenCount_rest(e,["onSuccess"]);let{apiService:c,socket:d,isSessionInitialized:f,fetchingStrategy:y}=(0,iG.i)(),g=useQueryClient(),b=useSetQueryKey(),N=useFetchNotificationsQueryKey(),k=useUnseenCountQueryKey(),S=useDataRef({fetchNotificationsQueryKey:N,unseenCountQueryKey:k});(0,tC.useEffect)(()=>d?(d.on(te.UNSEEN,i0()(e=>{Number.isInteger(null==e?void 0:e.unseenCount)&&(g.setQueryData(k,n=>{var l;return{count:null!==(l=null==e?void 0:e.unseenCount)&&void 0!==l?l:n.count}}),g.refetchQueries(S.current.fetchNotificationsQueryKey,{exact:!1}),g.refetchQueries([...i$],{exact:!1}),dispatchUnseenCountEvent(e.unseenCount))},i1)),()=>{d.off(te.UNSEEN)}):()=>{},[d,g,b]);let A=useQuery(k,()=>c.getUnseenCount({limit:100}),Object.assign(Object.assign({},l),{enabled:f&&y.fetchUnseenCount,onSuccess:e=>{dispatchUnseenCountEvent(e.count),null==n||n(e)}}));return A},useUnreadCountQueryKey=()=>{let{storeQuery:e}=useStore(),n=useSetQueryKey(),l=(0,tC.useMemo)(()=>n([...iZ,e]),[n,e]);return l};var useUnreadCount_rest=function(e,n){var l={};for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&0>n.indexOf(c)&&(l[c]=e[c]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var d=0,c=Object.getOwnPropertySymbols(e);d<c.length;d++)0>n.indexOf(c[d])&&Object.prototype.propertyIsEnumerable.call(e,c[d])&&(l[c[d]]=e[c[d]]);return l};let dispatchUnreadCountEvent=e=>{document.dispatchEvent(new CustomEvent("novu:unread_count_changed",{detail:e}))},i4="undefined"!=typeof window&&(null==window?void 0:window.Cypress)?1e3:100,useUnreadCount=(e={})=>{var{onSuccess:n}=e,l=useUnreadCount_rest(e,["onSuccess"]);let{apiService:c,socket:d,isSessionInitialized:f,fetchingStrategy:y}=(0,iG.i)(),g=useQueryClient(),b=useSetQueryKey(),N=useFetchNotificationsQueryKey(),k=useUnreadCountQueryKey(),S=useUnseenCountQueryKey(),A=useDataRef({fetchNotificationsQueryKey:N,unreadCountQueryKey:k,unseenCountQueryKey:S});(0,tC.useEffect)(()=>d?(d.on(te.UNREAD,i0()(e=>{Number.isInteger(null==e?void 0:e.unreadCount)&&(g.setQueryData(A.current.unreadCountQueryKey,n=>{var l;return{count:null!==(l=null==e?void 0:e.unreadCount)&&void 0!==l?l:n.count}}),g.refetchQueries(A.current.unseenCountQueryKey,{exact:!1}),g.refetchQueries(A.current.fetchNotificationsQueryKey,{exact:!1}),g.refetchQueries([...i$],{exact:!1}),dispatchUnreadCountEvent(e.unreadCount))},i4)),()=>{d.off(te.UNREAD)}):()=>{},[d,g,b]);let E=useQuery(k,()=>c.getUnreadCount({limit:100}),Object.assign(Object.assign({},l),{enabled:f&&y.fetchUnreadCount,onSuccess:e=>{dispatchUnreadCountEvent(e.count),null==n||n(e)}}));return E};let MutationObserver=class MutationObserver extends Subscribable{constructor(e,n){super(),this.client=e,this.setOptions(n),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var n;let l=this.options;this.options=this.client.defaultMutationOptions(e),shallowEqualObjects(l,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),null==(n=this.currentMutation)||n.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.currentMutation)||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();let n={listeners:!0};"success"===e.type?n.onSuccess=!0:"error"===e.type&&(n.onError=!0),this.notify(n)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,n){return this.mutateOptions=n,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:void 0!==e?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){let e=this.currentMutation?this.currentMutation.state:mutation_getDefaultState(),n={...e,isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset};this.currentResult=n}notify(e){tx.batch(()=>{if(this.mutateOptions&&this.hasListeners()){var n,l,c,d,f,y,g,b;e.onSuccess?(null==(n=(l=this.mutateOptions).onSuccess)||n.call(l,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(c=(d=this.mutateOptions).onSettled)||c.call(d,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)):e.onError&&(null==(f=(y=this.mutateOptions).onError)||f.call(y,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(g=(b=this.mutateOptions).onSettled)||g.call(b,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context))}e.listeners&&this.listeners.forEach(({listener:e})=>{e(this.currentResult)})})}};function useMutation(e,n,l){let c=parseMutationArgs(e,n,l),d=useQueryClient({context:c.context}),[f]=tC.useState(()=>new MutationObserver(d,c));tC.useEffect(()=>{f.setOptions(c)},[f,c]);let y=iK(tC.useCallback(e=>f.subscribe(tx.batchCalls(e)),[f]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),g=tC.useCallback((e,n)=>{f.mutate(e,n).catch(useMutation_noop)},[f]);if(y.error&&shouldThrowError(f.options.useErrorBoundary,[y.error]))throw y.error;return{...y,mutate:g,mutateAsync:y.mutate}}function useMutation_noop(){}var useRemoveNotification_rest=function(e,n){var l={};for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&0>n.indexOf(c)&&(l[c]=e[c]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var d=0,c=Object.getOwnPropertySymbols(e);d<c.length;d++)0>n.indexOf(c[d])&&Object.prototype.propertyIsEnumerable.call(e,c[d])&&(l[c[d]]=e[c[d]]);return l};let useRemoveNotification=(e={})=>{var{onSuccess:n}=e,l=useRemoveNotification_rest(e,["onSuccess"]);let c=useQueryClient(),{apiService:d}=(0,iG.i)(),f=useFetchNotificationsQueryKey(),y=useMutation(({messageId:e})=>d.removeMessage(e),Object.assign(Object.assign({},l),{onSuccess:(e,l,d)=>{c.refetchQueries(f,{exact:!1}),null==n||n(e,l,d)}})),{mutate:g}=y,b=useRemoveNotification_rest(y,["mutate"]);return Object.assign(Object.assign({},b),{removeNotification:g})};var useRemoveAllNotifications_rest=function(e,n){var l={};for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&0>n.indexOf(c)&&(l[c]=e[c]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var d=0,c=Object.getOwnPropertySymbols(e);d<c.length;d++)0>n.indexOf(c[d])&&Object.prototype.propertyIsEnumerable.call(e,c[d])&&(l[c[d]]=e[c[d]]);return l};let useRemoveAllNotifications=(e={})=>{var{onSuccess:n}=e,l=useRemoveAllNotifications_rest(e,["onSuccess"]);let c=useQueryClient(),{apiService:d}=(0,iG.i)(),f=useFetchNotificationsQueryKey(),y=useMutation(({feedId:e})=>d.removeAllMessages(e),Object.assign(Object.assign({},l),{onSuccess:(e,l,d)=>{c.refetchQueries(f,{exact:!1}),null==n||n(e,l,d)}})),{mutate:g}=y,b=useRemoveAllNotifications_rest(y,["mutate"]);return Object.assign(Object.assign({},b),{removeAllNotifications:g})};var useMarkNotificationsAs_rest=function(e,n){var l={};for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&0>n.indexOf(c)&&(l[c]=e[c]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var d=0,c=Object.getOwnPropertySymbols(e);d<c.length;d++)0>n.indexOf(c[d])&&Object.prototype.propertyIsEnumerable.call(e,c[d])&&(l[c[d]]=e[c[d]]);return l};let useMarkNotificationsAs=(e={})=>{var{onSuccess:n,query:l}=e,c=useMarkNotificationsAs_rest(e,["onSuccess","query"]);let d=useQueryClient(),{apiService:f}=(0,iG.i)(),y=useFetchNotificationsQueryKey(),g=useMutation(({messageId:e,seen:n,read:l})=>f.markMessageAs(e,{seen:n,read:l}),Object.assign(Object.assign({},c),{onSuccess:(e,l,c)=>{d.setQueriesData({queryKey:y,exact:!1},n=>{if(!n)return;let l=n.pages.map(n=>{let l=n.data.map(n=>{let l=e.find(e=>e._id===n._id);return l||n});return Object.assign(Object.assign({},n),{data:l})});return{pageParams:n.pageParams,pages:l}}),null==n||n(e,l,c)}})),{mutate:b}=g,N=useMarkNotificationsAs_rest(g,["mutate"]);return Object.assign(Object.assign({},N),{markNotificationsAs:b})};var useMarkNotificationAsRead_rest=function(e,n){var l={};for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&0>n.indexOf(c)&&(l[c]=e[c]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var d=0,c=Object.getOwnPropertySymbols(e);d<c.length;d++)0>n.indexOf(c[d])&&Object.prototype.propertyIsEnumerable.call(e,c[d])&&(l[c[d]]=e[c[d]]);return l};let useMarkNotificationsAsRead=(e={})=>{var{onSuccess:n}=e,l=useMarkNotificationAsRead_rest(e,["onSuccess"]);let c=useQueryClient(),{apiService:d}=(0,iG.i)(),f=useFetchNotificationsQueryKey(),y=useMutation(({feedId:e})=>d.markAllMessagesAsRead(e),Object.assign(Object.assign({},l),{onSuccess:(e,l,d)=>{c.setQueriesData({queryKey:f,exact:!1},e=>{let n=e.pages.map(e=>{let n=e.data.map(e=>Object.assign(Object.assign({},e),{read:!0,seen:!0}));return Object.assign(Object.assign({},e),{data:n})});return{pageParams:e.pageParams,pages:n}}),null==n||n(e,l,d)}})),{mutate:g}=y,b=useMarkNotificationAsRead_rest(y,["mutate"]);return Object.assign(Object.assign({},b),{markNotificationsAsRead:g})};var useMarkNotificationAsSeen_rest=function(e,n){var l={};for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&0>n.indexOf(c)&&(l[c]=e[c]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var d=0,c=Object.getOwnPropertySymbols(e);d<c.length;d++)0>n.indexOf(c[d])&&Object.prototype.propertyIsEnumerable.call(e,c[d])&&(l[c[d]]=e[c[d]]);return l};let useMarkNotificationsAsSeen=(e={})=>{var{onSuccess:n,query:l}=e,c=useMarkNotificationAsSeen_rest(e,["onSuccess","query"]);let d=useQueryClient(),{apiService:f}=(0,iG.i)(),y=useFetchNotificationsQueryKey(),g=useMutation(({feedId:e})=>f.markAllMessagesAsSeen(e),Object.assign(Object.assign({},c),{onSuccess:(e,l,c)=>{d.setQueriesData({queryKey:y,exact:!1},e=>{let n=e.pages.map(e=>{let n=e.data.map(e=>Object.assign(Object.assign({},e),{read:!1,seen:!0}));return Object.assign(Object.assign({},e),{data:n})});return{pageParams:e.pageParams,pages:n}}),null==n||n(e,l,c)}})),{mutate:b}=g,N=useMarkNotificationAsSeen_rest(g,["mutate"]);return Object.assign(Object.assign({},N),{markNotificationsAsSeen:b})},StoreProvider=({children:e,stores:n})=>{var l;let c=n[0],[d,f]=(0,tC.useState)(()=>{var e;return null!==(e=c.query)&&void 0!==e?e:{}}),[y,g]=(0,tC.useState)(null!==(l=c.storeId)&&void 0!==l?l:"default_store"),b=(0,tC.useCallback)(e=>{var l;let c=(null===(l=null==n?void 0:n.find(n=>n.storeId===e))||void 0===l?void 0:l.query)||{};g(e),f(c)},[n,g,f]),N=(0,tC.useMemo)(()=>({storeQuery:d,storeId:y,stores:n,setStore:b}),[d,y,n,b]);return tC.createElement(iX.Provider,{value:N},e)},i2=[{storeId:"default_store"}];function NotificationsProvider({children:e,stores:n=i2}){return tC.createElement(StoreProvider,{stores:n},tC.createElement(NotificationsProviderInternal,null,e))}function NotificationsProviderInternal({children:e}){let{storeQuery:n,storeId:l,stores:c,setStore:d}=useStore(),{data:f,hasNextPage:y,isLoading:g,isFetching:b,isFetchingNextPage:N,fetchNextPage:k,refetch:S}=useFetchNotifications({query:n}),{data:A}=useUnseenCount(),{data:E}=useUnreadCount(),{markNotificationsAs:R}=useMarkNotificationsAs(),{removeNotification:w}=useRemoveNotification(),{removeAllNotifications:O}=useRemoveAllNotifications(),{markNotificationsAsRead:_}=useMarkNotificationsAsRead(),{markNotificationsAsSeen:C}=useMarkNotificationsAsSeen(),P=(0,tC.useCallback)(e=>R({messageId:e,seen:!0,read:!0}),[R]),x=(0,tC.useCallback)(e=>R({messageId:e,seen:!0,read:!1}),[R]),B=(0,tC.useCallback)(e=>w({messageId:e}),[w]),U=(0,tC.useCallback)(e=>O({feedId:e}),[O]),L=(0,tC.useCallback)(()=>{_({feedId:null==n?void 0:n.feedIdentifier})},[_,null==n?void 0:n.feedIdentifier]),F=(0,tC.useCallback)(()=>{C({feedId:null==n?void 0:n.feedIdentifier})},[C,null==n?void 0:n.feedIdentifier]),K=(0,tC.useCallback)(e=>R({messageId:e,seen:!0,read:!1}),[R]),Q=(0,tC.useCallback)(()=>{if(!f)return;let e=f.pages.reduce((e,n)=>{let l=n.data.filter(e=>!e.read).map(e=>e._id);return[...e,...l]},[]);e.length>0&&R({messageId:e,seen:!0,read:!0})},[R,f]),z=(0,tC.useCallback)(()=>{if(!f)return;let e=f.pages.reduce((e,n)=>{let l=n.data.filter(e=>!e.seen&&!e.read).map(e=>e._id);return[...e,...l]},[]);e.length>0&&R({messageId:e,seen:!0,read:!1})},[R,f]),H=(0,tC.useMemo)(()=>null==f?void 0:f.pages.reduce((e,n)=>[...e,...n.data],[]),[f]),V=(0,tC.useMemo)(()=>{var e,f;return{storeQuery:n,storeId:l,stores:c,unseenCount:null!==(e=null==A?void 0:A.count)&&void 0!==e?e:0,unreadCount:null!==(f=null==E?void 0:E.count)&&void 0!==f?f:0,notifications:H,hasNextPage:y,isLoading:g,isFetching:b,isFetchingNextPage:N,setStore:d,fetchNextPage:k,refetch:S,markNotificationAsSeen:K,markNotificationAsRead:P,markNotificationAsUnRead:x,markFetchedNotificationsAsRead:Q,markFetchedNotificationsAsSeen:z,removeMessage:B,removeAllMessages:U,markAllNotificationsAsRead:L,markAllNotificationsAsSeen:F}},[n,l,c,null==A?void 0:A.count,null==E?void 0:E.count,H,y,g,b,N,d,k,S,K,P,x,Q,z,B,U,L,F]);return tC.createElement(iF.Provider,{value:V},e)}var i6=l(47282);let i8={af:{translations:{notifications:"Kennisgewings",markAllAsRead:"Merk alles as gelees",poweredBy:"Aangedryf deur",settings:"Instellings",noNewNotification:"Nog niks nuuts om hier te sien nie"},lang:"af"},am:{translations:{notifications:"ማሳወቂያዎች",markAllAsRead:"ሁሉንም እንደተነበቡ ምልክት ያድርጉበት",poweredBy:"የተጎላበተ በ",settings:"ቅንብሮች",noNewNotification:"እዚህ ገና የሚታይ አዲስ ነገር የለም።"},lang:"am"},ar:{translations:{notifications:"إشعارات",markAllAsRead:"اشر عليها بانها قرات",poweredBy:"مشغل بواسطة",settings:"الإعدادات",noNewNotification:"لا يوجد شيء جديد تراه هنا حتى الآن"},lang:"ar"},as:{translations:{notifications:"জাননীসমূহ",markAllAsRead:"সকলো পঢ়া হিচাপে চিহ্নিত কৰক",poweredBy:"দ্বাৰা সমৰ্থিত",settings:"ছেটিংছ",noNewNotification:"ইয়াত এতিয়াও নতুন একো দেখা নাই"},lang:"as"},az:{translations:{notifications:"Bildirişlər",markAllAsRead:"Hamısını oxunmuş olaraq işarələ",poweredBy:"tərəfindən təchiz edilmişdir",settings:"Parametrlər",noNewNotification:"Hələ burada g\xf6rmək \xfc\xe7\xfcn yeni he\xe7 nə yoxdur"},lang:"az"},be:{translations:{notifications:"Паведамленнi",markAllAsRead:"Пазначыць усе як прачытаныя",poweredBy:"Пры падтрымцы",settings:"Налады",noNewNotification:"Тут пакуль няма нічога новага"},lang:"be"},bg:{translations:{notifications:"известия",markAllAsRead:"маркирай всички като прочетени",poweredBy:"задвижвани от",settings:"настройки",noNewNotification:"Все още няма нищо ново за гледане тук"},lang:"bg"},bh:{translations:{notifications:"सूचनाएं",markAllAsRead:"सभी को पढ़ा हुआ चिन्हित करें",poweredBy:"द्वारा संचालित",settings:"सेटिंग्स",noNewNotification:"यहां अभी कुछ नया देखने को नहीं मिला है"},lang:"bh"},bn:{translations:{notifications:"নোটিফিকেশন",markAllAsRead:"সবগুলো পড়া হয়েছে",poweredBy:"পাওয়ার্ড বাই",settings:"সেটিংস",noNewNotification:"এখানে এখনো নতুন কিছু দেখার নেই"},lang:"bn"},bs:{translations:{notifications:"Obavještenja",markAllAsRead:"Označi sve kao pročitano",poweredBy:"Pokreće",settings:"Postavke",noNewNotification:"Ovdje još nema ništa novo za vidjeti"},lang:"bs"},ca:{translations:{notifications:"Notificacions",markAllAsRead:"marcar tot com a llegit",poweredBy:"Amb la tecnologia de",settings:"Configuraci\xf3",noNewNotification:"Encara no hi ha res nou per veure aqu\xed"},lang:"ca"},cs:{translations:{notifications:"Ozn\xe1men\xed",markAllAsRead:"Označit všechna jako přečten\xe1",poweredBy:"Přin\xe1š\xed",settings:"Nastaven\xed",noNewNotification:"Zat\xedm tu nen\xed nic nov\xe9ho k viděn\xed"},lang:"cs"},da:{translations:{notifications:"Meddelelser",markAllAsRead:"Mark\xe9r alle som l\xe6st",poweredBy:"Drevet af",settings:"Indstillinger",noNewNotification:"Intet nyt at se her endnu"},lang:"da"},de:{translations:{notifications:"Benachrichtigungen",markAllAsRead:"Alle als gelesen markieren",poweredBy:"von",settings:"Einstellungen",noNewNotification:"Hier gibt es noch nichts Neues zu sehen"},lang:"de"},el:{translations:{notifications:"ειδοποιήσεις",markAllAsRead:"επισημάνετε όλα ως αναγνωσμένα",poweredBy:"τροφοδοτείται από",settings:"Ρυθμίσεις",noNewNotification:"Δεν υπάρχει τίποτα νέο να δείτε εδώ ακόμα"},lang:"el"},en:{translations:{notifications:"Notifications",markAllAsRead:"Mark all as read",poweredBy:"Powered By",settings:"Settings",removeMessage:"Remove Message",markAsRead:"Mark as Read",markAsUnRead:"Mark as Unread",noNewNotification:"Nothing new to see here yet"},lang:"en"},es:{translations:{notifications:"Notificaciones",markAllAsRead:"Marcar todo como le\xeddo",poweredBy:"Con tecnolog\xeda de",settings:"Configuraci\xf3n",removeMessage:"Eliminar mensaje",markAsRead:"Marcar como le\xeddo",markAsUnRead:"Marcar como no le\xeddo",noNewNotification:"Nada nuevo por aqu\xed"},lang:"es"},eu:{translations:{notifications:"Notificacionespenak",markAllAsRead:"Markatu guztiak irakurrita bezala",poweredBy:"Bultzatuta",settings:"Ezarpenak",noNewNotification:"Oraindik ez dago ezer berririk hemen ikusteko"},lang:"eu"},fa:{translations:{notifications:"اطلاعیه",markAllAsRead:"همه را به عنوان خوانده شده علامت بزن",poweredBy:"پشتیبانی شده توسط",settings:"تنظيمات",noNewNotification:"هنوز چیز جدیدی برای دیدن اینجا وجود ندارد"},lang:"fa"},fi:{translations:{notifications:"Ilmoitukset",markAllAsRead:"Merkkaa luetuksi",poweredBy:"Ilmoitukset mahdollistaa",settings:"Asetukset",noNewNotification:"T\xe4\xe4ll\xe4 ei ole viel\xe4 mit\xe4\xe4n uutta n\xe4ht\xe4v\xe4\xe4"},lang:"fi"},fr:{translations:{notifications:"Notifications",markAllAsRead:"Tout marquer comme lus",poweredBy:"Propuls\xe9 par",settings:"Param\xe8tres",noNewNotification:"Rien de nouveau \xe0 voir ici pour le moment"},lang:"fr"},ga:{translations:{notifications:"F\xf3gra\xed",markAllAsRead:"Marc\xe1il go l\xe9ir mar a l\xe9itear",poweredBy:"Cumhachtaithe ag",settings:"Socruithe",noNewNotification:"N\xedl aon rud nua le feice\xe1il anseo f\xf3s"},lang:"ga"},gl:{translations:{notifications:"Notificaci\xf3ns",markAllAsRead:"Marcar todo coma lido",poweredBy:"Coa tecnolox\xeda de",settings:"Axustes",noNewNotification:"A\xednda non hai nada novo que ver aqu\xed"},lang:"gl"},gu:{translations:{notifications:"સૂચના",markAllAsRead:"બધાને વાંચેલા તરીકે ચિહ્નિત કરો",poweredBy:"દ્વારા સંચાલિત",settings:"સેટિંગ્સ",noNewNotification:"હજુ સુધી અહીં જોવા માટે કંઈ નવું નથી"},lang:"gu"},he:{translations:{notifications:"התראות",markAllAsRead:"סמן הכל כנקרא",poweredBy:"נתמך על ידי",settings:"הגדרות",noNewNotification:"אין שום דבר חדש לראות כאן עדיין"},lang:"he"},hi:{translations:{notifications:"सूचनाएं",markAllAsRead:"सभी को पढ़ा हुआ चिन्हित करें",poweredBy:"द्वारा संचालित",settings:"सेटिंग्स",noNewNotification:"यहां अभी कुछ नया देखने को नहीं मिला है"},lang:"hi"},hr:{translations:{notifications:"Obavijesti",markAllAsRead:"Označi sve kao pročitano",poweredBy:"Uz podršku",settings:"Postavke",noNewNotification:"Ovdje još nema ništa novo za vidjeti"},lang:"hr"},hu:{translations:{notifications:"\xe9rtes\xedt\xe9seket",markAllAsRead:"\xf6sszes megjel\xf6l\xe9se olvasottk\xe9nt",poweredBy:"t\xe1mogatta",settings:"be\xe1ll\xedt\xe1sok",noNewNotification:"Itt m\xe9g semmi \xfajat nem l\xe1tni"},lang:"hu"},hy:{translations:{notifications:"ծանուցումներ",markAllAsRead:"նշել բոլորը որպես կարդացված",poweredBy:"աջակցվում է",settings:"կարգավորումներ",noNewNotification:"Դեռևս այստեղ տեսնելու նոր բան չկա"},lang:"hy"},id:{translations:{notifications:"Notifikasi",markAllAsRead:"Tandai semua sudah dibaca",poweredBy:"Dipersembahkan Oleh",settings:"Pengaturan",noNewNotification:"Belum ada yang baru untuk dilihat di sini"},lang:"id"},ig:{translations:{notifications:"Ngosi",markAllAsRead:"kaa ihe niile ka agụlaha",poweredBy:"kwadoro site na",settings:"Mwube gasị",noNewNotification:"Ọnweghị ihe ọhụrụ ịhụ ebe a"},lang:"ig"},it:{translations:{notifications:"Notifiche",markAllAsRead:"Segna tutti come letti",poweredBy:"Offerto da",settings:"Impostazioni",noNewNotification:"Niente di nuovo da vedere qui ancora"},lang:"it"},ja:{translations:{notifications:"通知",markAllAsRead:"すべて既読にする",poweredBy:"搭載",settings:"設定",noNewNotification:"ここにはまだ新しいものはありません"},lang:"ja"},ka:{translations:{notifications:"ნოტიფიკაციები",markAllAsRead:"მონიშნე ყველა როგორც წაკითხული",poweredBy:"იკვებება ბყ",settings:"პარამეტრები",removeMessage:"შეტყობინების წაშლა",markAsRead:"წაკითხულად მონიშვნა",markAsUnRead:"წაუკითხავად მონიშვნა",noNewNotification:"აქ სანახავი ჯერ არაფერია ახალი"},lang:"ka"},kk:{translations:{notifications:"Хабарландырулар",markAllAsRead:"барлығын оқылған деп белгілеңіз",poweredBy:"задвижвани от",settings:"көмегімен",noNewNotification:"Мұнда әлі көретін жаңа ештеңе жоқМұнда әлі көретін жаңа ештеңе жоқ"},lang:"kk"},km:{translations:{notifications:"សារជូនដំណឹង",markAllAsRead:"បានអានទាំងអស់",poweredBy:"ដំណើរការដោយ",settings:"ការកំណត់",noNewNotification:"មិនមានអ្វីថ្មីដើម្បីមើលនៅទីនេះនៅឡើយទេ"},lang:"km"},kn:{translations:{notifications:"ಅಧಿಸೂಚನೆಗಳು",markAllAsRead:"ಎಲ್ಲವನ್ನು ಓದಲಾಗಿದೆ ಎಂದು ಗುರುತಿಸಿ",poweredBy:"ಮೂಲಕ ನಡೆಸಲ್ಪಡುತ್ತಿದೆ",settings:"ಸೆಟ್ಟಿಂಗ್ಸ್",noNewNotification:"ಹೊಸ ಅಧಿಸೂಚನೆ ಇಲ್ಲ"},lang:"kn"},ko:{translations:{notifications:"알림",markAllAsRead:"모두 읽은 상태로 표시",poweredBy:"에 의해 구동",settings:"설정",noNewNotification:"여기에는 아직 새로운 내용이 없습니다."},lang:"ko"},ku:{translations:{notifications:"ئاگادارکردنەوەکان",markAllAsRead:"هەموویان وەک خوێندراوێک نیشانە بکە",poweredBy:"بەهێزکراوە لەلایەن",settings:"دانانەوە",noNewNotification:"هێشتا هیچ شتێکی نوێ لێرە نابینرێت"},lang:"ku"},lo:{translations:{notifications:"ການແຈ້ງເຕືອນ",markAllAsRead:"ໝາຍທັງໝົດວ່າອ່ານແລ້ວ",poweredBy:"ສະ​ຫນັບ​ສະ​ຫນູນ​ໂດຍ",settings:"ການຕັ້ງຄ່າ",noNewNotification:"ບໍ່ມີຫຍັງໃໝ່ທີ່ຈະເຫັນຢູ່ທີ່ນີ້ເທື່ອ"},lang:"lo"},lt:{translations:{notifications:"Pranešimai",markAllAsRead:"Pažymėti visus kaip skaitytus",poweredBy:"Sukurta",settings:"Nustatymai",noNewNotification:"Čia dar nieko naujo nematyti"},lang:"lt"},lv:{translations:{notifications:"Paziņojumi",markAllAsRead:"Atzīmēt visus kā lasītus",poweredBy:"Izstrādāts",settings:"Iestatījumi",noNewNotification:"Šeit vēl nav nekā jauna, ko redzēt"},lang:"lv"},ml:{translations:{notifications:"അറിയിപ്പുകൾ",markAllAsRead:"എല്ലാം വായിച്ചതായി അടയാളപ്പെടുത്തുക",poweredBy:"പ്രായോജകർ",settings:"ക്രമീകരണങ്ങൾ",noNewNotification:"ഇവിടെ ഇതുവരെ പുതുതായി ഒന്നും കാണാനില്ല"},lang:"ml"},mr:{translations:{notifications:"अधिसूचना",markAllAsRead:"सर्व वाचलेले म्हणून चिन्हांकित करा",poweredBy:"द्वारे समर्थित",settings:"सेटिंग्ज",noNewNotification:"इथे अजून काही नवीन पाहण्यासारखे नाही"},lang:"mr"},ms:{translations:{notifications:"Pemberitahuan",markAllAsRead:"Tandakan semua sebagai telah dibaca",poweredBy:"Dikuasai oleh",settings:"Tetapan",noNewNotification:"Belum ada yang baru untuk dilihat di sini"},lang:"ms"},ne:{translations:{notifications:"सूचनाहरू",markAllAsRead:"सबै पढेको रूपमा चिन्ह लगाउनुहोस्",poweredBy:"द्वारा संचालित",settings:"सेटिङहरू",noNewNotification:"यहाँ हेर्न को लागी केहि नयाँ छैन"},lang:"ne"},nl:{translations:{notifications:"Notificaties",markAllAsRead:"Markeer alles als gelezen",poweredBy:"Aangedreven door",settings:"Instellingen",noNewNotification:"Hier is nog niets nieuws te zien"},lang:"nl"},nb:{translations:{notifications:"Varsler",markAllAsRead:"Marker alle som lest",poweredBy:"Drevet av",settings:"Innstillinger",removeMessage:"Fjern melding",markAsRead:"Merk som lest",markAsUnRead:"Merk som ulest",noNewNotification:"Ikke noe nytt \xe5 se her enn\xe5"},lang:"nb"},or:{translations:{notifications:"ବିଜ୍ଞପ୍ତି",markAllAsRead:"ସମସ୍ତଙ୍କୁ ପଢ଼ିଥିବା ପରି ଚିହ୍ନିତ କର",poweredBy:"ଦ୍ୱାରା ପରିଚାଳିତ",settings:"ସେଟିଂ",noNewNotification:"ଏପର୍ଯ୍ୟନ୍ତ ଦେଖିବାକୁ କିଛି ନୂଆ ନୁହେଁ |"},lang:"or"},pa:{translations:{notifications:"ਸੂਚਨਾਵਾਂ",markAllAsRead:" ਸਭ ਨੂੰ ਪੜ੍ਹਿਆ ਹੋਇਆ ਮਾਰਕ ਕਰੋ",poweredBy:"ਦੁਆਰਾ ਸੰਚਾਲਿਤ",settings:"ਸੈਟਿੰਗਾਂ",noNewNotification:"ਇੱਥੇ ਦੇਖਣ ਲਈ ਅਜੇ ਕੁਝ ਨਵਾਂ ਨਹੀਂ ਹੈ"},lang:"pa"},pl:{translations:{notifications:"Notyfikacje",markAllAsRead:"Oznacz wszystkie jako przeczytane",poweredBy:"Napędzany przez",settings:"Ustawienia",noNewNotification:"Nie ma tu jeszcze nic nowego do zobaczenia"},lang:"pl"},pt:{translations:{notifications:"Notifica\xe7\xf5es",markAllAsRead:"Marcar tudo como lido",poweredBy:"Desenvolvido por",settings:"Configura\xe7\xf5es",noNewNotification:"Nada de novo para ver aqui ainda"},lang:"pt"},ro:{translations:{notifications:"Notificări",markAllAsRead:"Marcheaza totul ca fiind citit",poweredBy:"Cu sprijinul",settings:"Setări",noNewNotification:"Nimic nou de văzut aici \xeencă"},lang:"ro"},ru:{translations:{notifications:"Уведомления",markAllAsRead:"Пометить все как прочитанные",poweredBy:"При поддержке",settings:"Настройки",noNewNotification:"Здесь пока ничего нового"},lang:"ru"},sa:{translations:{notifications:"अधिसूचनाः",markAllAsRead:"सर्वं पठितम् इति सूचनीयम्",poweredBy:"द्वारा संचालितः",settings:"संस्थापनम्",noNewNotification:"अत्र अद्यापि किमपि नूतनं द्रष्टुं न शक्यते"},lang:"sa"},sd:{translations:{notifications:"نوٽيفڪيشن",markAllAsRead:"سڀني کي پڙهيل طور نشان لڳايو",poweredBy:"پاران تيار ڪيل",settings:"سيٽنگون",noNewNotification:"هتي ڏسڻ لاءِ اڃا ڪجهه نئون ناهي"},lang:"sd"},si:{translations:{notifications:"දැනුම්දීම්",markAllAsRead:"සියල්ල කියවූ ලෙස ලකුණු කරන්න",poweredBy:"බලගැන්වීම",settings:"සැකසුම්",noNewNotification:"මෙතන තවම බලන්න අලුත් දෙයක් නෑ"},lang:"si"},sm:{translations:{notifications:"faasilasilaga",markAllAsRead:"faailoga Mea uma e pei ona Faitau",poweredBy:"fa amalosia ",settings:"faatulagaga",noNewNotification:"E leai se mea fou e va'ai iinei"},lang:"sm"},sq:{translations:{notifications:"Njoftimet",markAllAsRead:"Sh\xebnoni t\xeb gjitha si t\xeb lexuara",poweredBy:"Mund\xebsuar nga",settings:"Cil\xebsimet",noNewNotification:"Nuk ka asgj\xeb t\xeb re p\xebr t\xeb par\xeb k\xebtu ende"},lang:"sq"},sv:{translations:{notifications:"Meddelanden",markAllAsRead:"Markera alla som l\xe4sta",poweredBy:"Anv\xe4nder",settings:"Inst\xe4llningar",removeMessage:"Ta bort meddelande",markAsRead:"Markera som l\xe4st",markAsUnRead:"Markera som ol\xe4st",noNewNotification:"Inget nytt att se h\xe4r \xe4nnu"},lang:"sv"},ta:{translations:{notifications:"அறிவிப்புகள்",markAllAsRead:"அனைத்தையும் வாசிக்கப்பட்டதாக அடையாளமிடு",poweredBy:"மூலம் இயக்கப்படுகிறது",settings:"செட்டிங்ஸ்",noNewNotification:"இதுவரை இங்கு பார்க்க புதிதாக எதுவும் இல்லை"},lang:"ta"},te:{translations:{notifications:"నోటిఫికేషన్‌లు",markAllAsRead:"అన్నీచదివినట్లుగా సూచించు",poweredBy:"ద్వారా ఆధారితం",settings:"సెట్టింగ్‌లు",noNewNotification:"ఇంకా ఇక్కడ చూడడానికి కొత్తగా ఏమీ లేదు"},lang:"te"},th:{translations:{notifications:"การแจ้งเตือน",markAllAsRead:"ทำเครื่องหมายทั้งหมดว่าอ่านแล้ว",poweredBy:"ขับเคลื่อนโดย",settings:"การตั้งค่า",noNewNotification:"ยังไม่มีอะไรใหม่ให้ดูที่นี่"},lang:"th"},tl:{translations:{notifications:"Notipikasyon",markAllAsRead:"Markahan ang lahat bilang nabasa",poweredBy:"Pinagagana ng",settings:"Settings",noNewNotification:"Wala pang bagong makikita dito"},lang:"tl"},tr:{translations:{notifications:"Bildirimler",markAllAsRead:"Hepsini okundu olarak işaretle",poweredBy:"Tarafından desteklenmektedir",settings:"Ayarlar",noNewNotification:"Burada hen\xfcz g\xf6r\xfclecek yeni bir şey yok"},lang:"tr"},uk:{translations:{notifications:"Сповіщення",markAllAsRead:"Позначити все як прочитані",poweredBy:"На підтримці",settings:"Налаштування",noNewNotification:"Тут ще немає нічого нового"},lang:"uk"},ur:{translations:{notifications:"اطلاع",markAllAsRead:"سب کو پڑھا ہوا شمار کریں",poweredBy:"طاقت کے ذریعے",settings:"ترتیبات",noNewNotification:"ابھی تک یہاں دیکھنے کے لیے کچھ نیا نہیں ہے۔"},lang:"ur"},uz:{translations:{notifications:"Bildirishnomalar",markAllAsRead:"Hammasini o'qing deb belgilang",poweredBy:"Tomonidan qo'llab-quvvatlanadi",settings:"Sozlamalar",noNewNotification:"Bu yerda hali ko'rish uchun yangi narsa yo'q"},lang:"uz"},vi:{translations:{notifications:"Th\xf4ng b\xe1o",markAllAsRead:"đ\xe1nh dấu tất cả như đ\xe3 đọc",poweredBy:"Được cung cấp bởi",settings:"C\xe0i đặt",noNewNotification:"Chưa c\xf3 g\xec mới để xem ở đ\xe2y"},lang:"vi"},zh:{translations:{notifications:"通知",markAllAsRead:"将所有标记为已读",poweredBy:"技术支持",settings:"设置",noNewNotification:"这里还没有什么新东西可看"},lang:"zh"},zu:{translations:{notifications:"Izaziso",markAllAsRead:"Maka konke njengokufundiwe",poweredBy:"Inikezwe amandla yi",settings:"Izilungiselelo",noNewNotification:"Akukho okusha ongakubona lapha okwamanje"},lang:"zu"},ba:{translations:{notifications:"Иҫкәрмәләр",markAllAsRead:"Барыһын да уҡылғанса тамғалағыҙ",poweredBy:"Эшләй",settings:"Көйләүҙәре",noNewNotification:"Монда әле яңа нәрсә юк"},lang:"ba"}};var i18n_context_rest=function(e,n){var l={};for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&0>n.indexOf(c)&&(l[c]=e[c]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var d=0,c=Object.getOwnPropertySymbols(e);d<c.length;d++)0>n.indexOf(c[d])&&Object.prototype.propertyIsEnumerable.call(e,c[d])&&(l[c[d]]=e[c[d]]);return l};let i3=tC.createContext({translations:{markAllAsRead:"",notifications:"",poweredBy:"",settings:"",removeMessage:"",markAsRead:"",markAsUnRead:""},lang:""});function NovuI18NProvider(e){var{i18n:n="en"}=e,l=i18n_context_rest(e,["i18n"]);let c=tC.useMemo(()=>"string"==typeof n?{translations:i8[n].translations,lang:n}:n,[n]);return tC.createElement(i3.Provider,Object.assign({},l,{value:c}))}let i9=(0,tC.createContext)(void 0),StylesProvider=({styles:e,children:n})=>{let l=(0,tC.useMemo)(()=>({styles:e}),[e]);return tC.createElement(i9.Provider,{value:l},n)},i5="widget_user_auth_token",i7="undefined"!=typeof window,getToken=()=>i7?localStorage.getItem(i5):null,removeToken=e=>{i7&&localStorage.removeItem(i5),e.disposeAuthorizationToken()},applyToken=({token:e=getToken(),apiService:n})=>{e?(i7&&localStorage.setItem(i5,e),n.setAuthorizationToken(e)):removeToken(n)},useSession=({onSuccess:e})=>{let{apiService:n,applicationIdentifier:l,subscriberId:c,subscriberHash:d}=(0,iG.i)(),f=useQuery([...iH,l,c,d],()=>n.initializeSession(l,c,d),{enabled:!!l&&!!c,cacheTime:1/0,staleTime:1/0,onSuccess:e,onError:e=>{console.error("Failed to initialize the session",e.message)}});return f},se=Object.create(null);se.open="0",se.close="1",se.ping="2",se.pong="3",se.message="4",se.upgrade="5",se.noop="6";let st=Object.create(null);Object.keys(se).forEach(e=>{st[se[e]]=e});let si={type:"error",data:"parser error"},ss="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),sn="function"==typeof ArrayBuffer,isView=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,encodePacket=({type:e,data:n},l,c)=>ss&&n instanceof Blob?l?c(n):encodeBlobAsBase64(n,c):sn&&(n instanceof ArrayBuffer||isView(n))?l?c(n):encodeBlobAsBase64(new Blob([n]),c):c(se[e]+(n||"")),encodeBlobAsBase64=(e,n)=>{let l=new FileReader;return l.onload=function(){let e=l.result.split(",")[1];n("b"+(e||""))},l.readAsDataURL(e)};function toArray(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function encodePacketToBinary(e,n){return ss&&e.data instanceof Blob?e.data.arrayBuffer().then(toArray).then(n):sn&&(e.data instanceof ArrayBuffer||isView(e.data))?n(toArray(e.data)):void encodePacket(e,!1,e=>{c||(c=new TextEncoder),n(c.encode(e))})}let sr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sa="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let e=0;e<sr.length;e++)sa[sr.charCodeAt(e)]=e;let decode=e=>{let n=.75*e.length,l=e.length,c,d=0,f,y,g,b;"="===e[e.length-1]&&(n--,"="===e[e.length-2]&&n--);let N=new ArrayBuffer(n),k=new Uint8Array(N);for(c=0;c<l;c+=4)f=sa[e.charCodeAt(c)],y=sa[e.charCodeAt(c+1)],g=sa[e.charCodeAt(c+2)],b=sa[e.charCodeAt(c+3)],k[d++]=f<<2|y>>4,k[d++]=(15&y)<<4|g>>2,k[d++]=(3&g)<<6|63&b;return N},so="function"==typeof ArrayBuffer,decodePacket=(e,n)=>{if("string"!=typeof e)return{type:"message",data:mapBinary(e,n)};let l=e.charAt(0);if("b"===l)return{type:"message",data:decodeBase64Packet(e.substring(1),n)};let c=st[l];return c?e.length>1?{type:st[l],data:e.substring(1)}:{type:st[l]}:si},decodeBase64Packet=(e,n)=>{if(!so)return{base64:!0,data:e};{let l=decode(e);return mapBinary(l,n)}},mapBinary=(e,n)=>"blob"===n?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,encodePayload=(e,n)=>{let l=e.length,c=Array(l),d=0;e.forEach((e,f)=>{encodePacket(e,!1,e=>{c[f]=e,++d===l&&n(c.join("\x1e"))})})},decodePayload=(e,n)=>{let l=e.split("\x1e"),c=[];for(let e=0;e<l.length;e++){let d=decodePacket(l[e],n);if(c.push(d),"error"===d.type)break}return c};function createPacketEncoderStream(){return new TransformStream({transform(e,n){encodePacketToBinary(e,l=>{let c;let d=l.length;if(d<126)c=new Uint8Array(1),new DataView(c.buffer).setUint8(0,d);else if(d<65536){c=new Uint8Array(3);let e=new DataView(c.buffer);e.setUint8(0,126),e.setUint16(1,d)}else{c=new Uint8Array(9);let e=new DataView(c.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(d))}e.data&&"string"!=typeof e.data&&(c[0]|=128),n.enqueue(c),n.enqueue(l)})}})}function totalLength(e){return e.reduce((e,n)=>e+n.length,0)}function concatChunks(e,n){if(e[0].length===n)return e.shift();let l=new Uint8Array(n),c=0;for(let d=0;d<n;d++)l[d]=e[0][c++],c===e[0].length&&(e.shift(),c=0);return e.length&&c<e[0].length&&(e[0]=e[0].slice(c)),l}function createPacketDecoderStream(e,n){d||(d=new TextDecoder);let l=[],c=0,f=-1,y=!1;return new TransformStream({transform(g,b){for(l.push(g);;){if(0===c){if(1>totalLength(l))break;let e=concatChunks(l,1);y=(128&e[0])==128,c=(f=127&e[0])<126?3:126===f?1:2}else if(1===c){if(2>totalLength(l))break;let e=concatChunks(l,2);f=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),c=3}else if(2===c){if(8>totalLength(l))break;let e=concatChunks(l,8),n=new DataView(e.buffer,e.byteOffset,e.length),d=n.getUint32(0);if(d>2097151){b.enqueue(si);break}f=4294967296*d+n.getUint32(4),c=3}else{if(totalLength(l)<f)break;let e=concatChunks(l,f);b.enqueue(decodePacket(y?e:d.decode(e),n)),c=0}if(0===f||f>e){b.enqueue(si);break}}}})}function Emitter(e){if(e)return mixin(e)}function mixin(e){for(var n in Emitter.prototype)e[n]=Emitter.prototype[n];return e}Emitter.prototype.on=Emitter.prototype.addEventListener=function(e,n){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(n),this},Emitter.prototype.once=function(e,n){function on(){this.off(e,on),n.apply(this,arguments)}return on.fn=n,this.on(e,on),this},Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(e,n){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var l,c=this._callbacks["$"+e];if(!c)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var d=0;d<c.length;d++)if((l=c[d])===n||l.fn===n){c.splice(d,1);break}return 0===c.length&&delete this._callbacks["$"+e],this},Emitter.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var n=Array(arguments.length-1),l=this._callbacks["$"+e],c=1;c<arguments.length;c++)n[c-1]=arguments[c];if(l){l=l.slice(0);for(var c=0,d=l.length;c<d;++c)l[c].apply(this,n)}return this},Emitter.prototype.emitReserved=Emitter.prototype.emit,Emitter.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Emitter.prototype.hasListeners=function(e){return!!this.listeners(e).length};let sl="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function pick(e,...n){return n.reduce((n,l)=>(e.hasOwnProperty(l)&&(n[l]=e[l]),n),{})}let sc=sl.setTimeout,su=sl.clearTimeout;function installTimerFunctions(e,n){n.useNativeTimers?(e.setTimeoutFn=sc.bind(sl),e.clearTimeoutFn=su.bind(sl)):(e.setTimeoutFn=sl.setTimeout.bind(sl),e.clearTimeoutFn=sl.clearTimeout.bind(sl))}function byteLength(e){return"string"==typeof e?utf8Length(e):Math.ceil(1.33*(e.byteLength||e.size))}function utf8Length(e){let n=0,l=0;for(let c=0,d=e.length;c<d;c++)(n=e.charCodeAt(c))<128?l+=1:n<2048?l+=2:n<55296||n>=57344?l+=3:(c++,l+=4);return l}function parseqs_encode(e){let n="";for(let l in e)e.hasOwnProperty(l)&&(n.length&&(n+="&"),n+=encodeURIComponent(l)+"="+encodeURIComponent(e[l]));return n}function parseqs_decode(e){let n={},l=e.split("&");for(let e=0,c=l.length;e<c;e++){let c=l[e].split("=");n[decodeURIComponent(c[0])]=decodeURIComponent(c[1])}return n}let TransportError=class TransportError extends Error{constructor(e,n,l){super(e),this.description=n,this.context=l,this.type="TransportError"}};let Transport=class Transport extends Emitter{constructor(e){super(),this.writable=!1,installTimerFunctions(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,n,l){return super.emitReserved("error",new TransportError(e,n,l)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return("opening"===this.readyState||"open"===this.readyState)&&(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let n=decodePacket(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){let e=this.opts.hostname;return -1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){let n=parseqs_encode(e);return n.length?"?"+n:""}};let sd="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),sh={},sp=0,sf=0,sy;function yeast_encode(e){let n="";do n=sd[e%64]+n,e=Math.floor(e/64);while(e>0);return n}function yeast(){let e=yeast_encode(+new Date);return e!==sy?(sp=0,sy=e):e+"."+yeast_encode(sp++)}for(;sf<64;sf++)sh[sd[sf]]=sf;let sm=!1;try{sm="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){}let sg=sm;function XHR(e){let n=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!n||sg))return new XMLHttpRequest}catch(e){}if(!n)try{return new sl[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(e){}}function createCookieJar(){}function empty(){}let sv=function(){let e=new XHR({xdomain:!1});return null!=e.responseType}();let Polling=class Polling extends Transport{constructor(e){if(super(e),this.polling=!1,"undefined"!=typeof location){let n="https:"===location.protocol,l=location.port;l||(l=n?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||l!==e.port}let n=e&&e.forceBase64;this.supportsBinary=sv&&!n,this.opts.withCredentials&&(this.cookieJar=createCookieJar())}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";let pause=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let e=0;this.polling&&(e++,this.once("pollComplete",function(){--e||pause()})),this.writable||(e++,this.once("drain",function(){--e||pause()}))}else pause()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){decodePayload(e,this.socket.binaryType).forEach(e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)}),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){let close=()=>{this.write([{type:"close"}])};"open"===this.readyState?close():this.once("open",close)}write(e){this.writable=!1,encodePayload(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",n=this.query||{};return!1!==this.opts.timestampRequests&&(n[this.opts.timestampParam]=yeast()),this.supportsBinary||n.sid||(n.b64=1),this.createUri(e,n)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Request(this.uri(),e)}doWrite(e,n){let l=this.request({method:"POST",data:e});l.on("success",n),l.on("error",(e,n)=>{this.onError("xhr post error",e,n)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(e,n)=>{this.onError("xhr poll error",e,n)}),this.pollXhr=e}};let Request=class Request extends Emitter{constructor(e,n){super(),installTimerFunctions(this,n),this.opts=n,this.method=n.method||"GET",this.uri=e,this.data=void 0!==n.data?n.data:null,this.create()}create(){var e;let n=pick(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;let l=this.xhr=new XHR(n);try{l.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders)for(let e in l.setDisableHeaderCheck&&l.setDisableHeaderCheck(!0),this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(e)&&l.setRequestHeader(e,this.opts.extraHeaders[e])}catch(e){}if("POST"===this.method)try{l.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{l.setRequestHeader("Accept","*/*")}catch(e){}null===(e=this.opts.cookieJar)||void 0===e||e.addCookies(l),"withCredentials"in l&&(l.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(l.timeout=this.opts.requestTimeout),l.onreadystatechange=()=>{var e;3===l.readyState&&(null===(e=this.opts.cookieJar)||void 0===e||e.parseCookies(l)),4===l.readyState&&(200===l.status||1223===l.status?this.onLoad():this.setTimeoutFn(()=>{this.onError("number"==typeof l.status?l.status:0)},0))},l.send(this.data)}catch(e){this.setTimeoutFn(()=>{this.onError(e)},0);return}"undefined"!=typeof document&&(this.index=Request.requestsCount++,Request.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=empty,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete Request.requests[this.index],this.xhr=null}}onLoad(){let e=this.xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};if(Request.requestsCount=0,Request.requests={},"undefined"!=typeof document){if("function"==typeof attachEvent)attachEvent("onunload",unloadHandler);else if("function"==typeof addEventListener){let e="onpagehide"in sl?"pagehide":"unload";addEventListener(e,unloadHandler,!1)}}function unloadHandler(){for(let e in Request.requests)Request.requests.hasOwnProperty(e)&&Request.requests[e].abort()}let sb=(()=>{let e="function"==typeof Promise&&"function"==typeof Promise.resolve;return e?e=>Promise.resolve().then(e):(e,n)=>n(e,0)})(),sN=sl.WebSocket||sl.MozWebSocket;l(79638).lW;let sk="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();let WS=class WS extends Transport{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;let e=this.uri(),n=this.opts.protocols,l=sk?{}:pick(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(l.headers=this.opts.extraHeaders);try{this.ws=sk?new sN(e,n,l):n?new sN(e,n):new sN(e)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){let l=e[n],c=n===e.length-1;encodePacket(l,this.supportsBinary,e=>{try{this.ws.send(e)}catch(e){}c&&sb(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=yeast()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}check(){return!!sN}};let WT=class WT extends Transport{get name(){return"webtransport"}doOpen(){"function"==typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(e=>{let n=createPacketDecoderStream(Number.MAX_SAFE_INTEGER,this.socket.binaryType),l=e.readable.pipeThrough(n).getReader(),c=createPacketEncoderStream();c.readable.pipeTo(e.writable),this.writer=c.writable.getWriter();let read=()=>{l.read().then(({done:e,value:n})=>{e||(this.onPacket(n),read())}).catch(e=>{})};read();let d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this.writer.write(d).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let n=0;n<e.length;n++){let l=e[n],c=n===e.length-1;this.writer.write(l).then(()=>{c&&sb(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null===(e=this.transport)||void 0===e||e.close()}};let sS={websocket:WS,webtransport:WT,polling:Polling},sA=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,sE=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function parse(e){if(e.length>2e3)throw"URI too long";let n=e,l=e.indexOf("["),c=e.indexOf("]");-1!=l&&-1!=c&&(e=e.substring(0,l)+e.substring(l,c).replace(/:/g,";")+e.substring(c,e.length));let d=sA.exec(e||""),f={},y=14;for(;y--;)f[sE[y]]=d[y]||"";return -1!=l&&-1!=c&&(f.source=n,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=pathNames(f,f.path),f.queryKey=queryKey(f,f.query),f}function pathNames(e,n){let l=n.replace(/\/{2,9}/g,"/").split("/");return("/"==n.slice(0,1)||0===n.length)&&l.splice(0,1),"/"==n.slice(-1)&&l.splice(l.length-1,1),l}function queryKey(e,n){let l={};return n.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,n,c){n&&(l[n]=c)}),l}let Socket=class Socket extends Emitter{constructor(e,n={}){super(),this.binaryType="arraybuffer",this.writeBuffer=[],e&&"object"==typeof e&&(n=e,e=null),e?(e=parse(e),n.hostname=e.host,n.secure="https"===e.protocol||"wss"===e.protocol,n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=parse(n.host).host),installTimerFunctions(this,n),this.secure=null!=n.secure?n.secure:"undefined"!=typeof location&&"https:"===location.protocol,n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=n.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=parseqs_decode(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){let n=Object.assign({},this.opts.query);n.EIO=4,n.transport=e,this.id&&(n.sid=this.id);let l=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new sS[e](l)}open(){let e;if(this.opts.rememberUpgrade&&Socket.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else if(0===this.transports.length){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch(e){this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",e=>this.onClose("transport close",e))}probe(e){let n=this.createTransport(e),l=!1;Socket.priorWebsocketSuccess=!1;let onTransportOpen=()=>{l||(n.send([{type:"ping",data:"probe"}]),n.once("packet",e=>{if(!l){if("pong"===e.type&&"probe"===e.data)this.upgrading=!0,this.emitReserved("upgrading",n),n&&(Socket.priorWebsocketSuccess="websocket"===n.name,this.transport.pause(()=>{l||"closed"===this.readyState||(cleanup(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())}));else{let e=Error("probe error");e.transport=n.name,this.emitReserved("upgradeError",e)}}}))};function freezeTransport(){l||(l=!0,cleanup(),n.close(),n=null)}let onerror=e=>{let l=Error("probe error: "+e);l.transport=n.name,freezeTransport(),this.emitReserved("upgradeError",l)};function onTransportClose(){onerror("transport closed")}function onclose(){onerror("socket closed")}function onupgrade(e){n&&e.name!==n.name&&freezeTransport()}let cleanup=()=>{n.removeListener("open",onTransportOpen),n.removeListener("error",onerror),n.removeListener("close",onTransportClose),this.off("close",onclose),this.off("upgrading",onupgrade)};n.once("open",onTransportOpen),n.once("error",onerror),n.once("close",onTransportClose),this.once("close",onclose),this.once("upgrading",onupgrade),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn(()=>{l||n.open()},200):n.open()}onOpen(){if(this.readyState="open",Socket.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let e=0,n=this.upgrades.length;for(;e<n;e++)this.probe(this.upgrades[e])}}onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":let n=Error("server error");n.code=e.data,this.onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){let e=this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1;if(!e)return this.writeBuffer;let n=1;for(let e=0;e<this.writeBuffer.length;e++){let l=this.writeBuffer[e].data;if(l&&(n+=byteLength(l)),e>0&&n>this.maxPayload)return this.writeBuffer.slice(0,e);n+=2}return this.writeBuffer}write(e,n,l){return this.sendPacket("message",e,n,l),this}send(e,n,l){return this.sendPacket("message",e,n,l),this}sendPacket(e,n,l,c){if("function"==typeof n&&(c=n,n=void 0),"function"==typeof l&&(c=l,l=null),"closing"===this.readyState||"closed"===this.readyState)return;(l=l||{}).compress=!1!==l.compress;let d={type:e,data:n,options:l};this.emitReserved("packetCreate",d),this.writeBuffer.push(d),c&&this.once("flush",c),this.flush()}close(){let close=()=>{this.onClose("forced close"),this.transport.close()},cleanupAndClose=()=>{this.off("upgrade",cleanupAndClose),this.off("upgradeError",cleanupAndClose),close()},waitForUpgrade=()=>{this.once("upgrade",cleanupAndClose),this.once("upgradeError",cleanupAndClose)};return("opening"===this.readyState||"open"===this.readyState)&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?waitForUpgrade():close()}):this.upgrading?waitForUpgrade():close()),this}onError(e){Socket.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,n){("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){let n=[],l=0,c=e.length;for(;l<c;l++)~this.transports.indexOf(e[l])&&n.push(e[l]);return n}};function url(e,n="",l){let c=e;l=l||"undefined"!=typeof location&&location,null==e&&(e=l.protocol+"//"+l.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?l.protocol+e:l.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==l?l.protocol+"//"+e:"https://"+e),c=parse(e)),!c.port&&(/^(http|ws)$/.test(c.protocol)?c.port="80":/^(http|ws)s$/.test(c.protocol)&&(c.port="443")),c.path=c.path||"/";let d=-1!==c.host.indexOf(":"),f=d?"["+c.host+"]":c.host;return c.id=c.protocol+"://"+f+":"+c.port+n,c.href=c.protocol+"://"+f+(l&&l.port===c.port?"":":"+c.port),c}Socket.protocol=4,Socket.protocol;let sR="function"==typeof ArrayBuffer,is_binary_isView=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,sw=Object.prototype.toString,sO="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===sw.call(Blob),s_="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===sw.call(File);function isBinary(e){return sR&&(e instanceof ArrayBuffer||is_binary_isView(e))||sO&&e instanceof Blob||s_&&e instanceof File}function hasBinary(e,n){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let n=0,l=e.length;n<l;n++)if(hasBinary(e[n]))return!0;return!1}if(isBinary(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1==arguments.length)return hasBinary(e.toJSON(),!0);for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&hasBinary(e[n]))return!0;return!1}function deconstructPacket(e){let n=[],l=e.data;return e.data=_deconstructPacket(l,n),e.attachments=n.length,{packet:e,buffers:n}}function _deconstructPacket(e,n){if(!e)return e;if(isBinary(e)){let l={_placeholder:!0,num:n.length};return n.push(e),l}if(Array.isArray(e)){let l=Array(e.length);for(let c=0;c<e.length;c++)l[c]=_deconstructPacket(e[c],n);return l}if("object"==typeof e&&!(e instanceof Date)){let l={};for(let c in e)Object.prototype.hasOwnProperty.call(e,c)&&(l[c]=_deconstructPacket(e[c],n));return l}return e}function reconstructPacket(e,n){return e.data=_reconstructPacket(e.data,n),delete e.attachments,e}function _reconstructPacket(e,n){if(!e)return e;if(e&&!0===e._placeholder){let l="number"==typeof e.num&&e.num>=0&&e.num<n.length;if(l)return n[e.num];throw Error("illegal attachments")}if(Array.isArray(e))for(let l=0;l<e.length;l++)e[l]=_reconstructPacket(e[l],n);else if("object"==typeof e)for(let l in e)Object.prototype.hasOwnProperty.call(e,l)&&(e[l]=_reconstructPacket(e[l],n));return e}let sI=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],sC=5;(eC=t_||(t_={}))[eC.CONNECT=0]="CONNECT",eC[eC.DISCONNECT=1]="DISCONNECT",eC[eC.EVENT=2]="EVENT",eC[eC.ACK=3]="ACK",eC[eC.CONNECT_ERROR=4]="CONNECT_ERROR",eC[eC.BINARY_EVENT=5]="BINARY_EVENT",eC[eC.BINARY_ACK=6]="BINARY_ACK";let Encoder=class Encoder{constructor(e){this.replacer=e}encode(e){return(e.type===t_.EVENT||e.type===t_.ACK)&&hasBinary(e)?this.encodeAsBinary({type:e.type===t_.EVENT?t_.BINARY_EVENT:t_.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===t_.BINARY_EVENT||e.type===t_.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(n+=e.nsp+","),null!=e.id&&(n+=e.id),null!=e.data&&(n+=JSON.stringify(e.data,this.replacer)),n}encodeAsBinary(e){let n=deconstructPacket(e),l=this.encodeAsString(n.packet),c=n.buffers;return c.unshift(l),c}};function isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}let Decoder=class Decoder extends Emitter{constructor(e){super(),this.reviver=e}add(e){let n;if("string"==typeof e){if(this.reconstructor)throw Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);let l=n.type===t_.BINARY_EVENT;l||n.type===t_.BINARY_ACK?(n.type=l?t_.EVENT:t_.ACK,this.reconstructor=new BinaryReconstructor(n),0===n.attachments&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(isBinary(e)||e.base64){if(this.reconstructor)(n=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw Error("got binary data when not reconstructing a packet")}else throw Error("Unknown type: "+e)}decodeString(e){let n=0,l={type:Number(e.charAt(0))};if(void 0===t_[l.type])throw Error("unknown packet type "+l.type);if(l.type===t_.BINARY_EVENT||l.type===t_.BINARY_ACK){let c=n+1;for(;"-"!==e.charAt(++n)&&n!=e.length;);let d=e.substring(c,n);if(d!=Number(d)||"-"!==e.charAt(n))throw Error("Illegal attachments");l.attachments=Number(d)}if("/"===e.charAt(n+1)){let c=n+1;for(;++n;){let l=e.charAt(n);if(","===l||n===e.length)break}l.nsp=e.substring(c,n)}else l.nsp="/";let c=e.charAt(n+1);if(""!==c&&Number(c)==c){let c=n+1;for(;++n;){let l=e.charAt(n);if(null==l||Number(l)!=l){--n;break}if(n===e.length)break}l.id=Number(e.substring(c,n+1))}if(e.charAt(++n)){let c=this.tryParse(e.substr(n));if(Decoder.isPayloadValid(l.type,c))l.data=c;else throw Error("invalid payload")}return l}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,n){switch(e){case t_.CONNECT:return isObject(n);case t_.DISCONNECT:return void 0===n;case t_.CONNECT_ERROR:return"string"==typeof n||isObject(n);case t_.EVENT:case t_.BINARY_EVENT:return Array.isArray(n)&&("number"==typeof n[0]||"string"==typeof n[0]&&-1===sI.indexOf(n[0]));case t_.ACK:case t_.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}};let BinaryReconstructor=class BinaryReconstructor{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let e=reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function on(e,n,l){return e.on(n,l),function(){e.off(n,l)}}let sP=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});let socket_Socket=class socket_Socket extends Emitter{constructor(e,n,l){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,l&&l.auth&&(this.auth=l.auth),this._opts=Object.assign({},l),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[on(e,"open",this.onopen.bind(this)),on(e,"packet",this.onpacket.bind(this)),on(e,"error",this.onerror.bind(this)),on(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){if(sP.hasOwnProperty(e))throw Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;let l={type:t_.EVENT,data:n};if(l.options={},l.options.compress=!1!==this.flags.compress,"function"==typeof n[n.length-1]){let e=this.ids++,c=n.pop();this._registerAckCallback(e,c),l.id=e}let c=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable,d=this.flags.volatile&&(!c||!this.connected);return d||(this.connected?(this.notifyOutgoingListeners(l),this.packet(l)):this.sendBuffer.push(l)),this.flags={},this}_registerAckCallback(e,n){var l;let c=null!==(l=this.flags.timeout)&&void 0!==l?l:this._opts.ackTimeout;if(void 0===c){this.acks[e]=n;return}let d=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let n=0;n<this.sendBuffer.length;n++)this.sendBuffer[n].id===e&&this.sendBuffer.splice(n,1);n.call(this,Error("operation has timed out"))},c);this.acks[e]=(...e)=>{this.io.clearTimeoutFn(d),n.apply(this,[null,...e])}}emitWithAck(e,...n){let l=void 0!==this.flags.timeout||void 0!==this._opts.ackTimeout;return new Promise((c,d)=>{n.push((e,n)=>l?e?d(e):c(n):c(e)),this.emit(e,...n)})}_addToQueue(e){let n;"function"==typeof e[e.length-1]&&(n=e.pop());let l={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...c)=>{if(l!==this._queue[0])return;let d=null!==e;return d?l.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(e)):(this._queue.shift(),n&&n(null,...c)),l.pending=!1,this._drainQueue()}),this._queue.push(l),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;let n=this._queue[0];(!n.pending||e)&&(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:t_.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n)}onpacket(e){let n=e.nsp===this.nsp;if(n)switch(e.type){case t_.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case t_.EVENT:case t_.BINARY_EVENT:this.onevent(e);break;case t_.ACK:case t_.BINARY_ACK:this.onack(e);break;case t_.DISCONNECT:this.ondisconnect();break;case t_.CONNECT_ERROR:this.destroy();let l=Error(e.data.message);l.data=e.data.data,this.emitReserved("connect_error",l)}}onevent(e){let n=e.data||[];null!=e.id&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let n=this._anyListeners.slice();for(let l of n)l.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){let n=this,l=!1;return function(...c){l||(l=!0,n.packet({type:t_.ACK,id:e,data:c}))}}onack(e){let n=this.acks[e.id];"function"==typeof n&&(n.apply(this,e.data),delete this.acks[e.id])}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:t_.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let n=this._anyListeners;for(let l=0;l<n.length;l++)if(e===n[l]){n.splice(l,1);break}}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let n=this._anyOutgoingListeners;for(let l=0;l<n.length;l++)if(e===n[l]){n.splice(l,1);break}}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let n=this._anyOutgoingListeners.slice();for(let l of n)l.apply(this,e.data)}}};function Backoff(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Backoff.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var n=Math.random(),l=Math.floor(n*this.jitter*e);e=(1&Math.floor(10*n))==0?e-l:e+l}return 0|Math.min(e,this.max)},Backoff.prototype.reset=function(){this.attempts=0},Backoff.prototype.setMin=function(e){this.ms=e},Backoff.prototype.setMax=function(e){this.max=e},Backoff.prototype.setJitter=function(e){this.jitter=e};let Manager=class Manager extends Emitter{constructor(e,n){var l;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(n=e,e=void 0),(n=n||{}).path=n.path||"/socket.io",this.opts=n,installTimerFunctions(this,n),this.reconnection(!1!==n.reconnection),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(l=n.randomizationFactor)&&void 0!==l?l:.5),this.backoff=new Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==n.timeout?2e4:n.timeout),this._readyState="closed",this.uri=e;let c=n.parser||tI;this.encoder=new c.Encoder,this.decoder=new c.Decoder,this._autoConnect=!1!==n.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(n=this.backoff)||void 0===n||n.setMin(e),this)}randomizationFactor(e){var n;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(n=this.backoff)||void 0===n||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(n=this.backoff)||void 0===n||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Socket(this.uri,this.opts);let n=this.engine,l=this;this._readyState="opening",this.skipReconnect=!1;let c=on(n,"open",function(){l.onopen(),e&&e()}),onError=n=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",n),e?e(n):this.maybeReconnectOnOpen()},d=on(n,"error",onError);if(!1!==this._timeout){let e=this._timeout,l=this.setTimeoutFn(()=>{c(),onError(Error("timeout")),n.close()},e);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(c),this.subs.push(d),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(on(e,"ping",this.onping.bind(this)),on(e,"data",this.ondata.bind(this)),on(e,"error",this.onerror.bind(this)),on(e,"close",this.onclose.bind(this)),on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){sb(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let l=this.nsps[e];return l?this._autoConnect&&!l.active&&l.connect():(l=new socket_Socket(this,e,n),this.nsps[e]=l),l}_destroy(e){let n=Object.keys(this.nsps);for(let e of n){let n=this.nsps[e];if(n.active)return}this._close()}_packet(e){let n=this.encoder.encode(e);for(let l=0;l<n.length;l++)this.engine.write(n[l],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let n=this.backoff.duration();this._reconnecting=!0;let l=this.setTimeoutFn(()=>{!e.skipReconnect&&(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open(n=>{n?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",n)):e.onreconnect()}))},n);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};let sT={};function esm_lookup(e,n){let l;"object"==typeof e&&(n=e,e=void 0),n=n||{};let c=url(e,n.path||"/socket.io"),d=c.source,f=c.id,y=c.path,g=sT[f]&&y in sT[f].nsps,b=n.forceNew||n["force new connection"]||!1===n.multiplex||g;return b?l=new Manager(d,n):(sT[f]||(sT[f]=new Manager(d,n)),l=sT[f]),c.query&&!n.query&&(n.query=c.queryKey),l.socket(c.path,n)}Object.assign(esm_lookup,{Manager:Manager,Socket:socket_Socket,io:esm_lookup,connect:esm_lookup});let useInitializeSocket=({socketUrl:e})=>{let n=(0,tC.useRef)(null),l=(0,tC.useCallback)(()=>{n.current&&(n.current.disconnect&&n.current.disconnect(),n.current=null)},[n]),c=(0,tC.useCallback)(({token:c})=>{n.current&&l(),c&&(n.current=esm_lookup(e,{reconnectionDelayMax:1e4,transports:["websocket"],auth:{token:`${c}`}}),n.current.on("connect_error",e=>{console.error(e.message)}))},[n,l]);return{socket:n.current,initializeSocket:c,disconnectSocket:l}},useFetchOrganization=(e={})=>{let{apiService:n,isSessionInitialized:l,fetchingStrategy:c}=(0,iG.i)(),d=useSetQueryKey(),f=useQuery(d(iW),()=>n.getOrganization(),Object.assign(Object.assign({},e),{enabled:l&&c.fetchOrganization}));return f},sx=new QueryClient({defaultOptions:{queries:{refetchOnMount:!1,refetchOnWindowFocus:!1}}}),sM={fetchUnseenCount:!0,fetchOrganization:!0,fetchUnreadCount:!0,fetchNotifications:!1,fetchUserPreferences:!1,fetchUserGlobalPreferences:!1};function NovuProvider({backendUrl:e,socketUrl:n,applicationIdentifier:l,subscriberId:c,subscriberHash:d,stores:f,i18n:y,styles:g,initialFetchingStrategy:b=sM,children:N,onLoad:k}){let S=null!=e?e:"https://api.novu.co",A=null!=n?n:"https://ws.novu.co",[E,R]=(0,tC.useState)(Object.assign(Object.assign({},sM),b)),[w,O]=(0,tC.useState)({isSessionInitialized:!1,applicationIdentifier:l,subscriberId:c,subscriberHash:d}),_=(0,tC.useMemo)(()=>{sx.clear();let e=new ApiService(S);return applyToken({apiService:e}),e},[S]),{socket:C,initializeSocket:P,disconnectSocket:x}=useInitializeSocket({socketUrl:A}),B=(0,tC.useCallback)(e=>{applyToken({apiService:_,token:e.token}),P(e),O(e=>Object.assign(Object.assign({},e),{isSessionInitialized:!0}))},[_,O,P]),U=(0,tC.useCallback)(e=>R(n=>Object.assign(Object.assign({},n),e)),[R]),L=(0,tC.useCallback)(()=>{removeToken(_),x(),O(e=>Object.assign(Object.assign({},e),{isSessionInitialized:!1}))},[O,x,_]),F=(0,tC.useMemo)(()=>({backendUrl:S,socketUrl:A,applicationIdentifier:w.applicationIdentifier,subscriberId:w.subscriberId,subscriberHash:w.subscriberHash,isSessionInitialized:w.isSessionInitialized,apiService:_,socket:C,fetchingStrategy:E,setFetchingStrategy:U,onLoad:k,logout:L}),[S,A,w,_,C,E,U,k,L]);return(0,tC.useEffect)(()=>x,[x]),(0,tC.useEffect)(()=>{O(e=>Object.assign(Object.assign({},e),{isSessionInitialized:!1,applicationIdentifier:l,subscriberId:c,subscriberHash:d})),L(),sx.refetchQueries([...iH,l,c,d])},[L,c,l,d]),tC.createElement(QueryClientProvider,{client:sx},tC.createElement(i6.b.Provider,{value:F},tC.createElement(SessionInitializer,{onSuccess:B},tC.createElement(NotificationsProvider,{stores:null!=f?f:[{storeId:"default_store"}]},tC.createElement(NovuI18NProvider,{i18n:y},tC.createElement(StylesProvider,{styles:g},N))))))}let SessionInitializer=({children:e,onSuccess:n})=>{let{onLoad:l}=(0,iG.i)();return useSession({onSuccess:n}),useFetchOrganization({onSuccess:e=>{null==l||l({organization:e})}}),(0,tC.useEffect)(()=>{"parentIFrame"in window&&window.parentIFrame.autoResize(!0)},[]),e}},18140:function(e,n,l){"use strict";l.d(n,{i:function(){return useNovuContext}});var c=l(11798),d=l(47282);function useProviderCheck(e){if(null==e)throw Error("Component must be wrapped within the NovuProvider before using hooks from @novu/notification-center");return e}function useNovuContext(){let e=(0,c.useContext)(d.b),n=useProviderCheck(e);return n}},58446:function(e,n,l){"use strict";l.d(n,{s:function(){return useSocket}});var c=l(18140);function useSocket(){let{socket:e}=(0,c.i)();return{socket:e}}},47282:function(e,n,l){"use strict";l.d(n,{b:function(){return d}});var c=l(11798);let d=c.createContext(null)},20490:function(e,n,l){var c=0/0,d=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,y=/^0b[01]+$/i,g=/^0o[0-7]+$/i,b=parseInt,N="object"==typeof l.g&&l.g&&l.g.Object===Object&&l.g,k="object"==typeof self&&self&&self.Object===Object&&self,S=N||k||Function("return this")(),A=Object.prototype.toString,E=Math.max,R=Math.min,now=function(){return S.Date.now()};function debounce(e,n,l){var c,d,f,y,g,b,N=0,k=!1,S=!1,A=!0;if("function"!=typeof e)throw TypeError("Expected a function");function invokeFunc(n){var l=c,f=d;return c=d=void 0,N=n,y=e.apply(f,l)}function leadingEdge(e){return N=e,g=setTimeout(timerExpired,n),k?invokeFunc(e):y}function remainingWait(e){var l=e-b,c=e-N,d=n-l;return S?R(d,f-c):d}function shouldInvoke(e){var l=e-b,c=e-N;return void 0===b||l>=n||l<0||S&&c>=f}function timerExpired(){var e=now();if(shouldInvoke(e))return trailingEdge(e);g=setTimeout(timerExpired,remainingWait(e))}function trailingEdge(e){return(g=void 0,A&&c)?invokeFunc(e):(c=d=void 0,y)}function cancel(){void 0!==g&&clearTimeout(g),N=0,c=b=d=g=void 0}function flush(){return void 0===g?y:trailingEdge(now())}function debounced(){var e=now(),l=shouldInvoke(e);if(c=arguments,d=this,b=e,l){if(void 0===g)return leadingEdge(b);if(S)return g=setTimeout(timerExpired,n),invokeFunc(b)}return void 0===g&&(g=setTimeout(timerExpired,n)),y}return n=toNumber(n)||0,isObject(l)&&(k=!!l.leading,f=(S="maxWait"in l)?E(toNumber(l.maxWait)||0,n):f,A="trailing"in l?!!l.trailing:A),debounced.cancel=cancel,debounced.flush=flush,debounced}function isObject(e){var n=typeof e;return!!e&&("object"==n||"function"==n)}function isObjectLike(e){return!!e&&"object"==typeof e}function isSymbol(e){return"symbol"==typeof e||isObjectLike(e)&&"[object Symbol]"==A.call(e)}function toNumber(e){if("number"==typeof e)return e;if(isSymbol(e))return c;if(isObject(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=isObject(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(d,"");var l=y.test(e);return l||g.test(e)?b(e.slice(2),l?2:8):f.test(e)?c:+e}e.exports=debounce},79592:function(e){e.exports={style:{fontFamily:"'__Sora_c85093', '__Sora_Fallback_c85093'",fontStyle:"normal"},className:"__className_c85093"}},97190:function(e,n,l){e.exports=l(92084)},33515:function(e,n,l){"use strict";l.d(n,{zf:function(){return PostHogProvider}});var c=l(75564),d=l(11798),f=(0,d.createContext)({client:c.ZP});function PostHogProvider(e){var n=e.children,l=e.client,y=e.apiKey,g=e.options,b=(0,d.useMemo)(function(){return(l&&y&&console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."),l&&g&&console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."),l)?l:(y&&(c.ZP.__loaded&&console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."),c.ZP.init(y,g)),c.ZP)},[l,y]);return d.createElement(f.Provider,{value:{client:b}},n)}},69472:function(e,n,l){"use strict";l.d(n,{Z:function(){return z}});var c=l(35987),d=l(36316),f=l(67721),y=l(39720),g=l(11798),b=l(43359),N=l.n(b),k=l(97336),S=l(60931),A=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],E=void 0;function InternalItem(e,n){var l,f=e.prefixCls,b=e.invalidate,S=e.item,R=e.renderItem,w=e.responsive,O=e.responsiveDisabled,_=e.registerSize,C=e.itemKey,P=e.className,x=e.style,B=e.children,U=e.display,L=e.order,F=e.component,K=void 0===F?"div":F,Q=(0,y.Z)(e,A),z=w&&!U;g.useEffect(function(){return function(){_(C,null)}},[]);var H=R&&S!==E?R(S):B;b||(l={opacity:z?0:1,height:z?0:E,overflowY:z?"hidden":E,order:w?L:E,pointerEvents:z?"none":E,position:z?"absolute":E});var V={};z&&(V["aria-hidden"]=!0);var Y=g.createElement(K,(0,c.Z)({className:N()(!b&&f,P),style:(0,d.Z)((0,d.Z)({},l),x)},V,Q,{ref:n}),H);return w&&(Y=g.createElement(k.Z,{onResize:function(e){_(C,e.offsetWidth)},disabled:O},Y)),Y}var R=g.forwardRef(InternalItem);R.displayName="Item";var w=l(16789),O=l(94547),_=l(57571);function channelUpdate(e){if("undefined"==typeof MessageChannel)(0,_.Z)(e);else{var n=new MessageChannel;n.port1.onmessage=function(){return e()},n.port2.postMessage(void 0)}}function useBatcher(){var e=g.useRef(null);return function(n){e.current||(e.current=[],channelUpdate(function(){(0,O.unstable_batchedUpdates)(function(){e.current.forEach(function(e){e()}),e.current=null})})),e.current.push(n)}}function useEffectState(e,n){var l=g.useState(n),c=(0,f.Z)(l,2),d=c[0],y=c[1];return[d,(0,w.Z)(function(n){e(function(){y(n)})})]}var C=g.createContext(null),P=["component"],x=["className"],B=["className"],U=g.forwardRef(function(e,n){var l=g.useContext(C);if(!l){var d=e.component,f=void 0===d?"div":d,b=(0,y.Z)(e,P);return g.createElement(f,(0,c.Z)({},b,{ref:n}))}var k=l.className,S=(0,y.Z)(l,x),A=e.className,E=(0,y.Z)(e,B);return g.createElement(C.Provider,{value:null},g.createElement(R,(0,c.Z)({ref:n,className:N()(k,A)},S,E)))});U.displayName="RawItem";var L=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],F="responsive",K="invalidate";function defaultRenderRest(e){return"+ ".concat(e.length," ...")}function Overflow(e,n){var l,b=e.prefixCls,A=void 0===b?"rc-overflow":b,E=e.data,w=void 0===E?[]:E,O=e.renderItem,_=e.renderRawItem,P=e.itemKey,x=e.itemWidth,B=void 0===x?10:x,U=e.ssr,Q=e.style,z=e.className,H=e.maxCount,V=e.renderRest,Y=e.renderRawRest,X=e.suffix,et=e.component,ei=void 0===et?"div":et,es=e.itemComponent,en=e.onVisibleChange,er=(0,y.Z)(e,L),ea="full"===U,eo=useBatcher(),el=useEffectState(eo,null),ec=(0,f.Z)(el,2),eu=ec[0],ed=ec[1],eh=eu||0,ep=useEffectState(eo,new Map),ef=(0,f.Z)(ep,2),ey=ef[0],em=ef[1],eg=useEffectState(eo,0),ev=(0,f.Z)(eg,2),eb=ev[0],eN=ev[1],ek=useEffectState(eo,0),eS=(0,f.Z)(ek,2),eA=eS[0],eE=eS[1],eR=useEffectState(eo,0),ew=(0,f.Z)(eR,2),eO=ew[0],e_=ew[1],eI=(0,g.useState)(null),eC=(0,f.Z)(eI,2),eP=eC[0],eT=eC[1],ex=(0,g.useState)(null),eM=(0,f.Z)(ex,2),eB=eM[0],eq=eM[1],eU=g.useMemo(function(){return null===eB&&ea?Number.MAX_SAFE_INTEGER:eB||0},[eB,eu]),eD=(0,g.useState)(!1),eL=(0,f.Z)(eD,2),eF=eL[0],ej=eL[1],eK="".concat(A,"-item"),eQ=Math.max(eb,eA),ez=H===F,eG=w.length&&ez,eH=H===K,eW=eG||"number"==typeof H&&w.length>H,eV=(0,g.useMemo)(function(){var e=w;return eG?e=null===eu&&ea?w:w.slice(0,Math.min(w.length,eh/B)):"number"==typeof H&&(e=w.slice(0,H)),e},[w,B,eu,H,eG]),eY=(0,g.useMemo)(function(){return eG?w.slice(eU+1):w.slice(eV.length)},[w,eV,eG,eU]),eZ=(0,g.useCallback)(function(e,n){var l;return"function"==typeof P?P(e):null!==(l=P&&(null==e?void 0:e[P]))&&void 0!==l?l:n},[P]),e$=(0,g.useCallback)(O||function(e){return e},[O]);function updateDisplayCount(e,n,l){(eB!==e||void 0!==n&&n!==eP)&&(eq(e),l||(ej(e<w.length-1),null==en||en(e)),void 0!==n&&eT(n))}function onOverflowResize(e,n){ed(n.clientWidth)}function registerSize(e,n){em(function(l){var c=new Map(l);return null===n?c.delete(e):c.set(e,n),c})}function registerOverflowSize(e,n){eE(n),eN(eA)}function registerSuffixSize(e,n){e_(n)}function getItemWidth(e){return ey.get(eZ(eV[e],e))}(0,S.Z)(function(){if(eh&&"number"==typeof eQ&&eV){var e=eO,n=eV.length,l=n-1;if(!n){updateDisplayCount(0,null);return}for(var c=0;c<n;c+=1){var d=getItemWidth(c);if(ea&&(d=d||0),void 0===d){updateDisplayCount(c-1,void 0,!0);break}if(e+=d,0===l&&e<=eh||c===l-1&&e+getItemWidth(l)<=eh){updateDisplayCount(l,null);break}if(e+eQ>eh){updateDisplayCount(c-1,e-d-eO+eA);break}}X&&getItemWidth(0)+eO>eh&&eT(null)}},[eh,ey,eA,eO,eZ,eV]);var eX=eF&&!!eY.length,eJ={};null!==eP&&eG&&(eJ={position:"absolute",left:eP,top:0});var e0={prefixCls:eK,responsive:eG,component:es,invalidate:eH},e1=_?function(e,n){var l=eZ(e,n);return g.createElement(C.Provider,{key:l,value:(0,d.Z)((0,d.Z)({},e0),{},{order:n,item:e,itemKey:l,registerSize:registerSize,display:n<=eU})},_(e,n))}:function(e,n){var l=eZ(e,n);return g.createElement(R,(0,c.Z)({},e0,{order:n,key:l,item:e,renderItem:e$,itemKey:l,registerSize:registerSize,display:n<=eU}))},e4={order:eX?eU:Number.MAX_SAFE_INTEGER,className:"".concat(eK,"-rest"),registerSize:registerOverflowSize,display:eX};if(Y)Y&&(l=g.createElement(C.Provider,{value:(0,d.Z)((0,d.Z)({},e0),e4)},Y(eY)));else{var e2=V||defaultRenderRest;l=g.createElement(R,(0,c.Z)({},e0,e4),"function"==typeof e2?e2(eY):e2)}var e6=g.createElement(ei,(0,c.Z)({className:N()(!eH&&A,z),style:Q,ref:n},er),eV.map(e1),eW?l:null,X&&g.createElement(R,(0,c.Z)({},e0,{responsive:ez,responsiveDisabled:!eG,order:eU,className:"".concat(eK,"-suffix"),registerSize:registerSuffixSize,display:!0,style:eJ}),X));return ez&&(e6=g.createElement(k.Z,{onResize:onOverflowResize,disabled:!eG},e6)),e6}var Q=g.forwardRef(Overflow);Q.displayName="Overflow",Q.Item=U,Q.RESPONSIVE=F,Q.INVALIDATE=K;var z=Q},34738:function(e,n,l){"use strict";function omit(e,n){var l=Object.assign({},e);return Array.isArray(n)&&n.forEach(function(e){delete l[e]}),l}l.d(n,{Z:function(){return omit}})},9367:function(e,n,l){"use strict";/**
 * @license React
 * use-sync-external-store-shim.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var c=l(11798);function h(e,n){return e===n&&(0!==e||1/e==1/n)||e!=e&&n!=n}var d="function"==typeof Object.is?Object.is:h,f=c.useState,y=c.useEffect,g=c.useLayoutEffect,b=c.useDebugValue;function q(e,n){var l=n(),c=f({inst:{value:l,getSnapshot:n}}),d=c[0].inst,N=c[1];return g(function(){d.value=l,d.getSnapshot=n,r(d)&&N({inst:d})},[e,l,n]),y(function(){return r(d)&&N({inst:d}),e(function(){r(d)&&N({inst:d})})},[e]),b(l),l}function r(e){var n=e.getSnapshot;e=e.value;try{var l=n();return!d(e,l)}catch(e){return!0}}function t(e,n){return n()}var N="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?t:q;n.useSyncExternalStore=void 0!==c.useSyncExternalStore?c.useSyncExternalStore:N},6916:function(e,n,l){"use strict";e.exports=l(9367)},32614:function(e,n,l){"use strict";let c,d;l.r(n),l.d(n,{CheckmarkIcon:function(){return H},ErrorIcon:function(){return L},LoaderIcon:function(){return K},ToastBar:function(){return en},ToastIcon:function(){return M},Toaster:function(){return Ie},default:function(){return ea},resolveValue:function(){return T},toast:function(){return dist_n},useToaster:function(){return D},useToasterStore:function(){return I}});var f=l(11798);let y={data:""},t=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||y,g=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,b=/\/\*[^]*?\*\/|  +/g,N=/\n+/g,o=(e,n)=>{let l="",c="",d="";for(let f in e){let y=e[f];"@"==f[0]?"i"==f[1]?l=f+" "+y+";":c+="f"==f[1]?o(y,f):f+"{"+o(y,"k"==f[1]?"":n)+"}":"object"==typeof y?c+=o(y,n?n.replace(/([^,])+/g,e=>f.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,n=>/&/.test(n)?n.replace(/&/g,e):e?e+" "+n:n)):f):null!=y&&(f=/^--/.test(f)?f:f.replace(/[A-Z]/g,"-$&").toLowerCase(),d+=o.p?o.p(f,y):f+":"+y+";")}return l+(n&&d?n+"{"+d+"}":d)+c},k={},s=e=>{if("object"==typeof e){let n="";for(let l in e)n+=l+s(e[l]);return n}return e},i=(e,n,l,c,d)=>{var f;let y=s(e),S=k[y]||(k[y]=(e=>{let n=0,l=11;for(;n<e.length;)l=101*l+e.charCodeAt(n++)>>>0;return"go"+l})(y));if(!k[S]){let n=y!==e?e:(e=>{let n,l,c=[{}];for(;n=g.exec(e.replace(b,""));)n[4]?c.shift():n[3]?(l=n[3].replace(N," ").trim(),c.unshift(c[0][l]=c[0][l]||{})):c[0][n[1]]=n[2].replace(N," ").trim();return c[0]})(e);k[S]=o(d?{["@keyframes "+S]:n}:n,l?"":"."+S)}let A=l&&k.g?k.g:null;return l&&(k.g=k[S]),f=k[S],A?n.data=n.data.replace(A,f):-1===n.data.indexOf(f)&&(n.data=c?f+n.data:n.data+f),S},p=(e,n,l)=>e.reduce((e,c,d)=>{let f=n[d];if(f&&f.call){let e=f(l),n=e&&e.props&&e.props.className||/^go/.test(e)&&e;f=n?"."+n:e&&"object"==typeof e?e.props?"":o(e,""):!1===e?"":e}return e+c+(null==f?"":f)},"");function u(e){let n=this||{},l=e.call?e(n.p):e;return i(l.unshift?l.raw?p(l,[].slice.call(arguments,1),n.p):l.reduce((e,l)=>Object.assign(e,l&&l.call?l(n.p):l),{}):l,t(n.target),n.g,n.o,n.k)}u.bind({g:1});let S,A,E,R=u.bind({k:1});function m(e,n,l,c){o.p=n,S=e,A=l,E=c}function j(e,n){let l=this||{};return function(){let c=arguments;function a(d,f){let y=Object.assign({},d),g=y.className||a.className;l.p=Object.assign({theme:A&&A()},y),l.o=/ *go\d+/.test(g),y.className=u.apply(l,c)+(g?" "+g:""),n&&(y.ref=f);let b=e;return e[0]&&(b=y.as||e,delete y.as),E&&b[0]&&E(y),S(b,y)}return n?n(a):a}}var W=e=>"function"==typeof e,T=(e,n)=>W(e)?e(n):e,w=(c=0,()=>(++c).toString()),dist_b=()=>{if(void 0===d&&"u">typeof window){let e=matchMedia("(prefers-reduced-motion: reduce)");d=!e||e.matches}return d},O=new Map,$=e=>{if(O.has(e))return;let n=setTimeout(()=>{O.delete(e),dist_u({type:4,toastId:e})},1e3);O.set(e,n)},J=e=>{let n=O.get(e);n&&clearTimeout(n)},v=(e,n)=>{switch(n.type){case 0:return{...e,toasts:[n.toast,...e.toasts].slice(0,20)};case 1:return n.toast.id&&J(n.toast.id),{...e,toasts:e.toasts.map(e=>e.id===n.toast.id?{...e,...n.toast}:e)};case 2:let{toast:l}=n;return e.toasts.find(e=>e.id===l.id)?v(e,{type:1,toast:l}):v(e,{type:0,toast:l});case 3:let{toastId:c}=n;return c?$(c):e.toasts.forEach(e=>{$(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===c||void 0===c?{...e,visible:!1}:e)};case 4:return void 0===n.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==n.toastId)};case 5:return{...e,pausedAt:n.time};case 6:let d=n.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(e=>({...e,pauseDuration:e.pauseDuration+d}))}}},_=[],C={toasts:[],pausedAt:void 0},dist_u=e=>{C=v(C,e),_.forEach(e=>{e(C)})},P={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},I=(e={})=>{let[n,l]=(0,f.useState)(C);(0,f.useEffect)(()=>(_.push(l),()=>{let e=_.indexOf(l);e>-1&&_.splice(e,1)}),[n]);let c=n.toasts.map(n=>{var l,c;return{...e,...e[n.type],...n,duration:n.duration||(null==(l=e[n.type])?void 0:l.duration)||(null==e?void 0:e.duration)||P[n.type],style:{...e.style,...null==(c=e[n.type])?void 0:c.style,...n.style}}});return{...n,toasts:c}},G=(e,n="blank",l)=>({createdAt:Date.now(),visible:!0,type:n,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...l,id:(null==l?void 0:l.id)||w()}),dist_h=e=>(n,l)=>{let c=G(n,e,l);return dist_u({type:2,toast:c}),c.id},dist_n=(e,n)=>dist_h("blank")(e,n);dist_n.error=dist_h("error"),dist_n.success=dist_h("success"),dist_n.loading=dist_h("loading"),dist_n.custom=dist_h("custom"),dist_n.dismiss=e=>{dist_u({type:3,toastId:e})},dist_n.remove=e=>dist_u({type:4,toastId:e}),dist_n.promise=(e,n,l)=>{let c=dist_n.loading(n.loading,{...l,...null==l?void 0:l.loading});return e.then(e=>(dist_n.success(T(n.success,e),{id:c,...l,...null==l?void 0:l.success}),e)).catch(e=>{dist_n.error(T(n.error,e),{id:c,...l,...null==l?void 0:l.error})}),e};var Z=(e,n)=>{dist_u({type:1,toast:{id:e,height:n}})},ee=()=>{dist_u({type:5,time:Date.now()})},D=e=>{let{toasts:n,pausedAt:l}=I(e);(0,f.useEffect)(()=>{if(l)return;let e=Date.now(),c=n.map(n=>{if(n.duration===1/0)return;let l=(n.duration||0)+n.pauseDuration-(e-n.createdAt);if(l<0){n.visible&&dist_n.dismiss(n.id);return}return setTimeout(()=>dist_n.dismiss(n.id),l)});return()=>{c.forEach(e=>e&&clearTimeout(e))}},[n,l]);let c=(0,f.useCallback)(()=>{l&&dist_u({type:6,time:Date.now()})},[l]),d=(0,f.useCallback)((e,l)=>{let{reverseOrder:c=!1,gutter:d=8,defaultPosition:f}=l||{},y=n.filter(n=>(n.position||f)===(e.position||f)&&n.height),g=y.findIndex(n=>n.id===e.id),b=y.filter((e,n)=>n<g&&e.visible).length;return y.filter(e=>e.visible).slice(...c?[b+1]:[0,b]).reduce((e,n)=>e+(n.height||0)+d,0)},[n]);return{toasts:n,handlers:{updateHeight:Z,startPause:ee,endPause:c,calculateOffset:d}}},x=R`
from {
  transform: scale(0) rotate(45deg);
	opacity: 0;
}
to {
 transform: scale(1) rotate(45deg);
  opacity: 1;
}`,B=R`
from {
  transform: scale(0);
  opacity: 0;
}
to {
  transform: scale(1);
  opacity: 1;
}`,U=R`
from {
  transform: scale(0) rotate(90deg);
	opacity: 0;
}
to {
  transform: scale(1) rotate(90deg);
	opacity: 1;
}`,L=j("div")`
  width: 20px;
  opacity: 0;
  height: 20px;
  border-radius: 10px;
  background: ${e=>e.primary||"#ff4b4b"};
  position: relative;
  transform: rotate(45deg);

  animation: ${x} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
  animation-delay: 100ms;

  &:after,
  &:before {
    content: '';
    animation: ${B} 0.15s ease-out forwards;
    animation-delay: 150ms;
    position: absolute;
    border-radius: 3px;
    opacity: 0;
    background: ${e=>e.secondary||"#fff"};
    bottom: 9px;
    left: 4px;
    height: 2px;
    width: 12px;
  }

  &:before {
    animation: ${U} 0.15s ease-out forwards;
    animation-delay: 180ms;
    transform: rotate(90deg);
  }
`,F=R`
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
`,K=j("div")`
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  border: 2px solid;
  border-radius: 100%;
  border-color: ${e=>e.secondary||"#e0e0e0"};
  border-right-color: ${e=>e.primary||"#616161"};
  animation: ${F} 1s linear infinite;
`,Q=R`
from {
  transform: scale(0) rotate(45deg);
	opacity: 0;
}
to {
  transform: scale(1) rotate(45deg);
	opacity: 1;
}`,z=R`
0% {
	height: 0;
	width: 0;
	opacity: 0;
}
40% {
  height: 0;
	width: 6px;
	opacity: 1;
}
100% {
  opacity: 1;
  height: 10px;
}`,H=j("div")`
  width: 20px;
  opacity: 0;
  height: 20px;
  border-radius: 10px;
  background: ${e=>e.primary||"#61d345"};
  position: relative;
  transform: rotate(45deg);

  animation: ${Q} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
  animation-delay: 100ms;
  &:after {
    content: '';
    box-sizing: border-box;
    animation: ${z} 0.2s ease-out forwards;
    opacity: 0;
    animation-delay: 200ms;
    position: absolute;
    border-right: 2px solid;
    border-bottom: 2px solid;
    border-color: ${e=>e.secondary||"#fff"};
    bottom: 6px;
    left: 6px;
    height: 10px;
    width: 6px;
  }
`,V=j("div")`
  position: absolute;
`,Y=j("div")`
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 20px;
  min-height: 20px;
`,X=R`
from {
  transform: scale(0.6);
  opacity: 0.4;
}
to {
  transform: scale(1);
  opacity: 1;
}`,et=j("div")`
  position: relative;
  transform: scale(0.6);
  opacity: 0.4;
  min-width: 20px;
  animation: ${X} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
`,M=({toast:e})=>{let{icon:n,type:l,iconTheme:c}=e;return void 0!==n?"string"==typeof n?f.createElement(et,null,n):n:"blank"===l?null:f.createElement(Y,null,f.createElement(K,{...c}),"loading"!==l&&f.createElement(V,null,"error"===l?f.createElement(L,{...c}):f.createElement(H,{...c})))},ye=e=>`
0% {transform: translate3d(0,${-200*e}%,0) scale(.6); opacity:.5;}
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
`,ge=e=>`
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
100% {transform: translate3d(0,${-150*e}%,-1px) scale(.6); opacity:0;}
`,ei=j("div")`
  display: flex;
  align-items: center;
  background: #fff;
  color: #363636;
  line-height: 1.3;
  will-change: transform;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
  max-width: 350px;
  pointer-events: auto;
  padding: 8px 10px;
  border-radius: 8px;
`,es=j("div")`
  display: flex;
  justify-content: center;
  margin: 4px 10px;
  color: inherit;
  flex: 1 1 auto;
  white-space: pre-line;
`,Ae=(e,n)=>{let l=e.includes("top")?1:-1,[c,d]=dist_b()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[ye(l),ge(l)];return{animation:n?`${R(c)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${R(d)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},en=f.memo(({toast:e,position:n,style:l,children:c})=>{let d=e.height?Ae(e.position||n||"top-center",e.visible):{opacity:0},y=f.createElement(M,{toast:e}),g=f.createElement(es,{...e.ariaProps},T(e.message,e));return f.createElement(ei,{className:e.className,style:{...d,...l,...e.style}},"function"==typeof c?c({icon:y,message:g}):f.createElement(f.Fragment,null,y,g))});m(f.createElement);var Ee=({id:e,className:n,style:l,onHeightUpdate:c,children:d})=>{let y=f.useCallback(n=>{if(n){let i=()=>{c(e,n.getBoundingClientRect().height)};i(),new MutationObserver(i).observe(n,{subtree:!0,childList:!0,characterData:!0})}},[e,c]);return f.createElement("div",{ref:y,className:n,style:l},d)},Re=(e,n)=>{let l=e.includes("top"),c=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:dist_b()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${n*(l?1:-1)}px)`,...l?{top:0}:{bottom:0},...c}},er=u`
  z-index: 9999;
  > * {
    pointer-events: auto;
  }
`,Ie=({reverseOrder:e,position:n="top-center",toastOptions:l,gutter:c,children:d,containerStyle:y,containerClassName:g})=>{let{toasts:b,handlers:N}=D(l);return f.createElement("div",{style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...y},className:g,onMouseEnter:N.startPause,onMouseLeave:N.endPause},b.map(l=>{let y=l.position||n,g=Re(y,N.calculateOffset(l,{reverseOrder:e,gutter:c,defaultPosition:n}));return f.createElement(Ee,{id:l.id,key:l.id,onHeightUpdate:N.updateHeight,className:l.visible?er:"",style:g},"custom"===l.type?T(l.message,l):d?d(l):f.createElement(en,{toast:l,position:y}))}))},ea=dist_n}}]);