@pushwoosh/session-store 2.3.7 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("tslib"),require("rxjs"),require("@pushwoosh/grpc-bridge")):"function"==typeof define&&define.amd?define(["tslib","rxjs","@pushwoosh/grpc-bridge"],e):"object"==typeof exports?exports["@pushwoosh/session-store"]=e(require("tslib"),require("rxjs"),require("@pushwoosh/grpc-bridge")):t["@pushwoosh/session-store"]=e(t.tslib,t.rxjs,t["@pushwoosh/grpc-bridge"])}(self,((t,e,s)=>(()=>{var r={1157:t=>{"use strict";t.exports=s},3961:t=>{"use strict";t.exports=e},5652:e=>{"use strict";e.exports=t},8628:(t,e,s)=>{t.exports=s(6343)},3981:(t,e,s)=>{t.exports=s(6462)},1362:(t,e,s)=>{"use strict";s(9748);var r=s(1747);t.exports=r("Array","includes")},6880:(t,e,s)=>{"use strict";var r=s(8280),i=s(1362),o=s(4378),n=Array.prototype,a=String.prototype;t.exports=function(t){var e=t.includes;return t===n||r(n,t)&&e===n.includes?i:"string"==typeof t||t===a||r(a,t)&&e===a.includes?o:e}},9929:(t,e,s)=>{"use strict";s(9502);var r=s(2046);t.exports=r.parseFloat},4378:(t,e,s)=>{"use strict";s(9770);var r=s(1747);t.exports=r("String","includes")},2159:(t,e,s)=>{"use strict";var r=s(2250),i=s(4640),o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not a function")}},2156:t=>{"use strict";t.exports=function(){}},6624:(t,e,s)=>{"use strict";var r=s(6285),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not an object")}},4436:(t,e,s)=>{"use strict";var r=s(7374),i=s(4849),o=s(575),n=function(t){return function(e,s,n){var a=r(e),u=o(a);if(0===u)return!t&&-1;var l,c=i(n,u);if(t&&s!=s){for(;u>c;)if((l=a[c++])!=l)return!0}else for(;u>c;c++)if((t||c in a)&&a[c]===s)return t||c||0;return!t&&-1}};t.exports={includes:n(!0),indexOf:n(!1)}},5807:(t,e,s)=>{"use strict";var r=s(1907),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},3948:(t,e,s)=>{"use strict";var r=s(2623),i=s(2250),o=s(5807),n=s(6264)("toStringTag"),a=Object,u="Arguments"===o(function(){return arguments}());t.exports=r?o:function(t){var e,s,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(s=function(t,e){try{return t[e]}catch(t){}}(e=a(t),n))?s:u?o(e):"Object"===(r=o(e))&&i(e.callee)?"Arguments":r}},5735:(t,e,s)=>{"use strict";var r=s(6264)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(s){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},1626:(t,e,s)=>{"use strict";var r=s(9447),i=s(4284),o=s(5817);t.exports=r?function(t,e,s){return i.f(t,e,o(1,s))}:function(t,e,s){return t[e]=s,t}},5817:t=>{"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},2532:(t,e,s)=>{"use strict";var r=s(1010),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(s){r[t]=e}return e}},9447:(t,e,s)=>{"use strict";var r=s(8828);t.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},9552:(t,e,s)=>{"use strict";var r=s(1010),i=s(6285),o=r.document,n=i(o)&&i(o.createElement);t.exports=function(t){return n?o.createElement(t):{}}},4723:t=>{"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},5683:(t,e,s)=>{"use strict";var r,i,o=s(1010),n=s(4723),a=o.process,u=o.Deno,l=a&&a.versions||u&&u.version,c=l&&l.v8;c&&(i=(r=c.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&n&&(!(r=n.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=n.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},1091:(t,e,s)=>{"use strict";var r=s(1010),i=s(6024),o=s(2361),n=s(2250),a=s(3846).f,u=s(7463),l=s(2046),c=s(8311),p=s(1626),h=s(9724);s(6128);var d=function(t){var e=function(s,r,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(s);case 2:return new t(s,r)}return new t(s,r,o)}return i(t,this,arguments)};return e.prototype=t.prototype,e};t.exports=function(t,e){var s,i,f,m,v,g,b,y,x,w=t.target,S=t.global,A=t.stat,C=t.proto,O=S?r:A?r[w]:r[w]&&r[w].prototype,M=S?l:l[w]||p(l,w,{})[w],E=M.prototype;for(m in e)i=!(s=u(S?m:w+(A?".":"#")+m,t.forced))&&O&&h(O,m),g=M[m],i&&(b=t.dontCallGetSet?(x=a(O,m))&&x.value:O[m]),v=i&&b?b:e[m],(s||C||typeof g!=typeof v)&&(y=t.bind&&i?c(v,r):t.wrap&&i?d(v):C&&n(v)?o(v):v,(t.sham||v&&v.sham||g&&g.sham)&&p(y,"sham",!0),p(M,m,y),C&&(h(l,f=w+"Prototype")||p(l,f,{}),p(l[f],m,v),t.real&&E&&(s||!E[m])&&p(E,m,v)))}},8828:t=>{"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},6024:(t,e,s)=>{"use strict";var r=s(1505),i=Function.prototype,o=i.apply,n=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?n.bind(o):function(){return n.apply(o,arguments)})},8311:(t,e,s)=>{"use strict";var r=s(2361),i=s(2159),o=s(1505),n=r(r.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?n(t,e):function(){return t.apply(e,arguments)}}},1505:(t,e,s)=>{"use strict";var r=s(8828);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},3930:(t,e,s)=>{"use strict";var r=s(1505),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},2361:(t,e,s)=>{"use strict";var r=s(5807),i=s(1907);t.exports=function(t){if("Function"===r(t))return i(t)}},1907:(t,e,s)=>{"use strict";var r=s(1505),i=Function.prototype,o=i.call,n=r&&i.bind.bind(o,o);t.exports=r?n:function(t){return function(){return o.apply(t,arguments)}}},1747:(t,e,s)=>{"use strict";var r=s(1010),i=s(2046);t.exports=function(t,e){var s=i[t+"Prototype"],o=s&&s[e];if(o)return o;var n=r[t],a=n&&n.prototype;return a&&a[e]}},5582:(t,e,s)=>{"use strict";var r=s(2046),i=s(1010),o=s(2250),n=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?n(r[t])||n(i[t]):r[t]&&r[t][e]||i[t]&&i[t][e]}},9367:(t,e,s)=>{"use strict";var r=s(2159),i=s(7136);t.exports=function(t,e){var s=t[e];return i(s)?void 0:r(s)}},1010:function(t,e,s){"use strict";var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof s.g&&s.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9724:(t,e,s)=>{"use strict";var r=s(1907),i=s(9298),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},3648:(t,e,s)=>{"use strict";var r=s(9447),i=s(8828),o=s(9552);t.exports=!r&&!i((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},6946:(t,e,s)=>{"use strict";var r=s(1907),i=s(8828),o=s(5807),n=Object,a=r("".split);t.exports=i((function(){return!n("z").propertyIsEnumerable(0)}))?function(t){return"String"===o(t)?a(t,""):n(t)}:n},2250:t=>{"use strict";var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},7463:(t,e,s)=>{"use strict";var r=s(8828),i=s(2250),o=/#|\.prototype\./,n=function(t,e){var s=u[a(t)];return s===c||s!==l&&(i(e)?r(e):!!e)},a=n.normalize=function(t){return String(t).replace(o,".").toLowerCase()},u=n.data={},l=n.NATIVE="N",c=n.POLYFILL="P";t.exports=n},7136:t=>{"use strict";t.exports=function(t){return null==t}},6285:(t,e,s)=>{"use strict";var r=s(2250);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},7376:t=>{"use strict";t.exports=!0},2087:(t,e,s)=>{"use strict";var r=s(6285),i=s(5807),o=s(6264)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"===i(t))}},5594:(t,e,s)=>{"use strict";var r=s(5582),i=s(2250),o=s(8280),n=s(1175),a=Object;t.exports=n?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,a(t))}},575:(t,e,s)=>{"use strict";var r=s(3121);t.exports=function(t){return r(t.length)}},1176:t=>{"use strict";var e=Math.ceil,s=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?s:e)(r)}},2074:(t,e,s)=>{"use strict";var r=s(2087),i=TypeError;t.exports=function(t){if(r(t))throw new i("The method doesn't accept regular expressions");return t}},7213:(t,e,s)=>{"use strict";var r=s(1010),i=s(8828),o=s(1907),n=s(160),a=s(5993).trim,u=s(6395),l=o("".charAt),c=r.parseFloat,p=r.Symbol,h=p&&p.iterator,d=1/c(u+"-0")!=-1/0||h&&!i((function(){c(Object(h))}));t.exports=d?function(t){var e=a(n(t)),s=c(e);return 0===s&&"-"===l(e,0)?-0:s}:c},4284:(t,e,s)=>{"use strict";var r=s(9447),i=s(3648),o=s(8661),n=s(6624),a=s(470),u=TypeError,l=Object.defineProperty,c=Object.getOwnPropertyDescriptor,p="enumerable",h="configurable",d="writable";e.f=r?o?function(t,e,s){if(n(t),e=a(e),n(s),"function"==typeof t&&"prototype"===e&&"value"in s&&d in s&&!s[d]){var r=c(t,e);r&&r[d]&&(t[e]=s.value,s={configurable:h in s?s[h]:r[h],enumerable:p in s?s[p]:r[p],writable:!1})}return l(t,e,s)}:l:function(t,e,s){if(n(t),e=a(e),n(s),i)try{return l(t,e,s)}catch(t){}if("get"in s||"set"in s)throw new u("Accessors not supported");return"value"in s&&(t[e]=s.value),t}},3846:(t,e,s)=>{"use strict";var r=s(9447),i=s(3930),o=s(2574),n=s(5817),a=s(7374),u=s(470),l=s(9724),c=s(3648),p=Object.getOwnPropertyDescriptor;e.f=r?p:function(t,e){if(t=a(t),e=u(e),c)try{return p(t,e)}catch(t){}if(l(t,e))return n(!i(o.f,t,e),t[e])}},8280:(t,e,s)=>{"use strict";var r=s(1907);t.exports=r({}.isPrototypeOf)},2574:(t,e)=>{"use strict";var s={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!s.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:s},581:(t,e,s)=>{"use strict";var r=s(3930),i=s(2250),o=s(6285),n=TypeError;t.exports=function(t,e){var s,a;if("string"===e&&i(s=t.toString)&&!o(a=r(s,t)))return a;if(i(s=t.valueOf)&&!o(a=r(s,t)))return a;if("string"!==e&&i(s=t.toString)&&!o(a=r(s,t)))return a;throw new n("Can't convert object to primitive value")}},2046:t=>{"use strict";t.exports={}},4239:(t,e,s)=>{"use strict";var r=s(7136),i=TypeError;t.exports=function(t){if(r(t))throw new i("Can't call method on "+t);return t}},6128:(t,e,s)=>{"use strict";var r=s(7376),i=s(1010),o=s(2532),n="__core-js_shared__",a=t.exports=i[n]||o(n,{});(a.versions||(a.versions=[])).push({version:"3.37.1",mode:r?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5816:(t,e,s)=>{"use strict";var r=s(6128);t.exports=function(t,e){return r[t]||(r[t]=e||{})}},5993:(t,e,s)=>{"use strict";var r=s(1907),i=s(4239),o=s(160),n=s(6395),a=r("".replace),u=RegExp("^["+n+"]+"),l=RegExp("(^|[^"+n+"])["+n+"]+$"),c=function(t){return function(e){var s=o(i(e));return 1&t&&(s=a(s,u,"")),2&t&&(s=a(s,l,"$1")),s}};t.exports={start:c(1),end:c(2),trim:c(3)}},9846:(t,e,s)=>{"use strict";var r=s(5683),i=s(8828),o=s(1010).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},4849:(t,e,s)=>{"use strict";var r=s(5482),i=Math.max,o=Math.min;t.exports=function(t,e){var s=r(t);return s<0?i(s+e,0):o(s,e)}},7374:(t,e,s)=>{"use strict";var r=s(6946),i=s(4239);t.exports=function(t){return r(i(t))}},5482:(t,e,s)=>{"use strict";var r=s(1176);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},3121:(t,e,s)=>{"use strict";var r=s(5482),i=Math.min;t.exports=function(t){var e=r(t);return e>0?i(e,9007199254740991):0}},9298:(t,e,s)=>{"use strict";var r=s(4239),i=Object;t.exports=function(t){return i(r(t))}},6028:(t,e,s)=>{"use strict";var r=s(3930),i=s(6285),o=s(5594),n=s(9367),a=s(581),u=s(6264),l=TypeError,c=u("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var s,u=n(t,c);if(u){if(void 0===e&&(e="default"),s=r(u,t,e),!i(s)||o(s))return s;throw new l("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},470:(t,e,s)=>{"use strict";var r=s(6028),i=s(5594);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},2623:(t,e,s)=>{"use strict";var r={};r[s(6264)("toStringTag")]="z",t.exports="[object z]"===String(r)},160:(t,e,s)=>{"use strict";var r=s(3948),i=String;t.exports=function(t){if("Symbol"===r(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},4640:t=>{"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},6499:(t,e,s)=>{"use strict";var r=s(1907),i=0,o=Math.random(),n=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+n(++i+o,36)}},1175:(t,e,s)=>{"use strict";var r=s(9846);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8661:(t,e,s)=>{"use strict";var r=s(9447),i=s(8828);t.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},6264:(t,e,s)=>{"use strict";var r=s(1010),i=s(5816),o=s(9724),n=s(6499),a=s(9846),u=s(1175),l=r.Symbol,c=i("wks"),p=u?l.for||l:l&&l.withoutSetter||n;t.exports=function(t){return o(c,t)||(c[t]=a&&o(l,t)?l[t]:p("Symbol."+t)),c[t]}},6395:t=>{"use strict";t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},9748:(t,e,s)=>{"use strict";var r=s(1091),i=s(4436).includes,o=s(8828),n=s(2156);r({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n("includes")},9502:(t,e,s)=>{"use strict";var r=s(1091),i=s(7213);r({global:!0,forced:parseFloat!==i},{parseFloat:i})},9770:(t,e,s)=>{"use strict";var r=s(1091),i=s(1907),o=s(2074),n=s(4239),a=s(160),u=s(5735),l=i("".indexOf);r({target:"String",proto:!0,forced:!u("includes")},{includes:function(t){return!!~l(a(n(this)),a(o(t)),arguments.length>1?arguments[1]:void 0)}})},6343:(t,e,s)=>{"use strict";var r=s(6880);t.exports=r},6462:(t,e,s)=>{"use strict";var r=s(9929);t.exports=r}},i={};function o(t){var e=i[t];if(void 0!==e)return e.exports;var s=i[t]={exports:{}};return r[t].call(s.exports,s,s.exports,o),s.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var s in e)o.o(e,s)&&!o.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";o.r(n),o.d(n,{Account:()=>r,Counters:()=>p,Permissions:()=>i,Platform:()=>e,PlatformName:()=>s,Platforms:()=>l,ProductType:()=>t,Restrictions:()=>c,SessionStore:()=>x,User:()=>f});var t;!function(t){t.FREE="Free",t.DEVELOPER="Developer",t.MARKETING="Marketing",t.ENTERPRISE="Enterprise"}(t||(t={}));var e,s,r=function(t){var e,s,r,i,o,n,a,u,l,c,p,h,d,f,m,v,g,b,y,x,w,S,A,C,O;this.id=t.id,this.name=t.name,this.domain=t.domain,this.registrationDate=(S=t.registrationDate,A=(null==S?void 0:S.seconds)||0,C=(null==S?void 0:S.nanos)||0,new Date(1e3*A+C/1e6).toISOString()),this.hasActiveOrder=t.hasActiveOrder,this.currentOrder=t.currentOrder,this.billing={companyName:null===(e=t.billingAddress)||void 0===e?void 0:e.companyName,accountCompanyName:null===(s=t.billingAddress)||void 0===s?void 0:s.accountCompanyName,companyCountry:null===(r=t.billingAddress)||void 0===r?void 0:r.country,companyCountryCode:null===(i=t.billingAddress)||void 0===i?void 0:i.countryCode,companyState:null===(o=t.billingAddress)||void 0===o?void 0:o.state,companyStateCode:null===(n=t.billingAddress)||void 0===n?void 0:n.stateCode,companyCity:null===(a=t.billingAddress)||void 0===a?void 0:a.city,companyStreet:null===(u=t.billingAddress)||void 0===u?void 0:u.street,companyZip:null===(l=t.billingAddress)||void 0===l?void 0:l.zipCode,companyPhone:null===(c=t.billingAddress)||void 0===c?void 0:c.phone,companyVAT:null===(p=t.billingAddress)||void 0===p?void 0:p.vatNumber,companyNumber:null===(h=t.billingAddress)||void 0===h?void 0:h.companyNumber,primaryPersonFirstName:null===(d=t.billingAddress)||void 0===d?void 0:d.firstName,primaryPersonLastName:null===(f=t.billingAddress)||void 0===f?void 0:f.lastName,primaryPersonEmail:null===(m=t.billingAddress)||void 0===m?void 0:m.paymentEmail,secondaryPersonFirstName:null===(v=t.billingAddress)||void 0===v?void 0:v.secondaryPersonFirstName,secondaryPersonLastName:null===(g=t.billingAddress)||void 0===g?void 0:g.secondaryPersonLastName,secondaryPersonEmail:null===(b=t.billingAddress)||void 0===b?void 0:b.secondaryPersonEmail,industry:null===(y=t.billingAddress)||void 0===y?void 0:y.industry,department:null===(x=t.billingAddress)||void 0===x?void 0:x.department,additionalEmails:(O=null===(w=t.billingAddress)||void 0===w?void 0:w.additionalEmailsList,O?O.join(", "):"")},this.productType=t.productType,this.productName=t.restriction,this.isEnterprise=t.isEnterprise,this.expiryDate=t.expireDate,this.isFrozen=t.frozen,this.isDeviceLimitReached=t.isDeviceLimitReached,this.statistics={totalSubscribers:t.pushNotAvailableSubscribers+t.pushAvailableSubscribers,pushAvailableSubscribers:t.pushAvailableSubscribers,pushNotAvailableSubscribers:t.pushNotAvailableSubscribers,freeEmailsQuotaUpdateDate:t.freeEmailLimitUpdateDate,paidEmailsQuotaExpiryDate:t.paidEmailExpireDate},Object.freeze(this.currentOrder),Object.freeze(this.billing),Object.freeze(this.statistics),Object.freeze(this)},i=function(t){this.hasSuperRights=t.aceSuperRight,this.canManageSubscription=t.aceManageSubscription,this.canManageAccessTokens=t.aceSeeApiAccess,this.canManageDomainsAndEmails=t.aceDomainAndEmailVerification,this.canManageSubUsers=t.aceManageUsers,this.canSeeApplications=t.aceSeeApplications,this.canModifyApplications=t.aceModifyApplications,this.canSeeApplicationGroups=t.aceSeeAppGroups,this.canModifyApplicationGroups=t.aceModifyAppGroups,this.canSeeMessages=t.aceSeeMessages,this.canModifyMessages=t.aceModifyMessages&&this.canSeeMessages,this.canSendMessages=t.aceSendMessages&&this.canSeeMessages,this.canSeeTags=t.aceSeeTags,this.canModifyTags=t.aceModifyTags,this.canSeeSegments=t.aceSeeFilters&&this.canSeeTags,this.canModifySegments=t.aceModifyFilters&&this.canSeeTags,this.canSeeRichMedia=t.aceSeeRichMedia&&this.canSeeTags&&this.canSeeSegments,this.canModifyRichMedia=t.aceModifyRichMedia&&this.canSeeTags&&this.canSeeSegments,this.canSeeInApps=this.canSeeTags&&this.canSeeSegments&&this.canSeeRichMedia,this.canSeeEmailTemplates=t.aceSeeEmailTemplates&&this.canSeeTags,this.canModifyEmailTemplates=t.aceModifyEmailTemplates&&this.canSeeTags,Object.freeze(this)},a=o(8628),u=o.n(a);!function(t){t[t.IOS=1]="IOS",t[t.ANDROID=3]="ANDROID",t[t.MAC_OS=7]="MAC_OS",t[t.WINDOWS=8]="WINDOWS",t[t.AMAZON=9]="AMAZON",t[t.SAFARI=10]="SAFARI",t[t.CHROME=11]="CHROME",t[t.FIREFOX=12]="FIREFOX",t[t.IE=13]="IE",t[t.EMAIL=14]="EMAIL",t[t.BAIDU=16]="BAIDU",t[t.HUAWEI=17]="HUAWEI",t[t.SMS=18]="SMS",t[t.XIAOMI=19]="XIAOMI",t[t.WHATSAPP=21]="WHATSAPP"}(e||(e={})),function(t){t.IOS="iOS",t.ANDROID="Android",t.MAC_OS="Mac OS",t.WINDOWS="Windows",t.AMAZON="Amazon",t.SAFARI="Safari",t.CHROME="Chrome",t.FIREFOX="Firefox",t.IE="Internet Explorer",t.EMAIL="Email",t.BAIDU="Baidu",t.HUAWEI="Huawei",t.SMS="SMS",t.XIAOMI="Xiaomi",t.WHATSAPP="WhatsApp"}(s||(s={}));var l=function(){function t(e){var s=this;this.checkIsAvailablePlatform=function(t){var e;return u()(e=s.available).call(e,t)},this.available=t.filterAllowPlatforms(e.allowedPlatformsList),Object.freeze(this)}return t.filterAllowPlatforms=function(t){var s=Object.values(e);return t.filter((function(t){return u()(s).call(s,t)}))},t.getPlatformName=function(t){var r=Object.keys(s).find((function(s){return e[s]===t}));return r?s[r]:"Unknown platform!"},t}(),c=function(t){var e=t.restrictions;this.allowUseSubUsers=e.maxusers>1,this.maxUsersCount=e.maxusers,this.allowUseBaiduAndroid=e.allowbaiduandroidplatformusage,this.maxDevicesCount=e.maxdevices,this.maxApplicationsCount=e.maxapps,this.maxApplicationGroupsCount=e.maxapplicationgroups,this.allowUseApplicationGroups=this.maxApplicationGroupsCount>1,this.maxCampaignsCount=e.maxcampaigns,this.allowUseCampaigns=this.maxCampaignsCount>1,this.maxTagsCount=e.maxtags,this.allowUseTags=this.maxTagsCount>0,this.allowUseUserSpecificTags=e.maxuserspecifictags>0,this.maxFiltersCount=e.maxfilters,this.maxFastFiltersCount=e.maxpreparedfilters,this.allowUseFilters=this.maxFiltersCount>0,this.allowUseFiltersCompiling=e.allowcompilefilter,this.allowUseFiltersWithTagNotSet=e.allowtagnotsetfilter,this.maxEventsCount=e.maxevents,this.allowUseEvents=this.maxEventsCount>0,this.maxRichMediaCount=e.maxrichmedia,this.allowUseRichMedia=this.maxRichMediaCount>0,this.maxInAppsCount=e.maxinapps,this.allowUseInApps=this.maxInAppsCount>0,this.maxMailsCount=e.maxverifyingemails,this.maxDomainsCount=e.maxverifyingdomains,this.maxEmailTemplatesCount=e.maxemailtemplates,this.allowUseEmailPlatform=this.maxEmailTemplatesCount>0,this.maxPresetsCount=e.maxpresets,this.allowUsePresets=this.maxPresetsCount>0,this.maxAutoPushesCount=e.maxautopushes,this.allowUseAutoPushes=this.maxAutoPushesCount>0,this.allowUseGeozones=e.allowgeozoneapi,this.allowUseSendToGeozones=e.allowsendtogeozone,this.maxGeozonesCount=e.maxgeozones,this.maxGeozoneRange=e.maxgeozonerange,this.minGeozoneRange=50,this.maxDeepLinksCount=e.maxdeeplinks,this.allowUseDeepLinks=this.maxDeepLinksCount>0,this.maxTwitterFeedsCount=e.maxtwitterfeeds,this.allowUseTwitterFeeds=this.maxTwitterFeedsCount>0,this.maxRssFeedsCount=e.maxrssfeeds,this.allowUseRssFeeds=this.maxRssFeedsCount>0,this.allowUseRssFeedsCustomPollingInterval=e.allowcustomrsspollinginterval,this.maxTestDevicesCount=e.maxtestdevices,this.allowUseTestDevices=this.maxTestDevicesCount>0,this.allowUseAccessTokens=e.allowapi,this.allowUseDataKeys=e.allowcustomdata,this.allowUseStatistics=e.allowstatsaccess,this.allowUseScheduling=e.allowscheduling,this.allowUseIOSAutoConfig=e.allowautoconfig,this.allowUseTwoFactorAuth=e.allowtwofactorauth,this.allowUseSendMessageByCsv=e.allowcsvmessage,this.allowUseAbTests=e.allowabtests,this.allowUseHtmlPages=!1,this.allowUseRemotePage=e.allowremotepage,this.allowUseIOSCategories=e.maxioscategories>0,this.allowUseGoalTracking=e.allowgoaltracking,this.allowUseGetMessageLog=e.allowapigetmessagelog,this.allowUseIEPlatform=e.allowieplatformusage,this.allowUseDebugMode=e.allowdebugmode,this.allowUseUninstallTracking=e.allowtrackuninstalls,this.allowUseFrequencyCapping=e.allowfrequencycapping,this.allowUseInbox=e.allowinbox,this.maxInboxTtlDays=e.maxinboxttldays,this.allowUseSendExternalAndroidStatistics=e.allowsendexternalstats,this.allowUseGDPR=e.allowgdpr,this.sendRateMin=e.minsendrate,this.sendRateMax=e.maxsendrate,this.messageHistoryStoriedPeriodInDays=e.messagehistorystoreperiod,this.allowShowDeliveryStatistics=e.allowshowdeliverystatistics,this.allowBestTimeToSend=e.allowbesttimetosend,this.allowSegmentsGroups=e.allowsegmentsgroups,this.allowEventSegmentation=e.alloweventsegmentation,this.allowCustomerJourney=e.allowcustomerjourney,this.allowEventsFunnel=e.alloweventsfunnel,this.isEnabledBackup=e.allowbackup,this.allowChannelsSection=e.allowchannelssection,this.allowUseSMSPlatform=e.allowcjsms,this.allowUseWhatsAppPlatform=e.allowwhatsapp,Object.freeze(this)},p=function(t){this.totalApplicationsCount=t.applicationsCount,this.totalApplicationGroupsCount=t.appGroupsCount,this.totalCampaignsCount=t.campaignsCount,this.totalTagsCount=t.tagsCount,this.totalFiltersCount=t.filtersCount,this.totalEventsCount=t.eventsCount,this.totalRichMediaCount=t.richMediaCount,this.totalInAppsCount=t.inAppsCount,this.totalDomainsCount=t.accountDomainsCount,this.totalMailsCount=t.accountMailsCount,this.totalEmailTemplatesCount=t.emailTemplatesCount,this.totalPresetsCount=t.presetsCount,this.totalAutoPushesCount=t.autoPushesCount,this.totalGeozonesCount=t.geoZonesCount,this.totalDeepLinksCount=t.deeplinksCount,this.totalRssFeedsCount=t.rssFeedsCount,this.totalTestDevicesCount=t.testDevicesCount},h=o(3981),d=o.n(h),f=function(t,e){this.name=e.username,this.email=e.email,this.isActive=e.isActive,this.isOwner=t.admin,this.timezone=e.timezone,this.timezoneOffset=60*d()(e.timezoneOffset),this.accountCount=e.accountsCount,this.intercomUserHash=e.intercomUserHash,this.isSubscribedForNewsletters=e.allowNewsletters,Object.freeze(this)},m=o(5652),v=o(3961),g=o(1157).rpcServiceClient.accounts,b=g.GetAuthInfoServiceClient,y=g.GetAuthInfoRequest,x=function(t){var e=this;this.updateSubject=function(t,s){e.subject.next({account:new r(t),counters:new p(t),platforms:new l(t),permissions:new i(t),restrictions:new c(t),user:new f(t,s)})},this.load=function(){return(0,m.__awaiter)(e,void 0,void 0,(function(){var t,e,s,r,i,o;return(0,m.__generator)(this,(function(n){switch(n.label){case 0:return t=this.grpcClient.createServiceClient(b),e=new y,[4,t.getAuthInfo(e,{})];case 1:return s=n.sent(),r=s.toObject(),i=r.account,o=r.user,[2,[i,o]]}}))}))},this.update=function(){return(0,m.__awaiter)(e,void 0,void 0,(function(){var t,e,s;return(0,m.__generator)(this,(function(r){switch(r.label){case 0:return[4,this.load()];case 1:return t=r.sent(),e=t[0],s=t[1],this.updateSubject(e,s),[2]}}))}))},this.subscribe=function(t){return e.subject.subscribe(t)},this.grpcClient=t,this.subject=new v.ReplaySubject(1)}})(),n})()));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("tslib"),require("rxjs"),require("@pushwoosh/grpc-bridge")):"function"==typeof define&&define.amd?define(["tslib","rxjs","@pushwoosh/grpc-bridge"],e):"object"==typeof exports?exports["@pushwoosh/session-store"]=e(require("tslib"),require("rxjs"),require("@pushwoosh/grpc-bridge")):t["@pushwoosh/session-store"]=e(t.tslib,t.rxjs,t["@pushwoosh/grpc-bridge"])}(self,((t,e,s)=>(()=>{var r={1157:t=>{"use strict";t.exports=s},3961:t=>{"use strict";t.exports=e},5652:e=>{"use strict";e.exports=t},8628:(t,e,s)=>{t.exports=s(6343)},3981:(t,e,s)=>{t.exports=s(6462)},1362:(t,e,s)=>{"use strict";s(9748);var r=s(1747);t.exports=r("Array","includes")},6880:(t,e,s)=>{"use strict";var r=s(8280),i=s(1362),o=s(4378),n=Array.prototype,a=String.prototype;t.exports=function(t){var e=t.includes;return t===n||r(n,t)&&e===n.includes?i:"string"==typeof t||t===a||r(a,t)&&e===a.includes?o:e}},9929:(t,e,s)=>{"use strict";s(9502);var r=s(2046);t.exports=r.parseFloat},4378:(t,e,s)=>{"use strict";s(9770);var r=s(1747);t.exports=r("String","includes")},2159:(t,e,s)=>{"use strict";var r=s(2250),i=s(4640),o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not a function")}},2156:t=>{"use strict";t.exports=function(){}},6624:(t,e,s)=>{"use strict";var r=s(6285),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not an object")}},4436:(t,e,s)=>{"use strict";var r=s(7374),i=s(4849),o=s(575),n=function(t){return function(e,s,n){var a=r(e),u=o(a);if(0===u)return!t&&-1;var l,c=i(n,u);if(t&&s!=s){for(;u>c;)if((l=a[c++])!=l)return!0}else for(;u>c;c++)if((t||c in a)&&a[c]===s)return t||c||0;return!t&&-1}};t.exports={includes:n(!0),indexOf:n(!1)}},5807:(t,e,s)=>{"use strict";var r=s(1907),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},3948:(t,e,s)=>{"use strict";var r=s(2623),i=s(2250),o=s(5807),n=s(6264)("toStringTag"),a=Object,u="Arguments"===o(function(){return arguments}());t.exports=r?o:function(t){var e,s,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(s=function(t,e){try{return t[e]}catch(t){}}(e=a(t),n))?s:u?o(e):"Object"===(r=o(e))&&i(e.callee)?"Arguments":r}},5735:(t,e,s)=>{"use strict";var r=s(6264)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(s){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},1626:(t,e,s)=>{"use strict";var r=s(9447),i=s(4284),o=s(5817);t.exports=r?function(t,e,s){return i.f(t,e,o(1,s))}:function(t,e,s){return t[e]=s,t}},5817:t=>{"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},2532:(t,e,s)=>{"use strict";var r=s(1010),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(s){r[t]=e}return e}},9447:(t,e,s)=>{"use strict";var r=s(8828);t.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},9552:(t,e,s)=>{"use strict";var r=s(1010),i=s(6285),o=r.document,n=i(o)&&i(o.createElement);t.exports=function(t){return n?o.createElement(t):{}}},4723:t=>{"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},5683:(t,e,s)=>{"use strict";var r,i,o=s(1010),n=s(4723),a=o.process,u=o.Deno,l=a&&a.versions||u&&u.version,c=l&&l.v8;c&&(i=(r=c.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&n&&(!(r=n.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=n.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},1091:(t,e,s)=>{"use strict";var r=s(1010),i=s(6024),o=s(2361),n=s(2250),a=s(3846).f,u=s(7463),l=s(2046),c=s(8311),p=s(1626),h=s(9724);s(6128);var d=function(t){var e=function(s,r,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(s);case 2:return new t(s,r)}return new t(s,r,o)}return i(t,this,arguments)};return e.prototype=t.prototype,e};t.exports=function(t,e){var s,i,f,m,v,g,b,y,x,w=t.target,S=t.global,A=t.stat,C=t.proto,M=S?r:A?r[w]:r[w]&&r[w].prototype,O=S?l:l[w]||p(l,w,{})[w],E=O.prototype;for(m in e)i=!(s=u(S?m:w+(A?".":"#")+m,t.forced))&&M&&h(M,m),g=O[m],i&&(b=t.dontCallGetSet?(x=a(M,m))&&x.value:M[m]),v=i&&b?b:e[m],(s||C||typeof g!=typeof v)&&(y=t.bind&&i?c(v,r):t.wrap&&i?d(v):C&&n(v)?o(v):v,(t.sham||v&&v.sham||g&&g.sham)&&p(y,"sham",!0),p(O,m,y),C&&(h(l,f=w+"Prototype")||p(l,f,{}),p(l[f],m,v),t.real&&E&&(s||!E[m])&&p(E,m,v)))}},8828:t=>{"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},6024:(t,e,s)=>{"use strict";var r=s(1505),i=Function.prototype,o=i.apply,n=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?n.bind(o):function(){return n.apply(o,arguments)})},8311:(t,e,s)=>{"use strict";var r=s(2361),i=s(2159),o=s(1505),n=r(r.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?n(t,e):function(){return t.apply(e,arguments)}}},1505:(t,e,s)=>{"use strict";var r=s(8828);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},3930:(t,e,s)=>{"use strict";var r=s(1505),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},2361:(t,e,s)=>{"use strict";var r=s(5807),i=s(1907);t.exports=function(t){if("Function"===r(t))return i(t)}},1907:(t,e,s)=>{"use strict";var r=s(1505),i=Function.prototype,o=i.call,n=r&&i.bind.bind(o,o);t.exports=r?n:function(t){return function(){return o.apply(t,arguments)}}},1747:(t,e,s)=>{"use strict";var r=s(1010),i=s(2046);t.exports=function(t,e){var s=i[t+"Prototype"],o=s&&s[e];if(o)return o;var n=r[t],a=n&&n.prototype;return a&&a[e]}},5582:(t,e,s)=>{"use strict";var r=s(2046),i=s(1010),o=s(2250),n=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?n(r[t])||n(i[t]):r[t]&&r[t][e]||i[t]&&i[t][e]}},9367:(t,e,s)=>{"use strict";var r=s(2159),i=s(7136);t.exports=function(t,e){var s=t[e];return i(s)?void 0:r(s)}},1010:function(t,e,s){"use strict";var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof s.g&&s.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9724:(t,e,s)=>{"use strict";var r=s(1907),i=s(9298),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},3648:(t,e,s)=>{"use strict";var r=s(9447),i=s(8828),o=s(9552);t.exports=!r&&!i((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},6946:(t,e,s)=>{"use strict";var r=s(1907),i=s(8828),o=s(5807),n=Object,a=r("".split);t.exports=i((function(){return!n("z").propertyIsEnumerable(0)}))?function(t){return"String"===o(t)?a(t,""):n(t)}:n},2250:t=>{"use strict";var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},7463:(t,e,s)=>{"use strict";var r=s(8828),i=s(2250),o=/#|\.prototype\./,n=function(t,e){var s=u[a(t)];return s===c||s!==l&&(i(e)?r(e):!!e)},a=n.normalize=function(t){return String(t).replace(o,".").toLowerCase()},u=n.data={},l=n.NATIVE="N",c=n.POLYFILL="P";t.exports=n},7136:t=>{"use strict";t.exports=function(t){return null==t}},6285:(t,e,s)=>{"use strict";var r=s(2250);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},7376:t=>{"use strict";t.exports=!0},2087:(t,e,s)=>{"use strict";var r=s(6285),i=s(5807),o=s(6264)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"===i(t))}},5594:(t,e,s)=>{"use strict";var r=s(5582),i=s(2250),o=s(8280),n=s(1175),a=Object;t.exports=n?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,a(t))}},575:(t,e,s)=>{"use strict";var r=s(3121);t.exports=function(t){return r(t.length)}},1176:t=>{"use strict";var e=Math.ceil,s=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?s:e)(r)}},2074:(t,e,s)=>{"use strict";var r=s(2087),i=TypeError;t.exports=function(t){if(r(t))throw new i("The method doesn't accept regular expressions");return t}},7213:(t,e,s)=>{"use strict";var r=s(1010),i=s(8828),o=s(1907),n=s(160),a=s(5993).trim,u=s(6395),l=o("".charAt),c=r.parseFloat,p=r.Symbol,h=p&&p.iterator,d=1/c(u+"-0")!=-1/0||h&&!i((function(){c(Object(h))}));t.exports=d?function(t){var e=a(n(t)),s=c(e);return 0===s&&"-"===l(e,0)?-0:s}:c},4284:(t,e,s)=>{"use strict";var r=s(9447),i=s(3648),o=s(8661),n=s(6624),a=s(470),u=TypeError,l=Object.defineProperty,c=Object.getOwnPropertyDescriptor,p="enumerable",h="configurable",d="writable";e.f=r?o?function(t,e,s){if(n(t),e=a(e),n(s),"function"==typeof t&&"prototype"===e&&"value"in s&&d in s&&!s[d]){var r=c(t,e);r&&r[d]&&(t[e]=s.value,s={configurable:h in s?s[h]:r[h],enumerable:p in s?s[p]:r[p],writable:!1})}return l(t,e,s)}:l:function(t,e,s){if(n(t),e=a(e),n(s),i)try{return l(t,e,s)}catch(t){}if("get"in s||"set"in s)throw new u("Accessors not supported");return"value"in s&&(t[e]=s.value),t}},3846:(t,e,s)=>{"use strict";var r=s(9447),i=s(3930),o=s(2574),n=s(5817),a=s(7374),u=s(470),l=s(9724),c=s(3648),p=Object.getOwnPropertyDescriptor;e.f=r?p:function(t,e){if(t=a(t),e=u(e),c)try{return p(t,e)}catch(t){}if(l(t,e))return n(!i(o.f,t,e),t[e])}},8280:(t,e,s)=>{"use strict";var r=s(1907);t.exports=r({}.isPrototypeOf)},2574:(t,e)=>{"use strict";var s={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!s.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:s},581:(t,e,s)=>{"use strict";var r=s(3930),i=s(2250),o=s(6285),n=TypeError;t.exports=function(t,e){var s,a;if("string"===e&&i(s=t.toString)&&!o(a=r(s,t)))return a;if(i(s=t.valueOf)&&!o(a=r(s,t)))return a;if("string"!==e&&i(s=t.toString)&&!o(a=r(s,t)))return a;throw new n("Can't convert object to primitive value")}},2046:t=>{"use strict";t.exports={}},4239:(t,e,s)=>{"use strict";var r=s(7136),i=TypeError;t.exports=function(t){if(r(t))throw new i("Can't call method on "+t);return t}},6128:(t,e,s)=>{"use strict";var r=s(7376),i=s(1010),o=s(2532),n="__core-js_shared__",a=t.exports=i[n]||o(n,{});(a.versions||(a.versions=[])).push({version:"3.37.1",mode:r?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5816:(t,e,s)=>{"use strict";var r=s(6128);t.exports=function(t,e){return r[t]||(r[t]=e||{})}},5993:(t,e,s)=>{"use strict";var r=s(1907),i=s(4239),o=s(160),n=s(6395),a=r("".replace),u=RegExp("^["+n+"]+"),l=RegExp("(^|[^"+n+"])["+n+"]+$"),c=function(t){return function(e){var s=o(i(e));return 1&t&&(s=a(s,u,"")),2&t&&(s=a(s,l,"$1")),s}};t.exports={start:c(1),end:c(2),trim:c(3)}},9846:(t,e,s)=>{"use strict";var r=s(5683),i=s(8828),o=s(1010).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},4849:(t,e,s)=>{"use strict";var r=s(5482),i=Math.max,o=Math.min;t.exports=function(t,e){var s=r(t);return s<0?i(s+e,0):o(s,e)}},7374:(t,e,s)=>{"use strict";var r=s(6946),i=s(4239);t.exports=function(t){return r(i(t))}},5482:(t,e,s)=>{"use strict";var r=s(1176);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},3121:(t,e,s)=>{"use strict";var r=s(5482),i=Math.min;t.exports=function(t){var e=r(t);return e>0?i(e,9007199254740991):0}},9298:(t,e,s)=>{"use strict";var r=s(4239),i=Object;t.exports=function(t){return i(r(t))}},6028:(t,e,s)=>{"use strict";var r=s(3930),i=s(6285),o=s(5594),n=s(9367),a=s(581),u=s(6264),l=TypeError,c=u("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var s,u=n(t,c);if(u){if(void 0===e&&(e="default"),s=r(u,t,e),!i(s)||o(s))return s;throw new l("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},470:(t,e,s)=>{"use strict";var r=s(6028),i=s(5594);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},2623:(t,e,s)=>{"use strict";var r={};r[s(6264)("toStringTag")]="z",t.exports="[object z]"===String(r)},160:(t,e,s)=>{"use strict";var r=s(3948),i=String;t.exports=function(t){if("Symbol"===r(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},4640:t=>{"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},6499:(t,e,s)=>{"use strict";var r=s(1907),i=0,o=Math.random(),n=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+n(++i+o,36)}},1175:(t,e,s)=>{"use strict";var r=s(9846);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8661:(t,e,s)=>{"use strict";var r=s(9447),i=s(8828);t.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},6264:(t,e,s)=>{"use strict";var r=s(1010),i=s(5816),o=s(9724),n=s(6499),a=s(9846),u=s(1175),l=r.Symbol,c=i("wks"),p=u?l.for||l:l&&l.withoutSetter||n;t.exports=function(t){return o(c,t)||(c[t]=a&&o(l,t)?l[t]:p("Symbol."+t)),c[t]}},6395:t=>{"use strict";t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},9748:(t,e,s)=>{"use strict";var r=s(1091),i=s(4436).includes,o=s(8828),n=s(2156);r({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n("includes")},9502:(t,e,s)=>{"use strict";var r=s(1091),i=s(7213);r({global:!0,forced:parseFloat!==i},{parseFloat:i})},9770:(t,e,s)=>{"use strict";var r=s(1091),i=s(1907),o=s(2074),n=s(4239),a=s(160),u=s(5735),l=i("".indexOf);r({target:"String",proto:!0,forced:!u("includes")},{includes:function(t){return!!~l(a(n(this)),a(o(t)),arguments.length>1?arguments[1]:void 0)}})},6343:(t,e,s)=>{"use strict";var r=s(6880);t.exports=r},6462:(t,e,s)=>{"use strict";var r=s(9929);t.exports=r}},i={};function o(t){var e=i[t];if(void 0!==e)return e.exports;var s=i[t]={exports:{}};return r[t].call(s.exports,s,s.exports,o),s.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var s in e)o.o(e,s)&&!o.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";o.r(n),o.d(n,{Account:()=>r,Counters:()=>p,Permissions:()=>i,Platform:()=>e,PlatformName:()=>s,Platforms:()=>l,ProductType:()=>t,Restrictions:()=>c,SessionStore:()=>x,User:()=>f});var t;!function(t){t.FREE="Free",t.DEVELOPER="Developer",t.MARKETING="Marketing",t.ENTERPRISE="Enterprise"}(t||(t={}));var e,s,r=function(t){var e,s,r,i,o,n,a,u,l,c,p,h,d,f,m,v,g,b,y,x,w,S,A,C,M;this.id=t.id,this.name=t.name,this.domain=t.domain,this.registrationDate=(S=t.registrationDate,A=(null==S?void 0:S.seconds)||0,C=(null==S?void 0:S.nanos)||0,new Date(1e3*A+C/1e6).toISOString()),this.hasActiveOrder=t.hasActiveOrder,this.billing={companyName:null===(e=t.billingAddress)||void 0===e?void 0:e.companyName,accountCompanyName:null===(s=t.billingAddress)||void 0===s?void 0:s.accountCompanyName,companyCountry:null===(r=t.billingAddress)||void 0===r?void 0:r.country,companyCountryCode:null===(i=t.billingAddress)||void 0===i?void 0:i.countryCode,companyState:null===(o=t.billingAddress)||void 0===o?void 0:o.state,companyStateCode:null===(n=t.billingAddress)||void 0===n?void 0:n.stateCode,companyCity:null===(a=t.billingAddress)||void 0===a?void 0:a.city,companyStreet:null===(u=t.billingAddress)||void 0===u?void 0:u.street,companyZip:null===(l=t.billingAddress)||void 0===l?void 0:l.zipCode,companyPhone:null===(c=t.billingAddress)||void 0===c?void 0:c.phone,companyVAT:null===(p=t.billingAddress)||void 0===p?void 0:p.vatNumber,companyNumber:null===(h=t.billingAddress)||void 0===h?void 0:h.companyNumber,primaryPersonFirstName:null===(d=t.billingAddress)||void 0===d?void 0:d.firstName,primaryPersonLastName:null===(f=t.billingAddress)||void 0===f?void 0:f.lastName,primaryPersonEmail:null===(m=t.billingAddress)||void 0===m?void 0:m.paymentEmail,secondaryPersonFirstName:null===(v=t.billingAddress)||void 0===v?void 0:v.secondaryPersonFirstName,secondaryPersonLastName:null===(g=t.billingAddress)||void 0===g?void 0:g.secondaryPersonLastName,secondaryPersonEmail:null===(b=t.billingAddress)||void 0===b?void 0:b.secondaryPersonEmail,industry:null===(y=t.billingAddress)||void 0===y?void 0:y.industry,department:null===(x=t.billingAddress)||void 0===x?void 0:x.department,additionalEmails:(M=null===(w=t.billingAddress)||void 0===w?void 0:w.additionalEmailsList,M?M.join(", "):"")},this.productType=t.productType,this.productName=t.restriction,this.isEnterprise=t.isEnterprise,this.expiryDate=t.expireDate,this.isFrozen=t.frozen,this.isDeviceLimitReached=t.isDeviceLimitReached,this.statistics={totalSubscribers:t.pushNotAvailableSubscribers+t.pushAvailableSubscribers,pushAvailableSubscribers:t.pushAvailableSubscribers,pushNotAvailableSubscribers:t.pushNotAvailableSubscribers,freeEmailsQuotaUpdateDate:t.freeEmailLimitUpdateDate,paidEmailsQuotaExpiryDate:t.paidEmailExpireDate},Object.freeze(this.billing),Object.freeze(this.statistics),Object.freeze(this)},i=function(t){this.hasSuperRights=t.aceSuperRight,this.canManageSubscription=t.aceManageSubscription,this.canManageAccessTokens=t.aceSeeApiAccess,this.canManageDomainsAndEmails=t.aceDomainAndEmailVerification,this.canManageSubUsers=t.aceManageUsers,this.canSeeApplications=t.aceSeeApplications,this.canModifyApplications=t.aceModifyApplications,this.canSeeApplicationGroups=t.aceSeeAppGroups,this.canModifyApplicationGroups=t.aceModifyAppGroups,this.canSeeMessages=t.aceSeeMessages,this.canModifyMessages=t.aceModifyMessages&&this.canSeeMessages,this.canSendMessages=t.aceSendMessages&&this.canSeeMessages,this.canSeeTags=t.aceSeeTags,this.canModifyTags=t.aceModifyTags,this.canSeeSegments=t.aceSeeFilters&&this.canSeeTags,this.canModifySegments=t.aceModifyFilters&&this.canSeeTags,this.canSeeRichMedia=t.aceSeeRichMedia&&this.canSeeTags&&this.canSeeSegments,this.canModifyRichMedia=t.aceModifyRichMedia&&this.canSeeTags&&this.canSeeSegments,this.canSeeInApps=this.canSeeTags&&this.canSeeSegments&&this.canSeeRichMedia,this.canSeeEmailTemplates=t.aceSeeEmailTemplates&&this.canSeeTags,this.canModifyEmailTemplates=t.aceModifyEmailTemplates&&this.canSeeTags,Object.freeze(this)},a=o(8628),u=o.n(a);!function(t){t[t.IOS=1]="IOS",t[t.ANDROID=3]="ANDROID",t[t.MAC_OS=7]="MAC_OS",t[t.WINDOWS=8]="WINDOWS",t[t.AMAZON=9]="AMAZON",t[t.SAFARI=10]="SAFARI",t[t.CHROME=11]="CHROME",t[t.FIREFOX=12]="FIREFOX",t[t.IE=13]="IE",t[t.EMAIL=14]="EMAIL",t[t.BAIDU=16]="BAIDU",t[t.HUAWEI=17]="HUAWEI",t[t.SMS=18]="SMS",t[t.XIAOMI=19]="XIAOMI",t[t.WHATSAPP=21]="WHATSAPP"}(e||(e={})),function(t){t.IOS="iOS",t.ANDROID="Android",t.MAC_OS="Mac OS",t.WINDOWS="Windows",t.AMAZON="Amazon",t.SAFARI="Safari",t.CHROME="Chrome",t.FIREFOX="Firefox",t.IE="Internet Explorer",t.EMAIL="Email",t.BAIDU="Baidu",t.HUAWEI="Huawei",t.SMS="SMS",t.XIAOMI="Xiaomi",t.WHATSAPP="WhatsApp"}(s||(s={}));var l=function(){function t(e){var s=this;this.checkIsAvailablePlatform=function(t){var e;return u()(e=s.available).call(e,t)},this.available=t.filterAllowPlatforms(e.allowedPlatformsList),Object.freeze(this)}return t.filterAllowPlatforms=function(t){var s=Object.values(e);return t.filter((function(t){return u()(s).call(s,t)}))},t.getPlatformName=function(t){var r=Object.keys(s).find((function(s){return e[s]===t}));return r?s[r]:"Unknown platform!"},t}(),c=function(t){var e=t.restrictions;this.allowUseSubUsers=e.maxusers>1,this.maxUsersCount=e.maxusers,this.allowUseBaiduAndroid=e.allowbaiduandroidplatformusage,this.maxDevicesCount=e.maxdevices,this.maxApplicationsCount=e.maxapps,this.maxApplicationGroupsCount=e.maxapplicationgroups,this.allowUseApplicationGroups=this.maxApplicationGroupsCount>1,this.maxCampaignsCount=e.maxcampaigns,this.allowUseCampaigns=this.maxCampaignsCount>1,this.maxTagsCount=e.maxtags,this.allowUseTags=this.maxTagsCount>0,this.allowUseUserSpecificTags=e.maxuserspecifictags>0,this.maxFiltersCount=e.maxfilters,this.maxFastFiltersCount=e.maxpreparedfilters,this.allowUseFilters=this.maxFiltersCount>0,this.allowUseFiltersCompiling=e.allowcompilefilter,this.allowUseFiltersWithTagNotSet=e.allowtagnotsetfilter,this.maxEventsCount=e.maxevents,this.allowUseEvents=this.maxEventsCount>0,this.maxRichMediaCount=e.maxrichmedia,this.allowUseRichMedia=this.maxRichMediaCount>0,this.maxInAppsCount=e.maxinapps,this.allowUseInApps=this.maxInAppsCount>0,this.maxMailsCount=e.maxverifyingemails,this.maxDomainsCount=e.maxverifyingdomains,this.maxEmailTemplatesCount=e.maxemailtemplates,this.allowUseEmailPlatform=this.maxEmailTemplatesCount>0,this.maxPresetsCount=e.maxpresets,this.allowUsePresets=this.maxPresetsCount>0,this.maxAutoPushesCount=e.maxautopushes,this.allowUseAutoPushes=this.maxAutoPushesCount>0,this.allowUseGeozones=e.allowgeozoneapi,this.allowUseSendToGeozones=e.allowsendtogeozone,this.maxGeozonesCount=e.maxgeozones,this.maxGeozoneRange=e.maxgeozonerange,this.minGeozoneRange=50,this.maxDeepLinksCount=e.maxdeeplinks,this.allowUseDeepLinks=this.maxDeepLinksCount>0,this.maxTwitterFeedsCount=e.maxtwitterfeeds,this.allowUseTwitterFeeds=this.maxTwitterFeedsCount>0,this.maxRssFeedsCount=e.maxrssfeeds,this.allowUseRssFeeds=this.maxRssFeedsCount>0,this.allowUseRssFeedsCustomPollingInterval=e.allowcustomrsspollinginterval,this.maxTestDevicesCount=e.maxtestdevices,this.allowUseTestDevices=this.maxTestDevicesCount>0,this.allowUseAccessTokens=e.allowapi,this.allowUseDataKeys=e.allowcustomdata,this.allowUseStatistics=e.allowstatsaccess,this.allowUseScheduling=e.allowscheduling,this.allowUseIOSAutoConfig=e.allowautoconfig,this.allowUseTwoFactorAuth=e.allowtwofactorauth,this.allowUseSendMessageByCsv=e.allowcsvmessage,this.allowUseAbTests=e.allowabtests,this.allowUseHtmlPages=!1,this.allowUseRemotePage=e.allowremotepage,this.allowUseIOSCategories=e.maxioscategories>0,this.allowUseGoalTracking=e.allowgoaltracking,this.allowUseGetMessageLog=e.allowapigetmessagelog,this.allowUseIEPlatform=e.allowieplatformusage,this.allowUseDebugMode=e.allowdebugmode,this.allowUseUninstallTracking=e.allowtrackuninstalls,this.allowUseFrequencyCapping=e.allowfrequencycapping,this.allowUseInbox=e.allowinbox,this.maxInboxTtlDays=e.maxinboxttldays,this.allowUseSendExternalAndroidStatistics=e.allowsendexternalstats,this.allowUseGDPR=e.allowgdpr,this.sendRateMin=e.minsendrate,this.sendRateMax=e.maxsendrate,this.messageHistoryStoriedPeriodInDays=e.messagehistorystoreperiod,this.allowShowDeliveryStatistics=e.allowshowdeliverystatistics,this.allowBestTimeToSend=e.allowbesttimetosend,this.allowSegmentsGroups=e.allowsegmentsgroups,this.allowEventSegmentation=e.alloweventsegmentation,this.allowCustomerJourney=e.allowcustomerjourney,this.allowEventsFunnel=e.alloweventsfunnel,this.isEnabledBackup=e.allowbackup,this.allowChannelsSection=e.allowchannelssection,this.allowUseSMSPlatform=e.allowcjsms,this.allowUseWhatsAppPlatform=e.allowwhatsapp,Object.freeze(this)},p=function(t){this.totalApplicationsCount=t.applicationsCount,this.totalApplicationGroupsCount=t.appGroupsCount,this.totalCampaignsCount=t.campaignsCount,this.totalTagsCount=t.tagsCount,this.totalFiltersCount=t.filtersCount,this.totalEventsCount=t.eventsCount,this.totalRichMediaCount=t.richMediaCount,this.totalInAppsCount=t.inAppsCount,this.totalDomainsCount=t.accountDomainsCount,this.totalMailsCount=t.accountMailsCount,this.totalEmailTemplatesCount=t.emailTemplatesCount,this.totalPresetsCount=t.presetsCount,this.totalAutoPushesCount=t.autoPushesCount,this.totalGeozonesCount=t.geoZonesCount,this.totalDeepLinksCount=t.deeplinksCount,this.totalRssFeedsCount=t.rssFeedsCount,this.totalTestDevicesCount=t.testDevicesCount},h=o(3981),d=o.n(h),f=function(t,e){this.name=e.username,this.email=e.email,this.isActive=e.isActive,this.isOwner=t.admin,this.timezone=e.timezone,this.timezoneOffset=60*d()(e.timezoneOffset),this.accountCount=e.accountsCount,this.intercomUserHash=e.intercomUserHash,this.isSubscribedForNewsletters=e.allowNewsletters,Object.freeze(this)},m=o(5652),v=o(3961),g=o(1157).rpcServiceClient.accounts,b=g.GetAuthInfoServiceClient,y=g.GetAuthInfoRequest,x=function(t){var e=this;this.updateSubject=function(t,s){e.subject.next({account:new r(t),counters:new p(t),platforms:new l(t),permissions:new i(t),restrictions:new c(t),user:new f(t,s)})},this.load=function(){return(0,m.__awaiter)(e,void 0,void 0,(function(){var t,e,s,r,i,o;return(0,m.__generator)(this,(function(n){switch(n.label){case 0:return t=this.grpcClient.createServiceClient(b),e=new y,[4,t.getAuthInfo(e,{})];case 1:return s=n.sent(),r=s.toObject(),i=r.account,o=r.user,[2,[i,o]]}}))}))},this.update=function(){return(0,m.__awaiter)(e,void 0,void 0,(function(){var t,e,s;return(0,m.__generator)(this,(function(r){switch(r.label){case 0:return[4,this.load()];case 1:return t=r.sent(),e=t[0],s=t[1],this.updateSubject(e,s),[2]}}))}))},this.subscribe=function(t){return e.subject.subscribe(t)},this.grpcClient=t,this.subject=new v.ReplaySubject(1)}})(),n})()));
2
2
  //# sourceMappingURL=index.js.map