@moveo-ai/web-client 0.30.3-true.2 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.html
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
outline:0;
|
|
8
8
|
}</style><script>if (window.parent !== window) {
|
|
9
9
|
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
10
|
-
}</script><title>Widget</title></head><body><script src="iframe.min.js?
|
|
10
|
+
}</script><title>Widget</title></head><body><script src="iframe.min.js?dc081f5d2ad28e444dec"></script><script>const queryString = window.location.search;
|
|
11
11
|
const urlParams = new URLSearchParams(queryString);
|
|
12
12
|
const widgetId = urlParams.get('widgetId');
|
|
13
13
|
|
package/dist/web-client.min.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see web-client.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.MoveoAI=t():e.MoveoAI=t()}(self,(function(){return function(){var e={2817:function(e,t,n){"use strict";var o=n(1864),i=n.n(o),r=n(352),s=n.n(r)()(i());s.push([e.id,".web-client-container{position:fixed;bottom:0;right:0;cursor:pointer;z-index:10000;max-height:99vh}.web-client-container.embed{position:static;width:100% !important;height:100% !important}.web-client-container.full{width:100% !important;height:100% !important;bottom:0 !important;right:0 !important;left:0 !important;top:0 !important;max-height:initial}","",{version:3,sources:["webpack://./src/styles/web-client.scss"],names:[],mappings:"AAIA,sBAIE,cAAA,CACA,QAAA,CACA,OAAA,CACA,cAAA,CACA,aAPiB,CAQjB,eAPoB,CASpB,4BACE,eAAA,CACA,qBAAA,CACA,sBAAA,CAIF,2BACE,qBAAA,CACA,sBAAA,CACA,mBAAA,CACA,kBAAA,CACA,iBAAA,CACA,gBAAA,CACA,kBAAA",sourcesContent:["// This style is applied to the iframe that customers load.\n// Ideally we use style variables rather than this so that\n// we can use the widget-id.\n\n.web-client-container {\n $widget-z-index: 10000;\n $widget-max-height: 99vh;\n\n position: fixed;\n bottom: 0;\n right: 0;\n cursor: pointer;\n z-index: $widget-z-index;\n max-height: $widget-max-height;\n\n &.embed {\n position: static;\n width: 100% !important;\n height: 100% !important;\n }\n\n // ! Important because this happens on the clients website\n &.full {\n width: 100% !important;\n height: 100% !important;\n bottom: 0 !important;\n right: 0 !important;\n left: 0 !important;\n top: 0 !important;\n max-height: initial;\n }\n}\n"],sourceRoot:""}]),t.Z=s},352:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,i,r){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(s[c]=!0)}for(var u=0;u<e.length;u++){var d=[].concat(e[u]);o&&s[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},1864:function(e){"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),r="/*# ".concat(i," */"),s=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[t].concat(s).concat([r]).join("\n")}return[t].join("\n")}},8193:function(e,t,n){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let o=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(o++,"%c"===e&&(i=o))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(4006)(t);const{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},4006:function(e,t,n){e.exports=function(e){function t(e){let n,i,r,s=null;function a(...e){if(!a.enabled)return;const o=a,i=Number(new Date),r=i-(n||i);o.diff=r,o.prev=n,o.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";s++;const r=t.formatters[i];if("function"==typeof r){const t=e[s];n=r.call(o,t),e.splice(s,1),s--}return n})),t.formatArgs.call(o,e),(o.log||t.log).apply(o,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=o,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==t.namespaces&&(i=t.namespaces,r=t.enabled(e)),r),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function o(e,n){const o=t(this.namespace+(void 0===n?":":n)+e);return o.log=this.log,o}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const o=("string"==typeof e?e:"").split(/[\s,]+/),i=o.length;for(n=0;n<i;n++)o[n]&&("-"===(e=o[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,o;for(n=0,o=t.skips.length;n<o;n++)if(t.skips[n].test(e))return!1;for(n=0,o=t.names.length;n<o;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(4264),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},8492:function(e,t,n){var o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),l=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return d.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=r.test(e);return n||s.test(e)?a(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var o,i,r,s,a,c,u=0,d=!1,l=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=o,r=i;return o=i=void 0,u=t,s=e.apply(r,n)}function C(e){return u=e,a=setTimeout(b,t),d?y(e):s}function w(e){var n=e-c;return void 0===c||n>=t||n<0||l&&e-u>=r}function b(){var e=m();if(w(e))return A(e);a=setTimeout(b,function(e){var n=t-(e-c);return l?p(n,r-(e-u)):n}(e))}function A(e){return a=void 0,v&&o?y(e):(o=i=void 0,s)}function F(){var e=m(),n=w(e);if(o=arguments,i=this,c=e,n){if(void 0===a)return C(c);if(l)return a=setTimeout(b,t),y(c)}return void 0===a&&(a=setTimeout(b,t)),s}return t=g(t)||0,h(n)&&(d=!!n.leading,r=(l="maxWait"in n)?f(g(n.maxWait)||0,t):r,v="trailing"in n?!!n.trailing:v),F.cancel=function(){void 0!==a&&clearTimeout(a),u=0,o=c=i=a=void 0},F.flush=function(){return void 0===a?s:A(m())},F}},7362:function(e,t,n){var o="Expected a function",i=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,c=parseInt,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,l=u||d||Function("return this")(),f=Object.prototype.toString,p=Math.max,m=Math.min,h=function(){return l.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=s.test(e);return n||a.test(e)?c(e.slice(2),n?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new TypeError(o);return g(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),function(e,t,n){var i,r,s,a,c,u,d=0,l=!1,f=!1,y=!0;if("function"!=typeof e)throw new TypeError(o);function C(t){var n=i,o=r;return i=r=void 0,d=t,a=e.apply(o,n)}function w(e){return d=e,c=setTimeout(A,t),l?C(e):a}function b(e){var n=e-u;return void 0===u||n>=t||n<0||f&&e-d>=s}function A(){var e=h();if(b(e))return F(e);c=setTimeout(A,function(e){var n=t-(e-u);return f?m(n,s-(e-d)):n}(e))}function F(e){return c=void 0,y&&i?C(e):(i=r=void 0,a)}function x(){var e=h(),n=b(e);if(i=arguments,r=this,u=e,n){if(void 0===c)return w(u);if(f)return c=setTimeout(A,t),C(u)}return void 0===c&&(c=setTimeout(A,t)),a}return t=v(t)||0,g(n)&&(l=!!n.leading,s=(f="maxWait"in n)?p(v(n.maxWait)||0,t):s,y="trailing"in n?!!n.trailing:y),x.cancel=function(){void 0!==c&&clearTimeout(c),d=0,i=u=r=c=void 0},x.flush=function(){return void 0===c?a:F(h())},x}(e,t,{leading:i,maxWait:t,trailing:r})}},4264:function(e){var t=1e3,n=60*t,o=60*n,i=24*o;function r(e,t,n,o){var i=t>=1.5*n;return Math.round(e/n)+" "+o+(i?"s":"")}e.exports=function(e,s){s=s||{};var a,c,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(r){var s=parseFloat(r[1]);switch((r[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===u&&isFinite(e))return s.long?(a=e,(c=Math.abs(a))>=i?r(a,c,i,"day"):c>=o?r(a,c,o,"hour"):c>=n?r(a,c,n,"minute"):c>=t?r(a,c,t,"second"):a+" ms"):function(e){var r=Math.abs(e);return r>=i?Math.round(e/i)+"d":r>=o?Math.round(e/o)+"h":r>=n?Math.round(e/n)+"m":r>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},5701:function(e){"use strict";var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var r={},s=[],a=0;a<e.length;a++){var c=e[a],u=o.base?c[0]+o.base:c[0],d=r[u]||0,l="".concat(u," ").concat(d);r[u]=d+1;var f=n(l),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==f)t[f].references++,t[f].updater(p);else{var m=i(p,o);o.byIndex=a,t.splice(a,0,{identifier:l,updater:m,references:1})}s.push(l)}return s}function i(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var r=o(e=e||[],i=i||{});return function(e){e=e||[];for(var s=0;s<r.length;s++){var a=n(r[s]);t[a].references--}for(var c=o(e,i),u=0;u<r.length;u++){var d=n(r[u]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}r=c}}},6080:function(e){"use strict";var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},7182:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},6850:function(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},8236:function(e){"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,i&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},9213:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},3512:function(e,t){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,i,r=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var o,i=0,r=t.length;i<r;i++)!o&&i in t||(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){if("object"==typeof e&&null!==e){if("function"==typeof Object.getPrototypeOf){var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}return"[object Object]"===Object.prototype.toString.call(e)}return!1},s=["__proto__","constructor","prototype"],a=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce((function(e,t){if(Array.isArray(t))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(t).forEach((function(n){s.includes(n)||(Array.isArray(e[n])&&Array.isArray(t[n])?e[n]=a.options.mergeArrays?Array.from(new Set(e[n].concat(t[n]))):t[n]:r(e[n])&&r(t[n])?e[n]=a(e[n],t[n]):e[n]=t[n])})),e}),{})},c={mergeArrays:!0};a.options=c,a.withOptions=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];a.options=n({mergeArrays:!0},e);var s=a.apply(void 0,i([],o(t),!1));return a.options=c,s},t.default=a}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={id:o,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var o={};return function(){"use strict";n.r(o),n.d(o,{init:function(){return z}});var e=n(8193),t=n.n(e),i=n(3512),r=n.n(i);const s="https://channels-ws.moveo.ai",a="https://web-client.dev.moveo.ai",c=()=>window.innerWidth<650||window.innerHeight<550&&window.innerWidth<1e3,u=(e,t)=>{var n,o;const i=null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.type;return"string"==typeof i&&i.startsWith(e)?{type:i.replace(e,""),data:null===(o=t.data)||void 0===o?void 0:o.data}:null};var d,l,f,p,m,h=n(8492),g=n.n(h),v=n(7362),y=n.n(v);!function(e){e.Open="open",e.Resolved="closed",e.Expired="expired",e.Spam="spam",e.Trash="trash"}(d||(d={})),function(e){e.IframeLoaded="moveo-iframe-loaded",e.IframeError="moveo-iframe-error",e.WidgetLoaded="moveo-widget-loaded",e.WidgetError="moveo-widget-error",e.Opened="moveo-widget-opened",e.Closed="moveo-widget-closed",e.Resize="moveo-widget-resize",e.LocaleChanged="moveo-widget-locale-changed",e.SessionCreated="moveo-widget-session-created"}(l||(l={})),function(e){e.SetConfig="moveo-set-config",e.SetLocale="moveo-set-locale",e.SetCssVariables="moveo-set-css-variables",e.Open="moveo-open",e.Close="moveo-close",e.SendMessage="moveo-send-message",e.UpdateContext="moveo-update-context",e.WindowResize="moveo-resize",e.SessionActivity="session-activity"}(f||(f={})),function(e){e.Expired="expired",e.Survey="survey",e.SurveyFull="survey-full",e.Closing="closing",e.Resolved="closed",e.Inactivity="inactivity"}(p||(p={})),function(e){e.MinimizeButton="minimize-btn",e.CloseButton="close-btn",e.EndSessionButton="end-btn",e.LauncherButton="launcher-btn",e.MessageInput="message-input",e.DisclaimerCheck="disclaimer-check",e.DisclaimerContainer="disclaimer-container",e.HeaderContainer="header-container"}(m||(m={}));class C{constructor(e){this.detectMobile=()=>{this.sendEventToIframe({type:f.WindowResize,data:{is_mobile:c(),width:window.innerWidth,height:window.innerHeight}}),this.isMobile=c()},this.trackActivity=()=>{const e=()=>{this.sendEventToIframe({type:f.SessionActivity,data:"active"})};window.onload=g()(e,2e3),window.onmousemove=y()(e,1e3),window.onmousedown=y()(e,1e3),window.ontouchstart=y()(e,1e3),window.ontouchmove=y()(e,1e3),window.onclick=y()(e,1e3),window.onkeydown=y()(e,1e3),window.addEventListener("scroll",y()(e,1e3),!0)},this.config=e,this.id=e.widgetId,this.initialized=!1,this.log=t()(`moveo:web-client:${this.id}`),this.iframe=this.createIframe(),this.isMobile=null}createIframe(){const e=document.createElement("iframe");return e.width="1px",e.height="1px",e.id=this.id,e.name=this.id,e.allow="geolocation",e.style.border="0",e.classList.add("web-client-container"),"embed"===this.config.widget_position&&e.classList.add("embed"),e.setAttribute("src",(e=>{let t="";const n=document.querySelectorAll("script"),o=/@moveo-ai\/web-client.*next/;n&&n.forEach((e=>{e.src.match(o)&&(t=a)}));const{origin:i}=window.location;return!t&&i.match(/localhost:|vercel.app/)?t=i:!t&&i.match(/web-client.dev/)?t=a:t||(t="https://web-client.moveo.ai"),`${t}?widgetId=${e}`})(this.id)),e}handleEvents(e,t){return n=>{const o=u(this.id,n);if(o)switch(o.type){case l.IframeLoaded:this.sendEventToIframe({type:f.SetConfig,data:this.config});break;case l.IframeError:return t(o.data);case l.WidgetLoaded:setTimeout((()=>{this.detectMobile(),e(this)}),0);break;case l.WidgetError:this.notify(o);break;case l.Opened:(o.data.isFull||o.data.is_mobile)&&this.iframe.classList.add("full");break;case l.Closed:o.data.isFull&&this.iframe.classList.remove("full");break;case l.Resize:this.iframe.style.width=o.data.width,this.iframe.style.height=o.data.height;break;default:this.log(`Unhandle event: ${o.type}`)}}}init(){return new Promise(((e,t)=>{var n,o;if(this.initialized)throw new Error(`Widget ${this.id} was already initialized`);if(window.addEventListener("message",this.handleEvents(e,t)),window.addEventListener("resize",g()(this.detectMobile,100)),this.trackActivity(),"embed"===this.config.widget_position){let e=(null===(n=this.config)||void 0===n?void 0:n.element)||null;if("string"==typeof e&&(e=document.getElementById(e),!e))throw new Error(`Element with id: ${e} not found`);null==e||e.appendChild(this.iframe)}else null===(o=window.document.querySelector("body"))||void 0===o||o.appendChild(this.iframe);this.initialized=!0,this.detectMobile()}))}sendEventToIframe(e){var t;this.iframe&&this.iframe.contentWindow?(this.log(`Event to iframe: ${e.type}`,e),e.type===f.SetConfig&&(null===(t=e.data)||void 0===t?void 0:t.element)&&delete e.data.element,this.iframe.contentWindow.postMessage(Object.assign(Object.assign({},e),{type:`${this.id}${e.type}`}),"*")):this.log("Error: Cannot find iframe to send event")}notify(e){this.log(`notify ${e.type}:`,e)}openWindow(){this.sendEventToIframe({type:f.Open})}closeWindow(){this.sendEventToIframe({type:f.Close})}sendMessage(e){this.sendEventToIframe({type:f.SendMessage,data:e})}updateContext(e){this.sendEventToIframe({type:f.UpdateContext,data:e})}setCSSVariables(e){this.sendEventToIframe({type:f.SetCssVariables,data:e})}setLocale(e){this.sendEventToIframe({type:f.SetLocale,data:e})}onSessionCreated(e){window.addEventListener("message",(t=>{const n=u(this.id,t);n&&(this.log(`Event from iframe: ${n.type}`,n),n.type===l.SessionCreated&&e())}))}}var w=n(5701),b=n.n(w),A=n(8236),F=n.n(A),x=n(6080),E=n.n(x),j=n(6850),I=n.n(j),S=n(7182),O=n.n(S),T=n(9213),M=n.n(T),$=n(2817),k={};k.styleTagTransform=M(),k.setAttributes=I(),k.insert=E().bind(null,"head"),k.domAPI=F(),k.insertStyleElement=O(),b()($.Z,k),$.Z&&$.Z.locals&&$.Z.locals;let L=t()("moveo:web-client");const _=async e=>{const t=`moveo-${((e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),""))(5)}`,n=window.location.href;if(L=L.extend(`:${t}`),!(null==e?void 0:e.integrationId))throw new Error("integrationId is required.\n Call MoveoAI.init({ integrationId: YOUR_INTEGRATION_HERE })");const o=await(async(e,t)=>{const n=t||s,o=await fetch(`${n}/v1/web/${e}`),i=await o.text();if(o.ok)return JSON.parse(i);throw new Error(`Error loading config from: ${n}/${e}`)})(e.integrationId,e.host);return L("Loaded integration configuration:",o),Object.assign(Object.assign({},r()(Object.assign({},o),e)),{clientUrl:n,widgetId:t})},z=async e=>{await new Promise((e=>{if("complete"===document.readyState)return e();window.addEventListener("load",(()=>e()))}));const t=await _(e);if(L("Configuration:",t),"embed"===t.widget_position&&!t.element)throw new Error("element is not defined but required by embed widget");const n=new C(t);L("Initializing");const o=await n.init();return L("Initialized"),o}}(),o}()}));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.MoveoAI=t():e.MoveoAI=t()}(self,(function(){return function(){var e={2817:function(e,t,n){"use strict";var o=n(1864),i=n.n(o),r=n(352),s=n.n(r)()(i());s.push([e.id,".web-client-container{position:fixed;bottom:0;right:0;cursor:pointer;z-index:10022;max-height:99vh}.web-client-container.embed{position:static;width:100% !important;height:100% !important}.web-client-container.full{width:100% !important;height:100% !important;bottom:0 !important;right:0 !important;left:0 !important;top:0 !important;max-height:initial}","",{version:3,sources:["webpack://./src/styles/web-client.scss"],names:[],mappings:"AAIA,sBAIE,cAAA,CACA,QAAA,CACA,OAAA,CACA,cAAA,CACA,aAPiB,CAQjB,eAPoB,CASpB,4BACE,eAAA,CACA,qBAAA,CACA,sBAAA,CAIF,2BACE,qBAAA,CACA,sBAAA,CACA,mBAAA,CACA,kBAAA,CACA,iBAAA,CACA,gBAAA,CACA,kBAAA",sourcesContent:["// This style is applied to the iframe that customers load.\n// Ideally we use style variables rather than this so that\n// we can use the widget-id.\n\n.web-client-container {\n $widget-z-index: 10022;\n $widget-max-height: 99vh;\n\n position: fixed;\n bottom: 0;\n right: 0;\n cursor: pointer;\n z-index: $widget-z-index;\n max-height: $widget-max-height;\n\n &.embed {\n position: static;\n width: 100% !important;\n height: 100% !important;\n }\n\n // ! Important because this happens on the clients website\n &.full {\n width: 100% !important;\n height: 100% !important;\n bottom: 0 !important;\n right: 0 !important;\n left: 0 !important;\n top: 0 !important;\n max-height: initial;\n }\n}\n"],sourceRoot:""}]),t.Z=s},352:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,i,r){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(s[c]=!0)}for(var u=0;u<e.length;u++){var d=[].concat(e[u]);o&&s[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},1864:function(e){"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),r="/*# ".concat(i," */"),s=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[t].concat(s).concat([r]).join("\n")}return[t].join("\n")}},8193:function(e,t,n){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let o=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(o++,"%c"===e&&(i=o))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(4006)(t);const{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},4006:function(e,t,n){e.exports=function(e){function t(e){let n,i,r,s=null;function a(...e){if(!a.enabled)return;const o=a,i=Number(new Date),r=i-(n||i);o.diff=r,o.prev=n,o.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";s++;const r=t.formatters[i];if("function"==typeof r){const t=e[s];n=r.call(o,t),e.splice(s,1),s--}return n})),t.formatArgs.call(o,e),(o.log||t.log).apply(o,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=o,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==t.namespaces&&(i=t.namespaces,r=t.enabled(e)),r),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function o(e,n){const o=t(this.namespace+(void 0===n?":":n)+e);return o.log=this.log,o}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const o=("string"==typeof e?e:"").split(/[\s,]+/),i=o.length;for(n=0;n<i;n++)o[n]&&("-"===(e=o[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,o;for(n=0,o=t.skips.length;n<o;n++)if(t.skips[n].test(e))return!1;for(n=0,o=t.names.length;n<o;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(4264),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},8492:function(e,t,n){var o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),l=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return d.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=r.test(e);return n||s.test(e)?a(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var o,i,r,s,a,c,u=0,d=!1,l=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=o,r=i;return o=i=void 0,u=t,s=e.apply(r,n)}function C(e){return u=e,a=setTimeout(b,t),d?y(e):s}function w(e){var n=e-c;return void 0===c||n>=t||n<0||l&&e-u>=r}function b(){var e=m();if(w(e))return A(e);a=setTimeout(b,function(e){var n=t-(e-c);return l?p(n,r-(e-u)):n}(e))}function A(e){return a=void 0,v&&o?y(e):(o=i=void 0,s)}function F(){var e=m(),n=w(e);if(o=arguments,i=this,c=e,n){if(void 0===a)return C(c);if(l)return a=setTimeout(b,t),y(c)}return void 0===a&&(a=setTimeout(b,t)),s}return t=g(t)||0,h(n)&&(d=!!n.leading,r=(l="maxWait"in n)?f(g(n.maxWait)||0,t):r,v="trailing"in n?!!n.trailing:v),F.cancel=function(){void 0!==a&&clearTimeout(a),u=0,o=c=i=a=void 0},F.flush=function(){return void 0===a?s:A(m())},F}},7362:function(e,t,n){var o="Expected a function",i=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,c=parseInt,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,l=u||d||Function("return this")(),f=Object.prototype.toString,p=Math.max,m=Math.min,h=function(){return l.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=s.test(e);return n||a.test(e)?c(e.slice(2),n?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new TypeError(o);return g(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),function(e,t,n){var i,r,s,a,c,u,d=0,l=!1,f=!1,y=!0;if("function"!=typeof e)throw new TypeError(o);function C(t){var n=i,o=r;return i=r=void 0,d=t,a=e.apply(o,n)}function w(e){return d=e,c=setTimeout(A,t),l?C(e):a}function b(e){var n=e-u;return void 0===u||n>=t||n<0||f&&e-d>=s}function A(){var e=h();if(b(e))return F(e);c=setTimeout(A,function(e){var n=t-(e-u);return f?m(n,s-(e-d)):n}(e))}function F(e){return c=void 0,y&&i?C(e):(i=r=void 0,a)}function x(){var e=h(),n=b(e);if(i=arguments,r=this,u=e,n){if(void 0===c)return w(u);if(f)return c=setTimeout(A,t),C(u)}return void 0===c&&(c=setTimeout(A,t)),a}return t=v(t)||0,g(n)&&(l=!!n.leading,s=(f="maxWait"in n)?p(v(n.maxWait)||0,t):s,y="trailing"in n?!!n.trailing:y),x.cancel=function(){void 0!==c&&clearTimeout(c),d=0,i=u=r=c=void 0},x.flush=function(){return void 0===c?a:F(h())},x}(e,t,{leading:i,maxWait:t,trailing:r})}},4264:function(e){var t=1e3,n=60*t,o=60*n,i=24*o;function r(e,t,n,o){var i=t>=1.5*n;return Math.round(e/n)+" "+o+(i?"s":"")}e.exports=function(e,s){s=s||{};var a,c,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(r){var s=parseFloat(r[1]);switch((r[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===u&&isFinite(e))return s.long?(a=e,(c=Math.abs(a))>=i?r(a,c,i,"day"):c>=o?r(a,c,o,"hour"):c>=n?r(a,c,n,"minute"):c>=t?r(a,c,t,"second"):a+" ms"):function(e){var r=Math.abs(e);return r>=i?Math.round(e/i)+"d":r>=o?Math.round(e/o)+"h":r>=n?Math.round(e/n)+"m":r>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},5701:function(e){"use strict";var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var r={},s=[],a=0;a<e.length;a++){var c=e[a],u=o.base?c[0]+o.base:c[0],d=r[u]||0,l="".concat(u," ").concat(d);r[u]=d+1;var f=n(l),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==f)t[f].references++,t[f].updater(p);else{var m=i(p,o);o.byIndex=a,t.splice(a,0,{identifier:l,updater:m,references:1})}s.push(l)}return s}function i(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var r=o(e=e||[],i=i||{});return function(e){e=e||[];for(var s=0;s<r.length;s++){var a=n(r[s]);t[a].references--}for(var c=o(e,i),u=0;u<r.length;u++){var d=n(r[u]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}r=c}}},6080:function(e){"use strict";var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},7182:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},6850:function(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},8236:function(e){"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,i&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},9213:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},3512:function(e,t){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,i,r=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var o,i=0,r=t.length;i<r;i++)!o&&i in t||(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){if("object"==typeof e&&null!==e){if("function"==typeof Object.getPrototypeOf){var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}return"[object Object]"===Object.prototype.toString.call(e)}return!1},s=["__proto__","constructor","prototype"],a=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce((function(e,t){if(Array.isArray(t))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(t).forEach((function(n){s.includes(n)||(Array.isArray(e[n])&&Array.isArray(t[n])?e[n]=a.options.mergeArrays?Array.from(new Set(e[n].concat(t[n]))):t[n]:r(e[n])&&r(t[n])?e[n]=a(e[n],t[n]):e[n]=t[n])})),e}),{})},c={mergeArrays:!0};a.options=c,a.withOptions=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];a.options=n({mergeArrays:!0},e);var s=a.apply(void 0,i([],o(t),!1));return a.options=c,s},t.default=a}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={id:o,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var o={};return function(){"use strict";n.r(o),n.d(o,{init:function(){return z}});var e=n(8193),t=n.n(e),i=n(3512),r=n.n(i);const s="https://channels-ws.moveo.ai",a="https://web-client.dev.moveo.ai",c=()=>window.innerWidth<650||window.innerHeight<550&&window.innerWidth<1e3,u=(e,t)=>{var n,o;const i=null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.type;return"string"==typeof i&&i.startsWith(e)?{type:i.replace(e,""),data:null===(o=t.data)||void 0===o?void 0:o.data}:null};var d,l,f,p,m,h=n(8492),g=n.n(h),v=n(7362),y=n.n(v);!function(e){e.Open="open",e.Resolved="closed",e.Expired="expired",e.Spam="spam",e.Trash="trash"}(d||(d={})),function(e){e.IframeLoaded="moveo-iframe-loaded",e.IframeError="moveo-iframe-error",e.WidgetLoaded="moveo-widget-loaded",e.WidgetError="moveo-widget-error",e.Opened="moveo-widget-opened",e.Closed="moveo-widget-closed",e.Resize="moveo-widget-resize",e.LocaleChanged="moveo-widget-locale-changed",e.SessionCreated="moveo-widget-session-created"}(l||(l={})),function(e){e.SetConfig="moveo-set-config",e.SetLocale="moveo-set-locale",e.SetCssVariables="moveo-set-css-variables",e.Open="moveo-open",e.Close="moveo-close",e.SendMessage="moveo-send-message",e.UpdateContext="moveo-update-context",e.WindowResize="moveo-resize",e.SessionActivity="session-activity"}(f||(f={})),function(e){e.Expired="expired",e.Survey="survey",e.SurveyFull="survey-full",e.Closing="closing",e.Resolved="closed",e.Inactivity="inactivity"}(p||(p={})),function(e){e.MinimizeButton="minimize-btn",e.CloseButton="close-btn",e.EndSessionButton="end-btn",e.LauncherButton="launcher-btn",e.MessageInput="message-input",e.DisclaimerCheck="disclaimer-check",e.DisclaimerContainer="disclaimer-container",e.HeaderContainer="header-container"}(m||(m={}));class C{constructor(e){this.detectMobile=()=>{this.sendEventToIframe({type:f.WindowResize,data:{is_mobile:c(),width:window.innerWidth,height:window.innerHeight}}),this.isMobile=c()},this.trackActivity=()=>{const e=()=>{this.sendEventToIframe({type:f.SessionActivity,data:"active"})};window.onload=g()(e,2e3),window.onmousemove=y()(e,1e3),window.onmousedown=y()(e,1e3),window.ontouchstart=y()(e,1e3),window.ontouchmove=y()(e,1e3),window.onclick=y()(e,1e3),window.onkeydown=y()(e,1e3),window.addEventListener("scroll",y()(e,1e3),!0)},this.config=e,this.id=e.widgetId,this.initialized=!1,this.log=t()(`moveo:web-client:${this.id}`),this.iframe=this.createIframe(),this.isMobile=null}createIframe(){const e=document.createElement("iframe");return e.width="1px",e.height="1px",e.id=this.id,e.name=this.id,e.allow="geolocation",e.style.border="0",e.classList.add("web-client-container"),"embed"===this.config.widget_position&&e.classList.add("embed"),e.setAttribute("src",(e=>{let t="";const n=document.querySelectorAll("script"),o=/@moveo-ai\/web-client.*next/;n&&n.forEach((e=>{e.src.match(o)&&(t=a)}));const{origin:i}=window.location;return!t&&i.match(/localhost:|vercel.app/)?t=i:!t&&i.match(/web-client.dev/)?t=a:t||(t="https://web-client.moveo.ai"),`${t}?widgetId=${e}`})(this.id)),e}handleEvents(e,t){return n=>{const o=u(this.id,n);if(o)switch(o.type){case l.IframeLoaded:this.sendEventToIframe({type:f.SetConfig,data:this.config});break;case l.IframeError:return t(o.data);case l.WidgetLoaded:setTimeout((()=>{this.detectMobile(),e(this)}),0);break;case l.WidgetError:this.notify(o);break;case l.Opened:(o.data.isFull||o.data.is_mobile)&&this.iframe.classList.add("full");break;case l.Closed:o.data.isFull&&this.iframe.classList.remove("full");break;case l.Resize:this.iframe.style.width=o.data.width,this.iframe.style.height=o.data.height;break;default:this.log(`Unhandle event: ${o.type}`)}}}init(){return new Promise(((e,t)=>{var n,o;if(this.initialized)throw new Error(`Widget ${this.id} was already initialized`);if(window.addEventListener("message",this.handleEvents(e,t)),window.addEventListener("resize",g()(this.detectMobile,100)),this.trackActivity(),"embed"===this.config.widget_position){let e=(null===(n=this.config)||void 0===n?void 0:n.element)||null;if("string"==typeof e&&(e=document.getElementById(e),!e))throw new Error(`Element with id: ${e} not found`);null==e||e.appendChild(this.iframe)}else null===(o=window.document.querySelector("body"))||void 0===o||o.appendChild(this.iframe);this.initialized=!0,this.detectMobile()}))}sendEventToIframe(e){var t;this.iframe&&this.iframe.contentWindow?(this.log(`Event to iframe: ${e.type}`,e),e.type===f.SetConfig&&(null===(t=e.data)||void 0===t?void 0:t.element)&&delete e.data.element,this.iframe.contentWindow.postMessage(Object.assign(Object.assign({},e),{type:`${this.id}${e.type}`}),"*")):this.log("Error: Cannot find iframe to send event")}notify(e){this.log(`notify ${e.type}:`,e)}openWindow(){this.sendEventToIframe({type:f.Open})}closeWindow(){this.sendEventToIframe({type:f.Close})}sendMessage(e){this.sendEventToIframe({type:f.SendMessage,data:e})}updateContext(e){this.sendEventToIframe({type:f.UpdateContext,data:e})}setCSSVariables(e){this.sendEventToIframe({type:f.SetCssVariables,data:e})}setLocale(e){this.sendEventToIframe({type:f.SetLocale,data:e})}onSessionCreated(e){window.addEventListener("message",(t=>{const n=u(this.id,t);n&&(this.log(`Event from iframe: ${n.type}`,n),n.type===l.SessionCreated&&e())}))}}var w=n(5701),b=n.n(w),A=n(8236),F=n.n(A),x=n(6080),E=n.n(x),j=n(6850),I=n.n(j),S=n(7182),O=n.n(S),T=n(9213),M=n.n(T),$=n(2817),k={};k.styleTagTransform=M(),k.setAttributes=I(),k.insert=E().bind(null,"head"),k.domAPI=F(),k.insertStyleElement=O(),b()($.Z,k),$.Z&&$.Z.locals&&$.Z.locals;let L=t()("moveo:web-client");const _=async e=>{const t=`moveo-${((e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),""))(5)}`,n=window.location.href;if(L=L.extend(`:${t}`),!(null==e?void 0:e.integrationId))throw new Error("integrationId is required.\n Call MoveoAI.init({ integrationId: YOUR_INTEGRATION_HERE })");const o=await(async(e,t)=>{const n=t||s,o=await fetch(`${n}/v1/web/${e}`),i=await o.text();if(o.ok)return JSON.parse(i);throw new Error(`Error loading config from: ${n}/${e}`)})(e.integrationId,e.host);return L("Loaded integration configuration:",o),Object.assign(Object.assign({},r()(Object.assign({},o),e)),{clientUrl:n,widgetId:t})},z=async e=>{await new Promise((e=>{if("complete"===document.readyState)return e();window.addEventListener("load",(()=>e()))}));const t=await _(e);if(L("Configuration:",t),"embed"===t.widget_position&&!t.element)throw new Error("element is not defined but required by embed widget");const n=new C(t);L("Initializing");const o=await n.init();return L("Initialized"),o}}(),o}()}));
|
|
3
3
|
//# sourceMappingURL=web-client.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-client.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAiB,QAAID,IAErBD,EAAc,QAAIC,IARpB,CASGK,MAAM,WACT,2FCPIC,QAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACL,EAAOM,GAAI,oWAAqW,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,0CAA0C,MAAQ,GAAG,SAAW,iMAAiM,eAAiB,CAAC,wuBAAwuB,WAAa,MAEj7C,oCCDAN,EAAOD,QAAU,SAAUQ,GACzB,IAAIC,EAAO,GA6FX,OA3FAA,EAAKC,SAAW,WACd,OAAOC,KAAKC,KAAI,SAAUC,GACxB,IAAIC,EAAU,GACVC,OAA+B,IAAZF,EAAK,GA4B5B,OA1BIA,EAAK,KACPC,GAAW,cAAcE,OAAOH,EAAK,GAAI,QAGvCA,EAAK,KACPC,GAAW,UAAUE,OAAOH,EAAK,GAAI,OAGnCE,I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Q7BtCX","sources":["webpack://MoveoAI/webpack/universalModuleDefinition","webpack://MoveoAI/./src/styles/web-client.scss","webpack://MoveoAI/./node_modules/css-loader/dist/runtime/api.js","webpack://MoveoAI/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://MoveoAI/./node_modules/debug/src/browser.js","webpack://MoveoAI/./node_modules/debug/src/common.js","webpack://MoveoAI/./node_modules/lodash.debounce/index.js","webpack://MoveoAI/./node_modules/lodash.throttle/index.js","webpack://MoveoAI/./node_modules/ms/index.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://MoveoAI/../src/index.ts","webpack://MoveoAI/webpack/bootstrap","webpack://MoveoAI/webpack/runtime/compat get default export","webpack://MoveoAI/webpack/runtime/define property getters","webpack://MoveoAI/webpack/runtime/global","webpack://MoveoAI/webpack/runtime/hasOwnProperty shorthand","webpack://MoveoAI/webpack/runtime/make namespace object","webpack://MoveoAI/webpack/runtime/nonce","webpack://MoveoAI/./src/config/config.ts","webpack://MoveoAI/./src/config/constants.ts","webpack://MoveoAI/./src/util/utils.ts","webpack://MoveoAI/./src/ts/index.ts","webpack://MoveoAI/./src/controller/controller.ts","webpack://MoveoAI/./src/styles/web-client.scss?9e2a","webpack://MoveoAI/./src/index.tsx","webpack://MoveoAI/./node_modules/nanoid/index.browser.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MoveoAI\"] = factory();\n\telse\n\t\troot[\"MoveoAI\"] = factory();\n})(self, function() {\nreturn ","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".web-client-container{position:fixed;bottom:0;right:0;cursor:pointer;z-index:10000;max-height:99vh}.web-client-container.embed{position:static;width:100% !important;height:100% !important}.web-client-container.full{width:100% !important;height:100% !important;bottom:0 !important;right:0 !important;left:0 !important;top:0 !important;max-height:initial}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/styles/web-client.scss\"],\"names\":[],\"mappings\":\"AAIA,sBAIE,cAAA,CACA,QAAA,CACA,OAAA,CACA,cAAA,CACA,aAPiB,CAQjB,eAPoB,CASpB,4BACE,eAAA,CACA,qBAAA,CACA,sBAAA,CAIF,2BACE,qBAAA,CACA,sBAAA,CACA,mBAAA,CACA,kBAAA,CACA,iBAAA,CACA,gBAAA,CACA,kBAAA\",\"sourcesContent\":[\"// This style is applied to the iframe that customers load.\\n// Ideally we use style variables rather than this so that\\n// we can use the widget-id.\\n\\n.web-client-container {\\n $widget-z-index: 10000;\\n $widget-max-height: 99vh;\\n\\n position: fixed;\\n bottom: 0;\\n right: 0;\\n cursor: pointer;\\n z-index: $widget-z-index;\\n max-height: $widget-max-height;\\n\\n &.embed {\\n position: static;\\n width: 100% !important;\\n height: 100% !important;\\n }\\n\\n // ! Important because this happens on the clients website\\n &.full {\\n width: 100% !important;\\n height: 100% !important;\\n bottom: 0 !important;\\n right: 0 !important;\\n left: 0 !important;\\n top: 0 !important;\\n max-height: initial;\\n }\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n\n content += cssWithMappingToString(item);\n\n if (needLayer) {\n content += \"}\";\n }\n\n if (item[2]) {\n content += \"}\";\n }\n\n if (item[4]) {\n content += \"}\";\n }\n\n return content;\n }).join(\"\");\n }; // import a list of modules into the list\n\n\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || \"\").concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join(\"\\n\");\n }\n\n return [content].join(\"\\n\");\n};","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = throttle;\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\"use strict\";\n\nvar stylesInDOM = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n\n return updater;\n}\n\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n\n var newLastIdentifiers = modulesToDom(newList, options);\n\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n\n var _index = getIndexByIdentifier(_identifier);\n\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n\n stylesInDOM.splice(_index, 1);\n }\n }\n\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n/* istanbul ignore next */\n\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n}\n/* istanbul ignore next */\n\n\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n}\n\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\n\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\n\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n\n var needLayer = typeof obj.layer !== \"undefined\";\n\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n\n css += obj.css;\n\n if (needLayer) {\n css += \"}\";\n }\n\n if (obj.media) {\n css += \"}\";\n }\n\n if (obj.supports) {\n css += \"}\";\n }\n\n var sourceMap = obj.sourceMap;\n\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n options.styleTagTransform(css, styleElement, options.options);\n}\n\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n\n styleElement.parentNode.removeChild(styleElement);\n}\n/* istanbul ignore next */\n\n\nfunction domAPI(options) {\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\n\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n\n styleElement.appendChild(document.createTextNode(css));\n }\n}\n\nmodule.exports = styleTagTransform;",null,"// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nc = undefined;","const config = {\n CHANNELS_HOST: 'https://channels-ws.moveo.ai',\n BRAIN_AVATAR: 'https://res.cloudinary.com/moveo-ai/image/upload/v1637720224/avatars/images_wgdkxm.jpg',\n TEST_INTEGRATION_ID: 'fake-integration-id',\n};\nexport const getConfig = () => config;\n","export const languageByCountryCode = {\n en: 'English',\n el: 'Greek',\n es: 'Spanish',\n 'pt-BR': 'Brazilian Portuguese',\n it: 'Italian',\n fr: 'French',\n de: 'German',\n ro: 'Romanian',\n bg: 'Bulgarian',\n};\nexport const WEB_CLIENT_NEXT_URL = 'https://web-client.dev.moveo.ai';\nexport const WEB_CLIENT_URL = 'https://web-client.moveo.ai';\nexport const MODAL_TIMEOUT = 400;\nexport const MINIMUM_MESSAGES_TO_SHOW_SURVEY = 3;\nexport const LOCAL_EVENT = 'local-storage';\nexport const STORAGE_EVENT = 'storage';\n","import { getConfig } from '../config/config';\nimport { WEB_CLIENT_NEXT_URL, WEB_CLIENT_URL } from '../config/constants';\n/**\n * Fetches the integration configuration\n * @param host the channels host\n * @param id the integration id\n * @returns\n */\nexport const fetchIntegration = async (id, host) => {\n const channelHost = host || getConfig().CHANNELS_HOST;\n const response = await fetch(`${channelHost}/v1/web/${id}`);\n const text = await response.text();\n if (response.ok) {\n const data = JSON.parse(text);\n return data;\n }\n throw new Error(`Error loading config from: ${channelHost}/${id}`);\n};\n/**\n * Promise that resolves when the document is ready.\n *\n */\nexport const onDocumentReady = () => new Promise((resolve) => {\n if (document.readyState === 'complete') {\n return resolve();\n }\n else {\n window.addEventListener('load', () => {\n return resolve();\n });\n }\n});\nexport const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));\nexport const getTimestamp = () => Date.now();\nexport const KEYS = {\n UP: 'ArrowUp',\n DOWN: 'ArrowDown',\n ESC: 'Escape',\n ENTER: 'Enter',\n DELETE: 'Delete',\n SPACE: 'Space',\n TAB: 'Tab',\n};\nexport const emailRegExp = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))){2,}$/i;\nexport const validateYouTubeUrl = (text) => {\n if (text) {\n const regExp = /^.*(youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=|\\&v=|\\?v=)([^#\\&\\?]*).*/;\n const match = text.match(regExp);\n if (match && match[2].length == 11) {\n return `https://www.youtube.com/embed/${match[2]}?autoplay=0`;\n }\n }\n return false;\n};\nexport const isWindowMobile = () => window.innerWidth < 650 ||\n (window.innerHeight < 550 && window.innerWidth < 1000);\n/**\n * Returns the URL that will be use to load the iframe\n */\nexport const createIframeUrl = (widgetId) => {\n // 1. Check if using the beta/next release by looking at the script src\n let url = '';\n const scripts = document.querySelectorAll('script');\n const regex = /@moveo-ai\\/web-client.*next/;\n if (scripts) {\n scripts.forEach((script) => {\n if (script.src.match(regex)) {\n url = WEB_CLIENT_NEXT_URL;\n }\n });\n }\n // 2. Check if using localhost or vercel by looking at the origin\n const { origin } = window.location;\n if (!url && origin.match(/localhost:|vercel.app/)) {\n url = origin;\n }\n else if (!url && origin.match(/web-client.dev/)) {\n url = WEB_CLIENT_NEXT_URL;\n }\n else if (!url) {\n // 3. Default to the production web-client url\n url = WEB_CLIENT_URL;\n }\n // 4. Append the WidgetId to the iframe so that this window and the iframe can\n // stablish a communication channel\n return `${url}?widgetId=${widgetId}`;\n};\nexport const parseEvent = (widgetId, event) => {\n var _a, _b;\n const eventType = (_a = event === null || event === void 0 ? void 0 : event.data) === null || _a === void 0 ? void 0 : _a.type;\n if (typeof eventType !== 'string' || !eventType.startsWith(widgetId)) {\n return null;\n }\n // Extract the event type by removing the prefix `widgetId`\n const type = eventType.replace(widgetId, '');\n const data = (_b = event.data) === null || _b === void 0 ? void 0 : _b.data;\n return { type, data };\n};\nexport const isTest = (parentUrl) => {\n if (parentUrl) {\n const url = new URL(parentUrl).origin;\n if (url.match(/localhost:|vercel.app/) ||\n url === WEB_CLIENT_NEXT_URL ||\n url === WEB_CLIENT_URL) {\n return true;\n }\n }\n return false;\n};\nfunction isObject(item) {\n return item && typeof item === 'object' && !Array.isArray(item);\n}\n// From: stackoverflow.com/a/37164538\nexport function mergeDeep(target = {}, source = {}) {\n const output = Object.assign({}, target);\n if (isObject(target) && isObject(source)) {\n Object.keys(source).forEach((key) => {\n if (isObject(source[key])) {\n if (!(key in target))\n Object.assign(output, { [key]: source[key] });\n else\n output[key] = mergeDeep(target[key], source[key]);\n }\n else {\n Object.assign(output, { [key]: source[key] });\n }\n });\n }\n return output;\n}\n","/** User provided configuration */\nexport var SessionStatus;\n(function (SessionStatus) {\n SessionStatus[\"Open\"] = \"open\";\n SessionStatus[\"Resolved\"] = \"closed\";\n SessionStatus[\"Expired\"] = \"expired\";\n SessionStatus[\"Spam\"] = \"spam\";\n SessionStatus[\"Trash\"] = \"trash\";\n})(SessionStatus || (SessionStatus = {}));\n/**\n * Events send from the iframe to the web-client\n */\nexport var IframeEventType;\n(function (IframeEventType) {\n IframeEventType[\"IframeLoaded\"] = \"moveo-iframe-loaded\";\n IframeEventType[\"IframeError\"] = \"moveo-iframe-error\";\n IframeEventType[\"WidgetLoaded\"] = \"moveo-widget-loaded\";\n IframeEventType[\"WidgetError\"] = \"moveo-widget-error\";\n IframeEventType[\"Opened\"] = \"moveo-widget-opened\";\n IframeEventType[\"Closed\"] = \"moveo-widget-closed\";\n IframeEventType[\"Resize\"] = \"moveo-widget-resize\";\n IframeEventType[\"LocaleChanged\"] = \"moveo-widget-locale-changed\";\n IframeEventType[\"SessionCreated\"] = \"moveo-widget-session-created\";\n})(IframeEventType || (IframeEventType = {}));\n/**\n * Events send from the web-client to the iframe\n */\nexport var WebClientEventType;\n(function (WebClientEventType) {\n WebClientEventType[\"SetConfig\"] = \"moveo-set-config\";\n WebClientEventType[\"SetLocale\"] = \"moveo-set-locale\";\n WebClientEventType[\"SetCssVariables\"] = \"moveo-set-css-variables\";\n WebClientEventType[\"Open\"] = \"moveo-open\";\n WebClientEventType[\"Close\"] = \"moveo-close\";\n WebClientEventType[\"SendMessage\"] = \"moveo-send-message\";\n WebClientEventType[\"UpdateContext\"] = \"moveo-update-context\";\n WebClientEventType[\"WindowResize\"] = \"moveo-resize\";\n WebClientEventType[\"SessionActivity\"] = \"session-activity\";\n})(WebClientEventType || (WebClientEventType = {}));\nexport var ChatModal;\n(function (ChatModal) {\n ChatModal[\"Expired\"] = \"expired\";\n ChatModal[\"Survey\"] = \"survey\";\n ChatModal[\"SurveyFull\"] = \"survey-full\";\n /**\n * Shows a modal with a button to close the session.\n * This is shown when the user press the close button on the widget.\n */\n ChatModal[\"Closing\"] = \"closing\";\n /**\n * Shows the resolved modal with a button to continue or end the session.\n * This is shown when the agent closes the conversation.\n */\n ChatModal[\"Resolved\"] = \"closed\";\n ChatModal[\"Inactivity\"] = \"inactivity\";\n})(ChatModal || (ChatModal = {}));\nexport var TestClassName;\n(function (TestClassName) {\n TestClassName[\"MinimizeButton\"] = \"minimize-btn\";\n TestClassName[\"CloseButton\"] = \"close-btn\";\n TestClassName[\"EndSessionButton\"] = \"end-btn\";\n TestClassName[\"LauncherButton\"] = \"launcher-btn\";\n TestClassName[\"MessageInput\"] = \"message-input\";\n TestClassName[\"DisclaimerCheck\"] = \"disclaimer-check\";\n TestClassName[\"DisclaimerContainer\"] = \"disclaimer-container\";\n TestClassName[\"HeaderContainer\"] = \"header-container\";\n})(TestClassName || (TestClassName = {}));\n","import debug from 'debug';\nimport debounce from 'lodash.debounce';\nimport throttle from 'lodash.throttle';\nimport { IframeEventType, WebClientEventType, } from '@/ts';\nimport { createIframeUrl, isWindowMobile, parseEvent } from '@/util/utils';\n/**\n * Communicates messages between the main page and the web-client iframe.\n * It generates a unique id to identify the iframe\n */\nexport class WidgetController {\n constructor(config) {\n this.detectMobile = () => {\n this.sendEventToIframe({\n type: WebClientEventType.WindowResize,\n data: {\n is_mobile: isWindowMobile(),\n width: window.innerWidth,\n height: window.innerHeight,\n },\n });\n this.isMobile = isWindowMobile();\n };\n this.trackActivity = () => {\n const updateLastActivity = () => {\n this.sendEventToIframe({\n type: WebClientEventType.SessionActivity,\n data: 'active',\n });\n };\n window.onload = debounce(updateLastActivity, 2000);\n window.onmousemove = throttle(updateLastActivity, 1000);\n window.onmousedown = throttle(updateLastActivity, 1000); // catches touchscreen presses as well\n window.ontouchstart = throttle(updateLastActivity, 1000); // catches touchscreen swipes as well\n window.ontouchmove = throttle(updateLastActivity, 1000); // required by some devices\n window.onclick = throttle(updateLastActivity, 1000); // catches touchpad clicks as well\n window.onkeydown = throttle(updateLastActivity, 1000);\n window.addEventListener('scroll', throttle(updateLastActivity, 1000), true);\n };\n this.config = config;\n this.id = config.widgetId;\n this.initialized = false;\n this.log = debug(`moveo:web-client:${this.id}`);\n this.iframe = this.createIframe();\n this.isMobile = null;\n }\n createIframe() {\n const iframe = document.createElement('iframe');\n iframe.width = '1px';\n iframe.height = '1px';\n iframe.id = this.id;\n iframe.name = this.id;\n iframe.allow = 'geolocation';\n iframe.style.border = '0';\n iframe.classList.add('web-client-container');\n if (this.config.widget_position === 'embed') {\n iframe.classList.add('embed');\n }\n iframe.setAttribute('src', createIframeUrl(this.id));\n return iframe;\n }\n handleEvents(resolve, reject) {\n return (messageEvent) => {\n const event = parseEvent(this.id, messageEvent);\n if (!event) {\n return;\n }\n switch (event.type) {\n case IframeEventType.IframeLoaded: {\n this.sendEventToIframe({\n type: WebClientEventType.SetConfig,\n data: this.config,\n });\n break;\n }\n case IframeEventType.IframeError: {\n return reject(event.data);\n }\n case IframeEventType.WidgetLoaded: {\n setTimeout(() => {\n this.detectMobile();\n resolve(this);\n }, 0);\n break;\n }\n case IframeEventType.WidgetError: {\n this.notify(event);\n break;\n }\n case IframeEventType.Opened: {\n if (event.data.isFull || event.data.is_mobile) {\n this.iframe.classList.add('full');\n }\n break;\n }\n case IframeEventType.Closed: {\n if (event.data.isFull) {\n this.iframe.classList.remove('full');\n }\n break;\n }\n case IframeEventType.Resize: {\n this.iframe.style.width = event.data.width;\n this.iframe.style.height = event.data.height;\n break;\n }\n default: {\n this.log(`Unhandle event: ${event.type}`);\n }\n }\n };\n }\n init() {\n return new Promise((resolve, reject) => {\n var _a, _b;\n if (this.initialized) {\n throw new Error(`Widget ${this.id} was already initialized`);\n }\n window.addEventListener('message', this.handleEvents(resolve, reject));\n window.addEventListener('resize', debounce(this.detectMobile, 100));\n this.trackActivity();\n if (this.config.widget_position === 'embed') {\n let element = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.element) || null;\n if (typeof element === 'string') {\n element = document.getElementById(element);\n if (!element) {\n throw new Error(`Element with id: ${element} not found`);\n }\n }\n // Add the widget to the provided element\n element === null || element === void 0 ? void 0 : element.appendChild(this.iframe);\n }\n else {\n (_b = window.document.querySelector('body')) === null || _b === void 0 ? void 0 : _b.appendChild(this.iframe);\n }\n this.initialized = true;\n this.detectMobile();\n });\n }\n /**\n * Sends a message to the iframe using the iframe id as prefix.\n */\n sendEventToIframe(event) {\n var _a;\n if (this.iframe && this.iframe.contentWindow) {\n this.log(`Event to iframe: ${event.type}`, event);\n if (event.type === WebClientEventType.SetConfig && ((_a = event.data) === null || _a === void 0 ? void 0 : _a.element)) {\n delete event.data.element;\n }\n // Add the `widgetId` to the event type\n this.iframe.contentWindow.postMessage(Object.assign(Object.assign({}, event), { type: `${this.id}${event.type}` }), '*');\n }\n else {\n this.log('Error: Cannot find iframe to send event');\n }\n }\n notify(event) {\n this.log(`notify ${event.type}:`, event);\n }\n // --------------------------------\n // Start the instance methods here.\n // --------------------------------\n openWindow() {\n this.sendEventToIframe({\n type: WebClientEventType.Open,\n });\n }\n closeWindow() {\n this.sendEventToIframe({ type: WebClientEventType.Close });\n }\n sendMessage(message) {\n this.sendEventToIframe({\n type: WebClientEventType.SendMessage,\n data: message,\n });\n }\n updateContext(data) {\n this.sendEventToIframe({\n type: WebClientEventType.UpdateContext,\n data,\n });\n }\n setCSSVariables(data) {\n this.sendEventToIframe({\n type: WebClientEventType.SetCssVariables,\n data,\n });\n }\n setLocale(locale) {\n this.sendEventToIframe({\n type: WebClientEventType.SetLocale,\n data: locale,\n });\n }\n onSessionCreated(callback) {\n window.addEventListener('message', (messageEvent) => {\n const event = parseEvent(this.id, messageEvent);\n if (!event) {\n return;\n }\n this.log(`Event from iframe: ${event.type}`, event);\n if (event.type === IframeEventType.SessionCreated) {\n callback();\n }\n });\n }\n}\n","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-modules-typescript-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./web-client.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-modules-typescript-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./web-client.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import debug from 'debug';\nimport { nanoid } from 'nanoid';\nimport merge from 'ts-deepmerge';\nimport { onDocumentReady, fetchIntegration } from '@/util/utils';\nimport { WidgetController } from './controller/controller';\nimport '@/styles/web-client.scss';\nlet log = debug('moveo:web-client');\n/**\n * Loads the integration configuration and merges it\n * with the user-supplied configuration,\n */\nconst loadWebClientConfig = async (userConfig) => {\n const widgetId = `moveo-${nanoid(5)}`;\n const clientUrl = window.location.href;\n log = log.extend(`:${widgetId}`);\n if (!(userConfig === null || userConfig === void 0 ? void 0 : userConfig.integrationId)) {\n throw new Error('integrationId is required.\\n Call MoveoAI.init({ integrationId: YOUR_INTEGRATION_HERE })');\n }\n const widgetConfig = await fetchIntegration(userConfig.integrationId, userConfig.host);\n log('Loaded integration configuration:', widgetConfig);\n // Overwrite the widget configuration with the user configuration\n return Object.assign(Object.assign({}, merge(Object.assign({}, widgetConfig), userConfig)), { clientUrl,\n widgetId });\n};\n/**\n * Initializes the iframe, appends it to the body and return an instance.\n *\n */\nexport const init = async (userConfig) => {\n // 1. Wait for the Client DOM to be fully loaded\n await onDocumentReady();\n // 2. Load integration config and combine it with the user configuration\n // the window location and the device information.\n // This method prepares all the info we can gather from the client's web page\n const webClientConfig = await loadWebClientConfig(userConfig);\n log('Configuration:', webClientConfig);\n if (webClientConfig.widget_position === 'embed' && !webClientConfig.element) {\n throw new Error('element is not defined but required by embed widget');\n }\n // 3. Create a controller to manage the communication\n // between the customer and the web-client.\n // The messages will be filtered based on the widgetId\n const controller = new WidgetController(webClientConfig);\n // 4. Initialize the controller which creates and attach the iframe along\n // with all the event listeners\n log('Initializing');\n const instance = await controller.init();\n log('Initialized');\n return instance;\n};\n","import { urlAlphabet } from './url-alphabet/index.js'\nlet random = bytes => crypto.getRandomValues(new Uint8Array(bytes))\nlet customRandom = (alphabet, defaultSize, getRandom) => {\n let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1\n let step = -~((1.6 * mask * defaultSize) / alphabet.length)\n return (size = defaultSize) => {\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n let j = step\n while (j--) {\n id += alphabet[bytes[j] & mask] || ''\n if (id.length === size) return id\n }\n }\n }\n}\nlet customAlphabet = (alphabet, size = 21) =>\n customRandom(alphabet, size, random)\nlet nanoid = (size = 21) =>\n crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {\n byte &= 63\n if (byte < 36) {\n id += byte.toString(36)\n } else if (byte < 62) {\n id += (byte - 26).toString(36).toUpperCase()\n } else if (byte > 62) {\n id += '-'\n } else {\n id += '_'\n }\n return id\n }, '')\nexport { nanoid, customAlphabet, customRandom, urlAlphabet, random }\n"],"names":["root","factory","exports","module","define","amd","self","___CSS_LOADER_EXPORT___","push","id","cssWithMappingToString","list","toString","this","map","item","content","needLayer","concat","length","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","sourceURLs","sources","source","sourceRoot","formatArgs","args","useColors","namespace","humanize","diff","c","color","splice","index","lastC","replace","match","save","namespaces","storage","setItem","removeItem","error","load","r","getItem","process","env","DEBUG","window","type","__nwjs","navigator","userAgent","toLowerCase","document","documentElement","style","WebkitAppearance","console","firebug","exception","table","parseInt","RegExp","$1","localStorage","localstorage","destroy","warned","warn","colors","log","debug","formatters","j","v","message","createDebug","prevTime","namespacesCache","enabledCache","enableOverride","enabled","curr","Number","Date","ms","prev","coerce","unshift","format","formatter","val","call","apply","selectColor","extend","Object","defineProperty","enumerable","configurable","get","set","init","delimiter","newDebug","toNamespace","regexp","substring","default","Error","stack","disable","names","skips","enable","split","len","slice","name","test","keys","forEach","key","hash","charCodeAt","Math","abs","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","freeGlobal","g","freeSelf","Function","objectToString","prototype","nativeMax","max","nativeMin","min","now","isObject","value","toNumber","isObjectLike","isSymbol","other","valueOf","isBinary","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","thisArg","leadingEdge","setTimeout","timerExpired","shouldInvoke","timeSinceLastCall","trailingEdge","remainingWait","debounced","isInvoking","arguments","cancel","clearTimeout","flush","FUNC_ERROR_TEXT","debounce","s","m","h","d","plural","msAbs","n","isPlural","round","str","String","exec","parseFloat","parse","isFinite","long","fmtShort","stylesInDOM","getIndexByIdentifier","identifier","modulesToDom","idCountMap","identifiers","base","count","indexByIdentifier","obj","css","sourceMap","references","updater","addElementStyle","byIndex","api","domAPI","update","newObj","remove","lastIdentifiers","newList","newLastIdentifiers","_i","_index","memo","insert","target","styleTarget","querySelector","HTMLIFrameElement","contentDocument","head","e","getTarget","appendChild","element","createElement","setAttributes","attributes","styleElement","nonce","setAttribute","insertStyleElement","styleTagTransform","parentNode","removeChild","removeStyleElement","styleSheet","cssText","firstChild","createTextNode","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","a","definition","o","globalThis","prop","hasOwnProperty","Symbol","toStringTag","nc","config","isWindowMobile","innerWidth","innerHeight","parseEvent","widgetId","event","_a","_b","eventType","startsWith","SessionStatus","IframeEventType","WebClientEventType","ChatModal","TestClassName","WidgetController","constructor","detectMobile","sendEventToIframe","WindowResize","is_mobile","width","height","isMobile","trackActivity","updateLastActivity","SessionActivity","onload","onmousemove","onmousedown","ontouchstart","ontouchmove","onclick","onkeydown","addEventListener","initialized","iframe","createIframe","allow","border","classList","add","widget_position","url","scripts","querySelectorAll","regex","script","src","origin","location","createIframeUrl","handleEvents","resolve","reject","messageEvent","IframeLoaded","SetConfig","IframeError","WidgetLoaded","WidgetError","notify","Opened","isFull","Closed","Resize","Promise","getElementById","contentWindow","postMessage","assign","openWindow","Open","closeWindow","Close","sendMessage","SendMessage","updateContext","UpdateContext","setCSSVariables","SetCssVariables","setLocale","locale","SetLocale","onSessionCreated","callback","SessionCreated","loadWebClientConfig","async","userConfig","size","crypto","getRandomValues","Uint8Array","reduce","byte","toUpperCase","nanoid","clientUrl","href","integrationId","widgetConfig","host","channelHost","getConfig","response","fetch","text","ok","fetchIntegration","readyState","webClientConfig","controller","instance"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"web-client.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAiB,QAAID,IAErBD,EAAc,QAAIC,IARpB,CASGK,MAAM,WACT,2FCPIC,QAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACL,EAAOM,GAAI,oWAAqW,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,0CAA0C,MAAQ,GAAG,SAAW,iMAAiM,eAAiB,CAAC,wuBAAwuB,WAAa,MAEj7C,oCCDAN,EAAOD,QAAU,SAAUQ,GACzB,IAAIC,EAAO,GA6FX,OA3FAA,EAAKC,SAAW,WACd,OAAOC,KAAKC,KAAI,SAAUC,GACxB,IAAIC,EAAU,GACVC,OAA+B,IAAZF,EAAK,GA4B5B,OA1BIA,EAAK,KACPC,GAAW,cAAcE,OAAOH,EAAK,GAAI,QAGvCA,EAAK,KACPC,GAAW,UAAUE,OAAOH,EAAK,GAAI,OAGnCE,IACFD,GAAW,SAASE,OAAOH,EAAK,GAAGI,OAAS,EAAI,IAAID,OAAOH,EAAK,IAAM,GAAI,OAG5EC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node_modules/css-loader/dist/runtime/api.js","webpack://MoveoAI/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://MoveoAI/./node_modules/debug/src/browser.js","webpack://MoveoAI/./node_modules/debug/src/common.js","webpack://MoveoAI/./node_modules/lodash.debounce/index.js","webpack://MoveoAI/./node_modules/lodash.throttle/index.js","webpack://MoveoAI/./node_modules/ms/index.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://MoveoAI/../src/index.ts","webpack://MoveoAI/webpack/bootstrap","webpack://MoveoAI/webpack/runtime/compat get default export","webpack://MoveoAI/webpack/runtime/define property getters","webpack://MoveoAI/webpack/runtime/global","webpack://MoveoAI/webpack/runtime/hasOwnProperty shorthand","webpack://MoveoAI/webpack/runtime/make namespace object","webpack://MoveoAI/webpack/runtime/nonce","webpack://MoveoAI/./src/config/config.ts","webpack://MoveoAI/./src/config/constants.ts","webpack://MoveoAI/./src/util/utils.ts","webpack://MoveoAI/./src/ts/index.ts","webpack://MoveoAI/./src/controller/controller.ts","webpack://MoveoAI/./src/styles/web-client.scss?9e2a","webpack://MoveoAI/./src/index.tsx","webpack://MoveoAI/./node_modules/nanoid/index.browser.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MoveoAI\"] = factory();\n\telse\n\t\troot[\"MoveoAI\"] = factory();\n})(self, function() {\nreturn ","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".web-client-container{position:fixed;bottom:0;right:0;cursor:pointer;z-index:10022;max-height:99vh}.web-client-container.embed{position:static;width:100% !important;height:100% !important}.web-client-container.full{width:100% !important;height:100% !important;bottom:0 !important;right:0 !important;left:0 !important;top:0 !important;max-height:initial}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/styles/web-client.scss\"],\"names\":[],\"mappings\":\"AAIA,sBAIE,cAAA,CACA,QAAA,CACA,OAAA,CACA,cAAA,CACA,aAPiB,CAQjB,eAPoB,CASpB,4BACE,eAAA,CACA,qBAAA,CACA,sBAAA,CAIF,2BACE,qBAAA,CACA,sBAAA,CACA,mBAAA,CACA,kBAAA,CACA,iBAAA,CACA,gBAAA,CACA,kBAAA\",\"sourcesContent\":[\"// This style is applied to the iframe that customers load.\\n// Ideally we use style variables rather than this so that\\n// we can use the widget-id.\\n\\n.web-client-container {\\n $widget-z-index: 10022;\\n $widget-max-height: 99vh;\\n\\n position: fixed;\\n bottom: 0;\\n right: 0;\\n cursor: pointer;\\n z-index: $widget-z-index;\\n max-height: $widget-max-height;\\n\\n &.embed {\\n position: static;\\n width: 100% !important;\\n height: 100% !important;\\n }\\n\\n // ! Important because this happens on the clients website\\n &.full {\\n width: 100% !important;\\n height: 100% !important;\\n bottom: 0 !important;\\n right: 0 !important;\\n left: 0 !important;\\n top: 0 !important;\\n max-height: initial;\\n }\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n\n content += cssWithMappingToString(item);\n\n if (needLayer) {\n content += \"}\";\n }\n\n if (item[2]) {\n content += \"}\";\n }\n\n if (item[4]) {\n content += \"}\";\n }\n\n return content;\n }).join(\"\");\n }; // import a list of modules into the list\n\n\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || \"\").concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join(\"\\n\");\n }\n\n return [content].join(\"\\n\");\n};","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = throttle;\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\"use strict\";\n\nvar stylesInDOM = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n\n return updater;\n}\n\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n\n var newLastIdentifiers = modulesToDom(newList, options);\n\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n\n var _index = getIndexByIdentifier(_identifier);\n\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n\n stylesInDOM.splice(_index, 1);\n }\n }\n\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n/* istanbul ignore next */\n\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n}\n/* istanbul ignore next */\n\n\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n}\n\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\n\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\n\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n\n var needLayer = typeof obj.layer !== \"undefined\";\n\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n\n css += obj.css;\n\n if (needLayer) {\n css += \"}\";\n }\n\n if (obj.media) {\n css += \"}\";\n }\n\n if (obj.supports) {\n css += \"}\";\n }\n\n var sourceMap = obj.sourceMap;\n\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n options.styleTagTransform(css, styleElement, options.options);\n}\n\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n\n styleElement.parentNode.removeChild(styleElement);\n}\n/* istanbul ignore next */\n\n\nfunction domAPI(options) {\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\n\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n\n styleElement.appendChild(document.createTextNode(css));\n }\n}\n\nmodule.exports = styleTagTransform;",null,"// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nc = undefined;","const config = {\n CHANNELS_HOST: 'https://channels-ws.moveo.ai',\n BRAIN_AVATAR: 'https://res.cloudinary.com/moveo-ai/image/upload/v1637720224/avatars/images_wgdkxm.jpg',\n TEST_INTEGRATION_ID: 'fake-integration-id',\n};\nexport const getConfig = () => config;\n","export const languageByCountryCode = {\n en: 'English',\n el: 'Greek',\n es: 'Spanish',\n 'pt-BR': 'Brazilian Portuguese',\n it: 'Italian',\n fr: 'French',\n de: 'German',\n ro: 'Romanian',\n bg: 'Bulgarian',\n};\nexport const WEB_CLIENT_NEXT_URL = 'https://web-client.dev.moveo.ai';\nexport const WEB_CLIENT_URL = 'https://web-client.moveo.ai';\nexport const MODAL_TIMEOUT = 400;\nexport const MINIMUM_MESSAGES_TO_SHOW_SURVEY = 3;\nexport const LOCAL_EVENT = 'local-storage';\nexport const STORAGE_EVENT = 'storage';\n","import { getConfig } from '../config/config';\nimport { WEB_CLIENT_NEXT_URL, WEB_CLIENT_URL } from '../config/constants';\n/**\n * Fetches the integration configuration\n * @param host the channels host\n * @param id the integration id\n * @returns\n */\nexport const fetchIntegration = async (id, host) => {\n const channelHost = host || getConfig().CHANNELS_HOST;\n const response = await fetch(`${channelHost}/v1/web/${id}`);\n const text = await response.text();\n if (response.ok) {\n const data = JSON.parse(text);\n return data;\n }\n throw new Error(`Error loading config from: ${channelHost}/${id}`);\n};\n/**\n * Promise that resolves when the document is ready.\n *\n */\nexport const onDocumentReady = () => new Promise((resolve) => {\n if (document.readyState === 'complete') {\n return resolve();\n }\n else {\n window.addEventListener('load', () => {\n return resolve();\n });\n }\n});\nexport const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));\nexport const getTimestamp = () => Date.now();\nexport const KEYS = {\n UP: 'ArrowUp',\n DOWN: 'ArrowDown',\n ESC: 'Escape',\n ENTER: 'Enter',\n DELETE: 'Delete',\n SPACE: 'Space',\n TAB: 'Tab',\n};\nexport const emailRegExp = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))){2,}$/i;\nexport const validateYouTubeUrl = (text) => {\n if (text) {\n const regExp = /^.*(youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=|\\&v=|\\?v=)([^#\\&\\?]*).*/;\n const match = text.match(regExp);\n if (match && match[2].length == 11) {\n return `https://www.youtube.com/embed/${match[2]}?autoplay=0`;\n }\n }\n return false;\n};\nexport const isWindowMobile = () => window.innerWidth < 650 ||\n (window.innerHeight < 550 && window.innerWidth < 1000);\n/**\n * Returns the URL that will be use to load the iframe\n */\nexport const createIframeUrl = (widgetId) => {\n // 1. Check if using the beta/next release by looking at the script src\n let url = '';\n const scripts = document.querySelectorAll('script');\n const regex = /@moveo-ai\\/web-client.*next/;\n if (scripts) {\n scripts.forEach((script) => {\n if (script.src.match(regex)) {\n url = WEB_CLIENT_NEXT_URL;\n }\n });\n }\n // 2. Check if using localhost or vercel by looking at the origin\n const { origin } = window.location;\n if (!url && origin.match(/localhost:|vercel.app/)) {\n url = origin;\n }\n else if (!url && origin.match(/web-client.dev/)) {\n url = WEB_CLIENT_NEXT_URL;\n }\n else if (!url) {\n // 3. Default to the production web-client url\n url = WEB_CLIENT_URL;\n }\n // 4. Append the WidgetId to the iframe so that this window and the iframe can\n // stablish a communication channel\n return `${url}?widgetId=${widgetId}`;\n};\nexport const parseEvent = (widgetId, event) => {\n var _a, _b;\n const eventType = (_a = event === null || event === void 0 ? void 0 : event.data) === null || _a === void 0 ? void 0 : _a.type;\n if (typeof eventType !== 'string' || !eventType.startsWith(widgetId)) {\n return null;\n }\n // Extract the event type by removing the prefix `widgetId`\n const type = eventType.replace(widgetId, '');\n const data = (_b = event.data) === null || _b === void 0 ? void 0 : _b.data;\n return { type, data };\n};\nexport const isTest = (parentUrl) => {\n if (parentUrl) {\n const url = new URL(parentUrl).origin;\n if (url.match(/localhost:|vercel.app/) ||\n url === WEB_CLIENT_NEXT_URL ||\n url === WEB_CLIENT_URL) {\n return true;\n }\n }\n return false;\n};\nfunction isObject(item) {\n return item && typeof item === 'object' && !Array.isArray(item);\n}\n// From: stackoverflow.com/a/37164538\nexport function mergeDeep(target = {}, source = {}) {\n const output = Object.assign({}, target);\n if (isObject(target) && isObject(source)) {\n Object.keys(source).forEach((key) => {\n if (isObject(source[key])) {\n if (!(key in target))\n Object.assign(output, { [key]: source[key] });\n else\n output[key] = mergeDeep(target[key], source[key]);\n }\n else {\n Object.assign(output, { [key]: source[key] });\n }\n });\n }\n return output;\n}\n","/** User provided configuration */\nexport var SessionStatus;\n(function (SessionStatus) {\n SessionStatus[\"Open\"] = \"open\";\n SessionStatus[\"Resolved\"] = \"closed\";\n SessionStatus[\"Expired\"] = \"expired\";\n SessionStatus[\"Spam\"] = \"spam\";\n SessionStatus[\"Trash\"] = \"trash\";\n})(SessionStatus || (SessionStatus = {}));\n/**\n * Events send from the iframe to the web-client\n */\nexport var IframeEventType;\n(function (IframeEventType) {\n IframeEventType[\"IframeLoaded\"] = \"moveo-iframe-loaded\";\n IframeEventType[\"IframeError\"] = \"moveo-iframe-error\";\n IframeEventType[\"WidgetLoaded\"] = \"moveo-widget-loaded\";\n IframeEventType[\"WidgetError\"] = \"moveo-widget-error\";\n IframeEventType[\"Opened\"] = \"moveo-widget-opened\";\n IframeEventType[\"Closed\"] = \"moveo-widget-closed\";\n IframeEventType[\"Resize\"] = \"moveo-widget-resize\";\n IframeEventType[\"LocaleChanged\"] = \"moveo-widget-locale-changed\";\n IframeEventType[\"SessionCreated\"] = \"moveo-widget-session-created\";\n})(IframeEventType || (IframeEventType = {}));\n/**\n * Events send from the web-client to the iframe\n */\nexport var WebClientEventType;\n(function (WebClientEventType) {\n WebClientEventType[\"SetConfig\"] = \"moveo-set-config\";\n WebClientEventType[\"SetLocale\"] = \"moveo-set-locale\";\n WebClientEventType[\"SetCssVariables\"] = \"moveo-set-css-variables\";\n WebClientEventType[\"Open\"] = \"moveo-open\";\n WebClientEventType[\"Close\"] = \"moveo-close\";\n WebClientEventType[\"SendMessage\"] = \"moveo-send-message\";\n WebClientEventType[\"UpdateContext\"] = \"moveo-update-context\";\n WebClientEventType[\"WindowResize\"] = \"moveo-resize\";\n WebClientEventType[\"SessionActivity\"] = \"session-activity\";\n})(WebClientEventType || (WebClientEventType = {}));\nexport var ChatModal;\n(function (ChatModal) {\n ChatModal[\"Expired\"] = \"expired\";\n ChatModal[\"Survey\"] = \"survey\";\n ChatModal[\"SurveyFull\"] = \"survey-full\";\n /**\n * Shows a modal with a button to close the session.\n * This is shown when the user press the close button on the widget.\n */\n ChatModal[\"Closing\"] = \"closing\";\n /**\n * Shows the resolved modal with a button to continue or end the session.\n * This is shown when the agent closes the conversation.\n */\n ChatModal[\"Resolved\"] = \"closed\";\n ChatModal[\"Inactivity\"] = \"inactivity\";\n})(ChatModal || (ChatModal = {}));\nexport var TestClassName;\n(function (TestClassName) {\n TestClassName[\"MinimizeButton\"] = \"minimize-btn\";\n TestClassName[\"CloseButton\"] = \"close-btn\";\n TestClassName[\"EndSessionButton\"] = \"end-btn\";\n TestClassName[\"LauncherButton\"] = \"launcher-btn\";\n TestClassName[\"MessageInput\"] = \"message-input\";\n TestClassName[\"DisclaimerCheck\"] = \"disclaimer-check\";\n TestClassName[\"DisclaimerContainer\"] = \"disclaimer-container\";\n TestClassName[\"HeaderContainer\"] = \"header-container\";\n})(TestClassName || (TestClassName = {}));\n","import debug from 'debug';\nimport debounce from 'lodash.debounce';\nimport throttle from 'lodash.throttle';\nimport { IframeEventType, WebClientEventType, } from '@/ts';\nimport { createIframeUrl, isWindowMobile, parseEvent } from '@/util/utils';\n/**\n * Communicates messages between the main page and the web-client iframe.\n * It generates a unique id to identify the iframe\n */\nexport class WidgetController {\n constructor(config) {\n this.detectMobile = () => {\n this.sendEventToIframe({\n type: WebClientEventType.WindowResize,\n data: {\n is_mobile: isWindowMobile(),\n width: window.innerWidth,\n height: window.innerHeight,\n },\n });\n this.isMobile = isWindowMobile();\n };\n this.trackActivity = () => {\n const updateLastActivity = () => {\n this.sendEventToIframe({\n type: WebClientEventType.SessionActivity,\n data: 'active',\n });\n };\n window.onload = debounce(updateLastActivity, 2000);\n window.onmousemove = throttle(updateLastActivity, 1000);\n window.onmousedown = throttle(updateLastActivity, 1000); // catches touchscreen presses as well\n window.ontouchstart = throttle(updateLastActivity, 1000); // catches touchscreen swipes as well\n window.ontouchmove = throttle(updateLastActivity, 1000); // required by some devices\n window.onclick = throttle(updateLastActivity, 1000); // catches touchpad clicks as well\n window.onkeydown = throttle(updateLastActivity, 1000);\n window.addEventListener('scroll', throttle(updateLastActivity, 1000), true);\n };\n this.config = config;\n this.id = config.widgetId;\n this.initialized = false;\n this.log = debug(`moveo:web-client:${this.id}`);\n this.iframe = this.createIframe();\n this.isMobile = null;\n }\n createIframe() {\n const iframe = document.createElement('iframe');\n iframe.width = '1px';\n iframe.height = '1px';\n iframe.id = this.id;\n iframe.name = this.id;\n iframe.allow = 'geolocation';\n iframe.style.border = '0';\n iframe.classList.add('web-client-container');\n if (this.config.widget_position === 'embed') {\n iframe.classList.add('embed');\n }\n iframe.setAttribute('src', createIframeUrl(this.id));\n return iframe;\n }\n handleEvents(resolve, reject) {\n return (messageEvent) => {\n const event = parseEvent(this.id, messageEvent);\n if (!event) {\n return;\n }\n switch (event.type) {\n case IframeEventType.IframeLoaded: {\n this.sendEventToIframe({\n type: WebClientEventType.SetConfig,\n data: this.config,\n });\n break;\n }\n case IframeEventType.IframeError: {\n return reject(event.data);\n }\n case IframeEventType.WidgetLoaded: {\n setTimeout(() => {\n this.detectMobile();\n resolve(this);\n }, 0);\n break;\n }\n case IframeEventType.WidgetError: {\n this.notify(event);\n break;\n }\n case IframeEventType.Opened: {\n if (event.data.isFull || event.data.is_mobile) {\n this.iframe.classList.add('full');\n }\n break;\n }\n case IframeEventType.Closed: {\n if (event.data.isFull) {\n this.iframe.classList.remove('full');\n }\n break;\n }\n case IframeEventType.Resize: {\n this.iframe.style.width = event.data.width;\n this.iframe.style.height = event.data.height;\n break;\n }\n default: {\n this.log(`Unhandle event: ${event.type}`);\n }\n }\n };\n }\n init() {\n return new Promise((resolve, reject) => {\n var _a, _b;\n if (this.initialized) {\n throw new Error(`Widget ${this.id} was already initialized`);\n }\n window.addEventListener('message', this.handleEvents(resolve, reject));\n window.addEventListener('resize', debounce(this.detectMobile, 100));\n this.trackActivity();\n if (this.config.widget_position === 'embed') {\n let element = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.element) || null;\n if (typeof element === 'string') {\n element = document.getElementById(element);\n if (!element) {\n throw new Error(`Element with id: ${element} not found`);\n }\n }\n // Add the widget to the provided element\n element === null || element === void 0 ? void 0 : element.appendChild(this.iframe);\n }\n else {\n (_b = window.document.querySelector('body')) === null || _b === void 0 ? void 0 : _b.appendChild(this.iframe);\n }\n this.initialized = true;\n this.detectMobile();\n });\n }\n /**\n * Sends a message to the iframe using the iframe id as prefix.\n */\n sendEventToIframe(event) {\n var _a;\n if (this.iframe && this.iframe.contentWindow) {\n this.log(`Event to iframe: ${event.type}`, event);\n if (event.type === WebClientEventType.SetConfig && ((_a = event.data) === null || _a === void 0 ? void 0 : _a.element)) {\n delete event.data.element;\n }\n // Add the `widgetId` to the event type\n this.iframe.contentWindow.postMessage(Object.assign(Object.assign({}, event), { type: `${this.id}${event.type}` }), '*');\n }\n else {\n this.log('Error: Cannot find iframe to send event');\n }\n }\n notify(event) {\n this.log(`notify ${event.type}:`, event);\n }\n // --------------------------------\n // Start the instance methods here.\n // --------------------------------\n openWindow() {\n this.sendEventToIframe({\n type: WebClientEventType.Open,\n });\n }\n closeWindow() {\n this.sendEventToIframe({ type: WebClientEventType.Close });\n }\n sendMessage(message) {\n this.sendEventToIframe({\n type: WebClientEventType.SendMessage,\n data: message,\n });\n }\n updateContext(data) {\n this.sendEventToIframe({\n type: WebClientEventType.UpdateContext,\n data,\n });\n }\n setCSSVariables(data) {\n this.sendEventToIframe({\n type: WebClientEventType.SetCssVariables,\n data,\n });\n }\n setLocale(locale) {\n this.sendEventToIframe({\n type: WebClientEventType.SetLocale,\n data: locale,\n });\n }\n onSessionCreated(callback) {\n window.addEventListener('message', (messageEvent) => {\n const event = parseEvent(this.id, messageEvent);\n if (!event) {\n return;\n }\n this.log(`Event from iframe: ${event.type}`, event);\n if (event.type === IframeEventType.SessionCreated) {\n callback();\n }\n });\n }\n}\n","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-modules-typescript-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./web-client.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-modules-typescript-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./web-client.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import debug from 'debug';\nimport { nanoid } from 'nanoid';\nimport merge from 'ts-deepmerge';\nimport { onDocumentReady, fetchIntegration } from '@/util/utils';\nimport { WidgetController } from './controller/controller';\nimport '@/styles/web-client.scss';\nlet log = debug('moveo:web-client');\n/**\n * Loads the integration configuration and merges it\n * with the user-supplied configuration,\n */\nconst loadWebClientConfig = async (userConfig) => {\n const widgetId = `moveo-${nanoid(5)}`;\n const clientUrl = window.location.href;\n log = log.extend(`:${widgetId}`);\n if (!(userConfig === null || userConfig === void 0 ? void 0 : userConfig.integrationId)) {\n throw new Error('integrationId is required.\\n Call MoveoAI.init({ integrationId: YOUR_INTEGRATION_HERE })');\n }\n const widgetConfig = await fetchIntegration(userConfig.integrationId, userConfig.host);\n log('Loaded integration configuration:', widgetConfig);\n // Overwrite the widget configuration with the user configuration\n return Object.assign(Object.assign({}, merge(Object.assign({}, widgetConfig), userConfig)), { clientUrl,\n widgetId });\n};\n/**\n * Initializes the iframe, appends it to the body and return an instance.\n *\n */\nexport const init = async (userConfig) => {\n // 1. Wait for the Client DOM to be fully loaded\n await onDocumentReady();\n // 2. Load integration config and combine it with the user configuration\n // the window location and the device information.\n // This method prepares all the info we can gather from the client's web page\n const webClientConfig = await loadWebClientConfig(userConfig);\n log('Configuration:', webClientConfig);\n if (webClientConfig.widget_position === 'embed' && !webClientConfig.element) {\n throw new Error('element is not defined but required by embed widget');\n }\n // 3. Create a controller to manage the communication\n // between the customer and the web-client.\n // The messages will be filtered based on the widgetId\n const controller = new WidgetController(webClientConfig);\n // 4. Initialize the controller which creates and attach the iframe along\n // with all the event listeners\n log('Initializing');\n const instance = await controller.init();\n log('Initialized');\n return instance;\n};\n","import { urlAlphabet } from './url-alphabet/index.js'\nlet random = bytes => crypto.getRandomValues(new Uint8Array(bytes))\nlet customRandom = (alphabet, defaultSize, getRandom) => {\n let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1\n let step = -~((1.6 * mask * defaultSize) / alphabet.length)\n return (size = defaultSize) => {\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n let j = step\n while (j--) {\n id += alphabet[bytes[j] & mask] || ''\n if (id.length === size) return id\n }\n }\n }\n}\nlet customAlphabet = (alphabet, size = 21) =>\n customRandom(alphabet, size, random)\nlet nanoid = (size = 21) =>\n crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {\n byte &= 63\n if (byte < 36) {\n id += byte.toString(36)\n } else if (byte < 62) {\n id += (byte - 26).toString(36).toUpperCase()\n } else if (byte > 62) {\n id += '-'\n } else {\n id += '_'\n }\n return id\n }, '')\nexport { nanoid, customAlphabet, customRandom, urlAlphabet, random }\n"],"names":["root","factory","exports","module","define","amd","self","___CSS_LOADER_EXPORT___","push","id","cssWithMappingToString","list","toString","this","map","item","content","needLayer","concat","length","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","sourceURLs","sources","source","sourceRoot","formatArgs","args","useColors","namespace","humanize","diff","c","color","splice","index","lastC","replace","match","save","namespaces","storage","setItem","removeItem","error","load","r","getItem","process","env","DEBUG","window","type","__nwjs","navigator","userAgent","toLowerCase","document","documentElement","style","WebkitAppearance","console","firebug","exception","table","parseInt","RegExp","$1","localStorage","localstorage","destroy","warned","warn","colors","log","debug","formatters","j","v","message","createDebug","prevTime","namespacesCache","enabledCache","enableOverride","enabled","curr","Number","Date","ms","prev","coerce","unshift","format","formatter","val","call","apply","selectColor","extend","Object","defineProperty","enumerable","configurable","get","set","init","delimiter","newDebug","toNamespace","regexp","substring","default","Error","stack","disable","names","skips","enable","split","len","slice","name","test","keys","forEach","key","hash","charCodeAt","Math","abs","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","freeGlobal","g","freeSelf","Function","objectToString","prototype","nativeMax","max","nativeMin","min","now","isObject","value","toNumber","isObjectLike","isSymbol","other","valueOf","isBinary","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","thisArg","leadingEdge","setTimeout","timerExpired","shouldInvoke","timeSinceLastCall","trailingEdge","remainingWait","debounced","isInvoking","arguments","cancel","clearTimeout","flush","FUNC_ERROR_TEXT","debounce","s","m","h","d","plural","msAbs","n","isPlural","round","str","String","exec","parseFloat","parse","isFinite","long","fmtShort","stylesInDOM","getIndexByIdentifier","identifier","modulesToDom","idCountMap","identifiers","base","count","indexByIdentifier","obj","css","sourceMap","references","updater","addElementStyle","byIndex","api","domAPI","update","newObj","remove","lastIdentifiers","newList","newLastIdentifiers","_i","_index","memo","insert","target","styleTarget","querySelector","HTMLIFrameElement","contentDocument","head","e","getTarget","appendChild","element","createElement","setAttributes","attributes","styleElement","nonce","setAttribute","insertStyleElement","styleTagTransform","parentNode","removeChild","removeStyleElement","styleSheet","cssText","firstChild","createTextNode","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","a","definition","o","globalThis","prop","hasOwnProperty","Symbol","toStringTag","nc","config","isWindowMobile","innerWidth","innerHeight","parseEvent","widgetId","event","_a","_b","eventType","startsWith","SessionStatus","IframeEventType","WebClientEventType","ChatModal","TestClassName","WidgetController","constructor","detectMobile","sendEventToIframe","WindowResize","is_mobile","width","height","isMobile","trackActivity","updateLastActivity","SessionActivity","onload","onmousemove","onmousedown","ontouchstart","ontouchmove","onclick","onkeydown","addEventListener","initialized","iframe","createIframe","allow","border","classList","add","widget_position","url","scripts","querySelectorAll","regex","script","src","origin","location","createIframeUrl","handleEvents","resolve","reject","messageEvent","IframeLoaded","SetConfig","IframeError","WidgetLoaded","WidgetError","notify","Opened","isFull","Closed","Resize","Promise","getElementById","contentWindow","postMessage","assign","openWindow","Open","closeWindow","Close","sendMessage","SendMessage","updateContext","UpdateContext","setCSSVariables","SetCssVariables","setLocale","locale","SetLocale","onSessionCreated","callback","SessionCreated","loadWebClientConfig","async","userConfig","size","crypto","getRandomValues","Uint8Array","reduce","byte","toUpperCase","nanoid","clientUrl","href","integrationId","widgetConfig","host","channelHost","getConfig","response","fetch","text","ok","fetchIntegration","readyState","webClientConfig","controller","instance"],"sourceRoot":""}
|
package/package.json
CHANGED