@microsoft/ocsdk 0.2.1-main.9dd5d92 → 0.3.1-main.b56c728

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/SDK.min.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=17)}([function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";var r=n(8),a=Object.prototype.toString;function o(e){return"[object Array]"===a.call(e)}function i(e){return void 0===e}function c(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==a.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function s(e){return"[object Function]"===a.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.call(null,e[a],a,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===a.call(e)},isBuffer:function(e){return null!==e&&!i(e)&&null!==e.constructor&&!i(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:c,isPlainObject:u,isUndefined:i,isDate:function(e){return"[object Date]"===a.call(e)},isFile:function(e){return"[object File]"===a.call(e)},isBlob:function(e){return"[object Blob]"===a.call(e)},isFunction:s,isStream:function(e){return c(e)&&s(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function e(){var t={};function n(n,r){u(t[r])&&u(n)?t[r]=e(t[r],n):u(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,a=arguments.length;r<a;r++)l(arguments[r],n);return t},extend:function(e,t,n){return l(t,(function(t,a){e[a]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";var r,a,o,i,c,u,s;Object.defineProperty(t,"__esModule",{value:!0}),t.LiveChatVersion=t.OCSDKTelemetryEvent=t.ChannelId=t.OperatingSystem=t.DeviceType=t.Browser=t.BrowserVendor=void 0,t.BrowserVendor=r,function(e){e.IE="IE",e.CHROME="Chrome",e.FIREFOX="Firefox",e.SAFARI="Safari",e.EDGE="Edge",e.EDGE_CHROMIUM="Edg",e.OPERA="Opera",e.UNKNOWN="Unknown"}(r||(t.BrowserVendor=r={})),t.Browser=a,function(e){e[e.Chrome=0]="Chrome",e[e.Firefox=1]="Firefox",e[e.Ie=2]="Ie",e[e.Edge=3]="Edge",e[e.Safari=4]="Safari",e[e.None=5]="None"}(a||(t.Browser=a={})),t.DeviceType=o,function(e){e.Desktop="Desktop",e.Mobile="Mobile",e.Tablet="Tablet"}(o||(t.DeviceType=o={})),t.OperatingSystem=i,function(e){e.WINDOWS="Windows",e.MACOSX="Mac OS X",e.WINDOWS_PHONE="Windows Phone",e.WINDOWS_RT="Windows RT",e.IOS="iOS",e.ANDROID="Android",e.LINUX="Linux",e.UNKNOWN="Unknown"}(i||(t.OperatingSystem=i={})),t.ChannelId=c,function(e){e.LCW="lcw",e.SMS="sms",e.FACEBOOK="facebook",e.WECHAT="wechat"}(c||(t.ChannelId=c={})),t.OCSDKTelemetryEvent=u,function(e){e.GETCHATCONFIG="GetChatConfig",e.GETCHATCONFIGSUCCESS="GetChatConfigSucceeded",e.GETRECONNECTABLECHATS="GetReconnnectableChats",e.GETRECONNECTAVAILABILITY="GetReconnnectableAvailability",e.GETCHATTOKENSTARTED="GetChatTokenStarted",e.GETCHATTOKENSUCCEEDED="GetChatTokenSucceeded",e.GETCHATTOKENFAILED="GetChatTokenFailed",e.GETLWISTATUSSTARTED="GetLwiStatusStarted",e.GETLWISTATUSSUCCEEDED="GetLwiStatusSucceeded",e.GETLWISTATUSFAILED="GetLwiStatusFailed",e.SESSIONINITSTARTED="SessionInitStarted",e.SESSIONINITSUCCEEDED="SessionInitSucceeded",e.SESSIONINITFAILED="SessionInitFailed",e.SESSIONCLOSESTARTED="SessionCloseStarted",e.SESSIONCLOSESUCCEEDED="SessionCloseSucceeded",e.SESSIONCLOSEFAILED="SessionCloseFailed",e.SUBMITPOSTCHATSTARTED="SubmitPostChatStarted",e.SUBMITPOSTCHATSUCCEEDED="SubmitPostChatSucceeded",e.SUBMITPOSTCHATFAILED="SubmitPostChatFailed",e.GETCHATTRANSCRIPTSTARTED="GetChatTranscriptStarted",e.GETCHATTRANSCRIPTSUCCEEDED="GetChatTranscriptSucceeded",e.GETCHATTRANSCRIPTFAILED="GetChatTranscriptFailed",e.EMAILTRANSCRIPTSTARTED="EmailTranscriptStarted",e.EMAILTRANSCRIPTSUCCEEDED="EmailTranscriptSucceeded",e.EMAILTRANSCRIPTFAILED="EmailTranscriptFailed",e.FETCHDATAMASKINGSTARTED="FetchDataMaskingStarted",e.FETCHDATAMASKINGSUCCEEDED="FetchDataMaskingSucceeded",e.FETCHDATAMASKINGFAILED="FetchDataMaskingFailed",e.SECONDARYCHANNELEVENTREQUESTSTARTED="SecondaryChannelEventRequestStarted",e.SECONDARYCHANNELEVENTREQUESTSUCCEEDED="SecondaryChannelEventRequestSucceeded",e.SECONDARYCHANNELEVENTREQUESTFAILED="SecondaryChannelEventRequestFailed",e.GETSURVEYINVITELINKSTARTED="GetSurveyInviteLinkStarted",e.GETSURVEYINVITELINKSUCCEEDED="GetSurveyInviteLinkSucceeded",e.GETSURVEYINVITELINKFAILED="GetSurveyInviteLinkFailed",e.VALIDATEAUTHCHATRECORDSTARTED="ValidateAuthChatRecordStarted",e.VALIDATEAUTHCHATRECORDSUCCEEDED="ValidateAuthChatRecordSucceeded",e.VALIDATEAUTHCHATRECORDFAILED="ValidateAuthChatRecordFailed",e.GETQUEUEAVAILABILITYSTARTED="GetQueueAvailabilityStarted",e.GETQUEUEAVAILABILITYSUCCEEDED="GetQueueAvailabilitySucceeded",e.GETQUEUEAVAILABILITYFAILED="GetQueueAvailabilityFailed",e.SENDTYPINGINDICATORFAILED="SendTypingIndicatorFailed",e.SENDTYPINGINDICATORSUCCEEDED="SendTypingIndicatorSucceeded"}(u||(t.OCSDKTelemetryEvent=u={})),t.LiveChatVersion=s,function(e){e[e.V1=1]="V1",e[e.V2=2]="V2"}(s||(t.LiveChatVersion=s={}))},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(1)),o=r(n(4)),i=n(5),c=function e(){(0,a.default)(this,e)};t.default=c,(0,o.default)(c,"requiredOmnichannelConfigurationParameters",["orgUrl","orgId","widgetId"]),(0,o.default)(c,"defaultHeaders",{"Content-Type":"application/json"}),(0,o.default)(c,"bypassCacheHeaders",{"cache-control":"no-store, must-revalidate, no-cache"}),(0,o.default)(c,"defaultChannelId",i.ChannelId.LCW),(0,o.default)(c,"defaultLocale","en-us"),(0,o.default)(c,"noContentStatusCode",204),(0,o.default)(c,"transactionid","transaction-id")},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(2);function a(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var i=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),i.push(a(t)+"="+a(e))})))})),o=i.join("&")}if(o){var c=e.indexOf("#");-1!==c&&(e=e.slice(0,c)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";(function(t){var r=n(2),a=n(34),o={"Content-Type":"application/x-www-form-urlencoded"};function i(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==t&&"[object process]"===Object.prototype.toString.call(t))&&(c=n(12)),c),transformRequest:[function(e,t){return a(t,"Accept"),a(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(i(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(i(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(o)})),e.exports=u}).call(this,n(33))},function(e,t,n){"use strict";var r=n(2),a=n(35),o=n(37),i=n(9),c=n(38),u=n(41),s=n(42),l=n(13);e.exports=function(e){return new Promise((function(t,n){var d=e.data,f=e.headers;r.isFormData(d)&&delete f["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var g=e.auth.username||"",p=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";f.Authorization="Basic "+btoa(g+":"+p)}var v=c(e.baseURL,e.url);if(h.open(e.method.toUpperCase(),i(v,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h.onreadystatechange=function(){if(h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in h?u(h.getAllResponseHeaders()):null,o={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};a(t,n,o),h=null}},h.onabort=function(){h&&(n(l("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){n(l("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var E=(e.withCredentials||s(v))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;E&&(f[e.xsrfHeaderName]=E)}if("setRequestHeader"in h&&r.forEach(f,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete f[t]:h.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),n(e),h=null)})),d||(d=null),h.send(d)}))}},function(e,t,n){"use strict";var r=n(36);e.exports=function(e,t,n,a,o){var i=new Error(e);return r(i,t,n,a,o)}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){t=t||{};var n={},a=["url","method","data"],o=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],c=["validateStatus"];function u(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function s(a){r.isUndefined(t[a])?r.isUndefined(e[a])||(n[a]=u(void 0,e[a])):n[a]=u(e[a],t[a])}r.forEach(a,(function(e){r.isUndefined(t[e])||(n[e]=u(void 0,t[e]))})),r.forEach(o,s),r.forEach(i,(function(a){r.isUndefined(t[a])?r.isUndefined(e[a])||(n[a]=u(void 0,e[a])):n[a]=u(void 0,t[a])})),r.forEach(c,(function(r){r in t?n[r]=u(e[r],t[r]):r in e&&(n[r]=u(void 0,e[r]))}));var l=a.concat(o).concat(i).concat(c),d=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===l.indexOf(e)}));return r.forEach(d,s),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uuidv4=void 0;t.uuidv4=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}},function(e,t,n){"use strict";(function(e){var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SDKProvider",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"uuidv4",{enumerable:!0,get:function(){return u.uuidv4}});var a=r(n(6)),o=r(n(19)),i=r(n(20)),c=r(n(55)),u=n(16);!function(){if(void 0===e.window&&(e.window=e),void 0===("undefined"==typeof window?"undefined":(0,a.default)(window)))throw new Error("window object not found");"Microsoft"in window||(window.Microsoft={}),"CRM"in window.Microsoft||(window.Microsoft.CRM={}),"Omnichannel"in window.Microsoft.CRM||(window.Microsoft.CRM.Omnichannel={}),"SDK"in window.Microsoft.CRM.Omnichannel||(window.Microsoft.CRM.Omnichannel.SDK={SDKProvider:i.default,Util:{uuidv4:u.uuidv4}}),window.document&&c.default.raiseCustomEvent(o.default.OCSDKLOAD)}()}).call(this,n(18))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(1)),o=r(n(3)),i=function(){function e(){(0,a.default)(this,e)}return(0,o.default)(e,null,[{key:"OCSDKLOAD",get:function(){return"oc:sdk:load"}}]),e}();t.default=i},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(1)),o=r(n(3)),i=r(n(7)),c=r(n(21)),u=r(n(23)),s=function(){function e(){(0,a.default)(this,e)}return(0,o.default)(e,null,[{key:"getSDK",value:function(e,t,n){var r=new c.default(n);return new u.default({channelId:e.channelId||i.default.defaultChannelId,orgId:e.orgId,orgUrl:e.orgUrl,widgetId:e.widgetId},t||{},r)}}]),e}();t.default=s},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(1)),o=r(n(3)),i=r(n(4)),c=r(n(22)),u=function(){function e(t){(0,a.default)(this,e),(0,i.default)(this,"logger",void 0),this.logger=t}return(0,o.default)(e,[{key:"log",value:function(e,t,n,r){if(this.isLoggingEnabled()){var a=c.default.GETTELEMETRYEVENTDATA(t,n,r);this.logEvent(e,a)}}},{key:"logEvent",value:function(e,t){this.isLoggingEnabled()&&setTimeout(this.logger.logClientSdkTelemetryEvent.bind(this.logger),0,e,t)}},{key:"isLoggingEnabled",value:function(){return!this.isNullOrUndefined(this.logger)}},{key:"isNullOrUndefined",value:function(e){return null==e}}]),e}();t.default=u},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(1)),o=r(n(3)),i=function(){function e(){(0,a.default)(this,e)}return(0,o.default)(e,null,[{key:"GETTELEMETRYEVENTDATA",value:function(e,t,n){return{Description:n,ElapsedTimeInMilliseconds:t.ElapsedTimeInMilliseconds,Event:e,ExceptionDetails:t.ExceptionDetails,Region:t.Region,RequestId:t.RequestId,TransactionId:t.TransactionId}}}]),e}();t.default=i},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(24)),o=r(n(26)),i=r(n(6)),c=r(n(1)),u=r(n(3)),s=r(n(4)),l=n(5),d=r(n(27)),f=n(46),h=r(n(7)),g=n(47),p=r(n(48)),v=n(49),E=n(50),m=r(n(51)),C=r(n(52)),T=n(53),I=r(n(54)),S=n(16);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,s.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw o}}}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var L=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.defaultConfiguration,r=arguments.length>2?arguments[2]:void 0;(0,c.default)(this,e),this.omnichannelConfiguration=t,this.configuration=n,this.logger=r,(0,s.default)(this,"liveChatVersion",void 0),Object.keys(this.configuration).length&&"object"===(0,i.default)(n)||(this.configuration=e.defaultConfiguration);for(var a=0,o=Object.keys(e.defaultConfiguration);a<o.length;a++){var u=o[a];if(!this.configuration.hasOwnProperty(u))throw new Error("Missing '".concat(u,"' in SDKConfiguration"))}var d=t.channelId;if(!Object.values(l.ChannelId).includes(d))throw new Error("Invalid channelId");var f,g=Object.keys(t),p=w(h.default.requiredOmnichannelConfigurationParameters);try{for(p.s();!(f=p.n()).done;){var v=f.value;if(!g.includes(v))throw new Error("Missing '".concat(v,"' in OmnichannelConfiguration"))}}catch(e){p.e(e)}finally{p.f()}this.liveChatVersion=l.LiveChatVersion.V1}var t,n,r,y,O,L,A,D,b,x,N,k,P,U,F,G;return(0,u.default)(e,[{key:"getChatConfig",value:(G=(0,o.default)(a.default.mark((function e(t){var n,r,o,i,c,u,s,f,g=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=g.length>1&&void 0!==g[1]&&g[1],r=T.Timer.TIMER(),this.logger&&this.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.GETCHATCONFIG,{RequestId:t},"Get Chat Config Started"),t||(t=(0,S.uuidv4)()),o="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatConfigPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"?requestId=").concat(t,"&channelId=").concat(this.omnichannelConfiguration.channelId),i=d.default.create(),(0,I.default)(i,{retries:this.configuration.maxRequestRetriesOnFailure}),c={},n&&(c=R(R({},h.default.bypassCacheHeaders),c)),e.next=11,i.get(o,{headers:c});case 11:return u=e.sent,s=r.milliSecondsElapsed,(f=u.data).LiveChatVersion&&f.LiveChatVersion===l.LiveChatVersion.V2&&(this.liveChatVersion=f.LiveChatVersion),this.logger&&this.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.GETCHATCONFIGSUCCESS,{RequestId:t,Region:u.data.Region,ElapsedTimeInMilliseconds:s,TransactionId:u.headers["transaction-id"]},"Get Chat config succeeded"),e.abrupt("return",f);case 17:case"end":return e.stop()}}),e,this)}))),function(e){return G.apply(this,arguments)})},{key:"getLWIDetails",value:(F=(0,o.default)(a.default.mark((function e(t){var n,r,i,c,u,s,f,g,p=this,E=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=E.length>1&&void 0!==E[1]?E[1]:{},r=T.Timer.TIMER(),this.logger&&this.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.GETLWISTATUSSTARTED,{RequestId:t},"Get LWI Details Started"),t||(t=(0,S.uuidv4)()),i="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatLiveWorkItemDetailsPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),c=d.default.create(),(0,I.default)(c,{retries:this.configuration.maxRequestRetriesOnFailure}),u=n.authenticatedUserToken,s=n.reconnectId,f=h.default.defaultHeaders,u&&(i="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatAuthLiveWorkItemDetailsPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),f[C.default.authenticatedUserToken]=u),s&&(i+="/".concat(s)),i+="?channelId=".concat(this.omnichannelConfiguration.channelId),g={headers:f,method:"GET",url:i},e.abrupt("return",new Promise(function(){var e=(0,o.default)(a.default.mark((function e(n,o){var i,u,s,d;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c(g);case 3:i=e.sent,u=r.milliSecondsElapsed,s=i.data,p.logger&&p.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.GETLWISTATUSSUCCEEDED,{RequestId:t,Region:i.data.Region,ElapsedTimeInMilliseconds:u,TransactionId:i.headers["transaction-id"]},"Get LWI Details succeeded"),n(s),e.next=15;break;case 10:e.prev=10,e.t0=e.catch(0),d=r.milliSecondsElapsed,p.logger&&p.logger.log(v.LogLevel.ERROR,l.OCSDKTelemetryEvent.GETLWISTATUSFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:d},"Get LWI Details failed"),o();case 15:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,n){return e.apply(this,arguments)}}()));case 14:case"end":return e.stop()}}),e,this)}))),function(e){return F.apply(this,arguments)})},{key:"getChatToken",value:(U=(0,o.default)(a.default.mark((function e(t){var n,r,i,c,u,s,f,g,p,E,y=this,R=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=R.length>1&&void 0!==R[1]?R[1]:{},r=R.length>2&&void 0!==R[2]?R[2]:0,i=T.Timer.TIMER(),c=n.reconnectId,u=n.authenticatedUserToken,s=n.currentLiveChatVersion,this.logger&&this.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.GETCHATTOKENSTARTED,{RequestId:t},"Get Chat Token Started"),!(r<0)){e.next=7;break}throw new Error("Invalid currentRetryCount");case 7:return t||(t=(0,S.uuidv4)()),f=h.default.defaultHeaders,g="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatGetChatTokenPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),this.liveChatVersion===l.LiveChatVersion.V2||s&&s===l.LiveChatVersion.V2?(g="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatv2GetChatTokenPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),u&&(g="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatv2AuthGetChatTokenPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),f[C.default.authenticatedUserToken]=u)):u&&(g="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatAuthGetChatTokenPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),f[C.default.authenticatedUserToken]=u),c&&(g+="/".concat(c)),g+="?channelId=".concat(this.omnichannelConfiguration.channelId),p={headers:f,method:"GET",url:g},E=d.default.create(),(0,I.default)(E,{retries:this.configuration.maxRequestRetriesOnFailure}),e.abrupt("return",new Promise(function(){var e=(0,o.default)(a.default.mark((function e(o,u){var s,d,f,g;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,E(p);case 3:if(s=e.sent,d=i.milliSecondsElapsed,!(f=s.data)){e.next=11;break}return f.requestId=t,y.logger&&y.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.GETCHATTOKENSUCCEEDED,{RequestId:t,Region:s.data.Region,ElapsedTimeInMilliseconds:d,TransactionId:s.headers["transaction-id"]},"Get Chat Token Succeeded"),o(f),e.abrupt("return");case 11:if(!c||s.status!==h.default.noContentStatusCode){e.next=14;break}return u(s),e.abrupt("return");case 14:e.next=22;break;case 16:return e.prev=16,e.t0=e.catch(0),g=i.milliSecondsElapsed,y.logger&&y.logger.log(v.LogLevel.ERROR,l.OCSDKTelemetryEvent.GETCHATTOKENFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:g},"Get Chat Token Failed"),u(e.t0),e.abrupt("return");case 22:if(!(r+1>=y.configuration.getChatTokenRetryCount)){e.next=25;break}return u(new Error("The retry for getchattoken has exceeded its max value of ".concat(y.configuration.getChatTokenRetryCount))),e.abrupt("return");case 25:setTimeout((function(){y.getChatToken(t,n,r+1).then((function(e){return o(e)})).catch((function(e){return u(e)}))}),y.configuration.getChatTokenTimeBetweenRetriesOnFailure);case 26:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t,n){return e.apply(this,arguments)}}()));case 17:case"end":return e.stop()}}),e,this)}))),function(e){return U.apply(this,arguments)})},{key:"getReconnectableChats",value:(P=(0,o.default)(a.default.mark((function e(t){var n,r,i,c,u,s,f=this;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=T.Timer.TIMER(),r=t.authenticatedUserToken,this.logger&&this.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.GETRECONNECTABLECHATS,"Get Reconnectable chat Started"),i="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatGetReconnectableChatsPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(this.omnichannelConfiguration.orgId,"?channelId=").concat(this.omnichannelConfiguration.channelId),(c=h.default.defaultHeaders)[C.default.authenticatedUserToken]=r,u={headers:c,method:"GET",url:i},s=d.default.create(),e.abrupt("return",new Promise(function(){var e=(0,o.default)(a.default.mark((function e(t,r){var o,i,c,d;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s(u);case 3:if(o=e.sent,i=n.milliSecondsElapsed,!(c=o.data)){e.next=10;break}return f.logger&&f.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.GETRECONNECTABLECHATS,{Region:o.data.Region,ElapsedTimeInMilliseconds:i,TransactionId:o.headers[h.default.transactionid]},"Get Reconnectable Chats Succeeded and old session returned"),t(c),e.abrupt("return");case 10:return t(),e.abrupt("return");case 14:return e.prev=14,e.t0=e.catch(0),d=n.milliSecondsElapsed,f.logger&&f.logger.log(v.LogLevel.ERROR,l.OCSDKTelemetryEvent.GETCHATTOKENFAILED,{ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:d},"Get Reconnectable Chats Failed"),r(e.t0),e.abrupt("return");case 20:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(t,n){return e.apply(this,arguments)}}()));case 9:case"end":return e.stop()}}),e,this)}))),function(e){return P.apply(this,arguments)})},{key:"getReconnectAvailability",value:(k=(0,o.default)(a.default.mark((function e(t){var n,r,i,c,u,s=this;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=T.Timer.TIMER(),this.logger&&this.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.GETRECONNECTAVAILABILITY,"Get Reconnect availability started"),r="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatReconnectAvailabilityPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),i=h.default.defaultHeaders,c={headers:i,method:"GET",url:r},u=d.default.create(),e.abrupt("return",new Promise(function(){var e=(0,o.default)(a.default.mark((function e(t,r){var o,i,d,f;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,u(c);case 3:if(o=e.sent,i=n.milliSecondsElapsed,!(d=o.data)){e.next=10;break}return s.logger&&s.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.GETRECONNECTAVAILABILITY,{Region:o.data.Region,ElapsedTimeInMilliseconds:i,TransactionId:o.headers[h.default.transactionid]},"Get Reconnect availability Succeeded"),t(d),e.abrupt("return");case 10:return s.logger&&s.logger.log(v.LogLevel.WARN,l.OCSDKTelemetryEvent.GETRECONNECTAVAILABILITY,{Region:o.data.Region,ElapsedTimeInMilliseconds:i,TransactionId:o.headers[h.default.transactionid]},"Get Reconnect availability didn't send any valid data."),t(),e.abrupt("return");case 15:return e.prev=15,e.t0=e.catch(0),f=n.milliSecondsElapsed,s.logger&&s.logger.log(v.LogLevel.ERROR,l.OCSDKTelemetryEvent.GETRECONNECTAVAILABILITY,{ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:f},"Get Reconnect Availability Failed"),r(e.t0),e.abrupt("return");case 21:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(t,n){return e.apply(this,arguments)}}()));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return k.apply(this,arguments)})},{key:"getQueueAvailability",value:(N=(0,o.default)(a.default.mark((function e(t){var n,r,i,c,u,s,S,y,R,w,O=this,L=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=L.length>1&&void 0!==L[1]?L[1]:{},r=T.Timer.TIMER(),this.logger&&this.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.GETQUEUEAVAILABILITYSTARTED,{RequestId:t},"Get queue availability started"),i="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.GetQueueAvailabilityPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t,"?channelId=lcw"),c=d.default.create(),(0,I.default)(c,{retries:this.configuration.maxRequestRetriesOnFailure}),u=n.authenticatedUserToken,s=n.initContext,S=n.getContext,y=h.default.defaultHeaders,u&&(y[C.default.authenticatedUserToken]=u),R=s||{},!S||window.document){e.next=12;break}return e.abrupt("return",Promise.reject(new Error("getContext is only supported on web browsers")));case 12:if(S&&(R.browser=f.BrowserInfo.getBrowserName(),R.device=g.DeviceInfo.getDeviceType(),R.originurl=window.location.href,R.os=E.OSInfo.getOsType()),R.locale||(R.locale=h.default.defaultLocale),!R.locale||p.default.supportedLocales.includes(R.locale)){e.next=16;break}return e.abrupt("return",Promise.reject(new Error("Unsupported locale: '".concat(R.locale,"'"))));case 16:return w={data:R,headers:y,method:"POST",url:i},e.abrupt("return",new Promise(function(){var e=(0,o.default)(a.default.mark((function e(n,o){var i,u,s,d;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c(w);case 3:i=e.sent,u=r.milliSecondsElapsed,(s=i.data)&&(O.logger&&O.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.GETQUEUEAVAILABILITYSUCCEEDED,{RequestId:t,Region:i.data.Region,ElapsedTimeInMilliseconds:u,TransactionId:i.headers["transaction-id"]},"Get queue availability Succeeded"),n(s)),e.next=14;break;case 9:e.prev=9,e.t0=e.catch(0),d=r.milliSecondsElapsed,O.logger&&O.logger.log(v.LogLevel.ERROR,l.OCSDKTelemetryEvent.GETQUEUEAVAILABILITYFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:d},"Get queue availability failed"),o(e.t0);case 14:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,n){return e.apply(this,arguments)}}()));case 18:case"end":return e.stop()}}),e,this)}))),function(e){return N.apply(this,arguments)})},{key:"sessionInit",value:(x=(0,o.default)(a.default.mark((function e(t){var n,r,i,c,u,s,S,y,R,w,O,L=this,A=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=A.length>1&&void 0!==A[1]?A[1]:{},r=T.Timer.TIMER(),this.logger&&this.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.SESSIONINITSTARTED,{RequestId:t},"Session Init Started"),i=d.default.create(),(0,I.default)(i,{retries:this.configuration.maxRequestRetriesOnFailure}),c=n.reconnectId,u=n.authenticatedUserToken,s=n.initContext,S=n.getContext,y=h.default.defaultHeaders,R="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatSessionInitPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),u&&(R="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatAuthSessionInitPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),y[C.default.authenticatedUserToken]=u),c&&(R+="/".concat(c)),R+="?channelId=".concat(this.omnichannelConfiguration.channelId),w=s||{},!S||window.document){e.next=14;break}return e.abrupt("return",Promise.reject(new Error("getContext is only supported on web browsers")));case 14:if(S&&(w.browser=f.BrowserInfo.getBrowserName(),w.device=g.DeviceInfo.getDeviceType(),w.originurl=window.location.href,w.os=E.OSInfo.getOsType()),w.locale||(w.locale=h.default.defaultLocale),!w.locale||p.default.supportedLocales.includes(w.locale)){e.next=18;break}return e.abrupt("return",Promise.reject(new Error("Unsupported locale: '".concat(w.locale,"'"))));case 18:return O={data:w,headers:y,method:"POST",url:R},e.abrupt("return",new Promise(function(){var e=(0,o.default)(a.default.mark((function e(n,o){var c,u,s;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i(O);case 3:c=e.sent,u=r.milliSecondsElapsed,L.logger&&L.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.SESSIONINITSUCCEEDED,{RequestId:t,Region:c.data.Region,ElapsedTimeInMilliseconds:u,TransactionId:c.headers["transaction-id"]},"Session Init Succeeded"),n(),e.next=14;break;case 9:e.prev=9,e.t0=e.catch(0),s=r.milliSecondsElapsed,L.logger&&L.logger.log(v.LogLevel.ERROR,l.OCSDKTelemetryEvent.SESSIONINITFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:s},"Session Init Failed"),o(e.t0);case 14:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,n){return e.apply(this,arguments)}}()));case 20:case"end":return e.stop()}}),e,this)}))),function(e){return x.apply(this,arguments)})},{key:"sessionClose",value:(b=(0,o.default)(a.default.mark((function e(t){var n,r,i,c,u,s,f,g,p,E,S,y=this,R=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=R.length>1&&void 0!==R[1]?R[1]:{},r=T.Timer.TIMER(),this.logger&&this.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.SESSIONCLOSESTARTED,{RequestId:t},"Session Close Started"),i="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatSessionClosePath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),c=d.default.create(),(0,I.default)(c,{retries:this.configuration.maxRequestRetriesOnFailure}),u=n.authenticatedUserToken,s=n.isReconnectChat,f=n.isPersistentChat,g=n.chatId,p=h.default.defaultHeaders,(E={}).chatId=g,u&&(i="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatAuthSessionClosePath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),p[C.default.authenticatedUserToken]=u),s&&(i+="&isReconnectChat=true"),f&&(i+="&isPersistentChat=true"),S={data:E,headers:p,method:"POST",url:i},e.abrupt("return",new Promise(function(){var e=(0,o.default)(a.default.mark((function e(n,o){var i,u,s;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c(S);case 3:i=e.sent,u=r.milliSecondsElapsed,y.logger&&y.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.SESSIONCLOSESUCCEEDED,{RequestId:t,Region:i.data.Region,ElapsedTimeInMilliseconds:u,TransactionId:i.headers["transaction-id"]},"Session Close Succeeded"),n(),e.next=14;break;case 9:e.prev=9,e.t0=e.catch(0),s=r.milliSecondsElapsed,y.logger&&y.logger.log(v.LogLevel.ERROR,l.OCSDKTelemetryEvent.SESSIONCLOSEFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:s},"Session Close Failed"),o();case 14:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,n){return e.apply(this,arguments)}}()));case 15:case"end":return e.stop()}}),e,this)}))),function(e){return b.apply(this,arguments)})},{key:"validateAuthChatRecord",value:(D=(0,o.default)(a.default.mark((function e(t,n){var r,o,i,c,u,s,f,g,p,E,S,y,R,w;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=T.Timer.TIMER(),this.logger&&this.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.VALIDATEAUTHCHATRECORDSTARTED,{RequestId:t},"Validate Auth Chat Record Started"),o=n.authenticatedUserToken,i=n.chatId,c="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatValidateAuthChatMapRecordPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(i,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),u=d.default.create(),(0,I.default)(u,{retries:this.configuration.maxRequestRetriesOnFailure}),s=h.default.defaultHeaders,o&&(s[C.default.authenticatedUserToken]=o),f={headers:s,method:"GET",url:c},e.prev=9,e.next=12,u(f);case 12:if(p=e.sent,E=r.milliSecondsElapsed,!0!==(null===(g=p.data)||void 0===g?void 0:g.authChatExist)){e.next=19;break}return null===(S=this.logger)||void 0===S||S.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.VALIDATEAUTHCHATRECORDSUCCEEDED,{RequestId:t,Region:p.data.Region,ElapsedTimeInMilliseconds:E,TransactionId:p.headers["transaction-id"]},"Validate Auth Chat Record Succeeded"),e.abrupt("return",Promise.resolve(p.data));case 19:return null===(y=this.logger)||void 0===y||y.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.VALIDATEAUTHCHATRECORDFAILED,{RequestId:t,Region:p.data.Region,ElapsedTimeInMilliseconds:E,TransactionId:p.headers["transaction-id"],ErrorCode:p.status},"Validate Auth Chat Record Failed. Record is not found or request is not authorized"),e.abrupt("return",Promise.reject(new Error("Validate Auth Chat Record Failed. Record is not found or request is not authorized")));case 21:e.next=32;break;case 23:if(e.prev=23,e.t0=e.catch(9),w=r.milliSecondsElapsed,null===(R=this.logger)||void 0===R||R.log(v.LogLevel.ERROR,l.OCSDKTelemetryEvent.VALIDATEAUTHCHATRECORDFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:w},"Validate Auth Chat Record Failed"),"Error: Request failed with status code 404"!==e.t0.toString()){e.next=31;break}return e.abrupt("return",Promise.resolve({}));case 31:return e.abrupt("return",Promise.reject());case 32:case"end":return e.stop()}}),e,this,[[9,23]])}))),function(e,t){return D.apply(this,arguments)})},{key:"submitPostChatResponse",value:(A=(0,o.default)(a.default.mark((function e(t,n){var r,i,c,u,s,f,g,p=this,E=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=E.length>2&&void 0!==E[2]?E[2]:{},i=T.Timer.TIMER(),this.logger&&this.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.SUBMITPOSTCHATSTARTED,{RequestId:t},"Submit Post Chat Started"),c="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatSubmitPostChatPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),u=d.default.create(),(0,I.default)(u,{retries:this.configuration.maxRequestRetriesOnFailure}),s=r.authenticatedUserToken,f=h.default.defaultHeaders,s&&(c="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatAuthSubmitPostChatPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),f[C.default.authenticatedUserToken]=s),g={data:JSON.stringify(n),headers:f,method:"POST",url:c},e.abrupt("return",new Promise(function(){var e=(0,o.default)(a.default.mark((function e(n,r){var o,c,s;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,u(g);case 3:o=e.sent,c=i.milliSecondsElapsed,p.logger&&p.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.SUBMITPOSTCHATSUCCEEDED,{RequestId:t,Region:o.data.Region,ElapsedTimeInMilliseconds:c,TransactionId:o.headers["transaction-id"]},"Submit Post Chat Succeeded"),n(),e.next=14;break;case 9:e.prev=9,e.t0=e.catch(0),s=i.milliSecondsElapsed,p.logger&&p.logger.log(v.LogLevel.ERROR,l.OCSDKTelemetryEvent.SUBMITPOSTCHATFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:s},"Submit Post Chat Failed"),r();case 14:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,n){return e.apply(this,arguments)}}()));case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"getSurveyInviteLink",value:(L=(0,o.default)(a.default.mark((function e(t,n){var r,i,c,u,s,f,g,p,E=this,S=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=S.length>2&&void 0!==S[2]?S[2]:{},i=T.Timer.TIMER(),this.logger&&this.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.GETSURVEYINVITELINKSTARTED,{SurveyOwnerId:t},"Get Survey Invite Link Started"),c="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatGetSurveyInviteLinkPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(t),u=d.default.create(),(0,I.default)(u,{retries:this.configuration.maxRequestRetriesOnFailure}),s=r.authenticatedUserToken,f=r.requestId,g=h.default.defaultHeaders,s&&(c="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatAuthGetSurveyInviteLinkPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(t),g[C.default.authenticatedUserToken]=s,g[C.default.widgetAppId]=this.omnichannelConfiguration.widgetId),f&&(g[C.default.requestId]=f),p={data:JSON.stringify(n),headers:g,method:"POST",url:c},e.abrupt("return",new Promise(function(){var e=(0,o.default)(a.default.mark((function e(t,n){var r,o,c,s;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,u(p);case 3:r=e.sent,o=r.data,c=i.milliSecondsElapsed,E.logger&&E.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.GETSURVEYINVITELINKSUCCEEDED,{Region:r.data.Region,ElapsedTimeInMilliseconds:c,TransactionId:r.headers["transaction-id"]},"Get Survey Invite Link Succeeded"),t(o),e.next=15;break;case 10:e.prev=10,e.t0=e.catch(0),s=i.milliSecondsElapsed,E.logger&&E.logger.log(v.LogLevel.ERROR,l.OCSDKTelemetryEvent.GETSURVEYINVITELINKFAILED,{ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:s},"Get Survey Invite Link Failed"),n();case 15:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,n){return e.apply(this,arguments)}}()));case 12:case"end":return e.stop()}}),e,this)}))),function(e,t){return L.apply(this,arguments)})},{key:"getChatTranscripts",value:(O=(0,o.default)(a.default.mark((function e(t,n,r){var i,c,u,s,f,g,p,E,S=this,y=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=y.length>3&&void 0!==y[3]?y[3]:{},c=T.Timer.TIMER(),this.logger&&this.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.GETCHATTRANSCRIPTSTARTED,{RequestId:t},"Get Chat Transcript Started"),u="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatGetChatTranscriptPath,"/").concat(n,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),s=d.default.create(),(0,I.default)(s,{retries:this.configuration.maxRequestRetriesOnFailure}),f=i.authenticatedUserToken,g=i.currentLiveChatVersion,(p=h.default.defaultHeaders)[C.default.organizationId]=this.omnichannelConfiguration.orgId,p[C.default.widgetAppId]=this.omnichannelConfiguration.widgetId,p[C.default.authorization]=r,this.liveChatVersion===l.LiveChatVersion.V2||g&&g===l.LiveChatVersion.V2?(u="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatv2GetChatTranscriptPath,"/").concat(n,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),f&&(u="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatv2AuthGetChatTranscriptPath,"/").concat(n,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId))):f&&(u="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatAuthGetChatTranscriptPath,"/").concat(n,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId)),E={headers:p,method:"GET",url:u},e.abrupt("return",new Promise(function(){var e=(0,o.default)(a.default.mark((function e(n,r){var o,i,u,d;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s(E);case 3:o=e.sent,i=c.milliSecondsElapsed,u=o.data,S.logger&&S.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.GETCHATTRANSCRIPTSUCCEEDED,{RequestId:t,Region:o.data.Region,ElapsedTimeInMilliseconds:i,TransactionId:o.headers["transaction-id"]},"Get Chat Transcript Succeeded"),n(u),e.next=15;break;case 10:e.prev=10,e.t0=e.catch(0),d=c.milliSecondsElapsed,S.logger&&S.logger.log(v.LogLevel.ERROR,l.OCSDKTelemetryEvent.GETCHATTRANSCRIPTFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:d},"Get Chat Transcript Failed"),r(e.t0);case 15:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,n){return e.apply(this,arguments)}}()));case 14:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return O.apply(this,arguments)})},{key:"emailTranscript",value:(y=(0,o.default)(a.default.mark((function e(t,n,r){var i,c,u,s,f,g,p,E=this,S=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=S.length>3&&void 0!==S[3]?S[3]:{},c=T.Timer.TIMER(),this.logger&&this.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.EMAILTRANSCRIPTSTARTED,{RequestId:t},"Email Transcript Started"),u="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatTranscriptEmailRequestPath,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),s=d.default.create(),(0,I.default)(s,{retries:this.configuration.maxRequestRetriesOnFailure}),f=i.authenticatedUserToken,(g=h.default.defaultHeaders)[C.default.organizationId]=this.omnichannelConfiguration.orgId,g[C.default.widgetAppId]=this.omnichannelConfiguration.widgetId,g[C.default.authorization]=n,f&&(u="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatAuthTranscriptEmailRequestPath,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId)),p={data:JSON.stringify(r),headers:g,method:"POST",url:u},e.abrupt("return",new Promise(function(){var e=(0,o.default)(a.default.mark((function e(n,r){var o,i,u;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s(p);case 3:o=e.sent,i=c.milliSecondsElapsed,E.logger&&E.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.EMAILTRANSCRIPTSUCCEEDED,{RequestId:t,Region:o.data.Region,ElapsedTimeInMilliseconds:i,TransactionId:o.headers["transaction-id"]},"Email Transcript Succeeded"),n(),e.next=14;break;case 9:e.prev=9,e.t0=e.catch(0),u=c.milliSecondsElapsed,E.logger&&E.logger.log(v.LogLevel.ERROR,l.OCSDKTelemetryEvent.EMAILTRANSCRIPTFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:u},"Email Transcript Failed"),r();case 14:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,n){return e.apply(this,arguments)}}()));case 14:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return y.apply(this,arguments)})},{key:"fetchDataMaskingInfo",value:(r=(0,o.default)(a.default.mark((function e(t){var n,r,i,c,u,s=this;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=T.Timer.TIMER(),this.logger&&this.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.FETCHDATAMASKINGSTARTED,{RequestId:t},"Fetch Data Masking Started"),t||(t=(0,S.uuidv4)()),r="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatFetchDataMaskingInfoPath,"/").concat(this.omnichannelConfiguration.orgId),i=d.default.create(),(0,I.default)(i,{retries:this.configuration.maxRequestRetriesOnFailure}),(c=h.default.defaultHeaders)[C.default.organizationId]=this.omnichannelConfiguration.orgId,c[C.default.requestId]=t,u={headers:c,method:"GET",url:r},e.abrupt("return",new Promise(function(){var e=(0,o.default)(a.default.mark((function e(r,o){var c,d,f,h;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i(u);case 3:c=e.sent,d=n.milliSecondsElapsed,f=c.data,s.logger&&s.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.FETCHDATAMASKINGSUCCEEDED,{RequestId:t,Region:c.data.Region,ElapsedTimeInMilliseconds:d,TransactionId:c.headers["transaction-id"]},"Fetch Data Masking Succeeded"),r(f),e.next=15;break;case 10:e.prev=10,e.t0=e.catch(0),h=n.milliSecondsElapsed,s.logger&&s.logger.log(v.LogLevel.ERROR,l.OCSDKTelemetryEvent.FETCHDATAMASKINGFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:h},"Fetch Data Masking Failed"),o();case 15:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,n){return e.apply(this,arguments)}}()));case 11:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"makeSecondaryChannelEventRequest",value:(n=(0,o.default)(a.default.mark((function e(t,n){var r,o,i,c,u,s,f,g,p,E,S,y=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=y.length>2&&void 0!==y[2]?y[2]:{},o=T.Timer.TIMER(),this.logger&&this.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.SECONDARYCHANNELEVENTREQUESTSTARTED,{RequestId:t},"Secondary Channel Event Request Started"),i="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatSecondaryChannelEventPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),c=d.default.create(),(0,I.default)(c,{retries:this.configuration.maxRequestRetriesOnFailure}),u=r.authenticatedUserToken,(s=h.default.defaultHeaders)[C.default.organizationId]=this.omnichannelConfiguration.orgId,u&&(s[C.default.authenticatedUserToken]=u,i="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.LiveChatAuthSecondaryChannelEventPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t)),i+="?channelId="+h.default.defaultChannelId,f={data:JSON.stringify(n),headers:s,method:"POST",url:i},e.prev=12,e.next=15,c(f);case 15:g=e.sent,p=o.milliSecondsElapsed,E=g.data,this.logger&&this.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.SECONDARYCHANNELEVENTREQUESTSUCCEEDED,{RequestId:t,Region:E.Region,ElapsedTimeInMilliseconds:p,TransactionId:g.headers["transaction-id"]},"Secondary Channel Event Request Succeeded"),e.next=26;break;case 21:throw e.prev=21,e.t0=e.catch(12),S=o.milliSecondsElapsed,this.logger&&this.logger.log(v.LogLevel.ERROR,l.OCSDKTelemetryEvent.SECONDARYCHANNELEVENTREQUESTFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:S},"Secondary Channel Event Request Failed"),e.t0;case 26:case"end":return e.stop()}}),e,this,[[12,21]])}))),function(e,t){return n.apply(this,arguments)})},{key:"sendTypingIndicator",value:(t=(0,o.default)(a.default.mark((function e(t,n){var r,i,c,u,s,f=this;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n&&n===l.LiveChatVersion.V2){e.next=2;break}return e.abrupt("return",Promise.resolve());case 2:if(r=T.Timer.TIMER(),n&&n===l.LiveChatVersion.V2){e.next=5;break}throw new Error("Typing indicator is only supported on v2");case 5:return i="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(m.default.SendTypingIndicatorPath,"/").concat(t),c=d.default.create(),(u=h.default.defaultHeaders)[C.default.organizationId]=this.omnichannelConfiguration.orgId,s={headers:u,method:"POST",url:i},e.abrupt("return",new Promise(function(){var e=(0,o.default)(a.default.mark((function e(n,o){var i,u,d,h;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c(s);case 3:i=e.sent,u=r.milliSecondsElapsed,d=i.data,f.logger&&f.logger.log(v.LogLevel.INFO,l.OCSDKTelemetryEvent.SENDTYPINGINDICATORSUCCEEDED,{RequestId:t,Region:d.Region,ElapsedTimeInMilliseconds:u,TransactionId:i.headers["transaction-id"]},"Send Typing Indicator Succeeded"),n(),e.next=15;break;case 10:e.prev=10,e.t0=e.catch(0),h=r.milliSecondsElapsed,f.logger&&f.logger.log(v.LogLevel.ERROR,l.OCSDKTelemetryEvent.SENDTYPINGINDICATORFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:h},"Send Typing Indicator Failed"),o(e.t0);case 15:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,n){return e.apply(this,arguments)}}()));case 11:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})}]),e}();t.default=L,(0,s.default)(L,"defaultConfiguration",{getChatTokenRetryCount:35,getChatTokenTimeBetweenRetriesOnFailure:1e4,maxRequestRetriesOnFailure:3})},function(e,t,n){e.exports=n(25)},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function c(e,t,n,r){var a=t&&t.prototype instanceof l?t:l,o=Object.create(a.prototype),i=new S(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return R()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=C(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===s)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,i),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var s={};function l(){}function d(){}function f(){}var h={};h[a]=function(){return this};var g=Object.getPrototypeOf,p=g&&g(g(y([])));p&&p!==t&&n.call(p,a)&&(h=p);var v=f.prototype=l.prototype=Object.create(h);function E(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function m(e,t){var r;this._invoke=function(a,o){function i(){return new t((function(r,i){!function r(a,o,i,c){var s=u(e[a],e,o);if("throw"!==s.type){var l=s.arg,d=l.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(d).then((function(e){l.value=e,i(l)}),(function(e){return r("throw",e,i,c)}))}c(s.arg)}(a,o,r,i)}))}return r=r?r.then(i,i):i()}}function C(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,C(e,t),"throw"===t.method))return s;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,s;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,s):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function y(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:R}}function R(){return{value:void 0,done:!0}}return d.prototype=v.constructor=f,f.constructor=d,f[i]=d.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,i in e||(e[i]="GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},E(m.prototype),m.prototype[o]=function(){return this},e.AsyncIterator=m,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new m(c(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},E(v),v[i]="Generator",v[a]=function(){return this},v.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=y,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(I),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,s):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),s},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),s}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;I(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:y(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t){function n(e,t,n,r,a,o,i){try{var c=e[o](i),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,a)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(a,o){var i=e.apply(t,r);function c(e){n(i,a,o,c,u,"next",e)}function u(e){n(i,a,o,c,u,"throw",e)}c(void 0)}))}}},function(e,t,n){e.exports=n(28)},function(e,t,n){"use strict";var r=n(2),a=n(8),o=n(29),i=n(14);function c(e){var t=new o(e),n=a(o.prototype.request,t);return r.extend(n,o.prototype,t),r.extend(n,t),n}var u=c(n(11));u.Axios=o,u.create=function(e){return c(i(u.defaults,e))},u.Cancel=n(15),u.CancelToken=n(43),u.isCancel=n(10),u.all=function(e){return Promise.all(e)},u.spread=n(44),u.isAxiosError=n(45),e.exports=u,e.exports.default=u},function(e,t,n){"use strict";var r=n(2),a=n(9),o=n(30),i=n(31),c=n(14);function u(e){this.defaults=e,this.interceptors={request:new o,response:new o}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=c(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[i,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},u.prototype.getUri=function(e){return e=c(this.defaults,e),a(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(c(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(c(r||{},{method:e,url:t,data:n}))}})),e.exports=u},function(e,t,n){"use strict";var r=n(2);function a(){this.handlers=[]}a.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},a.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},a.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=a},function(e,t,n){"use strict";var r=n(2),a=n(32),o=n(10),i=n(11);function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=a(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||i.adapter)(e).then((function(t){return c(e),t.data=a(t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(c(e),t&&t.response&&(t.response.data=a(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},function(e,t){var n,r,a=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var u,s=[],l=!1,d=-1;function f(){l&&u&&(l=!1,u.length?s=u.concat(s):d=-1,s.length&&h())}function h(){if(!l){var e=c(f);l=!0;for(var t=s.length;t;){for(u=s,s=[];++d<t;)u&&u[d].run();d=-1,t=s.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function p(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new g(e,t)),1!==s.length||l||c(h)},g.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=p,a.addListener=p,a.once=p,a.off=p,a.removeListener=p,a.removeAllListeners=p,a.emit=p,a.prependListener=p,a.prependOnceListener=p,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(13);e.exports=function(e,t,n){var a=n.config.validateStatus;n.status&&a&&!a(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,a){return e.config=t,n&&(e.code=n),e.request=r,e.response=a,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,a,o,i){var c=[];c.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&c.push("expires="+new Date(n).toGMTString()),r.isString(a)&&c.push("path="+a),r.isString(o)&&c.push("domain="+o),!0===i&&c.push("secure"),document.cookie=c.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(39),a=n(40);e.exports=function(e,t){return e&&!r(t)?a(e,t):t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(2),a=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,i={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(i[t]&&a.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function a(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=a(window.location.href),function(t){var n=r.isString(t)?a(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(15);function a(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}a.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},a.source=function(){var e;return{token:new a((function(t){e=t})),cancel:e}},e.exports=a},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserInfo=t.UNKNOWN_VERSION=void 0;var a=r(n(1)),o=r(n(3)),i=r(n(4)),c=n(5);t.UNKNOWN_VERSION="U";var u=function(){function e(){(0,a.default)(this,e)}return(0,o.default)(e,null,[{key:"getUserAgent",value:function(){return this.userAgent()}},{key:"userAgentContainsString",value:function(e){return this.getUserAgent().indexOf(e)>-1}},{key:"isChrome",value:function(){return this.userAgentContainsString(c.BrowserVendor.CHROME)&&!this.userAgentContainsString(c.BrowserVendor.EDGE)&&!this.userAgentContainsString(c.BrowserVendor.EDGE_CHROMIUM)}},{key:"isIe",value:function(){return this.userAgentContainsString("Trident")}},{key:"isEdge",value:function(){return this.userAgentContainsString(c.BrowserVendor.EDGE)||this.userAgentContainsString(c.BrowserVendor.EDGE_CHROMIUM)}},{key:"isOpera",value:function(){return this.userAgentContainsString("OPR/")}},{key:"getBrowserName",value:function(){return this.isOpera()?c.BrowserVendor.OPERA:this.isEdge()?c.BrowserVendor.EDGE:this.isChrome()?c.BrowserVendor.CHROME:this.userAgentContainsString(c.BrowserVendor.FIREFOX)?c.BrowserVendor.FIREFOX:this.userAgentContainsString(c.BrowserVendor.SAFARI)?c.BrowserVendor.SAFARI:this.isIe()?c.BrowserVendor.IE:c.BrowserVendor.UNKNOWN}},{key:"getBrowserVersion",value:function(){var e=this;return this.isIe()?function(){var t=e.getUserAgent(),n=t.match(new RegExp(c.BrowserVendor.IE+" ([\\d,.]+)"));if(n)return n[1];var r=t.match(new RegExp("rv:([\\d,.]+)"));return r?r[1]:void 0}():function(t){t===c.BrowserVendor.SAFARI&&(t="Version"),t===c.BrowserVendor.OPERA&&(t="OPR"),t===c.BrowserVendor.EDGE&&(t="Edge?");var n=e.getUserAgent().match(new RegExp(t+"/([\\d,.]+)"));return n?n[1]:"U"}(this.getBrowserName())}}]),e}();t.BrowserInfo=u,(0,i.default)(u,"userAgent",(function(){return window.navigator.userAgent}))},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceInfo=void 0;var a=r(n(1)),o=r(n(3)),i=n(5),c=function(){function e(){(0,a.default)(this,e)}return(0,o.default)(e,null,[{key:"getDeviceType",value:function(){return window.navigator.userAgent.match(/(android|ipod|windows phone|wpdesktop|windows ce|blackberry\w*|meego|webos|palm|symbian|pda|\w*?mobile\w*?|\w*?phone\w*?)/i)?i.DeviceType.Mobile:window.navigator.userAgent.match(/tablet|ipad/i)?i.DeviceType.Tablet:i.DeviceType.Desktop}}]),e}();t.DeviceInfo=c},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(1)),o=r(n(4)),i=function e(){(0,a.default)(this,e)};t.default=i,(0,o.default)(i,"supportedLocales",["ar-sa","bg-bg","ca-es","cs-cz","da-dk","de-de","el-gr","en-us","es-es","et-ee","eu-es","fi-fi","fr-fr","gl-es","he-il","hi-in","hr-hr","hu-hu","id-id","it-it","ja-jp","kk-kz","ko-kr","lt-lt","lv-lv","ms-my","nb-no","nl-nl","pl-pl","pt-br","pt-pt","ro-ro","ru-ru","sk-sk","sl-si","sr-cyrl-cs","sr-latn-cs","sv-se","th-th","tr-tr","uk-ua","vi-vn","zh-cn","zh-hk","zh-tw"])},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,t.LogLevel=r,function(e){e.INFO="INFO",e.DEBUG="DEBUG",e.WARN="WARN",e.ERROR="ERROR"}(r||(t.LogLevel=r={}))},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.OSInfo=void 0;var a=r(n(1)),o=r(n(3)),i=n(5),c=function(){function e(){(0,a.default)(this,e)}return(0,o.default)(e,null,[{key:"getOsType",value:function(){var e=function(){return window.navigator.userAgent};return e().match(/windows\sphone\s\d+\.\d+/i)?i.OperatingSystem.WINDOWS_PHONE:e().match(/ arm;/i)?i.OperatingSystem.WINDOWS_RT:e().match(/(iPad|iPhone|iPod)(?=.*like Mac OS X)/i)?i.OperatingSystem.IOS:e().match(/android/i)?i.OperatingSystem.ANDROID:e().match(/(linux|joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|cros)/i)?i.OperatingSystem.LINUX:e().match(/(macintosh|mac os x)/i)?i.OperatingSystem.MACOSX:e().match(/(windows|win32)/i)?i.OperatingSystem.WINDOWS:i.OperatingSystem.UNKNOWN}}]),e}();t.OSInfo=c},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(1)),o=r(n(4)),i=function e(){(0,a.default)(this,e)};t.default=i,(0,o.default)(i,"LiveChatConfigPath","livechatconnector/config"),(0,o.default)(i,"LiveChatSessionInitPath","livechatconnector/sessioninit"),(0,o.default)(i,"LiveChatAuthSessionInitPath","livechatconnector/auth/sessioninit"),(0,o.default)(i,"LiveChatGetChatTokenPath","livechatconnector/getchattoken"),(0,o.default)(i,"LiveChatv2GetChatTokenPath","livechatconnector/v2/getchattoken"),(0,o.default)(i,"LiveChatAuthGetChatTokenPath","livechatconnector/auth/getchattoken"),(0,o.default)(i,"LiveChatv2AuthGetChatTokenPath","livechatconnector/v2/auth/getchattoken"),(0,o.default)(i,"LiveChatSessionClosePath","livechatconnector/sessionclose"),(0,o.default)(i,"LiveChatAuthSessionClosePath","livechatconnector/auth/sessionclose"),(0,o.default)(i,"LiveChatSubmitPostChatPath","survey/submitpostchat"),(0,o.default)(i,"LiveChatAuthSubmitPostChatPath","survey/auth/submitpostchat"),(0,o.default)(i,"LiveChatGetSurveyInviteLinkPath","livechatconnector/getsurveyinvite"),(0,o.default)(i,"LiveChatAuthGetSurveyInviteLinkPath","livechatconnector/auth/getsurveyinvite"),(0,o.default)(i,"LiveChatGetChatTranscriptPath","livechatconnector/getchattranscripts"),(0,o.default)(i,"LiveChatv2GetChatTranscriptPath","livechatconnector/v2/getchattranscripts"),(0,o.default)(i,"LiveChatAuthGetChatTranscriptPath","livechatconnector/auth/getchattranscripts"),(0,o.default)(i,"LiveChatv2AuthGetChatTranscriptPath","livechatconnector/v2/auth/getchattranscripts"),(0,o.default)(i,"LiveChatTranscriptEmailRequestPath","livechatconnector/createemailrequest"),(0,o.default)(i,"LiveChatAuthTranscriptEmailRequestPath","livechatconnector/auth/createemailrequest"),(0,o.default)(i,"LiveChatFetchDataMaskingInfoPath","livechatconnector/fetchdatamaskinginfo"),(0,o.default)(i,"LiveChatSecondaryChannelEventPath","livechatconnector/secondarychannelevent"),(0,o.default)(i,"LiveChatAuthSecondaryChannelEventPath","livechatconnector/auth/secondarychannelevent"),(0,o.default)(i,"LiveChatLiveWorkItemDetailsPath","livechatconnector/getliveworkitemdetails"),(0,o.default)(i,"LiveChatAuthLiveWorkItemDetailsPath","livechatconnector/auth/getliveworkitemdetails"),(0,o.default)(i,"LiveChatGetReconnectableChatsPath","livechatconnector/auth/reconnectablechats"),(0,o.default)(i,"LiveChatReconnectAvailabilityPath","livechatconnector/reconnect"),(0,o.default)(i,"LiveChatValidateAuthChatMapRecordPath","livechatconnector/auth/validateauthchatmaprecord"),(0,o.default)(i,"GetQueueAvailabilityPath","livechatconnector/auth/getqueueavailability"),(0,o.default)(i,"SendTypingIndicatorPath","inbound/typingindicator/livechat/sendtypingindicator")},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(1)),o=r(n(4)),i=function e(){(0,a.default)(this,e)};t.default=i,(0,o.default)(i,"authenticatedUserToken","AuthenticatedUserToken"),(0,o.default)(i,"authorization","Authorization"),(0,o.default)(i,"organizationId","OrganizationId"),(0,o.default)(i,"widgetAppId","widgetAppId"),(0,o.default)(i,"requestId","Request-Id")},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.Timer=void 0;var a=r(n(1)),o=r(n(3)),i=function(){function e(){(0,a.default)(this,e)}return(0,o.default)(e,null,[{key:"TIMER",value:function(){var e=(new Date).getTime();return{get milliSecondsElapsed(){return(new Date).getTime()-e}}}}]),e}();t.Timer=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){var n=t.retries,r=0;e.interceptors.response.use(void 0,(function(t){var a=t.config;return a&&r<n?(r++,new Promise((function(t){return t(e(a))}))):Promise.reject(t)}))};t.default=r},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(1)),o=r(n(3)),i=function(){function e(){(0,a.default)(this,e)}return(0,o.default)(e,null,[{key:"raiseCustomEvent",value:function(t,n){var r=e.createCustomEvent(t,n);window.dispatchEvent(r)}},{key:"createCustomEvent",value:function(e,t){var n=t?{detail:t}:void 0,r=null;try{r=new CustomEvent(e,n)}catch(t){(r=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,n)}return r}}]),e}();t.default=i}]));
1
+ !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}([function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(9),a=Object.prototype.toString;function i(e){return"[object Array]"===a.call(e)}function o(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==a.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===a.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.call(null,e[a],a,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===a.call(e)},isBuffer:function(e){return null!==e&&!o(e)&&null!==e.constructor&&!o(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isPlainObject:c,isUndefined:o,isDate:function(e){return"[object Date]"===a.call(e)},isFile:function(e){return"[object File]"===a.call(e)},isBlob:function(e){return"[object Blob]"===a.call(e)},isFunction:u,isStream:function(e){return s(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function e(){var t={};function n(n,r){c(t[r])&&c(n)?t[r]=e(t[r],n):c(n)?t[r]=e({},n):i(n)?t[r]=n.slice():t[r]=n}for(var r=0,a=arguments.length;r<a;r++)l(arguments[r],n);return t},extend:function(e,t,n){return l(t,(function(t,a){e[a]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r,a,i,o,s,c,u;Object.defineProperty(t,"__esModule",{value:!0}),t.LiveChatVersion=t.OCSDKTelemetryEvent=t.ChannelId=t.OperatingSystem=t.DeviceType=t.Browser=t.BrowserVendor=void 0,t.BrowserVendor=r,function(e){e.IE="IE",e.CHROME="Chrome",e.FIREFOX="Firefox",e.SAFARI="Safari",e.EDGE="Edge",e.EDGE_CHROMIUM="Edg",e.OPERA="Opera",e.UNKNOWN="Unknown"}(r||(t.BrowserVendor=r={})),t.Browser=a,function(e){e[e.Chrome=0]="Chrome",e[e.Firefox=1]="Firefox",e[e.Ie=2]="Ie",e[e.Edge=3]="Edge",e[e.Safari=4]="Safari",e[e.None=5]="None"}(a||(t.Browser=a={})),t.DeviceType=i,function(e){e.Desktop="Desktop",e.Mobile="Mobile",e.Tablet="Tablet"}(i||(t.DeviceType=i={})),t.OperatingSystem=o,function(e){e.WINDOWS="Windows",e.MACOSX="Mac OS X",e.WINDOWS_PHONE="Windows Phone",e.WINDOWS_RT="Windows RT",e.IOS="iOS",e.ANDROID="Android",e.LINUX="Linux",e.UNKNOWN="Unknown"}(o||(t.OperatingSystem=o={})),t.ChannelId=s,function(e){e.LCW="lcw",e.SMS="sms",e.FACEBOOK="facebook",e.WECHAT="wechat"}(s||(t.ChannelId=s={})),t.OCSDKTelemetryEvent=c,function(e){e.GETCHATCONFIG="GetChatConfig",e.GETCHATCONFIGSUCCESS="GetChatConfigSucceeded",e.GETRECONNECTABLECHATS="GetReconnnectableChats",e.GETRECONNECTAVAILABILITY="GetReconnnectableAvailability",e.GETCHATTOKENSTARTED="GetChatTokenStarted",e.GETCHATTOKENSUCCEEDED="GetChatTokenSucceeded",e.GETCHATTOKENFAILED="GetChatTokenFailed",e.GETLWISTATUSSTARTED="GetLwiStatusStarted",e.GETLWISTATUSSUCCEEDED="GetLwiStatusSucceeded",e.GETLWISTATUSFAILED="GetLwiStatusFailed",e.SESSIONINITSTARTED="SessionInitStarted",e.SESSIONINITSUCCEEDED="SessionInitSucceeded",e.SESSIONINITFAILED="SessionInitFailed",e.SESSIONCLOSESTARTED="SessionCloseStarted",e.SESSIONCLOSESUCCEEDED="SessionCloseSucceeded",e.SESSIONCLOSEFAILED="SessionCloseFailed",e.SUBMITPOSTCHATSTARTED="SubmitPostChatStarted",e.SUBMITPOSTCHATSUCCEEDED="SubmitPostChatSucceeded",e.SUBMITPOSTCHATFAILED="SubmitPostChatFailed",e.GETCHATTRANSCRIPTSTARTED="GetChatTranscriptStarted",e.GETCHATTRANSCRIPTSUCCEEDED="GetChatTranscriptSucceeded",e.GETCHATTRANSCRIPTFAILED="GetChatTranscriptFailed",e.EMAILTRANSCRIPTSTARTED="EmailTranscriptStarted",e.EMAILTRANSCRIPTSUCCEEDED="EmailTranscriptSucceeded",e.EMAILTRANSCRIPTFAILED="EmailTranscriptFailed",e.FETCHDATAMASKINGSTARTED="FetchDataMaskingStarted",e.FETCHDATAMASKINGSUCCEEDED="FetchDataMaskingSucceeded",e.FETCHDATAMASKINGFAILED="FetchDataMaskingFailed",e.SECONDARYCHANNELEVENTREQUESTSTARTED="SecondaryChannelEventRequestStarted",e.SECONDARYCHANNELEVENTREQUESTSUCCEEDED="SecondaryChannelEventRequestSucceeded",e.SECONDARYCHANNELEVENTREQUESTFAILED="SecondaryChannelEventRequestFailed",e.GETSURVEYINVITELINKSTARTED="GetSurveyInviteLinkStarted",e.GETSURVEYINVITELINKSUCCEEDED="GetSurveyInviteLinkSucceeded",e.GETSURVEYINVITELINKFAILED="GetSurveyInviteLinkFailed",e.VALIDATEAUTHCHATRECORDSTARTED="ValidateAuthChatRecordStarted",e.VALIDATEAUTHCHATRECORDSUCCEEDED="ValidateAuthChatRecordSucceeded",e.VALIDATEAUTHCHATRECORDFAILED="ValidateAuthChatRecordFailed",e.GETQUEUEAVAILABILITYSTARTED="GetQueueAvailabilityStarted",e.GETQUEUEAVAILABILITYSUCCEEDED="GetQueueAvailabilitySucceeded",e.GETQUEUEAVAILABILITYFAILED="GetQueueAvailabilityFailed",e.SENDTYPINGINDICATORFAILED="SendTypingIndicatorFailed",e.SENDTYPINGINDICATORSUCCEEDED="SendTypingIndicatorSucceeded"}(c||(t.OCSDKTelemetryEvent=c={})),t.LiveChatVersion=u,function(e){e[e.V1=1]="V1",e[e.V2=2]="V2"}(u||(t.LiveChatVersion=u={}))},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(1)),i=r(n(4)),o=n(5),s=function e(){(0,a.default)(this,e)};t.default=s,(0,i.default)(s,"requiredOmnichannelConfigurationParameters",["orgUrl","orgId","widgetId"]),(0,i.default)(s,"defaultHeaders",{"Content-Type":"application/json"}),(0,i.default)(s,"bypassCacheHeaders",{"Cache-Control":"no-store, must-revalidate, no-cache","X-Cache-Control":"no-store"}),(0,i.default)(s,"defaultChannelId",o.ChannelId.LCW),(0,i.default)(s,"defaultLocale","en-us"),(0,i.default)(s,"noContentStatusCode",204),(0,i.default)(s,"sensitiveProperties",["AuthenticatedUserToken"]),(0,i.default)(s,"transactionid","transaction-id"),(0,i.default)(s,"customerDisplayName","customerDisplayName")},function(e,t,n){"use strict";(function(t){var r=n(2),a=n(35),i=n(11),o={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==t&&"[object process]"===Object.prototype.toString.call(t))&&(c=n(12)),c),transformRequest:[function(e,t){return a(t,"Accept"),a(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,a=t&&t.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||a&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(o)})),e.exports=u}).call(this,n(34))},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(2);function a(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var o=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),o.push(a(t)+"="+a(e))})))})),i=o.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,a){return e.config=t,n&&(e.code=n),e.request=r,e.response=a,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(2),a=n(36),i=n(37),o=n(10),s=n(38),c=n(41),u=n(42),l=n(13);e.exports=function(e){return new Promise((function(t,n){var d=e.data,f=e.headers,h=e.responseType;r.isFormData(d)&&delete f["Content-Type"];var g=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";f.Authorization="Basic "+btoa(p+":"+v)}var m=s(e.baseURL,e.url);function E(){if(g){var r="getAllResponseHeaders"in g?c(g.getAllResponseHeaders()):null,i={data:h&&"text"!==h&&"json"!==h?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g};a(t,n,i),g=null}}if(g.open(e.method.toUpperCase(),o(m,e.params,e.paramsSerializer),!0),g.timeout=e.timeout,"onloadend"in g?g.onloadend=E:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(E)},g.onabort=function(){g&&(n(l("Request aborted",e,"ECONNABORTED",g)),g=null)},g.onerror=function(){n(l("Network Error",e,null,g)),g=null},g.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",g)),g=null},r.isStandardBrowserEnv()){var C=(e.withCredentials||u(m))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;C&&(f[e.xsrfHeaderName]=C)}"setRequestHeader"in g&&r.forEach(f,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete f[t]:g.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(g.withCredentials=!!e.withCredentials),h&&"json"!==h&&(g.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&g.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&g.upload&&g.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){g&&(g.abort(),n(e),g=null)})),d||(d=null),g.send(d)}))}},function(e,t,n){"use strict";var r=n(11);e.exports=function(e,t,n,a,i){var o=new Error(e);return r(o,t,n,a,i)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){t=t||{};var n={},a=["url","method","data"],i=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function u(a){r.isUndefined(t[a])?r.isUndefined(e[a])||(n[a]=c(void 0,e[a])):n[a]=c(e[a],t[a])}r.forEach(a,(function(e){r.isUndefined(t[e])||(n[e]=c(void 0,t[e]))})),r.forEach(i,u),r.forEach(o,(function(a){r.isUndefined(t[a])?r.isUndefined(e[a])||(n[a]=c(void 0,e[a])):n[a]=c(void 0,t[a])})),r.forEach(s,(function(r){r in t?n[r]=c(e[r],t[r]):r in e&&(n[r]=c(void 0,e[r]))}));var l=a.concat(i).concat(o).concat(s),d=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===l.indexOf(e)}));return r.forEach(d,u),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uuidv4=void 0;t.uuidv4=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}},function(e,t,n){"use strict";(function(e){var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SDKProvider",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"uuidv4",{enumerable:!0,get:function(){return c.uuidv4}});var a=r(n(6)),i=r(n(20)),o=r(n(21)),s=r(n(58)),c=n(17);!function(){if(void 0===e.window&&(e.window=e),void 0===("undefined"==typeof window?"undefined":(0,a.default)(window)))throw new Error("window object not found");"Microsoft"in window||(window.Microsoft={}),"CRM"in window.Microsoft||(window.Microsoft.CRM={}),"Omnichannel"in window.Microsoft.CRM||(window.Microsoft.CRM.Omnichannel={}),"SDK"in window.Microsoft.CRM.Omnichannel||(window.Microsoft.CRM.Omnichannel.SDK={SDKProvider:o.default,Util:{uuidv4:c.uuidv4}}),window.document&&s.default.raiseCustomEvent(i.default.OCSDKLOAD)}()}).call(this,n(19))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(1)),i=r(n(3)),o=function(){function e(){(0,a.default)(this,e)}return(0,i.default)(e,null,[{key:"OCSDKLOAD",get:function(){return"oc:sdk:load"}}]),e}();t.default=o},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(1)),i=r(n(3)),o=r(n(7)),s=r(n(22)),c=r(n(24)),u=function(){function e(){(0,a.default)(this,e)}return(0,i.default)(e,null,[{key:"getSDK",value:function(e,t,n){var r=new s.default(n);return new c.default({channelId:e.channelId||o.default.defaultChannelId,orgId:e.orgId,orgUrl:e.orgUrl,widgetId:e.widgetId},t||{},r)}}]),e}();t.default=u},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(1)),i=r(n(3)),o=r(n(4)),s=r(n(23)),c=function(){function e(t){(0,a.default)(this,e),(0,o.default)(this,"logger",void 0),this.logger=t}return(0,i.default)(e,[{key:"log",value:function(e,t,n,r){if(this.isLoggingEnabled()){var a=s.default.GETTELEMETRYEVENTDATA(t,n,r);this.logEvent(e,a)}}},{key:"logEvent",value:function(e,t){this.isLoggingEnabled()&&setTimeout(this.logger.logClientSdkTelemetryEvent.bind(this.logger),0,e,t)}},{key:"isLoggingEnabled",value:function(){return!this.isNullOrUndefined(this.logger)}},{key:"isNullOrUndefined",value:function(e){return null==e}}]),e}();t.default=c},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(1)),i=r(n(3)),o=function(){function e(){(0,a.default)(this,e)}return(0,i.default)(e,null,[{key:"GETTELEMETRYEVENTDATA",value:function(e,t,n){return{Description:n,ElapsedTimeInMilliseconds:t.ElapsedTimeInMilliseconds,Event:e,ExceptionDetails:t.ExceptionDetails,Region:t.Region,RequestId:t.RequestId,TransactionId:t.TransactionId}}}]),e}();t.default=o},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(25)),i=r(n(27)),o=r(n(6)),s=r(n(1)),c=r(n(3)),u=r(n(4)),l=n(5),d=r(n(28)),f=n(48),h=r(n(7)),g=n(49),p=r(n(50)),v=n(51),m=n(52),E=n(53),C=r(n(54)),T=r(n(55)),S=n(56),I=r(n(57)),y=n(17);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){(0,u.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var x=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.defaultConfiguration,r=arguments.length>2?arguments[2]:void 0;(0,s.default)(this,e),this.omnichannelConfiguration=t,this.configuration=n,this.logger=r,(0,u.default)(this,"liveChatVersion",void 0),Object.keys(this.configuration).length&&"object"===(0,o.default)(n)||(this.configuration=e.defaultConfiguration);for(var a=0,i=Object.keys(e.defaultConfiguration);a<i.length;a++){var c=i[a];if(!this.configuration.hasOwnProperty(c))throw new Error("Missing '".concat(c,"' in SDKConfiguration"))}var d=t.channelId;if(!Object.values(l.ChannelId).includes(d))throw new Error("Invalid channelId");var f,g=Object.keys(t),p=O(h.default.requiredOmnichannelConfigurationParameters);try{for(p.s();!(f=p.n()).done;){var v=f.value;if(!g.includes(v))throw new Error("Missing '".concat(v,"' in OmnichannelConfiguration"))}}catch(e){p.e(e)}finally{p.f()}this.liveChatVersion=l.LiveChatVersion.V1}var t,n,r,w,L,x,b,A,D,k,N,P,U,M,F,G;return(0,c.default)(e,[{key:"getChatConfig",value:(G=(0,i.default)(a.default.mark((function e(t){var n,r,i,o,s,c,u,f,g=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=g.length>1&&void 0!==g[1]&&g[1],r=S.Timer.TIMER(),this.logger&&this.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.GETCHATCONFIG,{RequestId:t},"Get Chat Config Started"),t||(t=(0,y.uuidv4)()),i="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatConfigPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"?requestId=").concat(t,"&channelId=").concat(this.omnichannelConfiguration.channelId),o=d.default.create(),(0,I.default)(o,{retries:this.configuration.maxRequestRetriesOnFailure}),s={},n&&(s=R(R({},h.default.bypassCacheHeaders),s)),e.next=11,o.get(i,{headers:s});case 11:return c=e.sent,u=r.milliSecondsElapsed,(f=c.data).LiveChatVersion&&f.LiveChatVersion===l.LiveChatVersion.V2&&(this.liveChatVersion=f.LiveChatVersion),f.headers={},c.headers&&c.headers.date&&(f.headers.date=c.headers.date),this.logger&&this.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.GETCHATCONFIGSUCCESS,{RequestId:t,Region:c.data.Region,ElapsedTimeInMilliseconds:u,TransactionId:c.headers["transaction-id"]},"Get Chat config succeeded"),e.abrupt("return",f);case 19:case"end":return e.stop()}}),e,this)}))),function(e){return G.apply(this,arguments)})},{key:"getLWIDetails",value:(F=(0,i.default)(a.default.mark((function e(t){var n,r,o,s,c,u,f,g,p=this,E=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=E.length>1&&void 0!==E[1]?E[1]:{},r=S.Timer.TIMER(),this.logger&&this.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.GETLWISTATUSSTARTED,{RequestId:t},"Get LWI Details Started"),t||(t=(0,y.uuidv4)()),o="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatLiveWorkItemDetailsPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),s=d.default.create(),(0,I.default)(s,{retries:this.configuration.maxRequestRetriesOnFailure}),c=n.authenticatedUserToken,u=n.reconnectId,f=h.default.defaultHeaders,c&&(o="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatAuthLiveWorkItemDetailsPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),f[T.default.authenticatedUserToken]=c),u&&(o+="/".concat(u)),o+="?channelId=".concat(this.omnichannelConfiguration.channelId),g={headers:f,method:"GET",url:o},e.abrupt("return",new Promise(function(){var e=(0,i.default)(a.default.mark((function e(n,i){var o,c,u,d;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s(g);case 3:o=e.sent,c=r.milliSecondsElapsed,u=o.data,p.logger&&p.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.GETLWISTATUSSUCCEEDED,{RequestId:t,Region:o.data.Region,ElapsedTimeInMilliseconds:c,TransactionId:o.headers["transaction-id"]},"Get LWI Details succeeded"),n(u),e.next=18;break;case 10:if(e.prev=10,e.t0=e.catch(0),d=r.milliSecondsElapsed,!p.logger){e.next=17;break}return e.next=16,v.LoggingSanitizer.stripErrorSensitiveProperties(e.t0);case 16:p.logger.log(m.LogLevel.ERROR,l.OCSDKTelemetryEvent.GETLWISTATUSFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:d},"Get LWI Details failed");case 17:i();case 18:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,n){return e.apply(this,arguments)}}()));case 14:case"end":return e.stop()}}),e,this)}))),function(e){return F.apply(this,arguments)})},{key:"getChatToken",value:(M=(0,i.default)(a.default.mark((function e(t){var n,r,o,s,c,u,f,g,p,E,w=this,R=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=R.length>1&&void 0!==R[1]?R[1]:{},r=R.length>2&&void 0!==R[2]?R[2]:0,o=S.Timer.TIMER(),s=n.reconnectId,c=n.authenticatedUserToken,u=n.currentLiveChatVersion,this.logger&&this.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.GETCHATTOKENSTARTED,{RequestId:t},"Get Chat Token Started"),!(r<0)){e.next=7;break}throw new Error("Invalid currentRetryCount");case 7:return t||(t=(0,y.uuidv4)()),f=h.default.defaultHeaders,g="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatGetChatTokenPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),this.liveChatVersion===l.LiveChatVersion.V2||u&&u===l.LiveChatVersion.V2?(g="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatv2GetChatTokenPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),c&&(g="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatv2AuthGetChatTokenPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),f[T.default.authenticatedUserToken]=c)):c&&(g="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatAuthGetChatTokenPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),f[T.default.authenticatedUserToken]=c),s&&(g+="/".concat(s)),g+="?channelId=".concat(this.omnichannelConfiguration.channelId),p={headers:f,method:"GET",url:g},E=d.default.create(),(0,I.default)(E,{retries:this.configuration.maxRequestRetriesOnFailure}),e.abrupt("return",new Promise(function(){var e=(0,i.default)(a.default.mark((function e(i,c){var u,d,f,g;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,E(p);case 3:if(u=e.sent,d=o.milliSecondsElapsed,!(f=u.data)){e.next=11;break}return f.requestId=t,w.logger&&w.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.GETCHATTOKENSUCCEEDED,{RequestId:t,Region:u.data.Region,ElapsedTimeInMilliseconds:d,TransactionId:u.headers["transaction-id"]},"Get Chat Token Succeeded"),i(f),e.abrupt("return");case 11:if(!s||u.status!==h.default.noContentStatusCode){e.next=14;break}return c(u),e.abrupt("return");case 14:e.next=25;break;case 16:if(e.prev=16,e.t0=e.catch(0),g=o.milliSecondsElapsed,!w.logger){e.next=23;break}return e.next=22,v.LoggingSanitizer.stripErrorSensitiveProperties(e.t0);case 22:w.logger.log(m.LogLevel.ERROR,l.OCSDKTelemetryEvent.GETCHATTOKENFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:g},"Get Chat Token Failed");case 23:return c(e.t0),e.abrupt("return");case 25:if(!(r+1>=w.configuration.getChatTokenRetryCount)){e.next=28;break}return c(new Error("The retry for getchattoken has exceeded its max value of ".concat(w.configuration.getChatTokenRetryCount))),e.abrupt("return");case 28:setTimeout((function(){w.getChatToken(t,n,r+1).then((function(e){return i(e)})).catch((function(e){return c(e)}))}),w.configuration.getChatTokenTimeBetweenRetriesOnFailure);case 29:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t,n){return e.apply(this,arguments)}}()));case 17:case"end":return e.stop()}}),e,this)}))),function(e){return M.apply(this,arguments)})},{key:"getReconnectableChats",value:(U=(0,i.default)(a.default.mark((function e(t){var n,r,o,s,c,u,f=this;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=S.Timer.TIMER(),r=t.authenticatedUserToken,this.logger&&this.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.GETRECONNECTABLECHATS,"Get Reconnectable chat Started"),o="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatGetReconnectableChatsPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(this.omnichannelConfiguration.orgId,"?channelId=").concat(this.omnichannelConfiguration.channelId),(s=h.default.defaultHeaders)[T.default.authenticatedUserToken]=r,c={headers:s,method:"GET",url:o},u=d.default.create(),e.abrupt("return",new Promise(function(){var e=(0,i.default)(a.default.mark((function e(t,r){var i,o,s,d;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,u(c);case 3:if(i=e.sent,o=n.milliSecondsElapsed,!(s=i.data)){e.next=10;break}return f.logger&&f.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.GETRECONNECTABLECHATS,{Region:i.data.Region,ElapsedTimeInMilliseconds:o,TransactionId:i.headers[h.default.transactionid]},"Get Reconnectable Chats Succeeded and old session returned"),t(s),e.abrupt("return");case 10:return t(),e.abrupt("return");case 14:if(e.prev=14,e.t0=e.catch(0),d=n.milliSecondsElapsed,!f.logger){e.next=21;break}return e.next=20,v.LoggingSanitizer.stripErrorSensitiveProperties(e.t0);case 20:f.logger.log(m.LogLevel.ERROR,l.OCSDKTelemetryEvent.GETRECONNECTABLECHATS,{ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:d},"Get Reconnectable Chats Failed");case 21:return r(e.t0),e.abrupt("return");case 23:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(t,n){return e.apply(this,arguments)}}()));case 9:case"end":return e.stop()}}),e,this)}))),function(e){return U.apply(this,arguments)})},{key:"getReconnectAvailability",value:(P=(0,i.default)(a.default.mark((function e(t){var n,r,o,s,c,u=this;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=S.Timer.TIMER(),this.logger&&this.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.GETRECONNECTAVAILABILITY,"Get Reconnect availability started"),r="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatReconnectAvailabilityPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),o=h.default.defaultHeaders,s={headers:o,method:"GET",url:r},c=d.default.create(),e.abrupt("return",new Promise(function(){var e=(0,i.default)(a.default.mark((function e(t,r){var i,o,d,f;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c(s);case 3:if(i=e.sent,o=n.milliSecondsElapsed,!(d=i.data)){e.next=10;break}return u.logger&&u.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.GETRECONNECTAVAILABILITY,{Region:i.data.Region,ElapsedTimeInMilliseconds:o,TransactionId:i.headers[h.default.transactionid]},"Get Reconnect availability Succeeded"),t(d),e.abrupt("return");case 10:return u.logger&&u.logger.log(m.LogLevel.WARN,l.OCSDKTelemetryEvent.GETRECONNECTAVAILABILITY,{Region:i.data.Region,ElapsedTimeInMilliseconds:o,TransactionId:i.headers[h.default.transactionid]},"Get Reconnect availability didn't send any valid data."),t(),e.abrupt("return");case 15:if(e.prev=15,e.t0=e.catch(0),f=n.milliSecondsElapsed,!u.logger){e.next=22;break}return e.next=21,v.LoggingSanitizer.stripErrorSensitiveProperties(e.t0);case 21:u.logger.log(m.LogLevel.ERROR,l.OCSDKTelemetryEvent.GETRECONNECTAVAILABILITY,{ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:f},"Get Reconnect Availability Failed");case 22:return r(e.t0),e.abrupt("return");case 24:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(t,n){return e.apply(this,arguments)}}()));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return P.apply(this,arguments)})},{key:"getQueueAvailability",value:(N=(0,i.default)(a.default.mark((function e(t){var n,r,o,s,c,u,y,w,R,O,L=this,x=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=x.length>1&&void 0!==x[1]?x[1]:{},r=S.Timer.TIMER(),this.logger&&this.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.GETQUEUEAVAILABILITYSTARTED,{RequestId:t},"Get queue availability started"),o="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.GetQueueAvailabilityPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t,"?channelId=lcw"),s=d.default.create(),(0,I.default)(s,{retries:this.configuration.maxRequestRetriesOnFailure}),c=n.authenticatedUserToken,u=n.initContext,y=n.getContext,w=h.default.defaultHeaders,c&&(w[T.default.authenticatedUserToken]=c),R=u||{},!y||window.document){e.next=12;break}return e.abrupt("return",Promise.reject(new Error("getContext is only supported on web browsers")));case 12:if(y&&(R.browser=f.BrowserInfo.getBrowserName(),R.device=g.DeviceInfo.getDeviceType(),R.originurl=window.location.href,R.os=E.OSInfo.getOsType()),R.locale||(R.locale=h.default.defaultLocale),!R.locale||p.default.supportedLocales.includes(R.locale)){e.next=16;break}return e.abrupt("return",Promise.reject(new Error("Unsupported locale: '".concat(R.locale,"'"))));case 16:return O={data:R,headers:w,method:"POST",url:o},e.abrupt("return",new Promise(function(){var e=(0,i.default)(a.default.mark((function e(n,i){var o,c,u,d;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s(O);case 3:o=e.sent,c=r.milliSecondsElapsed,(u=o.data)&&(L.logger&&L.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.GETQUEUEAVAILABILITYSUCCEEDED,{RequestId:t,Region:o.data.Region,ElapsedTimeInMilliseconds:c,TransactionId:o.headers["transaction-id"]},"Get queue availability Succeeded"),n(u)),e.next=17;break;case 9:if(e.prev=9,e.t0=e.catch(0),d=r.milliSecondsElapsed,!L.logger){e.next=16;break}return e.next=15,v.LoggingSanitizer.stripErrorSensitiveProperties(e.t0);case 15:L.logger.log(m.LogLevel.ERROR,l.OCSDKTelemetryEvent.GETQUEUEAVAILABILITYFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:d},"Get queue availability failed");case 16:i(e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,n){return e.apply(this,arguments)}}()));case 18:case"end":return e.stop()}}),e,this)}))),function(e){return N.apply(this,arguments)})},{key:"sessionInit",value:(k=(0,i.default)(a.default.mark((function e(t){var n,r,o,s,c,u,y,w,R,O,L,x=this,b=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=b.length>1&&void 0!==b[1]?b[1]:{},r=S.Timer.TIMER(),this.logger&&this.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.SESSIONINITSTARTED,{RequestId:t},"Session Init Started"),o=d.default.create(),(0,I.default)(o,{retries:this.configuration.maxRequestRetriesOnFailure}),s=n.reconnectId,c=n.authenticatedUserToken,u=n.initContext,y=n.getContext,w=h.default.defaultHeaders,R="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatSessionInitPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),c&&(R="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatAuthSessionInitPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),w[T.default.authenticatedUserToken]=c),s&&(R+="/".concat(s)),R+="?channelId=".concat(this.omnichannelConfiguration.channelId),O=u||{},!y||window.document){e.next=14;break}return e.abrupt("return",Promise.reject(new Error("getContext is only supported on web browsers")));case 14:if(y&&(O.browser=f.BrowserInfo.getBrowserName(),O.device=g.DeviceInfo.getDeviceType(),O.originurl=window.location.href,O.os=E.OSInfo.getOsType()),O.locale||(O.locale=h.default.defaultLocale),!O.locale||p.default.supportedLocales.includes(O.locale)){e.next=18;break}return e.abrupt("return",Promise.reject(new Error("Unsupported locale: '".concat(O.locale,"'"))));case 18:return L={data:O,headers:w,method:"POST",url:R},e.abrupt("return",new Promise(function(){var e=(0,i.default)(a.default.mark((function e(n,i){var s,c,u;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o(L);case 3:s=e.sent,c=r.milliSecondsElapsed,x.logger&&x.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.SESSIONINITSUCCEEDED,{RequestId:t,Region:s.data.Region,ElapsedTimeInMilliseconds:c,TransactionId:s.headers["transaction-id"]},"Session Init Succeeded"),n(),e.next=17;break;case 9:if(e.prev=9,e.t0=e.catch(0),u=r.milliSecondsElapsed,!x.logger){e.next=16;break}return e.next=15,v.LoggingSanitizer.stripErrorSensitiveProperties(e.t0);case 15:x.logger.log(m.LogLevel.ERROR,l.OCSDKTelemetryEvent.SESSIONINITFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:u},"Session Init Failed");case 16:i(e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,n){return e.apply(this,arguments)}}()));case 20:case"end":return e.stop()}}),e,this)}))),function(e){return k.apply(this,arguments)})},{key:"sessionClose",value:(D=(0,i.default)(a.default.mark((function e(t){var n,r,o,s,c,u,f,g,p,E,y,w=this,R=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=R.length>1&&void 0!==R[1]?R[1]:{},r=S.Timer.TIMER(),this.logger&&this.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.SESSIONCLOSESTARTED,{RequestId:t},"Session Close Started"),o="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatSessionClosePath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),s=d.default.create(),(0,I.default)(s,{retries:this.configuration.maxRequestRetriesOnFailure}),c=n.authenticatedUserToken,u=n.isReconnectChat,f=n.isPersistentChat,g=n.chatId,p=h.default.defaultHeaders,(E={}).chatId=g,c&&(o="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatAuthSessionClosePath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),p[T.default.authenticatedUserToken]=c),u&&(o+="&isReconnectChat=true"),f&&(o+="&isPersistentChat=true"),y={data:E,headers:p,method:"POST",url:o},e.abrupt("return",new Promise(function(){var e=(0,i.default)(a.default.mark((function e(n,i){var o,c,u;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s(y);case 3:o=e.sent,c=r.milliSecondsElapsed,w.logger&&w.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.SESSIONCLOSESUCCEEDED,{RequestId:t,Region:o.data.Region,ElapsedTimeInMilliseconds:c,TransactionId:o.headers["transaction-id"]},"Session Close Succeeded"),n(),e.next=17;break;case 9:if(e.prev=9,e.t0=e.catch(0),u=r.milliSecondsElapsed,!w.logger){e.next=16;break}return e.next=15,v.LoggingSanitizer.stripErrorSensitiveProperties(e.t0);case 15:w.logger.log(m.LogLevel.ERROR,l.OCSDKTelemetryEvent.SESSIONCLOSEFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:u},"Session Close Failed");case 16:i();case 17:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,n){return e.apply(this,arguments)}}()));case 15:case"end":return e.stop()}}),e,this)}))),function(e){return D.apply(this,arguments)})},{key:"validateAuthChatRecord",value:(A=(0,i.default)(a.default.mark((function e(t,n){var r,i,o,s,c,u,f,g,p,E,y,w,R,O;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=S.Timer.TIMER(),this.logger&&this.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.VALIDATEAUTHCHATRECORDSTARTED,{RequestId:t},"Validate Auth Chat Record Started"),i=n.authenticatedUserToken,o=n.chatId,s="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatValidateAuthChatMapRecordPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(o,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),c=d.default.create(),(0,I.default)(c,{retries:this.configuration.maxRequestRetriesOnFailure}),u=h.default.defaultHeaders,i&&(u[T.default.authenticatedUserToken]=i),f={headers:u,method:"GET",url:s},e.prev=9,e.next=12,c(f);case 12:if(p=e.sent,E=r.milliSecondsElapsed,!0!==(null===(g=p.data)||void 0===g?void 0:g.authChatExist)){e.next=19;break}return null===(y=this.logger)||void 0===y||y.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.VALIDATEAUTHCHATRECORDSUCCEEDED,{RequestId:t,Region:p.data.Region,ElapsedTimeInMilliseconds:E,TransactionId:p.headers["transaction-id"]},"Validate Auth Chat Record Succeeded"),e.abrupt("return",Promise.resolve(p.data));case 19:return null===(w=this.logger)||void 0===w||w.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.VALIDATEAUTHCHATRECORDFAILED,{RequestId:t,Region:p.data.Region,ElapsedTimeInMilliseconds:E,TransactionId:p.headers["transaction-id"],ErrorCode:p.status},"Validate Auth Chat Record Failed. Record is not found or request is not authorized"),e.abrupt("return",Promise.reject(new Error("Validate Auth Chat Record Failed. Record is not found or request is not authorized")));case 21:e.next=34;break;case 23:return e.prev=23,e.t0=e.catch(9),O=r.milliSecondsElapsed,e.next=28,v.LoggingSanitizer.stripErrorSensitiveProperties(e.t0);case 28:if(null===(R=this.logger)||void 0===R||R.log(m.LogLevel.ERROR,l.OCSDKTelemetryEvent.VALIDATEAUTHCHATRECORDFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:O},"Validate Auth Chat Record Failed"),"Error: Request failed with status code 404"!==e.t0.toString()){e.next=33;break}return e.abrupt("return",Promise.resolve({}));case 33:return e.abrupt("return",Promise.reject());case 34:case"end":return e.stop()}}),e,this,[[9,23]])}))),function(e,t){return A.apply(this,arguments)})},{key:"submitPostChatResponse",value:(b=(0,i.default)(a.default.mark((function e(t,n){var r,o,s,c,u,f,g,p=this,E=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=E.length>2&&void 0!==E[2]?E[2]:{},o=S.Timer.TIMER(),this.logger&&this.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.SUBMITPOSTCHATSTARTED,{RequestId:t},"Submit Post Chat Started"),s="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatSubmitPostChatPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),c=d.default.create(),(0,I.default)(c,{retries:this.configuration.maxRequestRetriesOnFailure}),u=r.authenticatedUserToken,f=h.default.defaultHeaders,u&&(s="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatAuthSubmitPostChatPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),f[T.default.authenticatedUserToken]=u),g={data:JSON.stringify(n),headers:f,method:"POST",url:s},e.abrupt("return",new Promise(function(){var e=(0,i.default)(a.default.mark((function e(n,r){var i,s,u;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c(g);case 3:i=e.sent,s=o.milliSecondsElapsed,p.logger&&p.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.SUBMITPOSTCHATSUCCEEDED,{RequestId:t,Region:i.data.Region,ElapsedTimeInMilliseconds:s,TransactionId:i.headers["transaction-id"]},"Submit Post Chat Succeeded"),n(),e.next=17;break;case 9:if(e.prev=9,e.t0=e.catch(0),u=o.milliSecondsElapsed,!p.logger){e.next=16;break}return e.next=15,v.LoggingSanitizer.stripErrorSensitiveProperties(e.t0);case 15:p.logger.log(m.LogLevel.ERROR,l.OCSDKTelemetryEvent.SUBMITPOSTCHATFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:u},"Submit Post Chat Failed");case 16:r();case 17:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,n){return e.apply(this,arguments)}}()));case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getSurveyInviteLink",value:(x=(0,i.default)(a.default.mark((function e(t,n){var r,o,s,c,u,f,g,p,E=this,y=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=y.length>2&&void 0!==y[2]?y[2]:{},o=S.Timer.TIMER(),this.logger&&this.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.GETSURVEYINVITELINKSTARTED,{SurveyOwnerId:t},"Get Survey Invite Link Started"),s="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatGetSurveyInviteLinkPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(t),c=d.default.create(),(0,I.default)(c,{retries:this.configuration.maxRequestRetriesOnFailure}),u=r.authenticatedUserToken,f=r.requestId,g=h.default.defaultHeaders,u&&(s="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatAuthGetSurveyInviteLinkPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(t),g[T.default.authenticatedUserToken]=u,g[T.default.widgetAppId]=this.omnichannelConfiguration.widgetId),f&&(g[T.default.requestId]=f),p={data:JSON.stringify(n),headers:g,method:"POST",url:s},e.abrupt("return",new Promise(function(){var e=(0,i.default)(a.default.mark((function e(t,n){var r,i,s,u;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c(p);case 3:r=e.sent,i=r.data,s=o.milliSecondsElapsed,E.logger&&E.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.GETSURVEYINVITELINKSUCCEEDED,{Region:r.data.Region,ElapsedTimeInMilliseconds:s,TransactionId:r.headers["transaction-id"]},"Get Survey Invite Link Succeeded"),t(i),e.next=18;break;case 10:if(e.prev=10,e.t0=e.catch(0),u=o.milliSecondsElapsed,!E.logger){e.next=17;break}return e.next=16,v.LoggingSanitizer.stripErrorSensitiveProperties(e.t0);case 16:E.logger.log(m.LogLevel.ERROR,l.OCSDKTelemetryEvent.GETSURVEYINVITELINKFAILED,{ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:u},"Get Survey Invite Link Failed");case 17:n();case 18:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,n){return e.apply(this,arguments)}}()));case 12:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"getChatTranscripts",value:(L=(0,i.default)(a.default.mark((function e(t,n,r){var o,s,c,u,f,g,p,E,y=this,w=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=w.length>3&&void 0!==w[3]?w[3]:{},s=S.Timer.TIMER(),this.logger&&this.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.GETCHATTRANSCRIPTSTARTED,{RequestId:t},"Get Chat Transcript Started"),c="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatGetChatTranscriptPath,"/").concat(n,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),u=d.default.create(),(0,I.default)(u,{retries:this.configuration.maxRequestRetriesOnFailure}),f=o.authenticatedUserToken,g=o.currentLiveChatVersion,(p=h.default.defaultHeaders)[T.default.organizationId]=this.omnichannelConfiguration.orgId,p[T.default.widgetAppId]=this.omnichannelConfiguration.widgetId,p[T.default.authorization]=r,this.liveChatVersion===l.LiveChatVersion.V2||g&&g===l.LiveChatVersion.V2?(c="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatv2GetChatTranscriptPath,"/").concat(n,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),f&&(c="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatv2AuthGetChatTranscriptPath,"/").concat(n,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId))):f&&(c="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatAuthGetChatTranscriptPath,"/").concat(n,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId)),E={headers:p,method:"GET",url:c},e.abrupt("return",new Promise(function(){var e=(0,i.default)(a.default.mark((function e(n,r){var i,o,c,d;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,u(E);case 3:i=e.sent,o=s.milliSecondsElapsed,c=i.data,y.logger&&y.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.GETCHATTRANSCRIPTSUCCEEDED,{RequestId:t,Region:i.data.Region,ElapsedTimeInMilliseconds:o,TransactionId:i.headers["transaction-id"]},"Get Chat Transcript Succeeded"),n(c),e.next=18;break;case 10:if(e.prev=10,e.t0=e.catch(0),d=s.milliSecondsElapsed,!y.logger){e.next=17;break}return e.next=16,v.LoggingSanitizer.stripErrorSensitiveProperties(e.t0);case 16:y.logger.log(m.LogLevel.ERROR,l.OCSDKTelemetryEvent.GETCHATTRANSCRIPTFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:d},"Get Chat Transcript Failed");case 17:r(e.t0);case 18:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,n){return e.apply(this,arguments)}}()));case 14:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return L.apply(this,arguments)})},{key:"emailTranscript",value:(w=(0,i.default)(a.default.mark((function e(t,n,r){var o,s,c,u,f,g,p,E=this,y=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=y.length>3&&void 0!==y[3]?y[3]:{},s=S.Timer.TIMER(),this.logger&&this.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.EMAILTRANSCRIPTSTARTED,{RequestId:t},"Email Transcript Started"),c="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatTranscriptEmailRequestPath,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),u=d.default.create(),(0,I.default)(u,{retries:this.configuration.maxRequestRetriesOnFailure}),f=o.authenticatedUserToken,(g=h.default.defaultHeaders)[T.default.organizationId]=this.omnichannelConfiguration.orgId,g[T.default.widgetAppId]=this.omnichannelConfiguration.widgetId,g[T.default.authorization]=n,f&&(c="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatAuthTranscriptEmailRequestPath,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId)),p={data:JSON.stringify(r),headers:g,method:"POST",url:c},e.abrupt("return",new Promise(function(){var e=(0,i.default)(a.default.mark((function e(n,r){var i,o,c;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,u(p);case 3:i=e.sent,o=s.milliSecondsElapsed,E.logger&&E.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.EMAILTRANSCRIPTSUCCEEDED,{RequestId:t,Region:i.data.Region,ElapsedTimeInMilliseconds:o,TransactionId:i.headers["transaction-id"]},"Email Transcript Succeeded"),n(),e.next=17;break;case 9:if(e.prev=9,e.t0=e.catch(0),c=s.milliSecondsElapsed,!E.logger){e.next=16;break}return e.next=15,v.LoggingSanitizer.stripErrorSensitiveProperties(e.t0);case 15:E.logger.log(m.LogLevel.ERROR,l.OCSDKTelemetryEvent.EMAILTRANSCRIPTFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:c},"Email Transcript Failed");case 16:r();case 17:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,n){return e.apply(this,arguments)}}()));case 14:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return w.apply(this,arguments)})},{key:"fetchDataMaskingInfo",value:(r=(0,i.default)(a.default.mark((function e(t){var n,r,o,s,c,u=this;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=S.Timer.TIMER(),this.logger&&this.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.FETCHDATAMASKINGSTARTED,{RequestId:t},"Fetch Data Masking Started"),t||(t=(0,y.uuidv4)()),r="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatFetchDataMaskingInfoPath,"/").concat(this.omnichannelConfiguration.orgId),o=d.default.create(),(0,I.default)(o,{retries:this.configuration.maxRequestRetriesOnFailure}),(s=h.default.defaultHeaders)[T.default.organizationId]=this.omnichannelConfiguration.orgId,s[T.default.requestId]=t,c={headers:s,method:"GET",url:r},e.abrupt("return",new Promise(function(){var e=(0,i.default)(a.default.mark((function e(r,i){var s,d,f,h;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o(c);case 3:s=e.sent,d=n.milliSecondsElapsed,f=s.data,u.logger&&u.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.FETCHDATAMASKINGSUCCEEDED,{RequestId:t,Region:s.data.Region,ElapsedTimeInMilliseconds:d,TransactionId:s.headers["transaction-id"]},"Fetch Data Masking Succeeded"),r(f),e.next=18;break;case 10:if(e.prev=10,e.t0=e.catch(0),h=n.milliSecondsElapsed,!u.logger){e.next=17;break}return e.next=16,v.LoggingSanitizer.stripErrorSensitiveProperties(e.t0);case 16:u.logger.log(m.LogLevel.ERROR,l.OCSDKTelemetryEvent.FETCHDATAMASKINGFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:h},"Fetch Data Masking Failed");case 17:i();case 18:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,n){return e.apply(this,arguments)}}()));case 11:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"makeSecondaryChannelEventRequest",value:(n=(0,i.default)(a.default.mark((function e(t,n){var r,i,o,s,c,u,f,g,p,E,y,w=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=w.length>2&&void 0!==w[2]?w[2]:{},i=S.Timer.TIMER(),this.logger&&this.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.SECONDARYCHANNELEVENTREQUESTSTARTED,{RequestId:t},"Secondary Channel Event Request Started"),o="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatSecondaryChannelEventPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),s=d.default.create(),(0,I.default)(s,{retries:this.configuration.maxRequestRetriesOnFailure}),c=r.authenticatedUserToken,(u=h.default.defaultHeaders)[T.default.organizationId]=this.omnichannelConfiguration.orgId,c&&(u[T.default.authenticatedUserToken]=c,o="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.LiveChatAuthSecondaryChannelEventPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t)),o+="?channelId="+h.default.defaultChannelId,f={data:JSON.stringify(n),headers:u,method:"POST",url:o},e.prev=12,e.next=15,s(f);case 15:g=e.sent,p=i.milliSecondsElapsed,E=g.data,this.logger&&this.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.SECONDARYCHANNELEVENTREQUESTSUCCEEDED,{RequestId:t,Region:E.Region,ElapsedTimeInMilliseconds:p,TransactionId:g.headers["transaction-id"]},"Secondary Channel Event Request Succeeded"),e.next=29;break;case 21:if(e.prev=21,e.t0=e.catch(12),y=i.milliSecondsElapsed,!this.logger){e.next=28;break}return e.next=27,v.LoggingSanitizer.stripErrorSensitiveProperties(e.t0);case 27:this.logger.log(m.LogLevel.ERROR,l.OCSDKTelemetryEvent.SECONDARYCHANNELEVENTREQUESTFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:y},"Secondary Channel Event Request Failed");case 28:throw e.t0;case 29:case"end":return e.stop()}}),e,this,[[12,21]])}))),function(e,t){return n.apply(this,arguments)})},{key:"sendTypingIndicator",value:(t=(0,i.default)(a.default.mark((function e(t,n){var r,o,s,c,u,f,g,p=this,E=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=E.length>2&&void 0!==E[2]?E[2]:{},n&&n===l.LiveChatVersion.V2){e.next=3;break}return e.abrupt("return",Promise.resolve());case 3:if(o=S.Timer.TIMER(),s=r.customerDisplayName,n&&n===l.LiveChatVersion.V2){e.next=7;break}throw new Error("Typing indicator is only supported on v2");case 7:return c="".concat(this.omnichannelConfiguration.orgUrl,"/").concat(C.default.SendTypingIndicatorPath,"/").concat(t),u=d.default.create(),(f=h.default.defaultHeaders)[T.default.organizationId]=this.omnichannelConfiguration.orgId,s&&(f[h.default.customerDisplayName]=s),g={headers:f,method:"POST",url:c},e.abrupt("return",new Promise(function(){var e=(0,i.default)(a.default.mark((function e(n,r){var i,s,c,d;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,u(g);case 3:i=e.sent,s=o.milliSecondsElapsed,c=i.data,p.logger&&p.logger.log(m.LogLevel.INFO,l.OCSDKTelemetryEvent.SENDTYPINGINDICATORSUCCEEDED,{RequestId:t,Region:c.Region,ElapsedTimeInMilliseconds:s,TransactionId:i.headers["transaction-id"]},"Send Typing Indicator Succeeded"),n(),e.next=18;break;case 10:if(e.prev=10,e.t0=e.catch(0),d=o.milliSecondsElapsed,!p.logger){e.next=17;break}return e.next=16,v.LoggingSanitizer.stripErrorSensitiveProperties(e.t0);case 16:p.logger.log(m.LogLevel.ERROR,l.OCSDKTelemetryEvent.SENDTYPINGINDICATORFAILED,{RequestId:t,ExceptionDetails:e.t0,ElapsedTimeInMilliseconds:d},"Send Typing Indicator Failed");case 17:r(e.t0);case 18:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,n){return e.apply(this,arguments)}}()));case 14:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})}]),e}();t.default=x,(0,u.default)(x,"defaultConfiguration",{getChatTokenRetryCount:35,getChatTokenTimeBetweenRetriesOnFailure:1e4,maxRequestRetriesOnFailure:3})},function(e,t,n){e.exports=n(26)},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",o=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var a=t&&t.prototype instanceof d?t:d,i=Object.create(a.prototype),o=new y(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(a,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw i;return R()}for(n.method=a,n.arg=i;;){var o=n.delegate;if(o){var s=T(o,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,o),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var l={};function d(){}function f(){}function h(){}var g={};s(g,a,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(w([])));v&&v!==t&&n.call(v,a)&&(g=v);var m=h.prototype=d.prototype=Object.create(g);function E(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){var r;this._invoke=function(a,i){function o(){return new t((function(r,o){!function r(a,i,o,s){var c=u(e[a],e,i);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,o,s)}),(function(e){r("throw",e,o,s)})):t.resolve(d).then((function(e){l.value=e,o(l)}),(function(e){return r("throw",e,o,s)}))}s(c.arg)}(a,i,r,o)}))}return r=r?r.then(o,o):o()}}function T(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,T(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function w(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:R}}function R(){return{value:void 0,done:!0}}return f.prototype=h,s(m,"constructor",h),s(h,"constructor",f),f.displayName=s(h,o,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,s(e,o,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},E(C.prototype),s(C.prototype,i,(function(){return this})),e.AsyncIterator=C,e.async=function(t,n,r,a,i){void 0===i&&(i=Promise);var o=new C(c(t,n,r,a),i);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},E(m),s(m,o,"Generator"),s(m,a,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=w,y.prototype={constructor:y,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(I),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;I(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:w(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(e,t){function n(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,a)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(a,i){var o=e.apply(t,r);function s(e){n(o,a,i,s,c,"next",e)}function c(e){n(o,a,i,s,c,"throw",e)}s(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(29)},function(e,t,n){"use strict";var r=n(2),a=n(9),i=n(30),o=n(15);function s(e){var t=new i(e),n=a(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var c=s(n(8));c.Axios=i,c.create=function(e){return s(o(c.defaults,e))},c.Cancel=n(16),c.CancelToken=n(45),c.isCancel=n(14),c.all=function(e){return Promise.all(e)},c.spread=n(46),c.isAxiosError=n(47),e.exports=c,e.exports.default=c},function(e,t,n){"use strict";var r=n(2),a=n(10),i=n(31),o=n(32),s=n(15),c=n(43),u=c.validators;function l(e){this.defaults=e,this.interceptors={request:new i,response:new i}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean,"1.0.0"),forcedJSONParsing:u.transitional(u.boolean,"1.0.0"),clarifyTimeoutError:u.transitional(u.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var a,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!r){var l=[o,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(i),a=Promise.resolve(e);l.length;)a=a.then(l.shift(),l.shift());return a}for(var d=e;n.length;){var f=n.shift(),h=n.shift();try{d=f(d)}catch(e){h(e);break}}try{a=o(d)}catch(e){return Promise.reject(e)}for(;i.length;)a=a.then(i.shift(),i.shift());return a},l.prototype.getUri=function(e){return e=s(this.defaults,e),a(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=l},function(e,t,n){"use strict";var r=n(2);function a(){this.handlers=[]}a.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},a.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},a.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=a},function(e,t,n){"use strict";var r=n(2),a=n(33),i=n(14),o=n(8);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=a.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||o.adapter)(e).then((function(t){return s(e),t.data=a.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(s(e),t&&t.response&&(t.response.data=a.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(2),a=n(8);e.exports=function(e,t,n){var i=this||a;return r.forEach(n,(function(n){e=n.call(i,e,t)})),e}},function(e,t){var n,r,a=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var c,u=[],l=!1,d=-1;function f(){l&&c&&(l=!1,c.length?u=c.concat(u):d=-1,u.length&&h())}function h(){if(!l){var e=s(f);l=!0;for(var t=u.length;t;){for(c=u,u=[];++d<t;)c&&c[d].run();d=-1,t=u.length}c=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function p(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new g(e,t)),1!==u.length||l||s(h)},g.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=p,a.addListener=p,a.once=p,a.off=p,a.removeListener=p,a.removeAllListeners=p,a.emit=p,a.prependListener=p,a.prependOnceListener=p,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(13);e.exports=function(e,t,n){var a=n.config.validateStatus;n.status&&a&&!a(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,a,i,o){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(a)&&s.push("path="+a),r.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(39),a=n(40);e.exports=function(e,t){return e&&!r(t)?a(e,t):t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(2),a=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,o={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(o[t]&&a.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function a(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=a(window.location.href),function(t){var n=r.isString(t)?a(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(44),a={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){a[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={},o=r.version.split(".");function s(e,t){for(var n=t?t.split("."):o,r=e.split("."),a=0;a<3;a++){if(n[a]>r[a])return!0;if(n[a]<r[a])return!1}return!1}a.transitional=function(e,t,n){var a=t&&s(t);function o(e,t){return"[Axios v"+r.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new Error(o(r," has been removed in "+t));return a&&!i[r]&&(i[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={isOlderVersion:s,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),a=r.length;a-- >0;){var i=r[a],o=t[i];if(o){var s=e[i],c=void 0===s||o(s,i,e);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:a}},function(e){e.exports=JSON.parse('{"_args":[["axios@0.21.4","/home/runner/work/omnichannel-sdk/omnichannel-sdk"]],"_from":"axios@0.21.4","_id":"axios@0.21.4","_inBundle":false,"_integrity":"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==","_location":"/axios","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"axios@0.21.4","name":"axios","escapedName":"axios","rawSpec":"0.21.4","saveSpec":null,"fetchSpec":"0.21.4"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz","_spec":"0.21.4","_where":"/home/runner/work/omnichannel-sdk/omnichannel-sdk","author":{"name":"Matt Zabriskie"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"bugs":{"url":"https://github.com/axios/axios/issues"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"dependencies":{"follow-redirects":"^1.14.0"},"description":"Promise based HTTP client for the browser and node.js","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"homepage":"https://axios-http.com","jsdelivr":"dist/axios.min.js","keywords":["xhr","http","ajax","promise","node"],"license":"MIT","main":"index.js","name":"axios","repository":{"type":"git","url":"git+https://github.com/axios/axios.git"},"scripts":{"build":"NODE_ENV=production grunt build","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","examples":"node ./examples/server.js","fix":"eslint --fix lib/**/*.js","postversion":"git push && git push --tags","preversion":"npm test","start":"node ./sandbox/server.js","test":"grunt test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},"typings":"./index.d.ts","unpkg":"dist/axios.min.js","version":"0.21.4"}')},function(e,t,n){"use strict";var r=n(16);function a(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}a.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},a.source=function(){var e;return{token:new a((function(t){e=t})),cancel:e}},e.exports=a},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserInfo=t.UNKNOWN_VERSION=void 0;var a=r(n(1)),i=r(n(3)),o=r(n(4)),s=n(5);t.UNKNOWN_VERSION="U";var c=function(){function e(){(0,a.default)(this,e)}return(0,i.default)(e,null,[{key:"getUserAgent",value:function(){return this.userAgent()}},{key:"userAgentContainsString",value:function(e){return this.getUserAgent().indexOf(e)>-1}},{key:"isChrome",value:function(){return this.userAgentContainsString(s.BrowserVendor.CHROME)&&!this.userAgentContainsString(s.BrowserVendor.EDGE)&&!this.userAgentContainsString(s.BrowserVendor.EDGE_CHROMIUM)}},{key:"isIe",value:function(){return this.userAgentContainsString("Trident")}},{key:"isEdge",value:function(){return this.userAgentContainsString(s.BrowserVendor.EDGE)||this.userAgentContainsString(s.BrowserVendor.EDGE_CHROMIUM)}},{key:"isOpera",value:function(){return this.userAgentContainsString("OPR/")}},{key:"getBrowserName",value:function(){return this.isOpera()?s.BrowserVendor.OPERA:this.isEdge()?s.BrowserVendor.EDGE:this.isChrome()?s.BrowserVendor.CHROME:this.userAgentContainsString(s.BrowserVendor.FIREFOX)?s.BrowserVendor.FIREFOX:this.userAgentContainsString(s.BrowserVendor.SAFARI)?s.BrowserVendor.SAFARI:this.isIe()?s.BrowserVendor.IE:s.BrowserVendor.UNKNOWN}},{key:"getBrowserVersion",value:function(){var e=this;return this.isIe()?function(){var t=e.getUserAgent(),n=t.match(new RegExp(s.BrowserVendor.IE+" ([\\d,.]+)"));if(n)return n[1];var r=t.match(new RegExp("rv:([\\d,.]+)"));return r?r[1]:void 0}():function(t){t===s.BrowserVendor.SAFARI&&(t="Version"),t===s.BrowserVendor.OPERA&&(t="OPR"),t===s.BrowserVendor.EDGE&&(t="Edge?");var n=e.getUserAgent().match(new RegExp(t+"/([\\d,.]+)"));return n?n[1]:"U"}(this.getBrowserName())}}]),e}();t.BrowserInfo=c,(0,o.default)(c,"userAgent",(function(){return window.navigator.userAgent}))},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceInfo=void 0;var a=r(n(1)),i=r(n(3)),o=n(5),s=function(){function e(){(0,a.default)(this,e)}return(0,i.default)(e,null,[{key:"getDeviceType",value:function(){return window.navigator.userAgent.match(/(android|ipod|windows phone|wpdesktop|windows ce|blackberry\w*|meego|webos|palm|symbian|pda|\w*?mobile\w*?|\w*?phone\w*?)/i)?o.DeviceType.Mobile:window.navigator.userAgent.match(/tablet|ipad/i)?o.DeviceType.Tablet:o.DeviceType.Desktop}}]),e}();t.DeviceInfo=s},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(1)),i=r(n(4)),o=function e(){(0,a.default)(this,e)};t.default=o,(0,i.default)(o,"supportedLocales",["ar-sa","bg-bg","ca-es","cs-cz","da-dk","de-de","el-gr","en-us","es-es","et-ee","eu-es","fi-fi","fr-fr","gl-es","he-il","hi-in","hr-hr","hu-hu","id-id","it-it","ja-jp","kk-kz","ko-kr","lt-lt","lv-lv","ms-my","nb-no","nl-nl","pl-pl","pt-br","pt-pt","ro-ro","ru-ru","sk-sk","sl-si","sr-cyrl-cs","sr-latn-cs","sv-se","th-th","tr-tr","uk-ua","vi-vn","zh-cn","zh-hk","zh-tw"])},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.LoggingSanitizer=void 0;var a=r(n(6)),i=r(n(1)),o=r(n(3)),s=r(n(7)),c=function(){function e(){(0,i.default)(this,e)}return(0,o.default)(e,null,[{key:"stripErrorSensitiveProperties",value:function(e){var t,n,r=this;e&&"object"===(0,a.default)(e)&&(null===(t=Object.keys(e))||void 0===t?void 0:t.length)>0&&(null===(n=Object.keys(e))||void 0===n||n.forEach((function(t){-1!==s.default.sensitiveProperties.indexOf(t)&&delete e["".concat(t)],null===e["".concat(t)]||"object"!==(0,a.default)(e["".concat(t)])||r.stripErrorSensitiveProperties(e["".concat(t)])})))}}]),e}();t.LoggingSanitizer=c},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,t.LogLevel=r,function(e){e.INFO="INFO",e.DEBUG="DEBUG",e.WARN="WARN",e.ERROR="ERROR"}(r||(t.LogLevel=r={}))},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.OSInfo=void 0;var a=r(n(1)),i=r(n(3)),o=n(5),s=function(){function e(){(0,a.default)(this,e)}return(0,i.default)(e,null,[{key:"getOsType",value:function(){var e=function(){return window.navigator.userAgent};return e().match(/windows\sphone\s\d+\.\d+/i)?o.OperatingSystem.WINDOWS_PHONE:e().match(/ arm;/i)?o.OperatingSystem.WINDOWS_RT:e().match(/(iPad|iPhone|iPod)(?=.*like Mac OS X)/i)?o.OperatingSystem.IOS:e().match(/android/i)?o.OperatingSystem.ANDROID:e().match(/(linux|joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|cros)/i)?o.OperatingSystem.LINUX:e().match(/(macintosh|mac os x)/i)?o.OperatingSystem.MACOSX:e().match(/(windows|win32)/i)?o.OperatingSystem.WINDOWS:o.OperatingSystem.UNKNOWN}}]),e}();t.OSInfo=s},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(1)),i=r(n(4)),o=function e(){(0,a.default)(this,e)};t.default=o,(0,i.default)(o,"LiveChatConfigPath","livechatconnector/config"),(0,i.default)(o,"LiveChatSessionInitPath","livechatconnector/sessioninit"),(0,i.default)(o,"LiveChatAuthSessionInitPath","livechatconnector/auth/sessioninit"),(0,i.default)(o,"LiveChatGetChatTokenPath","livechatconnector/getchattoken"),(0,i.default)(o,"LiveChatv2GetChatTokenPath","livechatconnector/v2/getchattoken"),(0,i.default)(o,"LiveChatAuthGetChatTokenPath","livechatconnector/auth/getchattoken"),(0,i.default)(o,"LiveChatv2AuthGetChatTokenPath","livechatconnector/v2/auth/getchattoken"),(0,i.default)(o,"LiveChatSessionClosePath","livechatconnector/sessionclose"),(0,i.default)(o,"LiveChatAuthSessionClosePath","livechatconnector/auth/sessionclose"),(0,i.default)(o,"LiveChatSubmitPostChatPath","survey/submitpostchat"),(0,i.default)(o,"LiveChatAuthSubmitPostChatPath","survey/auth/submitpostchat"),(0,i.default)(o,"LiveChatGetSurveyInviteLinkPath","livechatconnector/getsurveyinvite"),(0,i.default)(o,"LiveChatAuthGetSurveyInviteLinkPath","livechatconnector/auth/getsurveyinvite"),(0,i.default)(o,"LiveChatGetChatTranscriptPath","livechatconnector/getchattranscripts"),(0,i.default)(o,"LiveChatv2GetChatTranscriptPath","livechatconnector/v2/getchattranscripts"),(0,i.default)(o,"LiveChatAuthGetChatTranscriptPath","livechatconnector/auth/getchattranscripts"),(0,i.default)(o,"LiveChatv2AuthGetChatTranscriptPath","livechatconnector/v2/auth/getchattranscripts"),(0,i.default)(o,"LiveChatTranscriptEmailRequestPath","livechatconnector/createemailrequest"),(0,i.default)(o,"LiveChatAuthTranscriptEmailRequestPath","livechatconnector/auth/createemailrequest"),(0,i.default)(o,"LiveChatFetchDataMaskingInfoPath","livechatconnector/fetchdatamaskinginfo"),(0,i.default)(o,"LiveChatSecondaryChannelEventPath","livechatconnector/secondarychannelevent"),(0,i.default)(o,"LiveChatAuthSecondaryChannelEventPath","livechatconnector/auth/secondarychannelevent"),(0,i.default)(o,"LiveChatLiveWorkItemDetailsPath","livechatconnector/getliveworkitemdetails"),(0,i.default)(o,"LiveChatAuthLiveWorkItemDetailsPath","livechatconnector/auth/getliveworkitemdetails"),(0,i.default)(o,"LiveChatGetReconnectableChatsPath","livechatconnector/auth/reconnectablechats"),(0,i.default)(o,"LiveChatReconnectAvailabilityPath","livechatconnector/reconnect"),(0,i.default)(o,"LiveChatValidateAuthChatMapRecordPath","livechatconnector/auth/validateauthchatmaprecord"),(0,i.default)(o,"GetQueueAvailabilityPath","livechatconnector/auth/getqueueavailability"),(0,i.default)(o,"SendTypingIndicatorPath","inbound/typingindicator/livechat/sendtypingindicator")},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(1)),i=r(n(4)),o=function e(){(0,a.default)(this,e)};t.default=o,(0,i.default)(o,"authenticatedUserToken","AuthenticatedUserToken"),(0,i.default)(o,"authorization","Authorization"),(0,i.default)(o,"organizationId","OrganizationId"),(0,i.default)(o,"widgetAppId","widgetAppId"),(0,i.default)(o,"requestId","Request-Id")},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.Timer=void 0;var a=r(n(1)),i=r(n(3)),o=function(){function e(){(0,a.default)(this,e)}return(0,i.default)(e,null,[{key:"TIMER",value:function(){var e=(new Date).getTime();return{get milliSecondsElapsed(){return(new Date).getTime()-e}}}}]),e}();t.Timer=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){var n=t.retries,r=0;e.interceptors.response.use(void 0,(function(t){var a=t.config;return a&&r<n?(r++,new Promise((function(t){return t(e(a))}))):Promise.reject(t)}))};t.default=r},function(e,t,n){"use strict";var r=n(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(1)),i=r(n(3)),o=function(){function e(){(0,a.default)(this,e)}return(0,i.default)(e,null,[{key:"raiseCustomEvent",value:function(t,n){var r=e.createCustomEvent(t,n);window.dispatchEvent(r)}},{key:"createCustomEvent",value:function(e,t){var n=t?{detail:t}:void 0,r=null;try{r=new CustomEvent(e,n)}catch(t){(r=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,n)}return r}}]),e}();t.default=o}]));
@@ -5,10 +5,13 @@ export default class Constants {
5
5
  "Content-Type": string;
6
6
  };
7
7
  static readonly bypassCacheHeaders: {
8
- "cache-control": string;
8
+ "Cache-Control": string;
9
+ "X-Cache-Control": string;
9
10
  };
10
11
  static readonly defaultChannelId = ChannelId.LCW;
11
12
  static readonly defaultLocale = "en-us";
12
13
  static readonly noContentStatusCode = 204;
14
+ static readonly sensitiveProperties: string[];
13
15
  static readonly transactionid = "transaction-id";
16
+ static readonly customerDisplayName = "customerDisplayName";
14
17
  }
@@ -23,10 +23,13 @@ exports["default"] = Constants;
23
23
  "Content-Type": "application/json"
24
24
  });
25
25
  (0, _defineProperty2["default"])(Constants, "bypassCacheHeaders", {
26
- "cache-control": "no-store, must-revalidate, no-cache"
26
+ "Cache-Control": "no-store, must-revalidate, no-cache",
27
+ "X-Cache-Control": "no-store"
27
28
  });
28
29
  (0, _defineProperty2["default"])(Constants, "defaultChannelId", _Enums.ChannelId.LCW);
29
30
  (0, _defineProperty2["default"])(Constants, "defaultLocale", "en-us");
30
31
  (0, _defineProperty2["default"])(Constants, "noContentStatusCode", 204);
32
+ (0, _defineProperty2["default"])(Constants, "sensitiveProperties", ["AuthenticatedUserToken"]);
31
33
  (0, _defineProperty2["default"])(Constants, "transactionid", "transaction-id");
32
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Db21tb24vQ29uc3RhbnRzLnRzIl0sIm5hbWVzIjpbIkNvbnN0YW50cyIsIkNoYW5uZWxJZCIsIkxDVyJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztBQUFBOztJQUVxQkEsUzs7Ozs7aUNBQUFBLFMsZ0RBQ2lELENBQUMsUUFBRCxFQUFXLE9BQVgsRUFBb0IsVUFBcEIsQztpQ0FEakRBLFMsb0JBRXFCO0FBQ3RDLGtCQUFnQjtBQURzQixDO2lDQUZyQkEsUyx3QkFLeUI7QUFDMUMsbUJBQWlCO0FBRHlCLEM7aUNBTHpCQSxTLHNCQVF1QkMsaUJBQVVDLEc7aUNBUmpDRixTLG1CQVNvQixPO2lDQVRwQkEsUyx5QkFVMEIsRztpQ0FWMUJBLFMsbUJBV29CLGdCIiwic291cmNlUm9vdCI6Im9jc2RrOi8vLyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENoYW5uZWxJZCB9IGZyb20gXCIuL0VudW1zXCI7XG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIENvbnN0YW50cyB7XG4gIHB1YmxpYyBzdGF0aWMgcmVhZG9ubHkgcmVxdWlyZWRPbW5pY2hhbm5lbENvbmZpZ3VyYXRpb25QYXJhbWV0ZXJzID0gW1wib3JnVXJsXCIsIFwib3JnSWRcIiwgXCJ3aWRnZXRJZFwiXTtcbiAgcHVibGljIHN0YXRpYyByZWFkb25seSBkZWZhdWx0SGVhZGVycyA9IHtcbiAgICBcIkNvbnRlbnQtVHlwZVwiOiBcImFwcGxpY2F0aW9uL2pzb25cIlxuICB9O1xuICBwdWJsaWMgc3RhdGljIHJlYWRvbmx5IGJ5cGFzc0NhY2hlSGVhZGVycyA9IHtcbiAgICBcImNhY2hlLWNvbnRyb2xcIjogXCJuby1zdG9yZSwgbXVzdC1yZXZhbGlkYXRlLCBuby1jYWNoZVwiLFxuICB9O1xuICBwdWJsaWMgc3RhdGljIHJlYWRvbmx5IGRlZmF1bHRDaGFubmVsSWQgPSBDaGFubmVsSWQuTENXO1xuICBwdWJsaWMgc3RhdGljIHJlYWRvbmx5IGRlZmF1bHRMb2NhbGUgPSBcImVuLXVzXCI7XG4gIHB1YmxpYyBzdGF0aWMgcmVhZG9ubHkgbm9Db250ZW50U3RhdHVzQ29kZSA9IDIwNDtcbiAgcHVibGljIHN0YXRpYyByZWFkb25seSB0cmFuc2FjdGlvbmlkID0gXCJ0cmFuc2FjdGlvbi1pZFwiO1xufVxuIl19
34
+ (0, _defineProperty2["default"])(Constants, "customerDisplayName", "customerDisplayName");
35
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Db21tb24vQ29uc3RhbnRzLnRzIl0sIm5hbWVzIjpbIkNvbnN0YW50cyIsIkNoYW5uZWxJZCIsIkxDVyJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztBQUFBOztJQUVxQkEsUzs7Ozs7aUNBQUFBLFMsZ0RBQ2lELENBQUMsUUFBRCxFQUFXLE9BQVgsRUFBb0IsVUFBcEIsQztpQ0FEakRBLFMsb0JBRXFCO0FBQ3RDLGtCQUFnQjtBQURzQixDO2lDQUZyQkEsUyx3QkFLeUI7QUFDMUMsbUJBQWlCLHFDQUR5QjtBQUUxQyxxQkFBbUI7QUFGdUIsQztpQ0FMekJBLFMsc0JBU3VCQyxpQkFBVUMsRztpQ0FUakNGLFMsbUJBVW9CLE87aUNBVnBCQSxTLHlCQVcwQixHO2lDQVgxQkEsUyx5QkFZMEIsQ0FBQyx3QkFBRCxDO2lDQVoxQkEsUyxtQkFhb0IsZ0I7aUNBYnBCQSxTLHlCQWMwQixxQiIsInNvdXJjZVJvb3QiOiJvY3NkazovLy8iLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDaGFubmVsSWQgfSBmcm9tIFwiLi9FbnVtc1wiO1xuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBDb25zdGFudHMge1xuICBwdWJsaWMgc3RhdGljIHJlYWRvbmx5IHJlcXVpcmVkT21uaWNoYW5uZWxDb25maWd1cmF0aW9uUGFyYW1ldGVycyA9IFtcIm9yZ1VybFwiLCBcIm9yZ0lkXCIsIFwid2lkZ2V0SWRcIl07XG4gIHB1YmxpYyBzdGF0aWMgcmVhZG9ubHkgZGVmYXVsdEhlYWRlcnMgPSB7XG4gICAgXCJDb250ZW50LVR5cGVcIjogXCJhcHBsaWNhdGlvbi9qc29uXCJcbiAgfTtcbiAgcHVibGljIHN0YXRpYyByZWFkb25seSBieXBhc3NDYWNoZUhlYWRlcnMgPSB7XG4gICAgXCJDYWNoZS1Db250cm9sXCI6IFwibm8tc3RvcmUsIG11c3QtcmV2YWxpZGF0ZSwgbm8tY2FjaGVcIixcbiAgICBcIlgtQ2FjaGUtQ29udHJvbFwiOiBcIm5vLXN0b3JlXCJcbiAgfTtcbiAgcHVibGljIHN0YXRpYyByZWFkb25seSBkZWZhdWx0Q2hhbm5lbElkID0gQ2hhbm5lbElkLkxDVztcbiAgcHVibGljIHN0YXRpYyByZWFkb25seSBkZWZhdWx0TG9jYWxlID0gXCJlbi11c1wiO1xuICBwdWJsaWMgc3RhdGljIHJlYWRvbmx5IG5vQ29udGVudFN0YXR1c0NvZGUgPSAyMDQ7XG4gIHB1YmxpYyBzdGF0aWMgcmVhZG9ubHkgc2Vuc2l0aXZlUHJvcGVydGllcyA9IFtcIkF1dGhlbnRpY2F0ZWRVc2VyVG9rZW5cIl07XG4gIHB1YmxpYyBzdGF0aWMgcmVhZG9ubHkgdHJhbnNhY3Rpb25pZCA9IFwidHJhbnNhY3Rpb24taWRcIjtcbiAgcHVibGljIHN0YXRpYyByZWFkb25seSBjdXN0b21lckRpc3BsYXlOYW1lID0gXCJjdXN0b21lckRpc3BsYXlOYW1lXCI7XG59XG4iXX0=
@@ -1 +1 @@
1
- {"version":3,"file":"Constants.js","sourceRoot":"","sources":["../../src/Common/Constants.ts"],"names":[],"mappings":";;AAAA,iCAAoC;AAEpC;IAAA;IAYA,CAAC;IAXwB,oDAA0C,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IAC7E,wBAAc,GAAG;QACtC,cAAc,EAAE,kBAAkB;KACnC,CAAC;IACqB,4BAAkB,GAAG;QAC1C,eAAe,EAAE,qCAAqC;KACvD,CAAC;IACqB,0BAAgB,GAAG,iBAAS,CAAC,GAAG,CAAC;IACjC,uBAAa,GAAG,OAAO,CAAC;IACxB,6BAAmB,GAAG,GAAG,CAAC;IAC1B,uBAAa,GAAG,gBAAgB,CAAC;IAC1D,gBAAC;CAAA,AAZD,IAYC;kBAZoB,SAAS"}
1
+ {"version":3,"file":"Constants.js","sourceRoot":"","sources":["../../src/Common/Constants.ts"],"names":[],"mappings":";;AAAA,iCAAoC;AAEpC;IAAA;IAeA,CAAC;IAdwB,oDAA0C,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IAC7E,wBAAc,GAAG;QACtC,cAAc,EAAE,kBAAkB;KACnC,CAAC;IACqB,4BAAkB,GAAG;QAC1C,eAAe,EAAE,qCAAqC;QACtD,iBAAiB,EAAE,UAAU;KAC9B,CAAC;IACqB,0BAAgB,GAAG,iBAAS,CAAC,GAAG,CAAC;IACjC,uBAAa,GAAG,OAAO,CAAC;IACxB,6BAAmB,GAAG,GAAG,CAAC;IAC1B,6BAAmB,GAAG,CAAC,wBAAwB,CAAC,CAAC;IACjD,uBAAa,GAAG,gBAAgB,CAAC;IACjC,6BAAmB,GAAG,qBAAqB,CAAC;IACrE,gBAAC;CAAA,AAfD,IAeC;kBAfoB,SAAS"}
@@ -26,4 +26,4 @@ var EventNames = /*#__PURE__*/function () {
26
26
  }();
27
27
 
28
28
  exports["default"] = EventNames;
29
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Db21tb24vRXZlbnROYW1lcy50cyJdLCJuYW1lcyI6WyJFdmVudE5hbWVzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7O0lBQXFCQSxVOzs7Ozs7O3dCQUNtQjtBQUFFLGFBQU8sYUFBUDtBQUF1QiIsInNvdXJjZVJvb3QiOiJvY3NkazovLy8iLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBjbGFzcyBFdmVudE5hbWVzIHtcbiAgcHVibGljIHN0YXRpYyBnZXQgT0NTREtMT0FEKCk6IHN0cmluZyB7IHJldHVybiBcIm9jOnNkazpsb2FkXCI7IH1cbn1cbiJdfQ==
29
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Db21tb24vRXZlbnROYW1lcy50cyJdLCJuYW1lcyI6WyJFdmVudE5hbWVzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7O0lBQXFCQSxVOzs7Ozs7O1NBQ25CLGVBQXNDO0FBQUUsYUFBTyxhQUFQO0FBQXVCIiwic291cmNlUm9vdCI6Im9jc2RrOi8vLyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IGNsYXNzIEV2ZW50TmFtZXMge1xuICBwdWJsaWMgc3RhdGljIGdldCBPQ1NES0xPQUQoKTogc3RyaW5nIHsgcmV0dXJuIFwib2M6c2RrOmxvYWRcIjsgfVxufVxuIl19
@@ -1,2 +1,6 @@
1
1
  "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
2
6
  //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZVJvb3QiOiJvY3NkazovLy8iLCJzb3VyY2VzQ29udGVudCI6W119
@@ -54,4 +54,4 @@ var OCSDKLogger = /*#__PURE__*/function () {
54
54
  }();
55
55
 
56
56
  exports["default"] = OCSDKLogger;
57
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Db21tb24vT0NTREtMb2dnZXIudHMiXSwibmFtZXMiOlsiT0NTREtMb2dnZXIiLCJsb2dnZXIiLCJsb2dsZXZlbCIsInRlbGVtZXRyeUV2ZW50IiwiY3VzdG9tRGF0YSIsImRlc2NyaXB0aW9uIiwiaXNMb2dnaW5nRW5hYmxlZCIsImxvZ0RhdGEiLCJUZWxlbWV0cnlIZWxwZXIiLCJHRVRURUxFTUVUUllFVkVOVERBVEEiLCJsb2dFdmVudCIsImxvZ0xldmVsIiwic2V0VGltZW91dCIsImxvZ0NsaWVudFNka1RlbGVtZXRyeUV2ZW50IiwiYmluZCIsImlzTnVsbE9yVW5kZWZpbmVkIiwib2JqIiwidW5kZWZpbmVkIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7QUFJQTs7SUFFcUJBLFc7QUFJbkIsdUJBQW1CQyxNQUFuQixFQUFvQztBQUFBO0FBQUE7QUFDaEMsU0FBS0EsTUFBTCxHQUFjQSxNQUFkO0FBQ0g7Ozs7d0JBRVVDLFEsRUFBb0JDLGMsRUFBd0JDLFUsRUFBa0JDLFcsRUFBNEI7QUFBRTtBQUNuRyxVQUFJLEtBQUtDLGdCQUFMLEVBQUosRUFBNkI7QUFDekIsWUFBTUMsT0FBTyxHQUFHQyw0QkFBZ0JDLHFCQUFoQixDQUFzQ04sY0FBdEMsRUFBc0RDLFVBQXRELEVBQWtFQyxXQUFsRSxDQUFoQjs7QUFDQSxhQUFLSyxRQUFMLENBQWNSLFFBQWQsRUFBd0JLLE9BQXhCO0FBQ0g7QUFDSjs7OzZCQUVlSSxRLEVBQW9CSixPLEVBQXVDO0FBQ3pFLFVBQUksS0FBS0QsZ0JBQUwsRUFBSixFQUE2QjtBQUN6Qk0sUUFBQUEsVUFBVSxDQUFDLEtBQUtYLE1BQUwsQ0FBWVksMEJBQVosQ0FBdUNDLElBQXZDLENBQTRDLEtBQUtiLE1BQWpELENBQUQsRUFBMkQsQ0FBM0QsRUFBOERVLFFBQTlELEVBQXdFSixPQUF4RSxDQUFWO0FBQ0g7QUFDRjs7O3VDQUVrQztBQUMvQixhQUFPLENBQUMsS0FBS1EsaUJBQUwsQ0FBdUIsS0FBS2QsTUFBNUIsQ0FBUjtBQUNIOzs7c0NBRXdCZSxHLEVBQXNCO0FBQzNDLGFBQVFBLEdBQUcsS0FBSyxJQUFSLElBQWdCQSxHQUFHLEtBQUtDLFNBQWhDO0FBQ0giLCJzb3VyY2VSb290Ijoib2NzZGs6Ly8vIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IElPQ1NES0xvZ2dlciBmcm9tIFwiLi4vSW50ZXJmYWNlcy9JT0NTREtMb2dnZXJcIjtcbmltcG9ydCBJTG9nZ2VyIGZyb20gXCIuLi9Nb2RlbC9JTG9nZ2VyXCI7XG5pbXBvcnQgSU9DU0RLTG9nRGF0YSBmcm9tIFwiLi4vTW9kZWwvSU9DU0RLTG9nRGF0YVwiO1xuaW1wb3J0IHsgTG9nTGV2ZWwgfSBmcm9tIFwiLi4vTW9kZWwvTG9nTGV2ZWxcIjtcbmltcG9ydCBUZWxlbWV0cnlIZWxwZXIgZnJvbSBcIi4uL1V0aWxzL1RlbGVtZXRyeUhlbHBlclwiO1xuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBPQ1NES0xvZ2dlciBpbXBsZW1lbnRzIElPQ1NES0xvZ2dlciB7XG5cbiAgcHJpdmF0ZSBsb2dnZXI6IElMb2dnZXI7XG5cbiAgcHVibGljIGNvbnN0cnVjdG9yKGxvZ2dlcjogSUxvZ2dlcikge1xuICAgICAgdGhpcy5sb2dnZXIgPSBsb2dnZXI7XG4gIH1cblxuICBwdWJsaWMgbG9nKGxvZ2xldmVsOiBMb2dMZXZlbCwgdGVsZW1ldHJ5RXZlbnQ6IHN0cmluZywgY3VzdG9tRGF0YT86IGFueSwgZGVzY3JpcHRpb24/OiBzdHJpbmcpOiB2b2lkIHsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55LCBAdHlwZXNjcmlwdC1lc2xpbnQvZXhwbGljaXQtbW9kdWxlLWJvdW5kYXJ5LXR5cGVzXG4gICAgICBpZiAodGhpcy5pc0xvZ2dpbmdFbmFibGVkKCkpIHtcbiAgICAgICAgICBjb25zdCBsb2dEYXRhID0gVGVsZW1ldHJ5SGVscGVyLkdFVFRFTEVNRVRSWUVWRU5UREFUQSh0ZWxlbWV0cnlFdmVudCwgY3VzdG9tRGF0YSwgZGVzY3JpcHRpb24pO1xuICAgICAgICAgIHRoaXMubG9nRXZlbnQobG9nbGV2ZWwsIGxvZ0RhdGEpO1xuICAgICAgfVxuICB9XG5cbiAgcHVibGljIGxvZ0V2ZW50KGxvZ0xldmVsOiBMb2dMZXZlbCwgbG9nRGF0YTogSU9DU0RLTG9nRGF0YSk6IG51bWJlciB8IHZvaWQge1xuICAgIGlmICh0aGlzLmlzTG9nZ2luZ0VuYWJsZWQoKSkge1xuICAgICAgICBzZXRUaW1lb3V0KHRoaXMubG9nZ2VyLmxvZ0NsaWVudFNka1RlbGVtZXRyeUV2ZW50LmJpbmQodGhpcy5sb2dnZXIpLCAwLCBsb2dMZXZlbCwgbG9nRGF0YSk7XG4gICAgfVxuICB9XG5cbiAgcHVibGljIGlzTG9nZ2luZ0VuYWJsZWQoKTogYm9vbGVhbiB7XG4gICAgICByZXR1cm4gIXRoaXMuaXNOdWxsT3JVbmRlZmluZWQodGhpcy5sb2dnZXIpO1xuICB9XG5cbiAgcHVibGljIGlzTnVsbE9yVW5kZWZpbmVkKG9iajogb2JqZWN0KTogYm9vbGVhbiB7XG4gICAgICByZXR1cm4gKG9iaiA9PT0gbnVsbCB8fCBvYmogPT09IHVuZGVmaW5lZCk7XG4gIH1cbn1cbiJdfQ==
57
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Db21tb24vT0NTREtMb2dnZXIudHMiXSwibmFtZXMiOlsiT0NTREtMb2dnZXIiLCJsb2dnZXIiLCJsb2dsZXZlbCIsInRlbGVtZXRyeUV2ZW50IiwiY3VzdG9tRGF0YSIsImRlc2NyaXB0aW9uIiwiaXNMb2dnaW5nRW5hYmxlZCIsImxvZ0RhdGEiLCJUZWxlbWV0cnlIZWxwZXIiLCJHRVRURUxFTUVUUllFVkVOVERBVEEiLCJsb2dFdmVudCIsImxvZ0xldmVsIiwic2V0VGltZW91dCIsImxvZ0NsaWVudFNka1RlbGVtZXRyeUV2ZW50IiwiYmluZCIsImlzTnVsbE9yVW5kZWZpbmVkIiwib2JqIiwidW5kZWZpbmVkIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7QUFJQTs7SUFFcUJBLFc7QUFJbkIsdUJBQW1CQyxNQUFuQixFQUFvQztBQUFBO0FBQUE7QUFDaEMsU0FBS0EsTUFBTCxHQUFjQSxNQUFkO0FBQ0g7Ozs7V0FFRCxhQUFXQyxRQUFYLEVBQStCQyxjQUEvQixFQUF1REMsVUFBdkQsRUFBeUVDLFdBQXpFLEVBQXFHO0FBQUU7QUFDbkcsVUFBSSxLQUFLQyxnQkFBTCxFQUFKLEVBQTZCO0FBQ3pCLFlBQU1DLE9BQU8sR0FBR0MsNEJBQWdCQyxxQkFBaEIsQ0FBc0NOLGNBQXRDLEVBQXNEQyxVQUF0RCxFQUFrRUMsV0FBbEUsQ0FBaEI7O0FBQ0EsYUFBS0ssUUFBTCxDQUFjUixRQUFkLEVBQXdCSyxPQUF4QjtBQUNIO0FBQ0o7OztXQUVELGtCQUFnQkksUUFBaEIsRUFBb0NKLE9BQXBDLEVBQTJFO0FBQ3pFLFVBQUksS0FBS0QsZ0JBQUwsRUFBSixFQUE2QjtBQUN6Qk0sUUFBQUEsVUFBVSxDQUFDLEtBQUtYLE1BQUwsQ0FBWVksMEJBQVosQ0FBdUNDLElBQXZDLENBQTRDLEtBQUtiLE1BQWpELENBQUQsRUFBMkQsQ0FBM0QsRUFBOERVLFFBQTlELEVBQXdFSixPQUF4RSxDQUFWO0FBQ0g7QUFDRjs7O1dBRUQsNEJBQW1DO0FBQy9CLGFBQU8sQ0FBQyxLQUFLUSxpQkFBTCxDQUF1QixLQUFLZCxNQUE1QixDQUFSO0FBQ0g7OztXQUVELDJCQUF5QmUsR0FBekIsRUFBK0M7QUFDM0MsYUFBUUEsR0FBRyxLQUFLLElBQVIsSUFBZ0JBLEdBQUcsS0FBS0MsU0FBaEM7QUFDSCIsInNvdXJjZVJvb3QiOiJvY3NkazovLy8iLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgSU9DU0RLTG9nZ2VyIGZyb20gXCIuLi9JbnRlcmZhY2VzL0lPQ1NES0xvZ2dlclwiO1xuaW1wb3J0IElMb2dnZXIgZnJvbSBcIi4uL01vZGVsL0lMb2dnZXJcIjtcbmltcG9ydCBJT0NTREtMb2dEYXRhIGZyb20gXCIuLi9Nb2RlbC9JT0NTREtMb2dEYXRhXCI7XG5pbXBvcnQgeyBMb2dMZXZlbCB9IGZyb20gXCIuLi9Nb2RlbC9Mb2dMZXZlbFwiO1xuaW1wb3J0IFRlbGVtZXRyeUhlbHBlciBmcm9tIFwiLi4vVXRpbHMvVGVsZW1ldHJ5SGVscGVyXCI7XG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIE9DU0RLTG9nZ2VyIGltcGxlbWVudHMgSU9DU0RLTG9nZ2VyIHtcblxuICBwcml2YXRlIGxvZ2dlcjogSUxvZ2dlcjtcblxuICBwdWJsaWMgY29uc3RydWN0b3IobG9nZ2VyOiBJTG9nZ2VyKSB7XG4gICAgICB0aGlzLmxvZ2dlciA9IGxvZ2dlcjtcbiAgfVxuXG4gIHB1YmxpYyBsb2cobG9nbGV2ZWw6IExvZ0xldmVsLCB0ZWxlbWV0cnlFdmVudDogc3RyaW5nLCBjdXN0b21EYXRhPzogYW55LCBkZXNjcmlwdGlvbj86IHN0cmluZyk6IHZvaWQgeyAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnksIEB0eXBlc2NyaXB0LWVzbGludC9leHBsaWNpdC1tb2R1bGUtYm91bmRhcnktdHlwZXNcbiAgICAgIGlmICh0aGlzLmlzTG9nZ2luZ0VuYWJsZWQoKSkge1xuICAgICAgICAgIGNvbnN0IGxvZ0RhdGEgPSBUZWxlbWV0cnlIZWxwZXIuR0VUVEVMRU1FVFJZRVZFTlREQVRBKHRlbGVtZXRyeUV2ZW50LCBjdXN0b21EYXRhLCBkZXNjcmlwdGlvbik7XG4gICAgICAgICAgdGhpcy5sb2dFdmVudChsb2dsZXZlbCwgbG9nRGF0YSk7XG4gICAgICB9XG4gIH1cblxuICBwdWJsaWMgbG9nRXZlbnQobG9nTGV2ZWw6IExvZ0xldmVsLCBsb2dEYXRhOiBJT0NTREtMb2dEYXRhKTogbnVtYmVyIHwgdm9pZCB7XG4gICAgaWYgKHRoaXMuaXNMb2dnaW5nRW5hYmxlZCgpKSB7XG4gICAgICAgIHNldFRpbWVvdXQodGhpcy5sb2dnZXIubG9nQ2xpZW50U2RrVGVsZW1ldHJ5RXZlbnQuYmluZCh0aGlzLmxvZ2dlciksIDAsIGxvZ0xldmVsLCBsb2dEYXRhKTtcbiAgICB9XG4gIH1cblxuICBwdWJsaWMgaXNMb2dnaW5nRW5hYmxlZCgpOiBib29sZWFuIHtcbiAgICAgIHJldHVybiAhdGhpcy5pc051bGxPclVuZGVmaW5lZCh0aGlzLmxvZ2dlcik7XG4gIH1cblxuICBwdWJsaWMgaXNOdWxsT3JVbmRlZmluZWQob2JqOiBvYmplY3QpOiBib29sZWFuIHtcbiAgICAgIHJldHVybiAob2JqID09PSBudWxsIHx8IG9iaiA9PT0gdW5kZWZpbmVkKTtcbiAgfVxufVxuIl19
@@ -0,0 +1,3 @@
1
+ export default interface ISendTypingIndicatorOptionalParams {
2
+ customerDisplayName?: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZVJvb3QiOiJvY3NkazovLy8iLCJzb3VyY2VzQ29udGVudCI6W119
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISendTypingIndicatorOptionalParams.js","sourceRoot":"","sources":["../../src/Interfaces/ISendTypingIndicatorOptionalParams.ts"],"names":[],"mappings":""}
package/lib/SDK.d.ts CHANGED
@@ -8,6 +8,7 @@ import IGetQueueAvailabilityOptionalParams from "./Interfaces/IGetQueueAvailabil
8
8
  import IGetSurveyInviteLinkOptionalParams from "./Interfaces/IGetSurveyInviteLinkOptionalParams";
9
9
  import IOmnichannelConfiguration from "./Interfaces/IOmnichannelConfiguration";
10
10
  import IReconnectableChatsParams from "./Interfaces/IReconnectableChatsParams";
11
+ import ISendTypingIndicatorOptionalParams from "./Interfaces/ISendTypingIndicatorOptionalParams";
11
12
  import ISDK from "./Interfaces/ISDK";
12
13
  import ISDKConfiguration from "./Interfaces/ISDKConfiguration";
13
14
  import ISecondaryChannelEventOptionalParams from "./Interfaces/ISecondaryChannelEventOptionalParams";
@@ -122,5 +123,5 @@ export default class SDK implements ISDK {
122
123
  /** Send typing indicator
123
124
  * @param requestId RequestId of the omnichannel session.
124
125
  */
125
- sendTypingIndicator(requestId: string, currentLiveChatVersion: number): Promise<void>;
126
+ sendTypingIndicator(requestId: string, currentLiveChatVersion: number, sendTypingIndicatorOptionalParams?: ISendTypingIndicatorOptionalParams): Promise<void>;
126
127
  }