@saasquatch/squatch-js 2.4.2 → 2.4.3-1
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/CHANGELOG.md +267 -285
- package/README.md +0 -1
- package/demo/sandbox.ts +7 -5
- package/demo/toolbar.tsx +1 -1
- package/dist/api/WidgetApi.d.ts +4 -4
- package/dist/squatch.d.ts +11 -1
- package/dist/squatch.esm.js +271 -86
- package/dist/squatch.esm.js.map +1 -1
- package/dist/squatch.js +272 -85
- package/dist/squatch.js.map +1 -1
- package/dist/squatch.min.js +3 -3
- package/dist/squatch.min.js.map +1 -1
- package/dist/squatch.modern.js +1 -1
- package/dist/squatch.modern.js.map +1 -1
- package/dist/stats.html +1 -1
- package/dist/types.d.ts +8 -8
- package/dist/utils/cookieUtils.d.ts +1 -0
- package/dist/utils/io.d.ts +2 -1
- package/dist/utils/utmUtils.d.ts +14 -0
- package/dist/utils/validate.d.ts +1 -0
- package/dist/widgets/Widgets.d.ts +4 -3
- package/package.json +104 -104
package/dist/squatch.min.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.squatch=e():t.squatch=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=104)}([function(t,e){var n=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(t,e,n){t.exports=n(130)},function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){return u})),n.d(e,"d",(function(){return f})),n.d(e,"e",(function(){return l}));var r=n(44),o=n.n(r),i=n(31),a=n.n(i);function s(t,e){if(!c(t))return!1;var n=a()(t);return Array.isArray(e)?e.reduce((function(t,e){return t&&n.indexOf(e)>=0}),!0):t.hasOwnProperty(e)}function c(t){return"object"===o()(t)}function u(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.forEach((function(e){if(!s(t,n))throw new Error(e+" is required")})),!0}function f(t){if(!c(t))throw new Error("config must be an object");if(!s(t,"tenantAlias")||"string"!=typeof t.tenantAlias)throw new Error("tenantAlias not provided");return{tenantAlias:t.tenantAlias,domain:s(t,"domain")&&"string"==typeof t.domain&&t.domain||"https://app.referralsaasquatch.com",debug:s(t,"debug")&&"boolean"==typeof t.debug&&t.debug||!1,npmCdn:s(t,"npmCdn")&&"string"==typeof t.npmCdn&&t.npmCdn||"https://fast.ssqt.io/npm"}}function l(t){if(!c(t))throw new Error("Widget properties must be an object");if(!u(t,"user"))throw new Error("Required properties missing.");return t}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(94);function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),r(t,o.key,o)}}t.exports=function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";(function(r){function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}e.log=function(){var t;return"object"===("undefined"==typeof console?"undefined":o(console))&&console.log&&(t=console).log.apply(t,arguments)},e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(r++,"%c"===t&&(o=r))})),e.splice(o,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){var t;try{t=e.storage.getItem("debug")}catch(t){}!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"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+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.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.exports=n(107)(e),t.exports.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this,n(106))},function(t,e,n){var r=n(99),o=n(165);function i(e){return t.exports=i=r?o:function(t){return t.__proto__||o(t)},t.exports.default=t.exports,t.exports.__esModule=!0,i(e)}t.exports=i,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){t.exports=n(153)},function(t,e,n){var r=n(3),o=n(0),i=n(28),a=n(23),s=n(18),c=function(t,e,n){var u,f,l,p=t&c.F,h=t&c.G,d=t&c.S,y=t&c.P,v=t&c.B,m=t&c.W,g=h?o:o[e]||(o[e]={}),w=g.prototype,b=h?r:d?r[e]:(r[e]||{}).prototype;for(u in h&&(n=e),n)(f=!p&&b&&void 0!==b[u])&&s(g,u)||(l=f?b[u]:n[u],g[u]=h&&"function"!=typeof b[u]?n[u]:v&&f?i(l,r):m&&b[u]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):y&&"function"==typeof l?i(Function.call,l):l,y&&((g.virtual||(g.virtual={}))[u]=l,t&c.R&&w&&!w[u]&&a(w,u,l)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var r=n(64)("wks"),o=n(51),i=n(3).Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},function(t,e,n){var r=n(24);function o(t,e,n,o,i,a,s){try{var c=t[a](s),u=c.value}catch(t){return void n(t)}c.done?e(u):r.resolve(u).then(o,i)}t.exports=function(t){return function(){var e=this,n=arguments;return new r((function(r,i){var a=t.apply(e,n);function s(t){o(a,r,i,s,c,"next",t)}function c(t){o(a,r,i,s,c,"throw",t)}s(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(14);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=n(146)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return c}));var r=n(24),o=n.n(r),i=n(56);function a(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n={Accept:"application/json","Content-Type":"application/json"};e&&(n["X-SaaSquatch-User-Token"]=e);var r=i.get(t).withCredentials().set(n);return u(r).then((function(t){return t.headers["content-type"]&&f(t.headers["content-type"].toLowerCase(),"application/json")?JSON.parse(t.text):t.text}),(function(t){var e=t.response;throw JSON.parse(e.text)}))}function s(t,e,n){var r={Accept:"application/json","Content-Type":"application/json"};return n&&(r["X-SaaSquatch-User-Token"]=n),u(i.post(t).send(e).set(r)).then((function(t){var e=t.text;return e?JSON.parse(e):e}),(function(t){var e;try{e=JSON.parse(t.response.text)}catch(e){throw t||e}throw e}))}function c(t,e,n){var r={Accept:"application/json","Content-Type":"application/json","X-SaaSquatch-Referrer":window?window.location.href:""};return n&&(r["X-SaaSquatch-User-Token"]=n),u(i.put(t).withCredentials().send(e).set(r)).then((function(t){var e=t.text;return e?JSON.parse(e):e}),(function(t){var e;try{e=JSON.parse(t.response.text)}catch(e){throw t||e}throw e}))}function u(t){return new o.a((function(e,n){t.on("error",n),t.end((function(t,r){t?n(t):e(r)}))}))}function f(t,e,n){return"number"!=typeof n&&(n=0),!(n+e.length>t.length)&&-1!==t.indexOf(e,n)}},function(t,e,n){var r=n(12),o=n(79),i=n(61),a=Object.defineProperty;e.f=n(17)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(30)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(113),o=n(59);t.exports=function(t){return r(o(t))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return L}));var r=n(8),o=n.n(r),i=n(32),a=n.n(i),s=n(25),c=n.n(s),u=n(26),f=n.n(u),l=n(11),p=n.n(l),h=n(4),d=n.n(h),y=n(5),v=n.n(y),m=n(21),g=n.n(m),w=n(33),b=n.n(w),x=n(34),_=n.n(x),C=n(7),E=n.n(C),O=n(1),j=n.n(O),k=n(6),T=n.n(k),S=n(55),A=n(22);function P(t,e){var n=void 0!==c.a&&t[f.a]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return I(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return a()(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function R(t){var e=function(){if("undefined"==typeof Reflect||!o.a)return!1;if(o.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(o()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=E()(t);if(e){var i=E()(this).constructor;n=o()(r,arguments,i)}else n=r.apply(this,arguments);return _()(this,n)}}var F=T()("squatch-js:POPUPwidget"),L=function(t){b()(n,t);var e=R(n);function n(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".squatchpop";d()(this,n),r=e.call(this,t);try{r.triggerElement=document.querySelector(o),o&&!r.triggerElement&&F("No element found with trigger selector",o)}catch(t){F("Not a valid selector",o)}return r.triggerElement&&(r.triggerElement.onclick=function(){r.open()}),r.triggerWhenCTA=document.querySelector(".squatchpop"),"#cta"===o&&r.triggerWhenCTA&&(r.triggerWhenCTA.onclick=function(){r.open()}),r.popupdiv=document.createElement("div"),r.popupdiv.id="squatchModal",r.popupdiv.setAttribute("style","display: none; position: fixed; z-index: 1; padding-top: 5%; left: 0; top: -2000px; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.4);"),r.popupcontent=document.createElement("div"),r.popupcontent.setAttribute("style","margin: auto; width: 80%; max-width: 500px; position: relative;"),r.popupdiv.onclick=function(t){r._clickedOutside(t)},r}return v()(n,[{key:"load",value:function(){this.popupdiv.appendChild(this.popupcontent),document.body.appendChild(this.popupdiv),this.popupcontent.appendChild(this.frame);var t=this.frame.contentWindow.document;t.open(),t.write(this.content),t.write('<script src="'.concat(this.npmCdn,'/resize-observer-polyfill@1.5.x"><\/script>')),t.close(),F("Popup template loaded into iframe"),this._setupResizeHandler()}},{key:"_setupResizeHandler",value:function(){var t=this,e=this.popupdiv,n=this.frame,r=n.contentWindow;if(!r)throw new Error("Frame needs a content window");var o=r.document;Object(A.a)(o,p()(j.a.mark((function i(){var a;return j.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return o.body.style.overflowY="hidden",e.style.visibility="hidden",e.style.display="block",n.height="".concat(o.body.offsetHeight,"px"),a=new r.ResizeObserver((function(t){var r,o=P(t);try{for(o.s();!(r=o.n()).done;){var i=r.value,a=i.contentRect,s=a.top,c=a.bottom+s;n.height=c+"",i.target.style="",window.innerHeight>Number(n.height)?e.style.paddingTop="".concat((window.innerHeight-Number(n.height))/2,"px"):e.style.paddingTop="5px"}}catch(t){o.e(t)}finally{o.f()}})),i.t0=a,i.next=8,t._findInnerContainer();case 8:i.t1=i.sent,i.t0.observe.call(i.t0,i.t1);case 10:case"end":return i.stop()}}),i)}))))}},{key:"open",value:function(){var t=this,e=this.popupdiv,n=this.frame,r=n.contentWindow;if(!r)throw new Error("Squatch.js has an empty iframe");var o=r.document;Object(A.a)(o,(function(){var i,a=r.squatch||r.widgetIdent,s=o.getElementById("cta");s&&s.parentNode.removeChild(s),e.style.visibility="visible",e.style.top="0px",null===(i=n.contentDocument)||void 0===i||i.dispatchEvent(new CustomEvent("sq:refresh")),t._loadEvent(a),F("Popup opened")}))}},{key:"close",value:function(){this.popupdiv.style.visibility="hidden",this.popupdiv.style.top="-2000px",F("Popup closed")}},{key:"_clickedOutside",value:function(t){t.target===this.popupdiv&&this.close()}},{key:"_error",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"modal",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o="body { margin: 0; } .modal { box-shadow: none; border: 0; }";return g()(E()(n.prototype),"_error",this).call(this,t,e,r||o)}}]),n}(S.a)},function(t,e,n){var r=n(158),o=n(27),i=n(161);function a(e,n,s){return"undefined"!=typeof Reflect&&r?(t.exports=a=r,t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=a=function(t,e,n){var r=i(t,e);if(r){var a=o(r,e);return a.get?a.get.call(n):a.value}},t.exports.default=t.exports,t.exports.__esModule=!0),a(e,n,s||e)}t.exports=a,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.squatch=e():t.squatch=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=106)}([function(t,e){var n=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(t,e,n){t.exports=n(143)},function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){return u})),n.d(e,"d",(function(){return f})),n.d(e,"f",(function(){return l})),n.d(e,"e",(function(){return p}));var r=n(45),o=n.n(r),i=n(11),a=n.n(i);function s(t,e){if(!c(t))return!1;var n=a()(t);return Array.isArray(e)?e.reduce((function(t,e){return t&&n.indexOf(e)>=0}),!0):t.hasOwnProperty(e)}function c(t){return"object"===o()(t)}function u(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.forEach((function(e){if(!s(t,n))throw new Error(e+" is required")})),!0}function f(t){if(!c(t))throw new Error("config must be an object");if(!s(t,"tenantAlias")||"string"!=typeof t.tenantAlias)throw new Error("tenantAlias not provided");return{tenantAlias:t.tenantAlias,domain:s(t,"domain")&&"string"==typeof t.domain&&t.domain||"https://app.referralsaasquatch.com",debug:s(t,"debug")&&"boolean"==typeof t.debug&&t.debug||!1,npmCdn:s(t,"npmCdn")&&"string"==typeof t.npmCdn&&t.npmCdn||"https://fast.ssqt.io/npm"}}function l(t){if(!c(t))throw new Error("Widget properties must be an object");if(!u(t,"user"))throw new Error("Required properties missing.");return t}function p(t){if(!c(t))throw new Error("Widget properties must be an object");return t}},function(t,e,n){"use strict";(function(r){function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}e.log=function(){var t;return"object"===("undefined"==typeof console?"undefined":o(console))&&console.log&&(t=console).log.apply(t,arguments)},e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(r++,"%c"===t&&(o=r))})),e.splice(o,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){var t;try{t=e.storage.getItem("debug")}catch(t){}!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"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+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.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.exports=n(126)(e),t.exports.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this,n(125))},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(83);function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),r(t,o.key,o)}}t.exports=function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(100),o=n(167);function i(e){return t.exports=i=r?o:function(t){return t.__proto__||o(t)},t.exports.default=t.exports,t.exports.__esModule=!0,i(e)}t.exports=i,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){t.exports=n(155)},function(t,e,n){var r=n(4),o=n(0),i=n(32),a=n(28),s=n(22),c=function(t,e,n){var u,f,l,p=t&c.F,h=t&c.G,d=t&c.S,v=t&c.P,y=t&c.B,m=t&c.W,g=h?o:o[e]||(o[e]={}),w=g.prototype,b=h?r:d?r[e]:(r[e]||{}).prototype;for(u in h&&(n=e),n)(f=!p&&b&&void 0!==b[u])&&s(g,u)||(l=f?b[u]:n[u],g[u]=h&&"function"!=typeof b[u]?n[u]:y&&f?i(l,r):m&&b[u]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):v&&"function"==typeof l?i(Function.call,l):l,v&&((g.virtual||(g.virtual={}))[u]=l,t&c.R&&w&&!w[u]&&a(w,u,l)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var r=n(62)("wks"),o=n(51),i=n(4).Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},function(t,e,n){t.exports=n(108)},function(t,e,n){t.exports=n(113)},function(t,e,n){t.exports=n(118)},function(t,e,n){var r=n(29);function o(t,e,n,o,i,a,s){try{var c=t[a](s),u=c.value}catch(t){return void n(t)}c.done?e(u):r.resolve(u).then(o,i)}t.exports=function(t){return function(){var e=this,n=arguments;return new r((function(r,i){var a=t.apply(e,n);function s(t){o(a,r,i,s,c,"next",t)}function c(t){o(a,r,i,s,c,"throw",t)}s(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(18);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=n(120)},function(t,e,n){t.exports=n(148)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){"use strict";n.d(e,"d",(function(){return g})),n.d(e,"a",(function(){return w})),n.d(e,"b",(function(){return b})),n.d(e,"c",(function(){return x}));var r=n(11),o=n.n(r),i=n(12),a=n.n(i),s=n(13),c=n.n(s),u=n(16),f=n.n(u),l=n(21),p=n.n(l),h=n(29),d=n.n(h),v=n(49);function y(t,e){var n=o()(t);if(a.a){var r=a()(t);e&&(r=r.filter((function(e){return c()(t,e).enumerable}))),n.push.apply(n,r)}return n}function m(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach((function(e){p()(t,e,n[e])})):f.a?Object.defineProperties(t,f()(n)):y(Object(n)).forEach((function(e){Object.defineProperty(t,e,c()(n,e))}))}return t}function g(t,e,n,r){var o=m(m({Accept:"application/json"},r?{Authorization:"Bearer ".concat(r)}:{}),{},{"X-SaaSquatch-Referrer":window?window.location.href:""});return _(v.post(t).send({query:e,variables:n}).set(o)).then((function(t){return t}),(function(t){var e;try{e=JSON.parse(t.response.text)}catch(t){}throw e}))}function w(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n={Accept:"application/json","Content-Type":"application/json"};e&&(n["X-SaaSquatch-User-Token"]=e);var r=v.get(t).withCredentials().set(n);return _(r).then((function(t){return t.headers["content-type"]&&C(t.headers["content-type"].toLowerCase(),"application/json")?JSON.parse(t.text):t.text}),(function(t){var e=t.response;throw JSON.parse(e.text)}))}function b(t,e,n){var r={Accept:"application/json","Content-Type":"application/json"};return n&&(r["X-SaaSquatch-User-Token"]=n),_(v.post(t).send(e).set(r)).then((function(t){var e=t.text;return e?JSON.parse(e):e}),(function(t){var e;try{e=JSON.parse(t.response.text)}catch(e){throw t||e}throw e}))}function x(t,e,n){var r={Accept:"application/json","Content-Type":"application/json","X-SaaSquatch-Referrer":window?window.location.href:""};return n&&(r["X-SaaSquatch-User-Token"]=n),_(v.put(t).withCredentials().send(e).set(r)).then((function(t){var e=t.text;return e?JSON.parse(e):e}),(function(t){var e;try{e=JSON.parse(t.response.text)}catch(e){throw t||e}throw e}))}function _(t){return new d.a((function(e,n){t.on("error",n),t.end((function(t,r){t?n(t):e(r)}))}))}function C(t,e,n){return"number"!=typeof n&&(n=0),!(n+e.length>t.length)&&-1!==t.indexOf(e,n)}},function(t,e,n){var r=n(15),o=n(77),i=n(65),a=Object.defineProperty;e.f=n(24)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(83);t.exports=function(t,e,n){return e in t?r(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(110),o=n(58);t.exports=function(t){return r(o(t))}},function(t,e,n){t.exports=!n(34)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return F}));var r=n(8),o=n.n(r),i=n(35),a=n.n(i),s=n(30),c=n.n(s),u=n(31),f=n.n(u),l=n(14),p=n.n(l),h=n(5),d=n.n(h),v=n(6),y=n.n(v),m=n(26),g=n.n(m),w=n(36),b=n.n(w),x=n(37),_=n.n(x),C=n(7),O=n.n(C),E=n(1),j=n.n(E),T=n(3),k=n.n(T),S=n(57),A=n(27);function P(t,e){var n=void 0!==c.a&&t[f.a]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return I(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return a()(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function R(t){var e=function(){if("undefined"==typeof Reflect||!o.a)return!1;if(o.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(o()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=O()(t);if(e){var i=O()(this).constructor;n=o()(r,arguments,i)}else n=r.apply(this,arguments);return _()(this,n)}}var M=k()("squatch-js:POPUPwidget"),F=function(t){b()(n,t);var e=R(n);function n(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".squatchpop";d()(this,n),r=e.call(this,t);try{r.triggerElement=document.querySelector(o),o&&!r.triggerElement&&M("No element found with trigger selector",o)}catch(t){M("Not a valid selector",o)}return r.triggerElement&&(r.triggerElement.onclick=function(){r.open()}),r.triggerWhenCTA=document.querySelector(".squatchpop"),"#cta"===o&&r.triggerWhenCTA&&(r.triggerWhenCTA.onclick=function(){r.open()}),r.popupdiv=document.createElement("div"),r.popupdiv.id="squatchModal",r.popupdiv.setAttribute("style","display: none; position: fixed; z-index: 1; padding-top: 5%; left: 0; top: -2000px; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.4);"),r.popupcontent=document.createElement("div"),r.popupcontent.setAttribute("style","margin: auto; width: 80%; max-width: 500px; position: relative;"),r.popupdiv.onclick=function(t){r._clickedOutside(t)},r}return y()(n,[{key:"load",value:function(){this.popupdiv.appendChild(this.popupcontent),document.body.appendChild(this.popupdiv),this.popupcontent.appendChild(this.frame);var t=this.frame.contentWindow.document;t.open(),t.write(this.content),t.write('<script src="'.concat(this.npmCdn,'/resize-observer-polyfill@1.5.x"><\/script>')),t.close(),M("Popup template loaded into iframe"),this._setupResizeHandler()}},{key:"_setupResizeHandler",value:function(){var t=this,e=this.popupdiv,n=this.frame,r=n.contentWindow;if(!r)throw new Error("Frame needs a content window");var o=r.document;Object(A.a)(o,p()(j.a.mark((function i(){var a;return j.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return o.body.style.overflowY="hidden",e.style.visibility="hidden",e.style.display="block",n.height="".concat(o.body.offsetHeight,"px"),a=new r.ResizeObserver((function(t){var r,o=P(t);try{for(o.s();!(r=o.n()).done;){var i=r.value,a=i.contentRect,s=a.top,c=a.bottom+s;n.height=c+"",i.target.style="",window.innerHeight>Number(n.height)?e.style.paddingTop="".concat((window.innerHeight-Number(n.height))/2,"px"):e.style.paddingTop="5px"}}catch(t){o.e(t)}finally{o.f()}})),i.t0=a,i.next=8,t._findInnerContainer();case 8:i.t1=i.sent,i.t0.observe.call(i.t0,i.t1);case 10:case"end":return i.stop()}}),i)}))))}},{key:"open",value:function(){var t=this,e=this.popupdiv,n=this.frame,r=n.contentWindow;if(!r)throw new Error("Squatch.js has an empty iframe");var o=r.document;Object(A.a)(o,(function(){var i,a=r.squatch||r.widgetIdent,s=o.getElementById("cta");s&&s.parentNode.removeChild(s),e.style.visibility="visible",e.style.top="0px",null===(i=n.contentDocument)||void 0===i||i.dispatchEvent(new CustomEvent("sq:refresh")),t._loadEvent(a),M("Popup opened")}))}},{key:"close",value:function(){this.popupdiv.style.visibility="hidden",this.popupdiv.style.top="-2000px",M("Popup closed")}},{key:"_clickedOutside",value:function(t){t.target===this.popupdiv&&this.close()}},{key:"_error",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"modal",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o="body { margin: 0; } .modal { box-shadow: none; border: 0; }";return g()(O()(n.prototype),"_error",this).call(this,t,e,r||o)}}]),n}(S.a)},function(t,e,n){var r=n(160),o=n(13),i=n(163);function a(e,n,s){return"undefined"!=typeof Reflect&&r?(t.exports=a=r,t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=a=function(t,e,n){var r=i(t,e);if(r){var a=o(r,e);return a.get?a.get.call(n):a.value}},t.exports.default=t.exports,t.exports.__esModule=!0),a(e,n,s||e)}t.exports=a,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";
|
|
2
2
|
/*!
|
|
3
3
|
* domready (c) Dustin Diaz 2014 - License MIT
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
|
-
function r(t,e){var n,r=[],o=t,i=o.documentElement.doScroll,a=(i?/^loaded|^c/:/^loaded|^i|^c/).test(o.readyState);return a||o.addEventListener("DOMContentLoaded",n=function(){for(o.removeEventListener("DOMContentLoaded",n),a=!0;n=r.shift();)n()}),a?setTimeout(e,0):r.push(e)}n.d(e,"a",(function(){return r}))},function(t,e,n){var r=n(
|
|
6
|
+
function r(t,e){var n,r=[],o=t,i=o.documentElement.doScroll,a=(i?/^loaded|^c/:/^loaded|^i|^c/).test(o.readyState);return a||o.addEventListener("DOMContentLoaded",n=function(){for(o.removeEventListener("DOMContentLoaded",n),a=!0;n=r.shift();)n()}),a?setTimeout(e,0):r.push(e)}n.d(e,"a",(function(){return r}))},function(t,e,n){var r=n(20),o=n(42);t.exports=n(24)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){t.exports=n(128)},function(t,e,n){t.exports=n(144)},function(t,e,n){t.exports=n(147)},function(t,e,n){var r=n(33);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){t.exports=n(158)},function(t,e,n){var r=n(170),o=n(173);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=r(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(45).default,o=n(75);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?o(t):e},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r,o;
|
|
7
7
|
/*!
|
|
8
8
|
* JavaScript Cookie v2.2.1
|
|
9
9
|
* https://github.com/js-cookie/js-cookie
|
|
10
10
|
*
|
|
11
11
|
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
|
|
12
12
|
* Released under the MIT license
|
|
13
|
-
*/!function(i){if(void 0===(o="function"==typeof(r=i)?r.call(e,n,e,t):r)||(t.exports=o),!0,t.exports=i(),!!0){var a=window.Cookies,s=window.Cookies=i();s.noConflict=function(){return window.Cookies=a,s}}}((function(){function t(){for(var t=0,e={};t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function e(t){return t.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(e,n,i){if("undefined"!=typeof document){"number"==typeof(i=t({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(t){}n=r.write?r.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in i)i[c]&&(s+="; "+c,!0!==i[c]&&(s+="="+i[c].split(";")[0]));return document.cookie=e+"="+n+s}}function a(t,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var s=i[a].split("="),c=s.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=e(s[0]);if(c=(r.read||r)(c,u)||e(c),n)try{c=JSON.parse(c)}catch(t){}if(o[u]=c,t===u)break}catch(t){}}return t?o[t]:o}}return o.set=i,o.get=function(t){return a(t,!1)},o.getJSON=function(t){return a(t,!0)},o.remove=function(e,n){i(e,"",t(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(t,e){t.exports=!0},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports={}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(59);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(71),o=n(39),i=n(19),a=n(61),s=n(18),c=n(79),u=Object.getOwnPropertyDescriptor;e.f=n(17)?u:function(t,e){if(t=i(t),e=a(e,!0),c)try{return u(t,e)}catch(t){}if(s(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(25),o=n(26);function i(e){return"function"==typeof r&&"symbol"==typeof o?(t.exports=i=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=i=function(t){return t&&"function"==typeof r&&t.constructor===r&&t!==r.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),i(e)}t.exports=i,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return P}));var r=n(47),o=n.n(r),i=n(11),a=n.n(i),s=n(4),c=n.n(s),u=n(5),f=n.n(u),l=n(1),p=n.n(l),h=n(13),d=n.n(h),y=n(24),v=n.n(y),m=n(31),g=n.n(m),w=n(35),b=n.n(w),x=n(27),_=n.n(x),C=n(36),E=n.n(C),O=n(15),j=n(2),k=n(37),T=n.n(k);function S(t,e){var n=g()(t);if(b.a){var r=b()(t);e&&(r=r.filter((function(e){return _()(t,e).enumerable}))),n.push.apply(n,r)}return n}function A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?S(Object(n),!0).forEach((function(e){o()(t,e,n[e])})):E.a?Object.defineProperties(t,E()(n)):S(Object(n)).forEach((function(e){Object.defineProperty(t,e,_()(n,e))}))}return t}var P=function(){function t(e){c()(this,t);var n=e,r=Object(j.d)(n);this.tenantAlias=r.tenantAlias,this.domain=r.domain,this.npmCdn=r.npmCdn}var e;return f()(t,[{key:"cookieUser",value:function(t){var e=t.widgetType,n=t.engagementMedium,r=void 0===n?"POPUP":n,o=t.jwt,i=t.user,a=encodeURIComponent(this.tenantAlias),s=I({widgetType:e,engagementMedium:r}),c="/api/v1/".concat(a,"/widget/user/cookie_user").concat(s),u=this.domain+c;return Object(O.c)(u,d()(i||{}),o)}},{key:"upsertUser",value:function(t){var e=t,n=Object(j.e)(e),r=n.widgetType,o=n.engagementMedium,i=void 0===o?"POPUP":o,a=n.jwt,s=n.user,c=encodeURIComponent(this.tenantAlias),u=encodeURIComponent(s.accountId),f=encodeURIComponent(s.id),l=I({widgetType:r,engagementMedium:i}),p="/api/v1/".concat(c,"/widget/account/").concat(u,"/user/").concat(f,"/upsert").concat(l),h=this.domain+p,y=T.a.get("_saasquatch");return y&&(s.cookies=y),Object(O.c)(h,d()(s),a)}},{key:"render",value:function(t){var e=t,n=Object(j.e)(e),r=n.widgetType,o=n.engagementMedium,i=void 0===o?"POPUP":o,a=n.jwt,s=n.user,c=encodeURIComponent(this.tenantAlias),u=encodeURIComponent(s.accountId),f=encodeURIComponent(s.id),l=I({widgetType:r,engagementMedium:i}),p="/api/v1/".concat(c,"/widget/account/").concat(u,"/user/").concat(f,"/render").concat(l),h=this.domain+p;return Object(O.a)(h,a)}},{key:"invite",value:function(t){var e=t.emailList,n=void 0===e?[]:e,r=t.userId,o=t.accountId,i=t.tenantAlias,a=encodeURIComponent(i),s="/api/v1/".concat(a,"/mail/referralinvite"),c=this.domain+s,u={sendingAccountId:o,sendingUserId:r,recipients:n};return Object(O.b)(c,d()(u))}},{key:"squatchReferralCookie",value:(e=a()(p.a.mark((function t(){var e,n,r,o,i;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=encodeURIComponent(this.tenantAlias),n=T.a.get("_saasquatch")||"",r=n?"?cookies=".concat(encodeURIComponent(n)):"",o="".concat(this.domain,"/a/").concat(e,"/widgets/squatchcookiejson").concat(r),t.next=6,Object(O.a)(o);case 6:return i=t.sent,t.abrupt("return",v.a.resolve(A(A({},i),{},{encodedCookie:n})));case 8:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})}]),t}();function I(t){var e=t.widgetType,n=t.engagementMedium;return(e?"?widgetType=".concat(encodeURIComponent(e)):"")+"".concat(e?"&":"?","engagementMedium=").concat(encodeURIComponent(n))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return L}));var r=n(8),o=n.n(r),i=n(32),a=n.n(i),s=n(25),c=n.n(s),u=n(26),f=n.n(u),l=n(11),p=n.n(l),h=n(4),d=n.n(h),y=n(5),v=n.n(y),m=n(21),g=n.n(m),w=n(33),b=n.n(w),x=n(34),_=n.n(x),C=n(7),E=n.n(C),O=n(1),j=n.n(O),k=n(6),T=n.n(k),S=n(55),A=n(22);function P(t,e){var n=void 0!==c.a&&t[f.a]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return I(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return a()(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function R(t){var e=function(){if("undefined"==typeof Reflect||!o.a)return!1;if(o.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(o()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=E()(t);if(e){var i=E()(this).constructor;n=o()(r,arguments,i)}else n=r.apply(this,arguments);return _()(this,n)}}var F=T()("squatch-js:EMBEDwidget"),L=function(t){b()(r,t);var e,n=R(r);function r(t,e){var o,i;if(d()(this,r),o=n.call(this,t),"string"==typeof e?(i=document.querySelector(e),F("loading widget with selector",i)):e instanceof HTMLElement?F("loading widget with container",i=e):e?(i=null,F("container must be an HTMLElement or string",e)):(i=document.querySelector("#squatchembed")||document.querySelector(".squatchembed"),F("loading widget with default selector",i)),!(i instanceof HTMLElement))throw new Error("element with selector '".concat(e,"' not found.'"));return o.element=i,o}return v()(r,[{key:"load",value:(e=p()(j.a.mark((function t(){var e,n,r=this;return j.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.context.container?(this.element.style.visibility="hidden",this.element.style.height="0",this.element.style["overflow-y"]="hidden",this.element.firstChild?this.element.replaceChild(this.frame,this.element.firstChild):this.element.appendChild(this.frame)):this.element.firstChild&&"#text"!==this.element.firstChild.nodeName||this.element.appendChild(this.frame),e=this.frame.contentWindow){t.next=4;break}throw new Error("Frame needs a content window");case 4:(n=e.document).open(),n.write(this.content),n.write('<script src="'.concat(this.npmCdn,'/resize-observer-polyfill@1.5.x"><\/script>')),n.close(),Object(A.a)(n,p()(j.a.mark((function t(){var o,i,a;return j.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.squatch||e.widgetIdent,!(i=n.getElementById("cta"))){t.next=6;break}if(i.parentNode){t.next=5;break}throw new Error("ctaElement needs a parentNode");case 5:i.parentNode.removeChild(i);case 6:return r.frame.height=n.body.scrollHeight,a=new e.ResizeObserver((function(t){var e,n=P(t);try{for(n.s();!(e=n.n()).done;){var o=e.value.contentRect.height;r.frame.height=o}}catch(t){n.e(t)}finally{n.f()}})),t.t0=a,t.next=11,r._findInnerContainer();case 11:t.t1=t.sent,t.t0.observe.call(t.t0,t.t1),r.context.container||(r._loadEvent(o),F("loaded"));case 14:case"end":return t.stop()}}),t)}))));case 10:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"open",value:function(){var t,e,n,r,o,i;if(!this.frame)return F("no target element to open");this.element.style.visibility="unset",this.element.style.height="auto",this.element.style["overflow-y"]="auto",null===(t=this.frame)||void 0===t||null===(e=t.contentDocument)||void 0===e||e.dispatchEvent(new CustomEvent("sq:refresh"));var a=(null===(n=this.frame)||void 0===n||null===(r=n.contentWindow)||void 0===r?void 0:r.squatch)||(null===(o=this.frame)||void 0===o||null===(i=o.contentWindow)||void 0===i?void 0:i.widgetIdent);this._loadEvent(a),F("loaded")}},{key:"close",value:function(){if(!this.frame)return F("no target element to close");this.element.style.visibility="hidden",this.element.style.height="0",this.element.style["overflow-y"]="hidden",F("Embed widget closed")}},{key:"_error",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"embed",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return g()(E()(r.prototype),"_error",this).call(this,t,e,n)}}]),r}(S.a)},function(t,e,n){var r=n(94);t.exports=function(t,e,n){return e in t?r(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r;t.exports=((r=function(){this.listeners={}}).prototype={addEventListener:function(t,e,n){for(var r=[],o=arguments.length,i=0;i<o;i++)r.push(arguments[i]);r=r.length>3?r.splice(3,r.length-1):[],void 0!==this.listeners[t]?this.listeners[t].push({scope:n,callback:e,args:r}):this.listeners[t]=[{scope:n,callback:e,args:r}]},removeEventListener:function(t,e,n){if(void 0!==this.listeners[t]){for(var r=this.listeners[t].length,o=[],i=0;i<r;i++){var a=this.listeners[t][i];a.scope==n&&a.callback==e||o.push(a)}this.listeners[t]=o}},hasEventListener:function(t,e,n){if(void 0!==this.listeners[t]){var r=this.listeners[t].length;if(void 0===e&&void 0===n)return r>0;for(var o=0;o<r;o++){var i=this.listeners[t][o];if((!n||i.scope==n)&&i.callback==e)return!0}}return!1},dispatch:function(t,e){for(var n={type:t,target:e},r=[],o=arguments.length,i=0;i<o;i++)r.push(arguments[i]);if(r=r.length>2?r.splice(2,r.length-1):[],r=[n].concat(r),void 0!==this.listeners[t]){var a=this.listeners[t].slice(),s=a.length;for(i=0;i<s;i++){var c=a[i];if(c&&c.callback){var u=r.concat(c.args);c.callback.apply(c.scope,u)}}}},getEvents:function(){var t="";for(var e in this.listeners)for(var n=this.listeners[e].length,r=0;r<n;r++){var o=this.listeners[e][r];t+=o.scope&&o.scope.className?o.scope.className:"anonymous",t+=" listen for '"+e+"'\n"}return t}},new r)},function(t,e,n){var r=n(12),o=n(112),i=n(65),a=n(63)("IE_PROTO"),s=function(){},c=function(){var t,e=n(60)("iframe"),r=i.length;for(e.style.display="none",n(82).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=c(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(81),o=n(65);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(16).f,o=n(18),i=n(10)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(9),o=n(0),i=n(30);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i((function(){n(1)})),"Object",a)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return I}));var r=n(8),o=n.n(r),i=n(32),a=n.n(i),s=n(25),c=n.n(s),u=n(26),f=n.n(u),l=n(4),p=n.n(l),h=n(5),d=n.n(h),y=n(74),v=n.n(y),m=n(21),g=n.n(m),w=n(33),b=n.n(w),x=n(34),_=n.n(x),C=n(7),E=n.n(C),O=n(6),j=n(20),k=n(22);function T(t,e){var n=void 0!==c.a&&t[f.a]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return S(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return a()(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function A(t){var e=function(){if("undefined"==typeof Reflect||!o.a)return!1;if(o.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(o()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=E()(t);if(e){var i=E()(this).constructor;n=o()(r,arguments,i)}else n=r.apply(this,arguments);return _()(this,n)}}var P=O("squatch-js:CTAwidget"),I=function(t){b()(n,t);var e=A(n);function n(t,r){var o;p()(this,n),P("CTA constructor");var i=document.createElement("div");return i.id="cta",document.body.appendChild(i),o=e.call(this,t,"#cta"),r.side||r.position||(r.position="bottom",r.side="right"),"middle"===r.position?(o.position="top: 45%;",o.side="center"===r.side?"right: 45%;":"".concat(r.side,": -10px;")):(o.position="".concat(r.position,": -10px;"),o.side="center"===r.side?"right: 45%;":"".concat(r.side,": 20px;")),o.positionClass=r.position,o.ctaFrame=document.createElement("iframe"),o.ctaFrame.squatchJsApi=v()(o),o.ctaFrame.scrolling="no",o.ctaFrame.setAttribute("style","border:0; background-color:transparent; position:fixed; display:none;".concat(o.side).concat(o.position)),document.body.appendChild(o.ctaFrame),P("ctaframe appended to body"),o}return d()(n,[{key:"load",value:function(){var t=this;if(g()(E()(n.prototype),"load",this).call(this),!this.frame.contentWindow)throw new Error("frame requires a contentWindow");var e=this.frame.contentWindow.document,r=this.ctaFrame,o=this.positionClass;Object(k.a)(e,(function(){var n=e.getElementById("cta");if(n){if(!n.parentNode)throw new Error("ctaElement requires a parentNode");n.parentNode.removeChild(n);var i=r.contentWindow;if(!i)throw new Error("ctaFrame requires a contentWindow");var a=i.document;a.open(),a.write(n.innerHTML),a.write('<script src="'.concat(t.npmCdn,'/resize-observer-polyfill@1.5.x"><\/script>')),a.close(),Object(k.a)(a,(function(){var t=a.getElementsByClassName("cta-container")[0];t.style.position="fixed",r.height=t.offsetHeight,r.width=t.scrollWidth,r.style.display="block",t.classList.contains(o)||(t.className+=" ".concat(o)),new i.ResizeObserver((function(t){var e,n=T(t);try{for(n.s();!(e=n.n()).done;){var o=e.value.contentRect,i=o.height,a=o.width;r.height=i,r.width=a}}catch(t){n.e(t)}finally{n.f()}})).observe(t),P("CTA template loaded into iframe")}))}else P(new Error("CTA element not found in theme"))}))}},{key:"open",value:function(){g()(E()(n.prototype),"open",this).call(this)}},{key:"close",value:function(){g()(E()(n.prototype),"close",this).call(this)}}]),n}(j.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return x}));var r=n(11),o=n.n(r),i=n(4),a=n.n(i),s=n(5),c=n.n(s),u=n(24),f=n.n(u),l=n(1),p=n.n(l),h=n(6),d=n.n(h),y=n(13),v=n.n(y),m=n(15),g=n(2),w=function(){function t(e){a()(this,t);var n=e;Object(g.b)(n,"domain")&&"string"==typeof n.domain?this.domain=n.domain:this.domain="https://app.referralsaasquatch.com"}return c()(t,[{key:"pushAnalyticsLoadEvent",value:function(t){var e=encodeURIComponent(t.tenantAlias),n=encodeURIComponent(t.externalAccountId),r=encodeURIComponent(t.externalUserId),o=encodeURIComponent(t.engagementMedium),i=t.programId?"&programId=".concat(encodeURIComponent(t.programId)):"",a="/a/".concat(e,"/widgets/analytics/loaded?externalAccountId=").concat(n,"&externalUserId=").concat(r,"&engagementMedium=").concat(o).concat(i),s=this.domain+a;return Object(m.b)(s,v()({}))}},{key:"pushAnalyticsShareClickedEvent",value:function(t){var e=encodeURIComponent(t.tenantAlias),n=encodeURIComponent(t.externalAccountId),r=encodeURIComponent(t.externalUserId),o=encodeURIComponent(t.engagementMedium),i=encodeURIComponent(t.shareMedium),a="/a/".concat(e,"/widgets/analytics/shared?externalAccountId=").concat(n,"&externalUserId=").concat(r,"&engagementMedium=").concat(o,"&shareMedium=").concat(i),s=this.domain+a;return Object(m.b)(s,v()({}))}}]),t}(),b=d()("squatch-js:widget"),x=function(){function t(e){a()(this,t),b("widget initializing ..."),this.content="error"===e.content?this._error(e.rsCode):e.content,this.type=e.type,this.widgetApi=e.api,this.npmCdn=e.npmCdn,this.analyticsApi=new w({domain:e.domain}),this.frame=document.createElement("iframe"),this.frame.squatchJsApi=this,this.frame.width="100%",this.frame.scrolling="no",this.frame.setAttribute("style","border: 0; background-color: none; width: 1px; min-width: 100%;"),this.context=e.context}var e;return c()(t,[{key:"_loadEvent",value:function(t){if(t){if(!Object(g.c)(t))throw new Error("Widget Load event identity property is not an object");var e;if(Object(g.b)(t,"programId")){if(!Object(g.b)(t,["tenantAlias","accountId","userId","engagementMedium"]))throw new Error("Widget Load event missing required properties");e={tenantAlias:t.tenantAlias,externalAccountId:t.accountId,externalUserId:t.userId,engagementMedium:t.engagementMedium,programId:t.programId}}else{var n=t,r=n.analytics,o=n.mode;e={tenantAlias:r.attributes.tenant,externalAccountId:r.attributes.accountId,externalUserId:r.attributes.userId,engagementMedium:o.widgetMode}}this.analyticsApi.pushAnalyticsLoadEvent(e).then((function(t){b("".concat(e.engagementMedium," loaded event recorded."))})).catch((function(t){b(new Error("pushAnalyticsLoadEvent() ".concat(t)))}))}}},{key:"_shareEvent",value:function(t,e){t&&this.analyticsApi.pushAnalyticsShareClickedEvent({tenantAlias:t.analytics.attributes.tenant,externalAccountId:t.analytics.attributes.accountId,externalUserId:t.analytics.attributes.userId,engagementMedium:t.mode.widgetMode,shareMedium:e}).then((function(n){b("".concat(t.mode.widgetMode," share ").concat(e," event recorded. ").concat(n))})).catch((function(t){b(new Error("pushAnalyticsLoadEvent() ".concat(t)))}))}},{key:"_inviteContacts",value:function(t,e){t&&this.widgetApi.invite({tenantAlias:t.analytics.attributes.tenant,accountId:t.analytics.attributes.accountId,userId:t.analytics.attributes.userId,emailList:e}).then((function(t){b("Sent email invites to share ".concat(e,". ").concat(t))})).catch((function(t){b(new Error("invite() ".concat(t)))}))}},{key:"_error",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"modal",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r='<!DOCTYPE html>\n \x3c!--[if IE 7]><html class="ie7 oldie" lang="en"><![endif]--\x3e\n \x3c!--[if IE 8]><html class="ie8 oldie" lang="en"><![endif]--\x3e\n \x3c!--[if gt IE 8]>\x3c!--\x3e<html lang="en">\x3c!--<![endif]--\x3e\n <head>\n <link rel="stylesheet" media="all" href="https://fast.ssqt.io/assets/css/widget/errorpage.css">\n <style>\n '.concat(n,'\n </style>\n </head>\n <body>\n\n <div class="squatch-container ').concat(e,'" style="width:100%">\n <div class="errorheader">\n <button type="button" class="close" onclick="window.frameElement.squatchJsApi.close();">×</button>\n <p class="errortitle">Error</p>\n </div>\n <div class="errorbody">\n <div class="sadface"><img src="https://fast.ssqt.io/assets/images/face.png"></div>\n <h4>Our referral program is temporarily unavailable.</h4><br>\n <p>Please reload the page or check back later.</p>\n <p>If the persists please contact our support team.</p>\n <br>\n <br>\n <div class="right-align errtxt">\n Error Code: ').concat(t,"\n </div>\n </div>\n </div>\n </body>\n </html>");return r}},{key:"_findInnerContainer",value:(e=o()(p.a.mark((function t(){var e,n,r,o,i;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=function(){var t=n.getElementsByTagName("sqh-global-container"),e=n.getElementsByClassName("squatch-container");return t.length>0?t[0]:e.length>0?e[0]:null},e=this.frame.contentWindow){t.next=4;break}throw new Error("Squatch.js frame inner frame is empty");case 4:n=e.document,o=null,i=0;case 7:if(!(i<5)){t.next=16;break}if(!(o=r())){t.next=11;break}return t.abrupt("break",16);case 11:return t.next=13,_(100);case 13:i++,t.next=7;break;case 16:if(o){t.next=18;break}return t.abrupt("return",n.body);case 18:return t.abrupt("return",o);case 19:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"reload",value:function(t,e){var n=this,r=t.email,o=t.firstName,i=t.lastName,a=this.frame.contentWindow,s=this.context.engagementMedium||"POPUP";if(!a)throw new Error("Frame needs a content window");var c,u=a.document;if("upsert"===this.context.type){var f={email:r||null,firstName:o||null,lastName:i||null,id:this.context.user.id,accountId:this.context.user.accountId};c=this.widgetApi.upsertUser({user:f,engagementMedium:s,widgetType:this.type,jwt:e})}else{if("cookie"!==this.context.type)throw new Error("can't reload an error widget");var l={email:r||null,firstName:o||null,lastName:i||null};c=this.widgetApi.cookieUser({user:l,engagementMedium:s,widgetType:this.type,jwt:e})}c.then((function(t){var e=t.template;if(e){n.content=e;var o=u.createElement("button"),i=u.getElementsByClassName("squatch-register")[0];if(i){o.className="btn btn-primary",o.id="show-stats-btn",o.textContent="REFERRER_WIDGET"===n.type?"Show Stats":"Show Reward";var a="POPUP"===s?"margin-top: 10px; max-width: 130px; width: 100%;":"margin-top: 10px;";o.setAttribute("style",a),o.onclick=function(){n.load(),"POPUP"===s&&n.open()},i.style.paddingTop="30px",i.innerHTML="<p><strong>".concat(r,"</strong><br>Has been successfully registered</p>"),i.appendChild(o)}}})).catch((function(t){var e=t.message;b("".concat(e))}))}}]),t}();function _(t){return new f.a((function(e,n){setTimeout((function(){e()}),t)}))}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o;"undefined"!=typeof window?o=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),o=void 0):o=self;var i=n(147),a=n(148),s=n(149),c=n(98),u=n(150),f=n(152);function l(){}t.exports=function(t,n){return"function"==typeof n?new e.Request("GET",t).end(n):1===arguments.length?new e.Request("GET",t):new e.Request(t,n)};var p=e=t.exports;e.Request=w,p.getXHR=function(){if(o.XMLHttpRequest&&(!o.location||"file:"!==o.location.protocol||!o.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}throw new Error("Browser-only version of superagent could not find XHR")};var h="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};function d(t){if(!c(t))return t;var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&y(e,n,t[n]);return e.join("&")}function y(t,e,n){if(void 0!==n)if(null!==n)if(Array.isArray(n))n.forEach((function(n){y(t,e,n)}));else if(c(n))for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&y(t,"".concat(e,"[").concat(r,"]"),n[r]);else t.push(encodeURI(e)+"="+encodeURIComponent(n));else t.push(encodeURI(e))}function v(t){for(var e,n,r={},o=t.split("&"),i=0,a=o.length;i<a;++i)-1===(n=(e=o[i]).indexOf("="))?r[decodeURIComponent(e)]="":r[decodeURIComponent(e.slice(0,n))]=decodeURIComponent(e.slice(n+1));return r}function m(t){return/[/+]json($|[^-\w])/.test(t)}function g(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var e=this.xhr.status;1223===e&&(e=204),this._setStatusProperties(e),this.headers=function(t){for(var e,n,r,o,i=t.split(/\r?\n/),a={},s=0,c=i.length;s<c;++s)-1!==(e=(n=i[s]).indexOf(":"))&&(r=n.slice(0,e).toLowerCase(),o=h(n.slice(e+1)),a[r]=o);return a}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function w(t,e){var n=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",(function(){var t,e=null,r=null;try{r=new g(n)}catch(t){return(e=new Error("Parser is unable to parse the response")).parse=!0,e.original=t,n.xhr?(e.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,e.status=n.xhr.status?n.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),n.callback(e)}n.emit("response",r);try{n._isResponseOK(r)||(t=new Error(r.statusText||r.text||"Unsuccessful HTTP response"))}catch(e){t=e}t?(t.original=e,t.response=r,t.status=r.status,n.callback(t,r)):n.callback(null,r)}))}function b(t,e,n){var r=p("DELETE",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}p.serializeObject=d,p.parseString=v,p.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},p.serialize={"application/x-www-form-urlencoded":d,"application/json":a},p.parse={"application/x-www-form-urlencoded":v,"application/json":JSON.parse},u(g.prototype),g.prototype._parseBody=function(t){var e=p.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&m(this.type)&&(e=p.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},g.prototype.toError=function(){var t=this.req,e=t.method,n=t.url,r="cannot ".concat(e," ").concat(n," (").concat(this.status,")"),o=new Error(r);return o.status=this.status,o.method=e,o.url=n,o},p.Response=g,i(w.prototype),s(w.prototype),w.prototype.type=function(t){return this.set("Content-Type",p.types[t]||t),this},w.prototype.accept=function(t){return this.set("Accept",p.types[t]||t),this},w.prototype.auth=function(t,e,n){1===arguments.length&&(e=""),"object"===r(e)&&null!==e&&(n=e,e=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});var o=function(t){if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(t,e,n,o)},w.prototype.query=function(t){return"string"!=typeof t&&(t=d(t)),t&&this._query.push(t),this},w.prototype.attach=function(t,e,n){if(e){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,n||e.name)}return this},w.prototype._getFormData=function(){return this._formData||(this._formData=new o.FormData),this._formData},w.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();var n=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),n(t,e)},w.prototype.crossDomainError=function(){var t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},w.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},w.prototype.ca=w.prototype.agent,w.prototype.buffer=w.prototype.ca,w.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},w.prototype.pipe=w.prototype.write,w.prototype._isHost=function(t){return t&&"object"===r(t)&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},w.prototype.end=function(t){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||l,this._finalizeQueryString(),this._end()},w.prototype._setUploadTimeout=function(){var t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},w.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var t=this;this.xhr=p.getXHR();var e=this.xhr,n=this._formData||this._data;this._setTimeouts(),e.onreadystatechange=function(){var n=e.readyState;if(n>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4===n){var r;try{r=e.status}catch(t){r=0}if(!r){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}};var r=function(e,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(t._uploadTimeoutTimer)),n.direction=e,t.emit("progress",n)};if(this.hasListeners("progress"))try{e.addEventListener("progress",r.bind(null,"download")),e.upload&&e.upload.addEventListener("progress",r.bind(null,"upload"))}catch(t){}e.upload&&this._setUploadTimeout();try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var o=this._header["content-type"],i=this._serializer||p.serialize[o?o.split(";")[0]:""];!i&&m(o)&&(i=p.serialize["application/json"]),i&&(n=i(n))}for(var a in this.header)null!==this.header[a]&&Object.prototype.hasOwnProperty.call(this.header,a)&&e.setRequestHeader(a,this.header[a]);this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0===n?null:n)},p.agent=function(){return new f},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(t){f.prototype[t.toLowerCase()]=function(e,n){var r=new p.Request(t,e);return this._setDefaults(r),n&&r.end(n),r}})),f.prototype.del=f.prototype.delete,p.get=function(t,e,n){var r=p("GET",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},p.head=function(t,e,n){var r=p("HEAD",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},p.options=function(t,e,n){var r=p("OPTIONS",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},p.del=b,p.delete=b,p.patch=function(t,e,n){var r=p("PATCH",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},p.post=function(t,e,n){var r=p("POST",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},p.put=function(t,e,n){var r=p("PUT",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}},function(t,e,n){"use strict";var r=n(110)(!0);n(78)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(14),o=n(3).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(14);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(58),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(64)("keys"),o=n(51);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(0),o=n(3),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(38)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(18),o=n(42),i=n(63)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){"use strict";var r=n(29);function o(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},function(t,e,n){e.f=n(10)},function(t,e,n){var r=n(3),o=n(0),i=n(38),a=n(68),s=n(16).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(81),o=n(65).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));var r=n(11),o=n.n(r),i=n(4),a=n.n(i),s=n(5),c=n.n(s),u=n(1),f=n.n(u),l=n(6),p=n.n(l),h=n(48),d=n(45),y=n(46),v=n(20),m=n(54),g=n(2),w=p()("squatch-js:widgets"),b=function(){function t(e){a()(this,t);var n=e,r=Object(g.d)(n);this.tenantAlias=r.tenantAlias,this.domain=r.domain,this.npmCdn=r.npmCdn,this.eventBus=h,this.api=new d.a(r),h.addEventListener("submit_email",t._cb)}var e,n,r;return c()(t,[{key:"createCookieUser",value:(r=o()(f.a.mark((function t(e){var n;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.api.cookieUser(e);case 3:return n=t.sent,t.abrupt("return",{widget:this._renderWidget(n,e,{type:"cookie",engagementMedium:e.engagementMedium}),user:n.user});case 7:throw t.prev=7,t.t0=t.catch(0),w(t.t0),t.t0.apiErrorCode&&this._renderErrorWidget(t.t0,e.engagementMedium),t.t0;case 12:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return r.apply(this,arguments)})},{key:"upsertUser",value:(n=o()(f.a.mark((function t(e){var n,r,o;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e,r=Object(g.e)(n),t.prev=2,t.next=5,this.api.upsertUser(r);case 5:return o=t.sent,t.abrupt("return",{widget:this._renderWidget(o,r,{type:"upsert",user:r.user,engagementMedium:e.engagementMedium,container:e.container,trigger:e.trigger}),user:o.user});case 9:throw t.prev=9,t.t0=t.catch(2),w(t.t0),t.t0.apiErrorCode&&this._renderErrorWidget(t.t0,e.engagementMedium),t.t0;case 14:case"end":return t.stop()}}),t,this,[[2,9]])}))),function(t){return n.apply(this,arguments)})},{key:"render",value:(e=o()(f.a.mark((function t(e){var n,r,o;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e,r=Object(g.e)(n),t.prev=2,t.next=5,this.api.cookieUser(r);case 5:return o=t.sent,t.abrupt("return",{widget:this._renderWidget({template:o},r,{type:"cookie",engagementMedium:r.engagementMedium}),user:o.user});case 9:throw t.prev=9,t.t0=t.catch(2),t.t0.apiErrorCode&&this._renderErrorWidget(t.t0,r.engagementMedium),t.t0;case 13:case"end":return t.stop()}}),t,this,[[2,9]])}))),function(t){return e.apply(this,arguments)})},{key:"autofill",value:function(t){var e=t;if("function"!=typeof e){if("string"!=typeof e)throw new Error("Autofill accepts a string or function");var n,r=document.querySelectorAll(e);if(!(r.length>0))throw w("Element id/class or function missing"),new Error("Element id/class or function missing");n=r[0],this.api.squatchReferralCookie().then((function(t){var e=t.code;n.value=e})).catch((function(t){throw t}))}else this.api.squatchReferralCookie().then((function(){return e.apply(void 0,arguments)})).catch((function(t){throw w("Autofill error",t),t}))}},{key:"submitEmail",value:function(e){h.removeEventListener("submit_email",t._cb),h.addEventListener("submit_email",e)}},{key:"_renderWidget",value:function(e,n,r){if(w("Rendering Widget..."),!e)throw new Error("Unable to get a response");var o,i=!1,a=!1,s=e.jsOptions||"",c={content:e.template,type:n.widgetType||s.widget.defaultWidgetType,api:this.api,domain:this.domain,npmCdn:this.npmCdn,context:r};if(s.widgetUrlMappings&&s.widgetUrlMappings.forEach((function(n){t._matchesUrl(n.url)&&("CONVERSION_WIDGET"!==n.widgetType||e.user.referredBy&&e.user.referredBy.code?(i=n.displayOnLoad,a=n.showAsCTA,w("Display ".concat(n.widgetType," on ").concat(n.url))):w("Don't display ".concat(n.widgetType," when no referral on widget rule match ").concat(n.url)))})),s.conversionUrls&&s.conversionUrls.forEach((function(n){e.user.referredBy&&t._matchesUrl(n)&&w("This is a conversion URL",n)})),s.fuelTankAutofillUrls&&(w("We found a fuel tank autofill!"),s.fuelTankAutofillUrls.forEach((function(n){var r=n.url,o=n.formSelector;if(t._matchesUrl(r)&&(w("Fuel Tank URL matches"),e.user.referredBy&&e.user.referredBy.code)){var i=document.querySelector(o);i?i.value=e.user.referredBy.referredReward.fuelTankCode||"":w(new Error("Element with id/class ".concat(o," was not found.")))}}))),a||"EMBED"!==n.engagementMedium)if(a||"POPUP"!==n.engagementMedium)if(a){w("display CTA");var u=s.cta.content.buttonSide,f=s.cta.content.buttonPosition;(o=new m.a(c,{side:u,position:f})).load(),i&&o.open()}else w("display popup on load"),(o=new v.a(c)).load(),i&&o.open();else(o=new v.a(c,c.context.trigger)).load(),i&&o.open();else(o=new y.a(c,c.context.container)).load();return o}},{key:"_renderErrorWidget",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"POPUP",n=t.apiErrorCode,r=t.rsCode,o=t.message;w(new Error("".concat(n," (").concat(r,") ").concat(o)));var i={content:"error",rsCode:r,api:this.api,domain:this.domain,npmCdn:this.npmCdn,type:"ERROR_WIDGET",context:{type:"error"}};"EMBED"===e?new y.a(i).load():"POPUP"===e&&new v.a(i).load()}}],[{key:"_matchesUrl",value:function(t){return!!window.location.href.match(new RegExp(t))}},{key:"_cb",value:function(t,e,n){var r;r="string"==typeof n||n instanceof String?{email:n}:n,e.reload(r)}}]),t}()},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){},function(t,e,n){"use strict";function r(){console.log("Having trouble using Squatch.js? Go to https://docs.referralsaasquatch.com/developer/ for tutorials, references and error codes.")}n.d(e,"a",(function(){return r}))},function(t,e){},function(t,e,n){"use strict";var r=n(38),o=n(9),i=n(80),a=n(23),s=n(40),c=n(111),u=n(52),f=n(66),l=n(10)("iterator"),p=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,d,y,v,m){c(n,e,d);var g,w,b,x=function(t){if(!p&&t in O)return O[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},_=e+" Iterator",C="values"==y,E=!1,O=t.prototype,j=O[l]||O["@@iterator"]||y&&O[y],k=j||x(y),T=y?C?x("entries"):k:void 0,S="Array"==e&&O.entries||j;if(S&&(b=f(S.call(new t)))!==Object.prototype&&b.next&&(u(b,_,!0),r||"function"==typeof b[l]||a(b,l,h)),C&&j&&"values"!==j.name&&(E=!0,k=function(){return j.call(this)}),r&&!m||!p&&!E&&O[l]||a(O,l,k),s[e]=k,s[_]=h,y)if(g={values:C?k:x("values"),keys:v?k:x("keys"),entries:T},m)for(w in g)w in O||i(O,w,g[w]);else o(o.P+o.F*(p||E),e,g);return g}},function(t,e,n){t.exports=!n(17)&&!n(30)((function(){return 7!=Object.defineProperty(n(60)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){t.exports=n(23)},function(t,e,n){var r=n(18),o=n(19),i=n(114)(!1),a=n(63)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},function(t,e,n){var r=n(3).document;t.exports=r&&r.documentElement},function(t,e,n){n(116);for(var r=n(3),o=n(23),i=n(40),a=n(10)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<s.length;c++){var u=s[c],f=r[u],l=f&&f.prototype;l&&!l[a]&&o(l,a,u),i[u]=i.Array}},function(t,e,n){var r=n(41),o=n(10)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(12);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){var r=n(40),o=n(10)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,e,n){var r=n(84),o=n(10)("iterator"),i=n(40);t.exports=n(0).getIteratorMethod=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){var r=n(12),o=n(29),i=n(10)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},function(t,e,n){var r,o,i,a=n(28),s=n(90),c=n(82),u=n(60),f=n(3),l=f.process,p=f.setImmediate,h=f.clearImmediate,d=f.MessageChannel,y=f.Dispatch,v=0,m={},g=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},w=function(t){g.call(t.data)};p&&h||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++v]=function(){s("function"==typeof t?t:Function(t),e)},r(v),v},h=function(t){delete m[t]},"process"==n(41)(l)?r=function(t){l.nextTick(a(g,t,1))}:y&&y.now?r=function(t){y.now(a(g,t,1))}:d?(i=(o=new d).port2,o.port1.onmessage=w,r=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",w,!1)):r="onreadystatechange"in u("script")?function(t){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),g.call(t)}}:function(t){setTimeout(a(g,t,1),0)}),t.exports={set:p,clear:h}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(12),o=n(14),i=n(67);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){var r=n(10)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(t){}return n}},function(t,e,n){t.exports=n(128)},function(t,e,n){"use strict";var r=n(3),o=n(18),i=n(17),a=n(9),s=n(80),c=n(132).KEY,u=n(30),f=n(64),l=n(52),p=n(51),h=n(10),d=n(68),y=n(69),v=n(133),m=n(134),g=n(12),w=n(14),b=n(42),x=n(19),_=n(61),C=n(39),E=n(49),O=n(96),j=n(43),k=n(70),T=n(16),S=n(50),A=j.f,P=T.f,I=O.f,R=r.Symbol,F=r.JSON,L=F&&F.stringify,M=h("_hidden"),q=h("toPrimitive"),U={}.propertyIsEnumerable,N=f("symbol-registry"),D=f("symbols"),W=f("op-symbols"),H=Object.prototype,B="function"==typeof R&&!!k.f,z=r.QObject,J=!z||!z.prototype||!z.prototype.findChild,G=i&&u((function(){return 7!=E(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=A(H,e);r&&delete H[e],P(t,e,n),r&&t!==H&&P(H,e,r)}:P,X=function(t){var e=D[t]=E(R.prototype);return e._k=t,e},$=B&&"symbol"==typeof R.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof R},K=function(t,e,n){return t===H&&K(W,e,n),g(t),e=_(e,!0),g(n),o(D,e)?(n.enumerable?(o(t,M)&&t[M][e]&&(t[M][e]=!1),n=E(n,{enumerable:C(0,!1)})):(o(t,M)||P(t,M,C(1,{})),t[M][e]=!0),G(t,e,n)):P(t,e,n)},V=function(t,e){g(t);for(var n,r=v(e=x(e)),o=0,i=r.length;i>o;)K(t,n=r[o++],e[n]);return t},Q=function(t){var e=U.call(this,t=_(t,!0));return!(this===H&&o(D,t)&&!o(W,t))&&(!(e||!o(this,t)||!o(D,t)||o(this,M)&&this[M][t])||e)},Y=function(t,e){if(t=x(t),e=_(e,!0),t!==H||!o(D,e)||o(W,e)){var n=A(t,e);return!n||!o(D,e)||o(t,M)&&t[M][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=I(x(t)),r=[],i=0;n.length>i;)o(D,e=n[i++])||e==M||e==c||r.push(e);return r},tt=function(t){for(var e,n=t===H,r=I(n?W:x(t)),i=[],a=0;r.length>a;)!o(D,e=r[a++])||n&&!o(H,e)||i.push(D[e]);return i};B||(s((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===H&&e.call(W,n),o(this,M)&&o(this[M],t)&&(this[M][t]=!1),G(this,t,C(1,n))};return i&&J&&G(H,t,{configurable:!0,set:e}),X(t)}).prototype,"toString",(function(){return this._k})),j.f=Y,T.f=K,n(72).f=O.f=Z,n(71).f=Q,k.f=tt,i&&!n(38)&&s(H,"propertyIsEnumerable",Q,!0),d.f=function(t){return X(h(t))}),a(a.G+a.W+a.F*!B,{Symbol:R});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)h(et[nt++]);for(var rt=S(h.store),ot=0;rt.length>ot;)y(rt[ot++]);a(a.S+a.F*!B,"Symbol",{for:function(t){return o(N,t+="")?N[t]:N[t]=R(t)},keyFor:function(t){if(!$(t))throw TypeError(t+" is not a symbol!");for(var e in N)if(N[e]===t)return e},useSetter:function(){J=!0},useSimple:function(){J=!1}}),a(a.S+a.F*!B,"Object",{create:function(t,e){return void 0===e?E(t):V(E(t),e)},defineProperty:K,defineProperties:V,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Z,getOwnPropertySymbols:tt});var it=u((function(){k.f(1)}));a(a.S+a.F*it,"Object",{getOwnPropertySymbols:function(t){return k.f(b(t))}}),F&&a(a.S+a.F*(!B||u((function(){var t=R();return"[null]"!=L([t])||"{}"!=L({a:t})||"{}"!=L(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(w(e)||void 0!==t)&&!$(t))return m(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!$(e))return e}),r[1]=e,L.apply(F,r)}}),R.prototype[q]||n(23)(R.prototype,q,R.prototype.valueOf),l(R,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,e,n){var r=n(19),o=n(72).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return a.slice()}}(t):o(r(t))}},function(t,e,n){"use strict";var r=n(16),o=n(39);t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return null!==t&&"object"===r(t)}},function(t,e,n){t.exports=n(162)},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(4),o=n.n(r),i=n(5),a=n.n(i),s=n(13),c=n.n(s),u=n(15),f=n(2),l=function(){function t(e){o()(this,t);var n=e,r=Object(f.d)(n);this.tenantAlias=r.tenantAlias,this.domain=r.domain}return a()(t,[{key:"track",value:function(t,e){var n=e,r=function(t){if(!Object(f.a)(t,"accountId","events","userId"))throw new Error("Fields required");if(!Array.isArray(t.events))throw new Error("'events' should be an array");return t}(t),o=function(t){if(!Object(f.c)(t))throw new Error("'options' should be an object");return t}(n).jwt,i=encodeURIComponent(this.tenantAlias),a=encodeURIComponent(r.userId),s=encodeURIComponent(r.accountId),l="/api/v1/".concat(i,"/open/account/").concat(s,"/user/").concat(a,"/events"),p=this.domain+l;return Object(u.b)(p,c()(r),o)}}]),t}()},function(t,e,n){t.exports=n(172)},function(t,e,n){"use strict";function r(){var t=window.squatch||null,e=window._squatch||null;if(t&&e){(e.ready||[]).forEach((function(t){return setTimeout((function(){return t()}),0)})),window._squatch=void 0;try{delete window._squatch}catch(t){throw t}}}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return I}));var r=n(31),o=n.n(r),i=n(35),a=n.n(i),s=n(27),c=n.n(s),u=n(36),f=n.n(u),l=n(47),p=n.n(l),h=n(44),d=n.n(h),y=n(101),v=n.n(y),m=n(13),g=n.n(m),w=n(6),b=n.n(w),x=n(37),_=n.n(x),C={};try{!function(t,e){if("+"!==new t("q=%2B").get("q")||"+"!==new t({q:"+"}).get("q")||"+"!==new t([["q","+"]]).get("q")||"q=%0A"!==new t("q=\n").toString()||"q=+%26"!==new t({q:" &"}).toString()||"q=%25zx"!==new t({q:"%zx"}).toString())throw t;C.URLSearchParams=t}(URLSearchParams)}catch(t){!function(t,e,n){var r=t.create,o=t.defineProperty,i=/[!'\(\)~]|%20|%00/g,a=/%(?![0-9a-fA-F]{2})/g,s=/\+/g,c={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"},u={append:function(t,e){h(this._ungap,t,e)},delete:function(t){delete this._ungap[t]},get:function(t){return this.has(t)?this._ungap[t][0]:null},getAll:function(t){return this.has(t)?this._ungap[t].slice(0):[]},has:function(t){return t in this._ungap},set:function(t,n){this._ungap[t]=[e(n)]},forEach:function(t,n){var r=this;for(var o in r._ungap)r._ungap[o].forEach(i,o);function i(i){t.call(n,i,e(o),r)}},toJSON:function(){return{}},toString:function(){var t=[];for(var e in this._ungap)for(var n=y(e),r=0,o=this._ungap[e];r<o.length;r++)t.push(n+"="+y(o[r]));return t.join("&")}};for(var f in u)o(l.prototype,f,{configurable:!0,writable:!0,value:u[f]});function l(t){var e=r(null);switch(o(this,"_ungap",{value:e}),!0){case!t:break;case"string"==typeof t:"?"===t.charAt(0)&&(t=t.slice(1));for(var i=t.split("&"),a=0,s=i.length;a<s;a++){var c=(u=i[a]).indexOf("=");-1<c?h(e,d(u.slice(0,c)),d(u.slice(c+1))):u.length&&h(e,d(u),"")}break;case n(t):for(a=0,s=t.length;a<s;a++){var u;h(e,(u=t[a])[0],u[1])}break;case"forEach"in t:t.forEach(p,e);break;default:for(var f in t)h(e,f,t[f])}}function p(t,e){h(this,e,t)}function h(t,e,r){var o=n(r)?r.join(","):r;e in t?t[e].push(o):t[e]=[o]}function d(t){return decodeURIComponent(t.replace(a,"%25").replace(s," "))}function y(t){return encodeURIComponent(t).replace(i,v)}function v(t){return c[t]}C.URLSearchParams=l}(Object,String,Array.isArray)}!function(t){var e=!1;try{e=!!Symbol.iterator}catch(t){}function n(t,n){var r=[];return t.forEach(n,r),e?r[Symbol.iterator]():{next:function(){var t=r.shift();return{done:void 0===t,value:t}}}}"forEach"in t||(t.forEach=function(t,e){var n=this,r=Object.create(null);this.toString().replace(/=[\s\S]*?(?:&|$)/g,"=").split("=").forEach((function(o){o.length&&!(o in r)&&(r[o]=n.getAll(o)).forEach((function(r){t.call(e,r,o,n)}))}))}),"keys"in t||(t.keys=function(){return n(this,(function(t,e){this.push(e)}))}),"values"in t||(t.values=function(){return n(this,(function(t,e){this.push(t)}))}),"entries"in t||(t.entries=function(){return n(this,(function(t,e){this.push([e,t])}))}),e&&!(Symbol.iterator in t)&&(t[Symbol.iterator]=t.entries),"sort"in t||(t.sort=function(){for(var t,e,n,r=this.entries(),o=r.next(),i=o.done,a=[],s=Object.create(null);!i;)e=(n=o.value)[0],a.push(e),e in s||(s[e]=[]),s[e].push(n[1]),i=(o=r.next()).done;for(a.sort(),t=0;t<a.length;t++)this.delete(a[t]);for(t=0;t<a.length;t++)e=a[t],this.append(e,s[e].shift())}),function(e){var n=e.defineProperty,r=e.getOwnPropertyDescriptor,o=function(e){var n=e.append;e.append=t.append,URLSearchParams.call(e,e._usp.search.slice(1)),e.append=n},i=function(t,e){if(!(t instanceof e))throw new TypeError("'searchParams' accessed on an object that does not implement interface "+e.name)},a=function(a){var s,c,u=a.prototype,f=r(u,"searchParams"),l=r(u,"href"),p=r(u,"search");!f&&p&&p.set&&(c=function(e){function r(n,r){t.append.call(this,n,r),n=this.toString(),e.set.call(this._usp,n?"?"+n:"")}function o(n){t.delete.call(this,n),n=this.toString(),e.set.call(this._usp,n?"?"+n:"")}function i(n,r){t.set.call(this,n,r),n=this.toString(),e.set.call(this._usp,n?"?"+n:"")}return function(t,e){return t.append=r,t.delete=o,t.set=i,n(t,"_usp",{configurable:!0,writable:!0,value:e})}}(p),s=function(t,e){return n(t,"_searchParams",{configurable:!0,writable:!0,value:c(e,t)}),e},e.defineProperties(u,{href:{get:function(){return l.get.call(this)},set:function(t){var e=this._searchParams;l.set.call(this,t),e&&o(e)}},search:{get:function(){return p.get.call(this)},set:function(t){var e=this._searchParams;p.set.call(this,t),e&&o(e)}},searchParams:{get:function(){return i(this,a),this._searchParams||s(this,new URLSearchParams(this.search.slice(1)))},set:function(t){i(this,a),s(this,t)}}}))};try{a(HTMLAnchorElement),/^function|object$/.test(typeof URL)&&URL.prototype&&a(URL)}catch(t){}}(Object)}(C.URLSearchParams.prototype);var E=C.URLSearchParams;function O(t,e){var n=o()(t);if(a.a){var r=a()(t);e&&(r=r.filter((function(e){return c()(t,e).enumerable}))),n.push.apply(n,r)}return n}function j(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?O(Object(n),!0).forEach((function(e){p()(t,e,n[e])})):f.a?Object.defineProperties(t,f()(n)):O(Object(n)).forEach((function(e){Object.defineProperty(t,e,c()(n,e))}))}return t}var k=b()("squatch-js"),T=function(t){return"object"===d()(t)&&!Array.isArray(t)},S=function t(e,n){var r=v()(n).map((function(r){return p()({},r,function(t){return T(n[t])&&e.hasOwnProperty(t)&&T(e[t])}(r)?t(e[r],n[r]):n[r])})).reduce((function(t,e){return j(j({},t),e)}),{});return j(j({},e),r)};function A(t){return atob(t.replace(/_/g,"/").replace(/-/g,"+"))}function P(t){return btoa(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function I(){var t=window.location.search,e=new E(t).get("_saasquatch")||"";if(e){var n="",r="",o="";try{n=JSON.parse(A(e))}catch(t){return void k("Unable to decode params",t)}try{r=JSON.parse(A(_.a.get("_saasquatch"))),k("existing cookie",r)}catch(t){k("Unable to retrieve cookie",t)}try{var i=function(){var t,e,n="weird_get_top_level_domain=cookie",r=document.location.hostname.split(".");for(t=r.length-1;t>=0;t--)if(e=r.slice(t).join("."),document.cookie=n+";domain=."+e+";",document.cookie.indexOf(n)>-1)return document.cookie=n.split("=")[0]+"=;domain=."+e+";expires=Thu, 01 Jan 1970 00:00:01 GMT;",e}();if(k("domain retrieved:",i),r){var a=S(r,n);o=P(g()(a)),k("cookie to store:",a)}else o=P(g()(n)),k("cookie to store:",n);_.a.set("_saasquatch",o,{expires:365,secure:!1,sameSite:"Lax",domain:i,path:"/"})}catch(t){k("Unable to set cookie",t)}}}},function(t,e,n){t.exports=n(105)},function(t,e,n){"use strict";n.r(e),n.d(e,"api",(function(){return x})),n.d(e,"widgets",(function(){return _})),n.d(e,"events",(function(){return C})),n.d(e,"init",(function(){return E})),n.d(e,"ready",(function(){return O})),n.d(e,"autofill",(function(){return j})),n.d(e,"submitEmail",(function(){return k})),n.d(e,"pushCookie",(function(){return T}));var r=n(6),o=n.n(r),i=n(73);n.d(e,"Widgets",(function(){return i.a}));var a=n(46);n.d(e,"EmbedWidget",(function(){return a.a}));var s=n(20);n.d(e,"PopupWidget",(function(){return s.a}));var c=n(54);n.d(e,"CtaWidget",(function(){return c.a}));var u=n(45);n.d(e,"WidgetApi",(function(){return u.a}));var f=n(100),l=n(102),p=n(2),h=n(103),d=n(75);for(var y in d)["default","Widgets","EmbedWidget","PopupWidget","CtaWidget","WidgetApi","api","widgets","events","init","ready","autofill","submitEmail","pushCookie"].indexOf(y)<0&&function(t){n.d(e,t,(function(){return d[t]}))}(y);var v=n(76);n.d(e,"help",(function(){return v.a}));var m=o()("squatch-js"),g=null,w=null,b=null;function x(){return g}function _(){return w}function C(){return b}function E(t){var e=t,n=Object(p.d)(e);(n.tenantAlias.match("^test")||n.debug)&&o.a.enable("squatch-js*"),m("initializing ..."),g=new u.a(n),w=new i.a(n),b=new f.a(n),m("Widget API instance",g),m("Widgets instance",w),m("Events API instance",b)}function O(t){t()}function j(t){_().autofill(t)}function k(t){_().submitEmail(t)}function T(){Object(h.a)()}"undefined"==typeof document||window.SaaSquatchDoNotAutoDrop||T(),"undefined"!=typeof document&&Object(l.a)()},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],f=!1,l=-1;function p(){f&&c&&(f=!1,c.length?u=c.concat(u):l=-1,u.length&&h())}function h(){if(!f){var t=s(p);f=!0;for(var e=u.length;e;){for(c=u,u=[];++l<e;)c&&c[l].run();l=-1,e=u.length}c=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new d(t,e)),1!==u.length||f||s(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";t.exports=function(t){function e(t){for(var e=0,n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return r.colors[Math.abs(e)%r.colors.length]}function r(t){var n;function a(){if(a.enabled){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];var i=a,s=Number(new Date),c=s-(n||s);i.diff=c,i.prev=n,i.curr=s,n=s,e[0]=r.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");var u=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(function(t,n){if("%%"===t)return t;u++;var o=r.formatters[n];if("function"==typeof o){var a=e[u];t=o.call(i,a),e.splice(u,1),u--}return t})),r.formatArgs.call(i,e);var f=i.log||r.log;f.apply(i,e)}}return a.namespace=t,a.enabled=r.enabled(t),a.useColors=r.useColors(),a.color=e(t),a.destroy=o,a.extend=i,"function"==typeof r.init&&r.init(a),r.instances.push(a),a}function o(){var t=r.instances.indexOf(this);return-1!==t&&(r.instances.splice(t,1),!0)}function i(t,e){return r(this.namespace+(void 0===e?":":e)+t)}return r.debug=r,r.default=r,r.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},r.disable=function(){r.enable("")},r.enable=function(t){var e;r.save(t),r.names=[],r.skips=[];var n=("string"==typeof t?t:"").split(/[\s,]+/),o=n.length;for(e=0;e<o;e++)n[e]&&("-"===(t=n[e].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+t.substr(1)+"$")):r.names.push(new RegExp("^"+t+"$")));for(e=0;e<r.instances.length;e++){var i=r.instances[e];i.enabled=r.enabled(i.namespace)}},r.enabled=function(t){if("*"===t[t.length-1])return!0;var e,n;for(e=0,n=r.skips.length;e<n;e++)if(r.skips[e].test(t))return!1;for(e=0,n=r.names.length;e<n;e++)if(r.names[e].test(t))return!0;return!1},r.humanize=n(108),Object.keys(t).forEach((function(e){r[e]=t[e]})),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=e,r.enable(r.load()),r}},function(t,e){var n=1e3,r=6e4,o=60*r,i=24*o;function a(t,e,n,r){var o=e>=1.5*n;return Math.round(t/n)+" "+r+(o?"s":"")}t.exports=function(t,e){e=e||{};var s=typeof t;if("string"===s&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!e)return;var a=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*o;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(t);if("number"===s&&isFinite(t))return e.long?function(t){var e=Math.abs(t);if(e>=i)return a(t,e,i,"day");if(e>=o)return a(t,e,o,"hour");if(e>=r)return a(t,e,r,"minute");if(e>=n)return a(t,e,n,"second");return t+" ms"}(t):function(t){var e=Math.abs(t);if(e>=i)return Math.round(t/i)+"d";if(e>=o)return Math.round(t/o)+"h";if(e>=r)return Math.round(t/r)+"m";if(e>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){n(77),n(57),n(83),n(119),n(126),n(127),t.exports=n(0).Promise},function(t,e,n){var r=n(58),o=n(59);t.exports=function(t){return function(e,n){var i,a,s=String(o(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(i=s.charCodeAt(c))<55296||i>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):i:t?s.slice(c,c+2):a-56320+(i-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(49),o=n(39),i=n(52),a={};n(23)(a,n(10)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(16),o=n(12),i=n(50);t.exports=n(17)?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),s=a.length,c=0;s>c;)r.f(t,n=a[c++],e[n]);return t}},function(t,e,n){var r=n(41);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(19),o=n(62),i=n(115);t.exports=function(t){return function(e,n,a){var s,c=r(e),u=o(c.length),f=i(a,u);if(t&&n!=n){for(;u>f;)if((s=c[f++])!=s)return!0}else for(;u>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(58),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){"use strict";var r=n(117),o=n(118),i=n(40),a=n(19);t.exports=n(78)(Array,"Array",(function(t,e){this._t=a(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r,o,i,a,s=n(38),c=n(3),u=n(28),f=n(84),l=n(9),p=n(14),h=n(29),d=n(120),y=n(121),v=n(88),m=n(89).set,g=n(122)(),w=n(67),b=n(91),x=n(123),_=n(92),C=c.TypeError,E=c.process,O=E&&E.versions,j=O&&O.v8||"",k=c.Promise,T="process"==f(E),S=function(){},A=o=w.f,P=!!function(){try{var t=k.resolve(1),e=(t.constructor={})[n(10)("species")]=function(t){t(S,S)};return(T||"function"==typeof PromiseRejectionEvent)&&t.then(S)instanceof e&&0!==j.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(t){}}(),I=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},R=function(t,e){if(!t._n){t._n=!0;var n=t._c;g((function(){for(var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,s=o?e.ok:e.fail,c=e.resolve,u=e.reject,f=e.domain;try{s?(o||(2==t._h&&M(t),t._h=1),!0===s?n=r:(f&&f.enter(),n=s(r),f&&(f.exit(),a=!0)),n===e.promise?u(C("Promise-chain cycle")):(i=I(n))?i.call(n,c,u):c(n)):u(r)}catch(t){f&&!a&&f.exit(),u(t)}};n.length>i;)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&F(t)}))}},F=function(t){m.call(c,(function(){var e,n,r,o=t._v,i=L(t);if(i&&(e=b((function(){T?E.emit("unhandledRejection",o,t):(n=c.onunhandledrejection)?n({promise:t,reason:o}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",o)})),t._h=T||L(t)?2:1),t._a=void 0,i&&e.e)throw e.v}))},L=function(t){return 1!==t._h&&0===(t._a||t._c).length},M=function(t){m.call(c,(function(){var e;T?E.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})}))},q=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),R(e,!0))},U=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw C("Promise can't be resolved itself");(e=I(t))?g((function(){var r={_w:n,_d:!1};try{e.call(t,u(U,r,1),u(q,r,1))}catch(t){q.call(r,t)}})):(n._v=t,n._s=1,R(n,!1))}catch(t){q.call({_w:n,_d:!1},t)}}};P||(k=function(t){d(this,k,"Promise","_h"),h(t),r.call(this);try{t(u(U,this,1),u(q,this,1))}catch(t){q.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(124)(k.prototype,{then:function(t,e){var n=A(v(this,k));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=T?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&R(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=u(U,t,1),this.reject=u(q,t,1)},w.f=A=function(t){return t===k||t===a?new i(t):o(t)}),l(l.G+l.W+l.F*!P,{Promise:k}),n(52)(k,"Promise"),n(125)("Promise"),a=n(0).Promise,l(l.S+l.F*!P,"Promise",{reject:function(t){var e=A(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(s||!P),"Promise",{resolve:function(t){return _(s&&this===a?k:this,t)}}),l(l.S+l.F*!(P&&n(93)((function(t){k.all(t).catch(S)}))),"Promise",{all:function(t){var e=this,n=A(e),r=n.resolve,o=n.reject,i=b((function(){var n=[],i=0,a=1;y(t,!1,(function(t){var s=i++,c=!1;n.push(void 0),a++,e.resolve(t).then((function(t){c||(c=!0,n[s]=t,--a||r(n))}),o)})),--a||r(n)}));return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=A(e),r=n.reject,o=b((function(){y(t,!1,(function(t){e.resolve(t).then(n.resolve,r)}))}));return o.e&&r(o.v),n.promise}})},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(28),o=n(85),i=n(86),a=n(12),s=n(62),c=n(87),u={},f={};(e=t.exports=function(t,e,n,l,p){var h,d,y,v,m=p?function(){return t}:c(t),g=r(n,l,e?2:1),w=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(i(m)){for(h=s(t.length);h>w;w++)if((v=e?g(a(d=t[w])[0],d[1]):g(t[w]))===u||v===f)return v}else for(y=m.call(t);!(d=y.next()).done;)if((v=o(y,g,d.value,e))===u||v===f)return v}).BREAK=u,e.RETURN=f},function(t,e,n){var r=n(3),o=n(89).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==n(41)(a);t.exports=function(){var t,e,n,u=function(){var r,o;for(c&&(r=a.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(u)};else if(!i||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var f=s.resolve(void 0);n=function(){f.then(u)}}else n=function(){o.call(r,u)};else{var l=!0,p=document.createTextNode("");new i(u).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},function(t,e,n){var r=n(3).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){var r=n(23);t.exports=function(t,e,n){for(var o in e)n&&t[o]?t[o]=e[o]:r(t,o,e[o]);return t}},function(t,e,n){"use strict";var r=n(3),o=n(0),i=n(16),a=n(17),s=n(10)("species");t.exports=function(t){var e="function"==typeof o[t]?o[t]:r[t];a&&e&&!e[s]&&i.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){"use strict";var r=n(9),o=n(0),i=n(3),a=n(88),s=n(92);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then((function(){return n}))}:t,n?function(n){return s(e,t()).then((function(){throw n}))}:t)}})},function(t,e,n){"use strict";var r=n(9),o=n(67),i=n(91);r(r.S,"Promise",{try:function(t){var e=o.f(this),n=i(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){n(129);var r=n(0).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){var r=n(9);r(r.S+r.F*!n(17),"Object",{defineProperty:n(16).f})},function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new _(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return E()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var f=c(t,e,n);if("normal"===f.type){if(r=n.done?"completed":"suspendedYield",f.arg===u)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(r="completed",n.method="throw",n.arg=f.arg)}}}(t,n,a),i}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var u={};function f(){}function l(){}function p(){}var h={};h[o]=function(){return this};var d=Object.getPrototypeOf,y=d&&d(d(C([])));y&&y!==e&&n.call(y,o)&&(h=y);var v=p.prototype=f.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function g(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,s){var u=c(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,u;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:E}}function E(){return{value:void 0,done:!0}}return l.prototype=v.constructor=p,p.constructor=l,p[a]=l.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},m(g.prototype),g.prototype[i]=function(){return this},t.AsyncIterator=g,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new g(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(v),v[a]="Generator",v[o]=function(){return this},v.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=C,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){n(95),n(77),n(135),n(136),t.exports=n(0).Symbol},function(t,e,n){var r=n(51)("meta"),o=n(14),i=n(18),a=n(16).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(30)((function(){return c(Object.preventExtensions({}))})),f=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},l=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!c(t))return"F";if(!e)return"E";f(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!c(t))return!0;if(!e)return!1;f(t)}return t[r].w},onFreeze:function(t){return u&&l.NEED&&c(t)&&!i(t,r)&&f(t),t}}},function(t,e,n){var r=n(50),o=n(70),i=n(71);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var a,s=n(t),c=i.f,u=0;s.length>u;)c.call(t,a=s[u++])&&e.push(a);return e}},function(t,e,n){var r=n(41);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){n(69)("asyncIterator")},function(t,e,n){n(69)("observable")},function(t,e,n){n(57),n(83),t.exports=n(68).f("iterator")},function(t,e,n){n(139),t.exports=n(0).Object.keys},function(t,e,n){var r=n(42),o=n(50);n(53)("keys",(function(){return function(t){return o(r(t))}}))},function(t,e,n){n(95),t.exports=n(0).Object.getOwnPropertySymbols},function(t,e,n){n(142);var r=n(0).Object;t.exports=function(t,e){return r.getOwnPropertyDescriptor(t,e)}},function(t,e,n){var r=n(19),o=n(43).f;n(53)("getOwnPropertyDescriptor",(function(){return function(t,e){return o(r(t),e)}}))},function(t,e,n){n(144),t.exports=n(0).Object.getOwnPropertyDescriptors},function(t,e,n){var r=n(9),o=n(145),i=n(19),a=n(43),s=n(97);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=i(t),c=a.f,u=o(r),f={},l=0;u.length>l;)void 0!==(n=c(r,e=u[l++]))&&s(f,e,n);return f}})},function(t,e,n){var r=n(72),o=n(70),i=n(12),a=n(3).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(i(t)),n=o.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(0),o=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},function(t,e,n){function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<r.length;o++)if((n=r[o])===e||n.fn===e){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){t.exports=o,o.default=o,o.stable=a,o.stableStringify=a;var n=[],r=[];function o(t,e,o){var i;for(!function t(e,o,i,a){var s;if("object"==typeof e&&null!==e){for(s=0;s<i.length;s++)if(i[s]===e){var c=Object.getOwnPropertyDescriptor(a,o);return void(void 0!==c.get?c.configurable?(Object.defineProperty(a,o,{value:"[Circular]"}),n.push([a,o,e,c])):r.push([e,o]):(a[o]="[Circular]",n.push([a,o,e])))}if(i.push(e),Array.isArray(e))for(s=0;s<e.length;s++)t(e[s],s,i,e);else{var u=Object.keys(e);for(s=0;s<u.length;s++){var f=u[s];t(e[f],f,i,e)}}i.pop()}}(t,"",[],void 0),i=0===r.length?JSON.stringify(t,e,o):JSON.stringify(t,s(e),o);0!==n.length;){var a=n.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}return i}function i(t,e){return t<e?-1:t>e?1:0}function a(t,e,o){var a,c=function t(e,o,a,s){var c;if("object"==typeof e&&null!==e){for(c=0;c<a.length;c++)if(a[c]===e){var u=Object.getOwnPropertyDescriptor(s,o);return void(void 0!==u.get?u.configurable?(Object.defineProperty(s,o,{value:"[Circular]"}),n.push([s,o,e,u])):r.push([e,o]):(s[o]="[Circular]",n.push([s,o,e])))}if("function"==typeof e.toJSON)return;if(a.push(e),Array.isArray(e))for(c=0;c<e.length;c++)t(e[c],c,a,e);else{var f={},l=Object.keys(e).sort(i);for(c=0;c<l.length;c++){var p=l[c];t(e[p],p,a,e),f[p]=e[p]}if(void 0===s)return f;n.push([s,o,e]),s[o]=f}a.pop()}}(t,"",[],void 0)||t;for(a=0===r.length?JSON.stringify(c,e,o):JSON.stringify(c,s(e),o);0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}return a}function s(t){return t=void 0!==t?t:function(t,e){return e},function(e,n){if(r.length>0)for(var o=0;o<r.length;o++){var i=r[o];if(i[1]===e&&i[0]===n){n="[Circular]",r.splice(o,1);break}}return t.call(this,e,n)}}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(98);function i(t){if(t)return function(t){for(var e in i.prototype)Object.prototype.hasOwnProperty.call(i.prototype,e)&&(t[e]=i.prototype[e]);return t}(t)}t.exports=i,i.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},i.prototype.parse=function(t){return this._parser=t,this},i.prototype.responseType=function(t){return this._responseType=t,this},i.prototype.serialize=function(t){return this._serializer=t,this},i.prototype.timeout=function(t){if(!t||"object"!==r(t))return this._timeout=t,this._responseTimeout=0,this._uploadTimeout=0,this;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;case"upload":this._uploadTimeout=t.upload;break;default:console.warn("Unknown timeout option",e)}return this},i.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};var a=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];i.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(t,e);if(!0===n)return!0;if(!1===n)return!1}catch(t){console.error(t)}if(e&&e.status&&e.status>=500&&501!==e.status)return!0;if(t){if(t.code&&a.includes(t.code))return!0;if(t.timeout&&"ECONNABORTED"===t.code)return!0;if(t.crossDomain)return!0}return!1},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},i.prototype.then=function(t,e){var n=this;if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(t,e){r.on("abort",(function(){if(n.timedout&&n.timedoutError)e(n.timedoutError);else{var t=new Error("Aborted");t.code="ABORTED",t.status=n.status,t.method=n.method,t.url=n.url,e(t)}})),r.end((function(n,r){n?e(n):t(r)}))}))}return this._fullfilledPromise.then(t,e)},i.prototype.catch=function(t){return this.then(void 0,t)},i.prototype.use=function(t){return t(this),this},i.prototype.ok=function(t){if("function"!=typeof t)throw new Error("Callback required");return this._okCallback=t,this},i.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},i.prototype.get=function(t){return this._header[t.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(t,e){if(o(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.set(n,t[n]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},i.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},i.prototype.field=function(t,e){if(null==t)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(o(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.field(n,t[n]);return this}if(Array.isArray(e)){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.field(t,e[r]);return this}if(null==e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=String(e)),this._getFormData().append(t,e),this},i.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},i.prototype._auth=function(t,e,n,r){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r("".concat(t,":").concat(e))));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer ".concat(t))}return this},i.prototype.withCredentials=function(t){return void 0===t&&(t=!0),this._withCredentials=t,this},i.prototype.redirects=function(t){return this._maxRedirects=t,this},i.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw new TypeError("Invalid argument");return this._maxResponseSize=t,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(t){var e=o(t),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(e&&o(this._data))for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._data[r]=t[r]);else"string"==typeof t?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(t):t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)||n||this.type("json"),this},i.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},i.prototype._finalizeQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(this.url.includes("?")?"&":"?")+t),this._query.length=0,this._sort){var e=this.url.indexOf("?");if(e>=0){var n=this.url.slice(e+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,e)+"?"+n.join("&")}}},i.prototype._appendQueryString=function(){console.warn("Unsupported")},i.prototype._timeoutError=function(t,e,n){if(!this._aborted){var r=new Error("".concat(t+e,"ms exceeded"));r.timeout=e,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)}},i.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},function(t,e,n){"use strict";var r=n(151);function o(t){if(t)return function(t){for(var e in o.prototype)Object.prototype.hasOwnProperty.call(o.prototype,e)&&(t[e]=o.prototype[e]);return t}(t)}t.exports=o,o.prototype.get=function(t){return this.header[t.toLowerCase()]},o.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=r.type(e);var n=r.params(e);for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(this[o]=n[o]);this.links={};try{t.link&&(this.links=r.parseLinks(t.link))}catch(t){}},o.prototype._setStatusProperties=function(t){var e=t/100|0;this.statusCode=t,this.status=this.statusCode,this.statusType=e,this.info=1===e,this.ok=2===e,this.redirect=3===e,this.clientError=4===e,this.serverError=5===e,this.error=(4===e||5===e)&&this.toError(),this.created=201===t,this.accepted=202===t,this.noContent=204===t,this.badRequest=400===t,this.unauthorized=401===t,this.notAcceptable=406===t,this.forbidden=403===t,this.notFound=404===t,this.unprocessableEntity=422===t}},function(t,e,n){"use strict";e.type=function(t){return t.split(/ *; */).shift()},e.params=function(t){return t.split(/ *; */).reduce((function(t,e){var n=e.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(t[r]=o),t}),{})},e.parseLinks=function(t){return t.split(/ *, */).reduce((function(t,e){var n=e.split(/ *; */),r=n[0].slice(1,-1);return t[n[1].split(/ *= */)[1].slice(1,-1)]=r,t}),{})},e.cleanHeader=function(t,e){return delete t["content-type"],delete t["content-length"],delete t["transfer-encoding"],delete t.host,e&&(delete t.authorization,delete t.cookie),t}},function(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function o(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach((function(t){o.prototype[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this._defaults.push({fn:t,args:n}),this}})),o.prototype._setDefaults=function(t){this._defaults.forEach((function(e){t[e.fn].apply(t,r(e.args))}))},t.exports=o},function(t,e,n){n(154),t.exports=n(0).Reflect.construct},function(t,e,n){var r=n(9),o=n(49),i=n(29),a=n(12),s=n(14),c=n(30),u=n(155),f=(n(3).Reflect||{}).construct,l=c((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),p=!c((function(){f((function(){}))}));r(r.S+r.F*(l||p),"Reflect",{construct:function(t,e){i(t),a(e);var n=arguments.length<3?t:i(arguments[2]);if(p&&!l)return f(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(u.apply(t,r))}var c=n.prototype,h=o(s(c)?c:Object.prototype),d=Function.apply.call(t,h,e);return s(d)?d:h}})},function(t,e,n){"use strict";var r=n(29),o=n(14),i=n(90),a=[].slice,s={},c=function(t,e,n){if(!(e in s)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";s[e]=Function("F,a","return new F("+r.join(",")+")")}return s[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),s=function(){var r=n.concat(a.call(arguments));return this instanceof s?c(e,r.length,r):i(e,r,t)};return o(e.prototype)&&(s.prototype=e.prototype),s}},function(t,e,n){n(57),n(157),t.exports=n(0).Array.from},function(t,e,n){"use strict";var r=n(28),o=n(9),i=n(42),a=n(85),s=n(86),c=n(62),u=n(97),f=n(87);o(o.S+o.F*!n(93)((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,o,l,p=i(t),h="function"==typeof this?this:Array,d=arguments.length,y=d>1?arguments[1]:void 0,v=void 0!==y,m=0,g=f(p);if(v&&(y=r(y,d>2?arguments[2]:void 0,2)),null==g||h==Array&&s(g))for(n=new h(e=c(p.length));e>m;m++)u(n,m,v?y(p[m],m):p[m]);else for(l=g.call(p),n=new h;!(o=l.next()).done;m++)u(n,m,v?a(l,y,[o.value,m],!0):o.value);return n.length=m,n}})},function(t,e,n){t.exports=n(159)},function(t,e,n){n(160),t.exports=n(0).Reflect.get},function(t,e,n){var r=n(43),o=n(66),i=n(18),a=n(9),s=n(14),c=n(12);a(a.S,"Reflect",{get:function t(e,n){var a,u,f=arguments.length<3?e:arguments[2];return c(e)===f?e[n]:(a=r.f(e,n))?i(a,"value")?a.value:void 0!==a.get?a.get.call(f):void 0:s(u=o(e))?t(u,n,f):void 0}})},function(t,e,n){var r=n(7);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){n(163),t.exports=n(0).Object.setPrototypeOf},function(t,e,n){var r=n(9);r(r.S,"Object",{setPrototypeOf:n(164).set})},function(t,e,n){var r=n(14),o=n(12),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(28)(Function.call,n(43).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e,n){t.exports=n(166)},function(t,e,n){n(167),t.exports=n(0).Object.getPrototypeOf},function(t,e,n){var r=n(42),o=n(66);n(53)("getPrototypeOf",(function(){return function(t){return o(r(t))}}))},function(t,e,n){t.exports=n(169)},function(t,e,n){n(170);var r=n(0).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){var r=n(9);r(r.S,"Object",{create:n(49)})},function(t,e,n){var r=n(99);function o(e,n){return t.exports=o=r||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,o(e,n)}t.exports=o,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){n(173);var r=n(0).Object;t.exports=function(t){return r.getOwnPropertyNames(t)}},function(t,e,n){n(53)("getOwnPropertyNames",(function(){return n(96).f}))}])}));
|
|
13
|
+
*/!function(i){if(void 0===(o="function"==typeof(r=i)?r.call(e,n,e,t):r)||(t.exports=o),!0,t.exports=i(),!!0){var a=window.Cookies,s=window.Cookies=i();s.noConflict=function(){return window.Cookies=a,s}}}((function(){function t(){for(var t=0,e={};t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function e(t){return t.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(e,n,i){if("undefined"!=typeof document){"number"==typeof(i=t({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(t){}n=r.write?r.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in i)i[c]&&(s+="; "+c,!0!==i[c]&&(s+="="+i[c].split(";")[0]));return document.cookie=e+"="+n+s}}function a(t,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var s=i[a].split("="),c=s.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=e(s[0]);if(c=(r.read||r)(c,u)||e(c),n)try{c=JSON.parse(c)}catch(t){}if(o[u]=c,t===u)break}catch(t){}}return t?o[t]:o}}return o.set=i,o.get=function(t){return a(t,!1)},o.getJSON=function(t){return a(t,!0)},o.remove=function(e,n){i(e,"",t(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(t,e,n){var r=n(58);t.exports=function(t){return Object(r(t))}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=!0},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(69),o=n(42),i=n(23),a=n(65),s=n(22),c=n(77),u=Object.getOwnPropertyDescriptor;e.f=n(24)?u:function(t,e){if(t=i(t),e=a(e,!0),c)try{return u(t,e)}catch(t){}if(s(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e){t.exports={}},function(t,e,n){var r=n(30),o=n(31);function i(e){return"function"==typeof r&&"symbol"==typeof o?(t.exports=i=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=i=function(t){return t&&"function"==typeof r&&t.constructor===r&&t!==r.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),i(e)}t.exports=i,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return w}));var r=n(14),o=n.n(r),i=n(5),a=n.n(i),s=n(6),c=n.n(s),u=n(1),f=n.n(u),l=n(17),p=n.n(l),h=n(29),d=n.n(h),v=n(19),y=n(2),m=n(38),g=n.n(m),w=function(){function t(e){a()(this,t);var n=e,r=Object(y.d)(n);this.tenantAlias=r.tenantAlias,this.domain=r.domain,this.npmCdn=r.npmCdn}return c()(t,[{key:"cookieUser",value:function(t){var e=t.widgetType,n=t.engagementMedium,r=void 0===n?"POPUP":n,o=t.jwt,i=t.user,a=encodeURIComponent(this.tenantAlias),s=b({widgetType:e,engagementMedium:r}),c="/api/v1/".concat(a,"/widget/user/cookie_user").concat(s),u=this.domain+c;return Object(v.c)(u,p()(i||{}),o)}},{key:"upsertUser",value:function(t){var e=t,n=Object(y.f)(e),r=n.widgetType,o=n.engagementMedium,i=void 0===o?"POPUP":o,a=n.jwt,s=n.user,c=encodeURIComponent(this.tenantAlias),u=encodeURIComponent(s.accountId),f=encodeURIComponent(s.id),l=b({widgetType:r,engagementMedium:i}),h="/api/v1/".concat(c,"/widget/account/").concat(u,"/user/").concat(f,"/upsert").concat(l),d=this.domain+h,m=g.a.get("_saasquatch");return m&&(s.cookies=m),Object(v.c)(d,p()(s),a)}},{key:"render",value:function(t){var e=t,n=Object(y.e)(e),r=n.widgetType,i=n.engagementMedium,a=void 0===i?"POPUP":i,s=n.jwt,c=n.user,u=encodeURIComponent(this.tenantAlias),l=c?encodeURIComponent(c.accountId):null,p=c?encodeURIComponent(c.id):null,h="/api/v1/".concat(u,"/graphql"),m=this.domain+h;return new d.a(function(){var t=o()(f.a.mark((function t(e,n){var o,i,c;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(v.d)(m,"\n query renderWidget ($user: UserIdInput, $engagementMedium: UserEngagementMedium, $widgetType: WidgetType) {\n renderWidget(user: $user, engagementMedium: $engagementMedium, widgetType: $widgetType) {\n template\n user {\n id\n accountId\n }\n jsOptions\n widgetConfig {\n values\n }\n }\n }\n ",{user:p&&l?{id:p,accountId:l}:null,engagementMedium:a,widgetType:r},s);case 3:c=t.sent,e(null==c||null===(o=c.body)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.renderWidget),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),n(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,n){return t.apply(this,arguments)}}())}},{key:"invite",value:function(t){var e=t.emailList,n=void 0===e?[]:e,r=t.userId,o=t.accountId,i=t.tenantAlias,a=encodeURIComponent(i),s="/api/v1/".concat(a,"/mail/referralinvite"),c=this.domain+s,u={sendingAccountId:o,sendingUserId:r,recipients:n};return Object(v.b)(c,p()(u))}},{key:"squatchReferralCookie",value:function(){var t=encodeURIComponent(this.tenantAlias),e=g.a.get("_saasquatch"),n=e?"?cookies=".concat(encodeURIComponent(e)):"",r="".concat(this.domain,"/a/").concat(t,"/widgets/squatchcookiejson").concat(n);return Object(v.a)(r)}}]),t}();function b(t){var e=t.widgetType,n=t.engagementMedium;return(e?"?widgetType=".concat(encodeURIComponent(e)):"")+"".concat(e?"&":"?","engagementMedium=").concat(encodeURIComponent(n))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return F}));var r=n(8),o=n.n(r),i=n(35),a=n.n(i),s=n(30),c=n.n(s),u=n(31),f=n.n(u),l=n(14),p=n.n(l),h=n(5),d=n.n(h),v=n(6),y=n.n(v),m=n(26),g=n.n(m),w=n(36),b=n.n(w),x=n(37),_=n.n(x),C=n(7),O=n.n(C),E=n(1),j=n.n(E),T=n(3),k=n.n(T),S=n(57),A=n(27);function P(t,e){var n=void 0!==c.a&&t[f.a]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return I(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return a()(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function R(t){var e=function(){if("undefined"==typeof Reflect||!o.a)return!1;if(o.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(o()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=O()(t);if(e){var i=O()(this).constructor;n=o()(r,arguments,i)}else n=r.apply(this,arguments);return _()(this,n)}}var M=k()("squatch-js:EMBEDwidget"),F=function(t){b()(r,t);var e,n=R(r);function r(t,e){var o,i;if(d()(this,r),o=n.call(this,t),"string"==typeof e?(i=document.querySelector(e),M("loading widget with selector",i)):e instanceof HTMLElement?M("loading widget with container",i=e):e?(i=null,M("container must be an HTMLElement or string",e)):(i=document.querySelector("#squatchembed")||document.querySelector(".squatchembed"),M("loading widget with default selector",i)),!(i instanceof HTMLElement))throw new Error("element with selector '".concat(e,"' not found.'"));return o.element=i,o}return y()(r,[{key:"load",value:(e=p()(j.a.mark((function t(){var e,n,r=this;return j.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.context.container?(this.element.style.visibility="hidden",this.element.style.height="0",this.element.style["overflow-y"]="hidden",this.element.firstChild?this.element.replaceChild(this.frame,this.element.firstChild):this.element.appendChild(this.frame)):this.element.firstChild&&"#text"!==this.element.firstChild.nodeName||this.element.appendChild(this.frame),e=this.frame.contentWindow){t.next=4;break}throw new Error("Frame needs a content window");case 4:(n=e.document).open(),n.write(this.content),n.write('<script src="'.concat(this.npmCdn,'/resize-observer-polyfill@1.5.x"><\/script>')),n.close(),Object(A.a)(n,p()(j.a.mark((function t(){var o,i,a;return j.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.squatch||e.widgetIdent,!(i=n.getElementById("cta"))){t.next=6;break}if(i.parentNode){t.next=5;break}throw new Error("ctaElement needs a parentNode");case 5:i.parentNode.removeChild(i);case 6:return r.frame.height=n.body.scrollHeight,a=new e.ResizeObserver((function(t){var e,n=P(t);try{for(n.s();!(e=n.n()).done;){var o=e.value.contentRect.height;r.frame.height=o}}catch(t){n.e(t)}finally{n.f()}})),t.t0=a,t.next=11,r._findInnerContainer();case 11:t.t1=t.sent,t.t0.observe.call(t.t0,t.t1),r.context.container||(r._loadEvent(o),M("loaded"));case 14:case"end":return t.stop()}}),t)}))));case 10:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"open",value:function(){var t,e,n,r,o,i;if(!this.frame)return M("no target element to open");this.element.style.visibility="unset",this.element.style.height="auto",this.element.style["overflow-y"]="auto",null===(t=this.frame)||void 0===t||null===(e=t.contentDocument)||void 0===e||e.dispatchEvent(new CustomEvent("sq:refresh"));var a=(null===(n=this.frame)||void 0===n||null===(r=n.contentWindow)||void 0===r?void 0:r.squatch)||(null===(o=this.frame)||void 0===o||null===(i=o.contentWindow)||void 0===i?void 0:i.widgetIdent);this._loadEvent(a),M("loaded")}},{key:"close",value:function(){if(!this.frame)return M("no target element to close");this.element.style.visibility="hidden",this.element.style.height="0",this.element.style["overflow-y"]="hidden",M("Embed widget closed")}},{key:"_error",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"embed",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return g()(O()(r.prototype),"_error",this).call(this,t,e,n)}}]),r}(S.a)},function(t,e,n){var r;t.exports=((r=function(){this.listeners={}}).prototype={addEventListener:function(t,e,n){for(var r=[],o=arguments.length,i=0;i<o;i++)r.push(arguments[i]);r=r.length>3?r.splice(3,r.length-1):[],void 0!==this.listeners[t]?this.listeners[t].push({scope:n,callback:e,args:r}):this.listeners[t]=[{scope:n,callback:e,args:r}]},removeEventListener:function(t,e,n){if(void 0!==this.listeners[t]){for(var r=this.listeners[t].length,o=[],i=0;i<r;i++){var a=this.listeners[t][i];a.scope==n&&a.callback==e||o.push(a)}this.listeners[t]=o}},hasEventListener:function(t,e,n){if(void 0!==this.listeners[t]){var r=this.listeners[t].length;if(void 0===e&&void 0===n)return r>0;for(var o=0;o<r;o++){var i=this.listeners[t][o];if((!n||i.scope==n)&&i.callback==e)return!0}}return!1},dispatch:function(t,e){for(var n={type:t,target:e},r=[],o=arguments.length,i=0;i<o;i++)r.push(arguments[i]);if(r=r.length>2?r.splice(2,r.length-1):[],r=[n].concat(r),void 0!==this.listeners[t]){var a=this.listeners[t].slice(),s=a.length;for(i=0;i<s;i++){var c=a[i];if(c&&c.callback){var u=r.concat(c.args);c.callback.apply(c.scope,u)}}}},getEvents:function(){var t="";for(var e in this.listeners)for(var n=this.listeners[e].length,r=0;r<n;r++){var o=this.listeners[e][r];t+=o.scope&&o.scope.className?o.scope.className:"anonymous",t+=" listen for '"+e+"'\n"}return t}},new r)},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o;"undefined"!=typeof window?o=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),o=void 0):o=self;var i=n(149),a=n(150),s=n(151),c=n(99),u=n(152),f=n(154);function l(){}t.exports=function(t,n){return"function"==typeof n?new e.Request("GET",t).end(n):1===arguments.length?new e.Request("GET",t):new e.Request(t,n)};var p=e=t.exports;e.Request=w,p.getXHR=function(){if(o.XMLHttpRequest&&(!o.location||"file:"!==o.location.protocol||!o.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}throw new Error("Browser-only version of superagent could not find XHR")};var h="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};function d(t){if(!c(t))return t;var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&v(e,n,t[n]);return e.join("&")}function v(t,e,n){if(void 0!==n)if(null!==n)if(Array.isArray(n))n.forEach((function(n){v(t,e,n)}));else if(c(n))for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&v(t,"".concat(e,"[").concat(r,"]"),n[r]);else t.push(encodeURI(e)+"="+encodeURIComponent(n));else t.push(encodeURI(e))}function y(t){for(var e,n,r={},o=t.split("&"),i=0,a=o.length;i<a;++i)-1===(n=(e=o[i]).indexOf("="))?r[decodeURIComponent(e)]="":r[decodeURIComponent(e.slice(0,n))]=decodeURIComponent(e.slice(n+1));return r}function m(t){return/[/+]json($|[^-\w])/.test(t)}function g(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var e=this.xhr.status;1223===e&&(e=204),this._setStatusProperties(e),this.headers=function(t){for(var e,n,r,o,i=t.split(/\r?\n/),a={},s=0,c=i.length;s<c;++s)-1!==(e=(n=i[s]).indexOf(":"))&&(r=n.slice(0,e).toLowerCase(),o=h(n.slice(e+1)),a[r]=o);return a}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function w(t,e){var n=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",(function(){var t,e=null,r=null;try{r=new g(n)}catch(t){return(e=new Error("Parser is unable to parse the response")).parse=!0,e.original=t,n.xhr?(e.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,e.status=n.xhr.status?n.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),n.callback(e)}n.emit("response",r);try{n._isResponseOK(r)||(t=new Error(r.statusText||r.text||"Unsuccessful HTTP response"))}catch(e){t=e}t?(t.original=e,t.response=r,t.status=r.status,n.callback(t,r)):n.callback(null,r)}))}function b(t,e,n){var r=p("DELETE",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}p.serializeObject=d,p.parseString=y,p.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},p.serialize={"application/x-www-form-urlencoded":d,"application/json":a},p.parse={"application/x-www-form-urlencoded":y,"application/json":JSON.parse},u(g.prototype),g.prototype._parseBody=function(t){var e=p.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&m(this.type)&&(e=p.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},g.prototype.toError=function(){var t=this.req,e=t.method,n=t.url,r="cannot ".concat(e," ").concat(n," (").concat(this.status,")"),o=new Error(r);return o.status=this.status,o.method=e,o.url=n,o},p.Response=g,i(w.prototype),s(w.prototype),w.prototype.type=function(t){return this.set("Content-Type",p.types[t]||t),this},w.prototype.accept=function(t){return this.set("Accept",p.types[t]||t),this},w.prototype.auth=function(t,e,n){1===arguments.length&&(e=""),"object"===r(e)&&null!==e&&(n=e,e=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});var o=function(t){if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(t,e,n,o)},w.prototype.query=function(t){return"string"!=typeof t&&(t=d(t)),t&&this._query.push(t),this},w.prototype.attach=function(t,e,n){if(e){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,n||e.name)}return this},w.prototype._getFormData=function(){return this._formData||(this._formData=new o.FormData),this._formData},w.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();var n=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),n(t,e)},w.prototype.crossDomainError=function(){var t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},w.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},w.prototype.ca=w.prototype.agent,w.prototype.buffer=w.prototype.ca,w.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},w.prototype.pipe=w.prototype.write,w.prototype._isHost=function(t){return t&&"object"===r(t)&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},w.prototype.end=function(t){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||l,this._finalizeQueryString(),this._end()},w.prototype._setUploadTimeout=function(){var t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},w.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var t=this;this.xhr=p.getXHR();var e=this.xhr,n=this._formData||this._data;this._setTimeouts(),e.onreadystatechange=function(){var n=e.readyState;if(n>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4===n){var r;try{r=e.status}catch(t){r=0}if(!r){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}};var r=function(e,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(t._uploadTimeoutTimer)),n.direction=e,t.emit("progress",n)};if(this.hasListeners("progress"))try{e.addEventListener("progress",r.bind(null,"download")),e.upload&&e.upload.addEventListener("progress",r.bind(null,"upload"))}catch(t){}e.upload&&this._setUploadTimeout();try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var o=this._header["content-type"],i=this._serializer||p.serialize[o?o.split(";")[0]:""];!i&&m(o)&&(i=p.serialize["application/json"]),i&&(n=i(n))}for(var a in this.header)null!==this.header[a]&&Object.prototype.hasOwnProperty.call(this.header,a)&&e.setRequestHeader(a,this.header[a]);this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0===n?null:n)},p.agent=function(){return new f},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(t){f.prototype[t.toLowerCase()]=function(e,n){var r=new p.Request(t,e);return this._setDefaults(r),n&&r.end(n),r}})),f.prototype.del=f.prototype.delete,p.get=function(t,e,n){var r=p("GET",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},p.head=function(t,e,n){var r=p("HEAD",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},p.options=function(t,e,n){var r=p("OPTIONS",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},p.del=b,p.delete=b,p.patch=function(t,e,n){var r=p("PATCH",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},p.post=function(t,e,n){var r=p("POST",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},p.put=function(t,e,n){var r=p("PUT",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}},function(t,e,n){var r=n(76),o=n(63);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(9),o=n(0),i=n(34);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i((function(){n(1)})),"Object",a)}},function(t,e,n){var r=n(20).f,o=n(22),i=n(10)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(15),o=n(117),i=n(63),a=n(61)("IE_PROTO"),s=function(){},c=function(){var t,e=n(64)("iframe"),r=i.length;for(e.style.display="none",n(80).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=c(),void 0===e?n:o(n,e)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return I}));var r=n(8),o=n.n(r),i=n(35),a=n.n(i),s=n(30),c=n.n(s),u=n(31),f=n.n(u),l=n(5),p=n.n(l),h=n(6),d=n.n(h),v=n(75),y=n.n(v),m=n(26),g=n.n(m),w=n(36),b=n.n(w),x=n(37),_=n.n(x),C=n(7),O=n.n(C),E=n(3),j=n(25),T=n(27);function k(t,e){var n=void 0!==c.a&&t[f.a]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return S(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return a()(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function A(t){var e=function(){if("undefined"==typeof Reflect||!o.a)return!1;if(o.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(o()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=O()(t);if(e){var i=O()(this).constructor;n=o()(r,arguments,i)}else n=r.apply(this,arguments);return _()(this,n)}}var P=E("squatch-js:CTAwidget"),I=function(t){b()(n,t);var e=A(n);function n(t,r){var o;p()(this,n),P("CTA constructor");var i=document.createElement("div");return i.id="cta",document.body.appendChild(i),o=e.call(this,t,"#cta"),r.side||r.position||(r.position="bottom",r.side="right"),"middle"===r.position?(o.position="top: 45%;",o.side="center"===r.side?"right: 45%;":"".concat(r.side,": -10px;")):(o.position="".concat(r.position,": -10px;"),o.side="center"===r.side?"right: 45%;":"".concat(r.side,": 20px;")),o.positionClass=r.position,o.ctaFrame=document.createElement("iframe"),o.ctaFrame.squatchJsApi=y()(o),o.ctaFrame.scrolling="no",o.ctaFrame.setAttribute("style","border:0; background-color:transparent; position:fixed; display:none;".concat(o.side).concat(o.position)),document.body.appendChild(o.ctaFrame),P("ctaframe appended to body"),o}return d()(n,[{key:"load",value:function(){var t=this;if(g()(O()(n.prototype),"load",this).call(this),!this.frame.contentWindow)throw new Error("frame requires a contentWindow");var e=this.frame.contentWindow.document,r=this.ctaFrame,o=this.positionClass;Object(T.a)(e,(function(){var n=e.getElementById("cta");if(n){if(!n.parentNode)throw new Error("ctaElement requires a parentNode");n.parentNode.removeChild(n);var i=r.contentWindow;if(!i)throw new Error("ctaFrame requires a contentWindow");var a=i.document;a.open(),a.write(n.innerHTML),a.write('<script src="'.concat(t.npmCdn,'/resize-observer-polyfill@1.5.x"><\/script>')),a.close(),Object(T.a)(a,(function(){var t=a.getElementsByClassName("cta-container")[0];t.style.position="fixed",r.height=t.offsetHeight,r.width=t.scrollWidth,r.style.display="block",t.classList.contains(o)||(t.className+=" ".concat(o)),new i.ResizeObserver((function(t){var e,n=k(t);try{for(n.s();!(e=n.n()).done;){var o=e.value.contentRect,i=o.height,a=o.width;r.height=i,r.width=a}}catch(t){n.e(t)}finally{n.f()}})).observe(t),P("CTA template loaded into iframe")}))}else P(new Error("CTA element not found in theme"))}))}},{key:"open",value:function(){g()(O()(n.prototype),"open",this).call(this)}},{key:"close",value:function(){g()(O()(n.prototype),"close",this).call(this)}}]),n}(j.a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return A})),n.d(e,"a",(function(){return I}));var r=n(11),o=n.n(r),i=n(12),a=n.n(i),s=n(13),c=n.n(s),u=n(16),f=n.n(u),l=n(21),p=n.n(l),h=n(45),d=n.n(h),v=n(103),y=n.n(v),m=n(17),g=n.n(m),w=n(3),b=n.n(w),x=n(38),_=n.n(x),C={};try{!function(t,e){if("+"!==new t("q=%2B").get("q")||"+"!==new t({q:"+"}).get("q")||"+"!==new t([["q","+"]]).get("q")||"q=%0A"!==new t("q=\n").toString()||"q=+%26"!==new t({q:" &"}).toString()||"q=%25zx"!==new t({q:"%zx"}).toString())throw t;C.URLSearchParams=t}(URLSearchParams)}catch(t){!function(t,e,n){var r=t.create,o=t.defineProperty,i=/[!'\(\)~]|%20|%00/g,a=/%(?![0-9a-fA-F]{2})/g,s=/\+/g,c={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"},u={append:function(t,e){h(this._ungap,t,e)},delete:function(t){delete this._ungap[t]},get:function(t){return this.has(t)?this._ungap[t][0]:null},getAll:function(t){return this.has(t)?this._ungap[t].slice(0):[]},has:function(t){return t in this._ungap},set:function(t,n){this._ungap[t]=[e(n)]},forEach:function(t,n){var r=this;for(var o in r._ungap)r._ungap[o].forEach(i,o);function i(i){t.call(n,i,e(o),r)}},toJSON:function(){return{}},toString:function(){var t=[];for(var e in this._ungap)for(var n=v(e),r=0,o=this._ungap[e];r<o.length;r++)t.push(n+"="+v(o[r]));return t.join("&")}};for(var f in u)o(l.prototype,f,{configurable:!0,writable:!0,value:u[f]});function l(t){var e=r(null);switch(o(this,"_ungap",{value:e}),!0){case!t:break;case"string"==typeof t:"?"===t.charAt(0)&&(t=t.slice(1));for(var i=t.split("&"),a=0,s=i.length;a<s;a++){var c=(u=i[a]).indexOf("=");-1<c?h(e,d(u.slice(0,c)),d(u.slice(c+1))):u.length&&h(e,d(u),"")}break;case n(t):for(a=0,s=t.length;a<s;a++){var u;h(e,(u=t[a])[0],u[1])}break;case"forEach"in t:t.forEach(p,e);break;default:for(var f in t)h(e,f,t[f])}}function p(t,e){h(this,e,t)}function h(t,e,r){var o=n(r)?r.join(","):r;e in t?t[e].push(o):t[e]=[o]}function d(t){return decodeURIComponent(t.replace(a,"%25").replace(s," "))}function v(t){return encodeURIComponent(t).replace(i,y)}function y(t){return c[t]}C.URLSearchParams=l}(Object,String,Array.isArray)}!function(t){var e=!1;try{e=!!Symbol.iterator}catch(t){}function n(t,n){var r=[];return t.forEach(n,r),e?r[Symbol.iterator]():{next:function(){var t=r.shift();return{done:void 0===t,value:t}}}}"forEach"in t||(t.forEach=function(t,e){var n=this,r=Object.create(null);this.toString().replace(/=[\s\S]*?(?:&|$)/g,"=").split("=").forEach((function(o){o.length&&!(o in r)&&(r[o]=n.getAll(o)).forEach((function(r){t.call(e,r,o,n)}))}))}),"keys"in t||(t.keys=function(){return n(this,(function(t,e){this.push(e)}))}),"values"in t||(t.values=function(){return n(this,(function(t,e){this.push(t)}))}),"entries"in t||(t.entries=function(){return n(this,(function(t,e){this.push([e,t])}))}),e&&!(Symbol.iterator in t)&&(t[Symbol.iterator]=t.entries),"sort"in t||(t.sort=function(){for(var t,e,n,r=this.entries(),o=r.next(),i=o.done,a=[],s=Object.create(null);!i;)e=(n=o.value)[0],a.push(e),e in s||(s[e]=[]),s[e].push(n[1]),i=(o=r.next()).done;for(a.sort(),t=0;t<a.length;t++)this.delete(a[t]);for(t=0;t<a.length;t++)e=a[t],this.append(e,s[e].shift())}),function(e){var n=e.defineProperty,r=e.getOwnPropertyDescriptor,o=function(e){var n=e.append;e.append=t.append,URLSearchParams.call(e,e._usp.search.slice(1)),e.append=n},i=function(t,e){if(!(t instanceof e))throw new TypeError("'searchParams' accessed on an object that does not implement interface "+e.name)},a=function(a){var s,c,u=a.prototype,f=r(u,"searchParams"),l=r(u,"href"),p=r(u,"search");!f&&p&&p.set&&(c=function(e){function r(n,r){t.append.call(this,n,r),n=this.toString(),e.set.call(this._usp,n?"?"+n:"")}function o(n){t.delete.call(this,n),n=this.toString(),e.set.call(this._usp,n?"?"+n:"")}function i(n,r){t.set.call(this,n,r),n=this.toString(),e.set.call(this._usp,n?"?"+n:"")}return function(t,e){return t.append=r,t.delete=o,t.set=i,n(t,"_usp",{configurable:!0,writable:!0,value:e})}}(p),s=function(t,e){return n(t,"_searchParams",{configurable:!0,writable:!0,value:c(e,t)}),e},e.defineProperties(u,{href:{get:function(){return l.get.call(this)},set:function(t){var e=this._searchParams;l.set.call(this,t),e&&o(e)}},search:{get:function(){return p.get.call(this)},set:function(t){var e=this._searchParams;p.set.call(this,t),e&&o(e)}},searchParams:{get:function(){return i(this,a),this._searchParams||s(this,new URLSearchParams(this.search.slice(1)))},set:function(t){i(this,a),s(this,t)}}}))};try{a(HTMLAnchorElement),/^function|object$/.test(typeof URL)&&URL.prototype&&a(URL)}catch(t){}}(Object)}(C.URLSearchParams.prototype);var O=C.URLSearchParams;function E(t,e){var n=o()(t);if(a.a){var r=a()(t);e&&(r=r.filter((function(e){return c()(t,e).enumerable}))),n.push.apply(n,r)}return n}function j(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach((function(e){p()(t,e,n[e])})):f.a?Object.defineProperties(t,f()(n)):E(Object(n)).forEach((function(e){Object.defineProperty(t,e,c()(n,e))}))}return t}var T=b()("squatch-js"),k=function(t){return"object"===d()(t)&&!Array.isArray(t)},S=function t(e,n){var r=y()(n).map((function(r){return p()({},r,function(t){return k(n[t])&&e.hasOwnProperty(t)&&k(e[t])}(r)?t(e[r],n[r]):n[r])})).reduce((function(t,e){return j(j({},t),e)}),{});return j(j({},e),r)};function A(t){return atob(t.replace(/_/g,"/").replace(/-/g,"+"))}function P(t){return btoa(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function I(){var t=window.location.search,e=new O(t).get("_saasquatch")||"";if(e){var n="",r="",o="";try{n=JSON.parse(A(e))}catch(t){return void T("Unable to decode params",t)}try{r=JSON.parse(A(_.a.get("_saasquatch"))),T("existing cookie",r)}catch(t){T("Unable to retrieve cookie",t)}try{var i=function(){var t,e,n="weird_get_top_level_domain=cookie",r=document.location.hostname.split(".");for(t=r.length-1;t>=0;t--)if(e=r.slice(t).join("."),document.cookie=n+";domain=."+e+";",document.cookie.indexOf(n)>-1)return document.cookie=n.split("=")[0]+"=;domain=."+e+";expires=Thu, 01 Jan 1970 00:00:01 GMT;",e}();if(T("domain retrieved:",i),r){var a=S(r,n);o=P(g()(a)),T("cookie to store:",a)}else o=P(g()(n)),T("cookie to store:",n);_.a.set("_saasquatch",o,{expires:365,secure:!1,sameSite:"Lax",domain:i,path:"/"})}catch(t){T("Unable to set cookie",t)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return x}));var r=n(14),o=n.n(r),i=n(5),a=n.n(i),s=n(6),c=n.n(s),u=n(29),f=n.n(u),l=n(1),p=n.n(l),h=n(3),d=n.n(h),v=n(17),y=n.n(v),m=n(19),g=n(2),w=function(){function t(e){a()(this,t);var n=e;Object(g.b)(n,"domain")&&"string"==typeof n.domain?this.domain=n.domain:this.domain="https://app.referralsaasquatch.com"}return c()(t,[{key:"pushAnalyticsLoadEvent",value:function(t){var e=encodeURIComponent(t.tenantAlias),n=encodeURIComponent(t.externalAccountId),r=encodeURIComponent(t.externalUserId),o=encodeURIComponent(t.engagementMedium),i=t.programId?"&programId=".concat(encodeURIComponent(t.programId)):"",a="/a/".concat(e,"/widgets/analytics/loaded?externalAccountId=").concat(n,"&externalUserId=").concat(r,"&engagementMedium=").concat(o).concat(i),s=this.domain+a;return Object(m.b)(s,y()({}))}},{key:"pushAnalyticsShareClickedEvent",value:function(t){var e=encodeURIComponent(t.tenantAlias),n=encodeURIComponent(t.externalAccountId),r=encodeURIComponent(t.externalUserId),o=encodeURIComponent(t.engagementMedium),i=encodeURIComponent(t.shareMedium),a="/a/".concat(e,"/widgets/analytics/shared?externalAccountId=").concat(n,"&externalUserId=").concat(r,"&engagementMedium=").concat(o,"&shareMedium=").concat(i),s=this.domain+a;return Object(m.b)(s,y()({}))}}]),t}(),b=d()("squatch-js:widget"),x=function(){function t(e){a()(this,t),b("widget initializing ..."),this.content="error"===e.content?this._error(e.rsCode):e.content,this.type=e.type,this.widgetApi=e.api,this.npmCdn=e.npmCdn,this.analyticsApi=new w({domain:e.domain}),this.frame=document.createElement("iframe"),this.frame.squatchJsApi=this,this.frame.width="100%",this.frame.scrolling="no",this.frame.setAttribute("style","border: 0; background-color: none; width: 1px; min-width: 100%;"),this.context=e.context}var e;return c()(t,[{key:"_loadEvent",value:function(t){if(t){if(!Object(g.c)(t))throw new Error("Widget Load event identity property is not an object");var e;if(Object(g.b)(t,"programId")){if(!Object(g.b)(t,["tenantAlias","accountId","userId","engagementMedium"]))throw new Error("Widget Load event missing required properties");e={tenantAlias:t.tenantAlias,externalAccountId:t.accountId,externalUserId:t.userId,engagementMedium:t.engagementMedium,programId:t.programId}}else{var n=t,r=n.analytics,o=n.mode;e={tenantAlias:r.attributes.tenant,externalAccountId:r.attributes.accountId,externalUserId:r.attributes.userId,engagementMedium:o.widgetMode}}this.analyticsApi.pushAnalyticsLoadEvent(e).then((function(t){b("".concat(e.engagementMedium," loaded event recorded."))})).catch((function(t){b(new Error("pushAnalyticsLoadEvent() ".concat(t)))}))}}},{key:"_shareEvent",value:function(t,e){t&&this.analyticsApi.pushAnalyticsShareClickedEvent({tenantAlias:t.analytics.attributes.tenant,externalAccountId:t.analytics.attributes.accountId,externalUserId:t.analytics.attributes.userId,engagementMedium:t.mode.widgetMode,shareMedium:e}).then((function(n){b("".concat(t.mode.widgetMode," share ").concat(e," event recorded. ").concat(n))})).catch((function(t){b(new Error("pushAnalyticsLoadEvent() ".concat(t)))}))}},{key:"_inviteContacts",value:function(t,e){t&&this.widgetApi.invite({tenantAlias:t.analytics.attributes.tenant,accountId:t.analytics.attributes.accountId,userId:t.analytics.attributes.userId,emailList:e}).then((function(t){b("Sent email invites to share ".concat(e,". ").concat(t))})).catch((function(t){b(new Error("invite() ".concat(t)))}))}},{key:"_error",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"modal",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r='<!DOCTYPE html>\n \x3c!--[if IE 7]><html class="ie7 oldie" lang="en"><![endif]--\x3e\n \x3c!--[if IE 8]><html class="ie8 oldie" lang="en"><![endif]--\x3e\n \x3c!--[if gt IE 8]>\x3c!--\x3e<html lang="en">\x3c!--<![endif]--\x3e\n <head>\n <link rel="stylesheet" media="all" href="https://fast.ssqt.io/assets/css/widget/errorpage.css">\n <style>\n '.concat(n,'\n </style>\n </head>\n <body>\n\n <div class="squatch-container ').concat(e,'" style="width:100%">\n <div class="errorheader">\n <button type="button" class="close" onclick="window.frameElement.squatchJsApi.close();">×</button>\n <p class="errortitle">Error</p>\n </div>\n <div class="errorbody">\n <div class="sadface"><img src="https://fast.ssqt.io/assets/images/face.png"></div>\n <h4>Our referral program is temporarily unavailable.</h4><br>\n <p>Please reload the page or check back later.</p>\n <p>If the persists please contact our support team.</p>\n <br>\n <br>\n <div class="right-align errtxt">\n Error Code: ').concat(t,"\n </div>\n </div>\n </div>\n </body>\n </html>");return r}},{key:"_findInnerContainer",value:(e=o()(p.a.mark((function t(){var e,n,r,o,i;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=function(){var t=n.getElementsByTagName("sqh-global-container"),e=n.getElementsByClassName("squatch-container");return t.length>0?t[0]:e.length>0?e[0]:null},e=this.frame.contentWindow){t.next=4;break}throw new Error("Squatch.js frame inner frame is empty");case 4:n=e.document,o=null,i=0;case 7:if(!(i<5)){t.next=16;break}if(!(o=r())){t.next=11;break}return t.abrupt("break",16);case 11:return t.next=13,_(100);case 13:i++,t.next=7;break;case 16:if(o){t.next=18;break}return t.abrupt("return",n.body);case 18:return t.abrupt("return",o);case 19:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"reload",value:function(t,e){var n=this,r=t.email,o=t.firstName,i=t.lastName,a=this.frame.contentWindow,s=this.context.engagementMedium||"POPUP";if(!a)throw new Error("Frame needs a content window");var c,u=a.document;if("upsert"===this.context.type){var f={email:r||null,firstName:o||null,lastName:i||null,id:this.context.user.id,accountId:this.context.user.accountId};c=this.widgetApi.upsertUser({user:f,engagementMedium:s,widgetType:this.type,jwt:e})}else if("cookie"===this.context.type){var l={email:r||null,firstName:o||null,lastName:i||null};c=this.widgetApi.cookieUser({user:l,engagementMedium:s,widgetType:this.type,jwt:e})}else{if("passwordless"!==this.context.type)throw new Error("can't reload an error widget");c=this.widgetApi.render({user:void 0,engagementMedium:s,widgetType:this.type,jwt:void 0})}c.then((function(t){var e=t.template;if(e){n.content=e;var o=u.createElement("button"),i=u.getElementsByClassName("squatch-register")[0];if(i){o.className="btn btn-primary",o.id="show-stats-btn",o.textContent="REFERRER_WIDGET"===n.type?"Show Stats":"Show Reward";var a="POPUP"===s?"margin-top: 10px; max-width: 130px; width: 100%;":"margin-top: 10px;";o.setAttribute("style",a),o.onclick=function(){n.load(),"POPUP"===s&&n.open()},i.style.paddingTop="30px",i.innerHTML="<p><strong>".concat(r,"</strong><br>Has been successfully registered</p>"),i.appendChild(o)}}})).catch((function(t){var e=t.message;b("".concat(e))}))}}]),t}();function _(t){return new f.a((function(e,n){setTimeout((function(){e()}),t)}))}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(60),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(62)("keys"),o=n(51);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(0),o=n(4),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(41)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(18),o=n(4).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(18);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){e.f=n(10)},function(t,e,n){var r=n(4),o=n(0),i=n(41),a=n(66),s=n(20).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(76),o=n(63).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){"use strict";var r=n(129)(!0);n(87)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e,n){var r=n(22),o=n(39),i=n(61)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){"use strict";var r=n(33);function o(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));var r=n(14),o=n.n(r),i=n(5),a=n.n(i),s=n(6),c=n.n(s),u=n(1),f=n.n(u),l=n(3),p=n.n(l),h=n(48),d=n(46),v=n(47),y=n(25),m=n(55),g=n(2),w=p()("squatch-js:widgets"),b=function(){function t(e){a()(this,t);var n=e,r=Object(g.d)(n);this.tenantAlias=r.tenantAlias,this.domain=r.domain,this.npmCdn=r.npmCdn,this.eventBus=h,this.api=new d.a(r),h.addEventListener("submit_email",t._cb)}var e,n,r;return c()(t,[{key:"createCookieUser",value:(r=o()(f.a.mark((function t(e){var n;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.api.cookieUser(e);case 3:return n=t.sent,t.abrupt("return",{widget:this._renderWidget(n,e,{type:"cookie",engagementMedium:e.engagementMedium}),user:n.user});case 7:throw t.prev=7,t.t0=t.catch(0),w(t.t0),t.t0.apiErrorCode&&this._renderErrorWidget(t.t0,e.engagementMedium),t.t0;case 12:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return r.apply(this,arguments)})},{key:"upsertUser",value:(n=o()(f.a.mark((function t(e){var n,r,o;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e,r=Object(g.f)(n),t.prev=2,t.next=5,this.api.upsertUser(r);case 5:return o=t.sent,t.abrupt("return",{widget:this._renderWidget(o,r,{type:"upsert",user:r.user||null,engagementMedium:e.engagementMedium,container:e.container,trigger:e.trigger}),user:o.user});case 9:throw t.prev=9,t.t0=t.catch(2),w(t.t0),t.t0.apiErrorCode&&this._renderErrorWidget(t.t0,e.engagementMedium),t.t0;case 14:case"end":return t.stop()}}),t,this,[[2,9]])}))),function(t){return n.apply(this,arguments)})},{key:"render",value:(e=o()(f.a.mark((function t(e){var n,r,o,i,a,s;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e,r=Object(g.e)(n),t.prev=2,o=window.location.search,i=new URLSearchParams(o),a=i.get("_saasquatch")||"",e.showOnReferral&&!a){t.next=11;break}return t.next=9,this.api.render(r);case 9:return s=t.sent,t.abrupt("return",{widget:this._renderWidget(s,r,{type:"passwordless",engagementMedium:r.engagementMedium}),user:s.user});case 11:t.next=17;break;case 13:throw t.prev=13,t.t0=t.catch(2),t.t0.apiErrorCode&&this._renderErrorWidget(t.t0,r.engagementMedium),t.t0;case 17:case"end":return t.stop()}}),t,this,[[2,13]])}))),function(t){return e.apply(this,arguments)})},{key:"autofill",value:function(t){var e=t;if("function"!=typeof e){if("string"!=typeof e)throw new Error("Autofill accepts a string or function");var n,r=document.querySelectorAll(e);if(!(r.length>0))throw w("Element id/class or function missing"),new Error("Element id/class or function missing");n=r[0],this.api.squatchReferralCookie().then((function(t){var e=t.code;n.value=e})).catch((function(t){throw t}))}else this.api.squatchReferralCookie().then((function(){return e.apply(void 0,arguments)})).catch((function(t){throw w("Autofill error",t),t}))}},{key:"submitEmail",value:function(e){h.removeEventListener("submit_email",t._cb),h.addEventListener("submit_email",e)}},{key:"_renderWidget",value:function(e,n,r){if(w("Rendering Widget..."),!e)throw new Error("Unable to get a response");var o,i=!!n.showOnReferral,a=!1,s=e.jsOptions||"",c={content:e.template,type:n.widgetType||s.widget.defaultWidgetType,api:this.api,domain:this.domain,npmCdn:this.npmCdn,context:r};if(s.widgetUrlMappings&&s.widgetUrlMappings.forEach((function(n){t._matchesUrl(n.url)&&("CONVERSION_WIDGET"!==n.widgetType||e.user.referredBy&&e.user.referredBy.code?(i=n.displayOnLoad,a=n.showAsCTA,w("Display ".concat(n.widgetType," on ").concat(n.url))):w("Don't display ".concat(n.widgetType," when no referral on widget rule match ").concat(n.url)))})),s.conversionUrls&&s.conversionUrls.forEach((function(n){e.user.referredBy&&t._matchesUrl(n)&&w("This is a conversion URL",n)})),s.fuelTankAutofillUrls&&(w("We found a fuel tank autofill!"),s.fuelTankAutofillUrls.forEach((function(n){var r=n.url,o=n.formSelector;if(t._matchesUrl(r)&&(w("Fuel Tank URL matches"),e.user.referredBy&&e.user.referredBy.code)){var i=document.querySelector(o);i?i.value=e.user.referredBy.referredReward.fuelTankCode||"":w(new Error("Element with id/class ".concat(o," was not found.")))}}))),a||"EMBED"!==n.engagementMedium)if(a||"POPUP"!==n.engagementMedium)if(a){w("display CTA");var u=s.cta.content.buttonSide,f=s.cta.content.buttonPosition;(o=new m.a(c,{side:u,position:f})).load(),i&&o.open()}else w("display popup on load"),(o=new y.a(c)).load(),i&&o.open();else(o=new y.a(c,c.context.trigger)).load(),i&&o.open();else(o=new v.a(c,c.context.container)).load();return o}},{key:"_renderErrorWidget",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"POPUP",n=t.apiErrorCode,r=t.rsCode,o=t.message;w(new Error("".concat(n," (").concat(r,") ").concat(o)));var i={content:"error",rsCode:r,api:this.api,domain:this.domain,npmCdn:this.npmCdn,type:"ERROR_WIDGET",context:{type:"error"}};"EMBED"===e?new v.a(i).load():"POPUP"===e&&new y.a(i).load()}}],[{key:"_matchesUrl",value:function(t){return!!window.location.href.match(new RegExp(t))}},{key:"_cb",value:function(t,e,n){var r;r="string"==typeof n||n instanceof String?{email:n}:n,e.reload(r)}}]),t}()},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(22),o=n(23),i=n(111)(!1),a=n(61)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},function(t,e,n){t.exports=!n(24)&&!n(34)((function(){return 7!=Object.defineProperty(n(64)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){"use strict";var r=n(4),o=n(22),i=n(24),a=n(9),s=n(79),c=n(114).KEY,u=n(34),f=n(62),l=n(53),p=n(51),h=n(10),d=n(66),v=n(67),y=n(115),m=n(116),g=n(15),w=n(18),b=n(39),x=n(23),_=n(65),C=n(42),O=n(54),E=n(81),j=n(43),T=n(68),k=n(20),S=n(50),A=j.f,P=k.f,I=E.f,R=r.Symbol,M=r.JSON,F=M&&M.stringify,L=h("_hidden"),q=h("toPrimitive"),U={}.propertyIsEnumerable,N=f("symbol-registry"),D=f("symbols"),W=f("op-symbols"),H=Object.prototype,B="function"==typeof R&&!!T.f,z=r.QObject,J=!z||!z.prototype||!z.prototype.findChild,G=i&&u((function(){return 7!=O(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=A(H,e);r&&delete H[e],P(t,e,n),r&&t!==H&&P(H,e,r)}:P,$=function(t){var e=D[t]=O(R.prototype);return e._k=t,e},X=B&&"symbol"==typeof R.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof R},K=function(t,e,n){return t===H&&K(W,e,n),g(t),e=_(e,!0),g(n),o(D,e)?(n.enumerable?(o(t,L)&&t[L][e]&&(t[L][e]=!1),n=O(n,{enumerable:C(0,!1)})):(o(t,L)||P(t,L,C(1,{})),t[L][e]=!0),G(t,e,n)):P(t,e,n)},V=function(t,e){g(t);for(var n,r=y(e=x(e)),o=0,i=r.length;i>o;)K(t,n=r[o++],e[n]);return t},Q=function(t){var e=U.call(this,t=_(t,!0));return!(this===H&&o(D,t)&&!o(W,t))&&(!(e||!o(this,t)||!o(D,t)||o(this,L)&&this[L][t])||e)},Y=function(t,e){if(t=x(t),e=_(e,!0),t!==H||!o(D,e)||o(W,e)){var n=A(t,e);return!n||!o(D,e)||o(t,L)&&t[L][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=I(x(t)),r=[],i=0;n.length>i;)o(D,e=n[i++])||e==L||e==c||r.push(e);return r},tt=function(t){for(var e,n=t===H,r=I(n?W:x(t)),i=[],a=0;r.length>a;)!o(D,e=r[a++])||n&&!o(H,e)||i.push(D[e]);return i};B||(s((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===H&&e.call(W,n),o(this,L)&&o(this[L],t)&&(this[L][t]=!1),G(this,t,C(1,n))};return i&&J&&G(H,t,{configurable:!0,set:e}),$(t)}).prototype,"toString",(function(){return this._k})),j.f=Y,k.f=K,n(70).f=E.f=Z,n(69).f=Q,T.f=tt,i&&!n(41)&&s(H,"propertyIsEnumerable",Q,!0),d.f=function(t){return $(h(t))}),a(a.G+a.W+a.F*!B,{Symbol:R});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)h(et[nt++]);for(var rt=S(h.store),ot=0;rt.length>ot;)v(rt[ot++]);a(a.S+a.F*!B,"Symbol",{for:function(t){return o(N,t+="")?N[t]:N[t]=R(t)},keyFor:function(t){if(!X(t))throw TypeError(t+" is not a symbol!");for(var e in N)if(N[e]===t)return e},useSetter:function(){J=!0},useSimple:function(){J=!1}}),a(a.S+a.F*!B,"Object",{create:function(t,e){return void 0===e?O(t):V(O(t),e)},defineProperty:K,defineProperties:V,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Z,getOwnPropertySymbols:tt});var it=u((function(){T.f(1)}));a(a.S+a.F*it,"Object",{getOwnPropertySymbols:function(t){return T.f(b(t))}}),M&&a(a.S+a.F*(!B||u((function(){var t=R();return"[null]"!=F([t])||"{}"!=F({a:t})||"{}"!=F(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(w(e)||void 0!==t)&&!X(t))return m(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!X(e))return e}),r[1]=e,F.apply(M,r)}}),R.prototype[q]||n(28)(R.prototype,q,R.prototype.valueOf),l(R,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,e,n){t.exports=n(28)},function(t,e,n){var r=n(4).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(23),o=n(70).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return a.slice()}}(t):o(r(t))}},function(t,e,n){"use strict";var r=n(20),o=n(42);t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},function(t,e,n){t.exports=n(123)},function(t,e){},function(t,e,n){"use strict";function r(){console.log("Having trouble using Squatch.js? Go to https://docs.referralsaasquatch.com/developer/ for tutorials, references and error codes.")}n.d(e,"a",(function(){return r}))},function(t,e){},function(t,e,n){"use strict";var r=n(41),o=n(9),i=n(79),a=n(28),s=n(44),c=n(130),u=n(53),f=n(72),l=n(10)("iterator"),p=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,d,v,y,m){c(n,e,d);var g,w,b,x=function(t){if(!p&&t in E)return E[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},_=e+" Iterator",C="values"==v,O=!1,E=t.prototype,j=E[l]||E["@@iterator"]||v&&E[v],T=j||x(v),k=v?C?x("entries"):T:void 0,S="Array"==e&&E.entries||j;if(S&&(b=f(S.call(new t)))!==Object.prototype&&b.next&&(u(b,_,!0),r||"function"==typeof b[l]||a(b,l,h)),C&&j&&"values"!==j.name&&(O=!0,T=function(){return j.call(this)}),r&&!m||!p&&!O&&E[l]||a(E,l,T),s[e]=T,s[_]=h,v)if(g={values:C?T:x("values"),keys:y?T:x("keys"),entries:k},m)for(w in g)w in E||i(E,w,g[w]);else o(o.P+o.F*(p||O),e,g);return g}},function(t,e,n){n(131);for(var r=n(4),o=n(28),i=n(44),a=n(10)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<s.length;c++){var u=s[c],f=r[u],l=f&&f.prototype;l&&!l[a]&&o(l,a,u),i[u]=i.Array}},function(t,e,n){var r=n(40),o=n(10)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(15);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){var r=n(44),o=n(10)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,e,n){var r=n(89),o=n(10)("iterator"),i=n(44);t.exports=n(0).getIteratorMethod=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){var r=n(15),o=n(33),i=n(10)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},function(t,e,n){var r,o,i,a=n(32),s=n(95),c=n(80),u=n(64),f=n(4),l=f.process,p=f.setImmediate,h=f.clearImmediate,d=f.MessageChannel,v=f.Dispatch,y=0,m={},g=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},w=function(t){g.call(t.data)};p&&h||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++y]=function(){s("function"==typeof t?t:Function(t),e)},r(y),y},h=function(t){delete m[t]},"process"==n(40)(l)?r=function(t){l.nextTick(a(g,t,1))}:v&&v.now?r=function(t){v.now(a(g,t,1))}:d?(i=(o=new d).port2,o.port1.onmessage=w,r=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",w,!1)):r="onreadystatechange"in u("script")?function(t){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),g.call(t)}}:function(t){setTimeout(a(g,t,1),0)}),t.exports={set:p,clear:h}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(15),o=n(18),i=n(73);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){var r=n(10)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(t){}return n}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return null!==t&&"object"===r(t)}},function(t,e,n){t.exports=n(164)},function(t,e,n){"use strict";n.d(e,"a",(function(){return x}));var r=n(12),o=n.n(r),i=n(13),a=n.n(i),s=n(16),c=n.n(s),u=n(21),f=n.n(u),l=n(102),p=n.n(l),h=n(11),d=n.n(h),v=n(3),y=n.n(v),m=n(56);function g(t,e){var n=d()(t);if(o.a){var r=o()(t);e&&(r=r.filter((function(e){return a()(t,e).enumerable}))),n.push.apply(n,r)}return n}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?g(Object(n),!0).forEach((function(e){f()(t,e,n[e])})):c.a?Object.defineProperties(t,c()(n)):g(Object(n)).forEach((function(e){Object.defineProperty(t,e,a()(n,e))}))}return t}var b=y()("squatch-js");function x(t){var e=window.location.search,n=new URLSearchParams(e).get("_saasquatchExtra")||"";if(n){var r;try{r=JSON.parse(Object(m.b)(n))}catch(t){return void b("Unable to decode _saasquatchExtra config")}var o=function(t){var e,n=d()(t||{})[0],r=d()((null==t?void 0:t[n])||{})[0],o=null==t||null===(e=t[n])||void 0===e?void 0:e[r];return{domain:n?"https://".concat(n):void 0,tenantAlias:r,widgetConfig:o}}(r),i=o.domain,a=o.tenantAlias,s=o.widgetConfig;if(i&&a&&s)return{widgetConfig:w({widgetType:s.autoPopupWidgetType},p()(s,["autoPopupWidgetType"])),squatchConfig:w(w({},t?{configIn:t}:{}),{},{domain:i,tenantAlias:a})};b("_saasquatchExtra did not have an expected structure")}else b("No _saasquatchExtra param")}},function(t,e,n){var r=n(12),o=n(174);t.exports=function(t,e){if(null==t)return{};var n,i,a=o(t,e);if(r){var s=r(t);for(i=0;i<s.length;i++)n=s[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){t.exports=n(175)},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(5),o=n.n(r),i=n(6),a=n.n(i),s=n(17),c=n.n(s),u=n(19),f=n(2),l=function(){function t(e){o()(this,t);var n=e,r=Object(f.d)(n);this.tenantAlias=r.tenantAlias,this.domain=r.domain}return a()(t,[{key:"track",value:function(t,e){var n=e,r=function(t){if(!Object(f.a)(t,"accountId","events","userId"))throw new Error("Fields required");if(!Array.isArray(t.events))throw new Error("'events' should be an array");return t}(t),o=function(t){if(!Object(f.c)(t))throw new Error("'options' should be an object");return t}(n).jwt,i=encodeURIComponent(this.tenantAlias),a=encodeURIComponent(r.userId),s=encodeURIComponent(r.accountId),l="/api/v1/".concat(i,"/open/account/").concat(s,"/user/").concat(a,"/events"),p=this.domain+l;return Object(u.b)(p,c()(r),o)}}]),t}()},function(t,e,n){"use strict";function r(){var t=window.squatch||null,e=window._squatch||null;if(t&&e){(e.ready||[]).forEach((function(t){return setTimeout((function(){return t()}),0)})),window._squatch=void 0;try{delete window._squatch}catch(t){throw t}}}n.d(e,"a",(function(){return r}))},function(t,e,n){t.exports=n(107)},function(t,e,n){"use strict";n.r(e),n.d(e,"api",(function(){return R})),n.d(e,"widgets",(function(){return M})),n.d(e,"events",(function(){return F})),n.d(e,"widget",(function(){return L})),n.d(e,"auto",(function(){return q})),n.d(e,"init",(function(){return U})),n.d(e,"ready",(function(){return N})),n.d(e,"autofill",(function(){return D})),n.d(e,"submitEmail",(function(){return W})),n.d(e,"pushCookie",(function(){return H}));var r=n(11),o=n.n(r),i=n(12),a=n.n(i),s=n(13),c=n.n(s),u=n(16),f=n.n(u),l=n(21),p=n.n(l),h=n(3),d=n.n(h),v=n(74);n.d(e,"Widgets",(function(){return v.a}));var y=n(47);n.d(e,"EmbedWidget",(function(){return y.a}));var m=n(25);n.d(e,"PopupWidget",(function(){return m.a}));var g=n(55);n.d(e,"CtaWidget",(function(){return g.a}));var w=n(46);n.d(e,"WidgetApi",(function(){return w.a}));var b=n(104),x=n(105),_=n(2),C=n(56),O=n(101),E=n(84);for(var j in E)["default","Widgets","EmbedWidget","PopupWidget","CtaWidget","WidgetApi","api","widgets","events","widget","auto","init","ready","autofill","submitEmail","pushCookie"].indexOf(j)<0&&function(t){n.d(e,t,(function(){return E[t]}))}(j);var T=n(85);function k(t,e){var n=o()(t);if(a.a){var r=a()(t);e&&(r=r.filter((function(e){return c()(t,e).enumerable}))),n.push.apply(n,r)}return n}n.d(e,"help",(function(){return T.a}));var S=d()("squatch-js"),A=null,P=null,I=null;function R(){return A}function M(){return P}function F(){return I}function L(t){var e;return null===(e=M())||void 0===e?void 0:e.render(t)}function q(t){var e=Object(O.a)(t);if(e){var n,r=e.squatchConfig,o=e.widgetConfig;return U(r),null===(n=M())||void 0===n?void 0:n.render(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach((function(e){p()(t,e,n[e])})):f.a?Object.defineProperties(t,f()(n)):k(Object(n)).forEach((function(e){Object.defineProperty(t,e,c()(n,e))}))}return t}({showOnReferral:!0},o))}}function U(t){var e=t,n=Object(_.d)(e);(n.tenantAlias.match("^test")||n.debug)&&d.a.enable("squatch-js*"),S("initializing ..."),A=new w.a(n),P=new v.a(n),I=new b.a(n),S("Widget API instance",A),S("Widgets instance",P),S("Events API instance",I)}function N(t){t()}function D(t){M().autofill(t)}function W(t){M().submitEmail(t)}function H(){Object(C.a)()}"undefined"==typeof document||window.SaaSquatchDoNotAutoDrop||H(),"undefined"!=typeof document&&Object(x.a)()},function(t,e,n){n(109),t.exports=n(0).Object.keys},function(t,e,n){var r=n(39),o=n(50);n(52)("keys",(function(){return function(t){return o(r(t))}}))},function(t,e,n){var r=n(40);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(23),o=n(59),i=n(112);t.exports=function(t){return function(e,n,a){var s,c=r(e),u=o(c.length),f=i(a,u);if(t&&n!=n){for(;u>f;)if((s=c[f++])!=s)return!0}else for(;u>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(60),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){n(78),t.exports=n(0).Object.getOwnPropertySymbols},function(t,e,n){var r=n(51)("meta"),o=n(18),i=n(22),a=n(20).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(34)((function(){return c(Object.preventExtensions({}))})),f=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},l=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!c(t))return"F";if(!e)return"E";f(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!c(t))return!0;if(!e)return!1;f(t)}return t[r].w},onFreeze:function(t){return u&&l.NEED&&c(t)&&!i(t,r)&&f(t),t}}},function(t,e,n){var r=n(50),o=n(68),i=n(69);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var a,s=n(t),c=i.f,u=0;s.length>u;)c.call(t,a=s[u++])&&e.push(a);return e}},function(t,e,n){var r=n(40);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(20),o=n(15),i=n(50);t.exports=n(24)?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),s=a.length,c=0;s>c;)r.f(t,n=a[c++],e[n]);return t}},function(t,e,n){n(119);var r=n(0).Object;t.exports=function(t,e){return r.getOwnPropertyDescriptor(t,e)}},function(t,e,n){var r=n(23),o=n(43).f;n(52)("getOwnPropertyDescriptor",(function(){return function(t,e){return o(r(t),e)}}))},function(t,e,n){n(121),t.exports=n(0).Object.getOwnPropertyDescriptors},function(t,e,n){var r=n(9),o=n(122),i=n(23),a=n(43),s=n(82);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=i(t),c=a.f,u=o(r),f={},l=0;u.length>l;)void 0!==(n=c(r,e=u[l++]))&&s(f,e,n);return f}})},function(t,e,n){var r=n(70),o=n(68),i=n(15),a=n(4).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(i(t)),n=o.f;return n?e.concat(n(t)):e}},function(t,e,n){n(124);var r=n(0).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){var r=n(9);r(r.S+r.F*!n(24),"Object",{defineProperty:n(20).f})},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],f=!1,l=-1;function p(){f&&c&&(f=!1,c.length?u=c.concat(u):l=-1,u.length&&h())}function h(){if(!f){var t=s(p);f=!0;for(var e=u.length;e;){for(c=u,u=[];++l<e;)c&&c[l].run();l=-1,e=u.length}c=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function v(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new d(t,e)),1!==u.length||f||s(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";t.exports=function(t){function e(t){for(var e=0,n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return r.colors[Math.abs(e)%r.colors.length]}function r(t){var n;function a(){if(a.enabled){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];var i=a,s=Number(new Date),c=s-(n||s);i.diff=c,i.prev=n,i.curr=s,n=s,e[0]=r.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");var u=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(function(t,n){if("%%"===t)return t;u++;var o=r.formatters[n];if("function"==typeof o){var a=e[u];t=o.call(i,a),e.splice(u,1),u--}return t})),r.formatArgs.call(i,e);var f=i.log||r.log;f.apply(i,e)}}return a.namespace=t,a.enabled=r.enabled(t),a.useColors=r.useColors(),a.color=e(t),a.destroy=o,a.extend=i,"function"==typeof r.init&&r.init(a),r.instances.push(a),a}function o(){var t=r.instances.indexOf(this);return-1!==t&&(r.instances.splice(t,1),!0)}function i(t,e){return r(this.namespace+(void 0===e?":":e)+t)}return r.debug=r,r.default=r,r.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},r.disable=function(){r.enable("")},r.enable=function(t){var e;r.save(t),r.names=[],r.skips=[];var n=("string"==typeof t?t:"").split(/[\s,]+/),o=n.length;for(e=0;e<o;e++)n[e]&&("-"===(t=n[e].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+t.substr(1)+"$")):r.names.push(new RegExp("^"+t+"$")));for(e=0;e<r.instances.length;e++){var i=r.instances[e];i.enabled=r.enabled(i.namespace)}},r.enabled=function(t){if("*"===t[t.length-1])return!0;var e,n;for(e=0,n=r.skips.length;e<n;e++)if(r.skips[e].test(t))return!1;for(e=0,n=r.names.length;e<n;e++)if(r.names[e].test(t))return!0;return!1},r.humanize=n(127),Object.keys(t).forEach((function(e){r[e]=t[e]})),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=e,r.enable(r.load()),r}},function(t,e){var n=1e3,r=6e4,o=60*r,i=24*o;function a(t,e,n,r){var o=e>=1.5*n;return Math.round(t/n)+" "+r+(o?"s":"")}t.exports=function(t,e){e=e||{};var s=typeof t;if("string"===s&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!e)return;var a=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*o;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(t);if("number"===s&&isFinite(t))return e.long?function(t){var e=Math.abs(t);if(e>=i)return a(t,e,i,"day");if(e>=o)return a(t,e,o,"hour");if(e>=r)return a(t,e,r,"minute");if(e>=n)return a(t,e,n,"second");return t+" ms"}(t):function(t){var e=Math.abs(t);if(e>=i)return Math.round(t/i)+"d";if(e>=o)return Math.round(t/o)+"h";if(e>=r)return Math.round(t/r)+"m";if(e>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){n(86),n(71),n(88),n(134),n(141),n(142),t.exports=n(0).Promise},function(t,e,n){var r=n(60),o=n(58);t.exports=function(t){return function(e,n){var i,a,s=String(o(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(i=s.charCodeAt(c))<55296||i>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):i:t?s.slice(c,c+2):a-56320+(i-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(54),o=n(42),i=n(53),a={};n(28)(a,n(10)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){"use strict";var r=n(132),o=n(133),i=n(44),a=n(23);t.exports=n(87)(Array,"Array",(function(t,e){this._t=a(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r,o,i,a,s=n(41),c=n(4),u=n(32),f=n(89),l=n(9),p=n(18),h=n(33),d=n(135),v=n(136),y=n(93),m=n(94).set,g=n(137)(),w=n(73),b=n(96),x=n(138),_=n(97),C=c.TypeError,O=c.process,E=O&&O.versions,j=E&&E.v8||"",T=c.Promise,k="process"==f(O),S=function(){},A=o=w.f,P=!!function(){try{var t=T.resolve(1),e=(t.constructor={})[n(10)("species")]=function(t){t(S,S)};return(k||"function"==typeof PromiseRejectionEvent)&&t.then(S)instanceof e&&0!==j.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(t){}}(),I=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},R=function(t,e){if(!t._n){t._n=!0;var n=t._c;g((function(){for(var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,s=o?e.ok:e.fail,c=e.resolve,u=e.reject,f=e.domain;try{s?(o||(2==t._h&&L(t),t._h=1),!0===s?n=r:(f&&f.enter(),n=s(r),f&&(f.exit(),a=!0)),n===e.promise?u(C("Promise-chain cycle")):(i=I(n))?i.call(n,c,u):c(n)):u(r)}catch(t){f&&!a&&f.exit(),u(t)}};n.length>i;)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&M(t)}))}},M=function(t){m.call(c,(function(){var e,n,r,o=t._v,i=F(t);if(i&&(e=b((function(){k?O.emit("unhandledRejection",o,t):(n=c.onunhandledrejection)?n({promise:t,reason:o}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",o)})),t._h=k||F(t)?2:1),t._a=void 0,i&&e.e)throw e.v}))},F=function(t){return 1!==t._h&&0===(t._a||t._c).length},L=function(t){m.call(c,(function(){var e;k?O.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})}))},q=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),R(e,!0))},U=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw C("Promise can't be resolved itself");(e=I(t))?g((function(){var r={_w:n,_d:!1};try{e.call(t,u(U,r,1),u(q,r,1))}catch(t){q.call(r,t)}})):(n._v=t,n._s=1,R(n,!1))}catch(t){q.call({_w:n,_d:!1},t)}}};P||(T=function(t){d(this,T,"Promise","_h"),h(t),r.call(this);try{t(u(U,this,1),u(q,this,1))}catch(t){q.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(139)(T.prototype,{then:function(t,e){var n=A(y(this,T));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=k?O.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&R(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=u(U,t,1),this.reject=u(q,t,1)},w.f=A=function(t){return t===T||t===a?new i(t):o(t)}),l(l.G+l.W+l.F*!P,{Promise:T}),n(53)(T,"Promise"),n(140)("Promise"),a=n(0).Promise,l(l.S+l.F*!P,"Promise",{reject:function(t){var e=A(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(s||!P),"Promise",{resolve:function(t){return _(s&&this===a?T:this,t)}}),l(l.S+l.F*!(P&&n(98)((function(t){T.all(t).catch(S)}))),"Promise",{all:function(t){var e=this,n=A(e),r=n.resolve,o=n.reject,i=b((function(){var n=[],i=0,a=1;v(t,!1,(function(t){var s=i++,c=!1;n.push(void 0),a++,e.resolve(t).then((function(t){c||(c=!0,n[s]=t,--a||r(n))}),o)})),--a||r(n)}));return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=A(e),r=n.reject,o=b((function(){v(t,!1,(function(t){e.resolve(t).then(n.resolve,r)}))}));return o.e&&r(o.v),n.promise}})},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(32),o=n(90),i=n(91),a=n(15),s=n(59),c=n(92),u={},f={};(e=t.exports=function(t,e,n,l,p){var h,d,v,y,m=p?function(){return t}:c(t),g=r(n,l,e?2:1),w=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(i(m)){for(h=s(t.length);h>w;w++)if((y=e?g(a(d=t[w])[0],d[1]):g(t[w]))===u||y===f)return y}else for(v=m.call(t);!(d=v.next()).done;)if((y=o(v,g,d.value,e))===u||y===f)return y}).BREAK=u,e.RETURN=f},function(t,e,n){var r=n(4),o=n(94).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==n(40)(a);t.exports=function(){var t,e,n,u=function(){var r,o;for(c&&(r=a.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(u)};else if(!i||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var f=s.resolve(void 0);n=function(){f.then(u)}}else n=function(){o.call(r,u)};else{var l=!0,p=document.createTextNode("");new i(u).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},function(t,e,n){var r=n(4).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){var r=n(28);t.exports=function(t,e,n){for(var o in e)n&&t[o]?t[o]=e[o]:r(t,o,e[o]);return t}},function(t,e,n){"use strict";var r=n(4),o=n(0),i=n(20),a=n(24),s=n(10)("species");t.exports=function(t){var e="function"==typeof o[t]?o[t]:r[t];a&&e&&!e[s]&&i.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){"use strict";var r=n(9),o=n(0),i=n(4),a=n(93),s=n(97);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then((function(){return n}))}:t,n?function(n){return s(e,t()).then((function(){throw n}))}:t)}})},function(t,e,n){"use strict";var r=n(9),o=n(73),i=n(96);r(r.S,"Promise",{try:function(t){var e=o.f(this),n=i(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new _(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var f=c(t,e,n);if("normal"===f.type){if(r=n.done?"completed":"suspendedYield",f.arg===u)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(r="completed",n.method="throw",n.arg=f.arg)}}}(t,n,a),i}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var u={};function f(){}function l(){}function p(){}var h={};h[o]=function(){return this};var d=Object.getPrototypeOf,v=d&&d(d(C([])));v&&v!==e&&n.call(v,o)&&(h=v);var y=p.prototype=f.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function g(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,s){var u=c(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,u;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return l.prototype=y.constructor=p,p.constructor=l,p[a]=l.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},m(g.prototype),g.prototype[i]=function(){return this},t.AsyncIterator=g,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new g(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(y),y[a]="Generator",y[o]=function(){return this},y.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=C,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){n(78),n(86),n(145),n(146),t.exports=n(0).Symbol},function(t,e,n){n(67)("asyncIterator")},function(t,e,n){n(67)("observable")},function(t,e,n){n(71),n(88),t.exports=n(66).f("iterator")},function(t,e,n){var r=n(0),o=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},function(t,e,n){function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<r.length;o++)if((n=r[o])===e||n.fn===e){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){t.exports=o,o.default=o,o.stable=a,o.stableStringify=a;var n=[],r=[];function o(t,e,o){var i;for(!function t(e,o,i,a){var s;if("object"==typeof e&&null!==e){for(s=0;s<i.length;s++)if(i[s]===e){var c=Object.getOwnPropertyDescriptor(a,o);return void(void 0!==c.get?c.configurable?(Object.defineProperty(a,o,{value:"[Circular]"}),n.push([a,o,e,c])):r.push([e,o]):(a[o]="[Circular]",n.push([a,o,e])))}if(i.push(e),Array.isArray(e))for(s=0;s<e.length;s++)t(e[s],s,i,e);else{var u=Object.keys(e);for(s=0;s<u.length;s++){var f=u[s];t(e[f],f,i,e)}}i.pop()}}(t,"",[],void 0),i=0===r.length?JSON.stringify(t,e,o):JSON.stringify(t,s(e),o);0!==n.length;){var a=n.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}return i}function i(t,e){return t<e?-1:t>e?1:0}function a(t,e,o){var a,c=function t(e,o,a,s){var c;if("object"==typeof e&&null!==e){for(c=0;c<a.length;c++)if(a[c]===e){var u=Object.getOwnPropertyDescriptor(s,o);return void(void 0!==u.get?u.configurable?(Object.defineProperty(s,o,{value:"[Circular]"}),n.push([s,o,e,u])):r.push([e,o]):(s[o]="[Circular]",n.push([s,o,e])))}if("function"==typeof e.toJSON)return;if(a.push(e),Array.isArray(e))for(c=0;c<e.length;c++)t(e[c],c,a,e);else{var f={},l=Object.keys(e).sort(i);for(c=0;c<l.length;c++){var p=l[c];t(e[p],p,a,e),f[p]=e[p]}if(void 0===s)return f;n.push([s,o,e]),s[o]=f}a.pop()}}(t,"",[],void 0)||t;for(a=0===r.length?JSON.stringify(c,e,o):JSON.stringify(c,s(e),o);0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}return a}function s(t){return t=void 0!==t?t:function(t,e){return e},function(e,n){if(r.length>0)for(var o=0;o<r.length;o++){var i=r[o];if(i[1]===e&&i[0]===n){n="[Circular]",r.splice(o,1);break}}return t.call(this,e,n)}}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(99);function i(t){if(t)return function(t){for(var e in i.prototype)Object.prototype.hasOwnProperty.call(i.prototype,e)&&(t[e]=i.prototype[e]);return t}(t)}t.exports=i,i.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},i.prototype.parse=function(t){return this._parser=t,this},i.prototype.responseType=function(t){return this._responseType=t,this},i.prototype.serialize=function(t){return this._serializer=t,this},i.prototype.timeout=function(t){if(!t||"object"!==r(t))return this._timeout=t,this._responseTimeout=0,this._uploadTimeout=0,this;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;case"upload":this._uploadTimeout=t.upload;break;default:console.warn("Unknown timeout option",e)}return this},i.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};var a=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];i.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(t,e);if(!0===n)return!0;if(!1===n)return!1}catch(t){console.error(t)}if(e&&e.status&&e.status>=500&&501!==e.status)return!0;if(t){if(t.code&&a.includes(t.code))return!0;if(t.timeout&&"ECONNABORTED"===t.code)return!0;if(t.crossDomain)return!0}return!1},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},i.prototype.then=function(t,e){var n=this;if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(t,e){r.on("abort",(function(){if(n.timedout&&n.timedoutError)e(n.timedoutError);else{var t=new Error("Aborted");t.code="ABORTED",t.status=n.status,t.method=n.method,t.url=n.url,e(t)}})),r.end((function(n,r){n?e(n):t(r)}))}))}return this._fullfilledPromise.then(t,e)},i.prototype.catch=function(t){return this.then(void 0,t)},i.prototype.use=function(t){return t(this),this},i.prototype.ok=function(t){if("function"!=typeof t)throw new Error("Callback required");return this._okCallback=t,this},i.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},i.prototype.get=function(t){return this._header[t.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(t,e){if(o(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.set(n,t[n]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},i.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},i.prototype.field=function(t,e){if(null==t)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(o(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.field(n,t[n]);return this}if(Array.isArray(e)){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.field(t,e[r]);return this}if(null==e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=String(e)),this._getFormData().append(t,e),this},i.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},i.prototype._auth=function(t,e,n,r){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r("".concat(t,":").concat(e))));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer ".concat(t))}return this},i.prototype.withCredentials=function(t){return void 0===t&&(t=!0),this._withCredentials=t,this},i.prototype.redirects=function(t){return this._maxRedirects=t,this},i.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw new TypeError("Invalid argument");return this._maxResponseSize=t,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(t){var e=o(t),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(e&&o(this._data))for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._data[r]=t[r]);else"string"==typeof t?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(t):t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)||n||this.type("json"),this},i.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},i.prototype._finalizeQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(this.url.includes("?")?"&":"?")+t),this._query.length=0,this._sort){var e=this.url.indexOf("?");if(e>=0){var n=this.url.slice(e+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,e)+"?"+n.join("&")}}},i.prototype._appendQueryString=function(){console.warn("Unsupported")},i.prototype._timeoutError=function(t,e,n){if(!this._aborted){var r=new Error("".concat(t+e,"ms exceeded"));r.timeout=e,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)}},i.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},function(t,e,n){"use strict";var r=n(153);function o(t){if(t)return function(t){for(var e in o.prototype)Object.prototype.hasOwnProperty.call(o.prototype,e)&&(t[e]=o.prototype[e]);return t}(t)}t.exports=o,o.prototype.get=function(t){return this.header[t.toLowerCase()]},o.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=r.type(e);var n=r.params(e);for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(this[o]=n[o]);this.links={};try{t.link&&(this.links=r.parseLinks(t.link))}catch(t){}},o.prototype._setStatusProperties=function(t){var e=t/100|0;this.statusCode=t,this.status=this.statusCode,this.statusType=e,this.info=1===e,this.ok=2===e,this.redirect=3===e,this.clientError=4===e,this.serverError=5===e,this.error=(4===e||5===e)&&this.toError(),this.created=201===t,this.accepted=202===t,this.noContent=204===t,this.badRequest=400===t,this.unauthorized=401===t,this.notAcceptable=406===t,this.forbidden=403===t,this.notFound=404===t,this.unprocessableEntity=422===t}},function(t,e,n){"use strict";e.type=function(t){return t.split(/ *; */).shift()},e.params=function(t){return t.split(/ *; */).reduce((function(t,e){var n=e.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(t[r]=o),t}),{})},e.parseLinks=function(t){return t.split(/ *, */).reduce((function(t,e){var n=e.split(/ *; */),r=n[0].slice(1,-1);return t[n[1].split(/ *= */)[1].slice(1,-1)]=r,t}),{})},e.cleanHeader=function(t,e){return delete t["content-type"],delete t["content-length"],delete t["transfer-encoding"],delete t.host,e&&(delete t.authorization,delete t.cookie),t}},function(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function o(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach((function(t){o.prototype[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this._defaults.push({fn:t,args:n}),this}})),o.prototype._setDefaults=function(t){this._defaults.forEach((function(e){t[e.fn].apply(t,r(e.args))}))},t.exports=o},function(t,e,n){n(156),t.exports=n(0).Reflect.construct},function(t,e,n){var r=n(9),o=n(54),i=n(33),a=n(15),s=n(18),c=n(34),u=n(157),f=(n(4).Reflect||{}).construct,l=c((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),p=!c((function(){f((function(){}))}));r(r.S+r.F*(l||p),"Reflect",{construct:function(t,e){i(t),a(e);var n=arguments.length<3?t:i(arguments[2]);if(p&&!l)return f(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(u.apply(t,r))}var c=n.prototype,h=o(s(c)?c:Object.prototype),d=Function.apply.call(t,h,e);return s(d)?d:h}})},function(t,e,n){"use strict";var r=n(33),o=n(18),i=n(95),a=[].slice,s={},c=function(t,e,n){if(!(e in s)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";s[e]=Function("F,a","return new F("+r.join(",")+")")}return s[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),s=function(){var r=n.concat(a.call(arguments));return this instanceof s?c(e,r.length,r):i(e,r,t)};return o(e.prototype)&&(s.prototype=e.prototype),s}},function(t,e,n){n(71),n(159),t.exports=n(0).Array.from},function(t,e,n){"use strict";var r=n(32),o=n(9),i=n(39),a=n(90),s=n(91),c=n(59),u=n(82),f=n(92);o(o.S+o.F*!n(98)((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,o,l,p=i(t),h="function"==typeof this?this:Array,d=arguments.length,v=d>1?arguments[1]:void 0,y=void 0!==v,m=0,g=f(p);if(y&&(v=r(v,d>2?arguments[2]:void 0,2)),null==g||h==Array&&s(g))for(n=new h(e=c(p.length));e>m;m++)u(n,m,y?v(p[m],m):p[m]);else for(l=g.call(p),n=new h;!(o=l.next()).done;m++)u(n,m,y?a(l,v,[o.value,m],!0):o.value);return n.length=m,n}})},function(t,e,n){t.exports=n(161)},function(t,e,n){n(162),t.exports=n(0).Reflect.get},function(t,e,n){var r=n(43),o=n(72),i=n(22),a=n(9),s=n(18),c=n(15);a(a.S,"Reflect",{get:function t(e,n){var a,u,f=arguments.length<3?e:arguments[2];return c(e)===f?e[n]:(a=r.f(e,n))?i(a,"value")?a.value:void 0!==a.get?a.get.call(f):void 0:s(u=o(e))?t(u,n,f):void 0}})},function(t,e,n){var r=n(7);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){n(165),t.exports=n(0).Object.setPrototypeOf},function(t,e,n){var r=n(9);r(r.S,"Object",{setPrototypeOf:n(166).set})},function(t,e,n){var r=n(18),o=n(15),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(32)(Function.call,n(43).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e,n){t.exports=n(168)},function(t,e,n){n(169),t.exports=n(0).Object.getPrototypeOf},function(t,e,n){var r=n(39),o=n(72);n(52)("getPrototypeOf",(function(){return function(t){return o(r(t))}}))},function(t,e,n){t.exports=n(171)},function(t,e,n){n(172);var r=n(0).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){var r=n(9);r(r.S,"Object",{create:n(54)})},function(t,e,n){var r=n(100);function o(e,n){return t.exports=o=r||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,o(e,n)}t.exports=o,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(11);t.exports=function(t,e){if(null==t)return{};var n,o,i={},a=r(t);for(o=0;o<a.length;o++)n=a[o],e.indexOf(n)>=0||(i[n]=t[n]);return i},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){n(176);var r=n(0).Object;t.exports=function(t){return r.getOwnPropertyNames(t)}},function(t,e,n){n(52)("getOwnPropertyNames",(function(){return n(81).f}))}])}));
|