@walkeros/web-destination-segment 4.6.0 → 4.7.0-next-1790187973605
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 +25 -0
- package/dist/index.browser.js +1 -1
- package/dist/index.es5.js +1 -1
- package/dist/walkerOS.json +14 -14
- package/package.json +4 -4
package/dist/index.es5.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";function _array_like_to_array(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _array_with_holes(t){if(Array.isArray(t))return t}function _array_without_holes(t){if(Array.isArray(t))return _array_like_to_array(t)}function _assert_this_initialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function asyncGeneratorStep(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function _async_to_generator(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){asyncGeneratorStep(o,r,i,a,s,"next",t)}function s(t){asyncGeneratorStep(o,r,i,a,s,"throw",t)}a(void 0)})}}function _call_super(t,e,n){return e=_get_prototype_of(e),_possible_constructor_return(t,_is_native_reflect_construct()?Reflect.construct(e,n||[],_get_prototype_of(t).constructor):e.apply(t,n))}function _class_call_check(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _construct(t,e,n){return _construct=_is_native_reflect_construct()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&_set_prototype_of(i,n.prototype),i},_construct.apply(null,arguments)}function _define_property(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _get_prototype_of(t){return _get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_get_prototype_of(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_set_prototype_of(t,e)}function _instanceof(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function _is_native_function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}function _iterable_to_array(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _iterable_to_array_limit(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}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(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){_define_property(t,e,n[e])})}return t}function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function _object_spread_props(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):ownKeys(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}function _object_without_properties(t,e){if(null==t)return{};var n,r,i,o={};if("undefined"!=typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(t)),i=0;i<n.length;i++)r=n[i],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r]);return o}if(o=_object_without_properties_loose(t,e),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(t),i=0;i<n.length;i++)r=n[i],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r]);return o}function _object_without_properties_loose(t,e){if(null==t)return{};var n,r,i={},o=Object.getOwnPropertyNames(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n]);return i}function _possible_constructor_return(t,e){return!e||"object"!==_type_of(e)&&"function"!=typeof e?_assert_this_initialized(t):e}function _set_prototype_of(t,e){return _set_prototype_of=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},_set_prototype_of(t,e)}function _sliced_to_array(t,e){return _array_with_holes(t)||_iterable_to_array_limit(t,e)||_unsupported_iterable_to_array(t,e)||_non_iterable_rest()}function _to_consumable_array(t){return _array_without_holes(t)||_iterable_to_array(t)||_unsupported_iterable_to_array(t)||_non_iterable_spread()}function _type_of(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}function _unsupported_iterable_to_array(t,e){if(t){if("string"==typeof t)return _array_like_to_array(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(t,e):void 0}}function _wrap_native_super(t){var e="function"==typeof Map?new Map:void 0;return _wrap_native_super=function(t){if(null===t||!_is_native_function(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return _construct(t,arguments,_get_prototype_of(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),_set_prototype_of(n,t)},_wrap_native_super(t)}function _is_native_reflect_construct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_is_native_reflect_construct=function(){return!!t})()}function _ts_generator(t,e){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:u(0)}),s(a,"throw",{value:u(1)}),s(a,"return",{value:u(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function u(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}var Destination=function(){var t,e,n,r,i,o,a,s,u,c,l,f,d,p,h,v,y,m,g,b,_,w,x,j,k,S,O,P,I,E,A,M,C,N,F,D,R,T,L,q,B=function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)},z=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n},U=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,_instanceof(e,n)?e:new n(function(t){t(e)})).then(a,s)}u((r=r.apply(t,e||[])).next())})},V=function(t,e){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}},K=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},H=function(t,e,n){e.split&&(e=e.split("."));for(var r,i,o=0,a=e.length,s=t;o<a&&"__proto__"!=(i=""+e[o++])&&"constructor"!==i&&"prototype"!==i;)s=s[i]=o===a?n:_type_of(r=s[i])===(void 0===e?"undefined":_type_of(e))?r:0*e[o]!=0||~(""+e[o]).indexOf(".")?{}:[]},G=function(t){return"string"==typeof t},J=function(t){return"number"==typeof t},W=function(t){return"function"==typeof t},Y=function(t){return"object"===Object.prototype.toString.call(t).slice(8,-1).toLowerCase()},Q=function(t){!function(t){if(null==t)throw new i("Event",s);if("object"!==(void 0===t?"undefined":_type_of(t)))throw new i("Event",a)}(t),function(t){if(!G(t.type))throw new i(".type",o)}(t),function(t){if(!G(t.messageId))throw new i(".messageId",o)}(t),"track"===t.type&&(function(t){if(!G(t.event))throw new i(".event",o)}(t),function(t){if(!Y(t.properties))throw new i(".properties",a)}(t)),["group","identify"].includes(t.type)&&function(t){if(!Y(t.traits))throw new i(".traits",a)}(t)},$=function(t,e){return new Promise(function(n,r){var i=setTimeout(function(){r(Error("Promise timed out"))},e);t.then(function(t){return clearTimeout(i),n(t)}).catch(r)})},Z=function(t,e,n){var r;return(r=n,new Promise(function(t){return setTimeout(t,r)})).then(function(){return $(function(){try{return Promise.resolve(e(t))}catch(t){return Promise.reject(t)}}(),1e3)}).catch(function(e){null==t||t.log("warn","Callback Error",{error:e}),null==t||t.stats.increment("callback_error")}).then(function(){return t})},X=function(){var t,e=0,n="";if(!y||h+16>256){for(y=Array(e=256);e--;)y[e]=256*Math.random()|0;e=h=0}for(;e<16;e++)t=y[h+e],n+=6==e?v[15&t|64]:8==e?v[63&t|128]:v[t],1&e&&e>1&&e<11&&(n+="-");return h++,n},tt=function(t,e){t.log("debug","plugin",{plugin:e.name});var n=(new Date).getTime(),r=e[t.event.type];return void 0===r?Promise.resolve(t):function(t){return U(this,void 0,void 0,function(){var e;return V(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,t()];case 1:return[2,n.sent()];case 2:return e=n.sent(),[2,Promise.reject(e)];case 3:return[2]}})})}(function(){return r.apply(e,[t])}).then(function(t){var r=(new Date).getTime()-n;return t.stats.gauge("plugin_time",r,["plugin:".concat(e.name)]),t}).catch(function(n){if(_instanceof(n,w)&&"middleware_cancellation"===n.type)throw n;return _instanceof(n,w)?(t.log("warn",n.type,{plugin:e.name,error:n}),n):(t.log("error","plugin Error",{plugin:e.name,error:n}),t.stats.increment("plugin_error",1,["plugin:".concat(e.name)]),n)})},et=function(t,e){return tt(t,e).then(function(e){if(_instanceof(e,x))return e;t.log("debug","Context canceled"),t.stats.increment("context_canceled"),t.cancel(e)})},nt=function(t,e,n,r){return U(this,void 0,void 0,function(){var i,o;return V(this,function(a){switch(a.label){case 0:return n.emit("dispatch_start",t),i=Date.now(),e.isEmpty()?[4,e.dispatchSingle(t)]:[3,2];case 1:return o=a.sent(),[3,4];case 2:return[4,e.dispatch(t)];case 3:o=a.sent(),a.label=4;case 4:return(null==r?void 0:r.callback)?[4,Z(o,r.callback,O(i,r.timeout))]:[3,6];case 5:o=a.sent(),a.label=6;case 6:return(null==r?void 0:r.debug)&&o.flush(),[2,o]}})})},rt=function(){return"undefined"!=typeof window},it=function(){return!rt()},ot=function(){return!rt()||window.navigator.onLine},at=function(){return!ot()},st=function(t,e){return e=e||{},new Promise(function(n,r){var i=new XMLHttpRequest,o=[],a=[],s={},u=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(JSON.parse(i.responseText))},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return o},entries:function(){return a},get:function(t){return s[t.toLowerCase()]},has:function(t){return t.toLowerCase()in s}}}};for(var c in i.open(e.method||"get",t,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(t,e,n){o.push(e=e.toLowerCase()),a.push([e,n]),s[e]=s[e]?s[e]+","+n:n}),n(u())},i.onerror=r,i.withCredentials="include"==e.credentials,e.headers)i.setRequestHeader(c,e.headers[c]);i.send(e.body||null)})},ut=function(){return A},ct=function(t){console.error("Error sending segment performance metrics",t)},lt=function(t){var e=T.getItem(t);return(e?JSON.parse(e):[]).map(function(t){return new R(t.event,t.id)})},ft=function(t){var e=T.getItem(t);return e?JSON.parse(e):{}},dt=function(t){T.removeItem(t)},pt=function(){return window[Cn]},ht=function(t,e){var n=new Nn.Facade(t,e);return"track"===t.type&&(n=new Nn.Track(t,e)),"identify"===t.type&&(n=new Nn.Identify(t,e)),"page"===t.type&&(n=new Nn.Page(t,e)),"alias"===t.type&&(n=new Nn.Alias(t,e)),"group"===t.type&&(n=new Nn.Group(t,e)),"screen"===t.type&&(n=new Nn.Screen(t,e)),Object.defineProperty(n,"obj",{value:t,writable:!0}),n},vt=function(t,e,n,r){var i=this;return t?((_instanceof(t,Element)?[t]:"toArray"in t?t.toArray():t).forEach(function(t){t.addEventListener("click",function(o){var a,s,u=_instanceof(e,Function)?e(t):e,c=_instanceof(n,Function)?n(t):n,l=t.getAttribute("href")||t.getAttributeNS("http://www.w3.org/1999/xlink","href")||t.getAttribute("xlink:href")||(null===(a=t.getElementsByTagName("a")[0])||void 0===a?void 0:a.getAttribute("href")),f=$(i.track(u,c,null!=r?r:{}),null!==(s=i.settings.timeout)&&void 0!==s?s:500);(function(t,e){return!("_blank"!==t.target||!e)})(t,l)||function(t){var e=t;return!!(e.ctrlKey||e.shiftKey||e.metaKey||e.button&&1==e.button)}(o)||l&&(o.preventDefault?o.preventDefault():o.returnValue=!1,f.catch(console.error).then(function(){window.location.href=l}).catch(console.error))},!1)}),this):this},yt=function(t,e,n,r){var i=this;return t?(_instanceof(t,HTMLFormElement)&&(t=[t]),t.forEach(function(t){if(!_instanceof(t,Element))throw new TypeError("Must pass HTMLElement to trackForm/trackSubmit.");var o=function(o){var a;o.preventDefault?o.preventDefault():o.returnValue=!1;var s=_instanceof(e,Function)?e(t):e,u=_instanceof(n,Function)?n(t):n;$(i.track(s,u,null!=r?r:{}),null!==(a=i.settings.timeout)&&void 0!==a?a:500).catch(console.error).then(function(){t.submit()}).catch(console.error)},a=window.jQuery||window.Zepto;a?a(t).submit(o):t.addEventListener("submit",o,!1)}),this):this},mt=function(t,e,r){return U(this,void 0,void 0,function(){function i(e,r){return U(this,void 0,void 0,function(){var i,o,a;return V(this,function(s){switch(s.label){case 0:return i=!1,o=null,[4,r({payload:ht(e,{clone:!0,traverse:!1}),integration:t,next:function(t){i=!0,null===t&&(o=null),t&&(o=t.obj)}})];case 1:return s.sent(),i||null===o||(o.integrations=n(n({},e.integrations),((a={})[t]=!1,a))),[2,o]}})})}var o,a,s,u,c;return V(this,function(t){switch(t.label){case 0:o=ht(e,{clone:!0,traverse:!1}).rawEvent(),a=0,s=r,t.label=1;case 1:return a<s.length?(u=s[a],[4,i(o,u)]):[3,4];case 2:if(null===(c=t.sent()))return[2,null];o=c,t.label=3;case 3:return a++,[3,1];case 4:return[2,o]}})})},gt=function(t,e){function n(n){return U(this,void 0,void 0,function(){var r;return V(this,function(i){switch(i.label){case 0:return r=!1,[4,t({payload:ht(n.event,{clone:!0,traverse:!1}),integrations:null!=e?e:{},next:function(t){r=!0,t&&(n.event=t.obj)}})];case 1:if(i.sent(),!r)throw new w({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}})})}return{name:"Source Middleware ".concat(t.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(t){return Promise.resolve(t)},track:n,page:n,screen:n,identify:n,alias:n,group:n}},bt=function(t,e){return Object.keys(e).reduce(function(n,r){r.startsWith(t)&&(n[r.substr(t.length)]=e[r]);return n},{})},_t=function(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t}},wt=function(t,e){var n=document.createElement("a");n.href=e;var r=n.search.slice(1).split("&").reduce(function(t,e){var n=e.split("="),r=n[0],i=n[1];return t[r]=_t(i),t},{}),i=[],o=r.ajs_uid,a=r.ajs_event,s=r.ajs_aid,u=Y(t.options.useQueryString)?t.options.useQueryString:{},c=u.aid,l=void 0===c?/.+/:c,f=u.uid,d=void 0===f?/.+/:f;if(s){var p=Array.isArray(r.ajs_aid)?r.ajs_aid[0]:r.ajs_aid;l.test(p)&&t.setAnonymousId(p)}if(o){var h=Array.isArray(r.ajs_uid)?r.ajs_uid[0]:r.ajs_uid;if(d.test(h)){var v=bt("ajs_trait_",r);i.push(t.identify(h,v))}}if(a){var y=Array.isArray(r.ajs_event)?r.ajs_event[0]:r.ajs_event,m=bt("ajs_prop_",r);i.push(t.track(y,m))}return Promise.all(i)},xt=function(t,e){var r,i=Object.entries(null!==(r=e.integrations)&&void 0!==r?r:{}).reduce(function(t,e){var r,i,o=e[0],a=e[1];return"object"===(void 0===a?"undefined":_type_of(a))?n(n({},t),((r={})[o]=a,r)):n(n({},t),((i={})[o]={},i))},{});return Object.entries(t.integrations).reduce(function(t,e){var r,o=e[0],a=e[1];return n(n({},t),((r={})[o]=n(n({},a),i[o]),r))},{})},jt=function(t){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find(function(e){return e.src===t})},kt=function(t,e){var n=jt(t);if(void 0!==n){var r=null==n?void 0:n.getAttribute("status");if("loaded"===r)return Promise.resolve(n);if("loading"===r)return new Promise(function(t,e){n.addEventListener("load",function(){return t(n)}),n.addEventListener("error",function(t){return e(t)})})}return new Promise(function(n,r){var i,o=window.document.createElement("script");o.type="text/javascript",o.src=t,o.async=!0,o.setAttribute("status","loading");for(var a=0,s=Object.entries(null!=e?e:{});a<s.length;a++){var u=s[a],c=u[0],l=u[1];o.setAttribute(c,l)}o.onload=function(){o.onerror=o.onload=null,o.setAttribute("status","loaded"),n(o)},o.onerror=function(){o.onerror=o.onload=null,o.setAttribute("status","error"),r(new Error("Failed to load ".concat(t)))};var f=window.document.querySelector("script");f?null===(i=f.parentElement)||void 0===i||i.insertBefore(o,f):window.document.head.appendChild(o)})},St=function(t,e){var n=e.methodName,r=e.integrationName,i=e.type,o=e.didError,a=void 0!==o&&o;t.stats.increment("analytics_js.integration.invoke".concat(a?".error":""),1,["method:".concat(n),"integration_name:".concat(r),"type:".concat(i)])},Ot=function(t,e){var n,r;return"boolean"==typeof(null==e?void 0:e.enabled)?e.enabled:null===(r=null===(n=null==t?void 0:t.__default)||void 0===n?void 0:n.enabled)||void 0===r||r},Pt=function(t){return t.toLowerCase().replace(".","").replace(/\s+/g,"-")},It=function(t,e){return void 0===e&&(e=!1),e?btoa(t).replace(/=/g,""):void 0},Et=function(t,e,n,r){return U(this,void 0,void 0,function(){var i,o,a,s,u,c;return V(this,function(l){switch(l.label){case 0:i=Pt(e),o=It(i,r),a=_r(),s="".concat(a,"/integrations/").concat(null!=o?o:i,"/").concat(n,"/").concat(null!=o?o:i,".dynamic.js.gz"),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,kt(s)];case 2:return l.sent(),function(t,e,n){var r,i;try{var o=(null!==(i=null===(r=null===window||void 0===window?void 0:window.performance)||void 0===r?void 0:r.getEntriesByName(t,"resource"))&&void 0!==i?i:[])[0];o&&e.stats.gauge("legacy_destination_time",Math.round(o.duration),K([n],o.duration<100?["cached"]:[],!0))}catch(t){}}(s,t,e),[3,4];case 3:throw u=l.sent(),t.stats.gauge("legacy_destination_time",-1,["plugin:".concat(e),"failed"]),u;case 4:return c=window["".concat(i,"Deps")],[4,Promise.all(c.map(function(t){return kt(a+t+".gz")}))];case 5:return l.sent(),window["".concat(i,"Loader")](),[2,window["".concat(i,"Integration")]]}})})},At=function(t,e){return U(this,void 0,void 0,function(){var n,r=this;return V(this,function(i){switch(i.label){case 0:return n=[],at()?[2,e]:[4,Fn(function(){return e.length>0&&ot()},function(){return U(r,void 0,void 0,function(){var r,i;return V(this,function(o){switch(o.label){case 0:return(r=e.pop())?[4,tt(r,t)]:[2];case 1:return i=o.sent(),_instanceof(i,R)||n.push(r),[2]}})})})];case 1:return i.sent(),n.map(function(t){return e.pushWithBackoff(t)}),[2,e]}})})},Mt=function(t,e,r,i,o,a){var s,u;if(void 0===r&&(r={}),void 0===i&&(i={}),it())return[];e.plan&&((i=null!=i?i:{}).plan=e.plan);var c=null!==(u=null===(s=e.middlewareSettings)||void 0===s?void 0:s.routingRules)&&void 0!==u?u:[],l=e.integrations,f=i.integrations,d=xt(e,null!=i?i:{}),p=null==a?void 0:a.reduce(function(t,e){var r;return n(n({},t),((r={})[function(t){return("Integration"in t?t.Integration:t).prototype.name}(e)]=e,r))},{}),h=new Set(K(K([],Object.keys(l).filter(function(t){return Ar(t,l[t])}),!0),Object.keys(p||{}).filter(function(t){return Y(l[t])||Y(null==f?void 0:f[t])}),!0));return Array.from(h).filter(function(t){return!Mr(t,r)}).map(function(e){var n=function(t){var e,n,r,i;return null!==(i=null!==(n=null===(e=null==t?void 0:t.versionSettings)||void 0===e?void 0:e.override)&&void 0!==n?n:null===(r=null==t?void 0:t.versionSettings)||void 0===r?void 0:r.version)&&void 0!==i?i:"latest"}(l[e]),r=new Nr(e,n,t,d[e],i,null==p?void 0:p[e]);return c.filter(function(t){return t.destinationName===e}).length>0&&o&&r.addMiddleware(o),r})},Ct=function(t){return U(this,void 0,void 0,function(){var e;return V(this,function(n){switch(n.label){case 0:return[4,Promise.resolve().then(function(){return Be(Br())})];case 1:return e=n.sent(),t._plugins=e,[2]}})})},Nt=function(t,e){function r(r){var i=t,o=r.event.event;if(i&&o){var a=i[o];if(!Ot(i,a))return r.updateEvent("integrations",n(n({},r.event.integrations),{All:!1,"Segment.io":!0})),r;var s=function(t,e){var n,r;if(!t||!Object.keys(t))return{};var i=t.integrations?Object.keys(t.integrations).filter(function(e){return!1===t.integrations[e]}):[],o=[];return(null!==(n=e.remotePlugins)&&void 0!==n?n:[]).forEach(function(t){i.forEach(function(e){t.creationName==e&&o.push(t.name)})}),(null!==(r=e.remotePlugins)&&void 0!==r?r:[]).reduce(function(t,e){return e.settings.subscriptions&&o.includes(e.name)&&e.settings.subscriptions.forEach(function(n){return t["".concat(e.name," ").concat(n.partnerAction)]=!1}),t},{})}(a,e);r.updateEvent("integrations",n(n(n({},r.event.integrations),null==a?void 0:a.integrations),s))}return r}return{name:"Schema Filter",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:r,alias:r,track:r,identify:r,group:r}},Ft=function(t,e,n){var r;return U(this,void 0,void 0,function(){var i,o,a,s,u=this;return V(this,function(c){switch(c.label){case 0:return it()?[2,[]]:(i=_r(),o=null!==(r=e.enabledMiddleware)&&void 0!==r?r:{},a=Object.entries(o).filter(function(t){t[0];return t[1]}).map(function(t){return t[0]}),s=a.map(function(e){return U(u,void 0,void 0,function(){var r,o,a,s;return V(this,function(u){switch(u.label){case 0:r=e.replace("@segment/",""),o=r,n&&(o=btoa(r).replace(/=/g,"")),a="".concat(i,"/middleware/").concat(o,"/latest/").concat(o,".js.gz"),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,kt(a)];case 2:return u.sent(),[2,window["".concat(r,"Middleware")]];case 3:return s=u.sent(),t.log("error",s),t.stats.increment("failed_remote_middleware"),[3,4];case 4:return[2]}})})}),[4,Promise.all(s)]);case 1:return[2,c.sent().filter(Boolean)]}})})},Dt=function(t,e){if("collector"===t)return"collector";if(!e)throw new Error("stepId(".concat(t,") requires an id"));return"".concat(t,".").concat(e)},Rt=function(t,e){var n=t.destinations[e];if(!n)throw new Error("Destination not found: ".concat(e));return n},Tt=function(t,e){var n=t.transformers[e];if(!n)throw new Error("Transformer not found: ".concat(e));return n},Lt=function(t,e){var n=t.sources[e];if(!n)throw new Error("Source not found: ".concat(e));return n},qt=function(t,e){var n=t.stores[e];if(!n)throw new Error("Store not found: ".concat(e));return n},Bt=function(t,e){return _async_to_generator(function(){return _ts_generator(this,function(n){switch(n.label){case 0:return[4,t.get(e)];case 1:return[2,n.sent()]}})})()},zt=function(t){return Array.isArray(t)},Ut=function(t){return void 0!==t},Vt=function(t){return"object"==(void 0===t?"undefined":_type_of(t))&&null!==t&&!zt(t)&&"[object Object]"===Object.prototype.toString.call(t)},Kt=function(t){return"string"==typeof t},Ht=function(t){return Xr(t)?t:void 0},Gt=function(t,e,n){return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return _async_to_generator(function(){var r;return _ts_generator(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,4,6]),[4,t.apply(void 0,_to_consumable_array(i))];case 1:case 3:return[2,o.sent()];case 2:return r=o.sent(),e?[4,e(r)]:[2];case 4:return[4,null==n?void 0:n()];case 5:return o.sent(),[7];case 6:return[2]}})})()}},Jt=function(t){return _async_to_generator(function(t){var e,n,r,i,o,a,s,u,c,l,f,d,p,h,v,y,m=arguments;return _ts_generator(this,function(g){switch(g.label){case 0:if(e=m.length>1&&void 0!==m[1]?m[1]:{},n=m.length>2&&void 0!==m[2]?m[2]:{},!Ut(t))return[2];if(o=Vt(t)&&t.consent||n.consent||(null===(i=n.collector)||void 0===i?void 0:i.consent),a=null!==(r=n.event)&&void 0!==r?r:Vt(t)?t:{},!n.collector)throw new Error("getMappingValue: context.collector is required");s={event:a,mapping:e,collector:n.collector,logger:n.collector.logger,consent:o},u=zt(e)?e:[e],c=!0,l=!1,f=void 0,g.label=1;case 1:g.trys.push([1,6,7,8]),d=u[Symbol.iterator](),g.label=2;case 2:return(c=(p=d.next()).done)?[3,5]:(h=p.value,[4,Gt(ei,function(t){if(_instanceof(t,ti))throw t;n.collector&&n.collector.status.failed++,s.logger.error("mapping processing failed",{event:a,error:t})})(t,h,_object_spread_props(_object_spread({},s),{mapping:h}))]);case 3:if(v=g.sent(),Ut(v))return[2,v];g.label=4;case 4:return c=!0,[3,2];case 5:return[3,8];case 6:return y=g.sent(),l=!0,f=y,[3,8];case 7:try{c||null==d.return||d.return()}finally{if(l)throw f}return[7];case 8:return[2]}})}).apply(this,arguments)},Wt=function(t,e,n,r){var i,o=[t,e,n,r],a=Y(t)?t.event:t;if(!a||!G(a))throw new Error("Event missing");var s=Y(t)?null!==(i=t.properties)&&void 0!==i?i:{}:Y(e)?e:{},u={};return W(n)||(u=null!=n?n:{}),Y(t)&&!W(e)&&(u=null!=e?e:{}),[a,s,u,o.find(W)]},Yt=function(t,e,n,r,i){var o,a,s=null,u=null,c=[t,e,n,r,i],l=c.filter(G);1===l.length?G(c[1])?(u=c[1],s=null):(u=l[0],s=null):2===l.length&&("string"==typeof c[0]&&(s=c[0]),"string"==typeof c[1]&&(u=c[1]));var f=c.find(W),d=c.filter(Y);return 1===d.length?Y(c[2])?(a={},o=c[2]):Y(c[3])?(o={},a=c[3]):(o=d[0],a={}):2===d.length&&(o=d[0],a=d[1]),[s,u,null!=o?o:o={},null!=a?a:a={},f]},Qt=function(t,e,n,r){J(t)&&(t=t.toString()),J(e)&&(e=e.toString());var i=[t,e,n,r],o=i.filter(G),a=o[0],s=void 0===a?t:a,u=o[1],c=void 0===u?null:u,l=i.filter(Y)[0];return[s,c,void 0===l?{}:l,i.find(W)]},$t=function(t){if(e=t,"object"!==Object.prototype.toString.call(e).slice(8,-1).toLowerCase())return!1;var e;if(t.__t!==ri)return!1;for(var n in t)if(!oi.includes(n))return!1;return!0},Zt=function(t){for(var e=t.constructor.prototype,n=0,r=Object.getOwnPropertyNames(e);n<r.length;n++){var i=r[n];if("constructor"!==i){var o=Object.getOwnPropertyDescriptor(t.constructor.prototype,i);o&&"function"==typeof o.value&&(t[i]=t[i].bind(t))}}return t},Xt=function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t},te=function(t){var e=function(t){try{return new URL(t)}catch(t){return}}(t);if(e)for(var n=function(t){var e=t.hostname.split("."),n=e[e.length-1],r=[];if(4===e.length&&parseInt(n,10)>0)return r;if(e.length<=1)return r;for(var i=e.length-2;i>=0;--i)r.push(e.slice(i).join("."));return r}(e),r=0;r<n.length;++r){var i="__tld__",o=n[r],a={domain:"."+o};try{if(pi.set(i,"1",a),pi.get(i))return pi.remove(i,a),o}catch(t){return}}},ee=function(t){return t&&t.stores&&Array.isArray(t.stores)&&t.stores.every(function(t){return Object.values(mi).includes(t)})},ne=function(t){return t.map(function(t){var e,n;switch(!function(t){return"object"===(void 0===t?"undefined":_type_of(t))&&void 0!==t.name}(t)?e=t:(e=t.name,n=t.settings),e){case mi.Cookie:return new hi(n);case mi.LocalStorage:return new vi;case mi.Memory:return new yi;default:throw new Error("Unknown Store Type: ".concat(t))}})},re=function(t,e){return t.map(function(t){return e&&t===mi.Cookie?{name:t,settings:e}:t})},ie=function(t,e){return U(this,void 0,void 0,function(){var n,r;return V(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e.called?[2,void 0]:(e.called=!0,n=t[e.method].apply(t,e.args),ki(n)?[4,n]:[3,2]);case 1:i.sent(),i.label=2;case 2:return e.resolve(n),[3,4];case 3:return r=i.sent(),e.reject(r),[3,4];case 4:return[2]}})})},oe=function(t,e,n,r){var i=null!=t?t:e;return Math.min(Math.max(i,n),r)},ae=function(t,e){var n;if(429!==t.status)return null;var r=null===(n=t.headers)||void 0===n?void 0:n.get("Retry-After");if(!r)return null;var i=parseInt(r,10);return Number.isNaN(i)?null:{retryAfterMs:1e3*Math.max(0,Math.min(i,e.maxRetryInterval)),fromHeader:!0}},se=function(t,e){var n=e.statusCodeOverrides[String(t)];return n||(t>=500?e.default5xxBehavior:t>=400?e.default4xxBehavior:"drop")},ue=function(t,e){var r,i,o,a,s=t||e?{rateLimitConfig:n(n({},null==t?void 0:t.rateLimitConfig),null==e?void 0:e.rateLimitConfig),backoffConfig:n(n(n({},null==t?void 0:t.backoffConfig),null==e?void 0:e.backoffConfig),{statusCodeOverrides:n(n({},null===(r=null==t?void 0:t.backoffConfig)||void 0===r?void 0:r.statusCodeOverrides),null===(i=null==e?void 0:e.backoffConfig)||void 0===i?void 0:i.statusCodeOverrides)})}:void 0,u=null==s?void 0:s.rateLimitConfig,c=null==s?void 0:s.backoffConfig;return{rateLimitConfig:{maxRetryCount:oe(null==u?void 0:u.maxRetryCount,10,0,100),maxRetryInterval:oe(null==u?void 0:u.maxRetryInterval,300,.1,86400),maxRateLimitDuration:oe(null==u?void 0:u.maxRateLimitDuration,43200,10,86400)},backoffConfig:{maxRetryCount:oe(null==c?void 0:c.maxRetryCount,10,0,100),baseBackoffInterval:oe(null==c?void 0:c.baseBackoffInterval,.5,.1,300),maxBackoffInterval:oe(null==c?void 0:c.maxBackoffInterval,60,.1,86400),maxTotalBackoffDuration:oe(null==c?void 0:c.maxTotalBackoffDuration,43200,60,604800),jitterPercent:oe(null==c?void 0:c.jitterPercent,10,0,100),default4xxBehavior:null!==(o=null==c?void 0:c.default4xxBehavior)&&void 0!==o?o:"drop",default5xxBehavior:null!==(a=null==c?void 0:c.default5xxBehavior)&&void 0!==a?a:"retry",statusCodeOverrides:n(n({},qi),null==c?void 0:c.statusCodeOverrides)}}},ce=function(t){return(encodeURI(JSON.stringify(t)).split(/%..|./).length-1)/1024},le=function(t){return ce(t)>=Bi-50},fe=function(t,e,r,i){var o,a;void 0===i&&(i="https");var s,u=[],c=!1,l=null!==(o=null==e?void 0:e.size)&&void 0!==o?o:10,f=null!==(a=null==e?void 0:e.timeout)&&void 0!==a?a:5e3,d=null!=r?r:ue(),p=0,h=0,v=!1,y=!1,m=0,g=0,b=0;function _(n,r){var o;if(0!==n.length){var a=null===(o=n[0])||void 0===o?void 0:o.writeKey,s=n.map(function(t){var e=t;e.sentAt;return z(e,["sentAt"])}),u=Li(null==e?void 0:e.headers);if(r>0&&(u["X-Retry-Count"]=String(r)),a){var l=btoa(a+":");u.Authorization="Basic ".concat(l)}var f=t.startsWith("http://")||t.startsWith("https://")?"":"".concat(i,"://");return I("".concat(f).concat(t,"/b"),{credentials:null==e?void 0:e.credentials,keepalive:(null==e?void 0:e.keepalive)||c,headers:u,method:"post",body:JSON.stringify({writeKey:a,batch:s,sentAt:(new Date).toISOString()}),priority:null==e?void 0:e.priority}).then(function(t){var e=t.status;if(!(e<400)){var n=se(e,d.backoffConfig);if("drop"!==n){var r=ae(t,d.rateLimitConfig);if(r)throw new Ti("Rate limit exceeded: ".concat(e),r.retryAfterMs,r.fromHeader)}if("retry"===n)throw new Error("Retryable error: ".concat(e))}})}}function w(){u.length>0&&j(1)}function x(t){var r;return void 0===t&&(t=1),U(this,void 0,void 0,function(){var i,o,a,s;return V(this,function(c){return v||(h=0,m=0,g=0,b=0),v=!1,y=!0,u.length?(i=function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n],i=K(K([],e,!0),[r],!1);if(e.length>0&&le(i))return{batch:e,remaining:t.slice(n)};e.push(r)}return{batch:e,remaining:[]}}(u),o=i.batch,a=i.remaining,0===o.length?(y=!1,[2]):(u=a,s=h,h+=1,[2,null===(r=_(o,s))||void 0===r?void 0:r.then(function(t){return u.length>0&&j(1),t}).catch(function(r){var i;R.system().log("error","Error sending batch",r);var a,s=null!==(i=null==e?void 0:e.maxRetries)&&void 0!==i?i:d.backoffConfig.maxRetryCount,c="RateLimitError"===r.name,l=c&&r.isRetryableWithoutCount;if(!(l||t<=s))return w();if(l){if(++m>d.rateLimitConfig.maxRetryCount)return w();var f=r.retryTimeout;b+=f;var h=1e3*d.rateLimitConfig.maxRateLimitDuration;if(b>h)return w();p=f}if(!c){a=function(t,e){var n=1e3*e.baseBackoffInterval,r=1e3*e.maxBackoffInterval,i=n*Math.pow(2,t-1),o=Math.min(i,r),a=1+2*(Math.random()-.5)*(e.jitterPercent/100);return Math.max(0,o*a)}(t,d.backoffConfig),g+=a;var y=1e3*d.backoffConfig.maxTotalBackoffDuration;if(g>y)return w()}u=K(K([],o,!0),u,!0),o.forEach(function(e){if("_metadata"in e){var r=e;r._metadata=n(n({},r._metadata),{retryCount:t})}}),v=!0,j(l?t:t+1,a)}).finally(function(){y=!1})])):(y=!1,[2])})})}function j(t,e){(void 0===t&&(t=1),s)||(s=setTimeout(function(){s=void 0,x(t).catch(console.error)},p||e||f),p=0)}return Ri(function(t){if((c=t)&&u.length){var e=(n=u,r=[],i=0,n.forEach(function(t){ce(r[i])>=64&&i++,r[i]?r[i].push(t):r[i]=[t]}),r).map(function(t){return _(t,0)});Promise.all(e).catch(console.error)}var n,r,i}),{dispatch:function(t,n,r){return U(this,void 0,void 0,function(){var t;return V(this,function(r){return u.push(n),v?[2]:(t=u.length>=l||le(u)||(null==e?void 0:e.keepalive)&&function(t){return ce(t)>=zi-10}(u),t||c?[2,y?j():x()]:[2,j()])})})}}},de=function(t,e,r,i,o){var a,s=t.user();delete e.options,e.writeKey=null==r?void 0:r.apiKey,e.userId=e.userId||s.id(),e.anonymousId=e.anonymousId||s.anonymousId(),e.sentAt=new Date;var u=t.queue.failedInitializations||[];u.length>0&&(e._metadata={failedInitializations:u}),null!=o&&(o.attempts>1&&(e._metadata=n(n({},e._metadata),{retryCount:o.attempts})),o.attempts++);var c=[],l=[];for(var f in i){var d=i[f];"Segment.io"===f&&c.push(f),"bundled"===d.bundlingStatus&&c.push(f),"unbundled"===d.bundlingStatus&&l.push(f)}for(var p=0,h=(null==r?void 0:r.unbundledIntegrations)||[];p<h.length;p++){var v=h[p];l.includes(v)||l.push(v)}var y=null!==(a=null==r?void 0:r.maybeBundledConfigIds)&&void 0!==a?a:{},m=[];return c.sort().forEach(function(t){var e;(null!==(e=y[t])&&void 0!==e?e:[]).forEach(function(t){m.push(t)})}),!1!==(null==r?void 0:r.addBundledMetadata)&&(e._metadata=n(n({},e._metadata),{bundled:c.sort(),unbundled:l.sort(),bundledIds:m})),e},pe=function(t,e){return U(this,void 0,void 0,function(){var n,r=this;return V(this,function(i){switch(i.label){case 0:return n=[],at()?[2,e]:[4,Fn(function(){return e.length>0&&!at()},function(){return U(r,void 0,void 0,function(){var r,i;return V(this,function(o){switch(o.label){case 0:return(r=e.pop())?[4,tt(r,t)]:[2];case 1:return i=o.sent(),_instanceof(i,R)||n.push(r),[2]}})})})];case 1:return i.sent(),n.map(function(t){return e.pushWithBackoff(t)}),[2,e]}})})},he=function(t,e,n,r){var i=this;t||setTimeout(function(){return U(i,void 0,void 0,function(){var t,i;return V(this,function(o){switch(o.label){case 0:return t=!0,[4,pe(n,e)];case 1:return i=o.sent(),t=!1,e.todo>0&&r(t,i,n,r),[2]}})})},500*Math.random()+100)},ve=function(t,e,n){var r,i,o,a;window.addEventListener("pagehide",function(){u.push.apply(u,Array.from(c)),c.clear()});var s=null!==(r=null==e?void 0:e.apiKey)&&void 0!==r?r:"",u=t.options.disableClientPersistence?new p(t.queue.queue.maxAttempts,[]):new q(t.queue.queue.maxAttempts,"".concat(s,":dest-Segment.io")),c=new Set,l=new WeakMap,f=!1,d=null!==(i=null==e?void 0:e.apiHost)&&void 0!==i?i:M,h=null!==(o=null==e?void 0:e.protocol)&&void 0!==o?o:"https",v="".concat(h,"://").concat(d),y=null===(a=null==n?void 0:n["Segment.io"])||void 0===a?void 0:a.httpConfig,m=null==e?void 0:e.httpConfig,g=ue(m,y);!1!==t.options.retryQueue&&(u.maxAttempts=g.backoffConfig.maxRetryCount);var b,_,w=null==e?void 0:e.deliveryStrategy,x=w&&"strategy"in w&&"batching"===w.strategy?fe(d,w.config,g,h):(b=null==w?void 0:w.config,_=g,{dispatch:function(t,e,n){var r=Li(null==b?void 0:b.headers),i=null==e?void 0:e.writeKey;if(i){var o=btoa(i+":");r.Authorization="Basic ".concat(o)}return n&&(r["X-Retry-Count"]=String(n)),I(t,{credentials:null==b?void 0:b.credentials,keepalive:null==b?void 0:b.keepalive,headers:r,method:"post",body:JSON.stringify(e),priority:null==b?void 0:b.priority}).then(function(t){var e=t.status;if(!(e<400)){var n=null!=_?_:ue(),r=se(e,n.backoffConfig);if("drop"!==r){var i=ae(t,n.rateLimitConfig);if(i)throw new Ti("Rate limit exceeded: ".concat(e),i.retryAfterMs,i.fromHeader)}if("retry"===r)throw new Error("Retryable error: ".concat(e));var o=new Error("Non-retryable error: ".concat(e));throw o.name="NonRetryableError",o}})}});function j(r){return U(this,void 0,void 0,function(){var i,o,a,s;return V(this,function(d){return at()?(u.push(r),he(f,u,k,he),[2,r]):(c.add(r),i=r.event.type.charAt(0),o=ht(r.event).json(),"track"===r.event.type&&delete o.traits,"alias"===r.event.type&&(o=function(t,e){var n,r,i,o,a=t.user();return e.previousId=null!==(i=null!==(r=null!==(n=e.previousId)&&void 0!==n?n:e.from)&&void 0!==r?r:a.id())&&void 0!==i?i:a.anonymousId(),e.userId=null!==(o=e.userId)&&void 0!==o?o:e.to,delete e.from,delete e.to,e}(t,o)),(a=u.getAttempts(r))>=u.maxAttempts?(c.delete(r),s=new Error("Retry attempts exhausted (".concat(a,"/").concat(u.maxAttempts,")")),r.setFailedDelivery({reason:s}),t.emit("error",{code:"delivery_failure",reason:s,ctx:r}),[2,r]):[2,x.dispatch("".concat(v,"/").concat(i),de(t,o,e,n,r),a).then(function(){return r}).catch(function(e){var n;if(r.log("error","Error sending event",e),"RateLimitError"===e.name){var i=(null!==(n=l.get(r))&&void 0!==n?n:0)+1;if(l.set(r,i),i>g.rateLimitConfig.maxRetryCount)r.setFailedDelivery({reason:e}),t.emit("error",{code:"delivery_failure",reason:e,ctx:r});else{var o=e.retryTimeout;u.pushWithDelay(r,o)}}else"NonRetryableError"===e.name?(r.setFailedDelivery({reason:e}),t.emit("error",{code:"delivery_failure",reason:e,ctx:r})):u.pushWithBackoff(r);return he(f,u,k,he),r}).finally(function(){c.delete(r)})])})})}var k={metadata:{writeKey:s,apiHost:d,protocol:h},name:"Segment.io",type:"destination",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:j,identify:j,page:j,alias:j,group:j,screen:j};return u.todo&&he(f,u,k,he),k},ye=function(){console.warn(Ki)},me=function(){return"undefined"!=typeof process&&process.env?process.env:{}},ge=function(t){return U(this,void 0,void 0,function(){var e;return V(this,function(n){return(e=navigator.userAgentData)?t?[2,e.getHighEntropyValues(t).catch(function(){return e.toJSON()})]:[2,e.toJSON()]:[2,void 0]})})},be=function(){if(Ui)return Ui;var t=te(window.location.href);return Ui={expires:31536e6,secure:!1,path:"/"},t&&(Ui.domain=t),Ui},_e=function(t,e){return U(this,void 0,void 0,function(){var n,r,i,o,a,s;return V(this,function(u){switch(u.label){case 0:if(u.trys.push([0,9,,10]),n=new RegExp("https://cdn.segment.(com|build)"),r=br(),!e)return[3,6];i=t.url.split("/"),o=i[i.length-2],a=t.url.replace(o,btoa(o).replace(/=/g,"")),u.label=1;case 1:return u.trys.push([1,3,,5]),[4,kt(a.replace(n,r))];case 2:return u.sent(),[3,5];case 3:return u.sent(),[4,kt(t.url.replace(n,r))];case 4:return u.sent(),[3,5];case 5:return[3,8];case 6:return[4,kt(t.url.replace(n,r))];case 7:u.sent(),u.label=8;case 8:return"function"==typeof window[t.libraryName]?[2,window[t.libraryName]]:[3,10];case 9:throw s=u.sent(),console.error("Failed to create PluginFactory",t),s;case 10:return[2]}})})},we=function(t,e,r,i,o,a){var s,u,c;return U(this,void 0,void 0,function(){var l,f,d,p=this;return V(this,function(h){switch(h.label){case 0:return l=[],f=null!==(u=null===(s=t.middlewareSettings)||void 0===s?void 0:s.routingRules)&&void 0!==u?u:[],d=(null!==(c=t.remotePlugins)&&void 0!==c?c:[]).map(function(t){return U(p,void 0,void 0,function(){var s,u,c,d,p,h,v;return V(this,function(y){switch(y.label){case 0:if(function(t,e){var n=t[e.creationName],r=t[e.name];return!1===t.All&&!n&&!r||!1===n||!1===r}(e,t))return[2];y.label=1;case 1:return y.trys.push([1,6,,7]),(u=null==a?void 0:a.find(function(e){return e.pluginName===t.name}))?[3,3]:[4,_e(t,null==i?void 0:i.obfuscate)];case 2:u=y.sent(),y.label=3;case 3:return(s=u)?(c=r[t.name],[4,s(n(n({},t.settings),c))]):[3,5];case 4:d=y.sent(),function(t){if(!Array.isArray(t))throw new Error("Not a valid list of plugins");var e=["load","isLoaded","name","version","type"];t.forEach(function(t){e.forEach(function(e){var n;if(void 0===t[e])throw new Error("Plugin: ".concat(null!==(n=t.name)&&void 0!==n?n:"unknown"," missing required function ").concat(e))})})}(p=Array.isArray(d)?d:[d]),h=f.filter(function(e){return e.destinationName===t.creationName}),p.forEach(function(e){var n=new Xi(t.creationName,e);h.length&&o&&n.addMiddleware(o),l.push(n)}),y.label=5;case 5:return[3,7];case 6:return v=y.sent(),console.warn("Failed to load Remote Plugin",v),St(R.system(),{integrationName:t.name,methodName:"load",type:"action",didError:!0}),[3,7];case 7:return[2]}})})}),[4,Promise.all(d)];case 1:return h.sent(),[2,l.filter(Boolean)]}})})},xe=function(t,e,n){return U(this,void 0,void 0,function(){return V(this,function(r){switch(r.label){case 0:return[4,ro(t,e)];case 1:return r.sent(),Ai(t,n),[2]}})})},je=function(t,e,n,r,i,o,a){var s,u,c;return void 0===i&&(i=[]),U(this,void 0,void 0,function(){var l,f,d,p,h,v,y,m,g,b,_,w,x,j,k=this;return V(this,function(S){switch(S.label){case 0:return function(t,e){Ei(t,e),Ii(t,e)}(n,a),l=null==i?void 0:i.filter(function(t){return"object"===(void 0===t?"undefined":_type_of(t))}),f=null==i?void 0:i.filter(function(t){return"function"==typeof t&&"string"==typeof t.pluginName}),function(t){var e,n,r;return"test"!==me().NODE_ENV&&(null!==(r=null===(n=null===(e=t.middlewareSettings)||void 0===e?void 0:e.routingRules)||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0}(e)?[4,Promise.resolve().then(function(){return Fr(),Er}).then(function(t){return t.tsubMiddleware(e.middlewareSettings.routingRules)})]:[3,2];case 1:return p=S.sent(),[3,3];case 2:p=void 0,S.label=3;case 3:return d=p,O=e,"test"!==me().NODE_ENV&&Object.keys(O.integrations).length>1||o.length>0?[4,Promise.resolve().then(function(){return qr(),Lr}).then(function(i){return i.ajsDestinations(t,e,n.integrations,r,d,o)})]:[3,5];case 4:return v=S.sent(),[3,6];case 5:v=[],S.label=6;case 6:return h=v,e.legacyVideoPluginsEnabled?[4,Promise.resolve().then(function(){return Ur(),zr}).then(function(t){return t.loadLegacyVideoPlugins(n)})]:[3,8];case 7:S.sent(),S.label=8;case 8:return(null===(s=r.plan)||void 0===s?void 0:s.track)?[4,Promise.resolve().then(function(){return Kr(),Vr}).then(function(t){var n;return t.schemaFilter(null===(n=r.plan)||void 0===n?void 0:n.track,e)})]:[3,10];case 9:return m=S.sent(),[3,11];case 10:m=void 0,S.label=11;case 11:return y=m,g=xt(e,r),[4,we(e,n.integrations,g,r,d,f).catch(function(t){return console.error("Failed to load remote plugins",t),[]})];case 12:return b=S.sent(),_=K(K([Qi],h,!0),b,!0),y&&_.push(y),!1===(null===(u=r.integrations)||void 0===u?void 0:u.All)&&!r.integrations["Segment.io"]||r.integrations&&!1===r.integrations["Segment.io"]?[3,14]:(x=(w=_).push,[4,ve(n,g["Segment.io"],e.integrations)]);case 13:x.apply(w,[S.sent()]),S.label=14;case 14:return[4,n.register.apply(n,K(K([],_,!1),l,!1))];case 15:return j=S.sent(),[4,Pi(n,a)];case 16:return S.sent(),Object.entries(null!==(c=e.enabledMiddleware)&&void 0!==c?c:{}).some(function(t){return t[1]})?[4,Promise.resolve().then(function(){return Gr(),Hr}).then(function(t){var i=t.remoteMiddlewares;return U(k,void 0,void 0,function(){var t,o;return V(this,function(a){switch(a.label){case 0:return[4,i(j,e,r.obfuscate)];case 1:return t=a.sent(),o=t.map(function(t){return n.addSourceMiddleware(t)}),[2,Promise.all(o)]}})})})]:[3,18];case 17:S.sent(),S.label=18;case 18:return[4,Oi(n,a)];case 19:return S.sent(),[2,j]}var O})})},ke=function(t,e,r){var i,o,a,s,u,c,l,f,d;return void 0===e&&(e={}),U(this,void 0,void 0,function(){var p,h,v,y,m,g,b,_,w,x;return V(this,function(j){switch(j.label){case 0:return!0===e.disable?[2,[new Yi,R.system()]]:(e.globalAnalyticsKey&&(O=e.globalAnalyticsKey,Cn=O),t.cdnURL&&gr(t.cdnURL),e.initialPageview&&r.add(new Ni("page",[])),p=no(),h=null!==(i=t.cdnURL)&&void 0!==i?i:br(),null===(o=t.cdnSettings)||void 0===o?[3,1]:(y=o,[3,3]));case 1:return[4,(k=t.writeKey,S=h,I("".concat(S,"/v1/projects/").concat(k,"/settings")).then(function(t){return t.ok?t.json():t.text().then(function(t){throw new Error(t)})}).catch(function(t){throw console.error(t.message),t}))];case 2:y=j.sent(),j.label=3;case 3:return v=y,e.updateCDNSettings&&(v=e.updateCDNSettings(v)),"function"!=typeof e.disable?[3,5]:[4,e.disable(v)];case 4:if(j.sent())return[2,[new Yi,R.system()]];j.label=5;case 5:return m=null===(s=null===(a=v.integrations["Segment.io"])||void 0===a?void 0:a.retryQueue)||void 0===s||s,e=n({retryQueue:m},e),g=new Wi(n(n({},t),{cdnSettings:v,cdnURL:h}),e),eo(g),b=null!==(u=t.plugins)&&void 0!==u?u:[],_=null!==(c=t.classicIntegrations)&&void 0!==c?c:[],w=null===(l=e.integrations)||void 0===l?void 0:l["Segment.io"],D.initRemoteMetrics(n(n({},v.metrics),{host:null!==(f=null==w?void 0:w.apiHost)&&void 0!==f?f:null===(d=v.metrics)||void 0===d?void 0:d.host,protocol:null==w?void 0:w.protocol})),[4,je(t.writeKey,v,g,e,b,_,r)];case 6:return x=j.sent(),g.initialized=!0,g.emit("initialize",t,e),[4,xe(g,p,r)];case 7:return j.sent(),[2,[g,x]]}var k,S,O})})},Se=function(t){var e;return null!==(e=null==t?void 0:t.analytics)&&void 0!==e?e:so},Oe=function(t,e){var n=e.apiKey,r=(e.identify,e.group,e.consent,e._state,_object_spread({initialPageview:!1},_object_without_properties(e,["apiKey","identify","group","consent","_state"])));return t.load({writeKey:n},r)},Pe=function(t){if(!t)return"";try{return JSON.stringify(t)}catch(t){return""}},Ie=function(t,e,n,r,i){return _async_to_generator(function(){var o,a,s,u,c;return _ts_generator(this,function(l){switch(l.label){case 0:return!0===e?(i?t.page(void 0,void 0,void 0,i):t.page(),[2]):[4,Jt(n,e,{collector:r})];case 1:return o=l.sent(),Vt(o)?(s=Kt((a=o).category)?a.category:void 0,u=Kt(a.name)?a.name:void 0,c=Vt(a.properties)&&!zt(a.properties)?a.properties:void 0,i?t.page(null!=s?s:null,null!=u?u:null,null!=c?c:{},i):void 0!==c?t.page(null!=s?s:null,null!=u?u:null,c):void 0!==u||void 0!==s?t.page(null!=s?s:null,null!=u?u:null):t.page(),[2]):[2]}})})()},Ee=Object.create,Ae=Object.defineProperty,Me=Object.getOwnPropertyDescriptor,Ce=Object.getOwnPropertyNames,Ne=Object.getPrototypeOf,Fe=Object.prototype.hasOwnProperty,De=(t=function(t){if("undefined"!=typeof require)return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')},"undefined"!=typeof require?require:"undefined"!=typeof Proxy?new Proxy(t,{get:function(t,e){return("undefined"!=typeof require?require:t)[e]}}):t),Re=function(t,e){return function(){return t&&(e=(0,t[Ce(t)[0]])(t=0)),e}},Te=function(t,e){return function(){return e||(0,t[Ce(t)[0]])((e={exports:{}}).exports,e),e.exports}},Le=function(t,e){for(var n in e)Ae(t,n,{get:e[n],enumerable:!0})},qe=function(t,e,n,r){if(e&&"object"===(void 0===e?"undefined":_type_of(e))||"function"==typeof e){var i=!0,o=!1,a=void 0;try{for(var s,u=function(){var i=s.value;Fe.call(t,i)||i===n||Ae(t,i,{get:function(){return e[i]},enumerable:!(r=Me(e,i))||r.enumerable})},c=Ce(e)[Symbol.iterator]();!(i=(s=c.next()).done);i=!0)u()}catch(t){o=!0,a=t}finally{try{i||null==c.return||c.return()}finally{if(o)throw a}}}return t},Be=function(t,e,n){return n=null!=t?Ee(Ne(t)):{},qe(!e&&t&&t.__esModule?n:Ae(n,"default",{value:t,enumerable:!0}),t)},ze=Re({"../../../../node_modules/tslib/tslib.es6.mjs":function(){e=function(t,n){return(e=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,n)},n=function(){return n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},n.apply(this,arguments)}}}),Ue=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/emitter/interface.js":function(){}}),Ve=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/plugins/index.js":function(){}}),Ke=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/events/interfaces.js":function(){}}),He=Re({"../../../../node_modules/dset/dist/index.mjs":function(){}}),Ge=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/utils/pick.js":function(){r=function(t,e){return Object.keys(t).filter(function(n){return e(n,t[n])}).reduce(function(e,n){return e[n]=t[n],e},{})}}}),Je=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/validation/errors.js":function(){ze(),i=function(t){function e(e,n){var r=t.call(this,"".concat(e," ").concat(n))||this;return r.field=e,r}return B(e,t),e}(Error)}}),We=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/validation/helpers.js":function(){}}),Ye=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/validation/assertions.js":function(){Je(),We(),o="is not a string",a="is not an object",s="is nil"}}),Qe=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/events/index.js":function(){ze(),Ke(),He(),Ge(),Ye(),u=function(t){var e,n;this.settings=t,this.createMessageId=t.createMessageId,this.onEventMethodCall=null!==(e=t.onEventMethodCall)&&void 0!==e?e:function(){},this.onFinishedEvent=null!==(n=t.onFinishedEvent)&&void 0!==n?n:function(){}},c=function(){function t(t){this.settings=new u(t)}return t.prototype.track=function(t,e,r,i){return this.settings.onEventMethodCall({type:"track",options:r}),this.normalize(n(n({},this.baseEvent()),{event:t,type:"track",properties:null!=e?e:{},options:n({},r),integrations:n({},i)}))},t.prototype.page=function(t,e,r,i,o){var a;this.settings.onEventMethodCall({type:"page",options:i});var s={type:"page",properties:n({},r),options:n({},i),integrations:n({},o)};return null!==t&&(s.category=t,s.properties=null!==(a=s.properties)&&void 0!==a?a:{},s.properties.category=t),null!==e&&(s.name=e),this.normalize(n(n({},this.baseEvent()),s))},t.prototype.screen=function(t,e,r,i,o){this.settings.onEventMethodCall({type:"screen",options:i});var a={type:"screen",properties:n({},r),options:n({},i),integrations:n({},o)};return null!==t&&(a.category=t),null!==e&&(a.name=e),this.normalize(n(n({},this.baseEvent()),a))},t.prototype.identify=function(t,e,r,i){return this.settings.onEventMethodCall({type:"identify",options:r}),this.normalize(n(n({},this.baseEvent()),{type:"identify",userId:t,traits:null!=e?e:{},options:n({},r),integrations:i}))},t.prototype.group=function(t,e,r,i){return this.settings.onEventMethodCall({type:"group",options:r}),this.normalize(n(n({},this.baseEvent()),{type:"group",traits:null!=e?e:{},options:n({},r),integrations:n({},i),groupId:t}))},t.prototype.alias=function(t,e,r,i){this.settings.onEventMethodCall({type:"alias",options:r});var o={userId:t,type:"alias",options:n({},r),integrations:n({},i)};return null!==e&&(o.previousId=e),void 0===t?this.normalize(n(n({},o),this.baseEvent())):this.normalize(n(n({},this.baseEvent()),o))},t.prototype.baseEvent=function(){return{integrations:{},options:{}}},t.prototype.context=function(t){var e,n=["userId","anonymousId","timestamp","messageId"];delete t.integrations;var r=Object.keys(t),i=null!==(e=t.context)&&void 0!==e?e:{},o={};return r.forEach(function(e){"context"!==e&&(n.includes(e)?H(o,e,t[e]):H(i,e,t[e]))}),[i,o]},t.prototype.normalize=function(t){var e,i,o=Object.keys(null!==(e=t.integrations)&&void 0!==e?e:{}).reduce(function(e,r){var i,o;return n(n({},e),((i={})[r]=Boolean(null===(o=t.integrations)||void 0===o?void 0:o[r]),i))},{});t.options=r(t.options||{},function(t,e){return void 0!==e});var a=n(n({},o),null===(i=t.options)||void 0===i?void 0:i.integrations),s=t.options?this.context(t.options):[],u=s[0],c=s[1],l=t.options,f=z(t,["options"]),d=n(n(n(n({timestamp:new Date},f),{context:u,integrations:a}),c),{messageId:l.messageId||this.settings.createMessageId()});return this.settings.onFinishedEvent(d),Q(d),d},t}()}}),$e=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/callback/index.js":function(){}}),Ze=Re({"../../../../node_modules/@segment/analytics-generic-utils/dist/esm/create-deferred/create-deferred.js":function(){l=function(){var t,e,n=!1,r=new Promise(function(r,i){t=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n=!0,r.apply(void 0,t)},e=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n=!0,i.apply(void 0,t)}});return{resolve:t,reject:e,promise:r,isSettled:function(){return n}}}}}),Xe=Re({"../../../../node_modules/@segment/analytics-generic-utils/dist/esm/create-deferred/index.js":function(){Ze()}}),tn=Re({"../../../../node_modules/@segment/analytics-generic-utils/dist/esm/emitter/emitter.js":function(){f=function(){function t(t){var e;this.callbacks={},this.warned=!1,this.maxListeners=null!==(e=null==t?void 0:t.maxListeners)&&void 0!==e?e:10}return t.prototype.warnIfPossibleMemoryLeak=function(t){this.warned||this.maxListeners&&this.callbacks[t].length>this.maxListeners&&(console.warn("Event Emitter: Possible memory leak detected; ".concat(String(t)," has exceeded ").concat(this.maxListeners," listeners.")),this.warned=!0)},t.prototype.on=function(t,e){return this.callbacks[t]?(this.callbacks[t].push(e),this.warnIfPossibleMemoryLeak(t)):this.callbacks[t]=[e],this},t.prototype.once=function(t,e){var n=this,r=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];n.off(t,r),e.apply(n,i)};return this.on(t,r),this},t.prototype.off=function(t,e){var n,r=(null!==(n=this.callbacks[t])&&void 0!==n?n:[]).filter(function(t){return t!==e});return this.callbacks[t]=r,this},t.prototype.emit=function(t){for(var e,n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];return(null!==(e=this.callbacks[t])&&void 0!==e?e:[]).forEach(function(t){t.apply(n,r)}),this},t}()}}),en=Re({"../../../../node_modules/@segment/analytics-generic-utils/dist/esm/emitter/index.js":function(){tn()}}),nn=Re({"../../../../node_modules/@segment/analytics-generic-utils/dist/esm/index.js":function(){Xe(),en()}}),rn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/priority-queue/backoff.js":function(){}}),on=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/priority-queue/index.js":function(){ze(),nn(),rn(),d="onRemoveFromFuture",p=function(t){function e(e,n,r){var i=t.call(this)||this;return i.future=[],i.maxAttempts=e,i.queue=n,i.seen=null!=r?r:{},i}return B(e,t),e.prototype.push=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e.map(function(e){return!(t.updateAttempts(e)>t.maxAttempts||t.includes(e))&&(t.queue.push(e),!0)});return this.queue=this.queue.sort(function(e,n){return t.getAttempts(e)-t.getAttempts(n)}),r},e.prototype.pushWithBackoff=function(t,e){if(void 0===e&&(e=0),0==e&&0===this.getAttempts(t))return this.push(t)[0];var n=function(t){var e=Math.random()+1,n=t.minTimeout,r=void 0===n?500:n,i=t.factor,o=void 0===i?2:i,a=t.attempt,s=t.maxTimeout,u=void 0===s?1/0:s;return Math.min(e*r*Math.pow(o,a),u)}({attempt:this.getAttempts(t)});return e>0&&n<e&&(n=e),this.scheduleItem(t,n)},e.prototype.pushWithDelay=function(t,e){return this.scheduleItem(t,e)},e.prototype.scheduleItem=function(t,e){var n=this;return!(this.updateAttempts(t)>this.maxAttempts||this.includes(t))&&(setTimeout(function(){n.queue.push(t),n.future=n.future.filter(function(e){return e.id!==t.id}),n.emit(d)},e),this.future.push(t),!0)},e.prototype.getAttempts=function(t){var e;return null!==(e=this.seen[t.id])&&void 0!==e?e:0},e.prototype.updateAttempts=function(t){return this.seen[t.id]=this.getAttempts(t)+1,this.getAttempts(t)},e.prototype.includes=function(t){return this.queue.includes(t)||this.future.includes(t)||Boolean(this.queue.find(function(e){return e.id===t.id}))||Boolean(this.future.find(function(e){return e.id===t.id}))},e.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(e.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),e}(f)}}),an=Re({"../../../../node_modules/@lukeed/uuid/dist/index.mjs":function(){for(h=256,v=[];h--;)v[h]=(h+256).toString(16).substring(1)}}),sn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/logger/index.js":function(){ze(),m=function(){function t(){this._logs=[]}return t.prototype.log=function(t,e,n){var r=new Date;this._logs.push({level:t,message:e,time:r,extras:n})},Object.defineProperty(t.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),t.prototype.flush=function(){if(this.logs.length>1){var t=this._logs.reduce(function(t,e){var r,i,o,a=n(n({},e),{json:JSON.stringify(e.extras,null," "),extras:e.extras});delete a.time;var s=null!==(o=null===(i=e.time)||void 0===i?void 0:i.toISOString())&&void 0!==o?o:"";return t[s]&&(s="".concat(s,"-").concat(Math.random())),n(n({},t),((r={})[s]=a,r))},{});console.table?console.table(t):console.log(t)}else this.logs.forEach(function(t){var e=t.level,n=t.message,r=t.extras;"info"===e||"debug"===e?console.log(n,null!=r?r:""):console[e](n,null!=r?r:"")});this._logs=[]},t}()}}),un=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/stats/index.js":function(){ze(),g=function(t){return{gauge:"g",counter:"c"}[t]},b=function(){function t(){this.metrics=[]}return t.prototype.increment=function(t,e,n){void 0===e&&(e=1),this.metrics.push({metric:t,value:e,tags:null!=n?n:[],type:"counter",timestamp:Date.now()})},t.prototype.gauge=function(t,e,n){this.metrics.push({metric:t,value:e,tags:null!=n?n:[],type:"gauge",timestamp:Date.now()})},t.prototype.flush=function(){var t=this.metrics.map(function(t){return n(n({},t),{tags:t.tags.join(",")})});console.table?console.table(t):console.log(t),this.metrics=[]},t.prototype.serialize=function(){return this.metrics.map(function(t){return{m:t.metric,v:t.value,t:t.tags,k:g(t.type),e:t.timestamp}})},t}(),_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.gauge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},e.prototype.increment=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},e.prototype.flush=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},e.prototype.serialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return[]},e}(b)}}),cn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/context/index.js":function(){an(),He(),sn(),un(),w=function(t){var e,n,r;this.retry=null===(e=t.retry)||void 0===e||e,this.type=null!==(n=t.type)&&void 0!==n?n:"plugin Error",this.reason=null!==(r=t.reason)&&void 0!==r?r:""},x=function(){function t(t,e,n,r){void 0===e&&(e=X()),void 0===n&&(n=new _),void 0===r&&(r=new m),this.attempts=0,this.event=t,this._id=e,this.logger=r,this.stats=n}return t.system=function(){},t.prototype.isSame=function(t){return t.id===this.id},t.prototype.cancel=function(t){if(t)throw t;throw new w({reason:"Context Cancel"})},t.prototype.log=function(t,e,n){this.logger.log(t,e,n)},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),t.prototype.updateEvent=function(t,e){var n;if("integrations"===t.split(".")[0]){var r=t.split(".")[1];if(!1===(null===(n=this.event.integrations)||void 0===n?void 0:n[r]))return this.event}return H(this.event,t,e),this.event},t.prototype.failedDelivery=function(){return this._failedDelivery},t.prototype.setFailedDelivery=function(t){this._failedDelivery=t},t.prototype.logs=function(){return this.logger.logs},t.prototype.flush=function(){this.logger.flush(),this.stats.flush()},t.prototype.toJSON=function(){return{id:this._id,event:this.event,logs:this.logger.logs,metrics:this.stats.metrics}},t}()}}),ln=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/utils/group-by.js":function(){ze()}}),fn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/utils/is-thenable.js":function(){j=function(t){return"object"===(void 0===t?"undefined":_type_of(t))&&null!==t&&"then"in t&&"function"==typeof t.then}}}),dn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/task/task-group.js":function(){fn(),k=function(){var t,e,n=0;return{done:function(){return t},run:function(r){var i=r();return j(i)&&(1===++n&&(t=new Promise(function(t){return e=t})),i.finally(function(){return 0===--n&&e()})),i}}}}}),pn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/queue/delivery.js":function(){ze(),cn()}}),hn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/queue/event-queue.js":function(){ze(),ln(),on(),cn(),nn(),dn(),pn(),S=function(t){function e(e){var n=t.call(this)||this;return n.criticalTasks=k(),n.plugins=[],n.failedInitializations=[],n.flushing=!1,n.queue=e,n.queue.on(d,function(){n.scheduleFlush(0)}),n}return B(e,t),e.prototype.register=function(t,e,n){return U(this,void 0,void 0,function(){var r,i,o=this;return V(this,function(a){switch(a.label){case 0:return this.plugins.push(e),r=function(n){o.failedInitializations.push(e.name),o.emit("initialization_failure",e),console.warn(e.name,n),t.log("warn","Failed to load destination",{plugin:e.name,error:n}),o.plugins=o.plugins.filter(function(t){return t!==e})},"destination"!==e.type||"Segment.io"===e.name?[3,1]:(e.load(t,n).catch(r),[3,4]);case 1:return a.trys.push([1,3,,4]),[4,e.load(t,n)];case 2:return a.sent(),[3,4];case 3:return i=a.sent(),r(i),[3,4];case 4:return[2]}})})},e.prototype.deregister=function(t,e,n){return U(this,void 0,void 0,function(){var r;return V(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e.unload?[4,Promise.resolve(e.unload(t,n))]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.plugins=this.plugins.filter(function(t){return t.name!==e.name}),[3,4];case 3:return r=i.sent(),t.log("warn","Failed to unload destination",{plugin:e.name,error:r}),[3,4];case 4:return[2]}})})},e.prototype.dispatch=function(t){return U(this,void 0,void 0,function(){var e;return V(this,function(n){return t.log("debug","Dispatching"),t.stats.increment("message_dispatched"),this.queue.push(t),e=this.subscribeToDelivery(t),this.scheduleFlush(0),[2,e]})})},e.prototype.subscribeToDelivery=function(t){return U(this,void 0,void 0,function(){var e=this;return V(this,function(n){return[2,new Promise(function(n){var r=function(i,o){i.isSame(t)&&(e.off("flush",r),n(i))};e.on("flush",r)})]})})},e.prototype.dispatchSingle=function(t){return U(this,void 0,void 0,function(){var e=this;return V(this,function(n){return t.log("debug","Dispatching"),t.stats.increment("message_dispatched"),this.queue.updateAttempts(t),t.attempts=1,[2,this.deliver(t).catch(function(n){return e.enqueuRetry(n,t)?e.subscribeToDelivery(t):(t.setFailedDelivery({reason:n}),t)})]})})},e.prototype.isEmpty=function(){return 0===this.queue.length},e.prototype.scheduleFlush=function(t){var e=this;void 0===t&&(t=500),this.flushing||(this.flushing=!0,setTimeout(function(){e.flush().then(function(){setTimeout(function(){e.flushing=!1,e.queue.length&&e.scheduleFlush(0)},0)})},t))},e.prototype.deliver=function(t){var e;return U(this,void 0,void 0,function(){var n,r,i,o,a;return V(this,function(s){switch(s.label){case 0:return[4,this.criticalTasks.done()];case 1:s.sent(),n=Date.now(),s.label=2;case 2:return s.trys.push([2,4,,5]),[4,this.flushOne(t)];case 3:return t=s.sent(),r=Date.now()-n,(i=t.failedDelivery())?(a=_instanceof(i.reason,Error)?i.reason:new Error(String(null!==(e=i.reason)&&void 0!==e?e:"Unknown delivery failure")),t.log("error","Failed to deliver",a),this.emit("delivery_failure",t,a),t.stats.increment("delivery_failed"),[2,t]):(this.emit("delivery_success",t),t.stats.gauge("delivered",r),t.log("debug","Delivered",t.event),[2,t]);case 4:throw o=s.sent(),a=o,t.log("error","Failed to deliver",a),this.emit("delivery_failure",t,a),t.stats.increment("delivery_failed"),o;case 5:return[2]}})})},e.prototype.enqueuRetry=function(t,e){return!(_instanceof(t,w)&&!t.retry)&&this.queue.pushWithBackoff(e)},e.prototype.flush=function(){return U(this,void 0,void 0,function(){var t,e,n;return V(this,function(r){switch(r.label){case 0:if(0===this.queue.length)return[2,[]];if(!(t=this.queue.pop()))return[2,[]];t.attempts=this.queue.getAttempts(t),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.deliver(t)];case 2:return t=r.sent(),e=!t.failedDelivery(),this.emit("flush",t,e),[3,4];case 3:return n=r.sent(),this.enqueuRetry(n,t)||(t.setFailedDelivery({reason:n}),this.emit("flush",t,!1)),[2,[]];case 4:return[2,[t]]}})})},e.prototype.isReady=function(){return!0},e.prototype.availableExtensions=function(t){var e,n,r=this.plugins.filter(function(e){var n,r,i;if("destination"!==e.type&&"Segment.io"!==e.name)return!0;var o=void 0;return null===(n=e.alternativeNames)||void 0===n||n.forEach(function(e){void 0!==t[e]&&(o=t[e])}),null!==(i=null!==(r=t[e.name])&&void 0!==r?r:o)&&void 0!==i?i:!1!==("Segment.io"===e.name||t.All)}),i=(e="type",n={},r.forEach(function(t){var r,i=void 0;if("string"==typeof e){var o=t[e];i="string"!=typeof o?JSON.stringify(o):o}else _instanceof(e,Function)&&(i=e(t));void 0!==i&&(n[i]=K(K([],null!==(r=n[i])&&void 0!==r?r:[],!0),[t],!1))}),n),o=i.before,a=void 0===o?[]:o,s=i.enrichment,u=void 0===s?[]:s,c=i.destination,l=void 0===c?[]:c,f=i.after;return{before:a,enrichment:u,destinations:l,after:void 0===f?[]:f}},e.prototype.flushOne=function(t){var e,n;return U(this,void 0,void 0,function(){var r,i,o,a,s,u,c,l,f,d,p,h,v,y;return V(this,function(m){switch(m.label){case 0:if(!this.isReady())throw new Error("Not ready");t.attempts>1&&this.emit("delivery_retry",t),r=this.availableExtensions(null!==(e=t.event.integrations)&&void 0!==e?e:{}),i=r.before,o=r.enrichment,a=0,s=i,m.label=1;case 1:return a<s.length?(u=s[a],[4,et(t,u)]):[3,4];case 2:_instanceof(d=m.sent(),x)&&(t=d),this.emit("message_enriched",t,u),m.label=3;case 3:return a++,[3,1];case 4:c=0,l=o,m.label=5;case 5:return c<l.length?(f=l[c],[4,tt(t,f)]):[3,8];case 6:_instanceof(d=m.sent(),x)&&(t=d),this.emit("message_enriched",t,f),m.label=7;case 7:return c++,[3,5];case 8:return p=this.availableExtensions(null!==(n=t.event.integrations)&&void 0!==n?n:{}),h=p.destinations,v=p.after,[4,new Promise(function(e,n){setTimeout(function(){var r=h.map(function(e){return tt(t,e)});Promise.all(r).then(e).catch(n)},0)})];case 9:return m.sent(),t.stats.increment("message_delivered"),this.emit("message_delivered",t),y=v.map(function(e){return tt(t,e)}),[4,Promise.all(y)];case 10:return m.sent(),[2,t]}})})},e}(f)}}),vn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/analytics/index.js":function(){}}),yn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/analytics/dispatch.js":function(){ze(),$e(),O=function(t,e){var n=Date.now()-t;return Math.max((null!=e?e:300)-n,0)}}}),mn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/utils/bind-all.js":function(){}}),gn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/index.js":function(){Ue(),Ve(),Ke(),Qe(),$e(),on(),cn(),hn(),vn(),yn(),We(),Je(),Ye(),mn(),un(),pn()}}),bn=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/environment/index.js":function(){}}),_n=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/connection/index.js":function(){bn()}}),wn=Re({"../../../../node_modules/unfetch/dist/unfetch.mjs":function(){}}),xn=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/get-global.js":function(){P=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:null}}}),jn=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/fetch.js":function(){wn(),xn(),I=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=P();return(n&&n.fetch||st).apply(void 0,t)}}}),kn=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/generated/version.js":function(){E="1.84.0"}}),Sn=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/version-type.js":function(){A="npm"}}),On=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/constants/index.js":function(){M="api.segment.io/v1"}}),Pn=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/stats/remote-metrics.js":function(){ze(),jn(),kn(),Sn(),On(),C=function(t,e,r){var i=e.reduce(function(t,e){var n=e.split(":"),r=n[0],i=n[1];return t[r]=i,t},{});return{type:"Counter",metric:t,value:1,tags:n(n({},i),{library:"analytics.js",library_version:"web"===r?"next-".concat(E):"npm:next-".concat(E)})}},N=function(){function t(t){var e,n,r,i,o,a=this;if(this.host=null!==(e=null==t?void 0:t.host)&&void 0!==e?e:M,this.sampleRate=null!==(n=null==t?void 0:t.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==t?void 0:t.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==t?void 0:t.maxQueueSize)&&void 0!==i?i:20,this.protocol=null!==(o=null==t?void 0:t.protocol)&&void 0!==o?o:"https",this.queue=[],this.sampleRate>0){var s=!1,u=function(){s||(s=!0,a.flush().catch(ct),s=!1,setTimeout(u,a.flushTimer))};u()}}return t.prototype.increment=function(t,e){if(t.includes("analytics_js.")&&0!==e.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=C(t,e,ut());this.queue.push(n),t.includes("error")&&this.flush().catch(ct)}},t.prototype.flush=function(){return U(this,void 0,void 0,function(){var t=this;return V(this,function(e){switch(e.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch(function(e){ct(e),t.sampleRate=0})];case 1:return e.sent(),[2]}})})},t.prototype.send=function(){return U(this,void 0,void 0,function(){var t,e,n;return V(this,function(r){return t={series:this.queue},this.queue=[],e={"Content-Type":"text/plain"},n="".concat(this.protocol,"://").concat(this.host,"/m"),[2,I(n,{headers:e,body:JSON.stringify(t),method:"POST"})]})})},t}()}}),In=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/stats/index.js":function(){ze(),gn(),Pn(),D=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.initRemoteMetrics=function(t){F=new N(t)},e.prototype.increment=function(e,n,r){t.prototype.increment.call(this,e,n,r),null==F||F.increment(e,null!=r?r:[])},e}(b)}}),En=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/context/index.js":function(){ze(),gn(),In(),R=function(t){function e(e,n){return t.call(this,e,n,new D)||this}return B(e,t),e.system=function(){return new this({type:"track",event:"system"})},e}(x)}}),An=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/priority-queue/index.js":function(){gn()}});function Mn(t,e,n){void 0===n&&(n=0);var r,i="persisted-queue:v1:".concat(t,":lock"),o=T.getItem(i),a=o?JSON.parse(o):null,s=null===a||(r=a,(new Date).getTime()>r);if(s)return T.setItem(i,JSON.stringify(L()+50)),e(),void T.removeItem(i);!s&&n<3?setTimeout(function(){Mn(t,e,n+1)},50):console.error("Unable to retrieve lock")}var Cn,Nn,Fn,Dn=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/priority-queue/persisted.js":function(){ze(),An(),En(),bn(),T={getItem:function(){},setItem:function(){},removeItem:function(){}};try{T=rt()&&window.localStorage?window.localStorage:T}catch(t){console.warn("Unable to access localStorage",t)}L=function(){return(new Date).getTime()},q=function(t){function e(e,r){var i=t.call(this,e,[])||this,o="persisted-queue:v1:".concat(r,":items"),a="persisted-queue:v1:".concat(r,":seen"),s=[],u={};return Mn(r,function(){try{s=lt(o),u=ft(a),dt(o),dt(a),i.queue=K(K([],s,!0),i.queue,!0),i.seen=n(n({},u),i.seen)}catch(t){console.error(t)}}),window.addEventListener("pagehide",function(){if(i.todo>0){var t=K(K([],i.queue,!0),i.future,!0);try{Mn(r,function(){!function(t,e){var r=lt(t),i=K(K([],e,!0),r,!0).reduce(function(t,e){var r;return n(n({},t),((r={})[e.id]=e,r))},{});T.setItem(t,JSON.stringify(Object.values(i)))}(o,t),function(t,e){var r=ft(t);T.setItem(t,JSON.stringify(n(n({},r),e)))}(a,i.seen)})}catch(t){console.error(t)}}}),i}return B(e,t),e}(p)}}),Rn=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/global-analytics-helper.js":function(){Cn="analytics"}}),Tn=Te({"../../../../node_modules/obj-case/index.js":function(t,e){function n(t){return function(e,n,r,i){var a,s=i&&function(t){return"function"==typeof t}(i.normalizer)?i.normalizer:o;n=s(n);for(var u=!1;!u;)c();function c(){for(a in e){var t=s(a);if(0===n.indexOf(t)){var r=n.substr(t.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=e[a];return null==i?void(u=!0):n.length?void(e=i):void(u=!0)}}}a=void 0,u=!0}if(a)return null==e?e:t(e,a,r)}}function r(t,e){return t.hasOwnProperty(e)&&delete t[e],t}function i(t,e,n){return t.hasOwnProperty(e)&&(t[e]=n),t}function o(t){return t.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}e.exports=n(function(t,e){if(t.hasOwnProperty(e))return t[e]}),e.exports.find=e.exports,e.exports.replace=function(t,e,r,o){return n(i).call(this,t,e,r,o),t},e.exports.del=function(t,e,i){return n(r).call(this,t,e,null,i),t}}}),Ln=Te({"../../../../node_modules/@segment/facade/dist/address.js":function(t){var e=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0});var n=e(Tn());function r(t,e){return function(){var r=this.traits(),i=this.properties?this.properties():{};return n.default(r,"address."+t)||n.default(r,t)||(e?n.default(r,"address."+e):null)||(e?n.default(r,e):null)||n.default(i,"address."+t)||n.default(i,t)||(e?n.default(i,"address."+e):null)||(e?n.default(i,e):null)}}t.default=function(t){t.zip=r("postalCode","zip"),t.country=r("country"),t.street=r("street"),t.state=r("state"),t.city=r("city"),t.region=r("region")}}}),qn=Te({"../../../../node_modules/@segment/facade/dist/clone.js":function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.clone=void 0,t.clone=function t(e){if("object"!==(void 0===e?"undefined":_type_of(e)))return e;if("[object Object]"===Object.prototype.toString.call(e)){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=t(e[r]));return n}return Array.isArray(e)?e.map(t):e}}}),Bn=Te({"../../../../node_modules/@segment/facade/dist/is-enabled.js":function(t){Object.defineProperty(t,"__esModule",{value:!0});var e={Salesforce:!0};t.default=function(t){return!e[t]}}}),zn=Te({"../../../../node_modules/@segment/isodate/lib/index.js":function(t){var e=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;t.parse=function(t){var n=[1,5,6,7,11,12],r=e.exec(t),i=0;if(!r)return new Date(t);for(var o,a=0;o=n[a];a++)r[o]=parseInt(r[o],10)||0;r[2]=parseInt(r[2],10)||1,r[3]=parseInt(r[3],10)||1,r[2]--,r[8]=r[8]?(r[8]+"00").substring(0,3):0," "===r[4]?i=(new Date).getTimezoneOffset():"Z"!==r[9]&&r[10]&&(i=60*r[11]+r[12],"+"===r[10]&&(i=0-i));var s=Date.UTC(r[1],r[2],r[3],r[5],r[6]+i,r[7],r[8]);return new Date(s)},t.is=function(t,n){return"string"==typeof t&&((!n||!1!==/^\d{4}-\d{2}-\d{2}/.test(t))&&e.test(t))}}}),Un=Te({"../../../../node_modules/new-date/lib/milliseconds.js":function(t){var e=/\d{13}/;t.is=function(t){return e.test(t)},t.parse=function(t){return t=parseInt(t,10),new Date(t)}}}),Vn=Te({"../../../../node_modules/new-date/lib/seconds.js":function(t){var e=/\d{10}/;t.is=function(t){return e.test(t)},t.parse=function(t){var e=1e3*parseInt(t,10);return new Date(e)}}}),Kn=Te({"../../../../node_modules/new-date/lib/index.js":function(t,e){var n=zn(),r=Un(),i=Vn(),o=Object.prototype.toString;e.exports=function(t){return e=t,"[object Date]"===o.call(e)?t:function(t){return"[object Number]"===o.call(t)}(t)?new Date((a=t)<315576e5?1e3*a:a):n.is(t)?n.parse(t):r.is(t)?r.parse(t):i.is(t)?i.parse(t):new Date(t);var e,a}}}),Hn=Te({"../../../../node_modules/@segment/isodate-traverse/lib/index.js":function(t,e){var n=zn();function r(t,e){return void 0===e&&(e=!0),t&&"object"===(void 0===t?"undefined":_type_of(t))?function(t,e){return Object.keys(t).forEach(function(n){t[n]=r(t[n],e)}),t}(t,e):Array.isArray(t)?function(t,e){return t.forEach(function(n,i){t[i]=r(n,e)}),t}(t,e):n.is(t,e)?n.parse(t):t}e.exports=r}}),Gn=Te({"../../../../node_modules/@segment/facade/dist/facade.js":function(t){var e=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.Facade=void 0;var n=e(Ln()),r=qn(),i=e(Bn()),o=e(Kn()),a=e(Tn()),s=e(Hn());function u(t,e){e=e||{},this.raw=r.clone(t),"clone"in e||(e.clone=!0),e.clone&&(t=r.clone(t)),"traverse"in e||(e.traverse=!0),t.timestamp="timestamp"in t?o.default(t.timestamp):new Date,e.traverse&&s.default(t),this.opts=e,this.obj=t}t.Facade=u;var c=u.prototype;function l(t){return r.clone(t)}c.proxy=function(t){var e=t.split("."),n=this[t=e.shift()]||this.obj[t];return n?("function"==typeof n&&(n=n.call(this)||{}),0===e.length||(n=a.default(n,e.join("."))),this.opts.clone?l(n):n):n},c.field=function(t){var e=this.obj[t];return this.opts.clone?l(e):e},u.proxy=function(t){return function(){return this.proxy(t)}},u.field=function(t){return function(){return this.field(t)}},u.multi=function(t){return function(){var e=this.proxy(t+"s");if(Array.isArray(e))return e;var n=this.proxy(t);return n&&(n=[this.opts.clone?r.clone(n):n]),n||[]}},u.one=function(t){return function(){var e=this.proxy(t);if(e)return e;var n=this.proxy(t+"s");return Array.isArray(n)?n[0]:void 0}},c.json=function(){var t=this.opts.clone?r.clone(this.obj):this.obj;return this.type&&(t.type=this.type()),t},c.rawEvent=function(){return this.raw},c.options=function(t){var e=this.obj.options||this.obj.context||{},n=this.opts.clone?r.clone(e):e;if(!t)return n;if(this.enabled(t)){var i=this.integrations(),o=i[t]||a.default(i,t);return"object"!==(void 0===o?"undefined":_type_of(o))&&(o=a.default(this.options(),t)),"object"===(void 0===o?"undefined":_type_of(o))?o:{}}},c.context=c.options,c.enabled=function(t){var e=this.proxy("options.providers.all");"boolean"!=typeof e&&(e=this.proxy("options.all")),"boolean"!=typeof e&&(e=this.proxy("integrations.all")),"boolean"!=typeof e&&(e=!0);var n=e&&i.default(t),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(t)&&(n=r.providers[t]),r.hasOwnProperty(t)){var o=r[t];n="boolean"!=typeof o||o}return!!n},c.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},c.active=function(){var t=this.proxy("options.active");return null==t&&(t=!0),t},c.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},c.sessionId=c.anonymousId,c.groupId=u.proxy("options.groupId"),c.traits=function(t){var e=this.proxy("options.traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();if(null==i)continue;e[t[r]]=i,delete e[r]}return e},c.library=function(){var t=this.proxy("options.library");return t?"string"==typeof t?{name:t,version:null}:t:{name:"unknown",version:null}},c.device=function(){var t=this.proxy("context.device");"object"===(void 0===t?"undefined":_type_of(t))&&null!==t||(t={});var e=this.library().name;return t.type||(e.indexOf("ios")>-1&&(t.type="ios"),e.indexOf("android")>-1&&(t.type="android")),t},c.userAgent=u.proxy("context.userAgent"),c.timezone=u.proxy("context.timezone"),c.timestamp=u.field("timestamp"),c.channel=u.field("channel"),c.ip=u.proxy("context.ip"),c.userId=u.field("userId"),n.default(c)}}),Jn=Te({"../../../../node_modules/inherits/inherits_browser.js":function(t,e){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}}}),Wn=Te({"../../../../node_modules/inherits/inherits.js":function(t,e){try{if("function"!=typeof(n=De("util")).inherits)throw"";e.exports=n.inherits}catch(t){e.exports=Jn()}var n}}),Yn=Te({"../../../../node_modules/@segment/facade/dist/alias.js":function(t){var e=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.Alias=void 0;var n=e(Wn()),r=Gn();function i(t,e){r.Facade.call(this,t,e)}t.Alias=i,n.default(i,r.Facade),i.prototype.action=function(){return"alias"},i.prototype.type=i.prototype.action,i.prototype.previousId=function(){return this.field("previousId")||this.field("from")},i.prototype.from=i.prototype.previousId,i.prototype.userId=function(){return this.field("userId")||this.field("to")},i.prototype.to=i.prototype.userId}}),Qn=Te({"../../../../node_modules/@segment/facade/dist/is-email.js":function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=/.+\@.+\..+/;t.default=function(t){return e.test(t)}}}),$n=Te({"../../../../node_modules/@segment/facade/dist/group.js":function(t){var e=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.Group=void 0;var n=e(Wn()),r=e(Qn()),i=e(Kn()),o=Gn();function a(t,e){o.Facade.call(this,t,e)}t.Group=a,n.default(a,o.Facade);var s=a.prototype;s.action=function(){return"group"},s.type=s.action,s.groupId=o.Facade.field("groupId"),s.created=function(){var t=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(t)return i.default(t)},s.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.groupId();return r.default(e)?e:void 0},s.traits=function(t){var e=this.properties(),n=this.groupId();for(var r in t=t||{},n&&(e.id=n),t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=null==this[r]?this.proxy("traits."+r):this[r]();if(null==i)continue;e[t[r]]=i,delete e[r]}return e},s.name=o.Facade.proxy("traits.name"),s.industry=o.Facade.proxy("traits.industry"),s.employees=o.Facade.proxy("traits.employees"),s.properties=function(){return this.field("traits")||this.field("properties")||{}}}}),Zn=Te({"../../../../node_modules/@segment/facade/dist/identify.js":function(t){var e=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.Identify=void 0;var n=Gn(),r=e(Tn()),i=e(Wn()),o=e(Qn()),a=e(Kn()),s=function(t){return t.trim()};function u(t,e){n.Facade.call(this,t,e)}t.Identify=u,i.default(u,n.Facade);var c=u.prototype;c.action=function(){return"identify"},c.type=c.action,c.traits=function(t){var e=this.field("traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(e[t[r]]=i,r!==t[r]&&delete e[r])}return e},c.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.userId();return o.default(e)?e:void 0},c.created=function(){var t=this.proxy("traits.created")||this.proxy("traits.createdAt");if(t)return a.default(t)},c.companyCreated=function(){var t=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(t)return a.default(t)},c.companyName=function(){return this.proxy("traits.company.name")},c.name=function(){var t=this.proxy("traits.name");if("string"==typeof t)return s(t);var e=this.firstName(),n=this.lastName();return e&&n?s(e+" "+n):void 0},c.firstName=function(){var t=this.proxy("traits.firstName");if("string"==typeof t)return s(t);var e=this.proxy("traits.name");return"string"==typeof e?s(e).split(" ")[0]:void 0},c.lastName=function(){var t=this.proxy("traits.lastName");if("string"==typeof t)return s(t);var e=this.proxy("traits.name");if("string"==typeof e){var n=s(e).indexOf(" ");if(-1!==n)return s(e.substr(n+1))}},c.uid=function(){return this.userId()||this.username()||this.email()},c.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},c.age=function(){var t=this.birthday(),e=r.default(this.traits(),"age");return null!=e?e:_instanceof(t,Date)?(new Date).getFullYear()-t.getFullYear():void 0},c.avatar=function(){var t=this.traits();return r.default(t,"avatar")||r.default(t,"photoUrl")||r.default(t,"avatarUrl")},c.position=function(){var t=this.traits();return r.default(t,"position")||r.default(t,"jobTitle")},c.username=n.Facade.proxy("traits.username"),c.website=n.Facade.one("traits.website"),c.websites=n.Facade.multi("traits.website"),c.phone=n.Facade.one("traits.phone"),c.phones=n.Facade.multi("traits.phone"),c.address=n.Facade.proxy("traits.address"),c.gender=n.Facade.proxy("traits.gender"),c.birthday=n.Facade.proxy("traits.birthday")}}),Xn=Te({"../../../../node_modules/@segment/facade/dist/track.js":function(t){var e=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.Track=void 0;var n=e(Wn()),r=Gn(),i=Zn(),o=e(Qn()),a=e(Tn());function s(t,e){r.Facade.call(this,t,e)}t.Track=s,n.default(s,r.Facade);var u=s.prototype;u.action=function(){return"track"},u.type=u.action,u.event=r.Facade.field("event"),u.value=r.Facade.proxy("properties.value"),u.category=r.Facade.proxy("properties.category"),u.id=r.Facade.proxy("properties.id"),u.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},u.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},u.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},u.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},u.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},u.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},u.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},u.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},u.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},u.sku=r.Facade.proxy("properties.sku"),u.tax=r.Facade.proxy("properties.tax"),u.name=r.Facade.proxy("properties.name"),u.price=r.Facade.proxy("properties.price"),u.total=r.Facade.proxy("properties.total"),u.repeat=r.Facade.proxy("properties.repeat"),u.coupon=r.Facade.proxy("properties.coupon"),u.shipping=r.Facade.proxy("properties.shipping"),u.discount=r.Facade.proxy("properties.discount"),u.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},u.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},u.description=r.Facade.proxy("properties.description"),u.plan=r.Facade.proxy("properties.plan"),u.subtotal=function(){var t=a.default(this.properties(),"subtotal"),e=this.total()||this.revenue();if(t)return t;if(!e)return 0;if(this.total()){var n=this.tax();n&&(e-=n),(n=this.shipping())&&(e-=n),(n=this.discount())&&(e+=n)}return e},u.products=function(){var t=this.properties(),e=a.default(t,"products");return Array.isArray(e)?e.filter(function(t){return null!==t}):[]},u.quantity=function(){return(this.obj.properties||{}).quantity||1},u.currency=function(){return(this.obj.properties||{}).currency||"USD"},u.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},u.query=r.Facade.proxy("options.query"),u.properties=function(t){var e=this.field("properties")||{};for(var n in t=t||{})if(Object.prototype.hasOwnProperty.call(t,n)){var r=null==this[n]?this.proxy("properties."+n):this[n]();if(null==r)continue;e[t[n]]=r,delete e[n]}return e},u.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},u.email=function(){var t=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(t)return t;var e=this.userId();return o.default(e)?e:void 0},u.revenue=function(){var t=this.proxy("properties.revenue"),e=this.event();return!t&&e&&e.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(t=this.proxy("properties.total")),function(t){if(!t)return;if("number"==typeof t)return t;if("string"!=typeof t)return;if(t=t.replace(/\$/g,""),t=parseFloat(t),!isNaN(t))return t}(t)},u.cents=function(){var t=this.revenue();return"number"!=typeof t?this.value()||0:100*t},u.identify=function(){var t=this.json();return t.traits=this.traits(),new i.Identify(t,this.opts)}}}),tr=Te({"../../../../node_modules/@segment/facade/dist/page.js":function(t){var e=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.Page=void 0;var n=e(Wn()),r=Gn(),i=Xn(),o=e(Qn());function a(t,e){r.Facade.call(this,t,e)}t.Page=a,n.default(a,r.Facade);var s=a.prototype;s.action=function(){return"page"},s.type=s.action,s.category=r.Facade.field("category"),s.name=r.Facade.field("name"),s.title=r.Facade.proxy("properties.title"),s.path=r.Facade.proxy("properties.path"),s.url=r.Facade.proxy("properties.url"),s.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},s.properties=function(t){var e=this.field("properties")||{},n=this.category(),r=this.name();for(var i in t=t||{},n&&(e.category=n),r&&(e.name=r),t)if(Object.prototype.hasOwnProperty.call(t,i)){var o=null==this[i]?this.proxy("properties."+i):this[i]();if(null==o)continue;e[t[i]]=o,i!==t[i]&&delete e[i]}return e},s.email=function(){var t=this.proxy("context.traits.email")||this.proxy("properties.email");if(t)return t;var e=this.userId();return o.default(e)?e:void 0},s.fullName=function(){var t=this.category(),e=this.name();return e&&t?t+" "+e:e},s.event=function(t){return t?"Viewed "+t+" Page":"Loaded a Page"},s.track=function(t){var e=this.json();return e.event=this.event(t),e.timestamp=this.timestamp(),e.properties=this.properties(),new i.Track(e,this.opts)}}}),er=Te({"../../../../node_modules/@segment/facade/dist/screen.js":function(t){var e=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.Screen=void 0;var n=e(Wn()),r=tr(),i=Xn();function o(t,e){r.Page.call(this,t,e)}t.Screen=o,n.default(o,r.Page),o.prototype.action=function(){return"screen"},o.prototype.type=o.prototype.action,o.prototype.event=function(t){return t?"Viewed "+t+" Screen":"Loaded a Screen"},o.prototype.track=function(t){var e=this.json();return e.event=this.event(t),e.timestamp=this.timestamp(),e.properties=this.properties(),new i.Track(e,this.opts)}}}),nr=Te({"../../../../node_modules/@segment/facade/dist/delete.js":function(t){var e=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.Delete=void 0;var n=e(Wn()),r=Gn();function i(t,e){r.Facade.call(this,t,e)}t.Delete=i,n.default(i,r.Facade),i.prototype.type=function(){return"delete"}}}),rr=Te({"../../../../node_modules/@segment/facade/dist/index.js":function(t){var e=t&&t.__assign||function(){return e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},e.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Delete=t.Screen=t.Page=t.Track=t.Identify=t.Group=t.Alias=t.Facade=void 0;var n=Gn();Object.defineProperty(t,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=Yn();Object.defineProperty(t,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=$n();Object.defineProperty(t,"Group",{enumerable:!0,get:function(){return i.Group}});var o=Zn();Object.defineProperty(t,"Identify",{enumerable:!0,get:function(){return o.Identify}});var a=Xn();Object.defineProperty(t,"Track",{enumerable:!0,get:function(){return a.Track}});var s=tr();Object.defineProperty(t,"Page",{enumerable:!0,get:function(){return s.Page}});var u=er();Object.defineProperty(t,"Screen",{enumerable:!0,get:function(){return u.Screen}});var c=nr();Object.defineProperty(t,"Delete",{enumerable:!0,get:function(){return c.Delete}}),t.default=e(e({},n.Facade),{Alias:r.Alias,Group:i.Group,Identify:o.Identify,Track:a.Track,Page:s.Page,Screen:u.Screen,Delete:c.Delete})}}),ir=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/to-facade.js":function(){Nn=Be(rr())}}),or=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/p-while.js":function(){ze(),Fn=function(t,e){return U(void 0,void 0,void 0,function(){var n;return V(this,function(r){return[2,(n=function(r){return U(void 0,void 0,void 0,function(){var i;return V(this,function(o){switch(o.label){case 0:return t(r)?(i=n,[4,e()]):[3,2];case 1:return[2,i.apply(void 0,[o.sent()])];case 2:return[2]}})})})(void 0)]})})}}}),ar=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/callback/index.js":function(){gn()}}),sr={};Le(sr,{form:function(){return yt},link:function(){return vt}});var ur=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/auto-track.js":function(){ar()}}),cr={};Le(cr,{applyDestinationMiddleware:function(){return mt},sourceMiddlewarePlugin:function(){return gt}});var lr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/middleware/index.js":function(){ze(),En(),ir()}}),fr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/query-string/pickPrefix.js":function(){}}),dr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/query-string/gracefulDecodeURIComponent.js":function(){}}),pr={};Le(pr,{queryString:function(){return wt}});var hr,vr,yr,mr,gr,br,_r,wr,xr,jr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/query-string/index.js":function(){fr(),dr(),gn()}}),kr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/parse-cdn.js":function(){Rn(),hr=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,vr=function(){var t;return Array.prototype.slice.call(document.querySelectorAll("script")).forEach(function(e){var n,r=null!==(n=e.getAttribute("src"))&&void 0!==n?n:"",i=hr.exec(r);i&&i[1]&&(t=i[1])}),t},mr=function(){var t;return null!=yr?yr:null===(t=pt())||void 0===t?void 0:t._cdn},gr=function(t){var e=pt();e&&(e._cdn=t),yr=t},br=function(){var t=mr();if(t)return t;var e=vr();return e||"https://cdn.segment.com"},_r=function(){var t=br();return"".concat(t,"/next-integrations")}}}),Sr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/merged-options.js":function(){ze()}}),Or=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/load-script.js":function(){}}),Pr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/stats/metric-helpers.js":function(){}}),Ir=Te({"../../../../node_modules/@segment/analytics-next/dist/pkg/vendor/tsub/tsub.js":function(t,e){!function(n,r){if("object"==(void 0===t?"undefined":_type_of(t))&&"object"==(void 0===e?"undefined":_type_of(e)))e.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var i=r();for(var o in i)("object"==(void 0===t?"undefined":_type_of(t))?t:n)[o]=i[o]}}(self,function(){return function(){var t={2870:function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Store=e.matches=e.transform=void 0;var i=n(4303);Object.defineProperty(e,"transform",{enumerable:!0,get:function(){return r(i).default}});var o=n(2370);Object.defineProperty(e,"matches",{enumerable:!0,get:function(){return r(o).default}});var a=n(1444);Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return r(a).default}})},2370:function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(7843));function o(t,e){if(!Array.isArray(t))return!0===a(t,e);var n,r,i,l,f,d,p,h=t[0];switch(h){case"!":return!o(t[1],e);case"or":for(var v=1;v<t.length;v++)if(o(t[v],e))return!0;return!1;case"and":for(v=1;v<t.length;v++)if(!o(t[v],e))return!1;return!0;case"=":case"!=":return function(t,e,n,r){switch(s(t)&&(t=o(t,r)),s(e)&&(e=o(e,r)),"object"==(void 0===t?"undefined":_type_of(t))&&"object"==(void 0===e?"undefined":_type_of(e))&&(t=JSON.stringify(t),e=JSON.stringify(e)),n){case"=":return t===e;case"!=":return t!==e;default:throw new Error("Invalid operator in compareItems: ".concat(n))}}(a(t[1],e),a(t[2],e),h,e);case"<=":case"<":case">":case">=":return function(t,e,n,r){if(s(t)&&(t=o(t,r)),s(e)&&(e=o(e,r)),"number"!=typeof t||"number"!=typeof e)return!1;switch(n){case"<=":return t<=e;case">=":return t>=e;case"<":return t<e;case">":return t>e;default:throw new Error("Invalid operator in compareNumbers: ".concat(n))}}(a(t[1],e),a(t[2],e),h,e);case"in":return f=a(t[1],e),d=a(t[2],e),p=e,void 0!==d.find(function(t){return a(t,p)===f});case"contains":return i=a(t[1],e),l=a(t[2],e),"string"==typeof i&&"string"==typeof l&&-1!==i.indexOf(l);case"match":return n=a(t[1],e),r=a(t[2],e),"string"==typeof n&&"string"==typeof r&&function(t,e){var n,r;t:for(;t.length>0;){var i,o;if(i=(n=u(t)).star,o=n.chunk,t=n.pattern,i&&""===o)return!0;var a=c(o,e),s=a.t,l=a.ok,f=a.err;if(f)return!1;if(!l||!(0===s.length||t.length>0)){if(i)for(var d=0;d<e.length;d++){if(s=(r=c(o,e.slice(d+1))).t,l=r.ok,f=r.err,l){if(0===t.length&&s.length>0)continue;e=s;continue t}if(f)return!1}return!1}e=s}return 0===e.length}(r,n);case"lowercase":var y=a(t[1],e);return"string"!=typeof y?null:y.toLowerCase();case"typeof":return _type_of(a(t[1],e));case"length":return function(t){return null===t?0:Array.isArray(t)||"string"==typeof t?t.length:NaN}(a(t[1],e));default:throw new Error("FQL IR could not evaluate for token: ".concat(h))}}function a(t,e){return Array.isArray(t)?t:"object"==(void 0===t?"undefined":_type_of(t))?t.value:(0,i.default)(e,t)}function s(t){return!!Array.isArray(t)&&(("lowercase"===t[0]||"length"===t[0]||"typeof"===t[0])&&2===t.length||("contains"===t[0]||"match"===t[0])&&3===t.length)}function u(t){for(var e={star:!1,chunk:"",pattern:""};t.length>0&&"*"===t[0];)t=t.slice(1),e.star=!0;var n,r=!1;t:for(n=0;n<t.length;n++)switch(t[n]){case"\\":n+1<t.length&&n++;break;case"[":r=!0;break;case"]":r=!1;break;case"*":if(!r)break t}return e.chunk=t.slice(0,n),e.pattern=t.slice(n),e}function c(t,e){for(var n,r,i={t:"",ok:!1,err:!1};t.length>0;){if(0===e.length)return i;switch(t[0]){case"[":var o=e[0];e=e.slice(1);var a=!0;(t=t.slice(1)).length>0&&"^"===t[0]&&(a=!1,t=t.slice(1));for(var s=!1,u=0;;){if(t.length>0&&"]"===t[0]&&u>0){t=t.slice(1);break}var c,f="";if(c=(n=l(t)).char,t=n.newChunk,n.err)return i;if(f=c,"-"===t[0]&&(f=(r=l(t.slice(1))).char,t=r.newChunk,r.err))return i;c<=o&&o<=f&&(s=!0),u++}if(s!==a)return i;break;case"?":e=e.slice(1),t=t.slice(1);break;case"\\":if(0===(t=t.slice(1)).length)return i.err=!0,i;default:if(t[0]!==e[0])return i;e=e.slice(1),t=t.slice(1)}}return i.t=e,i.ok=!0,i.err=!1,i}function l(t){var e={char:"",newChunk:"",err:!1};return 0===t.length||"-"===t[0]||"]"===t[0]||"\\"===t[0]&&0===(t=t.slice(1)).length?(e.err=!0,e):(e.char=t[0],e.newChunk=t.slice(1),0===e.newChunk.length&&(e.err=!0),e)}e.default=function(t,e){if(!e)throw new Error("No matcher supplied!");switch(e.type){case"all":return!0;case"fql":return function(t,e){if(!t)return!1;try{t=JSON.parse(t)}catch(e){throw new Error('Failed to JSON.parse FQL intermediate representation "'.concat(t,'": ').concat(e))}var n=o(t,e);return"boolean"==typeof n&&n}(e.ir,t);default:throw new Error("Matcher of type ".concat(e.type," unsupported."))}}},1444:function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.rules=[],this.rules=t||[]}return t.prototype.getRulesByDestinationName=function(t){for(var e=[],n=0,r=this.rules;n<r.length;n++){var i=r[n];i.destinationName!==t&&void 0!==i.destinationName||e.push(i)}return e},t}();e.default=n},4303:function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(374)),o=r(n(7843)),a=r(n(5500)),s=n(9014),u=n(4966);function c(t,e){f(t,e.drop,function(t,e){e.forEach(function(e){return delete t[e]})})}function l(t,e){f(t,e.allow,function(t,e){Object.keys(t).forEach(function(n){e.includes(n)||delete t[n]})})}function f(t,e,n){Object.entries(e).forEach(function(e){var r=e[0],i=e[1],a=function(t){"object"==(void 0===t?"undefined":_type_of(t))&&null!==t&&n(t,i)},s=""===r?t:(0,o.default)(t,r);Array.isArray(s)?s.forEach(a):a(s)})}function d(t,e){var n=JSON.parse(JSON.stringify(t));for(var r in e.map)if(e.map.hasOwnProperty(r)){var i=e.map[r],a=r.split("."),c=void 0;if(a.length>1?(a.pop(),c=(0,o.default)(n,a.join("."))):c=t,"object"==(void 0===c?"undefined":_type_of(c))){if(i.copy){var l=(0,o.default)(n,i.copy);void 0!==l&&(0,s.dset)(t,r,l)}else if(i.move){var f=(0,o.default)(n,i.move);void 0!==f&&(0,s.dset)(t,r,f),(0,u.unset)(t,i.move)}else i.hasOwnProperty("set")&&(0,s.dset)(t,r,i.set);if(i.to_string){var d=(0,o.default)(t,r);if("string"==typeof d||"object"==(void 0===d?"undefined":_type_of(d))&&null!==d)continue;void 0!==d?(0,s.dset)(t,r,JSON.stringify(d)):(0,s.dset)(t,r,"undefined")}}}}function p(t,e){return!(e.sample.percent<=0)&&(e.sample.percent>=1||(e.sample.path?function(t,e){var n=(0,o.default)(t,e.sample.path),r=(0,i.default)(JSON.stringify(n)),s=-64,u=[];h(r.slice(0,8),u);for(var c=0,l=0;l<64&&1!==u[l];l++)c++;if(0!==c){var f=[];h(r.slice(9,16),f),s-=c,u.splice(0,c),f.splice(64-c),u=u.concat(f)}return u[63]=0===u[63]?1:0,(0,a.default)(parseInt(u.join(""),2),s)<e.sample.percent}(t,e):(n=e.sample.percent,Math.random()<=n)));var n}function h(t,e){for(var n=0;n<8;n++)for(var r=t[n],i=128;i>=1;i/=2)r-i>=0?(r-=i,e.push(1)):e.push(0)}e.default=function(t,e){for(var n=t,r=0,i=e;r<i.length;r++){var o=i[r];switch(o.type){case"drop":return null;case"drop_properties":c(n,o.config);break;case"allow_properties":l(n,o.config);break;case"sample_event":if(p(n,o.config))break;return null;case"map_properties":d(n,o.config);break;case"hash_properties":break;default:throw new Error('Transformer of type "'.concat(o.type,'" is unsupported.'))}}return n}},4966:function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.unset=void 0;var i=r(n(7843));e.unset=function(t,e){if((0,i.default)(t,e)){for(var n=e.split("."),r=n.pop();n.length&&"\\"===n[n.length-1].slice(-1);)r=n.pop().slice(0,-1)+"."+r;for(;n.length;)t=t[e=n.shift()];return delete t[r]}return!0}},9014:function(t,e){e.dset=function(t,e,n){e.split&&(e=e.split("."));for(var r,i,o=0,a=e.length,s=t;o<a&&"__proto__"!==(i=e[o++])&&"constructor"!==i&&"prototype"!==i;)s=s[i]=o===a?n:_type_of(r=s[i])==(void 0===e?"undefined":_type_of(e))?r:0*e[o]!=0||~(""+e[o]).indexOf(".")?{}:[]}},3304:function(t){var e="function"==typeof Float64Array?Float64Array:void 0;t.exports=e},7382:function(t,e,n){var r,i=n(5569),o=n(3304),a=n(8482);r=i()?o:a,t.exports=r},8482:function(t){t.exports=function(){throw new Error("not implemented")}},6322:function(t,e,n){var r,i=n(2508),o=n(5679),a=n(882);r=i()?o:a,t.exports=r},882:function(t){t.exports=function(){throw new Error("not implemented")}},5679:function(t){var e="function"==typeof Uint16Array?Uint16Array:void 0;t.exports=e},4773:function(t,e,n){var r,i=n(9773),o=n(3004),a=n(3078);r=i()?o:a,t.exports=r},3078:function(t){t.exports=function(){throw new Error("not implemented")}},3004:function(t){var e="function"==typeof Uint32Array?Uint32Array:void 0;t.exports=e},7980:function(t,e,n){var r,i=n(8114),o=n(6737),a=n(3357);r=i()?o:a,t.exports=r},3357:function(t){t.exports=function(){throw new Error("not implemented")}},6737:function(t){var e="function"==typeof Uint8Array?Uint8Array:void 0;t.exports=e},2684:function(t){var e="function"==typeof Float64Array?Float64Array:null;t.exports=e},5569:function(t,e,n){var r=n(3876);t.exports=r},3876:function(t,e,n){var r=n(1448),i=n(2684);t.exports=function(){var t,e;if("function"!=typeof i)return!1;try{e=new i([1,3.14,-3.14,NaN]),t=r(e)&&1===e[0]&&3.14===e[1]&&-3.14===e[2]&&e[3]!=e[3]}catch(e){t=!1}return t}},9048:function(t,e,n){var r=n(3763);t.exports=r},3763:function(t){var e=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&e.call(t,n)}},7009:function(t,e,n){var r=n(6784);t.exports=r},6784:function(t){t.exports=function(){return"function"==typeof Symbol&&"symbol"==_type_of(Symbol("foo"))}},3123:function(t,e,n){var r=n(8481);t.exports=r},8481:function(t,e,n){var r=n(7009)();t.exports=function(){return r&&"symbol"==_type_of(Symbol.toStringTag)}},2508:function(t,e,n){var r=n(3403);t.exports=r},3403:function(t,e,n){var r=n(768),i=n(9668),o=n(187);t.exports=function(){var t,e;if("function"!=typeof o)return!1;try{e=new o(e=[1,3.14,-3.14,i+1,i+2]),t=r(e)&&1===e[0]&&3===e[1]&&e[2]===i-2&&0===e[3]&&1===e[4]}catch(e){t=!1}return t}},187:function(t){var e="function"==typeof Uint16Array?Uint16Array:null;t.exports=e},9773:function(t,e,n){var r=n(2822);t.exports=r},2822:function(t,e,n){var r=n(2744),i=n(3899),o=n(746);t.exports=function(){var t,e;if("function"!=typeof o)return!1;try{e=new o(e=[1,3.14,-3.14,i+1,i+2]),t=r(e)&&1===e[0]&&3===e[1]&&e[2]===i-2&&0===e[3]&&1===e[4]}catch(e){t=!1}return t}},746:function(t){var e="function"==typeof Uint32Array?Uint32Array:null;t.exports=e},8114:function(t,e,n){var r=n(8066);t.exports=r},8066:function(t,e,n){var r=n(8279),i=n(3443),o=n(2731);t.exports=function(){var t,e;if("function"!=typeof o)return!1;try{e=new o(e=[1,3.14,-3.14,i+1,i+2]),t=r(e)&&1===e[0]&&3===e[1]&&e[2]===i-2&&0===e[3]&&1===e[4]}catch(e){t=!1}return t}},2731:function(t){var e="function"==typeof Uint8Array?Uint8Array:null;t.exports=e},1448:function(t,e,n){var r=n(1453);t.exports=r},1453:function(t,e,n){var r=n(6208),i="function"==typeof Float64Array;t.exports=function(t){return i&&_instanceof(t,Float64Array)||"[object Float64Array]"===r(t)}},9331:function(t,e,n){var r=n(7980),i={uint16:n(6322),uint8:r};t.exports=i},5902:function(t,e,n){var r=n(4106);t.exports=r},4106:function(t,e,n){var r,i,o=n(9331);(i=new o.uint16(1))[0]=4660,r=52===new o.uint8(i.buffer)[0],t.exports=r},768:function(t,e,n){var r=n(3823);t.exports=r},3823:function(t,e,n){var r=n(6208),i="function"==typeof Uint16Array;t.exports=function(t){return i&&_instanceof(t,Uint16Array)||"[object Uint16Array]"===r(t)}},2744:function(t,e,n){var r=n(2326);t.exports=r},2326:function(t,e,n){var r=n(6208),i="function"==typeof Uint32Array;t.exports=function(t){return i&&_instanceof(t,Uint32Array)||"[object Uint32Array]"===r(t)}},8279:function(t,e,n){var r=n(208);t.exports=r},208:function(t,e,n){var r=n(6208),i="function"==typeof Uint8Array;t.exports=function(t){return i&&_instanceof(t,Uint8Array)||"[object Uint8Array]"===r(t)}},6315:function(t){t.exports=1023},1686:function(t){t.exports=2147483647},3105:function(t){t.exports=2146435072},3449:function(t){t.exports=2147483648},6988:function(t){t.exports=-1023},9777:function(t){t.exports=1023},3690:function(t){t.exports=-1074},2918:function(t,e,n){var r=n(4772).NEGATIVE_INFINITY;t.exports=r},4165:function(t){var e=Number.POSITIVE_INFINITY;t.exports=e},6488:function(t){t.exports=22250738585072014e-324},9668:function(t){t.exports=65535},3899:function(t){t.exports=4294967295},3443:function(t){t.exports=255},7011:function(t,e,n){var r=n(812);t.exports=r},812:function(t,e,n){var r=n(4165),i=n(2918);t.exports=function(t){return t===r||t===i}},1883:function(t,e,n){var r=n(1797);t.exports=r},1797:function(t){t.exports=function(t){return t!=t}},513:function(t,e,n){var r=n(5760);t.exports=r},5760:function(t){t.exports=function(t){return Math.abs(t)}},5848:function(t,e,n){var r=n(677);t.exports=r},677:function(t,e,n){var r=n(3449),i=n(1686),o=n(7838),a=n(1921),s=n(2490),u=[0,0];t.exports=function(t,e){var n,c;return o.assign(t,u,1,0),n=u[0],n&=i,c=a(e),s(n|=c&=r,u[1])}},5500:function(t,e,n){var r=n(8397);t.exports=r},8397:function(t,e,n){var r=n(4165),i=n(2918),o=n(6315),a=n(9777),s=n(6988),u=n(3690),c=n(1883),l=n(7011),f=n(5848),d=n(4948),p=n(8478),h=n(7838),v=n(2490),y=[0,0],m=[0,0];t.exports=function(t,e){var n,g;return 0===t||c(t)||l(t)?t:(d(y,t),e+=y[1],(e+=p(t=y[0]))<u?f(0,t):e>a?t<0?i:r:(e<=s?(e+=52,g=2220446049250313e-31):g=1,h(m,t),n=m[0],n&=2148532223,g*v(n|=e+o<<20,m[1])))}},4772:function(t,e,n){var r=n(7548);t.exports=r},7548:function(t){t.exports=Number},8478:function(t,e,n){var r=n(4500);t.exports=r},4500:function(t,e,n){var r=n(1921),i=n(3105),o=n(6315);t.exports=function(t){var e=r(t);return(e=(e&i)>>>20)-o|0}},2490:function(t,e,n){var r=n(9639);t.exports=r},4445:function(t,e,n){var r,i,o;!0===n(5902)?(i=1,o=0):(i=0,o=1),r={HIGH:i,LOW:o},t.exports=r},9639:function(t,e,n){var r=n(4773),i=n(7382),o=n(4445),a=new i(1),s=new r(a.buffer),u=o.HIGH,c=o.LOW;t.exports=function(t,e){return s[u]=t,s[c]=e,a[0]}},5646:function(t,e,n){var r;r=!0===n(5902)?1:0,t.exports=r},1921:function(t,e,n){var r=n(6285);t.exports=r},6285:function(t,e,n){var r=n(4773),i=n(7382),o=n(5646),a=new i(1),s=new r(a.buffer);t.exports=function(t){return a[0]=t,s[o]}},9024:function(t,e,n){var r=n(6488),i=n(7011),o=n(1883),a=n(513);t.exports=function(t,e,n,s){return o(t)||i(t)?(e[s]=t,e[s+n]=0,e):0!==t&&a(t)<r?(e[s]=4503599627370496*t,e[s+n]=-52,e):(e[s]=t,e[s+n]=0,e)}},4948:function(t,e,n){var r=n(7576),i=n(9422);r(i,"assign",n(9024)),t.exports=i},9422:function(t,e,n){var r=n(9024);t.exports=function(t){return r(t,[0,0],1,0)}},5239:function(t,e,n){var r=n(4773),i=n(7382),o=n(5782),a=new i(1),s=new r(a.buffer),u=o.HIGH,c=o.LOW;t.exports=function(t,e,n,r){return a[0]=t,e[r]=s[u],e[r+n]=s[c],e}},7838:function(t,e,n){var r=n(7576),i=n(4010);r(i,"assign",n(5239)),t.exports=i},5782:function(t,e,n){var r,i,o;!0===n(5902)?(i=1,o=0):(i=0,o=1),r={HIGH:i,LOW:o},t.exports=r},4010:function(t,e,n){var r=n(5239);t.exports=function(t){return r(t,[0,0],1,0)}},7576:function(t,e,n){var r=n(7063);t.exports=r},7063:function(t,e,n){var r=n(6691);t.exports=function(t,e,n){r(t,e,{configurable:!1,enumerable:!1,writable:!1,value:n})}},2073:function(t){var e=Object.defineProperty;t.exports=e},1680:function(t){var e="function"==typeof Object.defineProperty?Object.defineProperty:null;t.exports=e},1471:function(t,e,n){var r=n(1680);t.exports=function(){try{return r({},"x",{}),!0}catch(t){return!1}}},6691:function(t,e,n){var r,i=n(1471),o=n(2073),a=n(1309);r=i()?o:a,t.exports=r},1309:function(t){var e=Object.prototype,n=e.toString,r=e.__defineGetter__,i=e.__defineSetter__,o=e.__lookupGetter__,a=e.__lookupSetter__;t.exports=function(t,s,u){var c,l,f,d;if("object"!=(void 0===t?"undefined":_type_of(t))||null===t||"[object Array]"===n.call(t))throw new TypeError("invalid argument. First argument must be an object. Value: `"+t+"`.");if("object"!=(void 0===u?"undefined":_type_of(u))||null===u||"[object Array]"===n.call(u))throw new TypeError("invalid argument. Property descriptor must be an object. Value: `"+u+"`.");if((l="value"in u)&&(o.call(t,s)||a.call(t,s)?(c=t.__proto__,t.__proto__=e,delete t[s],t[s]=u.value,t.__proto__=c):t[s]=u.value),f="get"in u,d="set"in u,l&&(f||d))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return f&&r&&r.call(t,s,u.get),d&&i&&i.call(t,s,u.set),t}},6208:function(t,e,n){var r,i=n(3123),o=n(7407),a=n(4210);r=i()?a:o,t.exports=r},7407:function(t,e,n){var r=n(173);t.exports=function(t){return r.call(t)}},4210:function(t,e,n){var r=n(9048),i=n(1403),o=n(173);t.exports=function(t){var e,n,a;if(null==t)return o.call(t);n=t[i],e=r(t,i);try{t[i]=void 0}catch(e){return o.call(t)}return a=o.call(t),e?t[i]=n:delete t[i],a}},173:function(t){var e=Object.prototype.toString;t.exports=e},1403:function(t){var e="function"==typeof Symbol?Symbol.toStringTag:"";t.exports=e},7843:function(t){t.exports=function(t,e,n,r,i){for(e=e.split?e.split("."):e,r=0;r<e.length;r++)t=t?t[e[r]]:i;return t===i?n:t}},374:function(t,e,n){n.r(e),n.d(e,{default:function(){return o}});for(var r=[],i=0;i<64;)r[i]=0|4294967296*Math.sin(++i%Math.PI);function o(t){var e,n,o,a=[e=1732584193,n=4023233417,~e,~n],s=[],u=unescape(encodeURI(t))+"",c=u.length;for(t=--c/4+2|15,s[--t]=8*c;~c;)s[c>>2]|=u.charCodeAt(c)<<8*c--;for(i=u=0;i<t;i+=16){for(c=a;u<64;c=[o=c[3],e+((o=c[0]+[e&n|~e&o,o&e|~o&n,e^n^o,n^(e|~o)][c=u>>4]+r[u]+~~s[i|15&[u,5*u+1,3*u+5,7*u][c]])<<(c=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*c+u++%4])|o>>>-c),e,n])e=0|c[1],n=c[2];for(u=4;u;)a[--u]+=c[u]}for(t="";u<32;)t+=(a[u>>3]>>4*(1^u++)&15).toString(16);return t}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}return n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(2870)}()})}}),Er={};Le(Er,{tsubMiddleware:function(){return xr}});var Ar,Mr,Cr,Nr,Fr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/routing-middleware/index.js":function(){wr=Be(Ir()),xr=function(t){return function(e){var n=e.payload,r=e.integration,i=e.next;new wr.Store(t).getRulesByDestinationName(r).forEach(function(t){for(var e=t.matchers,r=t.transformers,o=0;o<e.length;o++)if(wr.matches(n.obj,e[o])&&(n.obj=wr.transform(n.obj,r[o]),null===n.obj))return i(null)}),i(n)}}}}),Dr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/is-plan-event-enabled.js":function(){}}),Rr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/loader.js":function(){ze(),kr(),Or()}}),Tr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/utils.js":function(){Ar=function(t,e){var n,r=e.type,i=e.bundlingStatus,o=e.versionSettings,a="unbundled"!==i&&("browser"===r||(null===(n=null==o?void 0:o.componentTypes)||void 0===n?void 0:n.includes("browser")));return!t.startsWith("Segment")&&"Iterable"!==t&&a},Mr=function(t,e){var n=!1===e.All&&void 0===e[t];return!1===e[t]||n}}}),Lr={};Le(Lr,{LegacyDestination:function(){return Nr},ajsDestinations:function(){return Mt}});var qr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/index.js":function(){ze(),Cr=Be(rr()),_n(),En(),bn(),gn(),Dr(),Sr(),or(),An(),Dn(),lr(),Rr(),gn(),Tr(),Pr(),nn(),Nr=function(){function t(t,e,r,i,o,a){void 0===i&&(i={});var s=this;this.options={},this.type="destination",this.middleware=[],this.initializePromise=l(),this.flushing=!1,this.name=t,this.version=e,this.settings=n({},i),this.disableAutoISOConversion=o.disableAutoISOConversion||!1,this.integrationSource=a,this.settings.type&&"browser"===this.settings.type&&delete this.settings.type,this.initializePromise.promise.then(function(t){return s._initialized=t},function(){}),this.options=o,this.buffer=o.disableClientPersistence?new p(4,[]):new q(4,"".concat(r,":dest-").concat(t)),this.scheduleFlush()}return t.prototype.isLoaded=function(){return!!this._ready},t.prototype.ready=function(){var t=this;return this.initializePromise.promise.then(function(){var e;return null!==(e=t.onReady)&&void 0!==e?e:Promise.resolve()})},t.prototype.load=function(t,e){var n;return U(this,void 0,void 0,function(){var r,i,o,a=this;return V(this,function(s){switch(s.label){case 0:if(this._ready||void 0!==this.onReady)return[2];s.label=1;case 1:return s.trys.push([1,5,,6]),null===(n=this.integrationSource)||void 0===n?[3,2]:(i=n,[3,4]);case 2:return[4,Et(t,this.name,this.version,this.options.obfuscate)];case 3:i=s.sent(),s.label=4;case 4:return r=i,this.integration=function(t,e,n){var r;"Integration"in t?(t({user:function(){return n.user()},addIntegration:function(){}}),r=t.Integration):r=t;var i=new r(e);return i.analytics=n,i}(r,this.settings,e),[3,6];case 5:throw o=s.sent(),St(t,{integrationName:this.name,methodName:"load",type:"classic",didError:!0}),o;case 6:this.onReady=new Promise(function(t){a.integration.once("ready",function(){a._ready=!0,t(!0)})}),this.integration.on("initialize",function(){a.initializePromise.resolve(!0)});try{St(t,{integrationName:this.name,methodName:"initialize",type:"classic"}),this.integration.initialize()}catch(e){throw St(t,{integrationName:this.name,methodName:"initialize",type:"classic",didError:!0}),this.initializePromise.resolve(!1),e}return[2]}})})},t.prototype.unload=function(t,e){return function(t,e,n){return U(this,void 0,void 0,function(){var r,i,o;return V(this,function(a){return r=_r(),i=Pt(t),o=It(t,n),[2,(s="".concat(r,"/integrations/").concat(null!=o?o:i,"/").concat(e,"/").concat(null!=o?o:i,".dynamic.js.gz"),u=jt(s),void 0!==u&&u.remove(),Promise.resolve())];var s,u})})}(this.name,this.version,this.options.obfuscate)},t.prototype.addMiddleware=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.middleware=(t=this.middleware).concat.apply(t,e)},t.prototype.shouldBuffer=function(t){return"page"!==t.event.type&&(at()||!0!==this._ready||!0!==this._initialized)},t.prototype.send=function(t,e,r){var i,o;return U(this,void 0,void 0,function(){var a,s,u,c,l,f;return V(this,function(d){switch(d.label){case 0:return this.shouldBuffer(t)?(this.buffer.push(t),this.scheduleFlush(),[2,t]):(a=null===(o=null===(i=this.options)||void 0===i?void 0:i.plan)||void 0===o?void 0:o.track,s=t.event.event,a&&s&&"Segment.io"!==this.name&&(u=a[s],Ot(a,u)?t.updateEvent("integrations",n(n({},t.event.integrations),null==u?void 0:u.integrations)):(t.updateEvent("integrations",n(n({},t.event.integrations),{All:!1,"Segment.io":!0})),t.cancel(new w({retry:!1,reason:"Event ".concat(s," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"}))),(null==u?void 0:u.enabled)&&!1===(null==u?void 0:u.integrations[this.name])&&t.cancel(new w({retry:!1,reason:"Event ".concat(s," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"}))),[4,mt(this.name,t.event,this.middleware)]);case 1:if(null===(c=d.sent()))return[2,t];l=new e(c,{traverse:!this.disableAutoISOConversion}),St(t,{integrationName:this.name,methodName:r,type:"classic"}),d.label=2;case 2:return d.trys.push([2,5,,6]),this.integration?[4,this.integration.invoke.call(this.integration,r,l)]:[3,4];case 3:d.sent(),d.label=4;case 4:return[3,6];case 5:throw f=d.sent(),St(t,{integrationName:this.name,methodName:r,type:"classic",didError:!0}),f;case 6:return[2,t]}})})},t.prototype.track=function(t){return U(this,void 0,void 0,function(){return V(this,function(e){return[2,this.send(t,Cr.Track,"track")]})})},t.prototype.page=function(t){var e;return U(this,void 0,void 0,function(){return V(this,function(n){switch(n.label){case 0:return(null===(e=this.integration)||void 0===e?void 0:e._assumesPageview)&&!this._initialized&&this.integration.initialize(),[4,this.initializePromise.promise];case 1:return n.sent(),[2,this.send(t,Cr.Page,"page")]}})})},t.prototype.identify=function(t){return U(this,void 0,void 0,function(){return V(this,function(e){return[2,this.send(t,Cr.Identify,"identify")]})})},t.prototype.alias=function(t){return U(this,void 0,void 0,function(){return V(this,function(e){return[2,this.send(t,Cr.Alias,"alias")]})})},t.prototype.group=function(t){return U(this,void 0,void 0,function(){return V(this,function(e){return[2,this.send(t,Cr.Group,"group")]})})},t.prototype.scheduleFlush=function(){var t=this;this.flushing||setTimeout(function(){return U(t,void 0,void 0,function(){var t;return V(this,function(e){switch(e.label){case 0:return at()||!0!==this._ready||!0!==this._initialized?(this.scheduleFlush(),[2]):(this.flushing=!0,t=this,[4,At(this,this.buffer)]);case 1:return t.buffer=e.sent(),this.flushing=!1,this.buffer.todo>0&&this.scheduleFlush(),[2]}})})},5e3*Math.random())},t}()}}),Br=Te({"../../../../node_modules/@segment/analytics.js-video-plugins/dist/index.umd.js":function(t,e){var n,r;n=window,r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==(void 0===t?"undefined":_type_of(t))&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e,n){n.r(e);var r="function"==typeof fetch?fetch.bind():function(t,e){return e=e||{},new Promise(function(n,r){var i=new XMLHttpRequest;for(var o in i.open(e.method||"get",t,!0),e.headers)i.setRequestHeader(o,e.headers[o]);function a(){var t,e=[],n=[],r={};return i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(i,o,a){e.push(o=o.toLowerCase()),n.push([o,a]),t=r[o],r[o]=t?t+","+a:a}),{ok:2==(i.status/100|0),status:i.status,statusText:i.statusText,url:i.responseURL,clone:a,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},headers:{keys:function(){return e},entries:function(){return n},get:function(t){return r[t.toLowerCase()]},has:function(t){return t.toLowerCase()in r}}}}i.withCredentials="include"==e.credentials,i.onload=function(){n(a())},i.onerror=r,i.send(e.body)})};e.default=r},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(){function t(e,n){!function(t,e){if(!_instanceof(t,e))throw new TypeError("Cannot call a class as a function")}(this,t),this.pluginName=e}return r(t,[{key:"track",value:function(t,e){window.analytics.track(t,e,{integration:{name:this.pluginName}})}}]),t}();e.default=i},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.YouTubeAnalytics=e.VimeoAnalytics=void 0;var r=o(n(3)),i=o(n(4));function o(t){return t&&t.__esModule?t:{default:t}}e.VimeoAnalytics=r.default,e.YouTubeAnalytics=i.default},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=o(n(0));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(t,n){!function(t,e){if(!_instanceof(t,e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=(void 0===e?"undefined":_type_of(e))&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,"VimeoAnalytics"));return r.authToken=n,r.player=t,r.metadata={content:{},playback:{videoPlayer:"Vimeo"}},r.mostRecentHeartbeat=0,r.isPaused=!1,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":_type_of(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"initialize",value:function(){var t=this,e={loaded:this.retrieveMetadata,play:this.trackPlay,pause:this.trackPause,ended:this.trackEnded,timeupdate:this.trackHeartbeat};for(var n in e)this.registerHandler(n,e[n]);this.player.getVideoId().then(function(e){t.retrieveMetadata({id:e})}).catch(console.error)}},{key:"registerHandler",value:function(t,e){var n=this;this.player.on(t,function(t){n.updateMetadata(t),e.call(n,t)})}},{key:"trackPlay",value:function(){this.isPaused?(this.track("Video Playback Resumed",this.metadata.playback),this.isPaused=!1):(this.track("Video Playback Started",this.metadata.playback),this.track("Video Content Started",this.metadata.content))}},{key:"trackEnded",value:function(){this.track("Video Playback Completed",this.metadata.playback),this.track("Video Content Completed",this.metadata.content)}},{key:"trackHeartbeat",value:function(){var t=this.mostRecentHeartbeat,e=this.metadata.playback.position;e!==t&&e-t>=10&&(this.track("Video Content Playing",this.metadata.content),this.mostRecentHeartbeat=Math.floor(e))}},{key:"trackPause",value:function(){this.isPaused=!0,this.track("Video Playback Paused",this.metadata.playback)}},{key:"retrieveMetadata",value:function(t){var e=this;return new Promise(function(n,r){var o=t.id;(0,i.default)("https://api.vimeo.com/videos/"+o,{headers:{Authorization:"Bearer "+e.authToken}}).then(function(t){return t.ok?t.json():r(t)}).then(function(t){e.metadata.content.title=t.name,e.metadata.content.description=t.description,e.metadata.content.publisher=t.user.name,e.metadata.playback.position=0,e.metadata.playback.totalLength=t.duration}).catch(function(t){return console.error("Request to Vimeo API Failed with: ",t),r(t)})})}},{key:"updateMetadata",value:function(t){var e=this;return new Promise(function(n,r){e.player.getVolume().then(function(r){r&&(e.metadata.playback.sound=100*r),e.metadata.playback.position=t.seconds,n()}).catch(r)})}}]),e}(o(n(1)).default);e.default=a},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=o(n(0));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(t,n){!function(t,e){if(!_instanceof(t,e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=(void 0===e?"undefined":_type_of(e))&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,"YoutubeAnalytics"));return r.player=t,r.apiKey=n,r.playerLoaded=!1,r.playbackStarted=!1,r.contentStarted=!1,r.isPaused=!1,r.isBuffering=!1,r.isSeeking=!1,r.lastRecordedTime={timeReported:Date.now(),timeElapsed:0},r.metadata=[{playback:{video_player:"youtube"},content:{}}],r.playlistIndex=0,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":_type_of(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"initialize",value:function(){window.segmentYoutubeOnStateChange=this.onPlayerStateChange.bind(this),window.segmentYoutubeOnReady=this.onPlayerReady.bind(this),this.player.addEventListener("onReady","segmentYoutubeOnReady"),this.player.addEventListener("onStateChange","segmentYoutubeOnStateChange")}},{key:"onPlayerReady",value:function(t){this.retrieveMetadata()}},{key:"onPlayerStateChange",value:function(t){var e=this.player.getCurrentTime();switch(this.metadata[this.playlistIndex]&&(this.metadata[this.playlistIndex].playback.position=this.metadata[this.playlistIndex].content.position=e,this.metadata[this.playlistIndex].playback.quality=this.player.getPlaybackQuality(),this.metadata[this.playlistIndex].playback.sound=this.player.isMuted()?0:this.player.getVolume()),t.data){case-1:if(this.playerLoaded)break;this.retrieveMetadata(),this.playerLoaded=!0;break;case YT.PlayerState.BUFFERING:this.handleBuffer();break;case YT.PlayerState.PLAYING:this.handlePlay();break;case YT.PlayerState.PAUSED:this.handlePause();break;case YT.PlayerState.ENDED:this.handleEnd()}this.lastRecordedTime={timeReported:Date.now(),timeElapsed:1e3*this.player.getCurrentTime()}}},{key:"retrieveMetadata",value:function(){var t=this;return new Promise(function(e,n){var r=t.player.getVideoData(),o=t.player.getPlaylist()||[r.video_id],a=o.join();(0,i.default)("https://www.googleapis.com/youtube/v3/videos?id="+a+"&part=snippet,contentDetails&key="+t.apiKey).then(function(t){if(!t.ok){var e=new Error("Segment request to Youtube API failed (likely due to a bad API Key. Events will still be sent but will not contain video metadata)");throw e.response=t,e}return t.json()}).then(function(n){t.metadata=[];for(var r=0,i=0;i<o.length;i++){var a=n.items[i];t.metadata.push({content:{title:a.snippet.title,description:a.snippet.description,keywords:a.snippet.tags,channel:a.snippet.channelTitle,airdate:a.snippet.publishedAt}}),r+=s(a.contentDetails.duration)}for(i=0;i<o.length;i++)t.metadata[i].playback={total_length:r,video_player:"youtube"};e()}).catch(function(e){t.metadata=o.map(function(t){return{playback:{video_player:"youtube"},content:{}}}),n(e)})})}},{key:"handleBuffer",value:function(){var t=this.determineSeek();this.playbackStarted||(this.playbackStarted=!0,this.track("Video Playback Started",this.metadata[this.playlistIndex].playback)),t&&!this.isSeeking&&(this.isSeeking=!0,this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback)),this.isSeeking&&(this.track("Video Playback Seek Completed",this.metadata[this.playlistIndex].playback),this.isSeeking=!1);var e=this.player.getPlaylist();e&&0===this.player.getCurrentTime()&&this.player.getPlaylistIndex()!==this.playlistIndex&&(this.contentStarted=!1,this.playlistIndex===e.length-1&&0===this.player.getPlaylistIndex()&&(this.track("Video Playback Completed",this.metadata[this.player.getPlaylistIndex()].playback),this.track("Video Playback Started",this.metadata[this.player.getPlaylistIndex()].playback))),this.track("Video Playback Buffer Started",this.metadata[this.playlistIndex].playback),this.isBuffering=!0}},{key:"handlePlay",value:function(){this.contentStarted||(this.playlistIndex=this.player.getPlaylistIndex(),-1===this.playlistIndex&&(this.playlistIndex=0),this.track("Video Content Started",this.metadata[this.playlistIndex].content),this.contentStarted=!0),this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused&&(this.track("Video Playback Resumed",this.metadata[this.playlistIndex].playback),this.isPaused=!1)}},{key:"handlePause",value:function(){var t=this.determineSeek();this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused||(t?(this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback),this.isSeeking=!0):(this.track("Video Playback Paused",this.metadata[this.playlistIndex].playback),this.isPaused=!0))}},{key:"handleEnd",value:function(){this.track("Video Content Completed",this.metadata[this.playlistIndex].content),this.contentStarted=!1;var t=this.player.getPlaylistIndex(),e=this.player.getPlaylist();(e&&t===e.length-1||-1===t)&&(this.track("Video Playback Completed",this.metadata[this.playlistIndex].playback),this.playbackStarted=!1)}},{key:"determineSeek",value:function(){var t=this.isPaused||this.isBuffering?0:Date.now()-this.lastRecordedTime.timeReported,e=1e3*this.player.getCurrentTime()-this.lastRecordedTime.timeElapsed;return Math.abs(t-e)>2e3}}]),e}(o(n(1)).default);function s(t){var e=t.match(/PT(\d+H)?(\d+M)?(\d+S)?/);return e=e.slice(1).map(function(t){if(null!=t)return t.replace(/\D/,"")}),3600*(parseInt(e[0])||0)+60*(parseInt(e[1])||0)+(parseInt(e[2])||0)}e.default=a}])},"object"==(void 0===t?"undefined":_type_of(t))&&"object"==(void 0===e?"undefined":_type_of(e))?e.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==(void 0===t?"undefined":_type_of(t))?t.analyticsVideoPlugins=r():n.analyticsVideoPlugins=r()}}),zr={};Le(zr,{loadLegacyVideoPlugins:function(){return Ct}});var Ur=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/legacy-video-plugins/index.js":function(){ze()}}),Vr={};Le(Vr,{schemaFilter:function(){return Nt}});var Kr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/schema-filter/index.js":function(){ze(),Dr()}}),Hr={};Le(Hr,{remoteMiddlewares:function(){return Ft}});var Gr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/remote-middleware/index.js":function(){ze(),bn(),Or(),kr()}}),Jr={};Le(Jr,{DestinationSegment:function(){return ao},default:function(){return co},destinationSegment:function(){return uo}});var Wr=Object.defineProperty,Yr=function(t,e){for(var n in e)Wr(t,n,{get:e[n],enumerable:!0})};Yr({},{stepId:function(){return Dt}});Yr({},{getDestination:function(){return Rt}});Yr({},{Level:function(){return $r}});var Qr,$r=((Qr=$r||{})[Qr.ERROR=0]="ERROR",Qr[Qr.WARN=1]="WARN",Qr[Qr.INFO=2]="INFO",Qr[Qr.DEBUG=3]="DEBUG",Qr);Yr({},{getTransformer:function(){return Tt}});Yr({},{getSource:function(){return Lt}});function Zr(t){for(var e=arguments.length>2?arguments[2]:void 0,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"").split("."),r=t,i=0;i<n.length;i++){var o=n[i];if("*"===o&&zt(r)){var a=n.slice(i+1).join("."),s=[],u=!0,c=!1,l=void 0;try{for(var f,d=r[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var p=Zr(f.value,a,e);s.push(p)}}catch(t){c=!0,l=t}finally{try{u||null==d.return||d.return()}finally{if(c)throw l}}return s}if(void 0===(r=Vt(r)||zt(r)?r[o]:void 0))break}return Ut(r)?r:e}function Xr(t){return function(t){return"boolean"==typeof t}(t)||Kt(t)||function(t){return"number"==typeof t&&!Number.isNaN(t)}(t)||!Ut(t)||zt(t)&&t.every(Xr)||Vt(t)&&Object.values(t).every(Xr)}Yr({},{getStore:function(){return qt},getStoreValue:function(){return Bt}});var ti=function(){function t(e,n){var r;return _class_call_check(this,t),(r=_call_super(this,t,[e,n])).name="FatalError",Object.setPrototypeOf(r,t.prototype),r}return _inherits(t,_wrap_native_super(Error)),t}();function ei(t,e,n){return _async_to_generator(function(){return _ts_generator(this,function(r){return[2,(zt(e)?e:[e]).reduce(function(e,r){return _async_to_generator(function(){var i,o,a,s,u,c,l,f,d,p,h,v,y,m,g,b,_,w,x,j,k,S;return _ts_generator(this,function(O){switch(O.label){case 0:return[4,e];case 1:return(i=O.sent())?[2,i]:(o=Kt(r)?{key:r}:r,Object.keys(o).length?(a=o.condition,s=o.consent,u=o.fn,c=o.key,l=o.loop,f=o.map,d=o.set,p=o.validate,h=o.value,v=_object_spread_props(_object_spread({},n),{mapping:r}),(y=a)?[4,Gt(a,function(t){if(_instanceof(t,ti))throw t;return v.logger.error("mapping condition failed",{event:v.event,error:t}),!1})(t,v)]:[3,3]):[2]);case 2:y=!O.sent(),O.label=3;case 3:return y?[2]:s&&!function(t){var e=_object_spread({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),n={},r=!t||0===Object.keys(t).length;return Object.keys(e).forEach(function(i){e[i]&&(n[i]=!0,t&&t[i]&&(r=!0))}),!!r&&n}(s,v.consent)?[2,h]:(m=Ut(h)?h:t,u?[4,Gt(u,function(t){if(_instanceof(t,ti))throw t;v.logger.error("mapping fn failed",{event:v.event,error:t})})(t,v)]:[3,5]);case 4:m=O.sent(),O.label=5;case 5:return c&&(m=Zr(t,c,h)),l?(g=_sliced_to_array(l,2),b=g[0],_=g[1],"this"!==b?[3,6]:(x=[t],[3,8])):[3,11];case 6:return[4,Jt(t,b,v)];case 7:x=O.sent(),O.label=8;case 8:return zt(w=x)?[4,Promise.all(w.map(function(t){return Jt(t,_,v)}))]:[3,10];case 9:m=O.sent().filter(Ut),O.label=10;case 10:return[3,17];case 11:return f?[4,Object.entries(f).reduce(function(e,n){var r=_sliced_to_array(n,2),i=r[0],o=r[1];return _async_to_generator(function(){var n,r;return _ts_generator(this,function(a){switch(a.label){case 0:return[4,e];case 1:return n=a.sent(),[4,Jt(t,o,v)];case 2:return r=a.sent(),[2,(Ut(r)&&(n[i]=r),n)]}})})()},Promise.resolve({}))]:[3,13];case 12:return m=O.sent(),[3,16];case 13:return(j=d)?[4,Promise.all(d.map(function(e){return ei(t,e,v)}))]:[3,15];case 14:j=m=O.sent(),O.label=15;case 15:O.label=16;case 16:O.label=17;case 17:return(k=p)?[4,Gt(p,function(t){if(_instanceof(t,ti))throw t;return v.logger.error("mapping validate failed",{event:v.event,error:t}),!1})(m,v)]:[3,19];case 18:k=!O.sent(),O.label=19;case 19:return k&&(m=void 0),S=Ht(m),[2,Ut(S)?S:Ht(h)]}})})()},Promise.resolve(void 0))]})})()}ze(),gn();var ni=function(t){return function(){for(var e,n,r,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];for(var a={},s=["callback","options","traits","id"],u=0,c=i;u<c.length;u++){var l=c[u],f=s.pop();if("id"===f){if(G(l)||J(l)){a.id=l.toString();continue}if(null==l)continue;f=s.pop()}if("traits"!==f&&"options"!==f||null!=l&&!Y(l)||(a[f]=l),W(l)){a.callback=l;break}}return[null!==(e=a.id)&&void 0!==e?e:t.id(),null!==(n=a.traits)&&void 0!==n?n:{},null!==(r=a.options)&&void 0!==r?r:{},a.callback]}};_n(),En(),gn(),nn(),ze(),an();var ri="bpc",ii=function(t,e,n,r,i,o){return{__t:ri,c:e,p:r,u:t,s:n,t:i,r:o}},oi=Object.keys(ii("","","","","","")),ai=function(t){var e,n,r=t.c,i=t.p,o=t.s,a=t.u,s=t.r,u=t.t,c=r?function(t){try{return new URL(t).pathname}catch(e){return"/"===t[0]?t:"/"+t}}(r):i,l=r?function(t,e){return t.indexOf("?")>-1?t:t+e}(r,o):-1===(n=(e=a).indexOf("#"))?e:e.slice(0,n);return{path:c,referrer:s,search:o,title:u,url:l}},si=function(){var t=document.querySelector("link[rel='canonical']");return ii(location.href,t&&t.getAttribute("href")||void 0,location.search,location.pathname,document.title,document.referrer)};ze(),ze();var ui=function(t,e){void 0===e&&(e=ai(si()));var r,i,o,a=t.context;"page"===t.type&&(r=t.properties&&(i=t.properties,o=Object.keys(e),Object.assign.apply(Object,K([{}],o.map(function(t){var e;if(i&&Object.prototype.hasOwnProperty.call(i,t))return(e={})[t]=i[t],e}),!1))),t.properties=n(n(n({},e),t.properties),t.name?{name:t.name}:{})),a.page=n(n(n({},e),r),a.page)};gn();var ci=function(t){function e(e){var n=t.call(this,{createMessageId:function(){return"ajs-next-".concat(Date.now(),"-").concat(X())},onEventMethodCall:function(t){var e=t.options;n.maybeUpdateAnonId(e)},onFinishedEvent:function(t){return n.addIdentity(t),t}})||this;return n.user=e,n}return B(e,t),e.prototype.maybeUpdateAnonId=function(t){(null==t?void 0:t.anonymousId)&&this.user.anonymousId(t.anonymousId)},e.prototype.addIdentity=function(t){this.user.id()&&(t.userId=this.user.id()),this.user.anonymousId()&&(t.anonymousId=this.user.anonymousId())},e.prototype.track=function(e,n,r,i,o){var a=t.prototype.track.call(this,e,n,r,i);return ui(a,o),a},e.prototype.page=function(e,n,r,i,o,a){var s=t.prototype.page.call(this,e,n,r,i,o);return ui(s,a),s},e.prototype.screen=function(e,n,r,i,o,a){var s=t.prototype.screen.call(this,e,n,r,i,o);return ui(s,a),s},e.prototype.identify=function(e,n,r,i,o){var a=t.prototype.identify.call(this,e,n,r,i);return ui(a,o),a},e.prototype.group=function(e,n,r,i,o){var a=t.prototype.group.call(this,e,n,r,i);return ui(a,o),a},e.prototype.alias=function(e,n,r,i,o){var a=t.prototype.alias.call(this,e,n,r,i);return ui(a,o),a},e}(c),li=function(t){return"addMiddleware"in t&&"destination"===t.type};ze(),Dn(),gn(),_n();var fi=function(t){function e(e){return t.call(this,"string"==typeof e?new q(4,e):e)||this}return B(e,t),e.prototype.flush=function(){return U(this,void 0,void 0,function(){return V(this,function(e){return at()?[2,[]]:[2,t.prototype.flush.call(this)]})})},e}(S);ze(),an(),ze();var di=function t(e,n){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=Xt({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var a in i)i[a]&&(o+="; "+a,!0!==i[a]&&(o+="="+i[a].split(";")[0]));return document.cookie=t+"="+e.write(r,t)+o}}return Object.create({set:r,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(r[s]=e.read(a,s),t===s)break}catch(t){}}return t?r[t]:r}},remove:function(t,e){r(t,"",Xt({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,Xt({},this.attributes,e))},withConverter:function(e){return t(Xt({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),pi=di,hi=function(){function t(e){void 0===e&&(e=t.defaults),this.options=n(n({},t.defaults),e)}return Object.defineProperty(t,"defaults",{get:function(){return{maxage:365,domain:te(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),t.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},t.prototype.get=function(t){var e;try{var n=pi.get(t);if(null==n)return null;try{return null!==(e=JSON.parse(n))&&void 0!==e?e:null}catch(t){return null!=n?n:null}}catch(t){return null}},t.prototype.set=function(t,e){"string"==typeof e?pi.set(t,e,this.opts()):null===e?pi.remove(t,this.opts()):pi.set(t,JSON.stringify(e),this.opts())},t.prototype.remove=function(t){return pi.remove(t,this.opts())},t}(),vi=function(){function t(){}return t.prototype.localStorageWarning=function(t,e){console.warn("Unable to access ".concat(t,", localStorage may be ").concat(e))},t.prototype.get=function(t){var e;try{var n=localStorage.getItem(t);if(null===n)return null;try{return null!==(e=JSON.parse(n))&&void 0!==e?e:null}catch(t){return null!=n?n:null}}catch(e){return this.localStorageWarning(t,"unavailable"),null}},t.prototype.set=function(t,e){try{localStorage.setItem(t,JSON.stringify(e))}catch(e){this.localStorageWarning(t,"full")}},t.prototype.remove=function(t){try{return localStorage.removeItem(t)}catch(e){this.localStorageWarning(t,"unavailable")}},t}(),yi=function(){function t(){this.cache={}}return t.prototype.get=function(t){var e;return null!==(e=this.cache[t])&&void 0!==e?e:null},t.prototype.set=function(t,e){this.cache[t]=e},t.prototype.remove=function(t){delete this.cache[t]},t}(),mi={Cookie:"cookie",LocalStorage:"localStorage",Memory:"memory"},gi=function(t,e,n,r){console.warn("".concat(t.constructor.name,": Can't ").concat(e,' key "').concat(n,'" | Err: ').concat(r))},bi=function(){function t(t){this.stores=t}return t.prototype.get=function(t){for(var e=null,n=0,r=this.stores;n<r.length;n++){var i=r[n];try{if(null!=(e=i.get(t)))return e}catch(e){gi(i,"get",t,e)}}return null},t.prototype.set=function(t,e){this.stores.forEach(function(n){try{n.set(t,e)}catch(e){gi(n,"set",t,e)}})},t.prototype.clear=function(t){this.stores.forEach(function(e){try{e.remove(t)}catch(n){gi(e,"remove",t,n)}})},t.prototype.getAndSync=function(t){var e=this.get(t),n="number"==typeof e?e.toString():e;return this.set(t,n),n},t}(),_i={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},wi=function(){function t(t,e){void 0===t&&(t=_i);var r,i,o,a,s=this;this.options={},this.id=function(t){if(s.options.disable)return null;var e=s.identityStore.getAndSync(s.idKey);void 0!==t&&(s.identityStore.set(s.idKey,t),t!==e&&null!==e&&null!==t&&s.anonymousId(null));var n=s.identityStore.getAndSync(s.idKey);if(n)return n;var r=s.legacyUserStore.get(_i.cookie.oldKey);return r?"object"===(void 0===r?"undefined":_type_of(r))?r.id:r:null},this.anonymousId=function(t){var e,n;if(s.options.disable)return null;if(void 0===t){var r=null!==(e=s.identityStore.getAndSync(s.anonKey))&&void 0!==e?e:null===(n=s.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===t?(s.identityStore.set(s.anonKey,null),s.identityStore.getAndSync(s.anonKey)):(s.identityStore.set(s.anonKey,null!=t?t:X()),s.identityStore.getAndSync(s.anonKey))},this.traits=function(t){var e;if(!s.options.disable)return null===t&&(t={}),t&&s.traitsStore.set(s.traitsKey,null!=t?t:{}),null!==(e=s.traitsStore.get(s.traitsKey))&&void 0!==e?e:{}},this.options=n(n({},_i),t),this.cookieOptions=e,this.idKey=null!==(i=null===(r=t.cookie)||void 0===r?void 0:r.key)&&void 0!==i?i:_i.cookie.key,this.traitsKey=null!==(a=null===(o=t.localStorage)||void 0===o?void 0:o.key)&&void 0!==a?a:_i.localStorage.key,this.anonKey="ajs_anonymous_id",this.identityStore=this.createStorage(this.options,e),this.legacyUserStore=this.createStorage(this.options,e,function(t){return t===mi.Cookie}),this.traitsStore=this.createStorage(this.options,e,function(t){return t!==mi.Cookie});var u=this.legacyUserStore.get(_i.cookie.oldKey);u&&"object"===(void 0===u?"undefined":_type_of(u))&&(u.id&&this.id(u.id),u.traits&&this.traits(u.traits)),Zt(this)}return t.prototype.legacySIO=function(){var t=this.legacyUserStore.get("_sio");if(!t)return null;var e=t.split("----");return[e[0],e[1]]},t.prototype.identify=function(t,e){if(!this.options.disable){e=null!=e?e:{};var r=this.id();null!==r&&r!==t||(e=n(n({},this.traits()),e)),t&&this.id(t),this.traits(e)}},t.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},t.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},t.prototype.load=function(){return new t(this.options,this.cookieOptions)},t.prototype.save=function(){return!0},t.prototype.createStorage=function(t,e,n){var r=[mi.LocalStorage,mi.Cookie,mi.Memory];return t.disable?new bi([]):t.persist?(void 0!==t.storage&&null!==t.storage&&ee(t.storage)&&(r=t.storage.stores),t.localStorageFallbackDisabled&&(r=r.filter(function(t){return t!==mi.LocalStorage})),n&&(r=r.filter(n)),new bi(ne(re(r,e)))):new bi([new yi])},t.defaults=_i,t}(),xi={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},ji=function(t){function e(e,r){void 0===e&&(e=xi);var i=t.call(this,n(n({},xi),e),r)||this;return i.anonymousId=function(t){},Zt(i),i}return B(e,t),e}(wi);Dn(),kn(),An(),xn(),Rn(),ze();var ki=function(t){return"object"===(void 0===t?"undefined":_type_of(t))&&null!==t&&"then"in t&&"function"==typeof t.then};kn(),Rn(),Sn();var Si=function(t,e,n){n.getAndRemove(t).forEach(function(t){ie(e,t).catch(console.error)})},Oi=function(t,e){return U(void 0,void 0,void 0,function(){var n,r,i;return V(this,function(o){switch(o.label){case 0:n=0,r=e.getAndRemove("addSourceMiddleware"),o.label=1;case 1:return n<r.length?(i=r[n],[4,ie(t,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}})})},Pi=function(t,e){return U(void 0,void 0,void 0,function(){var n,r,i;return V(this,function(o){switch(o.label){case 0:n=0,r=e.getAndRemove("register"),o.label=1;case 1:return n<r.length?(i=r[n],[4,ie(t,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}})})},Ii=Si.bind(void 0,"on"),Ei=Si.bind(void 0,"setAnonymousId"),Ai=function(t,e){Object.keys(e.calls).forEach(function(n){e.getAndRemove(n).forEach(function(e){setTimeout(function(){ie(t,e).catch(console.error)},0)})})},Mi=function(t){if(Ci(t)){var e=t.pop();return ai(e)}},Ci=function(t){var e=t[t.length-1];return $t(e)},Ni=function(t,e,n,r){void 0===n&&(n=function(){}),void 0===r&&(r=console.error),this.method=t,this.resolve=n,this.reject=r,this.called=!1,this.args=e},Fi=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._callMap={},this.add.apply(this,t)}return Object.defineProperty(t.prototype,"calls",{get:function(){return this._pushSnippetWindowBuffer(),this._callMap},set:function(t){this._callMap=t},enumerable:!1,configurable:!0}),t.prototype.get=function(t){var e;return null!==(e=this.calls[t])&&void 0!==e?e:[]},t.prototype.getAndRemove=function(t){var e=this.get(t);return this.calls[t]=[],e},t.prototype.add=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach(function(e){["track","screen","alias","group","page","identify"].includes(e.method)&&!Ci(e.args)&&(e.args=K(K([],e.args,!0),[si()],!1)),t.calls[e.method]?t.calls[e.method].push(e):t.calls[e.method]=[e]})},t.prototype.clear=function(){this._pushSnippetWindowBuffer(),this.calls={}},t.prototype.toArray=function(){var t;return(t=[]).concat.apply(t,Object.values(this.calls))},t.prototype._pushSnippetWindowBuffer=function(){if("npm"!==ut()){var t=pt();if(Array.isArray(t)){var e=t.splice(0,t.length).map(function(t){var e=t[0],n=t.slice(1);return new Ni(e,n)});this.add.apply(this,e)}}},t}(),Di=function(){function t(t){var e=this;this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=E,this._preInitBuffer=new Fi,this._promise=t(this._preInitBuffer),this._promise.then(function(t){var n=t[0],r=t[1];e.instance=n,e.ctx=r}).catch(function(){})}return t.prototype.then=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).then.apply(t,e)},t.prototype.catch=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).catch.apply(t,e)},t.prototype.finally=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).finally.apply(t,e)},t.prototype._createMethod=function(t){var e=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(e.instance){var o=(n=e.instance)[t].apply(n,r);return Promise.resolve(o)}return new Promise(function(n,i){e._preInitBuffer.add(new Ni(t,r,n,i))})}},t.prototype._createChainableMethod=function(t){var e=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.instance?((n=e.instance)[t].apply(n,r),e):(e._preInitBuffer.add(new Ni(t,r)),e)}},t}();ze(),_n(),An(),Dn(),ir(),ze(),jn();var Ri=function(t){var e=!1;window.addEventListener("pagehide",function(){e||t(e=!0)}),document.addEventListener("visibilitychange",function(){if("hidden"==document.visibilityState){if(e)return;e=!0}else e=!1;t(e)})};ze();var Ti=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e)||this;return i.retryTimeout=n,i.isRetryableWithoutCount=r,i.name="RateLimitError",i}return B(e,t),e}(Error);En(),ze();var Li=function(t){return n({"Content-Type":"text/plain"},"function"==typeof t?t():t)},qi={408:"retry",410:"retry",429:"retry",460:"retry",501:"drop",505:"drop",511:"drop"},Bi=500,zi=64;jn(),ze(),ze(),_n(),En(),gn(),or(),On();var Ui,Vi=function(t){return"Segment.io"===t.name},Ki="This is being deprecated and will be not be available in future releases of Analytics JS",Hi=P(),Gi=null==Hi?void 0:Hi.analytics,Ji=function(){function t(t,e){var n;this.timeout=300,this._getSegmentPluginMetadata=function(){var t;return null===(t=e.plugins.find(Vi))||void 0===t?void 0:t.metadata},this.writeKey=t.writeKey;this.cdnSettings=null!==(n=t.cdnSettings)&&void 0!==n?n:{integrations:{"Segment.io":{apiKey:""}}},this.cdnURL=t.cdnURL}return Object.defineProperty(t.prototype,"apiHost",{get:function(){var t,e;return null===(e=null===(t=this._getSegmentPluginMetadata)||void 0===t?void 0:t.call(this))||void 0===e?void 0:e.apiHost},enumerable:!1,configurable:!0}),t}(),Wi=function(t){function e(e,r,i,o,a){var s,u,c=this;(c=t.call(this)||this)._debug=!1,c.initialized=!1,c.user=function(){return c._user},c.init=c.initialize.bind(c),c.log=ye,c.addIntegrationMiddleware=ye,c.listeners=ye,c.addEventListener=ye,c.removeAllListeners=ye,c.removeListener=ye,c.removeEventListener=ye,c.hasListeners=ye,c.add=ye,c.addIntegration=ye;var l=null==r?void 0:r.cookie,f=null!==(s=null==r?void 0:r.disableClientPersistence)&&void 0!==s&&s;c.queue=null!=i?i:function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var r=e?10:1,i=n?new p(r,[]):new q(r,t);return new fi(i)}("".concat(e.writeKey,":event-queue"),null==r?void 0:r.retryQueue,f),c.settings=new Ji(e,c.queue);var d=null==r?void 0:r.storage;return c._universalStorage=c.createStore(f,d,l),c._user=null!=o?o:new wi(n({persist:!f,storage:null==r?void 0:r.storage},null==r?void 0:r.user),l).load(),c._group=null!=a?a:new ji(n({persist:!f,storage:null==r?void 0:r.storage},null==r?void 0:r.group),l).load(),c.eventFactory=new ci(c._user),c.integrations=null!==(u=null==r?void 0:r.integrations)&&void 0!==u?u:{},c.options=null!=r?r:{},Zt(c),c}return B(e,t),e.prototype.createStore=function(t,e,n){return t?new bi([new yi]):e&&ee(e)?new bi(ne(re(e.stores,n))):new bi(ne([mi.LocalStorage,{name:mi.Cookie,settings:n},mi.Memory]))},Object.defineProperty(e.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),e.prototype.track=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u=this;return V(this,function(c){return e=Mi(t),n=Wt.apply(void 0,t),r=n[0],i=n[1],o=n[2],a=n[3],s=this.eventFactory.track(r,i,o,this.integrations,e),[2,this._dispatch(s,a).then(function(t){return u.emit("track",r,t.event.properties,t.event.options),t})]})})},e.prototype.page=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u,c=this;return V(this,function(l){return e=Mi(t),n=Yt.apply(void 0,t),r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=this.eventFactory.page(r,i,o,a,this.integrations,e),[2,this._dispatch(u,s).then(function(t){return c.emit("page",r,i,t.event.properties,t.event.options),t})]})})},e.prototype.identify=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u=this;return V(this,function(c){return e=Mi(t),n=ni(this._user).apply(void 0,t),r=n[0],i=n[1],o=n[2],a=n[3],this._user.identify(r,i),s=this.eventFactory.identify(this._user.id(),this._user.traits(),o,this.integrations,e),[2,this._dispatch(s,a).then(function(t){return u.emit("identify",t.event.userId,t.event.traits,t.event.options),t})]})})},e.prototype.group=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=Mi(e);if(0===e.length)return this._group;var i=ni(this._group).apply(void 0,e),o=i[0],a=i[1],s=i[2],u=i[3];this._group.identify(o,a);var c=this._group.id(),l=this._group.traits(),f=this.eventFactory.group(c,l,s,this.integrations,r);return this._dispatch(f,u).then(function(e){return t.emit("group",e.event.groupId,e.event.traits,e.event.options),e})},e.prototype.alias=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u=this;return V(this,function(c){return e=Mi(t),n=Qt.apply(void 0,t),r=n[0],i=n[1],o=n[2],a=n[3],s=this.eventFactory.alias(r,i,o,this.integrations,e),[2,this._dispatch(s,a).then(function(t){return u.emit("alias",r,i,t.event.options),t})]})})},e.prototype.screen=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u,c=this;return V(this,function(l){return e=Mi(t),n=Yt.apply(void 0,t),r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=this.eventFactory.screen(r,i,o,a,this.integrations,e),[2,this._dispatch(u,s).then(function(t){return c.emit("screen",r,i,t.event.properties,t.event.options),t})]})})},e.prototype.trackClick=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n;return V(this,function(r){switch(r.label){case 0:return[4,Promise.resolve().then(function(){return ur(),sr})];case 1:return e=r.sent(),[2,(n=e.link).call.apply(n,K([this],t,!1))]}})})},e.prototype.trackLink=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n;return V(this,function(r){switch(r.label){case 0:return[4,Promise.resolve().then(function(){return ur(),sr})];case 1:return e=r.sent(),[2,(n=e.link).call.apply(n,K([this],t,!1))]}})})},e.prototype.trackSubmit=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n;return V(this,function(r){switch(r.label){case 0:return[4,Promise.resolve().then(function(){return ur(),sr})];case 1:return e=r.sent(),[2,(n=e.form).call.apply(n,K([this],t,!1))]}})})},e.prototype.trackForm=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n;return V(this,function(r){switch(r.label){case 0:return[4,Promise.resolve().then(function(){return ur(),sr})];case 1:return e=r.sent(),[2,(n=e.form).call.apply(n,K([this],t,!1))]}})})},e.prototype.register=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n,r=this;return V(this,function(i){switch(i.label){case 0:return e=R.system(),n=t.map(function(t){return r.queue.register(e,t,r)}),[4,Promise.all(n)];case 1:return i.sent(),[2,e]}})})},e.prototype.deregister=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n,r=this;return V(this,function(i){switch(i.label){case 0:return e=R.system(),n=t.map(function(t){var n=r.queue.plugins.find(function(e){return e.name===t});if(n)return r.queue.deregister(e,n,r);e.log("warn","plugin ".concat(t," not found"))}),[4,Promise.all(n)];case 1:return i.sent(),[2,e]}})})},e.prototype.debug=function(t){return!1===t&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=t,this},e.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit("reset")},e.prototype.timeout=function(t){this.settings.timeout=t},e.prototype._dispatch=function(t,e){return U(this,void 0,void 0,function(){var n;return V(this,function(r){return(n=new R(t)).stats.increment("analytics_js.invoke",1,[t.type]),at()&&!this.options.retryQueue?[2,n]:[2,nt(n,this.queue,this,{callback:e,debug:this._debug,timeout:this.settings.timeout})]})})},e.prototype.addSourceMiddleware=function(t){return U(this,void 0,void 0,function(){var e=this;return V(this,function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run(function(){return U(e,void 0,void 0,function(){var e,n,r;return V(this,function(i){switch(i.label){case 0:return[4,Promise.resolve().then(function(){return lr(),cr})];case 1:return e=i.sent().sourceMiddlewarePlugin,n={},this.queue.plugins.forEach(function(t){if("destination"===t.type)return n[t.name]=!0}),r=e(t,n),[4,this.register(r)];case 2:return i.sent(),[2]}})})})];case 1:return n.sent(),[2,this]}})})},e.prototype.addDestinationMiddleware=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this.queue.plugins.filter(li).forEach(function(n){"*"!==t&&n.name.toLowerCase()!==t.toLowerCase()||n.addMiddleware.apply(n,e)}),Promise.resolve(this)},e.prototype.setAnonymousId=function(t){return this._user.anonymousId(t)},e.prototype.queryString=function(t){return U(this,void 0,void 0,function(){return V(this,function(e){switch(e.label){case 0:return!1===this.options.useQueryString?[2,[]]:[4,Promise.resolve().then(function(){return jr(),pr})];case 1:return[2,(0,e.sent().queryString)(this,t)]}})})},e.prototype.use=function(t){return t(this),this},e.prototype.ready=function(t){return void 0===t&&(t=function(t){return t}),U(this,void 0,void 0,function(){return V(this,function(e){return[2,Promise.all(this.queue.plugins.map(function(t){return t.ready?t.ready():Promise.resolve()})).then(function(e){return t(e),e})]})})},e.prototype.noConflict=function(){var t;return console.warn(Ki),t=null!=Gi?Gi:this,window[Cn]=t,this},e.prototype.normalize=function(t){return console.warn(Ki),this.eventFactory.normalize(t)},Object.defineProperty(e.prototype,"failedInitializations",{get:function(){return console.warn(Ki),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"VERSION",{get:function(){return E},enumerable:!1,configurable:!0}),e.prototype.initialize=function(t,e){return U(this,void 0,void 0,function(){return V(this,function(t){return console.warn(Ki),[2,Promise.resolve(this)]})})},e.prototype.pageview=function(t){return U(this,void 0,void 0,function(){return V(this,function(e){switch(e.label){case 0:return console.warn(Ki),[4,this.page({path:t})];case 1:return e.sent(),[2,this]}})})},Object.defineProperty(e.prototype,"plugins",{get:function(){var t;return console.warn(Ki),null!==(t=this._plugins)&&void 0!==t?t:{}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Integrations",{get:function(){return console.warn(Ki),this.queue.plugins.filter(function(t){return"destination"===t.type}).reduce(function(t,e){var n="".concat(e.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return t;var i=r.Integration;return i?(t[e.name]=i,t):(t[e.name]=r,t)},{})},enumerable:!1,configurable:!0}),e.prototype.push=function(t){var e=t.shift();e&&!this[e]||this[e].apply(this,t)},e}(f),Yi=function(t){function e(){var e=t.call(this,{writeKey:""},{disableClientPersistence:!0})||this;return e.initialized=!0,e}return B(e,t),e}(Wi);ze(),kr(),En(),Sr(),nn(),ze(),kn(),Sn(),dr(),ze();var Qi=new function(){var t=this;this.name="Page Enrichment",this.type="before",this.version="0.1.0",this.isLoaded=function(){return!0},this.load=function(e,n){return U(t,void 0,void 0,function(){var t;return V(this,function(e){switch(e.label){case 0:this.instance=n,e.label=1;case 1:return e.trys.push([1,3,,4]),t=this,[4,ge(this.instance.options.highEntropyValuesClientHints)];case 2:return t.userAgentData=e.sent(),[3,4];case 3:return e.sent(),[3,4];case 4:return[2,Promise.resolve()]}})})},this.enrich=function(e){var r,i,o=e.event.context,a=o.page.search||"",s="object"===(void 0===a?"undefined":_type_of(a))?function(t){try{var e=new URLSearchParams;return Object.entries(t).forEach(function(t){var n=t[0],r=t[1];Array.isArray(r)?r.forEach(function(t){return e.append(n,t)}):e.append(n,r)}),e.toString()}catch(t){return""}}(a):a;o.userAgent=navigator.userAgent,o.userAgentData=t.userAgentData;var u=navigator.userLanguage||navigator.language;void 0===o.locale&&void 0!==u&&(o.locale=u),null!==(r=o.library)&&void 0!==r||(o.library={name:"analytics.js",version:"".concat("web"===ut()?"next":"npm:next","-").concat(E)}),s&&!o.campaign&&(o.campaign=function(t){return t.startsWith("?")&&(t=t.substring(1)),(t=t.replace(/\?/g,"&")).split("&").reduce(function(t,e){var n=e.split("="),r=n[0],i=n[1],o=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var a=r.slice(4);"campaign"===a&&(a="name"),t[a]=_t(o)}return t},{})}(s));var c=function(){var t=pi.get("_ga");if(t&&t.startsWith("amp"))return t}();c&&(o.amp={id:c}),function(t,e,r){var i,o=new bi(r?[]:[new hi(be())]),a=o.get("s:context.referrer"),s=null!==(i=function(t){var e={btid:"dataxu",urid:"millennial-media"};t.startsWith("?")&&(t=t.substring(1));for(var n=0,r=(t=t.replace(/\?/g,"&")).split("&");n<r.length;n++){var i=r[n].split("="),o=i[0],a=i[1];if(e[o])return{id:a,type:e[o]}}}(t))&&void 0!==i?i:a;s&&(e&&(e.referrer=n(n({},e.referrer),s)),o.set("s:context.referrer",s))}(s,o,null!==(i=t.instance.options.disableClientPersistence)&&void 0!==i&&i);try{o.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){}return e},this.track=this.enrich,this.identify=this.enrich,this.page=this.enrich,this.group=this.enrich,this.alias=this.enrich,this.screen=this.enrich};ze(),Or(),kr(),lr(),En(),Pr(),nn();var $i,Zi,Xi=function(){function t(t,e){this.version="1.0.0",this.alternativeNames=[],this.loadPromise=l(),this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=e,this.name=t,this.type=e.type,this.alternativeNames.push(e.name)}return t.prototype.addMiddleware=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];"destination"===this.type&&(t=this.middleware).push.apply(t,e)},t.prototype.transform=function(t){return U(this,void 0,void 0,function(){var e;return V(this,function(n){switch(n.label){case 0:return[4,mt(this.name,t.event,this.middleware)];case 1:return null===(e=n.sent())&&t.cancel(new w({retry:!1,reason:"dropped by destination middleware"})),[2,new R(e)]}})})},t.prototype._createMethod=function(t){var e=this;return function(n){return U(e,void 0,void 0,function(){var e,r;return V(this,function(i){switch(i.label){case 0:return this.action[t]?(e=n,"destination"!==this.type?[3,2]:[4,this.transform(n)]):[2,n];case 1:e=i.sent(),i.label=2;case 2:return i.trys.push([2,5,,6]),[4,this.ready()];case 3:if(!i.sent())throw new Error("Something prevented the destination from getting ready");return St(n,{integrationName:this.action.name,methodName:t,type:"action"}),[4,this.action[t](e)];case 4:return i.sent(),[3,6];case 5:throw r=i.sent(),St(n,{integrationName:this.action.name,methodName:t,type:"action",didError:!0}),r;case 6:return[2,n]}})})}},t.prototype.isLoaded=function(){return this.action.isLoaded()},t.prototype.ready=function(){return U(this,void 0,void 0,function(){return V(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.loadPromise.promise];case 1:return t.sent(),[2,!0];case 2:return t.sent(),[2,!1];case 3:return[2]}})})},t.prototype.load=function(t,e){return U(this,void 0,void 0,function(){var n,r,i,o;return V(this,function(a){switch(a.label){case 0:if(this.loadPromise.isSettled())return[2,this.loadPromise.promise];a.label=1;case 1:return a.trys.push([1,3,,4]),St(t,{integrationName:this.action.name,methodName:"load",type:"action"}),n=this.action.load(t,e),i=(r=this.loadPromise).resolve,[4,n];case 2:return i.apply(r,[a.sent()]),[2,n];case 3:throw o=a.sent(),St(t,{integrationName:this.action.name,methodName:"load",type:"action",didError:!0}),this.loadPromise.reject(o),o;case 4:return[2]}})})},t.prototype.unload=function(t,e){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,t,e)},t}();xn();var to=null!==($i=(Zi=P()).__SEGMENT_INSPECTOR__)&&void 0!==$i?$i:Zi.__SEGMENT_INSPECTOR__={},eo=function(t){var e;return null===(e=to.attach)||void 0===e?void 0:e.call(to,t)};In(),Rn(),jn();var no=function(){var t,e,n=null!==(t=window.location.hash)&&void 0!==t?t:"",r=null!==(e=window.location.search)&&void 0!==e?e:"";return r.length?r:n.replace(/(?=#).*(?=\?)/,"")},ro=function(t,e){return U(void 0,void 0,void 0,function(){return V(this,function(n){switch(n.label){case 0:return e.includes("ajs_")?[4,t.queryString(e).catch(console.error)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},io=function(t){function e(){var e=this,n=l(),r=n.promise,i=n.resolve;return(e=t.call(this,function(t){return r.then(function(e){var n=e[0],r=e[1];return ke(n,r,t)})})||this)._resolveLoadStart=function(t,e){return i([t,e])},e}return B(e,t),e.prototype.load=function(t,e){return void 0===e&&(e={}),this._resolveLoadStart(t,e),this},e.load=function(t,n){return void 0===n&&(n={}),(new e).load(t,n)},e.standalone=function(t,n){return e.load({writeKey:t},n).then(function(t){return t[0]})},e}(Di);En();var oo,ao={},so={load:function(t,e){return io.load(t,e)}},uo={type:"segment",config:{},init:function(t){var e,n=t.config,r=t.env;if(!(null===(e=n.settings)||void 0===e?void 0:e.apiKey))return!1;var i=n.settings,o=Se(r),a={lastIdentity:{},lastGroup:{},loaded:!1};return!!n.consent&&Object.keys(n.consent).length>0||(a.analytics=Oe(o,i),a.loaded=!0),_object_spread_props(_object_spread({},n),{settings:_object_spread_props(_object_spread({},i),{_state:a})})},push:function(t,e){return _async_to_generator(function(t,e){var n,r,i,o,a,s,u,c,l,f,d,p,h,v,y,m,g,b,_,w;return _ts_generator(this,function(x){switch(x.label){case 0:return n=e.config,r=e.rule,i=e.env,o=e.data,a=e.collector,c=Se(i),l=n.settings||{},f=l._state||{},d=function(t,e,n){return n.analytics?n.analytics:n.loaded?void 0:(n.analytics=Oe(t,e),n.loaded=!0,n.analytics)}(c,l,f),d?(p=(null==r?void 0:r.settings)||{},h=function(t,e){var n=e.consent;if(n&&0!==Object.keys(n).length){var r=t.consent;if(Vt(r)){var i={},o=!0,a=!1,s=void 0;try{for(var u,c=Object.entries(n)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var l=_sliced_to_array(u.value,2),f=l[0],d=l[1];f in r&&(i[d]=!0===r[f])}}catch(t){a=!0,s=t}finally{try{o||null==c.return||c.return()}finally{if(a)throw s}}if(0!==Object.keys(i).length)return{context:{consent:{categoryPreferences:i}}}}}}(t,l),void 0===p.reset?[3,4]:"boolean"!=typeof p.reset?[3,1]:(v=p.reset,[3,3])):[2];case 1:return[4,Jt(t,p.reset,{collector:a})];case 2:v=x.sent(),x.label=3;case 3:v&&(d.reset(),f.lastIdentity={},f.lastGroup={}),x.label=4;case 4:return void 0===(y=null!==(s=p.identify)&&void 0!==s?s:l.identify)?[3,6]:[4,Jt(t,y,{collector:a})];case 5:m=x.sent(),Vt(m)&&function(t,e,n,r){var i,o=n.lastIdentity||{},a=Kt(e.userId)?e.userId:void 0,s=Kt(e.anonymousId)?e.anonymousId:void 0,u=Vt(e.traits)&&!zt(e.traits)?e.traits:void 0;s&&s!==o.anonymousId&&t.setAnonymousId(s);var c=Pe(u),l=a!==o.userId,f=c!==(null!==(i=o.traitsHash)&&void 0!==i?i:"");(l||void 0!==u&&f||s)&&(r?t.identify(a,u||{},r):t.identify(a,u||{}),n.lastIdentity={userId:a,anonymousId:null!=s?s:o.anonymousId,traitsHash:c})}(d,m,f,h),x.label=6;case 6:return void 0===(g=null!==(u=p.group)&&void 0!==u?u:l.group)?[3,8]:[4,Jt(t,g,{collector:a})];case 7:b=x.sent(),Vt(b)&&function(t,e,n,r){var i,o=Kt(e.groupId)?e.groupId:void 0;if(o){var a=Vt(e.traits)&&!zt(e.traits)?e.traits:void 0,s=n.lastGroup||{},u=Pe(a),c=o!==s.groupId,l=u!==(null!==(i=s.traitsHash)&&void 0!==i?i:"");(c||l)&&(r?t.group(o,a||{},r):t.group(o,a||{}),n.lastGroup={groupId:o,traitsHash:u})}}(d,b,f,h),x.label=8;case 8:return void 0===p.page?[3,10]:[4,Ie(d,p.page,t,a,h)];case 9:x.sent(),x.label=10;case 10:return!0!==(null==r?void 0:r.silent)&&(_=Kt(null==r?void 0:r.name)?r.name:t.name,w=Vt(o)?o:{},h?d.track(_,w,h):d.track(_,w)),l._state=f,[2]}})}).apply(this,arguments)},on:function(t,e){var n,r;if("consent"===t&&e.data){var i=e.data,o=null===(n=e.config)||void 0===n?void 0:n.consent;if(o&&0!==Object.keys(o).length){var a=(null===(r=e.config)||void 0===r?void 0:r.settings)||{},s=a._state||{},u=Se(e.env);Object.keys(o).every(function(t){return!0===i[t]})&&!s.loaded&&(s.analytics=Oe(u,a),s.loaded=!0,a._state=s)}}}},co=uo;return oo=Jr,qe(Ae({},"__esModule",{value:!0}),oo)}();
|
|
1
|
+
"use strict";function _array_like_to_array(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _array_with_holes(t){if(Array.isArray(t))return t}function _array_without_holes(t){if(Array.isArray(t))return _array_like_to_array(t)}function _assert_this_initialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function asyncGeneratorStep(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function _async_to_generator(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){asyncGeneratorStep(o,r,i,a,s,"next",t)}function s(t){asyncGeneratorStep(o,r,i,a,s,"throw",t)}a(void 0)})}}function _call_super(t,e,n){return e=_get_prototype_of(e),_possible_constructor_return(t,_is_native_reflect_construct()?Reflect.construct(e,n||[],_get_prototype_of(t).constructor):e.apply(t,n))}function _class_call_check(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _construct(t,e,n){return _construct=_is_native_reflect_construct()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&_set_prototype_of(i,n.prototype),i},_construct.apply(null,arguments)}function _define_property(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _get_prototype_of(t){return _get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_get_prototype_of(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_set_prototype_of(t,e)}function _instanceof(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function _is_native_function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}function _iterable_to_array(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _iterable_to_array_limit(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}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(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){_define_property(t,e,n[e])})}return t}function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function _object_spread_props(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):ownKeys(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}function _object_without_properties(t,e){if(null==t)return{};var n,r,i,o={};if("undefined"!=typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(t)),i=0;i<n.length;i++)r=n[i],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r]);return o}if(o=_object_without_properties_loose(t,e),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(t),i=0;i<n.length;i++)r=n[i],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r]);return o}function _object_without_properties_loose(t,e){if(null==t)return{};var n,r,i={},o=Object.getOwnPropertyNames(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n]);return i}function _possible_constructor_return(t,e){return!e||"object"!==_type_of(e)&&"function"!=typeof e?_assert_this_initialized(t):e}function _set_prototype_of(t,e){return _set_prototype_of=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},_set_prototype_of(t,e)}function _sliced_to_array(t,e){return _array_with_holes(t)||_iterable_to_array_limit(t,e)||_unsupported_iterable_to_array(t,e)||_non_iterable_rest()}function _to_consumable_array(t){return _array_without_holes(t)||_iterable_to_array(t)||_unsupported_iterable_to_array(t)||_non_iterable_spread()}function _type_of(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}function _unsupported_iterable_to_array(t,e){if(t){if("string"==typeof t)return _array_like_to_array(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(t,e):void 0}}function _wrap_native_super(t){var e="function"==typeof Map?new Map:void 0;return _wrap_native_super=function(t){if(null===t||!_is_native_function(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return _construct(t,arguments,_get_prototype_of(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),_set_prototype_of(n,t)},_wrap_native_super(t)}function _is_native_reflect_construct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_is_native_reflect_construct=function(){return!!t})()}function _ts_generator(t,e){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:u(0)}),s(a,"throw",{value:u(1)}),s(a,"return",{value:u(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function u(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}var Destination=function(){var t,e,n,r,i,o,a,s,u,c,l,f,d,p,h,v,y,m,g,b,_,w,x,j,k,S,O,P,I,E,A,M,C,N,F,D,R,T,L,q,B=function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)},z=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n},U=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,_instanceof(e,n)?e:new n(function(t){t(e)})).then(a,s)}u((r=r.apply(t,e||[])).next())})},V=function(t,e){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}},K=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},H=function(t,e,n){e.split&&(e=e.split("."));for(var r,i,o=0,a=e.length,s=t;o<a&&"__proto__"!=(i=""+e[o++])&&"constructor"!==i&&"prototype"!==i;)s=s[i]=o===a?n:_type_of(r=s[i])===(void 0===e?"undefined":_type_of(e))?r:0*e[o]!=0||~(""+e[o]).indexOf(".")?{}:[]},G=function(t){return"string"==typeof t},J=function(t){return"number"==typeof t},W=function(t){return"function"==typeof t},Y=function(t){return"object"===Object.prototype.toString.call(t).slice(8,-1).toLowerCase()},Q=function(t){!function(t){if(null==t)throw new i("Event",s);if("object"!==(void 0===t?"undefined":_type_of(t)))throw new i("Event",a)}(t),function(t){if(!G(t.type))throw new i(".type",o)}(t),function(t){if(!G(t.messageId))throw new i(".messageId",o)}(t),"track"===t.type&&(function(t){if(!G(t.event))throw new i(".event",o)}(t),function(t){if(!Y(t.properties))throw new i(".properties",a)}(t)),["group","identify"].includes(t.type)&&function(t){if(!Y(t.traits))throw new i(".traits",a)}(t)},$=function(t,e){return new Promise(function(n,r){var i=setTimeout(function(){r(Error("Promise timed out"))},e);t.then(function(t){return clearTimeout(i),n(t)}).catch(r)})},Z=function(t,e,n){var r;return(r=n,new Promise(function(t){return setTimeout(t,r)})).then(function(){return $(function(){try{return Promise.resolve(e(t))}catch(t){return Promise.reject(t)}}(),1e3)}).catch(function(e){null==t||t.log("warn","Callback Error",{error:e}),null==t||t.stats.increment("callback_error")}).then(function(){return t})},X=function(){var t,e=0,n="";if(!y||h+16>256){for(y=Array(e=256);e--;)y[e]=256*Math.random()|0;e=h=0}for(;e<16;e++)t=y[h+e],n+=6==e?v[15&t|64]:8==e?v[63&t|128]:v[t],1&e&&e>1&&e<11&&(n+="-");return h++,n},tt=function(t,e){t.log("debug","plugin",{plugin:e.name});var n=(new Date).getTime(),r=e[t.event.type];return void 0===r?Promise.resolve(t):function(t){return U(this,void 0,void 0,function(){var e;return V(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,t()];case 1:return[2,n.sent()];case 2:return e=n.sent(),[2,Promise.reject(e)];case 3:return[2]}})})}(function(){return r.apply(e,[t])}).then(function(t){var r=(new Date).getTime()-n;return t.stats.gauge("plugin_time",r,["plugin:".concat(e.name)]),t}).catch(function(n){if(_instanceof(n,w)&&"middleware_cancellation"===n.type)throw n;return _instanceof(n,w)?(t.log("warn",n.type,{plugin:e.name,error:n}),n):(t.log("error","plugin Error",{plugin:e.name,error:n}),t.stats.increment("plugin_error",1,["plugin:".concat(e.name)]),n)})},et=function(t,e){return tt(t,e).then(function(e){if(_instanceof(e,x))return e;t.log("debug","Context canceled"),t.stats.increment("context_canceled"),t.cancel(e)})},nt=function(t,e,n,r){return U(this,void 0,void 0,function(){var i,o;return V(this,function(a){switch(a.label){case 0:return n.emit("dispatch_start",t),i=Date.now(),e.isEmpty()?[4,e.dispatchSingle(t)]:[3,2];case 1:return o=a.sent(),[3,4];case 2:return[4,e.dispatch(t)];case 3:o=a.sent(),a.label=4;case 4:return(null==r?void 0:r.callback)?[4,Z(o,r.callback,O(i,r.timeout))]:[3,6];case 5:o=a.sent(),a.label=6;case 6:return(null==r?void 0:r.debug)&&o.flush(),[2,o]}})})},rt=function(){return"undefined"!=typeof window},it=function(){return!rt()},ot=function(){return!rt()||window.navigator.onLine},at=function(){return!ot()},st=function(t,e){return e=e||{},new Promise(function(n,r){var i=new XMLHttpRequest,o=[],a=[],s={},u=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(JSON.parse(i.responseText))},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return o},entries:function(){return a},get:function(t){return s[t.toLowerCase()]},has:function(t){return t.toLowerCase()in s}}}};for(var c in i.open(e.method||"get",t,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(t,e,n){o.push(e=e.toLowerCase()),a.push([e,n]),s[e]=s[e]?s[e]+","+n:n}),n(u())},i.onerror=r,i.withCredentials="include"==e.credentials,e.headers)i.setRequestHeader(c,e.headers[c]);i.send(e.body||null)})},ut=function(){return A},ct=function(t){console.error("Error sending segment performance metrics",t)},lt=function(t){var e=T.getItem(t);return(e?JSON.parse(e):[]).map(function(t){return new R(t.event,t.id)})},ft=function(t){var e=T.getItem(t);return e?JSON.parse(e):{}},dt=function(t){T.removeItem(t)},pt=function(){return window[Cn]},ht=function(t,e){var n=new Nn.Facade(t,e);return"track"===t.type&&(n=new Nn.Track(t,e)),"identify"===t.type&&(n=new Nn.Identify(t,e)),"page"===t.type&&(n=new Nn.Page(t,e)),"alias"===t.type&&(n=new Nn.Alias(t,e)),"group"===t.type&&(n=new Nn.Group(t,e)),"screen"===t.type&&(n=new Nn.Screen(t,e)),Object.defineProperty(n,"obj",{value:t,writable:!0}),n},vt=function(t,e,n,r){var i=this;return t?((_instanceof(t,Element)?[t]:"toArray"in t?t.toArray():t).forEach(function(t){t.addEventListener("click",function(o){var a,s,u=_instanceof(e,Function)?e(t):e,c=_instanceof(n,Function)?n(t):n,l=t.getAttribute("href")||t.getAttributeNS("http://www.w3.org/1999/xlink","href")||t.getAttribute("xlink:href")||(null===(a=t.getElementsByTagName("a")[0])||void 0===a?void 0:a.getAttribute("href")),f=$(i.track(u,c,null!=r?r:{}),null!==(s=i.settings.timeout)&&void 0!==s?s:500);(function(t,e){return!("_blank"!==t.target||!e)})(t,l)||function(t){var e=t;return!!(e.ctrlKey||e.shiftKey||e.metaKey||e.button&&1==e.button)}(o)||l&&(o.preventDefault?o.preventDefault():o.returnValue=!1,f.catch(console.error).then(function(){window.location.href=l}).catch(console.error))},!1)}),this):this},yt=function(t,e,n,r){var i=this;return t?(_instanceof(t,HTMLFormElement)&&(t=[t]),t.forEach(function(t){if(!_instanceof(t,Element))throw new TypeError("Must pass HTMLElement to trackForm/trackSubmit.");var o=function(o){var a;o.preventDefault?o.preventDefault():o.returnValue=!1;var s=_instanceof(e,Function)?e(t):e,u=_instanceof(n,Function)?n(t):n;$(i.track(s,u,null!=r?r:{}),null!==(a=i.settings.timeout)&&void 0!==a?a:500).catch(console.error).then(function(){t.submit()}).catch(console.error)},a=window.jQuery||window.Zepto;a?a(t).submit(o):t.addEventListener("submit",o,!1)}),this):this},mt=function(t,e,r){return U(this,void 0,void 0,function(){function i(e,r){return U(this,void 0,void 0,function(){var i,o,a;return V(this,function(s){switch(s.label){case 0:return i=!1,o=null,[4,r({payload:ht(e,{clone:!0,traverse:!1}),integration:t,next:function(t){i=!0,null===t&&(o=null),t&&(o=t.obj)}})];case 1:return s.sent(),i||null===o||(o.integrations=n(n({},e.integrations),((a={})[t]=!1,a))),[2,o]}})})}var o,a,s,u,c;return V(this,function(t){switch(t.label){case 0:o=ht(e,{clone:!0,traverse:!1}).rawEvent(),a=0,s=r,t.label=1;case 1:return a<s.length?(u=s[a],[4,i(o,u)]):[3,4];case 2:if(null===(c=t.sent()))return[2,null];o=c,t.label=3;case 3:return a++,[3,1];case 4:return[2,o]}})})},gt=function(t,e){function n(n){return U(this,void 0,void 0,function(){var r;return V(this,function(i){switch(i.label){case 0:return r=!1,[4,t({payload:ht(n.event,{clone:!0,traverse:!1}),integrations:null!=e?e:{},next:function(t){r=!0,t&&(n.event=t.obj)}})];case 1:if(i.sent(),!r)throw new w({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}})})}return{name:"Source Middleware ".concat(t.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(t){return Promise.resolve(t)},track:n,page:n,screen:n,identify:n,alias:n,group:n}},bt=function(t,e){return Object.keys(e).reduce(function(n,r){r.startsWith(t)&&(n[r.substr(t.length)]=e[r]);return n},{})},_t=function(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t}},wt=function(t,e){var n=document.createElement("a");n.href=e;var r=n.search.slice(1).split("&").reduce(function(t,e){var n=e.split("="),r=n[0],i=n[1];return t[r]=_t(i),t},{}),i=[],o=r.ajs_uid,a=r.ajs_event,s=r.ajs_aid,u=Y(t.options.useQueryString)?t.options.useQueryString:{},c=u.aid,l=void 0===c?/.+/:c,f=u.uid,d=void 0===f?/.+/:f;if(s){var p=Array.isArray(r.ajs_aid)?r.ajs_aid[0]:r.ajs_aid;l.test(p)&&t.setAnonymousId(p)}if(o){var h=Array.isArray(r.ajs_uid)?r.ajs_uid[0]:r.ajs_uid;if(d.test(h)){var v=bt("ajs_trait_",r);i.push(t.identify(h,v))}}if(a){var y=Array.isArray(r.ajs_event)?r.ajs_event[0]:r.ajs_event,m=bt("ajs_prop_",r);i.push(t.track(y,m))}return Promise.all(i)},xt=function(t,e){var r,i=Object.entries(null!==(r=e.integrations)&&void 0!==r?r:{}).reduce(function(t,e){var r,i,o=e[0],a=e[1];return"object"===(void 0===a?"undefined":_type_of(a))?n(n({},t),((r={})[o]=a,r)):n(n({},t),((i={})[o]={},i))},{});return Object.entries(t.integrations).reduce(function(t,e){var r,o=e[0],a=e[1];return n(n({},t),((r={})[o]=n(n({},a),i[o]),r))},{})},jt=function(t){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find(function(e){return e.src===t})},kt=function(t,e){var n=jt(t);if(void 0!==n){var r=null==n?void 0:n.getAttribute("status");if("loaded"===r)return Promise.resolve(n);if("loading"===r)return new Promise(function(t,e){n.addEventListener("load",function(){return t(n)}),n.addEventListener("error",function(t){return e(t)})})}return new Promise(function(n,r){var i,o=window.document.createElement("script");o.type="text/javascript",o.src=t,o.async=!0,o.setAttribute("status","loading");for(var a=0,s=Object.entries(null!=e?e:{});a<s.length;a++){var u=s[a],c=u[0],l=u[1];o.setAttribute(c,l)}o.onload=function(){o.onerror=o.onload=null,o.setAttribute("status","loaded"),n(o)},o.onerror=function(){o.onerror=o.onload=null,o.setAttribute("status","error"),r(new Error("Failed to load ".concat(t)))};var f=window.document.querySelector("script");f?null===(i=f.parentElement)||void 0===i||i.insertBefore(o,f):window.document.head.appendChild(o)})},St=function(t,e){var n=e.methodName,r=e.integrationName,i=e.type,o=e.didError,a=void 0!==o&&o;t.stats.increment("analytics_js.integration.invoke".concat(a?".error":""),1,["method:".concat(n),"integration_name:".concat(r),"type:".concat(i)])},Ot=function(t,e){var n,r;return"boolean"==typeof(null==e?void 0:e.enabled)?e.enabled:null===(r=null===(n=null==t?void 0:t.__default)||void 0===n?void 0:n.enabled)||void 0===r||r},Pt=function(t){return t.toLowerCase().replace(".","").replace(/\s+/g,"-")},It=function(t,e){return void 0===e&&(e=!1),e?btoa(t).replace(/=/g,""):void 0},Et=function(t,e,n,r){return U(this,void 0,void 0,function(){var i,o,a,s,u,c;return V(this,function(l){switch(l.label){case 0:i=Pt(e),o=It(i,r),a=_r(),s="".concat(a,"/integrations/").concat(null!=o?o:i,"/").concat(n,"/").concat(null!=o?o:i,".dynamic.js.gz"),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,kt(s)];case 2:return l.sent(),function(t,e,n){var r,i;try{var o=(null!==(i=null===(r=null===window||void 0===window?void 0:window.performance)||void 0===r?void 0:r.getEntriesByName(t,"resource"))&&void 0!==i?i:[])[0];o&&e.stats.gauge("legacy_destination_time",Math.round(o.duration),K([n],o.duration<100?["cached"]:[],!0))}catch(t){}}(s,t,e),[3,4];case 3:throw u=l.sent(),t.stats.gauge("legacy_destination_time",-1,["plugin:".concat(e),"failed"]),u;case 4:return c=window["".concat(i,"Deps")],[4,Promise.all(c.map(function(t){return kt(a+t+".gz")}))];case 5:return l.sent(),window["".concat(i,"Loader")](),[2,window["".concat(i,"Integration")]]}})})},At=function(t,e){return U(this,void 0,void 0,function(){var n,r=this;return V(this,function(i){switch(i.label){case 0:return n=[],at()?[2,e]:[4,Fn(function(){return e.length>0&&ot()},function(){return U(r,void 0,void 0,function(){var r,i;return V(this,function(o){switch(o.label){case 0:return(r=e.pop())?[4,tt(r,t)]:[2];case 1:return i=o.sent(),_instanceof(i,R)||n.push(r),[2]}})})})];case 1:return i.sent(),n.map(function(t){return e.pushWithBackoff(t)}),[2,e]}})})},Mt=function(t,e,r,i,o,a){var s,u;if(void 0===r&&(r={}),void 0===i&&(i={}),it())return[];e.plan&&((i=null!=i?i:{}).plan=e.plan);var c=null!==(u=null===(s=e.middlewareSettings)||void 0===s?void 0:s.routingRules)&&void 0!==u?u:[],l=e.integrations,f=i.integrations,d=xt(e,null!=i?i:{}),p=null==a?void 0:a.reduce(function(t,e){var r;return n(n({},t),((r={})[function(t){return("Integration"in t?t.Integration:t).prototype.name}(e)]=e,r))},{}),h=new Set(K(K([],Object.keys(l).filter(function(t){return Ar(t,l[t])}),!0),Object.keys(p||{}).filter(function(t){return Y(l[t])||Y(null==f?void 0:f[t])}),!0));return Array.from(h).filter(function(t){return!Mr(t,r)}).map(function(e){var n=function(t){var e,n,r,i;return null!==(i=null!==(n=null===(e=null==t?void 0:t.versionSettings)||void 0===e?void 0:e.override)&&void 0!==n?n:null===(r=null==t?void 0:t.versionSettings)||void 0===r?void 0:r.version)&&void 0!==i?i:"latest"}(l[e]),r=new Nr(e,n,t,d[e],i,null==p?void 0:p[e]);return c.filter(function(t){return t.destinationName===e}).length>0&&o&&r.addMiddleware(o),r})},Ct=function(t){return U(this,void 0,void 0,function(){var e;return V(this,function(n){switch(n.label){case 0:return[4,Promise.resolve().then(function(){return Be(Br())})];case 1:return e=n.sent(),t._plugins=e,[2]}})})},Nt=function(t,e){function r(r){var i=t,o=r.event.event;if(i&&o){var a=i[o];if(!Ot(i,a))return r.updateEvent("integrations",n(n({},r.event.integrations),{All:!1,"Segment.io":!0})),r;var s=function(t,e){var n,r;if(!t||!Object.keys(t))return{};var i=t.integrations?Object.keys(t.integrations).filter(function(e){return!1===t.integrations[e]}):[],o=[];return(null!==(n=e.remotePlugins)&&void 0!==n?n:[]).forEach(function(t){i.forEach(function(e){t.creationName==e&&o.push(t.name)})}),(null!==(r=e.remotePlugins)&&void 0!==r?r:[]).reduce(function(t,e){return e.settings.subscriptions&&o.includes(e.name)&&e.settings.subscriptions.forEach(function(n){return t["".concat(e.name," ").concat(n.partnerAction)]=!1}),t},{})}(a,e);r.updateEvent("integrations",n(n(n({},r.event.integrations),null==a?void 0:a.integrations),s))}return r}return{name:"Schema Filter",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:r,alias:r,track:r,identify:r,group:r}},Ft=function(t,e,n){var r;return U(this,void 0,void 0,function(){var i,o,a,s,u=this;return V(this,function(c){switch(c.label){case 0:return it()?[2,[]]:(i=_r(),o=null!==(r=e.enabledMiddleware)&&void 0!==r?r:{},a=Object.entries(o).filter(function(t){t[0];return t[1]}).map(function(t){return t[0]}),s=a.map(function(e){return U(u,void 0,void 0,function(){var r,o,a,s;return V(this,function(u){switch(u.label){case 0:r=e.replace("@segment/",""),o=r,n&&(o=btoa(r).replace(/=/g,"")),a="".concat(i,"/middleware/").concat(o,"/latest/").concat(o,".js.gz"),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,kt(a)];case 2:return u.sent(),[2,window["".concat(r,"Middleware")]];case 3:return s=u.sent(),t.log("error",s),t.stats.increment("failed_remote_middleware"),[3,4];case 4:return[2]}})})}),[4,Promise.all(s)]);case 1:return[2,c.sent().filter(Boolean)]}})})},Dt=function(t,e){if("collector"===t)return"collector";if(!e)throw new Error("stepId(".concat(t,") requires an id"));return"".concat(t,".").concat(e)},Rt=function(t,e){var n=t.destinations[e];if(!n)throw new Error("Destination not found: ".concat(e));return n},Tt=function(t,e){var n=t.transformers[e];if(!n)throw new Error("Transformer not found: ".concat(e));return n},Lt=function(t,e){var n=t.sources[e];if(!n)throw new Error("Source not found: ".concat(e));return n},qt=function(t,e){var n=t.stores[e];if(!n)throw new Error("Store not found: ".concat(e));return n},Bt=function(t,e){return _async_to_generator(function(){return _ts_generator(this,function(n){switch(n.label){case 0:return[4,t.get(e)];case 1:return[2,n.sent()]}})})()},zt=function(t){return Array.isArray(t)},Ut=function(t){return void 0!==t},Vt=function(t){return"object"==(void 0===t?"undefined":_type_of(t))&&null!==t&&!zt(t)&&"[object Object]"===Object.prototype.toString.call(t)},Kt=function(t){return"string"==typeof t},Ht=function(t){return Xr(t)?t:void 0},Gt=function(t,e,n){return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return _async_to_generator(function(){var r;return _ts_generator(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,4,6]),[4,t.apply(void 0,_to_consumable_array(i))];case 1:case 3:return[2,o.sent()];case 2:return r=o.sent(),e?[4,e(r)]:[2];case 4:return[4,null==n?void 0:n()];case 5:return o.sent(),[7];case 6:return[2]}})})()}},Jt=function(t){return _async_to_generator(function(t){var e,n,r,i,o,a,s,u,c,l,f,d,p,h,v,y,m=arguments;return _ts_generator(this,function(g){switch(g.label){case 0:if(e=m.length>1&&void 0!==m[1]?m[1]:{},n=m.length>2&&void 0!==m[2]?m[2]:{},!Ut(t))return[2];if(o=Vt(t)&&t.consent||n.consent||(null===(i=n.collector)||void 0===i?void 0:i.consent),a=null!==(r=n.event)&&void 0!==r?r:Vt(t)?t:{},!n.collector)throw new Error("getMappingValue: context.collector is required");s={event:a,mapping:e,collector:n.collector,logger:n.collector.logger,consent:o},u=zt(e)?e:[e],c=!0,l=!1,f=void 0,g.label=1;case 1:g.trys.push([1,6,7,8]),d=u[Symbol.iterator](),g.label=2;case 2:return(c=(p=d.next()).done)?[3,5]:(h=p.value,[4,Gt(ei,function(t){if(_instanceof(t,ti))throw t;n.collector&&n.collector.status.failed++,s.logger.error("mapping processing failed",{event:a,error:t})})(t,h,_object_spread_props(_object_spread({},s),{mapping:h}))]);case 3:if(v=g.sent(),Ut(v))return[2,v];g.label=4;case 4:return c=!0,[3,2];case 5:return[3,8];case 6:return y=g.sent(),l=!0,f=y,[3,8];case 7:try{c||null==d.return||d.return()}finally{if(l)throw f}return[7];case 8:return[2]}})}).apply(this,arguments)},Wt=function(t,e,n,r){var i,o=[t,e,n,r],a=Y(t)?t.event:t;if(!a||!G(a))throw new Error("Event missing");var s=Y(t)?null!==(i=t.properties)&&void 0!==i?i:{}:Y(e)?e:{},u={};return W(n)||(u=null!=n?n:{}),Y(t)&&!W(e)&&(u=null!=e?e:{}),[a,s,u,o.find(W)]},Yt=function(t,e,n,r,i){var o,a,s=null,u=null,c=[t,e,n,r,i],l=c.filter(G);1===l.length?G(c[1])?(u=c[1],s=null):(u=l[0],s=null):2===l.length&&("string"==typeof c[0]&&(s=c[0]),"string"==typeof c[1]&&(u=c[1]));var f=c.find(W),d=c.filter(Y);return 1===d.length?Y(c[2])?(a={},o=c[2]):Y(c[3])?(o={},a=c[3]):(o=d[0],a={}):2===d.length&&(o=d[0],a=d[1]),[s,u,null!=o?o:o={},null!=a?a:a={},f]},Qt=function(t,e,n,r){J(t)&&(t=t.toString()),J(e)&&(e=e.toString());var i=[t,e,n,r],o=i.filter(G),a=o[0],s=void 0===a?t:a,u=o[1],c=void 0===u?null:u,l=i.filter(Y)[0];return[s,c,void 0===l?{}:l,i.find(W)]},$t=function(t){if(e=t,"object"!==Object.prototype.toString.call(e).slice(8,-1).toLowerCase())return!1;var e;if(t.__t!==ri)return!1;for(var n in t)if(!oi.includes(n))return!1;return!0},Zt=function(t){for(var e=t.constructor.prototype,n=0,r=Object.getOwnPropertyNames(e);n<r.length;n++){var i=r[n];if("constructor"!==i){var o=Object.getOwnPropertyDescriptor(t.constructor.prototype,i);o&&"function"==typeof o.value&&(t[i]=t[i].bind(t))}}return t},Xt=function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t},te=function(t){var e=function(t){try{return new URL(t)}catch(t){return}}(t);if(e)for(var n=function(t){var e=t.hostname.split("."),n=e[e.length-1],r=[];if(4===e.length&&parseInt(n,10)>0)return r;if(e.length<=1)return r;for(var i=e.length-2;i>=0;--i)r.push(e.slice(i).join("."));return r}(e),r=0;r<n.length;++r){var i="__tld__",o=n[r],a={domain:"."+o};try{if(pi.set(i,"1",a),pi.get(i))return pi.remove(i,a),o}catch(t){return}}},ee=function(t){return t&&t.stores&&Array.isArray(t.stores)&&t.stores.every(function(t){return Object.values(mi).includes(t)})},ne=function(t){return t.map(function(t){var e,n;switch(!function(t){return"object"===(void 0===t?"undefined":_type_of(t))&&void 0!==t.name}(t)?e=t:(e=t.name,n=t.settings),e){case mi.Cookie:return new hi(n);case mi.LocalStorage:return new vi;case mi.Memory:return new yi;default:throw new Error("Unknown Store Type: ".concat(t))}})},re=function(t,e){return t.map(function(t){return e&&t===mi.Cookie?{name:t,settings:e}:t})},ie=function(t,e){return U(this,void 0,void 0,function(){var n,r;return V(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e.called?[2,void 0]:(e.called=!0,n=t[e.method].apply(t,e.args),ki(n)?[4,n]:[3,2]);case 1:i.sent(),i.label=2;case 2:return e.resolve(n),[3,4];case 3:return r=i.sent(),e.reject(r),[3,4];case 4:return[2]}})})},oe=function(t,e,n,r){var i=null!=t?t:e;return Math.min(Math.max(i,n),r)},ae=function(t,e){var n;if(429!==t.status)return null;var r=null===(n=t.headers)||void 0===n?void 0:n.get("Retry-After");if(!r)return null;var i=parseInt(r,10);return Number.isNaN(i)?null:{retryAfterMs:1e3*Math.max(0,Math.min(i,e.maxRetryInterval)),fromHeader:!0}},se=function(t,e){var n=e.statusCodeOverrides[String(t)];return n||(t>=500?e.default5xxBehavior:t>=400?e.default4xxBehavior:"drop")},ue=function(t,e){var r,i,o,a,s=t||e?{rateLimitConfig:n(n({},null==t?void 0:t.rateLimitConfig),null==e?void 0:e.rateLimitConfig),backoffConfig:n(n(n({},null==t?void 0:t.backoffConfig),null==e?void 0:e.backoffConfig),{statusCodeOverrides:n(n({},null===(r=null==t?void 0:t.backoffConfig)||void 0===r?void 0:r.statusCodeOverrides),null===(i=null==e?void 0:e.backoffConfig)||void 0===i?void 0:i.statusCodeOverrides)})}:void 0,u=null==s?void 0:s.rateLimitConfig,c=null==s?void 0:s.backoffConfig;return{rateLimitConfig:{maxRetryCount:oe(null==u?void 0:u.maxRetryCount,10,0,100),maxRetryInterval:oe(null==u?void 0:u.maxRetryInterval,300,.1,86400),maxRateLimitDuration:oe(null==u?void 0:u.maxRateLimitDuration,43200,10,86400)},backoffConfig:{maxRetryCount:oe(null==c?void 0:c.maxRetryCount,10,0,100),baseBackoffInterval:oe(null==c?void 0:c.baseBackoffInterval,.5,.1,300),maxBackoffInterval:oe(null==c?void 0:c.maxBackoffInterval,60,.1,86400),maxTotalBackoffDuration:oe(null==c?void 0:c.maxTotalBackoffDuration,43200,60,604800),jitterPercent:oe(null==c?void 0:c.jitterPercent,10,0,100),default4xxBehavior:null!==(o=null==c?void 0:c.default4xxBehavior)&&void 0!==o?o:"drop",default5xxBehavior:null!==(a=null==c?void 0:c.default5xxBehavior)&&void 0!==a?a:"retry",statusCodeOverrides:n(n({},qi),null==c?void 0:c.statusCodeOverrides)}}},ce=function(t){return(encodeURI(JSON.stringify(t)).split(/%..|./).length-1)/1024},le=function(t){return ce(t)>=Bi-50},fe=function(t,e,r,i){var o,a;void 0===i&&(i="https");var s,u=[],c=!1,l=null!==(o=null==e?void 0:e.size)&&void 0!==o?o:10,f=null!==(a=null==e?void 0:e.timeout)&&void 0!==a?a:5e3,d=null!=r?r:ue(),p=0,h=0,v=!1,y=!1,m=0,g=0,b=0;function _(n,r){var o;if(0!==n.length){var a=null===(o=n[0])||void 0===o?void 0:o.writeKey,s=n.map(function(t){var e=t;e.sentAt;return z(e,["sentAt"])}),u=Li(null==e?void 0:e.headers);if(r>0&&(u["X-Retry-Count"]=String(r)),a){var l=btoa(a+":");u.Authorization="Basic ".concat(l)}var f=t.startsWith("http://")||t.startsWith("https://")?"":"".concat(i,"://");return I("".concat(f).concat(t,"/b"),{credentials:null==e?void 0:e.credentials,keepalive:(null==e?void 0:e.keepalive)||c,headers:u,method:"post",body:JSON.stringify({writeKey:a,batch:s,sentAt:(new Date).toISOString()}),priority:null==e?void 0:e.priority}).then(function(t){var e=t.status;if(!(e<400)){var n=se(e,d.backoffConfig);if("drop"!==n){var r=ae(t,d.rateLimitConfig);if(r)throw new Ti("Rate limit exceeded: ".concat(e),r.retryAfterMs,r.fromHeader)}if("retry"===n)throw new Error("Retryable error: ".concat(e))}})}}function w(){u.length>0&&j(1)}function x(t){var r;return void 0===t&&(t=1),U(this,void 0,void 0,function(){var i,o,a,s;return V(this,function(c){return v||(h=0,m=0,g=0,b=0),v=!1,y=!0,u.length?(i=function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n],i=K(K([],e,!0),[r],!1);if(e.length>0&&le(i))return{batch:e,remaining:t.slice(n)};e.push(r)}return{batch:e,remaining:[]}}(u),o=i.batch,a=i.remaining,0===o.length?(y=!1,[2]):(u=a,s=h,h+=1,[2,null===(r=_(o,s))||void 0===r?void 0:r.then(function(t){return u.length>0&&j(1),t}).catch(function(r){var i;R.system().log("error","Error sending batch",r);var a,s=null!==(i=null==e?void 0:e.maxRetries)&&void 0!==i?i:d.backoffConfig.maxRetryCount,c="RateLimitError"===r.name,l=c&&r.isRetryableWithoutCount;if(!(l||t<=s))return w();if(l){if(++m>d.rateLimitConfig.maxRetryCount)return w();var f=r.retryTimeout;b+=f;var h=1e3*d.rateLimitConfig.maxRateLimitDuration;if(b>h)return w();p=f}if(!c){a=function(t,e){var n=1e3*e.baseBackoffInterval,r=1e3*e.maxBackoffInterval,i=n*Math.pow(2,t-1),o=Math.min(i,r),a=1+2*(Math.random()-.5)*(e.jitterPercent/100);return Math.max(0,o*a)}(t,d.backoffConfig),g+=a;var y=1e3*d.backoffConfig.maxTotalBackoffDuration;if(g>y)return w()}u=K(K([],o,!0),u,!0),o.forEach(function(e){if("_metadata"in e){var r=e;r._metadata=n(n({},r._metadata),{retryCount:t})}}),v=!0,j(l?t:t+1,a)}).finally(function(){y=!1})])):(y=!1,[2])})})}function j(t,e){(void 0===t&&(t=1),s)||(s=setTimeout(function(){s=void 0,x(t).catch(console.error)},p||e||f),p=0)}return Ri(function(t){if((c=t)&&u.length){var e=(n=u,r=[],i=0,n.forEach(function(t){ce(r[i])>=64&&i++,r[i]?r[i].push(t):r[i]=[t]}),r).map(function(t){return _(t,0)});Promise.all(e).catch(console.error)}var n,r,i}),{dispatch:function(t,n,r){return U(this,void 0,void 0,function(){var t;return V(this,function(r){return u.push(n),v?[2]:(t=u.length>=l||le(u)||(null==e?void 0:e.keepalive)&&function(t){return ce(t)>=zi-10}(u),t||c?[2,y?j():x()]:[2,j()])})})}}},de=function(t,e,r,i,o){var a,s=t.user();delete e.options,e.writeKey=null==r?void 0:r.apiKey,e.userId=e.userId||s.id(),e.anonymousId=e.anonymousId||s.anonymousId(),e.sentAt=new Date;var u=t.queue.failedInitializations||[];u.length>0&&(e._metadata={failedInitializations:u}),null!=o&&(o.attempts>1&&(e._metadata=n(n({},e._metadata),{retryCount:o.attempts})),o.attempts++);var c=[],l=[];for(var f in i){var d=i[f];"Segment.io"===f&&c.push(f),"bundled"===d.bundlingStatus&&c.push(f),"unbundled"===d.bundlingStatus&&l.push(f)}for(var p=0,h=(null==r?void 0:r.unbundledIntegrations)||[];p<h.length;p++){var v=h[p];l.includes(v)||l.push(v)}var y=null!==(a=null==r?void 0:r.maybeBundledConfigIds)&&void 0!==a?a:{},m=[];return c.sort().forEach(function(t){var e;(null!==(e=y[t])&&void 0!==e?e:[]).forEach(function(t){m.push(t)})}),!1!==(null==r?void 0:r.addBundledMetadata)&&(e._metadata=n(n({},e._metadata),{bundled:c.sort(),unbundled:l.sort(),bundledIds:m})),e},pe=function(t,e){return U(this,void 0,void 0,function(){var n,r=this;return V(this,function(i){switch(i.label){case 0:return n=[],at()?[2,e]:[4,Fn(function(){return e.length>0&&!at()},function(){return U(r,void 0,void 0,function(){var r,i;return V(this,function(o){switch(o.label){case 0:return(r=e.pop())?[4,tt(r,t)]:[2];case 1:return i=o.sent(),_instanceof(i,R)||n.push(r),[2]}})})})];case 1:return i.sent(),n.map(function(t){return e.pushWithBackoff(t)}),[2,e]}})})},he=function(t,e,n,r){var i=this;t||setTimeout(function(){return U(i,void 0,void 0,function(){var t,i;return V(this,function(o){switch(o.label){case 0:return t=!0,[4,pe(n,e)];case 1:return i=o.sent(),t=!1,e.todo>0&&r(t,i,n,r),[2]}})})},500*Math.random()+100)},ve=function(t,e,n){var r,i,o,a;window.addEventListener("pagehide",function(){u.push.apply(u,Array.from(c)),c.clear()});var s=null!==(r=null==e?void 0:e.apiKey)&&void 0!==r?r:"",u=t.options.disableClientPersistence?new p(t.queue.queue.maxAttempts,[]):new q(t.queue.queue.maxAttempts,"".concat(s,":dest-Segment.io")),c=new Set,l=new WeakMap,f=!1,d=null!==(i=null==e?void 0:e.apiHost)&&void 0!==i?i:M,h=null!==(o=null==e?void 0:e.protocol)&&void 0!==o?o:"https",v="".concat(h,"://").concat(d),y=null===(a=null==n?void 0:n["Segment.io"])||void 0===a?void 0:a.httpConfig,m=null==e?void 0:e.httpConfig,g=ue(m,y);!1!==t.options.retryQueue&&(u.maxAttempts=g.backoffConfig.maxRetryCount);var b,_,w=null==e?void 0:e.deliveryStrategy,x=w&&"strategy"in w&&"batching"===w.strategy?fe(d,w.config,g,h):(b=null==w?void 0:w.config,_=g,{dispatch:function(t,e,n){var r=Li(null==b?void 0:b.headers),i=null==e?void 0:e.writeKey;if(i){var o=btoa(i+":");r.Authorization="Basic ".concat(o)}return n&&(r["X-Retry-Count"]=String(n)),I(t,{credentials:null==b?void 0:b.credentials,keepalive:null==b?void 0:b.keepalive,headers:r,method:"post",body:JSON.stringify(e),priority:null==b?void 0:b.priority}).then(function(t){var e=t.status;if(!(e<400)){var n=null!=_?_:ue(),r=se(e,n.backoffConfig);if("drop"!==r){var i=ae(t,n.rateLimitConfig);if(i)throw new Ti("Rate limit exceeded: ".concat(e),i.retryAfterMs,i.fromHeader)}if("retry"===r)throw new Error("Retryable error: ".concat(e));var o=new Error("Non-retryable error: ".concat(e));throw o.name="NonRetryableError",o}})}});function j(r){return U(this,void 0,void 0,function(){var i,o,a,s;return V(this,function(d){return at()?(u.push(r),he(f,u,k,he),[2,r]):(c.add(r),i=r.event.type.charAt(0),o=ht(r.event).json(),"track"===r.event.type&&delete o.traits,"alias"===r.event.type&&(o=function(t,e){var n,r,i,o,a=t.user();return e.previousId=null!==(i=null!==(r=null!==(n=e.previousId)&&void 0!==n?n:e.from)&&void 0!==r?r:a.id())&&void 0!==i?i:a.anonymousId(),e.userId=null!==(o=e.userId)&&void 0!==o?o:e.to,delete e.from,delete e.to,e}(t,o)),(a=u.getAttempts(r))>=u.maxAttempts?(c.delete(r),s=new Error("Retry attempts exhausted (".concat(a,"/").concat(u.maxAttempts,")")),r.setFailedDelivery({reason:s}),t.emit("error",{code:"delivery_failure",reason:s,ctx:r}),[2,r]):[2,x.dispatch("".concat(v,"/").concat(i),de(t,o,e,n,r),a).then(function(){return r}).catch(function(e){var n;if(r.log("error","Error sending event",e),"RateLimitError"===e.name){var i=(null!==(n=l.get(r))&&void 0!==n?n:0)+1;if(l.set(r,i),i>g.rateLimitConfig.maxRetryCount)r.setFailedDelivery({reason:e}),t.emit("error",{code:"delivery_failure",reason:e,ctx:r});else{var o=e.retryTimeout;u.pushWithDelay(r,o)}}else"NonRetryableError"===e.name?(r.setFailedDelivery({reason:e}),t.emit("error",{code:"delivery_failure",reason:e,ctx:r})):u.pushWithBackoff(r);return he(f,u,k,he),r}).finally(function(){c.delete(r)})])})})}var k={metadata:{writeKey:s,apiHost:d,protocol:h},name:"Segment.io",type:"destination",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:j,identify:j,page:j,alias:j,group:j,screen:j};return u.todo&&he(f,u,k,he),k},ye=function(){console.warn(Ki)},me=function(){return"undefined"!=typeof process&&process.env?process.env:{}},ge=function(t){return U(this,void 0,void 0,function(){var e;return V(this,function(n){return(e=navigator.userAgentData)?t?[2,e.getHighEntropyValues(t).catch(function(){return e.toJSON()})]:[2,e.toJSON()]:[2,void 0]})})},be=function(){if(Ui)return Ui;var t=te(window.location.href);return Ui={expires:31536e6,secure:!1,path:"/"},t&&(Ui.domain=t),Ui},_e=function(t,e){return U(this,void 0,void 0,function(){var n,r,i,o,a,s;return V(this,function(u){switch(u.label){case 0:if(u.trys.push([0,9,,10]),n=new RegExp("https://cdn.segment.(com|build)"),r=br(),!e)return[3,6];i=t.url.split("/"),o=i[i.length-2],a=t.url.replace(o,btoa(o).replace(/=/g,"")),u.label=1;case 1:return u.trys.push([1,3,,5]),[4,kt(a.replace(n,r))];case 2:return u.sent(),[3,5];case 3:return u.sent(),[4,kt(t.url.replace(n,r))];case 4:return u.sent(),[3,5];case 5:return[3,8];case 6:return[4,kt(t.url.replace(n,r))];case 7:u.sent(),u.label=8;case 8:return"function"==typeof window[t.libraryName]?[2,window[t.libraryName]]:[3,10];case 9:throw s=u.sent(),console.error("Failed to create PluginFactory",t),s;case 10:return[2]}})})},we=function(t,e,r,i,o,a){var s,u,c;return U(this,void 0,void 0,function(){var l,f,d,p=this;return V(this,function(h){switch(h.label){case 0:return l=[],f=null!==(u=null===(s=t.middlewareSettings)||void 0===s?void 0:s.routingRules)&&void 0!==u?u:[],d=(null!==(c=t.remotePlugins)&&void 0!==c?c:[]).map(function(t){return U(p,void 0,void 0,function(){var s,u,c,d,p,h,v;return V(this,function(y){switch(y.label){case 0:if(function(t,e){var n=t[e.creationName],r=t[e.name];return!1===t.All&&!n&&!r||!1===n||!1===r}(e,t))return[2];y.label=1;case 1:return y.trys.push([1,6,,7]),(u=null==a?void 0:a.find(function(e){return e.pluginName===t.name}))?[3,3]:[4,_e(t,null==i?void 0:i.obfuscate)];case 2:u=y.sent(),y.label=3;case 3:return(s=u)?(c=r[t.name],[4,s(n(n({},t.settings),c))]):[3,5];case 4:d=y.sent(),function(t){if(!Array.isArray(t))throw new Error("Not a valid list of plugins");var e=["load","isLoaded","name","version","type"];t.forEach(function(t){e.forEach(function(e){var n;if(void 0===t[e])throw new Error("Plugin: ".concat(null!==(n=t.name)&&void 0!==n?n:"unknown"," missing required function ").concat(e))})})}(p=Array.isArray(d)?d:[d]),h=f.filter(function(e){return e.destinationName===t.creationName}),p.forEach(function(e){var n=new Xi(t.creationName,e);h.length&&o&&n.addMiddleware(o),l.push(n)}),y.label=5;case 5:return[3,7];case 6:return v=y.sent(),console.warn("Failed to load Remote Plugin",v),St(R.system(),{integrationName:t.name,methodName:"load",type:"action",didError:!0}),[3,7];case 7:return[2]}})})}),[4,Promise.all(d)];case 1:return h.sent(),[2,l.filter(Boolean)]}})})},xe=function(t,e,n){return U(this,void 0,void 0,function(){return V(this,function(r){switch(r.label){case 0:return[4,ro(t,e)];case 1:return r.sent(),Ai(t,n),[2]}})})},je=function(t,e,n,r,i,o,a){var s,u,c;return void 0===i&&(i=[]),U(this,void 0,void 0,function(){var l,f,d,p,h,v,y,m,g,b,_,w,x,j,k=this;return V(this,function(S){switch(S.label){case 0:return function(t,e){Ei(t,e),Ii(t,e)}(n,a),l=null==i?void 0:i.filter(function(t){return"object"===(void 0===t?"undefined":_type_of(t))}),f=null==i?void 0:i.filter(function(t){return"function"==typeof t&&"string"==typeof t.pluginName}),function(t){var e,n,r;return"test"!==me().NODE_ENV&&(null!==(r=null===(n=null===(e=t.middlewareSettings)||void 0===e?void 0:e.routingRules)||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0}(e)?[4,Promise.resolve().then(function(){return Fr(),Er}).then(function(t){return t.tsubMiddleware(e.middlewareSettings.routingRules)})]:[3,2];case 1:return p=S.sent(),[3,3];case 2:p=void 0,S.label=3;case 3:return d=p,O=e,"test"!==me().NODE_ENV&&Object.keys(O.integrations).length>1||o.length>0?[4,Promise.resolve().then(function(){return qr(),Lr}).then(function(i){return i.ajsDestinations(t,e,n.integrations,r,d,o)})]:[3,5];case 4:return v=S.sent(),[3,6];case 5:v=[],S.label=6;case 6:return h=v,e.legacyVideoPluginsEnabled?[4,Promise.resolve().then(function(){return Ur(),zr}).then(function(t){return t.loadLegacyVideoPlugins(n)})]:[3,8];case 7:S.sent(),S.label=8;case 8:return(null===(s=r.plan)||void 0===s?void 0:s.track)?[4,Promise.resolve().then(function(){return Kr(),Vr}).then(function(t){var n;return t.schemaFilter(null===(n=r.plan)||void 0===n?void 0:n.track,e)})]:[3,10];case 9:return m=S.sent(),[3,11];case 10:m=void 0,S.label=11;case 11:return y=m,g=xt(e,r),[4,we(e,n.integrations,g,r,d,f).catch(function(t){return console.error("Failed to load remote plugins",t),[]})];case 12:return b=S.sent(),_=K(K([Qi],h,!0),b,!0),y&&_.push(y),!1===(null===(u=r.integrations)||void 0===u?void 0:u.All)&&!r.integrations["Segment.io"]||r.integrations&&!1===r.integrations["Segment.io"]?[3,14]:(x=(w=_).push,[4,ve(n,g["Segment.io"],e.integrations)]);case 13:x.apply(w,[S.sent()]),S.label=14;case 14:return[4,n.register.apply(n,K(K([],_,!1),l,!1))];case 15:return j=S.sent(),[4,Pi(n,a)];case 16:return S.sent(),Object.entries(null!==(c=e.enabledMiddleware)&&void 0!==c?c:{}).some(function(t){return t[1]})?[4,Promise.resolve().then(function(){return Gr(),Hr}).then(function(t){var i=t.remoteMiddlewares;return U(k,void 0,void 0,function(){var t,o;return V(this,function(a){switch(a.label){case 0:return[4,i(j,e,r.obfuscate)];case 1:return t=a.sent(),o=t.map(function(t){return n.addSourceMiddleware(t)}),[2,Promise.all(o)]}})})})]:[3,18];case 17:S.sent(),S.label=18;case 18:return[4,Oi(n,a)];case 19:return S.sent(),[2,j]}var O})})},ke=function(t,e,r){var i,o,a,s,u,c,l,f,d;return void 0===e&&(e={}),U(this,void 0,void 0,function(){var p,h,v,y,m,g,b,_,w,x;return V(this,function(j){switch(j.label){case 0:return!0===e.disable?[2,[new Yi,R.system()]]:(e.globalAnalyticsKey&&(O=e.globalAnalyticsKey,Cn=O),t.cdnURL&&gr(t.cdnURL),e.initialPageview&&r.add(new Ni("page",[])),p=no(),h=null!==(i=t.cdnURL)&&void 0!==i?i:br(),null===(o=t.cdnSettings)||void 0===o?[3,1]:(y=o,[3,3]));case 1:return[4,(k=t.writeKey,S=h,I("".concat(S,"/v1/projects/").concat(k,"/settings")).then(function(t){return t.ok?t.json():t.text().then(function(t){throw new Error(t)})}).catch(function(t){throw console.error(t.message),t}))];case 2:y=j.sent(),j.label=3;case 3:return v=y,e.updateCDNSettings&&(v=e.updateCDNSettings(v)),"function"!=typeof e.disable?[3,5]:[4,e.disable(v)];case 4:if(j.sent())return[2,[new Yi,R.system()]];j.label=5;case 5:return m=null===(s=null===(a=v.integrations["Segment.io"])||void 0===a?void 0:a.retryQueue)||void 0===s||s,e=n({retryQueue:m},e),g=new Wi(n(n({},t),{cdnSettings:v,cdnURL:h}),e),eo(g),b=null!==(u=t.plugins)&&void 0!==u?u:[],_=null!==(c=t.classicIntegrations)&&void 0!==c?c:[],w=null===(l=e.integrations)||void 0===l?void 0:l["Segment.io"],D.initRemoteMetrics(n(n({},v.metrics),{host:null!==(f=null==w?void 0:w.apiHost)&&void 0!==f?f:null===(d=v.metrics)||void 0===d?void 0:d.host,protocol:null==w?void 0:w.protocol})),[4,je(t.writeKey,v,g,e,b,_,r)];case 6:return x=j.sent(),g.initialized=!0,g.emit("initialize",t,e),[4,xe(g,p,r)];case 7:return j.sent(),[2,[g,x]]}var k,S,O})})},Se=function(t){var e;return null!==(e=null==t?void 0:t.analytics)&&void 0!==e?e:so},Oe=function(t,e){var n=e.apiKey,r=(e.identify,e.group,e.consent,e._state,_object_spread({initialPageview:!1},_object_without_properties(e,["apiKey","identify","group","consent","_state"])));return t.load({writeKey:n},r)},Pe=function(t){if(!t)return"";try{return JSON.stringify(t)}catch(t){return""}},Ie=function(t,e,n,r,i){return _async_to_generator(function(){var o,a,s,u,c;return _ts_generator(this,function(l){switch(l.label){case 0:return!0===e?(i?t.page(void 0,void 0,void 0,i):t.page(),[2]):[4,Jt(n,e,{collector:r})];case 1:return o=l.sent(),Vt(o)?(s=Kt((a=o).category)?a.category:void 0,u=Kt(a.name)?a.name:void 0,c=Vt(a.properties)&&!zt(a.properties)?a.properties:void 0,i?t.page(null!=s?s:null,null!=u?u:null,null!=c?c:{},i):void 0!==c?t.page(null!=s?s:null,null!=u?u:null,c):void 0!==u||void 0!==s?t.page(null!=s?s:null,null!=u?u:null):t.page(),[2]):[2]}})})()},Ee=Object.create,Ae=Object.defineProperty,Me=Object.getOwnPropertyDescriptor,Ce=Object.getOwnPropertyNames,Ne=Object.getPrototypeOf,Fe=Object.prototype.hasOwnProperty,De=(t=function(t){if("undefined"!=typeof require)return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')},"undefined"!=typeof require?require:"undefined"!=typeof Proxy?new Proxy(t,{get:function(t,e){return("undefined"!=typeof require?require:t)[e]}}):t),Re=function(t,e){return function(){return t&&(e=(0,t[Ce(t)[0]])(t=0)),e}},Te=function(t,e){return function(){return e||(0,t[Ce(t)[0]])((e={exports:{}}).exports,e),e.exports}},Le=function(t,e){for(var n in e)Ae(t,n,{get:e[n],enumerable:!0})},qe=function(t,e,n,r){if(e&&"object"===(void 0===e?"undefined":_type_of(e))||"function"==typeof e){var i=!0,o=!1,a=void 0;try{for(var s,u=function(){var i=s.value;Fe.call(t,i)||i===n||Ae(t,i,{get:function(){return e[i]},enumerable:!(r=Me(e,i))||r.enumerable})},c=Ce(e)[Symbol.iterator]();!(i=(s=c.next()).done);i=!0)u()}catch(t){o=!0,a=t}finally{try{i||null==c.return||c.return()}finally{if(o)throw a}}}return t},Be=function(t,e,n){return n=null!=t?Ee(Ne(t)):{},qe(!e&&t&&t.__esModule?n:Ae(n,"default",{value:t,enumerable:!0}),t)},ze=Re({"../../../../node_modules/tslib/tslib.es6.mjs":function(){e=function(t,n){return(e=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,n)},n=function(){return n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},n.apply(this,arguments)}}}),Ue=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/emitter/interface.js":function(){}}),Ve=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/plugins/index.js":function(){}}),Ke=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/events/interfaces.js":function(){}}),He=Re({"../../../../node_modules/dset/dist/index.mjs":function(){}}),Ge=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/utils/pick.js":function(){r=function(t,e){return Object.keys(t).filter(function(n){return e(n,t[n])}).reduce(function(e,n){return e[n]=t[n],e},{})}}}),Je=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/validation/errors.js":function(){ze(),i=function(t){function e(e,n){var r=t.call(this,"".concat(e," ").concat(n))||this;return r.field=e,r}return B(e,t),e}(Error)}}),We=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/validation/helpers.js":function(){}}),Ye=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/validation/assertions.js":function(){Je(),We(),o="is not a string",a="is not an object",s="is nil"}}),Qe=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/events/index.js":function(){ze(),Ke(),He(),Ge(),Ye(),u=function(t){var e,n;this.settings=t,this.createMessageId=t.createMessageId,this.onEventMethodCall=null!==(e=t.onEventMethodCall)&&void 0!==e?e:function(){},this.onFinishedEvent=null!==(n=t.onFinishedEvent)&&void 0!==n?n:function(){}},c=function(){function t(t){this.settings=new u(t)}return t.prototype.track=function(t,e,r,i){return this.settings.onEventMethodCall({type:"track",options:r}),this.normalize(n(n({},this.baseEvent()),{event:t,type:"track",properties:null!=e?e:{},options:n({},r),integrations:n({},i)}))},t.prototype.page=function(t,e,r,i,o){var a;this.settings.onEventMethodCall({type:"page",options:i});var s={type:"page",properties:n({},r),options:n({},i),integrations:n({},o)};return null!==t&&(s.category=t,s.properties=null!==(a=s.properties)&&void 0!==a?a:{},s.properties.category=t),null!==e&&(s.name=e),this.normalize(n(n({},this.baseEvent()),s))},t.prototype.screen=function(t,e,r,i,o){this.settings.onEventMethodCall({type:"screen",options:i});var a={type:"screen",properties:n({},r),options:n({},i),integrations:n({},o)};return null!==t&&(a.category=t),null!==e&&(a.name=e),this.normalize(n(n({},this.baseEvent()),a))},t.prototype.identify=function(t,e,r,i){return this.settings.onEventMethodCall({type:"identify",options:r}),this.normalize(n(n({},this.baseEvent()),{type:"identify",userId:t,traits:null!=e?e:{},options:n({},r),integrations:i}))},t.prototype.group=function(t,e,r,i){return this.settings.onEventMethodCall({type:"group",options:r}),this.normalize(n(n({},this.baseEvent()),{type:"group",traits:null!=e?e:{},options:n({},r),integrations:n({},i),groupId:t}))},t.prototype.alias=function(t,e,r,i){this.settings.onEventMethodCall({type:"alias",options:r});var o={userId:t,type:"alias",options:n({},r),integrations:n({},i)};return null!==e&&(o.previousId=e),void 0===t?this.normalize(n(n({},o),this.baseEvent())):this.normalize(n(n({},this.baseEvent()),o))},t.prototype.baseEvent=function(){return{integrations:{},options:{}}},t.prototype.context=function(t){var e,n=["userId","anonymousId","timestamp","messageId"];delete t.integrations;var r=Object.keys(t),i=null!==(e=t.context)&&void 0!==e?e:{},o={};return r.forEach(function(e){"context"!==e&&(n.includes(e)?H(o,e,t[e]):H(i,e,t[e]))}),[i,o]},t.prototype.normalize=function(t){var e,i,o=Object.keys(null!==(e=t.integrations)&&void 0!==e?e:{}).reduce(function(e,r){var i,o;return n(n({},e),((i={})[r]=Boolean(null===(o=t.integrations)||void 0===o?void 0:o[r]),i))},{});t.options=r(t.options||{},function(t,e){return void 0!==e});var a=n(n({},o),null===(i=t.options)||void 0===i?void 0:i.integrations),s=t.options?this.context(t.options):[],u=s[0],c=s[1],l=t.options,f=z(t,["options"]),d=n(n(n(n({timestamp:new Date},f),{context:u,integrations:a}),c),{messageId:l.messageId||this.settings.createMessageId()});return this.settings.onFinishedEvent(d),Q(d),d},t}()}}),$e=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/callback/index.js":function(){}}),Ze=Re({"../../../../node_modules/@segment/analytics-generic-utils/dist/esm/create-deferred/create-deferred.js":function(){l=function(){var t,e,n=!1,r=new Promise(function(r,i){t=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n=!0,r.apply(void 0,t)},e=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n=!0,i.apply(void 0,t)}});return{resolve:t,reject:e,promise:r,isSettled:function(){return n}}}}}),Xe=Re({"../../../../node_modules/@segment/analytics-generic-utils/dist/esm/create-deferred/index.js":function(){Ze()}}),tn=Re({"../../../../node_modules/@segment/analytics-generic-utils/dist/esm/emitter/emitter.js":function(){f=function(){function t(t){var e;this.callbacks={},this.warned=!1,this.maxListeners=null!==(e=null==t?void 0:t.maxListeners)&&void 0!==e?e:10}return t.prototype.warnIfPossibleMemoryLeak=function(t){this.warned||this.maxListeners&&this.callbacks[t].length>this.maxListeners&&(console.warn("Event Emitter: Possible memory leak detected; ".concat(String(t)," has exceeded ").concat(this.maxListeners," listeners.")),this.warned=!0)},t.prototype.on=function(t,e){return this.callbacks[t]?(this.callbacks[t].push(e),this.warnIfPossibleMemoryLeak(t)):this.callbacks[t]=[e],this},t.prototype.once=function(t,e){var n=this,r=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];n.off(t,r),e.apply(n,i)};return this.on(t,r),this},t.prototype.off=function(t,e){var n,r=(null!==(n=this.callbacks[t])&&void 0!==n?n:[]).filter(function(t){return t!==e});return this.callbacks[t]=r,this},t.prototype.emit=function(t){for(var e,n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];return(null!==(e=this.callbacks[t])&&void 0!==e?e:[]).forEach(function(t){t.apply(n,r)}),this},t}()}}),en=Re({"../../../../node_modules/@segment/analytics-generic-utils/dist/esm/emitter/index.js":function(){tn()}}),nn=Re({"../../../../node_modules/@segment/analytics-generic-utils/dist/esm/index.js":function(){Xe(),en()}}),rn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/priority-queue/backoff.js":function(){}}),on=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/priority-queue/index.js":function(){ze(),nn(),rn(),d="onRemoveFromFuture",p=function(t){function e(e,n,r){var i=t.call(this)||this;return i.future=[],i.maxAttempts=e,i.queue=n,i.seen=null!=r?r:{},i}return B(e,t),e.prototype.push=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e.map(function(e){return!(t.updateAttempts(e)>t.maxAttempts||t.includes(e))&&(t.queue.push(e),!0)});return this.queue=this.queue.sort(function(e,n){return t.getAttempts(e)-t.getAttempts(n)}),r},e.prototype.pushWithBackoff=function(t,e){if(void 0===e&&(e=0),0==e&&0===this.getAttempts(t))return this.push(t)[0];var n=function(t){var e=Math.random()+1,n=t.minTimeout,r=void 0===n?500:n,i=t.factor,o=void 0===i?2:i,a=t.attempt,s=t.maxTimeout,u=void 0===s?1/0:s;return Math.min(e*r*Math.pow(o,a),u)}({attempt:this.getAttempts(t)});return e>0&&n<e&&(n=e),this.scheduleItem(t,n)},e.prototype.pushWithDelay=function(t,e){return this.scheduleItem(t,e)},e.prototype.scheduleItem=function(t,e){var n=this;return!(this.updateAttempts(t)>this.maxAttempts||this.includes(t))&&(setTimeout(function(){n.queue.push(t),n.future=n.future.filter(function(e){return e.id!==t.id}),n.emit(d)},e),this.future.push(t),!0)},e.prototype.getAttempts=function(t){var e;return null!==(e=this.seen[t.id])&&void 0!==e?e:0},e.prototype.updateAttempts=function(t){return this.seen[t.id]=this.getAttempts(t)+1,this.getAttempts(t)},e.prototype.includes=function(t){return this.queue.includes(t)||this.future.includes(t)||Boolean(this.queue.find(function(e){return e.id===t.id}))||Boolean(this.future.find(function(e){return e.id===t.id}))},e.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(e.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),e}(f)}}),an=Re({"../../../../node_modules/@lukeed/uuid/dist/index.mjs":function(){for(h=256,v=[];h--;)v[h]=(h+256).toString(16).substring(1)}}),sn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/logger/index.js":function(){ze(),m=function(){function t(){this._logs=[]}return t.prototype.log=function(t,e,n){var r=new Date;this._logs.push({level:t,message:e,time:r,extras:n})},Object.defineProperty(t.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),t.prototype.flush=function(){if(this.logs.length>1){var t=this._logs.reduce(function(t,e){var r,i,o,a=n(n({},e),{json:JSON.stringify(e.extras,null," "),extras:e.extras});delete a.time;var s=null!==(o=null===(i=e.time)||void 0===i?void 0:i.toISOString())&&void 0!==o?o:"";return t[s]&&(s="".concat(s,"-").concat(Math.random())),n(n({},t),((r={})[s]=a,r))},{});console.table?console.table(t):console.log(t)}else this.logs.forEach(function(t){var e=t.level,n=t.message,r=t.extras;"info"===e||"debug"===e?console.log(n,null!=r?r:""):console[e](n,null!=r?r:"")});this._logs=[]},t}()}}),un=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/stats/index.js":function(){ze(),g=function(t){return{gauge:"g",counter:"c"}[t]},b=function(){function t(){this.metrics=[]}return t.prototype.increment=function(t,e,n){void 0===e&&(e=1),this.metrics.push({metric:t,value:e,tags:null!=n?n:[],type:"counter",timestamp:Date.now()})},t.prototype.gauge=function(t,e,n){this.metrics.push({metric:t,value:e,tags:null!=n?n:[],type:"gauge",timestamp:Date.now()})},t.prototype.flush=function(){var t=this.metrics.map(function(t){return n(n({},t),{tags:t.tags.join(",")})});console.table?console.table(t):console.log(t),this.metrics=[]},t.prototype.serialize=function(){return this.metrics.map(function(t){return{m:t.metric,v:t.value,t:t.tags,k:g(t.type),e:t.timestamp}})},t}(),_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.gauge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},e.prototype.increment=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},e.prototype.flush=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},e.prototype.serialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return[]},e}(b)}}),cn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/context/index.js":function(){an(),He(),sn(),un(),w=function(t){var e,n,r;this.retry=null===(e=t.retry)||void 0===e||e,this.type=null!==(n=t.type)&&void 0!==n?n:"plugin Error",this.reason=null!==(r=t.reason)&&void 0!==r?r:""},x=function(){function t(t,e,n,r){void 0===e&&(e=X()),void 0===n&&(n=new _),void 0===r&&(r=new m),this.attempts=0,this.event=t,this._id=e,this.logger=r,this.stats=n}return t.system=function(){},t.prototype.isSame=function(t){return t.id===this.id},t.prototype.cancel=function(t){if(t)throw t;throw new w({reason:"Context Cancel"})},t.prototype.log=function(t,e,n){this.logger.log(t,e,n)},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),t.prototype.updateEvent=function(t,e){var n;if("integrations"===t.split(".")[0]){var r=t.split(".")[1];if(!1===(null===(n=this.event.integrations)||void 0===n?void 0:n[r]))return this.event}return H(this.event,t,e),this.event},t.prototype.failedDelivery=function(){return this._failedDelivery},t.prototype.setFailedDelivery=function(t){this._failedDelivery=t},t.prototype.logs=function(){return this.logger.logs},t.prototype.flush=function(){this.logger.flush(),this.stats.flush()},t.prototype.toJSON=function(){return{id:this._id,event:this.event,logs:this.logger.logs,metrics:this.stats.metrics}},t}()}}),ln=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/utils/group-by.js":function(){ze()}}),fn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/utils/is-thenable.js":function(){j=function(t){return"object"===(void 0===t?"undefined":_type_of(t))&&null!==t&&"then"in t&&"function"==typeof t.then}}}),dn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/task/task-group.js":function(){fn(),k=function(){var t,e,n=0;return{done:function(){return t},run:function(r){var i=r();return j(i)&&(1===++n&&(t=new Promise(function(t){return e=t})),i.finally(function(){return 0===--n&&e()})),i}}}}}),pn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/queue/delivery.js":function(){ze(),cn()}}),hn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/queue/event-queue.js":function(){ze(),ln(),on(),cn(),nn(),dn(),pn(),S=function(t){function e(e){var n=t.call(this)||this;return n.criticalTasks=k(),n.plugins=[],n.failedInitializations=[],n.flushing=!1,n.queue=e,n.queue.on(d,function(){n.scheduleFlush(0)}),n}return B(e,t),e.prototype.register=function(t,e,n){return U(this,void 0,void 0,function(){var r,i,o=this;return V(this,function(a){switch(a.label){case 0:return this.plugins.push(e),r=function(n){o.failedInitializations.push(e.name),o.emit("initialization_failure",e),console.warn(e.name,n),t.log("warn","Failed to load destination",{plugin:e.name,error:n}),o.plugins=o.plugins.filter(function(t){return t!==e})},"destination"!==e.type||"Segment.io"===e.name?[3,1]:(e.load(t,n).catch(r),[3,4]);case 1:return a.trys.push([1,3,,4]),[4,e.load(t,n)];case 2:return a.sent(),[3,4];case 3:return i=a.sent(),r(i),[3,4];case 4:return[2]}})})},e.prototype.deregister=function(t,e,n){return U(this,void 0,void 0,function(){var r;return V(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e.unload?[4,Promise.resolve(e.unload(t,n))]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.plugins=this.plugins.filter(function(t){return t.name!==e.name}),[3,4];case 3:return r=i.sent(),t.log("warn","Failed to unload destination",{plugin:e.name,error:r}),[3,4];case 4:return[2]}})})},e.prototype.dispatch=function(t){return U(this,void 0,void 0,function(){var e;return V(this,function(n){return t.log("debug","Dispatching"),t.stats.increment("message_dispatched"),this.queue.push(t),e=this.subscribeToDelivery(t),this.scheduleFlush(0),[2,e]})})},e.prototype.subscribeToDelivery=function(t){return U(this,void 0,void 0,function(){var e=this;return V(this,function(n){return[2,new Promise(function(n){var r=function(i,o){i.isSame(t)&&(e.off("flush",r),n(i))};e.on("flush",r)})]})})},e.prototype.dispatchSingle=function(t){return U(this,void 0,void 0,function(){var e=this;return V(this,function(n){return t.log("debug","Dispatching"),t.stats.increment("message_dispatched"),this.queue.updateAttempts(t),t.attempts=1,[2,this.deliver(t).catch(function(n){return e.enqueuRetry(n,t)?e.subscribeToDelivery(t):(t.setFailedDelivery({reason:n}),t)})]})})},e.prototype.isEmpty=function(){return 0===this.queue.length},e.prototype.scheduleFlush=function(t){var e=this;void 0===t&&(t=500),this.flushing||(this.flushing=!0,setTimeout(function(){e.flush().then(function(){setTimeout(function(){e.flushing=!1,e.queue.length&&e.scheduleFlush(0)},0)})},t))},e.prototype.deliver=function(t){var e;return U(this,void 0,void 0,function(){var n,r,i,o,a;return V(this,function(s){switch(s.label){case 0:return[4,this.criticalTasks.done()];case 1:s.sent(),n=Date.now(),s.label=2;case 2:return s.trys.push([2,4,,5]),[4,this.flushOne(t)];case 3:return t=s.sent(),r=Date.now()-n,(i=t.failedDelivery())?(a=_instanceof(i.reason,Error)?i.reason:new Error(String(null!==(e=i.reason)&&void 0!==e?e:"Unknown delivery failure")),t.log("error","Failed to deliver",a),this.emit("delivery_failure",t,a),t.stats.increment("delivery_failed"),[2,t]):(this.emit("delivery_success",t),t.stats.gauge("delivered",r),t.log("debug","Delivered",t.event),[2,t]);case 4:throw o=s.sent(),a=o,t.log("error","Failed to deliver",a),this.emit("delivery_failure",t,a),t.stats.increment("delivery_failed"),o;case 5:return[2]}})})},e.prototype.enqueuRetry=function(t,e){return!(_instanceof(t,w)&&!t.retry)&&this.queue.pushWithBackoff(e)},e.prototype.flush=function(){return U(this,void 0,void 0,function(){var t,e,n;return V(this,function(r){switch(r.label){case 0:if(0===this.queue.length)return[2,[]];if(!(t=this.queue.pop()))return[2,[]];t.attempts=this.queue.getAttempts(t),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.deliver(t)];case 2:return t=r.sent(),e=!t.failedDelivery(),this.emit("flush",t,e),[3,4];case 3:return n=r.sent(),this.enqueuRetry(n,t)||(t.setFailedDelivery({reason:n}),this.emit("flush",t,!1)),[2,[]];case 4:return[2,[t]]}})})},e.prototype.isReady=function(){return!0},e.prototype.availableExtensions=function(t){var e,n,r=this.plugins.filter(function(e){var n,r,i;if("destination"!==e.type&&"Segment.io"!==e.name)return!0;var o=void 0;return null===(n=e.alternativeNames)||void 0===n||n.forEach(function(e){void 0!==t[e]&&(o=t[e])}),null!==(i=null!==(r=t[e.name])&&void 0!==r?r:o)&&void 0!==i?i:!1!==("Segment.io"===e.name||t.All)}),i=(e="type",n={},r.forEach(function(t){var r,i=void 0;if("string"==typeof e){var o=t[e];i="string"!=typeof o?JSON.stringify(o):o}else _instanceof(e,Function)&&(i=e(t));void 0!==i&&(n[i]=K(K([],null!==(r=n[i])&&void 0!==r?r:[],!0),[t],!1))}),n),o=i.before,a=void 0===o?[]:o,s=i.enrichment,u=void 0===s?[]:s,c=i.destination,l=void 0===c?[]:c,f=i.after;return{before:a,enrichment:u,destinations:l,after:void 0===f?[]:f}},e.prototype.flushOne=function(t){var e,n;return U(this,void 0,void 0,function(){var r,i,o,a,s,u,c,l,f,d,p,h,v,y;return V(this,function(m){switch(m.label){case 0:if(!this.isReady())throw new Error("Not ready");t.attempts>1&&this.emit("delivery_retry",t),r=this.availableExtensions(null!==(e=t.event.integrations)&&void 0!==e?e:{}),i=r.before,o=r.enrichment,a=0,s=i,m.label=1;case 1:return a<s.length?(u=s[a],[4,et(t,u)]):[3,4];case 2:_instanceof(d=m.sent(),x)&&(t=d),this.emit("message_enriched",t,u),m.label=3;case 3:return a++,[3,1];case 4:c=0,l=o,m.label=5;case 5:return c<l.length?(f=l[c],[4,tt(t,f)]):[3,8];case 6:_instanceof(d=m.sent(),x)&&(t=d),this.emit("message_enriched",t,f),m.label=7;case 7:return c++,[3,5];case 8:return p=this.availableExtensions(null!==(n=t.event.integrations)&&void 0!==n?n:{}),h=p.destinations,v=p.after,[4,new Promise(function(e,n){setTimeout(function(){var r=h.map(function(e){return tt(t,e)});Promise.all(r).then(e).catch(n)},0)})];case 9:return m.sent(),t.stats.increment("message_delivered"),this.emit("message_delivered",t),y=v.map(function(e){return tt(t,e)}),[4,Promise.all(y)];case 10:return m.sent(),[2,t]}})})},e}(f)}}),vn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/analytics/index.js":function(){}}),yn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/analytics/dispatch.js":function(){ze(),$e(),O=function(t,e){var n=Date.now()-t;return Math.max((null!=e?e:300)-n,0)}}}),mn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/utils/bind-all.js":function(){}}),gn=Re({"../../../../node_modules/@segment/analytics-core/dist/esm/index.js":function(){Ue(),Ve(),Ke(),Qe(),$e(),on(),cn(),hn(),vn(),yn(),We(),Je(),Ye(),mn(),un(),pn()}}),bn=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/environment/index.js":function(){}}),_n=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/connection/index.js":function(){bn()}}),wn=Re({"../../../../node_modules/unfetch/dist/unfetch.mjs":function(){}}),xn=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/get-global.js":function(){P=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:null}}}),jn=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/fetch.js":function(){wn(),xn(),I=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=P();return(n&&n.fetch||st).apply(void 0,t)}}}),kn=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/generated/version.js":function(){E="1.84.0"}}),Sn=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/version-type.js":function(){A="npm"}}),On=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/constants/index.js":function(){M="api.segment.io/v1"}}),Pn=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/stats/remote-metrics.js":function(){ze(),jn(),kn(),Sn(),On(),C=function(t,e,r){var i=e.reduce(function(t,e){var n=e.split(":"),r=n[0],i=n[1];return t[r]=i,t},{});return{type:"Counter",metric:t,value:1,tags:n(n({},i),{library:"analytics.js",library_version:"web"===r?"next-".concat(E):"npm:next-".concat(E)})}},N=function(){function t(t){var e,n,r,i,o,a=this;if(this.host=null!==(e=null==t?void 0:t.host)&&void 0!==e?e:M,this.sampleRate=null!==(n=null==t?void 0:t.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==t?void 0:t.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==t?void 0:t.maxQueueSize)&&void 0!==i?i:20,this.protocol=null!==(o=null==t?void 0:t.protocol)&&void 0!==o?o:"https",this.queue=[],this.sampleRate>0){var s=!1,u=function(){s||(s=!0,a.flush().catch(ct),s=!1,setTimeout(u,a.flushTimer))};u()}}return t.prototype.increment=function(t,e){if(t.includes("analytics_js.")&&0!==e.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=C(t,e,ut());this.queue.push(n),t.includes("error")&&this.flush().catch(ct)}},t.prototype.flush=function(){return U(this,void 0,void 0,function(){var t=this;return V(this,function(e){switch(e.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch(function(e){ct(e),t.sampleRate=0})];case 1:return e.sent(),[2]}})})},t.prototype.send=function(){return U(this,void 0,void 0,function(){var t,e,n;return V(this,function(r){return t={series:this.queue},this.queue=[],e={"Content-Type":"text/plain"},n="".concat(this.protocol,"://").concat(this.host,"/m"),[2,I(n,{headers:e,body:JSON.stringify(t),method:"POST"})]})})},t}()}}),In=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/stats/index.js":function(){ze(),gn(),Pn(),D=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.initRemoteMetrics=function(t){F=new N(t)},e.prototype.increment=function(e,n,r){t.prototype.increment.call(this,e,n,r),null==F||F.increment(e,null!=r?r:[])},e}(b)}}),En=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/context/index.js":function(){ze(),gn(),In(),R=function(t){function e(e,n){return t.call(this,e,n,new D)||this}return B(e,t),e.system=function(){return new this({type:"track",event:"system"})},e}(x)}}),An=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/priority-queue/index.js":function(){gn()}});function Mn(t,e,n){void 0===n&&(n=0);var r,i="persisted-queue:v1:".concat(t,":lock"),o=T.getItem(i),a=o?JSON.parse(o):null,s=null===a||(r=a,(new Date).getTime()>r);if(s)return T.setItem(i,JSON.stringify(L()+50)),e(),void T.removeItem(i);!s&&n<3?setTimeout(function(){Mn(t,e,n+1)},50):console.error("Unable to retrieve lock")}var Cn,Nn,Fn,Dn=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/priority-queue/persisted.js":function(){ze(),An(),En(),bn(),T={getItem:function(){},setItem:function(){},removeItem:function(){}};try{T=rt()&&window.localStorage?window.localStorage:T}catch(t){console.warn("Unable to access localStorage",t)}L=function(){return(new Date).getTime()},q=function(t){function e(e,r){var i=t.call(this,e,[])||this,o="persisted-queue:v1:".concat(r,":items"),a="persisted-queue:v1:".concat(r,":seen"),s=[],u={};return Mn(r,function(){try{s=lt(o),u=ft(a),dt(o),dt(a),i.queue=K(K([],s,!0),i.queue,!0),i.seen=n(n({},u),i.seen)}catch(t){console.error(t)}}),window.addEventListener("pagehide",function(){if(i.todo>0){var t=K(K([],i.queue,!0),i.future,!0);try{Mn(r,function(){!function(t,e){var r=lt(t),i=K(K([],e,!0),r,!0).reduce(function(t,e){var r;return n(n({},t),((r={})[e.id]=e,r))},{});T.setItem(t,JSON.stringify(Object.values(i)))}(o,t),function(t,e){var r=ft(t);T.setItem(t,JSON.stringify(n(n({},r),e)))}(a,i.seen)})}catch(t){console.error(t)}}}),i}return B(e,t),e}(p)}}),Rn=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/global-analytics-helper.js":function(){Cn="analytics"}}),Tn=Te({"../../../../node_modules/obj-case/index.js":function(t,e){function n(t){return function(e,n,r,i){var a,s=i&&function(t){return"function"==typeof t}(i.normalizer)?i.normalizer:o;n=s(n);for(var u=!1;!u;)c();function c(){for(a in e){var t=s(a);if(0===n.indexOf(t)){var r=n.substr(t.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=e[a];return null==i?void(u=!0):n.length?void(e=i):void(u=!0)}}}a=void 0,u=!0}if(a)return null==e?e:t(e,a,r)}}function r(t,e){return t.hasOwnProperty(e)&&delete t[e],t}function i(t,e,n){return t.hasOwnProperty(e)&&(t[e]=n),t}function o(t){return t.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}e.exports=n(function(t,e){if(t.hasOwnProperty(e))return t[e]}),e.exports.find=e.exports,e.exports.replace=function(t,e,r,o){return n(i).call(this,t,e,r,o),t},e.exports.del=function(t,e,i){return n(r).call(this,t,e,null,i),t}}}),Ln=Te({"../../../../node_modules/@segment/facade/dist/address.js":function(t){var e=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0});var n=e(Tn());function r(t,e){return function(){var r=this.traits(),i=this.properties?this.properties():{};return n.default(r,"address."+t)||n.default(r,t)||(e?n.default(r,"address."+e):null)||(e?n.default(r,e):null)||n.default(i,"address."+t)||n.default(i,t)||(e?n.default(i,"address."+e):null)||(e?n.default(i,e):null)}}t.default=function(t){t.zip=r("postalCode","zip"),t.country=r("country"),t.street=r("street"),t.state=r("state"),t.city=r("city"),t.region=r("region")}}}),qn=Te({"../../../../node_modules/@segment/facade/dist/clone.js":function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.clone=void 0,t.clone=function t(e){if("object"!==(void 0===e?"undefined":_type_of(e)))return e;if("[object Object]"===Object.prototype.toString.call(e)){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=t(e[r]));return n}return Array.isArray(e)?e.map(t):e}}}),Bn=Te({"../../../../node_modules/@segment/facade/dist/is-enabled.js":function(t){Object.defineProperty(t,"__esModule",{value:!0});var e={Salesforce:!0};t.default=function(t){return!e[t]}}}),zn=Te({"../../../../node_modules/@segment/isodate/lib/index.js":function(t){var e=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;t.parse=function(t){var n=[1,5,6,7,11,12],r=e.exec(t),i=0;if(!r)return new Date(t);for(var o,a=0;o=n[a];a++)r[o]=parseInt(r[o],10)||0;r[2]=parseInt(r[2],10)||1,r[3]=parseInt(r[3],10)||1,r[2]--,r[8]=r[8]?(r[8]+"00").substring(0,3):0," "===r[4]?i=(new Date).getTimezoneOffset():"Z"!==r[9]&&r[10]&&(i=60*r[11]+r[12],"+"===r[10]&&(i=0-i));var s=Date.UTC(r[1],r[2],r[3],r[5],r[6]+i,r[7],r[8]);return new Date(s)},t.is=function(t,n){return"string"==typeof t&&((!n||!1!==/^\d{4}-\d{2}-\d{2}/.test(t))&&e.test(t))}}}),Un=Te({"../../../../node_modules/new-date/lib/milliseconds.js":function(t){var e=/\d{13}/;t.is=function(t){return e.test(t)},t.parse=function(t){return t=parseInt(t,10),new Date(t)}}}),Vn=Te({"../../../../node_modules/new-date/lib/seconds.js":function(t){var e=/\d{10}/;t.is=function(t){return e.test(t)},t.parse=function(t){var e=1e3*parseInt(t,10);return new Date(e)}}}),Kn=Te({"../../../../node_modules/new-date/lib/index.js":function(t,e){var n=zn(),r=Un(),i=Vn(),o=Object.prototype.toString;e.exports=function(t){return e=t,"[object Date]"===o.call(e)?t:function(t){return"[object Number]"===o.call(t)}(t)?new Date((a=t)<315576e5?1e3*a:a):n.is(t)?n.parse(t):r.is(t)?r.parse(t):i.is(t)?i.parse(t):new Date(t);var e,a}}}),Hn=Te({"../../../../node_modules/@segment/isodate-traverse/lib/index.js":function(t,e){var n=zn();function r(t,e){return void 0===e&&(e=!0),t&&"object"===(void 0===t?"undefined":_type_of(t))?function(t,e){return Object.keys(t).forEach(function(n){t[n]=r(t[n],e)}),t}(t,e):Array.isArray(t)?function(t,e){return t.forEach(function(n,i){t[i]=r(n,e)}),t}(t,e):n.is(t,e)?n.parse(t):t}e.exports=r}}),Gn=Te({"../../../../node_modules/@segment/facade/dist/facade.js":function(t){var e=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.Facade=void 0;var n=e(Ln()),r=qn(),i=e(Bn()),o=e(Kn()),a=e(Tn()),s=e(Hn());function u(t,e){e=e||{},this.raw=r.clone(t),"clone"in e||(e.clone=!0),e.clone&&(t=r.clone(t)),"traverse"in e||(e.traverse=!0),t.timestamp="timestamp"in t?o.default(t.timestamp):new Date,e.traverse&&s.default(t),this.opts=e,this.obj=t}t.Facade=u;var c=u.prototype;function l(t){return r.clone(t)}c.proxy=function(t){var e=t.split("."),n=this[t=e.shift()]||this.obj[t];return n?("function"==typeof n&&(n=n.call(this)||{}),0===e.length||(n=a.default(n,e.join("."))),this.opts.clone?l(n):n):n},c.field=function(t){var e=this.obj[t];return this.opts.clone?l(e):e},u.proxy=function(t){return function(){return this.proxy(t)}},u.field=function(t){return function(){return this.field(t)}},u.multi=function(t){return function(){var e=this.proxy(t+"s");if(Array.isArray(e))return e;var n=this.proxy(t);return n&&(n=[this.opts.clone?r.clone(n):n]),n||[]}},u.one=function(t){return function(){var e=this.proxy(t);if(e)return e;var n=this.proxy(t+"s");return Array.isArray(n)?n[0]:void 0}},c.json=function(){var t=this.opts.clone?r.clone(this.obj):this.obj;return this.type&&(t.type=this.type()),t},c.rawEvent=function(){return this.raw},c.options=function(t){var e=this.obj.options||this.obj.context||{},n=this.opts.clone?r.clone(e):e;if(!t)return n;if(this.enabled(t)){var i=this.integrations(),o=i[t]||a.default(i,t);return"object"!==(void 0===o?"undefined":_type_of(o))&&(o=a.default(this.options(),t)),"object"===(void 0===o?"undefined":_type_of(o))?o:{}}},c.context=c.options,c.enabled=function(t){var e=this.proxy("options.providers.all");"boolean"!=typeof e&&(e=this.proxy("options.all")),"boolean"!=typeof e&&(e=this.proxy("integrations.all")),"boolean"!=typeof e&&(e=!0);var n=e&&i.default(t),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(t)&&(n=r.providers[t]),r.hasOwnProperty(t)){var o=r[t];n="boolean"!=typeof o||o}return!!n},c.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},c.active=function(){var t=this.proxy("options.active");return null==t&&(t=!0),t},c.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},c.sessionId=c.anonymousId,c.groupId=u.proxy("options.groupId"),c.traits=function(t){var e=this.proxy("options.traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();if(null==i)continue;e[t[r]]=i,delete e[r]}return e},c.library=function(){var t=this.proxy("options.library");return t?"string"==typeof t?{name:t,version:null}:t:{name:"unknown",version:null}},c.device=function(){var t=this.proxy("context.device");"object"===(void 0===t?"undefined":_type_of(t))&&null!==t||(t={});var e=this.library().name;return t.type||(e.indexOf("ios")>-1&&(t.type="ios"),e.indexOf("android")>-1&&(t.type="android")),t},c.userAgent=u.proxy("context.userAgent"),c.timezone=u.proxy("context.timezone"),c.timestamp=u.field("timestamp"),c.channel=u.field("channel"),c.ip=u.proxy("context.ip"),c.userId=u.field("userId"),n.default(c)}}),Jn=Te({"../../../../node_modules/inherits/inherits_browser.js":function(t,e){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}}}),Wn=Te({"../../../../node_modules/inherits/inherits.js":function(t,e){try{if("function"!=typeof(n=De("util")).inherits)throw"";e.exports=n.inherits}catch(t){e.exports=Jn()}var n}}),Yn=Te({"../../../../node_modules/@segment/facade/dist/alias.js":function(t){var e=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.Alias=void 0;var n=e(Wn()),r=Gn();function i(t,e){r.Facade.call(this,t,e)}t.Alias=i,n.default(i,r.Facade),i.prototype.action=function(){return"alias"},i.prototype.type=i.prototype.action,i.prototype.previousId=function(){return this.field("previousId")||this.field("from")},i.prototype.from=i.prototype.previousId,i.prototype.userId=function(){return this.field("userId")||this.field("to")},i.prototype.to=i.prototype.userId}}),Qn=Te({"../../../../node_modules/@segment/facade/dist/is-email.js":function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=/.+\@.+\..+/;t.default=function(t){return e.test(t)}}}),$n=Te({"../../../../node_modules/@segment/facade/dist/group.js":function(t){var e=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.Group=void 0;var n=e(Wn()),r=e(Qn()),i=e(Kn()),o=Gn();function a(t,e){o.Facade.call(this,t,e)}t.Group=a,n.default(a,o.Facade);var s=a.prototype;s.action=function(){return"group"},s.type=s.action,s.groupId=o.Facade.field("groupId"),s.created=function(){var t=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(t)return i.default(t)},s.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.groupId();return r.default(e)?e:void 0},s.traits=function(t){var e=this.properties(),n=this.groupId();for(var r in t=t||{},n&&(e.id=n),t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=null==this[r]?this.proxy("traits."+r):this[r]();if(null==i)continue;e[t[r]]=i,delete e[r]}return e},s.name=o.Facade.proxy("traits.name"),s.industry=o.Facade.proxy("traits.industry"),s.employees=o.Facade.proxy("traits.employees"),s.properties=function(){return this.field("traits")||this.field("properties")||{}}}}),Zn=Te({"../../../../node_modules/@segment/facade/dist/identify.js":function(t){var e=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.Identify=void 0;var n=Gn(),r=e(Tn()),i=e(Wn()),o=e(Qn()),a=e(Kn()),s=function(t){return t.trim()};function u(t,e){n.Facade.call(this,t,e)}t.Identify=u,i.default(u,n.Facade);var c=u.prototype;c.action=function(){return"identify"},c.type=c.action,c.traits=function(t){var e=this.field("traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(e[t[r]]=i,r!==t[r]&&delete e[r])}return e},c.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.userId();return o.default(e)?e:void 0},c.created=function(){var t=this.proxy("traits.created")||this.proxy("traits.createdAt");if(t)return a.default(t)},c.companyCreated=function(){var t=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(t)return a.default(t)},c.companyName=function(){return this.proxy("traits.company.name")},c.name=function(){var t=this.proxy("traits.name");if("string"==typeof t)return s(t);var e=this.firstName(),n=this.lastName();return e&&n?s(e+" "+n):void 0},c.firstName=function(){var t=this.proxy("traits.firstName");if("string"==typeof t)return s(t);var e=this.proxy("traits.name");return"string"==typeof e?s(e).split(" ")[0]:void 0},c.lastName=function(){var t=this.proxy("traits.lastName");if("string"==typeof t)return s(t);var e=this.proxy("traits.name");if("string"==typeof e){var n=s(e).indexOf(" ");if(-1!==n)return s(e.substr(n+1))}},c.uid=function(){return this.userId()||this.username()||this.email()},c.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},c.age=function(){var t=this.birthday(),e=r.default(this.traits(),"age");return null!=e?e:_instanceof(t,Date)?(new Date).getFullYear()-t.getFullYear():void 0},c.avatar=function(){var t=this.traits();return r.default(t,"avatar")||r.default(t,"photoUrl")||r.default(t,"avatarUrl")},c.position=function(){var t=this.traits();return r.default(t,"position")||r.default(t,"jobTitle")},c.username=n.Facade.proxy("traits.username"),c.website=n.Facade.one("traits.website"),c.websites=n.Facade.multi("traits.website"),c.phone=n.Facade.one("traits.phone"),c.phones=n.Facade.multi("traits.phone"),c.address=n.Facade.proxy("traits.address"),c.gender=n.Facade.proxy("traits.gender"),c.birthday=n.Facade.proxy("traits.birthday")}}),Xn=Te({"../../../../node_modules/@segment/facade/dist/track.js":function(t){var e=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.Track=void 0;var n=e(Wn()),r=Gn(),i=Zn(),o=e(Qn()),a=e(Tn());function s(t,e){r.Facade.call(this,t,e)}t.Track=s,n.default(s,r.Facade);var u=s.prototype;u.action=function(){return"track"},u.type=u.action,u.event=r.Facade.field("event"),u.value=r.Facade.proxy("properties.value"),u.category=r.Facade.proxy("properties.category"),u.id=r.Facade.proxy("properties.id"),u.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},u.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},u.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},u.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},u.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},u.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},u.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},u.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},u.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},u.sku=r.Facade.proxy("properties.sku"),u.tax=r.Facade.proxy("properties.tax"),u.name=r.Facade.proxy("properties.name"),u.price=r.Facade.proxy("properties.price"),u.total=r.Facade.proxy("properties.total"),u.repeat=r.Facade.proxy("properties.repeat"),u.coupon=r.Facade.proxy("properties.coupon"),u.shipping=r.Facade.proxy("properties.shipping"),u.discount=r.Facade.proxy("properties.discount"),u.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},u.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},u.description=r.Facade.proxy("properties.description"),u.plan=r.Facade.proxy("properties.plan"),u.subtotal=function(){var t=a.default(this.properties(),"subtotal"),e=this.total()||this.revenue();if(t)return t;if(!e)return 0;if(this.total()){var n=this.tax();n&&(e-=n),(n=this.shipping())&&(e-=n),(n=this.discount())&&(e+=n)}return e},u.products=function(){var t=this.properties(),e=a.default(t,"products");return Array.isArray(e)?e.filter(function(t){return null!==t}):[]},u.quantity=function(){return(this.obj.properties||{}).quantity||1},u.currency=function(){return(this.obj.properties||{}).currency||"USD"},u.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},u.query=r.Facade.proxy("options.query"),u.properties=function(t){var e=this.field("properties")||{};for(var n in t=t||{})if(Object.prototype.hasOwnProperty.call(t,n)){var r=null==this[n]?this.proxy("properties."+n):this[n]();if(null==r)continue;e[t[n]]=r,delete e[n]}return e},u.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},u.email=function(){var t=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(t)return t;var e=this.userId();return o.default(e)?e:void 0},u.revenue=function(){var t=this.proxy("properties.revenue"),e=this.event();return!t&&e&&e.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(t=this.proxy("properties.total")),function(t){if(!t)return;if("number"==typeof t)return t;if("string"!=typeof t)return;if(t=t.replace(/\$/g,""),t=parseFloat(t),!isNaN(t))return t}(t)},u.cents=function(){var t=this.revenue();return"number"!=typeof t?this.value()||0:100*t},u.identify=function(){var t=this.json();return t.traits=this.traits(),new i.Identify(t,this.opts)}}}),tr=Te({"../../../../node_modules/@segment/facade/dist/page.js":function(t){var e=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.Page=void 0;var n=e(Wn()),r=Gn(),i=Xn(),o=e(Qn());function a(t,e){r.Facade.call(this,t,e)}t.Page=a,n.default(a,r.Facade);var s=a.prototype;s.action=function(){return"page"},s.type=s.action,s.category=r.Facade.field("category"),s.name=r.Facade.field("name"),s.title=r.Facade.proxy("properties.title"),s.path=r.Facade.proxy("properties.path"),s.url=r.Facade.proxy("properties.url"),s.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},s.properties=function(t){var e=this.field("properties")||{},n=this.category(),r=this.name();for(var i in t=t||{},n&&(e.category=n),r&&(e.name=r),t)if(Object.prototype.hasOwnProperty.call(t,i)){var o=null==this[i]?this.proxy("properties."+i):this[i]();if(null==o)continue;e[t[i]]=o,i!==t[i]&&delete e[i]}return e},s.email=function(){var t=this.proxy("context.traits.email")||this.proxy("properties.email");if(t)return t;var e=this.userId();return o.default(e)?e:void 0},s.fullName=function(){var t=this.category(),e=this.name();return e&&t?t+" "+e:e},s.event=function(t){return t?"Viewed "+t+" Page":"Loaded a Page"},s.track=function(t){var e=this.json();return e.event=this.event(t),e.timestamp=this.timestamp(),e.properties=this.properties(),new i.Track(e,this.opts)}}}),er=Te({"../../../../node_modules/@segment/facade/dist/screen.js":function(t){var e=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.Screen=void 0;var n=e(Wn()),r=tr(),i=Xn();function o(t,e){r.Page.call(this,t,e)}t.Screen=o,n.default(o,r.Page),o.prototype.action=function(){return"screen"},o.prototype.type=o.prototype.action,o.prototype.event=function(t){return t?"Viewed "+t+" Screen":"Loaded a Screen"},o.prototype.track=function(t){var e=this.json();return e.event=this.event(t),e.timestamp=this.timestamp(),e.properties=this.properties(),new i.Track(e,this.opts)}}}),nr=Te({"../../../../node_modules/@segment/facade/dist/delete.js":function(t){var e=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.Delete=void 0;var n=e(Wn()),r=Gn();function i(t,e){r.Facade.call(this,t,e)}t.Delete=i,n.default(i,r.Facade),i.prototype.type=function(){return"delete"}}}),rr=Te({"../../../../node_modules/@segment/facade/dist/index.js":function(t){var e=t&&t.__assign||function(){return e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},e.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Delete=t.Screen=t.Page=t.Track=t.Identify=t.Group=t.Alias=t.Facade=void 0;var n=Gn();Object.defineProperty(t,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=Yn();Object.defineProperty(t,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=$n();Object.defineProperty(t,"Group",{enumerable:!0,get:function(){return i.Group}});var o=Zn();Object.defineProperty(t,"Identify",{enumerable:!0,get:function(){return o.Identify}});var a=Xn();Object.defineProperty(t,"Track",{enumerable:!0,get:function(){return a.Track}});var s=tr();Object.defineProperty(t,"Page",{enumerable:!0,get:function(){return s.Page}});var u=er();Object.defineProperty(t,"Screen",{enumerable:!0,get:function(){return u.Screen}});var c=nr();Object.defineProperty(t,"Delete",{enumerable:!0,get:function(){return c.Delete}}),t.default=e(e({},n.Facade),{Alias:r.Alias,Group:i.Group,Identify:o.Identify,Track:a.Track,Page:s.Page,Screen:u.Screen,Delete:c.Delete})}}),ir=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/to-facade.js":function(){Nn=Be(rr())}}),or=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/p-while.js":function(){ze(),Fn=function(t,e){return U(void 0,void 0,void 0,function(){var n;return V(this,function(r){return[2,(n=function(r){return U(void 0,void 0,void 0,function(){var i;return V(this,function(o){switch(o.label){case 0:return t(r)?(i=n,[4,e()]):[3,2];case 1:return[2,i.apply(void 0,[o.sent()])];case 2:return[2]}})})})(void 0)]})})}}}),ar=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/callback/index.js":function(){gn()}}),sr={};Le(sr,{form:function(){return yt},link:function(){return vt}});var ur=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/auto-track.js":function(){ar()}}),cr={};Le(cr,{applyDestinationMiddleware:function(){return mt},sourceMiddlewarePlugin:function(){return gt}});var lr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/middleware/index.js":function(){ze(),En(),ir()}}),fr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/query-string/pickPrefix.js":function(){}}),dr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/query-string/gracefulDecodeURIComponent.js":function(){}}),pr={};Le(pr,{queryString:function(){return wt}});var hr,vr,yr,mr,gr,br,_r,wr,xr,jr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/query-string/index.js":function(){fr(),dr(),gn()}}),kr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/parse-cdn.js":function(){Rn(),hr=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,vr=function(){var t;return Array.prototype.slice.call(document.querySelectorAll("script")).forEach(function(e){var n,r=null!==(n=e.getAttribute("src"))&&void 0!==n?n:"",i=hr.exec(r);i&&i[1]&&(t=i[1])}),t},mr=function(){var t;return null!=yr?yr:null===(t=pt())||void 0===t?void 0:t._cdn},gr=function(t){var e=pt();e&&(e._cdn=t),yr=t},br=function(){var t=mr();if(t)return t;var e=vr();return e||"https://cdn.segment.com"},_r=function(){var t=br();return"".concat(t,"/next-integrations")}}}),Sr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/merged-options.js":function(){ze()}}),Or=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/load-script.js":function(){}}),Pr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/stats/metric-helpers.js":function(){}}),Ir=Te({"../../../../node_modules/@segment/analytics-next/dist/pkg/vendor/tsub/tsub.js":function(t,e){!function(n,r){if("object"==(void 0===t?"undefined":_type_of(t))&&"object"==(void 0===e?"undefined":_type_of(e)))e.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var i=r();for(var o in i)("object"==(void 0===t?"undefined":_type_of(t))?t:n)[o]=i[o]}}(self,function(){return function(){var t={2870:function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Store=e.matches=e.transform=void 0;var i=n(4303);Object.defineProperty(e,"transform",{enumerable:!0,get:function(){return r(i).default}});var o=n(2370);Object.defineProperty(e,"matches",{enumerable:!0,get:function(){return r(o).default}});var a=n(1444);Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return r(a).default}})},2370:function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(7843));function o(t,e){if(!Array.isArray(t))return!0===a(t,e);var n,r,i,l,f,d,p,h=t[0];switch(h){case"!":return!o(t[1],e);case"or":for(var v=1;v<t.length;v++)if(o(t[v],e))return!0;return!1;case"and":for(v=1;v<t.length;v++)if(!o(t[v],e))return!1;return!0;case"=":case"!=":return function(t,e,n,r){switch(s(t)&&(t=o(t,r)),s(e)&&(e=o(e,r)),"object"==(void 0===t?"undefined":_type_of(t))&&"object"==(void 0===e?"undefined":_type_of(e))&&(t=JSON.stringify(t),e=JSON.stringify(e)),n){case"=":return t===e;case"!=":return t!==e;default:throw new Error("Invalid operator in compareItems: ".concat(n))}}(a(t[1],e),a(t[2],e),h,e);case"<=":case"<":case">":case">=":return function(t,e,n,r){if(s(t)&&(t=o(t,r)),s(e)&&(e=o(e,r)),"number"!=typeof t||"number"!=typeof e)return!1;switch(n){case"<=":return t<=e;case">=":return t>=e;case"<":return t<e;case">":return t>e;default:throw new Error("Invalid operator in compareNumbers: ".concat(n))}}(a(t[1],e),a(t[2],e),h,e);case"in":return f=a(t[1],e),d=a(t[2],e),p=e,void 0!==d.find(function(t){return a(t,p)===f});case"contains":return i=a(t[1],e),l=a(t[2],e),"string"==typeof i&&"string"==typeof l&&-1!==i.indexOf(l);case"match":return n=a(t[1],e),r=a(t[2],e),"string"==typeof n&&"string"==typeof r&&function(t,e){var n,r;t:for(;t.length>0;){var i,o;if(i=(n=u(t)).star,o=n.chunk,t=n.pattern,i&&""===o)return!0;var a=c(o,e),s=a.t,l=a.ok,f=a.err;if(f)return!1;if(!l||!(0===s.length||t.length>0)){if(i)for(var d=0;d<e.length;d++){if(s=(r=c(o,e.slice(d+1))).t,l=r.ok,f=r.err,l){if(0===t.length&&s.length>0)continue;e=s;continue t}if(f)return!1}return!1}e=s}return 0===e.length}(r,n);case"lowercase":var y=a(t[1],e);return"string"!=typeof y?null:y.toLowerCase();case"typeof":return _type_of(a(t[1],e));case"length":return function(t){return null===t?0:Array.isArray(t)||"string"==typeof t?t.length:NaN}(a(t[1],e));default:throw new Error("FQL IR could not evaluate for token: ".concat(h))}}function a(t,e){return Array.isArray(t)?t:"object"==(void 0===t?"undefined":_type_of(t))?t.value:(0,i.default)(e,t)}function s(t){return!!Array.isArray(t)&&(("lowercase"===t[0]||"length"===t[0]||"typeof"===t[0])&&2===t.length||("contains"===t[0]||"match"===t[0])&&3===t.length)}function u(t){for(var e={star:!1,chunk:"",pattern:""};t.length>0&&"*"===t[0];)t=t.slice(1),e.star=!0;var n,r=!1;t:for(n=0;n<t.length;n++)switch(t[n]){case"\\":n+1<t.length&&n++;break;case"[":r=!0;break;case"]":r=!1;break;case"*":if(!r)break t}return e.chunk=t.slice(0,n),e.pattern=t.slice(n),e}function c(t,e){for(var n,r,i={t:"",ok:!1,err:!1};t.length>0;){if(0===e.length)return i;switch(t[0]){case"[":var o=e[0];e=e.slice(1);var a=!0;(t=t.slice(1)).length>0&&"^"===t[0]&&(a=!1,t=t.slice(1));for(var s=!1,u=0;;){if(t.length>0&&"]"===t[0]&&u>0){t=t.slice(1);break}var c,f="";if(c=(n=l(t)).char,t=n.newChunk,n.err)return i;if(f=c,"-"===t[0]&&(f=(r=l(t.slice(1))).char,t=r.newChunk,r.err))return i;c<=o&&o<=f&&(s=!0),u++}if(s!==a)return i;break;case"?":e=e.slice(1),t=t.slice(1);break;case"\\":if(0===(t=t.slice(1)).length)return i.err=!0,i;default:if(t[0]!==e[0])return i;e=e.slice(1),t=t.slice(1)}}return i.t=e,i.ok=!0,i.err=!1,i}function l(t){var e={char:"",newChunk:"",err:!1};return 0===t.length||"-"===t[0]||"]"===t[0]||"\\"===t[0]&&0===(t=t.slice(1)).length?(e.err=!0,e):(e.char=t[0],e.newChunk=t.slice(1),0===e.newChunk.length&&(e.err=!0),e)}e.default=function(t,e){if(!e)throw new Error("No matcher supplied!");switch(e.type){case"all":return!0;case"fql":return function(t,e){if(!t)return!1;try{t=JSON.parse(t)}catch(e){throw new Error('Failed to JSON.parse FQL intermediate representation "'.concat(t,'": ').concat(e))}var n=o(t,e);return"boolean"==typeof n&&n}(e.ir,t);default:throw new Error("Matcher of type ".concat(e.type," unsupported."))}}},1444:function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.rules=[],this.rules=t||[]}return t.prototype.getRulesByDestinationName=function(t){for(var e=[],n=0,r=this.rules;n<r.length;n++){var i=r[n];i.destinationName!==t&&void 0!==i.destinationName||e.push(i)}return e},t}();e.default=n},4303:function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(374)),o=r(n(7843)),a=r(n(5500)),s=n(9014),u=n(4966);function c(t,e){f(t,e.drop,function(t,e){e.forEach(function(e){return delete t[e]})})}function l(t,e){f(t,e.allow,function(t,e){Object.keys(t).forEach(function(n){e.includes(n)||delete t[n]})})}function f(t,e,n){Object.entries(e).forEach(function(e){var r=e[0],i=e[1],a=function(t){"object"==(void 0===t?"undefined":_type_of(t))&&null!==t&&n(t,i)},s=""===r?t:(0,o.default)(t,r);Array.isArray(s)?s.forEach(a):a(s)})}function d(t,e){var n=JSON.parse(JSON.stringify(t));for(var r in e.map)if(e.map.hasOwnProperty(r)){var i=e.map[r],a=r.split("."),c=void 0;if(a.length>1?(a.pop(),c=(0,o.default)(n,a.join("."))):c=t,"object"==(void 0===c?"undefined":_type_of(c))){if(i.copy){var l=(0,o.default)(n,i.copy);void 0!==l&&(0,s.dset)(t,r,l)}else if(i.move){var f=(0,o.default)(n,i.move);void 0!==f&&(0,s.dset)(t,r,f),(0,u.unset)(t,i.move)}else i.hasOwnProperty("set")&&(0,s.dset)(t,r,i.set);if(i.to_string){var d=(0,o.default)(t,r);if("string"==typeof d||"object"==(void 0===d?"undefined":_type_of(d))&&null!==d)continue;void 0!==d?(0,s.dset)(t,r,JSON.stringify(d)):(0,s.dset)(t,r,"undefined")}}}}function p(t,e){return!(e.sample.percent<=0)&&(e.sample.percent>=1||(e.sample.path?function(t,e){var n=(0,o.default)(t,e.sample.path),r=(0,i.default)(JSON.stringify(n)),s=-64,u=[];h(r.slice(0,8),u);for(var c=0,l=0;l<64&&1!==u[l];l++)c++;if(0!==c){var f=[];h(r.slice(9,16),f),s-=c,u.splice(0,c),f.splice(64-c),u=u.concat(f)}return u[63]=0===u[63]?1:0,(0,a.default)(parseInt(u.join(""),2),s)<e.sample.percent}(t,e):(n=e.sample.percent,Math.random()<=n)));var n}function h(t,e){for(var n=0;n<8;n++)for(var r=t[n],i=128;i>=1;i/=2)r-i>=0?(r-=i,e.push(1)):e.push(0)}e.default=function(t,e){for(var n=t,r=0,i=e;r<i.length;r++){var o=i[r];switch(o.type){case"drop":return null;case"drop_properties":c(n,o.config);break;case"allow_properties":l(n,o.config);break;case"sample_event":if(p(n,o.config))break;return null;case"map_properties":d(n,o.config);break;case"hash_properties":break;default:throw new Error('Transformer of type "'.concat(o.type,'" is unsupported.'))}}return n}},4966:function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.unset=void 0;var i=r(n(7843));e.unset=function(t,e){if((0,i.default)(t,e)){for(var n=e.split("."),r=n.pop();n.length&&"\\"===n[n.length-1].slice(-1);)r=n.pop().slice(0,-1)+"."+r;for(;n.length;)t=t[e=n.shift()];return delete t[r]}return!0}},9014:function(t,e){e.dset=function(t,e,n){e.split&&(e=e.split("."));for(var r,i,o=0,a=e.length,s=t;o<a&&"__proto__"!==(i=e[o++])&&"constructor"!==i&&"prototype"!==i;)s=s[i]=o===a?n:_type_of(r=s[i])==(void 0===e?"undefined":_type_of(e))?r:0*e[o]!=0||~(""+e[o]).indexOf(".")?{}:[]}},3304:function(t){var e="function"==typeof Float64Array?Float64Array:void 0;t.exports=e},7382:function(t,e,n){var r,i=n(5569),o=n(3304),a=n(8482);r=i()?o:a,t.exports=r},8482:function(t){t.exports=function(){throw new Error("not implemented")}},6322:function(t,e,n){var r,i=n(2508),o=n(5679),a=n(882);r=i()?o:a,t.exports=r},882:function(t){t.exports=function(){throw new Error("not implemented")}},5679:function(t){var e="function"==typeof Uint16Array?Uint16Array:void 0;t.exports=e},4773:function(t,e,n){var r,i=n(9773),o=n(3004),a=n(3078);r=i()?o:a,t.exports=r},3078:function(t){t.exports=function(){throw new Error("not implemented")}},3004:function(t){var e="function"==typeof Uint32Array?Uint32Array:void 0;t.exports=e},7980:function(t,e,n){var r,i=n(8114),o=n(6737),a=n(3357);r=i()?o:a,t.exports=r},3357:function(t){t.exports=function(){throw new Error("not implemented")}},6737:function(t){var e="function"==typeof Uint8Array?Uint8Array:void 0;t.exports=e},2684:function(t){var e="function"==typeof Float64Array?Float64Array:null;t.exports=e},5569:function(t,e,n){var r=n(3876);t.exports=r},3876:function(t,e,n){var r=n(1448),i=n(2684);t.exports=function(){var t,e;if("function"!=typeof i)return!1;try{e=new i([1,3.14,-3.14,NaN]),t=r(e)&&1===e[0]&&3.14===e[1]&&-3.14===e[2]&&e[3]!=e[3]}catch(e){t=!1}return t}},9048:function(t,e,n){var r=n(3763);t.exports=r},3763:function(t){var e=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&e.call(t,n)}},7009:function(t,e,n){var r=n(6784);t.exports=r},6784:function(t){t.exports=function(){return"function"==typeof Symbol&&"symbol"==_type_of(Symbol("foo"))}},3123:function(t,e,n){var r=n(8481);t.exports=r},8481:function(t,e,n){var r=n(7009)();t.exports=function(){return r&&"symbol"==_type_of(Symbol.toStringTag)}},2508:function(t,e,n){var r=n(3403);t.exports=r},3403:function(t,e,n){var r=n(768),i=n(9668),o=n(187);t.exports=function(){var t,e;if("function"!=typeof o)return!1;try{e=new o(e=[1,3.14,-3.14,i+1,i+2]),t=r(e)&&1===e[0]&&3===e[1]&&e[2]===i-2&&0===e[3]&&1===e[4]}catch(e){t=!1}return t}},187:function(t){var e="function"==typeof Uint16Array?Uint16Array:null;t.exports=e},9773:function(t,e,n){var r=n(2822);t.exports=r},2822:function(t,e,n){var r=n(2744),i=n(3899),o=n(746);t.exports=function(){var t,e;if("function"!=typeof o)return!1;try{e=new o(e=[1,3.14,-3.14,i+1,i+2]),t=r(e)&&1===e[0]&&3===e[1]&&e[2]===i-2&&0===e[3]&&1===e[4]}catch(e){t=!1}return t}},746:function(t){var e="function"==typeof Uint32Array?Uint32Array:null;t.exports=e},8114:function(t,e,n){var r=n(8066);t.exports=r},8066:function(t,e,n){var r=n(8279),i=n(3443),o=n(2731);t.exports=function(){var t,e;if("function"!=typeof o)return!1;try{e=new o(e=[1,3.14,-3.14,i+1,i+2]),t=r(e)&&1===e[0]&&3===e[1]&&e[2]===i-2&&0===e[3]&&1===e[4]}catch(e){t=!1}return t}},2731:function(t){var e="function"==typeof Uint8Array?Uint8Array:null;t.exports=e},1448:function(t,e,n){var r=n(1453);t.exports=r},1453:function(t,e,n){var r=n(6208),i="function"==typeof Float64Array;t.exports=function(t){return i&&_instanceof(t,Float64Array)||"[object Float64Array]"===r(t)}},9331:function(t,e,n){var r=n(7980),i={uint16:n(6322),uint8:r};t.exports=i},5902:function(t,e,n){var r=n(4106);t.exports=r},4106:function(t,e,n){var r,i,o=n(9331);(i=new o.uint16(1))[0]=4660,r=52===new o.uint8(i.buffer)[0],t.exports=r},768:function(t,e,n){var r=n(3823);t.exports=r},3823:function(t,e,n){var r=n(6208),i="function"==typeof Uint16Array;t.exports=function(t){return i&&_instanceof(t,Uint16Array)||"[object Uint16Array]"===r(t)}},2744:function(t,e,n){var r=n(2326);t.exports=r},2326:function(t,e,n){var r=n(6208),i="function"==typeof Uint32Array;t.exports=function(t){return i&&_instanceof(t,Uint32Array)||"[object Uint32Array]"===r(t)}},8279:function(t,e,n){var r=n(208);t.exports=r},208:function(t,e,n){var r=n(6208),i="function"==typeof Uint8Array;t.exports=function(t){return i&&_instanceof(t,Uint8Array)||"[object Uint8Array]"===r(t)}},6315:function(t){t.exports=1023},1686:function(t){t.exports=2147483647},3105:function(t){t.exports=2146435072},3449:function(t){t.exports=2147483648},6988:function(t){t.exports=-1023},9777:function(t){t.exports=1023},3690:function(t){t.exports=-1074},2918:function(t,e,n){var r=n(4772).NEGATIVE_INFINITY;t.exports=r},4165:function(t){var e=Number.POSITIVE_INFINITY;t.exports=e},6488:function(t){t.exports=22250738585072014e-324},9668:function(t){t.exports=65535},3899:function(t){t.exports=4294967295},3443:function(t){t.exports=255},7011:function(t,e,n){var r=n(812);t.exports=r},812:function(t,e,n){var r=n(4165),i=n(2918);t.exports=function(t){return t===r||t===i}},1883:function(t,e,n){var r=n(1797);t.exports=r},1797:function(t){t.exports=function(t){return t!=t}},513:function(t,e,n){var r=n(5760);t.exports=r},5760:function(t){t.exports=function(t){return Math.abs(t)}},5848:function(t,e,n){var r=n(677);t.exports=r},677:function(t,e,n){var r=n(3449),i=n(1686),o=n(7838),a=n(1921),s=n(2490),u=[0,0];t.exports=function(t,e){var n,c;return o.assign(t,u,1,0),n=u[0],n&=i,c=a(e),s(n|=c&=r,u[1])}},5500:function(t,e,n){var r=n(8397);t.exports=r},8397:function(t,e,n){var r=n(4165),i=n(2918),o=n(6315),a=n(9777),s=n(6988),u=n(3690),c=n(1883),l=n(7011),f=n(5848),d=n(4948),p=n(8478),h=n(7838),v=n(2490),y=[0,0],m=[0,0];t.exports=function(t,e){var n,g;return 0===t||c(t)||l(t)?t:(d(y,t),e+=y[1],(e+=p(t=y[0]))<u?f(0,t):e>a?t<0?i:r:(e<=s?(e+=52,g=2220446049250313e-31):g=1,h(m,t),n=m[0],n&=2148532223,g*v(n|=e+o<<20,m[1])))}},4772:function(t,e,n){var r=n(7548);t.exports=r},7548:function(t){t.exports=Number},8478:function(t,e,n){var r=n(4500);t.exports=r},4500:function(t,e,n){var r=n(1921),i=n(3105),o=n(6315);t.exports=function(t){var e=r(t);return(e=(e&i)>>>20)-o|0}},2490:function(t,e,n){var r=n(9639);t.exports=r},4445:function(t,e,n){var r,i,o;!0===n(5902)?(i=1,o=0):(i=0,o=1),r={HIGH:i,LOW:o},t.exports=r},9639:function(t,e,n){var r=n(4773),i=n(7382),o=n(4445),a=new i(1),s=new r(a.buffer),u=o.HIGH,c=o.LOW;t.exports=function(t,e){return s[u]=t,s[c]=e,a[0]}},5646:function(t,e,n){var r;r=!0===n(5902)?1:0,t.exports=r},1921:function(t,e,n){var r=n(6285);t.exports=r},6285:function(t,e,n){var r=n(4773),i=n(7382),o=n(5646),a=new i(1),s=new r(a.buffer);t.exports=function(t){return a[0]=t,s[o]}},9024:function(t,e,n){var r=n(6488),i=n(7011),o=n(1883),a=n(513);t.exports=function(t,e,n,s){return o(t)||i(t)?(e[s]=t,e[s+n]=0,e):0!==t&&a(t)<r?(e[s]=4503599627370496*t,e[s+n]=-52,e):(e[s]=t,e[s+n]=0,e)}},4948:function(t,e,n){var r=n(7576),i=n(9422);r(i,"assign",n(9024)),t.exports=i},9422:function(t,e,n){var r=n(9024);t.exports=function(t){return r(t,[0,0],1,0)}},5239:function(t,e,n){var r=n(4773),i=n(7382),o=n(5782),a=new i(1),s=new r(a.buffer),u=o.HIGH,c=o.LOW;t.exports=function(t,e,n,r){return a[0]=t,e[r]=s[u],e[r+n]=s[c],e}},7838:function(t,e,n){var r=n(7576),i=n(4010);r(i,"assign",n(5239)),t.exports=i},5782:function(t,e,n){var r,i,o;!0===n(5902)?(i=1,o=0):(i=0,o=1),r={HIGH:i,LOW:o},t.exports=r},4010:function(t,e,n){var r=n(5239);t.exports=function(t){return r(t,[0,0],1,0)}},7576:function(t,e,n){var r=n(7063);t.exports=r},7063:function(t,e,n){var r=n(6691);t.exports=function(t,e,n){r(t,e,{configurable:!1,enumerable:!1,writable:!1,value:n})}},2073:function(t){var e=Object.defineProperty;t.exports=e},1680:function(t){var e="function"==typeof Object.defineProperty?Object.defineProperty:null;t.exports=e},1471:function(t,e,n){var r=n(1680);t.exports=function(){try{return r({},"x",{}),!0}catch(t){return!1}}},6691:function(t,e,n){var r,i=n(1471),o=n(2073),a=n(1309);r=i()?o:a,t.exports=r},1309:function(t){var e=Object.prototype,n=e.toString,r=e.__defineGetter__,i=e.__defineSetter__,o=e.__lookupGetter__,a=e.__lookupSetter__;t.exports=function(t,s,u){var c,l,f,d;if("object"!=(void 0===t?"undefined":_type_of(t))||null===t||"[object Array]"===n.call(t))throw new TypeError("invalid argument. First argument must be an object. Value: `"+t+"`.");if("object"!=(void 0===u?"undefined":_type_of(u))||null===u||"[object Array]"===n.call(u))throw new TypeError("invalid argument. Property descriptor must be an object. Value: `"+u+"`.");if((l="value"in u)&&(o.call(t,s)||a.call(t,s)?(c=t.__proto__,t.__proto__=e,delete t[s],t[s]=u.value,t.__proto__=c):t[s]=u.value),f="get"in u,d="set"in u,l&&(f||d))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return f&&r&&r.call(t,s,u.get),d&&i&&i.call(t,s,u.set),t}},6208:function(t,e,n){var r,i=n(3123),o=n(7407),a=n(4210);r=i()?a:o,t.exports=r},7407:function(t,e,n){var r=n(173);t.exports=function(t){return r.call(t)}},4210:function(t,e,n){var r=n(9048),i=n(1403),o=n(173);t.exports=function(t){var e,n,a;if(null==t)return o.call(t);n=t[i],e=r(t,i);try{t[i]=void 0}catch(e){return o.call(t)}return a=o.call(t),e?t[i]=n:delete t[i],a}},173:function(t){var e=Object.prototype.toString;t.exports=e},1403:function(t){var e="function"==typeof Symbol?Symbol.toStringTag:"";t.exports=e},7843:function(t){t.exports=function(t,e,n,r,i){for(e=e.split?e.split("."):e,r=0;r<e.length;r++)t=t?t[e[r]]:i;return t===i?n:t}},374:function(t,e,n){n.r(e),n.d(e,{default:function(){return o}});for(var r=[],i=0;i<64;)r[i]=0|4294967296*Math.sin(++i%Math.PI);function o(t){var e,n,o,a=[e=1732584193,n=4023233417,~e,~n],s=[],u=unescape(encodeURI(t))+"",c=u.length;for(t=--c/4+2|15,s[--t]=8*c;~c;)s[c>>2]|=u.charCodeAt(c)<<8*c--;for(i=u=0;i<t;i+=16){for(c=a;u<64;c=[o=c[3],e+((o=c[0]+[e&n|~e&o,o&e|~o&n,e^n^o,n^(e|~o)][c=u>>4]+r[u]+~~s[i|15&[u,5*u+1,3*u+5,7*u][c]])<<(c=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*c+u++%4])|o>>>-c),e,n])e=0|c[1],n=c[2];for(u=4;u;)a[--u]+=c[u]}for(t="";u<32;)t+=(a[u>>3]>>4*(1^u++)&15).toString(16);return t}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}return n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(2870)}()})}}),Er={};Le(Er,{tsubMiddleware:function(){return xr}});var Ar,Mr,Cr,Nr,Fr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/routing-middleware/index.js":function(){wr=Be(Ir()),xr=function(t){return function(e){var n=e.payload,r=e.integration,i=e.next;new wr.Store(t).getRulesByDestinationName(r).forEach(function(t){for(var e=t.matchers,r=t.transformers,o=0;o<e.length;o++)if(wr.matches(n.obj,e[o])&&(n.obj=wr.transform(n.obj,r[o]),null===n.obj))return i(null)}),i(n)}}}}),Dr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/is-plan-event-enabled.js":function(){}}),Rr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/loader.js":function(){ze(),kr(),Or()}}),Tr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/utils.js":function(){Ar=function(t,e){var n,r=e.type,i=e.bundlingStatus,o=e.versionSettings,a="unbundled"!==i&&("browser"===r||(null===(n=null==o?void 0:o.componentTypes)||void 0===n?void 0:n.includes("browser")));return!t.startsWith("Segment")&&"Iterable"!==t&&a},Mr=function(t,e){var n=!1===e.All&&void 0===e[t];return!1===e[t]||n}}}),Lr={};Le(Lr,{LegacyDestination:function(){return Nr},ajsDestinations:function(){return Mt}});var qr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/index.js":function(){ze(),Cr=Be(rr()),_n(),En(),bn(),gn(),Dr(),Sr(),or(),An(),Dn(),lr(),Rr(),gn(),Tr(),Pr(),nn(),Nr=function(){function t(t,e,r,i,o,a){void 0===i&&(i={});var s=this;this.options={},this.type="destination",this.middleware=[],this.initializePromise=l(),this.flushing=!1,this.name=t,this.version=e,this.settings=n({},i),this.disableAutoISOConversion=o.disableAutoISOConversion||!1,this.integrationSource=a,this.settings.type&&"browser"===this.settings.type&&delete this.settings.type,this.initializePromise.promise.then(function(t){return s._initialized=t},function(){}),this.options=o,this.buffer=o.disableClientPersistence?new p(4,[]):new q(4,"".concat(r,":dest-").concat(t)),this.scheduleFlush()}return t.prototype.isLoaded=function(){return!!this._ready},t.prototype.ready=function(){var t=this;return this.initializePromise.promise.then(function(){var e;return null!==(e=t.onReady)&&void 0!==e?e:Promise.resolve()})},t.prototype.load=function(t,e){var n;return U(this,void 0,void 0,function(){var r,i,o,a=this;return V(this,function(s){switch(s.label){case 0:if(this._ready||void 0!==this.onReady)return[2];s.label=1;case 1:return s.trys.push([1,5,,6]),null===(n=this.integrationSource)||void 0===n?[3,2]:(i=n,[3,4]);case 2:return[4,Et(t,this.name,this.version,this.options.obfuscate)];case 3:i=s.sent(),s.label=4;case 4:return r=i,this.integration=function(t,e,n){var r;"Integration"in t?(t({user:function(){return n.user()},addIntegration:function(){}}),r=t.Integration):r=t;var i=new r(e);return i.analytics=n,i}(r,this.settings,e),[3,6];case 5:throw o=s.sent(),St(t,{integrationName:this.name,methodName:"load",type:"classic",didError:!0}),o;case 6:this.onReady=new Promise(function(t){a.integration.once("ready",function(){a._ready=!0,t(!0)})}),this.integration.on("initialize",function(){a.initializePromise.resolve(!0)});try{St(t,{integrationName:this.name,methodName:"initialize",type:"classic"}),this.integration.initialize()}catch(e){throw St(t,{integrationName:this.name,methodName:"initialize",type:"classic",didError:!0}),this.initializePromise.resolve(!1),e}return[2]}})})},t.prototype.unload=function(t,e){return function(t,e,n){return U(this,void 0,void 0,function(){var r,i,o;return V(this,function(a){return r=_r(),i=Pt(t),o=It(t,n),[2,(s="".concat(r,"/integrations/").concat(null!=o?o:i,"/").concat(e,"/").concat(null!=o?o:i,".dynamic.js.gz"),u=jt(s),void 0!==u&&u.remove(),Promise.resolve())];var s,u})})}(this.name,this.version,this.options.obfuscate)},t.prototype.addMiddleware=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.middleware=(t=this.middleware).concat.apply(t,e)},t.prototype.shouldBuffer=function(t){return"page"!==t.event.type&&(at()||!0!==this._ready||!0!==this._initialized)},t.prototype.send=function(t,e,r){var i,o;return U(this,void 0,void 0,function(){var a,s,u,c,l,f;return V(this,function(d){switch(d.label){case 0:return this.shouldBuffer(t)?(this.buffer.push(t),this.scheduleFlush(),[2,t]):(a=null===(o=null===(i=this.options)||void 0===i?void 0:i.plan)||void 0===o?void 0:o.track,s=t.event.event,a&&s&&"Segment.io"!==this.name&&(u=a[s],Ot(a,u)?t.updateEvent("integrations",n(n({},t.event.integrations),null==u?void 0:u.integrations)):(t.updateEvent("integrations",n(n({},t.event.integrations),{All:!1,"Segment.io":!0})),t.cancel(new w({retry:!1,reason:"Event ".concat(s," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"}))),(null==u?void 0:u.enabled)&&!1===(null==u?void 0:u.integrations[this.name])&&t.cancel(new w({retry:!1,reason:"Event ".concat(s," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"}))),[4,mt(this.name,t.event,this.middleware)]);case 1:if(null===(c=d.sent()))return[2,t];l=new e(c,{traverse:!this.disableAutoISOConversion}),St(t,{integrationName:this.name,methodName:r,type:"classic"}),d.label=2;case 2:return d.trys.push([2,5,,6]),this.integration?[4,this.integration.invoke.call(this.integration,r,l)]:[3,4];case 3:d.sent(),d.label=4;case 4:return[3,6];case 5:throw f=d.sent(),St(t,{integrationName:this.name,methodName:r,type:"classic",didError:!0}),f;case 6:return[2,t]}})})},t.prototype.track=function(t){return U(this,void 0,void 0,function(){return V(this,function(e){return[2,this.send(t,Cr.Track,"track")]})})},t.prototype.page=function(t){var e;return U(this,void 0,void 0,function(){return V(this,function(n){switch(n.label){case 0:return(null===(e=this.integration)||void 0===e?void 0:e._assumesPageview)&&!this._initialized&&this.integration.initialize(),[4,this.initializePromise.promise];case 1:return n.sent(),[2,this.send(t,Cr.Page,"page")]}})})},t.prototype.identify=function(t){return U(this,void 0,void 0,function(){return V(this,function(e){return[2,this.send(t,Cr.Identify,"identify")]})})},t.prototype.alias=function(t){return U(this,void 0,void 0,function(){return V(this,function(e){return[2,this.send(t,Cr.Alias,"alias")]})})},t.prototype.group=function(t){return U(this,void 0,void 0,function(){return V(this,function(e){return[2,this.send(t,Cr.Group,"group")]})})},t.prototype.scheduleFlush=function(){var t=this;this.flushing||setTimeout(function(){return U(t,void 0,void 0,function(){var t;return V(this,function(e){switch(e.label){case 0:return at()||!0!==this._ready||!0!==this._initialized?(this.scheduleFlush(),[2]):(this.flushing=!0,t=this,[4,At(this,this.buffer)]);case 1:return t.buffer=e.sent(),this.flushing=!1,this.buffer.todo>0&&this.scheduleFlush(),[2]}})})},5e3*Math.random())},t}()}}),Br=Te({"../../../../node_modules/@segment/analytics.js-video-plugins/dist/index.umd.js":function(t,e){var n,r;n=window,r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==(void 0===t?"undefined":_type_of(t))&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e,n){n.r(e);var r="function"==typeof fetch?fetch.bind():function(t,e){return e=e||{},new Promise(function(n,r){var i=new XMLHttpRequest;for(var o in i.open(e.method||"get",t,!0),e.headers)i.setRequestHeader(o,e.headers[o]);function a(){var t,e=[],n=[],r={};return i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(i,o,a){e.push(o=o.toLowerCase()),n.push([o,a]),t=r[o],r[o]=t?t+","+a:a}),{ok:2==(i.status/100|0),status:i.status,statusText:i.statusText,url:i.responseURL,clone:a,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},headers:{keys:function(){return e},entries:function(){return n},get:function(t){return r[t.toLowerCase()]},has:function(t){return t.toLowerCase()in r}}}}i.withCredentials="include"==e.credentials,i.onload=function(){n(a())},i.onerror=r,i.send(e.body)})};e.default=r},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(){function t(e,n){!function(t,e){if(!_instanceof(t,e))throw new TypeError("Cannot call a class as a function")}(this,t),this.pluginName=e}return r(t,[{key:"track",value:function(t,e){window.analytics.track(t,e,{integration:{name:this.pluginName}})}}]),t}();e.default=i},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.YouTubeAnalytics=e.VimeoAnalytics=void 0;var r=o(n(3)),i=o(n(4));function o(t){return t&&t.__esModule?t:{default:t}}e.VimeoAnalytics=r.default,e.YouTubeAnalytics=i.default},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=o(n(0));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(t,n){!function(t,e){if(!_instanceof(t,e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=(void 0===e?"undefined":_type_of(e))&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,"VimeoAnalytics"));return r.authToken=n,r.player=t,r.metadata={content:{},playback:{videoPlayer:"Vimeo"}},r.mostRecentHeartbeat=0,r.isPaused=!1,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":_type_of(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"initialize",value:function(){var t=this,e={loaded:this.retrieveMetadata,play:this.trackPlay,pause:this.trackPause,ended:this.trackEnded,timeupdate:this.trackHeartbeat};for(var n in e)this.registerHandler(n,e[n]);this.player.getVideoId().then(function(e){t.retrieveMetadata({id:e})}).catch(console.error)}},{key:"registerHandler",value:function(t,e){var n=this;this.player.on(t,function(t){n.updateMetadata(t),e.call(n,t)})}},{key:"trackPlay",value:function(){this.isPaused?(this.track("Video Playback Resumed",this.metadata.playback),this.isPaused=!1):(this.track("Video Playback Started",this.metadata.playback),this.track("Video Content Started",this.metadata.content))}},{key:"trackEnded",value:function(){this.track("Video Playback Completed",this.metadata.playback),this.track("Video Content Completed",this.metadata.content)}},{key:"trackHeartbeat",value:function(){var t=this.mostRecentHeartbeat,e=this.metadata.playback.position;e!==t&&e-t>=10&&(this.track("Video Content Playing",this.metadata.content),this.mostRecentHeartbeat=Math.floor(e))}},{key:"trackPause",value:function(){this.isPaused=!0,this.track("Video Playback Paused",this.metadata.playback)}},{key:"retrieveMetadata",value:function(t){var e=this;return new Promise(function(n,r){var o=t.id;(0,i.default)("https://api.vimeo.com/videos/"+o,{headers:{Authorization:"Bearer "+e.authToken}}).then(function(t){return t.ok?t.json():r(t)}).then(function(t){e.metadata.content.title=t.name,e.metadata.content.description=t.description,e.metadata.content.publisher=t.user.name,e.metadata.playback.position=0,e.metadata.playback.totalLength=t.duration}).catch(function(t){return console.error("Request to Vimeo API Failed with: ",t),r(t)})})}},{key:"updateMetadata",value:function(t){var e=this;return new Promise(function(n,r){e.player.getVolume().then(function(r){r&&(e.metadata.playback.sound=100*r),e.metadata.playback.position=t.seconds,n()}).catch(r)})}}]),e}(o(n(1)).default);e.default=a},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=o(n(0));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(t,n){!function(t,e){if(!_instanceof(t,e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=(void 0===e?"undefined":_type_of(e))&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,"YoutubeAnalytics"));return r.player=t,r.apiKey=n,r.playerLoaded=!1,r.playbackStarted=!1,r.contentStarted=!1,r.isPaused=!1,r.isBuffering=!1,r.isSeeking=!1,r.lastRecordedTime={timeReported:Date.now(),timeElapsed:0},r.metadata=[{playback:{video_player:"youtube"},content:{}}],r.playlistIndex=0,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":_type_of(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"initialize",value:function(){window.segmentYoutubeOnStateChange=this.onPlayerStateChange.bind(this),window.segmentYoutubeOnReady=this.onPlayerReady.bind(this),this.player.addEventListener("onReady","segmentYoutubeOnReady"),this.player.addEventListener("onStateChange","segmentYoutubeOnStateChange")}},{key:"onPlayerReady",value:function(t){this.retrieveMetadata()}},{key:"onPlayerStateChange",value:function(t){var e=this.player.getCurrentTime();switch(this.metadata[this.playlistIndex]&&(this.metadata[this.playlistIndex].playback.position=this.metadata[this.playlistIndex].content.position=e,this.metadata[this.playlistIndex].playback.quality=this.player.getPlaybackQuality(),this.metadata[this.playlistIndex].playback.sound=this.player.isMuted()?0:this.player.getVolume()),t.data){case-1:if(this.playerLoaded)break;this.retrieveMetadata(),this.playerLoaded=!0;break;case YT.PlayerState.BUFFERING:this.handleBuffer();break;case YT.PlayerState.PLAYING:this.handlePlay();break;case YT.PlayerState.PAUSED:this.handlePause();break;case YT.PlayerState.ENDED:this.handleEnd()}this.lastRecordedTime={timeReported:Date.now(),timeElapsed:1e3*this.player.getCurrentTime()}}},{key:"retrieveMetadata",value:function(){var t=this;return new Promise(function(e,n){var r=t.player.getVideoData(),o=t.player.getPlaylist()||[r.video_id],a=o.join();(0,i.default)("https://www.googleapis.com/youtube/v3/videos?id="+a+"&part=snippet,contentDetails&key="+t.apiKey).then(function(t){if(!t.ok){var e=new Error("Segment request to Youtube API failed (likely due to a bad API Key. Events will still be sent but will not contain video metadata)");throw e.response=t,e}return t.json()}).then(function(n){t.metadata=[];for(var r=0,i=0;i<o.length;i++){var a=n.items[i];t.metadata.push({content:{title:a.snippet.title,description:a.snippet.description,keywords:a.snippet.tags,channel:a.snippet.channelTitle,airdate:a.snippet.publishedAt}}),r+=s(a.contentDetails.duration)}for(i=0;i<o.length;i++)t.metadata[i].playback={total_length:r,video_player:"youtube"};e()}).catch(function(e){t.metadata=o.map(function(t){return{playback:{video_player:"youtube"},content:{}}}),n(e)})})}},{key:"handleBuffer",value:function(){var t=this.determineSeek();this.playbackStarted||(this.playbackStarted=!0,this.track("Video Playback Started",this.metadata[this.playlistIndex].playback)),t&&!this.isSeeking&&(this.isSeeking=!0,this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback)),this.isSeeking&&(this.track("Video Playback Seek Completed",this.metadata[this.playlistIndex].playback),this.isSeeking=!1);var e=this.player.getPlaylist();e&&0===this.player.getCurrentTime()&&this.player.getPlaylistIndex()!==this.playlistIndex&&(this.contentStarted=!1,this.playlistIndex===e.length-1&&0===this.player.getPlaylistIndex()&&(this.track("Video Playback Completed",this.metadata[this.player.getPlaylistIndex()].playback),this.track("Video Playback Started",this.metadata[this.player.getPlaylistIndex()].playback))),this.track("Video Playback Buffer Started",this.metadata[this.playlistIndex].playback),this.isBuffering=!0}},{key:"handlePlay",value:function(){this.contentStarted||(this.playlistIndex=this.player.getPlaylistIndex(),-1===this.playlistIndex&&(this.playlistIndex=0),this.track("Video Content Started",this.metadata[this.playlistIndex].content),this.contentStarted=!0),this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused&&(this.track("Video Playback Resumed",this.metadata[this.playlistIndex].playback),this.isPaused=!1)}},{key:"handlePause",value:function(){var t=this.determineSeek();this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused||(t?(this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback),this.isSeeking=!0):(this.track("Video Playback Paused",this.metadata[this.playlistIndex].playback),this.isPaused=!0))}},{key:"handleEnd",value:function(){this.track("Video Content Completed",this.metadata[this.playlistIndex].content),this.contentStarted=!1;var t=this.player.getPlaylistIndex(),e=this.player.getPlaylist();(e&&t===e.length-1||-1===t)&&(this.track("Video Playback Completed",this.metadata[this.playlistIndex].playback),this.playbackStarted=!1)}},{key:"determineSeek",value:function(){var t=this.isPaused||this.isBuffering?0:Date.now()-this.lastRecordedTime.timeReported,e=1e3*this.player.getCurrentTime()-this.lastRecordedTime.timeElapsed;return Math.abs(t-e)>2e3}}]),e}(o(n(1)).default);function s(t){var e=t.match(/PT(\d+H)?(\d+M)?(\d+S)?/);return e=e.slice(1).map(function(t){if(null!=t)return t.replace(/\D/,"")}),3600*(parseInt(e[0])||0)+60*(parseInt(e[1])||0)+(parseInt(e[2])||0)}e.default=a}])},"object"==(void 0===t?"undefined":_type_of(t))&&"object"==(void 0===e?"undefined":_type_of(e))?e.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==(void 0===t?"undefined":_type_of(t))?t.analyticsVideoPlugins=r():n.analyticsVideoPlugins=r()}}),zr={};Le(zr,{loadLegacyVideoPlugins:function(){return Ct}});var Ur=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/legacy-video-plugins/index.js":function(){ze()}}),Vr={};Le(Vr,{schemaFilter:function(){return Nt}});var Kr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/schema-filter/index.js":function(){ze(),Dr()}}),Hr={};Le(Hr,{remoteMiddlewares:function(){return Ft}});var Gr=Re({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/remote-middleware/index.js":function(){ze(),bn(),Or(),kr()}}),Jr={};Le(Jr,{DestinationSegment:function(){return ao},default:function(){return co},destinationSegment:function(){return uo}});var Wr=Object.defineProperty,Yr=function(t,e){for(var n in e)Wr(t,n,{get:e[n],enumerable:!0})};Yr({},{stepId:function(){return Dt}});Yr({},{getDestination:function(){return Rt}});Yr({},{Level:function(){return $r}});var Qr,$r=((Qr=$r||{})[Qr.ERROR=0]="ERROR",Qr[Qr.WARN=1]="WARN",Qr[Qr.INFO=2]="INFO",Qr[Qr.DEBUG=3]="DEBUG",Qr);Yr({},{getTransformer:function(){return Tt}});Yr({},{getSource:function(){return Lt}});function Zr(t){for(var e=arguments.length>2?arguments[2]:void 0,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"").split("."),r=t,i=0;i<n.length;i++){var o=n[i];if("*"===o&&zt(r)){var a=n.slice(i+1).join("."),s=[],u=!0,c=!1,l=void 0;try{for(var f,d=r[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var p=Zr(f.value,a,e);s.push(p)}}catch(t){c=!0,l=t}finally{try{u||null==d.return||d.return()}finally{if(c)throw l}}return s}if(void 0===(r=Vt(r)||zt(r)?r[o]:void 0))break}return Ut(r)?r:e}function Xr(t){return function(t){return"boolean"==typeof t}(t)||Kt(t)||function(t){return"number"==typeof t&&!Number.isNaN(t)}(t)||!Ut(t)||zt(t)&&t.every(Xr)||Vt(t)&&Object.values(t).every(Xr)}Yr({},{getStore:function(){return qt},getStoreValue:function(){return Bt}});var ti=function(){function t(e,n){var r;return _class_call_check(this,t),(r=_call_super(this,t,[e,n])).name="FatalError",Object.setPrototypeOf(r,t.prototype),r}return _inherits(t,_wrap_native_super(Error)),t}();function ei(t,e,n){return _async_to_generator(function(){return _ts_generator(this,function(r){return[2,(zt(e)?e:[e]).reduce(function(e,r){return _async_to_generator(function(){var i,o,a,s,u,c,l,f,d,p,h,v,y,m,g,b,_,w,x,j,k,S,O,P,I;return _ts_generator(this,function(E){switch(E.label){case 0:return[4,e];case 1:return(i=E.sent())?[2,i]:(o=Kt(r)?{key:r}:r,Object.keys(o).length?(a=o.condition,s=o.consent,u=o.fn,c=o.key,l=o.loop,f=o.map,d=o.set,p=o.validate,h=o.value,v=_object_spread_props(_object_spread({},n),{mapping:r}),(y=a)?[4,Gt(a,function(t){if(_instanceof(t,ti))throw t;return v.logger.error("mapping condition failed",{event:v.event,error:t}),!1})(t,v)]:[3,3]):[2]);case 2:y=!E.sent(),E.label=3;case 3:return y?[2]:s&&!function(t){var e=_object_spread({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),n={},r=!t||0===Object.keys(t).length;return Object.keys(e).forEach(function(i){e[i]&&(n[i]=!0,t&&t[i]&&(r=!0))}),!!r&&n}(s,v.consent)?[2,h]:(m=Ut(h)?h:t,l?(g=_sliced_to_array(l,2),b=g[0],_=g[1],"this"!==b?[3,4]:(x=[t],[3,6])):[3,10]);case 4:return[4,Jt(t,b,v)];case 5:x=E.sent(),E.label=6;case 6:return zt(w=x)?[4,Promise.all(w.map(function(t){return Jt(t,_,v)}))]:[3,8];case 7:return j=E.sent().filter(Ut),[3,9];case 8:j=void 0,E.label=9;case 9:return m=j,[3,21];case 10:return f?[4,Object.entries(f).reduce(function(e,n){var r=_sliced_to_array(n,2),i=r[0],o=r[1];return _async_to_generator(function(){var n,r;return _ts_generator(this,function(a){switch(a.label){case 0:return[4,e];case 1:return n=a.sent(),[4,Jt(t,o,v)];case 2:return r=a.sent(),[2,(Ut(r)&&(n[i]=r),n)]}})})()},Promise.resolve({}))]:[3,12];case 11:return m=E.sent(),[3,20];case 12:return d?[4,Promise.all(d.map(function(e){return ei(t,e,v)}))]:[3,14];case 13:return k=m=E.sent(),[3,19];case 14:return c?(S=m=Zr(t,c,h),[3,18]):[3,15];case 15:return(O=u)?[4,Gt(u,function(t){if(_instanceof(t,ti))throw t;v.logger.error("mapping fn failed",{event:v.event,error:t})})(t,v)]:[3,17];case 16:O=m=E.sent(),E.label=17;case 17:S=O,E.label=18;case 18:k=S,E.label=19;case 19:E.label=20;case 20:E.label=21;case 21:return(P=p)?[4,Gt(p,function(t){if(_instanceof(t,ti))throw t;return v.logger.error("mapping validate failed",{event:v.event,error:t}),!1})(m,v)]:[3,23];case 22:P=!E.sent(),E.label=23;case 23:return P&&(m=void 0),I=Ht(m),[2,Ut(I)?I:Ht(h)]}})})()},Promise.resolve(void 0))]})})()}ze(),gn();var ni=function(t){return function(){for(var e,n,r,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];for(var a={},s=["callback","options","traits","id"],u=0,c=i;u<c.length;u++){var l=c[u],f=s.pop();if("id"===f){if(G(l)||J(l)){a.id=l.toString();continue}if(null==l)continue;f=s.pop()}if("traits"!==f&&"options"!==f||null!=l&&!Y(l)||(a[f]=l),W(l)){a.callback=l;break}}return[null!==(e=a.id)&&void 0!==e?e:t.id(),null!==(n=a.traits)&&void 0!==n?n:{},null!==(r=a.options)&&void 0!==r?r:{},a.callback]}};_n(),En(),gn(),nn(),ze(),an();var ri="bpc",ii=function(t,e,n,r,i,o){return{__t:ri,c:e,p:r,u:t,s:n,t:i,r:o}},oi=Object.keys(ii("","","","","","")),ai=function(t){var e,n,r=t.c,i=t.p,o=t.s,a=t.u,s=t.r,u=t.t,c=r?function(t){try{return new URL(t).pathname}catch(e){return"/"===t[0]?t:"/"+t}}(r):i,l=r?function(t,e){return t.indexOf("?")>-1?t:t+e}(r,o):-1===(n=(e=a).indexOf("#"))?e:e.slice(0,n);return{path:c,referrer:s,search:o,title:u,url:l}},si=function(){var t=document.querySelector("link[rel='canonical']");return ii(location.href,t&&t.getAttribute("href")||void 0,location.search,location.pathname,document.title,document.referrer)};ze(),ze();var ui=function(t,e){void 0===e&&(e=ai(si()));var r,i,o,a=t.context;"page"===t.type&&(r=t.properties&&(i=t.properties,o=Object.keys(e),Object.assign.apply(Object,K([{}],o.map(function(t){var e;if(i&&Object.prototype.hasOwnProperty.call(i,t))return(e={})[t]=i[t],e}),!1))),t.properties=n(n(n({},e),t.properties),t.name?{name:t.name}:{})),a.page=n(n(n({},e),r),a.page)};gn();var ci=function(t){function e(e){var n=t.call(this,{createMessageId:function(){return"ajs-next-".concat(Date.now(),"-").concat(X())},onEventMethodCall:function(t){var e=t.options;n.maybeUpdateAnonId(e)},onFinishedEvent:function(t){return n.addIdentity(t),t}})||this;return n.user=e,n}return B(e,t),e.prototype.maybeUpdateAnonId=function(t){(null==t?void 0:t.anonymousId)&&this.user.anonymousId(t.anonymousId)},e.prototype.addIdentity=function(t){this.user.id()&&(t.userId=this.user.id()),this.user.anonymousId()&&(t.anonymousId=this.user.anonymousId())},e.prototype.track=function(e,n,r,i,o){var a=t.prototype.track.call(this,e,n,r,i);return ui(a,o),a},e.prototype.page=function(e,n,r,i,o,a){var s=t.prototype.page.call(this,e,n,r,i,o);return ui(s,a),s},e.prototype.screen=function(e,n,r,i,o,a){var s=t.prototype.screen.call(this,e,n,r,i,o);return ui(s,a),s},e.prototype.identify=function(e,n,r,i,o){var a=t.prototype.identify.call(this,e,n,r,i);return ui(a,o),a},e.prototype.group=function(e,n,r,i,o){var a=t.prototype.group.call(this,e,n,r,i);return ui(a,o),a},e.prototype.alias=function(e,n,r,i,o){var a=t.prototype.alias.call(this,e,n,r,i);return ui(a,o),a},e}(c),li=function(t){return"addMiddleware"in t&&"destination"===t.type};ze(),Dn(),gn(),_n();var fi=function(t){function e(e){return t.call(this,"string"==typeof e?new q(4,e):e)||this}return B(e,t),e.prototype.flush=function(){return U(this,void 0,void 0,function(){return V(this,function(e){return at()?[2,[]]:[2,t.prototype.flush.call(this)]})})},e}(S);ze(),an(),ze();var di=function t(e,n){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=Xt({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var a in i)i[a]&&(o+="; "+a,!0!==i[a]&&(o+="="+i[a].split(";")[0]));return document.cookie=t+"="+e.write(r,t)+o}}return Object.create({set:r,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(r[s]=e.read(a,s),t===s)break}catch(t){}}return t?r[t]:r}},remove:function(t,e){r(t,"",Xt({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,Xt({},this.attributes,e))},withConverter:function(e){return t(Xt({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),pi=di,hi=function(){function t(e){void 0===e&&(e=t.defaults),this.options=n(n({},t.defaults),e)}return Object.defineProperty(t,"defaults",{get:function(){return{maxage:365,domain:te(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),t.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},t.prototype.get=function(t){var e;try{var n=pi.get(t);if(null==n)return null;try{return null!==(e=JSON.parse(n))&&void 0!==e?e:null}catch(t){return null!=n?n:null}}catch(t){return null}},t.prototype.set=function(t,e){"string"==typeof e?pi.set(t,e,this.opts()):null===e?pi.remove(t,this.opts()):pi.set(t,JSON.stringify(e),this.opts())},t.prototype.remove=function(t){return pi.remove(t,this.opts())},t}(),vi=function(){function t(){}return t.prototype.localStorageWarning=function(t,e){console.warn("Unable to access ".concat(t,", localStorage may be ").concat(e))},t.prototype.get=function(t){var e;try{var n=localStorage.getItem(t);if(null===n)return null;try{return null!==(e=JSON.parse(n))&&void 0!==e?e:null}catch(t){return null!=n?n:null}}catch(e){return this.localStorageWarning(t,"unavailable"),null}},t.prototype.set=function(t,e){try{localStorage.setItem(t,JSON.stringify(e))}catch(e){this.localStorageWarning(t,"full")}},t.prototype.remove=function(t){try{return localStorage.removeItem(t)}catch(e){this.localStorageWarning(t,"unavailable")}},t}(),yi=function(){function t(){this.cache={}}return t.prototype.get=function(t){var e;return null!==(e=this.cache[t])&&void 0!==e?e:null},t.prototype.set=function(t,e){this.cache[t]=e},t.prototype.remove=function(t){delete this.cache[t]},t}(),mi={Cookie:"cookie",LocalStorage:"localStorage",Memory:"memory"},gi=function(t,e,n,r){console.warn("".concat(t.constructor.name,": Can't ").concat(e,' key "').concat(n,'" | Err: ').concat(r))},bi=function(){function t(t){this.stores=t}return t.prototype.get=function(t){for(var e=null,n=0,r=this.stores;n<r.length;n++){var i=r[n];try{if(null!=(e=i.get(t)))return e}catch(e){gi(i,"get",t,e)}}return null},t.prototype.set=function(t,e){this.stores.forEach(function(n){try{n.set(t,e)}catch(e){gi(n,"set",t,e)}})},t.prototype.clear=function(t){this.stores.forEach(function(e){try{e.remove(t)}catch(n){gi(e,"remove",t,n)}})},t.prototype.getAndSync=function(t){var e=this.get(t),n="number"==typeof e?e.toString():e;return this.set(t,n),n},t}(),_i={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},wi=function(){function t(t,e){void 0===t&&(t=_i);var r,i,o,a,s=this;this.options={},this.id=function(t){if(s.options.disable)return null;var e=s.identityStore.getAndSync(s.idKey);void 0!==t&&(s.identityStore.set(s.idKey,t),t!==e&&null!==e&&null!==t&&s.anonymousId(null));var n=s.identityStore.getAndSync(s.idKey);if(n)return n;var r=s.legacyUserStore.get(_i.cookie.oldKey);return r?"object"===(void 0===r?"undefined":_type_of(r))?r.id:r:null},this.anonymousId=function(t){var e,n;if(s.options.disable)return null;if(void 0===t){var r=null!==(e=s.identityStore.getAndSync(s.anonKey))&&void 0!==e?e:null===(n=s.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===t?(s.identityStore.set(s.anonKey,null),s.identityStore.getAndSync(s.anonKey)):(s.identityStore.set(s.anonKey,null!=t?t:X()),s.identityStore.getAndSync(s.anonKey))},this.traits=function(t){var e;if(!s.options.disable)return null===t&&(t={}),t&&s.traitsStore.set(s.traitsKey,null!=t?t:{}),null!==(e=s.traitsStore.get(s.traitsKey))&&void 0!==e?e:{}},this.options=n(n({},_i),t),this.cookieOptions=e,this.idKey=null!==(i=null===(r=t.cookie)||void 0===r?void 0:r.key)&&void 0!==i?i:_i.cookie.key,this.traitsKey=null!==(a=null===(o=t.localStorage)||void 0===o?void 0:o.key)&&void 0!==a?a:_i.localStorage.key,this.anonKey="ajs_anonymous_id",this.identityStore=this.createStorage(this.options,e),this.legacyUserStore=this.createStorage(this.options,e,function(t){return t===mi.Cookie}),this.traitsStore=this.createStorage(this.options,e,function(t){return t!==mi.Cookie});var u=this.legacyUserStore.get(_i.cookie.oldKey);u&&"object"===(void 0===u?"undefined":_type_of(u))&&(u.id&&this.id(u.id),u.traits&&this.traits(u.traits)),Zt(this)}return t.prototype.legacySIO=function(){var t=this.legacyUserStore.get("_sio");if(!t)return null;var e=t.split("----");return[e[0],e[1]]},t.prototype.identify=function(t,e){if(!this.options.disable){e=null!=e?e:{};var r=this.id();null!==r&&r!==t||(e=n(n({},this.traits()),e)),t&&this.id(t),this.traits(e)}},t.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},t.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},t.prototype.load=function(){return new t(this.options,this.cookieOptions)},t.prototype.save=function(){return!0},t.prototype.createStorage=function(t,e,n){var r=[mi.LocalStorage,mi.Cookie,mi.Memory];return t.disable?new bi([]):t.persist?(void 0!==t.storage&&null!==t.storage&&ee(t.storage)&&(r=t.storage.stores),t.localStorageFallbackDisabled&&(r=r.filter(function(t){return t!==mi.LocalStorage})),n&&(r=r.filter(n)),new bi(ne(re(r,e)))):new bi([new yi])},t.defaults=_i,t}(),xi={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},ji=function(t){function e(e,r){void 0===e&&(e=xi);var i=t.call(this,n(n({},xi),e),r)||this;return i.anonymousId=function(t){},Zt(i),i}return B(e,t),e}(wi);Dn(),kn(),An(),xn(),Rn(),ze();var ki=function(t){return"object"===(void 0===t?"undefined":_type_of(t))&&null!==t&&"then"in t&&"function"==typeof t.then};kn(),Rn(),Sn();var Si=function(t,e,n){n.getAndRemove(t).forEach(function(t){ie(e,t).catch(console.error)})},Oi=function(t,e){return U(void 0,void 0,void 0,function(){var n,r,i;return V(this,function(o){switch(o.label){case 0:n=0,r=e.getAndRemove("addSourceMiddleware"),o.label=1;case 1:return n<r.length?(i=r[n],[4,ie(t,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}})})},Pi=function(t,e){return U(void 0,void 0,void 0,function(){var n,r,i;return V(this,function(o){switch(o.label){case 0:n=0,r=e.getAndRemove("register"),o.label=1;case 1:return n<r.length?(i=r[n],[4,ie(t,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}})})},Ii=Si.bind(void 0,"on"),Ei=Si.bind(void 0,"setAnonymousId"),Ai=function(t,e){Object.keys(e.calls).forEach(function(n){e.getAndRemove(n).forEach(function(e){setTimeout(function(){ie(t,e).catch(console.error)},0)})})},Mi=function(t){if(Ci(t)){var e=t.pop();return ai(e)}},Ci=function(t){var e=t[t.length-1];return $t(e)},Ni=function(t,e,n,r){void 0===n&&(n=function(){}),void 0===r&&(r=console.error),this.method=t,this.resolve=n,this.reject=r,this.called=!1,this.args=e},Fi=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._callMap={},this.add.apply(this,t)}return Object.defineProperty(t.prototype,"calls",{get:function(){return this._pushSnippetWindowBuffer(),this._callMap},set:function(t){this._callMap=t},enumerable:!1,configurable:!0}),t.prototype.get=function(t){var e;return null!==(e=this.calls[t])&&void 0!==e?e:[]},t.prototype.getAndRemove=function(t){var e=this.get(t);return this.calls[t]=[],e},t.prototype.add=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach(function(e){["track","screen","alias","group","page","identify"].includes(e.method)&&!Ci(e.args)&&(e.args=K(K([],e.args,!0),[si()],!1)),t.calls[e.method]?t.calls[e.method].push(e):t.calls[e.method]=[e]})},t.prototype.clear=function(){this._pushSnippetWindowBuffer(),this.calls={}},t.prototype.toArray=function(){var t;return(t=[]).concat.apply(t,Object.values(this.calls))},t.prototype._pushSnippetWindowBuffer=function(){if("npm"!==ut()){var t=pt();if(Array.isArray(t)){var e=t.splice(0,t.length).map(function(t){var e=t[0],n=t.slice(1);return new Ni(e,n)});this.add.apply(this,e)}}},t}(),Di=function(){function t(t){var e=this;this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=E,this._preInitBuffer=new Fi,this._promise=t(this._preInitBuffer),this._promise.then(function(t){var n=t[0],r=t[1];e.instance=n,e.ctx=r}).catch(function(){})}return t.prototype.then=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).then.apply(t,e)},t.prototype.catch=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).catch.apply(t,e)},t.prototype.finally=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).finally.apply(t,e)},t.prototype._createMethod=function(t){var e=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(e.instance){var o=(n=e.instance)[t].apply(n,r);return Promise.resolve(o)}return new Promise(function(n,i){e._preInitBuffer.add(new Ni(t,r,n,i))})}},t.prototype._createChainableMethod=function(t){var e=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.instance?((n=e.instance)[t].apply(n,r),e):(e._preInitBuffer.add(new Ni(t,r)),e)}},t}();ze(),_n(),An(),Dn(),ir(),ze(),jn();var Ri=function(t){var e=!1;window.addEventListener("pagehide",function(){e||t(e=!0)}),document.addEventListener("visibilitychange",function(){if("hidden"==document.visibilityState){if(e)return;e=!0}else e=!1;t(e)})};ze();var Ti=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e)||this;return i.retryTimeout=n,i.isRetryableWithoutCount=r,i.name="RateLimitError",i}return B(e,t),e}(Error);En(),ze();var Li=function(t){return n({"Content-Type":"text/plain"},"function"==typeof t?t():t)},qi={408:"retry",410:"retry",429:"retry",460:"retry",501:"drop",505:"drop",511:"drop"},Bi=500,zi=64;jn(),ze(),ze(),_n(),En(),gn(),or(),On();var Ui,Vi=function(t){return"Segment.io"===t.name},Ki="This is being deprecated and will be not be available in future releases of Analytics JS",Hi=P(),Gi=null==Hi?void 0:Hi.analytics,Ji=function(){function t(t,e){var n;this.timeout=300,this._getSegmentPluginMetadata=function(){var t;return null===(t=e.plugins.find(Vi))||void 0===t?void 0:t.metadata},this.writeKey=t.writeKey;this.cdnSettings=null!==(n=t.cdnSettings)&&void 0!==n?n:{integrations:{"Segment.io":{apiKey:""}}},this.cdnURL=t.cdnURL}return Object.defineProperty(t.prototype,"apiHost",{get:function(){var t,e;return null===(e=null===(t=this._getSegmentPluginMetadata)||void 0===t?void 0:t.call(this))||void 0===e?void 0:e.apiHost},enumerable:!1,configurable:!0}),t}(),Wi=function(t){function e(e,r,i,o,a){var s,u,c=this;(c=t.call(this)||this)._debug=!1,c.initialized=!1,c.user=function(){return c._user},c.init=c.initialize.bind(c),c.log=ye,c.addIntegrationMiddleware=ye,c.listeners=ye,c.addEventListener=ye,c.removeAllListeners=ye,c.removeListener=ye,c.removeEventListener=ye,c.hasListeners=ye,c.add=ye,c.addIntegration=ye;var l=null==r?void 0:r.cookie,f=null!==(s=null==r?void 0:r.disableClientPersistence)&&void 0!==s&&s;c.queue=null!=i?i:function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var r=e?10:1,i=n?new p(r,[]):new q(r,t);return new fi(i)}("".concat(e.writeKey,":event-queue"),null==r?void 0:r.retryQueue,f),c.settings=new Ji(e,c.queue);var d=null==r?void 0:r.storage;return c._universalStorage=c.createStore(f,d,l),c._user=null!=o?o:new wi(n({persist:!f,storage:null==r?void 0:r.storage},null==r?void 0:r.user),l).load(),c._group=null!=a?a:new ji(n({persist:!f,storage:null==r?void 0:r.storage},null==r?void 0:r.group),l).load(),c.eventFactory=new ci(c._user),c.integrations=null!==(u=null==r?void 0:r.integrations)&&void 0!==u?u:{},c.options=null!=r?r:{},Zt(c),c}return B(e,t),e.prototype.createStore=function(t,e,n){return t?new bi([new yi]):e&&ee(e)?new bi(ne(re(e.stores,n))):new bi(ne([mi.LocalStorage,{name:mi.Cookie,settings:n},mi.Memory]))},Object.defineProperty(e.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),e.prototype.track=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u=this;return V(this,function(c){return e=Mi(t),n=Wt.apply(void 0,t),r=n[0],i=n[1],o=n[2],a=n[3],s=this.eventFactory.track(r,i,o,this.integrations,e),[2,this._dispatch(s,a).then(function(t){return u.emit("track",r,t.event.properties,t.event.options),t})]})})},e.prototype.page=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u,c=this;return V(this,function(l){return e=Mi(t),n=Yt.apply(void 0,t),r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=this.eventFactory.page(r,i,o,a,this.integrations,e),[2,this._dispatch(u,s).then(function(t){return c.emit("page",r,i,t.event.properties,t.event.options),t})]})})},e.prototype.identify=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u=this;return V(this,function(c){return e=Mi(t),n=ni(this._user).apply(void 0,t),r=n[0],i=n[1],o=n[2],a=n[3],this._user.identify(r,i),s=this.eventFactory.identify(this._user.id(),this._user.traits(),o,this.integrations,e),[2,this._dispatch(s,a).then(function(t){return u.emit("identify",t.event.userId,t.event.traits,t.event.options),t})]})})},e.prototype.group=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=Mi(e);if(0===e.length)return this._group;var i=ni(this._group).apply(void 0,e),o=i[0],a=i[1],s=i[2],u=i[3];this._group.identify(o,a);var c=this._group.id(),l=this._group.traits(),f=this.eventFactory.group(c,l,s,this.integrations,r);return this._dispatch(f,u).then(function(e){return t.emit("group",e.event.groupId,e.event.traits,e.event.options),e})},e.prototype.alias=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u=this;return V(this,function(c){return e=Mi(t),n=Qt.apply(void 0,t),r=n[0],i=n[1],o=n[2],a=n[3],s=this.eventFactory.alias(r,i,o,this.integrations,e),[2,this._dispatch(s,a).then(function(t){return u.emit("alias",r,i,t.event.options),t})]})})},e.prototype.screen=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u,c=this;return V(this,function(l){return e=Mi(t),n=Yt.apply(void 0,t),r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=this.eventFactory.screen(r,i,o,a,this.integrations,e),[2,this._dispatch(u,s).then(function(t){return c.emit("screen",r,i,t.event.properties,t.event.options),t})]})})},e.prototype.trackClick=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n;return V(this,function(r){switch(r.label){case 0:return[4,Promise.resolve().then(function(){return ur(),sr})];case 1:return e=r.sent(),[2,(n=e.link).call.apply(n,K([this],t,!1))]}})})},e.prototype.trackLink=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n;return V(this,function(r){switch(r.label){case 0:return[4,Promise.resolve().then(function(){return ur(),sr})];case 1:return e=r.sent(),[2,(n=e.link).call.apply(n,K([this],t,!1))]}})})},e.prototype.trackSubmit=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n;return V(this,function(r){switch(r.label){case 0:return[4,Promise.resolve().then(function(){return ur(),sr})];case 1:return e=r.sent(),[2,(n=e.form).call.apply(n,K([this],t,!1))]}})})},e.prototype.trackForm=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n;return V(this,function(r){switch(r.label){case 0:return[4,Promise.resolve().then(function(){return ur(),sr})];case 1:return e=r.sent(),[2,(n=e.form).call.apply(n,K([this],t,!1))]}})})},e.prototype.register=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n,r=this;return V(this,function(i){switch(i.label){case 0:return e=R.system(),n=t.map(function(t){return r.queue.register(e,t,r)}),[4,Promise.all(n)];case 1:return i.sent(),[2,e]}})})},e.prototype.deregister=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return U(this,void 0,void 0,function(){var e,n,r=this;return V(this,function(i){switch(i.label){case 0:return e=R.system(),n=t.map(function(t){var n=r.queue.plugins.find(function(e){return e.name===t});if(n)return r.queue.deregister(e,n,r);e.log("warn","plugin ".concat(t," not found"))}),[4,Promise.all(n)];case 1:return i.sent(),[2,e]}})})},e.prototype.debug=function(t){return!1===t&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=t,this},e.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit("reset")},e.prototype.timeout=function(t){this.settings.timeout=t},e.prototype._dispatch=function(t,e){return U(this,void 0,void 0,function(){var n;return V(this,function(r){return(n=new R(t)).stats.increment("analytics_js.invoke",1,[t.type]),at()&&!this.options.retryQueue?[2,n]:[2,nt(n,this.queue,this,{callback:e,debug:this._debug,timeout:this.settings.timeout})]})})},e.prototype.addSourceMiddleware=function(t){return U(this,void 0,void 0,function(){var e=this;return V(this,function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run(function(){return U(e,void 0,void 0,function(){var e,n,r;return V(this,function(i){switch(i.label){case 0:return[4,Promise.resolve().then(function(){return lr(),cr})];case 1:return e=i.sent().sourceMiddlewarePlugin,n={},this.queue.plugins.forEach(function(t){if("destination"===t.type)return n[t.name]=!0}),r=e(t,n),[4,this.register(r)];case 2:return i.sent(),[2]}})})})];case 1:return n.sent(),[2,this]}})})},e.prototype.addDestinationMiddleware=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this.queue.plugins.filter(li).forEach(function(n){"*"!==t&&n.name.toLowerCase()!==t.toLowerCase()||n.addMiddleware.apply(n,e)}),Promise.resolve(this)},e.prototype.setAnonymousId=function(t){return this._user.anonymousId(t)},e.prototype.queryString=function(t){return U(this,void 0,void 0,function(){return V(this,function(e){switch(e.label){case 0:return!1===this.options.useQueryString?[2,[]]:[4,Promise.resolve().then(function(){return jr(),pr})];case 1:return[2,(0,e.sent().queryString)(this,t)]}})})},e.prototype.use=function(t){return t(this),this},e.prototype.ready=function(t){return void 0===t&&(t=function(t){return t}),U(this,void 0,void 0,function(){return V(this,function(e){return[2,Promise.all(this.queue.plugins.map(function(t){return t.ready?t.ready():Promise.resolve()})).then(function(e){return t(e),e})]})})},e.prototype.noConflict=function(){var t;return console.warn(Ki),t=null!=Gi?Gi:this,window[Cn]=t,this},e.prototype.normalize=function(t){return console.warn(Ki),this.eventFactory.normalize(t)},Object.defineProperty(e.prototype,"failedInitializations",{get:function(){return console.warn(Ki),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"VERSION",{get:function(){return E},enumerable:!1,configurable:!0}),e.prototype.initialize=function(t,e){return U(this,void 0,void 0,function(){return V(this,function(t){return console.warn(Ki),[2,Promise.resolve(this)]})})},e.prototype.pageview=function(t){return U(this,void 0,void 0,function(){return V(this,function(e){switch(e.label){case 0:return console.warn(Ki),[4,this.page({path:t})];case 1:return e.sent(),[2,this]}})})},Object.defineProperty(e.prototype,"plugins",{get:function(){var t;return console.warn(Ki),null!==(t=this._plugins)&&void 0!==t?t:{}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Integrations",{get:function(){return console.warn(Ki),this.queue.plugins.filter(function(t){return"destination"===t.type}).reduce(function(t,e){var n="".concat(e.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return t;var i=r.Integration;return i?(t[e.name]=i,t):(t[e.name]=r,t)},{})},enumerable:!1,configurable:!0}),e.prototype.push=function(t){var e=t.shift();e&&!this[e]||this[e].apply(this,t)},e}(f),Yi=function(t){function e(){var e=t.call(this,{writeKey:""},{disableClientPersistence:!0})||this;return e.initialized=!0,e}return B(e,t),e}(Wi);ze(),kr(),En(),Sr(),nn(),ze(),kn(),Sn(),dr(),ze();var Qi=new function(){var t=this;this.name="Page Enrichment",this.type="before",this.version="0.1.0",this.isLoaded=function(){return!0},this.load=function(e,n){return U(t,void 0,void 0,function(){var t;return V(this,function(e){switch(e.label){case 0:this.instance=n,e.label=1;case 1:return e.trys.push([1,3,,4]),t=this,[4,ge(this.instance.options.highEntropyValuesClientHints)];case 2:return t.userAgentData=e.sent(),[3,4];case 3:return e.sent(),[3,4];case 4:return[2,Promise.resolve()]}})})},this.enrich=function(e){var r,i,o=e.event.context,a=o.page.search||"",s="object"===(void 0===a?"undefined":_type_of(a))?function(t){try{var e=new URLSearchParams;return Object.entries(t).forEach(function(t){var n=t[0],r=t[1];Array.isArray(r)?r.forEach(function(t){return e.append(n,t)}):e.append(n,r)}),e.toString()}catch(t){return""}}(a):a;o.userAgent=navigator.userAgent,o.userAgentData=t.userAgentData;var u=navigator.userLanguage||navigator.language;void 0===o.locale&&void 0!==u&&(o.locale=u),null!==(r=o.library)&&void 0!==r||(o.library={name:"analytics.js",version:"".concat("web"===ut()?"next":"npm:next","-").concat(E)}),s&&!o.campaign&&(o.campaign=function(t){return t.startsWith("?")&&(t=t.substring(1)),(t=t.replace(/\?/g,"&")).split("&").reduce(function(t,e){var n=e.split("="),r=n[0],i=n[1],o=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var a=r.slice(4);"campaign"===a&&(a="name"),t[a]=_t(o)}return t},{})}(s));var c=function(){var t=pi.get("_ga");if(t&&t.startsWith("amp"))return t}();c&&(o.amp={id:c}),function(t,e,r){var i,o=new bi(r?[]:[new hi(be())]),a=o.get("s:context.referrer"),s=null!==(i=function(t){var e={btid:"dataxu",urid:"millennial-media"};t.startsWith("?")&&(t=t.substring(1));for(var n=0,r=(t=t.replace(/\?/g,"&")).split("&");n<r.length;n++){var i=r[n].split("="),o=i[0],a=i[1];if(e[o])return{id:a,type:e[o]}}}(t))&&void 0!==i?i:a;s&&(e&&(e.referrer=n(n({},e.referrer),s)),o.set("s:context.referrer",s))}(s,o,null!==(i=t.instance.options.disableClientPersistence)&&void 0!==i&&i);try{o.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){}return e},this.track=this.enrich,this.identify=this.enrich,this.page=this.enrich,this.group=this.enrich,this.alias=this.enrich,this.screen=this.enrich};ze(),Or(),kr(),lr(),En(),Pr(),nn();var $i,Zi,Xi=function(){function t(t,e){this.version="1.0.0",this.alternativeNames=[],this.loadPromise=l(),this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=e,this.name=t,this.type=e.type,this.alternativeNames.push(e.name)}return t.prototype.addMiddleware=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];"destination"===this.type&&(t=this.middleware).push.apply(t,e)},t.prototype.transform=function(t){return U(this,void 0,void 0,function(){var e;return V(this,function(n){switch(n.label){case 0:return[4,mt(this.name,t.event,this.middleware)];case 1:return null===(e=n.sent())&&t.cancel(new w({retry:!1,reason:"dropped by destination middleware"})),[2,new R(e)]}})})},t.prototype._createMethod=function(t){var e=this;return function(n){return U(e,void 0,void 0,function(){var e,r;return V(this,function(i){switch(i.label){case 0:return this.action[t]?(e=n,"destination"!==this.type?[3,2]:[4,this.transform(n)]):[2,n];case 1:e=i.sent(),i.label=2;case 2:return i.trys.push([2,5,,6]),[4,this.ready()];case 3:if(!i.sent())throw new Error("Something prevented the destination from getting ready");return St(n,{integrationName:this.action.name,methodName:t,type:"action"}),[4,this.action[t](e)];case 4:return i.sent(),[3,6];case 5:throw r=i.sent(),St(n,{integrationName:this.action.name,methodName:t,type:"action",didError:!0}),r;case 6:return[2,n]}})})}},t.prototype.isLoaded=function(){return this.action.isLoaded()},t.prototype.ready=function(){return U(this,void 0,void 0,function(){return V(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.loadPromise.promise];case 1:return t.sent(),[2,!0];case 2:return t.sent(),[2,!1];case 3:return[2]}})})},t.prototype.load=function(t,e){return U(this,void 0,void 0,function(){var n,r,i,o;return V(this,function(a){switch(a.label){case 0:if(this.loadPromise.isSettled())return[2,this.loadPromise.promise];a.label=1;case 1:return a.trys.push([1,3,,4]),St(t,{integrationName:this.action.name,methodName:"load",type:"action"}),n=this.action.load(t,e),i=(r=this.loadPromise).resolve,[4,n];case 2:return i.apply(r,[a.sent()]),[2,n];case 3:throw o=a.sent(),St(t,{integrationName:this.action.name,methodName:"load",type:"action",didError:!0}),this.loadPromise.reject(o),o;case 4:return[2]}})})},t.prototype.unload=function(t,e){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,t,e)},t}();xn();var to=null!==($i=(Zi=P()).__SEGMENT_INSPECTOR__)&&void 0!==$i?$i:Zi.__SEGMENT_INSPECTOR__={},eo=function(t){var e;return null===(e=to.attach)||void 0===e?void 0:e.call(to,t)};In(),Rn(),jn();var no=function(){var t,e,n=null!==(t=window.location.hash)&&void 0!==t?t:"",r=null!==(e=window.location.search)&&void 0!==e?e:"";return r.length?r:n.replace(/(?=#).*(?=\?)/,"")},ro=function(t,e){return U(void 0,void 0,void 0,function(){return V(this,function(n){switch(n.label){case 0:return e.includes("ajs_")?[4,t.queryString(e).catch(console.error)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},io=function(t){function e(){var e=this,n=l(),r=n.promise,i=n.resolve;return(e=t.call(this,function(t){return r.then(function(e){var n=e[0],r=e[1];return ke(n,r,t)})})||this)._resolveLoadStart=function(t,e){return i([t,e])},e}return B(e,t),e.prototype.load=function(t,e){return void 0===e&&(e={}),this._resolveLoadStart(t,e),this},e.load=function(t,n){return void 0===n&&(n={}),(new e).load(t,n)},e.standalone=function(t,n){return e.load({writeKey:t},n).then(function(t){return t[0]})},e}(Di);En();var oo,ao={},so={load:function(t,e){return io.load(t,e)}},uo={type:"segment",config:{},init:function(t){var e,n=t.config,r=t.env;if(!(null===(e=n.settings)||void 0===e?void 0:e.apiKey))return!1;var i=n.settings,o=Se(r),a={lastIdentity:{},lastGroup:{},loaded:!1};return!!n.consent&&Object.keys(n.consent).length>0||(a.analytics=Oe(o,i),a.loaded=!0),_object_spread_props(_object_spread({},n),{settings:_object_spread_props(_object_spread({},i),{_state:a})})},push:function(t,e){return _async_to_generator(function(t,e){var n,r,i,o,a,s,u,c,l,f,d,p,h,v,y,m,g,b,_,w;return _ts_generator(this,function(x){switch(x.label){case 0:return n=e.config,r=e.rule,i=e.env,o=e.data,a=e.collector,c=Se(i),l=n.settings||{},f=l._state||{},d=function(t,e,n){return n.analytics?n.analytics:n.loaded?void 0:(n.analytics=Oe(t,e),n.loaded=!0,n.analytics)}(c,l,f),d?(p=(null==r?void 0:r.settings)||{},h=function(t,e){var n=e.consent;if(n&&0!==Object.keys(n).length){var r=t.consent;if(Vt(r)){var i={},o=!0,a=!1,s=void 0;try{for(var u,c=Object.entries(n)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var l=_sliced_to_array(u.value,2),f=l[0],d=l[1];f in r&&(i[d]=!0===r[f])}}catch(t){a=!0,s=t}finally{try{o||null==c.return||c.return()}finally{if(a)throw s}}if(0!==Object.keys(i).length)return{context:{consent:{categoryPreferences:i}}}}}}(t,l),void 0===p.reset?[3,4]:"boolean"!=typeof p.reset?[3,1]:(v=p.reset,[3,3])):[2];case 1:return[4,Jt(t,p.reset,{collector:a})];case 2:v=x.sent(),x.label=3;case 3:v&&(d.reset(),f.lastIdentity={},f.lastGroup={}),x.label=4;case 4:return void 0===(y=null!==(s=p.identify)&&void 0!==s?s:l.identify)?[3,6]:[4,Jt(t,y,{collector:a})];case 5:m=x.sent(),Vt(m)&&function(t,e,n,r){var i,o=n.lastIdentity||{},a=Kt(e.userId)?e.userId:void 0,s=Kt(e.anonymousId)?e.anonymousId:void 0,u=Vt(e.traits)&&!zt(e.traits)?e.traits:void 0;s&&s!==o.anonymousId&&t.setAnonymousId(s);var c=Pe(u),l=a!==o.userId,f=c!==(null!==(i=o.traitsHash)&&void 0!==i?i:"");(l||void 0!==u&&f||s)&&(r?t.identify(a,u||{},r):t.identify(a,u||{}),n.lastIdentity={userId:a,anonymousId:null!=s?s:o.anonymousId,traitsHash:c})}(d,m,f,h),x.label=6;case 6:return void 0===(g=null!==(u=p.group)&&void 0!==u?u:l.group)?[3,8]:[4,Jt(t,g,{collector:a})];case 7:b=x.sent(),Vt(b)&&function(t,e,n,r){var i,o=Kt(e.groupId)?e.groupId:void 0;if(o){var a=Vt(e.traits)&&!zt(e.traits)?e.traits:void 0,s=n.lastGroup||{},u=Pe(a),c=o!==s.groupId,l=u!==(null!==(i=s.traitsHash)&&void 0!==i?i:"");(c||l)&&(r?t.group(o,a||{},r):t.group(o,a||{}),n.lastGroup={groupId:o,traitsHash:u})}}(d,b,f,h),x.label=8;case 8:return void 0===p.page?[3,10]:[4,Ie(d,p.page,t,a,h)];case 9:x.sent(),x.label=10;case 10:return!0!==(null==r?void 0:r.silent)&&(_=Kt(null==r?void 0:r.name)?r.name:t.name,w=Vt(o)?o:{},h?d.track(_,w,h):d.track(_,w)),l._state=f,[2]}})}).apply(this,arguments)},on:function(t,e){var n,r;if("consent"===t&&e.data){var i=e.data,o=null===(n=e.config)||void 0===n?void 0:n.consent;if(o&&0!==Object.keys(o).length){var a=(null===(r=e.config)||void 0===r?void 0:r.settings)||{},s=a._state||{},u=Se(e.env);Object.keys(o).every(function(t){return!0===i[t]})&&!s.loaded&&(s.analytics=Oe(u,a),s.loaded=!0,a._state=s)}}}},co=uo;return oo=Jr,qe(Ae({},"__esModule",{value:!0}),oo)}();
|
|
2
2
|
/*! Bundled license information:
|
|
3
3
|
|
|
4
4
|
@segment/analytics-next/dist/pkg/vendor/tsub/tsub.js:
|