@walkeros/web-destination-hotjar 4.7.0-next-1790722899482 → 4.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,12 +1,14 @@
1
1
  # @walkeros/web-destination-hotjar
2
2
 
3
- ## 4.7.0-next-1790722899482
3
+ ## 4.7.0
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - Updated dependencies [74821ed]
8
8
  - Updated dependencies [06b498a]
9
9
  - Updated dependencies [74821ed]
10
+ - Updated dependencies [64b06de]
11
+ - Updated dependencies [4b4937f]
10
12
  - Updated dependencies [74821ed]
11
13
  - Updated dependencies [74821ed]
12
14
  - Updated dependencies [74821ed]
@@ -16,10 +18,12 @@
16
18
  - Updated dependencies [74821ed]
17
19
  - Updated dependencies [74821ed]
18
20
  - Updated dependencies [74821ed]
21
+ - Updated dependencies [e860006]
19
22
  - Updated dependencies [74821ed]
20
23
  - Updated dependencies [74821ed]
21
- - @walkeros/core@4.7.0-next-1790722899482
22
- - @walkeros/web-core@4.7.0-next-1790722899482
24
+ - Updated dependencies [4f89234]
25
+ - @walkeros/core@4.7.0
26
+ - @walkeros/web-core@4.7.0
23
27
 
24
28
  ## 4.6.1
25
29
 
@@ -1 +1 @@
1
- "use strict";var Destination=(()=>{var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,o={};((e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})})(o,{DestinationHotjar:()=>C,default:()=>A,destinationHotjar:()=>q});var i=Object.defineProperty,c=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})};function a(t,e){if("collector"===t)return"collector";if(!e)throw new Error(`stepId(${t}) requires an id`);return`${t}.${e}`}c({},{stepId:()=>a});function s(t,e){const r=t.destinations[e];if(!r)throw new Error(`Destination not found: ${e}`);return r}c({},{getDestination:()=>s});c({},{Level:()=>l});var u,l=((u=l||{})[u.ERROR=0]="ERROR",u[u.WARN=1]="WARN",u[u.INFO=2]="INFO",u[u.DEBUG=3]="DEBUG",u);function f(t,e){const r=t.transformers[e];if(!r)throw new Error(`Transformer not found: ${e}`);return r}c({},{getTransformer:()=>f});function d(t,e){const r=t.sources[e];if(!r)throw new Error(`Source not found: ${e}`);return r}c({},{getSource:()=>d});function h(t,e){const r=t.stores[e];if(!r)throw new Error(`Store not found: ${e}`);return r}async function g(t,e){return await t.get(e)}function v(t){return Array.isArray(t)}function p(t){return void 0!==t}function y(t){return"object"==typeof t&&null!==t&&!v(t)&&"[object Object]"===Object.prototype.toString.call(t)}function w(t){return"string"==typeof t}function j(t,e="",r){const n=e.split(".");let o=t;for(let t=0;t<n.length;t++){const e=n[t];if("*"===e&&v(o)){const e=n.slice(t+1).join("."),i=[];for(const t of o){const n=j(t,e,r);i.push(n)}return i}if(o=y(o)||v(o)?o[e]:void 0,void 0===o)break}return p(o)?o:r}function m(t){return function(t){return"boolean"==typeof t}(t)||w(t)||function(t){return"number"==typeof t&&!Number.isNaN(t)}(t)||!p(t)||v(t)&&t.every(m)||y(t)&&Object.values(t).every(m)}function b(t){return m(t)?t:void 0}function O(t,e,r){return async function(...n){try{return await t(...n)}catch(t){if(!e)return;return await e(t)}finally{await(null==r?void 0:r())}}}c({},{getStore:()=>h,getStoreValue:()=>g});var E=class t extends Error{constructor(e,r){super(e,r),this.name="FatalError",Object.setPrototypeOf(this,t.prototype)}};async function P(t,e={},r={}){var n,o;if(!p(t))return;const i=y(t)&&t.consent||r.consent||(null==(n=r.collector)?void 0:n.consent),c=null!=(o=r.event)?o:y(t)?t:{};if(!r.collector)throw new Error("getMappingValue: context.collector is required");const a={event:c,mapping:e,collector:r.collector,logger:r.collector.logger,consent:i},s=v(e)?e:[e];for(const e of s){const n=await O($,t=>{if(t instanceof E)throw t;r.collector&&r.collector.status.failed++,a.logger.error("mapping processing failed",{event:c,error:t})})(t,e,{...a,mapping:e});if(p(n))return n}}async function $(t,e,r){return(v(e)?e:[e]).reduce(async(e,n)=>{const o=await e;if(o)return o;const i=w(n)?{key:n}:n;if(!Object.keys(i).length)return;const{condition:c,consent:a,fn:s,key:u,loop:l,map:f,set:d,validate:h,value:g}=i,y={...r,mapping:n};if(c&&!await O(c,t=>{if(t instanceof E)throw t;return y.logger.error("mapping condition failed",{event:y.event,error:t}),!1})(t,y))return;if(a&&!function(t,e={},r={}){const n={...e,...r},o={};let i=!t||0===Object.keys(t).length;return Object.keys(n).forEach(e=>{n[e]&&(o[e]=!0,t&&t[e]&&(i=!0))}),!!i&&o}(a,y.consent))return g;let m=p(g)?g:t;if(l){const[e,r]=l,n="this"===e?[t]:await P(t,e,y);m=v(n)?(await Promise.all(n.map(t=>P(t,r,y)))).filter(p):void 0}else f?m=await Object.entries(f).reduce(async(e,[r,n])=>{const o=await e,i=await P(t,n,y);return p(i)&&(o[r]=i),o},Promise.resolve({})):d?m=await Promise.all(d.map(e=>$(t,e,y))):u?m=j(t,u,g):s&&(m=await O(s,t=>{if(t instanceof E)throw t;y.logger.error("mapping fn failed",{event:y.event,error:t})})(t,y));h&&!await O(h,t=>{if(t instanceof E)throw t;return y.logger.error("mapping validate failed",{event:y.event,error:t}),!1})(m,y)&&(m=void 0);const k=b(m);return p(k)?k:b(g)},Promise.resolve(void 0))}var k=()=>"undefined"!=typeof window,N=()=>!(!k()||!window.hj),R=(t,...e)=>{if(k()&&window.hj)return window.hj(t,...e);throw Error("Hotjar is not available, make sure init has been called.")},S={init:(t,e,r)=>{try{return((t,e,r)=>{if(!((t,e,r)=>{try{const n=document.getElementById(e)||document.createElement("script");return n.id=e,n.nonce=r,n.innerText=t,n.crossOrigin="anonymous",document.head.appendChild(n),!0}catch(t){return!1}})(`(function(h,o,t,j,a,r){h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};h._hjSettings={hjid:${t},hjsv:${e},hjdebug:${(null==r?void 0:r.debug)||!1}};a=o.getElementsByTagName('head')[0];r=o.createElement('script');r.async=1;r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;a.appendChild(r);})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');`,"hotjar-init-script",null==r?void 0:r.nonce)||!N())throw Error("Failed to initialize Hotjar tracking script.")})(t,e,r),!0}catch(t){return console.error("Error:",t),!1}},event:t=>{try{return R("event",t),!0}catch(t){return console.error("Error:",t),!1}},identify:(t,e)=>{try{return R("identify",t,e),!0}catch(t){return console.error("Error:",t),!1}},stateChange:t=>{try{return R("stateChange",t),!0}catch(t){return console.error("Error:",t),!1}},isReady:N},I=S,C={};function D(t){var e;return null!=(e=null==t?void 0:t.hotjar)?e:I}var _,q={type:"hotjar",config:{},init({config:t,env:e}){var r;const n=t.settings;if(!(null==n?void 0:n.siteId))return!1;const o=null!=(r=n.hotjarVersion)?r:6,i={};return void 0!==n.debug&&(i.debug=n.debug),void 0!==n.nonce&&(i.nonce=n.nonce),D(e).init(n.siteId,o,Object.keys(i).length>0?i:void 0),t},async push(t,{config:e,rule:r,env:n,collector:o}){var i;const c=D(n),a=e.settings||{},s=(null==r?void 0:r.settings)||{},u=null!=(i=s.identify)?i:a.identify;if(void 0!==u){const e=await P(t,u,{collector:o});if(y(e)){const{userId:t,...r}=e;if(w(t)&&t){const e={};for(const[t,n]of Object.entries(r))(w(n)||"number"==typeof n||"boolean"==typeof n)&&(e[t]=n);c.identify(t,e)}}}if(void 0!==s.stateChange){const e=await P(t,s.stateChange,{collector:o});w(e)&&e&&c.stateChange(e)}if(!0!==(null==r?void 0:r.silent)){const e=w(null==r?void 0:r.name)?r.name:t.name;c.event(e)}}},A=q;return _=o,((o,i,c,a)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let s of r(i))n.call(o,s)||s===c||t(o,s,{get:()=>i[s],enumerable:!(a=e(i,s))||a.enumerable});return o})(t({},"__esModule",{value:!0}),_)})();
1
+ "use strict";var Destination=(()=>{var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,o={};((e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})})(o,{DestinationHotjar:()=>D,default:()=>B,destinationHotjar:()=>A});var i=Object.defineProperty,c=(t,e)=>{for(var n in e)i(t,n,{get:e[n],enumerable:!0})};function a(t,e){if("collector"===t)return"collector";if(!e)throw new Error(`stepId(${t}) requires an id`);return`${t}.${e}`}c({},{stepId:()=>a});function s(t,e){const n=t.destinations[e];if(!n)throw new Error(`Destination not found: ${e}`);return n}c({},{getDestination:()=>s});c({},{Level:()=>l});var u,l=((u=l||{})[u.ERROR=0]="ERROR",u[u.WARN=1]="WARN",u[u.INFO=2]="INFO",u[u.DEBUG=3]="DEBUG",u);function f(t,e){const n=t.transformers[e];if(!n)throw new Error(`Transformer not found: ${e}`);return n}c({},{getTransformer:()=>f});function d(t,e){const n=t.sources[e];if(!n)throw new Error(`Source not found: ${e}`);return n}c({},{getSource:()=>d});function h(t,e){const n=t.stores[e];if(!n)throw new Error(`Store not found: ${e}`);return n}async function v(t,e){return await t.get(e)}function g(t){return Array.isArray(t)}function p(t){return void 0!==t}function y(t){return"object"==typeof t&&null!==t&&!g(t)&&"[object Object]"===Object.prototype.toString.call(t)}function w(t){return"string"==typeof t}function j(t,e="",n){const r=e.split(".");let o=t;for(let t=0;t<r.length;t++){const e=r[t];if("*"===e&&g(o)){const e=r.slice(t+1).join("."),i=[];for(const t of o){const r=j(t,e,n);i.push(r)}return i}if(o=y(o)||g(o)?o[e]:void 0,void 0===o)break}return p(o)?o:n}function m(t){return function(t){return"boolean"==typeof t}(t)||w(t)||function(t){return"number"==typeof t&&!Number.isNaN(t)}(t)||!p(t)||g(t)&&t.every(m)||y(t)&&Object.values(t).every(m)}function b(t){return m(t)?t:void 0}function O(t,e,n){return async function(...r){try{return await t(...r)}catch(t){if(!e)return;return await e(t)}finally{await(null==n?void 0:n())}}}c({},{getStore:()=>h,getStoreValue:()=>v});var E=class t extends Error{constructor(e,n){super(e,n),this.name="FatalError",Object.setPrototypeOf(this,t.prototype)}};async function P(t,e={},n={}){var r,o;if(!p(t))return;const i=y(t)&&t.consent||n.consent||(null==(r=n.collector)?void 0:r.consent),c=null!=(o=n.event)?o:y(t)?t:{};return $(t,e,{...n,consent:i,event:c})}async function $(t,e={},n={}){var r,o;const i=n.consent||(null==(r=n.collector)?void 0:r.consent),c=null!=(o=n.event)?o:{};if(!n.collector)throw new Error("getMappingValue: context.collector is required");const a={event:c,mapping:e,collector:n.collector,logger:n.collector.logger,consent:i},s=g(e)?e:[e];for(const e of s){const r=await O(k,t=>{if(t instanceof E)throw t;n.collector&&n.collector.status.failed++,a.logger.error("mapping processing failed",{event:c,error:t})})(t,e,{...a,mapping:e});if(p(r))return r}}async function k(t,e,n){return(g(e)?e:[e]).reduce(async(e,r)=>{const o=await e;if(o)return o;const i=w(r)?{key:r}:r;if(!Object.keys(i).length)return;const{condition:c,consent:a,fn:s,key:u,loop:l,map:f,set:d,validate:h,value:v}=i,y={...n,mapping:r};if(c&&!await O(c,t=>{if(t instanceof E)throw t;return y.logger.error("mapping condition failed",{event:y.event,error:t}),!1})(t,y))return;if(a&&!function(t,e={},n={}){const r={...e,...n},o={};let i=!t||0===Object.keys(t).length;return Object.keys(r).forEach(e=>{r[e]&&(o[e]=!0,t&&t[e]&&(i=!0))}),!!i&&o}(a,y.consent))return v;let m=p(v)?v:t;if(l){const[e,n]=l,r="this"===e?[t]:await $(t,e,y);m=g(r)?(await Promise.all(r.map(t=>P(t,n,y)))).filter(p):void 0}else f?m=await Object.entries(f).reduce(async(e,[n,r])=>{const o=await e,i=await $(t,r,y);return p(i)&&(o[n]=i),o},Promise.resolve({})):d?m=await Promise.all(d.map(e=>k(t,e,y))):u?m=j(t,u,v):s&&(m=await O(s,t=>{if(t instanceof E)throw t;y.logger.error("mapping fn failed",{event:y.event,error:t})})(t,y));h&&!await O(h,t=>{if(t instanceof E)throw t;return y.logger.error("mapping validate failed",{event:y.event,error:t}),!1})(m,y)&&(m=void 0);const N=b(m);return p(N)?N:b(v)},Promise.resolve(void 0))}var N=()=>"undefined"!=typeof window,R=()=>!(!N()||!window.hj),S=(t,...e)=>{if(N()&&window.hj)return window.hj(t,...e);throw Error("Hotjar is not available, make sure init has been called.")},I={init:(t,e,n)=>{try{return((t,e,n)=>{if(!((t,e,n)=>{try{const r=document.getElementById(e)||document.createElement("script");return r.id=e,r.nonce=n,r.innerText=t,r.crossOrigin="anonymous",document.head.appendChild(r),!0}catch(t){return!1}})(`(function(h,o,t,j,a,r){h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};h._hjSettings={hjid:${t},hjsv:${e},hjdebug:${(null==n?void 0:n.debug)||!1}};a=o.getElementsByTagName('head')[0];r=o.createElement('script');r.async=1;r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;a.appendChild(r);})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');`,"hotjar-init-script",null==n?void 0:n.nonce)||!R())throw Error("Failed to initialize Hotjar tracking script.")})(t,e,n),!0}catch(t){return console.error("Error:",t),!1}},event:t=>{try{return S("event",t),!0}catch(t){return console.error("Error:",t),!1}},identify:(t,e)=>{try{return S("identify",t,e),!0}catch(t){return console.error("Error:",t),!1}},stateChange:t=>{try{return S("stateChange",t),!0}catch(t){return console.error("Error:",t),!1}},isReady:R},C=I,D={};function _(t){var e;return null!=(e=null==t?void 0:t.hotjar)?e:C}var q,A={type:"hotjar",config:{},init({config:t,env:e}){var n;const r=t.settings;if(!(null==r?void 0:r.siteId))return!1;const o=null!=(n=r.hotjarVersion)?n:6,i={};return void 0!==r.debug&&(i.debug=r.debug),void 0!==r.nonce&&(i.nonce=r.nonce),_(e).init(r.siteId,o,Object.keys(i).length>0?i:void 0),t},async push(t,{config:e,rule:n,env:r,collector:o}){var i;const c=_(r),a=e.settings||{},s=(null==n?void 0:n.settings)||{},u=null!=(i=s.identify)?i:a.identify;if(void 0!==u){const e=await P(t,u,{collector:o});if(y(e)){const{userId:t,...n}=e;if(w(t)&&t){const e={};for(const[t,r]of Object.entries(n))(w(r)||"number"==typeof r||"boolean"==typeof r)&&(e[t]=r);c.identify(t,e)}}}if(void 0!==s.stateChange){const e=await P(t,s.stateChange,{collector:o});w(e)&&e&&c.stateChange(e)}if(!0!==(null==n?void 0:n.silent)){const e=w(null==n?void 0:n.name)?n.name:t.name;c.event(e)}}},B=A;return q=o,((o,i,c,a)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let s of n(i))r.call(o,s)||s===c||t(o,s,{get:()=>i[s],enumerable:!(a=e(i,s))||a.enumerable});return o})(t({},"__esModule",{value:!0}),q)})();
package/dist/index.es5.js CHANGED
@@ -1 +1 @@
1
- "use strict";function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _assert_this_initialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function asyncGeneratorStep(e,t,r,n,o,a,i){try{var c=e[a](i),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){asyncGeneratorStep(a,n,o,i,c,"next",e)}function c(e){asyncGeneratorStep(a,n,o,i,c,"throw",e)}i(void 0)})}}function _call_super(e,t,r){return t=_get_prototype_of(t),_possible_constructor_return(e,_is_native_reflect_construct()?Reflect.construct(t,r||[],_get_prototype_of(e).constructor):t.apply(e,r))}function _class_call_check(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _construct(e,t,r){return _construct=_is_native_reflect_construct()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&_set_prototype_of(o,r.prototype),o},_construct.apply(null,arguments)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _get_prototype_of(e){return _get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_get_prototype_of(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_set_prototype_of(e,t)}function _instanceof(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _is_native_function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw o}}return a}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,a={};if("undefined"!=typeof Reflect&&Reflect.ownKeys){for(r=Reflect.ownKeys(Object(e)),o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}if(a=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(r=Object.getOwnPropertySymbols(e),o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},a=Object.getOwnPropertyNames(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _possible_constructor_return(e,t){return!t||"object"!==_type_of(t)&&"function"!=typeof t?_assert_this_initialized(e):t}function _set_prototype_of(e,t){return _set_prototype_of=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_set_prototype_of(e,t)}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array(e,t):void 0}}function _wrap_native_super(e){var t="function"==typeof Map?new Map:void 0;return _wrap_native_super=function(e){if(null===e||!_is_native_function(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return _construct(e,arguments,_get_prototype_of(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_set_prototype_of(r,e)},_wrap_native_super(e)}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_is_native_reflect_construct=function(){return!!e})()}function _ts_generator(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(i,"next",{value:u(0)}),c(i,"throw",{value:u(1)}),c(i,"return",{value:u(2)}),"function"==typeof Symbol&&c(i,Symbol.iterator,{value:function(){return this}}),i;function u(c){return function(u){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}var Destination=function(){var e=function(e,t){if("collector"===e)return"collector";if(!t)throw new Error("stepId(".concat(e,") requires an id"));return"".concat(e,".").concat(t)},t=function(e,t){var r=e.destinations[t];if(!r)throw new Error("Destination not found: ".concat(t));return r},r=function(e,t){var r=e.transformers[t];if(!r)throw new Error("Transformer not found: ".concat(t));return r},n=function(e,t){var r=e.sources[t];if(!r)throw new Error("Source not found: ".concat(t));return r},o=function(e,t){var r=e.stores[t];if(!r)throw new Error("Store not found: ".concat(t));return r},a=function(e,t){return _async_to_generator(function(){return _ts_generator(this,function(r){switch(r.label){case 0:return[4,e.get(t)];case 1:return[2,r.sent()]}})})()},i=function(e){return Array.isArray(e)},c=function(e){return void 0!==e},u=function(e){return"object"==(void 0===e?"undefined":_type_of(e))&&null!==e&&!i(e)&&"[object Object]"===Object.prototype.toString.call(e)},l=function(e){return"string"==typeof e},s=function(e){return S(e)?e:void 0},f=function(e,t,r){return function(){for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return _async_to_generator(function(){var n;return _ts_generator(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,4,6]),[4,e.apply(void 0,_to_consumable_array(o))];case 1:case 3:return[2,a.sent()];case 2:return n=a.sent(),t?[4,t(n)]:[2];case 4:return[4,null==r?void 0:r()];case 5:return a.sent(),[7];case 6:return[2]}})})()}},_=function(e){return _async_to_generator(function(e){var t,r,n,o,a,l,s,_,p,y,b,d,h,v,g,w,j=arguments;return _ts_generator(this,function(m){switch(m.label){case 0:if(t=j.length>1&&void 0!==j[1]?j[1]:{},r=j.length>2&&void 0!==j[2]?j[2]:{},!c(e))return[2];if(a=u(e)&&e.consent||r.consent||(null===(o=r.collector)||void 0===o?void 0:o.consent),l=null!==(n=r.event)&&void 0!==n?n:u(e)?e:{},!r.collector)throw new Error("getMappingValue: context.collector is required");s={event:l,mapping:t,collector:r.collector,logger:r.collector.logger,consent:a},_=i(t)?t:[t],p=!0,y=!1,b=void 0,m.label=1;case 1:m.trys.push([1,6,7,8]),d=_[Symbol.iterator](),m.label=2;case 2:return(p=(h=d.next()).done)?[3,5]:(v=h.value,[4,f(P,function(e){if(_instanceof(e,E))throw e;r.collector&&r.collector.status.failed++,s.logger.error("mapping processing failed",{event:l,error:e})})(e,v,_object_spread_props(_object_spread({},s),{mapping:v}))]);case 3:if(g=m.sent(),c(g))return[2,g];m.label=4;case 4:return p=!0,[3,2];case 5:return[3,8];case 6:return w=m.sent(),y=!0,b=w,[3,8];case 7:try{p||null==d.return||d.return()}finally{if(y)throw b}return[7];case 8:return[2]}})}).apply(this,arguments)},p=function(e){var t;return null!==(t=null==e?void 0:e.hotjar)&&void 0!==t?t:D},y=Object.defineProperty,b=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,h=Object.prototype.hasOwnProperty,v={};!function(e,t){for(var r in t)y(e,r,{get:t[r],enumerable:!0})}(v,{DestinationHotjar:function(){return N},default:function(){return C},destinationHotjar:function(){return T}});var g=Object.defineProperty,w=function(e,t){for(var r in t)g(e,r,{get:t[r],enumerable:!0})};w({},{stepId:function(){return e}});w({},{getDestination:function(){return t}});w({},{Level:function(){return m}});var j,m=((j=m||{})[j.ERROR=0]="ERROR",j[j.WARN=1]="WARN",j[j.INFO=2]="INFO",j[j.DEBUG=3]="DEBUG",j);w({},{getTransformer:function(){return r}});w({},{getSource:function(){return n}});function O(e){for(var t=arguments.length>2?arguments[2]:void 0,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"").split("."),n=e,o=0;o<r.length;o++){var a=r[o];if("*"===a&&i(n)){var l=r.slice(o+1).join("."),s=[],f=!0,_=!1,p=void 0;try{for(var y,b=n[Symbol.iterator]();!(f=(y=b.next()).done);f=!0){var d=O(y.value,l,t);s.push(d)}}catch(e){_=!0,p=e}finally{try{f||null==b.return||b.return()}finally{if(_)throw p}}return s}if(void 0===(n=u(n)||i(n)?n[a]:void 0))break}return c(n)?n:t}function S(e){return function(e){return"boolean"==typeof e}(e)||l(e)||function(e){return"number"==typeof e&&!Number.isNaN(e)}(e)||!c(e)||i(e)&&e.every(S)||u(e)&&Object.values(e).every(S)}w({},{getStore:function(){return o},getStoreValue:function(){return a}});var E=function(){function e(t,r){var n;return _class_call_check(this,e),(n=_call_super(this,e,[t,r])).name="FatalError",Object.setPrototypeOf(n,e.prototype),n}return _inherits(e,_wrap_native_super(Error)),e}();function P(e,t,r){return _async_to_generator(function(){return _ts_generator(this,function(n){return[2,(i(t)?t:[t]).reduce(function(t,n){return _async_to_generator(function(){var o,a,u,p,y,b,d,h,v,g,w,j,m,S,k,I,x,R,A,D,N,T,C,B,F;return _ts_generator(this,function(G){switch(G.label){case 0:return[4,t];case 1:return(o=G.sent())?[2,o]:(a=l(n)?{key:n}:n,Object.keys(a).length?(u=a.condition,p=a.consent,y=a.fn,b=a.key,d=a.loop,h=a.map,v=a.set,g=a.validate,w=a.value,j=_object_spread_props(_object_spread({},r),{mapping:n}),(m=u)?[4,f(u,function(e){if(_instanceof(e,E))throw e;return j.logger.error("mapping condition failed",{event:j.event,error:e}),!1})(e,j)]:[3,3]):[2]);case 2:m=!G.sent(),G.label=3;case 3:return m?[2]:p&&!function(e){var t=_object_spread({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),r={},n=!e||0===Object.keys(e).length;return Object.keys(t).forEach(function(o){t[o]&&(r[o]=!0,e&&e[o]&&(n=!0))}),!!n&&r}(p,j.consent)?[2,w]:(S=c(w)?w:e,d?(k=_sliced_to_array(d,2),I=k[0],x=k[1],"this"!==I?[3,4]:(A=[e],[3,6])):[3,10]);case 4:return[4,_(e,I,j)];case 5:A=G.sent(),G.label=6;case 6:return i(R=A)?[4,Promise.all(R.map(function(e){return _(e,x,j)}))]:[3,8];case 7:return D=G.sent().filter(c),[3,9];case 8:D=void 0,G.label=9;case 9:return S=D,[3,21];case 10:return h?[4,Object.entries(h).reduce(function(t,r){var n=_sliced_to_array(r,2),o=n[0],a=n[1];return _async_to_generator(function(){var r,n;return _ts_generator(this,function(i){switch(i.label){case 0:return[4,t];case 1:return r=i.sent(),[4,_(e,a,j)];case 2:return n=i.sent(),[2,(c(n)&&(r[o]=n),r)]}})})()},Promise.resolve({}))]:[3,12];case 11:return S=G.sent(),[3,20];case 12:return v?[4,Promise.all(v.map(function(t){return P(e,t,j)}))]:[3,14];case 13:return N=S=G.sent(),[3,19];case 14:return b?(T=S=O(e,b,w),[3,18]):[3,15];case 15:return(C=y)?[4,f(y,function(e){if(_instanceof(e,E))throw e;j.logger.error("mapping fn failed",{event:j.event,error:e})})(e,j)]:[3,17];case 16:C=S=G.sent(),G.label=17;case 17:T=C,G.label=18;case 18:N=T,G.label=19;case 19:G.label=20;case 20:G.label=21;case 21:return(B=g)?[4,f(g,function(e){if(_instanceof(e,E))throw e;return j.logger.error("mapping validate failed",{event:j.event,error:e}),!1})(S,j)]:[3,23];case 22:B=!G.sent(),G.label=23;case 23:return B&&(S=void 0),F=s(S),[2,c(F)?F:s(w)]}})})()},Promise.resolve(void 0))]})})()}var k,I=function(){return"undefined"!=typeof window},x=function(){return!(!I()||!window.hj)},R=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o;if(I()&&window.hj)return(o=window).hj.apply(o,[e].concat(_to_consumable_array(r)));throw Error("Hotjar is not available, make sure init has been called.")},A={init:function(e,t,r){try{return function(e,t,r){if(!function(e,t,r){try{var n=document.getElementById(t)||document.createElement("script");return n.id=t,n.nonce=r,n.innerText=e,n.crossOrigin="anonymous",document.head.appendChild(n),!0}catch(e){return!1}}("(function(h,o,t,j,a,r){h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};h._hjSettings={hjid:".concat(e,",hjsv:").concat(t,",hjdebug:").concat((null==r?void 0:r.debug)||!1,"};a=o.getElementsByTagName('head')[0];r=o.createElement('script');r.async=1;r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;a.appendChild(r);})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');"),"hotjar-init-script",null==r?void 0:r.nonce)||!x())throw Error("Failed to initialize Hotjar tracking script.")}(e,t,r),!0}catch(e){return console.error("Error:",e),!1}},event:function(e){try{return R("event",e),!0}catch(e){return console.error("Error:",e),!1}},identify:function(e,t){try{return R("identify",e,t),!0}catch(e){return console.error("Error:",e),!1}},stateChange:function(e){try{return R("stateChange",e),!0}catch(e){return console.error("Error:",e),!1}},isReady:x},D=A,N={},T={type:"hotjar",config:{},init:function(e){var t,r=e.config,n=e.env,o=r.settings;if(!(null==o?void 0:o.siteId))return!1;var a=null!==(t=o.hotjarVersion)&&void 0!==t?t:6,i={};return void 0!==o.debug&&(i.debug=o.debug),void 0!==o.nonce&&(i.nonce=o.nonce),p(n).init(o.siteId,a,Object.keys(i).length>0?i:void 0),r},push:function(e,t){return _async_to_generator(function(e,t){var r,n,o,a,i,c,s,f,y,b,d,h,v,g,w,j,m,O,S,E,P,k,I;return _ts_generator(this,function(x){switch(x.label){case 0:return r=t.config,n=t.rule,o=t.env,a=t.collector,c=p(o),s=r.settings||{},f=(null==n?void 0:n.settings)||{},void 0===(y=null!==(i=f.identify)&&void 0!==i?i:s.identify)?[3,2]:[4,_(e,y,{collector:a})];case 1:if(b=x.sent(),u(b)&&(d=b.userId,h=_object_without_properties(b,["userId"]),l(d)&&d)){v={},g=!0,w=!1,j=void 0;try{for(m=Object.entries(h)[Symbol.iterator]();!(g=(O=m.next()).done);g=!0)S=_sliced_to_array(O.value,2),E=S[0],P=S[1],(l(P)||"number"==typeof P||"boolean"==typeof P)&&(v[E]=P)}catch(e){w=!0,j=e}finally{try{g||null==m.return||m.return()}finally{if(w)throw j}}c.identify(d,v)}x.label=2;case 2:return void 0===f.stateChange?[3,4]:[4,_(e,f.stateChange,{collector:a})];case 3:k=x.sent(),l(k)&&k&&c.stateChange(k),x.label=4;case 4:return!0!==(null==n?void 0:n.silent)&&(I=l(null==n?void 0:n.name)?n.name:e.name,c.event(I)),[2]}})}).apply(this,arguments)}},C=T;return k=v,function(e,t,r,n){if(t&&"object"===(void 0===t?"undefined":_type_of(t))||"function"==typeof t){var o=!0,a=!1,i=void 0;try{for(var c,u=function(){var o=c.value;h.call(e,o)||o===r||y(e,o,{get:function(){return t[o]},enumerable:!(n=b(t,o))||n.enumerable})},l=d(t)[Symbol.iterator]();!(o=(c=l.next()).done);o=!0)u()}catch(e){a=!0,i=e}finally{try{o||null==l.return||l.return()}finally{if(a)throw i}}}return e}(y({},"__esModule",{value:!0}),k)}();
1
+ "use strict";function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _assert_this_initialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function asyncGeneratorStep(e,t,r,n,o,a,i){try{var c=e[a](i),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){asyncGeneratorStep(a,n,o,i,c,"next",e)}function c(e){asyncGeneratorStep(a,n,o,i,c,"throw",e)}i(void 0)})}}function _call_super(e,t,r){return t=_get_prototype_of(t),_possible_constructor_return(e,_is_native_reflect_construct()?Reflect.construct(t,r||[],_get_prototype_of(e).constructor):t.apply(e,r))}function _class_call_check(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _construct(e,t,r){return _construct=_is_native_reflect_construct()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&_set_prototype_of(o,r.prototype),o},_construct.apply(null,arguments)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _get_prototype_of(e){return _get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_get_prototype_of(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_set_prototype_of(e,t)}function _instanceof(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _is_native_function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw o}}return a}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,a={};if("undefined"!=typeof Reflect&&Reflect.ownKeys){for(r=Reflect.ownKeys(Object(e)),o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}if(a=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(r=Object.getOwnPropertySymbols(e),o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},a=Object.getOwnPropertyNames(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _possible_constructor_return(e,t){return!t||"object"!==_type_of(t)&&"function"!=typeof t?_assert_this_initialized(e):t}function _set_prototype_of(e,t){return _set_prototype_of=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_set_prototype_of(e,t)}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array(e,t):void 0}}function _wrap_native_super(e){var t="function"==typeof Map?new Map:void 0;return _wrap_native_super=function(e){if(null===e||!_is_native_function(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return _construct(e,arguments,_get_prototype_of(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_set_prototype_of(r,e)},_wrap_native_super(e)}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_is_native_reflect_construct=function(){return!!e})()}function _ts_generator(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(i,"next",{value:u(0)}),c(i,"throw",{value:u(1)}),c(i,"return",{value:u(2)}),"function"==typeof Symbol&&c(i,Symbol.iterator,{value:function(){return this}}),i;function u(c){return function(u){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}var Destination=function(){var e=function(e,t){if("collector"===e)return"collector";if(!t)throw new Error("stepId(".concat(e,") requires an id"));return"".concat(e,".").concat(t)},t=function(e,t){var r=e.destinations[t];if(!r)throw new Error("Destination not found: ".concat(t));return r},r=function(e,t){var r=e.transformers[t];if(!r)throw new Error("Transformer not found: ".concat(t));return r},n=function(e,t){var r=e.sources[t];if(!r)throw new Error("Source not found: ".concat(t));return r},o=function(e,t){var r=e.stores[t];if(!r)throw new Error("Store not found: ".concat(t));return r},a=function(e,t){return _async_to_generator(function(){return _ts_generator(this,function(r){switch(r.label){case 0:return[4,e.get(t)];case 1:return[2,r.sent()]}})})()},i=function(e){return Array.isArray(e)},c=function(e){return void 0!==e},u=function(e){return"object"==(void 0===e?"undefined":_type_of(e))&&null!==e&&!i(e)&&"[object Object]"===Object.prototype.toString.call(e)},l=function(e){return"string"==typeof e},s=function(e){return E(e)?e:void 0},f=function(e,t,r){return function(){for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return _async_to_generator(function(){var n;return _ts_generator(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,4,6]),[4,e.apply(void 0,_to_consumable_array(o))];case 1:case 3:return[2,a.sent()];case 2:return n=a.sent(),t?[4,t(n)]:[2];case 4:return[4,null==r?void 0:r()];case 5:return a.sent(),[7];case 6:return[2]}})})()}},_=function(e){return _async_to_generator(function(e){var t,r,n,o,a,i,l=arguments;return _ts_generator(this,function(s){return t=l.length>1&&void 0!==l[1]?l[1]:{},r=l.length>2&&void 0!==l[2]?l[2]:{},c(e)?(a=u(e)&&e.consent||r.consent||(null===(o=r.collector)||void 0===o?void 0:o.consent),i=null!==(n=r.event)&&void 0!==n?n:u(e)?e:{},[2,p(e,t,_object_spread_props(_object_spread({},r),{consent:a,event:i}))]):[2]})}).apply(this,arguments)},p=function(e){return _async_to_generator(function(e){var t,r,n,o,a,u,l,s,_,p,y,d,b,h,v,g,w=arguments;return _ts_generator(this,function(j){switch(j.label){case 0:if(t=w.length>1&&void 0!==w[1]?w[1]:{},a=(r=w.length>2&&void 0!==w[2]?w[2]:{}).consent||(null===(o=r.collector)||void 0===o?void 0:o.consent),u=null!==(n=r.event)&&void 0!==n?n:{},!r.collector)throw new Error("getMappingValue: context.collector is required");l={event:u,mapping:t,collector:r.collector,logger:r.collector.logger,consent:a},s=i(t)?t:[t],_=!0,p=!1,y=void 0,j.label=1;case 1:j.trys.push([1,6,7,8]),d=s[Symbol.iterator](),j.label=2;case 2:return(_=(b=d.next()).done)?[3,5]:(h=b.value,[4,f(k,function(e){if(_instanceof(e,P))throw e;r.collector&&r.collector.status.failed++,l.logger.error("mapping processing failed",{event:u,error:e})})(e,h,_object_spread_props(_object_spread({},l),{mapping:h}))]);case 3:if(v=j.sent(),c(v))return[2,v];j.label=4;case 4:return _=!0,[3,2];case 5:return[3,8];case 6:return g=j.sent(),p=!0,y=g,[3,8];case 7:try{_||null==d.return||d.return()}finally{if(p)throw y}return[7];case 8:return[2]}})}).apply(this,arguments)},y=function(e){var t;return null!==(t=null==e?void 0:e.hotjar)&&void 0!==t?t:N},d=Object.defineProperty,b=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,v=Object.prototype.hasOwnProperty,g={};!function(e,t){for(var r in t)d(e,r,{get:t[r],enumerable:!0})}(g,{DestinationHotjar:function(){return T},default:function(){return B},destinationHotjar:function(){return C}});var w=Object.defineProperty,j=function(e,t){for(var r in t)w(e,r,{get:t[r],enumerable:!0})};j({},{stepId:function(){return e}});j({},{getDestination:function(){return t}});j({},{Level:function(){return O}});var m,O=((m=O||{})[m.ERROR=0]="ERROR",m[m.WARN=1]="WARN",m[m.INFO=2]="INFO",m[m.DEBUG=3]="DEBUG",m);j({},{getTransformer:function(){return r}});j({},{getSource:function(){return n}});function S(e){for(var t=arguments.length>2?arguments[2]:void 0,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"").split("."),n=e,o=0;o<r.length;o++){var a=r[o];if("*"===a&&i(n)){var l=r.slice(o+1).join("."),s=[],f=!0,_=!1,p=void 0;try{for(var y,d=n[Symbol.iterator]();!(f=(y=d.next()).done);f=!0){var b=S(y.value,l,t);s.push(b)}}catch(e){_=!0,p=e}finally{try{f||null==d.return||d.return()}finally{if(_)throw p}}return s}if(void 0===(n=u(n)||i(n)?n[a]:void 0))break}return c(n)?n:t}function E(e){return function(e){return"boolean"==typeof e}(e)||l(e)||function(e){return"number"==typeof e&&!Number.isNaN(e)}(e)||!c(e)||i(e)&&e.every(E)||u(e)&&Object.values(e).every(E)}j({},{getStore:function(){return o},getStoreValue:function(){return a}});var P=function(){function e(t,r){var n;return _class_call_check(this,e),(n=_call_super(this,e,[t,r])).name="FatalError",Object.setPrototypeOf(n,e.prototype),n}return _inherits(e,_wrap_native_super(Error)),e}();function k(e,t,r){return _async_to_generator(function(){return _ts_generator(this,function(n){return[2,(i(t)?t:[t]).reduce(function(t,n){return _async_to_generator(function(){var o,a,u,y,d,b,h,v,g,w,j,m,O,E,I,x,R,A,D,N,T,C,B,F,G;return _ts_generator(this,function(M){switch(M.label){case 0:return[4,t];case 1:return(o=M.sent())?[2,o]:(a=l(n)?{key:n}:n,Object.keys(a).length?(u=a.condition,y=a.consent,d=a.fn,b=a.key,h=a.loop,v=a.map,g=a.set,w=a.validate,j=a.value,m=_object_spread_props(_object_spread({},r),{mapping:n}),(O=u)?[4,f(u,function(e){if(_instanceof(e,P))throw e;return m.logger.error("mapping condition failed",{event:m.event,error:e}),!1})(e,m)]:[3,3]):[2]);case 2:O=!M.sent(),M.label=3;case 3:return O?[2]:y&&!function(e){var t=_object_spread({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),r={},n=!e||0===Object.keys(e).length;return Object.keys(t).forEach(function(o){t[o]&&(r[o]=!0,e&&e[o]&&(n=!0))}),!!n&&r}(y,m.consent)?[2,j]:(E=c(j)?j:e,h?(I=_sliced_to_array(h,2),x=I[0],R=I[1],"this"!==x?[3,4]:(D=[e],[3,6])):[3,10]);case 4:return[4,p(e,x,m)];case 5:D=M.sent(),M.label=6;case 6:return i(A=D)?[4,Promise.all(A.map(function(e){return _(e,R,m)}))]:[3,8];case 7:return N=M.sent().filter(c),[3,9];case 8:N=void 0,M.label=9;case 9:return E=N,[3,21];case 10:return v?[4,Object.entries(v).reduce(function(t,r){var n=_sliced_to_array(r,2),o=n[0],a=n[1];return _async_to_generator(function(){var r,n;return _ts_generator(this,function(i){switch(i.label){case 0:return[4,t];case 1:return r=i.sent(),[4,p(e,a,m)];case 2:return n=i.sent(),[2,(c(n)&&(r[o]=n),r)]}})})()},Promise.resolve({}))]:[3,12];case 11:return E=M.sent(),[3,20];case 12:return g?[4,Promise.all(g.map(function(t){return k(e,t,m)}))]:[3,14];case 13:return T=E=M.sent(),[3,19];case 14:return b?(C=E=S(e,b,j),[3,18]):[3,15];case 15:return(B=d)?[4,f(d,function(e){if(_instanceof(e,P))throw e;m.logger.error("mapping fn failed",{event:m.event,error:e})})(e,m)]:[3,17];case 16:B=E=M.sent(),M.label=17;case 17:C=B,M.label=18;case 18:T=C,M.label=19;case 19:M.label=20;case 20:M.label=21;case 21:return(F=w)?[4,f(w,function(e){if(_instanceof(e,P))throw e;return m.logger.error("mapping validate failed",{event:m.event,error:e}),!1})(E,m)]:[3,23];case 22:F=!M.sent(),M.label=23;case 23:return F&&(E=void 0),G=s(E),[2,c(G)?G:s(j)]}})})()},Promise.resolve(void 0))]})})()}var I,x=function(){return"undefined"!=typeof window},R=function(){return!(!x()||!window.hj)},A=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o;if(x()&&window.hj)return(o=window).hj.apply(o,[e].concat(_to_consumable_array(r)));throw Error("Hotjar is not available, make sure init has been called.")},D={init:function(e,t,r){try{return function(e,t,r){if(!function(e,t,r){try{var n=document.getElementById(t)||document.createElement("script");return n.id=t,n.nonce=r,n.innerText=e,n.crossOrigin="anonymous",document.head.appendChild(n),!0}catch(e){return!1}}("(function(h,o,t,j,a,r){h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};h._hjSettings={hjid:".concat(e,",hjsv:").concat(t,",hjdebug:").concat((null==r?void 0:r.debug)||!1,"};a=o.getElementsByTagName('head')[0];r=o.createElement('script');r.async=1;r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;a.appendChild(r);})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');"),"hotjar-init-script",null==r?void 0:r.nonce)||!R())throw Error("Failed to initialize Hotjar tracking script.")}(e,t,r),!0}catch(e){return console.error("Error:",e),!1}},event:function(e){try{return A("event",e),!0}catch(e){return console.error("Error:",e),!1}},identify:function(e,t){try{return A("identify",e,t),!0}catch(e){return console.error("Error:",e),!1}},stateChange:function(e){try{return A("stateChange",e),!0}catch(e){return console.error("Error:",e),!1}},isReady:R},N=D,T={},C={type:"hotjar",config:{},init:function(e){var t,r=e.config,n=e.env,o=r.settings;if(!(null==o?void 0:o.siteId))return!1;var a=null!==(t=o.hotjarVersion)&&void 0!==t?t:6,i={};return void 0!==o.debug&&(i.debug=o.debug),void 0!==o.nonce&&(i.nonce=o.nonce),y(n).init(o.siteId,a,Object.keys(i).length>0?i:void 0),r},push:function(e,t){return _async_to_generator(function(e,t){var r,n,o,a,i,c,s,f,p,d,b,h,v,g,w,j,m,O,S,E,P,k,I;return _ts_generator(this,function(x){switch(x.label){case 0:return r=t.config,n=t.rule,o=t.env,a=t.collector,c=y(o),s=r.settings||{},f=(null==n?void 0:n.settings)||{},void 0===(p=null!==(i=f.identify)&&void 0!==i?i:s.identify)?[3,2]:[4,_(e,p,{collector:a})];case 1:if(d=x.sent(),u(d)&&(b=d.userId,h=_object_without_properties(d,["userId"]),l(b)&&b)){v={},g=!0,w=!1,j=void 0;try{for(m=Object.entries(h)[Symbol.iterator]();!(g=(O=m.next()).done);g=!0)S=_sliced_to_array(O.value,2),E=S[0],P=S[1],(l(P)||"number"==typeof P||"boolean"==typeof P)&&(v[E]=P)}catch(e){w=!0,j=e}finally{try{g||null==m.return||m.return()}finally{if(w)throw j}}c.identify(b,v)}x.label=2;case 2:return void 0===f.stateChange?[3,4]:[4,_(e,f.stateChange,{collector:a})];case 3:k=x.sent(),l(k)&&k&&c.stateChange(k),x.label=4;case 4:return!0!==(null==n?void 0:n.silent)&&(I=l(null==n?void 0:n.name)?n.name:e.name,c.event(I)),[2]}})}).apply(this,arguments)}},B=C;return I=g,function(e,t,r,n){if(t&&"object"===(void 0===t?"undefined":_type_of(t))||"function"==typeof t){var o=!0,a=!1,i=void 0;try{for(var c,u=function(){var o=c.value;v.call(e,o)||o===r||d(e,o,{get:function(){return t[o]},enumerable:!(n=b(t,o))||n.enumerable})},l=h(t)[Symbol.iterator]();!(o=(c=l.next()).done);o=!0)u()}catch(e){a=!0,i=e}finally{try{o||null==l.return||l.return()}finally{if(a)throw i}}}return e}(d({},"__esModule",{value:!0}),I)}();
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "$meta": {
3
3
  "package": "@walkeros/web-destination-hotjar",
4
- "version": "4.7.0-next-1790722899482",
4
+ "version": "4.7.0",
5
5
  "type": "destination",
6
6
  "platform": [
7
7
  "web"
8
8
  ],
9
+ "exports": {},
9
10
  "docs": "https://www.walkeros.io/docs/destinations/web/hotjar",
10
11
  "source": "https://github.com/elbwalker/walkerOS/tree/main/packages/web/destinations/hotjar/src"
11
12
  },
@@ -185,7 +186,7 @@
185
186
  "consent": {
186
187
  "functional": true
187
188
  },
188
- "id": "2b2aa8da175fd159",
189
+ "id": "bf0adbfbb06a2d3c",
189
190
  "trigger": "load",
190
191
  "entity": "order",
191
192
  "action": "complete",
@@ -253,7 +254,7 @@
253
254
  "consent": {
254
255
  "functional": true
255
256
  },
256
- "id": "9debf54c31114b3b",
257
+ "id": "7b7d8e714fe9d2b9",
257
258
  "trigger": "load",
258
259
  "entity": "product",
259
260
  "action": "view",
@@ -314,7 +315,7 @@
314
315
  "consent": {
315
316
  "functional": true
316
317
  },
317
- "id": "69be1e6e3afdc397",
318
+ "id": "e808d8dbed13f86b",
318
319
  "trigger": "load",
319
320
  "entity": "page",
320
321
  "action": "view",
@@ -386,7 +387,7 @@
386
387
  "consent": {
387
388
  "functional": true
388
389
  },
389
- "id": "4a8795fc79c29e6a",
390
+ "id": "03576db2fe7b5506",
390
391
  "trigger": "load",
391
392
  "entity": "page",
392
393
  "action": "view",
@@ -445,7 +446,7 @@
445
446
  "consent": {
446
447
  "functional": true
447
448
  },
448
- "id": "361c87313468250f",
449
+ "id": "bd9c8d4f43256447",
449
450
  "trigger": "load",
450
451
  "entity": "page",
451
452
  "action": "view",
@@ -551,7 +552,7 @@
551
552
  "consent": {
552
553
  "functional": true
553
554
  },
554
- "id": "1adfd44d19b1d8ec",
555
+ "id": "cd971bfdd66252d4",
555
556
  "trigger": "load",
556
557
  "entity": "order",
557
558
  "action": "complete",
@@ -612,7 +613,7 @@
612
613
  "consent": {
613
614
  "functional": true
614
615
  },
615
- "id": "441c42751a824565",
616
+ "id": "96caef87dbfa7c91",
616
617
  "trigger": "test",
617
618
  "entity": "user",
618
619
  "action": "login",
@@ -693,7 +694,7 @@
693
694
  "consent": {
694
695
  "functional": true
695
696
  },
696
- "id": "0073993999bbc9bf",
697
+ "id": "60f71ef52403944b",
697
698
  "trigger": "test",
698
699
  "entity": "debug",
699
700
  "action": "noise",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@walkeros/web-destination-hotjar",
3
3
  "description": "Hotjar web destination for walkerOS (session replay, heatmaps, surveys)",
4
- "version": "4.7.0-next-1790722899482",
4
+ "version": "4.7.0",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",
@@ -39,11 +39,11 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@hotjar/browser": "^1.0.9",
42
- "@walkeros/core": "4.7.0-next-1790722899482",
43
- "@walkeros/web-core": "4.7.0-next-1790722899482"
42
+ "@walkeros/core": "4.7.0",
43
+ "@walkeros/web-core": "4.7.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@walkeros/collector": "4.7.0-next-1790722899482"
46
+ "@walkeros/collector": "4.7.0"
47
47
  },
48
48
  "repository": {
49
49
  "url": "git+https://github.com/elbwalker/walkerOS.git",