indigitall-web-sdk 4.3.2 → 4.3.3
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/package.json +6 -6
- package/sdk.min.js +1 -1
package/sdk.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see sdk.min.js.LICENSE.txt */
|
|
2
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(this,(()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.3.2","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>B});var t={};r.r(t),r.d(t,{BaseClient:()=>b,BaseRequest:()=>_});var e={};r.r(e),r.d(e,{Channel:()=>S,Device:()=>O,DeviceStatus:()=>P,ErrorDictionary:()=>I,ErrorModel:()=>g,EventType:()=>w,TopicSubscribeType:()=>R});var i={};r.r(i),r.d(i,{CommonUtils:()=>T,CorePermissions:()=>A,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>x,Log:()=>v,LogLevel:()=>d,TopicUtils:()=>M,Validations:()=>k});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,p=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t),l&&l.IDB&&await l.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}async getAppKeySync(){if(l&&l.IDB)return await l.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}},d=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=d;class E{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new p).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const v=E,g=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new g(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new g(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},b=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new v("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(y.DEBUG);let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\n").writeLog(),new g(n.statusCode,n.message))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},_=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new p).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},S=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),O=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new p).getBrowserPublicKey(),this.browserPrivateKey=(new p).getBrowserPrivateKey(),this.platform=(new p).getPlatform(),this.version=(new p).getVersion(),this.browserName=(new p).getBrowserName(),this.browserVersion=(new p).getBrowserVersion(),this.osName=(new p).getOsName(),this.osVersion=(new p).getOsVersion(),this.deviceType=(new p).getDeviceType(),(new p).getEnabled()&&(this.enabled="true"===(new p).getEnabled()),(new p).getExternalId()&&(this.externalCode=(new p).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new p).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new p).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},P=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),T=class{static isServiceTimestampExceed(){return!(new p).getServiceTimestamp()||(new p).getServiceSyncTime()<=(Date.now()-(new p).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},A=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new v("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},N=new v("[IND]Crypto"),L=new TextEncoder("utf-8"),C="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",L.encode(t),{name:C,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(C,n,L.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return N.d("hmac: ",s).writeLog(),s}catch(t){return void N.e("error:",t).writeLog()}}},x=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},k=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},B={Repository:p,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(545)),i=u(r(358)),o=u(r(568)),s=u(r(801)),a=u(r(136));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var u=p(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==c(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,u,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function f(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){f(o,n,i,s,a,"next",t)}function a(t){f(o,n,i,s,a,"throw",t)}s(void 0)}))}}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,o=void 0,o=function(t,e){if("object"!==c(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===c(o)?o:String(o)),n)}var i,o}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,u,c,f,d,y,E,v;return e=t,r=[{key:"getURL",value:(v=h(l().mark((function t(){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return v.apply(this,arguments)})},{key:"call",value:(E=h(l().mark((function t(e,r,u,c){var f,h,p,d,y;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return f=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&f.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),h=t.t2+t.t3,u.isJourneyRequest()&&(h=h.replace("v1","v2")),p={method:e,headers:u.addHeaders()},e!==this.GET&&(p.body=JSON.stringify(u.getBody())),c&&(p.credentials=c),t.prev=13,t.next=16,fetch(h,p);case 16:return d=t.sent,t.next=19,d.json();case 19:if(y=t.sent,!d.ok){t.next=23;break}return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\nResponse Body:",JSON.stringify(y.data,null,"\t")).writeLog(),t.abrupt("return",y);case 23:return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\n").writeLog(),t.abrupt("return",new i.default(y.statusCode,y.message));case 27:return t.prev=27,t.t4=t.catch(13),f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 31:case"end":return t.stop()}}),t,this,[[13,27]])}))),function(t,e,r,n){return E.apply(this,arguments)})},{key:"get",value:(y=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return y.apply(this,arguments)})},{key:"post",value:(d=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return d.apply(this,arguments)})},{key:"put",value:(f=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return f.apply(this,arguments)})},{key:"delete",value:(c=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return c.apply(this,arguments)})}],r&&p(e.prototype,r),u&&p(e,u),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,s=void 0,s=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(s)?s:String(s)),n)}var i,s}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r,n;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version,n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}});e.default=n},106:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.default=r},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,s=void 0,s=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(s)?s:String(s)),n)}var i,s}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r,n;return e=t,(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410};var n={ErrorCode:r,ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}};e.default=n},358:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}function i(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=o},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},90:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(901),i=l(r(354)),o=l(r(202)),s=l(r(801)),a=l(r(358)),u=l(r(22)),c=l(r(90));function l(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(){n=function(){return e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l,f;return e=t,r=[{key:"getDB",value:(f=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return f.apply(this,arguments)})},{key:"get",value:(l=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return l.apply(this,arguments)})},{key:"put",value:(c=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return c.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(u=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return u.apply(this,arguments)})},{key:"getItem",value:(a=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return a.apply(this,arguments)})}],r&&s(e.prototype,r),i&&s(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},795:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r,o;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),o&&n(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(){c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var c=p(t[i],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,o=void 0,o=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===u(o)?o:String(o)),n)}var i,o}var p=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}var e,r,a,u,l,p,d,y,E,v,g,m,I,b,_,S,O;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(O=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return O.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"getAppKeySync",value:(S=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return S.apply(this,arguments)})},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){var t=i.default.getItem(this.SERVICE_SYNC_TIME);return t||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){var t=i.default.getItem(this.LOCATION_UPDATE_MINUTES);return t||30}},{key:"setRequestLocation",value:(_=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return _.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(b=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getExternalIdRequest",value:(v=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return v.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getRegisteredByCookie",value:(E=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return E.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(y=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}},{key:"setInAppTopicList",value:(d=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"getInAppTopicList",value:(p=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return p.apply(this,arguments)})},{key:"setTopicList",value:(l=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getTopicList",value:(u=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return u.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}}],r&&h(e.prototype,r),a&&h(e,a),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=p},636:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r,o;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),o&&n(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,s=void 0,s=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(s)?s:String(s)),n)}var i,s}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,n=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],(r=null)&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,s=void 0,s=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(s)?s:String(s)),n)}var i,s}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l,f;return e=t,r=null,n=[{key:"getPermissions",value:(f=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"getPermission",value:(l=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return l.apply(this,arguments)})},{key:"setPermissionsCallback",value:(a=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"setCallback",value:(o=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return o.apply(this,arguments)})}],r&&c(e.prototype,r),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(o,s,a,u){var c=p(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(i(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=n.key,s=void 0,s=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===i(s)?s:String(s)),n)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=e.CryptoUtils=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i,f;return e=t,r=null,n=[{key:"createHmac",value:(i=o().mark((function t(e,r){var n,i,s,a,f,h;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i=null===(n=window)||void 0===n||null===(n=n.crypto)||void 0===n?void 0:n.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,i.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return s=t.sent,t.next=9,i.sign(l,s,c.encode(r));case 9:return a=t.sent,f=new Uint8Array(a),h=Array.prototype.map.call(f,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",h).writeLog(),t.abrupt("return",h);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),f=function(){var t=this,e=arguments;return new Promise((function(r,n){var o=i.apply(t,e);function a(t){s(o,r,n,a,u,"next",t)}function u(t){s(o,r,n,a,u,"throw",t)}a(void 0)}))},function(t,e){return f.apply(this,arguments)})}],r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=f},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,s=void 0,s=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(s)?s:String(s)),n)}var i,s}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},970:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,i,o;return e=t,o=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],(i=null)&&n(e.prototype,i),o&&n(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,o=void 0,o=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===s(o)?o:String(o)),n)}var i,o}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},492:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,i;return e=t,i=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],(r=null)&&n(e.prototype,r),i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},506:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,i;return e=t,i=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],(r=null)&&n(e.prototype,r),i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"TopicUtils",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=h(r(306)),i=h(r(897)),o=h(r(95)),s=h(r(568)),a=h(r(970)),u=h(r(545)),c=r(136),l=h(r(506)),f=h(r(492));function h(t){return t&&t.__esModule?t:{default:t}}},117:function(t){var e;e=()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.3.2","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>B});var t={};r.r(t),r.d(t,{BaseClient:()=>b,BaseRequest:()=>_});var e={};r.r(e),r.d(e,{Channel:()=>S,Device:()=>O,DeviceStatus:()=>P,ErrorDictionary:()=>I,ErrorModel:()=>g,EventType:()=>w,TopicSubscribeType:()=>R});var i={};r.r(i),r.d(i,{CommonUtils:()=>T,CorePermissions:()=>A,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>x,Log:()=>v,LogLevel:()=>d,TopicUtils:()=>M,Validations:()=>k});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,p=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t),l&&l.IDB&&await l.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}async getAppKeySync(){if(l&&l.IDB)return await l.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}},d=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=d;class E{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new p).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const v=E,g=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new g(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new g(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},b=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new v("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(y.DEBUG);let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\n").writeLog(),new g(n.statusCode,n.message))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},_=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new p).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},S=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),O=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new p).getBrowserPublicKey(),this.browserPrivateKey=(new p).getBrowserPrivateKey(),this.platform=(new p).getPlatform(),this.version=(new p).getVersion(),this.browserName=(new p).getBrowserName(),this.browserVersion=(new p).getBrowserVersion(),this.osName=(new p).getOsName(),this.osVersion=(new p).getOsVersion(),this.deviceType=(new p).getDeviceType(),(new p).getEnabled()&&(this.enabled="true"===(new p).getEnabled()),(new p).getExternalId()&&(this.externalCode=(new p).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new p).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new p).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},P=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),T=class{static isServiceTimestampExceed(){return!(new p).getServiceTimestamp()||(new p).getServiceSyncTime()<=(Date.now()-(new p).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},A=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new v("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},N=new v("[IND]Crypto"),L=new TextEncoder("utf-8"),C="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",L.encode(t),{name:C,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(C,n,L.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return N.d("hmac: ",s).writeLog(),s}catch(t){return void N.e("error:",t).writeLog()}}},x=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},k=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},B={Repository:p,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(545)),i=u(r(358)),o=u(r(568)),s=u(r(801)),a=u(r(136));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var u=p(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==c(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,u,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function f(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){f(o,n,i,s,a,"next",t)}function a(t){f(o,n,i,s,a,"throw",t)}s(void 0)}))}}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==c(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===c(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,u,c,f,d,y,E;return e=t,r=[{key:"getURL",value:(E=h(l().mark((function t(){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return E.apply(this,arguments)})},{key:"call",value:(y=h(l().mark((function t(e,r,u,c){var f,h,p,d,y;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return f=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&f.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),h=t.t2+t.t3,u.isJourneyRequest()&&(h=h.replace("v1","v2")),p={method:e,headers:u.addHeaders()},e!==this.GET&&(p.body=JSON.stringify(u.getBody())),c&&(p.credentials=c),t.prev=13,t.next=16,fetch(h,p);case 16:return d=t.sent,t.next=19,d.json();case 19:if(y=t.sent,!d.ok){t.next=23;break}return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\nResponse Body:",JSON.stringify(y.data,null,"\t")).writeLog(),t.abrupt("return",y);case 23:return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\n").writeLog(),t.abrupt("return",new i.default(y.statusCode,y.message));case 27:return t.prev=27,t.t4=t.catch(13),f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 31:case"end":return t.stop()}}),t,this,[[13,27]])}))),function(t,e,r,n){return y.apply(this,arguments)})},{key:"get",value:(d=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(f=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return f.apply(this,arguments)})},{key:"put",value:(c=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return c.apply(this,arguments)})},{key:"delete",value:(u=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return u.apply(this,arguments)})}],r&&p(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version,n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}}),e.default=n},106:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.default=r},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r;return e=t,(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}};e.default=r},358:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=i},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},90:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(901),i=l(r(354)),o=l(r(202)),s=l(r(801)),a=l(r(358)),u=l(r(22)),c=l(r(90));function l(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(){n=function(){return e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l;return e=t,r=[{key:"getDB",value:(l=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"get",value:(c=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return c.apply(this,arguments)})},{key:"put",value:(u=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(a=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return a.apply(this,arguments)})},{key:"getItem",value:(i=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})}],r&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},795:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(){c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var c=p(t[i],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var p=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}var e,r,a,u,l,p,d,y,E,v,g,m,I,b,_,S;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(S=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return S.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"getAppKeySync",value:(_=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return _.apply(this,arguments)})},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){return i.default.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){return i.default.getItem(this.LOCATION_UPDATE_MINUTES)||30}},{key:"setRequestLocation",value:(b=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getExternalIdRequest",value:(E=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return E.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getRegisteredByCookie",value:(y=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(d=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}},{key:"setInAppTopicList",value:(p=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getInAppTopicList",value:(l=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return l.apply(this,arguments)})},{key:"setTopicList",value:(u=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"getTopicList",value:(a=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return a.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=p},636:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l;return e=t,r=[{key:"getPermissions",value:(l=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getPermission",value:(a=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return a.apply(this,arguments)})},{key:"setPermissionsCallback",value:(o=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setCallback",value:(n=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(o,s,a,u){var c=p(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(i(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=e.CryptoUtils=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i;return e=t,r=[{key:"createHmac",value:(n=o().mark((function t(e,r){var n,i,s,a,f,h;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i=null===(n=window)||void 0===n||null===(n=n.crypto)||void 0===n?void 0:n.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,i.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return s=t.sent,t.next=9,i.sign(l,s,c.encode(r));case 9:return a=t.sent,f=new Uint8Array(a),h=Array.prototype.map.call(f,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",h).writeLog(),t.abrupt("return",h);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}],r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=f},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},970:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,i;return e=t,i=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},492:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},506:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"TopicUtils",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=h(r(306)),i=h(r(897)),o=h(r(95)),s=h(r(568)),a=h(r(970)),u=h(r(545)),c=r(136),l=h(r(506)),f=h(r(492));function h(t){return t&&t.__esModule?t:{default:t}}},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.3.2","_id":"indigitall-web-core@4.3.2","_inBundle":false,"_integrity":"sha512-Wiu3fLRtjtl8Cu5KiQDe/u7E797Doy/3z6ZJwsqdMW4T1ylj221Iupb5IlUV9jaWwInXXx8koVjbtSUrqrY3xA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.3.2","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.3.2","saveSpec":null,"fetchSpec":"4.3.2"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.3.2.tgz","_shasum":"084179d7a58990141ea7bbbbbcbd7566acafa6ae","_spec":"indigitall-web-core@4.3.2","_where":"/home/circleci/webpush/customer","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.3.2"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.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";r.r(n),r.d(n,{default:()=>O});const{Repository:t}=r(872).Core,e=new class extends t{constructor(){super(),this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID"}async setDeviceId(t){this.setStorage(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}},{Validations:i,Log:o}=r(872).Core.Utils,s=class extends i{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new o("[IND]CustomerValidations: "),r=e.getDeviceId();let n=!0;return this.isAppKeyFormat()||(n=!1,t.w("appKey is null or empty").writeLog()),this.isValidFormat(r)||(n=!1,t.w("deviceId is null or empty").writeLog()),n}},a=class{constructor(t){t.id&&(this.id=t.id),t.customerId&&(this.customerId=t.customerId),t.applicationId&&(this.applicationId=t.applicationId),t.createdAt&&(this.createdAt=t.createdAt),t.updatedAt&&(this.updatedAt=t.updatedAt)}getCustomerId(){return this.customerId}getApplicationId(){return this.applicationId}getId(){return this.id}getCreatedAt(){return this.createdAt}getUpdatedAt(){return this.updatedAt}toJSON(){return{id:this.id,customerId:this.customerId,applicationId:this.applicationId,createdAt:this.createdAt,updatedAt:this.updatedAt}}},u=class{constructor(t,e){this.customerFieldKey=t,this.customerFieldValue=e}getCustomerFieldKey(){return this.customerFieldKey}getCustomerFieldValue(){return this.customerFieldValue}toJSON(){return JSON.parse(`"${this.customerFieldKey}":"${this.customerFieldValue}"`)}},{ErrorDictionary:c}=r(872).Core.Models,l=c.ErrorCode;Object.assign(l,{CUSTOMER_GET_ERROR:4001,CUSTOMER_PARAMS_ERROR:4011,CUSTOMER_GENERAL_ERROR:4600,CUSTOMER_NO_EXTERNAL_CODE:4601});const f=c.ErrorMessage;Object.assign(f,{CUSTOMER_GET_ERROR:"customer get error",CUSTOMER_PARAMS_ERROR:"Params are not correct",CUSTOMER_GENERAL_ERROR:"general error",CUSTOMER_NO_EXTERNAL_CODE:"no external code registered"});const h={ErrorCode:l,ErrorMessage:f},{Config:p}=r(872).Core,{BaseClient:d}=r(872).Core.Api,{ErrorModel:y}=r(872).Core.Models,{CommonUtils:E,ErrorUtils:v}=r(872).Core.Utils,g=new class extends d{constructor(){super(),this.URL_BASE=p.client.CUSTOMER_URL_BASE,this.ENDPOINT_CUSTOMER="/customer",this.ENDPOINT_CUSTOMER_FIELD=this.ENDPOINT_CUSTOMER+"/field",this.ENDPOINT_CUSTOMER_LINK=this.ENDPOINT_CUSTOMER+"/link",this.ENDPOINT_EVENT="/event",this.ENDPOINT_EVENT_JOURNEY=this.ENDPOINT_EVENT+"/custom",this.ENDPOINT_EVENT_JOURNEY_BEACON=this.ENDPOINT_EVENT_JOURNEY+"/beacon"}async getCustomer(t,r,n){if(s.isAppKeyFormat()&&s.isValidFormat(e.getExternalId)){const e=await this.get(this.ENDPOINT_CUSTOMER,t.getCustomerRequest());e&&!(e instanceof y)&&e.statusCode>=200&&e.statusCode<300?E.isFunction(r)&&r(new a(e.data)):e?E.isFunction(n)&&n(e):E.isFunction(n)&&n()}else E.isFunction(n)&&n(v.showError(h,h.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async getCustomerField(t,r,n){if(s.isAppKeyFormat()&&s.isValidFormat(e.getExternalId)){const e=await this.get(this.ENDPOINT_CUSTOMER_FIELD,t.getCustomerFieldRequest()),i=[];for(const t in e.data)e.data.hasOwnProperty(t)&&i.push(new u(t,e.data[t]));e&&i.length>0&&!(e instanceof y)&&e.statusCode>=200&&e.statusCode<300?E.isFunction(r)&&r(i):e?E.isFunction(n)&&n(e):E.isFunction(n)&&n()}else E.isFunction(n)&&n(v.showError(h,h.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async putCustomerField(t,r,n){if(s.isAppKeyFormat()&&s.isValidFormat(e.getExternalId)){const e=await this.put(this.ENDPOINT_CUSTOMER_FIELD,t.putCustomerFieldRequest());this.getCustomerResponse(e,r,n)}else E.isFunction(n)&&n(v.showError(h,h.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async deleteCustomerField(t,r,n){if(s.isAppKeyFormat()&&s.isValidFormat(e.getExternalId)){const e=await this.delete(this.ENDPOINT_CUSTOMER_FIELD,t.deleteCustomerFieldRequest());this.getCustomerResponse(e,r,n)}else E.isFunction(n)&&n(v.showError(h,h.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async postCustomerLink(t,r,n){if(s.isValidFormatRequest()&&s.isValidFormat(e.getExternalId)){const e=await this.post(this.ENDPOINT_CUSTOMER_LINK,t.postAndDeleteCustomerLinkRequest());this.getCustomerResponse(e,r,n)}else E.isFunction(n)&&n(v.showError(h,h.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async deleteCustomerLink(t,r,n){if(s.isValidFormatRequest()&&s.isValidFormat(e.getExternalId)){const e=await this.delete(this.ENDPOINT_CUSTOMER_LINK,t.postAndDeleteCustomerLinkRequest());this.getCustomerResponse(e,r,n)}else E.isFunction(n)&&n(v.showError(h,h.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async getCustomerResponse(t,e,r){t&&!(t instanceof y)&&t.statusCode>=200&&t.statusCode<300?E.isFunction(e)&&(""!=t.data?e(t.data):e()):t?E.isFunction(r)&&r(t):E.isFunction(r)&&r()}},{BaseRequest:m}=r(872).Core.Api,{Device:I}=r(872).Core.Models,b=class extends m{constructor(){super(),this.device=new I,null!=e.getExternalId()&&(this.customerId=e.getExternalId()),this.fieldNames,this.link,this.fields}getCustomerRequest(){return this.params=this.createQueryStringCustomerId(),this}getCustomerFieldRequest(){return this.params=this.createQueryString(),this}putCustomerFieldRequest(){return this.params=this.createQueryStringCustomerId(),this.body=this.createBodyJson(),this}deleteCustomerFieldRequest(){return this.params=this.createQueryStringCustomerId(),this.body=this.createDeleteBodyJson(),this}postAndDeleteCustomerLinkRequest(){return this.params="",this.body=this.createBodyJson(),this}createQueryString(){let t="";return t+=this.createQueryStringCustomerId(),this.fieldNames&&(t+=`&${this.PARAM_CUSTOMER_FIELD_NAMES}=${this.fieldNames}`),this.fields&&(t+=`&${this.PARAM_CUSTOMER_FIELDS}=${this.fields}`),this.link&&(t+=`&${this.PARAM_CUSTOMER_LINK}=${this.link}`),t}createQueryStringCustomerId(){return this.PARAM_CUSTOMER_ID+"="+this.customerId}createBodyJson(){let t={};try{this.channel&&(t.channel=this.channel,this.device&&(t.deviceId=this.device.deviceId),this.customerId&&(t.customerId=this.customerId)),this.link&&(t.link=this.link),this.fields&&(t=this.fields)}catch(t){console.log("Error fieldNames request :"+t)}return t}createDeleteBodyJson(){const t={},e=[];try{if(this.fieldNames){for(let t=0;t<this.fieldNames.length;t++)e.push(this.fieldNames[t]);t.fields=e}}catch(t){console.log("Error fieldNames request :"+t)}return t}setFields(t){this.fields=t}setFieldNames(t){this.fieldNames=t}setLink(t){this.link=t}setChannel(t){this.channel=t}},{CommonUtils:_,ErrorUtils:S}=r(872).Core.Utils,O=class{static async getCustomer(t,e){const r=new b;await g.getCustomer(r,t,e)}static async getCustomerInformation(t,e,r){const n=new b;null!=t&&(Array.isArray(t)?n.setFieldNames(t):_.isFunction(r)&&r(S.customerError(4011,S.CUSTOMER_ERROR_PARAMS))),await g.getCustomerField(n,e,r)}static async assignOrUpdateValueToCustomerFields(t,e,r){let n;try{"string"==typeof t?n=JSON.parse(n):"object"==typeof t&&(n=t)}catch(t){_.isFunction(r)&&r(S.customerError(4011,S.CUSTOMER_ERROR_PARAMS))}if(n){const t=new b;t.setFields(n),await g.putCustomerField(t,e,r)}else _.isFunction(r)&&r(S.customerError(4900,S.CUSTOMER_ERROR_PARAMS))}static async deleteValuesFromCustomerFields(t,e,r){if(Array.isArray(t)){const n=new b;n.setFieldNames(t),await g.deleteCustomerField(n,e,r)}else _.isFunction(r)&&r(S.customerError(4011,S.CUSTOMER_ERROR_PARAMS))}static async link(t,e,r){const n=new b;n.setChannel(t),await g.postCustomerLink(n,e,r)}static async unlink(t,e,r){const n=new b;n.setChannel(t),await g.deleteCustomerLink(n,e,r)}}})(),n})(),t.exports=e()},413:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}return i.default=t,r&&r.set(t,i),i}(r(117));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}))},899:function(t){var e;e=()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.3.2","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>B});var t={};r.r(t),r.d(t,{BaseClient:()=>b,BaseRequest:()=>_});var e={};r.r(e),r.d(e,{Channel:()=>S,Device:()=>O,DeviceStatus:()=>P,ErrorDictionary:()=>I,ErrorModel:()=>g,EventType:()=>w,TopicSubscribeType:()=>R});var i={};r.r(i),r.d(i,{CommonUtils:()=>T,CorePermissions:()=>A,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>x,Log:()=>v,LogLevel:()=>d,TopicUtils:()=>M,Validations:()=>k});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,p=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t),l&&l.IDB&&await l.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}async getAppKeySync(){if(l&&l.IDB)return await l.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}},d=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=d;class E{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new p).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const v=E,g=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new g(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new g(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},b=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new v("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(y.DEBUG);let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\n").writeLog(),new g(n.statusCode,n.message))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},_=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new p).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},S=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),O=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new p).getBrowserPublicKey(),this.browserPrivateKey=(new p).getBrowserPrivateKey(),this.platform=(new p).getPlatform(),this.version=(new p).getVersion(),this.browserName=(new p).getBrowserName(),this.browserVersion=(new p).getBrowserVersion(),this.osName=(new p).getOsName(),this.osVersion=(new p).getOsVersion(),this.deviceType=(new p).getDeviceType(),(new p).getEnabled()&&(this.enabled="true"===(new p).getEnabled()),(new p).getExternalId()&&(this.externalCode=(new p).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new p).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new p).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},P=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),T=class{static isServiceTimestampExceed(){return!(new p).getServiceTimestamp()||(new p).getServiceSyncTime()<=(Date.now()-(new p).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},A=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new v("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},N=new v("[IND]Crypto"),L=new TextEncoder("utf-8"),C="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",L.encode(t),{name:C,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(C,n,L.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return N.d("hmac: ",s).writeLog(),s}catch(t){return void N.e("error:",t).writeLog()}}},x=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},k=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},B={Repository:p,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(545)),i=u(r(358)),o=u(r(568)),s=u(r(801)),a=u(r(136));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var u=p(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==c(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,u,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function f(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){f(o,n,i,s,a,"next",t)}function a(t){f(o,n,i,s,a,"throw",t)}s(void 0)}))}}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==c(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===c(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,u,c,f,d,y,E;return e=t,r=[{key:"getURL",value:(E=h(l().mark((function t(){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return E.apply(this,arguments)})},{key:"call",value:(y=h(l().mark((function t(e,r,u,c){var f,h,p,d,y;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return f=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&f.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),h=t.t2+t.t3,u.isJourneyRequest()&&(h=h.replace("v1","v2")),p={method:e,headers:u.addHeaders()},e!==this.GET&&(p.body=JSON.stringify(u.getBody())),c&&(p.credentials=c),t.prev=13,t.next=16,fetch(h,p);case 16:return d=t.sent,t.next=19,d.json();case 19:if(y=t.sent,!d.ok){t.next=23;break}return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\nResponse Body:",JSON.stringify(y.data,null,"\t")).writeLog(),t.abrupt("return",y);case 23:return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\n").writeLog(),t.abrupt("return",new i.default(y.statusCode,y.message));case 27:return t.prev=27,t.t4=t.catch(13),f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 31:case"end":return t.stop()}}),t,this,[[13,27]])}))),function(t,e,r,n){return y.apply(this,arguments)})},{key:"get",value:(d=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(f=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return f.apply(this,arguments)})},{key:"put",value:(c=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return c.apply(this,arguments)})},{key:"delete",value:(u=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return u.apply(this,arguments)})}],r&&p(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version,n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}}),e.default=n},106:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.default=r},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r;return e=t,(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}};e.default=r},358:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=i},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},90:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(901),i=l(r(354)),o=l(r(202)),s=l(r(801)),a=l(r(358)),u=l(r(22)),c=l(r(90));function l(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(){n=function(){return e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l;return e=t,r=[{key:"getDB",value:(l=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"get",value:(c=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return c.apply(this,arguments)})},{key:"put",value:(u=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(a=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return a.apply(this,arguments)})},{key:"getItem",value:(i=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})}],r&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},795:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(){c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var c=p(t[i],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var p=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}var e,r,a,u,l,p,d,y,E,v,g,m,I,b,_,S;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(S=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return S.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"getAppKeySync",value:(_=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return _.apply(this,arguments)})},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){return i.default.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){return i.default.getItem(this.LOCATION_UPDATE_MINUTES)||30}},{key:"setRequestLocation",value:(b=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getExternalIdRequest",value:(E=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return E.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getRegisteredByCookie",value:(y=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(d=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}},{key:"setInAppTopicList",value:(p=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getInAppTopicList",value:(l=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return l.apply(this,arguments)})},{key:"setTopicList",value:(u=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"getTopicList",value:(a=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return a.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=p},636:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l;return e=t,r=[{key:"getPermissions",value:(l=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getPermission",value:(a=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return a.apply(this,arguments)})},{key:"setPermissionsCallback",value:(o=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setCallback",value:(n=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(o,s,a,u){var c=p(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(i(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=e.CryptoUtils=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i;return e=t,r=[{key:"createHmac",value:(n=o().mark((function t(e,r){var n,i,s,a,f,h;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i=null===(n=window)||void 0===n||null===(n=n.crypto)||void 0===n?void 0:n.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,i.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return s=t.sent,t.next=9,i.sign(l,s,c.encode(r));case 9:return a=t.sent,f=new Uint8Array(a),h=Array.prototype.map.call(f,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",h).writeLog(),t.abrupt("return",h);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}],r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=f},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},970:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,i;return e=t,i=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},492:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},506:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"TopicUtils",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=h(r(306)),i=h(r(897)),o=h(r(95)),s=h(r(568)),a=h(r(970)),u=h(r(545)),c=r(136),l=h(r(506)),f=h(r(492));function h(t){return t&&t.__esModule?t:{default:t}}},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.3.2","_id":"indigitall-web-core@4.3.2","_inBundle":false,"_integrity":"sha512-Wiu3fLRtjtl8Cu5KiQDe/u7E797Doy/3z6ZJwsqdMW4T1ylj221Iupb5IlUV9jaWwInXXx8koVjbtSUrqrY3xA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.3.2","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.3.2","saveSpec":null,"fetchSpec":"4.3.2"},"_requiredBy":["#USER","/","/indigitall-web-customer"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.3.2.tgz","_shasum":"084179d7a58990141ea7bbbbbcbd7566acafa6ae","_spec":"indigitall-web-core@4.3.2","_where":"/home/circleci/webpush/inapp","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.3.2"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.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";r.r(n),r.d(n,{default:()=>yt});const{Repository:t}=r(872).Core,e=new class extends t{constructor(){super(),this.INAPP_SHOW_ONCE=this.REPOSITORY+".INAPP_SHOW_ONCE",this.INAPP_TIMES_CLICKED=this.REPOSITORY+".INAPP_TIMES_CLICKED",this.INAPP_DISMISS_FOREVER=this.REPOSITORY+".INAPP_DISMISS_FOREVER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.INAPP_TOPICS_SYNC=this.REPOSITORY+".INAPP_TOPICS_SYNC"}setItemStorage(t){this.setItemSessionStorage(this.REPOSITORY,t)}getItemStorage(){return this.getItemSessionStorage(this.REPOSITORY)}setDeviceId(t){this.setStorage(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}getInAppShowOnce(){return this.getStorage(this.INAPP_SHOW_ONCE)}setInAppShowOnce(t){this.setStorage(this.INAPP_SHOW_ONCE,t)}getInAppTimesClicked(){return this.getStorage(this.INAPP_TIMES_CLICKED)}setInAppTimesClicked(t){this.setStorage(this.INAPP_TIMES_CLICKED,t)}getInAppDismissForever(){return this.getStorage(this.INAPP_DISMISS_FOREVER)}setInAppDismissForever(t){this.setStorage(this.INAPP_DISMISS_FOREVER,t)}getInAppTopics(){return this.getStorage(this.INAPP_TOPICS)?this.getStorage(this.INAPP_TOPICS).split(","):null}setInAppTopics(t){this.setStorage(this.INAPP_TOPICS,t)}async getInAppTopicsSync(){let t=null;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS_SYNC))}catch(t){}return t}async setInAppTopicsSync(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS_SYNC,t)}async getUrlDeviceApi(){let t;try{this.storage&&this.storage.isLocalStorageAvailable()?t=this.getStorage(this.URL_DEVICE_API):this.db&&this.db.IDB&&(t=await this.db.getItem(this.URL_DEVICE_API))}catch(t){}return t}},{Validations:i,Log:o}=r(872).Core.Utils,s=class extends i{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new o("[IND]InAppValidations: "),r=e.getDeviceId();let n=!0;return this.isAppKeyFormat()||(n=!1,t.w("appKey is null or empty").writeLog()),this.isValidFormat(r)||(n=!1,t.w("deviceId is null or empty").writeLog()),n}},{ErrorDictionary:a}=r(872).Core.Models,u=a.ErrorCode;Object.assign(u,{INAPP_ERROR:2e3,INAPP_SHOW_INAPP_ERROR:2100,INAPP_WAS_EXPIRED:2101,INAPP_WAS_SHOWN_MANY_TIMES:2102,INAPP_WAS_CLICKED_MANY_TIMES:2103,INAPP_FORM_TYPE_NOT_CORRECT:2120,INAPP_FORM_FIELD_IS_EMPTY:2121,INAPP_POPUP_ERROR:2300,INAPP_WAS_DISMISSED_FOREVER:2304,INAPP_ERROR_CONTENT_MESSAGE:2305,INAPP_INSTANCE_TOPICS_ERROR:2306,INAPP_GENERAL_ERROR:2600});const c=a.ErrorMessage;Object.assign(c,{INAPP_ERROR:"inApp error",INAPP_SHOW_INAPP_ERROR:"error on show inApp",INAPP_WAS_EXPIRED:"InApp was expired",INAPP_WAS_SHOWN_MANY_TIMES:"InApp was shown more than $x times",INAPP_WAS_CLICKED_MANY_TIMES:"InApp was clicked more than $x times",NAPP_FORM_TYPE_NOT_CORRECT:"Input type is not correct",INAPP_FORM_FIELD_IS_EMPTY:"Field is empty",INAPP_POPUP_ERROR:"error on popup",INAPP_WAS_DISMISSED_FOREVER:"InApp was dismissed forever",INAPP_ERROR_CONTENT_MESSAGE:"InApp error with content",INAPP_INSTANCE_TOPICS_ERROR:"topics instance is not correct, only string[] is valid types",INAPP_GENERAL_ERROR:"inApp general error"});const l={ErrorCode:u,ErrorMessage:c},f=class{constructor(t){this.URL="url",t.actionId&&(this.actionId=t.actionId),t.destroy&&(this.destroy=t.destroy),t.topics&&(this.topics=t.topics),t.type&&(this.type=t.type),t.url&&(this.url=t.url),t.no_action&&(this.no_action=t.no_action)}},h=class{constructor(t){t.borderRadius&&(this.borderRadius=t.borderRadius)}},p=class{constructor(t){t.contentUrl&&(this.contentUrl=t.contentUrl),t.showTime&&(this.showTime=t.showTime),t.numberOfShows&&(this.numberOfShows=t.numberOfShows),t.numberOfClicks&&(this.numberOfClicks=t.numberOfClicks),t.dismissForever&&(this.dismissForever=t.dismissForever),t.layout&&(this.layout=new h(t.layout)),t.action&&(this.action=new f(t.action))}setAction(t){this.action=t}},d=class{constructor(t){this.timesShowed=0,this.timesClicked=0,this.wasDismissed=!1,t&&(t.timesShowed&&(this.timesShowed=t.timesShowed),t.timesClicked&&(this.timesClicked=t.timesClicked),t.wasDismissed&&(this.wasDismissed=t.wasDismissed))}},y=class{static searchInApp(t){const e=this.getListInApp();return null==e?null:this.findInAppFromInAppList(e,t)}static searchInAppWithInAppId(t){const e=this.getListInApp();return null==e?null:this.findInAppFromInAppListWithInAppId(e,t)}static addInApp(t){let r=this.getListInApp();null!=r?r.push(t):r=[t],e.setItemStorage(JSON.stringify(r))}static getListInApp(){let t=null;try{e.getItemStorage()&&(t=JSON.parse(e.getItemStorage()))}catch(t){console.error(t.message)}return t}static addInAppNewClick(t){this.updateInAppField(t.inAppId,!0,null,null)}static addInAppNewShow(t){this.updateInAppField(t.inAppId,null,!0,null)}static addInAppDismissForever(t){this.updateInAppField(t.inAppId,null,null,!0)}static updateInAppField(t,r,n,i){const o=this.getListInApp(),s=[];if(null!=o)for(let e=0;e<o.length;e++)o[e].inAppId==t&&(null!=r&&(o[e].inAppShow.timesClicked+=1),null!=n&&(o[e].inAppShow.timesShowed+=1),null!=i&&(o[e].inAppShow.wasDismissed=!0)),s.push(o[e]);e.setItemStorage(JSON.stringify(s))}static updateInApp(t){const r=this.getListInApp(),n=[];let i=!1,o=null;if(null!=r)for(let e=0;e<r.length;e++)r[e].inAppId===t.inAppId&&(i=!0,r[e].filters&&(t.filters=r[e].filters),r[e].name&&(t.name=r[e].name),null!=r[e].properties&&(t.properties=new p(r[e].properties)),null!=r[e].inAppShow&&(t.inAppShow=new d(r[e].inAppShow)),n.push(t),o=t);if(i)return e.setItemStorage(JSON.stringify(n)),o}static deleteInApp(t){const r=this.getListInApp(),n=[];if(null!=r)for(let e=0;e<r.length;e++)r[e].inAppId!=t.inAppId&&n.push(r[e]);e.setItemStorage(JSON.stringify(n))}static findInAppFromInAppListWithInAppId(t,e){if(null!=t)for(let r=0;r<t.length;r++)if(t[r].inAppId&&t[r].inAppId==e)return t[r];return null}static findInAppFromInAppList(t,e){if(null!=t)for(let r=0;r<t.length;r++)if(t[r].schema&&t[r].schema.code&&t[r].schema.code==e)return t[r];return null}static findInAppFromInAppListWithInAppId(t,e){if(null!=t)for(let r=0;r<t.length;r++)if(t[r].inAppId&&t[r].inAppId==e)return t[r];return null}},E=class{constructor(t){t.code&&(this.code=t.code),t.width&&(this.width=t.width),t.height&&(this.height=t.height)}},v=class{constructor(t){if(t.cacheTtl&&(this.cacheTtl=t.cacheTtl),t.inAppId&&(this.inAppId=t.inAppId),t.showOnce&&(this.showOnce=t.showOnce),t.version&&(this.version=t.version),t.customData&&(this.customData=t.customData),t.creationDate?this.creationDate=t.creationDate:this.creationDate=k.getDate((new Date).getTime()),t.expiredDate)this.expiredDate=t.expiredDate;else{let t=36e5;this.cacheTtl&&(t=1e3*this.cacheTtl),this.expiredDate=k.getDate((new Date).getTime()+t)}t.schema&&(this.schema=new E(t.schema)),t.properties&&(this.properties=new p(t.properties)),this.inAppShow=new d(t.inAppShow),t.filters&&(this.filters=t.filters),t.name&&(this.name=t.name)}},{BaseRequest:g}=r(872).Core.Api,{Config:m}=r(872).Core,I=class extends g{constructor(){super(),e.getDeviceId()?this.deviceId=e.getDeviceId():this.deviceId=k.generateDeviceId()}setEventType(t){this.eventType=t}setInAppId(t){this.inAppId=t}setActionId(t){this.actionId=t}setClickedButton(t){this.clickedButton=t}setLastVersionId(t){this.lastVersionId=t}setVersion(t){this.version=t}setDeviceId(t){this.deviceId=t}setPlatform(t){this.platform=t}postEventPrintRequest(){const t=this.fillJsonEventRequest();return this.body=t,this}postEventClickRequest(){const t=this.fillJsonEventRequest();return t.actionId=this.actionId,this.body=t,this}fillJsonEventRequest(){const t={};return t.deviceId=this.deviceId,e.getExternalId()&&(t.externalId=e.getExternalId()),t.inAppId=this.inAppId,t.platform=m.platform,t.version=this.version,t}postEventInAppRequest(){const t={};return t.inAppId=this.inAppId,t.lastVersionId=this.lastVersionId,t.deviceId=this.deviceId,this.eventType&&(t.eventType=this.eventType),t.platform=this.platform,t.clickedButton=this.clickedButton,this.body=t,this}},{BaseRequest:b}=r(872).Core.Api,_=class extends b{constructor(){super(),null!=e.getExternalId()&&(this.customerId=e.getExternalId()),null!=e.getDeviceId()&&(this.deviceId=e.getDeviceId())}setFields(t){this.fields=t}putCustomerFieldRequest(){return this.params=this.createQueryStringCustomerId(),this.body=this.createBodyJson(),this}createQueryStringCustomerId(){return this.PARAM_CUSTOMER_ID+"="+this.customerId}createBodyJson(){let t={};try{t.channel="inapp",this.device&&(t.deviceId=this.device.deviceId),this.customerId&&(t.customerId=this.customerId),this.fields&&(t=this.fields)}catch(t){console.log("Error fieldNames request :"+t)}return t}},{BaseRequest:S}=r(872).Core.Api,{Config:O}=r(872).Core,P=class extends S{constructor(){super()}setInAppId(t){this.inAppId=t}setVersion(t){this.version=t}setJsonForm(t){this.jsonForm=t}postForm(){return this.body=this.createBody(),this}createBody(){const t={};return e.getDeviceId()&&(t.deviceId=e.getDeviceId()),e.getExternalId()&&(t.externalCode=e.getExternalId()),this.jsonForm&&(t.form=this.jsonForm),t.inAppId=this.inAppId,t.platform=O.platform,t.version=this.version,t}},w=class{static sendEventPrint(t){const e=new I;e.setInAppId(t.inAppId),e.setVersion(t.version),X.postEventPrint(e)}static sendEventClick(t){const e=new I;e.setActionId(t.properties.action.actionId),e.setInAppId(t.inAppId),e.setVersion(t.version),X.postEventClick(e)}static sendEventForm(t,e,r){const n=new P;n.setVersion(e),n.setInAppId(t),n.setJsonForm(r),X.postEventForm(n)}static sendEventFormToCustomer(t){const e=new _;e.setFields(t),X.putCustomerField(e)}},{DeviceStatus:R,Device:T}=r(872).Core.Models,{BaseRequest:A}=r(872).Core.Api,N=class extends A{constructor(){super(),this.device=new T}postDeviceRequest(){return this.body=this.createDeviceJson(),this.status!==R.DEFAULT&&(this.body.enabled=1===this.status),this}createDeviceJson(){let t={};try{t=this.device.toJSON()}catch(t){console.log(t)}return t}},{Log:L,CryptoUtils:C,CorePermissions:D}=r(872).Core.Utils,{EventType:x}=r(872).Core.Models,k=class{constructor(){this.MONTH=24192e5}static addNewInApp(t){y.addInApp(t)}static addNewInAppClick(t){t.properties.numberOfClicks&&t.properties.numberOfClicks>0&&y.addInAppNewClick(t),w.sendEventClick(t)}static addNewInApptoDismissForever(t){y.addInAppDismissForever(t)}static isInAppDismissForever(t){const e=y.searchInAppWithInAppId(t.inAppId);return!(null==e||!new v(e).inAppShow.wasDismissed)}static async registerLocation(){const t=new L("[IND]InAppUtils: ");try{navigator.geolocation&&"prompt"===(await D.getPermissions()).location&&navigator.geolocation.getCurrentPosition((t=>{e.setLatitude(t.coords.latitude),e.setLongitude(t.coords.longitude)}),(r=>{t.e("error "+r).writeLog(),e.getPermissionLocation()||e.getPermissionLocation()==x.EVENT_TYPE_REJECT||e.setPermissionLocation(x.EVENT_TYPE_REJECT)}))}catch(e){t.e(e).writeLog()}}static generateDeviceId(){X.postDevice(new N,(t=>t),(t=>(console.log(t),null)))}static async setExternalCode(t){let r=t;if(t){const n=e.getAppKey();r=await C.createHmac(n,t)}return e.setExternalId(r),r}static async convertToJSONArray(t){if(t&&""!=t)return await Promise.resolve(t).then((t=>JSON.parse(t)))}static getDate(t){const e=new Date(t);let r=""+(e.getMonth()+1),n=""+e.getDate();const i=e.getFullYear();let o=e.getHours(),s=e.getMinutes(),a=e.getSeconds();return r.length<2&&(r="0"+r),n.length<2&&(n="0"+n),o.length<2&&(o="0"+o),s.length<2&&(s="0"+s),a.length<2&&(a="0"+a),`${i}-${r}-${n} ${o}:${s}:${a}`}},{CommonUtils:M,ErrorUtils:B}=r(872).Core.Utils,{Channel:U}=r(872).Core.Models,j=class{static async saveTopics(t,r,n){try{if(t instanceof Array){let n=[];const i=await e.getInAppTopics();if(null!=i&&""!=i&&(n=i),0!==n.length){const e=t.filter((t=>!n.includes(t)));0!==e.length&&n.push(e)}else for(let e=0;e<t.length;e++)n.push(t[e]);e.setInAppTopics(n),await e.setInAppTopicsSync(n);const o=[];for(let t=0;t<n.length;t++)o.push({code:n[t],name:n[t],visible:!0,subscribe:!0,parentCode:"",channel:U.INAPP});M.isFunction(r)&&r(o)}else M.isFunction(n)&&n(B.showError(l,l.ErrorCode.INAPP_INSTANCE_TOPICS_ERROR))}catch(t){M.isFunction(n)&&n(B.showError(l,l.ErrorCode.INAPP_ERROR,t.message))}}static async deleteTopics(t,r,n){if(t instanceof Array){let n=[],i=[];const o=await e.getInAppTopics();null!=o&&""!=o&&(n=o),0!==n.length&&(i=n.filter((e=>!t.includes(e))),e.setInAppTopics(i),await e.setInAppTopicsSync(i));const s=[];if(i.length>0)for(let t=0;t<i.length;t++)s.push({code:i[t],name:i[t],visible:!0,subscribe:!0,parentCode:"",channel:U.INAPP});M.isFunction(r)&&r(s)}else M.isFunction(n)&&n(B.showError(l,l.ErrorCode.INAPP_INSTANCE_TOPICS_ERROR))}static isSubscribe(t){let r=[],n=[];if(e.getInAppTopics()&&(n=e.getInAppTopics()),t&&t.length>0)if(n&&n.length>0)for(let e=0;e<t.length;e++){t[e].subscribed=!1;for(let r=0;r<n.length;r++)t[e].code===n[r]&&(t[e].subscribed=!0);r.push(t[e])}else{for(let e=0;e<t.length;e++)t[e].subscribe=!1;r=t}return r}},{BaseClient:V}=r(872).Core.Api,{Config:F}=r(872).Core,{Channel:Y,ErrorModel:G}=r(872).Core.Models,{TopicUtils:K,CommonUtils:q,ErrorUtils:W}=r(872).Core.Utils,X=new class extends V{constructor(){super(),this.ENDPOINT_INAPP="/inapp",this.URL_BASE=F.client.URL_DEVICE_V2+this.ENDPOINT_INAPP,this.ENDPOINT_CAMPAIGN="/campaign",this.ENDPOINT_CAMPAIGN_TAG=this.ENDPOINT_CAMPAIGN+"/{tag}",this.ENDPOINT_DEVICE="/device",this.ENDPOINT_EVENT_INAPP="/event",this.ENDPOINT_EVENT_INAPP_PRINT=this.ENDPOINT_EVENT_INAPP+"/print",this.ENDPOINT_EVENT_INAPP_CLICK=this.ENDPOINT_EVENT_INAPP+"/click",this.ENDPOINT_EVENT_INAPP_FORM=this.ENDPOINT_EVENT_INAPP+"/form",this.ENDPOINT_DEVICE_TOPICS="/topic",this.ENDPOINT_CUSTOMER="/customer",this.ENDPOINT_CUSTOMER_FIELD=this.ENDPOINT_CUSTOMER+"/field",this.isCustomerRequest=!1,this.isDeviceRequest=!1}async getURL(){if(this.isCustomerRequest){this.isCustomerRequest=!1;const t=await e.getUrlInappApi();return t?t=t.replaceAll("v2","v1"):F.client.CUSTOMER_URL_BASE}if(this.isDeviceRequest){this.isDeviceRequest=!1;const t=await e.getUrlInappApi();return t?t=t.replaceAll("v2","v1"):F.client.URL_BASE}const t=await e.getUrlInappApi();return t?t+this.ENDPOINT_INAPP:this.URL_BASE}async getCampaignTag(t,e,r){const n=await this.get(this.ENDPOINT_CAMPAIGN_TAG,t.getCampaignTagRequest());if(n&&!(n instanceof G)&&n.data&&Object.keys(n.data).length>0){if(q.isFunction(e)){const r=new v(n.data);r.properties.numberOfShows>0&&(r.inAppShow.timesShowed=1),r.properties.dismissForever&&(r.inAppShow.wasDismissed=!0),t.isUpdateInApp()||k.addNewInApp(r),e(r)}}else n?q.isFunction(r)&&r(n):q.isFunction(r)&&r(W.showError(l,l.ErrorCode.INAPP_ERROR_CONTENT_MESSAGE));return null}async getInAppTopics(t,r,n){if(s.isAppKeyFormat()){const i=await this.get(this.ENDPOINT_DEVICE_TOPICS,t.getDeviceTopicsRequest());if(!i||i instanceof G)i?q.isFunction(n)&&n(i):q.isFunction(n)&&n();else{const t=K.setTopicChannel(i.data,Y.INAPP),n=j.isSubscribe(t);await e.setInAppTopicList(n),q.isFunction(r)&&r(n)}}else q.isFunction(n)&&n(W.showError(l,l.ErrorCode.INAPP_GENERAL_ERROR));return!0}postEventClick(t){s.isAppKeyFormat()&&this.post(this.ENDPOINT_EVENT_INAPP_CLICK,t.postEventClickRequest())}postEventPrint(t){s.isAppKeyFormat()&&this.post(this.ENDPOINT_EVENT_INAPP_PRINT,t.postEventClickRequest())}postEventForm(t){s.isAppKeyFormat()&&this.post(this.ENDPOINT_EVENT_INAPP_FORM,t.postForm())}putCustomerField(t){s.isAppKeyFormat()&&(this.isCustomerRequest=!0,this.put(this.ENDPOINT_CUSTOMER_FIELD,t.putCustomerFieldRequest()))}async postDevice(t,r,n){if(s.isAppKeyFormat()){this.isDeviceRequest=!0;const i=await this.post(this.ENDPOINT_DEVICE,t.postDeviceRequest(),"include");!i||i instanceof G?i?q.isFunction(n)&&n(i):q.isFunction(n)&&n():(i.data.deviceId&&e.setDeviceId(i.data.deviceId),q.isFunction(r)&&r(i.data.deviceId))}else q.isFunction(n)&&n(W.showError(l,l.ErrorCode.INAPP_ERROR));return!0}},{BaseRequest:H}=r(872).Core.Api,J=class extends H{constructor(){super(),this.update=!1,this.PARAM_DEVICE_TYPE="deviceType",this.PARAM_EXTERNAL_CODE="externalCode",this.PARAM_BROWSER_NAME="browserName"}setTag(t){this.tag=t}setUpdateInApp(t){this.update=t}isUpdateInApp(){return this.update}getCampaignTagRequest(){return this.params=this.createQueryString(),this.pathParams["{tag}"]=this.tag,this}createQueryString(){let t="";if(null!=e.getDeviceId()?t+=`${this.PARAM_DEVICE_ID}=${e.getDeviceId()}&`:k.generateDeviceId(),null!=e.getExternalId()&&(t+=`${this.PARAM_EXTERNAL_CODE}=${e.getExternalId()}&`),null!=e.getDeviceType()&&(t+=`${this.PARAM_DEVICE_TYPE}=${e.getDeviceType()}&`),null!=e.getBrowserName()&&(t+=`${this.PARAM_BROWSER_NAME}=${e.getBrowserName()}&`),null!=e.getLatitude()&&(t+=`${this.PARAM_LATITUDE}=${e.getLatitude()}&`),null!=e.getLongitude()&&(t+=`${this.PARAM_LONGITUDE}=${e.getLongitude()}&`),null!=e.getInAppTopics()&&0!==e.getInAppTopics().length){const r=e.getInAppTopics();let n="";for(let t=0;t<r.length;t++)n+=`${this.PARAM_TOPICS}=${encodeURIComponent(r[t])}&`;t+=n}return t+=`${this.PARAM_PLATFORM}=webpush`,t}},{BaseRequest:Q}=r(872).Core.Api,z=class extends Q{constructor(){super()}getDeviceTopicsRequest(){return this.params=this.PARAM_DEVICE_ID+"="+e.getDeviceId(),this}},$=class{constructor(t,e){this.script=` \n var slideIndex_${e} = 1;\n var delta_${e} = 6;\n var startMove_${e} = null;\n var startMoveY_${e} = null; \n var diffX_${e};\n var diffY_${e};\n var timeSlide_${e} = 10000;\n\n var slider_${e} = document.getElementById("${t}").querySelector('.ind_slider-container-actions');\n var sliderTotal_${e} = document.getElementById("${t}").getElementsByClassName("ind_slideshow-item").length;\n\n showSlides_${e}(slideIndex_${e});\n\n var interval_${e} = setInterval(() => {\n newSlide_${e}();\n }, timeSlide_${e});\n\n if (slider_${e}){\n slider_${e}.addEventListener('touchstart', handleStart_${e}, false);\n slider_${e}.addEventListener('touchend', handleEnd_${e}, false);\n slider_${e}.addEventListener('mousedown', mouseStart_${e});\n slider_${e}.addEventListener('mouseup', mouseEnd_${e}); \n }\n\n\n function mouseStart_${e}(evt) {\n evt.preventDefault();\n startMove_${e} = evt.clientX;\n startMoveY_${e} = evt.clientY;\n }\n\n function mouseEnd_${e}(evt) {\n evt.preventDefault();\n var endMove = evt.clientX;\n var endMoveY = evt.clientY;\n setEndMove_${e}(endMove, endMoveY);\n }\n\n function handleStart_${e}(evt) {\n evt.preventDefault();\n startMove_${e} = evt.touches[0].clientX;\n startMoveY_${e} = evt.touches[0].clientY;\n }\n function handleEnd_${e}(evt) {\n evt.preventDefault();\n var endMove = evt.changedTouches[0].pageX;\n var endMoveY = evt.changedTouches[0].pageY;\n setEndMove_${e}(endMove, endMoveY);\n }\n\n function setEndMove_${e}(endMove, endMoveY) {\n diffX_${e} = Math.abs(endMove - startMove_${e});\n diffY_${e} = Math.abs(endMoveY - startMoveY_${e});\n if (startMove_${e} != null) {\n if (startMove_${e} > endMove) {\n slideIndex_${e}++;\n if (slideIndex_${e} > sliderTotal_${e}) {\n slideIndex_${e} = 1;\n }\n } else {\n if (slideIndex_${e} == 0) {\n slideIndex_${e} = sliderTotal_${e};\n } else {\n slideIndex_${e}--;\n }\n }\n showSlides_${e}(slideIndex_${e});\n setNewInterval_${e}();\n }\n }\n\n function plusSlides_${e}(n) {\n showSlides_${e}(slideIndex_${e} += n);\n setNewInterval_${e}();\n }\n\n function currentSlide_${e}(n) {\n showSlides_${e}(slideIndex_${e} = n);\n }\n\n function setNewInterval_${e}() {\n clearInterval(interval_${e});\n interval_${e} = setInterval(() => {\n newSlide_${e}();\n }, timeSlide_${e});\n }\n\n function newSlide_${e}(){\n slideIndex_${e}++;\n if (slideIndex_${e} > sliderTotal_${e}) {\n slideIndex_${e} = 1;\n }\n showSlides_${e}(slideIndex_${e});\n }\n\n function showSlides_${e}(n) {\n let view = document.getElementById("${t}");\n if (view) {\n let slides = view.getElementsByClassName("ind_slideshow-item");\n let i;\n let dots = view.getElementsByClassName("ind_dot");\n if (n > slides.length) {slideIndex_${e} = 1;}\n if (n < 1) {slideIndex_${e} = slides.length;}\n for (i = 0; i < slides.length; i++) {\n slides[i].style.display = "none";\n }\n for (i = 0; i < dots.length; i++) {\n dots[i].className = dots[i].className.replace(" active", "");\n }\n if (slides[slideIndex_${e}-1]) {\n slides[slideIndex_${e}-1].style.display = "block";\n }\n if (dots[slideIndex_${e}-1]) dots[slideIndex_${e}-1].className += " active";\n }\n }\n\n\n function inAppIndigitallOnClick_${e}(action) {\n if (diffX_${e} && diffY_${e}) {\n if (diffX_${e} < delta_${e} && diffY_${e} < delta_${e}) {\n indigitall.InApp.inAppOnClick(action);\n }\n } else {\n indigitall.InApp.inAppOnClick(action);\n }\n }\n\n function inAppIndigitallSubmit(formOptions) {\n const jsonForm = {}\n const jsonCustomer = {}\n const form = document.querySelector('[id="'+formOptions.formId+'"]');\n if (form) {\n formOptions.inputs.forEach((el) => {\n if (el.id !== 'undefined') {\n let value;\n if (el.type === 'text' || el.type === 'number') {\n if (form && form.querySelector('input[id^="'+el.id+'"]') && form.querySelector('input[id^="'+el.id+'"]').value !== 'undefined') {\n value = form.querySelector('input[id^="'+el.id+'"]').value;\n }\n }\n if (el.type === 'checkbox') {\n if (form && form.querySelectorAll('input[id^="'+el.id +'"]')) {\n let values = form.querySelectorAll('input[id^="'+el.id +'"]');\n var valuesChecked = [];\n for (var i = 0; i < values.length; i++) {\n if (values[i].checked && values[i].value !== 'undefined') {\n valuesChecked.push(values[i].value);\n }\n }\n value = valuesChecked;\n }\n }\n if (el.type === 'radio') {\n if (form && form.querySelectorAll('input[id^="'+el.id +'"]')) {\n let values = form.querySelectorAll('input[id^="'+el.id +'"]');\n var valuesChecked;\n for (var i = 0; i < values.length; i++) {\n if (values[i].checked && values[i].value !== 'undefined') {\n valuesChecked = values[i].value;\n }\n }\n value = valuesChecked;\n }\n }\n if (el.type === 'select') {\n if (form && form.querySelector('select[id^="'+el.id+'"]') && form.querySelector('select[id^="'+el.id+'"]').value !== 'undefined') {\n value = form.querySelector('select[id^="'+el.id+'"]').value;\n }\n }\n if (value) jsonForm[el.id] = value;\n if (el.sendToCustomer) jsonCustomer[el.id] = value;\n }\n });\n }\n indigitall.InApp.inAppSubmit(JSON.stringify(formOptions), JSON.stringify(jsonForm), JSON.stringify(jsonCustomer));\n }\n `,this.htmlTest="\n <!DOCTYPE html>\n <html lang=\"en\" dir=\"ltr\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width\" />\n <title>guille test</title>\n <style>\n html,\n body {\n margin: 0;\n padding: 0;\n height: 100%;\n width: 100%;\n }\n body p:first-child {\n margin: 0;\n }\n </style>\n </head>\n <body>\n \n <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n <html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n \x3c!--[if !mso]>\x3c!--\x3e\n \x3c!--[if (gte mso 9)|(IE)]>\x3c!--\x3e\n <link href=\"https://fonts.googleapis.com/css2?family=EB+Garamond&family=Merriweather&family=Montserrat&family=Open+Sans&family=Oswald&family=Playfair+Display&family=Raleway&family=Roboto&family=Roboto+Slab&family=Source+Sans+Pro&display=swap\" rel=\"stylesheet\">\n \x3c!--<![endif]--\x3e\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n \x3c!--<![endif]--\x3e\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <link href=\"http://fonts.cdnfonts.com/css/arial\" rel=\"stylesheet\">\n <link href=\"http://fonts.cdnfonts.com/css/courier-new\" rel=\"stylesheet\">\n <link href=\"http://fonts.cdnfonts.com/css/georgia-2\" rel=\"stylesheet\">\n <link href=\"http://fonts.cdnfonts.com/css/trebuchet-ms-2\" rel=\"stylesheet\">\n <link href=\"http://fonts.cdnfonts.com/css/verdana-pro-cond\" rel=\"stylesheet\">\n \n <link href=\"https://fonts.googleapis.com/css2?family=EB+Garamond&family=Merriweather&family=Montserrat&family=Open+Sans&family=Oswald&family=Playfair+Display&family=Raleway&family=Roboto&family=Roboto+Slab&family=Source+Sans+Pro&display=swap\" rel=\"stylesheet\">\n <title>InApp Sample</title>\n \n <style type=\"text/css\">\n html {\n width: 100%;\n height: 100%;\n }\n @font-face {\n font-family: 'Merriweather';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/merriweather/v28/u-440qyriQwlOrhSvowK_l5OeA.woff) format('woff');\n }\n @font-face {\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/montserrat/v23/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Ew9.woff) format('woff');\n }\n @font-face {\n font-family: 'Open Sans';\n font-style: normal;\n font-weight: 400;\n font-stretch: normal;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/opensans/v28/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0C4k.woff) format('woff');\n }\n @font-face {\n font-family: 'Oswald';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/oswald/v47/TK3_WkUHHAIjg75cFRf3bXL8LICs1_FvgUI.woff) format('woff');\n }\n @font-face {\n font-family: 'Playfair Display';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/playfairdisplay/v28/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvUDT.woff) format('woff');\n }\n @font-face {\n font-family: 'Raleway';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/raleway/v26/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaooCM.woff) format('woff');\n }\n @font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Me5g.woff) format('woff');\n }\n @font-face {\n font-family: 'Roboto Slab';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/robotoslab/v22/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISWaw.woff) format('woff');\n }\n @font-face {\n font-family: 'Source Sans Pro';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xK3dSBYKcSV-LCoeQqfX1RYOo3aPA.woff) format('woff');\n }\n @font-face {\n font-family: 'EB Garamond';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/ebgaramond/v24/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-6_RUAA.woff) format('woff');\n }\n /* latin-ext */\n @font-face {\n font-family: 'Merriweather';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/merriweather/v28/u-440qyriQwlOrhSvowK_l5-ciZMZ-Y.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Merriweather';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/merriweather/v28/u-440qyriQwlOrhSvowK_l5-fCZM.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/montserrat/v23/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw3aXpsog.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/montserrat/v23/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw5aXo.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Open Sans';\n font-style: normal;\n font-weight: 400;\n font-stretch: 100%;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/opensans/v28/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4uaVIGxA.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Open Sans';\n font-style: normal;\n font-weight: 400;\n font-stretch: 100%;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/opensans/v28/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Oswald';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/oswald/v47/TK3_WkUHHAIjg75cFRf3bXL8LICs1_FvsUhiZTaR.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Oswald';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/oswald/v47/TK3_WkUHHAIjg75cFRf3bXL8LICs1_FvsUZiZQ.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Playfair Display';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/playfairdisplay/v28/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvXDZbtPY_Q.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Playfair Display';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/playfairdisplay/v28/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvXDXbtM.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Raleway';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/raleway/v26/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCGPrEHJA.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Raleway';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/raleway/v26/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCIPrE.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Mu7GxKOzY.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Mu4mxK.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Roboto Slab';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/robotoslab/v22/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmYWRjRdE.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Roboto Slab';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/robotoslab/v22/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmb2Rj.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Source Sans Pro';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNq7lqDY.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Source Sans Pro';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7l.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'EB Garamond';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/ebgaramond/v24/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-6_RkCo9_S6w.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'EB Garamond';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/ebgaramond/v24/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-6_RkBI9_.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n \n </style>\n <style>\n .slideshow-item {\n cursor: grabbing;\n scroll-snap-align: start;\n display: none; \n scroll-snap-type: x mandatory;\n scroll-behavior: smooth;\n -webkit-overflow-scrolling: touch; /* For mobile */\n -ms-overflow-style: none; /* For hide scrollbar */\n scrollbar-width: none; /* For hide scrollbar */\n }\n .slideshow-item-preview {\n cursor: grabbing;\n scroll-snap-align: start;\n display: block; \n scroll-snap-type: x mandatory;\n scroll-behavior: smooth;\n -webkit-overflow-scrolling: touch; /* For mobile */\n -ms-overflow-style: none; /* For hide scrollbar */\n scrollbar-width: none; /* For hide scrollbar */\n }\n img {vertical-align: middle;}\n \n /* Slideshow container */\n .slideshow-container {\n /* max-width: 1000px; */\n position: relative;\n margin: auto;\n -webkit-overflow-scrolling: touch; /* For mobile */\n }\n \n /* Next & previous buttons */\n .prev, .next {\n cursor: pointer;\n position: absolute;\n top: 50%;\n width: auto;\n padding: 16px;\n margin-top: -22px;\n color: white;\n font-weight: bold;\n font-size: 18px;\n transition: 0.6s ease;\n border-radius: 0 3px 3px 0;\n user-select: none;\n }\n \n /* Position the \"next button\" to the right */\n .next {\n right: 0;\n border-radius: 3px 0 0 3px;\n }\n \n /* On hover, add a black background color with a little bit see-through */\n .prev:hover, .next:hover {\n background-color: rgba(0,0,0,0.8);\n }\n \n .points {\n padding: 8px 12px;\n position: absolute;\n bottom: 8px;\n text-align: center;\n width:100%;\n }\n \n /* The dots/bullets/indicators */\n .dot {\n cursor: pointer;\n height: 15px;\n width: 15px;\n margin: 0 2px;\n background-color: #bbb;\n border-radius: 50%;\n display: inline-block;\n transition: background-color 0.6s ease;\n }\n \n .active, .dot:hover {\n background-color: #717171;\n }\n \n /* On smaller screens, decrease text size */\n @media only screen and (max-width: 300px) {\n .prev, .next,.text {font-size: 11px}\n }\n </style>\n \n </head>\n <body style=\"margin:0; height: 100%; width: 100%;\">\n <div style=\"\n background-color: rgba(244, 244, 244, 1);\n width: 100%;\n height: 100%;\n margin: 0 auto;\n \">\n \n <div style=\"\n display: flex;\n flexDirection: row;\n box-sizing: border-box;\n padding: 0px 0px 0px 0px ;\n margin: 0px 0px 0px 0px ;\n background-color: rgba(244, 244, 244, 0);\n border: 0px solid rgba(244, 244, 244, 0);\n width: 100%;\">\n \n <div style=\"\n width: 100%;\n \">\n \n <div style=\"\n margin: 0px 0px 0px 0px ;\n padding: 15px 15px 15px 15px ;\n background-color: rgba(244, 244, 244, 0);\n text-align: left;\n font-family: 'Roboto';\n \">\n \n <form id=\"5kZSrg6xbKyX\" class=\"form-style-1\">\n \n <style type=\"text/css\">\n .form-style-1 {\n }\n .form-style-1 li {\n padding: 0;\n display: block;\n list-style: none;\n margin: 10px 0 0 0;\n }\n .form-style-1 label{\n margin:0 0 3px 0;\n padding:0px;\n display:block;\n font-weight: bold;\n }\n .form-style-1 input[type=text], \n .form-style-1 input[type=date],\n .form-style-1 input[type=datetime],\n .form-style-1 input[type=number],\n .form-style-1 input[type=search],\n .form-style-1 input[type=time],\n .form-style-1 input[type=url],\n .form-style-1 input[type=email],\n textarea, \n select{\n box-sizing: border-box;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n border:1px solid #BEBEBE;\n padding: 7px;\n margin:0px;\n -webkit-transition: all 0.30s ease-in-out;\n -moz-transition: all 0.30s ease-in-out;\n -ms-transition: all 0.30s ease-in-out;\n -o-transition: all 0.30s ease-in-out;\n outline: none;\n }\n .form-style-1 input[type=text]:focus, \n .form-style-1 input[type=date]:focus,\n .form-style-1 input[type=datetime]:focus,\n .form-style-1 input[type=number]:focus,\n .form-style-1 input[type=search]:focus,\n .form-style-1 input[type=time]:focus,\n .form-style-1 input[type=url]:focus,\n .form-style-1 input[type=email]:focus,\n .form-style-1 textarea:focus, \n .form-style-1 select:focus{\n -moz-box-shadow: 0 0 8px #88D5E9;\n -webkit-box-shadow: 0 0 8px #88D5E9;\n box-shadow: 0 0 8px #88D5E9;\n border: 1px solid #88D5E9;\n }\n .form-style-1 .field-divided{\n width: 49%;\n }\n \n .form-style-1 .field-long{\n width: 100%;\n }\n .form-style-1 .field-select{\n width: 100%;\n }\n .form-style-1 .field-textarea{\n height: 100px;\n }\n \n .form-style-1 input[type=submit]:hover, .form-style-1 input[type=button]:hover{\n background: #4691A4;\n box-shadow:none;\n -moz-box-shadow:none;\n -webkit-box-shadow:none;\n }\n .form-style-1 input[type=radio]{\n transform: scale(1.2);\n }\n .form-style-1 input[type=checkbox]{\n transform: scale(1.2);\n }\n .form-style-1 .required{\n color:red;\n }\n </style>\n \n \n <div style=\"margin-top: 10px;\">\n <label>\n Escribe algo\n <span class=\"required\">*</span>\n </label>\n <input type=\"text\" name=\"algo\" id=\"algo\" required=\"true\" sendToCustomer=\"true\" style=\"width: 100%;\n padding: 12px 20px;\n margin: 8px 0;\n display: inline-block;\n border: 1px solid #ccc;\n border-radius: 4px;\n box-sizing: border-box;\">\n </div><div style=\"margin-top: 10px;\">\n <label style=\"\n margin:0 0 3px 0;\n padding:0px;\n display:block;\n \">\n Selecciona algo\n \n </label>\n <select style=\"width: 100%;\n padding: 12px 20px;\n margin: 8px 0;\n display: inline-block;\n border: 1px solid #ccc;\n border-radius: 4px;\n box-sizing: border-box;\" id=\"selector\" required=\"undefined\" sendToCustomer=\"true\">\n <option value=\"algo\">Algo</option><option value=\"masalgo\">Mas algo</option><option value=\"variosalgos\">Varios algos</option>\n </select>\n </div>\n <div style=\"\n margin-top: 10px;\n \">\n <label style=\"\n margin-bottom: 10px;\n \">\n ¿Cuál de las dos opciones te gusta más?\n \n </label>\n \n <div style=\"margin-bottom: 5px; display: flex; flex-direction: row; align-items: baseline; gap:0px;\">\n <input style=\"margin-right: 10px;\" type=\"radio\" id=\"radio0\" name=\"radio\" value=\"opcion1\"><label style=\"font-weight: 100; margin-right: 10px;\" for=\"radio0\">Opcion 1</label>\n </div>\n \n <div style=\"margin-bottom: 5px; display: flex; flex-direction: row; align-items: baseline; gap:0px;\">\n <input style=\"margin-right: 10px;\" type=\"radio\" id=\"radio1\" name=\"radio\" value=\"opcion2\"><label style=\"font-weight: 100; margin-right: 10px;\" for=\"radio1\">Opcion 2</label>\n </div>\n \n </div>\n \n <div style=\"margin-top: 10px;\">\n <label style=\"\n margin-bottom: 10px;\n \">\n Marca las casillas que quieras\n \n </label>\n \n <div style=\"display: flex; flex-direction: row; margin-bottom: 5px; align-items: flex-start;\">\n <input style=\"margin-right: 10px;\" type=\"checkbox\" id=\"casilla0\" name=\"casilla\" value=\"casilla1\"><label style=\"font-weight: 100; margin-right: 10px;\" for=\"casilla0\">Casilla 1</label>\n </div>\n \n <div style=\"display: flex; flex-direction: row; margin-bottom: 5px; align-items: flex-start;\">\n <input style=\"margin-right: 10px;\" type=\"checkbox\" id=\"casilla1\" name=\"casilla\" value=\"casilla2\"><label style=\"font-weight: 100; margin-right: 10px;\" for=\"casilla1\">Casilla 2</label>\n </div>\n \n </div>\n \n <tr style=\"\n display: block;\n text-align: left; \">\n <td style=\"\n display: inline-block;\n width: auto;\n padding: 15px 15px 15px 15px ;\n margin: 0px 0px 0px 0px ;\n background-color: rgba(244, 244, 244, 0);\">\n <div target=\"_blank\" rel=\"noreferrer\" onclick=\"InAppIndigitall.submit({'schemaId':217,'inAppId':22,'inputs':[{'type':'text','label':'Escribe algo','name':'algo','subtype':'text','required':true,'sendToCustomer':true,'id':'algo'},{'type':'select','label':'Selecciona algo','name':'selector','options':[{'name':'Algo','value':'algo'},{'name':'Mas algo','value':'masalgo'},{'name':'Varios algos','value':'variosalgos'}],'sendToCustomer':true,'id':'selector'},{'type':'radio','label':'¿Cuál de las dos opciones te gusta más?','name':'radio','options':[{'name':'Opcion 1','value':'opcion1'},{'name':'Opcion 2','value':'opcion2'}],'labelPosition':'right','id':'radio'},{'type':'checkbox','label':'Marca las casillas que quieras','options':[{'name':'Casilla 1','value':'casilla1'},{'name':'Casilla 2','value':'casilla2'}],'subtype':'right','name':'casilla','id':'casilla'}],'formId':'5kZSrg6xbKyX'})\" style=\"text-decoration: none; width: auto; cursor: pointer;\">\n <div style=\"\n padding: 8px 16px 8px 16px;\n width: auto;\n display: inline-block;\n text-align: left;\n background-color: rgba(200, 200, 200, 1);\n border-radius: 3px 3px 3px 3px;\n border: 0px solid transparent;\n box-sizing: border-box;\n margin-top: 15px;\">\n <span style=\"text-align: center; \"><span style=\"font-size: 16px\"><span style=\"font-family: Roboto, sans-serif !important\"><span style=\"color: #555555\"><span style=\"background-color: transparent\"><span style=\"letter-spacing: 0px;\">Botón</span></span></span></span></span></span>\n </div>\n </div>\n </td>\n </tr>\n \n </form>\n \n </div>\n \n </div>\n </div>\n </div>\n </body>\n </html>\n <script>\n // Created event\n var event = document.createEvent('Event');\n \n /* defined event 'click'.*/\n event.initEvent('click', true, true);\n \n // to assign event click.\n document.addEventListener('click', function (e) {\n window.parent.document.dispatchEvent(new CustomEvent('indigitall_on_click_inapp', {detail: {\n inAppId: 217,\n lastVersionId: 431,\n clickedButton: 'content',\n action: {\n type: 'url',\n url: 'https://indigitall.com'\n }\n }}));\n }, false);\n <\/script>\n </body>\n </html>\n \n "}},Z=Object.freeze({TEXT:"text",NUMBER:"number",RADIO:"radio",CHECKBOX:"checkbox",SELECT:"select"}),tt=class{constructor(t){if(t.id&&(this.id=t.id),t.name&&(this.name=t.name),t.type)switch(t.type){case"text":this.type=Z.TEXT;break;case"checkbox":this.type=Z.CHECKBOX;break;case"number":this.type=Z.NUMBER;break;case"radio":this.type=Z.RADIO;break;case"select":this.type=Z.SELECT}t.required&&(this.required=t.required),t.sendToCustomer&&(this.sendToCustomer=t.sendToCustomer)}},et=class{constructor(t){if(t.inAppId&&(this.inAppId=t.inAppId),t.formId&&(this.formId=t.formId),t.inappVersion&&(this.inappVersion=t.inappVersion),t.inputs&&Array.isArray(t.inputs)){this.inputs=[];for(let e=0;e<t.inputs.length;e++)this.inputs.push(new tt(t.inputs[e]))}}},{ErrorUtils:rt}=r(872).Core.Utils,nt=class{static checkFieldsForm(t,e,r){const n=[];if(e&&t.inputs&&t.inputs.length>0)for(let r=0;r<t.inputs.length;r++){const i=this.checkInputType(t.inputs[r],e);null!=i&&n.push(i)}if(n.length>0)return n;e&&0!==Object.keys(e).length&&w.sendEventForm(t.inAppId,t.inappVersion,e),r&&0!==Object.keys(r).length&&w.sendEventFormToCustomer(r)}static checkInputType(t,e){if(null!=t.id)switch(t.type){case Z.TEXT:if(t.required){if(!e[t.id])return rt.showError(l,2121,t.id);if(!e[t.id]instanceof String)return rt.showError(l,2120,`The field ${t.id} is not text`)}break;case Z.NUMBER:if(t.required){if(!e[t.id])return rt.showError(l,2121,t.id);if(!e[t.id]instanceof String){if(!parseInt(e[t.id]))return rt.showError(l,2120,`The field ${t.id} is not number`)}else if(!e[t.id]instanceof int)return rt.showError(l,2120,`The field ${t.id} is not number`)}break;default:if(t.required&&e[t.id]&&""==e[t.id])return rt.showError(l,2121,t.id)}return null}static editingFormHtml(t,e){return t.replaceAll("InAppIndigitall.onClick",`inAppIndigitallOnClick_${e}`).replaceAll("InAppIndigitall.submit","inAppIndigitallSubmit").replaceAll("plusSlides",`plusSlides_${e}`).replaceAll("currentSlide",`currentSlide_${e}`).replaceAll("setNewInterval",`setNewInterval_${e}`).replaceAll("newSlide",`newSlide_${e}`).replaceAll("showSlides",`showSlides_${e}`)}},it=class{static onClick(t){if(t){const e=JSON.parse(t);let r;e.inAppId&&(r=e.inAppId),e.inappId&&(r=e.inappId);const n=y.searchInAppWithInAppId(r);if(n&&e.action){const t=new v(n),r=new f(e.action);if(t.properties.setAction(r),r.type==r.URL&&window.open(r.url),t){k.addNewInAppClick(t);const e=new CustomEvent("didClicked",{detail:{action:r},bubbles:!0,cancelable:!0,composed:!1});self.dispatchEvent(e)}}else console.log(`InApp ${e.schema} not found`)}else console.log("InApp action is empty")}static submit(t,e,r){if(t){const n=new et(JSON.parse(t));if(e){const t=nt.checkFieldsForm(n,JSON.parse(e),JSON.parse(r));if(t&&t.length>0){const e=new CustomEvent("didFormError",{detail:{errorList:t},bubbles:!0,cancelable:!0,composed:!1});self.dispatchEvent(e)}else{const t=new CustomEvent("didFormSubmit",{detail:{},bubbles:!0,cancelable:!0,composed:!1});self.dispatchEvent(t)}}}}},{Log:ot,ErrorUtils:st,CommonUtils:at}=r(872).Core.Utils,ut="[IND]ShowInAppUtils: ";class ct{static async inAppWasShown(t,e,r,n,i){const o=new ot(ut);t.schema.code&&this.inAppWasGot(t.schema.code,null,e,(t=>{at.isFunction(i)&&i(t)}),(()=>{at.isFunction(i)&&i(t)}),((t,e)=>{o.d("inAppWasShown: "+t.inAppId+" with error: "+e.errorMessage).writeLog()}),r,n)}static inAppWasGot(t,e,r,n,i,o,s,a){const u=y.searchInApp(t),c=(new Date).getTime();if(null!=u){const t=new v(u);if(c<new Date(t.expiredDate).getTime()){const r=this.wasInAppPassedFilterProperties(t);null!=r?(r==l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER&&at.isFunction(o)&&o(t,st.showError(l,l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER)),r==l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES&&at.isFunction(s)&&s(t,st.showError(l,l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES)),r==l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES&&at.isFunction(a)&&a(t,st.showError(l,l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES))):at.isFunction(n)&&n(t,e)}else at.isFunction(r)&&r(t,st.showError(l,l.ErrorCode.INAPP_WAS_EXPIRED)),ct.updateInAppGet(t.schema.code,o,s,a,(t=>{at.isFunction(n)&&n(t,e)}),(t=>{new ot(ut).e(t).writeLog()}))}else at.isFunction(i)&&i(t,e)}static wasInAppPassedFilterProperties(t){if(t.properties.dismissForever&&t.inAppShow.wasDismissed)return l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER;{t.properties.dismissForever&&k.addNewInApptoDismissForever(t);const e=t.properties.numberOfShows,r=t.inAppShow?t.inAppShow.timesShowed:null,n=t.properties.numberOfClicks,i=t.inAppShow?t.inAppShow.timesClicked:null;if(e>0){if(!(null!=r&&r<e))return l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES;y.addInAppNewShow(t)}if(n>0&&null!=i&&i>=n)return l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES}return null}static updateInAppGet(t,e,r,n,i,o){yt.getInAppWithUpdate(t,!0,(t=>{const o=y.updateInApp(t),s=this.wasInAppPassedFilterProperties(o);if(null!=s)return s==l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER&&at.isFunction(e)&&e(t,st.showError(l,l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER)),s==l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES&&at.isFunction(r)&&r(t,st.showError(l,l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES)),void(s==l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES&&at.isFunction(n)&&n(t,st.showError(l,l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES)));at.isFunction(i)&&i(o)}),(t=>{at.isFunction(o)&&o(t)}))}}const lt=ct,{ErrorUtils:ft,CommonUtils:ht,LogLevel:pt}=r(872).Core.Utils;class dt{constructor(){this.LogLevel=pt,this.inAppIndigitallInterface=it}static async init(t){null!=t.appKey&&await e.setAppKey(t.appKey),t.urlInAppApi&&e.setUrlInappApi(t.urlInAppApi),t.logLevel&&e.setLogLevel(t.logLevel),!0===t.requestLocation&&k.registerLocation()}static async showInApp(t,r,n,i){const o={appKey:e.getAppKey(),urlInAppApi:"https://device-api.indigitall.com/v2",requestLocation:!0,logLevel:pt.DEBUG,inAppCode:t,viewId:r};this.showInAppWithConfig(o,null,null,null,null,null,null,n,i,null,null)}static async showInAppWithConfig(t,e,r,n,i,o,a,u,c,f,h){await this.init(t),s.isAppKeyFormat()?lt.inAppWasGot(t.inAppCode,t.viewId,r,(async(t,r)=>{t&&t.properties&&this.createInApp(t,r,a,u,c,e,f,h)}),((t,r)=>{this.drawInApp(t,r,e,a,u,c,f,h)}),o,n,i):ht.isFunction(c)&&c(ft.showError(l,l.ErrorCode.BAD_REQUEST_SERVER_ERROR))}static showMultipleInApp(t,r,n,i){const o={appKey:e.getAppKey(),urlInAppApi:"https://device-api.indigitall.com/v2",requestLocation:!0,logLevel:pt.DEBUG,inAppCodeList:t,divList:r};this.showMultipleInAppWithConfig(o,null,null,null,null,null,null,n,i,null,null)}static async showMultipleInAppWithConfig(t,e,r,n,i,o,a,u,c,f,h){if(await this.init(t),s.isAppKeyFormat()){if(t.inAppCodeList.length==t.divList.length&&t.inAppCodeList.length>0)for(var p=0;p<t.inAppCodeList.length;p++)lt.inAppWasGot(t.inAppCodeList[p],t.divList[p],r,(async(t,r)=>{t&&t.properties&&this.createInApp(t,r,a,u,c,e,f,h)}),((t,r)=>{dt.drawInApp(t,r,e,a,u,c,f,h)}),o,n,i)}else ht.isFunction(c)&&c(ft.showError(l,l.ErrorCode.BAD_REQUEST_SERVER_ERROR))}static async drawInApp(t,e,r,n,i,o,s,a){this.getInApp(t,(async t=>{t&&t.properties&&this.createInApp(t,e,n,i,o,r,s,a)}),o)}static async createInApp(t,e,r,n,i,o,s,a){if(t&&t.properties&&t.properties.contentUrl)try{const i=document.getElementById(e);if(i){i.style.position="relative",i.style.overflow="hidden";const u=await fetch(t.properties.contentUrl);let c=await u.text();null!=t.customData&&Object.keys(t.customData).forEach((function(e){c=c.replaceAll(`{{${e}}}`,t.customData[e])})),t.version&&(c=c.replaceAll("'inappVersion':'{{version}}'","'inappVersion':"+t.version));const l=e.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,""),f=nt.editingFormHtml(c,l);if(i.innerHTML=f,"undefined"===document.getElementById(`script_${l}`)||null===document.getElementById(`script_${l}`)){const t=document.createElement("script");t.id=`script_${l}`,t.type="text/javascript",t.innerHTML=new $(e,l).script,i.appendChild(t)}if(self.addEventListener("didClicked",(function e(n){r&&r(t,n.detail.action),self.removeEventListener("didClicked",e)})),self.addEventListener("didFormError",(function e(r){s&&s(t,r.detail.errorList),self.removeEventListener("didFormError",e)})),self.addEventListener("didFormSubmit",(function e(r){a&&a(t),self.removeEventListener("didFormSubmit",e)})),t.properties.showTime){let e=0;const r=setInterval((function(){e++,e==parseInt(t.properties.showTime)&&(i.style.display="none",clearInterval(r),ht.isFunction(o)&&o(t,i,1e3*t.properties.showTime))}),1e3)}if(t.properties.layout&&t.properties.layout.borderRadius){const e=`${parseInt(t.properties.layout.borderRadius)}px`;i.style.borderRadius=e}ht.isFunction(n)&&n(t,i),w.sendEventPrint(t)}}catch(r){let n=null;t&&t.schema&&t.schema.code&&(n=t.schema.code),ht.isFunction(i)&&i(r,e,n)}}static topicsList(t,e){return X.getInAppTopics(new z,t,e),!0}static topicsSubscribe(t,e,r){j.saveTopics(t,e,r)}static topicsUnsubscribe(t,e,r){j.deleteTopics(t,e,r)}static inAppGet(t,e,r){this.getInApp(t,e,r)}static getInApp(t,e,r){this.getInAppWithUpdate(t,!1,e,r)}static getInAppWithUpdate(t,e,r,n){if(s.isAppKeyFormat()){const i=new J;i.setTag(t),i.setUpdateInApp(e),X.getCampaignTag(i,r,n)}else ht.isFunction(n)&&n(ft.showError(l,l.ErrorCode.BAD_REQUEST_SERVER_ERROR))}static addNewInAppToDismissForever(t){k.addNewInApptoDismissForever(t)}static async isInAppDismissForever(t){k.isInAppDismissForever(t)}static async inAppOnClick(t){it.onClick(t)}static async inAppSubmit(t,e,r){it.submit(t,e,r)}static async inAppWasShown(t,e,r,n,i){lt.inAppWasShown(t,e,r,n,i)}static async downloadHTML(t){const e=await fetch(t,{method:"GET"});console.log(e)}static async setExternalCode(t,e,r){try{const r=await k.setExternalCode(t);e&&e(r)}catch(t){r&&r(t)}}static async logIn(t,e,r){await this.setExternalCode(t,e,r)}static async logOut(t,e){await this.setExternalCode(null,t,e)}}const yt=dt;window.indigitall||(window.indigitall={}),window.indigitall.InApp=dt,window.indigitall.InApp.Utils=k,window.indigitall.LogLevel=pt})(),n})(),t.exports=e()},396:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}return i.default=t,r&&r.set(t,i),i}(r(899));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}))},301:function(t){var e;e=()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.3.2","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>B});var t={};r.r(t),r.d(t,{BaseClient:()=>b,BaseRequest:()=>_});var e={};r.r(e),r.d(e,{Channel:()=>S,Device:()=>O,DeviceStatus:()=>P,ErrorDictionary:()=>I,ErrorModel:()=>g,EventType:()=>w,TopicSubscribeType:()=>R});var i={};r.r(i),r.d(i,{CommonUtils:()=>T,CorePermissions:()=>A,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>x,Log:()=>v,LogLevel:()=>d,TopicUtils:()=>M,Validations:()=>k});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,p=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t),l&&l.IDB&&await l.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}async getAppKeySync(){if(l&&l.IDB)return await l.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}},d=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=d;class E{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new p).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const v=E,g=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new g(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new g(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},b=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new v("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(y.DEBUG);let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\n").writeLog(),new g(n.statusCode,n.message))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},_=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new p).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},S=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),O=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new p).getBrowserPublicKey(),this.browserPrivateKey=(new p).getBrowserPrivateKey(),this.platform=(new p).getPlatform(),this.version=(new p).getVersion(),this.browserName=(new p).getBrowserName(),this.browserVersion=(new p).getBrowserVersion(),this.osName=(new p).getOsName(),this.osVersion=(new p).getOsVersion(),this.deviceType=(new p).getDeviceType(),(new p).getEnabled()&&(this.enabled="true"===(new p).getEnabled()),(new p).getExternalId()&&(this.externalCode=(new p).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new p).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new p).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},P=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),T=class{static isServiceTimestampExceed(){return!(new p).getServiceTimestamp()||(new p).getServiceSyncTime()<=(Date.now()-(new p).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},A=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new v("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},N=new v("[IND]Crypto"),L=new TextEncoder("utf-8"),C="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",L.encode(t),{name:C,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(C,n,L.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return N.d("hmac: ",s).writeLog(),s}catch(t){return void N.e("error:",t).writeLog()}}},x=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},k=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},B={Repository:p,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(545)),i=u(r(358)),o=u(r(568)),s=u(r(801)),a=u(r(136));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var u=p(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==c(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,u,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function f(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){f(o,n,i,s,a,"next",t)}function a(t){f(o,n,i,s,a,"throw",t)}s(void 0)}))}}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==c(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===c(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,u,c,f,d,y,E;return e=t,r=[{key:"getURL",value:(E=h(l().mark((function t(){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return E.apply(this,arguments)})},{key:"call",value:(y=h(l().mark((function t(e,r,u,c){var f,h,p,d,y;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return f=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&f.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),h=t.t2+t.t3,u.isJourneyRequest()&&(h=h.replace("v1","v2")),p={method:e,headers:u.addHeaders()},e!==this.GET&&(p.body=JSON.stringify(u.getBody())),c&&(p.credentials=c),t.prev=13,t.next=16,fetch(h,p);case 16:return d=t.sent,t.next=19,d.json();case 19:if(y=t.sent,!d.ok){t.next=23;break}return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\nResponse Body:",JSON.stringify(y.data,null,"\t")).writeLog(),t.abrupt("return",y);case 23:return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\n").writeLog(),t.abrupt("return",new i.default(y.statusCode,y.message));case 27:return t.prev=27,t.t4=t.catch(13),f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 31:case"end":return t.stop()}}),t,this,[[13,27]])}))),function(t,e,r,n){return y.apply(this,arguments)})},{key:"get",value:(d=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(f=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return f.apply(this,arguments)})},{key:"put",value:(c=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return c.apply(this,arguments)})},{key:"delete",value:(u=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return u.apply(this,arguments)})}],r&&p(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version,n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}}),e.default=n},106:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.default=r},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r;return e=t,(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}};e.default=r},358:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=i},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},90:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(901),i=l(r(354)),o=l(r(202)),s=l(r(801)),a=l(r(358)),u=l(r(22)),c=l(r(90));function l(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(){n=function(){return e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l;return e=t,r=[{key:"getDB",value:(l=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"get",value:(c=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return c.apply(this,arguments)})},{key:"put",value:(u=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(a=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return a.apply(this,arguments)})},{key:"getItem",value:(i=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})}],r&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},795:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(){c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var c=p(t[i],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var p=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}var e,r,a,u,l,p,d,y,E,v,g,m,I,b,_,S;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(S=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return S.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"getAppKeySync",value:(_=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return _.apply(this,arguments)})},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){return i.default.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){return i.default.getItem(this.LOCATION_UPDATE_MINUTES)||30}},{key:"setRequestLocation",value:(b=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getExternalIdRequest",value:(E=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return E.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getRegisteredByCookie",value:(y=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(d=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}},{key:"setInAppTopicList",value:(p=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getInAppTopicList",value:(l=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return l.apply(this,arguments)})},{key:"setTopicList",value:(u=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"getTopicList",value:(a=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return a.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=p},636:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l;return e=t,r=[{key:"getPermissions",value:(l=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getPermission",value:(a=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return a.apply(this,arguments)})},{key:"setPermissionsCallback",value:(o=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setCallback",value:(n=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(o,s,a,u){var c=p(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(i(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=e.CryptoUtils=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i;return e=t,r=[{key:"createHmac",value:(n=o().mark((function t(e,r){var n,i,s,a,f,h;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i=null===(n=window)||void 0===n||null===(n=n.crypto)||void 0===n?void 0:n.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,i.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return s=t.sent,t.next=9,i.sign(l,s,c.encode(r));case 9:return a=t.sent,f=new Uint8Array(a),h=Array.prototype.map.call(f,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",h).writeLog(),t.abrupt("return",h);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}],r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=f},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},970:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,i;return e=t,i=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},492:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},506:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"TopicUtils",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=h(r(306)),i=h(r(897)),o=h(r(95)),s=h(r(568)),a=h(r(970)),u=h(r(545)),c=r(136),l=h(r(506)),f=h(r(492));function h(t){return t&&t.__esModule?t:{default:t}}},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.3.2","_id":"indigitall-web-core@4.3.2","_inBundle":false,"_integrity":"sha512-Wiu3fLRtjtl8Cu5KiQDe/u7E797Doy/3z6ZJwsqdMW4T1ylj221Iupb5IlUV9jaWwInXXx8koVjbtSUrqrY3xA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.3.2","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.3.2","saveSpec":null,"fetchSpec":"4.3.2"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.3.2.tgz","_shasum":"084179d7a58990141ea7bbbbbcbd7566acafa6ae","_spec":"indigitall-web-core@4.3.2","_where":"/home/circleci/webpush/inbox","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.3.2"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.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";r.r(n),r.d(n,{default:()=>C});const{Repository:t}=r(872).Core,e=new class extends t{constructor(){super(),this.AUTH_TOKEN=this.REPOSITORY+".AUTH_TOKEN",this.INBOX_AUTH_MODE=this.REPOSITORY+".INBOX_AUTH_MODE",this.URL_INBOX_API=this.REPOSITORY+".URL_INBOX_API"}async setDeviceId(t){this.setStorage(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}setAuthToken(t){this.setStorage(this.AUTH_TOKEN,t)}getAuthToken(){return this.getStorage(this.AUTH_TOKEN)}setInboxAuthMode(t){this.setStorage(this.INBOX_AUTH_MODE,t)}getInboxAuthMode(){return this.getStorage(this.INBOX_AUTH_MODE)}async getUrlInboxApi(){return this.getStorage(this.URL_INBOX_API)}async setUrlInboxApi(t){this.setStorage(this.URL_INBOX_API,t)}},{BaseClient:o}=r(872).Core.Api,{Config:s}=r(872).Core,{ErrorModel:a}=r(872).Core.Models,{CommonUtils:u}=r(872).Core.Utils,c=new class extends o{constructor(){super(),this.URL_BASE=s.client.INBOX_URL_BASE,this.ENDPOINT_INBOX_NOTIFICATIONS="/notification",this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID=this.ENDPOINT_INBOX_NOTIFICATIONS+"/{sendingId}",this.ENDPOINT_INBOX_COUNTER="/counters",this.ENDPOINT_INBOX_AUTH="/auth/webhook"}async getURL(){return await e.getUrlInboxApi()||this.URL_BASE}async postInboxAuth(t,r,n){const i=await this.post(this.ENDPOINT_INBOX_AUTH,t.postInboxAuth());if(!i||i instanceof a||!i.data)i?u.isFunction(n)&&n(i):u.isFunction(n)&&n();else{const t=i.data.token;e.setAuthToken(t),u.isFunction(r)&&r(i)}return!0}async getInbox(t,e,r){const n=await this.get(this.ENDPOINT_INBOX_NOTIFICATIONS,t.getInboxPushRequest());return this.getInboxResponseStatus(n,e,r),!0}async putInboxPush(t,e,r){const n=await this.put(this.ENDPOINT_INBOX_NOTIFICATIONS,t.putInboxPushRequest());return this.getInboxResponseEdit(n,e,r),!0}async getInboxPushWithSendingId(t,e,r,n){const i=await this.get(this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID,t.getInboxPushRequestWithSendingId());return this.getNotificationResponseStatus(i,e,r,n),!0}async putInboxPushWithSendingId(t,e,r,n){const i=await this.put(this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID,t.putInboxWithSendingId());return this.getNotificationResponseStatus(i,e,r,n),!0}async getInboxCounter(t,e,r){const n=await this.get(this.ENDPOINT_INBOX_COUNTER,t.getCounter());this.getCounterStatus(n,e,r)}async getInboxResponseStatus(t,e,r){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const r=new C(t.data);u.isFunction(e)&&e(r)}else t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}async getInboxResponseEdit(t,e,r){t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300?u.isFunction(e)&&e():t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}getNotifications(t,e){const r=[];for(let n=0;n<t.length;n++){null!=t[n].sentAt&&null!=e&&t[n].sentAt<e&&(read=!0);const i=new InboxNotification(t[n],e);r.push(i)}return r}async getNotificationResponseStatus(t,e,r,n){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const t=new InboxNotification(notifications[i],e);u.isFunction(r)&&r(t)}else t?u.isFunction(n)&&n(t):u.isFunction(n)&&n()}async getCounterStatus(t,e,r){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const r={click:t.data.click,sent:t.data.sent,deleted:t.data.deleted,unread:this.getUnreadCounters(t.data.unread)};u.isFunction(e)&&e(r)}else t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}getUnreadCounters(t){return{count:t.count,lastAccess:t.lastAccess}}},{BaseRequest:l}=r(872).Core.Api,f=class extends l{constructor(){super()}postInboxAuth(){return this.body=this.json,this}setJson(t){this.json=t}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}},h=Object.freeze({SENT:"sent",CLICK:"click",DELETED:"deleted"});window.inboxStatus=h;const p=h,d=Object.freeze({NONE:"none",DEFAULT:"default",WEBHOOK:"webhook"}),{BaseRequest:y}=r(872).Core.Api,E=class extends y{constructor(){super(),null!=e.getExternalId()&&(this.externalId=e.getExternalId()),null!=e.getAuthToken()&&e.getInboxAuthMode()==d.WEBHOOK&&(this.headers.Authorization="Bearer "+e.getAuthToken()),this.sendingId="",this.sendingIds=null,this.page=0,this.pageSize=0,this.dateFrom="",this.dateTo="",this.status=p.INBOXSTATUS_SENT,this.statusList=null}getInboxPushRequest(){return this.params=this.createQueryString(),this}putInboxPushRequest(){return this.params=this.createQueryStringExternalId(),this.body=this.createBodyJson(),this}getInboxPushRequestWithSendingId(){return this.pathParams["{sendingId}"]=this.sendingId,this.params=this.createQueryStringExternalId(),this}putInboxWithSendingId(){return this.pathParams["{sendingId}"]=this.sendingId,this.params=this.createQueryStringExternalId(),this.body=this.createBodyStatusJson(),this}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}createQueryString(){let t="";if(this.page&&(t+=this.PARAM_INBOX_PAGE+"="+this.page+"&"),this.pageSize&&(t+=this.PARAM_INBOX_PAGE_SIZE+"="+this.pageSize+"&"),this.dateFrom&&(t+=this.PARAM_INBOX_DATE_FROM+"="+this.dateFrom+"&"),this.dateTo&&(t+=this.PARAM_INBOX_DATE_TO+"="+this.dateTo+"&"),this.statusList){let e="";for(let t=0;t<this.statusList.length;t++)e+=this.statusList[t],t!=this.statusList.length-1&&(e+=",");t+=this.PARAM_INBOX_STATUS+"="+e+"&"}return t+this.createQueryStringExternalId()}createQueryStringExternalId(){return this.PARAM_INBOX_EXTERNALID+"="+this.externalId}createBodyJson(){let t={};const e=[];try{if(t=this.createBodyStatusJson(),this.sendingIds)for(let t=0;t<this.sendingIds.length;t++)e.push(this.sendingIds[t]);t.sendingIds=e}catch(t){console.log("Error Inbox request :"+t)}return t}createBodyStatusJson(){const t={};return this.status&&(t.status=this.status),t}setSendingId(t){this.sendingId=t}setSendingIds(t){this.sendingIds=t}setPage(t){this.page=t}setPageSize(t){this.pageSize=t}setDateFrom(t){this.dateFrom=t}setDateTo(t){this.dateTo=t}setStatus(t){this.status=t}setStatusList(t){this.statusList=t}},{BaseRequest:v}=r(872).Core.Api,g=class extends v{constructor(){super(),null!=e.getExternalId()&&(this.externalId=e.getExternalId()),null!=e.getAuthToken()&&e.getInboxAuthMode()==d.WEBHOOK&&(this.headers.Authorization="Bearer "+e.getAuthToken())}getCounter(){return this.params=this.createQueryStringExternalId(),this}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}createQueryStringExternalId(){return this.PARAM_INBOX_EXTERNALID+"="+this.externalId}};class m{constructor(t,e){t&&(t.id&&(this.id=t.id),t.externalId&&(this.externalId=t.externalId),t.sentAt&&(this.sentAt=t.sentAt),t.status&&(this.status=t.status),t.sendingId&&(this.sendingId=t.sendingId),t.message&&(this.message=t.message),t.campaignId&&(this.campaignId=t.campaignId),this.read=!1,this.sentAt&&e&&this.sentAt<e&&(this.read=!0))}}window.inboxNotification=m;const I=m,{ErrorDictionary:b}=r(872).Core.Models,_=b.ErrorCode;Object.assign(_,{INBOX_GET_ERROR:3001,INBOX_GET_PAGE_ERROR:3011,INBOX_EXTERNAL_ID_NO_REGISTERED:3012,INBOX_NO_MESSAGES:3013,INBOX_IS_REQUESTING_PAGE:3014,INBOX_EMPTY:3015,INBOX_GENERAL_ERROR:3600});const S=b.ErrorMessage;Object.assign(S,{INBOX_GET_ERROR:"inbox GET request error",INBOX_GET_PAGE_ERROR:"error inbox get page",INBOX_EXTERNAL_ID_NO_REGISTERED:"external Id is not registered",INBOX_NO_MESSAGES:"There are no more messages on Inbox",INBOX_IS_REQUESTING_PAGE:"Wait. Is Requesting new page",INBOX_EMPTY:"There are no messages on Inbox",INBOX_GENERAL_ERROR:"general error"});const O={ErrorCode:_,ErrorMessage:S},{Validations:P,Log:w}=r(872).Core.Utils,R=class extends P{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new w("[IND]InboxValidations: "),r=e.getDeviceId();let n=!0;return this.isAppKeyFormat()||(n=!1,t.w("appKey is null or empty").writeLog()),this.isValidFormat(r)||(n=!1,t.w("deviceId is null or empty").writeLog()),n}},{CommonUtils:T,ErrorUtils:A,Log:N}=r(872).Core.Utils;class L{constructor(t){if(t){if(t.lastAccess&&(this.lastAccess=t.lastAccess),t.numPage?this.page=t.numPage:this.page=0,t.pageSize&&(this.pageSize=t.pageSize),t.count&&(this.count=t.count),t.notifications){this.notifications=[];const e=t.notifications;for(let t=0;t<e.length;t++){const r=new I(e[t],this.lastAccess);this.notifications.push(r)}}this.totalPages=Math.trunc(this.count/this.pageSize)}this.dateFrom=null,this.dateTo=null,this.statusList=null,this.newNotifications=[I],this.isRequestingPage=!1}static generateAuthToken(t,e){let r={};navigator.indigitallGetAuthConfig&&T.isFunction(navigator.indigitallGetAuthConfig)&&(r=navigator.indigitallGetAuthConfig());const n=new f;n.setJson(r),c.postInboxAuth(n,t,e)}static getMessagesCountWithAuth(t,e,r){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getMessagesCount(e,r)}static setUrlInboxApi(t){e.setUrlInboxApi(t)}static setInboxAuthMode(t){e.setInboxAuthMode(t)}static getMessagesCount(t,r){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new g;c.getInboxCounter(e,t,(r=>{401===r.errorCode?this.generateAuthToken((()=>{c.getInboxCounter(e,t,r)}),r):T.isFunction(r)&&r(r)}))}else T.isFunction(r)&&r(A.showError(O,O.ErrorCode.INBOX_GET_ERROR));else T.isFunction(r)&&r(A.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}static getInboxWithAuth(t,e,r){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getInbox(e,r)}static getInbox(t,e){L.getInboxWithPage(null,null,null,null,null,t,e)}static getInboxWithPageAuth(t,e,r,n,i,o,s,a){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getInboxWithPage(e,r,n,i,o,s,a)}static getInboxWithPage(t,r,n,i,o,s,a){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new E;t&&e.setPage(t),r&&e.setPageSize(r),n&&(e.setDateFrom(n),this.dateFrom=n),i&&(e.setDateTo(i),this.dateTo=i),o&&(e.setStatusList(o),this.statusList=o),c.getInbox(e,(t=>{this.totalPages=t.totalPages,0!=t.count?T.isFunction(s)&&s(t):T.isFunction(a)&&a(A.showError(O,O.ErrorCode.INBOX_GET_PAGE_ERROR))}),(t=>{401==t.errorCode?this.generateAuthToken((()=>{c.getInbox(e,(t=>{this.totalPages=t.totalPages,T.isFunction(s)&&s(t)}),t)}),t):T.isFunction(t)&&t(t)}))}else T.isFunction(a)&&a(A.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(a)&&a(A.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}getNextPage(t,r){const n=new N("[IND]Inbox: ");if(this.isRequestingPage)n.w(O.ErrorMessage.INBOX_IS_REQUESTING_PAGE).writeLog();else if(this.isRequestingPage=!0,this.page+1<this.totalPages)if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new E;(this.page||0==this.page)&&e.setPage(this.page+1),this.pageSize&&e.setPageSize(this.pageSize),this.dateFrom&&e.setDateFrom(this.dateFrom),this.dateTo&&e.setDateTo(this.dateTo),this.statusList&&e.setStatusList(this.statusList),c.getInbox(e,(e=>{this.notifications=this.notifications.concat(e.notifications),this.newNotifications=e.notifications,this.lastAccess=e.lastAccess,this.count=e.count,this.page=e.page,this.pageSize=e.pageSize,this.totalPages=e.totalPages,this.isRequestingPage=!1,T.isFunction(t)&&t(this,this.newNotifications)}),(r=>{401===r.errorCode?this.generateAuthToken((()=>{c.getInbox(e,(e=>{this.notifications=this.notifications.concat(e.notifications),this.newNotifications=e.notifications,this.lastAccess=e.lastAccess,this.count=e.count,this.page=e.page,this.pageSize=e.pageSize,this.totalPages=e.totalPages,this.isRequestingPage=!1,T.isFunction(t)&&t(this,this.newNotifications)}),r)}),r):(this.isRequestingPage=!1,T.isFunction(r)&&r())}))}else this.isRequestingPage=!1,T.isFunction(r)&&r(A.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(r)&&r(A.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST));else this.isRequestingPage=!1,T.isFunction(r)&&r(A.showError(O,O.ErrorCode.INBOX_NO_MESSAGES))}massiveEditNotifications(t,r,n,i){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t&&r){const e=new E;e.setSendingIds(t),e.setStatus(r),c.putInboxPush(e,n,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.putInboxPush(e,n,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(i)&&i(A.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(i)&&i(A.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}getInfoFromNotification(t,r,n){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t){const e=new E;e.setSendingId(t),c.getInboxPushWithSendingId(e,this.lastAccess,r,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.getInboxPushWithSendingId(e,this.lastAccess,r,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(n)&&n(A.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(n)&&n(A.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}modifyStatusFromNotification(t,r,n,i){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t&&r){const e=new E;e.setSendingId(t),e.setStatus(r),c.putInboxPushWithSendingId(e,this.lastAccess,n,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.putInboxPushWithSendingId(e,this.lastAccess,n,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(i)&&i(A.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(i)&&i(A.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}}const C=L})(),n})(),t.exports=e()},277:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}return i.default=t,r&&r.set(t,i),i}(r(301));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}))},735:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}return i.default=t,r&&r.set(t,i),i}(r(794));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}))},794:function(t){var e;e=()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.3.2","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>B});var t={};r.r(t),r.d(t,{BaseClient:()=>b,BaseRequest:()=>_});var e={};r.r(e),r.d(e,{Channel:()=>S,Device:()=>O,DeviceStatus:()=>P,ErrorDictionary:()=>I,ErrorModel:()=>g,EventType:()=>w,TopicSubscribeType:()=>R});var i={};r.r(i),r.d(i,{CommonUtils:()=>T,CorePermissions:()=>A,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>x,Log:()=>v,LogLevel:()=>d,TopicUtils:()=>M,Validations:()=>k});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,p=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t),l&&l.IDB&&await l.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}async getAppKeySync(){if(l&&l.IDB)return await l.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}},d=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=d;class E{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new p).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const v=E,g=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new g(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new g(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},b=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new v("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(y.DEBUG);let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\n").writeLog(),new g(n.statusCode,n.message))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},_=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new p).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},S=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),O=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new p).getBrowserPublicKey(),this.browserPrivateKey=(new p).getBrowserPrivateKey(),this.platform=(new p).getPlatform(),this.version=(new p).getVersion(),this.browserName=(new p).getBrowserName(),this.browserVersion=(new p).getBrowserVersion(),this.osName=(new p).getOsName(),this.osVersion=(new p).getOsVersion(),this.deviceType=(new p).getDeviceType(),(new p).getEnabled()&&(this.enabled="true"===(new p).getEnabled()),(new p).getExternalId()&&(this.externalCode=(new p).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new p).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new p).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},P=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),T=class{static isServiceTimestampExceed(){return!(new p).getServiceTimestamp()||(new p).getServiceSyncTime()<=(Date.now()-(new p).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},A=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new v("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},N=new v("[IND]Crypto"),L=new TextEncoder("utf-8"),C="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",L.encode(t),{name:C,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(C,n,L.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return N.d("hmac: ",s).writeLog(),s}catch(t){return void N.e("error:",t).writeLog()}}},x=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},k=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},B={Repository:p,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(545)),i=u(r(358)),o=u(r(568)),s=u(r(801)),a=u(r(136));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var u=p(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==c(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,u,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function f(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){f(o,n,i,s,a,"next",t)}function a(t){f(o,n,i,s,a,"throw",t)}s(void 0)}))}}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==c(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===c(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,u,c,f,d,y,E;return e=t,r=[{key:"getURL",value:(E=h(l().mark((function t(){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return E.apply(this,arguments)})},{key:"call",value:(y=h(l().mark((function t(e,r,u,c){var f,h,p,d,y;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return f=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&f.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),h=t.t2+t.t3,u.isJourneyRequest()&&(h=h.replace("v1","v2")),p={method:e,headers:u.addHeaders()},e!==this.GET&&(p.body=JSON.stringify(u.getBody())),c&&(p.credentials=c),t.prev=13,t.next=16,fetch(h,p);case 16:return d=t.sent,t.next=19,d.json();case 19:if(y=t.sent,!d.ok){t.next=23;break}return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\nResponse Body:",JSON.stringify(y.data,null,"\t")).writeLog(),t.abrupt("return",y);case 23:return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\n").writeLog(),t.abrupt("return",new i.default(y.statusCode,y.message));case 27:return t.prev=27,t.t4=t.catch(13),f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 31:case"end":return t.stop()}}),t,this,[[13,27]])}))),function(t,e,r,n){return y.apply(this,arguments)})},{key:"get",value:(d=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(f=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return f.apply(this,arguments)})},{key:"put",value:(c=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return c.apply(this,arguments)})},{key:"delete",value:(u=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return u.apply(this,arguments)})}],r&&p(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version,n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}}),e.default=n},106:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.default=r},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r;return e=t,(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}};e.default=r},358:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=i},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},90:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(901),i=l(r(354)),o=l(r(202)),s=l(r(801)),a=l(r(358)),u=l(r(22)),c=l(r(90));function l(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(){n=function(){return e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l;return e=t,r=[{key:"getDB",value:(l=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"get",value:(c=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return c.apply(this,arguments)})},{key:"put",value:(u=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(a=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return a.apply(this,arguments)})},{key:"getItem",value:(i=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})}],r&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},795:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(){c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var c=p(t[i],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var p=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}var e,r,a,u,l,p,d,y,E,v,g,m,I,b,_,S;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(S=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return S.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"getAppKeySync",value:(_=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return _.apply(this,arguments)})},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){return i.default.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){return i.default.getItem(this.LOCATION_UPDATE_MINUTES)||30}},{key:"setRequestLocation",value:(b=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getExternalIdRequest",value:(E=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return E.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getRegisteredByCookie",value:(y=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(d=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}},{key:"setInAppTopicList",value:(p=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getInAppTopicList",value:(l=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return l.apply(this,arguments)})},{key:"setTopicList",value:(u=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"getTopicList",value:(a=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return a.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=p},636:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l;return e=t,r=[{key:"getPermissions",value:(l=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getPermission",value:(a=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return a.apply(this,arguments)})},{key:"setPermissionsCallback",value:(o=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setCallback",value:(n=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(o,s,a,u){var c=p(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(i(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=e.CryptoUtils=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i;return e=t,r=[{key:"createHmac",value:(n=o().mark((function t(e,r){var n,i,s,a,f,h;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i=null===(n=window)||void 0===n||null===(n=n.crypto)||void 0===n?void 0:n.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,i.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return s=t.sent,t.next=9,i.sign(l,s,c.encode(r));case 9:return a=t.sent,f=new Uint8Array(a),h=Array.prototype.map.call(f,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",h).writeLog(),t.abrupt("return",h);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}],r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=f},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},970:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,i;return e=t,i=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},492:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},506:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"TopicUtils",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=h(r(306)),i=h(r(897)),o=h(r(95)),s=h(r(568)),a=h(r(970)),u=h(r(545)),c=r(136),l=h(r(506)),f=h(r(492));function h(t){return t&&t.__esModule?t:{default:t}}},301:function(t){var e;e=()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.3.2","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>B});var t={};r.r(t),r.d(t,{BaseClient:()=>b,BaseRequest:()=>_});var e={};r.r(e),r.d(e,{Channel:()=>S,Device:()=>O,DeviceStatus:()=>P,ErrorDictionary:()=>I,ErrorModel:()=>g,EventType:()=>w,TopicSubscribeType:()=>R});var i={};r.r(i),r.d(i,{CommonUtils:()=>T,CorePermissions:()=>A,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>x,Log:()=>v,LogLevel:()=>d,TopicUtils:()=>M,Validations:()=>k});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,p=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t),l&&l.IDB&&await l.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}async getAppKeySync(){if(l&&l.IDB)return await l.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}},d=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=d;class E{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new p).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const v=E,g=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new g(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new g(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},b=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new v("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(y.DEBUG);let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\n").writeLog(),new g(n.statusCode,n.message))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},_=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new p).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},S=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),O=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new p).getBrowserPublicKey(),this.browserPrivateKey=(new p).getBrowserPrivateKey(),this.platform=(new p).getPlatform(),this.version=(new p).getVersion(),this.browserName=(new p).getBrowserName(),this.browserVersion=(new p).getBrowserVersion(),this.osName=(new p).getOsName(),this.osVersion=(new p).getOsVersion(),this.deviceType=(new p).getDeviceType(),(new p).getEnabled()&&(this.enabled="true"===(new p).getEnabled()),(new p).getExternalId()&&(this.externalCode=(new p).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new p).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new p).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},P=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),T=class{static isServiceTimestampExceed(){return!(new p).getServiceTimestamp()||(new p).getServiceSyncTime()<=(Date.now()-(new p).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},A=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new v("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},N=new v("[IND]Crypto"),L=new TextEncoder("utf-8"),C="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",L.encode(t),{name:C,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(C,n,L.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return N.d("hmac: ",s).writeLog(),s}catch(t){return void N.e("error:",t).writeLog()}}},x=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},k=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},B={Repository:p,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=u(void 0);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(545)),i=u(r(358)),o=u(r(568)),s=u(r(801)),a=u(r(136));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var u=p(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==c(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,u,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function f(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){f(o,n,i,s,a,"next",t)}function a(t){f(o,n,i,s,a,"throw",t)}s(void 0)}))}}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==c(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===c(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,u,c,f,d,y,E;return e=t,r=[{key:"getURL",value:(E=h(l().mark((function t(){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return E.apply(this,arguments)})},{key:"call",value:(y=h(l().mark((function t(e,r,u,c){var f,h,p,d,y;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return f=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&f.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),h=t.t2+t.t3,u.isJourneyRequest()&&(h=h.replace("v1","v2")),p={method:e,headers:u.addHeaders()},e!==this.GET&&(p.body=JSON.stringify(u.getBody())),c&&(p.credentials=c),t.prev=13,t.next=16,fetch(h,p);case 16:return d=t.sent,t.next=19,d.json();case 19:if(y=t.sent,!d.ok){t.next=23;break}return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\nResponse Body:",JSON.stringify(y.data,null,"\t")).writeLog(),t.abrupt("return",y);case 23:return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\n").writeLog(),t.abrupt("return",new i.default(y.statusCode,y.message));case 27:return t.prev=27,t.t4=t.catch(13),f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 31:case"end":return t.stop()}}),t,this,[[13,27]])}))),function(t,e,r,n){return y.apply(this,arguments)})},{key:"get",value:(d=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(f=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return f.apply(this,arguments)})},{key:"put",value:(c=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return c.apply(this,arguments)})},{key:"delete",value:(u=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return u.apply(this,arguments)})}],r&&p(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=s},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version,n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}}),e.default=n},106:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.default=r},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}var s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r;return e=t,(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=s},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}}},358:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=function(t,e,r){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=r},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},90:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(901),i=l(r(354)),o=l(r(202)),s=l(r(801)),a=l(r(358)),u=l(r(22)),c=l(r(90));function l(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(){n=function(){return e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l;return e=t,r=[{key:"getDB",value:(l=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"get",value:(c=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return c.apply(this,arguments)})},{key:"put",value:(u=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(a=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return a.apply(this,arguments)})},{key:"getItem",value:(i=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})}],r&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},795:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(){c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var c=p(t[i],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var p=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}var e,r,a,u,l,p,d,y,E,v,g,m,I,b,_,S;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(S=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return S.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"getAppKeySync",value:(_=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return _.apply(this,arguments)})},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){return i.default.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){return i.default.getItem(this.LOCATION_UPDATE_MINUTES)||30}},{key:"setRequestLocation",value:(b=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getExternalIdRequest",value:(E=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return E.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getRegisteredByCookie",value:(y=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(d=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}},{key:"setInAppTopicList",value:(p=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getInAppTopicList",value:(l=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return l.apply(this,arguments)})},{key:"setTopicList",value:(u=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"getTopicList",value:(a=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return a.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=p},636:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=s},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l;return e=t,r=[{key:"getPermissions",value:(l=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getPermission",value:(a=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return a.apply(this,arguments)})},{key:"setPermissionsCallback",value:(o=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setCallback",value:(n=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",v="completed",g={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(o,s,a,u){var c=p(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(i(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=e.CryptoUtils=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i;return e=t,r=[{key:"createHmac",value:(n=o().mark((function t(e,r){var n,i,s,a,f,h;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i=null===(n=window)||void 0===n||null===(n=n.crypto)||void 0===n?void 0:n.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,i.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return s=t.sent,t.next=9,i.sign(l,s,c.encode(r));case 9:return a=t.sent,f=new Uint8Array(a),h=Array.prototype.map.call(f,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",h).writeLog(),t.abrupt("return",h);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}],r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=f},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new s},970:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],n&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=n},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},492:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},506:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"TopicUtils",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=h(r(306)),i=h(r(897)),o=h(r(95)),s=h(r(568)),a=h(r(970)),u=h(r(545)),c=r(136),l=h(r(506)),f=h(r(492));function h(t){return t&&t.__esModule?t:{default:t}}},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.3.2","_id":"indigitall-web-core@4.3.2","_inBundle":false,"_integrity":"sha512-Wiu3fLRtjtl8Cu5KiQDe/u7E797Doy/3z6ZJwsqdMW4T1ylj221Iupb5IlUV9jaWwInXXx8koVjbtSUrqrY3xA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.3.2","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.3.2","saveSpec":null,"fetchSpec":"4.3.2"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.3.2.tgz","_shasum":"084179d7a58990141ea7bbbbbcbd7566acafa6ae","_spec":"indigitall-web-core@4.3.2","_where":"/home/circleci/webpush/inbox","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.3.2"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.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";r.r(n),r.d(n,{default:()=>C});const{Repository:t}=r(872).Core,e=new class extends t{constructor(){super(),this.AUTH_TOKEN=this.REPOSITORY+".AUTH_TOKEN",this.INBOX_AUTH_MODE=this.REPOSITORY+".INBOX_AUTH_MODE",this.URL_INBOX_API=this.REPOSITORY+".URL_INBOX_API"}async setDeviceId(t){this.setStorage(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}setAuthToken(t){this.setStorage(this.AUTH_TOKEN,t)}getAuthToken(){return this.getStorage(this.AUTH_TOKEN)}setInboxAuthMode(t){this.setStorage(this.INBOX_AUTH_MODE,t)}getInboxAuthMode(){return this.getStorage(this.INBOX_AUTH_MODE)}async getUrlInboxApi(){return this.getStorage(this.URL_INBOX_API)}async setUrlInboxApi(t){this.setStorage(this.URL_INBOX_API,t)}},{BaseClient:o}=r(872).Core.Api,{Config:s}=r(872).Core,{ErrorModel:a}=r(872).Core.Models,{CommonUtils:u}=r(872).Core.Utils,c=new class extends o{constructor(){super(),this.URL_BASE=s.client.INBOX_URL_BASE,this.ENDPOINT_INBOX_NOTIFICATIONS="/notification",this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID=this.ENDPOINT_INBOX_NOTIFICATIONS+"/{sendingId}",this.ENDPOINT_INBOX_COUNTER="/counters",this.ENDPOINT_INBOX_AUTH="/auth/webhook"}async getURL(){return await e.getUrlInboxApi()||this.URL_BASE}async postInboxAuth(t,r,n){const i=await this.post(this.ENDPOINT_INBOX_AUTH,t.postInboxAuth());if(!i||i instanceof a||!i.data)i?u.isFunction(n)&&n(i):u.isFunction(n)&&n();else{const t=i.data.token;e.setAuthToken(t),u.isFunction(r)&&r(i)}return!0}async getInbox(t,e,r){const n=await this.get(this.ENDPOINT_INBOX_NOTIFICATIONS,t.getInboxPushRequest());return this.getInboxResponseStatus(n,e,r),!0}async putInboxPush(t,e,r){const n=await this.put(this.ENDPOINT_INBOX_NOTIFICATIONS,t.putInboxPushRequest());return this.getInboxResponseEdit(n,e,r),!0}async getInboxPushWithSendingId(t,e,r,n){const i=await this.get(this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID,t.getInboxPushRequestWithSendingId());return this.getNotificationResponseStatus(i,e,r,n),!0}async putInboxPushWithSendingId(t,e,r,n){const i=await this.put(this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID,t.putInboxWithSendingId());return this.getNotificationResponseStatus(i,e,r,n),!0}async getInboxCounter(t,e,r){const n=await this.get(this.ENDPOINT_INBOX_COUNTER,t.getCounter());this.getCounterStatus(n,e,r)}async getInboxResponseStatus(t,e,r){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const r=new C(t.data);u.isFunction(e)&&e(r)}else t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}async getInboxResponseEdit(t,e,r){t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300?u.isFunction(e)&&e():t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}getNotifications(t,e){const r=[];for(let n=0;n<t.length;n++){null!=t[n].sentAt&&null!=e&&t[n].sentAt<e&&(read=!0);const i=new InboxNotification(t[n],e);r.push(i)}return r}async getNotificationResponseStatus(t,e,r,n){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const t=new InboxNotification(notifications[i],e);u.isFunction(r)&&r(t)}else t?u.isFunction(n)&&n(t):u.isFunction(n)&&n()}async getCounterStatus(t,e,r){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const r={click:t.data.click,sent:t.data.sent,deleted:t.data.deleted,unread:this.getUnreadCounters(t.data.unread)};u.isFunction(e)&&e(r)}else t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}getUnreadCounters(t){return{count:t.count,lastAccess:t.lastAccess}}},{BaseRequest:l}=r(872).Core.Api,f=class extends l{constructor(){super()}postInboxAuth(){return this.body=this.json,this}setJson(t){this.json=t}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}},h=Object.freeze({SENT:"sent",CLICK:"click",DELETED:"deleted"});window.inboxStatus=h;const p=h,d=Object.freeze({NONE:"none",DEFAULT:"default",WEBHOOK:"webhook"}),{BaseRequest:y}=r(872).Core.Api,E=class extends y{constructor(){super(),null!=e.getExternalId()&&(this.externalId=e.getExternalId()),null!=e.getAuthToken()&&e.getInboxAuthMode()==d.WEBHOOK&&(this.headers.Authorization="Bearer "+e.getAuthToken()),this.sendingId="",this.sendingIds=null,this.page=0,this.pageSize=0,this.dateFrom="",this.dateTo="",this.status=p.INBOXSTATUS_SENT,this.statusList=null}getInboxPushRequest(){return this.params=this.createQueryString(),this}putInboxPushRequest(){return this.params=this.createQueryStringExternalId(),this.body=this.createBodyJson(),this}getInboxPushRequestWithSendingId(){return this.pathParams["{sendingId}"]=this.sendingId,this.params=this.createQueryStringExternalId(),this}putInboxWithSendingId(){return this.pathParams["{sendingId}"]=this.sendingId,this.params=this.createQueryStringExternalId(),this.body=this.createBodyStatusJson(),this}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}createQueryString(){let t="";if(this.page&&(t+=this.PARAM_INBOX_PAGE+"="+this.page+"&"),this.pageSize&&(t+=this.PARAM_INBOX_PAGE_SIZE+"="+this.pageSize+"&"),this.dateFrom&&(t+=this.PARAM_INBOX_DATE_FROM+"="+this.dateFrom+"&"),this.dateTo&&(t+=this.PARAM_INBOX_DATE_TO+"="+this.dateTo+"&"),this.statusList){let e="";for(let t=0;t<this.statusList.length;t++)e+=this.statusList[t],t!=this.statusList.length-1&&(e+=",");t+=this.PARAM_INBOX_STATUS+"="+e+"&"}return t+this.createQueryStringExternalId()}createQueryStringExternalId(){return this.PARAM_INBOX_EXTERNALID+"="+this.externalId}createBodyJson(){let t={};const e=[];try{if(t=this.createBodyStatusJson(),this.sendingIds)for(let t=0;t<this.sendingIds.length;t++)e.push(this.sendingIds[t]);t.sendingIds=e}catch(t){console.log("Error Inbox request :"+t)}return t}createBodyStatusJson(){const t={};return this.status&&(t.status=this.status),t}setSendingId(t){this.sendingId=t}setSendingIds(t){this.sendingIds=t}setPage(t){this.page=t}setPageSize(t){this.pageSize=t}setDateFrom(t){this.dateFrom=t}setDateTo(t){this.dateTo=t}setStatus(t){this.status=t}setStatusList(t){this.statusList=t}},{BaseRequest:v}=r(872).Core.Api,g=class extends v{constructor(){super(),null!=e.getExternalId()&&(this.externalId=e.getExternalId()),null!=e.getAuthToken()&&e.getInboxAuthMode()==d.WEBHOOK&&(this.headers.Authorization="Bearer "+e.getAuthToken())}getCounter(){return this.params=this.createQueryStringExternalId(),this}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}createQueryStringExternalId(){return this.PARAM_INBOX_EXTERNALID+"="+this.externalId}};class m{constructor(t,e){t&&(t.id&&(this.id=t.id),t.externalId&&(this.externalId=t.externalId),t.sentAt&&(this.sentAt=t.sentAt),t.status&&(this.status=t.status),t.sendingId&&(this.sendingId=t.sendingId),t.message&&(this.message=t.message),t.campaignId&&(this.campaignId=t.campaignId),this.read=!1,this.sentAt&&e&&this.sentAt<e&&(this.read=!0))}}window.inboxNotification=m;const I=m,{ErrorDictionary:b}=r(872).Core.Models,_=b.ErrorCode;Object.assign(_,{INBOX_GET_ERROR:3001,INBOX_GET_PAGE_ERROR:3011,INBOX_EXTERNAL_ID_NO_REGISTERED:3012,INBOX_NO_MESSAGES:3013,INBOX_IS_REQUESTING_PAGE:3014,INBOX_EMPTY:3015,INBOX_GENERAL_ERROR:3600});const S=b.ErrorMessage;Object.assign(S,{INBOX_GET_ERROR:"inbox GET request error",INBOX_GET_PAGE_ERROR:"error inbox get page",INBOX_EXTERNAL_ID_NO_REGISTERED:"external Id is not registered",INBOX_NO_MESSAGES:"There are no more messages on Inbox",INBOX_IS_REQUESTING_PAGE:"Wait. Is Requesting new page",INBOX_EMPTY:"There are no messages on Inbox",INBOX_GENERAL_ERROR:"general error"});const O={ErrorCode:_,ErrorMessage:S},{Validations:P,Log:w}=r(872).Core.Utils,R=class extends P{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new w("[IND]InboxValidations: "),r=e.getDeviceId();let n=!0;return this.isAppKeyFormat()||(n=!1,t.w("appKey is null or empty").writeLog()),this.isValidFormat(r)||(n=!1,t.w("deviceId is null or empty").writeLog()),n}},{CommonUtils:T,ErrorUtils:A,Log:N}=r(872).Core.Utils;class L{constructor(t){if(t){if(t.lastAccess&&(this.lastAccess=t.lastAccess),t.numPage?this.page=t.numPage:this.page=0,t.pageSize&&(this.pageSize=t.pageSize),t.count&&(this.count=t.count),t.notifications){this.notifications=[];const e=t.notifications;for(let t=0;t<e.length;t++){const r=new I(e[t],this.lastAccess);this.notifications.push(r)}}this.totalPages=Math.trunc(this.count/this.pageSize)}this.dateFrom=null,this.dateTo=null,this.statusList=null,this.newNotifications=[I],this.isRequestingPage=!1}static generateAuthToken(t,e){let r={};navigator.indigitallGetAuthConfig&&T.isFunction(navigator.indigitallGetAuthConfig)&&(r=navigator.indigitallGetAuthConfig());const n=new f;n.setJson(r),c.postInboxAuth(n,t,e)}static getMessagesCountWithAuth(t,e,r){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getMessagesCount(e,r)}static setUrlInboxApi(t){e.setUrlInboxApi(t)}static setInboxAuthMode(t){e.setInboxAuthMode(t)}static getMessagesCount(t,r){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new g;c.getInboxCounter(e,t,(r=>{401===r.errorCode?this.generateAuthToken((()=>{c.getInboxCounter(e,t,r)}),r):T.isFunction(r)&&r(r)}))}else T.isFunction(r)&&r(A.showError(O,O.ErrorCode.INBOX_GET_ERROR));else T.isFunction(r)&&r(A.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}static getInboxWithAuth(t,e,r){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getInbox(e,r)}static getInbox(t,e){L.getInboxWithPage(null,null,null,null,null,t,e)}static getInboxWithPageAuth(t,e,r,n,i,o,s,a){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getInboxWithPage(e,r,n,i,o,s,a)}static getInboxWithPage(t,r,n,i,o,s,a){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new E;t&&e.setPage(t),r&&e.setPageSize(r),n&&(e.setDateFrom(n),this.dateFrom=n),i&&(e.setDateTo(i),this.dateTo=i),o&&(e.setStatusList(o),this.statusList=o),c.getInbox(e,(t=>{this.totalPages=t.totalPages,0!=t.count?T.isFunction(s)&&s(t):T.isFunction(a)&&a(A.showError(O,O.ErrorCode.INBOX_GET_PAGE_ERROR))}),(t=>{401==t.errorCode?this.generateAuthToken((()=>{c.getInbox(e,(t=>{this.totalPages=t.totalPages,T.isFunction(s)&&s(t)}),t)}),t):T.isFunction(t)&&t(t)}))}else T.isFunction(a)&&a(A.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(a)&&a(A.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}getNextPage(t,r){const n=new N("[IND]Inbox: ");if(this.isRequestingPage)n.w(O.ErrorMessage.INBOX_IS_REQUESTING_PAGE).writeLog();else if(this.isRequestingPage=!0,this.page+1<this.totalPages)if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new E;(this.page||0==this.page)&&e.setPage(this.page+1),this.pageSize&&e.setPageSize(this.pageSize),this.dateFrom&&e.setDateFrom(this.dateFrom),this.dateTo&&e.setDateTo(this.dateTo),this.statusList&&e.setStatusList(this.statusList),c.getInbox(e,(e=>{this.notifications=this.notifications.concat(e.notifications),this.newNotifications=e.notifications,this.lastAccess=e.lastAccess,this.count=e.count,this.page=e.page,this.pageSize=e.pageSize,this.totalPages=e.totalPages,this.isRequestingPage=!1,T.isFunction(t)&&t(this,this.newNotifications)}),(r=>{401===r.errorCode?this.generateAuthToken((()=>{c.getInbox(e,(e=>{this.notifications=this.notifications.concat(e.notifications),this.newNotifications=e.notifications,this.lastAccess=e.lastAccess,this.count=e.count,this.page=e.page,this.pageSize=e.pageSize,this.totalPages=e.totalPages,this.isRequestingPage=!1,T.isFunction(t)&&t(this,this.newNotifications)}),r)}),r):(this.isRequestingPage=!1,T.isFunction(r)&&r())}))}else this.isRequestingPage=!1,T.isFunction(r)&&r(A.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(r)&&r(A.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST));else this.isRequestingPage=!1,T.isFunction(r)&&r(A.showError(O,O.ErrorCode.INBOX_NO_MESSAGES))}massiveEditNotifications(t,r,n,i){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t&&r){const e=new E;e.setSendingIds(t),e.setStatus(r),c.putInboxPush(e,n,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.putInboxPush(e,n,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(i)&&i(A.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(i)&&i(A.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}getInfoFromNotification(t,r,n){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t){const e=new E;e.setSendingId(t),c.getInboxPushWithSendingId(e,this.lastAccess,r,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.getInboxPushWithSendingId(e,this.lastAccess,r,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(n)&&n(A.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(n)&&n(A.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}modifyStatusFromNotification(t,r,n,i){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t&&r){const e=new E;e.setSendingId(t),e.setStatus(r),c.putInboxPushWithSendingId(e,this.lastAccess,n,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.putInboxPushWithSendingId(e,this.lastAccess,n,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(i)&&i(A.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(i)&&i(A.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}}const C=L})(),n})(),t.exports=e()},277:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}return i.default=t,r&&r.set(t,i),i}(r(301));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}))},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.3.2","_id":"indigitall-web-core@4.3.2","_inBundle":false,"_integrity":"sha512-Wiu3fLRtjtl8Cu5KiQDe/u7E797Doy/3z6ZJwsqdMW4T1ylj221Iupb5IlUV9jaWwInXXx8koVjbtSUrqrY3xA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.3.2","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.3.2","saveSpec":null,"fetchSpec":"4.3.2"},"_requiredBy":["#USER","/","/indigitall-web-inbox"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.3.2.tgz","_shasum":"084179d7a58990141ea7bbbbbcbd7566acafa6ae","_spec":"indigitall-web-core@4.3.2","_where":"/home/circleci/webpush/push","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.3.2"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.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";r.r(n),r.d(n,{default:()=>Et});var t=r(277),e=r.n(t);const{Repository:i}=r(872).Core,o=new class extends i{constructor(){super(),this.SAFARI_WEBSITE_PUSH_ID=this.REPOSITORY+".SAFARI_WEBSITE_PUSH_ID",this.PUSH_TOKEN=this.REPOSITORY+".PUSH_TOKEN",this.PERMISSION_PUSH=this.REPOSITORY+".PERMISSION_PUSH",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.DEVICE_JSON=this.REPOSITORY+".DEVICE_JSON",this.PUT_REQUEST_TIMESTAMP=this.REPOSITORY+".PUT_REQUEST_TIMESTAMP",this.WORKER_PATH=this.REPOSITORY+".WORKER_PATH",this.TEST=this.REPOSITORY+".TEST",this.SAFARI_GESTURE_REQUEST_PERMISSION=this.REPOSITORY+".SAFARI_GESTURE_REQUEST_PERMISSION",this.UPDATE_TOPIC_SUBSCRIBE=this.REPOSITORY+".UPDATE_TOPIC_SUBSCRIBE",this.TOPIC_SYNC_TIMESTAMP=this.REPOSITORY+".TOPIC_SYNC_TIMESTAMP",this.TOPIC_SEMAPHORE=this.REPOSITORY+".TOPIC_SEMAPHORE",this.TOPIC_SYNC_IS_PROCESSING=this.REPOSITORY+".TOPIC_SYNC_IS_PROCESSING"}async setDeviceId(t){this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,t),this.db&&this.db.IDB&&await this.db.setItem(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}async getDeviceIdSync(){if(this.db&&this.db.IDB)return await this.db.getItem(this.DEVICE_ID)}setPushToken(t){this.setStorage(this.PUSH_TOKEN,t)}getPushToken(){return this.getStorage(this.PUSH_TOKEN)}setSafariWebsitePushId(t){this.setStorage(this.SAFARI_WEBSITE_PUSH_ID,t)}getSafariWebsitePushId(){return this.getStorage(this.SAFARI_WEBSITE_PUSH_ID)}setPermissionPush(t){this.setStorage(this.PERMISSION_PUSH,t)}getPermissionPush(){return this.getStorage(this.PERMISSION_PUSH)}async getUrlDeviceApi(){let t;try{this.storage&&this.storage.isLocalStorageAvailable()?t=this.getStorage(this.URL_DEVICE_API):this.db&&this.db.IDB&&(t=await this.db.getItem(this.URL_DEVICE_API))}catch(t){}return t}async setUrlDeviceApi(t){this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,t),this.db&&this.db.IDB&&await this.db.setItem(this.URL_DEVICE_API,t)}async getDeviceJson(){return this.getStorage(this.DEVICE_JSON)}async setDeviceJson(t){this.setStorage(this.DEVICE_JSON,t)}async getPutRequestTimestamp(){return this.getStorage(this.PUT_REQUEST_TIMESTAMP)}async setPutRequestTimestamp(t){this.setStorage(this.PUT_REQUEST_TIMESTAMP,t)}setWorkerPath(t){this.setStorage(this.WORKER_PATH,t)}getWorkerPath(){return this.getStorage(this.WORKER_PATH)}setTestValue(t){this.setStorage(this.TEST,t)}getTestValue(){return this.getStorage(this.TEST)}setSafariGestureRequestPermission(t){this.setStorage(this.SAFARI_GESTURE_REQUEST_PERMISSION,t)}getSafariGestureRequestPermission(){return this.getStorage(this.SAFARI_GESTURE_REQUEST_PERMISSION)}async setUpdateTopicSubscribe(t){this.db&&this.db.IDB&&await this.db.setItem(this.UPDATE_TOPIC_SUBSCRIBE,t)}async getUpdateTopicSubscribe(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.UPDATE_TOPIC_SUBSCRIBE))}catch(t){}return t}async setTopicSyncTimestamp(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_SYNC_TIMESTAMP,t)}async getTopicSyncTimestamp(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_SYNC_TIMESTAMP))}catch(t){}return t}async setTopicSemaphore(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_SEMAPHORE,t)}async getTopicSemaphore(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_SEMAPHORE))}catch(t){}return t}async setTopicSyncIsProcessing(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_SYNC_IS_PROCESSING,t)}async getTopicSyncIsProcessing(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_SYNC_IS_PROCESSING))}catch(t){}return t}},{ErrorDictionary:s}=r(872).Core.Models,a=s.ErrorCode;Object.assign(a,{GENERAL_ERROR_BAD_REQUEST:601,GENERAL_ERROR_APPKEY_BAD_REQUEST:602,PUSH_INITIALIZATION_ERROR:1e3,PUSH_RECEPTION_ERROR:1200,PUSH_TOPICS_ERROR:1400,PUSH_DEVICE_ERROR:1500,PUSH_EVENT_ERROR:1600,API_APPKEY_NOT_VALID:1601});const u=s.ErrorMessage;Object.assign(u,{GENERAL_ERROR_BAD_REQUEST:"AppKey or DeviceId are null or empty",GENERAL_ERROR_APPKEY_BAD_REQUEST:"AppKey is null or empty",PUSH_INITIALIZATION_ERROR:"initialization error",PUSH_RECEPTION_ERROR:"push reception error",PUSH_TOPICS_ERROR:"push topics error",PUSH_DEVICE_ERROR:"device error",PUSH_EVENT_ERROR:"event error",API_APPKEY_NOT_VALID:"appKey is missing'"});const c={ErrorCode:a,ErrorMessage:u},{BaseRequest:l}=r(872).Core.Api,{EventType:f}=r(872).Core.Models,h=class extends l{constructor(){super()}setEventType(t){this.eventType=t}setPushId(t){this.pushId=t}setClickedButton(t){this.clickedButton=t}setSendingId(t){this.sendingId=t}setPermissionType(t){this.permissionType=t}setLocation(t,e){this.latitude=t,this.longitude=e}setDeviceId(t){this.deviceId=t}setPlatform(t){this.platform=t}setAppKey(t){this.appKey=t}setCustomData(t){this.customData=t}async setExternalCodeRequest(){this.externalCode=await o.getExternalIdRequest()}setExternalCode(t){this.externalCode=t}setCampaingId(t){this.campaignId=t}setJourneyStateId(t){this.journeyStateId=t}setJourneyExecution(t){this.journeyExecution=t}setCjCurrentStateId(t){this.cjCurrentStateId=t}postEventPushRequest(){const t={};return t.deviceId=this.deviceId,t.platform=this.platform,this.eventType&&(t.eventType=this.eventType),this.pushId&&(t.pushId=this.pushId),t.clickedButton=this.clickedButton,null!=this.externalCode&&(t.externalCode=this.externalCode),this.sendingId&&"undefined"!=this.sendingId&&(t.sendingId=this.sendingId),this.journeyStateId&&(t.journeyStateId=this.journeyStateId),this.journeyExecution&&(t.journeyExecution=this.journeyExecution),this.cjCurrentStateId&&(t.cjCurrentStateId=this.cjCurrentStateId),this.campaignId&&(t.campaignId=this.campaignId),this.body=t,this}postEventVisitRequest(){const t={};return t.deviceId=o.getDeviceId(),t.eventType=f.EVENT_TYPE_UPDATE,this.body=t,this}postEventPermissionRequest(){const t={};return t.deviceId=o.getDeviceId(),this.eventType&&(t.eventType=this.eventType),this.permissionType&&(t.permissionType=this.permissionType),this.body=t,this}postEventLocationRequest(){const t={};return t.deviceId=o.getDeviceId(),t.eventType=f.EVENT_TYPE_UPDATE,this.latitude&&(t.latitude=this.latitude),this.longitude&&(t.longitude=this.longitude),this.body=t,this}postEventCustomRequest(){const t={};return this.deviceId&&(t.deviceId=this.deviceId),this.eventType&&(t.eventType=this.eventType),this.customData&&(t.customData=this.customData),this.externalCode&&(t.externalCode=this.externalCode),this.body=t,this}},p=class{static urlBase64ToUint8Array(t){const e=(t+"=".repeat((4-t.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),r=window.atob(e),n=new Uint8Array(r.length);for(let t=0;t<r.length;++t)n[t]=r.charCodeAt(t);return n}static callEventPermission(t,e){const r=new h;r.setAppKey(o.getAppKey()),r.setDeviceId(o.getDeviceId()),r.setPermissionType(t),r.setEventType(e),R.postEventPermission(r)}static async getPutRequestTimestamp(){return await o.getPutRequestTimestamp()?o.getPutRequestTimestamp():Date.now()+6048e5}},{Validations:d,Log:y}=r(872).Core.Utils,E=class extends d{static isAppKeyFormat(){const t=o.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new y("[IND]PushValidations: "),e=o.getDeviceId();let r=!0;return this.isAppKeyFormat()||(r=!1,t.w("appKey is null or empty").writeLog()),this.isValidFormat(e)||(r=!1,t.w("deviceId is null or empty").writeLog()),r}static async isPutRequestExceed(){return await p.getPutRequestTimestamp()<=Date.now()}static isSafariBrowserDevice(){const t=window.navigator.userAgent,e=!!t.match(/iPad/i)||!!t.match(/iPhone/i),r=!!t.match(/WebKit/i);return e&&r&&!t.match(/CriOS/i)&&!t.match(/OPiOS/i)}},{Device:v}=r(872).Core.Models,g=class extends v{constructor(t=null,e){super(t,e),null==t?(null!=o.getDeviceId()&&(this.deviceId=o.getDeviceId()),null!=o.getPushToken()&&(this.pushToken=o.getPushToken())):e?t.deviceId&&(this.deviceId=t.deviceId,o.setDeviceId(this.deviceId)):(t.deviceId&&(this.deviceId=t.deviceId),t.pushToken&&(this.pushToken=t.pushToken))}static setDeviceJson(t){o.setDeviceJson(JSON.stringify(t.toJSON()))}getDeviceId(){return this.deviceId}getPushToken(){return this.pushToken}toJSON(){const t=super.toJSON();return this.deviceId&&(t.deviceId=this.deviceId),this.pushToken&&(t.pushToken=this.pushToken),t}},{Config:m}=r(872).Core,{BaseClient:I}=r(872).Core.Api,{ErrorModel:b,Channel:_}=r(872).Core.Models,{TopicUtils:S,Log:O,CommonUtils:P,ErrorUtils:w}=r(872).Core.Utils,R=new class extends I{constructor(){super(),this.URL_BASE=m.client.URL_BASE,this.ENDPOINT_APPLICATION="/application",this.ENDPOINT_APPLICATION_ALL=this.ENDPOINT_APPLICATION+"/all",this.ENDPOINT_DEVICE="/device",this.ENDPOINT_DEVICE_TOPICS=this.ENDPOINT_DEVICE+"/topics",this.ENDPOINT_PUSH="/push",this.ENDPOINT_EVENT="/event",this.ENDPOINT_EVENT_PUSH=this.ENDPOINT_EVENT+"/push",this.ENDPOINT_EVENT_VISIT=this.ENDPOINT_EVENT+"/visit",this.ENDPOINT_EVENT_PERMISSION=this.ENDPOINT_EVENT+"/permission",this.ENDPOINT_EVENT_LOCATION=this.ENDPOINT_EVENT+"/location",this.ENDPOINT_EVENT_CUSTOM=this.ENDPOINT_EVENT+"/custom",this.ENDPOINT_EVENT_CUSTOM_BEACON=this.ENDPOINT_EVENT_CUSTOM+"/beacon",this.ENDPOINT_BROWSER="/browser",this.log=new O("[IND]Client: ")}async getURL(){return await o.getUrlDeviceApi()||this.URL_BASE}async getApplicationAll(t,e,r){if(E.isAppKeyFormat()){const n=await this.get(this.ENDPOINT_APPLICATION_ALL,t.getApplicationRequest());!n||n instanceof b?n?P.isFunction(r)&&r(n):P.isFunction(r)&&r():P.isFunction(e)&&e(n)}else P.isFunction(r)&&r(w.showError(c,c.ErrorCode.BAD_REQUEST_SERVER_ERROR));return!0}async postDevice(t,e,r){if(E.isAppKeyFormat()){const n=await this.post(this.ENDPOINT_DEVICE,t.postDeviceRequest(),"include");if(!n||n instanceof b)n?P.isFunction(r)&&r(n):P.isFunction(r)&&r();else{const t={enabled:n.data.enabled,deviceId:n.data.deviceId,registeredByCookie:n.data.registeredByCookie};await o.setDeviceId(t.deviceId),P.isFunction(e)&&e(new g(t,!0))}}else P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_APPKEY_BAD_REQUEST));return!0}async putDevice(t,e,r){const n=new g,i=await E.isPutRequestExceed();if(t.deviceUpdate||null==await o.getPutRequestTimestamp()||i)if(E.isValidFormatRequest()){o.setPutRequestTimestamp(await p.getPutRequestTimestamp());const i=await this.put(this.ENDPOINT_DEVICE,t.putDeviceRequest(n),"include");if(!i||i instanceof b)i?P.isFunction(r)&&r(i):P.isFunction(r)&&r();else{const t={enabled:i.data.enabled,deviceId:i.data.deviceId,registeredByCookie:i.data.registeredByCookie};P.isFunction(e)&&e(new g(t,!0))}}else P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));else P.isFunction(e)&&e(n)}async getDevice(t,e,r){if(E.isValidFormatRequest()){const n=await this.get(this.ENDPOINT_DEVICE,t.getDeviceRequest());if(!n||n instanceof b)n?P.isFunction(r)&&r(n):P.isFunction(r)&&r();else{const t={enabled:n.data.enabled,deviceId:n.data.deviceId};P.isFunction(e)&&e(new g(t,!0))}}else P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async getDeviceTopics(t,e,r){if(E.isValidFormatRequest()){const n=await this.get(this.ENDPOINT_DEVICE_TOPICS,t.getDeviceTopicsRequest());!n||n instanceof b?n?P.isFunction(r)&&r(n):P.isFunction(r)&&r():P.isFunction(e)&&e(S.setTopicChannel(n.data.topics,_.PUSH))}else P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postDeviceTopics(t,e,r){return E.isValidFormatRequest()?await this.postDeviceTopicsRequest(t,e,r):P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST)),!0}async postDeviceTopicsRequest(t,e,r){const n=await this.post(this.ENDPOINT_DEVICE_TOPICS,t.postDeviceTopicsRequest());if(!n||n instanceof b)n?P.isFunction(r)&&r(n):P.isFunction(r)&&r();else{const t=n.data.topics;P.isFunction(e)&&e(t)}}async deleteDeviceTopics(t,e,r){return E.isValidFormatRequest()?this.deleteDeviceTopicsRequest(t,e,r):P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST)),!0}async deleteDeviceTopicsRequest(t,e,r){const n=await this.delete(this.ENDPOINT_DEVICE_TOPICS,t.deleteDeviceTopicsRequest());if(!n||n instanceof b)n?P.isFunction(r)&&r(n):P.isFunction(r)&&r();else{const t=n.data.topics;P.isFunction(e)&&e(t)}}async postEventPush(t){E.isValidFormatRequest()&&await this.post(this.ENDPOINT_EVENT_PUSH,t.postEventPushRequest())}postEventVisit(t){E.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_VISIT,t.postEventVisitRequest())}postEventPermission(t){E.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_PERMISSION,t.postEventPermissionRequest())}postEventLocation(t){E.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_LOCATION,t.postEventLocationRequest())}async getBrowser(t,e,r){if(E.isAppKeyFormat()){const n=await this.get(this.ENDPOINT_BROWSER,t);if(!n||n instanceof b)n?P.isFunction(r)&&r(n):P.isFunction(r)&&r();else{const t={browserName:n.data.browserName,browserVersion:n.data.browserVersion,deviceType:n.data.deviceType,osName:n.data.osName,osVersion:n.data.osVersion,supported:n.data.supported,platform:n.data.platform};await o.setBrowserName(t.browserName),o.setBrowserVersion(t.browserVersion),await o.setOsName(t.osName),o.setOsVersion(t.osVersion),o.setDeviceType(t.deviceType),o.setSupported(t.supported),E.isSafariBrowserDevice()?await o.setPlatform("webpush"):await o.setPlatform(t.platform),P.isFunction(e)&&e(t)}}else P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventCustom(t,e,r){if(E.isValidFormatRequest()){const n=await this.post(this.ENDPOINT_EVENT_CUSTOM,t.postEventCustomRequest());!n||n instanceof b?n?P.isFunction(r)&&r(n):P.isFunction(r)&&r():P.isFunction(e)&&e(n)}else P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventCustomSync(t,e,r){if(E.isValidFormatRequest()){t=t.postEventCustomRequest();try{if(navigator&&"sendBeacon"in navigator){const r=await this.getURL()+this.ENDPOINT_EVENT_CUSTOM_BEACON+t.getParams();navigator.sendBeacon(r,JSON.stringify(t.getBody())),P.isFunction(e)&&e()}else{const n=await this.getURL()+this.ENDPOINT_EVENT_CUSTOM+t.getParams(),i=new XMLHttpRequest;i.open("POST",n,!1),i.setRequestHeader("Content-Type","application/json"),i.onreadystatechange=()=>{i.readyState===XMLHttpRequest.DONE&&(i.status>=200||i.status<300)?P.isFunction(e)&&e():P.isFunction(r)&&r()},i.send(JSON.stringify(t.getBody()))}}catch(t){P.isFunction(r)&&r(w.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}else P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventJourney(t,e,r){if(E.isValidFormatRequest()){const n=await this.post(this.ENDPOINT_PUSH+this.ENDPOINT_EVENT_CUSTOM,t.postEventCustomRequest());!n||n instanceof b?n?P.isFunction(r)&&r(n):P.isFunction(r)&&r():P.isFunction(e)&&e(n)}else P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventJourneySync(t,e,r){if(E.isValidFormatRequest()){t=t.postEventCustomRequest();try{let n=await this.getURL();if(n=n.replace("v1","v2"),navigator&&"sendBeacon"in navigator){const r=n+this.ENDPOINT_PUSH+this.ENDPOINT_EVENT_CUSTOM+t.getParams();navigator.sendBeacon(r,JSON.stringify(t.getBody())),P.isFunction(e)&&e()}else{const n=await this.getURL().replace("v1","v2")+this.ENDPOINT_PUSH+this.ENDPOINT_EVENT_CUSTOM+t.getParams(),i=new XMLHttpRequest;i.open("POST",n,!1),i.setRequestHeader("Content-Type","application/json"),i.onreadystatechange=()=>{i.readyState===XMLHttpRequest.DONE&&(i.status>=200||i.status<300)?P.isFunction(e)&&e():P.isFunction(r)&&r()},i.send(JSON.stringify(t.getBody()))}}catch(t){P.isFunction(r)&&r(w.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}else P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventPushClick(t){let e="/event/push";t.journeyStateId&&(t.setJourneyRequest(!0),e=URL_PUSH+URL_EVENT_CLICK),t.setServiceWorkerRequest(!0),await this.post(e,t.postEventPushRequest())}},{Config:T}=r(872).Core,{BaseRequest:A}=r(872).Core.Api,N=class extends A{getApplicationRequest(){return this.params=this.PARAM_PLATFORM+"="+T.platform,this}},{DeviceStatus:L}=r(872).Core.Models,{BaseRequest:C}=r(872).Core.Api,D=class extends C{constructor(t=L.DEFAULT){super(),this.device=new g,this.status=t,this.notToUpdate=!1,this.deviceUpdate=!1}isDeviceUpdated(t){this.deviceUpdate=t}setDeviceId(t){this.device&&(this.device.deviceId=t)}setAppKey(t){this.appKey=t}getDeviceRequest(){return this.params=this.createQueryString(),this}postDeviceRequest(){return this.body=this.createDeviceJson(),this.status!==L.DEFAULT&&(this.body.enabled=1===this.status),this}putDeviceRequest(t){return this.params=this.createQueryString(),this.body=this.createPUTDeviceJson(t),this.status!==L.DEFAULT&&(this.body.enabled=1===this.status),this}getDeviceTopicsRequest(){return this.params=this.createQueryString(),this}postDeviceTopicsRequest(){return this.params=this.createQueryString(),this.body=this.createTopicsJson(),this}deleteDeviceTopicsRequest(){return this.params=this.createQueryString(),this.body=this.createTopicsJson(),this}createQueryString(){return this.PARAM_DEVICE_ID+"="+this.device.deviceId}createDeviceJson(){let t={};try{t=this.device.toJSON()}catch(t){}return t}createPUTDeviceJson(t){let e={};try{g.setDeviceJson(t),e=t.toJSON()}catch(t){}return e}createTopicsJson(){const t={};return this.topics&&(t.topics=this.topics),t}getDeviceId(){return this.device.getDeviceId()}setTopics(t){this.topics=t}setExternalCode(t){this.device.setExternalCode(t)}},x=Object.freeze({PERMISSION_TYPE_PUSH:"push",PERMISSION_TYPE_LOCATION:"location"}),{CorePermissions:k}=r(872).Core.Utils,M=class{static async getPermissions(){const t=await k.getPermissions(),e=await k.getPermission("push");return e&&(t.push=e.state),null===e&&window.Notification&&window.Notification.permission&&(t.push=window.Notification.permission),t}static async setPermissionsCallback(){k.setPermissionsCallback(),await k.setCallback("push",navigator.indigitallRequestPushPermission)}},{Log:B,CommonUtils:U,ErrorUtils:j}=r(872).Core.Utils,{EventType:V}=r(872).Core.Models,F="[IND]IndigitallSafari: ",Y=class{static isSafariPushNotificationSupported(){return!!E.isSafariBrowserDevice()||!!window?.safari?.pushNotification}static async launchNotificationPermissionForSafari(){const t=new B(F);if(o.getSafariGestureRequestPermission()===V.EVENT_TYPE_ASK)if(o.getSafariWebsitePushId()&&o.getDeviceId())if(E.isSafariBrowserDevice()&&o.getWorkerPath()){const t=await navigator.serviceWorker.register(o.getWorkerPath());"granted"===await window.Notification.requestPermission()&&(o.setPermissionPush(V.EVENT_TYPE_ACCEPT),Et.subscribeForPushNotification(t))}else{const t=window.safari.pushNotification.permission(o.getSafariWebsitePushId());this.checkRemotePermission(t)}else o.getSafariWebsitePushId()?t.w("error Device Id is not found").writeLog():t.w("error Safari Website Push Id is not found").writeLog();else t.w("there was not user gesture to request safari permissions").writeLog()}static async checkRemotePermission(t){const e=new B(F);try{if("default"===t.permission){const t={deviceCode:o.getDeviceId()};e.d("permission default: ",t).writeLog(),o.getPermissionPush()||p.callEventPermission(x.PERMISSION_TYPE_PUSH,V.EVENT_TYPE_ASK),window.safari.pushNotification.requestPermission(await R.getURL()+"/safari",o.getSafariWebsitePushId(),t,window.indigitall.Push.checkRemotePermission)}else"denied"===t.permission?(e.w("permission denied: ",t).writeLog(),o.getPermissionPush()&&o.getPermissionPush()!=V.EVENT_TYPE_REJECT&&(p.callEventPermission(x.PERMISSION_TYPE_PUSH,V.EVENT_TYPE_REJECT),o.setPermissionPush(V.EVENT_TYPE_REJECT))):"granted"===t.permission&&(e.d("permission granted: ",t).writeLog(),o.getPermissionPush()&&o.getPermissionPush()!=V.EVENT_TYPE_ACCEPT&&(p.callEventPermission(x.PERMISSION_TYPE_PUSH,V.EVENT_TYPE_ACCEPT),o.setPermissionPush(V.EVENT_TYPE_ACCEPT)),t.deviceToken&&t.deviceToken!==o.getPushToken()&&(o.setPushToken(t.deviceToken),R.putDevice(new D,(t=>{if(U.isFunction(navigator.indigitallOnInitialized)){const t={};t.push=o.getPermissionPush(),t.location=o.getPermissionLocation(),navigator.indigitallOnInitialized(t,new g)}U.isFunction(navigator.indigitallOnNewUserRegistered)&&!o.getNewUserTimestamp()&&(o.setNewUserTimestamp(Date.now()),navigator.indigitallOnNewUserRegistered(t)),Et.registerLocation()}),navigator.indigitallOnError),o.setServiceTimestamp(Date.now())))}catch(t){U.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(j.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}},G=new class{constructor(){this.TOPIC_SYNC_TIMESTAMP=3e4,this.TOPIC_SYNC_TAG="syncTopics",this.TOPIC_SYNC_SUBSCRIBE_CALLBACK="indigitallSyncTopicSubscribeOnSuccess",this.TOPIC_SYNC_SUBSCRIBE_ERROR_CALLBACK="indigitallSyncTopicSubscribeOnError",this.TOPIC_SYNC_UNSUBSCRIBE_CALLBACK="indigitallSyncTopicUnsubscribeOnSuccess",this.TOPIC_SYNC_UNSUBSCRIBE_ERROR_CALLBACK="indigitallSyncTopicUnsubscribeOnError"}},K=Object.freeze({GREEN:"green",RED:"red"}),{EventType:q}=r(872).Core.Models,{Config:W}=r(872).Core,X=class{static async requestBackgroundSync(){const t=await navigator.serviceWorker.getRegistration(o.getWorkerPath());return null!=t?t:null}static findIndigitallSW(t){for(let e=0;e<t.length;e++)if(void 0!==t[e]&&t[e].active&&t[e].active.scriptURL&&t[e].active.scriptURL.includes("worker.min.js"))return t[e];return null}static async sendEventRequest(t,e){const r=new h;r.setAppKey(t.appKey),r.setDeviceId(t.deviceId),r.setPlatform(W.platform),r.setPushId(""+t.id),r.setSendingId(""+t.sendingId),t.campaignId&&r.setCampaingId(""+t.campaignId),t.journeyStateId&&r.setJourneyStateId(t.journeyStateId),t.journeyExecution&&r.setJourneyExecution(t.journeyExecution),t.cjCurrentStateId&&r.setCjCurrentStateId(t.cjCurrentStateId),r.setEventType(q.EVENT_TYPE_CLICK),await r.setExternalCodeRequest(),"action-1"==e.action?r.setClickedButton(1):"action-2"==e.action?r.setClickedButton(2):r.setClickedButton(0),r.setServiceWorkerRequest(!0),await R.postEventPushClick(r)}},{CommonUtils:H}=r(872).Core.Utils,J=class{static async setTopicRequest(t){const e=new D;return e.setAppKey(await o.getAppKeySync()),e.setDeviceId(await o.getDeviceIdSync()),e.setServiceWorkerRequest(!0),e.setTopics(t),e}static async getTopicsList(t,e){try{const r=await o.getTopicList();r&&r.length>0?await st.isTopicTimestampExceed()?this.getDeviceTopicClient(t,e):(await o.setTopicSemaphore(K.GREEN),H.isFunction(t)&&t(r)):this.getDeviceTopicClient(t,e)}catch(t){await o.setTopicSemaphore(K.GREEN)}}static async getDeviceTopicClient(t,e){try{R.getDeviceTopics(new D,(async e=>{await st.setTopicTimestamp(),await o.setTopicList(e),await o.setTopicSemaphore(K.GREEN),H.isFunction(t)&&t(e)}),(async t=>{await st.setTopicTimestamp(),await o.setTopicSemaphore(K.GREEN),H.isFunction(e)&&e(t)}))}catch(t){await o.setTopicSemaphore(K.GREEN),H.isFunction(e)&&e(t)}}},Q=class{constructor(t,e){this.code=t,this.type=e}static getAllCodes(t){const e=[];for(let r=0;r<t.length;r++)e.push(t[r].code);return e}toJSON(){const t={};return this.code&&(t.code=this.code),this.type&&(t.type=this.type),t}},{Channel:z,TopicSubscribeType:$}=r(872).Core.Models,{ErrorUtils:Z,Log:tt}=r(872).Core.Utils;class et{static async syncTopics(){if(!await o.getTopicSyncIsProcessing()){await o.setTopicSyncIsProcessing(!0);const t=setTimeout((async function(){try{await et.sendTopicSync()}catch(t){}await o.setTopicSyncIsProcessing(!1),clearTimeout(t)}),G.TOPIC_SYNC_TIMESTAMP)}}static async sendTopicSync(){const t=await st.filterTopicExistingOnIDB(),e=st.topicFilter(t,$.SUBSCRIBE),r=st.topicFilter(t,$.UNSUBSCRIBE);if(e&&e.length>0)R.postDeviceTopicsRequest(await J.setTopicRequest(e),(async t=>{await st.setTopicTimestamp(),t.channel=z.PUSH,await o.setTopicList(t),st.indigitallSyncTopicEvent(G.TOPIC_SYNC_SUBSCRIBE_CALLBACK,t)}),(async t=>{st.indigitallSyncTopicEvent(G.TOPIC_SYNC_SUBSCRIBE_ERROR_CALLBACK,t)}));else if(r&&r.length>0)R.deleteDeviceTopicsRequest(await J.setTopicRequest(r),(async t=>{await st.setTopicTimestamp(),await o.setTopicList(t),st.indigitallSyncTopicEvent(G.TOPIC_SYNC_UNSUBSCRIBE_CALLBACK,t)}),(async t=>{st.indigitallSyncTopicEvent(G.TOPIC_SYNC_UNSUBSCRIBE_ERROR_CALLBACK,t)}));else{const t=Z.showError(c,c.ErrorCode.PUSH_TOPICS_ERROR,"there is no topic with one of the codes in the push topic list");st.indigitallSyncTopicEvent(G.TOPIC_SYNC_SUBSCRIBE_ERROR_CALLBACK,t),st.indigitallSyncTopicEvent(G.TOPIC_SYNC_UNSUBSCRIBE_ERROR_CALLBACK,t)}await o.setUpdateTopicSubscribe([])}static async updateTopicAction(t,e){const r=await o.getUpdateTopicSubscribe();if(r&&r.length>0){const n=new tt("[IND]TopicSyncUtils: ");try{const n=[],i=r.filter((e=>t.includes(e.code))),s=t.filter((t=>!Q.getAllCodes(r).includes(t)));if(s&&s.length>0)for(let t=0;t<s.length;t++)null!==s[t]&&n.push(new Q(s[t],e).toJSON());if(i&&i.length>0)for(let t=0;t<i.length;t++){const n=r.findIndex((e=>e.code===i[t].code)),o=new Q(i[t].code,e);r[n]=o.toJSON()}n.length>0&&await o.setUpdateTopicSubscribe(n.concat(r))}catch(t){n.e("updateTopicAction: "+t).writeLog()}}else{const r=[];for(let n=0;n<t.length;n++){const i=t[n];r.push({code:i,type:e})}await o.setUpdateTopicSubscribe(r)}}}const rt=et,{TopicSubscribeType:nt}=r(872).Core.Models,{CommonUtils:it}=r(872).Core.Utils;class ot{static async updateTopic(t,e,r,n){ot.checkTopicSemaphore().then((async()=>{await o.setTopicSemaphore(K.RED),await J.getTopicsList((async i=>{await this.setTopicCallbacks(t,r,n),await this.requestTopicBackground(G.TOPIC_SYNC_TAG),await rt.updateTopicAction(e,t)}),n)}))}static async checkTopicSemaphore(){if(await o.getTopicSemaphore()!=K.RED)return!0;this.topicSemaphoreWaitTime((()=>!0))}static async topicSemaphoreWaitTime(t){const e=setInterval((async function(){await o.getTopicSemaphore()==K.GREEN&&(clearInterval(e),t())}),1e3)}static async setTopicCallbacks(t,e,r){let n=G.TOPIC_SYNC_SUBSCRIBE_CALLBACK,i=G.TOPIC_SYNC_SUBSCRIBE_ERROR_CALLBACK;t===nt.UNSUBSCRIBE&&(n=G.TOPIC_SYNC_UNSUBSCRIBE_CALLBACK,i=G.TOPIC_SYNC_UNSUBSCRIBE_ERROR_CALLBACK);const o=new BroadcastChannel(n);o.onmessage=t=>{it.isFunction(e)&&e(t.data),o.close()};const s=new BroadcastChannel(i);s.onmessage=t=>{it.isFunction(r)&&r(t.data),s.close()}}static async requestTopicBackground(t){const e=await X.requestBackgroundSync();null!=e&&await e.sync.register(t)}static async isTopicTimestampExceed(){const t=await o.getTopicSyncTimestamp();return!(t&&t>Date.now())&&void 0!==t}static async setTopicTimestamp(){const t=Date.now()+G.TOPIC_SYNC_TIMESTAMP;await o.setTopicSyncTimestamp(t)}static indigitallSyncTopicEvent(t,e){new BroadcastChannel(t).postMessage(e)}static topicFilter(t,e){const r=[];if(t)for(let n=0;n<t.length;n++)t[n].type===e&&r.push(t[n].code);return r}static async filterTopicExistingOnIDB(){const t=await o.getUpdateTopicSubscribe(),e=await o.getTopicList(),r=[];for(let n=0;n<t.length;n++)for(let i=0;i<e.length;i++)t[n]&&e[i]&&t[n].code==e[i].code&&(!0===e[i].subscribed&&t[n].type==nt.UNSUBSCRIBE||!1===e[i].subscribed&&t[n].type==nt.SUBSCRIBE)&&r.push(t[n]);return r}}const st=ot,{EventType:at,DeviceStatus:ut}=r(872).Core.Models,{LogLevel:ct,Log:lt,CommonUtils:ft,ErrorUtils:ht,CryptoUtils:pt}=r(872).Core.Utils,dt="[IND]IndigitallPush: ";class yt{constructor(){this.config=null,this.interval=null}static async init(t){try{let r=new lt(dt);if(!t)return void r.w("config is not defined").writeLog();t.onPushPermissionChanged&&(t.requestPushPermission=t.onPushPermissionChanged),t.onLocationPermissionChanged&&(t.requestLocationPermission=t.onLocationPermissionChanged),this.config=t,this.config.logLevel?(o.setLogLevel(this.config.logLevel),r=new lt(dt)):this.config.setDebugLog&&(o.setLogLevel(ct.WARNING),r=new lt(dt));let n="https://device-api.indigitall.com/v1",i="https://inbox-api.indigitall.com/v1",s="https://device-api.indigitall.com/v2";this.config.urlDeviceApi&&(n=this.config.urlDeviceApi),this.config.urlInAppApi&&(s=this.config.urlInAppApi),this.config.urlInboxApi&&(i=this.config.urlInboxApi),await o.setUrlDeviceApi(n),e()&&e().setUrlInboxApi(i),ft.isFunction(this.config.requestPushPermission)&&(navigator.indigitallRequestPushPermission=this.config.requestPushPermission),ft.isFunction(this.config.requestLocationPermission)&&(navigator.indigitallRequestLocationPermission=this.config.requestLocationPermission),ft.isFunction(this.config.onNewUserRegistered)&&(navigator.indigitallOnNewUserRegistered=this.config.onNewUserRegistered),ft.isFunction(this.config.onInitialized)&&(navigator.indigitallOnInitialized=this.config.onInitialized),ft.isFunction(this.config.onError)&&(navigator.indigitallOnError=this.config.onError),ft.isFunction(this.config.onLocationUpdated)&&(navigator.indigitallOnLocationUpdated=this.config.onLocationUpdated);const a=await M.getPermissions();if(M.setPermissionsCallback(),a&&"denied"===a.push)return r.i("Push permission denied").writeLog(),ft.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError("Push permission denied"),!1;if(!ft.isServiceTimestampExceed())return this.device=new g,M.getPermissions().then((t=>{ft.isFunction(navigator.indigitallOnInitialized)&&navigator.indigitallOnInitialized(t,new g)})),r.d("Device enabled").writeLog(),!0;{let t="",n=null;if(!this.config||!this.config.appKey)return r.w("config.appKey is not defined").writeLog(),!1;if(t=this.config.appKey,this.config.requestLocation&&await o.setRequestLocation(this.config.requestLocation),this.config.workerPath&&(n=this.config.workerPath),t){if(await o.setAppKey(t),yt.isServiceWorkerSupported()||Y.isSafariPushNotificationSupported()){const t=new N;return R.getBrowser(t,(t=>{if(t.supported||this.isSafariBrowserDevice()){r.d("browser supported for webpush").writeLog();const t=new N;R.getApplicationAll(t,(async t=>{if(r.d("application ",t).writeLog(),t&&t.data&&t.data.configuration){const n=t.data.configuration;r.d("configuration ",n).writeLog(),n.vapidPublic&&o.setVAPID(n.vapidPublic),n.safariWebsitePushId&&o.setSafariWebsitePushId(n.safariWebsitePushId),n.enabled&&o.setEnabled(n.enabled),n.serviceSyncTime&&o.setServiceSyncTime(n.serviceSyncTime),n.locationEnabled&&o.setLocationEnabled(n.locationEnabled),n.locationUpdateMinutes&&o.setLocationUpdateMinutes(n.locationUpdateMinutes),n.inboxAuthMode&&e()&&e().setInboxAuthMode(n.inboxAuthMode),n.inAppEnabled&&(o.setInAppEnabled(n.inAppEnabled),await o.setUrlInappApi(s))}const i=new D;o.getDeviceId()&&o.getPushToken()?R.putDevice(i,(t=>{try{if(ft.isServiceTimestampExceed()){const t=new h;t.setAppKey(o.getAppKey()),t.setDeviceId(o.getDeviceId()),R.postEventVisit(t)}t.registeredByCookie?(o.setServiceTimestamp(Date.now()),M.getPermissions().then((t=>{const e=new g;e.deviceId&&r.i("deviceId:",e.deviceId).writeLog(),e.pushToken&&r.i("pushToken:",e.pushToken).writeLog(),this.config&&ft.isFunction(navigator.indigitallOnInitialized)&&navigator.indigitallOnInitialized(t,e)}))):yt.registerForPush(n)}catch(t){ft.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ht.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}),navigator.indigitallOnError):R.postDevice(i,(t=>{try{const e=new h;e.setAppKey(o.getAppKey()),e.setDeviceId(o.getDeviceId()),R.postEventVisit(e),t.registeredByCookie?o.setServiceTimestamp(Date.now()):yt.registerForPush(n)}catch(t){ft.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ht.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}),(t=>{404===t.errorCode&&o.clearStorage(),ft.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(t)}))}),navigator.indigitallOnError)}else r.w("Browser not Supported").writeLog()}),navigator.indigitallOnError),!0}r.w("ServiceWorker and SafariPushNotification not supported").writeLog()}else r.w("appKey is not found").writeLog()}}catch(t){ft.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ht.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}return!1}static deviceGet(t,e){return R.getDevice(new D,t,e),!0}static deviceEnable(t,e){const r=new D(ut.ENABLE);return r.isDeviceUpdated(!0),R.putDevice(r,t,e),!0}static deviceDisable(t,e){const r=new D(ut.DISABLE);return r.isDeviceUpdated(!0),R.putDevice(r,t,e),!0}static topicsList(t,e){return R.getDeviceTopics(new D,(async e=>{ft.isFunction(t)&&t(e)}),(t=>{ft.isFunction(e)&&e(t)})),!0}static topicsSubscribe(t,e,r){const n=new D;return n.setTopics(t),R.postDeviceTopics(n,(t=>{ft.isFunction(e)&&e(t)}),(t=>{ft.isFunction(r)&&r(t)})),!0}static topicsUnsubscribe(t,e,r){const n=new D;return n.setTopics(t),R.deleteDeviceTopics(n,(t=>{ft.isFunction(e)&&e(t)}),(t=>{ft.isFunction(r)&&r(t)})),!0}static async topicsSubscribeUpdate(t,e,r,n){st.updateTopic(t,e,r,n)}static registerForPush(t){o.setWorkerPath(t),Y.isSafariPushNotificationSupported()?Y.launchNotificationPermissionForSafari():yt.isServiceWorkerSupported()&&yt.launchNotificationPermission(t)}static isSafariPushNotificationSupported(){return Y.isSafariPushNotificationSupported()}static isSafariBrowserDevice(){return E.isSafariBrowserDevice()}static isServiceWorkerSupported(){return"serviceWorker"in navigator}static registerServiceWorker(t){const e=new lt(dt);let r="/service-worker.js";return t&&(r=t),navigator.serviceWorker.register(r).then((t=>(e.d("ServiceWorker registration successful with scope: "+t.scope).writeLog(),t))).catch((t=>(e.e("ServiceWorker registration failed: ",t).writeLog(),t)))}static launchNotificationPermission(t){const e=new lt(dt);this.registerServiceWorker(t).then((t=>{try{let r;t.installing?r=t.installing:t.waiting?r=t.waiting:t.active&&(r=t.active),r&&(e.d("sw current state "+r.state).writeLog(),"activated"==r.state?yt.subscribeForPushNotification(t):("installed"==r.state&&o.getPushToken()&&t.update(),r.addEventListener("statechange",(function(r){e.d("sw statechange : "+r.target.state).writeLog(),"activated"==r.target.state&&yt.subscribeForPushNotification(t)}))))}catch(t){ft.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ht.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}))}static async subscribeForPushNotification(t){const e=new lt(dt);try{const r=await new Promise(((r,n)=>{const i={userVisibleOnly:!0,applicationServerKey:p.urlBase64ToUint8Array(o.getVAPID())};return e.d("Registration: ",t).writeLog(),o.getPermissionPush()||p.callEventPermission(x.PERMISSION_TYPE_PUSH,at.EVENT_TYPE_ASK),r(t.pushManager.subscribe(i))}));e.d("Received PushSubscription: ",r).writeLog(),o.getPermissionPush()&&o.getPermissionPush()===at.EVENT_TYPE_ACCEPT||(p.callEventPermission(x.PERMISSION_TYPE_PUSH,at.EVENT_TYPE_ACCEPT),o.setPermissionPush(at.EVENT_TYPE_ACCEPT));const n=r.toJSON();o.setBrowserPublicKey(n.keys.p256dh),o.setBrowserPrivateKey(n.keys.auth),o.setPushToken(n.endpoint),R.putDevice(new D,(t=>{M.getPermissions().then((t=>{ft.isFunction(navigator.indigitallOnInitialized)&&navigator.indigitallOnInitialized(t,new g)})),ft.isFunction(navigator.indigitallOnNewUserRegistered)&&!o.getNewUserTimestamp()&&(o.setNewUserTimestamp(Date.now()),navigator.indigitallOnNewUserRegistered(t)),yt.registerLocation()}),navigator.indigitallOnError),o.setServiceTimestamp(Date.now())}catch(t){e.e("No Registration: "+t).writeLog(),o.getPermissionPush()&&o.getPermissionPush()===at.EVENT_TYPE_REJECT||(p.callEventPermission(x.PERMISSION_TYPE_PUSH,at.EVENT_TYPE_REJECT),o.setPermissionPush(at.EVENT_TYPE_REJECT)),ft.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(t)}}static async launchNotificationPermissionForSafari(){o.setSafariGestureRequestPermission(at.EVENT_TYPE_ASK),Y.launchNotificationPermissionForSafari()}static async checkRemotePermission(t){Y.checkRemotePermission(t)}static registerLocation(){const t=new lt(dt);try{navigator.geolocation&&o.getRequestLocation()&&o.getLocationEnabled()&&(!o.getLocationTimestamp()||o.getLocationUpdateMinutes()<=(Date.now()-o.getLocationTimestamp())/6e4)&&(o.getPermissionLocation()||p.callEventPermission(x.PERMISSION_TYPE_LOCATION,at.EVENT_TYPE_ASK),navigator.geolocation.getCurrentPosition((t=>{o.getPermissionLocation()||o.getPermissionLocation()==at.EVENT_TYPE_ACCEPT||(p.callEventPermission(x.PERMISSION_TYPE_LOCATION,at.EVENT_TYPE_ACCEPT),o.setPermissionLocation(at.EVENT_TYPE_ACCEPT));const e=new h;e.setLocation(t.coords.latitude,t.coords.longitude),R.postEventLocation(e),ft.isFunction(navigator.indigitallOnLocationUpdated)&&navigator.indigitallOnLocationUpdated(t),o.setLocationTimestamp(Date.now())}),(e=>{t.e("error "+e).writeLog(),o.getPermissionLocation()||o.getPermissionLocation()==at.EVENT_TYPE_REJECT||(p.callEventPermission(x.PERMISSION_TYPE_LOCATION,at.EVENT_TYPE_REJECT),o.setPermissionLocation(at.EVENT_TYPE_REJECT))})))}catch(t){ft.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ht.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}static requestPushPermission(t){M.getPushPermission().then((e=>{ft.isFunction(t)&&t(e)}))}static onPermissionChange(){M.setPermissionCallback()}static requestLocationPermission(t){M.getLocationPermission().then((e=>{ft.isFunction(t)&&t(e)}))}static logIn(t,e,r){yt.setExternalId(t,e,r)}static logout(t,e){yt.setExternalId(null,t,e)}static setExternalCode(t,e,r){yt.setExternalId(t,e,r)}static async setExternalId(t,e,r){try{const n=o.getAppKey();if(!n)return void(ft.isFunction(r)&&r(ht.showError(c,c.ErrorCode.API_APPKEY_NOT_VALID)));if(null!=t){const i=await pt.createHmac(n,t);i&&this.setExternalIdRequest(i,e,r)}else this.setExternalIdRequest(null,e,r)}catch(t){ft.isFunction(r)&&r(ht.showError(c,c.ErrorCode.PUSH_DEVICE_ERROR,t))}}static async setExternalIdRequest(t,e,r){const n=new D;o.setExternalId(t),await o.setExternalIdRequest(t),n.setExternalCode(t),n.isDeviceUpdated(!0),R.putDevice(n,(t=>{ft.isFunction(e)&&e(new g(t))}),r)}static sendCustomEvent(t,e,r){try{let n="",i={},s=!0;"string"==typeof t?n=t:"object"==typeof t&&(n=t.eventType,t.customData&&(i=t.customData),!1===t.async&&(s=t.async));const a=new h;a.setDeviceId(o.getDeviceId()),a.setEventType(n),a.setCustomData(i),null!=o.getExternalId()&&"null"!=o.getExternalId()?(a.setExternalCode(o.getExternalId()),a.setJourneyRequest(!0),!1===s?R.postEventJourneySync(a,e,r):R.postEventJourney(a,e,r)):!1===s?R.postEventCustomSync(a,e,r):R.postEventCustom(a,e,r)}catch(t){ft.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ht.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}static sendJourneyEvent(t,e,r){try{let n="",i={},s=!0;"string"==typeof t?n=t:"object"==typeof t&&(n=t.eventType,t.customData&&(i=t.customData),!1===t.async&&(s=t.async));const a=new h;a.setDeviceId(o.getDeviceId()),a.setExternalCodeRequest(),a.setEventType(n),a.setCustomData(i),a.setJourneyRequest(!0),!1===s?R.postEventJourneySync(a,e,r):R.postEventJourney(a,e,r)}catch(t){ft.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ht.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}}const Et=yt;window.indigitall||(window.indigitall={}),window.indigitall.Push=yt,window.indigitall.LogLevel=ct,window.indigitall.version=o.getVersion()})(),n})(),t.exports=e()},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.3.2","_id":"indigitall-web-core@4.3.2","_inBundle":false,"_integrity":"sha512-Wiu3fLRtjtl8Cu5KiQDe/u7E797Doy/3z6ZJwsqdMW4T1ylj221Iupb5IlUV9jaWwInXXx8koVjbtSUrqrY3xA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.3.2","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.3.2","saveSpec":null,"fetchSpec":"4.3.2"},"_requiredBy":["#USER","/","/indigitall-web-notification"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.3.2.tgz","_shasum":"084179d7a58990141ea7bbbbbcbd7566acafa6ae","_spec":"indigitall-web-core@4.3.2","_where":"/home/circleci/webpush/sdk","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.3.2"}')},147:t=>{"use strict";t.exports=JSON.parse('{"name":"indigitall-web-sdk","description":"indigitall webpush SDK","version":"4.3.2","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","dependencies":{"indigitall-web-core":"^4.3.2","indigitall-web-customer":"^4.3.2","indigitall-web-inapp":"^4.3.2","indigitall-web-inbox":"^4.3.2","indigitall-web-notification":"^4.3.2"},"devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","build-sdk":"npm run build-install-core && npm run build-install-inapp && npm run build","build-install-core":"npm uninstall indigitall-web-core && npm install ../core","build-install-inapp":"npm uninstall indigitall-web-inapp && npm install ../inapp","build-install-customer":"npm uninstall indigitall-web-customer && npm install ../customer","build-install-inbox":"npm uninstall indigitall-web-inbox && npm install ../inbox","build-install-push":"npm uninstall indigitall-web-notification && npm install ../push","install-sdk":"npm install && npm run build","release-install-core":"npm uninstall indigitall-web-core && npm install indigitall-web-core@$npm_package_version","release-install-inapp":"npm uninstall indigitall-web-inapp && npm install indigitall-web-inapp@$npm_package_version ","release-install-customer":"npm uninstall indigitall-web-customer && npm install indigitall-web-customer@$npm_package_version ","release-install-inbox":"npm uninstall indigitall-web-inbox && npm install indigitall-web-inbox@$npm_package_version ","release-install-push":"npm uninstall indigitall-web-notification && npm install indigitall-web-notification@$npm_package_version && npm run release-install-core && npm run release-install-inapp && npm run release-install-inbox && npm run release-install-customer && npm run install-sdk && npm run delete-node-modules","simulate-release-install-sdk":"npm run install-sdk && npm run delete-node-modules","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.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";r.r(n);var t=r(396),e=r.n(t),i=r(277),o=r.n(i),s=r(413),a=r.n(s),u=r(735),c=r.n(u);const{Log:l,LogLevel:f,CommonUtils:h,ErrorUtils:p}=r(872).Core.Utils,{Repository:d}=r(872).Core,y=r(147),{Channel:E}=r(872).Core.Models,v="[IND]Indigitall: ";class g{constructor(){this.config=null}static async init(t){return c().init(t)}static deviceGet(t,e){return c().devideGet(t,e)}static deviceEnable(t,e){return c().deviceEnable(t,e)}static deviceDisable(t,e){return c().deviceDisable(t,e)}static topicsList(t,e){return c().topicsList((e=>{this.inAppTopicList(e,t,(r=>{new l(v).w(r.message).writeLog(),h.isFunction(t)&&t(e)}))}),(r=>{new l(v).w(r).writeLog(),this.inAppTopicList(null,t,e)}))}static async inAppTopicList(t,r,n){(new d).isInAppEnabled()?e().topicsList((async e=>{null!=t?(await(new d).setTopicList(t),await(new d).setInAppTopicList(e),h.isFunction(r)&&r(e.concat(t))):(await(new d).setInAppTopicList(e),h.isFunction(r)&&r(e))}),(async e=>{null!=t?(await(new d).setTopicList(t),h.isFunction(r)&&r(t)):h.isFunction(n)&&n(e)})):null!=t?(await(new d).setTopicList(t),h.isFunction(r)&&r(t)):h.isFunction(n)&&n(p.showError(null,null,"Internal error bad topic list"))}static topicsSubscribe(t,r,n){(new d).isInAppEnabled()?e().topicsSubscribe(t,(e=>{this.pushTopicsSubscribe(t,e,r,n)}),(async e=>{new l(v).w(e).writeLog(),this.pushTopicsSubscribe(t,null,r,n)})):this.pushTopicsSubscribe(t,null,r,n)}static pushTopicsSubscribe(t,e,r,n){c().topicsSubscribe(t,(async t=>{this.topicActionOnSuccess(e,t,r)}),(async t=>{this.topicActionOnError(e,t,r,n)}))}static async topicsUnsubscribe(t,r,n){(new d).isInAppEnabled()?e().topicsUnsubscribe(t,(e=>{this.pushTopicsUnsubscribe(t,e,r,n)}),(async e=>{new l(v).w(e).writeLog(),this.pushTopicsUnsubscribe(t,null,r,n)})):this.pushTopicsUnsubscribe(t,null,r,n)}static pushTopicsUnsubscribe(t,e,r,n){c().topicsUnsubscribe(t,(async t=>{this.topicActionOnSuccess(e,t,r)}),(async t=>{this.topicActionOnError(e,t,r,n)}))}static async topicActionOnSuccess(t,e,r){let n=[];null!=t&&(n=t,await(new d).setInAppTopicList(t)),null!=e&&await(new d).setTopicList(e),h.isFunction(r)&&r(n.concat(e))}static async topicActionOnError(t,e,r,n){new l(v).w(`${e.errorCode}: ${e.exceptionMessage}`).writeLog(),null!=t?(await(new d).setInAppTopicList(t),h.isFunction(r)&&r(t)):h.isFunction(n)&&n(e)}static async setExternalId(t,e,r){c().setExternalId(t,e,r)}static logIn(t,e,r){g.setExternalId(t,e,r)}static logout(t,e){g.setExternalId(null,t,e)}static sendCustomEvent(t,e,r){c().sendCustomEvent(t,e,r)}static sendJourneyEvent(t,e,r){c().sendJourneyEvent(t,e,r)}static isServiceWorkerSupported(){return c().isServiceWorkerSupported()}static isSafariPushNotificationSupported(){return c().isSafariPushNotificationSupported()}static isSafariPermissionAsked(){return c().isSafariPermissionAsked()}static isSafariBrowserDevice(){return c().isSafariBrowserDevice()}static launchNotificationPermissionForSafari(){c().launchNotificationPermissionForSafari()}static async showInApp(t,r,n,i){e().showInApp(t,r,n,i)}static async showInAppWithConfig(t,r,n,i,o,s,a,u,c,l,f){e().showInAppWithConfig(t,r,n,i,o,s,a,u,c,l,f)}static showMultipleInApp(t,r,n,i){e().showMultipleInApp(t,r,n,i)}static async showMultipleInAppWithConfig(t,r,n,i,o,s,a,u,c,l,f){e().showMultipleInAppWithConfig(t,r,n,i,o,s,a,u,c,l,f)}static getInboxMessagesCount(t,e,r){o().getMessagesCountWithAuth(t,e,r)}static getInbox(t,e,r){o().getInboxWithAuth(t,e,r)}static getInboxWithPage(t,e,r,n,i,s,a,u){o().getInboxWithPage(t,e,r,n,i,s,a,u)}static getCustomer(t,e){a().getCustomer(t,e)}static getCustomerInformation(t,e){this.getCustomerInformationWithFields(null,t,e)}static getCustomerInformationWithFields(t,e,r){a().getCustomerInformation(t,e,r)}static assignOrUpdateValueToCustomerFields(t,e,r){a().assignOrUpdateValueToCustomerFields(t,e,r)}static deleteValuesFromCustomerFields(t,e,r){a().deleteValuesFromCustomerFields(t,e,r)}static link(t,e,r,n){g.logIn(t,(t=>{a().link(e,r,n)}),(t=>{h.isFunction(n)&&n(t)}))}static unlink(t,e,r){g.logout((n=>{a().unlink(t,e,r)}),(t=>{h.isFunction(r)&&r(t)}))}}window.indigitall=g,window.indigitall.InApp=e(),window.indigitall.Inbox=o(),window.indigitall.Customer=a(),window.indigitall.Push=c(),window.indigitall.InApp.Utils=e().Utils,window.indigitall.Channel=E,window.indigitall.LogLevel=f,window.indigitall.version=y.version})(),n})()));
|
|
2
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(this,(()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.3.3","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>B});var t={};r.r(t),r.d(t,{BaseClient:()=>b,BaseRequest:()=>_});var e={};r.r(e),r.d(e,{Channel:()=>S,Device:()=>O,DeviceStatus:()=>P,ErrorDictionary:()=>I,ErrorModel:()=>v,EventType:()=>w,TopicSubscribeType:()=>R});var i={};r.r(i),r.d(i,{CommonUtils:()=>T,CorePermissions:()=>A,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>x,Log:()=>g,LogLevel:()=>d,TopicUtils:()=>M,Validations:()=>k});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,p=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t),l&&l.IDB&&await l.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}async getAppKeySync(){if(l&&l.IDB)return await l.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}},d=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=d;class E{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new p).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const g=E,v=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new v(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new v(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},b=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new g("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(y.DEBUG);let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\n").writeLog(),new v(n.statusCode,n.message))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},_=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new p).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},S=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),O=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new p).getBrowserPublicKey(),this.browserPrivateKey=(new p).getBrowserPrivateKey(),this.platform=(new p).getPlatform(),this.version=(new p).getVersion(),this.browserName=(new p).getBrowserName(),this.browserVersion=(new p).getBrowserVersion(),this.osName=(new p).getOsName(),this.osVersion=(new p).getOsVersion(),this.deviceType=(new p).getDeviceType(),(new p).getEnabled()&&(this.enabled="true"===(new p).getEnabled()),(new p).getExternalId()&&(this.externalCode=(new p).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new p).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new p).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},P=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),T=class{static isServiceTimestampExceed(){return!(new p).getServiceTimestamp()||(new p).getServiceSyncTime()<=(Date.now()-(new p).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},A=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new g("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},N=new g("[IND]Crypto"),L=new TextEncoder("utf-8"),C="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",L.encode(t),{name:C,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(C,n,L.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return N.d("hmac: ",s).writeLog(),s}catch(t){return void N.e("error:",t).writeLog()}}},x=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},k=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},B={Repository:p,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(545)),i=u(r(358)),o=u(r(568)),s=u(r(801)),a=u(r(136));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var u=p(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==c(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,u,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function f(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){f(o,n,i,s,a,"next",t)}function a(t){f(o,n,i,s,a,"throw",t)}s(void 0)}))}}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,o=void 0,o=function(t,e){if("object"!==c(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===c(o)?o:String(o)),n)}var i,o}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,u,c,f,d,y,E,g;return e=t,r=[{key:"getURL",value:(g=h(l().mark((function t(){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return g.apply(this,arguments)})},{key:"call",value:(E=h(l().mark((function t(e,r,u,c){var f,h,p,d,y;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return f=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&f.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),h=t.t2+t.t3,u.isJourneyRequest()&&(h=h.replace("v1","v2")),p={method:e,headers:u.addHeaders()},e!==this.GET&&(p.body=JSON.stringify(u.getBody())),c&&(p.credentials=c),t.prev=13,t.next=16,fetch(h,p);case 16:return d=t.sent,t.next=19,d.json();case 19:if(y=t.sent,!d.ok){t.next=23;break}return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\nResponse Body:",JSON.stringify(y.data,null,"\t")).writeLog(),t.abrupt("return",y);case 23:return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\n").writeLog(),t.abrupt("return",new i.default(y.statusCode,y.message));case 27:return t.prev=27,t.t4=t.catch(13),f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 31:case"end":return t.stop()}}),t,this,[[13,27]])}))),function(t,e,r,n){return E.apply(this,arguments)})},{key:"get",value:(y=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return y.apply(this,arguments)})},{key:"post",value:(d=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return d.apply(this,arguments)})},{key:"put",value:(f=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return f.apply(this,arguments)})},{key:"delete",value:(c=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return c.apply(this,arguments)})}],r&&p(e.prototype,r),u&&p(e,u),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,s=void 0,s=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(s)?s:String(s)),n)}var i,s}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r,n;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version,n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}});e.default=n},106:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.default=r},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,s=void 0,s=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(s)?s:String(s)),n)}var i,s}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r,n;return e=t,(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410};var n={ErrorCode:r,ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}};e.default=n},358:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}function i(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=o},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},90:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(901),i=l(r(354)),o=l(r(202)),s=l(r(801)),a=l(r(358)),u=l(r(22)),c=l(r(90));function l(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(){n=function(){return e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l,f;return e=t,r=[{key:"getDB",value:(f=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return f.apply(this,arguments)})},{key:"get",value:(l=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return l.apply(this,arguments)})},{key:"put",value:(c=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return c.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(u=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return u.apply(this,arguments)})},{key:"getItem",value:(a=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return a.apply(this,arguments)})}],r&&s(e.prototype,r),i&&s(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},795:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r,o;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),o&&n(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(){c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var c=p(t[i],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,o=void 0,o=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===u(o)?o:String(o)),n)}var i,o}var p=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}var e,r,a,u,l,p,d,y,E,g,v,m,I,b,_,S,O;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(O=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return O.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"getAppKeySync",value:(S=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return S.apply(this,arguments)})},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){var t=i.default.getItem(this.SERVICE_SYNC_TIME);return t||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){var t=i.default.getItem(this.LOCATION_UPDATE_MINUTES);return t||30}},{key:"setRequestLocation",value:(_=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return _.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(b=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getExternalIdRequest",value:(g=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return g.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getRegisteredByCookie",value:(E=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return E.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(y=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}},{key:"setInAppTopicList",value:(d=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"getInAppTopicList",value:(p=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return p.apply(this,arguments)})},{key:"setTopicList",value:(l=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getTopicList",value:(u=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return u.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}}],r&&h(e.prototype,r),a&&h(e,a),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=p},636:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r,o;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),o&&n(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,s=void 0,s=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(s)?s:String(s)),n)}var i,s}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,n=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],(r=null)&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,s=void 0,s=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(s)?s:String(s)),n)}var i,s}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l,f;return e=t,r=null,n=[{key:"getPermissions",value:(f=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"getPermission",value:(l=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return l.apply(this,arguments)})},{key:"setPermissionsCallback",value:(a=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"setCallback",value:(o=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return o.apply(this,arguments)})}],r&&c(e.prototype,r),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(o,s,a,u){var c=p(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(i(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=n.key,s=void 0,s=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===i(s)?s:String(s)),n)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=e.CryptoUtils=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i,f;return e=t,r=null,n=[{key:"createHmac",value:(i=o().mark((function t(e,r){var n,i,s,a,f,h;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i=null===(n=window)||void 0===n||null===(n=n.crypto)||void 0===n?void 0:n.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,i.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return s=t.sent,t.next=9,i.sign(l,s,c.encode(r));case 9:return a=t.sent,f=new Uint8Array(a),h=Array.prototype.map.call(f,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",h).writeLog(),t.abrupt("return",h);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),f=function(){var t=this,e=arguments;return new Promise((function(r,n){var o=i.apply(t,e);function a(t){s(o,r,n,a,u,"next",t)}function u(t){s(o,r,n,a,u,"throw",t)}a(void 0)}))},function(t,e){return f.apply(this,arguments)})}],r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=f},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,s=void 0,s=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(s)?s:String(s)),n)}var i,s}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},970:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,i,o;return e=t,o=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],(i=null)&&n(e.prototype,i),o&&n(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,o=void 0,o=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===s(o)?o:String(o)),n)}var i,o}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},492:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,i;return e=t,i=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],(r=null)&&n(e.prototype,r),i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},506:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,i;return e=t,i=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],(r=null)&&n(e.prototype,r),i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"TopicUtils",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=h(r(306)),i=h(r(897)),o=h(r(95)),s=h(r(568)),a=h(r(970)),u=h(r(545)),c=r(136),l=h(r(506)),f=h(r(492));function h(t){return t&&t.__esModule?t:{default:t}}},117:function(t){var e;e=()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.3.3","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>B});var t={};r.r(t),r.d(t,{BaseClient:()=>b,BaseRequest:()=>_});var e={};r.r(e),r.d(e,{Channel:()=>S,Device:()=>O,DeviceStatus:()=>P,ErrorDictionary:()=>I,ErrorModel:()=>v,EventType:()=>w,TopicSubscribeType:()=>R});var i={};r.r(i),r.d(i,{CommonUtils:()=>T,CorePermissions:()=>A,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>x,Log:()=>g,LogLevel:()=>d,TopicUtils:()=>M,Validations:()=>k});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,p=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t),l&&l.IDB&&await l.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}async getAppKeySync(){if(l&&l.IDB)return await l.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}},d=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=d;class E{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new p).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const g=E,v=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new v(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new v(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},b=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new g("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(y.DEBUG);let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\n").writeLog(),new v(n.statusCode,n.message))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},_=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new p).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},S=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),O=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new p).getBrowserPublicKey(),this.browserPrivateKey=(new p).getBrowserPrivateKey(),this.platform=(new p).getPlatform(),this.version=(new p).getVersion(),this.browserName=(new p).getBrowserName(),this.browserVersion=(new p).getBrowserVersion(),this.osName=(new p).getOsName(),this.osVersion=(new p).getOsVersion(),this.deviceType=(new p).getDeviceType(),(new p).getEnabled()&&(this.enabled="true"===(new p).getEnabled()),(new p).getExternalId()&&(this.externalCode=(new p).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new p).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new p).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},P=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),T=class{static isServiceTimestampExceed(){return!(new p).getServiceTimestamp()||(new p).getServiceSyncTime()<=(Date.now()-(new p).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},A=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new g("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},N=new g("[IND]Crypto"),L=new TextEncoder("utf-8"),C="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",L.encode(t),{name:C,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(C,n,L.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return N.d("hmac: ",s).writeLog(),s}catch(t){return void N.e("error:",t).writeLog()}}},x=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},k=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},B={Repository:p,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(545)),i=u(r(358)),o=u(r(568)),s=u(r(801)),a=u(r(136));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var u=p(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==c(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,u,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function f(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){f(o,n,i,s,a,"next",t)}function a(t){f(o,n,i,s,a,"throw",t)}s(void 0)}))}}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==c(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===c(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,u,c,f,d,y,E;return e=t,r=[{key:"getURL",value:(E=h(l().mark((function t(){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return E.apply(this,arguments)})},{key:"call",value:(y=h(l().mark((function t(e,r,u,c){var f,h,p,d,y;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return f=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&f.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),h=t.t2+t.t3,u.isJourneyRequest()&&(h=h.replace("v1","v2")),p={method:e,headers:u.addHeaders()},e!==this.GET&&(p.body=JSON.stringify(u.getBody())),c&&(p.credentials=c),t.prev=13,t.next=16,fetch(h,p);case 16:return d=t.sent,t.next=19,d.json();case 19:if(y=t.sent,!d.ok){t.next=23;break}return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\nResponse Body:",JSON.stringify(y.data,null,"\t")).writeLog(),t.abrupt("return",y);case 23:return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\n").writeLog(),t.abrupt("return",new i.default(y.statusCode,y.message));case 27:return t.prev=27,t.t4=t.catch(13),f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 31:case"end":return t.stop()}}),t,this,[[13,27]])}))),function(t,e,r,n){return y.apply(this,arguments)})},{key:"get",value:(d=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(f=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return f.apply(this,arguments)})},{key:"put",value:(c=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return c.apply(this,arguments)})},{key:"delete",value:(u=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return u.apply(this,arguments)})}],r&&p(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version,n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}}),e.default=n},106:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.default=r},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r;return e=t,(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}};e.default=r},358:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=i},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},90:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(901),i=l(r(354)),o=l(r(202)),s=l(r(801)),a=l(r(358)),u=l(r(22)),c=l(r(90));function l(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(){n=function(){return e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l;return e=t,r=[{key:"getDB",value:(l=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"get",value:(c=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return c.apply(this,arguments)})},{key:"put",value:(u=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(a=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return a.apply(this,arguments)})},{key:"getItem",value:(i=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})}],r&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},795:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(){c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var c=p(t[i],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var p=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}var e,r,a,u,l,p,d,y,E,g,v,m,I,b,_,S;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(S=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return S.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"getAppKeySync",value:(_=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return _.apply(this,arguments)})},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){return i.default.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){return i.default.getItem(this.LOCATION_UPDATE_MINUTES)||30}},{key:"setRequestLocation",value:(b=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getExternalIdRequest",value:(E=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return E.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getRegisteredByCookie",value:(y=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(d=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}},{key:"setInAppTopicList",value:(p=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getInAppTopicList",value:(l=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return l.apply(this,arguments)})},{key:"setTopicList",value:(u=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"getTopicList",value:(a=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return a.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=p},636:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l;return e=t,r=[{key:"getPermissions",value:(l=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getPermission",value:(a=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return a.apply(this,arguments)})},{key:"setPermissionsCallback",value:(o=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setCallback",value:(n=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(o,s,a,u){var c=p(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(i(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=e.CryptoUtils=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i;return e=t,r=[{key:"createHmac",value:(n=o().mark((function t(e,r){var n,i,s,a,f,h;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i=null===(n=window)||void 0===n||null===(n=n.crypto)||void 0===n?void 0:n.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,i.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return s=t.sent,t.next=9,i.sign(l,s,c.encode(r));case 9:return a=t.sent,f=new Uint8Array(a),h=Array.prototype.map.call(f,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",h).writeLog(),t.abrupt("return",h);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}],r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=f},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},970:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,i;return e=t,i=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},492:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},506:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"TopicUtils",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=h(r(306)),i=h(r(897)),o=h(r(95)),s=h(r(568)),a=h(r(970)),u=h(r(545)),c=r(136),l=h(r(506)),f=h(r(492));function h(t){return t&&t.__esModule?t:{default:t}}},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.3.3","_id":"indigitall-web-core@4.3.3","_inBundle":false,"_integrity":"sha512-DKC3qMLRDxUkyleQlaq4aoDnKKSoyY0wg2IfRosrqpGl1kjP8x8uh8997QnvITgeN+ZpLL9xyW6no/uxOlizRw==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.3.3","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.3.3","saveSpec":null,"fetchSpec":"4.3.3"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.3.3.tgz","_shasum":"db9d055f40fd2e1ac53208d6fec0f0784b88f8fb","_spec":"indigitall-web-core@4.3.3","_where":"/home/circleci/webpush/customer","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.3.3"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.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";r.r(n),r.d(n,{default:()=>O});const{Repository:t}=r(872).Core,e=new class extends t{constructor(){super(),this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID"}async setDeviceId(t){this.setStorage(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}},{Validations:i,Log:o}=r(872).Core.Utils,s=class extends i{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new o("[IND]CustomerValidations: "),r=e.getDeviceId();let n=!0;return this.isAppKeyFormat()||(n=!1,t.w("appKey is null or empty").writeLog()),this.isValidFormat(r)||(n=!1,t.w("deviceId is null or empty").writeLog()),n}},a=class{constructor(t){t.id&&(this.id=t.id),t.customerId&&(this.customerId=t.customerId),t.applicationId&&(this.applicationId=t.applicationId),t.createdAt&&(this.createdAt=t.createdAt),t.updatedAt&&(this.updatedAt=t.updatedAt)}getCustomerId(){return this.customerId}getApplicationId(){return this.applicationId}getId(){return this.id}getCreatedAt(){return this.createdAt}getUpdatedAt(){return this.updatedAt}toJSON(){return{id:this.id,customerId:this.customerId,applicationId:this.applicationId,createdAt:this.createdAt,updatedAt:this.updatedAt}}},u=class{constructor(t,e){this.customerFieldKey=t,this.customerFieldValue=e}getCustomerFieldKey(){return this.customerFieldKey}getCustomerFieldValue(){return this.customerFieldValue}toJSON(){return JSON.parse(`"${this.customerFieldKey}":"${this.customerFieldValue}"`)}},{ErrorDictionary:c}=r(872).Core.Models,l=c.ErrorCode;Object.assign(l,{CUSTOMER_GET_ERROR:4001,CUSTOMER_PARAMS_ERROR:4011,CUSTOMER_GENERAL_ERROR:4600,CUSTOMER_NO_EXTERNAL_CODE:4601});const f=c.ErrorMessage;Object.assign(f,{CUSTOMER_GET_ERROR:"customer get error",CUSTOMER_PARAMS_ERROR:"Params are not correct",CUSTOMER_GENERAL_ERROR:"general error",CUSTOMER_NO_EXTERNAL_CODE:"no external code registered"});const h={ErrorCode:l,ErrorMessage:f},{Config:p}=r(872).Core,{BaseClient:d}=r(872).Core.Api,{ErrorModel:y}=r(872).Core.Models,{CommonUtils:E,ErrorUtils:g}=r(872).Core.Utils,v=new class extends d{constructor(){super(),this.URL_BASE=p.client.CUSTOMER_URL_BASE,this.ENDPOINT_CUSTOMER="/customer",this.ENDPOINT_CUSTOMER_FIELD=this.ENDPOINT_CUSTOMER+"/field",this.ENDPOINT_CUSTOMER_LINK=this.ENDPOINT_CUSTOMER+"/link",this.ENDPOINT_EVENT="/event",this.ENDPOINT_EVENT_JOURNEY=this.ENDPOINT_EVENT+"/custom",this.ENDPOINT_EVENT_JOURNEY_BEACON=this.ENDPOINT_EVENT_JOURNEY+"/beacon"}async getCustomer(t,r,n){if(s.isAppKeyFormat()&&s.isValidFormat(e.getExternalId)){const e=await this.get(this.ENDPOINT_CUSTOMER,t.getCustomerRequest());e&&!(e instanceof y)&&e.statusCode>=200&&e.statusCode<300?E.isFunction(r)&&r(new a(e.data)):e?E.isFunction(n)&&n(e):E.isFunction(n)&&n()}else E.isFunction(n)&&n(g.showError(h,h.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async getCustomerField(t,r,n){if(s.isAppKeyFormat()&&s.isValidFormat(e.getExternalId)){const e=await this.get(this.ENDPOINT_CUSTOMER_FIELD,t.getCustomerFieldRequest()),i=[];for(const t in e.data)e.data.hasOwnProperty(t)&&i.push(new u(t,e.data[t]));e&&i.length>0&&!(e instanceof y)&&e.statusCode>=200&&e.statusCode<300?E.isFunction(r)&&r(i):e?E.isFunction(n)&&n(e):E.isFunction(n)&&n()}else E.isFunction(n)&&n(g.showError(h,h.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async putCustomerField(t,r,n){if(s.isAppKeyFormat()&&s.isValidFormat(e.getExternalId)){const e=await this.put(this.ENDPOINT_CUSTOMER_FIELD,t.putCustomerFieldRequest());this.getCustomerResponse(e,r,n)}else E.isFunction(n)&&n(g.showError(h,h.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async deleteCustomerField(t,r,n){if(s.isAppKeyFormat()&&s.isValidFormat(e.getExternalId)){const e=await this.delete(this.ENDPOINT_CUSTOMER_FIELD,t.deleteCustomerFieldRequest());this.getCustomerResponse(e,r,n)}else E.isFunction(n)&&n(g.showError(h,h.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async postCustomerLink(t,r,n){if(s.isValidFormatRequest()&&s.isValidFormat(e.getExternalId)){const e=await this.post(this.ENDPOINT_CUSTOMER_LINK,t.postAndDeleteCustomerLinkRequest());this.getCustomerResponse(e,r,n)}else E.isFunction(n)&&n(g.showError(h,h.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async deleteCustomerLink(t,r,n){if(s.isValidFormatRequest()&&s.isValidFormat(e.getExternalId)){const e=await this.delete(this.ENDPOINT_CUSTOMER_LINK,t.postAndDeleteCustomerLinkRequest());this.getCustomerResponse(e,r,n)}else E.isFunction(n)&&n(g.showError(h,h.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async getCustomerResponse(t,e,r){t&&!(t instanceof y)&&t.statusCode>=200&&t.statusCode<300?E.isFunction(e)&&(""!=t.data?e(t.data):e()):t?E.isFunction(r)&&r(t):E.isFunction(r)&&r()}},{BaseRequest:m}=r(872).Core.Api,{Device:I}=r(872).Core.Models,b=class extends m{constructor(){super(),this.device=new I,null!=e.getExternalId()&&(this.customerId=e.getExternalId()),this.fieldNames,this.link,this.fields}getCustomerRequest(){return this.params=this.createQueryStringCustomerId(),this}getCustomerFieldRequest(){return this.params=this.createQueryString(),this}putCustomerFieldRequest(){return this.params=this.createQueryStringCustomerId(),this.body=this.createBodyJson(),this}deleteCustomerFieldRequest(){return this.params=this.createQueryStringCustomerId(),this.body=this.createDeleteBodyJson(),this}postAndDeleteCustomerLinkRequest(){return this.params="",this.body=this.createBodyJson(),this}createQueryString(){let t="";return t+=this.createQueryStringCustomerId(),this.fieldNames&&(t+=`&${this.PARAM_CUSTOMER_FIELD_NAMES}=${this.fieldNames}`),this.fields&&(t+=`&${this.PARAM_CUSTOMER_FIELDS}=${this.fields}`),this.link&&(t+=`&${this.PARAM_CUSTOMER_LINK}=${this.link}`),t}createQueryStringCustomerId(){return this.PARAM_CUSTOMER_ID+"="+this.customerId}createBodyJson(){let t={};try{this.channel&&(t.channel=this.channel,this.device&&(t.deviceId=this.device.deviceId),this.customerId&&(t.customerId=this.customerId)),this.link&&(t.link=this.link),this.fields&&(t=this.fields)}catch(t){console.log("Error fieldNames request :"+t)}return t}createDeleteBodyJson(){const t={},e=[];try{if(this.fieldNames){for(let t=0;t<this.fieldNames.length;t++)e.push(this.fieldNames[t]);t.fields=e}}catch(t){console.log("Error fieldNames request :"+t)}return t}setFields(t){this.fields=t}setFieldNames(t){this.fieldNames=t}setLink(t){this.link=t}setChannel(t){this.channel=t}},{CommonUtils:_,ErrorUtils:S}=r(872).Core.Utils,O=class{static async getCustomer(t,e){const r=new b;await v.getCustomer(r,t,e)}static async getCustomerInformation(t,e,r){const n=new b;null!=t&&(Array.isArray(t)?n.setFieldNames(t):_.isFunction(r)&&r(S.customerError(4011,S.CUSTOMER_ERROR_PARAMS))),await v.getCustomerField(n,e,r)}static async assignOrUpdateValueToCustomerFields(t,e,r){let n;try{"string"==typeof t?n=JSON.parse(n):"object"==typeof t&&(n=t)}catch(t){_.isFunction(r)&&r(S.customerError(4011,S.CUSTOMER_ERROR_PARAMS))}if(n){const t=new b;t.setFields(n),await v.putCustomerField(t,e,r)}else _.isFunction(r)&&r(S.customerError(4900,S.CUSTOMER_ERROR_PARAMS))}static async deleteValuesFromCustomerFields(t,e,r){if(Array.isArray(t)){const n=new b;n.setFieldNames(t),await v.deleteCustomerField(n,e,r)}else _.isFunction(r)&&r(S.customerError(4011,S.CUSTOMER_ERROR_PARAMS))}static async link(t,e,r){const n=new b;n.setChannel(t),await v.postCustomerLink(n,e,r)}static async unlink(t,e,r){const n=new b;n.setChannel(t),await v.deleteCustomerLink(n,e,r)}}})(),n})(),t.exports=e()},413:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}return i.default=t,r&&r.set(t,i),i}(r(117));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}))},899:function(t){var e;e=()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.3.3","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>B});var t={};r.r(t),r.d(t,{BaseClient:()=>b,BaseRequest:()=>_});var e={};r.r(e),r.d(e,{Channel:()=>S,Device:()=>O,DeviceStatus:()=>P,ErrorDictionary:()=>I,ErrorModel:()=>v,EventType:()=>w,TopicSubscribeType:()=>R});var i={};r.r(i),r.d(i,{CommonUtils:()=>T,CorePermissions:()=>A,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>x,Log:()=>g,LogLevel:()=>d,TopicUtils:()=>M,Validations:()=>k});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,p=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t),l&&l.IDB&&await l.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}async getAppKeySync(){if(l&&l.IDB)return await l.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}},d=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=d;class E{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new p).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const g=E,v=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new v(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new v(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},b=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new g("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(y.DEBUG);let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\n").writeLog(),new v(n.statusCode,n.message))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},_=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new p).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},S=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),O=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new p).getBrowserPublicKey(),this.browserPrivateKey=(new p).getBrowserPrivateKey(),this.platform=(new p).getPlatform(),this.version=(new p).getVersion(),this.browserName=(new p).getBrowserName(),this.browserVersion=(new p).getBrowserVersion(),this.osName=(new p).getOsName(),this.osVersion=(new p).getOsVersion(),this.deviceType=(new p).getDeviceType(),(new p).getEnabled()&&(this.enabled="true"===(new p).getEnabled()),(new p).getExternalId()&&(this.externalCode=(new p).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new p).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new p).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},P=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),T=class{static isServiceTimestampExceed(){return!(new p).getServiceTimestamp()||(new p).getServiceSyncTime()<=(Date.now()-(new p).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},A=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new g("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},N=new g("[IND]Crypto"),L=new TextEncoder("utf-8"),C="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",L.encode(t),{name:C,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(C,n,L.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return N.d("hmac: ",s).writeLog(),s}catch(t){return void N.e("error:",t).writeLog()}}},x=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},k=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},B={Repository:p,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(545)),i=u(r(358)),o=u(r(568)),s=u(r(801)),a=u(r(136));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var u=p(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==c(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,u,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function f(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){f(o,n,i,s,a,"next",t)}function a(t){f(o,n,i,s,a,"throw",t)}s(void 0)}))}}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==c(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===c(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,u,c,f,d,y,E;return e=t,r=[{key:"getURL",value:(E=h(l().mark((function t(){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return E.apply(this,arguments)})},{key:"call",value:(y=h(l().mark((function t(e,r,u,c){var f,h,p,d,y;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return f=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&f.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),h=t.t2+t.t3,u.isJourneyRequest()&&(h=h.replace("v1","v2")),p={method:e,headers:u.addHeaders()},e!==this.GET&&(p.body=JSON.stringify(u.getBody())),c&&(p.credentials=c),t.prev=13,t.next=16,fetch(h,p);case 16:return d=t.sent,t.next=19,d.json();case 19:if(y=t.sent,!d.ok){t.next=23;break}return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\nResponse Body:",JSON.stringify(y.data,null,"\t")).writeLog(),t.abrupt("return",y);case 23:return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\n").writeLog(),t.abrupt("return",new i.default(y.statusCode,y.message));case 27:return t.prev=27,t.t4=t.catch(13),f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 31:case"end":return t.stop()}}),t,this,[[13,27]])}))),function(t,e,r,n){return y.apply(this,arguments)})},{key:"get",value:(d=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(f=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return f.apply(this,arguments)})},{key:"put",value:(c=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return c.apply(this,arguments)})},{key:"delete",value:(u=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return u.apply(this,arguments)})}],r&&p(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version,n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}}),e.default=n},106:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.default=r},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r;return e=t,(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}};e.default=r},358:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=i},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},90:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(901),i=l(r(354)),o=l(r(202)),s=l(r(801)),a=l(r(358)),u=l(r(22)),c=l(r(90));function l(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(){n=function(){return e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l;return e=t,r=[{key:"getDB",value:(l=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"get",value:(c=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return c.apply(this,arguments)})},{key:"put",value:(u=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(a=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return a.apply(this,arguments)})},{key:"getItem",value:(i=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})}],r&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},795:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(){c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var c=p(t[i],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var p=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}var e,r,a,u,l,p,d,y,E,g,v,m,I,b,_,S;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(S=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return S.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"getAppKeySync",value:(_=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return _.apply(this,arguments)})},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){return i.default.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){return i.default.getItem(this.LOCATION_UPDATE_MINUTES)||30}},{key:"setRequestLocation",value:(b=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getExternalIdRequest",value:(E=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return E.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getRegisteredByCookie",value:(y=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(d=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}},{key:"setInAppTopicList",value:(p=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getInAppTopicList",value:(l=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return l.apply(this,arguments)})},{key:"setTopicList",value:(u=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"getTopicList",value:(a=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return a.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=p},636:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l;return e=t,r=[{key:"getPermissions",value:(l=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getPermission",value:(a=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return a.apply(this,arguments)})},{key:"setPermissionsCallback",value:(o=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setCallback",value:(n=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(o,s,a,u){var c=p(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(i(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=e.CryptoUtils=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i;return e=t,r=[{key:"createHmac",value:(n=o().mark((function t(e,r){var n,i,s,a,f,h;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i=null===(n=window)||void 0===n||null===(n=n.crypto)||void 0===n?void 0:n.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,i.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return s=t.sent,t.next=9,i.sign(l,s,c.encode(r));case 9:return a=t.sent,f=new Uint8Array(a),h=Array.prototype.map.call(f,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",h).writeLog(),t.abrupt("return",h);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}],r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=f},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},970:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,i;return e=t,i=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},492:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},506:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"TopicUtils",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=h(r(306)),i=h(r(897)),o=h(r(95)),s=h(r(568)),a=h(r(970)),u=h(r(545)),c=r(136),l=h(r(506)),f=h(r(492));function h(t){return t&&t.__esModule?t:{default:t}}},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.3.3","_id":"indigitall-web-core@4.3.3","_inBundle":false,"_integrity":"sha512-DKC3qMLRDxUkyleQlaq4aoDnKKSoyY0wg2IfRosrqpGl1kjP8x8uh8997QnvITgeN+ZpLL9xyW6no/uxOlizRw==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.3.3","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.3.3","saveSpec":null,"fetchSpec":"4.3.3"},"_requiredBy":["#USER","/","/indigitall-web-customer"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.3.3.tgz","_shasum":"db9d055f40fd2e1ac53208d6fec0f0784b88f8fb","_spec":"indigitall-web-core@4.3.3","_where":"/home/circleci/webpush/inapp","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.3.3"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.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";r.r(n),r.d(n,{default:()=>yt});const{Repository:t}=r(872).Core,e=new class extends t{constructor(){super(),this.INAPP_SHOW_ONCE=this.REPOSITORY+".INAPP_SHOW_ONCE",this.INAPP_TIMES_CLICKED=this.REPOSITORY+".INAPP_TIMES_CLICKED",this.INAPP_DISMISS_FOREVER=this.REPOSITORY+".INAPP_DISMISS_FOREVER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.INAPP_TOPICS_SYNC=this.REPOSITORY+".INAPP_TOPICS_SYNC"}setItemStorage(t){this.setItemSessionStorage(this.REPOSITORY,t)}getItemStorage(){return this.getItemSessionStorage(this.REPOSITORY)}setDeviceId(t){this.setStorage(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}getInAppShowOnce(){return this.getStorage(this.INAPP_SHOW_ONCE)}setInAppShowOnce(t){this.setStorage(this.INAPP_SHOW_ONCE,t)}getInAppTimesClicked(){return this.getStorage(this.INAPP_TIMES_CLICKED)}setInAppTimesClicked(t){this.setStorage(this.INAPP_TIMES_CLICKED,t)}getInAppDismissForever(){return this.getStorage(this.INAPP_DISMISS_FOREVER)}setInAppDismissForever(t){this.setStorage(this.INAPP_DISMISS_FOREVER,t)}getInAppTopics(){return this.getStorage(this.INAPP_TOPICS)?this.getStorage(this.INAPP_TOPICS).split(","):null}setInAppTopics(t){this.setStorage(this.INAPP_TOPICS,t)}async getInAppTopicsSync(){let t=null;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS_SYNC))}catch(t){}return t}async setInAppTopicsSync(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS_SYNC,t)}async getUrlDeviceApi(){let t;try{this.storage&&this.storage.isLocalStorageAvailable()?t=this.getStorage(this.URL_DEVICE_API):this.db&&this.db.IDB&&(t=await this.db.getItem(this.URL_DEVICE_API))}catch(t){}return t}},{Validations:i,Log:o}=r(872).Core.Utils,s=class extends i{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new o("[IND]InAppValidations: "),r=e.getDeviceId();let n=!0;return this.isAppKeyFormat()||(n=!1,t.w("appKey is null or empty").writeLog()),this.isValidFormat(r)||(n=!1,t.w("deviceId is null or empty").writeLog()),n}},{ErrorDictionary:a}=r(872).Core.Models,u=a.ErrorCode;Object.assign(u,{INAPP_ERROR:2e3,INAPP_SHOW_INAPP_ERROR:2100,INAPP_WAS_EXPIRED:2101,INAPP_WAS_SHOWN_MANY_TIMES:2102,INAPP_WAS_CLICKED_MANY_TIMES:2103,INAPP_FORM_TYPE_NOT_CORRECT:2120,INAPP_FORM_FIELD_IS_EMPTY:2121,INAPP_POPUP_ERROR:2300,INAPP_WAS_DISMISSED_FOREVER:2304,INAPP_ERROR_CONTENT_MESSAGE:2305,INAPP_INSTANCE_TOPICS_ERROR:2306,INAPP_GENERAL_ERROR:2600});const c=a.ErrorMessage;Object.assign(c,{INAPP_ERROR:"inApp error",INAPP_SHOW_INAPP_ERROR:"error on show inApp",INAPP_WAS_EXPIRED:"InApp was expired",INAPP_WAS_SHOWN_MANY_TIMES:"InApp was shown more than $x times",INAPP_WAS_CLICKED_MANY_TIMES:"InApp was clicked more than $x times",NAPP_FORM_TYPE_NOT_CORRECT:"Input type is not correct",INAPP_FORM_FIELD_IS_EMPTY:"Field is empty",INAPP_POPUP_ERROR:"error on popup",INAPP_WAS_DISMISSED_FOREVER:"InApp was dismissed forever",INAPP_ERROR_CONTENT_MESSAGE:"InApp error with content",INAPP_INSTANCE_TOPICS_ERROR:"topics instance is not correct, only string[] is valid types",INAPP_GENERAL_ERROR:"inApp general error"});const l={ErrorCode:u,ErrorMessage:c},f=class{constructor(t){this.URL="url",t.actionId&&(this.actionId=t.actionId),t.destroy&&(this.destroy=t.destroy),t.topics&&(this.topics=t.topics),t.type&&(this.type=t.type),t.url&&(this.url=t.url),t.no_action&&(this.no_action=t.no_action)}},h=class{constructor(t){t.borderRadius&&(this.borderRadius=t.borderRadius)}},p=class{constructor(t){t.contentUrl&&(this.contentUrl=t.contentUrl),t.showTime&&(this.showTime=t.showTime),t.numberOfShows&&(this.numberOfShows=t.numberOfShows),t.numberOfClicks&&(this.numberOfClicks=t.numberOfClicks),t.dismissForever&&(this.dismissForever=t.dismissForever),t.layout&&(this.layout=new h(t.layout)),t.action&&(this.action=new f(t.action))}setAction(t){this.action=t}},d=class{constructor(t){this.timesShowed=0,this.timesClicked=0,this.wasDismissed=!1,t&&(t.timesShowed&&(this.timesShowed=t.timesShowed),t.timesClicked&&(this.timesClicked=t.timesClicked),t.wasDismissed&&(this.wasDismissed=t.wasDismissed))}},y=class{static searchInApp(t){const e=this.getListInApp();return null==e?null:this.findInAppFromInAppList(e,t)}static searchInAppWithInAppId(t){const e=this.getListInApp();return null==e?null:this.findInAppFromInAppListWithInAppId(e,t)}static addInApp(t){let r=this.getListInApp();null!=r?r.push(t):r=[t],e.setItemStorage(JSON.stringify(r))}static getListInApp(){let t=null;try{e.getItemStorage()&&(t=JSON.parse(e.getItemStorage()))}catch(t){console.error(t.message)}return t}static addInAppNewClick(t){this.updateInAppField(t.inAppId,!0,null,null)}static addInAppNewShow(t){this.updateInAppField(t.inAppId,null,!0,null)}static addInAppDismissForever(t){this.updateInAppField(t.inAppId,null,null,!0)}static updateInAppField(t,r,n,i){const o=this.getListInApp(),s=[];if(null!=o)for(let e=0;e<o.length;e++)o[e].inAppId==t&&(null!=r&&(o[e].inAppShow.timesClicked+=1),null!=n&&(o[e].inAppShow.timesShowed+=1),null!=i&&(o[e].inAppShow.wasDismissed=!0)),s.push(o[e]);e.setItemStorage(JSON.stringify(s))}static updateInApp(t){const r=this.getListInApp(),n=[];let i=!1,o=null;if(null!=r)for(let e=0;e<r.length;e++)r[e].inAppId===t.inAppId&&(i=!0,r[e].filters&&(t.filters=r[e].filters),r[e].name&&(t.name=r[e].name),null!=r[e].properties&&(t.properties=new p(r[e].properties)),null!=r[e].inAppShow&&(t.inAppShow=new d(r[e].inAppShow)),n.push(t),o=t);if(i)return e.setItemStorage(JSON.stringify(n)),o}static deleteInApp(t){const r=this.getListInApp(),n=[];if(null!=r)for(let e=0;e<r.length;e++)r[e].inAppId!=t.inAppId&&n.push(r[e]);e.setItemStorage(JSON.stringify(n))}static findInAppFromInAppListWithInAppId(t,e){if(null!=t)for(let r=0;r<t.length;r++)if(t[r].inAppId&&t[r].inAppId==e)return t[r];return null}static findInAppFromInAppList(t,e){if(null!=t)for(let r=0;r<t.length;r++)if(t[r].schema&&t[r].schema.code&&t[r].schema.code==e)return t[r];return null}static findInAppFromInAppListWithInAppId(t,e){if(null!=t)for(let r=0;r<t.length;r++)if(t[r].inAppId&&t[r].inAppId==e)return t[r];return null}},E=class{constructor(t){t.code&&(this.code=t.code),t.width&&(this.width=t.width),t.height&&(this.height=t.height)}},g=class{constructor(t){if(t.cacheTtl&&(this.cacheTtl=t.cacheTtl),t.inAppId&&(this.inAppId=t.inAppId),t.showOnce&&(this.showOnce=t.showOnce),t.version&&(this.version=t.version),t.customData&&(this.customData=t.customData),t.creationDate?this.creationDate=t.creationDate:this.creationDate=k.getDate((new Date).getTime()),t.expiredDate)this.expiredDate=t.expiredDate;else{let t=36e5;this.cacheTtl&&(t=1e3*this.cacheTtl),this.expiredDate=k.getDate((new Date).getTime()+t)}t.schema&&(this.schema=new E(t.schema)),t.properties&&(this.properties=new p(t.properties)),this.inAppShow=new d(t.inAppShow),t.filters&&(this.filters=t.filters),t.name&&(this.name=t.name)}},{BaseRequest:v}=r(872).Core.Api,{Config:m}=r(872).Core,I=class extends v{constructor(){super(),e.getDeviceId()?this.deviceId=e.getDeviceId():this.deviceId=k.generateDeviceId()}setEventType(t){this.eventType=t}setInAppId(t){this.inAppId=t}setActionId(t){this.actionId=t}setClickedButton(t){this.clickedButton=t}setLastVersionId(t){this.lastVersionId=t}setVersion(t){this.version=t}setDeviceId(t){this.deviceId=t}setPlatform(t){this.platform=t}postEventPrintRequest(){const t=this.fillJsonEventRequest();return this.body=t,this}postEventClickRequest(){const t=this.fillJsonEventRequest();return t.actionId=this.actionId,this.body=t,this}fillJsonEventRequest(){const t={};return t.deviceId=this.deviceId,e.getExternalId()&&(t.externalId=e.getExternalId()),t.inAppId=this.inAppId,t.platform=m.platform,t.version=this.version,t}postEventInAppRequest(){const t={};return t.inAppId=this.inAppId,t.lastVersionId=this.lastVersionId,t.deviceId=this.deviceId,this.eventType&&(t.eventType=this.eventType),t.platform=this.platform,t.clickedButton=this.clickedButton,this.body=t,this}},{BaseRequest:b}=r(872).Core.Api,_=class extends b{constructor(){super(),null!=e.getExternalId()&&(this.customerId=e.getExternalId()),null!=e.getDeviceId()&&(this.deviceId=e.getDeviceId())}setFields(t){this.fields=t}putCustomerFieldRequest(){return this.params=this.createQueryStringCustomerId(),this.body=this.createBodyJson(),this}createQueryStringCustomerId(){return this.PARAM_CUSTOMER_ID+"="+this.customerId}createBodyJson(){let t={};try{t.channel="inapp",this.device&&(t.deviceId=this.device.deviceId),this.customerId&&(t.customerId=this.customerId),this.fields&&(t=this.fields)}catch(t){console.log("Error fieldNames request :"+t)}return t}},{BaseRequest:S}=r(872).Core.Api,{Config:O}=r(872).Core,P=class extends S{constructor(){super()}setInAppId(t){this.inAppId=t}setVersion(t){this.version=t}setJsonForm(t){this.jsonForm=t}postForm(){return this.body=this.createBody(),this}createBody(){const t={};return e.getDeviceId()&&(t.deviceId=e.getDeviceId()),e.getExternalId()&&(t.externalCode=e.getExternalId()),this.jsonForm&&(t.form=this.jsonForm),t.inAppId=this.inAppId,t.platform=O.platform,t.version=this.version,t}},w=class{static sendEventPrint(t){const e=new I;e.setInAppId(t.inAppId),e.setVersion(t.version),X.postEventPrint(e)}static sendEventClick(t){const e=new I;e.setActionId(t.properties.action.actionId),e.setInAppId(t.inAppId),e.setVersion(t.version),X.postEventClick(e)}static sendEventForm(t,e,r){const n=new P;n.setVersion(e),n.setInAppId(t),n.setJsonForm(r),X.postEventForm(n)}static sendEventFormToCustomer(t){const e=new _;e.setFields(t),X.putCustomerField(e)}},{DeviceStatus:R,Device:T}=r(872).Core.Models,{BaseRequest:A}=r(872).Core.Api,N=class extends A{constructor(){super(),this.device=new T}postDeviceRequest(){return this.body=this.createDeviceJson(),this.status!==R.DEFAULT&&(this.body.enabled=1===this.status),this}createDeviceJson(){let t={};try{t=this.device.toJSON()}catch(t){console.log(t)}return t}},{Log:L,CryptoUtils:C,CorePermissions:D}=r(872).Core.Utils,{EventType:x}=r(872).Core.Models,k=class{constructor(){this.MONTH=24192e5}static addNewInApp(t){y.addInApp(t)}static addNewInAppClick(t){t.properties.numberOfClicks&&t.properties.numberOfClicks>0&&y.addInAppNewClick(t),w.sendEventClick(t)}static addNewInApptoDismissForever(t){y.addInAppDismissForever(t)}static isInAppDismissForever(t){const e=y.searchInAppWithInAppId(t.inAppId);return!(null==e||!new g(e).inAppShow.wasDismissed)}static async registerLocation(){const t=new L("[IND]InAppUtils: ");try{navigator.geolocation&&"prompt"===(await D.getPermissions()).location&&navigator.geolocation.getCurrentPosition((t=>{e.setLatitude(t.coords.latitude),e.setLongitude(t.coords.longitude)}),(r=>{t.e("error "+r).writeLog(),e.getPermissionLocation()||e.getPermissionLocation()==x.EVENT_TYPE_REJECT||e.setPermissionLocation(x.EVENT_TYPE_REJECT)}))}catch(e){t.e(e).writeLog()}}static generateDeviceId(){X.postDevice(new N,(t=>t),(t=>(console.log(t),null)))}static async setExternalCode(t){let r=t;if(t){const n=e.getAppKey();r=await C.createHmac(n,t)}return e.setExternalId(r),r}static async convertToJSONArray(t){if(t&&""!=t)return await Promise.resolve(t).then((t=>JSON.parse(t)))}static getDate(t){const e=new Date(t);let r=""+(e.getMonth()+1),n=""+e.getDate();const i=e.getFullYear();let o=e.getHours(),s=e.getMinutes(),a=e.getSeconds();return r.length<2&&(r="0"+r),n.length<2&&(n="0"+n),o.length<2&&(o="0"+o),s.length<2&&(s="0"+s),a.length<2&&(a="0"+a),`${i}-${r}-${n} ${o}:${s}:${a}`}},{CommonUtils:M,ErrorUtils:B}=r(872).Core.Utils,{Channel:U}=r(872).Core.Models,j=class{static async saveTopics(t,r,n){try{if(t instanceof Array){let n=[];const i=await e.getInAppTopics();if(null!=i&&""!=i&&(n=i),0!==n.length){const e=t.filter((t=>!n.includes(t)));0!==e.length&&n.push(e)}else for(let e=0;e<t.length;e++)n.push(t[e]);e.setInAppTopics(n),await e.setInAppTopicsSync(n);const o=[];for(let t=0;t<n.length;t++)o.push({code:n[t],name:n[t],visible:!0,subscribe:!0,parentCode:"",channel:U.INAPP});M.isFunction(r)&&r(o)}else M.isFunction(n)&&n(B.showError(l,l.ErrorCode.INAPP_INSTANCE_TOPICS_ERROR))}catch(t){M.isFunction(n)&&n(B.showError(l,l.ErrorCode.INAPP_ERROR,t.message))}}static async deleteTopics(t,r,n){if(t instanceof Array){let n=[],i=[];const o=await e.getInAppTopics();null!=o&&""!=o&&(n=o),0!==n.length&&(i=n.filter((e=>!t.includes(e))),e.setInAppTopics(i),await e.setInAppTopicsSync(i));const s=[];if(i.length>0)for(let t=0;t<i.length;t++)s.push({code:i[t],name:i[t],visible:!0,subscribe:!0,parentCode:"",channel:U.INAPP});M.isFunction(r)&&r(s)}else M.isFunction(n)&&n(B.showError(l,l.ErrorCode.INAPP_INSTANCE_TOPICS_ERROR))}static isSubscribe(t){let r=[],n=[];if(e.getInAppTopics()&&(n=e.getInAppTopics()),t&&t.length>0)if(n&&n.length>0)for(let e=0;e<t.length;e++){t[e].subscribed=!1;for(let r=0;r<n.length;r++)t[e].code===n[r]&&(t[e].subscribed=!0);r.push(t[e])}else{for(let e=0;e<t.length;e++)t[e].subscribe=!1;r=t}return r}},{BaseClient:V}=r(872).Core.Api,{Config:F}=r(872).Core,{Channel:Y,ErrorModel:G}=r(872).Core.Models,{TopicUtils:K,CommonUtils:q,ErrorUtils:W}=r(872).Core.Utils,X=new class extends V{constructor(){super(),this.ENDPOINT_INAPP="/inapp",this.URL_BASE=F.client.URL_DEVICE_V2+this.ENDPOINT_INAPP,this.ENDPOINT_CAMPAIGN="/campaign",this.ENDPOINT_CAMPAIGN_TAG=this.ENDPOINT_CAMPAIGN+"/{tag}",this.ENDPOINT_DEVICE="/device",this.ENDPOINT_EVENT_INAPP="/event",this.ENDPOINT_EVENT_INAPP_PRINT=this.ENDPOINT_EVENT_INAPP+"/print",this.ENDPOINT_EVENT_INAPP_CLICK=this.ENDPOINT_EVENT_INAPP+"/click",this.ENDPOINT_EVENT_INAPP_FORM=this.ENDPOINT_EVENT_INAPP+"/form",this.ENDPOINT_DEVICE_TOPICS="/topic",this.ENDPOINT_CUSTOMER="/customer",this.ENDPOINT_CUSTOMER_FIELD=this.ENDPOINT_CUSTOMER+"/field",this.isCustomerRequest=!1,this.isDeviceRequest=!1}async getURL(){if(this.isCustomerRequest){this.isCustomerRequest=!1;const t=await e.getUrlInappApi();return t?t=t.replaceAll("v2","v1"):F.client.CUSTOMER_URL_BASE}if(this.isDeviceRequest){this.isDeviceRequest=!1;const t=await e.getUrlInappApi();return t?t=t.replaceAll("v2","v1"):F.client.URL_BASE}const t=await e.getUrlInappApi();return t?t+this.ENDPOINT_INAPP:this.URL_BASE}async getCampaignTag(t,e,r){const n=await this.get(this.ENDPOINT_CAMPAIGN_TAG,t.getCampaignTagRequest());if(n&&!(n instanceof G)&&n.data&&Object.keys(n.data).length>0){if(q.isFunction(e)){const r=new g(n.data);r.properties.numberOfShows>0&&(r.inAppShow.timesShowed=1),r.properties.dismissForever&&(r.inAppShow.wasDismissed=!0),t.isUpdateInApp()||k.addNewInApp(r),e(r)}}else n?q.isFunction(r)&&r(n):q.isFunction(r)&&r(W.showError(l,l.ErrorCode.INAPP_ERROR_CONTENT_MESSAGE));return null}async getInAppTopics(t,r,n){if(s.isAppKeyFormat()){const i=await this.get(this.ENDPOINT_DEVICE_TOPICS,t.getDeviceTopicsRequest());if(!i||i instanceof G)i?q.isFunction(n)&&n(i):q.isFunction(n)&&n();else{const t=K.setTopicChannel(i.data,Y.INAPP),n=j.isSubscribe(t);await e.setInAppTopicList(n),q.isFunction(r)&&r(n)}}else q.isFunction(n)&&n(W.showError(l,l.ErrorCode.INAPP_GENERAL_ERROR));return!0}postEventClick(t){s.isAppKeyFormat()&&this.post(this.ENDPOINT_EVENT_INAPP_CLICK,t.postEventClickRequest())}postEventPrint(t){s.isAppKeyFormat()&&this.post(this.ENDPOINT_EVENT_INAPP_PRINT,t.postEventClickRequest())}postEventForm(t){s.isAppKeyFormat()&&this.post(this.ENDPOINT_EVENT_INAPP_FORM,t.postForm())}putCustomerField(t){s.isAppKeyFormat()&&(this.isCustomerRequest=!0,this.put(this.ENDPOINT_CUSTOMER_FIELD,t.putCustomerFieldRequest()))}async postDevice(t,r,n){if(s.isAppKeyFormat()){this.isDeviceRequest=!0;const i=await this.post(this.ENDPOINT_DEVICE,t.postDeviceRequest(),"include");!i||i instanceof G?i?q.isFunction(n)&&n(i):q.isFunction(n)&&n():(i.data.deviceId&&e.setDeviceId(i.data.deviceId),q.isFunction(r)&&r(i.data.deviceId))}else q.isFunction(n)&&n(W.showError(l,l.ErrorCode.INAPP_ERROR));return!0}},{BaseRequest:H}=r(872).Core.Api,J=class extends H{constructor(){super(),this.update=!1,this.PARAM_DEVICE_TYPE="deviceType",this.PARAM_EXTERNAL_CODE="externalCode",this.PARAM_BROWSER_NAME="browserName"}setTag(t){this.tag=t}setUpdateInApp(t){this.update=t}isUpdateInApp(){return this.update}getCampaignTagRequest(){return this.params=this.createQueryString(),this.pathParams["{tag}"]=this.tag,this}createQueryString(){let t="";if(null!=e.getDeviceId()?t+=`${this.PARAM_DEVICE_ID}=${e.getDeviceId()}&`:k.generateDeviceId(),null!=e.getExternalId()&&(t+=`${this.PARAM_EXTERNAL_CODE}=${e.getExternalId()}&`),null!=e.getDeviceType()&&(t+=`${this.PARAM_DEVICE_TYPE}=${e.getDeviceType()}&`),null!=e.getBrowserName()&&(t+=`${this.PARAM_BROWSER_NAME}=${e.getBrowserName()}&`),null!=e.getLatitude()&&(t+=`${this.PARAM_LATITUDE}=${e.getLatitude()}&`),null!=e.getLongitude()&&(t+=`${this.PARAM_LONGITUDE}=${e.getLongitude()}&`),null!=e.getInAppTopics()&&0!==e.getInAppTopics().length){const r=e.getInAppTopics();let n="";for(let t=0;t<r.length;t++)n+=`${this.PARAM_TOPICS}=${encodeURIComponent(r[t])}&`;t+=n}return t+=`${this.PARAM_PLATFORM}=webpush`,t}},{BaseRequest:Q}=r(872).Core.Api,z=class extends Q{constructor(){super()}getDeviceTopicsRequest(){return this.params=this.PARAM_DEVICE_ID+"="+e.getDeviceId(),this}},$=class{constructor(t,e){this.script=` \n var slideIndex_${e} = 1;\n var delta_${e} = 6;\n var startMove_${e} = null;\n var startMoveY_${e} = null; \n var diffX_${e};\n var diffY_${e};\n var timeSlide_${e} = 10000;\n\n var slider_${e} = document.getElementById("${t}").querySelector('.ind_slider-container-actions');\n var sliderTotal_${e} = document.getElementById("${t}").getElementsByClassName("ind_slideshow-item").length;\n\n showSlides_${e}(slideIndex_${e});\n\n var interval_${e} = setInterval(() => {\n newSlide_${e}();\n }, timeSlide_${e});\n\n if (slider_${e}){\n slider_${e}.addEventListener('touchstart', handleStart_${e}, false);\n slider_${e}.addEventListener('touchend', handleEnd_${e}, false);\n slider_${e}.addEventListener('mousedown', mouseStart_${e});\n slider_${e}.addEventListener('mouseup', mouseEnd_${e}); \n }\n\n\n function mouseStart_${e}(evt) {\n evt.preventDefault();\n startMove_${e} = evt.clientX;\n startMoveY_${e} = evt.clientY;\n }\n\n function mouseEnd_${e}(evt) {\n evt.preventDefault();\n var endMove = evt.clientX;\n var endMoveY = evt.clientY;\n setEndMove_${e}(endMove, endMoveY);\n }\n\n function handleStart_${e}(evt) {\n evt.preventDefault();\n startMove_${e} = evt.touches[0].clientX;\n startMoveY_${e} = evt.touches[0].clientY;\n }\n function handleEnd_${e}(evt) {\n evt.preventDefault();\n var endMove = evt.changedTouches[0].pageX;\n var endMoveY = evt.changedTouches[0].pageY;\n setEndMove_${e}(endMove, endMoveY);\n }\n\n function setEndMove_${e}(endMove, endMoveY) {\n diffX_${e} = Math.abs(endMove - startMove_${e});\n diffY_${e} = Math.abs(endMoveY - startMoveY_${e});\n if (startMove_${e} != null) {\n if (startMove_${e} > endMove) {\n slideIndex_${e}++;\n if (slideIndex_${e} > sliderTotal_${e}) {\n slideIndex_${e} = 1;\n }\n } else {\n if (slideIndex_${e} == 0) {\n slideIndex_${e} = sliderTotal_${e};\n } else {\n slideIndex_${e}--;\n }\n }\n showSlides_${e}(slideIndex_${e});\n setNewInterval_${e}();\n }\n }\n\n function plusSlides_${e}(n) {\n showSlides_${e}(slideIndex_${e} += n);\n setNewInterval_${e}();\n }\n\n function currentSlide_${e}(n) {\n showSlides_${e}(slideIndex_${e} = n);\n }\n\n function setNewInterval_${e}() {\n clearInterval(interval_${e});\n interval_${e} = setInterval(() => {\n newSlide_${e}();\n }, timeSlide_${e});\n }\n\n function newSlide_${e}(){\n slideIndex_${e}++;\n if (slideIndex_${e} > sliderTotal_${e}) {\n slideIndex_${e} = 1;\n }\n showSlides_${e}(slideIndex_${e});\n }\n\n function showSlides_${e}(n) {\n let view = document.getElementById("${t}");\n if (view) {\n let slides = view.getElementsByClassName("ind_slideshow-item");\n let i;\n let dots = view.getElementsByClassName("ind_dot");\n if (n > slides.length) {slideIndex_${e} = 1;}\n if (n < 1) {slideIndex_${e} = slides.length;}\n for (i = 0; i < slides.length; i++) {\n slides[i].style.display = "none";\n }\n for (i = 0; i < dots.length; i++) {\n dots[i].className = dots[i].className.replace(" active", "");\n }\n if (slides[slideIndex_${e}-1]) {\n slides[slideIndex_${e}-1].style.display = "block";\n }\n if (dots[slideIndex_${e}-1]) dots[slideIndex_${e}-1].className += " active";\n }\n }\n\n\n function inAppIndigitallOnClick_${e}(action) {\n if (diffX_${e} && diffY_${e}) {\n if (diffX_${e} < delta_${e} && diffY_${e} < delta_${e}) {\n indigitall.InApp.inAppOnClick(action);\n }\n } else {\n indigitall.InApp.inAppOnClick(action);\n }\n }\n\n function inAppIndigitallSubmit(formOptions) {\n const jsonForm = {}\n const jsonCustomer = {}\n const form = document.querySelector('[id="'+formOptions.formId+'"]');\n if (form) {\n formOptions.inputs.forEach((el) => {\n if (el.id !== 'undefined') {\n let value;\n if (el.type === 'text' || el.type === 'number') {\n if (form && form.querySelector('input[id^="'+el.id+'"]') && form.querySelector('input[id^="'+el.id+'"]').value !== 'undefined') {\n value = form.querySelector('input[id^="'+el.id+'"]').value;\n }\n }\n if (el.type === 'checkbox') {\n if (form && form.querySelectorAll('input[id^="'+el.id +'"]')) {\n let values = form.querySelectorAll('input[id^="'+el.id +'"]');\n var valuesChecked = [];\n for (var i = 0; i < values.length; i++) {\n if (values[i].checked && values[i].value !== 'undefined') {\n valuesChecked.push(values[i].value);\n }\n }\n value = valuesChecked;\n }\n }\n if (el.type === 'radio') {\n if (form && form.querySelectorAll('input[id^="'+el.id +'"]')) {\n let values = form.querySelectorAll('input[id^="'+el.id +'"]');\n var valuesChecked;\n for (var i = 0; i < values.length; i++) {\n if (values[i].checked && values[i].value !== 'undefined') {\n valuesChecked = values[i].value;\n }\n }\n value = valuesChecked;\n }\n }\n if (el.type === 'select') {\n if (form && form.querySelector('select[id^="'+el.id+'"]') && form.querySelector('select[id^="'+el.id+'"]').value !== 'undefined') {\n value = form.querySelector('select[id^="'+el.id+'"]').value;\n }\n }\n if (value) jsonForm[el.id] = value;\n if (el.sendToCustomer) jsonCustomer[el.id] = value;\n }\n });\n }\n indigitall.InApp.inAppSubmit(JSON.stringify(formOptions), JSON.stringify(jsonForm), JSON.stringify(jsonCustomer));\n }\n `,this.htmlTest="\n <!DOCTYPE html>\n <html lang=\"en\" dir=\"ltr\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width\" />\n <title>guille test</title>\n <style>\n html,\n body {\n margin: 0;\n padding: 0;\n height: 100%;\n width: 100%;\n }\n body p:first-child {\n margin: 0;\n }\n </style>\n </head>\n <body>\n \n <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n <html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n \x3c!--[if !mso]>\x3c!--\x3e\n \x3c!--[if (gte mso 9)|(IE)]>\x3c!--\x3e\n <link href=\"https://fonts.googleapis.com/css2?family=EB+Garamond&family=Merriweather&family=Montserrat&family=Open+Sans&family=Oswald&family=Playfair+Display&family=Raleway&family=Roboto&family=Roboto+Slab&family=Source+Sans+Pro&display=swap\" rel=\"stylesheet\">\n \x3c!--<![endif]--\x3e\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n \x3c!--<![endif]--\x3e\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <link href=\"http://fonts.cdnfonts.com/css/arial\" rel=\"stylesheet\">\n <link href=\"http://fonts.cdnfonts.com/css/courier-new\" rel=\"stylesheet\">\n <link href=\"http://fonts.cdnfonts.com/css/georgia-2\" rel=\"stylesheet\">\n <link href=\"http://fonts.cdnfonts.com/css/trebuchet-ms-2\" rel=\"stylesheet\">\n <link href=\"http://fonts.cdnfonts.com/css/verdana-pro-cond\" rel=\"stylesheet\">\n \n <link href=\"https://fonts.googleapis.com/css2?family=EB+Garamond&family=Merriweather&family=Montserrat&family=Open+Sans&family=Oswald&family=Playfair+Display&family=Raleway&family=Roboto&family=Roboto+Slab&family=Source+Sans+Pro&display=swap\" rel=\"stylesheet\">\n <title>InApp Sample</title>\n \n <style type=\"text/css\">\n html {\n width: 100%;\n height: 100%;\n }\n @font-face {\n font-family: 'Merriweather';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/merriweather/v28/u-440qyriQwlOrhSvowK_l5OeA.woff) format('woff');\n }\n @font-face {\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/montserrat/v23/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Ew9.woff) format('woff');\n }\n @font-face {\n font-family: 'Open Sans';\n font-style: normal;\n font-weight: 400;\n font-stretch: normal;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/opensans/v28/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0C4k.woff) format('woff');\n }\n @font-face {\n font-family: 'Oswald';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/oswald/v47/TK3_WkUHHAIjg75cFRf3bXL8LICs1_FvgUI.woff) format('woff');\n }\n @font-face {\n font-family: 'Playfair Display';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/playfairdisplay/v28/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvUDT.woff) format('woff');\n }\n @font-face {\n font-family: 'Raleway';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/raleway/v26/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaooCM.woff) format('woff');\n }\n @font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Me5g.woff) format('woff');\n }\n @font-face {\n font-family: 'Roboto Slab';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/robotoslab/v22/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISWaw.woff) format('woff');\n }\n @font-face {\n font-family: 'Source Sans Pro';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xK3dSBYKcSV-LCoeQqfX1RYOo3aPA.woff) format('woff');\n }\n @font-face {\n font-family: 'EB Garamond';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/ebgaramond/v24/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-6_RUAA.woff) format('woff');\n }\n /* latin-ext */\n @font-face {\n font-family: 'Merriweather';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/merriweather/v28/u-440qyriQwlOrhSvowK_l5-ciZMZ-Y.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Merriweather';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/merriweather/v28/u-440qyriQwlOrhSvowK_l5-fCZM.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/montserrat/v23/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw3aXpsog.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/montserrat/v23/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw5aXo.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Open Sans';\n font-style: normal;\n font-weight: 400;\n font-stretch: 100%;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/opensans/v28/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4uaVIGxA.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Open Sans';\n font-style: normal;\n font-weight: 400;\n font-stretch: 100%;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/opensans/v28/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Oswald';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/oswald/v47/TK3_WkUHHAIjg75cFRf3bXL8LICs1_FvsUhiZTaR.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Oswald';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/oswald/v47/TK3_WkUHHAIjg75cFRf3bXL8LICs1_FvsUZiZQ.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Playfair Display';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/playfairdisplay/v28/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvXDZbtPY_Q.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Playfair Display';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/playfairdisplay/v28/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvXDXbtM.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Raleway';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/raleway/v26/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCGPrEHJA.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Raleway';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/raleway/v26/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCIPrE.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Mu7GxKOzY.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Mu4mxK.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Roboto Slab';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/robotoslab/v22/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmYWRjRdE.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Roboto Slab';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/robotoslab/v22/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmb2Rj.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Source Sans Pro';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNq7lqDY.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Source Sans Pro';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7l.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'EB Garamond';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/ebgaramond/v24/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-6_RkCo9_S6w.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'EB Garamond';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/ebgaramond/v24/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-6_RkBI9_.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n \n </style>\n <style>\n .slideshow-item {\n cursor: grabbing;\n scroll-snap-align: start;\n display: none; \n scroll-snap-type: x mandatory;\n scroll-behavior: smooth;\n -webkit-overflow-scrolling: touch; /* For mobile */\n -ms-overflow-style: none; /* For hide scrollbar */\n scrollbar-width: none; /* For hide scrollbar */\n }\n .slideshow-item-preview {\n cursor: grabbing;\n scroll-snap-align: start;\n display: block; \n scroll-snap-type: x mandatory;\n scroll-behavior: smooth;\n -webkit-overflow-scrolling: touch; /* For mobile */\n -ms-overflow-style: none; /* For hide scrollbar */\n scrollbar-width: none; /* For hide scrollbar */\n }\n img {vertical-align: middle;}\n \n /* Slideshow container */\n .slideshow-container {\n /* max-width: 1000px; */\n position: relative;\n margin: auto;\n -webkit-overflow-scrolling: touch; /* For mobile */\n }\n \n /* Next & previous buttons */\n .prev, .next {\n cursor: pointer;\n position: absolute;\n top: 50%;\n width: auto;\n padding: 16px;\n margin-top: -22px;\n color: white;\n font-weight: bold;\n font-size: 18px;\n transition: 0.6s ease;\n border-radius: 0 3px 3px 0;\n user-select: none;\n }\n \n /* Position the \"next button\" to the right */\n .next {\n right: 0;\n border-radius: 3px 0 0 3px;\n }\n \n /* On hover, add a black background color with a little bit see-through */\n .prev:hover, .next:hover {\n background-color: rgba(0,0,0,0.8);\n }\n \n .points {\n padding: 8px 12px;\n position: absolute;\n bottom: 8px;\n text-align: center;\n width:100%;\n }\n \n /* The dots/bullets/indicators */\n .dot {\n cursor: pointer;\n height: 15px;\n width: 15px;\n margin: 0 2px;\n background-color: #bbb;\n border-radius: 50%;\n display: inline-block;\n transition: background-color 0.6s ease;\n }\n \n .active, .dot:hover {\n background-color: #717171;\n }\n \n /* On smaller screens, decrease text size */\n @media only screen and (max-width: 300px) {\n .prev, .next,.text {font-size: 11px}\n }\n </style>\n \n </head>\n <body style=\"margin:0; height: 100%; width: 100%;\">\n <div style=\"\n background-color: rgba(244, 244, 244, 1);\n width: 100%;\n height: 100%;\n margin: 0 auto;\n \">\n \n <div style=\"\n display: flex;\n flexDirection: row;\n box-sizing: border-box;\n padding: 0px 0px 0px 0px ;\n margin: 0px 0px 0px 0px ;\n background-color: rgba(244, 244, 244, 0);\n border: 0px solid rgba(244, 244, 244, 0);\n width: 100%;\">\n \n <div style=\"\n width: 100%;\n \">\n \n <div style=\"\n margin: 0px 0px 0px 0px ;\n padding: 15px 15px 15px 15px ;\n background-color: rgba(244, 244, 244, 0);\n text-align: left;\n font-family: 'Roboto';\n \">\n \n <form id=\"5kZSrg6xbKyX\" class=\"form-style-1\">\n \n <style type=\"text/css\">\n .form-style-1 {\n }\n .form-style-1 li {\n padding: 0;\n display: block;\n list-style: none;\n margin: 10px 0 0 0;\n }\n .form-style-1 label{\n margin:0 0 3px 0;\n padding:0px;\n display:block;\n font-weight: bold;\n }\n .form-style-1 input[type=text], \n .form-style-1 input[type=date],\n .form-style-1 input[type=datetime],\n .form-style-1 input[type=number],\n .form-style-1 input[type=search],\n .form-style-1 input[type=time],\n .form-style-1 input[type=url],\n .form-style-1 input[type=email],\n textarea, \n select{\n box-sizing: border-box;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n border:1px solid #BEBEBE;\n padding: 7px;\n margin:0px;\n -webkit-transition: all 0.30s ease-in-out;\n -moz-transition: all 0.30s ease-in-out;\n -ms-transition: all 0.30s ease-in-out;\n -o-transition: all 0.30s ease-in-out;\n outline: none;\n }\n .form-style-1 input[type=text]:focus, \n .form-style-1 input[type=date]:focus,\n .form-style-1 input[type=datetime]:focus,\n .form-style-1 input[type=number]:focus,\n .form-style-1 input[type=search]:focus,\n .form-style-1 input[type=time]:focus,\n .form-style-1 input[type=url]:focus,\n .form-style-1 input[type=email]:focus,\n .form-style-1 textarea:focus, \n .form-style-1 select:focus{\n -moz-box-shadow: 0 0 8px #88D5E9;\n -webkit-box-shadow: 0 0 8px #88D5E9;\n box-shadow: 0 0 8px #88D5E9;\n border: 1px solid #88D5E9;\n }\n .form-style-1 .field-divided{\n width: 49%;\n }\n \n .form-style-1 .field-long{\n width: 100%;\n }\n .form-style-1 .field-select{\n width: 100%;\n }\n .form-style-1 .field-textarea{\n height: 100px;\n }\n \n .form-style-1 input[type=submit]:hover, .form-style-1 input[type=button]:hover{\n background: #4691A4;\n box-shadow:none;\n -moz-box-shadow:none;\n -webkit-box-shadow:none;\n }\n .form-style-1 input[type=radio]{\n transform: scale(1.2);\n }\n .form-style-1 input[type=checkbox]{\n transform: scale(1.2);\n }\n .form-style-1 .required{\n color:red;\n }\n </style>\n \n \n <div style=\"margin-top: 10px;\">\n <label>\n Escribe algo\n <span class=\"required\">*</span>\n </label>\n <input type=\"text\" name=\"algo\" id=\"algo\" required=\"true\" sendToCustomer=\"true\" style=\"width: 100%;\n padding: 12px 20px;\n margin: 8px 0;\n display: inline-block;\n border: 1px solid #ccc;\n border-radius: 4px;\n box-sizing: border-box;\">\n </div><div style=\"margin-top: 10px;\">\n <label style=\"\n margin:0 0 3px 0;\n padding:0px;\n display:block;\n \">\n Selecciona algo\n \n </label>\n <select style=\"width: 100%;\n padding: 12px 20px;\n margin: 8px 0;\n display: inline-block;\n border: 1px solid #ccc;\n border-radius: 4px;\n box-sizing: border-box;\" id=\"selector\" required=\"undefined\" sendToCustomer=\"true\">\n <option value=\"algo\">Algo</option><option value=\"masalgo\">Mas algo</option><option value=\"variosalgos\">Varios algos</option>\n </select>\n </div>\n <div style=\"\n margin-top: 10px;\n \">\n <label style=\"\n margin-bottom: 10px;\n \">\n ¿Cuál de las dos opciones te gusta más?\n \n </label>\n \n <div style=\"margin-bottom: 5px; display: flex; flex-direction: row; align-items: baseline; gap:0px;\">\n <input style=\"margin-right: 10px;\" type=\"radio\" id=\"radio0\" name=\"radio\" value=\"opcion1\"><label style=\"font-weight: 100; margin-right: 10px;\" for=\"radio0\">Opcion 1</label>\n </div>\n \n <div style=\"margin-bottom: 5px; display: flex; flex-direction: row; align-items: baseline; gap:0px;\">\n <input style=\"margin-right: 10px;\" type=\"radio\" id=\"radio1\" name=\"radio\" value=\"opcion2\"><label style=\"font-weight: 100; margin-right: 10px;\" for=\"radio1\">Opcion 2</label>\n </div>\n \n </div>\n \n <div style=\"margin-top: 10px;\">\n <label style=\"\n margin-bottom: 10px;\n \">\n Marca las casillas que quieras\n \n </label>\n \n <div style=\"display: flex; flex-direction: row; margin-bottom: 5px; align-items: flex-start;\">\n <input style=\"margin-right: 10px;\" type=\"checkbox\" id=\"casilla0\" name=\"casilla\" value=\"casilla1\"><label style=\"font-weight: 100; margin-right: 10px;\" for=\"casilla0\">Casilla 1</label>\n </div>\n \n <div style=\"display: flex; flex-direction: row; margin-bottom: 5px; align-items: flex-start;\">\n <input style=\"margin-right: 10px;\" type=\"checkbox\" id=\"casilla1\" name=\"casilla\" value=\"casilla2\"><label style=\"font-weight: 100; margin-right: 10px;\" for=\"casilla1\">Casilla 2</label>\n </div>\n \n </div>\n \n <tr style=\"\n display: block;\n text-align: left; \">\n <td style=\"\n display: inline-block;\n width: auto;\n padding: 15px 15px 15px 15px ;\n margin: 0px 0px 0px 0px ;\n background-color: rgba(244, 244, 244, 0);\">\n <div target=\"_blank\" rel=\"noreferrer\" onclick=\"InAppIndigitall.submit({'schemaId':217,'inAppId':22,'inputs':[{'type':'text','label':'Escribe algo','name':'algo','subtype':'text','required':true,'sendToCustomer':true,'id':'algo'},{'type':'select','label':'Selecciona algo','name':'selector','options':[{'name':'Algo','value':'algo'},{'name':'Mas algo','value':'masalgo'},{'name':'Varios algos','value':'variosalgos'}],'sendToCustomer':true,'id':'selector'},{'type':'radio','label':'¿Cuál de las dos opciones te gusta más?','name':'radio','options':[{'name':'Opcion 1','value':'opcion1'},{'name':'Opcion 2','value':'opcion2'}],'labelPosition':'right','id':'radio'},{'type':'checkbox','label':'Marca las casillas que quieras','options':[{'name':'Casilla 1','value':'casilla1'},{'name':'Casilla 2','value':'casilla2'}],'subtype':'right','name':'casilla','id':'casilla'}],'formId':'5kZSrg6xbKyX'})\" style=\"text-decoration: none; width: auto; cursor: pointer;\">\n <div style=\"\n padding: 8px 16px 8px 16px;\n width: auto;\n display: inline-block;\n text-align: left;\n background-color: rgba(200, 200, 200, 1);\n border-radius: 3px 3px 3px 3px;\n border: 0px solid transparent;\n box-sizing: border-box;\n margin-top: 15px;\">\n <span style=\"text-align: center; \"><span style=\"font-size: 16px\"><span style=\"font-family: Roboto, sans-serif !important\"><span style=\"color: #555555\"><span style=\"background-color: transparent\"><span style=\"letter-spacing: 0px;\">Botón</span></span></span></span></span></span>\n </div>\n </div>\n </td>\n </tr>\n \n </form>\n \n </div>\n \n </div>\n </div>\n </div>\n </body>\n </html>\n <script>\n // Created event\n var event = document.createEvent('Event');\n \n /* defined event 'click'.*/\n event.initEvent('click', true, true);\n \n // to assign event click.\n document.addEventListener('click', function (e) {\n window.parent.document.dispatchEvent(new CustomEvent('indigitall_on_click_inapp', {detail: {\n inAppId: 217,\n lastVersionId: 431,\n clickedButton: 'content',\n action: {\n type: 'url',\n url: 'https://indigitall.com'\n }\n }}));\n }, false);\n <\/script>\n </body>\n </html>\n \n "}},Z=Object.freeze({TEXT:"text",NUMBER:"number",RADIO:"radio",CHECKBOX:"checkbox",SELECT:"select"}),tt=class{constructor(t){if(t.id&&(this.id=t.id),t.name&&(this.name=t.name),t.type)switch(t.type){case"text":this.type=Z.TEXT;break;case"checkbox":this.type=Z.CHECKBOX;break;case"number":this.type=Z.NUMBER;break;case"radio":this.type=Z.RADIO;break;case"select":this.type=Z.SELECT}t.required&&(this.required=t.required),t.sendToCustomer&&(this.sendToCustomer=t.sendToCustomer)}},et=class{constructor(t){if(t.inAppId&&(this.inAppId=t.inAppId),t.formId&&(this.formId=t.formId),t.inappVersion&&(this.inappVersion=t.inappVersion),t.inputs&&Array.isArray(t.inputs)){this.inputs=[];for(let e=0;e<t.inputs.length;e++)this.inputs.push(new tt(t.inputs[e]))}}},{ErrorUtils:rt}=r(872).Core.Utils,nt=class{static checkFieldsForm(t,e,r){const n=[];if(e&&t.inputs&&t.inputs.length>0)for(let r=0;r<t.inputs.length;r++){const i=this.checkInputType(t.inputs[r],e);null!=i&&n.push(i)}if(n.length>0)return n;e&&0!==Object.keys(e).length&&w.sendEventForm(t.inAppId,t.inappVersion,e),r&&0!==Object.keys(r).length&&w.sendEventFormToCustomer(r)}static checkInputType(t,e){if(null!=t.id)switch(t.type){case Z.TEXT:if(t.required){if(!e[t.id])return rt.showError(l,2121,t.id);if(!e[t.id]instanceof String)return rt.showError(l,2120,`The field ${t.id} is not text`)}break;case Z.NUMBER:if(t.required){if(!e[t.id])return rt.showError(l,2121,t.id);if(!e[t.id]instanceof String){if(!parseInt(e[t.id]))return rt.showError(l,2120,`The field ${t.id} is not number`)}else if(!e[t.id]instanceof int)return rt.showError(l,2120,`The field ${t.id} is not number`)}break;default:if(t.required&&e[t.id]&&""==e[t.id])return rt.showError(l,2121,t.id)}return null}static editingFormHtml(t,e){return t.replaceAll("InAppIndigitall.onClick",`inAppIndigitallOnClick_${e}`).replaceAll("InAppIndigitall.submit","inAppIndigitallSubmit").replaceAll("plusSlides",`plusSlides_${e}`).replaceAll("currentSlide",`currentSlide_${e}`).replaceAll("setNewInterval",`setNewInterval_${e}`).replaceAll("newSlide",`newSlide_${e}`).replaceAll("showSlides",`showSlides_${e}`)}},it=class{static onClick(t){if(t){const e=JSON.parse(t);let r;e.inAppId&&(r=e.inAppId),e.inappId&&(r=e.inappId);const n=y.searchInAppWithInAppId(r);if(n&&e.action){const t=new g(n),r=new f(e.action);if(t.properties.setAction(r),r.type==r.URL&&window.open(r.url),t){k.addNewInAppClick(t);const e=new CustomEvent("didClicked",{detail:{action:r},bubbles:!0,cancelable:!0,composed:!1});self.dispatchEvent(e)}}else console.log(`InApp ${e.schema} not found`)}else console.log("InApp action is empty")}static submit(t,e,r){if(t){const n=new et(JSON.parse(t));if(e){const t=nt.checkFieldsForm(n,JSON.parse(e),JSON.parse(r));if(t&&t.length>0){const e=new CustomEvent("didFormError",{detail:{errorList:t},bubbles:!0,cancelable:!0,composed:!1});self.dispatchEvent(e)}else{const t=new CustomEvent("didFormSubmit",{detail:{},bubbles:!0,cancelable:!0,composed:!1});self.dispatchEvent(t)}}}}},{Log:ot,ErrorUtils:st,CommonUtils:at}=r(872).Core.Utils,ut="[IND]ShowInAppUtils: ";class ct{static async inAppWasShown(t,e,r,n,i){const o=new ot(ut);t.schema.code&&this.inAppWasGot(t.schema.code,null,e,(t=>{at.isFunction(i)&&i(t)}),(()=>{at.isFunction(i)&&i(t)}),((t,e)=>{o.d("inAppWasShown: "+t.inAppId+" with error: "+e.errorMessage).writeLog()}),r,n)}static inAppWasGot(t,e,r,n,i,o,s,a){const u=y.searchInApp(t),c=(new Date).getTime();if(null!=u){const t=new g(u);if(c<new Date(t.expiredDate).getTime()){const r=this.wasInAppPassedFilterProperties(t);null!=r?(r==l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER&&at.isFunction(o)&&o(t,st.showError(l,l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER)),r==l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES&&at.isFunction(s)&&s(t,st.showError(l,l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES)),r==l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES&&at.isFunction(a)&&a(t,st.showError(l,l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES))):at.isFunction(n)&&n(t,e)}else at.isFunction(r)&&r(t,st.showError(l,l.ErrorCode.INAPP_WAS_EXPIRED)),ct.updateInAppGet(t.schema.code,o,s,a,(t=>{at.isFunction(n)&&n(t,e)}),(t=>{new ot(ut).e(t).writeLog()}))}else at.isFunction(i)&&i(t,e)}static wasInAppPassedFilterProperties(t){if(t.properties.dismissForever&&t.inAppShow.wasDismissed)return l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER;{t.properties.dismissForever&&k.addNewInApptoDismissForever(t);const e=t.properties.numberOfShows,r=t.inAppShow?t.inAppShow.timesShowed:null,n=t.properties.numberOfClicks,i=t.inAppShow?t.inAppShow.timesClicked:null;if(e>0){if(!(null!=r&&r<e))return l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES;y.addInAppNewShow(t)}if(n>0&&null!=i&&i>=n)return l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES}return null}static updateInAppGet(t,e,r,n,i,o){yt.getInAppWithUpdate(t,!0,(t=>{const o=y.updateInApp(t),s=this.wasInAppPassedFilterProperties(o);if(null!=s)return s==l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER&&at.isFunction(e)&&e(t,st.showError(l,l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER)),s==l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES&&at.isFunction(r)&&r(t,st.showError(l,l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES)),void(s==l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES&&at.isFunction(n)&&n(t,st.showError(l,l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES)));at.isFunction(i)&&i(o)}),(t=>{at.isFunction(o)&&o(t)}))}}const lt=ct,{ErrorUtils:ft,CommonUtils:ht,LogLevel:pt}=r(872).Core.Utils;class dt{constructor(){this.LogLevel=pt,this.inAppIndigitallInterface=it}static async init(t){null!=t.appKey&&await e.setAppKey(t.appKey),t.urlInAppApi&&e.setUrlInappApi(t.urlInAppApi),t.logLevel&&e.setLogLevel(t.logLevel),!0===t.requestLocation&&k.registerLocation()}static async showInApp(t,r,n,i){const o={appKey:e.getAppKey(),urlInAppApi:"https://device-api.indigitall.com/v2",requestLocation:!0,logLevel:pt.DEBUG,inAppCode:t,viewId:r};this.showInAppWithConfig(o,null,null,null,null,null,null,n,i,null,null)}static async showInAppWithConfig(t,e,r,n,i,o,a,u,c,f,h){await this.init(t),s.isAppKeyFormat()?lt.inAppWasGot(t.inAppCode,t.viewId,r,(async(t,r)=>{t&&t.properties&&this.createInApp(t,r,a,u,c,e,f,h)}),((t,r)=>{this.drawInApp(t,r,e,a,u,c,f,h)}),o,n,i):ht.isFunction(c)&&c(ft.showError(l,l.ErrorCode.BAD_REQUEST_SERVER_ERROR))}static showMultipleInApp(t,r,n,i){const o={appKey:e.getAppKey(),urlInAppApi:"https://device-api.indigitall.com/v2",requestLocation:!0,logLevel:pt.DEBUG,inAppCodeList:t,divList:r};this.showMultipleInAppWithConfig(o,null,null,null,null,null,null,n,i,null,null)}static async showMultipleInAppWithConfig(t,e,r,n,i,o,a,u,c,f,h){if(await this.init(t),s.isAppKeyFormat()){if(t.inAppCodeList.length==t.divList.length&&t.inAppCodeList.length>0)for(var p=0;p<t.inAppCodeList.length;p++)lt.inAppWasGot(t.inAppCodeList[p],t.divList[p],r,(async(t,r)=>{t&&t.properties&&this.createInApp(t,r,a,u,c,e,f,h)}),((t,r)=>{dt.drawInApp(t,r,e,a,u,c,f,h)}),o,n,i)}else ht.isFunction(c)&&c(ft.showError(l,l.ErrorCode.BAD_REQUEST_SERVER_ERROR))}static async drawInApp(t,e,r,n,i,o,s,a){this.getInApp(t,(async t=>{t&&t.properties&&this.createInApp(t,e,n,i,o,r,s,a)}),o)}static async createInApp(t,e,r,n,i,o,s,a){if(t&&t.properties&&t.properties.contentUrl)try{const i=document.getElementById(e);if(i){i.style.position="relative",i.style.overflow="hidden";const u=await fetch(t.properties.contentUrl);let c=await u.text();null!=t.customData&&Object.keys(t.customData).forEach((function(e){c=c.replaceAll(`{{${e}}}`,t.customData[e])})),t.version&&(c=c.replaceAll("'inappVersion':'{{version}}'","'inappVersion':"+t.version));const l=e.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,""),f=nt.editingFormHtml(c,l);if(i.innerHTML=f,"undefined"===document.getElementById(`script_${l}`)||null===document.getElementById(`script_${l}`)){const t=document.createElement("script");t.id=`script_${l}`,t.type="text/javascript",t.innerHTML=new $(e,l).script,i.appendChild(t)}if(self.addEventListener("didClicked",(function e(n){r&&r(t,n.detail.action),self.removeEventListener("didClicked",e)})),self.addEventListener("didFormError",(function e(r){s&&s(t,r.detail.errorList),self.removeEventListener("didFormError",e)})),self.addEventListener("didFormSubmit",(function e(r){a&&a(t),self.removeEventListener("didFormSubmit",e)})),t.properties.showTime){let e=0;const r=setInterval((function(){e++,e==parseInt(t.properties.showTime)&&(i.style.display="none",clearInterval(r),ht.isFunction(o)&&o(t,i,1e3*t.properties.showTime))}),1e3)}if(t.properties.layout&&t.properties.layout.borderRadius){const e=`${parseInt(t.properties.layout.borderRadius)}px`;i.style.borderRadius=e}ht.isFunction(n)&&n(t,i),w.sendEventPrint(t)}}catch(r){let n=null;t&&t.schema&&t.schema.code&&(n=t.schema.code),ht.isFunction(i)&&i(r,e,n)}}static topicsList(t,e){return X.getInAppTopics(new z,t,e),!0}static topicsSubscribe(t,e,r){j.saveTopics(t,e,r)}static topicsUnsubscribe(t,e,r){j.deleteTopics(t,e,r)}static inAppGet(t,e,r){this.getInApp(t,e,r)}static getInApp(t,e,r){this.getInAppWithUpdate(t,!1,e,r)}static getInAppWithUpdate(t,e,r,n){if(s.isAppKeyFormat()){const i=new J;i.setTag(t),i.setUpdateInApp(e),X.getCampaignTag(i,r,n)}else ht.isFunction(n)&&n(ft.showError(l,l.ErrorCode.BAD_REQUEST_SERVER_ERROR))}static addNewInAppToDismissForever(t){k.addNewInApptoDismissForever(t)}static async isInAppDismissForever(t){k.isInAppDismissForever(t)}static async inAppOnClick(t){it.onClick(t)}static async inAppSubmit(t,e,r){it.submit(t,e,r)}static async inAppWasShown(t,e,r,n,i){lt.inAppWasShown(t,e,r,n,i)}static async downloadHTML(t){const e=await fetch(t,{method:"GET"});console.log(e)}static async setExternalCode(t,e,r){try{const r=await k.setExternalCode(t);e&&e(r)}catch(t){r&&r(t)}}static async logIn(t,e,r){await this.setExternalCode(t,e,r)}static async logOut(t,e){await this.setExternalCode(null,t,e)}}const yt=dt;window.indigitall||(window.indigitall={}),window.indigitall.InApp=dt,window.indigitall.InApp.Utils=k,window.indigitall.LogLevel=pt})(),n})(),t.exports=e()},396:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}return i.default=t,r&&r.set(t,i),i}(r(899));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}))},301:function(t){var e;e=()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.3.3","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>B});var t={};r.r(t),r.d(t,{BaseClient:()=>b,BaseRequest:()=>_});var e={};r.r(e),r.d(e,{Channel:()=>S,Device:()=>O,DeviceStatus:()=>P,ErrorDictionary:()=>I,ErrorModel:()=>v,EventType:()=>w,TopicSubscribeType:()=>R});var i={};r.r(i),r.d(i,{CommonUtils:()=>T,CorePermissions:()=>A,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>x,Log:()=>g,LogLevel:()=>d,TopicUtils:()=>M,Validations:()=>k});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,p=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t),l&&l.IDB&&await l.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}async getAppKeySync(){if(l&&l.IDB)return await l.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}},d=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=d;class E{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new p).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const g=E,v=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new v(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new v(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},b=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new g("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(y.DEBUG);let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\n").writeLog(),new v(n.statusCode,n.message))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},_=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new p).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},S=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),O=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new p).getBrowserPublicKey(),this.browserPrivateKey=(new p).getBrowserPrivateKey(),this.platform=(new p).getPlatform(),this.version=(new p).getVersion(),this.browserName=(new p).getBrowserName(),this.browserVersion=(new p).getBrowserVersion(),this.osName=(new p).getOsName(),this.osVersion=(new p).getOsVersion(),this.deviceType=(new p).getDeviceType(),(new p).getEnabled()&&(this.enabled="true"===(new p).getEnabled()),(new p).getExternalId()&&(this.externalCode=(new p).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new p).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new p).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},P=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),T=class{static isServiceTimestampExceed(){return!(new p).getServiceTimestamp()||(new p).getServiceSyncTime()<=(Date.now()-(new p).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},A=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new g("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},N=new g("[IND]Crypto"),L=new TextEncoder("utf-8"),C="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",L.encode(t),{name:C,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(C,n,L.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return N.d("hmac: ",s).writeLog(),s}catch(t){return void N.e("error:",t).writeLog()}}},x=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},k=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},B={Repository:p,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(545)),i=u(r(358)),o=u(r(568)),s=u(r(801)),a=u(r(136));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var u=p(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==c(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,u,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function f(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){f(o,n,i,s,a,"next",t)}function a(t){f(o,n,i,s,a,"throw",t)}s(void 0)}))}}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==c(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===c(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,u,c,f,d,y,E;return e=t,r=[{key:"getURL",value:(E=h(l().mark((function t(){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return E.apply(this,arguments)})},{key:"call",value:(y=h(l().mark((function t(e,r,u,c){var f,h,p,d,y;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return f=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&f.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),h=t.t2+t.t3,u.isJourneyRequest()&&(h=h.replace("v1","v2")),p={method:e,headers:u.addHeaders()},e!==this.GET&&(p.body=JSON.stringify(u.getBody())),c&&(p.credentials=c),t.prev=13,t.next=16,fetch(h,p);case 16:return d=t.sent,t.next=19,d.json();case 19:if(y=t.sent,!d.ok){t.next=23;break}return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\nResponse Body:",JSON.stringify(y.data,null,"\t")).writeLog(),t.abrupt("return",y);case 23:return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\n").writeLog(),t.abrupt("return",new i.default(y.statusCode,y.message));case 27:return t.prev=27,t.t4=t.catch(13),f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 31:case"end":return t.stop()}}),t,this,[[13,27]])}))),function(t,e,r,n){return y.apply(this,arguments)})},{key:"get",value:(d=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(f=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return f.apply(this,arguments)})},{key:"put",value:(c=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return c.apply(this,arguments)})},{key:"delete",value:(u=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return u.apply(this,arguments)})}],r&&p(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version,n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}}),e.default=n},106:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.default=r},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r;return e=t,(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}};e.default=r},358:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=i},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},90:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(901),i=l(r(354)),o=l(r(202)),s=l(r(801)),a=l(r(358)),u=l(r(22)),c=l(r(90));function l(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(){n=function(){return e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l;return e=t,r=[{key:"getDB",value:(l=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"get",value:(c=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return c.apply(this,arguments)})},{key:"put",value:(u=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(a=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return a.apply(this,arguments)})},{key:"getItem",value:(i=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})}],r&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},795:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(){c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var c=p(t[i],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var p=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}var e,r,a,u,l,p,d,y,E,g,v,m,I,b,_,S;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(S=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return S.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"getAppKeySync",value:(_=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return _.apply(this,arguments)})},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){return i.default.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){return i.default.getItem(this.LOCATION_UPDATE_MINUTES)||30}},{key:"setRequestLocation",value:(b=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getExternalIdRequest",value:(E=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return E.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getRegisteredByCookie",value:(y=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(d=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}},{key:"setInAppTopicList",value:(p=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getInAppTopicList",value:(l=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return l.apply(this,arguments)})},{key:"setTopicList",value:(u=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"getTopicList",value:(a=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return a.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=p},636:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l;return e=t,r=[{key:"getPermissions",value:(l=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getPermission",value:(a=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return a.apply(this,arguments)})},{key:"setPermissionsCallback",value:(o=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setCallback",value:(n=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(o,s,a,u){var c=p(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(i(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=e.CryptoUtils=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i;return e=t,r=[{key:"createHmac",value:(n=o().mark((function t(e,r){var n,i,s,a,f,h;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i=null===(n=window)||void 0===n||null===(n=n.crypto)||void 0===n?void 0:n.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,i.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return s=t.sent,t.next=9,i.sign(l,s,c.encode(r));case 9:return a=t.sent,f=new Uint8Array(a),h=Array.prototype.map.call(f,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",h).writeLog(),t.abrupt("return",h);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}],r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=f},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},970:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,i;return e=t,i=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},492:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},506:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"TopicUtils",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=h(r(306)),i=h(r(897)),o=h(r(95)),s=h(r(568)),a=h(r(970)),u=h(r(545)),c=r(136),l=h(r(506)),f=h(r(492));function h(t){return t&&t.__esModule?t:{default:t}}},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.3.3","_id":"indigitall-web-core@4.3.3","_inBundle":false,"_integrity":"sha512-DKC3qMLRDxUkyleQlaq4aoDnKKSoyY0wg2IfRosrqpGl1kjP8x8uh8997QnvITgeN+ZpLL9xyW6no/uxOlizRw==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.3.3","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.3.3","saveSpec":null,"fetchSpec":"4.3.3"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.3.3.tgz","_shasum":"db9d055f40fd2e1ac53208d6fec0f0784b88f8fb","_spec":"indigitall-web-core@4.3.3","_where":"/home/circleci/webpush/inbox","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.3.3"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.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";r.r(n),r.d(n,{default:()=>C});const{Repository:t}=r(872).Core,e=new class extends t{constructor(){super(),this.AUTH_TOKEN=this.REPOSITORY+".AUTH_TOKEN",this.INBOX_AUTH_MODE=this.REPOSITORY+".INBOX_AUTH_MODE",this.URL_INBOX_API=this.REPOSITORY+".URL_INBOX_API"}async setDeviceId(t){this.setStorage(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}setAuthToken(t){this.setStorage(this.AUTH_TOKEN,t)}getAuthToken(){return this.getStorage(this.AUTH_TOKEN)}setInboxAuthMode(t){this.setStorage(this.INBOX_AUTH_MODE,t)}getInboxAuthMode(){return this.getStorage(this.INBOX_AUTH_MODE)}async getUrlInboxApi(){return this.getStorage(this.URL_INBOX_API)}async setUrlInboxApi(t){this.setStorage(this.URL_INBOX_API,t)}},{BaseClient:o}=r(872).Core.Api,{Config:s}=r(872).Core,{ErrorModel:a}=r(872).Core.Models,{CommonUtils:u}=r(872).Core.Utils,c=new class extends o{constructor(){super(),this.URL_BASE=s.client.INBOX_URL_BASE,this.ENDPOINT_INBOX_NOTIFICATIONS="/notification",this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID=this.ENDPOINT_INBOX_NOTIFICATIONS+"/{sendingId}",this.ENDPOINT_INBOX_COUNTER="/counters",this.ENDPOINT_INBOX_AUTH="/auth/webhook"}async getURL(){return await e.getUrlInboxApi()||this.URL_BASE}async postInboxAuth(t,r,n){const i=await this.post(this.ENDPOINT_INBOX_AUTH,t.postInboxAuth());if(!i||i instanceof a||!i.data)i?u.isFunction(n)&&n(i):u.isFunction(n)&&n();else{const t=i.data.token;e.setAuthToken(t),u.isFunction(r)&&r(i)}return!0}async getInbox(t,e,r){const n=await this.get(this.ENDPOINT_INBOX_NOTIFICATIONS,t.getInboxPushRequest());return this.getInboxResponseStatus(n,e,r),!0}async putInboxPush(t,e,r){const n=await this.put(this.ENDPOINT_INBOX_NOTIFICATIONS,t.putInboxPushRequest());return this.getInboxResponseEdit(n,e,r),!0}async getInboxPushWithSendingId(t,e,r,n){const i=await this.get(this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID,t.getInboxPushRequestWithSendingId());return this.getNotificationResponseStatus(i,e,r,n),!0}async putInboxPushWithSendingId(t,e,r,n){const i=await this.put(this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID,t.putInboxWithSendingId());return this.getNotificationResponseStatus(i,e,r,n),!0}async getInboxCounter(t,e,r){const n=await this.get(this.ENDPOINT_INBOX_COUNTER,t.getCounter());this.getCounterStatus(n,e,r)}async getInboxResponseStatus(t,e,r){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const r=new C(t.data);u.isFunction(e)&&e(r)}else t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}async getInboxResponseEdit(t,e,r){t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300?u.isFunction(e)&&e():t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}getNotifications(t,e){const r=[];for(let n=0;n<t.length;n++){null!=t[n].sentAt&&null!=e&&t[n].sentAt<e&&(read=!0);const i=new InboxNotification(t[n],e);r.push(i)}return r}async getNotificationResponseStatus(t,e,r,n){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const t=new InboxNotification(notifications[i],e);u.isFunction(r)&&r(t)}else t?u.isFunction(n)&&n(t):u.isFunction(n)&&n()}async getCounterStatus(t,e,r){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const r={click:t.data.click,sent:t.data.sent,deleted:t.data.deleted,unread:this.getUnreadCounters(t.data.unread)};u.isFunction(e)&&e(r)}else t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}getUnreadCounters(t){return{count:t.count,lastAccess:t.lastAccess}}},{BaseRequest:l}=r(872).Core.Api,f=class extends l{constructor(){super()}postInboxAuth(){return this.body=this.json,this}setJson(t){this.json=t}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}},h=Object.freeze({SENT:"sent",CLICK:"click",DELETED:"deleted"});window.inboxStatus=h;const p=h,d=Object.freeze({NONE:"none",DEFAULT:"default",WEBHOOK:"webhook"}),{BaseRequest:y}=r(872).Core.Api,E=class extends y{constructor(){super(),null!=e.getExternalId()&&(this.externalId=e.getExternalId()),null!=e.getAuthToken()&&e.getInboxAuthMode()==d.WEBHOOK&&(this.headers.Authorization="Bearer "+e.getAuthToken()),this.sendingId="",this.sendingIds=null,this.page=0,this.pageSize=0,this.dateFrom="",this.dateTo="",this.status=p.INBOXSTATUS_SENT,this.statusList=null}getInboxPushRequest(){return this.params=this.createQueryString(),this}putInboxPushRequest(){return this.params=this.createQueryStringExternalId(),this.body=this.createBodyJson(),this}getInboxPushRequestWithSendingId(){return this.pathParams["{sendingId}"]=this.sendingId,this.params=this.createQueryStringExternalId(),this}putInboxWithSendingId(){return this.pathParams["{sendingId}"]=this.sendingId,this.params=this.createQueryStringExternalId(),this.body=this.createBodyStatusJson(),this}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}createQueryString(){let t="";if(this.page&&(t+=this.PARAM_INBOX_PAGE+"="+this.page+"&"),this.pageSize&&(t+=this.PARAM_INBOX_PAGE_SIZE+"="+this.pageSize+"&"),this.dateFrom&&(t+=this.PARAM_INBOX_DATE_FROM+"="+this.dateFrom+"&"),this.dateTo&&(t+=this.PARAM_INBOX_DATE_TO+"="+this.dateTo+"&"),this.statusList){let e="";for(let t=0;t<this.statusList.length;t++)e+=this.statusList[t],t!=this.statusList.length-1&&(e+=",");t+=this.PARAM_INBOX_STATUS+"="+e+"&"}return t+this.createQueryStringExternalId()}createQueryStringExternalId(){return this.PARAM_INBOX_EXTERNALID+"="+this.externalId}createBodyJson(){let t={};const e=[];try{if(t=this.createBodyStatusJson(),this.sendingIds)for(let t=0;t<this.sendingIds.length;t++)e.push(this.sendingIds[t]);t.sendingIds=e}catch(t){console.log("Error Inbox request :"+t)}return t}createBodyStatusJson(){const t={};return this.status&&(t.status=this.status),t}setSendingId(t){this.sendingId=t}setSendingIds(t){this.sendingIds=t}setPage(t){this.page=t}setPageSize(t){this.pageSize=t}setDateFrom(t){this.dateFrom=t}setDateTo(t){this.dateTo=t}setStatus(t){this.status=t}setStatusList(t){this.statusList=t}},{BaseRequest:g}=r(872).Core.Api,v=class extends g{constructor(){super(),null!=e.getExternalId()&&(this.externalId=e.getExternalId()),null!=e.getAuthToken()&&e.getInboxAuthMode()==d.WEBHOOK&&(this.headers.Authorization="Bearer "+e.getAuthToken())}getCounter(){return this.params=this.createQueryStringExternalId(),this}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}createQueryStringExternalId(){return this.PARAM_INBOX_EXTERNALID+"="+this.externalId}};class m{constructor(t,e){t&&(t.id&&(this.id=t.id),t.externalId&&(this.externalId=t.externalId),t.sentAt&&(this.sentAt=t.sentAt),t.status&&(this.status=t.status),t.sendingId&&(this.sendingId=t.sendingId),t.message&&(this.message=t.message),t.campaignId&&(this.campaignId=t.campaignId),this.read=!1,this.sentAt&&e&&this.sentAt<e&&(this.read=!0))}}window.inboxNotification=m;const I=m,{ErrorDictionary:b}=r(872).Core.Models,_=b.ErrorCode;Object.assign(_,{INBOX_GET_ERROR:3001,INBOX_GET_PAGE_ERROR:3011,INBOX_EXTERNAL_ID_NO_REGISTERED:3012,INBOX_NO_MESSAGES:3013,INBOX_IS_REQUESTING_PAGE:3014,INBOX_EMPTY:3015,INBOX_GENERAL_ERROR:3600});const S=b.ErrorMessage;Object.assign(S,{INBOX_GET_ERROR:"inbox GET request error",INBOX_GET_PAGE_ERROR:"error inbox get page",INBOX_EXTERNAL_ID_NO_REGISTERED:"external Id is not registered",INBOX_NO_MESSAGES:"There are no more messages on Inbox",INBOX_IS_REQUESTING_PAGE:"Wait. Is Requesting new page",INBOX_EMPTY:"There are no messages on Inbox",INBOX_GENERAL_ERROR:"general error"});const O={ErrorCode:_,ErrorMessage:S},{Validations:P,Log:w}=r(872).Core.Utils,R=class extends P{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new w("[IND]InboxValidations: "),r=e.getDeviceId();let n=!0;return this.isAppKeyFormat()||(n=!1,t.w("appKey is null or empty").writeLog()),this.isValidFormat(r)||(n=!1,t.w("deviceId is null or empty").writeLog()),n}},{CommonUtils:T,ErrorUtils:A,Log:N}=r(872).Core.Utils;class L{constructor(t){if(t){if(t.lastAccess&&(this.lastAccess=t.lastAccess),t.numPage?this.page=t.numPage:this.page=0,t.pageSize&&(this.pageSize=t.pageSize),t.count&&(this.count=t.count),t.notifications){this.notifications=[];const e=t.notifications;for(let t=0;t<e.length;t++){const r=new I(e[t],this.lastAccess);this.notifications.push(r)}}this.totalPages=Math.trunc(this.count/this.pageSize)}this.dateFrom=null,this.dateTo=null,this.statusList=null,this.newNotifications=[I],this.isRequestingPage=!1}static generateAuthToken(t,e){let r={};navigator.indigitallGetAuthConfig&&T.isFunction(navigator.indigitallGetAuthConfig)&&(r=navigator.indigitallGetAuthConfig());const n=new f;n.setJson(r),c.postInboxAuth(n,t,e)}static getMessagesCountWithAuth(t,e,r){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getMessagesCount(e,r)}static setUrlInboxApi(t){e.setUrlInboxApi(t)}static setInboxAuthMode(t){e.setInboxAuthMode(t)}static getMessagesCount(t,r){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new v;c.getInboxCounter(e,t,(r=>{401===r.errorCode?this.generateAuthToken((()=>{c.getInboxCounter(e,t,r)}),r):T.isFunction(r)&&r(r)}))}else T.isFunction(r)&&r(A.showError(O,O.ErrorCode.INBOX_GET_ERROR));else T.isFunction(r)&&r(A.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}static getInboxWithAuth(t,e,r){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getInbox(e,r)}static getInbox(t,e){L.getInboxWithPage(null,null,null,null,null,t,e)}static getInboxWithPageAuth(t,e,r,n,i,o,s,a){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getInboxWithPage(e,r,n,i,o,s,a)}static getInboxWithPage(t,r,n,i,o,s,a){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new E;t&&e.setPage(t),r&&e.setPageSize(r),n&&(e.setDateFrom(n),this.dateFrom=n),i&&(e.setDateTo(i),this.dateTo=i),o&&(e.setStatusList(o),this.statusList=o),c.getInbox(e,(t=>{this.totalPages=t.totalPages,0!=t.count?T.isFunction(s)&&s(t):T.isFunction(a)&&a(A.showError(O,O.ErrorCode.INBOX_GET_PAGE_ERROR))}),(t=>{401==t.errorCode?this.generateAuthToken((()=>{c.getInbox(e,(t=>{this.totalPages=t.totalPages,T.isFunction(s)&&s(t)}),t)}),t):T.isFunction(t)&&t(t)}))}else T.isFunction(a)&&a(A.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(a)&&a(A.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}getNextPage(t,r){const n=new N("[IND]Inbox: ");if(this.isRequestingPage)n.w(O.ErrorMessage.INBOX_IS_REQUESTING_PAGE).writeLog();else if(this.isRequestingPage=!0,this.page+1<this.totalPages)if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new E;(this.page||0==this.page)&&e.setPage(this.page+1),this.pageSize&&e.setPageSize(this.pageSize),this.dateFrom&&e.setDateFrom(this.dateFrom),this.dateTo&&e.setDateTo(this.dateTo),this.statusList&&e.setStatusList(this.statusList),c.getInbox(e,(e=>{this.notifications=this.notifications.concat(e.notifications),this.newNotifications=e.notifications,this.lastAccess=e.lastAccess,this.count=e.count,this.page=e.page,this.pageSize=e.pageSize,this.totalPages=e.totalPages,this.isRequestingPage=!1,T.isFunction(t)&&t(this,this.newNotifications)}),(r=>{401===r.errorCode?this.generateAuthToken((()=>{c.getInbox(e,(e=>{this.notifications=this.notifications.concat(e.notifications),this.newNotifications=e.notifications,this.lastAccess=e.lastAccess,this.count=e.count,this.page=e.page,this.pageSize=e.pageSize,this.totalPages=e.totalPages,this.isRequestingPage=!1,T.isFunction(t)&&t(this,this.newNotifications)}),r)}),r):(this.isRequestingPage=!1,T.isFunction(r)&&r())}))}else this.isRequestingPage=!1,T.isFunction(r)&&r(A.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(r)&&r(A.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST));else this.isRequestingPage=!1,T.isFunction(r)&&r(A.showError(O,O.ErrorCode.INBOX_NO_MESSAGES))}massiveEditNotifications(t,r,n,i){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t&&r){const e=new E;e.setSendingIds(t),e.setStatus(r),c.putInboxPush(e,n,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.putInboxPush(e,n,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(i)&&i(A.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(i)&&i(A.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}getInfoFromNotification(t,r,n){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t){const e=new E;e.setSendingId(t),c.getInboxPushWithSendingId(e,this.lastAccess,r,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.getInboxPushWithSendingId(e,this.lastAccess,r,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(n)&&n(A.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(n)&&n(A.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}modifyStatusFromNotification(t,r,n,i){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t&&r){const e=new E;e.setSendingId(t),e.setStatus(r),c.putInboxPushWithSendingId(e,this.lastAccess,n,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.putInboxPushWithSendingId(e,this.lastAccess,n,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(i)&&i(A.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(i)&&i(A.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}}const C=L})(),n})(),t.exports=e()},277:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}return i.default=t,r&&r.set(t,i),i}(r(301));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}))},735:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}return i.default=t,r&&r.set(t,i),i}(r(794));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}))},794:function(t){var e;e=()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.3.3","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>B});var t={};r.r(t),r.d(t,{BaseClient:()=>b,BaseRequest:()=>_});var e={};r.r(e),r.d(e,{Channel:()=>S,Device:()=>O,DeviceStatus:()=>P,ErrorDictionary:()=>I,ErrorModel:()=>v,EventType:()=>w,TopicSubscribeType:()=>R});var i={};r.r(i),r.d(i,{CommonUtils:()=>T,CorePermissions:()=>A,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>x,Log:()=>g,LogLevel:()=>d,TopicUtils:()=>M,Validations:()=>k});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,p=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t),l&&l.IDB&&await l.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}async getAppKeySync(){if(l&&l.IDB)return await l.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}},d=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=d;class E{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new p).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const g=E,v=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new v(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new v(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},b=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new g("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(y.DEBUG);let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\n").writeLog(),new v(n.statusCode,n.message))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},_=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new p).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},S=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),O=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new p).getBrowserPublicKey(),this.browserPrivateKey=(new p).getBrowserPrivateKey(),this.platform=(new p).getPlatform(),this.version=(new p).getVersion(),this.browserName=(new p).getBrowserName(),this.browserVersion=(new p).getBrowserVersion(),this.osName=(new p).getOsName(),this.osVersion=(new p).getOsVersion(),this.deviceType=(new p).getDeviceType(),(new p).getEnabled()&&(this.enabled="true"===(new p).getEnabled()),(new p).getExternalId()&&(this.externalCode=(new p).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new p).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new p).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},P=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),T=class{static isServiceTimestampExceed(){return!(new p).getServiceTimestamp()||(new p).getServiceSyncTime()<=(Date.now()-(new p).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},A=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new g("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},N=new g("[IND]Crypto"),L=new TextEncoder("utf-8"),C="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",L.encode(t),{name:C,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(C,n,L.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return N.d("hmac: ",s).writeLog(),s}catch(t){return void N.e("error:",t).writeLog()}}},x=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},k=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},B={Repository:p,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(545)),i=u(r(358)),o=u(r(568)),s=u(r(801)),a=u(r(136));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var u=p(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==c(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,u,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function f(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){f(o,n,i,s,a,"next",t)}function a(t){f(o,n,i,s,a,"throw",t)}s(void 0)}))}}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==c(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===c(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,u,c,f,d,y,E;return e=t,r=[{key:"getURL",value:(E=h(l().mark((function t(){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return E.apply(this,arguments)})},{key:"call",value:(y=h(l().mark((function t(e,r,u,c){var f,h,p,d,y;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return f=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&f.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),h=t.t2+t.t3,u.isJourneyRequest()&&(h=h.replace("v1","v2")),p={method:e,headers:u.addHeaders()},e!==this.GET&&(p.body=JSON.stringify(u.getBody())),c&&(p.credentials=c),t.prev=13,t.next=16,fetch(h,p);case 16:return d=t.sent,t.next=19,d.json();case 19:if(y=t.sent,!d.ok){t.next=23;break}return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\nResponse Body:",JSON.stringify(y.data,null,"\t")).writeLog(),t.abrupt("return",y);case 23:return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\n").writeLog(),t.abrupt("return",new i.default(y.statusCode,y.message));case 27:return t.prev=27,t.t4=t.catch(13),f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 31:case"end":return t.stop()}}),t,this,[[13,27]])}))),function(t,e,r,n){return y.apply(this,arguments)})},{key:"get",value:(d=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(f=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return f.apply(this,arguments)})},{key:"put",value:(c=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return c.apply(this,arguments)})},{key:"delete",value:(u=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return u.apply(this,arguments)})}],r&&p(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version,n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}}),e.default=n},106:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.default=r},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r;return e=t,(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}};e.default=r},358:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=i},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},90:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(901),i=l(r(354)),o=l(r(202)),s=l(r(801)),a=l(r(358)),u=l(r(22)),c=l(r(90));function l(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(){n=function(){return e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l;return e=t,r=[{key:"getDB",value:(l=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"get",value:(c=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return c.apply(this,arguments)})},{key:"put",value:(u=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(a=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return a.apply(this,arguments)})},{key:"getItem",value:(i=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})}],r&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},795:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(){c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var c=p(t[i],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var p=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}var e,r,a,u,l,p,d,y,E,g,v,m,I,b,_,S;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(S=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return S.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"getAppKeySync",value:(_=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return _.apply(this,arguments)})},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){return i.default.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){return i.default.getItem(this.LOCATION_UPDATE_MINUTES)||30}},{key:"setRequestLocation",value:(b=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getExternalIdRequest",value:(E=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return E.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getRegisteredByCookie",value:(y=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(d=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}},{key:"setInAppTopicList",value:(p=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getInAppTopicList",value:(l=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return l.apply(this,arguments)})},{key:"setTopicList",value:(u=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"getTopicList",value:(a=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return a.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=p},636:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l;return e=t,r=[{key:"getPermissions",value:(l=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getPermission",value:(a=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return a.apply(this,arguments)})},{key:"setPermissionsCallback",value:(o=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setCallback",value:(n=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(o,s,a,u){var c=p(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(i(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=e.CryptoUtils=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i;return e=t,r=[{key:"createHmac",value:(n=o().mark((function t(e,r){var n,i,s,a,f,h;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i=null===(n=window)||void 0===n||null===(n=n.crypto)||void 0===n?void 0:n.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,i.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return s=t.sent,t.next=9,i.sign(l,s,c.encode(r));case 9:return a=t.sent,f=new Uint8Array(a),h=Array.prototype.map.call(f,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",h).writeLog(),t.abrupt("return",h);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}],r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=f},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},970:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,i;return e=t,i=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},492:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},506:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"TopicUtils",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=h(r(306)),i=h(r(897)),o=h(r(95)),s=h(r(568)),a=h(r(970)),u=h(r(545)),c=r(136),l=h(r(506)),f=h(r(492));function h(t){return t&&t.__esModule?t:{default:t}}},301:function(t){var e;e=()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.3.3","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>B});var t={};r.r(t),r.d(t,{BaseClient:()=>b,BaseRequest:()=>_});var e={};r.r(e),r.d(e,{Channel:()=>S,Device:()=>O,DeviceStatus:()=>P,ErrorDictionary:()=>I,ErrorModel:()=>v,EventType:()=>w,TopicSubscribeType:()=>R});var i={};r.r(i),r.d(i,{CommonUtils:()=>T,CorePermissions:()=>A,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>x,Log:()=>g,LogLevel:()=>d,TopicUtils:()=>M,Validations:()=>k});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,p=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t),l&&l.IDB&&await l.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}async getAppKeySync(){if(l&&l.IDB)return await l.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}},d=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=d;class E{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new p).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=E.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const g=E,v=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new v(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new v(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},b=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new g("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(y.DEBUG);let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\n").writeLog(),new v(n.statusCode,n.message))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},_=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new p).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},S=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),O=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new p).getBrowserPublicKey(),this.browserPrivateKey=(new p).getBrowserPrivateKey(),this.platform=(new p).getPlatform(),this.version=(new p).getVersion(),this.browserName=(new p).getBrowserName(),this.browserVersion=(new p).getBrowserVersion(),this.osName=(new p).getOsName(),this.osVersion=(new p).getOsVersion(),this.deviceType=(new p).getDeviceType(),(new p).getEnabled()&&(this.enabled="true"===(new p).getEnabled()),(new p).getExternalId()&&(this.externalCode=(new p).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new p).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new p).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},P=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),T=class{static isServiceTimestampExceed(){return!(new p).getServiceTimestamp()||(new p).getServiceSyncTime()<=(Date.now()-(new p).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},A=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new g("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},N=new g("[IND]Crypto"),L=new TextEncoder("utf-8"),C="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",L.encode(t),{name:C,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(C,n,L.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return N.d("hmac: ",s).writeLog(),s}catch(t){return void N.e("error:",t).writeLog()}}},x=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},k=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},B={Repository:p,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=u(void 0);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(545)),i=u(r(358)),o=u(r(568)),s=u(r(801)),a=u(r(136));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var u=p(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==c(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,u,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function f(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){f(o,n,i,s,a,"next",t)}function a(t){f(o,n,i,s,a,"throw",t)}s(void 0)}))}}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==c(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===c(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,u,c,f,d,y,E;return e=t,r=[{key:"getURL",value:(E=h(l().mark((function t(){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return E.apply(this,arguments)})},{key:"call",value:(y=h(l().mark((function t(e,r,u,c){var f,h,p,d,y;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return f=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&f.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),h=t.t2+t.t3,u.isJourneyRequest()&&(h=h.replace("v1","v2")),p={method:e,headers:u.addHeaders()},e!==this.GET&&(p.body=JSON.stringify(u.getBody())),c&&(p.credentials=c),t.prev=13,t.next=16,fetch(h,p);case 16:return d=t.sent,t.next=19,d.json();case 19:if(y=t.sent,!d.ok){t.next=23;break}return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\nResponse Body:",JSON.stringify(y.data,null,"\t")).writeLog(),t.abrupt("return",y);case 23:return f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\n").writeLog(),t.abrupt("return",new i.default(y.statusCode,y.message));case 27:return t.prev=27,t.t4=t.catch(13),f.d("Method: "+e+"\nURL: "+h+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 31:case"end":return t.stop()}}),t,this,[[13,27]])}))),function(t,e,r,n){return y.apply(this,arguments)})},{key:"get",value:(d=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(f=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return f.apply(this,arguments)})},{key:"put",value:(c=h(l().mark((function t(e,r,n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return c.apply(this,arguments)})},{key:"delete",value:(u=h(l().mark((function t(e,r){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return u.apply(this,arguments)})}],r&&p(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=s},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version,n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}}),e.default=n},106:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.default=r},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}var s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r;return e=t,(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=s},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}}},358:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=function(t,e,r){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=r},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},90:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(901),i=l(r(354)),o=l(r(202)),s=l(r(801)),a=l(r(358)),u=l(r(22)),c=l(r(90));function l(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(){n=function(){return e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l;return e=t,r=[{key:"getDB",value:(l=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"get",value:(c=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return c.apply(this,arguments)})},{key:"put",value:(u=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(a=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return a.apply(this,arguments)})},{key:"getItem",value:(i=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})}],r&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new a},795:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(){c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var c=p(t[i],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var p=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS"}var e,r,a,u,l,p,d,y,E,g,v,m,I,b,_,S;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(S=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return S.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"getAppKeySync",value:(_=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return _.apply(this,arguments)})},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){return i.default.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){return i.default.getItem(this.LOCATION_UPDATE_MINUTES)||30}},{key:"setRequestLocation",value:(b=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getExternalIdRequest",value:(E=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return E.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getRegisteredByCookie",value:(y=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(d=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}},{key:"setInAppTopicList",value:(p=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getInAppTopicList",value:(l=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return l.apply(this,arguments)})},{key:"setTopicList",value:(u=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"getTopicList",value:(a=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return a.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=p},636:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=i},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=s},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=p(t[i],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l;return e=t,r=[{key:"getPermissions",value:(l=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getPermission",value:(a=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return a.apply(this,arguments)})},{key:"setPermissionsCallback",value:(o=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setCallback",value:(n=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",E="executing",g="completed",v={};function m(){}function I(){}function b(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(_=O);var P=b.prototype=m.prototype=Object.create(_);function w(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(o,s,a,u){var c=p(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,s){if(i===E)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=E;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?g:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=p(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(i(e)+" is not iterable")}return I.prototype=b,s(P,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:I,configurable:!0}),I.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},w(R.prototype),f(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(h(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=e.CryptoUtils=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i;return e=t,r=[{key:"createHmac",value:(n=o().mark((function t(e,r){var n,i,s,a,f,h;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i=null===(n=window)||void 0===n||null===(n=n.crypto)||void 0===n?void 0:n.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,i.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return s=t.sent,t.next=9,i.sign(l,s,c.encode(r));case 9:return a=t.sent,f=new Uint8Array(a),h=Array.prototype.map.call(f,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",h).writeLog(),t.abrupt("return",h);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}],r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=f},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=new s},970:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],n&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=n},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},492:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},506:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"TopicUtils",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=h(r(306)),i=h(r(897)),o=h(r(95)),s=h(r(568)),a=h(r(970)),u=h(r(545)),c=r(136),l=h(r(506)),f=h(r(492));function h(t){return t&&t.__esModule?t:{default:t}}},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.3.3","_id":"indigitall-web-core@4.3.3","_inBundle":false,"_integrity":"sha512-DKC3qMLRDxUkyleQlaq4aoDnKKSoyY0wg2IfRosrqpGl1kjP8x8uh8997QnvITgeN+ZpLL9xyW6no/uxOlizRw==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.3.3","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.3.3","saveSpec":null,"fetchSpec":"4.3.3"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.3.3.tgz","_shasum":"db9d055f40fd2e1ac53208d6fec0f0784b88f8fb","_spec":"indigitall-web-core@4.3.3","_where":"/home/circleci/webpush/inbox","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.3.3"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.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";r.r(n),r.d(n,{default:()=>C});const{Repository:t}=r(872).Core,e=new class extends t{constructor(){super(),this.AUTH_TOKEN=this.REPOSITORY+".AUTH_TOKEN",this.INBOX_AUTH_MODE=this.REPOSITORY+".INBOX_AUTH_MODE",this.URL_INBOX_API=this.REPOSITORY+".URL_INBOX_API"}async setDeviceId(t){this.setStorage(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}setAuthToken(t){this.setStorage(this.AUTH_TOKEN,t)}getAuthToken(){return this.getStorage(this.AUTH_TOKEN)}setInboxAuthMode(t){this.setStorage(this.INBOX_AUTH_MODE,t)}getInboxAuthMode(){return this.getStorage(this.INBOX_AUTH_MODE)}async getUrlInboxApi(){return this.getStorage(this.URL_INBOX_API)}async setUrlInboxApi(t){this.setStorage(this.URL_INBOX_API,t)}},{BaseClient:o}=r(872).Core.Api,{Config:s}=r(872).Core,{ErrorModel:a}=r(872).Core.Models,{CommonUtils:u}=r(872).Core.Utils,c=new class extends o{constructor(){super(),this.URL_BASE=s.client.INBOX_URL_BASE,this.ENDPOINT_INBOX_NOTIFICATIONS="/notification",this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID=this.ENDPOINT_INBOX_NOTIFICATIONS+"/{sendingId}",this.ENDPOINT_INBOX_COUNTER="/counters",this.ENDPOINT_INBOX_AUTH="/auth/webhook"}async getURL(){return await e.getUrlInboxApi()||this.URL_BASE}async postInboxAuth(t,r,n){const i=await this.post(this.ENDPOINT_INBOX_AUTH,t.postInboxAuth());if(!i||i instanceof a||!i.data)i?u.isFunction(n)&&n(i):u.isFunction(n)&&n();else{const t=i.data.token;e.setAuthToken(t),u.isFunction(r)&&r(i)}return!0}async getInbox(t,e,r){const n=await this.get(this.ENDPOINT_INBOX_NOTIFICATIONS,t.getInboxPushRequest());return this.getInboxResponseStatus(n,e,r),!0}async putInboxPush(t,e,r){const n=await this.put(this.ENDPOINT_INBOX_NOTIFICATIONS,t.putInboxPushRequest());return this.getInboxResponseEdit(n,e,r),!0}async getInboxPushWithSendingId(t,e,r,n){const i=await this.get(this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID,t.getInboxPushRequestWithSendingId());return this.getNotificationResponseStatus(i,e,r,n),!0}async putInboxPushWithSendingId(t,e,r,n){const i=await this.put(this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID,t.putInboxWithSendingId());return this.getNotificationResponseStatus(i,e,r,n),!0}async getInboxCounter(t,e,r){const n=await this.get(this.ENDPOINT_INBOX_COUNTER,t.getCounter());this.getCounterStatus(n,e,r)}async getInboxResponseStatus(t,e,r){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const r=new C(t.data);u.isFunction(e)&&e(r)}else t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}async getInboxResponseEdit(t,e,r){t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300?u.isFunction(e)&&e():t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}getNotifications(t,e){const r=[];for(let n=0;n<t.length;n++){null!=t[n].sentAt&&null!=e&&t[n].sentAt<e&&(read=!0);const i=new InboxNotification(t[n],e);r.push(i)}return r}async getNotificationResponseStatus(t,e,r,n){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const t=new InboxNotification(notifications[i],e);u.isFunction(r)&&r(t)}else t?u.isFunction(n)&&n(t):u.isFunction(n)&&n()}async getCounterStatus(t,e,r){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const r={click:t.data.click,sent:t.data.sent,deleted:t.data.deleted,unread:this.getUnreadCounters(t.data.unread)};u.isFunction(e)&&e(r)}else t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}getUnreadCounters(t){return{count:t.count,lastAccess:t.lastAccess}}},{BaseRequest:l}=r(872).Core.Api,f=class extends l{constructor(){super()}postInboxAuth(){return this.body=this.json,this}setJson(t){this.json=t}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}},h=Object.freeze({SENT:"sent",CLICK:"click",DELETED:"deleted"});window.inboxStatus=h;const p=h,d=Object.freeze({NONE:"none",DEFAULT:"default",WEBHOOK:"webhook"}),{BaseRequest:y}=r(872).Core.Api,E=class extends y{constructor(){super(),null!=e.getExternalId()&&(this.externalId=e.getExternalId()),null!=e.getAuthToken()&&e.getInboxAuthMode()==d.WEBHOOK&&(this.headers.Authorization="Bearer "+e.getAuthToken()),this.sendingId="",this.sendingIds=null,this.page=0,this.pageSize=0,this.dateFrom="",this.dateTo="",this.status=p.INBOXSTATUS_SENT,this.statusList=null}getInboxPushRequest(){return this.params=this.createQueryString(),this}putInboxPushRequest(){return this.params=this.createQueryStringExternalId(),this.body=this.createBodyJson(),this}getInboxPushRequestWithSendingId(){return this.pathParams["{sendingId}"]=this.sendingId,this.params=this.createQueryStringExternalId(),this}putInboxWithSendingId(){return this.pathParams["{sendingId}"]=this.sendingId,this.params=this.createQueryStringExternalId(),this.body=this.createBodyStatusJson(),this}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}createQueryString(){let t="";if(this.page&&(t+=this.PARAM_INBOX_PAGE+"="+this.page+"&"),this.pageSize&&(t+=this.PARAM_INBOX_PAGE_SIZE+"="+this.pageSize+"&"),this.dateFrom&&(t+=this.PARAM_INBOX_DATE_FROM+"="+this.dateFrom+"&"),this.dateTo&&(t+=this.PARAM_INBOX_DATE_TO+"="+this.dateTo+"&"),this.statusList){let e="";for(let t=0;t<this.statusList.length;t++)e+=this.statusList[t],t!=this.statusList.length-1&&(e+=",");t+=this.PARAM_INBOX_STATUS+"="+e+"&"}return t+this.createQueryStringExternalId()}createQueryStringExternalId(){return this.PARAM_INBOX_EXTERNALID+"="+this.externalId}createBodyJson(){let t={};const e=[];try{if(t=this.createBodyStatusJson(),this.sendingIds)for(let t=0;t<this.sendingIds.length;t++)e.push(this.sendingIds[t]);t.sendingIds=e}catch(t){console.log("Error Inbox request :"+t)}return t}createBodyStatusJson(){const t={};return this.status&&(t.status=this.status),t}setSendingId(t){this.sendingId=t}setSendingIds(t){this.sendingIds=t}setPage(t){this.page=t}setPageSize(t){this.pageSize=t}setDateFrom(t){this.dateFrom=t}setDateTo(t){this.dateTo=t}setStatus(t){this.status=t}setStatusList(t){this.statusList=t}},{BaseRequest:g}=r(872).Core.Api,v=class extends g{constructor(){super(),null!=e.getExternalId()&&(this.externalId=e.getExternalId()),null!=e.getAuthToken()&&e.getInboxAuthMode()==d.WEBHOOK&&(this.headers.Authorization="Bearer "+e.getAuthToken())}getCounter(){return this.params=this.createQueryStringExternalId(),this}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}createQueryStringExternalId(){return this.PARAM_INBOX_EXTERNALID+"="+this.externalId}};class m{constructor(t,e){t&&(t.id&&(this.id=t.id),t.externalId&&(this.externalId=t.externalId),t.sentAt&&(this.sentAt=t.sentAt),t.status&&(this.status=t.status),t.sendingId&&(this.sendingId=t.sendingId),t.message&&(this.message=t.message),t.campaignId&&(this.campaignId=t.campaignId),this.read=!1,this.sentAt&&e&&this.sentAt<e&&(this.read=!0))}}window.inboxNotification=m;const I=m,{ErrorDictionary:b}=r(872).Core.Models,_=b.ErrorCode;Object.assign(_,{INBOX_GET_ERROR:3001,INBOX_GET_PAGE_ERROR:3011,INBOX_EXTERNAL_ID_NO_REGISTERED:3012,INBOX_NO_MESSAGES:3013,INBOX_IS_REQUESTING_PAGE:3014,INBOX_EMPTY:3015,INBOX_GENERAL_ERROR:3600});const S=b.ErrorMessage;Object.assign(S,{INBOX_GET_ERROR:"inbox GET request error",INBOX_GET_PAGE_ERROR:"error inbox get page",INBOX_EXTERNAL_ID_NO_REGISTERED:"external Id is not registered",INBOX_NO_MESSAGES:"There are no more messages on Inbox",INBOX_IS_REQUESTING_PAGE:"Wait. Is Requesting new page",INBOX_EMPTY:"There are no messages on Inbox",INBOX_GENERAL_ERROR:"general error"});const O={ErrorCode:_,ErrorMessage:S},{Validations:P,Log:w}=r(872).Core.Utils,R=class extends P{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new w("[IND]InboxValidations: "),r=e.getDeviceId();let n=!0;return this.isAppKeyFormat()||(n=!1,t.w("appKey is null or empty").writeLog()),this.isValidFormat(r)||(n=!1,t.w("deviceId is null or empty").writeLog()),n}},{CommonUtils:T,ErrorUtils:A,Log:N}=r(872).Core.Utils;class L{constructor(t){if(t){if(t.lastAccess&&(this.lastAccess=t.lastAccess),t.numPage?this.page=t.numPage:this.page=0,t.pageSize&&(this.pageSize=t.pageSize),t.count&&(this.count=t.count),t.notifications){this.notifications=[];const e=t.notifications;for(let t=0;t<e.length;t++){const r=new I(e[t],this.lastAccess);this.notifications.push(r)}}this.totalPages=Math.trunc(this.count/this.pageSize)}this.dateFrom=null,this.dateTo=null,this.statusList=null,this.newNotifications=[I],this.isRequestingPage=!1}static generateAuthToken(t,e){let r={};navigator.indigitallGetAuthConfig&&T.isFunction(navigator.indigitallGetAuthConfig)&&(r=navigator.indigitallGetAuthConfig());const n=new f;n.setJson(r),c.postInboxAuth(n,t,e)}static getMessagesCountWithAuth(t,e,r){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getMessagesCount(e,r)}static setUrlInboxApi(t){e.setUrlInboxApi(t)}static setInboxAuthMode(t){e.setInboxAuthMode(t)}static getMessagesCount(t,r){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new v;c.getInboxCounter(e,t,(r=>{401===r.errorCode?this.generateAuthToken((()=>{c.getInboxCounter(e,t,r)}),r):T.isFunction(r)&&r(r)}))}else T.isFunction(r)&&r(A.showError(O,O.ErrorCode.INBOX_GET_ERROR));else T.isFunction(r)&&r(A.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}static getInboxWithAuth(t,e,r){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getInbox(e,r)}static getInbox(t,e){L.getInboxWithPage(null,null,null,null,null,t,e)}static getInboxWithPageAuth(t,e,r,n,i,o,s,a){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getInboxWithPage(e,r,n,i,o,s,a)}static getInboxWithPage(t,r,n,i,o,s,a){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new E;t&&e.setPage(t),r&&e.setPageSize(r),n&&(e.setDateFrom(n),this.dateFrom=n),i&&(e.setDateTo(i),this.dateTo=i),o&&(e.setStatusList(o),this.statusList=o),c.getInbox(e,(t=>{this.totalPages=t.totalPages,0!=t.count?T.isFunction(s)&&s(t):T.isFunction(a)&&a(A.showError(O,O.ErrorCode.INBOX_GET_PAGE_ERROR))}),(t=>{401==t.errorCode?this.generateAuthToken((()=>{c.getInbox(e,(t=>{this.totalPages=t.totalPages,T.isFunction(s)&&s(t)}),t)}),t):T.isFunction(t)&&t(t)}))}else T.isFunction(a)&&a(A.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(a)&&a(A.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}getNextPage(t,r){const n=new N("[IND]Inbox: ");if(this.isRequestingPage)n.w(O.ErrorMessage.INBOX_IS_REQUESTING_PAGE).writeLog();else if(this.isRequestingPage=!0,this.page+1<this.totalPages)if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new E;(this.page||0==this.page)&&e.setPage(this.page+1),this.pageSize&&e.setPageSize(this.pageSize),this.dateFrom&&e.setDateFrom(this.dateFrom),this.dateTo&&e.setDateTo(this.dateTo),this.statusList&&e.setStatusList(this.statusList),c.getInbox(e,(e=>{this.notifications=this.notifications.concat(e.notifications),this.newNotifications=e.notifications,this.lastAccess=e.lastAccess,this.count=e.count,this.page=e.page,this.pageSize=e.pageSize,this.totalPages=e.totalPages,this.isRequestingPage=!1,T.isFunction(t)&&t(this,this.newNotifications)}),(r=>{401===r.errorCode?this.generateAuthToken((()=>{c.getInbox(e,(e=>{this.notifications=this.notifications.concat(e.notifications),this.newNotifications=e.notifications,this.lastAccess=e.lastAccess,this.count=e.count,this.page=e.page,this.pageSize=e.pageSize,this.totalPages=e.totalPages,this.isRequestingPage=!1,T.isFunction(t)&&t(this,this.newNotifications)}),r)}),r):(this.isRequestingPage=!1,T.isFunction(r)&&r())}))}else this.isRequestingPage=!1,T.isFunction(r)&&r(A.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(r)&&r(A.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST));else this.isRequestingPage=!1,T.isFunction(r)&&r(A.showError(O,O.ErrorCode.INBOX_NO_MESSAGES))}massiveEditNotifications(t,r,n,i){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t&&r){const e=new E;e.setSendingIds(t),e.setStatus(r),c.putInboxPush(e,n,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.putInboxPush(e,n,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(i)&&i(A.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(i)&&i(A.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}getInfoFromNotification(t,r,n){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t){const e=new E;e.setSendingId(t),c.getInboxPushWithSendingId(e,this.lastAccess,r,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.getInboxPushWithSendingId(e,this.lastAccess,r,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(n)&&n(A.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(n)&&n(A.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}modifyStatusFromNotification(t,r,n,i){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t&&r){const e=new E;e.setSendingId(t),e.setStatus(r),c.putInboxPushWithSendingId(e,this.lastAccess,n,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.putInboxPushWithSendingId(e,this.lastAccess,n,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(i)&&i(A.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(i)&&i(A.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}}const C=L})(),n})(),t.exports=e()},277:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0});var i={};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}return i.default=t,r&&r.set(t,i),i}(r(301));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}))},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.3.3","_id":"indigitall-web-core@4.3.3","_inBundle":false,"_integrity":"sha512-DKC3qMLRDxUkyleQlaq4aoDnKKSoyY0wg2IfRosrqpGl1kjP8x8uh8997QnvITgeN+ZpLL9xyW6no/uxOlizRw==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.3.3","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.3.3","saveSpec":null,"fetchSpec":"4.3.3"},"_requiredBy":["#USER","/","/indigitall-web-inbox"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.3.3.tgz","_shasum":"db9d055f40fd2e1ac53208d6fec0f0784b88f8fb","_spec":"indigitall-web-core@4.3.3","_where":"/home/circleci/webpush/push","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.3.3"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.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";r.r(n),r.d(n,{default:()=>Et});var t=r(277),e=r.n(t);const{Repository:i}=r(872).Core,o=new class extends i{constructor(){super(),this.SAFARI_WEBSITE_PUSH_ID=this.REPOSITORY+".SAFARI_WEBSITE_PUSH_ID",this.PUSH_TOKEN=this.REPOSITORY+".PUSH_TOKEN",this.PERMISSION_PUSH=this.REPOSITORY+".PERMISSION_PUSH",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.DEVICE_JSON=this.REPOSITORY+".DEVICE_JSON",this.PUT_REQUEST_TIMESTAMP=this.REPOSITORY+".PUT_REQUEST_TIMESTAMP",this.WORKER_PATH=this.REPOSITORY+".WORKER_PATH",this.TEST=this.REPOSITORY+".TEST",this.SAFARI_GESTURE_REQUEST_PERMISSION=this.REPOSITORY+".SAFARI_GESTURE_REQUEST_PERMISSION",this.UPDATE_TOPIC_SUBSCRIBE=this.REPOSITORY+".UPDATE_TOPIC_SUBSCRIBE",this.TOPIC_SYNC_TIMESTAMP=this.REPOSITORY+".TOPIC_SYNC_TIMESTAMP",this.TOPIC_SEMAPHORE=this.REPOSITORY+".TOPIC_SEMAPHORE",this.TOPIC_SYNC_IS_PROCESSING=this.REPOSITORY+".TOPIC_SYNC_IS_PROCESSING"}async setDeviceId(t){this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,t),this.db&&this.db.IDB&&await this.db.setItem(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}async getDeviceIdSync(){if(this.db&&this.db.IDB)return await this.db.getItem(this.DEVICE_ID)}setPushToken(t){this.setStorage(this.PUSH_TOKEN,t)}getPushToken(){return this.getStorage(this.PUSH_TOKEN)}setSafariWebsitePushId(t){this.setStorage(this.SAFARI_WEBSITE_PUSH_ID,t)}getSafariWebsitePushId(){return this.getStorage(this.SAFARI_WEBSITE_PUSH_ID)}setPermissionPush(t){this.setStorage(this.PERMISSION_PUSH,t)}getPermissionPush(){return this.getStorage(this.PERMISSION_PUSH)}async getUrlDeviceApi(){let t;try{this.storage&&this.storage.isLocalStorageAvailable()?t=this.getStorage(this.URL_DEVICE_API):this.db&&this.db.IDB&&(t=await this.db.getItem(this.URL_DEVICE_API))}catch(t){}return t}async setUrlDeviceApi(t){this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,t),this.db&&this.db.IDB&&await this.db.setItem(this.URL_DEVICE_API,t)}async getDeviceJson(){return this.getStorage(this.DEVICE_JSON)}async setDeviceJson(t){this.setStorage(this.DEVICE_JSON,t)}async getPutRequestTimestamp(){return this.getStorage(this.PUT_REQUEST_TIMESTAMP)}async setPutRequestTimestamp(t){this.setStorage(this.PUT_REQUEST_TIMESTAMP,t)}setWorkerPath(t){this.setStorage(this.WORKER_PATH,t)}getWorkerPath(){return this.getStorage(this.WORKER_PATH)}setTestValue(t){this.setStorage(this.TEST,t)}getTestValue(){return this.getStorage(this.TEST)}setSafariGestureRequestPermission(t){this.setStorage(this.SAFARI_GESTURE_REQUEST_PERMISSION,t)}getSafariGestureRequestPermission(){return this.getStorage(this.SAFARI_GESTURE_REQUEST_PERMISSION)}async setUpdateTopicSubscribe(t){this.db&&this.db.IDB&&await this.db.setItem(this.UPDATE_TOPIC_SUBSCRIBE,t)}async getUpdateTopicSubscribe(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.UPDATE_TOPIC_SUBSCRIBE))}catch(t){}return t}async setTopicSyncTimestamp(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_SYNC_TIMESTAMP,t)}async getTopicSyncTimestamp(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_SYNC_TIMESTAMP))}catch(t){}return t}async setTopicSemaphore(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_SEMAPHORE,t)}async getTopicSemaphore(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_SEMAPHORE))}catch(t){}return t}async setTopicSyncIsProcessing(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_SYNC_IS_PROCESSING,t)}async getTopicSyncIsProcessing(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_SYNC_IS_PROCESSING))}catch(t){}return t}},{ErrorDictionary:s}=r(872).Core.Models,a=s.ErrorCode;Object.assign(a,{GENERAL_ERROR_BAD_REQUEST:601,GENERAL_ERROR_APPKEY_BAD_REQUEST:602,PUSH_INITIALIZATION_ERROR:1e3,PUSH_RECEPTION_ERROR:1200,PUSH_TOPICS_ERROR:1400,PUSH_DEVICE_ERROR:1500,PUSH_EVENT_ERROR:1600,API_APPKEY_NOT_VALID:1601});const u=s.ErrorMessage;Object.assign(u,{GENERAL_ERROR_BAD_REQUEST:"AppKey or DeviceId are null or empty",GENERAL_ERROR_APPKEY_BAD_REQUEST:"AppKey is null or empty",PUSH_INITIALIZATION_ERROR:"initialization error",PUSH_RECEPTION_ERROR:"push reception error",PUSH_TOPICS_ERROR:"push topics error",PUSH_DEVICE_ERROR:"device error",PUSH_EVENT_ERROR:"event error",API_APPKEY_NOT_VALID:"appKey is missing'"});const c={ErrorCode:a,ErrorMessage:u},{BaseRequest:l}=r(872).Core.Api,{EventType:f}=r(872).Core.Models,h=class extends l{constructor(){super()}setEventType(t){this.eventType=t}setPushId(t){this.pushId=t}setClickedButton(t){this.clickedButton=t}setSendingId(t){this.sendingId=t}setPermissionType(t){this.permissionType=t}setLocation(t,e){this.latitude=t,this.longitude=e}setDeviceId(t){this.deviceId=t}setPlatform(t){this.platform=t}setAppKey(t){this.appKey=t}setCustomData(t){this.customData=t}async setExternalCodeRequest(){this.externalCode=await o.getExternalIdRequest()}setExternalCode(t){this.externalCode=t}setCampaingId(t){this.campaignId=t}setJourneyStateId(t){this.journeyStateId=t}setJourneyExecution(t){this.journeyExecution=t}setCjCurrentStateId(t){this.cjCurrentStateId=t}postEventPushRequest(){const t={};return t.deviceId=this.deviceId,t.platform=this.platform,this.eventType&&(t.eventType=this.eventType),this.pushId&&(t.pushId=this.pushId),t.clickedButton=this.clickedButton,null!=this.externalCode&&(t.externalCode=this.externalCode),this.sendingId&&"undefined"!=this.sendingId&&(t.sendingId=this.sendingId),this.journeyStateId&&(t.journeyStateId=this.journeyStateId),this.journeyExecution&&(t.journeyExecution=this.journeyExecution),this.cjCurrentStateId&&(t.cjCurrentStateId=this.cjCurrentStateId),this.campaignId&&(t.campaignId=this.campaignId),this.body=t,this}postEventVisitRequest(){const t={};return t.deviceId=o.getDeviceId(),t.eventType=f.EVENT_TYPE_UPDATE,this.body=t,this}postEventPermissionRequest(){const t={};return t.deviceId=o.getDeviceId(),this.eventType&&(t.eventType=this.eventType),this.permissionType&&(t.permissionType=this.permissionType),this.body=t,this}postEventLocationRequest(){const t={};return t.deviceId=o.getDeviceId(),t.eventType=f.EVENT_TYPE_UPDATE,this.latitude&&(t.latitude=this.latitude),this.longitude&&(t.longitude=this.longitude),this.body=t,this}postEventCustomRequest(){const t={};return this.deviceId&&(t.deviceId=this.deviceId),this.eventType&&(t.eventType=this.eventType),this.customData&&(t.customData=this.customData),this.externalCode&&(t.externalCode=this.externalCode),this.body=t,this}},p=class{static urlBase64ToUint8Array(t){const e=(t+"=".repeat((4-t.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),r=window.atob(e),n=new Uint8Array(r.length);for(let t=0;t<r.length;++t)n[t]=r.charCodeAt(t);return n}static callEventPermission(t,e){const r=new h;r.setAppKey(o.getAppKey()),r.setDeviceId(o.getDeviceId()),r.setPermissionType(t),r.setEventType(e),R.postEventPermission(r)}static async getPutRequestTimestamp(){return await o.getPutRequestTimestamp()?o.getPutRequestTimestamp():Date.now()+6048e5}},{Validations:d,Log:y}=r(872).Core.Utils,E=class extends d{static isAppKeyFormat(){const t=o.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new y("[IND]PushValidations: "),e=o.getDeviceId();let r=!0;return this.isAppKeyFormat()||(r=!1,t.w("appKey is null or empty").writeLog()),this.isValidFormat(e)||(r=!1,t.w("deviceId is null or empty").writeLog()),r}static async isPutRequestExceed(){return await p.getPutRequestTimestamp()<=Date.now()}static isSafariBrowserDevice(){const t=window.navigator.userAgent,e=!!t.match(/iPad/i)||!!t.match(/iPhone/i),r=!!t.match(/WebKit/i);return e&&r&&!t.match(/CriOS/i)&&!t.match(/OPiOS/i)}},{Device:g}=r(872).Core.Models,v=class extends g{constructor(t=null,e){super(t,e),null==t?(null!=o.getDeviceId()&&(this.deviceId=o.getDeviceId()),null!=o.getPushToken()&&(this.pushToken=o.getPushToken())):e?t.deviceId&&(this.deviceId=t.deviceId,o.setDeviceId(this.deviceId)):(t.deviceId&&(this.deviceId=t.deviceId),t.pushToken&&(this.pushToken=t.pushToken))}static setDeviceJson(t){o.setDeviceJson(JSON.stringify(t.toJSON()))}getDeviceId(){return this.deviceId}getPushToken(){return this.pushToken}toJSON(){const t=super.toJSON();return this.deviceId&&(t.deviceId=this.deviceId),this.pushToken&&(t.pushToken=this.pushToken),t}},{Config:m}=r(872).Core,{BaseClient:I}=r(872).Core.Api,{ErrorModel:b,Channel:_}=r(872).Core.Models,{TopicUtils:S,Log:O,CommonUtils:P,ErrorUtils:w}=r(872).Core.Utils,R=new class extends I{constructor(){super(),this.URL_BASE=m.client.URL_BASE,this.ENDPOINT_APPLICATION="/application",this.ENDPOINT_APPLICATION_ALL=this.ENDPOINT_APPLICATION+"/all",this.ENDPOINT_DEVICE="/device",this.ENDPOINT_DEVICE_TOPICS=this.ENDPOINT_DEVICE+"/topics",this.ENDPOINT_PUSH="/push",this.ENDPOINT_EVENT="/event",this.ENDPOINT_EVENT_PUSH=this.ENDPOINT_EVENT+"/push",this.ENDPOINT_EVENT_VISIT=this.ENDPOINT_EVENT+"/visit",this.ENDPOINT_EVENT_PERMISSION=this.ENDPOINT_EVENT+"/permission",this.ENDPOINT_EVENT_LOCATION=this.ENDPOINT_EVENT+"/location",this.ENDPOINT_EVENT_CUSTOM=this.ENDPOINT_EVENT+"/custom",this.ENDPOINT_EVENT_CUSTOM_BEACON=this.ENDPOINT_EVENT_CUSTOM+"/beacon",this.ENDPOINT_BROWSER="/browser",this.log=new O("[IND]Client: ")}async getURL(){return await o.getUrlDeviceApi()||this.URL_BASE}async getApplicationAll(t,e,r){if(E.isAppKeyFormat()){const n=await this.get(this.ENDPOINT_APPLICATION_ALL,t.getApplicationRequest());!n||n instanceof b?n?P.isFunction(r)&&r(n):P.isFunction(r)&&r():P.isFunction(e)&&e(n)}else P.isFunction(r)&&r(w.showError(c,c.ErrorCode.BAD_REQUEST_SERVER_ERROR));return!0}async postDevice(t,e,r){if(E.isAppKeyFormat()){const n=await this.post(this.ENDPOINT_DEVICE,t.postDeviceRequest(),"include");if(!n||n instanceof b)n?P.isFunction(r)&&r(n):P.isFunction(r)&&r();else{const t={enabled:n.data.enabled,deviceId:n.data.deviceId,registeredByCookie:n.data.registeredByCookie};await o.setDeviceId(t.deviceId),P.isFunction(e)&&e(new v(t,!0))}}else P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_APPKEY_BAD_REQUEST));return!0}async putDevice(t,e,r){const n=new v,i=await E.isPutRequestExceed();if(t.deviceUpdate||null==await o.getPutRequestTimestamp()||i)if(E.isValidFormatRequest()){o.setPutRequestTimestamp(await p.getPutRequestTimestamp());const i=await this.put(this.ENDPOINT_DEVICE,t.putDeviceRequest(n),"include");if(!i||i instanceof b)i?P.isFunction(r)&&r(i):P.isFunction(r)&&r();else{const t={enabled:i.data.enabled,deviceId:i.data.deviceId,registeredByCookie:i.data.registeredByCookie};P.isFunction(e)&&e(new v(t,!0))}}else P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));else P.isFunction(e)&&e(n)}async getDevice(t,e,r){if(E.isValidFormatRequest()){const n=await this.get(this.ENDPOINT_DEVICE,t.getDeviceRequest());if(!n||n instanceof b)n?P.isFunction(r)&&r(n):P.isFunction(r)&&r();else{const t={enabled:n.data.enabled,deviceId:n.data.deviceId};P.isFunction(e)&&e(new v(t,!0))}}else P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async getDeviceTopics(t,e,r){if(E.isValidFormatRequest()){const n=await this.get(this.ENDPOINT_DEVICE_TOPICS,t.getDeviceTopicsRequest());!n||n instanceof b?n?P.isFunction(r)&&r(n):P.isFunction(r)&&r():P.isFunction(e)&&e(S.setTopicChannel(n.data.topics,_.PUSH))}else P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postDeviceTopics(t,e,r){return E.isValidFormatRequest()?await this.postDeviceTopicsRequest(t,e,r):P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST)),!0}async postDeviceTopicsRequest(t,e,r){const n=await this.post(this.ENDPOINT_DEVICE_TOPICS,t.postDeviceTopicsRequest());if(!n||n instanceof b)n?P.isFunction(r)&&r(n):P.isFunction(r)&&r();else{const t=n.data.topics;P.isFunction(e)&&e(t)}}async deleteDeviceTopics(t,e,r){return E.isValidFormatRequest()?this.deleteDeviceTopicsRequest(t,e,r):P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST)),!0}async deleteDeviceTopicsRequest(t,e,r){const n=await this.delete(this.ENDPOINT_DEVICE_TOPICS,t.deleteDeviceTopicsRequest());if(!n||n instanceof b)n?P.isFunction(r)&&r(n):P.isFunction(r)&&r();else{const t=n.data.topics;P.isFunction(e)&&e(t)}}async postEventPush(t){E.isValidFormatRequest()&&await this.post(this.ENDPOINT_EVENT_PUSH,t.postEventPushRequest())}postEventVisit(t){E.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_VISIT,t.postEventVisitRequest())}postEventPermission(t){E.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_PERMISSION,t.postEventPermissionRequest())}postEventLocation(t){E.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_LOCATION,t.postEventLocationRequest())}async getBrowser(t,e,r){if(E.isAppKeyFormat()){const n=await this.get(this.ENDPOINT_BROWSER,t);if(!n||n instanceof b)n?P.isFunction(r)&&r(n):P.isFunction(r)&&r();else{const t={browserName:n.data.browserName,browserVersion:n.data.browserVersion,deviceType:n.data.deviceType,osName:n.data.osName,osVersion:n.data.osVersion,supported:n.data.supported,platform:n.data.platform};await o.setBrowserName(t.browserName),o.setBrowserVersion(t.browserVersion),await o.setOsName(t.osName),o.setOsVersion(t.osVersion),o.setDeviceType(t.deviceType),o.setSupported(t.supported),E.isSafariBrowserDevice()?await o.setPlatform("webpush"):await o.setPlatform(t.platform),P.isFunction(e)&&e(t)}}else P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventCustom(t,e,r){if(E.isValidFormatRequest()){const n=await this.post(this.ENDPOINT_EVENT_CUSTOM,t.postEventCustomRequest());!n||n instanceof b?n?P.isFunction(r)&&r(n):P.isFunction(r)&&r():P.isFunction(e)&&e(n)}else P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventCustomSync(t,e,r){if(E.isValidFormatRequest()){t=t.postEventCustomRequest();try{if(navigator&&"sendBeacon"in navigator){const r=await this.getURL()+this.ENDPOINT_EVENT_CUSTOM_BEACON+t.getParams();navigator.sendBeacon(r,JSON.stringify(t.getBody())),P.isFunction(e)&&e()}else{const n=await this.getURL()+this.ENDPOINT_EVENT_CUSTOM+t.getParams(),i=new XMLHttpRequest;i.open("POST",n,!1),i.setRequestHeader("Content-Type","application/json"),i.onreadystatechange=()=>{i.readyState===XMLHttpRequest.DONE&&(i.status>=200||i.status<300)?P.isFunction(e)&&e():P.isFunction(r)&&r()},i.send(JSON.stringify(t.getBody()))}}catch(t){P.isFunction(r)&&r(w.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}else P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventJourney(t,e,r){if(E.isValidFormatRequest()){const n=await this.post(this.ENDPOINT_PUSH+this.ENDPOINT_EVENT_CUSTOM,t.postEventCustomRequest());!n||n instanceof b?n?P.isFunction(r)&&r(n):P.isFunction(r)&&r():P.isFunction(e)&&e(n)}else P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventJourneySync(t,e,r){if(E.isValidFormatRequest()){t=t.postEventCustomRequest();try{let n=await this.getURL();if(n=n.replace("v1","v2"),navigator&&"sendBeacon"in navigator){const r=n+this.ENDPOINT_PUSH+this.ENDPOINT_EVENT_CUSTOM+t.getParams();navigator.sendBeacon(r,JSON.stringify(t.getBody())),P.isFunction(e)&&e()}else{const n=await this.getURL().replace("v1","v2")+this.ENDPOINT_PUSH+this.ENDPOINT_EVENT_CUSTOM+t.getParams(),i=new XMLHttpRequest;i.open("POST",n,!1),i.setRequestHeader("Content-Type","application/json"),i.onreadystatechange=()=>{i.readyState===XMLHttpRequest.DONE&&(i.status>=200||i.status<300)?P.isFunction(e)&&e():P.isFunction(r)&&r()},i.send(JSON.stringify(t.getBody()))}}catch(t){P.isFunction(r)&&r(w.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}else P.isFunction(r)&&r(w.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventPushClick(t){let e="/event/push";t.journeyStateId&&(t.setJourneyRequest(!0),e="/push/event/click"),t.setServiceWorkerRequest(!0),await this.post(e,t.postEventPushRequest())}},{Config:T}=r(872).Core,{BaseRequest:A}=r(872).Core.Api,N=class extends A{getApplicationRequest(){return this.params=this.PARAM_PLATFORM+"="+T.platform,this}},{DeviceStatus:L}=r(872).Core.Models,{BaseRequest:C}=r(872).Core.Api,D=class extends C{constructor(t=L.DEFAULT){super(),this.device=new v,this.status=t,this.notToUpdate=!1,this.deviceUpdate=!1}isDeviceUpdated(t){this.deviceUpdate=t}setDeviceId(t){this.device&&(this.device.deviceId=t)}setAppKey(t){this.appKey=t}getDeviceRequest(){return this.params=this.createQueryString(),this}postDeviceRequest(){return this.body=this.createDeviceJson(),this.status!==L.DEFAULT&&(this.body.enabled=1===this.status),this}putDeviceRequest(t){return this.params=this.createQueryString(),this.body=this.createPUTDeviceJson(t),this.status!==L.DEFAULT&&(this.body.enabled=1===this.status),this}getDeviceTopicsRequest(){return this.params=this.createQueryString(),this}postDeviceTopicsRequest(){return this.params=this.createQueryString(),this.body=this.createTopicsJson(),this}deleteDeviceTopicsRequest(){return this.params=this.createQueryString(),this.body=this.createTopicsJson(),this}createQueryString(){return this.PARAM_DEVICE_ID+"="+this.device.deviceId}createDeviceJson(){let t={};try{t=this.device.toJSON()}catch(t){}return t}createPUTDeviceJson(t){let e={};try{v.setDeviceJson(t),e=t.toJSON()}catch(t){}return e}createTopicsJson(){const t={};return this.topics&&(t.topics=this.topics),t}getDeviceId(){return this.device.getDeviceId()}setTopics(t){this.topics=t}setExternalCode(t){this.device.setExternalCode(t)}},x=Object.freeze({PERMISSION_TYPE_PUSH:"push",PERMISSION_TYPE_LOCATION:"location"}),{CorePermissions:k}=r(872).Core.Utils,M=class{static async getPermissions(){const t=await k.getPermissions(),e=await k.getPermission("push");return e&&(t.push=e.state),null===e&&window.Notification&&window.Notification.permission&&(t.push=window.Notification.permission),t}static async setPermissionsCallback(){k.setPermissionsCallback(),await k.setCallback("push",navigator.indigitallRequestPushPermission)}},{Log:B,CommonUtils:U,ErrorUtils:j}=r(872).Core.Utils,{EventType:V}=r(872).Core.Models,F="[IND]IndigitallSafari: ",Y=class{static isSafariPushNotificationSupported(){return!!E.isSafariBrowserDevice()||!!window?.safari?.pushNotification}static async launchNotificationPermissionForSafari(){const t=new B(F);if(o.getSafariGestureRequestPermission()===V.EVENT_TYPE_ASK)if(o.getSafariWebsitePushId()&&o.getDeviceId())if(E.isSafariBrowserDevice()&&o.getWorkerPath()){const t=await navigator.serviceWorker.register(o.getWorkerPath());"granted"===await window.Notification.requestPermission()&&(o.setPermissionPush(V.EVENT_TYPE_ACCEPT),Et.subscribeForPushNotification(t))}else{const t=window.safari.pushNotification.permission(o.getSafariWebsitePushId());this.checkRemotePermission(t)}else o.getSafariWebsitePushId()?t.w("error Device Id is not found").writeLog():t.w("error Safari Website Push Id is not found").writeLog();else t.w("there was not user gesture to request safari permissions").writeLog()}static async checkRemotePermission(t){const e=new B(F);try{if("default"===t.permission){const t={deviceCode:o.getDeviceId()};e.d("permission default: ",t).writeLog(),o.getPermissionPush()||p.callEventPermission(x.PERMISSION_TYPE_PUSH,V.EVENT_TYPE_ASK),window.safari.pushNotification.requestPermission(await R.getURL()+"/safari",o.getSafariWebsitePushId(),t,window.indigitall.Push.checkRemotePermission)}else"denied"===t.permission?(e.w("permission denied: ",t).writeLog(),o.getPermissionPush()&&o.getPermissionPush()!=V.EVENT_TYPE_REJECT&&(p.callEventPermission(x.PERMISSION_TYPE_PUSH,V.EVENT_TYPE_REJECT),o.setPermissionPush(V.EVENT_TYPE_REJECT))):"granted"===t.permission&&(e.d("permission granted: ",t).writeLog(),o.getPermissionPush()&&o.getPermissionPush()!=V.EVENT_TYPE_ACCEPT&&(p.callEventPermission(x.PERMISSION_TYPE_PUSH,V.EVENT_TYPE_ACCEPT),o.setPermissionPush(V.EVENT_TYPE_ACCEPT)),t.deviceToken&&t.deviceToken!==o.getPushToken()&&(o.setPushToken(t.deviceToken),R.putDevice(new D,(t=>{if(U.isFunction(navigator.indigitallOnInitialized)){const t={};t.push=o.getPermissionPush(),t.location=o.getPermissionLocation(),navigator.indigitallOnInitialized(t,new v)}U.isFunction(navigator.indigitallOnNewUserRegistered)&&!o.getNewUserTimestamp()&&(o.setNewUserTimestamp(Date.now()),navigator.indigitallOnNewUserRegistered(t)),Et.registerLocation()}),navigator.indigitallOnError),o.setServiceTimestamp(Date.now())))}catch(t){U.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(j.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}},G=new class{constructor(){this.TOPIC_SYNC_TIMESTAMP=3e4,this.TOPIC_SYNC_TAG="syncTopics",this.TOPIC_SYNC_SUBSCRIBE_CALLBACK="indigitallSyncTopicSubscribeOnSuccess",this.TOPIC_SYNC_SUBSCRIBE_ERROR_CALLBACK="indigitallSyncTopicSubscribeOnError",this.TOPIC_SYNC_UNSUBSCRIBE_CALLBACK="indigitallSyncTopicUnsubscribeOnSuccess",this.TOPIC_SYNC_UNSUBSCRIBE_ERROR_CALLBACK="indigitallSyncTopicUnsubscribeOnError"}},K=Object.freeze({GREEN:"green",RED:"red"}),{EventType:q}=r(872).Core.Models,{Config:W}=r(872).Core,X=class{static async requestBackgroundSync(){const t=await navigator.serviceWorker.getRegistration(o.getWorkerPath());return null!=t?t:null}static findIndigitallSW(t){for(let e=0;e<t.length;e++)if(void 0!==t[e]&&t[e].active&&t[e].active.scriptURL&&t[e].active.scriptURL.includes("worker.min.js"))return t[e];return null}static async sendEventRequest(t,e){const r=new h;r.setAppKey(t.appKey),r.setDeviceId(t.deviceId),r.setPlatform(W.platform),r.setPushId(""+t.id),r.setSendingId(""+t.sendingId),t.campaignId&&r.setCampaingId(""+t.campaignId),t.journeyStateId&&r.setJourneyStateId(t.journeyStateId),t.journeyExecution&&r.setJourneyExecution(t.journeyExecution),t.cjCurrentStateId&&r.setCjCurrentStateId(t.cjCurrentStateId),r.setEventType(q.EVENT_TYPE_CLICK),await r.setExternalCodeRequest(),"action-1"==e.action?r.setClickedButton(1):"action-2"==e.action?r.setClickedButton(2):r.setClickedButton(0),r.setServiceWorkerRequest(!0),await R.postEventPushClick(r)}},{CommonUtils:H}=r(872).Core.Utils,J=class{static async setTopicRequest(t){const e=new D;return e.setAppKey(await o.getAppKeySync()),e.setDeviceId(await o.getDeviceIdSync()),e.setServiceWorkerRequest(!0),e.setTopics(t),e}static async getTopicsList(t,e){try{const r=await o.getTopicList();r&&r.length>0?await st.isTopicTimestampExceed()?this.getDeviceTopicClient(t,e):(await o.setTopicSemaphore(K.GREEN),H.isFunction(t)&&t(r)):this.getDeviceTopicClient(t,e)}catch(t){await o.setTopicSemaphore(K.GREEN)}}static async getDeviceTopicClient(t,e){try{R.getDeviceTopics(new D,(async e=>{await st.setTopicTimestamp(),await o.setTopicList(e),await o.setTopicSemaphore(K.GREEN),H.isFunction(t)&&t(e)}),(async t=>{await st.setTopicTimestamp(),await o.setTopicSemaphore(K.GREEN),H.isFunction(e)&&e(t)}))}catch(t){await o.setTopicSemaphore(K.GREEN),H.isFunction(e)&&e(t)}}},Q=class{constructor(t,e){this.code=t,this.type=e}static getAllCodes(t){const e=[];for(let r=0;r<t.length;r++)e.push(t[r].code);return e}toJSON(){const t={};return this.code&&(t.code=this.code),this.type&&(t.type=this.type),t}},{Channel:z,TopicSubscribeType:$}=r(872).Core.Models,{ErrorUtils:Z,Log:tt}=r(872).Core.Utils;class et{static async syncTopics(){if(!await o.getTopicSyncIsProcessing()){await o.setTopicSyncIsProcessing(!0);const t=setTimeout((async function(){try{await et.sendTopicSync()}catch(t){}await o.setTopicSyncIsProcessing(!1),clearTimeout(t)}),G.TOPIC_SYNC_TIMESTAMP)}}static async sendTopicSync(){const t=await st.filterTopicExistingOnIDB(),e=st.topicFilter(t,$.SUBSCRIBE),r=st.topicFilter(t,$.UNSUBSCRIBE);if(e&&e.length>0)R.postDeviceTopicsRequest(await J.setTopicRequest(e),(async t=>{await st.setTopicTimestamp(),t.channel=z.PUSH,await o.setTopicList(t),st.indigitallSyncTopicEvent(G.TOPIC_SYNC_SUBSCRIBE_CALLBACK,t)}),(async t=>{st.indigitallSyncTopicEvent(G.TOPIC_SYNC_SUBSCRIBE_ERROR_CALLBACK,t)}));else if(r&&r.length>0)R.deleteDeviceTopicsRequest(await J.setTopicRequest(r),(async t=>{await st.setTopicTimestamp(),await o.setTopicList(t),st.indigitallSyncTopicEvent(G.TOPIC_SYNC_UNSUBSCRIBE_CALLBACK,t)}),(async t=>{st.indigitallSyncTopicEvent(G.TOPIC_SYNC_UNSUBSCRIBE_ERROR_CALLBACK,t)}));else{const t=Z.showError(c,c.ErrorCode.PUSH_TOPICS_ERROR,"there is no topic with one of the codes in the push topic list");st.indigitallSyncTopicEvent(G.TOPIC_SYNC_SUBSCRIBE_ERROR_CALLBACK,t),st.indigitallSyncTopicEvent(G.TOPIC_SYNC_UNSUBSCRIBE_ERROR_CALLBACK,t)}await o.setUpdateTopicSubscribe([])}static async updateTopicAction(t,e){const r=await o.getUpdateTopicSubscribe();if(r&&r.length>0){const n=new tt("[IND]TopicSyncUtils: ");try{const n=[],i=r.filter((e=>t.includes(e.code))),s=t.filter((t=>!Q.getAllCodes(r).includes(t)));if(s&&s.length>0)for(let t=0;t<s.length;t++)null!==s[t]&&n.push(new Q(s[t],e).toJSON());if(i&&i.length>0)for(let t=0;t<i.length;t++){const n=r.findIndex((e=>e.code===i[t].code)),o=new Q(i[t].code,e);r[n]=o.toJSON()}n.length>0&&await o.setUpdateTopicSubscribe(n.concat(r))}catch(t){n.e("updateTopicAction: "+t).writeLog()}}else{const r=[];for(let n=0;n<t.length;n++){const i=t[n];r.push({code:i,type:e})}await o.setUpdateTopicSubscribe(r)}}}const rt=et,{TopicSubscribeType:nt}=r(872).Core.Models,{CommonUtils:it}=r(872).Core.Utils;class ot{static async updateTopic(t,e,r,n){ot.checkTopicSemaphore().then((async()=>{await o.setTopicSemaphore(K.RED),await J.getTopicsList((async i=>{await this.setTopicCallbacks(t,r,n),await this.requestTopicBackground(G.TOPIC_SYNC_TAG),await rt.updateTopicAction(e,t)}),n)}))}static async checkTopicSemaphore(){if(await o.getTopicSemaphore()!=K.RED)return!0;this.topicSemaphoreWaitTime((()=>!0))}static async topicSemaphoreWaitTime(t){const e=setInterval((async function(){await o.getTopicSemaphore()==K.GREEN&&(clearInterval(e),t())}),1e3)}static async setTopicCallbacks(t,e,r){let n=G.TOPIC_SYNC_SUBSCRIBE_CALLBACK,i=G.TOPIC_SYNC_SUBSCRIBE_ERROR_CALLBACK;t===nt.UNSUBSCRIBE&&(n=G.TOPIC_SYNC_UNSUBSCRIBE_CALLBACK,i=G.TOPIC_SYNC_UNSUBSCRIBE_ERROR_CALLBACK);const o=new BroadcastChannel(n);o.onmessage=t=>{it.isFunction(e)&&e(t.data),o.close()};const s=new BroadcastChannel(i);s.onmessage=t=>{it.isFunction(r)&&r(t.data),s.close()}}static async requestTopicBackground(t){const e=await X.requestBackgroundSync();null!=e&&await e.sync.register(t)}static async isTopicTimestampExceed(){const t=await o.getTopicSyncTimestamp();return!(t&&t>Date.now())&&void 0!==t}static async setTopicTimestamp(){const t=Date.now()+G.TOPIC_SYNC_TIMESTAMP;await o.setTopicSyncTimestamp(t)}static indigitallSyncTopicEvent(t,e){new BroadcastChannel(t).postMessage(e)}static topicFilter(t,e){const r=[];if(t)for(let n=0;n<t.length;n++)t[n].type===e&&r.push(t[n].code);return r}static async filterTopicExistingOnIDB(){const t=await o.getUpdateTopicSubscribe(),e=await o.getTopicList(),r=[];for(let n=0;n<t.length;n++)for(let i=0;i<e.length;i++)t[n]&&e[i]&&t[n].code==e[i].code&&(!0===e[i].subscribed&&t[n].type==nt.UNSUBSCRIBE||!1===e[i].subscribed&&t[n].type==nt.SUBSCRIBE)&&r.push(t[n]);return r}}const st=ot,{EventType:at,DeviceStatus:ut}=r(872).Core.Models,{LogLevel:ct,Log:lt,CommonUtils:ft,ErrorUtils:ht,CryptoUtils:pt}=r(872).Core.Utils,dt="[IND]IndigitallPush: ";class yt{constructor(){this.config=null,this.interval=null}static async init(t){try{let r=new lt(dt);if(!t)return void r.w("config is not defined").writeLog();t.onPushPermissionChanged&&(t.requestPushPermission=t.onPushPermissionChanged),t.onLocationPermissionChanged&&(t.requestLocationPermission=t.onLocationPermissionChanged),this.config=t,this.config.logLevel?(o.setLogLevel(this.config.logLevel),r=new lt(dt)):this.config.setDebugLog&&(o.setLogLevel(ct.WARNING),r=new lt(dt));let n="https://device-api.indigitall.com/v1",i="https://inbox-api.indigitall.com/v1",s="https://device-api.indigitall.com/v2";this.config.urlDeviceApi&&(n=this.config.urlDeviceApi),this.config.urlInAppApi&&(s=this.config.urlInAppApi),this.config.urlInboxApi&&(i=this.config.urlInboxApi),await o.setUrlDeviceApi(n),e()&&e().setUrlInboxApi(i),ft.isFunction(this.config.requestPushPermission)&&(navigator.indigitallRequestPushPermission=this.config.requestPushPermission),ft.isFunction(this.config.requestLocationPermission)&&(navigator.indigitallRequestLocationPermission=this.config.requestLocationPermission),ft.isFunction(this.config.onNewUserRegistered)&&(navigator.indigitallOnNewUserRegistered=this.config.onNewUserRegistered),ft.isFunction(this.config.onInitialized)&&(navigator.indigitallOnInitialized=this.config.onInitialized),ft.isFunction(this.config.onError)&&(navigator.indigitallOnError=this.config.onError),ft.isFunction(this.config.onLocationUpdated)&&(navigator.indigitallOnLocationUpdated=this.config.onLocationUpdated);const a=await M.getPermissions();if(M.setPermissionsCallback(),a&&"denied"===a.push)return r.i("Push permission denied").writeLog(),ft.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError("Push permission denied"),!1;if(!ft.isServiceTimestampExceed())return this.device=new v,M.getPermissions().then((t=>{ft.isFunction(navigator.indigitallOnInitialized)&&navigator.indigitallOnInitialized(t,new v)})),r.d("Device enabled").writeLog(),!0;{let t="",n=null;if(!this.config||!this.config.appKey)return r.w("config.appKey is not defined").writeLog(),!1;if(t=this.config.appKey,this.config.requestLocation&&await o.setRequestLocation(this.config.requestLocation),this.config.workerPath&&(n=this.config.workerPath),t){if(await o.setAppKey(t),yt.isServiceWorkerSupported()||Y.isSafariPushNotificationSupported()){const t=new N;return R.getBrowser(t,(t=>{if(t.supported||this.isSafariBrowserDevice()){r.d("browser supported for webpush").writeLog();const t=new N;R.getApplicationAll(t,(async t=>{if(r.d("application ",t).writeLog(),t&&t.data&&t.data.configuration){const n=t.data.configuration;r.d("configuration ",n).writeLog(),n.vapidPublic&&o.setVAPID(n.vapidPublic),n.safariWebsitePushId&&o.setSafariWebsitePushId(n.safariWebsitePushId),n.enabled&&o.setEnabled(n.enabled),n.serviceSyncTime&&o.setServiceSyncTime(n.serviceSyncTime),n.locationEnabled&&o.setLocationEnabled(n.locationEnabled),n.locationUpdateMinutes&&o.setLocationUpdateMinutes(n.locationUpdateMinutes),n.inboxAuthMode&&e()&&e().setInboxAuthMode(n.inboxAuthMode),n.inAppEnabled&&(o.setInAppEnabled(n.inAppEnabled),await o.setUrlInappApi(s))}const i=new D;o.getDeviceId()&&o.getPushToken()?R.putDevice(i,(t=>{try{if(ft.isServiceTimestampExceed()){const t=new h;t.setAppKey(o.getAppKey()),t.setDeviceId(o.getDeviceId()),R.postEventVisit(t)}t.registeredByCookie?(o.setServiceTimestamp(Date.now()),M.getPermissions().then((t=>{const e=new v;e.deviceId&&r.i("deviceId:",e.deviceId).writeLog(),e.pushToken&&r.i("pushToken:",e.pushToken).writeLog(),this.config&&ft.isFunction(navigator.indigitallOnInitialized)&&navigator.indigitallOnInitialized(t,e)}))):yt.registerForPush(n)}catch(t){ft.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ht.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}),navigator.indigitallOnError):R.postDevice(i,(t=>{try{const e=new h;e.setAppKey(o.getAppKey()),e.setDeviceId(o.getDeviceId()),R.postEventVisit(e),t.registeredByCookie?o.setServiceTimestamp(Date.now()):yt.registerForPush(n)}catch(t){ft.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ht.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}),(t=>{404===t.errorCode&&o.clearStorage(),ft.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(t)}))}),navigator.indigitallOnError)}else r.w("Browser not Supported").writeLog()}),navigator.indigitallOnError),!0}r.w("ServiceWorker and SafariPushNotification not supported").writeLog()}else r.w("appKey is not found").writeLog()}}catch(t){ft.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ht.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}return!1}static deviceGet(t,e){return R.getDevice(new D,t,e),!0}static deviceEnable(t,e){const r=new D(ut.ENABLE);return r.isDeviceUpdated(!0),R.putDevice(r,t,e),!0}static deviceDisable(t,e){const r=new D(ut.DISABLE);return r.isDeviceUpdated(!0),R.putDevice(r,t,e),!0}static topicsList(t,e){return R.getDeviceTopics(new D,(async e=>{ft.isFunction(t)&&t(e)}),(t=>{ft.isFunction(e)&&e(t)})),!0}static topicsSubscribe(t,e,r){const n=new D;return n.setTopics(t),R.postDeviceTopics(n,(t=>{ft.isFunction(e)&&e(t)}),(t=>{ft.isFunction(r)&&r(t)})),!0}static topicsUnsubscribe(t,e,r){const n=new D;return n.setTopics(t),R.deleteDeviceTopics(n,(t=>{ft.isFunction(e)&&e(t)}),(t=>{ft.isFunction(r)&&r(t)})),!0}static async topicsSubscribeUpdate(t,e,r,n){st.updateTopic(t,e,r,n)}static registerForPush(t){o.setWorkerPath(t),Y.isSafariPushNotificationSupported()?Y.launchNotificationPermissionForSafari():yt.isServiceWorkerSupported()&&yt.launchNotificationPermission(t)}static isSafariPushNotificationSupported(){return Y.isSafariPushNotificationSupported()}static isSafariBrowserDevice(){return E.isSafariBrowserDevice()}static isServiceWorkerSupported(){return"serviceWorker"in navigator}static registerServiceWorker(t){const e=new lt(dt);let r="/service-worker.js";return t&&(r=t),navigator.serviceWorker.register(r).then((t=>(e.d("ServiceWorker registration successful with scope: "+t.scope).writeLog(),t))).catch((t=>(e.e("ServiceWorker registration failed: ",t).writeLog(),t)))}static launchNotificationPermission(t){const e=new lt(dt);this.registerServiceWorker(t).then((t=>{try{let r;t.installing?r=t.installing:t.waiting?r=t.waiting:t.active&&(r=t.active),r&&(e.d("sw current state "+r.state).writeLog(),"activated"==r.state?yt.subscribeForPushNotification(t):("installed"==r.state&&o.getPushToken()&&t.update(),r.addEventListener("statechange",(function(r){e.d("sw statechange : "+r.target.state).writeLog(),"activated"==r.target.state&&yt.subscribeForPushNotification(t)}))))}catch(t){ft.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ht.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}))}static async subscribeForPushNotification(t){const e=new lt(dt);try{const r=await new Promise(((r,n)=>{const i={userVisibleOnly:!0,applicationServerKey:p.urlBase64ToUint8Array(o.getVAPID())};return e.d("Registration: ",t).writeLog(),o.getPermissionPush()||p.callEventPermission(x.PERMISSION_TYPE_PUSH,at.EVENT_TYPE_ASK),r(t.pushManager.subscribe(i))}));e.d("Received PushSubscription: ",r).writeLog(),o.getPermissionPush()&&o.getPermissionPush()===at.EVENT_TYPE_ACCEPT||(p.callEventPermission(x.PERMISSION_TYPE_PUSH,at.EVENT_TYPE_ACCEPT),o.setPermissionPush(at.EVENT_TYPE_ACCEPT));const n=r.toJSON();o.setBrowserPublicKey(n.keys.p256dh),o.setBrowserPrivateKey(n.keys.auth),o.setPushToken(n.endpoint),R.putDevice(new D,(t=>{M.getPermissions().then((t=>{ft.isFunction(navigator.indigitallOnInitialized)&&navigator.indigitallOnInitialized(t,new v)})),ft.isFunction(navigator.indigitallOnNewUserRegistered)&&!o.getNewUserTimestamp()&&(o.setNewUserTimestamp(Date.now()),navigator.indigitallOnNewUserRegistered(t)),yt.registerLocation()}),navigator.indigitallOnError),o.setServiceTimestamp(Date.now())}catch(t){e.e("No Registration: "+t).writeLog(),o.getPermissionPush()&&o.getPermissionPush()===at.EVENT_TYPE_REJECT||(p.callEventPermission(x.PERMISSION_TYPE_PUSH,at.EVENT_TYPE_REJECT),o.setPermissionPush(at.EVENT_TYPE_REJECT)),ft.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(t)}}static async launchNotificationPermissionForSafari(){o.setSafariGestureRequestPermission(at.EVENT_TYPE_ASK),Y.launchNotificationPermissionForSafari()}static async checkRemotePermission(t){Y.checkRemotePermission(t)}static registerLocation(){const t=new lt(dt);try{navigator.geolocation&&o.getRequestLocation()&&o.getLocationEnabled()&&(!o.getLocationTimestamp()||o.getLocationUpdateMinutes()<=(Date.now()-o.getLocationTimestamp())/6e4)&&(o.getPermissionLocation()||p.callEventPermission(x.PERMISSION_TYPE_LOCATION,at.EVENT_TYPE_ASK),navigator.geolocation.getCurrentPosition((t=>{o.getPermissionLocation()||o.getPermissionLocation()==at.EVENT_TYPE_ACCEPT||(p.callEventPermission(x.PERMISSION_TYPE_LOCATION,at.EVENT_TYPE_ACCEPT),o.setPermissionLocation(at.EVENT_TYPE_ACCEPT));const e=new h;e.setLocation(t.coords.latitude,t.coords.longitude),R.postEventLocation(e),ft.isFunction(navigator.indigitallOnLocationUpdated)&&navigator.indigitallOnLocationUpdated(t),o.setLocationTimestamp(Date.now())}),(e=>{t.e("error "+e).writeLog(),o.getPermissionLocation()||o.getPermissionLocation()==at.EVENT_TYPE_REJECT||(p.callEventPermission(x.PERMISSION_TYPE_LOCATION,at.EVENT_TYPE_REJECT),o.setPermissionLocation(at.EVENT_TYPE_REJECT))})))}catch(t){ft.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ht.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}static requestPushPermission(t){M.getPushPermission().then((e=>{ft.isFunction(t)&&t(e)}))}static onPermissionChange(){M.setPermissionCallback()}static requestLocationPermission(t){M.getLocationPermission().then((e=>{ft.isFunction(t)&&t(e)}))}static logIn(t,e,r){yt.setExternalId(t,e,r)}static logout(t,e){yt.setExternalId(null,t,e)}static setExternalCode(t,e,r){yt.setExternalId(t,e,r)}static async setExternalId(t,e,r){try{const n=o.getAppKey();if(!n)return void(ft.isFunction(r)&&r(ht.showError(c,c.ErrorCode.API_APPKEY_NOT_VALID)));if(null!=t){const i=await pt.createHmac(n,t);i&&this.setExternalIdRequest(i,e,r)}else this.setExternalIdRequest(null,e,r)}catch(t){ft.isFunction(r)&&r(ht.showError(c,c.ErrorCode.PUSH_DEVICE_ERROR,t))}}static async setExternalIdRequest(t,e,r){const n=new D;o.setExternalId(t),await o.setExternalIdRequest(t),n.setExternalCode(t),n.isDeviceUpdated(!0),R.putDevice(n,(t=>{ft.isFunction(e)&&e(new v(t))}),r)}static sendCustomEvent(t,e,r){try{let n="",i={},s=!0;"string"==typeof t?n=t:"object"==typeof t&&(n=t.eventType,t.customData&&(i=t.customData),!1===t.async&&(s=t.async));const a=new h;a.setDeviceId(o.getDeviceId()),a.setEventType(n),a.setCustomData(i),null!=o.getExternalId()&&"null"!=o.getExternalId()?(a.setExternalCode(o.getExternalId()),a.setJourneyRequest(!0),!1===s?R.postEventJourneySync(a,e,r):R.postEventJourney(a,e,r)):!1===s?R.postEventCustomSync(a,e,r):R.postEventCustom(a,e,r)}catch(t){ft.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ht.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}static sendJourneyEvent(t,e,r){try{let n="",i={},s=!0;"string"==typeof t?n=t:"object"==typeof t&&(n=t.eventType,t.customData&&(i=t.customData),!1===t.async&&(s=t.async));const a=new h;a.setDeviceId(o.getDeviceId()),a.setExternalCodeRequest(),a.setEventType(n),a.setCustomData(i),a.setJourneyRequest(!0),!1===s?R.postEventJourneySync(a,e,r):R.postEventJourney(a,e,r)}catch(t){ft.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ht.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}}const Et=yt;window.indigitall||(window.indigitall={}),window.indigitall.Push=yt,window.indigitall.LogLevel=ct,window.indigitall.version=o.getVersion()})(),n})(),t.exports=e()},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.3.3","_id":"indigitall-web-core@4.3.3","_inBundle":false,"_integrity":"sha512-DKC3qMLRDxUkyleQlaq4aoDnKKSoyY0wg2IfRosrqpGl1kjP8x8uh8997QnvITgeN+ZpLL9xyW6no/uxOlizRw==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.3.3","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.3.3","saveSpec":null,"fetchSpec":"4.3.3"},"_requiredBy":["#USER","/","/indigitall-web-notification"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.3.3.tgz","_shasum":"db9d055f40fd2e1ac53208d6fec0f0784b88f8fb","_spec":"indigitall-web-core@4.3.3","_where":"/home/circleci/webpush/sdk","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.3.3"}')},147:t=>{"use strict";t.exports=JSON.parse('{"name":"indigitall-web-sdk","description":"indigitall webpush SDK","version":"4.3.3","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","dependencies":{"indigitall-web-core":"^4.3.3","indigitall-web-customer":"^4.3.3","indigitall-web-inapp":"^4.3.3","indigitall-web-inbox":"^4.3.3","indigitall-web-notification":"^4.3.3"},"devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","build-sdk":"npm run build-install-core && npm run build-install-inapp && npm run build","build-install-core":"npm uninstall indigitall-web-core && npm install ../core","build-install-inapp":"npm uninstall indigitall-web-inapp && npm install ../inapp","build-install-customer":"npm uninstall indigitall-web-customer && npm install ../customer","build-install-inbox":"npm uninstall indigitall-web-inbox && npm install ../inbox","build-install-push":"npm uninstall indigitall-web-notification && npm install ../push","install-sdk":"npm install && npm run build","release-install-core":"npm uninstall indigitall-web-core && npm install indigitall-web-core@$npm_package_version","release-install-inapp":"npm uninstall indigitall-web-inapp && npm install indigitall-web-inapp@$npm_package_version ","release-install-customer":"npm uninstall indigitall-web-customer && npm install indigitall-web-customer@$npm_package_version ","release-install-inbox":"npm uninstall indigitall-web-inbox && npm install indigitall-web-inbox@$npm_package_version ","release-install-push":"npm uninstall indigitall-web-notification && npm install indigitall-web-notification@$npm_package_version && npm run release-install-core && npm run release-install-inapp && npm run release-install-inbox && npm run release-install-customer && npm run install-sdk && npm run delete-node-modules","simulate-release-install-sdk":"npm run install-sdk && npm run delete-node-modules","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.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";r.r(n);var t=r(396),e=r.n(t),i=r(277),o=r.n(i),s=r(413),a=r.n(s),u=r(735),c=r.n(u);const{Log:l,LogLevel:f,CommonUtils:h,ErrorUtils:p}=r(872).Core.Utils,{Repository:d}=r(872).Core,y=r(147),{Channel:E}=r(872).Core.Models,g="[IND]Indigitall: ";class v{constructor(){this.config=null}static async init(t){return c().init(t)}static deviceGet(t,e){return c().devideGet(t,e)}static deviceEnable(t,e){return c().deviceEnable(t,e)}static deviceDisable(t,e){return c().deviceDisable(t,e)}static topicsList(t,e){return c().topicsList((e=>{this.inAppTopicList(e,t,(r=>{new l(g).w(r.message).writeLog(),h.isFunction(t)&&t(e)}))}),(r=>{new l(g).w(r).writeLog(),this.inAppTopicList(null,t,e)}))}static async inAppTopicList(t,r,n){(new d).isInAppEnabled()?e().topicsList((async e=>{null!=t?(await(new d).setTopicList(t),await(new d).setInAppTopicList(e),h.isFunction(r)&&r(e.concat(t))):(await(new d).setInAppTopicList(e),h.isFunction(r)&&r(e))}),(async e=>{null!=t?(await(new d).setTopicList(t),h.isFunction(r)&&r(t)):h.isFunction(n)&&n(e)})):null!=t?(await(new d).setTopicList(t),h.isFunction(r)&&r(t)):h.isFunction(n)&&n(p.showError(null,null,"Internal error bad topic list"))}static topicsSubscribe(t,r,n){(new d).isInAppEnabled()?e().topicsSubscribe(t,(e=>{this.pushTopicsSubscribe(t,e,r,n)}),(async e=>{new l(g).w(e).writeLog(),this.pushTopicsSubscribe(t,null,r,n)})):this.pushTopicsSubscribe(t,null,r,n)}static pushTopicsSubscribe(t,e,r,n){c().topicsSubscribe(t,(async t=>{this.topicActionOnSuccess(e,t,r)}),(async t=>{this.topicActionOnError(e,t,r,n)}))}static async topicsUnsubscribe(t,r,n){(new d).isInAppEnabled()?e().topicsUnsubscribe(t,(e=>{this.pushTopicsUnsubscribe(t,e,r,n)}),(async e=>{new l(g).w(e).writeLog(),this.pushTopicsUnsubscribe(t,null,r,n)})):this.pushTopicsUnsubscribe(t,null,r,n)}static pushTopicsUnsubscribe(t,e,r,n){c().topicsUnsubscribe(t,(async t=>{this.topicActionOnSuccess(e,t,r)}),(async t=>{this.topicActionOnError(e,t,r,n)}))}static async topicActionOnSuccess(t,e,r){let n=[];null!=t&&(n=t,await(new d).setInAppTopicList(t)),null!=e&&await(new d).setTopicList(e),h.isFunction(r)&&r(n.concat(e))}static async topicActionOnError(t,e,r,n){new l(g).w(`${e.errorCode}: ${e.exceptionMessage}`).writeLog(),null!=t?(await(new d).setInAppTopicList(t),h.isFunction(r)&&r(t)):h.isFunction(n)&&n(e)}static async setExternalId(t,e,r){c().setExternalId(t,e,r)}static logIn(t,e,r){v.setExternalId(t,e,r)}static logout(t,e){v.setExternalId(null,t,e)}static sendCustomEvent(t,e,r){c().sendCustomEvent(t,e,r)}static sendJourneyEvent(t,e,r){c().sendJourneyEvent(t,e,r)}static isServiceWorkerSupported(){return c().isServiceWorkerSupported()}static isSafariPushNotificationSupported(){return c().isSafariPushNotificationSupported()}static isSafariPermissionAsked(){return c().isSafariPermissionAsked()}static isSafariBrowserDevice(){return c().isSafariBrowserDevice()}static launchNotificationPermissionForSafari(){c().launchNotificationPermissionForSafari()}static async showInApp(t,r,n,i){e().showInApp(t,r,n,i)}static async showInAppWithConfig(t,r,n,i,o,s,a,u,c,l,f){e().showInAppWithConfig(t,r,n,i,o,s,a,u,c,l,f)}static showMultipleInApp(t,r,n,i){e().showMultipleInApp(t,r,n,i)}static async showMultipleInAppWithConfig(t,r,n,i,o,s,a,u,c,l,f){e().showMultipleInAppWithConfig(t,r,n,i,o,s,a,u,c,l,f)}static getInboxMessagesCount(t,e,r){o().getMessagesCountWithAuth(t,e,r)}static getInbox(t,e,r){o().getInboxWithAuth(t,e,r)}static getInboxWithPage(t,e,r,n,i,s,a,u){o().getInboxWithPage(t,e,r,n,i,s,a,u)}static getCustomer(t,e){a().getCustomer(t,e)}static getCustomerInformation(t,e){this.getCustomerInformationWithFields(null,t,e)}static getCustomerInformationWithFields(t,e,r){a().getCustomerInformation(t,e,r)}static assignOrUpdateValueToCustomerFields(t,e,r){a().assignOrUpdateValueToCustomerFields(t,e,r)}static deleteValuesFromCustomerFields(t,e,r){a().deleteValuesFromCustomerFields(t,e,r)}static link(t,e,r,n){v.logIn(t,(t=>{a().link(e,r,n)}),(t=>{h.isFunction(n)&&n(t)}))}static unlink(t,e,r){v.logout((n=>{a().unlink(t,e,r)}),(t=>{h.isFunction(r)&&r(t)}))}}window.indigitall=v,window.indigitall.InApp=e(),window.indigitall.Inbox=o(),window.indigitall.Customer=a(),window.indigitall.Push=c(),window.indigitall.InApp.Utils=e().Utils,window.indigitall.Channel=E,window.indigitall.LogLevel=f,window.indigitall.version=y.version})(),n})()));
|