!function(){var t,e,n,r,i={8878:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(325));function o(t,e){return function(){var n=this.traits(),r=this.properties?this.properties():{};return i.default(n,"address."+t)||i.default(n,t)||(e?i.default(n,"address."+e):null)||(e?i.default(n,e):null)||i.default(r,"address."+t)||i.default(r,t)||(e?i.default(r,"address."+e):null)||(e?i.default(r,e):null)}}e.default=function(t){t.zip=o("postalCode","zip"),t.country=o("country"),t.street=o("street"),t.state=o("state"),t.city=o("city"),t.region=o("region")}},4780:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Alias=void 0;var i=r(n(1285)),o=n(9512);function s(t,e){o.Facade.call(this,t,e)}e.Alias=s,i.default(s,o.Facade),s.prototype.action=function(){return"alias"},s.prototype.type=s.prototype.action,s.prototype.previousId=function(){return this.field("previousId")||this.field("from")},s.prototype.from=s.prototype.previousId,s.prototype.userId=function(){return this.field("userId")||this.field("to")},s.prototype.to=s.prototype.userId},4814:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.clone=void 0,e.clone=function t(e){if("[object Object]"===Object.prototype.toString.call(e)){var n={};for(var r in e)n[r]=t(e[r]);return n}return Array.isArray(e)?e.map(t):e}},5257:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=void 0;var i=r(n(1285)),o=n(9512);function s(t,e){o.Facade.call(this,t,e)}e.Delete=s,i.default(s,o.Facade),s.prototype.type=function(){return"delete"}},9512:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Facade=void 0;var i=r(n(8878)),o=n(4814),s=r(n(2272)),u=r(n(5870)),a=r(n(325)),c=r(n(6279));function l(t,e){e=e||{},this.raw=o.clone(t),"clone"in e||(e.clone=!0),e.clone&&(t=o.clone(t)),"traverse"in e||(e.traverse=!0),t.timestamp="timestamp"in t?u.default(t.timestamp):new Date,e.traverse&&c.default(t),this.opts=e,this.obj=t}e.Facade=l;var p=l.prototype;function f(t){return o.clone(t)}p.proxy=function(t){var e=t.split("."),n=this[t=e.shift()]||this.field(t);return n?("function"==typeof n&&(n=n.call(this)||{}),0===e.length||(n=a.default(n,e.join("."))),this.opts.clone?f(n):n):n},p.field=function(t){var e=this.obj[t];return this.opts.clone?f(e):e},l.proxy=function(t){return function(){return this.proxy(t)}},l.field=function(t){return function(){return this.field(t)}},l.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?o.clone(n):n]),n||[]}},l.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}},p.json=function(){var t=this.opts.clone?o.clone(this.obj):this.obj;return this.type&&(t.type=this.type()),t},p.rawEvent=function(){return this.raw},p.options=function(t){var e=this.obj.options||this.obj.context||{},n=this.opts.clone?o.clone(e):e;if(!t)return n;if(this.enabled(t)){var r=this.integrations(),i=r[t]||a.default(r,t);return"object"!=typeof i&&(i=a.default(this.options(),t)),"object"==typeof i?i:{}}},p.context=p.options,p.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&&s.default(t),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(t)&&(n=r.providers[t]),r.hasOwnProperty(t)){var i=r[t];n="boolean"!=typeof i||i}return!!n},p.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},p.active=function(){var t=this.proxy("options.active");return null==t&&(t=!0),t},p.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},p.sessionId=p.anonymousId,p.groupId=l.proxy("options.groupId"),p.traits=function(t){var e=this.proxy("options.traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();null!=i&&(e[t[r]]=i,delete e[r])}return e},p.library=function(){var t=this.proxy("options.library");return t?"string"==typeof t?{name:t,version:null}:t:{name:"unknown",version:null}},p.device=function(){var t=this.proxy("context.device");"object"==typeof 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},p.userAgent=l.proxy("context.userAgent"),p.timezone=l.proxy("context.timezone"),p.timestamp=l.field("timestamp"),p.channel=l.field("channel"),p.ip=l.proxy("context.ip"),p.userId=l.field("userId"),i.default(p)},615:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Group=void 0;var i=r(n(1285)),o=r(n(4554)),s=r(n(5870)),u=n(9512);function a(t,e){u.Facade.call(this,t,e)}e.Group=a,i.default(a,u.Facade);var c=a.prototype;c.action=function(){return"group"},c.type=c.action,c.groupId=u.Facade.field("groupId"),c.created=function(){var t=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(t)return s.default(t)},c.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.groupId();return o.default(e)?e:void 0},c.traits=function(t){var e=this.properties(),n=this.groupId();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,delete e[r])}return e},c.name=u.Facade.proxy("traits.name"),c.industry=u.Facade.proxy("traits.industry"),c.employees=u.Facade.proxy("traits.employees"),c.properties=function(){return this.field("traits")||this.field("properties")||{}}},4705:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Identify=void 0;var i=n(9512),o=r(n(325)),s=r(n(1285)),u=r(n(4554)),a=r(n(5870)),c=function(t){return t.trim()};function l(t,e){i.Facade.call(this,t,e)}e.Identify=l,s.default(l,i.Facade);var p=l.prototype;p.action=function(){return"identify"},p.type=p.action,p.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},p.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.userId();return u.default(e)?e:void 0},p.created=function(){var t=this.proxy("traits.created")||this.proxy("traits.createdAt");if(t)return a.default(t)},p.companyCreated=function(){var t=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(t)return a.default(t)},p.companyName=function(){return this.proxy("traits.company.name")},p.name=function(){var t=this.proxy("traits.name");if("string"==typeof t)return c(t);var e=this.firstName(),n=this.lastName();return e&&n?c(e+" "+n):void 0},p.firstName=function(){var t=this.proxy("traits.firstName");if("string"==typeof t)return c(t);var e=this.proxy("traits.name");return"string"==typeof e?c(e).split(" ")[0]:void 0},p.lastName=function(){var t=this.proxy("traits.lastName");if("string"==typeof t)return c(t);var e=this.proxy("traits.name");if("string"==typeof e){var n=c(e).indexOf(" ");if(-1!==n)return c(e.substr(n+1))}},p.uid=function(){return this.userId()||this.username()||this.email()},p.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},p.age=function(){var t=this.birthday(),e=o.default(this.traits(),"age");return null!=e?e:t instanceof Date?(new Date).getFullYear()-t.getFullYear():void 0},p.avatar=function(){var t=this.traits();return o.default(t,"avatar")||o.default(t,"photoUrl")||o.default(t,"avatarUrl")},p.position=function(){var t=this.traits();return o.default(t,"position")||o.default(t,"jobTitle")},p.username=i.Facade.proxy("traits.username"),p.website=i.Facade.one("traits.website"),p.websites=i.Facade.multi("traits.website"),p.phone=i.Facade.one("traits.phone"),p.phones=i.Facade.multi("traits.phone"),p.address=i.Facade.proxy("traits.address"),p.gender=i.Facade.proxy("traits.gender"),p.birthday=i.Facade.proxy("traits.birthday")},4122:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0){var c=!1,l=function(){c||(c=!0,s.flush().catch(a),c=!1,setTimeout(l,s.flushTimer))};l()}}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=function(t,e,n){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:(0,r.pi)((0,r.pi)({},i),{library:"analytics.js",library_version:"web"===n?"next-".concat(o.i):"npm:next-".concat(o.i)})}}(t,e,(0,s.B)());this.queue.push(n),t.includes("error")&&this.flush().catch(a)}},t.prototype.flush=function(){return(0,r.mG)(this,void 0,Promise,(function(){var t=this;return(0,r.Jh)(this,(function(e){switch(e.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(e){a(e),t.sampleRate=0}))];case 1:return e.sent(),[2]}}))}))},t.prototype.send=function(){return(0,r.mG)(this,void 0,Promise,(function(){var t,e,n;return(0,r.Jh)(this,(function(r){return t={series:this.queue},this.queue=[],e={"Content-Type":"text/plain"},n="".concat(this.protocol,"://").concat(this.host,"/m"),[2,(0,i.h)(n,{headers:e,body:JSON.stringify(t),method:"POST"})]}))}))},t}()},4278:function(t,e,n){"use strict";n.d(e,{i:function(){return r}});var r="1.72.1"},584:function(t,e,n){"use strict";n.d(e,{M:function(){return r}});try{window.analyticsWriteKey="z6UD5YX6xrqHGUZdPu7WMqzj8F1Z6RRC"}catch(t){}function r(){if(void 0!==window.analyticsWriteKey)return window.analyticsWriteKey!==["__","WRITE","_","KEY","__"].join("")?window.analyticsWriteKey:void 0}},4759:function(t,e,n){"use strict";function r(t,e){return e=e||{},new Promise((function(n,r){var i=new XMLHttpRequest,o=[],s=[],u={},a=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:a,headers:{keys:function(){return o},entries:function(){return s},get:function(t){return u[t.toLowerCase()]},has:function(t){return t.toLowerCase()in u}}}};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()),s.push([e,n]),u[e]=u[e]?u[e]+","+n:n})),n(a())},i.onerror=r,i.withCredentials="include"==e.credentials,e.headers)i.setRequestHeader(c,e.headers[c]);i.send(e.body||null)}))}n.d(e,{h:function(){return o}});var i=n(3744),o=function(){for(var t=[],e=0;et}(o);if(s)return u.setItem(r,JSON.stringify((new Date).getTime()+50)),e(),void u.removeItem(r);!s&&n<3?setTimeout((function(){p(t,e,n+1)}),50):console.error("Unable to retrieve lock")}var f=function(t){function e(e,n){var i=t.call(this,e,[])||this,o="persisted-queue:v1:".concat(n,":items"),s="persisted-queue:v1:".concat(n,":seen"),f=[],d={};return p(n,(function(){try{f=a(o),d=c(s),l(o),l(s),i.queue=(0,r.ev)((0,r.ev)([],f,!0),i.queue,!0),i.seen=(0,r.pi)((0,r.pi)({},d),i.seen)}catch(t){console.error(t)}})),window.addEventListener("pagehide",(function(){if(i.todo>0){var t=(0,r.ev)((0,r.ev)([],i.queue,!0),i.future,!0);try{p(n,(function(){!function(t,e){var n=a(t),i=(0,r.ev)((0,r.ev)([],e,!0),n,!0).reduce((function(t,e){var n;return(0,r.pi)((0,r.pi)({},t),((n={})[e.id]=e,n))}),{});u.setItem(t,JSON.stringify(Object.values(i)))}(o,t),function(t,e){var n=c(t);u.setItem(t,JSON.stringify((0,r.pi)((0,r.pi)({},n),e)))}(s,i.seen)}))}catch(t){console.error(t)}}})),i}return(0,r.ZT)(e,t),e}(i.Z)},9950:function(t,e,n){"use strict";n.d(e,{D:function(){return i}});var r=n(4122);function i(t,e){var n=new r.Facade(t,e);return"track"===t.type&&(n=new r.Track(t,e)),"identify"===t.type&&(n=new r.Identify(t,e)),"page"===t.type&&(n=new r.Page(t,e)),"alias"===t.type&&(n=new r.Alias(t,e)),"group"===t.type&&(n=new r.Group(t,e)),"screen"===t.type&&(n=new r.Screen(t,e)),Object.defineProperty(n,"obj",{value:t,writable:!0}),n}},6175:function(t,e,n){"use strict";n.d(e,{B:function(){return o},X:function(){return i}});var r="npm";function i(t){r=t}function o(){return r}},6338:function(t,e,n){"use strict";n.r(e),n.d(e,{applyDestinationMiddleware:function(){return s},sourceMiddlewarePlugin:function(){return u}});var r=n(5163),i=n(1494),o=n(9950);function s(t,e,n){return(0,r.mG)(this,void 0,Promise,(function(){function i(e,n){return(0,r.mG)(this,void 0,Promise,(function(){var i,s,u;return(0,r.Jh)(this,(function(a){switch(a.label){case 0:return i=!1,s=null,[4,n({payload:(0,o.D)(e,{clone:!0,traverse:!1}),integration:t,next:function(t){i=!0,null===t&&(s=null),t&&(s=t.obj)}})];case 1:return a.sent(),i||null===s||(s.integrations=(0,r.pi)((0,r.pi)({},e.integrations),((u={})[t]=!1,u))),[2,s]}}))}))}var s,u,a,c,l;return(0,r.Jh)(this,(function(t){switch(t.label){case 0:s=(0,o.D)(e,{clone:!0,traverse:!1}).rawEvent(),u=0,a=n,t.label=1;case 1:return u0&&i[i.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]1){var t=this._logs.reduce((function(t,e){var n,r,i,s=(0,o.pi)((0,o.pi)({},e),{json:JSON.stringify(e.extras,null," "),extras:e.extras});delete s.time;var u=null!==(i=null===(r=e.time)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"";return t[u]&&(u="".concat(u,"-").concat(Math.random())),(0,o.pi)((0,o.pi)({},t),((n={})[u]=s,n))}),{});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}(),u=n(417),a=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:""},c=function(){function t(t,e,n,i){void 0===e&&(e=(0,r.v4)()),void 0===n&&(n=new u.i),void 0===i&&(i=new s),this.attempts=0,this.event=t,this._id=e,this.logger=i,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 a({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(0,i.N)(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}()},3098:function(t,e,n){"use strict";n.d(e,{M:function(){return o},Z:function(){return s}});var r=n(5163),i=n(7830);var o="onRemoveFromFuture",s=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(0,r.ZT)(e,t),e.prototype.push=function(){for(var t=this,e=[],n=0;nt.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){var e=this;if(0===this.getAttempts(t))return this.push(t)[0];var n=this.updateAttempts(t);if(n>this.maxAttempts||this.includes(t))return!1;var r=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,s=t.attempt,u=t.maxTimeout,a=void 0===u?1/0:u;return Math.min(e*r*Math.pow(o,s),a)}({attempt:n-1});return setTimeout((function(){e.queue.push(t),e.future=e.future.filter((function(e){return e.id!==t.id})),e.emit(o)}),r),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}(i.Q)},6096:function(t,e,n){"use strict";n.d(e,{a:function(){return o},z:function(){return s}});var r=n(5163),i=n(1494);function o(t,e){t.log("debug","plugin",{plugin:e.name});var n=(new Date).getTime(),o=e[t.event.type];return void 0===o?Promise.resolve(t):function(t){return(0,r.mG)(this,void 0,void 0,(function(){var e;return(0,r.Jh)(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 o.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(n instanceof i.Y&&"middleware_cancellation"===n.type)throw n;return n instanceof i.Y?(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)}))}function s(t,e){return o(t,e).then((function(e){if(e instanceof i._)return e;t.log("debug","Context canceled"),t.stats.increment("context_canceled"),t.cancel(e)}))}},417:function(t,e,n){"use strict";n.d(e,{i:function(){return o},s:function(){return i}});var r=n(5163),i=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(0,r.pi)((0,r.pi)({},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:(e=t.type,{gauge:"g",counter:"c"}[e]),e:t.timestamp};var e}))},t}(),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.gauge=function(){for(var t=[],e=0;ethis.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;o256){for(r=Array(e=256);e--;)r[e]=256*Math.random()|0;e=i=0}for(;e<16;e++)t=r[i+e],n+=6==e?o[15&t|64]:8==e?o[63&t|128]:o[t],1&e&&e>1&&e<11&&(n+="-");return i++,n}},380:function(t,e,n){"use strict";function r(t,e,n){e.split&&(e=e.split("."));for(var r,i,o=0,s=e.length,u=t;o-1?t:t+e}(r,o):-1===(n=(e=s).indexOf("#"))?e:e.slice(0,n);return{path:c,referrer:u,search:o,title:a,url:l}},_=function(){var t=document.querySelector("link[rel='canonical']");return g(location.href,t&&t.getAttribute("href")||void 0,location.search,location.pathname,document.title,document.referrer)},x=function(e,n){void 0===n&&(n=w(_()));var r,i,o,s=e.context;"page"===e.type&&(r=e.properties&&(i=e.properties,o=Object.keys(n),Object.assign.apply(Object,(0,t.ev)([{}],o.map((function(t){var e;if(i&&Object.prototype.hasOwnProperty.call(i,t))return(e={})[t]=i[t],e})),!1))),e.properties=(0,t.pi)((0,t.pi)((0,t.pi)({},n),e.properties),e.name?{name:e.name}:{})),s.page=(0,t.pi)((0,t.pi)((0,t.pi)({},n),r),s.page)},S=s(380),P=function(e){function n(t,n){var r=e.call(this,"".concat(t," ").concat(n))||this;return r.field=t,r}return(0,t.ZT)(n,e),n}(Error),j="is not a string",I="is not an object",k="is nil";function O(t){!function(t){if(!(0,o.Gg)(t))throw new P("Event",k);if("object"!=typeof t)throw new P("Event",I)}(t),function(t){if(!(0,o.HD)(t.type))throw new P(".type",j)}(t),function(t){if(!(0,o.HD)(t.messageId))throw new P(".messageId",j)}(t),"track"===t.type&&(function(t){if(!(0,o.HD)(t.event))throw new P(".event",j)}(t),function(t){if(!(0,o.PO)(t.properties))throw new P(".properties",I)}(t)),["group","identify"].includes(t.type)&&function(t){if(!(0,o.PO)(t.traits))throw new P(".traits",I)}(t)}var M=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(){}},E=function(){function e(t){this.settings=new M(t)}return e.prototype.track=function(e,n,r,i){return this.settings.onEventMethodCall({type:"track",options:r}),this.normalize((0,t.pi)((0,t.pi)({},this.baseEvent()),{event:e,type:"track",properties:null!=n?n:{},options:(0,t.pi)({},r),integrations:(0,t.pi)({},i)}))},e.prototype.page=function(e,n,r,i,o){var s;this.settings.onEventMethodCall({type:"page",options:i});var u={type:"page",properties:(0,t.pi)({},r),options:(0,t.pi)({},i),integrations:(0,t.pi)({},o)};return null!==e&&(u.category=e,u.properties=null!==(s=u.properties)&&void 0!==s?s:{},u.properties.category=e),null!==n&&(u.name=n),this.normalize((0,t.pi)((0,t.pi)({},this.baseEvent()),u))},e.prototype.screen=function(e,n,r,i,o){this.settings.onEventMethodCall({type:"screen",options:i});var s={type:"screen",properties:(0,t.pi)({},r),options:(0,t.pi)({},i),integrations:(0,t.pi)({},o)};return null!==e&&(s.category=e),null!==n&&(s.name=n),this.normalize((0,t.pi)((0,t.pi)({},this.baseEvent()),s))},e.prototype.identify=function(e,n,r,i){return this.settings.onEventMethodCall({type:"identify",options:r}),this.normalize((0,t.pi)((0,t.pi)({},this.baseEvent()),{type:"identify",userId:e,traits:null!=n?n:{},options:(0,t.pi)({},r),integrations:i}))},e.prototype.group=function(e,n,r,i){return this.settings.onEventMethodCall({type:"group",options:r}),this.normalize((0,t.pi)((0,t.pi)({},this.baseEvent()),{type:"group",traits:null!=n?n:{},options:(0,t.pi)({},r),integrations:(0,t.pi)({},i),groupId:e}))},e.prototype.alias=function(e,n,r,i){this.settings.onEventMethodCall({type:"alias",options:r});var o={userId:e,type:"alias",options:(0,t.pi)({},r),integrations:(0,t.pi)({},i)};return null!==n&&(o.previousId=n),void 0===e?this.normalize((0,t.pi)((0,t.pi)({},o),this.baseEvent())):this.normalize((0,t.pi)((0,t.pi)({},this.baseEvent()),o))},e.prototype.baseEvent=function(){return{integrations:{},options:{}}},e.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)?(0,S.N)(o,e,t[e]):(0,S.N)(i,e,t[e]))})),[i,o]},e.prototype.normalize=function(e){var n,r,i,o,s=Object.keys(null!==(n=e.integrations)&&void 0!==n?n:{}).reduce((function(n,r){var i,o;return(0,t.pi)((0,t.pi)({},n),((i={})[r]=Boolean(null===(o=e.integrations)||void 0===o?void 0:o[r]),i))}),{});e.options=(i=e.options||{},o=function(t,e){return void 0!==e},Object.keys(i).filter((function(t){return o(t,i[t])})).reduce((function(t,e){return t[e]=i[e],t}),{}));var u=(0,t.pi)((0,t.pi)({},s),null===(r=e.options)||void 0===r?void 0:r.integrations),a=e.options?this.context(e.options):[],c=a[0],l=a[1],p=e.options,f=(0,t._T)(e,["options"]),d=(0,t.pi)((0,t.pi)((0,t.pi)((0,t.pi)({timestamp:new Date},f),{context:c,integrations:u}),l),{messageId:p.messageId||this.settings.createMessageId()});return this.settings.onFinishedEvent(d),O(d),d},e}(),A=function(e){function n(t){var n=e.call(this,{createMessageId:function(){return"ajs-next-".concat(Date.now(),"-").concat((0,m.v4)())},onEventMethodCall:function(t){var e=t.options;n.maybeUpdateAnonId(e)},onFinishedEvent:function(t){return n.addIdentity(t),t}})||this;return n.user=t,n}return(0,t.ZT)(n,e),n.prototype.maybeUpdateAnonId=function(t){(null==t?void 0:t.anonymousId)&&this.user.anonymousId(t.anonymousId)},n.prototype.addIdentity=function(t){this.user.id()&&(t.userId=this.user.id()),this.user.anonymousId()&&(t.anonymousId=this.user.anonymousId())},n.prototype.track=function(t,n,r,i,o){var s=e.prototype.track.call(this,t,n,r,i);return x(s,o),s},n.prototype.page=function(t,n,r,i,o,s){var u=e.prototype.page.call(this,t,n,r,i,o);return x(u,s),u},n.prototype.screen=function(t,n,r,i,o,s){var u=e.prototype.screen.call(this,t,n,r,i,o);return x(u,s),u},n.prototype.identify=function(t,n,r,i,o){var s=e.prototype.identify.call(this,t,n,r,i);return x(s,o),s},n.prototype.group=function(t,n,r,i,o){var s=e.prototype.group.call(this,t,n,r,i);return x(s,o),s},n.prototype.alias=function(t,n,r,i,o){var s=e.prototype.alias.call(this,t,n,r,i);return x(s,o),s},n}(E),F=function(t){return"addMiddleware"in t&&"destination"===t.type},D=s(3061);var T=s(3098),J=s(1494),C=s(6096),N=function(e){function n(t){var n,r,i,o=e.call(this)||this;return o.criticalTasks=(i=0,{done:function(){return n},run:function(t){var e,o=t();return"object"==typeof(e=o)&&null!==e&&"then"in e&&"function"==typeof e.then&&(1==++i&&(n=new Promise((function(t){return r=t}))),o.finally((function(){return 0==--i&&r()}))),o}}),o.plugins=[],o.failedInitializations=[],o.flushing=!1,o.queue=t,o.queue.on(T.M,(function(){o.scheduleFlush(0)})),o}return(0,t.ZT)(n,e),n.prototype.register=function(e,n,r){return(0,t.mG)(this,void 0,void 0,(function(){var i,o,s=this;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:return this.plugins.push(n),i=function(t){s.failedInitializations.push(n.name),s.emit("initialization_failure",n),console.warn(n.name,t),e.log("warn","Failed to load destination",{plugin:n.name,error:t}),s.plugins=s.plugins.filter((function(t){return t!==n}))},"destination"!==n.type||"Segment.io"===n.name?[3,1]:(n.load(e,r).catch(i),[3,4]);case 1:return t.trys.push([1,3,,4]),[4,n.load(e,r)];case 2:return t.sent(),[3,4];case 3:return o=t.sent(),i(o),[3,4];case 4:return[2]}}))}))},n.prototype.deregister=function(e,n,r){return(0,t.mG)(this,void 0,void 0,(function(){var i;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),n.unload?[4,Promise.resolve(n.unload(e,r))]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.plugins=this.plugins.filter((function(t){return t.name!==n.name})),[3,4];case 3:return i=t.sent(),e.log("warn","Failed to unload destination",{plugin:n.name,error:i}),[3,4];case 4:return[2]}}))}))},n.prototype.dispatch=function(e){return(0,t.mG)(this,void 0,void 0,(function(){var n;return(0,t.Jh)(this,(function(t){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.push(e),n=this.subscribeToDelivery(e),this.scheduleFlush(0),[2,n]}))}))},n.prototype.subscribeToDelivery=function(e){return(0,t.mG)(this,void 0,void 0,(function(){var n=this;return(0,t.Jh)(this,(function(t){return[2,new Promise((function(t){var r=function(i,o){i.isSame(e)&&(n.off("flush",r),t(i))};n.on("flush",r)}))]}))}))},n.prototype.dispatchSingle=function(e){return(0,t.mG)(this,void 0,void 0,(function(){var n=this;return(0,t.Jh)(this,(function(t){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.updateAttempts(e),e.attempts=1,[2,this.deliver(e).catch((function(t){return n.enqueuRetry(t,e)?n.subscribeToDelivery(e):(e.setFailedDelivery({reason:t}),e)}))]}))}))},n.prototype.isEmpty=function(){return 0===this.queue.length},n.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))},n.prototype.deliver=function(e){return(0,t.mG)(this,void 0,void 0,(function(){var n,r,i,o;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:return[4,this.criticalTasks.done()];case 1:t.sent(),n=Date.now(),t.label=2;case 2:return t.trys.push([2,4,,5]),[4,this.flushOne(e)];case 3:return e=t.sent(),r=Date.now()-n,this.emit("delivery_success",e),e.stats.gauge("delivered",r),e.log("debug","Delivered",e.event),[2,e];case 4:throw i=t.sent(),o=i,e.log("error","Failed to deliver",o),this.emit("delivery_failure",e,o),e.stats.increment("delivery_failed"),i;case 5:return[2]}}))}))},n.prototype.enqueuRetry=function(t,e){return!(t instanceof J.Y&&!t.retry)&&this.queue.pushWithBackoff(e)},n.prototype.flush=function(){return(0,t.mG)(this,void 0,void 0,(function(){var e,n;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:if(0===this.queue.length)return[2,[]];if(!(e=this.queue.pop()))return[2,[]];e.attempts=this.queue.getAttempts(e),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.deliver(e)];case 2:return e=t.sent(),this.emit("flush",e,!0),[3,4];case 3:return n=t.sent(),this.enqueuRetry(n,e)||(e.setFailedDelivery({reason:n}),this.emit("flush",e,!1)),[2,[]];case 4:return[2,[e]]}}))}))},n.prototype.isReady=function(){return!0},n.prototype.availableExtensions=function(e){var n,r,i=this.plugins.filter((function(t){var n,r,i;if("destination"!==t.type&&"Segment.io"!==t.name)return!0;var o=void 0;return null===(n=t.alternativeNames)||void 0===n||n.forEach((function(t){void 0!==e[t]&&(o=e[t])})),null!==(i=null!==(r=e[t.name])&&void 0!==r?r:o)&&void 0!==i?i:!1!==("Segment.io"===t.name||e.All)})),o=(n="type",r={},i.forEach((function(e){var i,o=void 0;if("string"==typeof n){var s=e[n];o="string"!=typeof s?JSON.stringify(s):s}else n instanceof Function&&(o=n(e));void 0!==o&&(r[o]=(0,t.ev)((0,t.ev)([],null!==(i=r[o])&&void 0!==i?i:[],!0),[e],!1))})),r),s=o.before,u=void 0===s?[]:s,a=o.enrichment,c=void 0===a?[]:a,l=o.destination,p=void 0===l?[]:l,f=o.after;return{before:u,enrichment:c,destinations:p,after:void 0===f?[]:f}},n.prototype.flushOne=function(e){var n,r;return(0,t.mG)(this,void 0,void 0,(function(){var i,o,s,u,a,c,l,p,f,d,h,v,y,m;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:if(!this.isReady())throw new Error("Not ready");e.attempts>1&&this.emit("delivery_retry",e),i=this.availableExtensions(null!==(n=e.event.integrations)&&void 0!==n?n:{}),o=i.before,s=i.enrichment,u=0,a=o,t.label=1;case 1:return u0)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;r4){var s=r.slice(4);"campaign"===s&&(s="name"),t[s]=(0,It.a)(o)}return t}),{})}(a));var l=function(){var t=W.get("_ga");if(t&&t.startsWith("amp"))return t}();l&&(s.amp={id:l}),function(e,n,r){var i,o=new R(r?[]:[new H(Ot())]),s=o.get("s:context.referrer"),u=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=64&&n++,e[n]?e[n].push(t):e[n]=[t]})),e}(c).map(d);Promise.all(e).catch(console.error)}},a=!1,window.addEventListener("pagehide",(function(){a||u(a=!0)})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(a)return;a=!0}else a=!1;u(a)})),{dispatch:function(e,r){return(0,t.mG)(this,void 0,Promise,(function(){var e;return(0,t.Jh)(this,(function(t){return c.push(r),e=c.length>=p||function(t){return Gt(t)>=450}(c)||(null==n?void 0:n.keepalive)&&function(t){return Gt(t)>=54}(c),[2,e||l?h():void(s||(s=setTimeout((function(){s=void 0,h().catch(console.error)}),f)))]}))}))}}}function Lt(e,n,r,i){var o,s=e.user();delete n.options,n.writeKey=null==r?void 0:r.apiKey,n.userId=n.userId||s.id(),n.anonymousId=n.anonymousId||s.anonymousId(),n.sentAt=new Date;var u=e.queue.failedInitializations||[];u.length>0&&(n._metadata={failedInitializations:u});var a=[],c=[];for(var l in i){var p=i[l];"Segment.io"===l&&a.push(l),"bundled"===p.bundlingStatus&&a.push(l),"unbundled"===p.bundlingStatus&&c.push(l)}for(var f=0,d=(null==r?void 0:r.unbundledIntegrations)||[];f0&&!(0,f.s)()}),(function(){return(0,t.mG)(i,void 0,void 0,(function(){var i,o;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:return(i=n.pop())?[4,(0,C.a)(i,e)]:[2];case 1:return o=t.sent(),o instanceof d._||r.push(i),[2]}}))}))}))];case 1:return o.sent(),r.map((function(t){return n.pushWithBackoff(t)})),[2,n]}}))}))}function Kt(e,n,r,i){var o=this;e||setTimeout((function(){return(0,t.mG)(o,void 0,void 0,(function(){var e,o;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:return e=!0,[4,Rt(r,n)];case 1:return o=t.sent(),e=!1,n.todo>0&&i(e,o,r,i),[2]}}))}))}),5e3*Math.random())}var Ut,Bt,Zt=s(4328);function Wt(e,n,r){var o,s,u;window.addEventListener("pagehide",(function(){l.push.apply(l,Array.from(p)),p.clear()}));var a,c=null!==(o=null==n?void 0:n.apiKey)&&void 0!==o?o:"",l=e.options.disableClientPersistence?new T.Z(e.queue.queue.maxAttempts,[]):new D.$(e.queue.queue.maxAttempts,"".concat(c,":dest-Segment.io")),p=new Set,d=!1,h=null!==(s=null==n?void 0:n.apiHost)&&void 0!==s?s:Zt.U,v=null!==(u=null==n?void 0:n.protocol)&&void 0!==u?u:"https",y="".concat(v,"://").concat(h),m=null==n?void 0:n.deliveryStrategy,g="batching"===(null==m?void 0:m.strategy)?qt(h,m.config):(a=null==m?void 0:m.config,{dispatch:function(t,e){return(0,i.h)(t,{keepalive:null==a?void 0:a.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(e)})}});function b(i){return(0,t.mG)(this,void 0,Promise,(function(){var o,s;return(0,t.Jh)(this,(function(t){return(0,f.s)()?(l.push(i),Kt(d,l,w,Kt),[2,i]):(p.add(i),o=i.event.type.charAt(0),s=(0,Nt.D)(i.event).json(),"track"===i.event.type&&delete s.traits,"alias"===i.event.type&&(s=function(t,e){var n,r,i,o,s=t.user();return e.previousId=null!==(i=null!==(r=null!==(n=e.previousId)&&void 0!==n?n:e.from)&&void 0!==r?r:s.id())&&void 0!==i?i:s.anonymousId(),e.userId=null!==(o=e.userId)&&void 0!==o?o:e.to,delete e.from,delete e.to,e}(e,s)),[2,g.dispatch("".concat(y,"/").concat(o),Lt(e,s,n,r)).then((function(){return i})).catch((function(){return l.pushWithBackoff(i),Kt(d,l,w,Kt),i})).finally((function(){p.delete(i)}))])}))}))}var w={name:"Segment.io",type:"destination",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:b,identify:b,page:b,alias:b,group:b,screen:b};return l.todo&&Kt(d,l,w,Kt),w}var Vt=null!==(Ut=(Bt=(0,it.R)()).__SEGMENT_INSPECTOR__)&&void 0!==Ut?Ut:Bt.__SEGMENT_INSPECTOR__={},Ht=s(6218);function Yt(e,n){return(0,t.mG)(this,void 0,Promise,(function(){return(0,t.Jh)(this,(function(t){switch(t.label){case 0:return[4,ut(e,n)];case 1:return t.sent(),function(t,e){e.toArray().forEach((function(e){setTimeout((function(){ht(t,e).catch(console.error)}),0)}))}(e,n),n.clear(),[2]}}))}))}function Qt(e,n,i,o,u,a){var c,l,p;return void 0===u&&(u=[]),(0,t.mG)(this,void 0,Promise,(function(){var f,d,h,v,y,m,g,b,w,_,x,S,P,j,I=this;return(0,t.Jh)(this,(function(k){switch(k.label){case 0:return f=null==u?void 0:u.filter((function(t){return"object"==typeof t})),d=null==u?void 0:u.filter((function(t){return"function"==typeof t&&"string"==typeof t.pluginName})),function(t){var e,n,i;return"test"!==r().NODE_ENV&&(null!==(i=null===(n=null===(e=t.middlewareSettings)||void 0===e?void 0:e.routingRules)||void 0===n?void 0:n.length)&&void 0!==i?i:0)>0}(n)?[4,s.e(604).then(s.bind(s,669)).then((function(t){return t.tsubMiddleware(n.middlewareSettings.routingRules)}))]:[3,2];case 1:return v=k.sent(),[3,3];case 2:v=void 0,k.label=3;case 3:return h=v,O=n,"test"!==r().NODE_ENV&&Object.keys(O.integrations).length>1||a.length>0?[4,s.e(464).then(s.bind(s,3162)).then((function(t){return t.ajsDestinations(e,n,i.integrations,o,h,a)}))]:[3,5];case 4:return m=k.sent(),[3,6];case 5:m=[],k.label=6;case 6:return y=m,n.legacyVideoPluginsEnabled?[4,s.e(150).then(s.bind(s,9141)).then((function(t){return t.loadLegacyVideoPlugins(i)}))]:[3,8];case 7:k.sent(),k.label=8;case 8:return(null===(c=o.plan)||void 0===c?void 0:c.track)?[4,s.e(493).then(s.bind(s,5081)).then((function(t){var e;return t.schemaFilter(null===(e=o.plan)||void 0===e?void 0:e.track,n)}))]:[3,10];case 9:return b=k.sent(),[3,11];case 10:b=void 0,k.label=11;case 11:return g=b,w=(0,Pt.o)(n,o),[4,Ct(n,i.integrations,w,o,h,d).catch((function(){return[]}))];case 12:return _=k.sent(),x=(0,t.ev)((0,t.ev)((0,t.ev)([Et],f,!0),y,!0),_,!0),g&&x.push(g),!1===(null===(l=o.integrations)||void 0===l?void 0:l.All)&&!o.integrations["Segment.io"]||o.integrations&&!1===o.integrations["Segment.io"]?[3,14]:(P=(S=x).push,[4,Wt(i,w["Segment.io"],n.integrations)]);case 13:P.apply(S,[k.sent()]),k.label=14;case 14:return[4,i.register.apply(i,x)];case 15:return j=k.sent(),Object.entries(null!==(p=n.enabledMiddleware)&&void 0!==p?p:{}).some((function(t){return t[1]}))?[4,s.e(214).then(s.bind(s,9568)).then((function(e){var r=e.remoteMiddlewares;return(0,t.mG)(I,void 0,void 0,(function(){var e,s;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:return[4,r(j,n,o.obfuscate)];case 1:return e=t.sent(),s=e.map((function(t){return i.addSourceMiddleware(t)})),[2,Promise.all(s)]}}))}))}))]:[3,17];case 16:k.sent(),k.label=17;case 17:return[2,j]}var O}))}))}function $t(n,r,o){var s,u,a,c,l,p,f,h,v,y;return void 0===r&&(r={}),(0,t.mG)(this,void 0,Promise,(function(){var m,g,b,w,_,x,S,P,j,I,k;return(0,t.Jh)(this,(function(O){switch(O.label){case 0:return!0===r.disable?[2,[new St,d._.system()]]:(r.globalAnalyticsKey&&(0,ot.jV)(r.globalAnalyticsKey),n.cdnURL&&(0,e.UH)(n.cdnURL),r.initialPageview&&o.push(new ft("page",[])),null===(s=n.cdnSettings)||void 0===s?[3,1]:(g=s,[3,3]));case 1:return[4,(M=n.writeKey,E=n.cdnURL,A=null!=E?E:(0,e.Vl)(),(0,i.h)("".concat(A,"/v1/projects/").concat(M,"/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:g=O.sent(),O.label=3;case 3:return m=g,r.updateCDNSettings&&(m=r.updateCDNSettings(m)),"function"!=typeof r.disable?[3,5]:[4,r.disable(m)];case 4:if(O.sent())return[2,[new St,d._.system()]];O.label=5;case 5:return b=null===(a=null===(u=m.integrations["Segment.io"])||void 0===u?void 0:u.retryQueue)||void 0===a||a,r=(0,t.pi)({retryQueue:b},r),function(t){var e;null===(e=Vt.attach)||void 0===e||e.call(Vt,t)}(w=new xt((0,t.pi)((0,t.pi)({},n),{cdnSettings:m}),r)),_=null!==(c=n.plugins)&&void 0!==c?c:[],x=null!==(l=n.classicIntegrations)&&void 0!==l?l:[],S=null===(p=r.integrations)||void 0===p?void 0:p["Segment.io"],Ht.j.initRemoteMetrics((0,t.pi)((0,t.pi)({},m.metrics),{host:null!==(f=null==S?void 0:S.apiHost)&&void 0!==f?f:null===(h=m.metrics)||void 0===h?void 0:h.host,protocol:null==S?void 0:S.protocol})),function(t,e){ct(t,e),at(t,e)}(w,o),[4,Qt(n.writeKey,m,w,r,_,x)];case 6:return P=O.sent(),j=null!==(v=window.location.search)&&void 0!==v?v:"",I=null!==(y=window.location.hash)&&void 0!==y?y:"",(k=j.length?j:I.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,w.queryString(k).catch(console.error)]:[3,8];case 7:O.sent(),O.label=8;case 8:return w.initialized=!0,w.emit("initialize",n,r),[4,Yt(w,o)];case 9:return O.sent(),[2,[w,P]]}var M,E,A}))}))}var Xt=function(e){function n(){var t=this,n=(0,jt.d)(),r=n.promise,i=n.resolve;return t=e.call(this,(function(t){return r.then((function(e){return $t(e[0],e[1],t)}))}))||this,t._resolveLoadStart=function(t,e){return i([t,e])},t}return(0,t.ZT)(n,e),n.prototype.load=function(t,e){return void 0===e&&(e={}),this._resolveLoadStart(t,e),this},n.load=function(t,e){return void 0===e&&(e={}),(new n).load(t,e)},n.standalone=function(t,e){return n.load({writeKey:t},e).then((function(t){return t[0]}))},n}(vt),te=s(584);function ee(){var e,n;return(0,t.mG)(this,void 0,Promise,(function(){var r,i,o;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:return r=function(){var t;if((0,te.M)())return(0,te.M)();var e=(0,ot.wI)();if(null==e?void 0:e._writeKey)return e._writeKey;for(var n=/http.*\/analytics\.js\/v1\/([^/]*)(\/platform)?\/analytics.*/,r=void 0,i=0,o=Array.prototype.slice.call(document.querySelectorAll("script"));i=parseInt(o)}()){var ce=document.createElement("script");ce.setAttribute("src","https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.7.0/polyfill.min.js"),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(function(){return document.body.appendChild(ce)})):document.body.appendChild(ce),ce.onload=function(){ue(ee)}}else ue(ee)}(),window.AnalyticsNext=u}(); //# sourceMappingURL=standalone.js.map