@walkeros/web-destination-segment 3.4.2 → 4.0.0-next-1777463920154

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.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 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 _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 _instanceof(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}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 _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 _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,d,f,p,h,v,y,m,g,b,_,w,x,j,k,S,P,O,I,A,E,M,N,F,C,D,T,R,L,q,z=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)},U=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},B=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 B(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 B(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,P(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 E},ct=function(t){console.error("Error sending segment performance metrics",t)},lt=function(t){var e=R.getItem(t);return(e?JSON.parse(e):[]).map(function(t){return new T(t.event,t.id)})},dt=function(t){var e=R.getItem(t);return e?JSON.parse(e):{}},ft=function(t){R.removeItem(t)},pt=function(){return window[wn]},ht=function(t,e){var n=new xn.Facade(t,e);return"track"===t.type&&(n=new xn.Track(t,e)),"identify"===t.type&&(n=new xn.Identify(t,e)),"page"===t.type&&(n=new xn.Page(t,e)),"alias"===t.type&&(n=new xn.Alias(t,e)),"group"===t.type&&(n=new xn.Group(t,e)),"screen"===t.type&&(n=new xn.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")),d=$(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,d.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 B(this,void 0,void 0,function(){function i(e,r){return B(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 B(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,d=u.uid,f=void 0===d?/.+/:d;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(f.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 d=window.document.querySelector("script");d?null===(i=d.parentElement)||void 0===i||i.insertBefore(o,d):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)])},Pt=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},Ot=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},At=function(t,e,n,r){return B(this,void 0,void 0,function(){var i,o,a,s,u,c;return V(this,function(l){switch(l.label){case 0:i=Ot(e),o=It(i,r),a=cr(),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")]]}})})},Et=function(t,e){return B(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,jn(function(){return e.length>0&&ot()},function(){return B(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,T)||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,d=i.integrations,f=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 br(t,l[t])}),!0),Object.keys(p||{}).filter(function(t){return Y(l[t])||Y(null==d?void 0:d[t])}),!0));return Array.from(h).filter(function(t){return!_r(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 xr(e,n,t,f[e],i,null==p?void 0:p[e]);return c.filter(function(t){return t.destinationName===e}).length>0&&o&&r.addMiddleware(o),r})},Nt=function(t){return B(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 Ae(Ar())})];case 1:return e=n.sent(),t._plugins=e,[2]}})})},Ft=function(t,e){function r(r){var i=t,o=r.event.event;if(i&&o){var a=i[o];if(!Pt(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}},Ct=function(t,e,n){var r;return B(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=cr(),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 B(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){return Array.isArray(t)},Tt=function(t){return void 0!==t},Rt=function(t){return"object"==(void 0===t?"undefined":_type_of(t))&&null!==t&&!Dt(t)&&"[object Object]"===Object.prototype.toString.call(t)},Lt=function(t){return"string"==typeof t},qt=function(t){return Ur(t)?t:void 0},zt=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]}})})()}},Ut=function(t){return _async_to_generator(function(t){var e,n,r,i,o,a,s,u,c,l,d,f,p,h=arguments;return _ts_generator(this,function(v){switch(v.label){case 0:if(e=h.length>1&&void 0!==h[1]?h[1]:{},n=h.length>2&&void 0!==h[2]?h[2]:{},!Tt(t))return[2];i=Rt(t)&&t.consent||n.consent||(null===(r=n.collector)||void 0===r?void 0:r.consent),o=Dt(e)?e:[e],a=!0,s=!1,u=void 0,v.label=1;case 1:v.trys.push([1,6,7,8]),c=o[Symbol.iterator](),v.label=2;case 2:return(a=(l=c.next()).done)?[3,5]:(d=l.value,[4,zt(Br)(t,d,_object_spread_props(_object_spread({},n),{consent:i}))]);case 3:if(f=v.sent(),Tt(f))return[2,f];v.label=4;case 4:return a=!0,[3,2];case 5:return[3,8];case 6:return p=v.sent(),s=!0,u=p,[3,8];case 7:try{a||null==c.return||c.return()}finally{if(s)throw u}return[7];case 8:return[2]}})}).apply(this,arguments)},Bt=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)]},Vt=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 d=c.find(W),f=c.filter(Y);return 1===f.length?Y(c[2])?(a={},o=c[2]):Y(c[3])?(o={},a=c[3]):(o=f[0],a={}):2===f.length&&(o=f[0],a=f[1]),[s,u,null!=o?o:o={},null!=a?a:a={},d]},Kt=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)]},Ht=function(t){if(e=t,"object"!==Object.prototype.toString.call(e).slice(8,-1).toLowerCase())return!1;var e;if(t.__t!==Kr)return!1;for(var n in t)if(!Gr.includes(n))return!1;return!0},Gt=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},Jt=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},Wt=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(ti.set(i,"1",a),ti.get(i))return ti.remove(i,a),o}catch(t){return}}},Yt=function(t){return t&&t.stores&&Array.isArray(t.stores)&&t.stores.every(function(t){return Object.values(ii).includes(t)})},Qt=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 ii.Cookie:return new ei(n);case ii.LocalStorage:return new ni;case ii.Memory:return new ri;default:throw new Error("Unknown Store Type: ".concat(t))}})},$t=function(t,e){return t.map(function(t){return e&&t===ii.Cookie?{name:t,settings:e}:t})},Zt=function(t,e){return B(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),di(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]}})})},Xt=function(t){return(encodeURI(JSON.stringify(t)).split(/%..|./).length-1)/1024},te=function(t,e){var r,i,o,a=[],s=!1,u=null!==(r=null==e?void 0:e.size)&&void 0!==r?r:10,c=null!==(i=null==e?void 0:e.timeout)&&void 0!==i?i:5e3,l=0;function d(n){var r;if(0!==n.length){var i=null===(r=n[0])||void 0===r?void 0:r.writeKey,o=n.map(function(t){var e=t;e.sentAt;return U(e,["sentAt"])});return I("https://".concat(t,"/b"),{credentials:null==e?void 0:e.credentials,keepalive:(null==e?void 0:e.keepalive)||s,headers:Si(null==e?void 0:e.headers),method:"post",body:JSON.stringify({writeKey:i,batch:o,sentAt:(new Date).toISOString()}),priority:null==e?void 0:e.priority}).then(function(t){var e;if(t.status>=500)throw new Error("Bad response from server: ".concat(t.status));if(429===t.status){var n=null===(e=t.headers)||void 0===e?void 0:e.get("x-ratelimit-reset"),r="string"==typeof n?1e3*parseInt(n):c;throw new ki("Rate limit exceeded: ".concat(t.status),r)}})}}function f(t){var r;return void 0===t&&(t=1),B(this,void 0,void 0,function(){var i;return V(this,function(o){return a.length?(i=a,a=[],[2,null===(r=d(i))||void 0===r?void 0:r.catch(function(r){var o;T.system().log("error","Error sending batch",r),t<=(null!==(o=null==e?void 0:e.maxRetries)&&void 0!==o?o:10)&&("RateLimitError"===r.name&&(l=r.retryTimeout),a.push.apply(a,i),a.map(function(e){if("_metadata"in e){var r=e;r._metadata=n(n({},r._metadata),{retryCount:t})}}),p(t+1))})]):[2]})})}function p(t){void 0===t&&(t=1),o||(o=setTimeout(function(){o=void 0,f(t).catch(console.error)},l||c),l=0)}return ji(function(t){if((s=t)&&a.length){var e=(n=a,r=[],i=0,n.forEach(function(t){Xt(r[i])>=64&&i++,r[i]?r[i].push(t):r[i]=[t]}),r).map(d);Promise.all(e).catch(console.error)}var n,r,i}),{dispatch:function(t,n){return B(this,void 0,void 0,function(){var t;return V(this,function(r){return a.push(n),t=a.length>=u||function(t){return Xt(t)>=Pi-50}(a)||(null==e?void 0:e.keepalive)&&function(t){return Xt(t)>=Oi-10}(a),[2,t||s?f():p()]})})}}},ee=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 d in i){var f=i[d];"Segment.io"===d&&c.push(d),"bundled"===f.bundlingStatus&&c.push(d),"unbundled"===f.bundlingStatus&&l.push(d)}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},ne=function(t,e){return B(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,jn(function(){return e.length>0&&!at()},function(){return B(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,T)||n.push(r),[2]}})})})];case 1:return i.sent(),n.map(function(t){return e.pushWithBackoff(t)}),[2,e]}})})},re=function(t,e,n,r){var i=this;t||setTimeout(function(){return B(i,void 0,void 0,function(){var t,i;return V(this,function(o){switch(o.label){case 0:return t=!0,[4,ne(n,e)];case 1:return i=o.sent(),t=!1,e.todo>0&&r(t,i,n,r),[2]}})})},5e3*Math.random())},ie=function(t,e,n){var r,i,o;window.addEventListener("pagehide",function(){u.push.apply(u,Array.from(c)),c.clear()});var a,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=!1,d=null!==(i=null==e?void 0:e.apiHost)&&void 0!==i?i:M,f=null!==(o=null==e?void 0:e.protocol)&&void 0!==o?o:"https",h="".concat(f,"://").concat(d),v=null==e?void 0:e.deliveryStrategy,y=v&&"strategy"in v&&"batching"===v.strategy?te(d,v.config):(a=null==v?void 0:v.config,{dispatch:function(t,e){return I(t,{credentials:null==a?void 0:a.credentials,keepalive:null==a?void 0:a.keepalive,headers:Si(null==a?void 0:a.headers),method:"post",body:JSON.stringify(e),priority:null==a?void 0:a.priority}).then(function(t){var e;if(t.status>=500)throw new Error("Bad response from server: ".concat(t.status));if(429===t.status){var n=null===(e=t.headers)||void 0===e?void 0:e.get("x-ratelimit-reset"),r=n?1e3*parseInt(n):5e3;throw new ki("Rate limit exceeded: ".concat(t.status),r)}})}});function m(r){return B(this,void 0,void 0,function(){var i,o;return V(this,function(a){return at()?(u.push(r),re(l,u,g,re),[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)),u.getAttempts(r)>=u.maxAttempts?(c.delete(r),[2,r]):[2,y.dispatch("".concat(h,"/").concat(i),ee(t,o,e,n,r)).then(function(){return r}).catch(function(t){if(r.log("error","Error sending event",t),"RateLimitError"===t.name){var e=t.retryTimeout;u.pushWithBackoff(r,e)}else u.pushWithBackoff(r);return re(l,u,g,re),r}).finally(function(){c.delete(r)})])})})}var g={metadata:{writeKey:s,apiHost:d,protocol:f},name:"Segment.io",type:"destination",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:m,identify:m,page:m,alias:m,group:m,screen:m};return u.todo&&re(l,u,g,re),g},oe=function(){console.warn(Ei)},ae=function(){return"undefined"!=typeof process&&process.env?process.env:{}},se=function(t){return B(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]})})},ue=function(){if(Ii)return Ii;var t=Wt(window.location.href);return Ii={expires:31536e6,secure:!1,path:"/"},t&&(Ii.domain=t),Ii},ce=function(t,e){return B(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=ur(),!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]}})})},le=function(t,e,r,i,o,a){var s,u,c;return B(this,void 0,void 0,function(){var l,d,f,p=this;return V(this,function(h){switch(h.label){case 0:return l=[],d=null!==(u=null===(s=t.middlewareSettings)||void 0===s?void 0:s.routingRules)&&void 0!==u?u:[],f=(null!==(c=t.remotePlugins)&&void 0!==c?c:[]).map(function(t){return B(p,void 0,void 0,function(){var s,u,c,f,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,ce(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:f=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(f)?f:[f]),h=d.filter(function(e){return e.destinationName===t.creationName}),p.forEach(function(e){var n=new qi(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(T.system(),{integrationName:t.name,methodName:"load",type:"action",didError:!0}),[3,7];case 7:return[2]}})})}),[4,Promise.all(f)];case 1:return h.sent(),[2,l.filter(Boolean)]}})})},de=function(t,e,n){return B(this,void 0,void 0,function(){return V(this,function(r){switch(r.label){case 0:return[4,Vi(t,e)];case 1:return r.sent(),mi(t,n),[2]}})})},fe=function(t,e,n,r,i,o,a){var s,u,c;return void 0===i&&(i=[]),B(this,void 0,void 0,function(){var l,d,f,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){yi(t,e),vi(t,e)}(n,a),l=null==i?void 0:i.filter(function(t){return"object"===(void 0===t?"undefined":_type_of(t))}),d=null==i?void 0:i.filter(function(t){return"function"==typeof t&&"string"==typeof t.pluginName}),function(t){var e,n,r;return"test"!==ae().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 jr(),gr}).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 f=p,P=e,"test"!==ae().NODE_ENV&&Object.keys(P.integrations).length>1||o.length>0?[4,Promise.resolve().then(function(){return Ir(),Or}).then(function(i){return i.ajsDestinations(t,e,n.integrations,r,f,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 Mr(),Er}).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 Fr(),Nr}).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,le(e,n.integrations,g,r,f,d).catch(function(t){return console.error("Failed to load remote plugins",t),[]})];case 12:return b=S.sent(),_=K(K([Ti],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,ie(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,hi(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 Dr(),Cr}).then(function(t){var i=t.remoteMiddlewares;return B(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,pi(n,a)];case 19:return S.sent(),[2,j]}var P})})},pe=function(t,e,r){var i,o,a,s,u,c,l,d,f;return void 0===e&&(e={}),B(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 Di,T.system()]]:(e.globalAnalyticsKey&&(P=e.globalAnalyticsKey,wn=P),t.cdnURL&&sr(t.cdnURL),e.initialPageview&&r.add(new _i("page",[])),p=Bi(),h=null!==(i=t.cdnURL)&&void 0!==i?i:ur(),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 Di,T.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 Ci(n(n({},t),{cdnSettings:v,cdnURL:h}),e),Ui(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!==(d=null==w?void 0:w.apiHost)&&void 0!==d?d:null===(f=v.metrics)||void 0===f?void 0:f.host,protocol:null==w?void 0:w.protocol})),[4,fe(t.writeKey,v,g,e,b,_,r)];case 6:return x=j.sent(),g.initialized=!0,g.emit("initialize",t,e),[4,de(g,p,r)];case 7:return j.sent(),[2,[g,x]]}var k,S,P})})},he=function(t){var e;return null!==(e=null==t?void 0:t.analytics)&&void 0!==e?e:Ji},ve=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)},ye=function(t){if(!t)return"";try{return JSON.stringify(t)}catch(t){return""}},me=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,Ut(n,e,{collector:r})];case 1:return o=l.sent(),Rt(o)?(s=Lt((a=o).category)?a.category:void 0,u=Lt(a.name)?a.name:void 0,c=Rt(a.properties)&&!Dt(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]}})})()},ge=Object.create,be=Object.defineProperty,_e=Object.getOwnPropertyDescriptor,we=Object.getOwnPropertyNames,xe=Object.getPrototypeOf,je=Object.prototype.hasOwnProperty,ke=(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),Se=function(t,e){return function(){return t&&(e=(0,t[we(t)[0]])(t=0)),e}},Pe=function(t,e){return function(){return e||(0,t[we(t)[0]])((e={exports:{}}).exports,e),e.exports}},Oe=function(t,e){for(var n in e)be(t,n,{get:e[n],enumerable:!0})},Ie=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;je.call(t,i)||i===n||be(t,i,{get:function(){return e[i]},enumerable:!(r=_e(e,i))||r.enumerable})},c=we(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},Ae=function(t,e,n){return n=null!=t?ge(xe(t)):{},Ie(!e&&t&&t.__esModule?n:be(n,"default",{value:t,enumerable:!0}),t)},Ee=Se({"../../../../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)}}}),Me=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/emitter/interface.js":function(){}}),Ne=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/plugins/index.js":function(){}}),Fe=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/events/interfaces.js":function(){}}),Ce=Se({"../../../../node_modules/dset/dist/index.mjs":function(){}}),De=Se({"../../../../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},{})}}}),Te=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/validation/errors.js":function(){Ee(),i=function(t){function e(e,n){var r=t.call(this,"".concat(e," ").concat(n))||this;return r.field=e,r}return z(e,t),e}(Error)}}),Re=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/validation/helpers.js":function(){}}),Le=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/validation/assertions.js":function(){Te(),Re(),o="is not a string",a="is not an object",s="is nil"}}),qe=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/events/index.js":function(){Ee(),Fe(),Ce(),De(),Le(),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,d=U(t,["options"]),f=n(n(n(n({timestamp:new Date},d),{context:u,integrations:a}),c),{messageId:l.messageId||this.settings.createMessageId()});return this.settings.onFinishedEvent(f),Q(f),f},t}()}}),ze=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/callback/index.js":function(){}}),Ue=Se({"../../../../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}}}}}),Be=Se({"../../../../node_modules/@segment/analytics-generic-utils/dist/esm/create-deferred/index.js":function(){Ue()}}),Ve=Se({"../../../../node_modules/@segment/analytics-generic-utils/dist/esm/emitter/emitter.js":function(){d=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}()}}),Ke=Se({"../../../../node_modules/@segment/analytics-generic-utils/dist/esm/emitter/index.js":function(){Ve()}}),He=Se({"../../../../node_modules/@segment/analytics-generic-utils/dist/esm/index.js":function(){Be(),Ke()}}),Ge=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/priority-queue/backoff.js":function(){}}),Je=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/priority-queue/index.js":function(){Ee(),He(),Ge(),f="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 z(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){var n=this;if(void 0===e&&(e=0),0==e&&0===this.getAttempts(t))return this.push(t)[0];var r=this.updateAttempts(t);if(r>this.maxAttempts||this.includes(t))return!1;var i=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:r-1});return e>0&&i<e&&(i=e),setTimeout(function(){n.queue.push(t),n.future=n.future.filter(function(e){return e.id!==t.id}),n.emit(f)},i),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}(d)}}),We=Se({"../../../../node_modules/@lukeed/uuid/dist/index.mjs":function(){for(h=256,v=[];h--;)v[h]=(h+256).toString(16).substring(1)}}),Ye=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/logger/index.js":function(){Ee(),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}()}}),Qe=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/stats/index.js":function(){Ee(),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 z(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)}}),$e=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/context/index.js":function(){We(),Ce(),Ye(),Qe(),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}()}}),Ze=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/utils/group-by.js":function(){Ee()}}),Xe=Se({"../../../../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}}}),tn=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/task/task-group.js":function(){Xe(),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}}}}}),en=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/queue/delivery.js":function(){Ee(),$e()}}),nn=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/queue/event-queue.js":function(){Ee(),Ze(),Je(),$e(),He(),tn(),en(),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(f,function(){n.scheduleFlush(0)}),n}return z(e,t),e.prototype.register=function(t,e,n){return B(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 B(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 B(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 B(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 B(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){return B(this,void 0,void 0,function(){var e,n,r,i;return V(this,function(o){switch(o.label){case 0:return[4,this.criticalTasks.done()];case 1:o.sent(),e=Date.now(),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this.flushOne(t)];case 3:return t=o.sent(),n=Date.now()-e,this.emit("delivery_success",t),t.stats.gauge("delivered",n),t.log("debug","Delivered",t.event),[2,t];case 4:throw r=o.sent(),i=r,t.log("error","Failed to deliver",i),this.emit("delivery_failure",t,i),t.stats.increment("delivery_failed"),r;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 B(this,void 0,void 0,function(){var t,e;return V(this,function(n){switch(n.label){case 0:if(0===this.queue.length)return[2,[]];if(!(t=this.queue.pop()))return[2,[]];t.attempts=this.queue.getAttempts(t),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.deliver(t)];case 2:return t=n.sent(),this.emit("flush",t,!0),[3,4];case 3:return e=n.sent(),this.enqueuRetry(e,t)||(t.setFailedDelivery({reason:e}),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,d=i.after;return{before:a,enrichment:u,destinations:l,after:void 0===d?[]:d}},e.prototype.flushOne=function(t){var e,n;return B(this,void 0,void 0,function(){var r,i,o,a,s,u,c,l,d,f,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(f=m.sent(),x)&&(t=f),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?(d=l[c],[4,tt(t,d)]):[3,8];case 6:_instanceof(f=m.sent(),x)&&(t=f),this.emit("message_enriched",t,d),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}(d)}}),rn=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/analytics/index.js":function(){}}),on=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/analytics/dispatch.js":function(){Ee(),ze(),P=function(t,e){var n=Date.now()-t;return Math.max((null!=e?e:300)-n,0)}}}),an=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/utils/bind-all.js":function(){}}),sn=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/index.js":function(){Me(),Ne(),Fe(),qe(),ze(),Je(),$e(),nn(),rn(),on(),Re(),Te(),Le(),an(),Qe(),en()}}),un=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/environment/index.js":function(){}}),cn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/connection/index.js":function(){un()}}),ln=Se({"../../../../node_modules/unfetch/dist/unfetch.mjs":function(){}}),dn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/get-global.js":function(){O=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:null}}}),fn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/fetch.js":function(){ln(),dn(),I=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=O();return(n&&n.fetch||st).apply(void 0,t)}}}),pn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/generated/version.js":function(){A="1.82.0"}}),hn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/version-type.js":function(){E="npm"}}),vn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/constants/index.js":function(){M="api.segment.io/v1"}}),yn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/stats/remote-metrics.js":function(){Ee(),fn(),pn(),hn(),vn(),N=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(A):"npm:next-".concat(A)})}},F=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=N(t,e,ut());this.queue.push(n),t.includes("error")&&this.flush().catch(ct)}},t.prototype.flush=function(){return B(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 B(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}()}}),mn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/stats/index.js":function(){Ee(),sn(),yn(),D=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return z(e,t),e.initRemoteMetrics=function(t){C=new F(t)},e.prototype.increment=function(e,n,r){t.prototype.increment.call(this,e,n,r),null==C||C.increment(e,null!=r?r:[])},e}(b)}}),gn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/context/index.js":function(){Ee(),sn(),mn(),T=function(t){function e(e,n){return t.call(this,e,n,new D)||this}return z(e,t),e.system=function(){return new this({type:"track",event:"system"})},e}(x)}}),bn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/priority-queue/index.js":function(){sn()}});function _n(t,e,n){void 0===n&&(n=0);var r,i="persisted-queue:v1:".concat(t,":lock"),o=R.getItem(i),a=o?JSON.parse(o):null,s=null===a||(r=a,(new Date).getTime()>r);if(s)return R.setItem(i,JSON.stringify(L()+50)),e(),void R.removeItem(i);!s&&n<3?setTimeout(function(){_n(t,e,n+1)},50):console.error("Unable to retrieve lock")}var wn,xn,jn,kn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/priority-queue/persisted.js":function(){Ee(),bn(),gn(),un(),R={getItem:function(){},setItem:function(){},removeItem:function(){}};try{R=rt()&&window.localStorage?window.localStorage:R}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 _n(r,function(){try{s=lt(o),u=dt(a),ft(o),ft(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{_n(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))},{});R.setItem(t,JSON.stringify(Object.values(i)))}(o,t),function(t,e){var r=dt(t);R.setItem(t,JSON.stringify(n(n({},r),e)))}(a,i.seen)})}catch(t){console.error(t)}}}),i}return z(e,t),e}(p)}}),Sn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/global-analytics-helper.js":function(){wn="analytics"}}),Pn=Pe({"../../../../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}}}),On=Pe({"../../../../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(Pn());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")}}}),In=Pe({"../../../../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}}}),An=Pe({"../../../../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]}}}),En=Pe({"../../../../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))}}}),Mn=Pe({"../../../../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)}}}),Nn=Pe({"../../../../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)}}}),Fn=Pe({"../../../../node_modules/new-date/lib/index.js":function(t,e){var n=En(),r=Mn(),i=Nn(),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}}}),Cn=Pe({"../../../../node_modules/@segment/isodate-traverse/lib/index.js":function(t,e){var n=En();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}}),Dn=Pe({"../../../../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(On()),r=In(),i=e(An()),o=e(Fn()),a=e(Pn()),s=e(Cn());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)}}),Tn=Pe({"../../../../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}}}}),Rn=Pe({"../../../../node_modules/inherits/inherits.js":function(t,e){try{if("function"!=typeof(n=ke("util")).inherits)throw"";e.exports=n.inherits}catch(t){e.exports=Tn()}var n}}),Ln=Pe({"../../../../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(Rn()),r=Dn();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=Pe({"../../../../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)}}}),zn=Pe({"../../../../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(Rn()),r=e(qn()),i=e(Fn()),o=Dn();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")||{}}}}),Un=Pe({"../../../../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=Dn(),r=e(Pn()),i=e(Rn()),o=e(qn()),a=e(Fn()),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")}}),Bn=Pe({"../../../../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(Rn()),r=Dn(),i=Un(),o=e(qn()),a=e(Pn());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)}}}),Vn=Pe({"../../../../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(Rn()),r=Dn(),i=Bn(),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)}}}),Kn=Pe({"../../../../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(Rn()),r=Vn(),i=Bn();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)}}}),Hn=Pe({"../../../../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(Rn()),r=Dn();function i(t,e){r.Facade.call(this,t,e)}t.Delete=i,n.default(i,r.Facade),i.prototype.type=function(){return"delete"}}}),Gn=Pe({"../../../../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=Dn();Object.defineProperty(t,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=Ln();Object.defineProperty(t,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=zn();Object.defineProperty(t,"Group",{enumerable:!0,get:function(){return i.Group}});var o=Un();Object.defineProperty(t,"Identify",{enumerable:!0,get:function(){return o.Identify}});var a=Bn();Object.defineProperty(t,"Track",{enumerable:!0,get:function(){return a.Track}});var s=Vn();Object.defineProperty(t,"Page",{enumerable:!0,get:function(){return s.Page}});var u=Kn();Object.defineProperty(t,"Screen",{enumerable:!0,get:function(){return u.Screen}});var c=Hn();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})}}),Jn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/to-facade.js":function(){xn=Ae(Gn())}}),Wn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/p-while.js":function(){Ee(),jn=function(t,e){return B(void 0,void 0,void 0,function(){var n;return V(this,function(r){return[2,(n=function(r){return B(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)]})})}}}),Yn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/callback/index.js":function(){sn()}}),Qn={};Oe(Qn,{form:function(){return yt},link:function(){return vt}});var $n=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/auto-track.js":function(){Yn()}}),Zn={};Oe(Zn,{applyDestinationMiddleware:function(){return mt},sourceMiddlewarePlugin:function(){return gt}});var Xn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/middleware/index.js":function(){Ee(),gn(),Jn()}}),tr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/query-string/pickPrefix.js":function(){}}),er=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/query-string/gracefulDecodeURIComponent.js":function(){}}),nr={};Oe(nr,{queryString:function(){return wt}});var rr,ir,or,ar,sr,ur,cr,lr,dr,fr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/query-string/index.js":function(){tr(),er(),sn()}}),pr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/parse-cdn.js":function(){Sn(),rr=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,ir=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=rr.exec(r);i&&i[1]&&(t=i[1])}),t},ar=function(){var t;return null!=or?or:null===(t=pt())||void 0===t?void 0:t._cdn},sr=function(t){var e=pt();e&&(e._cdn=t),or=t},ur=function(){var t=ar();if(t)return t;var e=ir();return e||"https://cdn.segment.com"},cr=function(){var t=ur();return"".concat(t,"/next-integrations")}}}),hr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/merged-options.js":function(){Ee()}}),vr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/load-script.js":function(){}}),yr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/stats/metric-helpers.js":function(){}}),mr=Pe({"../../../../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,d,f,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 d=a(t[1],e),f=a(t[2],e),p=e,void 0!==f.find(function(t){return a(t,p)===d});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,d=a.err;if(d)return!1;if(!l||!(0===s.length||t.length>0)){if(i)for(var f=0;f<e.length;f++){if(s=(r=c(o,e.slice(f+1))).t,l=r.ok,d=r.err,l){if(0===t.length&&s.length>0)continue;e=s;continue t}if(d)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,d="";if(c=(n=l(t)).char,t=n.newChunk,n.err)return i;if(d=c,"-"===t[0]&&(d=(r=l(t.slice(1))).char,t=r.newChunk,r.err))return i;c<=o&&o<=d&&(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){d(t,e.drop,function(t,e){e.forEach(function(e){return delete t[e]})})}function l(t,e){d(t,e.allow,function(t,e){Object.keys(t).forEach(function(n){e.includes(n)||delete t[n]})})}function d(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 f(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 d=(0,o.default)(n,i.move);void 0!==d&&(0,s.dset)(t,r,d),(0,u.unset)(t,i.move)}else i.hasOwnProperty("set")&&(0,s.dset)(t,r,i.set);if(i.to_string){var f=(0,o.default)(t,r);if("string"==typeof f||"object"==(void 0===f?"undefined":_type_of(f))&&null!==f)continue;void 0!==f?(0,s.dset)(t,r,JSON.stringify(f)):(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 d=[];h(r.slice(9,16),d),s-=c,u.splice(0,c),d.splice(64-c),u=u.concat(d)}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":f(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),d=n(5848),f=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:(f(y,t),e+=y[1],(e+=p(t=y[0]))<u?d(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,d,f;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),d="get"in u,f="set"in u,l&&(d||f))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return d&&r&&r.call(t,s,u.get),f&&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)}()})}}),gr={};Oe(gr,{tsubMiddleware:function(){return dr}});var br,_r,wr,xr,jr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/routing-middleware/index.js":function(){lr=Ae(mr()),dr=function(t){return function(e){var n=e.payload,r=e.integration,i=e.next;new lr.Store(t).getRulesByDestinationName(r).forEach(function(t){for(var e=t.matchers,r=t.transformers,o=0;o<e.length;o++)if(lr.matches(n.obj,e[o])&&(n.obj=lr.transform(n.obj,r[o]),null===n.obj))return i(null)}),i(n)}}}}),kr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/is-plan-event-enabled.js":function(){}}),Sr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/loader.js":function(){Ee(),pr(),vr()}}),Pr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/utils.js":function(){br=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},_r=function(t,e){var n=!1===e.All&&void 0===e[t];return!1===e[t]||n}}}),Or={};Oe(Or,{LegacyDestination:function(){return xr},ajsDestinations:function(){return Mt}});var Ir=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/index.js":function(){Ee(),wr=Ae(Gn()),cn(),gn(),un(),sn(),kr(),hr(),Wn(),bn(),kn(),Xn(),Sr(),sn(),Pr(),yr(),He(),xr=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 B(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,At(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 B(this,void 0,void 0,function(){var r,i,o;return V(this,function(a){return r=cr(),i=Ot(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 B(this,void 0,void 0,function(){var a,s,u,c,l,d;return V(this,function(f){switch(f.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],Pt(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=f.sent()))return[2,t];l=new e(c,{traverse:!this.disableAutoISOConversion}),St(t,{integrationName:this.name,methodName:r,type:"classic"}),f.label=2;case 2:return f.trys.push([2,5,,6]),this.integration?[4,this.integration.invoke.call(this.integration,r,l)]:[3,4];case 3:f.sent(),f.label=4;case 4:return[3,6];case 5:throw d=f.sent(),St(t,{integrationName:this.name,methodName:r,type:"classic",didError:!0}),d;case 6:return[2,t]}})})},t.prototype.track=function(t){return B(this,void 0,void 0,function(){return V(this,function(e){return[2,this.send(t,wr.Track,"track")]})})},t.prototype.page=function(t){var e;return B(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,wr.Page,"page")]}})})},t.prototype.identify=function(t){return B(this,void 0,void 0,function(){return V(this,function(e){return[2,this.send(t,wr.Identify,"identify")]})})},t.prototype.alias=function(t){return B(this,void 0,void 0,function(){return V(this,function(e){return[2,this.send(t,wr.Alias,"alias")]})})},t.prototype.group=function(t){return B(this,void 0,void 0,function(){return V(this,function(e){return[2,this.send(t,wr.Group,"group")]})})},t.prototype.scheduleFlush=function(){var t=this;this.flushing||setTimeout(function(){return B(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,Et(this,this.buffer)]);case 1:return t.buffer=e.sent(),this.flushing=!1,this.buffer.todo>0&&this.scheduleFlush(),[2]}})})},5e3*Math.random())},t}()}}),Ar=Pe({"../../../../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()}}),Er={};Oe(Er,{loadLegacyVideoPlugins:function(){return Nt}});var Mr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/legacy-video-plugins/index.js":function(){Ee()}}),Nr={};Oe(Nr,{schemaFilter:function(){return Ft}});var Fr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/schema-filter/index.js":function(){Ee(),kr()}}),Cr={};Oe(Cr,{remoteMiddlewares:function(){return Ct}});var Dr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/remote-middleware/index.js":function(){Ee(),un(),vr(),pr()}}),Tr={};Oe(Tr,{DestinationSegment:function(){return Gi},default:function(){return Yi},destinationSegment:function(){return Wi}});var Rr=Object.defineProperty;!function(t,e){for(var n in e)Rr(t,n,{get:e[n],enumerable:!0})}({},{Level:function(){return qr}});var Lr,qr=((Lr=qr||{})[Lr.ERROR=0]="ERROR",Lr[Lr.WARN=1]="WARN",Lr[Lr.INFO=2]="INFO",Lr[Lr.DEBUG=3]="DEBUG",Lr);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&&Dt(r)){var a=n.slice(i+1).join("."),s=[],u=!0,c=!1,l=void 0;try{for(var d,f=r[Symbol.iterator]();!(u=(d=f.next()).done);u=!0){var p=zr(d.value,a,e);s.push(p)}}catch(t){c=!0,l=t}finally{try{u||null==f.return||f.return()}finally{if(c)throw l}}return s}if(void 0===(r=_instanceof(r,Object)?r[o]:void 0))break}return Tt(r)?r:e}function Ur(t){return function(t){return"boolean"==typeof t}(t)||Lt(t)||function(t){return"number"==typeof t&&!Number.isNaN(t)}(t)||!Tt(t)||Dt(t)&&t.every(Ur)||Rt(t)&&Object.values(t).every(Ur)}function Br(t,e){return _async_to_generator(function(t,e){var n,r,i,o=arguments;return _ts_generator(this,function(a){return r=(n=o.length>2&&void 0!==o[2]?o[2]:{}).collector,i=n.consent,[2,(Dt(e)?e:[e]).reduce(function(e,o){return _async_to_generator(function(){var a,s,u,c,l,d,f,p,h,v,y,m,g,b,_,w,x,j,k,S,P;return _ts_generator(this,function(O){switch(O.label){case 0:return[4,e];case 1:return(a=O.sent())?[2,a]:(s=Lt(o)?{key:o}:o,Object.keys(s).length?(u=s.condition,c=s.consent,l=s.fn,d=s.key,f=s.loop,p=s.map,h=s.set,v=s.validate,y=s.value,(m=u)?[4,zt(u)(t,o,r)]:[3,3]):[2]);case 2:m=!O.sent(),O.label=3;case 3:return m?[2]:c&&!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}(c,i)?[2,y]:(g=Tt(y)?y:t,l?[4,zt(l)(t,o,n)]:[3,5]);case 4:g=O.sent(),O.label=5;case 5:return d&&(g=zr(t,d,y)),f?(b=_sliced_to_array(f,2),_=b[0],w=b[1],"this"!==_?[3,6]:(j=[t],[3,8])):[3,11];case 6:return[4,Ut(t,_,n)];case 7:j=O.sent(),O.label=8;case 8:return Dt(x=j)?[4,Promise.all(x.map(function(t){return Ut(t,w,n)}))]:[3,10];case 9:g=O.sent().filter(Tt),O.label=10;case 10:return[3,17];case 11:return p?[4,Object.entries(p).reduce(function(e,r){var i=_sliced_to_array(r,2),o=i[0],a=i[1];return _async_to_generator(function(){var r,i;return _ts_generator(this,function(s){switch(s.label){case 0:return[4,e];case 1:return r=s.sent(),[4,Ut(t,a,n)];case 2:return i=s.sent(),[2,(Tt(i)&&(r[o]=i),r)]}})})()},Promise.resolve({}))]:[3,13];case 12:return g=O.sent(),[3,16];case 13:return(k=h)?[4,Promise.all(h.map(function(e){return Br(t,e,n)}))]:[3,15];case 14:k=g=O.sent(),O.label=15;case 15:O.label=16;case 16:O.label=17;case 17:return(S=v)?[4,zt(v)(g)]:[3,19];case 18:S=!O.sent(),O.label=19;case 19:return S&&(g=void 0),P=qt(g),[2,Tt(P)?P:qt(y)]}})})()},Promise.resolve(void 0))]})}).apply(this,arguments)}Ee(),sn();var Vr=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],d=s.pop();if("id"===d){if(G(l)||J(l)){a.id=l.toString();continue}if(null==l)continue;d=s.pop()}if("traits"!==d&&"options"!==d||null!=l&&!Y(l)||(a[d]=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]}};cn(),gn(),sn(),He(),Ee(),We();var Kr="bpc",Hr=function(t,e,n,r,i,o){return{__t:Kr,c:e,p:r,u:t,s:n,t:i,r:o}},Gr=Object.keys(Hr("","","","","","")),Jr=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}},Wr=function(){var t=document.querySelector("link[rel='canonical']");return Hr(location.href,t&&t.getAttribute("href")||void 0,location.search,location.pathname,document.title,document.referrer)};Ee(),Ee();var Yr=function(t,e){void 0===e&&(e=Jr(Wr()));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)};sn();var Qr=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 z(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 Yr(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 Yr(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 Yr(s,a),s},e.prototype.identify=function(e,n,r,i,o){var a=t.prototype.identify.call(this,e,n,r,i);return Yr(a,o),a},e.prototype.group=function(e,n,r,i,o){var a=t.prototype.group.call(this,e,n,r,i);return Yr(a,o),a},e.prototype.alias=function(e,n,r,i,o){var a=t.prototype.alias.call(this,e,n,r,i);return Yr(a,o),a},e}(c),$r=function(t){return"addMiddleware"in t&&"destination"===t.type};Ee(),kn(),sn(),cn();var Zr=function(t){function e(e){return t.call(this,"string"==typeof e?new q(4,e):e)||this}return z(e,t),e.prototype.flush=function(){return B(this,void 0,void 0,function(){return V(this,function(e){return at()?[2,[]]:[2,t.prototype.flush.call(this)]})})},e}(S);Ee(),We(),Ee();var Xr=function t(e,n){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=Jt({},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,"",Jt({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,Jt({},this.attributes,e))},withConverter:function(e){return t(Jt({},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:"/"}),ti=Xr,ei=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:Wt(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=ti.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?ti.set(t,e,this.opts()):null===e?ti.remove(t,this.opts()):ti.set(t,JSON.stringify(e),this.opts())},t.prototype.remove=function(t){return ti.remove(t,this.opts())},t}(),ni=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}(),ri=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}(),ii={Cookie:"cookie",LocalStorage:"localStorage",Memory:"memory"},oi=function(t,e,n,r){console.warn("".concat(t.constructor.name,": Can't ").concat(e,' key "').concat(n,'" | Err: ').concat(r))},ai=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){oi(i,"get",t,e)}}return null},t.prototype.set=function(t,e){this.stores.forEach(function(n){try{n.set(t,e)}catch(e){oi(n,"set",t,e)}})},t.prototype.clear=function(t){this.stores.forEach(function(e){try{e.remove(t)}catch(n){oi(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}(),si={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},ui=function(){function t(t,e){void 0===t&&(t=si);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(si.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({},si),t),this.cookieOptions=e,this.idKey=null!==(i=null===(r=t.cookie)||void 0===r?void 0:r.key)&&void 0!==i?i:si.cookie.key,this.traitsKey=null!==(a=null===(o=t.localStorage)||void 0===o?void 0:o.key)&&void 0!==a?a:si.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===ii.Cookie}),this.traitsStore=this.createStorage(this.options,e,function(t){return t!==ii.Cookie});var u=this.legacyUserStore.get(si.cookie.oldKey);u&&"object"===(void 0===u?"undefined":_type_of(u))&&(u.id&&this.id(u.id),u.traits&&this.traits(u.traits)),Gt(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=[ii.LocalStorage,ii.Cookie,ii.Memory];return t.disable?new ai([]):t.persist?(void 0!==t.storage&&null!==t.storage&&Yt(t.storage)&&(r=t.storage.stores),t.localStorageFallbackDisabled&&(r=r.filter(function(t){return t!==ii.LocalStorage})),n&&(r=r.filter(n)),new ai(Qt($t(r,e)))):new ai([new ri])},t.defaults=si,t}(),ci={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},li=function(t){function e(e,r){void 0===e&&(e=ci);var i=t.call(this,n(n({},ci),e),r)||this;return i.anonymousId=function(t){},Gt(i),i}return z(e,t),e}(ui);kn(),pn(),bn(),dn(),Sn(),Ee();var di=function(t){return"object"===(void 0===t?"undefined":_type_of(t))&&null!==t&&"then"in t&&"function"==typeof t.then};pn(),Sn(),hn();var fi=function(t,e,n){n.getAndRemove(t).forEach(function(t){Zt(e,t).catch(console.error)})},pi=function(t,e){return B(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,Zt(t,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}})})},hi=function(t,e){return B(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,Zt(t,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}})})},vi=fi.bind(void 0,"on"),yi=fi.bind(void 0,"setAnonymousId"),mi=function(t,e){Object.keys(e.calls).forEach(function(n){e.getAndRemove(n).forEach(function(e){setTimeout(function(){Zt(t,e).catch(console.error)},0)})})},gi=function(t){if(bi(t)){var e=t.pop();return Jr(e)}},bi=function(t){var e=t[t.length-1];return Ht(e)},_i=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},wi=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)&&!bi(e.args)&&(e.args=K(K([],e.args,!0),[Wr()],!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 _i(e,n)});this.add.apply(this,e)}}},t}(),xi=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=A,this._preInitBuffer=new wi,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 _i(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 _i(t,r)),e)}},t}();Ee(),cn(),bn(),kn(),Jn(),Ee(),fn();var ji=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)})};Ee();var ki=function(t){function e(e,n){var r=t.call(this,e)||this;return r.retryTimeout=n,r.name="RateLimitError",r}return z(e,t),e}(Error);gn(),Ee();var Si=function(t){return n({"Content-Type":"text/plain"},"function"==typeof t?t():t)},Pi=500,Oi=64;fn(),Ee(),Ee(),cn(),gn(),sn(),Wn(),vn();var Ii,Ai=function(t){return"Segment.io"===t.name},Ei="This is being deprecated and will be not be available in future releases of Analytics JS",Mi=O(),Ni=null==Mi?void 0:Mi.analytics,Fi=function(){function t(t,e){var n;this.timeout=300,this._getSegmentPluginMetadata=function(){var t;return null===(t=e.plugins.find(Ai))||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}(),Ci=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=oe,c.addIntegrationMiddleware=oe,c.listeners=oe,c.addEventListener=oe,c.removeAllListeners=oe,c.removeListener=oe,c.removeEventListener=oe,c.hasListeners=oe,c.add=oe,c.addIntegration=oe;var l=null==r?void 0:r.cookie,d=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 Zr(i)}("".concat(e.writeKey,":event-queue"),null==r?void 0:r.retryQueue,d),c.settings=new Fi(e,c.queue);var f=null==r?void 0:r.storage;return c._universalStorage=c.createStore(d,f,l),c._user=null!=o?o:new ui(n({persist:!d,storage:null==r?void 0:r.storage},null==r?void 0:r.user),l).load(),c._group=null!=a?a:new li(n({persist:!d,storage:null==r?void 0:r.storage},null==r?void 0:r.group),l).load(),c.eventFactory=new Qr(c._user),c.integrations=null!==(u=null==r?void 0:r.integrations)&&void 0!==u?u:{},c.options=null!=r?r:{},Gt(c),c}return z(e,t),e.prototype.createStore=function(t,e,n){return t?new ai([new ri]):e&&Yt(e)?new ai(Qt($t(e.stores,n))):new ai(Qt([ii.LocalStorage,{name:ii.Cookie,settings:n},ii.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 B(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u=this;return V(this,function(c){return e=gi(t),n=Bt.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 B(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u,c=this;return V(this,function(l){return e=gi(t),n=Vt.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 B(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u=this;return V(this,function(c){return e=gi(t),n=Vr(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=gi(e);if(0===e.length)return this._group;var i=Vr(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(),d=this.eventFactory.group(c,l,s,this.integrations,r);return this._dispatch(d,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 B(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u=this;return V(this,function(c){return e=gi(t),n=Kt.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 B(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u,c=this;return V(this,function(l){return e=gi(t),n=Vt.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 B(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 $n(),Qn})];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 B(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 $n(),Qn})];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 B(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 $n(),Qn})];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 B(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 $n(),Qn})];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 B(this,void 0,void 0,function(){var e,n,r=this;return V(this,function(i){switch(i.label){case 0:return e=T.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 B(this,void 0,void 0,function(){var e,n,r=this;return V(this,function(i){switch(i.label){case 0:return e=T.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 B(this,void 0,void 0,function(){var n;return V(this,function(r){return(n=new T(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 B(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 B(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 Xn(),Zn})];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($r).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 B(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 fr(),nr})];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}),B(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(Ei),t=null!=Ni?Ni:this,window[wn]=t,this},e.prototype.normalize=function(t){return console.warn(Ei),this.eventFactory.normalize(t)},Object.defineProperty(e.prototype,"failedInitializations",{get:function(){return console.warn(Ei),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"VERSION",{get:function(){return A},enumerable:!1,configurable:!0}),e.prototype.initialize=function(t,e){return B(this,void 0,void 0,function(){return V(this,function(t){return console.warn(Ei),[2,Promise.resolve(this)]})})},e.prototype.pageview=function(t){return B(this,void 0,void 0,function(){return V(this,function(e){switch(e.label){case 0:return console.warn(Ei),[4,this.page({path:t})];case 1:return e.sent(),[2,this]}})})},Object.defineProperty(e.prototype,"plugins",{get:function(){var t;return console.warn(Ei),null!==(t=this._plugins)&&void 0!==t?t:{}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Integrations",{get:function(){return console.warn(Ei),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}(d),Di=function(t){function e(){var e=t.call(this,{writeKey:""},{disableClientPersistence:!0})||this;return e.initialized=!0,e}return z(e,t),e}(Ci);Ee(),pr(),gn(),hr(),He(),Ee(),pn(),hn(),er(),Ee();var Ti=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 B(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,se(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(A)}),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=ti.get("_ga");if(t&&t.startsWith("amp"))return t}();c&&(o.amp={id:c}),function(t,e,r){var i,o=new ai(r?[]:[new ei(ue())]),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};Ee(),vr(),pr(),Xn(),gn(),yr(),He();var Ri,Li,qi=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 B(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 T(e)]}})})},t.prototype._createMethod=function(t){var e=this;return function(n){return B(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 B(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 B(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}();dn();var zi=null!==(Ri=(Li=O()).__SEGMENT_INSPECTOR__)&&void 0!==Ri?Ri:Li.__SEGMENT_INSPECTOR__={},Ui=function(t){var e;return null===(e=zi.attach)||void 0===e?void 0:e.call(zi,t)};mn(),Sn(),fn();var Bi=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(/(?=#).*(?=\?)/,"")},Vi=function(t,e){return B(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]}})})},Ki=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 pe(n,r,t)})})||this)._resolveLoadStart=function(t,e){return i([t,e])},e}return z(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}(xi);gn();var Hi,Gi={},Ji={load:function(t,e){return Ki.load(t,e)}},Wi={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=he(r),a={lastIdentity:{},lastGroup:{},loaded:!1};return!!n.consent&&Object.keys(n.consent).length>0||(a.analytics=ve(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,d,f,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=he(i),l=n.settings||{},d=l._state||{},f=function(t,e,n){return n.analytics?n.analytics:n.loaded?void 0:(n.analytics=ve(t,e),n.loaded=!0,n.analytics)}(c,l,d),f?(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(Rt(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),d=l[0],f=l[1];d in r&&(i[f]=!0===r[d])}}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,Ut(t,p.reset,{collector:a})];case 2:v=x.sent(),x.label=3;case 3:v&&(f.reset(),d.lastIdentity={},d.lastGroup={}),x.label=4;case 4:return void 0===(y=null!==(s=p.identify)&&void 0!==s?s:l.identify)?[3,6]:[4,Ut(t,y,{collector:a})];case 5:m=x.sent(),Rt(m)&&function(t,e,n,r){var i,o=n.lastIdentity||{},a=Lt(e.userId)?e.userId:void 0,s=Lt(e.anonymousId)?e.anonymousId:void 0,u=Rt(e.traits)&&!Dt(e.traits)?e.traits:void 0;s&&s!==o.anonymousId&&t.setAnonymousId(s);var c=ye(u),l=a!==o.userId,d=c!==(null!==(i=o.traitsHash)&&void 0!==i?i:"");(l||void 0!==u&&d||s)&&(r?t.identify(a,u||{},r):t.identify(a,u||{}),n.lastIdentity={userId:a,anonymousId:null!=s?s:o.anonymousId,traitsHash:c})}(f,m,d,h),x.label=6;case 6:return void 0===(g=null!==(u=p.group)&&void 0!==u?u:l.group)?[3,8]:[4,Ut(t,g,{collector:a})];case 7:b=x.sent(),Rt(b)&&function(t,e,n,r){var i,o=Lt(e.groupId)?e.groupId:void 0;if(o){var a=Rt(e.traits)&&!Dt(e.traits)?e.traits:void 0,s=n.lastGroup||{},u=ye(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})}}(f,b,d,h),x.label=8;case 8:return void 0===p.page?[3,10]:[4,me(f,p.page,t,a,h)];case 9:x.sent(),x.label=10;case 10:return!0!==(null==r?void 0:r.skip)&&(_=Lt(null==r?void 0:r.name)?r.name:t.name,w=Rt(o)?o:{},h?f.track(_,w,h):f.track(_,w)),l._state=d,[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=he(e.env);Object.keys(o).every(function(t){return!0===i[t]})&&!s.loaded&&(s.analytics=ve(u,a),s.loaded=!0,a._state=s)}}}},Yi=Wi;return Hi=Tr,Ie(be({},"__esModule",{value:!0}),Hi)}();
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 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 _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 _instanceof(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}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 _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 _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,d,f,p,h,v,y,m,g,b,_,w,x,j,k,S,P,O,I,A,E,M,N,F,C,D,T,R,L,q,z=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)},U=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},B=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 B(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 B(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,P(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 E},ct=function(t){console.error("Error sending segment performance metrics",t)},lt=function(t){var e=R.getItem(t);return(e?JSON.parse(e):[]).map(function(t){return new T(t.event,t.id)})},dt=function(t){var e=R.getItem(t);return e?JSON.parse(e):{}},ft=function(t){R.removeItem(t)},pt=function(){return window[wn]},ht=function(t,e){var n=new xn.Facade(t,e);return"track"===t.type&&(n=new xn.Track(t,e)),"identify"===t.type&&(n=new xn.Identify(t,e)),"page"===t.type&&(n=new xn.Page(t,e)),"alias"===t.type&&(n=new xn.Alias(t,e)),"group"===t.type&&(n=new xn.Group(t,e)),"screen"===t.type&&(n=new xn.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")),d=$(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,d.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 B(this,void 0,void 0,function(){function i(e,r){return B(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 B(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,d=u.uid,f=void 0===d?/.+/:d;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(f.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 d=window.document.querySelector("script");d?null===(i=d.parentElement)||void 0===i||i.insertBefore(o,d):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)])},Pt=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},Ot=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},At=function(t,e,n,r){return B(this,void 0,void 0,function(){var i,o,a,s,u,c;return V(this,function(l){switch(l.label){case 0:i=Ot(e),o=It(i,r),a=cr(),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")]]}})})},Et=function(t,e){return B(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,jn(function(){return e.length>0&&ot()},function(){return B(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,T)||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,d=i.integrations,f=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 br(t,l[t])}),!0),Object.keys(p||{}).filter(function(t){return Y(l[t])||Y(null==d?void 0:d[t])}),!0));return Array.from(h).filter(function(t){return!_r(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 xr(e,n,t,f[e],i,null==p?void 0:p[e]);return c.filter(function(t){return t.destinationName===e}).length>0&&o&&r.addMiddleware(o),r})},Nt=function(t){return B(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 Ae(Ar())})];case 1:return e=n.sent(),t._plugins=e,[2]}})})},Ft=function(t,e){function r(r){var i=t,o=r.event.event;if(i&&o){var a=i[o];if(!Pt(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}},Ct=function(t,e,n){var r;return B(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=cr(),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 B(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){return Array.isArray(t)},Tt=function(t){return void 0!==t},Rt=function(t){return"object"==(void 0===t?"undefined":_type_of(t))&&null!==t&&!Dt(t)&&"[object Object]"===Object.prototype.toString.call(t)},Lt=function(t){return"string"==typeof t},qt=function(t){return Ur(t)?t:void 0},zt=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]}})})()}},Ut=function(t){return _async_to_generator(function(t){var e,n,r,i,o,a,s,u,c,l,d,f,p,h=arguments;return _ts_generator(this,function(v){switch(v.label){case 0:if(e=h.length>1&&void 0!==h[1]?h[1]:{},n=h.length>2&&void 0!==h[2]?h[2]:{},!Tt(t))return[2];i=Rt(t)&&t.consent||n.consent||(null===(r=n.collector)||void 0===r?void 0:r.consent),o=Dt(e)?e:[e],a=!0,s=!1,u=void 0,v.label=1;case 1:v.trys.push([1,6,7,8]),c=o[Symbol.iterator](),v.label=2;case 2:return(a=(l=c.next()).done)?[3,5]:(d=l.value,[4,zt(Br)(t,d,_object_spread_props(_object_spread({},n),{consent:i}))]);case 3:if(f=v.sent(),Tt(f))return[2,f];v.label=4;case 4:return a=!0,[3,2];case 5:return[3,8];case 6:return p=v.sent(),s=!0,u=p,[3,8];case 7:try{a||null==c.return||c.return()}finally{if(s)throw u}return[7];case 8:return[2]}})}).apply(this,arguments)},Bt=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)]},Vt=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 d=c.find(W),f=c.filter(Y);return 1===f.length?Y(c[2])?(a={},o=c[2]):Y(c[3])?(o={},a=c[3]):(o=f[0],a={}):2===f.length&&(o=f[0],a=f[1]),[s,u,null!=o?o:o={},null!=a?a:a={},d]},Kt=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)]},Ht=function(t){if(e=t,"object"!==Object.prototype.toString.call(e).slice(8,-1).toLowerCase())return!1;var e;if(t.__t!==Kr)return!1;for(var n in t)if(!Gr.includes(n))return!1;return!0},Gt=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},Jt=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},Wt=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(ti.set(i,"1",a),ti.get(i))return ti.remove(i,a),o}catch(t){return}}},Yt=function(t){return t&&t.stores&&Array.isArray(t.stores)&&t.stores.every(function(t){return Object.values(ii).includes(t)})},Qt=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 ii.Cookie:return new ei(n);case ii.LocalStorage:return new ni;case ii.Memory:return new ri;default:throw new Error("Unknown Store Type: ".concat(t))}})},$t=function(t,e){return t.map(function(t){return e&&t===ii.Cookie?{name:t,settings:e}:t})},Zt=function(t,e){return B(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),di(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]}})})},Xt=function(t){return(encodeURI(JSON.stringify(t)).split(/%..|./).length-1)/1024},te=function(t,e){var r,i,o,a=[],s=!1,u=null!==(r=null==e?void 0:e.size)&&void 0!==r?r:10,c=null!==(i=null==e?void 0:e.timeout)&&void 0!==i?i:5e3,l=0;function d(n){var r;if(0!==n.length){var i=null===(r=n[0])||void 0===r?void 0:r.writeKey,o=n.map(function(t){var e=t;e.sentAt;return U(e,["sentAt"])});return I("https://".concat(t,"/b"),{credentials:null==e?void 0:e.credentials,keepalive:(null==e?void 0:e.keepalive)||s,headers:Si(null==e?void 0:e.headers),method:"post",body:JSON.stringify({writeKey:i,batch:o,sentAt:(new Date).toISOString()}),priority:null==e?void 0:e.priority}).then(function(t){var e;if(t.status>=500)throw new Error("Bad response from server: ".concat(t.status));if(429===t.status){var n=null===(e=t.headers)||void 0===e?void 0:e.get("x-ratelimit-reset"),r="string"==typeof n?1e3*parseInt(n):c;throw new ki("Rate limit exceeded: ".concat(t.status),r)}})}}function f(t){var r;return void 0===t&&(t=1),B(this,void 0,void 0,function(){var i;return V(this,function(o){return a.length?(i=a,a=[],[2,null===(r=d(i))||void 0===r?void 0:r.catch(function(r){var o;T.system().log("error","Error sending batch",r),t<=(null!==(o=null==e?void 0:e.maxRetries)&&void 0!==o?o:10)&&("RateLimitError"===r.name&&(l=r.retryTimeout),a.push.apply(a,i),a.map(function(e){if("_metadata"in e){var r=e;r._metadata=n(n({},r._metadata),{retryCount:t})}}),p(t+1))})]):[2]})})}function p(t){void 0===t&&(t=1),o||(o=setTimeout(function(){o=void 0,f(t).catch(console.error)},l||c),l=0)}return ji(function(t){if((s=t)&&a.length){var e=(n=a,r=[],i=0,n.forEach(function(t){Xt(r[i])>=64&&i++,r[i]?r[i].push(t):r[i]=[t]}),r).map(d);Promise.all(e).catch(console.error)}var n,r,i}),{dispatch:function(t,n){return B(this,void 0,void 0,function(){var t;return V(this,function(r){return a.push(n),t=a.length>=u||function(t){return Xt(t)>=Pi-50}(a)||(null==e?void 0:e.keepalive)&&function(t){return Xt(t)>=Oi-10}(a),[2,t||s?f():p()]})})}}},ee=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 d in i){var f=i[d];"Segment.io"===d&&c.push(d),"bundled"===f.bundlingStatus&&c.push(d),"unbundled"===f.bundlingStatus&&l.push(d)}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},ne=function(t,e){return B(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,jn(function(){return e.length>0&&!at()},function(){return B(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,T)||n.push(r),[2]}})})})];case 1:return i.sent(),n.map(function(t){return e.pushWithBackoff(t)}),[2,e]}})})},re=function(t,e,n,r){var i=this;t||setTimeout(function(){return B(i,void 0,void 0,function(){var t,i;return V(this,function(o){switch(o.label){case 0:return t=!0,[4,ne(n,e)];case 1:return i=o.sent(),t=!1,e.todo>0&&r(t,i,n,r),[2]}})})},5e3*Math.random())},ie=function(t,e,n){var r,i,o;window.addEventListener("pagehide",function(){u.push.apply(u,Array.from(c)),c.clear()});var a,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=!1,d=null!==(i=null==e?void 0:e.apiHost)&&void 0!==i?i:M,f=null!==(o=null==e?void 0:e.protocol)&&void 0!==o?o:"https",h="".concat(f,"://").concat(d),v=null==e?void 0:e.deliveryStrategy,y=v&&"strategy"in v&&"batching"===v.strategy?te(d,v.config):(a=null==v?void 0:v.config,{dispatch:function(t,e){return I(t,{credentials:null==a?void 0:a.credentials,keepalive:null==a?void 0:a.keepalive,headers:Si(null==a?void 0:a.headers),method:"post",body:JSON.stringify(e),priority:null==a?void 0:a.priority}).then(function(t){var e;if(t.status>=500)throw new Error("Bad response from server: ".concat(t.status));if(429===t.status){var n=null===(e=t.headers)||void 0===e?void 0:e.get("x-ratelimit-reset"),r=n?1e3*parseInt(n):5e3;throw new ki("Rate limit exceeded: ".concat(t.status),r)}})}});function m(r){return B(this,void 0,void 0,function(){var i,o;return V(this,function(a){return at()?(u.push(r),re(l,u,g,re),[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)),u.getAttempts(r)>=u.maxAttempts?(c.delete(r),[2,r]):[2,y.dispatch("".concat(h,"/").concat(i),ee(t,o,e,n,r)).then(function(){return r}).catch(function(t){if(r.log("error","Error sending event",t),"RateLimitError"===t.name){var e=t.retryTimeout;u.pushWithBackoff(r,e)}else u.pushWithBackoff(r);return re(l,u,g,re),r}).finally(function(){c.delete(r)})])})})}var g={metadata:{writeKey:s,apiHost:d,protocol:f},name:"Segment.io",type:"destination",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:m,identify:m,page:m,alias:m,group:m,screen:m};return u.todo&&re(l,u,g,re),g},oe=function(){console.warn(Ei)},ae=function(){return"undefined"!=typeof process&&process.env?process.env:{}},se=function(t){return B(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]})})},ue=function(){if(Ii)return Ii;var t=Wt(window.location.href);return Ii={expires:31536e6,secure:!1,path:"/"},t&&(Ii.domain=t),Ii},ce=function(t,e){return B(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=ur(),!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]}})})},le=function(t,e,r,i,o,a){var s,u,c;return B(this,void 0,void 0,function(){var l,d,f,p=this;return V(this,function(h){switch(h.label){case 0:return l=[],d=null!==(u=null===(s=t.middlewareSettings)||void 0===s?void 0:s.routingRules)&&void 0!==u?u:[],f=(null!==(c=t.remotePlugins)&&void 0!==c?c:[]).map(function(t){return B(p,void 0,void 0,function(){var s,u,c,f,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,ce(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:f=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(f)?f:[f]),h=d.filter(function(e){return e.destinationName===t.creationName}),p.forEach(function(e){var n=new qi(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(T.system(),{integrationName:t.name,methodName:"load",type:"action",didError:!0}),[3,7];case 7:return[2]}})})}),[4,Promise.all(f)];case 1:return h.sent(),[2,l.filter(Boolean)]}})})},de=function(t,e,n){return B(this,void 0,void 0,function(){return V(this,function(r){switch(r.label){case 0:return[4,Vi(t,e)];case 1:return r.sent(),mi(t,n),[2]}})})},fe=function(t,e,n,r,i,o,a){var s,u,c;return void 0===i&&(i=[]),B(this,void 0,void 0,function(){var l,d,f,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){yi(t,e),vi(t,e)}(n,a),l=null==i?void 0:i.filter(function(t){return"object"===(void 0===t?"undefined":_type_of(t))}),d=null==i?void 0:i.filter(function(t){return"function"==typeof t&&"string"==typeof t.pluginName}),function(t){var e,n,r;return"test"!==ae().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 jr(),gr}).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 f=p,P=e,"test"!==ae().NODE_ENV&&Object.keys(P.integrations).length>1||o.length>0?[4,Promise.resolve().then(function(){return Ir(),Or}).then(function(i){return i.ajsDestinations(t,e,n.integrations,r,f,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 Mr(),Er}).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 Fr(),Nr}).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,le(e,n.integrations,g,r,f,d).catch(function(t){return console.error("Failed to load remote plugins",t),[]})];case 12:return b=S.sent(),_=K(K([Ti],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,ie(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,hi(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 Dr(),Cr}).then(function(t){var i=t.remoteMiddlewares;return B(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,pi(n,a)];case 19:return S.sent(),[2,j]}var P})})},pe=function(t,e,r){var i,o,a,s,u,c,l,d,f;return void 0===e&&(e={}),B(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 Di,T.system()]]:(e.globalAnalyticsKey&&(P=e.globalAnalyticsKey,wn=P),t.cdnURL&&sr(t.cdnURL),e.initialPageview&&r.add(new _i("page",[])),p=Bi(),h=null!==(i=t.cdnURL)&&void 0!==i?i:ur(),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 Di,T.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 Ci(n(n({},t),{cdnSettings:v,cdnURL:h}),e),Ui(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!==(d=null==w?void 0:w.apiHost)&&void 0!==d?d:null===(f=v.metrics)||void 0===f?void 0:f.host,protocol:null==w?void 0:w.protocol})),[4,fe(t.writeKey,v,g,e,b,_,r)];case 6:return x=j.sent(),g.initialized=!0,g.emit("initialize",t,e),[4,de(g,p,r)];case 7:return j.sent(),[2,[g,x]]}var k,S,P})})},he=function(t){var e;return null!==(e=null==t?void 0:t.analytics)&&void 0!==e?e:Ji},ve=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)},ye=function(t){if(!t)return"";try{return JSON.stringify(t)}catch(t){return""}},me=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,Ut(n,e,{collector:r})];case 1:return o=l.sent(),Rt(o)?(s=Lt((a=o).category)?a.category:void 0,u=Lt(a.name)?a.name:void 0,c=Rt(a.properties)&&!Dt(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]}})})()},ge=Object.create,be=Object.defineProperty,_e=Object.getOwnPropertyDescriptor,we=Object.getOwnPropertyNames,xe=Object.getPrototypeOf,je=Object.prototype.hasOwnProperty,ke=(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),Se=function(t,e){return function(){return t&&(e=(0,t[we(t)[0]])(t=0)),e}},Pe=function(t,e){return function(){return e||(0,t[we(t)[0]])((e={exports:{}}).exports,e),e.exports}},Oe=function(t,e){for(var n in e)be(t,n,{get:e[n],enumerable:!0})},Ie=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;je.call(t,i)||i===n||be(t,i,{get:function(){return e[i]},enumerable:!(r=_e(e,i))||r.enumerable})},c=we(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},Ae=function(t,e,n){return n=null!=t?ge(xe(t)):{},Ie(!e&&t&&t.__esModule?n:be(n,"default",{value:t,enumerable:!0}),t)},Ee=Se({"../../../../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)}}}),Me=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/emitter/interface.js":function(){}}),Ne=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/plugins/index.js":function(){}}),Fe=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/events/interfaces.js":function(){}}),Ce=Se({"../../../../node_modules/dset/dist/index.mjs":function(){}}),De=Se({"../../../../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},{})}}}),Te=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/validation/errors.js":function(){Ee(),i=function(t){function e(e,n){var r=t.call(this,"".concat(e," ").concat(n))||this;return r.field=e,r}return z(e,t),e}(Error)}}),Re=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/validation/helpers.js":function(){}}),Le=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/validation/assertions.js":function(){Te(),Re(),o="is not a string",a="is not an object",s="is nil"}}),qe=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/events/index.js":function(){Ee(),Fe(),Ce(),De(),Le(),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,d=U(t,["options"]),f=n(n(n(n({timestamp:new Date},d),{context:u,integrations:a}),c),{messageId:l.messageId||this.settings.createMessageId()});return this.settings.onFinishedEvent(f),Q(f),f},t}()}}),ze=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/callback/index.js":function(){}}),Ue=Se({"../../../../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}}}}}),Be=Se({"../../../../node_modules/@segment/analytics-generic-utils/dist/esm/create-deferred/index.js":function(){Ue()}}),Ve=Se({"../../../../node_modules/@segment/analytics-generic-utils/dist/esm/emitter/emitter.js":function(){d=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}()}}),Ke=Se({"../../../../node_modules/@segment/analytics-generic-utils/dist/esm/emitter/index.js":function(){Ve()}}),He=Se({"../../../../node_modules/@segment/analytics-generic-utils/dist/esm/index.js":function(){Be(),Ke()}}),Ge=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/priority-queue/backoff.js":function(){}}),Je=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/priority-queue/index.js":function(){Ee(),He(),Ge(),f="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 z(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){var n=this;if(void 0===e&&(e=0),0==e&&0===this.getAttempts(t))return this.push(t)[0];var r=this.updateAttempts(t);if(r>this.maxAttempts||this.includes(t))return!1;var i=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:r-1});return e>0&&i<e&&(i=e),setTimeout(function(){n.queue.push(t),n.future=n.future.filter(function(e){return e.id!==t.id}),n.emit(f)},i),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}(d)}}),We=Se({"../../../../node_modules/@lukeed/uuid/dist/index.mjs":function(){for(h=256,v=[];h--;)v[h]=(h+256).toString(16).substring(1)}}),Ye=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/logger/index.js":function(){Ee(),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}()}}),Qe=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/stats/index.js":function(){Ee(),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 z(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)}}),$e=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/context/index.js":function(){We(),Ce(),Ye(),Qe(),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}()}}),Ze=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/utils/group-by.js":function(){Ee()}}),Xe=Se({"../../../../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}}}),tn=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/task/task-group.js":function(){Xe(),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}}}}}),en=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/queue/delivery.js":function(){Ee(),$e()}}),nn=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/queue/event-queue.js":function(){Ee(),Ze(),Je(),$e(),He(),tn(),en(),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(f,function(){n.scheduleFlush(0)}),n}return z(e,t),e.prototype.register=function(t,e,n){return B(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 B(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 B(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 B(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 B(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){return B(this,void 0,void 0,function(){var e,n,r,i;return V(this,function(o){switch(o.label){case 0:return[4,this.criticalTasks.done()];case 1:o.sent(),e=Date.now(),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this.flushOne(t)];case 3:return t=o.sent(),n=Date.now()-e,this.emit("delivery_success",t),t.stats.gauge("delivered",n),t.log("debug","Delivered",t.event),[2,t];case 4:throw r=o.sent(),i=r,t.log("error","Failed to deliver",i),this.emit("delivery_failure",t,i),t.stats.increment("delivery_failed"),r;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 B(this,void 0,void 0,function(){var t,e;return V(this,function(n){switch(n.label){case 0:if(0===this.queue.length)return[2,[]];if(!(t=this.queue.pop()))return[2,[]];t.attempts=this.queue.getAttempts(t),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.deliver(t)];case 2:return t=n.sent(),this.emit("flush",t,!0),[3,4];case 3:return e=n.sent(),this.enqueuRetry(e,t)||(t.setFailedDelivery({reason:e}),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,d=i.after;return{before:a,enrichment:u,destinations:l,after:void 0===d?[]:d}},e.prototype.flushOne=function(t){var e,n;return B(this,void 0,void 0,function(){var r,i,o,a,s,u,c,l,d,f,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(f=m.sent(),x)&&(t=f),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?(d=l[c],[4,tt(t,d)]):[3,8];case 6:_instanceof(f=m.sent(),x)&&(t=f),this.emit("message_enriched",t,d),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}(d)}}),rn=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/analytics/index.js":function(){}}),on=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/analytics/dispatch.js":function(){Ee(),ze(),P=function(t,e){var n=Date.now()-t;return Math.max((null!=e?e:300)-n,0)}}}),an=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/utils/bind-all.js":function(){}}),sn=Se({"../../../../node_modules/@segment/analytics-core/dist/esm/index.js":function(){Me(),Ne(),Fe(),qe(),ze(),Je(),$e(),nn(),rn(),on(),Re(),Te(),Le(),an(),Qe(),en()}}),un=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/environment/index.js":function(){}}),cn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/connection/index.js":function(){un()}}),ln=Se({"../../../../node_modules/unfetch/dist/unfetch.mjs":function(){}}),dn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/get-global.js":function(){O=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:null}}}),fn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/fetch.js":function(){ln(),dn(),I=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=O();return(n&&n.fetch||st).apply(void 0,t)}}}),pn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/generated/version.js":function(){A="1.82.0"}}),hn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/version-type.js":function(){E="npm"}}),vn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/constants/index.js":function(){M="api.segment.io/v1"}}),yn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/stats/remote-metrics.js":function(){Ee(),fn(),pn(),hn(),vn(),N=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(A):"npm:next-".concat(A)})}},F=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=N(t,e,ut());this.queue.push(n),t.includes("error")&&this.flush().catch(ct)}},t.prototype.flush=function(){return B(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 B(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}()}}),mn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/stats/index.js":function(){Ee(),sn(),yn(),D=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return z(e,t),e.initRemoteMetrics=function(t){C=new F(t)},e.prototype.increment=function(e,n,r){t.prototype.increment.call(this,e,n,r),null==C||C.increment(e,null!=r?r:[])},e}(b)}}),gn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/context/index.js":function(){Ee(),sn(),mn(),T=function(t){function e(e,n){return t.call(this,e,n,new D)||this}return z(e,t),e.system=function(){return new this({type:"track",event:"system"})},e}(x)}}),bn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/priority-queue/index.js":function(){sn()}});function _n(t,e,n){void 0===n&&(n=0);var r,i="persisted-queue:v1:".concat(t,":lock"),o=R.getItem(i),a=o?JSON.parse(o):null,s=null===a||(r=a,(new Date).getTime()>r);if(s)return R.setItem(i,JSON.stringify(L()+50)),e(),void R.removeItem(i);!s&&n<3?setTimeout(function(){_n(t,e,n+1)},50):console.error("Unable to retrieve lock")}var wn,xn,jn,kn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/priority-queue/persisted.js":function(){Ee(),bn(),gn(),un(),R={getItem:function(){},setItem:function(){},removeItem:function(){}};try{R=rt()&&window.localStorage?window.localStorage:R}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 _n(r,function(){try{s=lt(o),u=dt(a),ft(o),ft(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{_n(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))},{});R.setItem(t,JSON.stringify(Object.values(i)))}(o,t),function(t,e){var r=dt(t);R.setItem(t,JSON.stringify(n(n({},r),e)))}(a,i.seen)})}catch(t){console.error(t)}}}),i}return z(e,t),e}(p)}}),Sn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/global-analytics-helper.js":function(){wn="analytics"}}),Pn=Pe({"../../../../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}}}),On=Pe({"../../../../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(Pn());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")}}}),In=Pe({"../../../../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}}}),An=Pe({"../../../../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]}}}),En=Pe({"../../../../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))}}}),Mn=Pe({"../../../../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)}}}),Nn=Pe({"../../../../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)}}}),Fn=Pe({"../../../../node_modules/new-date/lib/index.js":function(t,e){var n=En(),r=Mn(),i=Nn(),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}}}),Cn=Pe({"../../../../node_modules/@segment/isodate-traverse/lib/index.js":function(t,e){var n=En();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}}),Dn=Pe({"../../../../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(On()),r=In(),i=e(An()),o=e(Fn()),a=e(Pn()),s=e(Cn());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)}}),Tn=Pe({"../../../../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}}}}),Rn=Pe({"../../../../node_modules/inherits/inherits.js":function(t,e){try{if("function"!=typeof(n=ke("util")).inherits)throw"";e.exports=n.inherits}catch(t){e.exports=Tn()}var n}}),Ln=Pe({"../../../../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(Rn()),r=Dn();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=Pe({"../../../../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)}}}),zn=Pe({"../../../../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(Rn()),r=e(qn()),i=e(Fn()),o=Dn();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")||{}}}}),Un=Pe({"../../../../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=Dn(),r=e(Pn()),i=e(Rn()),o=e(qn()),a=e(Fn()),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")}}),Bn=Pe({"../../../../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(Rn()),r=Dn(),i=Un(),o=e(qn()),a=e(Pn());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)}}}),Vn=Pe({"../../../../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(Rn()),r=Dn(),i=Bn(),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)}}}),Kn=Pe({"../../../../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(Rn()),r=Vn(),i=Bn();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)}}}),Hn=Pe({"../../../../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(Rn()),r=Dn();function i(t,e){r.Facade.call(this,t,e)}t.Delete=i,n.default(i,r.Facade),i.prototype.type=function(){return"delete"}}}),Gn=Pe({"../../../../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=Dn();Object.defineProperty(t,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=Ln();Object.defineProperty(t,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=zn();Object.defineProperty(t,"Group",{enumerable:!0,get:function(){return i.Group}});var o=Un();Object.defineProperty(t,"Identify",{enumerable:!0,get:function(){return o.Identify}});var a=Bn();Object.defineProperty(t,"Track",{enumerable:!0,get:function(){return a.Track}});var s=Vn();Object.defineProperty(t,"Page",{enumerable:!0,get:function(){return s.Page}});var u=Kn();Object.defineProperty(t,"Screen",{enumerable:!0,get:function(){return u.Screen}});var c=Hn();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})}}),Jn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/to-facade.js":function(){xn=Ae(Gn())}}),Wn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/p-while.js":function(){Ee(),jn=function(t,e){return B(void 0,void 0,void 0,function(){var n;return V(this,function(r){return[2,(n=function(r){return B(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)]})})}}}),Yn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/callback/index.js":function(){sn()}}),Qn={};Oe(Qn,{form:function(){return yt},link:function(){return vt}});var $n=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/auto-track.js":function(){Yn()}}),Zn={};Oe(Zn,{applyDestinationMiddleware:function(){return mt},sourceMiddlewarePlugin:function(){return gt}});var Xn=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/middleware/index.js":function(){Ee(),gn(),Jn()}}),tr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/query-string/pickPrefix.js":function(){}}),er=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/query-string/gracefulDecodeURIComponent.js":function(){}}),nr={};Oe(nr,{queryString:function(){return wt}});var rr,ir,or,ar,sr,ur,cr,lr,dr,fr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/query-string/index.js":function(){tr(),er(),sn()}}),pr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/parse-cdn.js":function(){Sn(),rr=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,ir=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=rr.exec(r);i&&i[1]&&(t=i[1])}),t},ar=function(){var t;return null!=or?or:null===(t=pt())||void 0===t?void 0:t._cdn},sr=function(t){var e=pt();e&&(e._cdn=t),or=t},ur=function(){var t=ar();if(t)return t;var e=ir();return e||"https://cdn.segment.com"},cr=function(){var t=ur();return"".concat(t,"/next-integrations")}}}),hr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/merged-options.js":function(){Ee()}}),vr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/load-script.js":function(){}}),yr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/core/stats/metric-helpers.js":function(){}}),mr=Pe({"../../../../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,d,f,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 d=a(t[1],e),f=a(t[2],e),p=e,void 0!==f.find(function(t){return a(t,p)===d});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,d=a.err;if(d)return!1;if(!l||!(0===s.length||t.length>0)){if(i)for(var f=0;f<e.length;f++){if(s=(r=c(o,e.slice(f+1))).t,l=r.ok,d=r.err,l){if(0===t.length&&s.length>0)continue;e=s;continue t}if(d)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,d="";if(c=(n=l(t)).char,t=n.newChunk,n.err)return i;if(d=c,"-"===t[0]&&(d=(r=l(t.slice(1))).char,t=r.newChunk,r.err))return i;c<=o&&o<=d&&(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){d(t,e.drop,function(t,e){e.forEach(function(e){return delete t[e]})})}function l(t,e){d(t,e.allow,function(t,e){Object.keys(t).forEach(function(n){e.includes(n)||delete t[n]})})}function d(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 f(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 d=(0,o.default)(n,i.move);void 0!==d&&(0,s.dset)(t,r,d),(0,u.unset)(t,i.move)}else i.hasOwnProperty("set")&&(0,s.dset)(t,r,i.set);if(i.to_string){var f=(0,o.default)(t,r);if("string"==typeof f||"object"==(void 0===f?"undefined":_type_of(f))&&null!==f)continue;void 0!==f?(0,s.dset)(t,r,JSON.stringify(f)):(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 d=[];h(r.slice(9,16),d),s-=c,u.splice(0,c),d.splice(64-c),u=u.concat(d)}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":f(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),d=n(5848),f=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:(f(y,t),e+=y[1],(e+=p(t=y[0]))<u?d(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,d,f;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),d="get"in u,f="set"in u,l&&(d||f))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return d&&r&&r.call(t,s,u.get),f&&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)}()})}}),gr={};Oe(gr,{tsubMiddleware:function(){return dr}});var br,_r,wr,xr,jr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/routing-middleware/index.js":function(){lr=Ae(mr()),dr=function(t){return function(e){var n=e.payload,r=e.integration,i=e.next;new lr.Store(t).getRulesByDestinationName(r).forEach(function(t){for(var e=t.matchers,r=t.transformers,o=0;o<e.length;o++)if(lr.matches(n.obj,e[o])&&(n.obj=lr.transform(n.obj,r[o]),null===n.obj))return i(null)}),i(n)}}}}),kr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/lib/is-plan-event-enabled.js":function(){}}),Sr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/loader.js":function(){Ee(),pr(),vr()}}),Pr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/utils.js":function(){br=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},_r=function(t,e){var n=!1===e.All&&void 0===e[t];return!1===e[t]||n}}}),Or={};Oe(Or,{LegacyDestination:function(){return xr},ajsDestinations:function(){return Mt}});var Ir=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/index.js":function(){Ee(),wr=Ae(Gn()),cn(),gn(),un(),sn(),kr(),hr(),Wn(),bn(),kn(),Xn(),Sr(),sn(),Pr(),yr(),He(),xr=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 B(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,At(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 B(this,void 0,void 0,function(){var r,i,o;return V(this,function(a){return r=cr(),i=Ot(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 B(this,void 0,void 0,function(){var a,s,u,c,l,d;return V(this,function(f){switch(f.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],Pt(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=f.sent()))return[2,t];l=new e(c,{traverse:!this.disableAutoISOConversion}),St(t,{integrationName:this.name,methodName:r,type:"classic"}),f.label=2;case 2:return f.trys.push([2,5,,6]),this.integration?[4,this.integration.invoke.call(this.integration,r,l)]:[3,4];case 3:f.sent(),f.label=4;case 4:return[3,6];case 5:throw d=f.sent(),St(t,{integrationName:this.name,methodName:r,type:"classic",didError:!0}),d;case 6:return[2,t]}})})},t.prototype.track=function(t){return B(this,void 0,void 0,function(){return V(this,function(e){return[2,this.send(t,wr.Track,"track")]})})},t.prototype.page=function(t){var e;return B(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,wr.Page,"page")]}})})},t.prototype.identify=function(t){return B(this,void 0,void 0,function(){return V(this,function(e){return[2,this.send(t,wr.Identify,"identify")]})})},t.prototype.alias=function(t){return B(this,void 0,void 0,function(){return V(this,function(e){return[2,this.send(t,wr.Alias,"alias")]})})},t.prototype.group=function(t){return B(this,void 0,void 0,function(){return V(this,function(e){return[2,this.send(t,wr.Group,"group")]})})},t.prototype.scheduleFlush=function(){var t=this;this.flushing||setTimeout(function(){return B(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,Et(this,this.buffer)]);case 1:return t.buffer=e.sent(),this.flushing=!1,this.buffer.todo>0&&this.scheduleFlush(),[2]}})})},5e3*Math.random())},t}()}}),Ar=Pe({"../../../../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()}}),Er={};Oe(Er,{loadLegacyVideoPlugins:function(){return Nt}});var Mr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/legacy-video-plugins/index.js":function(){Ee()}}),Nr={};Oe(Nr,{schemaFilter:function(){return Ft}});var Fr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/schema-filter/index.js":function(){Ee(),kr()}}),Cr={};Oe(Cr,{remoteMiddlewares:function(){return Ct}});var Dr=Se({"../../../../node_modules/@segment/analytics-next/dist/pkg/plugins/remote-middleware/index.js":function(){Ee(),un(),vr(),pr()}}),Tr={};Oe(Tr,{DestinationSegment:function(){return Gi},default:function(){return Yi},destinationSegment:function(){return Wi}});var Rr=Object.defineProperty;!function(t,e){for(var n in e)Rr(t,n,{get:e[n],enumerable:!0})}({},{Level:function(){return qr}});var Lr,qr=((Lr=qr||{})[Lr.ERROR=0]="ERROR",Lr[Lr.WARN=1]="WARN",Lr[Lr.INFO=2]="INFO",Lr[Lr.DEBUG=3]="DEBUG",Lr);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&&Dt(r)){var a=n.slice(i+1).join("."),s=[],u=!0,c=!1,l=void 0;try{for(var d,f=r[Symbol.iterator]();!(u=(d=f.next()).done);u=!0){var p=zr(d.value,a,e);s.push(p)}}catch(t){c=!0,l=t}finally{try{u||null==f.return||f.return()}finally{if(c)throw l}}return s}if(void 0===(r=_instanceof(r,Object)?r[o]:void 0))break}return Tt(r)?r:e}function Ur(t){return function(t){return"boolean"==typeof t}(t)||Lt(t)||function(t){return"number"==typeof t&&!Number.isNaN(t)}(t)||!Tt(t)||Dt(t)&&t.every(Ur)||Rt(t)&&Object.values(t).every(Ur)}function Br(t,e){return _async_to_generator(function(t,e){var n,r,i,o=arguments;return _ts_generator(this,function(a){return r=(n=o.length>2&&void 0!==o[2]?o[2]:{}).collector,i=n.consent,[2,(Dt(e)?e:[e]).reduce(function(e,o){return _async_to_generator(function(){var a,s,u,c,l,d,f,p,h,v,y,m,g,b,_,w,x,j,k,S,P;return _ts_generator(this,function(O){switch(O.label){case 0:return[4,e];case 1:return(a=O.sent())?[2,a]:(s=Lt(o)?{key:o}:o,Object.keys(s).length?(u=s.condition,c=s.consent,l=s.fn,d=s.key,f=s.loop,p=s.map,h=s.set,v=s.validate,y=s.value,(m=u)?[4,zt(u)(t,o,r)]:[3,3]):[2]);case 2:m=!O.sent(),O.label=3;case 3:return m?[2]:c&&!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}(c,i)?[2,y]:(g=Tt(y)?y:t,l?[4,zt(l)(t,o,n)]:[3,5]);case 4:g=O.sent(),O.label=5;case 5:return d&&(g=zr(t,d,y)),f?(b=_sliced_to_array(f,2),_=b[0],w=b[1],"this"!==_?[3,6]:(j=[t],[3,8])):[3,11];case 6:return[4,Ut(t,_,n)];case 7:j=O.sent(),O.label=8;case 8:return Dt(x=j)?[4,Promise.all(x.map(function(t){return Ut(t,w,n)}))]:[3,10];case 9:g=O.sent().filter(Tt),O.label=10;case 10:return[3,17];case 11:return p?[4,Object.entries(p).reduce(function(e,r){var i=_sliced_to_array(r,2),o=i[0],a=i[1];return _async_to_generator(function(){var r,i;return _ts_generator(this,function(s){switch(s.label){case 0:return[4,e];case 1:return r=s.sent(),[4,Ut(t,a,n)];case 2:return i=s.sent(),[2,(Tt(i)&&(r[o]=i),r)]}})})()},Promise.resolve({}))]:[3,13];case 12:return g=O.sent(),[3,16];case 13:return(k=h)?[4,Promise.all(h.map(function(e){return Br(t,e,n)}))]:[3,15];case 14:k=g=O.sent(),O.label=15;case 15:O.label=16;case 16:O.label=17;case 17:return(S=v)?[4,zt(v)(g)]:[3,19];case 18:S=!O.sent(),O.label=19;case 19:return S&&(g=void 0),P=qt(g),[2,Tt(P)?P:qt(y)]}})})()},Promise.resolve(void 0))]})}).apply(this,arguments)}Ee(),sn();var Vr=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],d=s.pop();if("id"===d){if(G(l)||J(l)){a.id=l.toString();continue}if(null==l)continue;d=s.pop()}if("traits"!==d&&"options"!==d||null!=l&&!Y(l)||(a[d]=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]}};cn(),gn(),sn(),He(),Ee(),We();var Kr="bpc",Hr=function(t,e,n,r,i,o){return{__t:Kr,c:e,p:r,u:t,s:n,t:i,r:o}},Gr=Object.keys(Hr("","","","","","")),Jr=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}},Wr=function(){var t=document.querySelector("link[rel='canonical']");return Hr(location.href,t&&t.getAttribute("href")||void 0,location.search,location.pathname,document.title,document.referrer)};Ee(),Ee();var Yr=function(t,e){void 0===e&&(e=Jr(Wr()));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)};sn();var Qr=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 z(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 Yr(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 Yr(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 Yr(s,a),s},e.prototype.identify=function(e,n,r,i,o){var a=t.prototype.identify.call(this,e,n,r,i);return Yr(a,o),a},e.prototype.group=function(e,n,r,i,o){var a=t.prototype.group.call(this,e,n,r,i);return Yr(a,o),a},e.prototype.alias=function(e,n,r,i,o){var a=t.prototype.alias.call(this,e,n,r,i);return Yr(a,o),a},e}(c),$r=function(t){return"addMiddleware"in t&&"destination"===t.type};Ee(),kn(),sn(),cn();var Zr=function(t){function e(e){return t.call(this,"string"==typeof e?new q(4,e):e)||this}return z(e,t),e.prototype.flush=function(){return B(this,void 0,void 0,function(){return V(this,function(e){return at()?[2,[]]:[2,t.prototype.flush.call(this)]})})},e}(S);Ee(),We(),Ee();var Xr=function t(e,n){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=Jt({},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,"",Jt({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,Jt({},this.attributes,e))},withConverter:function(e){return t(Jt({},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:"/"}),ti=Xr,ei=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:Wt(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=ti.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?ti.set(t,e,this.opts()):null===e?ti.remove(t,this.opts()):ti.set(t,JSON.stringify(e),this.opts())},t.prototype.remove=function(t){return ti.remove(t,this.opts())},t}(),ni=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}(),ri=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}(),ii={Cookie:"cookie",LocalStorage:"localStorage",Memory:"memory"},oi=function(t,e,n,r){console.warn("".concat(t.constructor.name,": Can't ").concat(e,' key "').concat(n,'" | Err: ').concat(r))},ai=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){oi(i,"get",t,e)}}return null},t.prototype.set=function(t,e){this.stores.forEach(function(n){try{n.set(t,e)}catch(e){oi(n,"set",t,e)}})},t.prototype.clear=function(t){this.stores.forEach(function(e){try{e.remove(t)}catch(n){oi(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}(),si={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},ui=function(){function t(t,e){void 0===t&&(t=si);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(si.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({},si),t),this.cookieOptions=e,this.idKey=null!==(i=null===(r=t.cookie)||void 0===r?void 0:r.key)&&void 0!==i?i:si.cookie.key,this.traitsKey=null!==(a=null===(o=t.localStorage)||void 0===o?void 0:o.key)&&void 0!==a?a:si.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===ii.Cookie}),this.traitsStore=this.createStorage(this.options,e,function(t){return t!==ii.Cookie});var u=this.legacyUserStore.get(si.cookie.oldKey);u&&"object"===(void 0===u?"undefined":_type_of(u))&&(u.id&&this.id(u.id),u.traits&&this.traits(u.traits)),Gt(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=[ii.LocalStorage,ii.Cookie,ii.Memory];return t.disable?new ai([]):t.persist?(void 0!==t.storage&&null!==t.storage&&Yt(t.storage)&&(r=t.storage.stores),t.localStorageFallbackDisabled&&(r=r.filter(function(t){return t!==ii.LocalStorage})),n&&(r=r.filter(n)),new ai(Qt($t(r,e)))):new ai([new ri])},t.defaults=si,t}(),ci={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},li=function(t){function e(e,r){void 0===e&&(e=ci);var i=t.call(this,n(n({},ci),e),r)||this;return i.anonymousId=function(t){},Gt(i),i}return z(e,t),e}(ui);kn(),pn(),bn(),dn(),Sn(),Ee();var di=function(t){return"object"===(void 0===t?"undefined":_type_of(t))&&null!==t&&"then"in t&&"function"==typeof t.then};pn(),Sn(),hn();var fi=function(t,e,n){n.getAndRemove(t).forEach(function(t){Zt(e,t).catch(console.error)})},pi=function(t,e){return B(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,Zt(t,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}})})},hi=function(t,e){return B(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,Zt(t,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}})})},vi=fi.bind(void 0,"on"),yi=fi.bind(void 0,"setAnonymousId"),mi=function(t,e){Object.keys(e.calls).forEach(function(n){e.getAndRemove(n).forEach(function(e){setTimeout(function(){Zt(t,e).catch(console.error)},0)})})},gi=function(t){if(bi(t)){var e=t.pop();return Jr(e)}},bi=function(t){var e=t[t.length-1];return Ht(e)},_i=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},wi=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)&&!bi(e.args)&&(e.args=K(K([],e.args,!0),[Wr()],!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 _i(e,n)});this.add.apply(this,e)}}},t}(),xi=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=A,this._preInitBuffer=new wi,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 _i(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 _i(t,r)),e)}},t}();Ee(),cn(),bn(),kn(),Jn(),Ee(),fn();var ji=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)})};Ee();var ki=function(t){function e(e,n){var r=t.call(this,e)||this;return r.retryTimeout=n,r.name="RateLimitError",r}return z(e,t),e}(Error);gn(),Ee();var Si=function(t){return n({"Content-Type":"text/plain"},"function"==typeof t?t():t)},Pi=500,Oi=64;fn(),Ee(),Ee(),cn(),gn(),sn(),Wn(),vn();var Ii,Ai=function(t){return"Segment.io"===t.name},Ei="This is being deprecated and will be not be available in future releases of Analytics JS",Mi=O(),Ni=null==Mi?void 0:Mi.analytics,Fi=function(){function t(t,e){var n;this.timeout=300,this._getSegmentPluginMetadata=function(){var t;return null===(t=e.plugins.find(Ai))||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}(),Ci=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=oe,c.addIntegrationMiddleware=oe,c.listeners=oe,c.addEventListener=oe,c.removeAllListeners=oe,c.removeListener=oe,c.removeEventListener=oe,c.hasListeners=oe,c.add=oe,c.addIntegration=oe;var l=null==r?void 0:r.cookie,d=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 Zr(i)}("".concat(e.writeKey,":event-queue"),null==r?void 0:r.retryQueue,d),c.settings=new Fi(e,c.queue);var f=null==r?void 0:r.storage;return c._universalStorage=c.createStore(d,f,l),c._user=null!=o?o:new ui(n({persist:!d,storage:null==r?void 0:r.storage},null==r?void 0:r.user),l).load(),c._group=null!=a?a:new li(n({persist:!d,storage:null==r?void 0:r.storage},null==r?void 0:r.group),l).load(),c.eventFactory=new Qr(c._user),c.integrations=null!==(u=null==r?void 0:r.integrations)&&void 0!==u?u:{},c.options=null!=r?r:{},Gt(c),c}return z(e,t),e.prototype.createStore=function(t,e,n){return t?new ai([new ri]):e&&Yt(e)?new ai(Qt($t(e.stores,n))):new ai(Qt([ii.LocalStorage,{name:ii.Cookie,settings:n},ii.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 B(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u=this;return V(this,function(c){return e=gi(t),n=Bt.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 B(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u,c=this;return V(this,function(l){return e=gi(t),n=Vt.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 B(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u=this;return V(this,function(c){return e=gi(t),n=Vr(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=gi(e);if(0===e.length)return this._group;var i=Vr(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(),d=this.eventFactory.group(c,l,s,this.integrations,r);return this._dispatch(d,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 B(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u=this;return V(this,function(c){return e=gi(t),n=Kt.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 B(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u,c=this;return V(this,function(l){return e=gi(t),n=Vt.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 B(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 $n(),Qn})];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 B(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 $n(),Qn})];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 B(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 $n(),Qn})];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 B(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 $n(),Qn})];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 B(this,void 0,void 0,function(){var e,n,r=this;return V(this,function(i){switch(i.label){case 0:return e=T.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 B(this,void 0,void 0,function(){var e,n,r=this;return V(this,function(i){switch(i.label){case 0:return e=T.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 B(this,void 0,void 0,function(){var n;return V(this,function(r){return(n=new T(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 B(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 B(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 Xn(),Zn})];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($r).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 B(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 fr(),nr})];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}),B(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(Ei),t=null!=Ni?Ni:this,window[wn]=t,this},e.prototype.normalize=function(t){return console.warn(Ei),this.eventFactory.normalize(t)},Object.defineProperty(e.prototype,"failedInitializations",{get:function(){return console.warn(Ei),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"VERSION",{get:function(){return A},enumerable:!1,configurable:!0}),e.prototype.initialize=function(t,e){return B(this,void 0,void 0,function(){return V(this,function(t){return console.warn(Ei),[2,Promise.resolve(this)]})})},e.prototype.pageview=function(t){return B(this,void 0,void 0,function(){return V(this,function(e){switch(e.label){case 0:return console.warn(Ei),[4,this.page({path:t})];case 1:return e.sent(),[2,this]}})})},Object.defineProperty(e.prototype,"plugins",{get:function(){var t;return console.warn(Ei),null!==(t=this._plugins)&&void 0!==t?t:{}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Integrations",{get:function(){return console.warn(Ei),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}(d),Di=function(t){function e(){var e=t.call(this,{writeKey:""},{disableClientPersistence:!0})||this;return e.initialized=!0,e}return z(e,t),e}(Ci);Ee(),pr(),gn(),hr(),He(),Ee(),pn(),hn(),er(),Ee();var Ti=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 B(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,se(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(A)}),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=ti.get("_ga");if(t&&t.startsWith("amp"))return t}();c&&(o.amp={id:c}),function(t,e,r){var i,o=new ai(r?[]:[new ei(ue())]),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};Ee(),vr(),pr(),Xn(),gn(),yr(),He();var Ri,Li,qi=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 B(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 T(e)]}})})},t.prototype._createMethod=function(t){var e=this;return function(n){return B(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 B(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 B(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}();dn();var zi=null!==(Ri=(Li=O()).__SEGMENT_INSPECTOR__)&&void 0!==Ri?Ri:Li.__SEGMENT_INSPECTOR__={},Ui=function(t){var e;return null===(e=zi.attach)||void 0===e?void 0:e.call(zi,t)};mn(),Sn(),fn();var Bi=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(/(?=#).*(?=\?)/,"")},Vi=function(t,e){return B(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]}})})},Ki=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 pe(n,r,t)})})||this)._resolveLoadStart=function(t,e){return i([t,e])},e}return z(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}(xi);gn();var Hi,Gi={},Ji={load:function(t,e){return Ki.load(t,e)}},Wi={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=he(r),a={lastIdentity:{},lastGroup:{},loaded:!1};return!!n.consent&&Object.keys(n.consent).length>0||(a.analytics=ve(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,d,f,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=he(i),l=n.settings||{},d=l._state||{},f=function(t,e,n){return n.analytics?n.analytics:n.loaded?void 0:(n.analytics=ve(t,e),n.loaded=!0,n.analytics)}(c,l,d),f?(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(Rt(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),d=l[0],f=l[1];d in r&&(i[f]=!0===r[d])}}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,Ut(t,p.reset,{collector:a})];case 2:v=x.sent(),x.label=3;case 3:v&&(f.reset(),d.lastIdentity={},d.lastGroup={}),x.label=4;case 4:return void 0===(y=null!==(s=p.identify)&&void 0!==s?s:l.identify)?[3,6]:[4,Ut(t,y,{collector:a})];case 5:m=x.sent(),Rt(m)&&function(t,e,n,r){var i,o=n.lastIdentity||{},a=Lt(e.userId)?e.userId:void 0,s=Lt(e.anonymousId)?e.anonymousId:void 0,u=Rt(e.traits)&&!Dt(e.traits)?e.traits:void 0;s&&s!==o.anonymousId&&t.setAnonymousId(s);var c=ye(u),l=a!==o.userId,d=c!==(null!==(i=o.traitsHash)&&void 0!==i?i:"");(l||void 0!==u&&d||s)&&(r?t.identify(a,u||{},r):t.identify(a,u||{}),n.lastIdentity={userId:a,anonymousId:null!=s?s:o.anonymousId,traitsHash:c})}(f,m,d,h),x.label=6;case 6:return void 0===(g=null!==(u=p.group)&&void 0!==u?u:l.group)?[3,8]:[4,Ut(t,g,{collector:a})];case 7:b=x.sent(),Rt(b)&&function(t,e,n,r){var i,o=Lt(e.groupId)?e.groupId:void 0;if(o){var a=Rt(e.traits)&&!Dt(e.traits)?e.traits:void 0,s=n.lastGroup||{},u=ye(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})}}(f,b,d,h),x.label=8;case 8:return void 0===p.page?[3,10]:[4,me(f,p.page,t,a,h)];case 9:x.sent(),x.label=10;case 10:return!0!==(null==r?void 0:r.silent)&&(_=Lt(null==r?void 0:r.name)?r.name:t.name,w=Rt(o)?o:{},h?f.track(_,w,h):f.track(_,w)),l._state=d,[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=he(e.env);Object.keys(o).every(function(t){return!0===i[t]})&&!s.loaded&&(s.analytics=ve(u,a),s.loaded=!0,a._state=s)}}}},Yi=Wi;return Hi=Tr,Ie(be({},"__esModule",{value:!0}),Hi)}();
2
2
  /*! Bundled license information:
3
3
 
4
4
  @segment/analytics-next/dist/pkg/vendor/tsub/tsub.js: