Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@clutter/wt

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clutter/wt - npm Package Compare versions

Comparing version 1.2.0-rc.4 to 1.2.0-rc.5

2

dist/wt.js

@@ -1,1 +0,1 @@

window.WT=function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),o=function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(Array.isArray(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&n.push(r[i]);t.obj[t.prop]=n}}},s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},a=function e(t,r,i){if(!r)return t;if("object"!=typeof r){if(Array.isArray(t))t.push(r);else{if("object"!=typeof t)return[t,r];(i&&(i.plainObjects||i.allowPrototypes)||!n.call(Object.prototype,r))&&(t[r]=!0)}return t}if("object"!=typeof t)return[t].concat(r);var o=t;return Array.isArray(t)&&!Array.isArray(r)&&(o=s(t,i)),Array.isArray(t)&&Array.isArray(r)?(r.forEach(function(r,o){n.call(t,o)?t[o]&&"object"==typeof t[o]?t[o]=e(t[o],r,i):t.push(r):t[o]=r}),t):Object.keys(r).reduce(function(t,o){var s=r[o];return n.call(t,o)?t[o]=e(t[o],s,i):t[o]=s,t},o)},c=function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},u=function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},l=function(e,t,r){if(0===e.length)return e;var n="string"==typeof e?e:String(e);if("iso-8859-1"===r)return escape(n).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var o="",s=0;s<n.length;++s){var a=n.charCodeAt(s);45===a||46===a||95===a||126===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?o+=n.charAt(s):a<128?o+=i[a]:a<2048?o+=i[192|a>>6]+i[128|63&a]:a<55296||a>=57344?o+=i[224|a>>12]+i[128|a>>6&63]+i[128|63&a]:(s+=1,a=65536+((1023&a)<<10|1023&n.charCodeAt(s)),o+=i[240|a>>18]+i[128|a>>12&63]+i[128|a>>6&63]+i[128|63&a])}return o},f=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var i=t[n],s=i.obj[i.prop],a=Object.keys(s),c=0;c<a.length;++c){var u=a[c],l=s[u];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:s,prop:u}),r.push(l))}return o(t),e},p=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},d=function(e){return null!==e&&void 0!==e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},h=function(e,t){return[].concat(e,t)};e.exports={arrayToObject:s,assign:c,combine:h,compact:f,decode:u,encode:l,isBuffer:d,isRegExp:p,merge:a}},function(e,t,r){"use strict";var n=String.prototype.replace,i=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return n.call(e,i,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t,r){"use strict";(function(e){function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),e}function u(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return(0,v.isFunction)(e)?e.apply(void 0,r):e}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=d.default.get(e);return r||(r=(0,v.uuid)(),d.default.set(e,r,t)),r}function f(e){var t=new _(e);return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return t[e]?t[e].apply(t,n):t.handleEvent.apply(t,[e].concat(n))}}Object.defineProperty(t,"__esModule",{value:!0}),t.withContext=f,t.default=t.WT=t.QUEUE_CONTINUED=t.QUEUE_COMPLETED=t.SEND_COMPLETED=t.SEND_STARTED=t.DEBOUNCE_MAX=t.DEBOUNCE_MIN=void 0;var p=n(r(4)),d=n(r(7)),h=n(r(8)),v=r(9),y=r(10),g=500;t.DEBOUNCE_MIN=g;var m=1500;t.DEBOUNCE_MAX=m;var b={arrayFormat:"brackets",skipNulls:!0,encode:!0},w=7300;t.SEND_STARTED="send:started";t.SEND_COMPLETED="send:completed";t.QUEUE_COMPLETED="queue:completed";t.QUEUE_CONTINUED="queue:continued";var x=function(e){return p.default.parse(e,{ignoreQueryPrefix:!0}).wvt},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return x(t)||l("wt_visitor_token",e)},O=function(){return l("wt_page_uuid")},_=function(){function e(t){s(this,e),this.emitter=new h.default,this.wtConfig={cookies:{expires:w}},this.context=t,this.paramDefaults={wt_version:y.version},this.eventQueue=[],this.loading=!1,this.pageUuid=null,this.processEventsDebounced=(0,v.debounce)(this.processEvents.bind(this),g,{maxWait:m}),this.resetFirstLoad()}return c(e,[{key:"resetFirstLoad",value:function(){var e=this;this.firstLoaded=!1,this.unsubFirstLoadCb&&this.unsubFirstLoadCb(),this.unsubFirstLoad&&this.unsubFirstLoad(),this.unsubFirstLoad=this.subscribe("send:completed",function(){e.firstLoaded=!0,e.unsubFirstLoad(),delete e.unsubFirstLoad})}},{key:"afterFirstLoad",value:function(e){var t=this;this.firstLoaded?e():this.unsubFirstLoadCb=this.subscribe("send:completed",function(){e(),t.unsubFirstLoadCb(),delete t.unsubFirstLoadCb})}},{key:"initialize",value:function(e){this.wtConfig=u(e,this.wtConfig,this),this.wtConfig.cookies&&(this.getUUIDToken(),this.getVisitorToken())}},{key:"getVisitorToken",value:function(){return E(this.wtConfig.cookies,this.context.location&&this.context.location.search)}},{key:"getUUIDToken",value:function(){return this.pageUuid=O(),this.pageUuid}},{key:"getLoaderImage",value:function(){return new this.context.Image}},{key:"getUrl",value:function(){return this.wtConfig.trackerUrl?this.wtConfig.trackerUrl:"".concat(this.getRoot(),"/track.gif")}},{key:"getBeaconUrl",value:function(){return this.wtConfig.beaconUrl?this.wtConfig.beaconUrl:"".concat(this.getRoot(),"/t")}},{key:"getRoot",value:function(){return this.wtConfig.trackerDomain?this.wtConfig.trackerDomain:"//".concat(this.context.location.hostname)}},{key:"sendToServer",value:function(e,t,r){var n=this;this.loaderImage=this.loaderImage||this.getLoaderImage();var i=p.default.stringify(e,o({addQueryPrefix:!1},this.wtConfig.stringifyOptions||b));this.loaderImage.onload=function(){delete n.loaderImage.onerror,delete n.loaderImage.onload,t()},this.loaderImage.onerror=function(){delete n.loaderImage.onerror,delete n.loaderImage.onload,r()};var s=new URLSearchParams(i);this.context.navigator.sendBeacon("".concat(this.getBeaconUrl()),s)?t():this.loaderImage.src="".concat(this.getUrl(),"?").concat(i),this.emitter.emit("send:started")}},{key:"getRequestEnvironmentArgs",value:function(){return{dimensions:{width:this.context.innerWidth,height:this.context.innerHeight},agent:this.context.navigator.userAgent,rts:(new Date).valueOf(),wvt:x(this.context.location&&this.context.location.search)}}},{key:"getEventEnvironmentArgs",value:function(){return{url:this.context.location.href,referrer:this.context.document.referrer,page_uuid:this.pageUuid}}},{key:"processEvents",value:function(){var e=this;if(!this.loading){var t=this.eventQueue.slice(0,100);if(this.eventQueue=this.eventQueue.slice(100),t.length){var r=(0,v.assign)({events:t},this.getRequestEnvironmentArgs());this.loading=!0;var n=function(){e.emitter.emit("send:completed"),e.eventQueue.length?(e.processEventsDebounced(),e.emitter.emit("queue:continued")):e.emitter.emit("queue:completed"),e.loading=!1},i=function(){e.loading=!1};this.sendToServer(r,n,i)}}}},{key:"handleEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.category,n=t.action,s=t.label,a=t.value,c=t.pageName,u=t.container,l=t.position,f=t.objectType,p=t.objectName,d=i(t,["category","action","label","value","pageName","container","position","objectType","objectName"]);this.eventQueue.push((0,v.omitBy)(o({kind:e,category:r,action:n,label:s,value:a,page_name:c,container:u,position:l,object_type:f,object_name:p,metadata:(0,v.assign)({},this.paramDefaults,d)},this.getEventEnvironmentArgs(),{ts:(new Date).valueOf()}),v.isNil)),this.signalEventChange()}},{key:"signalEventChange",value:function(){this.processEventsDebounced()}},{key:"flush",value:function(){this.processEventsDebounced.flush()}},{key:"clear",value:function(){this.paramDefaults={}}},{key:"set",value:function(e){(0,v.assign)(this.paramDefaults,u(e,this.paramDefaults,this))}},{key:"config",value:function(e){(0,v.assign)(this.wtConfig,u(e,this.wtConfig,this))}},{key:"subscribe",value:function(e,t){var r=this;return this.emitter.on(e,t),function(){r.emitter.removeListener(e,t)}}},{key:"instance",value:function(){return this}}]),e}();t.WT=_;var j=f(e);t.default=j}).call(t,r(3))},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";var n=r(5),i=r(6),o=r(1);e.exports={formats:o,parse:i,stringify:n}},function(e,t,r){"use strict";var n=r(0),i=r(1),o={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,a=Array.prototype.push,c=function(e,t){a.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,l={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},f=function e(t,r,i,o,s,a,u,f,p,d,h,v,y){var g=t;if("function"==typeof u?g=u(r,g):g instanceof Date&&(g=d(g)),null===g){if(o)return a&&!v?a(r,l.encoder,y):r;g=""}if("string"==typeof g||"number"==typeof g||"boolean"==typeof g||n.isBuffer(g)){if(a){return[h(v?r:a(r,l.encoder,y))+"="+h(a(g,l.encoder,y))]}return[h(r)+"="+h(String(g))]}var m=[];if(void 0===g)return m;var b;if(Array.isArray(u))b=u;else{var w=Object.keys(g);b=f?w.sort(f):w}for(var x=0;x<b.length;++x){var E=b[x];s&&null===g[E]||(Array.isArray(g)?c(m,e(g[E],i(r,E),i,o,s,a,u,f,p,d,h,v,y)):c(m,e(g[E],r+(p?"."+E:"["+E+"]"),i,o,s,a,u,f,p,d,h,v,y)))}return m};e.exports=function(e,t){var r=e,s=t?n.assign({},t):{};if(null!==s.encoder&&void 0!==s.encoder&&"function"!=typeof s.encoder)throw new TypeError("Encoder has to be a function.");var a=void 0===s.delimiter?l.delimiter:s.delimiter,u="boolean"==typeof s.strictNullHandling?s.strictNullHandling:l.strictNullHandling,p="boolean"==typeof s.skipNulls?s.skipNulls:l.skipNulls,d="boolean"==typeof s.encode?s.encode:l.encode,h="function"==typeof s.encoder?s.encoder:l.encoder,v="function"==typeof s.sort?s.sort:null,y=void 0===s.allowDots?l.allowDots:!!s.allowDots,g="function"==typeof s.serializeDate?s.serializeDate:l.serializeDate,m="boolean"==typeof s.encodeValuesOnly?s.encodeValuesOnly:l.encodeValuesOnly,b=s.charset||l.charset;if(void 0!==s.charset&&"utf-8"!==s.charset&&"iso-8859-1"!==s.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0===s.format)s.format=i.default;else if(!Object.prototype.hasOwnProperty.call(i.formatters,s.format))throw new TypeError("Unknown format option provided.");var w,x,E=i.formatters[s.format];"function"==typeof s.filter?(x=s.filter,r=x("",r)):Array.isArray(s.filter)&&(x=s.filter,w=x);var O=[];if("object"!=typeof r||null===r)return"";var _;_=s.arrayFormat in o?s.arrayFormat:"indices"in s?s.indices?"indices":"repeat":"indices";var j=o[_];w||(w=Object.keys(r)),v&&w.sort(v);for(var k=0;k<w.length;++k){var C=w[k];p&&null===r[C]||c(O,f(r[C],C,j,u,p,d?h:null,x,v,y,g,E,m,b))}var L=O.join(a),D=!0===s.addQueryPrefix?"?":"";return s.charsetSentinel&&(D+="iso-8859-1"===b?"utf8=%26%2310003%3B&":"utf8=%E2%9C%93&"),L.length>0?D+L:""}},function(e,t,r){"use strict";var n=r(0),i=Object.prototype.hasOwnProperty,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},a=function(e,t){var r,a={},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,u=t.parameterLimit===1/0?void 0:t.parameterLimit,l=c.split(t.delimiter,u),f=-1,p=t.charset;if(t.charsetSentinel)for(r=0;r<l.length;++r)0===l[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===l[r]?p="utf-8":"utf8=%26%2310003%3B"===l[r]&&(p="iso-8859-1"),f=r,r=l.length);for(r=0;r<l.length;++r)if(r!==f){var d,h,v=l[r],y=v.indexOf("]="),g=-1===y?v.indexOf("="):y+1;-1===g?(d=t.decoder(v,o.decoder,p),h=t.strictNullHandling?null:""):(d=t.decoder(v.slice(0,g),o.decoder,p),h=t.decoder(v.slice(g+1),o.decoder,p)),h&&t.interpretNumericEntities&&"iso-8859-1"===p&&(h=s(h)),i.call(a,d)?a[d]=n.combine(a[d],h):a[d]=h}return a},c=function(e,t,r){for(var n=t,i=e.length-1;i>=0;--i){var o,s=e[i];if("[]"===s&&r.parseArrays)o=[].concat(n);else{o=r.plainObjects?Object.create(null):{};var a="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,c=parseInt(a,10);r.parseArrays||""!==a?!isNaN(c)&&s!==a&&String(c)===a&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(o=[],o[c]=n):o[a]=n:o={0:n}}n=o}return n},u=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,a=o.exec(n),u=a?n.slice(0,a.index):n,l=[];if(u){if(!r.plainObjects&&i.call(Object.prototype,u)&&!r.allowPrototypes)return;l.push(u)}for(var f=0;null!==(a=s.exec(n))&&f<r.depth;){if(f+=1,!r.plainObjects&&i.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;l.push(a[1])}return a&&l.push("["+n.slice(a.index)+"]"),c(l,t,r)}};e.exports=function(e,t){var r=t?n.assign({},t):{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.ignoreQueryPrefix=!0===r.ignoreQueryPrefix,r.delimiter="string"==typeof r.delimiter||n.isRegExp(r.delimiter)?r.delimiter:o.delimiter,r.depth="number"==typeof r.depth?r.depth:o.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:o.arrayLimit,r.parseArrays=!1!==r.parseArrays,r.decoder="function"==typeof r.decoder?r.decoder:o.decoder,r.allowDots=void 0===r.allowDots?o.allowDots:!!r.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:o.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:o.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:o.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:o.strictNullHandling,void 0!==r.charset&&"utf-8"!==r.charset&&"iso-8859-1"!==r.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0===r.charset&&(r.charset=o.charset),""===e||null===e||void 0===e)return r.plainObjects?Object.create(null):{};for(var i="string"==typeof e?a(e,r):e,s=r.plainObjects?Object.create(null):{},c=Object.keys(i),l=0;l<c.length;++l){var f=c[l],p=u(f,i[f],r);s=n.merge(s,p,r)}return n.compact(s)}},function(e,t,r){var n,i;!function(o){var s=!1;if(n=o,void 0!==(i="function"==typeof n?n.call(t,r,t,e):n)&&(e.exports=i),s=!0,e.exports=o(),s=!0,!s){var a=window.Cookies,c=window.Cookies=o();c.noConflict=function(){return window.Cookies=a,c}}}(function(){function e(){for(var e=0,t={};e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}function t(r){function n(t,i,o){var s;if("undefined"!=typeof document){if(arguments.length>1){if(o=e({path:"/"},n.defaults,o),"number"==typeof o.expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*o.expires),o.expires=a}o.expires=o.expires?o.expires.toUTCString():"";try{s=JSON.stringify(i),/^[\{\[]/.test(s)&&(i=s)}catch(e){}i=r.write?r.write(i,t):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[\(\)]/g,escape);var c="";for(var u in o)o[u]&&(c+="; "+u,!0!==o[u]&&(c+="="+o[u]));return document.cookie=t+"="+i+c}t||(s={});for(var l=document.cookie?document.cookie.split("; "):[],f=/(%[0-9A-Z]{2})+/g,p=0;p<l.length;p++){var d=l[p].split("="),h=d.slice(1).join("=");this.json||'"'!==h.charAt(0)||(h=h.slice(1,-1));try{var v=d[0].replace(f,decodeURIComponent);if(h=r.read?r.read(h,v):r(h,v)||h.replace(f,decodeURIComponent),this.json)try{h=JSON.parse(h)}catch(e){}if(t===v){s=h;break}t||(s[v]=h)}catch(e){}}return s}}return n.set=n,n.get=function(e){return n.call(n,e)},n.getJSON=function(){return n.apply({json:!0},[].slice.call(arguments))},n.defaults={},n.remove=function(t,r){n(t,"",e(r,{expires:-1}))},n.withConverter=t,n}return t(function(){})})},function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,i,a,c,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(r=this._events[e],s(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(o(r))for(a=Array.prototype.slice.call(arguments,1),u=r.slice(),i=u.length,c=0;c<i;c++)u[c].apply(this,a);return!0},r.prototype.addListener=function(e,t){var i;if(!n(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function r(){this.removeListener(e,r),i||(i=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var i=!1;return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var r,i,s,a;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],s=r.length,i=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(r)){for(a=s;a-- >0;)if(r[a]===t||r[a].listener&&r[a].listener===t){i=a;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],n(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(this,arguments)}Object.defineProperty(t,"__esModule",{value:!0}),t.uuid=t.omitBy=t.isNil=t.debounce=t.assign=t.isFunction=void 0;var o=function(e){return"[object Function]"===Object.prototype.toString.call(e)};t.isFunction=o;var s=function(e){for(var t=arguments,r=Object(e),n=0;n<(arguments.length<=1?0:arguments.length-1);n+=1)!function(e){var n=e+1<1||t.length<=e+1?void 0:t[e+1];Object.keys(n).forEach(function(e){r[e]=n[e]})}(n);return r};t.assign=s;var a=function(e,t){var r,n,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=o.maxWait,c=!1,u=function(){clearTimeout(r),clearTimeout(n),c=!1,i=null},l=function(){return u(),e.apply(void 0,arguments)};return s(function(){for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];clearTimeout(r),r=setTimeout.apply(void 0,[l,t].concat(s)),!c&&a&&(n=setTimeout.apply(void 0,[l,a].concat(s)),c=!0),i=function(){return e.apply(void 0,s)}},{clear:u,flush:function(){return i?i():null}})};t.debounce=a;var c=function(e){return null===e||void 0===e};t.isNil=c;var u=function(e,t){return Object.keys(e).reduce(function(r,o){return t(e[o],o,e)?r:i({},r,n({},o,e[o]))},{})};t.omitBy=u;var l=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})};t.uuid=l},function(e,t){e.exports={name:"@clutter/wt",version:"1.2.0-rc.4",scripts:{clean:"rimraf lib",test:"cross-env BABEL_ENV=commonjs mocha test/index --compilers js:@babel/register --recursive",memory:"@babel/node test/memory-leak-check","test:watch":"npm test -- --watch",cover:"cross-env NODE_ENV=test nyc _mocha --compilers js:@babel/register --recursive",lint:"eslint src test",build:"babel src --out-dir lib && NODE_ENV=production webpack",prepublish:"npm run clean && npm run lint && npm run test && npm run build",example:'concurrently "webpack-dev-server --config example/webpack.config.js" "node example/index.server.js"',"example:build":'concurrently "NODE_ENV=production webpack --config example/webpack.config.js" "node example/index.server.js"'},main:"lib/index.js",dependencies:{"js-cookie":"^2.2.0",qs:"^6.5.1"},files:["lib","dist"],repository:{type:"git",url:"git+https://github.com/clutter/wt-javascript.git"},keywords:["analytics"],authors:["Matthew Drake <mdrake.drake@clutter.com> (https://github.com/clutter)"],license:"MIT",devDependencies:{"@babel/cli":"^7.0.0-beta.38","@babel/core":"^7.0.0-beta.38","@babel/node":"^7.0.0-beta.38","@babel/plugin-proposal-object-rest-spread":"^7.0.0-beta.38","@babel/preset-env":"^7.0.0-beta.38","babel-eslint":"7","babel-loader":"8.0.0-beta.0","babel-plugin-istanbul":"^4.1.5",chai:"^3.5.0","clean-webpack-plugin":"^0.1.18",concurrently:"^3.5.1","cross-env":"^3.0.0",eslint:"3.x","eslint-config-airbnb-base":"^11.1.3","eslint-plugin-import":"^2.8.0","html-webpack-plugin":"^2.30.1",istanbul:"^0.4.5",lodash:"^4.17.4",mocha:"^3.0.2",nyc:"^11.4.1",redux:"^3.7.2","redux-logger":"^3.0.6",rimraf:"^2.5.4",webpack:"^3.10.0","webpack-bundle-analyzer":"^2.10.0","webpack-dev-server":"^2.11.1"}}}]).default;
window.WT=function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),o=function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(Array.isArray(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&n.push(r[i]);t.obj[t.prop]=n}}},s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},a=function e(t,r,i){if(!r)return t;if("object"!=typeof r){if(Array.isArray(t))t.push(r);else{if("object"!=typeof t)return[t,r];(i&&(i.plainObjects||i.allowPrototypes)||!n.call(Object.prototype,r))&&(t[r]=!0)}return t}if("object"!=typeof t)return[t].concat(r);var o=t;return Array.isArray(t)&&!Array.isArray(r)&&(o=s(t,i)),Array.isArray(t)&&Array.isArray(r)?(r.forEach(function(r,o){n.call(t,o)?t[o]&&"object"==typeof t[o]?t[o]=e(t[o],r,i):t.push(r):t[o]=r}),t):Object.keys(r).reduce(function(t,o){var s=r[o];return n.call(t,o)?t[o]=e(t[o],s,i):t[o]=s,t},o)},c=function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},u=function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},l=function(e,t,r){if(0===e.length)return e;var n="string"==typeof e?e:String(e);if("iso-8859-1"===r)return escape(n).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var o="",s=0;s<n.length;++s){var a=n.charCodeAt(s);45===a||46===a||95===a||126===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?o+=n.charAt(s):a<128?o+=i[a]:a<2048?o+=i[192|a>>6]+i[128|63&a]:a<55296||a>=57344?o+=i[224|a>>12]+i[128|a>>6&63]+i[128|63&a]:(s+=1,a=65536+((1023&a)<<10|1023&n.charCodeAt(s)),o+=i[240|a>>18]+i[128|a>>12&63]+i[128|a>>6&63]+i[128|63&a])}return o},f=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var i=t[n],s=i.obj[i.prop],a=Object.keys(s),c=0;c<a.length;++c){var u=a[c],l=s[u];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:s,prop:u}),r.push(l))}return o(t),e},p=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},d=function(e){return null!==e&&void 0!==e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},h=function(e,t){return[].concat(e,t)};e.exports={arrayToObject:s,assign:c,combine:h,compact:f,decode:u,encode:l,isBuffer:d,isRegExp:p,merge:a}},function(e,t,r){"use strict";var n=String.prototype.replace,i=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return n.call(e,i,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t,r){"use strict";(function(e){function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),e}function u(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return(0,v.isFunction)(e)?e.apply(void 0,r):e}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=d.default.get(e);return r||(r=(0,v.uuid)(),d.default.set(e,r,t)),r}function f(e){var t=new _(e);return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return t[e]?t[e].apply(t,n):t.handleEvent.apply(t,[e].concat(n))}}Object.defineProperty(t,"__esModule",{value:!0}),t.withContext=f,t.default=t.WT=t.QUEUE_CONTINUED=t.QUEUE_COMPLETED=t.SEND_COMPLETED=t.SEND_STARTED=t.DEBOUNCE_MAX=t.DEBOUNCE_MIN=void 0;var p=n(r(4)),d=n(r(7)),h=n(r(8)),v=r(9),y=r(10),g=500;t.DEBOUNCE_MIN=g;var m=1500;t.DEBOUNCE_MAX=m;var b={arrayFormat:"brackets",skipNulls:!0,encode:!0},x=7300;t.SEND_STARTED="send:started";t.SEND_COMPLETED="send:completed";t.QUEUE_COMPLETED="queue:completed";t.QUEUE_CONTINUED="queue:continued";var w=function(e){return p.default.parse(e,{ignoreQueryPrefix:!0}).wvt},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return w(t)||l("wt_visitor_token",e)},O=function(){return l("wt_page_uuid")},_=function(){function e(t){s(this,e),this.emitter=new h.default,this.wtConfig={cookies:{expires:x}},this.context=t,this.paramDefaults={wt_version:y.version},this.eventQueue=[],this.loading=!1,this.pageUuid=null,this.processEventsDebounced=(0,v.debounce)(this.processEvents.bind(this),g,{maxWait:m}),this.resetFirstLoad()}return c(e,[{key:"resetFirstLoad",value:function(){var e=this;this.firstLoaded=!1,this.unsubFirstLoadCb&&this.unsubFirstLoadCb(),this.unsubFirstLoad&&this.unsubFirstLoad(),this.unsubFirstLoad=this.subscribe("send:completed",function(){e.firstLoaded=!0,e.unsubFirstLoad(),delete e.unsubFirstLoad})}},{key:"afterFirstLoad",value:function(e){var t=this;this.firstLoaded?e():this.unsubFirstLoadCb=this.subscribe("send:completed",function(){e(),t.unsubFirstLoadCb(),delete t.unsubFirstLoadCb})}},{key:"initialize",value:function(e){this.wtConfig=u(e,this.wtConfig,this),this.wtConfig.cookies&&(this.getUUIDToken(),this.getVisitorToken())}},{key:"getVisitorToken",value:function(){return E(this.wtConfig.cookies,this.context.location&&this.context.location.search)}},{key:"getUUIDToken",value:function(){return this.pageUuid=O(),this.pageUuid}},{key:"getLoaderImage",value:function(){return new this.context.Image}},{key:"getUrl",value:function(){return this.wtConfig.trackerUrl?this.wtConfig.trackerUrl:"".concat(this.getRoot(),"/track.gif")}},{key:"getBeaconUrl",value:function(){return this.wtConfig.beaconUrl?this.wtConfig.beaconUrl:"".concat(this.getRoot(),"/t")}},{key:"getRoot",value:function(){return this.wtConfig.trackerDomain?this.wtConfig.trackerDomain:"//".concat(this.context.location.hostname)}},{key:"sendToServer",value:function(e,t,r){var n=this;this.loaderImage=this.loaderImage||this.getLoaderImage();var i=p.default.stringify(e,o({addQueryPrefix:!1},this.wtConfig.stringifyOptions||b));this.loaderImage.onload=function(){delete n.loaderImage.onerror,delete n.loaderImage.onload,t()},this.loaderImage.onerror=function(){delete n.loaderImage.onerror,delete n.loaderImage.onload,r()};var s=new this.context.URLSearchParams(i);this.context.navigator.sendBeacon("".concat(this.getBeaconUrl()),s)?t():this.loaderImage.src="".concat(this.getUrl(),"?").concat(i),this.emitter.emit("send:started")}},{key:"getRequestEnvironmentArgs",value:function(){return{dimensions:{width:this.context.innerWidth,height:this.context.innerHeight},agent:this.context.navigator.userAgent,rts:(new Date).valueOf(),wvt:w(this.context.location&&this.context.location.search)}}},{key:"getEventEnvironmentArgs",value:function(){return{url:this.context.location.href,referrer:this.context.document.referrer,page_uuid:this.pageUuid}}},{key:"processEvents",value:function(){var e=this;if(!this.loading){var t=this.eventQueue.slice(0,100);if(this.eventQueue=this.eventQueue.slice(100),t.length){var r=(0,v.assign)({events:t},this.getRequestEnvironmentArgs());this.loading=!0;var n=function(){e.emitter.emit("send:completed"),e.eventQueue.length?(e.processEventsDebounced(),e.emitter.emit("queue:continued")):e.emitter.emit("queue:completed"),e.loading=!1},i=function(){e.loading=!1};this.sendToServer(r,n,i)}}}},{key:"handleEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.category,n=t.action,s=t.label,a=t.value,c=t.pageName,u=t.container,l=t.position,f=t.objectType,p=t.objectName,d=i(t,["category","action","label","value","pageName","container","position","objectType","objectName"]);this.eventQueue.push((0,v.omitBy)(o({kind:e,category:r,action:n,label:s,value:a,page_name:c,container:u,position:l,object_type:f,object_name:p,metadata:(0,v.assign)({},this.paramDefaults,d)},this.getEventEnvironmentArgs(),{ts:(new Date).valueOf()}),v.isNil)),this.signalEventChange()}},{key:"signalEventChange",value:function(){this.processEventsDebounced()}},{key:"flush",value:function(){this.processEventsDebounced.flush()}},{key:"clear",value:function(){this.paramDefaults={}}},{key:"set",value:function(e){(0,v.assign)(this.paramDefaults,u(e,this.paramDefaults,this))}},{key:"config",value:function(e){(0,v.assign)(this.wtConfig,u(e,this.wtConfig,this))}},{key:"subscribe",value:function(e,t){var r=this;return this.emitter.on(e,t),function(){r.emitter.removeListener(e,t)}}},{key:"instance",value:function(){return this}}]),e}();t.WT=_;var j=f(e);t.default=j}).call(t,r(3))},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";var n=r(5),i=r(6),o=r(1);e.exports={formats:o,parse:i,stringify:n}},function(e,t,r){"use strict";var n=r(0),i=r(1),o={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,a=Array.prototype.push,c=function(e,t){a.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,l={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},f=function e(t,r,i,o,s,a,u,f,p,d,h,v,y){var g=t;if("function"==typeof u?g=u(r,g):g instanceof Date&&(g=d(g)),null===g){if(o)return a&&!v?a(r,l.encoder,y):r;g=""}if("string"==typeof g||"number"==typeof g||"boolean"==typeof g||n.isBuffer(g)){if(a){return[h(v?r:a(r,l.encoder,y))+"="+h(a(g,l.encoder,y))]}return[h(r)+"="+h(String(g))]}var m=[];if(void 0===g)return m;var b;if(Array.isArray(u))b=u;else{var x=Object.keys(g);b=f?x.sort(f):x}for(var w=0;w<b.length;++w){var E=b[w];s&&null===g[E]||(Array.isArray(g)?c(m,e(g[E],i(r,E),i,o,s,a,u,f,p,d,h,v,y)):c(m,e(g[E],r+(p?"."+E:"["+E+"]"),i,o,s,a,u,f,p,d,h,v,y)))}return m};e.exports=function(e,t){var r=e,s=t?n.assign({},t):{};if(null!==s.encoder&&void 0!==s.encoder&&"function"!=typeof s.encoder)throw new TypeError("Encoder has to be a function.");var a=void 0===s.delimiter?l.delimiter:s.delimiter,u="boolean"==typeof s.strictNullHandling?s.strictNullHandling:l.strictNullHandling,p="boolean"==typeof s.skipNulls?s.skipNulls:l.skipNulls,d="boolean"==typeof s.encode?s.encode:l.encode,h="function"==typeof s.encoder?s.encoder:l.encoder,v="function"==typeof s.sort?s.sort:null,y=void 0===s.allowDots?l.allowDots:!!s.allowDots,g="function"==typeof s.serializeDate?s.serializeDate:l.serializeDate,m="boolean"==typeof s.encodeValuesOnly?s.encodeValuesOnly:l.encodeValuesOnly,b=s.charset||l.charset;if(void 0!==s.charset&&"utf-8"!==s.charset&&"iso-8859-1"!==s.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0===s.format)s.format=i.default;else if(!Object.prototype.hasOwnProperty.call(i.formatters,s.format))throw new TypeError("Unknown format option provided.");var x,w,E=i.formatters[s.format];"function"==typeof s.filter?(w=s.filter,r=w("",r)):Array.isArray(s.filter)&&(w=s.filter,x=w);var O=[];if("object"!=typeof r||null===r)return"";var _;_=s.arrayFormat in o?s.arrayFormat:"indices"in s?s.indices?"indices":"repeat":"indices";var j=o[_];x||(x=Object.keys(r)),v&&x.sort(v);for(var k=0;k<x.length;++k){var C=x[k];p&&null===r[C]||c(O,f(r[C],C,j,u,p,d?h:null,w,v,y,g,E,m,b))}var L=O.join(a),D=!0===s.addQueryPrefix?"?":"";return s.charsetSentinel&&(D+="iso-8859-1"===b?"utf8=%26%2310003%3B&":"utf8=%E2%9C%93&"),L.length>0?D+L:""}},function(e,t,r){"use strict";var n=r(0),i=Object.prototype.hasOwnProperty,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},a=function(e,t){var r,a={},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,u=t.parameterLimit===1/0?void 0:t.parameterLimit,l=c.split(t.delimiter,u),f=-1,p=t.charset;if(t.charsetSentinel)for(r=0;r<l.length;++r)0===l[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===l[r]?p="utf-8":"utf8=%26%2310003%3B"===l[r]&&(p="iso-8859-1"),f=r,r=l.length);for(r=0;r<l.length;++r)if(r!==f){var d,h,v=l[r],y=v.indexOf("]="),g=-1===y?v.indexOf("="):y+1;-1===g?(d=t.decoder(v,o.decoder,p),h=t.strictNullHandling?null:""):(d=t.decoder(v.slice(0,g),o.decoder,p),h=t.decoder(v.slice(g+1),o.decoder,p)),h&&t.interpretNumericEntities&&"iso-8859-1"===p&&(h=s(h)),i.call(a,d)?a[d]=n.combine(a[d],h):a[d]=h}return a},c=function(e,t,r){for(var n=t,i=e.length-1;i>=0;--i){var o,s=e[i];if("[]"===s&&r.parseArrays)o=[].concat(n);else{o=r.plainObjects?Object.create(null):{};var a="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,c=parseInt(a,10);r.parseArrays||""!==a?!isNaN(c)&&s!==a&&String(c)===a&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(o=[],o[c]=n):o[a]=n:o={0:n}}n=o}return n},u=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,a=o.exec(n),u=a?n.slice(0,a.index):n,l=[];if(u){if(!r.plainObjects&&i.call(Object.prototype,u)&&!r.allowPrototypes)return;l.push(u)}for(var f=0;null!==(a=s.exec(n))&&f<r.depth;){if(f+=1,!r.plainObjects&&i.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;l.push(a[1])}return a&&l.push("["+n.slice(a.index)+"]"),c(l,t,r)}};e.exports=function(e,t){var r=t?n.assign({},t):{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.ignoreQueryPrefix=!0===r.ignoreQueryPrefix,r.delimiter="string"==typeof r.delimiter||n.isRegExp(r.delimiter)?r.delimiter:o.delimiter,r.depth="number"==typeof r.depth?r.depth:o.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:o.arrayLimit,r.parseArrays=!1!==r.parseArrays,r.decoder="function"==typeof r.decoder?r.decoder:o.decoder,r.allowDots=void 0===r.allowDots?o.allowDots:!!r.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:o.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:o.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:o.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:o.strictNullHandling,void 0!==r.charset&&"utf-8"!==r.charset&&"iso-8859-1"!==r.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0===r.charset&&(r.charset=o.charset),""===e||null===e||void 0===e)return r.plainObjects?Object.create(null):{};for(var i="string"==typeof e?a(e,r):e,s=r.plainObjects?Object.create(null):{},c=Object.keys(i),l=0;l<c.length;++l){var f=c[l],p=u(f,i[f],r);s=n.merge(s,p,r)}return n.compact(s)}},function(e,t,r){var n,i;!function(o){var s=!1;if(n=o,void 0!==(i="function"==typeof n?n.call(t,r,t,e):n)&&(e.exports=i),s=!0,e.exports=o(),s=!0,!s){var a=window.Cookies,c=window.Cookies=o();c.noConflict=function(){return window.Cookies=a,c}}}(function(){function e(){for(var e=0,t={};e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}function t(r){function n(t,i,o){var s;if("undefined"!=typeof document){if(arguments.length>1){if(o=e({path:"/"},n.defaults,o),"number"==typeof o.expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*o.expires),o.expires=a}o.expires=o.expires?o.expires.toUTCString():"";try{s=JSON.stringify(i),/^[\{\[]/.test(s)&&(i=s)}catch(e){}i=r.write?r.write(i,t):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[\(\)]/g,escape);var c="";for(var u in o)o[u]&&(c+="; "+u,!0!==o[u]&&(c+="="+o[u]));return document.cookie=t+"="+i+c}t||(s={});for(var l=document.cookie?document.cookie.split("; "):[],f=/(%[0-9A-Z]{2})+/g,p=0;p<l.length;p++){var d=l[p].split("="),h=d.slice(1).join("=");this.json||'"'!==h.charAt(0)||(h=h.slice(1,-1));try{var v=d[0].replace(f,decodeURIComponent);if(h=r.read?r.read(h,v):r(h,v)||h.replace(f,decodeURIComponent),this.json)try{h=JSON.parse(h)}catch(e){}if(t===v){s=h;break}t||(s[v]=h)}catch(e){}}return s}}return n.set=n,n.get=function(e){return n.call(n,e)},n.getJSON=function(){return n.apply({json:!0},[].slice.call(arguments))},n.defaults={},n.remove=function(t,r){n(t,"",e(r,{expires:-1}))},n.withConverter=t,n}return t(function(){})})},function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,i,a,c,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(r=this._events[e],s(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(o(r))for(a=Array.prototype.slice.call(arguments,1),u=r.slice(),i=u.length,c=0;c<i;c++)u[c].apply(this,a);return!0},r.prototype.addListener=function(e,t){var i;if(!n(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function r(){this.removeListener(e,r),i||(i=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var i=!1;return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var r,i,s,a;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],s=r.length,i=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(r)){for(a=s;a-- >0;)if(r[a]===t||r[a].listener&&r[a].listener===t){i=a;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],n(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(this,arguments)}Object.defineProperty(t,"__esModule",{value:!0}),t.uuid=t.omitBy=t.isNil=t.debounce=t.assign=t.isFunction=void 0;var o=function(e){return"[object Function]"===Object.prototype.toString.call(e)};t.isFunction=o;var s=function(e){for(var t=arguments,r=Object(e),n=0;n<(arguments.length<=1?0:arguments.length-1);n+=1)!function(e){var n=e+1<1||t.length<=e+1?void 0:t[e+1];Object.keys(n).forEach(function(e){r[e]=n[e]})}(n);return r};t.assign=s;var a=function(e,t){var r,n,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=o.maxWait,c=!1,u=function(){clearTimeout(r),clearTimeout(n),c=!1,i=null},l=function(){return u(),e.apply(void 0,arguments)};return s(function(){for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];clearTimeout(r),r=setTimeout.apply(void 0,[l,t].concat(s)),!c&&a&&(n=setTimeout.apply(void 0,[l,a].concat(s)),c=!0),i=function(){return e.apply(void 0,s)}},{clear:u,flush:function(){return i?i():null}})};t.debounce=a;var c=function(e){return null===e||void 0===e};t.isNil=c;var u=function(e,t){return Object.keys(e).reduce(function(r,o){return t(e[o],o,e)?r:i({},r,n({},o,e[o]))},{})};t.omitBy=u;var l=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})};t.uuid=l},function(e,t){e.exports={name:"@clutter/wt",version:"1.2.0-rc.5",scripts:{clean:"rimraf lib",test:"cross-env BABEL_ENV=commonjs mocha test/index --compilers js:@babel/register --recursive",memory:"@babel/node test/memory-leak-check","test:watch":"npm test -- --watch",cover:"cross-env NODE_ENV=test nyc _mocha --compilers js:@babel/register --recursive",lint:"eslint src test",build:"babel src --out-dir lib && NODE_ENV=production webpack",prepublish:"npm run clean && npm run lint && npm run test && npm run build",example:'concurrently "webpack-dev-server --config example/webpack.config.js" "node example/index.server.js"',"example:build":'concurrently "NODE_ENV=production webpack --config example/webpack.config.js" "node example/index.server.js"'},main:"lib/index.js",dependencies:{"js-cookie":"^2.2.0",qs:"^6.5.1"},files:["lib","dist"],repository:{type:"git",url:"git+https://github.com/clutter/wt-javascript.git"},keywords:["analytics"],authors:["Matthew Drake <mdrake.drake@clutter.com> (https://github.com/clutter)"],license:"MIT",devDependencies:{"@babel/cli":"^7.0.0-beta.38","@babel/core":"^7.0.0-beta.38","@babel/node":"^7.0.0-beta.38","@babel/plugin-proposal-object-rest-spread":"^7.0.0-beta.38","@babel/preset-env":"^7.0.0-beta.38","babel-eslint":"7","babel-loader":"8.0.0-beta.0","babel-plugin-istanbul":"^4.1.5",chai:"^3.5.0","clean-webpack-plugin":"^0.1.18",concurrently:"^3.5.1","cross-env":"^3.0.0",eslint:"3.x","eslint-config-airbnb-base":"^11.1.3","eslint-plugin-import":"^2.8.0","html-webpack-plugin":"^2.30.1",istanbul:"^0.4.5",lodash:"^4.17.4",mocha:"^3.0.2",nyc:"^11.4.1",redux:"^3.7.2","redux-logger":"^3.0.6",rimraf:"^2.5.4",webpack:"^3.10.0","webpack-bundle-analyzer":"^2.10.0","webpack-dev-server":"^2.11.1"}}}]).default;

@@ -236,3 +236,3 @@ "use strict";

var params = new URLSearchParams(query);
var params = new this.context.URLSearchParams(query);
var sendBeaconResult = this.context.navigator.sendBeacon("".concat(this.getBeaconUrl()), params);

@@ -239,0 +239,0 @@

{
"name": "@clutter/wt",
"version": "1.2.0-rc.4",
"version": "1.2.0-rc.5",
"scripts": {

@@ -5,0 +5,0 @@ "clean": "rimraf lib",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc