From 58fc0372e27b8be1fe8b5dac2da8e5b0a970f0e4 Mon Sep 17 00:00:00 2001 From: Jerald Austero Date: Wed, 19 Jan 2022 11:27:09 +0800 Subject: [PATCH 1/5] Add switchWidget API --- docs/api-reference.md | 15 ++++++++++++++- src/lib/index.js | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/api-reference.md b/docs/api-reference.md index ad5a744..d475d92 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -52,6 +52,7 @@ Use the JavaScript API to manipulate the chat widget displayed on your website. - [addTags](#addtags) - [removeTags](#removetags) - [secureMode](#securemode) +- [switchWidget](#switchwidget) - [customStyle](#customstyle)
@@ -749,7 +750,19 @@ this.$tawkMessenger.visitor({ name : 'Name', email : 'email@email.com', hash : '' -}) +}); +``` + +
+ +## switchWidget +Disconnect the current widget connection and switch to another widget. + +```js +this.$tawkMessenger.switchWidget({ + propertyId : 'property_id', + widgetId : 'widget_id' +}); ```
diff --git a/src/lib/index.js b/src/lib/index.js index 12d2238..40abae3 100644 --- a/src/lib/index.js +++ b/src/lib/index.js @@ -184,6 +184,7 @@ class TawkMessenger { this.root.addEvent = (event, metadata, callback) => window.Tawk_API.addEvent(event, metadata, callback); this.root.addTags = (tags, callback) => window.Tawk_API.addTags(tags, callback); this.root.removeTags = (tags, callback) => window.Tawk_API.removeTags(tags, callback); + this.root.switchWidget = (options) => window.Tawk_API.switchWidget(options); } } From 0ab9f7330da74d0d90b44ba45f184558802710fe Mon Sep 17 00:00:00 2001 From: Jerald Austero Date: Sat, 13 May 2023 13:46:43 +0800 Subject: [PATCH 2/5] Update docs and update api --- docs/api-reference.md | 101 ++++++++++++++++++++++-------------------- src/lib/index.js | 2 +- 2 files changed, 55 insertions(+), 48 deletions(-) diff --git a/docs/api-reference.md b/docs/api-reference.md index d475d92..4f2ae5b 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -8,52 +8,56 @@ Use the JavaScript API to manipulate the chat widget displayed on your website.
## Table of contents -- [load](#load) -- [statusChange](#statuschange) -- [beforeLoad](#beforeload) -- [chatMaximized](#chatmaximized) -- [chatMinimized](#chatminimized) -- [chatHidden](#chathidden) -- [chatStarted](#chatstarted) -- [chatEnded](#chatended) -- [prechatSubmit](#prechatsubmit) -- [offlineSubmit](#offlinesubmit) -- [chatMessageVisitor](#chatmessagevisitor) -- [chatMessageAgent](#chatmessageagent) -- [chatMessageSystem](#chatmessagesystem) -- [agentJoinChat](#agentjoinchat) -- [agentLeaveChat](#agentleavechat) -- [chatSatisfaction](#chatsatisfaction) -- [visitorNameChanged](#visitornamechanged) -- [fileUpload](#fileupload) -- [tagsUpdated](#tagsupdated) -- [unreadCountChanged](#unreadcountchanged) -- [visitor](#visitor) -- [maximize](#maximize) -- [minimize](#minimize) -- [toggle](#toggle) -- [popup](#popup) -- [getWindowType](#getwindowtype) -- [showWidget](#showwidget) -- [hideWidget](#hidewidget) -- [toggleVisibility](#togglevisibility) -- [getStatus](#getstatus) -- [isChatMaximized](#ischatmaximized) -- [isChatMinimized](#ischatminimized) -- [isChatHidden](#ischathidden) -- [isChatOngoing](#ischatongoing) -- [isVisitorEngaged](#isvisitorengaged) -- [onLoaded](#onloaded) -- [onBeforeLoaded](#onbeforeloaded) -- [widgetPosition](#widgetposition) -- [endChat](#endchat) -- [setAttributes](#setattributes) -- [addEvent](#addevent) -- [addTags](#addtags) -- [removeTags](#removetags) -- [secureMode](#securemode) -- [switchWidget](#switchwidget) -- [customStyle](#customstyle) +- [API Reference](#api-reference) + - [Table of contents](#table-of-contents) + - [load](#load) + - [statusChange](#statuschange) + - [beforeLoad](#beforeload) + - [chatMaximized](#chatmaximized) + - [chatMinimized](#chatminimized) + - [chatHidden](#chathidden) + - [chatStarted](#chatstarted) + - [chatEnded](#chatended) + - [prechatSubmit](#prechatsubmit) + - [offlineSubmit](#offlinesubmit) + - [chatMessageVisitor](#chatmessagevisitor) + - [chatMessageAgent](#chatmessageagent) + - [chatMessageSystem](#chatmessagesystem) + - [agentJoinChat](#agentjoinchat) + - [agentLeaveChat](#agentleavechat) + - [chatSatisfaction](#chatsatisfaction) + - [visitorNameChanged](#visitornamechanged) + - [fileUpload](#fileupload) + - [tagsUpdated](#tagsupdated) + - [unreadCountChanged](#unreadcountchanged) + - [visitor](#visitor) + - [maximize](#maximize) + - [minimize](#minimize) + - [toggle](#toggle) + - [popup](#popup) + - [getWindowType](#getwindowtype) + - [showWidget](#showwidget) + - [hideWidget](#hidewidget) + - [toggleVisibility](#togglevisibility) + - [getStatus](#getstatus) + - [isChatMaximized](#ischatmaximized) + - [isChatMinimized](#ischatminimized) + - [isChatHidden](#ischathidden) + - [isChatOngoing](#ischatongoing) + - [isVisitorEngaged](#isvisitorengaged) + - [onLoaded](#onloaded) + - [onBeforeLoaded](#onbeforeloaded) + - [widgetPosition](#widgetposition) + - [endChat](#endchat) + - [setAttributes](#setattributes) + - [addEvent](#addevent) + - [addTags](#addtags) + - [removeTags](#removetags) + - [secureMode](#securemode) + - [switchWidget](#switchwidget) + - [customstyle](#customstyle) + - [zIndex](#zindex) + - [Visibility](#visibility)
@@ -756,12 +760,15 @@ this.$tawkMessenger.visitor({
## switchWidget -Disconnect the current widget connection and switch to another widget. +Disconnect the current widget connection, logout if it has existing user login and switch to +another widget. ```js this.$tawkMessenger.switchWidget({ propertyId : 'property_id', widgetId : 'widget_id' +}, function() { + // do something }); ``` diff --git a/src/lib/index.js b/src/lib/index.js index 40abae3..9ad4452 100644 --- a/src/lib/index.js +++ b/src/lib/index.js @@ -184,7 +184,7 @@ class TawkMessenger { this.root.addEvent = (event, metadata, callback) => window.Tawk_API.addEvent(event, metadata, callback); this.root.addTags = (tags, callback) => window.Tawk_API.addTags(tags, callback); this.root.removeTags = (tags, callback) => window.Tawk_API.removeTags(tags, callback); - this.root.switchWidget = (options) => window.Tawk_API.switchWidget(options); + this.root.switchWidget = (options, callback) => window.Tawk_API.switchWidget(options, callback); } } From 7fe06e45dd1ecf82a4e0de044d2723d9914ead30 Mon Sep 17 00:00:00 2001 From: Jerald Austero Date: Sat, 13 May 2023 13:48:27 +0800 Subject: [PATCH 3/5] Update the parameters --- src/lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/index.js b/src/lib/index.js index 9ad4452..505a86f 100644 --- a/src/lib/index.js +++ b/src/lib/index.js @@ -184,7 +184,7 @@ class TawkMessenger { this.root.addEvent = (event, metadata, callback) => window.Tawk_API.addEvent(event, metadata, callback); this.root.addTags = (tags, callback) => window.Tawk_API.addTags(tags, callback); this.root.removeTags = (tags, callback) => window.Tawk_API.removeTags(tags, callback); - this.root.switchWidget = (options, callback) => window.Tawk_API.switchWidget(options, callback); + this.root.switchWidget = (data, callback) => window.Tawk_API.switchWidget(data, callback); } } From f26b7323f6027bbeeab2255a80c76eb246966295 Mon Sep 17 00:00:00 2001 From: Jerald Austero Date: Mon, 15 May 2023 05:55:07 +0800 Subject: [PATCH 4/5] Ran build --- dist/tawk-messenger-vue.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/tawk-messenger-vue.js b/dist/tawk-messenger-vue.js index 596b4c3..f3e7b93 100644 --- a/dist/tawk-messenger-vue.js +++ b/dist/tawk-messenger-vue.js @@ -1 +1 @@ -!function(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var e=n();for(var r in e)("object"==typeof exports?exports:t)[r]=e[r]}}(window,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=70)}([function(t,n,e){(function(n){var e=function(t){return t&&t.Math==Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof n&&n)||function(){return this}()||Function("return this")()}).call(this,e(36))},function(t,n){t.exports=function(t){return"function"==typeof t}},function(t,n){var e=Function.prototype,r=e.bind,o=e.call,i=r&&r.bind(o);t.exports=r?function(t){return t&&i(o,t)}:function(t){return t&&function(){return o.apply(t,arguments)}}},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,e){var r=e(1);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},function(t,n,e){var r=e(2),o=e(26),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,n){return i(o(t),n)}},function(t,n,e){var r=e(0),o=e(25),i=e(5),u=e(27),a=e(24),c=e(23),f=o("wks"),s=r.Symbol,d=s&&s.for,p=c?s:s&&s.withoutSetter||u;t.exports=function(t){if(!i(f,t)||!a&&"string"!=typeof f[t]){var n="Symbol."+t;a&&i(s,t)?f[t]=s[t]:f[t]=c&&d?d(n):p(n)}return f[t]}},function(t,n,e){var r=e(3);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,n,e){var r=e(0),o=e(1),i=function(t){return o(t)?t:void 0};t.exports=function(t,n){return arguments.length<2?i(r[t]):r[t]&&r[t][n]}},function(t,n){var e=Function.prototype.call;t.exports=e.bind?e.bind(e):function(){return e.apply(e,arguments)}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,e){var r=e(38),o=e(21);t.exports=function(t){return r(o(t))}},function(t,n,e){var r=e(2),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},function(t,n,e){var r=e(39),o=e(22);t.exports=function(t){var n=r(t,"string");return o(n)?n:n+""}},function(t,n,e){var r,o,i=e(0),u=e(41),a=i.process,c=i.Deno,f=a&&a.versions||c&&c.version,s=f&&f.v8;s&&(o=(r=s.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&u&&(!(r=u.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=u.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},function(t,n,e){var r=e(0),o=e(16),i=r["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,n,e){var r=e(0),o=Object.defineProperty;t.exports=function(t,n){try{o(r,t,{value:n,configurable:!0,writable:!0})}catch(e){r[t]=n}return n}},function(t,n,e){var r=e(7),o=e(18),i=e(10);t.exports=r?function(t,n,e){return o.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(0),o=e(7),i=e(28),u=e(29),a=e(13),c=r.TypeError,f=Object.defineProperty;n.f=o?f:function(t,n,e){if(u(t),n=a(n),u(e),i)try{return f(t,n,e)}catch(t){}if("get"in e||"set"in e)throw c("Accessors not supported");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(2),o=e(1),i=e(15),u=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return u(t)}),t.exports=i.inspectSource},function(t,n,e){var r=e(7),o=e(9),i=e(37),u=e(10),a=e(11),c=e(13),f=e(5),s=e(28),d=Object.getOwnPropertyDescriptor;n.f=r?d:function(t,n){if(t=a(t),n=c(n),s)try{return d(t,n)}catch(t){}if(f(t,n))return u(!o(i.f,t,n),t[n])}},function(t,n,e){var r=e(0).TypeError;t.exports=function(t){if(null==t)throw r("Can't call method on "+t);return t}},function(t,n,e){var r=e(0),o=e(8),i=e(1),u=e(40),a=e(23),c=r.Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var n=o("Symbol");return i(n)&&u(n.prototype,c(t))}},function(t,n,e){var r=e(24);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,n,e){var r=e(14),o=e(3);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(t,n,e){var r=e(46),o=e(15);(t.exports=function(t,n){return o[t]||(o[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.19.0",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(t,n,e){var r=e(0),o=e(21),i=r.Object;t.exports=function(t){return i(o(t))}},function(t,n,e){var r=e(2),o=0,i=Math.random(),u=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+u(++o+i,36)}},function(t,n,e){var r=e(7),o=e(3),i=e(47);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(0),o=e(4),i=r.String,u=r.TypeError;t.exports=function(t){if(o(t))return t;throw u(i(t)+" is not an object")}},function(t,n){t.exports={}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){var n=+t;return n!=n||0===n?0:(n>0?r:e)(n)}},function(t,n,e){var r=e(59);t.exports=function(t){return r(t.length)}},function(t,n,e){var r=e(12);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,n,e){"use strict";var r=e(35),o=e(0),i=e(3),u=e(33),a=e(4),c=e(26),f=e(32),s=e(63),d=e(64),p=e(69),l=e(6),w=e(14),v=l("isConcatSpreadable"),h=o.TypeError,y=w>=51||!i((function(){var t=[];return t[v]=!1,t.concat()[0]!==t})),m=p("concat"),g=function(t){if(!a(t))return!1;var n=t[v];return void 0!==n?!!n:u(t)};r({target:"Array",proto:!0,forced:!y||!m},{concat:function(t){var n,e,r,o,i,u=c(this),a=d(u,0),p=0;for(n=-1,r=arguments.length;n9007199254740991)throw h("Maximum allowed index exceeded");for(e=0;e=9007199254740991)throw h("Maximum allowed index exceeded");s(a,p++,i)}return a.length=p,a}})},function(t,n,e){var r=e(0),o=e(20).f,i=e(17),u=e(48),a=e(16),c=e(53),f=e(62);t.exports=function(t,n){var e,s,d,p,l,w=t.target,v=t.global,h=t.stat;if(e=v?r:h?r[w]||a(w,{}):(r[w]||{}).prototype)for(s in n){if(p=n[s],d=t.noTargetGet?(l=o(e,s))&&l.value:e[s],!f(v?s:w+(h?".":"#")+s,t.forced)&&void 0!==d){if(typeof p==typeof d)continue;c(p,d)}(t.sham||d&&d.sham)&&i(p,"sham",!0),u(e,s,p,t)}}},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n,e){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);n.f=i?function(t){var n=o(this,t);return!!n&&n.enumerable}:r},function(t,n,e){var r=e(0),o=e(2),i=e(3),u=e(12),a=r.Object,c=o("".split);t.exports=i((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"==u(t)?c(t,""):a(t)}:a},function(t,n,e){var r=e(0),o=e(9),i=e(4),u=e(22),a=e(42),c=e(45),f=e(6),s=r.TypeError,d=f("toPrimitive");t.exports=function(t,n){if(!i(t)||u(t))return t;var e,r=a(t,d);if(r){if(void 0===n&&(n="default"),e=o(r,t,n),!i(e)||u(e))return e;throw s("Can't convert object to primitive value")}return void 0===n&&(n="number"),c(t,n)}},function(t,n,e){var r=e(2);t.exports=r({}.isPrototypeOf)},function(t,n,e){var r=e(8);t.exports=r("navigator","userAgent")||""},function(t,n,e){var r=e(43);t.exports=function(t,n){var e=t[n];return null==e?void 0:r(e)}},function(t,n,e){var r=e(0),o=e(1),i=e(44),u=r.TypeError;t.exports=function(t){if(o(t))return t;throw u(i(t)+" is not a function")}},function(t,n,e){var r=e(0).String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},function(t,n,e){var r=e(0),o=e(9),i=e(1),u=e(4),a=r.TypeError;t.exports=function(t,n){var e,r;if("string"===n&&i(e=t.toString)&&!u(r=o(e,t)))return r;if(i(e=t.valueOf)&&!u(r=o(e,t)))return r;if("string"!==n&&i(e=t.toString)&&!u(r=o(e,t)))return r;throw a("Can't convert object to primitive value")}},function(t,n){t.exports=!1},function(t,n,e){var r=e(0),o=e(4),i=r.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},function(t,n,e){var r=e(0),o=e(1),i=e(5),u=e(17),a=e(16),c=e(19),f=e(49),s=e(52).CONFIGURABLE,d=f.get,p=f.enforce,l=String(String).split("String");(t.exports=function(t,n,e,c){var f,d=!!c&&!!c.unsafe,w=!!c&&!!c.enumerable,v=!!c&&!!c.noTargetGet,h=c&&void 0!==c.name?c.name:n;o(e)&&("Symbol("===String(h).slice(0,7)&&(h="["+String(h).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(e,"name")||s&&e.name!==h)&&u(e,"name",h),(f=p(e)).source||(f.source=l.join("string"==typeof h?h:""))),t!==r?(d?!v&&t[n]&&(w=!0):delete t[n],w?t[n]=e:u(t,n,e)):w?t[n]=e:a(n,e)})(Function.prototype,"toString",(function(){return o(this)&&d(this).source||c(this)}))},function(t,n,e){var r,o,i,u=e(50),a=e(0),c=e(2),f=e(4),s=e(17),d=e(5),p=e(15),l=e(51),w=e(30),v=a.TypeError,h=a.WeakMap;if(u||p.state){var y=p.state||(p.state=new h),m=c(y.get),g=c(y.has),b=c(y.set);r=function(t,n){if(g(y,t))throw new v("Object already initialized");return n.facade=t,b(y,t,n),n},o=function(t){return m(y,t)||{}},i=function(t){return g(y,t)}}else{var x=l("state");w[x]=!0,r=function(t,n){if(d(t,x))throw new v("Object already initialized");return n.facade=t,s(t,x,n),n},o=function(t){return d(t,x)?t[x]:{}},i=function(t){return d(t,x)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(n){var e;if(!f(n)||(e=o(n)).type!==t)throw v("Incompatible receiver, "+t+" required");return e}}}},function(t,n,e){var r=e(0),o=e(1),i=e(19),u=r.WeakMap;t.exports=o(u)&&/native code/.test(i(u))},function(t,n,e){var r=e(25),o=e(27),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,n,e){var r=e(7),o=e(5),i=Function.prototype,u=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),c=a&&"something"===function(){}.name,f=a&&(!r||r&&u(i,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:f}},function(t,n,e){var r=e(5),o=e(54),i=e(20),u=e(18);t.exports=function(t,n){for(var e=o(n),a=u.f,c=i.f,f=0;ff;)o(r,e=n[f++])&&(~u(s,e)||c(s,e));return s}},function(t,n,e){var r=e(11),o=e(58),i=e(32),u=function(t){return function(n,e,u){var a,c=r(n),f=i(c),s=o(u,f);if(t&&e!=e){for(;f>s;)if((a=c[s++])!=a)return!0}else for(;f>s;s++)if((t||s in c)&&c[s]===e)return t||s||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},function(t,n,e){var r=e(31),o=Math.max,i=Math.min;t.exports=function(t,n){var e=r(t);return e<0?o(e+n,0):i(e,n)}},function(t,n,e){var r=e(31),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,n){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){var r=e(3),o=e(1),i=/#|\.prototype\./,u=function(t,n){var e=c[a(t)];return e==s||e!=f&&(o(n)?r(n):!!n)},a=u.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=u.data={},f=u.NATIVE="N",s=u.POLYFILL="P";t.exports=u},function(t,n,e){"use strict";var r=e(13),o=e(18),i=e(10);t.exports=function(t,n,e){var u=r(n);u in t?o.f(t,u,i(0,e)):t[u]=e}},function(t,n,e){var r=e(65);t.exports=function(t,n){return new(r(t))(0===n?0:n)}},function(t,n,e){var r=e(0),o=e(33),i=e(66),u=e(4),a=e(6)("species"),c=r.Array;t.exports=function(t){var n;return o(t)&&(n=t.constructor,(i(n)&&(n===c||o(n.prototype))||u(n)&&null===(n=n[a]))&&(n=void 0)),void 0===n?c:n}},function(t,n,e){var r=e(2),o=e(3),i=e(1),u=e(67),a=e(8),c=e(19),f=function(){},s=[],d=a("Reflect","construct"),p=/^\s*(?:class|function)\b/,l=r(p.exec),w=!p.exec(f),v=function(t){if(!i(t))return!1;try{return d(f,s,t),!0}catch(t){return!1}};t.exports=!d||o((function(){var t;return v(v.call)||!v(Object)||!v((function(){t=!0}))||t}))?function(t){if(!i(t))return!1;switch(u(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return w||!!l(p,c(t))}:v},function(t,n,e){var r=e(0),o=e(68),i=e(1),u=e(12),a=e(6)("toStringTag"),c=r.Object,f="Arguments"==u(function(){return arguments}());t.exports=o?u:function(t){var n,e,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,n){try{return t[n]}catch(t){}}(n=c(t),a))?e:f?u(n):"Object"==(r=u(n))&&i(n.callee)?"Arguments":r}},function(t,n,e){var r={};r[e(6)("toStringTag")]="z",t.exports="[object z]"===String(r)},function(t,n,e){var r=e(3),o=e(6),i=e(14),u=o("species");t.exports=function(t){return i>=51||!r((function(){var n=[];return(n.constructor={})[u]=function(){return{foo:1}},1!==n[t](Boolean).foo}))}},function(t,n,e){"use strict";function r(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function o(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,n){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:{},e=n.propertyId,r=n.widgetId;a(e)?a(r)?t.mixin({mounted:function(){var e=new t;new c(e,n),t.prototype.$tawkMessenger=e}}):console.error("[Tawk-messenger-vue warn]: You didn't specified 'widgetId' property in the plugin."):console.error("[Tawk-messenger-vue warn]: You didn't specified 'propertyId' property in the plugin.")}},s=f.install;f.install=function(t,n){s.call(f,t,function(t){for(var n=1;n0&&r[0]<4?1:+(r[0]+r[1])),!o&&u&&(!(r=u.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=u.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},function(t,n,e){var r=e(0),o=e(16),i=r["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,n,e){var r=e(0),o=Object.defineProperty;t.exports=function(t,n){try{o(r,t,{value:n,configurable:!0,writable:!0})}catch(e){r[t]=n}return n}},function(t,n,e){var r=e(6),o=e(18),i=e(10);t.exports=r?function(t,n,e){return o.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(0),o=e(6),i=e(29),u=e(49),a=e(30),c=e(13),f=r.TypeError,s=Object.defineProperty,d=Object.getOwnPropertyDescriptor;n.f=o?u?function(t,n,e){if(a(t),n=c(n),a(e),"function"==typeof t&&"prototype"===n&&"value"in e&&"writable"in e&&!e.writable){var r=d(t,n);r&&r.writable&&(t[n]=e.value,e={configurable:"configurable"in e?e.configurable:r.configurable,enumerable:"enumerable"in e?e.enumerable:r.enumerable,writable:!1})}return s(t,n,e)}:s:function(t,n,e){if(a(t),n=c(n),a(e),i)try{return s(t,n,e)}catch(t){}if("get"in e||"set"in e)throw f("Accessors not supported");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(3),o=e(1),i=e(15),u=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return u(t)}),t.exports=i.inspectSource},function(t,n,e){var r=e(6),o=e(9),i=e(38),u=e(10),a=e(11),c=e(13),f=e(5),s=e(29),d=Object.getOwnPropertyDescriptor;n.f=r?d:function(t,n){if(t=a(t),n=c(n),s)try{return d(t,n)}catch(t){}if(f(t,n))return u(!o(i.f,t,n),t[n])}},function(t,n,e){var r=e(2);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},function(t,n,e){var r=e(0).TypeError;t.exports=function(t){if(null==t)throw r("Can't call method on "+t);return t}},function(t,n,e){var r=e(0),o=e(8),i=e(1),u=e(41),a=e(24),c=r.Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var n=o("Symbol");return i(n)&&u(n.prototype,c(t))}},function(t,n,e){var r=e(25);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,n,e){var r=e(14),o=e(2);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(t,n,e){var r=e(47),o=e(15);(t.exports=function(t,n){return o[t]||(o[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.21.1",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE",source:"https://github.com/zloirock/core-js"})},function(t,n,e){var r=e(0),o=e(22),i=r.Object;t.exports=function(t){return i(o(t))}},function(t,n,e){var r=e(3),o=0,i=Math.random(),u=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+u(++o+i,36)}},function(t,n,e){var r=e(6),o=e(2),i=e(48);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(0),o=e(4),i=r.String,u=r.TypeError;t.exports=function(t){if(o(t))return t;throw u(i(t)+" is not an object")}},function(t,n){t.exports={}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){var n=+t;return n!=n||0===n?0:(n>0?r:e)(n)}},function(t,n,e){var r=e(61);t.exports=function(t){return r(t.length)}},function(t,n,e){var r=e(12);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,n,e){"use strict";var r=e(36),o=e(0),i=e(2),u=e(34),a=e(4),c=e(27),f=e(33),s=e(65),d=e(66),p=e(71),l=e(7),w=e(14),v=l("isConcatSpreadable"),h=o.TypeError,y=w>=51||!i((function(){var t=[];return t[v]=!1,t.concat()[0]!==t})),m=p("concat"),g=function(t){if(!a(t))return!1;var n=t[v];return void 0!==n?!!n:u(t)};r({target:"Array",proto:!0,forced:!y||!m},{concat:function(t){var n,e,r,o,i,u=c(this),a=d(u,0),p=0;for(n=-1,r=arguments.length;n9007199254740991)throw h("Maximum allowed index exceeded");for(e=0;e=9007199254740991)throw h("Maximum allowed index exceeded");s(a,p++,i)}return a.length=p,a}})},function(t,n,e){var r=e(0),o=e(20).f,i=e(17),u=e(50),a=e(16),c=e(55),f=e(64);t.exports=function(t,n){var e,s,d,p,l,w=t.target,v=t.global,h=t.stat;if(e=v?r:h?r[w]||a(w,{}):(r[w]||{}).prototype)for(s in n){if(p=n[s],d=t.noTargetGet?(l=o(e,s))&&l.value:e[s],!f(v?s:w+(h?".":"#")+s,t.forced)&&void 0!==d){if(typeof p==typeof d)continue;c(p,d)}(t.sham||d&&d.sham)&&i(p,"sham",!0),u(e,s,p,t)}}},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n,e){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);n.f=i?function(t){var n=o(this,t);return!!n&&n.enumerable}:r},function(t,n,e){var r=e(0),o=e(3),i=e(2),u=e(12),a=r.Object,c=o("".split);t.exports=i((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"==u(t)?c(t,""):a(t)}:a},function(t,n,e){var r=e(0),o=e(9),i=e(4),u=e(23),a=e(43),c=e(46),f=e(7),s=r.TypeError,d=f("toPrimitive");t.exports=function(t,n){if(!i(t)||u(t))return t;var e,r=a(t,d);if(r){if(void 0===n&&(n="default"),e=o(r,t,n),!i(e)||u(e))return e;throw s("Can't convert object to primitive value")}return void 0===n&&(n="number"),c(t,n)}},function(t,n,e){var r=e(3);t.exports=r({}.isPrototypeOf)},function(t,n,e){var r=e(8);t.exports=r("navigator","userAgent")||""},function(t,n,e){var r=e(44);t.exports=function(t,n){var e=t[n];return null==e?void 0:r(e)}},function(t,n,e){var r=e(0),o=e(1),i=e(45),u=r.TypeError;t.exports=function(t){if(o(t))return t;throw u(i(t)+" is not a function")}},function(t,n,e){var r=e(0).String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},function(t,n,e){var r=e(0),o=e(9),i=e(1),u=e(4),a=r.TypeError;t.exports=function(t,n){var e,r;if("string"===n&&i(e=t.toString)&&!u(r=o(e,t)))return r;if(i(e=t.valueOf)&&!u(r=o(e,t)))return r;if("string"!==n&&i(e=t.toString)&&!u(r=o(e,t)))return r;throw a("Can't convert object to primitive value")}},function(t,n){t.exports=!1},function(t,n,e){var r=e(0),o=e(4),i=r.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},function(t,n,e){var r=e(6),o=e(2);t.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(t,n,e){var r=e(0),o=e(1),i=e(5),u=e(17),a=e(16),c=e(19),f=e(51),s=e(54).CONFIGURABLE,d=f.get,p=f.enforce,l=String(String).split("String");(t.exports=function(t,n,e,c){var f,d=!!c&&!!c.unsafe,w=!!c&&!!c.enumerable,v=!!c&&!!c.noTargetGet,h=c&&void 0!==c.name?c.name:n;o(e)&&("Symbol("===String(h).slice(0,7)&&(h="["+String(h).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(e,"name")||s&&e.name!==h)&&u(e,"name",h),(f=p(e)).source||(f.source=l.join("string"==typeof h?h:""))),t!==r?(d?!v&&t[n]&&(w=!0):delete t[n],w?t[n]=e:u(t,n,e)):w?t[n]=e:a(n,e)})(Function.prototype,"toString",(function(){return o(this)&&d(this).source||c(this)}))},function(t,n,e){var r,o,i,u=e(52),a=e(0),c=e(3),f=e(4),s=e(17),d=e(5),p=e(15),l=e(53),w=e(31),v=a.TypeError,h=a.WeakMap;if(u||p.state){var y=p.state||(p.state=new h),m=c(y.get),g=c(y.has),b=c(y.set);r=function(t,n){if(g(y,t))throw new v("Object already initialized");return n.facade=t,b(y,t,n),n},o=function(t){return m(y,t)||{}},i=function(t){return g(y,t)}}else{var x=l("state");w[x]=!0,r=function(t,n){if(d(t,x))throw new v("Object already initialized");return n.facade=t,s(t,x,n),n},o=function(t){return d(t,x)?t[x]:{}},i=function(t){return d(t,x)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(n){var e;if(!f(n)||(e=o(n)).type!==t)throw v("Incompatible receiver, "+t+" required");return e}}}},function(t,n,e){var r=e(0),o=e(1),i=e(19),u=r.WeakMap;t.exports=o(u)&&/native code/.test(i(u))},function(t,n,e){var r=e(26),o=e(28),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,n,e){var r=e(6),o=e(5),i=Function.prototype,u=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),c=a&&"something"===function(){}.name,f=a&&(!r||r&&u(i,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:f}},function(t,n,e){var r=e(5),o=e(56),i=e(20),u=e(18);t.exports=function(t,n,e){for(var a=o(n),c=u.f,f=i.f,s=0;sf;)o(r,e=n[f++])&&(~u(s,e)||c(s,e));return s}},function(t,n,e){var r=e(11),o=e(60),i=e(33),u=function(t){return function(n,e,u){var a,c=r(n),f=i(c),s=o(u,f);if(t&&e!=e){for(;f>s;)if((a=c[s++])!=a)return!0}else for(;f>s;s++)if((t||s in c)&&c[s]===e)return t||s||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},function(t,n,e){var r=e(32),o=Math.max,i=Math.min;t.exports=function(t,n){var e=r(t);return e<0?o(e+n,0):i(e,n)}},function(t,n,e){var r=e(32),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,n){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){var r=e(2),o=e(1),i=/#|\.prototype\./,u=function(t,n){var e=c[a(t)];return e==s||e!=f&&(o(n)?r(n):!!n)},a=u.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=u.data={},f=u.NATIVE="N",s=u.POLYFILL="P";t.exports=u},function(t,n,e){"use strict";var r=e(13),o=e(18),i=e(10);t.exports=function(t,n,e){var u=r(n);u in t?o.f(t,u,i(0,e)):t[u]=e}},function(t,n,e){var r=e(67);t.exports=function(t,n){return new(r(t))(0===n?0:n)}},function(t,n,e){var r=e(0),o=e(34),i=e(68),u=e(4),a=e(7)("species"),c=r.Array;t.exports=function(t){var n;return o(t)&&(n=t.constructor,(i(n)&&(n===c||o(n.prototype))||u(n)&&null===(n=n[a]))&&(n=void 0)),void 0===n?c:n}},function(t,n,e){var r=e(3),o=e(2),i=e(1),u=e(69),a=e(8),c=e(19),f=function(){},s=[],d=a("Reflect","construct"),p=/^\s*(?:class|function)\b/,l=r(p.exec),w=!p.exec(f),v=function(t){if(!i(t))return!1;try{return d(f,s,t),!0}catch(t){return!1}},h=function(t){if(!i(t))return!1;switch(u(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return w||!!l(p,c(t))}catch(t){return!0}};h.sham=!0,t.exports=!d||o((function(){var t;return v(v.call)||!v(Object)||!v((function(){t=!0}))||t}))?h:v},function(t,n,e){var r=e(0),o=e(70),i=e(1),u=e(12),a=e(7)("toStringTag"),c=r.Object,f="Arguments"==u(function(){return arguments}());t.exports=o?u:function(t){var n,e,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,n){try{return t[n]}catch(t){}}(n=c(t),a))?e:f?u(n):"Object"==(r=u(n))&&i(n.callee)?"Arguments":r}},function(t,n,e){var r={};r[e(7)("toStringTag")]="z",t.exports="[object z]"===String(r)},function(t,n,e){var r=e(2),o=e(7),i=e(14),u=o("species");t.exports=function(t){return i>=51||!r((function(){var n=[];return(n.constructor={})[u]=function(){return{foo:1}},1!==n[t](Boolean).foo}))}},function(t,n,e){"use strict";function r(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function o(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,n){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:{},e=n.propertyId,r=n.widgetId;a(e)?a(r)?t.mixin({mounted:function(){var e=new t;new c(e,n),t.prototype.$tawkMessenger=e}}):console.error("[Tawk-messenger-vue warn]: You didn't specified 'widgetId' property in the plugin."):console.error("[Tawk-messenger-vue warn]: You didn't specified 'propertyId' property in the plugin.")}},s=f.install;f.install=function(t,n){s.call(f,t,function(t){for(var n=1;n Date: Mon, 15 May 2023 05:55:22 +0800 Subject: [PATCH 5/5] Bump the version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 449abd6..a23e830 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tawk.to/tawk-messenger-vue-2", - "version": "1.0.3", + "version": "1.0.4", "description": "Official Vue 2 plugin for Tawk messenger", "keywords": [ "vuejs",