@zoom/cobrowsesdk
Version:
ZOOM Cobrowse sdk
1 lines • 765 kB
JavaScript
var e='function _toArray(e){return _arrayWithHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableRest()}function ownKeys(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(a),!0).forEach((function(t){_defineProperty(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ownKeys(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,a){var o=_superPropBase(e,t);if(o){var n=Object.getOwnPropertyDescriptor(o,t);return n.get?n.get.call(arguments.length<3?e:a):n.value}},_get.apply(null,arguments)}function _superPropBase(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o,n,r,i,s=[],c=!0,u=!1;try{if(r=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;c=!1}else for(;!(c=(o=r.call(a)).done)&&(s.push(o.value),s.length!==t);c=!0);}catch(e){u=!0,n=e}finally{try{if(!c&&null!=a.return&&(i=a.return(),Object(i)!==i))return}finally{if(u)throw n}}return s}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _createForOfIteratorHelper(e,t){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){a&&(e=a);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}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 r,i=!0,s=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return i=e.done,e},e:function(e){s=!0,r=e},f:function(){try{i||null==a.return||a.return()}finally{if(s)throw r}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,o=Array(t);a<t;a++)o[a]=e[a];return o}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */_regeneratorRuntime=function(){return t};var e,t={},a=Object.prototype,o=a.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function c(e,t,a,o){return Object.defineProperty(e,t,{value:a,enumerable:!o,configurable:!o,writable:!o})}try{c({},"")}catch(e){c=function(e,t,a){return e[t]=a}}function u(t,a,o,n){var r=a&&a.prototype instanceof p?a:p,i=Object.create(r.prototype);return c(i,"_invoke",function(t,a,o){var n=1;return function(r,i){if(3===n)throw Error("Generator is already running");if(4===n){if("throw"===r)throw i;return{value:e,done:!0}}for(o.method=r,o.arg=i;;){var s=o.delegate;if(s){var c=_(s,o);if(c){if(c===d)continue;return c}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(1===n)throw n=4,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);n=3;var u=l(t,a,o);if("normal"===u.type){if(n=o.done?4:2,u.arg===d)continue;return{value:u.arg,done:o.done}}"throw"===u.type&&(n=4,o.method="throw",o.arg=u.arg)}}}(t,o,new S(n||[])),!0),i}function l(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d={};function p(){}function m(){}function h(){}var f={};c(f,r,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(C([])));v&&v!==a&&o.call(v,r)&&(f=v);var y=h.prototype=p.prototype=Object.create(f);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function a(n,r,i,s){var c=l(e[n],e,r);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?t.resolve(d.__await).then((function(e){a("next",e,i,s)}),(function(e){a("throw",e,i,s)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return a("throw",e,i,s)}))}s(c.arg)}var n;c(this,"_invoke",(function(e,o){function r(){return new t((function(t,n){a(e,o,t,n)}))}return n=n?n.then(r,r):r()}),!0)}function _(t,a){var o=a.method,n=t.i[o];if(n===e)return a.delegate=null,"throw"===o&&t.i.return&&(a.method="return",a.arg=e,_(t,a),"throw"===a.method)||"return"!==o&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a \'"+o+"\' method")),d;var r=l(n,t.i,a.arg);if("throw"===r.type)return a.method="throw",a.arg=r.arg,a.delegate=null,d;var i=r.arg;return i?i.done?(a[t.r]=i.value,a.next=t.n,"return"!==a.method&&(a.method="next",a.arg=e),a.delegate=null,d):i:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,d)}function w(e){this.tryEntries.push(e)}function E(t){var a=t[4]||{};a.type="normal",a.arg=e,t[4]=a}function S(e){this.tryEntries=[[-1]],e.forEach(w,this),this.reset(!0)}function C(t){if(null!=t){var a=t[r];if(a)return a.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function a(){for(;++n<t.length;)if(o.call(t,n))return a.value=t[n],a.done=!1,a;return a.value=e,a.done=!0,a};return i.next=i}}throw new TypeError(_typeof(t)+" is not iterable")}return m.prototype=h,c(y,"constructor",h),c(h,"constructor",m),m.displayName=c(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,s,"GeneratorFunction")),e.prototype=Object.create(y),e},t.awrap=function(e){return{__await:e}},k(b.prototype),c(b.prototype,i,(function(){return this})),t.AsyncIterator=b,t.async=function(e,a,o,n,r){void 0===r&&(r=globalThis.__$ZCB_GLOBAL_CACHE$__.Promise);var i=new b(u(e,a,o,n),r);return t.isGeneratorFunction(a)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(y),c(y,s,"Generator"),c(y,r,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),a=[];for(var o in t)a.unshift(o);return function e(){for(;a.length;)if((o=a.pop())in t)return e.value=o,e.done=!1,e;return e.done=!0,e}},t.values=C,S.prototype={constructor:S,reset:function(t){if(this.prev=this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var a in this)"t"===a.charAt(0)&&o.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0][4];if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var a=this;function o(e){i.type="throw",i.arg=t,a.next=e}for(var n=a.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n],i=r[4],s=this.prev,c=r[1],u=r[2];if(-1===r[0])return o("end"),!1;if(!c&&!u)throw Error("try statement without catch or finally");if(null!=r[0]&&r[0]<=s){if(s<c)return this.method="next",this.arg=e,o(c),!0;if(s<u)return o(u),!1}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o[0]>-1&&o[0]<=this.prev&&this.prev<o[2]){var n=o;break}}n&&("break"===e||"continue"===e)&&n[0]<=t&&t<=n[2]&&(n=null);var r=n?n[4]:{};return r.type=e,r.arg=t,n?(this.method="next",this.next=n[2],d):this.complete(r)},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),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a[2]===e)return this.complete(a[4],a[3]),E(a),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a[0]===e){var o=a[4];if("throw"===o.type){var n=o.arg;E(a)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,a,o){return this.delegate={i:C(t),r:a,n:o},"next"===this.method&&(this.arg=e),d}},t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var a,o=_getPrototypeOf(e);if(t){var n=_getPrototypeOf(this).constructor;a=Reflect.construct(o,arguments,n)}else a=o.apply(this,arguments);return _possibleConstructorReturn(this,a)}}function _possibleConstructorReturn(e,t){if(t&&("object"==_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return e}function _wrapNativeSuper(e){var t="function"==typeof Map?new Map:void 0;return _wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,a)}function a(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return a.prototype=Object.create(e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(a,e)},_wrapNativeSuper(e)}function _construct(e,t,a){if(_isNativeReflectConstruct())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var n=new(e.bind.apply(e,o));return a&&_setPrototypeOf(n,a.prototype),n}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}function _isNativeFunction(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}function _defineProperty(e,t,a){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var a=0;a<t.length;a++){var o=t[a];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,t,a){return t&&_defineProperties(e.prototype,t),a&&_defineProperties(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var o=a.call(e,t||"default");if("object"!=_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}"undefined"==typeof globalThis&&(window.globalThis=window),void 0===globalThis.__$ZCB_GLOBAL_PURE_WINDOW$__&&(globalThis.__$ZCB_GLOBAL_PURE_WINDOW$__=globalThis,console.warn("[GLOBAL-PROTECT] __$ZCB_GLOBAL_PURE_WINDOW$__ is not defined and is assigned to globalThis. Please check if the iframe is loaded. Protection may not work as expected.")),globalThis.__$ZCB_GLOBAL_CACHE$__&&"function"==typeof globalThis.__$ZCB_GLOBAL_CACHE$__.$update?globalThis.__$ZCB_GLOBAL_CACHE$__.$update({Promise:globalThis.__$ZCB_GLOBAL_PURE_WINDOW$__.Promise}):globalThis.__$ZCB_GLOBAL_CACHE$__=function(){var e,t={Promise:globalThis.__$ZCB_GLOBAL_PURE_WINDOW$__.Promise},a=!1;function o(e,t,o){Object.defineProperty(e,t,{get:function(){return o},set:function(e){a?o=e:console.warn("[GLOBAL-PROTECT] Direct modification of __$GLOBAL_CACHE$__ is not allowed. Use __$GLOBAL_CACHE$__.$update() instead.")},enumerable:!0,configurable:!1})}if("function"!=typeof Proxy){e={};for(const a in t)t.hasOwnProperty(a)&&o(e,a,t[a])}else e=new Proxy(t,{set:function(e,t,o,n){return a||"$update"===t?(e[t]=o,!0):(console.warn("[GLOBAL-PROTECT] Direct modification of __$GLOBAL_CACHE$__ is not allowed. Use __$GLOBAL_CACHE$__.$update() instead."),!1)},get:function(e,t,a){return e[t]},deleteProperty:function(e,t){return console.warn("[GLOBAL-PROTECT] Deletion of __$GLOBAL_CACHE$__ properties is not allowed."),!1}});return Object.defineProperty(e,"$update",{value:function(e){if("object"!=typeof e||null===e)throw new Error("[GLOBAL-PROTECT] $update() expects an object with key-value pairs: $update({key1: value1, key2: value2})");a=!0;try{for(const[t,a]of Object.entries(e))this[t]=a}finally{a=!1}},writable:!1,enumerable:!1,configurable:!1}),e}(),function(e){"use strict";var t,a,o,n=function(){function e(){_classCallCheck(this,e),window.ZCB_CoBrowseConfigController=this,this.requestNpmModeAgentConfig()}return _createClass(e,[{key:"getCoBrowsingConfig",value:function(e){var t;return e?window.ZMCoBrowsingConfig?window.ZMCoBrowsingConfig[e]:null===(t=this.coBrowsingConfig)||void 0===t?void 0:t[e]:window.ZMCoBrowsingConfig||this.coBrowsingConfig}},{key:"setCoBrowsingConfig",value:function(e){this.coBrowsingConfig=Object.assign(Object.assign({},this.coBrowsingConfig),e)}},{key:"requestNpmModeAgentConfig",value:function(){var e,t,a;(null===(e=window.ZCB_NPM_SDK_AGENT_MAIN)||void 0===e?void 0:e.isInnerFrame(document))&&window.ZCB_CoBrowseConfigController.setCoBrowsingConfig(Object.assign({isViewer:null===(t=window.ZCB_NPM_SDK_AGENT_SESSION_CONTEXT)||void 0===t?void 0:t.isViewer,appKey:null===(a=window.ZCB_NPM_SDK_AGENT_SESSION_CONTEXT)||void 0===a?void 0:a.appKey},window.parent.ZCB_CoBrowseConfigController.coBrowsingConfig))}}],[{key:"create",value:function(){return window.ZCB_CoBrowseConfigController||new e}}]),e}(),r=n.create(),i=function(e,t){return"".concat(e).concat(t)};!function e(t,a){var o={},n=function(){var n=t[r];"string"==typeof n?o[r]=i(a,n):"function"==typeof n?o[r]=function(){return i(a,n.apply(void 0,arguments))}:"object"===_typeof(n)&&(n instanceof RegExp||(o[r]=e(n,a)))};for(var r in t)n();return o}({log:{report:"/report-log"},blob:{uploadBlob:"/upload-blob",getBlobUrl:function(e){return"/cps-blob-".concat(e)},getBlobUrlReg:/cps-blob-([^?#\\/]+)/}},"/co-browsing"),function(e){e.LOCAL="local",e.PROD="prod"}(t||(t={})),function(e){e.LEADER="1",e.FOLLOWER="2",e.RECORDER="11"}(a||(a={})),function(e){e.IMG="IMG",e.SOURCE="SOURCE",e.LINK="LINK",e.A="A",e.AUDIO="AUDIO",e.IFRAME="IFRAME",e.FORM="FORM",e.SCRIPT="SCRIPT",e.STYLE="STYLE"}(o||(o={}));var s,c;!function(e){e.LEADER="HR",e.FOLLOWER="VR"}(s||(s={})),new RegExp("(.+)(HTTPS?)/(.+)/".concat("CPS-SEP-FLAG","/(").concat(s.FOLLOWER,"|").concat(s.LEADER,")")),function(e){e[e.TYPE_UNKNOWN=-1]="TYPE_UNKNOWN",e[e.TYPE_TOP=1]="TYPE_TOP",e[e.TYPE_FRAME=2]="TYPE_FRAME",e[e.TYPE_AUX=3]="TYPE_AUX",e[e.TYPE_SCRIPT=4]="TYPE_SCRIPT",e[e.TYPE_MODULE=5]="TYPE_MODULE",e[e.TYPE_LINK=6]="TYPE_LINK",e[e.TYPE_XHR=7]="TYPE_XHR",e[e.TYPE_RESOURCE=8]="TYPE_RESOURCE",e[e.TYPE_WORKER=9]="TYPE_WORKER",e[e.TYPE_WORKER_SCOPE=10]="TYPE_WORKER_SCOPE",e[e.TYPE_REDIRECT=11]="TYPE_REDIRECT",e[e.TYPE_PAWS=12]="TYPE_PAWS",e[e.TYPE_CONTINUATION=13]="TYPE_CONTINUATION"}(c||(c={}));var u=new RegExp("[&?]".concat("CPS_TAB_NAME","=").concat("_CPS_TAB_","(\\\\d+)")),l=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),d=function(e){var t={};return e.forEach((function(e,a){return t[e]=a})),t}(l),p=/^(?:[A-Za-z\\d+\\/]{4})*?(?:[A-Za-z\\d+\\/]{2}(?:==)?|[A-Za-z\\d+\\/]{3}=?)?$/,m=String.fromCharCode.bind(String),h=function(e){if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?m(192|t>>>6)+m(128|63&t):m(224|t>>>12&15)+m(128|t>>>6&63)+m(128|63&t)}var a=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return m(240|a>>>18&7)+m(128|a>>>12&63)+m(128|a>>>6&63)+m(128|63&a)},f=/[\\uD800-\\uDBFF][\\uDC00-\\uDFFFF]|[^\\x00-\\x7F]/g,g=/[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xF7][\\x80-\\xBF]{3}/g,v=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return m(55296+(t>>>10))+m(56320+(1023&t));case 3:return m((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return m((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},y=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=function(e){for(var t,a,o,n,r="",i=e.length%3,s=0;s<e.length;){if((a=e.charCodeAt(s++))>255||(o=e.charCodeAt(s++))>255||(n=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");r+=l[(t=a<<16|o<<8|n)>>18&63]+l[t>>12&63]+l[t>>6&63]+l[63&t]}return i?r.slice(0,i-3)+"===".substring(i):r}(function(e){return e.replace(f,h)}(e));return t?a.replace(/=/g,"").replace(/[+\\/]/g,(function(e){return"+"==e?"-":"_"})):a},k=function(e){return t=function(e){if(e=e.replace(/\\s+/g,""),!p.test(e))throw new TypeError("malformed base64.");var t;e+="==".slice(2-(3&e.length));for(var a,o,n="",r=0;r<e.length;)t=d[e.charAt(r++)]<<18|d[e.charAt(r++)]<<12|(a=d[e.charAt(r++)])<<6|(o=d[e.charAt(r++)]),n+=64===a?m(t>>16&255):64===o?m(t>>16&255,t>>8&255):m(t>>16&255,t>>8&255,255&t);return n}(function(e){return function(e){return e.replace(/[^A-Za-z0-9\\+\\/]/g,"")}(e.replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})))}(e)),t.replace(g,v);var t};function b(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{return y(e,t)}catch(e){}return e}function _(e){try{return k(e)}catch(e){}return e}var w,E,S=function(){return r.getCoBrowsingConfig("sdkVersion")};!function(e){e.USER_ROSTER="msg_user_roster",e.ROOM_ROSTER="msg_room_roster",e.DYNAMIC_FEATURE_CHANGE="msg_dynamic_feature_change",e.SESSION_CLOSED="msg_session_closed",e.SESSION_STARTED="msg_session_started",e.SESSION_PERSISTED="msg_session_persisted",e.ERROR="msg_error",e.SESSION_CONNECTING="msg_session_connecting",e.SESSION_RECONNECTING="msg_session_reconnecting",e.RECORD_APPROVE_REQUEST="msg_record_approve_request",e.START_RECORD_RESPONSE="msg_record_started_response",e.STOP_RECORD_RESPONSE="msg_record_stopped_response",e.PAUSE_RECORD_RESPONSE="msg_record_paused_response",e.RESUME_RECORD_RESPONSE="msg_record_resumed_response",e.SOCKET_OPEN="msg_socket_open",e.RECORD_APPROVE_RESPONSE="msg_record_approve_response",e.USER_BE_HOLD_STATUS_CHANGE="msg_user_be_hold_status_change",e.REMOTE_CONTROL_REQUEST="msg_remote_control_request",e.REMOTE_CONTROL_RESPONSE="msg_remote_control_response",e.REMOTE_CONTROL_GIVE_UP="msg_remote_control_give_up",e.REMOTE_CONTROL_TAKE_BACK="msg_remote_control_take_back",e.REMOTE_CONTROL_REJECT="msg_remote_control_reject",e.REMOTE_CONTROL_CANCEL="msg_remote_control_cancel",e.LEADER_PAGE_VISIBILITY="msg_leader_page_visibility"}(w||(w={})),function(e){e.SESSION_STARTED="session_started",e.SESSION_INITED="session_inited",e.SESSION_PAUSED="session_paused",e.SESSION_RESUMED="session_resumed",e.SESSION_ENDED="session_ended",e.SESSION_LEFT="session_left",e.SESSION_CANCELING="session_canceling",e.SESSION_CONNECTING="session_connecting",e.SESSION_RECONNECTING="session_reconnecting",e.SESSION_PERSISTING="session_persisting",e.PARTICIPANT_CHANGED="participant_changed",e.AGENT_JOINED="agent_joined",e.AGENT_LEFT="agent_left",e.AGENT_DISCONNECTED="agent_disconnected",e.CUSTOMER_JOINED="customer_joined",e.CUSTOMER_LEFT="customer_left",e.CUSTOMER_DISCONNECTED="customer_disconnected",e.SESSION_ERROR="session_error",e.REMOTE_CONTROL_STATUS="remote_control_status",e.REMOTE_CONTROL_REQUEST="remote_control_request",e.REMOTE_CONTROL_RESPONSE="remote_control_response",e.REMOTE_CONTROL_GIVE_UP="remote_control_give_up",e.REMOTE_CONTROL_TAKE_BACK="remote_control_take_back",e.REMOTE_CONTROL_REJECT="remote_control_reject",e.REMOTE_CONTROL_CANCEL="remote_control_cancel",e.REMOTE_ASSIST_REQUESTED="remote_assist_requested",e.REMOTE_ASSIST_CANCELLED="remote_assist_cancelled",e.REMOTE_ASSIST_ACCEPTED="remote_assist_accepted",e.REMOTE_ASSIST_REJECTED="remote_assist_rejected",e.REMOTE_ASSIST_STARTED="remote_assist_started",e.REMOTE_ASSIST_STOPPED="remote_assist_stopped",e.PINCODE_UPDATED="pincode_updated",e.RECORD_STARTED="record_started",e.RECORD_STOPPED="record_stopped",e.RECORD_PAUSED="record_paused",e.RECORD_RESUMED="record_resumed",e.ORIGIN_UPDATED="origin_updated",e.START_REPLAY="start_replay",e.CURRENT_USER_TRANSFER="current_user_transfer",e.CUSTOMER_FOCUS_LOST="customer_focus_lost",e.CUSTOMER_TRANSFERRED="customer_transferred"}(E||(E={}));var C,R,T,I,O,j,N,A,D="$$_ZCB_SESSION_$$";!function(e){e.COM_DESK="com-desk",e.COM_VIEWER="com-viewer",e.COM_BYOP_DESK="com_byop_desk"}(C||(C={})),function(e){e[e.Normal=0]="Normal",e[e.AgentReconnectFailed=1]="AgentReconnectFailed",e[e.CustomerReconnectFailed=2]="CustomerReconnectFailed",e[e.CustomerEnded=3]="CustomerEnded"}(R||(R={})),function(e){e[e.Voice=1]="Voice",e[e.Chat=2]="Chat",e[e.VideoInbound=3]="VideoInbound",e[e.VideoOutbound=4]="VideoOutbound"}(T||(T={})),function(e){e.tabFollowingWaitTransferringCustomer="tabFollowingWaitTransferringCustomer",e.tabFollowingTransferringFailedCustomer="tabFollowingTransferringFailedCustomer",e.tabFollowingTransferringFailedAgent="tabFollowingTransferringFailedAgent"}(I||(I={})),function(e){e.NOT_CREATED="session_not_created",e.RECOVERABLE="session_recoverable",e.STARTED="session_started",e.CONNECT_FAILED="connect_failed",e.CONNECTING="session_connecting",e.CANCELING="session_canceling",e.RECONNECTING="session_reconnecting",e.CAN_PERSIST="session_can_persist",e.PERSISTING="session_persisting"}(O||(O={})),function(e){e.UNKNOWN="unknown"}(j||(j={})),function(e){e.UNKNOWN="unknown",e.NO_ROOT_DOM="no_root_dom"}(N||(N={})),function(e){e.START="START",e.JOIN="JOIN",e.AUTO="AUTO",e.PERSIST="persist"}(A||(A={}));var L,M,x,P,z,F,B,U,V,W,H,G,Y,K,Z,q,J,$="replayer-wrapper",X="CBS-internal-block";!function(e){e.zcc="zcc",e.common="common"}(L||(L={})),function(e){e[e.NoAction=0]="NoAction",e[e.Accept=1]="Accept",e[e.Decline=2]="Decline",e[e.Leave=3]="Leave"}(M||(M={})),function(e){e[e.END_ROOM=41e3]="END_ROOM",e[e.DESTROY_DEACTIVE_ROOM=41001]="DESTROY_DEACTIVE_ROOM",e[e.DESTROY_SLEEP_ROOM=41002]="DESTROY_SLEEP_ROOM",e[e.DESTROY_NO_VALID_OPERATION_ROOM=41003]="DESTROY_NO_VALID_OPERATION_ROOM",e[e.END_DEACTIVE_ROOM=10001]="END_DEACTIVE_ROOM"}(x||(x={})),function(e){e.END_SESSION="end_session",e.DEACTIVE_SESSION="deactive_session",e.CANCEL_SESSION="cancel_session"}(P||(P={})),_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},x.END_ROOM,P.END_SESSION),x.DESTROY_DEACTIVE_ROOM,P.DEACTIVE_SESSION),x.DESTROY_SLEEP_ROOM,P.DEACTIVE_SESSION),x.END_DEACTIVE_ROOM,P.DEACTIVE_SESSION),x.DESTROY_NO_VALID_OPERATION_ROOM,P.DEACTIVE_SESSION),function(e){e[e.LEAVE_ROOM=4e4]="LEAVE_ROOM",e[e.DISCONNECTED=40001]="DISCONNECTED"}(z||(z={})),function(e){e.LEAVE_SESSION="leave_session",e.DISCONNECT_SESSION="disconnect_session"}(F||(F={})),_defineProperty(_defineProperty({},z.LEAVE_ROOM,F.LEAVE_SESSION),z.DISCONNECTED,F.DISCONNECT_SESSION),function(e){e.CUSTOMER_END_COBROWSE="Customer has left the Cobrowse session.",e.AGENT_END_COBROWSE="Agent has left the Cobrowse session.",e.END_COBROWSE_CC="THE_COBROWSE_SESSION_HAS_BEEN_ENDED",e.CUSTOMER_TRANSFERRED="The session has been transferred to this page."}(B||(B={})),function(e){e[e.DEFAULT=0]="DEFAULT",e[e.CC_UI_SESSION_END=1]="CC_UI_SESSION_END"}(U||(U={})),function(e){e.RECONNECTING_SESSION="Reconnecting Cobrowse session. Please wait....",e.CONNECTING_SESSION="Joining Cobrowse session...",e.UNABLE_JOIN_SESSION_TITLE="Unable to join the Cobrowse session",e.FAILED_RECONNECT_SESSION_TITLE="Failed to reconnect to the Cobrowse session",e.FAILED_RECONNECT_SESSION_CONTENT="The Cobrowse session has ended automatically due to failed reconnection. Please check your network connection and restart the session.",e.ENDED_RECONNECT_SESSION_TITLE="Cobrowse session has ended",e.RECONNECTING_SESSION_CC="RECONNECTING_COBROWSE",e.CONNECTING_SESSION_CC="JOINING_COBROWSE_SESSION",e.UNABLE_JOIN_SESSION_TITLE_CC="UNABLE_JOIN_SESSION_TITLE",e.FAILED_RECONNECT_SESSION_TITLE_CC="FAILED_RECONNECT_SESSION_TITLE",e.FAILED_RECONNECT_SESSION_CONTENT_CC="FAILED_RECONNECT_SESSION_CONTENT",e.ENDED_RECONNECT_SESSION_TITLE_CC="ENDED_RECONNECT_SESSION_TITLE",e.TRANSFER_FAILED_ERROR_TITLE="Failed to transfer to new tab"}(V||(V={})),function(e){e.TRANSFER_FAILED_ERROR_TIPS="Failed to transfer to new tab,Please return to the previous tab and have a try again."}(W||(W={})),function(e){e.RECONNECTING_SESSION="Reconnecting Cobrowse session...",e.CONNECTING_SESSION="Connecting to Cobrowse session...",e.GIVE_CONSUMER_CODE="Give the pairing code to your consumer to join:",e.COBROWSE_PIN_CODE="Cobrowse code",e.COBROWSE_PIN_CODE_TIPS="Please inform the following pin code to your support agent, your agent and you will browse this page together.",e.COBROWSE_PIN_CODE_TIPS_MOBILE="Please give this code to your agent.",e.GIVE_CONSUMER_CODE_CC="GIVE_CONSUMER_CODE",e.COBROWSE_PIN_CODE_ERROR_TITLE="Unable to generate pin code",e.COBROWSE_PIN_CODE_ERROR_TIPS="Unable to generate pin code. Please try again later."}(H||(H={})),function(e){e.WAIT_CONSUMER="WAIT_CONSUMER"}(G||(G={})),function(e){e.SESSION_TIMER="SESSION_TIMER",e.AUTO_END_SESSION="AUTO_END_SESSION",e.RECONNECTING_SESSION_CC="RECONNECTING_COBROWSE",e.CONNECTING_SESSION_CC="CONNECTING_TO_COBROWSE_SESSION",e.CAN_NOT_RECEIVE_INVITE_SESSION_CC="CAN_NOT_RECEIVE_INVITE_SESSION",e.JOIN_WITH_PAIRING_CODE="JOIN_WITH_PAIRING_CODE"}(Y||(Y={})),function(e){e.Cookies="cookie",e.LocalStorage="localStorage",e.SessionStorage="sessionStorage",e.All="all"}(K||(K={})),function(e){e.CustomerFloatingToolbar="customerFloatingToolbar",e.CustomerFloatingToolbarIcon="customerFloatingToolbarIcon",e.CustomerFloatingToolbarText="customerFloatingToolbarText",e.CustomerFloatingToolbarButton="customerFloatingToolbarButton",e.CustomerFloatingToolbarButtonPrefixIcon="customerFloatingToolbarButtonPrefixIcon",e.CustomerScreenBorder="customerScreenBorder",e.CustomerAnnotationToolbarMouseButton="customerAnnotationToolbarMouseButton",e.CustomerAnnotationToolbarVanishingPenButton="customerAnnotationToolbarVanishingPenButton",e.CustomerAnnotationToolbarPenButton="customerAnnotationToolbarPenButton",e.CustomerAnnotationToolbarVanishingRectangleButton="customerAnnotationToolbarVanishingRectangleButton",e.CustomerAnnotationToolbarRectangleButton="customerAnnotationToolbarRectangleButton",e.CustomerAnnotationToolbarEraserButton="customerAnnotationToolbarEraserButton",e.CustomerAnnotationToolbarColorButton="customerAnnotationToolbarColorButton",e.CustomerAnnotationToolbarClearButton="customerAnnotationToolbarClearButton",e.CustomerAnnotationToolbarCloseButton="customerAnnotationToolbarCloseButton",e.CustomerAnnotationToolbarOpenButton="customerAnnotationToolbarOpenButton",e.CustomerJoinSessionDialogOverall="customerJoinSessionDialogOverall",e.CustomerJoinSessionDialogTitle="customerJoinSessionDialogTitle",e.CustomerJoinSessionDialogTitleContent="customerJoinSessionDialogTitleContent",e.CustomerJoinSessionDialogTitleIcon="customerJoinSessionDialogTitleIcon",e.CustomerJoinSessionDialogTopRightCloseButton="customerJoinSessionDialogTopRightCloseButton",e.CustomerJoinSessionDialogLoadingPinCodeIcon="customerJoinSessionDialogLoadingPinCodeIcon",e.CustomerJoinSessionDialogPinCodeTipText="customerJoinSessionDialogPinCodeTipText",e.CustomerJoinSessionDialogPinCodeContent="customerJoinSessionDialogPinCodeContent",e.CustomerJoinSessionDialogFooterContainer="customerJoinSessionDialogFooterContainer",e.CustomerJoinSessionDialogCancelButton="customerJoinSessionDialogCancelButton",e.CustomerEndSessionDialogOverall="customerEndSessionDialogOverall",e.CustomerEndSessionDialogTitleContainer="customerEndSessionDialogTitleContainer",e.CustomerEndSessionDialogContentContainer="customerEndSessionDialogContentContainer",e.CustomerEndSessionDialogFooterContainer="customerEndSessionDialogFooterContainer",e.CustomerEndSessionDialogTitleContent="customerEndSessionDialogTitleContent",e.CustomerEndSessionDialogTitleIcon="customerEndSessionDialogTitleIcon",e.CustomerEndSessionDialogTextContent="customerEndSessionDialogTextContent",e.CustomerEndSessionDialogTopRightCloseButton="customerEndSessionDialogTopRightCloseButton",e.CustomerEndSessionDialogCancelButton="customerEndSessionDialogCancelButton",e.CustomerEndSessionDialogEndSessionButton="customerEndSessionDialogEndSessionButton",e.CustomerReconnectDialogOverall="customerReconnectDialogOverall",e.CustomerReconnectDialogContentContainer="customerReconnectDialogContentContainer",e.CustomerReconnectDialogFooterContainer="customerReconnectDialogFooterContainer",e.CustomerReconnectDialogLoadingIcon="customerReconnectDialogLoadingIcon",e.CustomerReconnectDialogTextContent="customerReconnectDialogTextContent",e.CustomerReconnectDialogCloseButton="customerReconnectDialogCloseButton",e.CustomerReconnectDialogCloseButtonPrefixIcon="customerReconnectDialogCloseButtonPrefixIcon",e.CustomerConnectDialogOverall="customerConnectDialogOverall",e.CustomerConnectDialogContentContainer="customerConnectDialogContentContainer",e.CustomerConnectDialogFooterContainer="customerConnectDialogFooterContainer",e.CustomerConnectDialogLoadingIcon="customerConnectDialogLoadingIcon",e.CustomerConnectDialogTextContent="customerConnectDialogTextContent",e.CustomerConnectDialogCloseButton="customerConnectDialogCloseButton",e.CustomerConnectDialogCloseButtonPrefixIcon="customerConnectDialogCloseButtonPrefixIcon",e.CustomerJoinFailedDialogOverall="customerJoinFailedDialogOverall",e.CustomerJoinFailedDialogTitleContainer="customerJoinFailedDialogTitleContainer",e.CustomerJoinFailedDialogContentContainer="customerJoinFailedDialogContentContainer",e.CustomerJoinFailedDialogFooterContainer="customerJoinFailedDialogFooterContainer",e.CustomerJoinFailedDialogTitleContent="customerJoinFailedDialogTitleContent",e.CustomerJoinFailedDialogTitleIcon="customerJoinFailedDialogTitleIcon",e.CustomerJoinFailedDialogTextContent="customerJoinFailedDialogTextContent",e.CustomerJoinFailedDialogTextSecondaryContent="customerJoinFailedDialogTextSecondaryContent",e.CustomerJoinFailedDialogOkButton="customerJoinFailedDialogOkButton",e.CustomerTransferFailedTitleContent="CustomerTransferFailedTitleContent",e.CustomerTransferFailedTextSecondaryContent="CustomerTransferFailedTextSecondaryContent",e.CustomerTransferFailedOkButton="CustomerTransferFailedOkButton",e.CustomerReconnectFailedDialogOverall="customerReconnectFailedDialogOverall",e.CustomerReconnectFailedDialogTitleContainer="customerReconnectFailedDialogTitleContainer",e.CustomerReconnectFailedDialogContentContainer="customerReconnectFailedDialogContentContainer",e.CustomerReconnectFailedDialogFooterContainer="customerReconnectFailedDialogFooterContainer",e.CustomerReconnectFailedDialogTitleContent="customerReconnectFailedDialogTitleContent",e.CustomerReconnectFailedDialogTitleIcon="customerReconnectFailedDialogTitleIcon",e.CustomerReconnectFailedDialogTextContent="customerReconnectFailedDialogTextContent",e.CustomerReconnectFailedDialogTextSecondaryContent="customerReconnectFailedDialogTextSecondaryContent",e.CustomerReconnectFailedDialogOkButton="customerReconnectFailedDialogOkButton",e.CustomerReconnectTimeoutDialogOverall="customerReconnectTimeoutDialogOverall",e.CustomerReconnectTimeoutDialogTitleContainer="customerReconnectTimeoutDialogTitleContainer",e.CustomerReconnectTimeoutDialogContentContainer="customerReconnectTimeoutDialogContentContainer",e.CustomerReconnectTimeoutDialogFooterContainer="customerReconnectTimeoutDialogFooterContainer",e.CustomerReconnectTimeoutDialogTitleContent="customerReconnectTimeoutDialogTitleContent",e.CustomerReconnectTimeoutDialogTitleIcon="customerReconnectTimeoutDialogTitleIcon",e.CustomerReconnectTimeoutDialogTextContent="customerReconnectTimeoutDialogTextContent",e.CustomerReconnectTimeoutDialogTextSecondaryContent="customerReconnectTimeoutDialogTextSecondaryContent",e.CustomerReconnectTimeoutDialogOkButton="customerReconnectTimeoutDialogOkButton",e.CustomerReconnectTimeoutDialogTopRightCloseButton="customerReconnectTimeoutDialogTopRightCloseButton",e.CustomerDisconnectDialogOverall="customerDisconnectDialogOverall",e.CustomerDisconnectDialogContentContainer="customerDisconnectDialogContentContainer",e.CustomerDisconnectDialogFooterContainer="customerDisconnectDialogFooterContainer",e.CustomerDisconnectDialogLoadingIcon="customerDisconnectDialogLoadingIcon",e.CustomerDisconnectDialogFirstLineTextContent="customerDisconnectDialogFirstLineTextContent",e.CustomerDisconnectDialogSecondLineTextContent="customerDisconnectDialogSecondLineTextContent",e.CustomerDisconnectDialogPinCode="customerDisconnectDialogPinCode",e.CustomerDisconnectDialogEndButton="customerDisconnectDialogCloseButton",e.CustomerDisconnectDialogEndButtonPrefixIcon="customerDisconnectDialogCloseButtonPrefixIcon",e.CustomerToastSuccessPrefixIcon="customerToastSuccessPrefixIcon",e.CustomerToastSuccessWrapper="customerToastSuccessWrapper",e.CustomerToastErrorPrefixIcon="customerToastErrorPrefixIcon",e.CustomerToastErrorWrapper="customerToastErrorWrapper",e.CustomerToastWarningPrefixIcon="customerToastWarningPrefixIcon",e.CustomerToastWarningWrapper="customerToastWarningWrapper",e.CustomerToastDefaultPrefixIcon="customerToastDefaultPrefixIcon",e.CustomerToastDefaultWrapper="customerToastDefaultWrapper",e.CustomerToastInfoPrefixIcon="customerToastInfoPrefixIcon",e.CustomerToastInfoWrapper="customerToastInfoWrapper",e.AgentToolbarVerticalWrapper="agentToolbarVerticalWrapper",e.AgentToolbarHorizontalWrapper="agentToolbarHorizontalWrapper",e.AgentToolbarAllowRotation="agentToolbarAllowRotation",e.AgentToolbarDefaultVertical="agentToolbarDefaultVertical",e.AgentToolbarVerticalNormalBtnsWrapper="agentToolbarVerticalNormalBtnsWrapper",e.AgentToolbarHorizontalNormalBtnsWrapper="agentToolbarHorizontalNormalBtnsWrapper",e.AgentToolbarButtonCommon="agentToolbarButtonCommon",e.AgentToolbarButtonActiveCommon="agentToolbarButtonActiveCommon",e.AgentToolbarTooltipCommon="agentToolbarTooltipCommon",e.AgentToolbarVerticalDivider="agentToolbarVerticalDivider",e.AgentToolbarHorizontalDivider="agentToolbarHorizontalDivider",e.AgentToolbarZoomInButton="agentToolbarZoomInButton",e.AgentToolbarZoomInIcon="agentToolbarZoomInIcon",e.AgentToolbarZoomOutButton="agentToolbarZoomOutButton",e.AgentToolbarZoomOutIcon="agentToolbarZoomOutIcon",e.AgentToolbarZoomMenuButton="agentToolbarZoomMenuButton",e.AgentToolbarZoomMenuIcon="agentToolbarZoomMenuIcon",e.AgentToolbarFullScreenButton="agentToolbarFullScreenButton",e.AgentToolbarFullScreenIcon="agentToolbarFullScreenIcon",e.AgentToolbarExitFullScreenButton="agentToolbarExitFullScreenButton",e.AgentToolbarExitFullScreenIcon="agentToolbarExitFullScreenIcon",e.AgentToolbarVanishingPenButton="agentToolbarVanishingPenButton",e.AgentToolbarVanishingPenIcon="agentToolbarVanishingPenIcon",e.AgentToolbarPenButton="agentToolbarPenButton",e.AgentToolbarPenIcon="agentToolbarPenIcon",e.AgentToolbarEndSessionButton="agentToolbarEndSessionButton",e.AgentToolbarEndSessionIcon="agentToolbarEndSessionIcon",e.AgentToolbarRemoteAssistIcon="agentToolbarRemoteAssistIcon",e.AgentVanishingPenSubMenuVerticalWrapper="agentVanishingPenSubMenuVerticalWrapper",e.AgentVanishingPenSubMenuHorizontalWrapper="agentVanishingPenSubMenuHorizontalWrapper",e.AgentVanishingPenSubMenuButtonCommon="agentVanishingPenSubMenuButtonCommon",e.AgentVanishingPenMenuButtonActiveCommon="agentVanishingPenSubMenuButtonActiveCommon",e.AgentVanishingPenSubMenuMouseButton="agentVanishingPenSubMenuMouseButton",e.AgentVanishingPenSubMenuMouseIcon="agentVanishingPenSubMenuMouseIcon",e.AgentVanishingPenSubMenuVanishingPenButton="agentVanishingPenSubMenuVanishingPenButton",e.AgentVanishingPenSubMenuVanishingPenIcon="agentVanishingPenSubMenuVanishingPenIcon",e.AgentVanishingPenSubMenuVanishingRectangleButton="agentVanishingPenSubMenuVanishingRectangleButton",e.AgentVanishingPenSubMenuVanishingRectangleIcon="agentVanishingPenSubMenuVanishingRectangleIcon",e.AgentVanishingPenSubMenuVanishingColorButton="agentVanishingPenSubMenuVanishingColorButton",e.AgentVanishingPenSubMenuVanishingColorIcon="agentVanishingPenSubMenuVanishingColorIcon",e.AgentPenAnnotationSubMenuVerticalWrapper="agentPenAnnotationSubMenuVerticalWrapper",e.AgentPenAnnotationSubMenuHorizontalWrapper="agentPenAnnotationSubMenuHorizontalWrapper",e.AgentPenAnnotationSubMenuButtonCommon="agentPenAnnotationSubMenuButtonCommon",e.AgentPenAnnotationSubMenuButtonActiveCommon="agentPenAnnotationSubMenuButtonActiveCommon",e.AgentPenAnnotationSubMenuMouseButton="agentPenAnnotationSubMenuMouseButton",e.AgentPenAnnotationSubMenuMouseIcon="agentPenAnnotationSubMenuMouseIcon",e.AgentPenAnnotationSubMenuPenButton="agentPenAnnotationSubMenuPenButton",e.AgentPenAnnotationSubMenuPenIcon="agentPenAnnotationSubMenuPenIcon",e.AgentPenAnnotationSubMenuRectangleButton="agentPenAnnotationSubMenuRectangleButton",e.AgentPenAnnotationSubMenuRectangleIcon="agentPenAnnotationSubMenuRectangleIcon",e.AgentPenAnnotationSubMenuEraserButton="agentPenAnnotationSubMenuEraserButton",e.AgentPenAnnotationSubMenuEraserIcon="agentPenAnnotationSubMenuEraserIcon",e.AgentPenAnnotationSubMenuColorButton="agentPenAnnotationSubMenuColorButton",e.AgentPenAnnotationSubMenuColorIcon="agentPenAnnotationSubMenuColorIcon",e.AgentPenAnnotationSubMenuUndoButton="agentPenAnnotationSubMenuUndoButton",e.AgentPenAnnotationSubMenuUndoIcon="agentPenAnnotationSubMenuUndoIcon",e.AgentPenAnnotationSubMenuRedoButton="agentPenAnnotationSubMenuRedoButton",e.AgentPenAnnotationSubMenuRedoIcon="agentPenAnnotationSubMenuRedoIcon",e.AgentPenAnnotationSubMenuClearButton="agentPenAnnotationSubMenuClearButton",e.AgentPenAnnotationSubMenuClearIcon="agentPenAnnotationSubMenuClearIcon",e.AgentPenSubMenuVerticalWrapper="agentPenSubMenuVerticalWrapper",e.AgentPenSubMenuHorizontalWrapper="agentPenSubMenuHorizontalWrapper",e.AgentPenSubMenuButtonCommon="agentPenSubMenuButtonCommon",e.AgentPenSubMenuButtonActiveCommon="agentPenSubMenuButtonActiveCommon",e.AgentPenSubMenuDrawText="agentPenSubMenuDrawText",e.AgentPenSubMenuLineWidthText="agentPenSubMenuLineWidthText",e.AgentColorSubMenuVerticalWrapper="agentColorSubMenuVerticalWrapper",e.AgentColorSubMenuHorizontalWrapper="agentColorSubMenuHorizontalWrapper",e.AgentColorSubMenuButtonCommon="agentColorSubMenuButtonCommon",e.AgentColorSubMenuActiveButtonCommon="agentColorSubMenuActiveButtonCommon",e.AgentZoomInOutMenuVerticalWrapper="agentZoomInOutMenuVerticalWrapper",e.AgentZoomInOutMenuHorizontalWrapper="agentZoomInOutMenuHorizontalWrapper",e.AgentZoomInOutMenuRoot="agentZoomInOutMenuRoot",e.AgentZoomInOutMenuItem="agentZoomInOutMenuItem",e.AgentZoomInOutMenuItemFitToWindow="agentZoomInOutMenuItemFitToWindow",e.AgentZoomInOutMenuItemActualSize="agentZoomInOutMenuItemActualSize",e.AgentSingleAgentEndSessionDialogOverall="agentSingleAgentEndSessionDialogOverall",e.AgentSingleAgentEndSessionDialogTitleContainer="agentSingleAgentEndSessionDialogTitleContainer",e.AgentSingleAgentEndSessionDialogContentContainer="agentSingleAgentEndSessionDialogContentContainer",e.AgentSingleAgentEndSessionDialogFooterContainer="agentSingleAgentEndSessionDialogFooterContainer",e.AgentSingleAgentEndSessionDialogTitleIcon="agentSingleAgentEndSessionDialogTitleIcon",e.AgentSingleAgentEndSessionDialogTitleContent="agentSingleAgentEndSessionDialogTitleContent",e.AgentSingleAgentEndSessionDialogTextContent="agentSingleAgentEndSessionDialogTextContent",e.AgentSingleAgentEndSessionDialogTopRightCloseButton="agentSingleAgentEndSessionDialogTopRightCloseButton",e.AgentSingleAgentEndSessionDialogCancelButton="agentSingleAgentEndSessionDialogCancelButton",e.AgentSingleAgentEndSessionDialogEndSessionButton="agentSingleAgentEndSessionDialogEndSessionButton",e.AgentMultiAgentsEndSessionDialogOverall="agentMultiAgentsEndSessionDialogOverall",e.AgentMultiAgentsEndSessionDialogTitleContainer="agentMultiAgentsEndSessionDialogTitleContainer",e.AgentMultiAgentsEndSessionDialogContentContainer="agentMultiAgentsEndSessionDialogContentContainer",e.AgentMultiAgentsEndSessionDialogFooterContainer="agentMultiAgentsEndSessionDialogFooterContainer",e.AgentMultiAgentsEndSessionDialogTitleIcon="agentMultiAgentsEndSessionDialogTitleIcon",e.AgentMultiAgentsEndSessionDialogTitleContent="agentMultiAgentsEndSessionDialogTitleContent",e.AgentMultiAgentsEndSessionDialogTextContent="agentMultiAgentsEndSessionDialogTextContent",e.AgentMultiAgentsEndSessionDialogTopRightCloseButton="agentMultiAgentsEndSessionDialogTopRightCloseButton",e.AgentMultiAgentsEndSessionDialogCancelButton="agentMultiAgentsEndSessionDialogCancelButton",e.AgentMultiAgentsEndSessionDialogLeaveSessionButton="agentMultiAgentsEndSessionDialogLeaveSessionButton",e.AgentMultiAgentsEndSessionDialogEndSessionButton="agentMultiAgentsEndSessionDialogEndSessionButton",e.AgentJoinFailedDialogOverall="agentJoinFailedDialogOverall",e.AgentJoinFailedDialogTitleContainer="agentJoinFailedDialogTitleContainer",e.AgentJoinFailedDialogContentContainer="agentJoinFailedDialogContentContainer",e.AgentJoinFailedDialogFooterContainer="agentJoinFailedDialogFooterContainer",e.AgentJoinFailedDialogTitleIcon="agentJoinFailedDialogTitleIcon",e.AgentJoinFailedDialogTitleContent="agentJoinFailedDialogTitleContent",e.AgentJoinFailedDialogTextContent="agentJoinFailedDialogTextContent",e.AgentJoinFailedDialogTopRightCloseButton="agentJoinFailedDialogTopRightCloseButton",e.AgentJoinFailedDialogOkButton="agentJoinFailedDialogOkButton",e.AgentFloatingPinToolbarWrapper="agentFloatingPinToolbarWrapper",e.AgentFloatingPinToolbarPrefixIcon="agentFloatingPinToolbarPrefixIcon",e.AgentFloatingPinToolbarContentText="agentFloatingPinToolbarContentText",e.AgentFloatingPinToolbarCopyIcon="agentFloatingPinToolbarCopyIcon",e.AgentToastSuccessPrefixIcon="agentToastSuccessPrefixIcon",e.AgentToastSuccessWrapper="agentToastSuccessWrapper",e.AgentToastErrorPrefixIcon="agentToastErrorPrefixIcon",e.AgentToastErrorWrapper="agentToastErrorWrapper",e.AgentToastWarningPrefixIcon="agentToastWarningPrefixIcon",e.AgentToastWarningWrapper="agentToastWarningWrapper",e.AgentToastDefaultPrefixIcon="agentToastDefaultPrefixIcon",e.AgentToastDefaultWrapper="agentToastDefaultWrapper",e.AgentToastInfoPrefixIcon="agentToastInfoPrefixIcon",e.AgentToastInfoWrapper="agentToastInfoWrapper"}(Z||(Z={})),function(e){e.SESSION_PRE_INIT="session_pre_init",e.SESSION_JOINED="session_joined",e.SESSION_LEFT="session_left",e.SESSION_ENDED="session_ended",e.SESSION_ERROR="session_error",e.REMOTE_ASSIST_ACCEPTED="remote_assist_accepted",e.REMOTE_ASSIST_REJECTED="remote_assist_rejected",e.REMOTE_ASSIST_STARTED="remote_assist_started",e.REMOTE_ASSIST_STOPPED="remote_assist_stopped"}(q||(q={})),q.SESSION_PRE_INIT,q.SESSION_JOINED,q.SESSION_LEFT,q.SESSION_ENDED,q.SESSION_ERROR,q.REMOTE_ASSIST_ACCEPTED,q.REMOTE_ASSIST_REJECTED,q.REMOTE_ASSIST_STARTED,q.REMOTE_ASSIST_STOPPED,function(e){e.SEND_SESSION_OPTIONS="send_session_options",e.START_REMOTE_ASSIST="start_remote_assist",e.STOP_REMOTE_ASSIST="stop_remote_assist"}(J||(J={})),J.SEND_SESSION_OPTIONS,J.START_REMOTE_ASSIST,J.STOP_REMOTE_ASSIST;var Q,ee="CanvasPattern",te="CanvasGradient",ae={fillText:!0,strokeText:!0},oe={scale:!0,restore:!0,resetTransform:!0},ne=Object.assign(Object.assign({},{createLinearGradient:!0,createRadialGradient:!0,createConicGradient:!0}),{createPattern:!0});!function(e){e[e.REFRESH_PIN_CODE_FAILED=10002]="REFRESH_PIN_CODE_FAILED",e[e.CONNECT_TIMEOUT_FAILED=10012]="CONNECT_TIMEOUT_FAILED",e[e.OTHER_SIDE_RECONNECT_TIMEOUT_FAILED=10013]="OTHER_SIDE_RECONNECT_TIMEOUT_FAILED",e[e.USER_EXIT_BEFORE_SESSION=10022]="USER_EXIT_BEFORE_SESSION"}(Q||(Q={}));var re,ie={PIN_UPDATE_FAILED:"Pincode update failed"},se={CONNECT_TIMEOUT_FAILED:"Session connect timeout."};_defineProperty(_defineProperty({},Q.CONNECT_TIMEOUT_FAILED,se.CONNECT_TIMEOUT_FAILED),Q.REFRESH_PIN_CODE_FAILED,ie.PIN_UPDATE_FAILED),function(e){e[e.CANCEL_END_ROOM=1]="CANCEL_END_ROOM",e[e.CANCEL_LEAVE_ROOM=2]="CANCEL_LEAVE_ROOM"}(re||(re={}));var ce="Canceled and ended session.",ue="Canceled and left session.";_defineProperty(_defineProperty({},re.CANCEL_END_ROOM,ce),re.CANCEL_LEAVE_ROOM,ue);var le,de={INVALID_URL:"The website link is invalid.",ACCOUNT_NO_CREDITS:"Free trial account has no available credits."},pe={CONNECTING:"A connection is already in progress.",PERSISTING:" A transfer session is still recovering."},me={NOT_FOUND:"Session does not exist or has ended."},he={LIMIT:"A session is already active."},fe={PIN_NOT_FOUND:"Pincode is not found."},ge={PIN_EXPIRED:"Pincode has expired."},ve={PIN_INVALID_LENGTH:"Pincode exceeds the maximum length",PIN_INVALID_CHARACTERS:"Pincode contains invalid characters."},ye={PIN_REQUIRED:"Pincode is required."},ke={PIN_CONFLICT:"Pincode has already been used."},be={INTERNAL_ERROR:"Session join failed due to an internal error.",SDK_INVALID:"SDK version is invalid.",SESSION_NOT_FOUND:"Session does not exist or has ended.",INVALID_URL:"The website link is invalid.",RECONNECT_FAILED:"Failed to make a connection after multiple attempts.",FAIL_OVER_FAILED:"Failed to reconnect after fail over with multiple attempts."},_e={CUSTOMER_LIMIT:"Maximum number of customers in a session reached."},we={AGENT_LIMIT:"Maximum number of agents in a session reached."},Ee={DUPLICATE_AGENT:"The agent is already in the session."},Se={NETWORK_REQUEST_FAILED:"Network request to backend failed after multiple attempts."},Ce={CANCELING:"Operation failed, the session is being canceled."},Re={JWT_INVALID:"JWT token is invalid.",JWT_NO_PERMISSIONS:"JWT token has no permissions.",JWT_EXPIRED:"JWT token has expired.",JWT_ACCESS_ERROR:"JWT token access error.",INTERNAL_ERROR:"Internal token error."},Te={SERVICE_ERROR:"Service error occurred.",API_RATE_LIMIT:"API request rate limit, try again later.",SESSION_ERROR:"Session error occurred.",SESSION_ERROR_WITH_RETRY:"Session error occurred, try again later."};!function(e){e[e.WEB_REPORT_REGION_FAILED=40100]="WEB_REPORT_REGION_FAILED",e[e.WEB_REPORT_REGION_NOT_MATCH=40101]="WEB_REPORT_REGION_NOT_MATCH",e[e.WEB_REPORT_USER_JOIN_FAILED=40102]="WEB_REPORT_USER_JOIN_FAILED",e[e.WEB_REPORT_USER_JOIN_EMPTY=40103]="WEB_REPORT_USER_JOIN_EMPTY",e[e.WEB_REPORT_USER_JOIN_EMPTY_USER=40104]="WEB_REPORT_USER_JOIN_EMPTY_USER",e[e.AUTH_CONFLICT=40200]="AUTH_CONFLICT",e[e.AUTH_VERIFY_FAILED=40201]="AUTH_VERIFY_FAILED",e[e.AUTH_DB_QUERY_ERROR=40202]="AUTH_DB_QUERY_ERROR",e[e.ROOM_NOT_EXIST=40210]="ROOM_NOT_EXIST",e[e.ROOM_ADD_USER_FAILED=40211]="ROOM_ADD_USER_FAILED",e[e.SESSION_ALREADY_ENDED=40214]="SESSION_ALREADY_ENDED",e[e.ROOM_DEPRECATED=40216]="ROOM_DEPRECATED",e[e.ROOM_ID_MISSING=40300]="ROOM_ID_MISSING",e[e.AUTH_PAYLOAD_MISSING=40301]="AUTH_PAYLOAD_MISSING",e[e.START_URL_INVALID=40302]="START_URL_INVALID",e[e.META_DATA_INVALID=40402]="META_DATA_INVALID",e[e.WSSGW_INSTANCE_NOT_FOUND=40403]="WSSGW_INSTANCE_NOT_FOUND",e[e.LEADER_CONFLICT=40212]="LEADER_CONFLICT",e[e.REACHED_LEADER_LIMIT=40217]="REACHED_LEADER_LIMIT",e[e.FOLLOWER_CONFLICT=40215]="FOLLOWER_CONFLICT",e[e.REACHED_FOLLOWER_LIMIT=40218]="REACHED_FOLLOWER_LIMIT",e[e.USER_CONFLICT=40213]="USER_CONFLICT",e[e.MSG_SIZE_LIMIT_EXCEEDED_BY_MINUTE=40501]="MSG_SIZE_LIMIT_EXCEEDED_BY_MINUTE",e[e.MSG_SIZE_LIMIT_EXCEEDED_BY_SESSION=40502]="MSG_SIZE_LIMIT_EXCEEDED_BY_SESSION",e[e.LEAVE_ROOM=4e4]="LEAVE_ROOM",e[e.DISCONNECTED=40001]="DISCONNECTED",e[e.END_ROOM=41e3]="END_ROOM",e[e.DESTROY_DEACTIVE_ROOM=41001]="DESTROY_DEACTIVE_ROOM",e[e.DESTROY_SLEEP_ROOM=41002]="DESTROY_SLEEP_ROOM",e[e.DESTROY_NO_VALID_OPERATION_ROOM=41003]="DESTROY_NO_VALID_OPERATION_ROOM",e[e.SAME_LEADER_JOINED=40219]="SAME_LEADER_JOINED"}(le||(le={}));var Ie,Oe={};_defineProperty(_defineProperty(_defineProperty(_defin