(self.webpackChunk_segment_analytics_next=self.webpackChunk_segment_analytics_next||[]).push([[464,714],{9254:function(n,t,e){"use strict";function i(n,t){var e,i;return"boolean"==typeof(null==t?void 0:t.enabled)?t.enabled:null===(i=null===(e=null==n?void 0:n.__default)||void 0===e?void 0:e.enabled)||void 0===i||i}e.d(t,{n:function(){return i}})},1620:function(n,t,e){"use strict";e.r(t),e.d(t,{LegacyDestination:function(){return k},ajsDestinations:function(){return G}});var i=e(5163),r=e(4122),o=e(94),s=e(7547),a=e(204),u=e(1365),c=e(5346),l=e(9254),d=e(5944),h=e(8044),f=e(4443),v=e(3061),p=e(6338),g=e(2870),m=e(7566),y=e(7070);function w(n){return n.toLowerCase().replace(".","").replace(/\s+/g,"-")}function b(n,t){return void 0===t&&(t=!1),t?btoa(n).replace(/=/g,""):void 0}function _(n,t,e,r,o,s){return(0,i.mG)(this,void 0,Promise,(function(){var a,u,c,l,d,h,f,v;return(0,i.Jh)(this,(function(p){switch(p.label){case 0:a=w(e),u=b(a,s),c=(0,m.Kg)(),l="".concat(c,"/integrations/").concat(null!=u?u:a,"/").concat(r,"/").concat(null!=u?u:a,".dynamic.js.gz"),p.label=1;case 1:return p.trys.push([1,3,,4]),[4,(0,y.v)(l)];case 2:return p.sent(),function(n,t,e){var r,o;try{var s=(null!==(o=null===(r=null===window||void 0===window?void 0:window.performance)||void 0===r?void 0:r.getEntriesByName(n,"resource"))&&void 0!==o?o:[])[0];s&&t.stats.gauge("legacy_destination_time",Math.round(s.duration),(0,i.ev)([e],s.duration<100?["cached"]:[],!0))}catch(n){}}(l,n,e),[3,4];case 3:throw d=p.sent(),n.stats.gauge("legacy_destination_time",-1,["plugin:".concat(e),"failed"]),d;case 4:return h=window["".concat(a,"Deps")],[4,Promise.all(h.map((function(n){return(0,y.v)(c+n+".gz")})))];case 5:return p.sent(),window["".concat(a,"Loader")](),(f=window["".concat(a,"Integration")]).Integration&&(f({user:function(){return t.user()},addIntegration:function(){}}),f=f.Integration),(v=new f(o)).analytics=t,[2,v]}}))}))}function P(n,t){return(0,i.mG)(this,void 0,Promise,(function(){var e,r=this;return(0,i.Jh)(this,(function(a){switch(a.label){case 0:return e=[],(0,o.s)()?[2,t]:[4,(0,h.x)((function(){return t.length>0&&(0,o.G)()}),(function(){return(0,i.mG)(r,void 0,void 0,(function(){var r,o;return(0,i.Jh)(this,(function(i){switch(i.label){case 0:return(r=t.pop())?[4,(0,u.a)(r,n)]:[2];case 1:return o=i.sent(),o instanceof s._||e.push(r),[2]}}))}))}))];case 1:return a.sent(),e.map((function(n){return t.pushWithBackoff(n)})),[2,t]}}))}))}var k=function(){function n(n,t,e,r){void 0===e&&(e={}),this.options={},this.type="destination",this.middleware=[],this._ready=!1,this._initialized=!1,this.flushing=!1,this.name=n,this.version=t,this.settings=(0,i.pi)({},e),this.settings.type&&"browser"===this.settings.type&&delete this.settings.type,this.options=r,this.buffer=r.disableClientPersistence?new f.Z(4,[]):new v.$(4,"dest-".concat(n)),this.scheduleFlush()}return n.prototype.isLoaded=function(){return this._ready},n.prototype.ready=function(){var n;return null!==(n=this.onReady)&&void 0!==n?n:Promise.resolve()},n.prototype.load=function(n,t){return(0,i.mG)(this,void 0,Promise,(function(){var e,r=this;return(0,i.Jh)(this,(function(i){switch(i.label){case 0:return this._ready||void 0!==this.onReady?[2]:(e=this,[4,_(n,t,this.name,this.version,this.settings,this.options.obfuscate)]);case 1:e.integration=i.sent(),this.onReady=new Promise((function(n){r.integration.once("ready",(function(){r._ready=!0,n(!0)}))})),this.onInitialize=new Promise((function(n){r.integration.on("initialize",(function(){r._initialized=!0,n(!0)}))}));try{n.stats.increment("analytics_js.integration.invoke",1,["method:initialize","integration_name:".concat(this.name)]),this.integration.initialize()}catch(t){throw n.stats.increment("analytics_js.integration.invoke.error",1,["method:initialize","integration_name:".concat(this.name)]),t}return[2]}}))}))},n.prototype.unload=function(n,t){return function(n,t,e){return(0,i.mG)(this,void 0,Promise,(function(){var r,o,s,a;return(0,i.Jh)(this,(function(i){return r=(0,m.Kg)(),o=w(n),s=b(n,e),a="".concat(r,"/integrations/").concat(null!=s?s:o,"/").concat(t,"/").concat(null!=s?s:o,".dynamic.js.gz"),[2,(0,y.t)(a)]}))}))}(this.name,this.version,this.options.obfuscate)},n.prototype.addMiddleware=function(){for(var n,t=[],e=0;e0&&this.scheduleFlush(),[2]}}))}))}),5e3*Math.random())},n}();function G(n,t,e){var i,r;if(void 0===t&&(t={}),void 0===e&&(e={}),(0,a.s)())return[];n.plan&&((e=null!=e?e:{}).plan=n.plan);var o,s=null!==(r=null===(i=n.middlewareSettings)||void 0===i?void 0:i.routingRules)&&void 0!==r?r:[],u=(o=s,function(n){var t=n.payload,e=n.integration,i=n.next;new g.Store(o).getRulesByDestinationName(e).forEach((function(n){for(var e=n.matchers,r=n.transformers,o=0;o0&&v.addMiddleware(u),v}}}})).filter((function(n){return void 0!==n}))}},6338:function(n,t,e){"use strict";e.r(t),e.d(t,{applyDestinationMiddleware:function(){return a},sourceMiddlewarePlugin:function(){return u}});var i=e(5163),r=e(7547),o=e(5346),s=e(9950);function a(n,t,e){return(0,i.mG)(this,void 0,Promise,(function(){function r(t,e){return(0,i.mG)(this,void 0,Promise,(function(){var r,a,u;return(0,i.Jh)(this,(function(c){switch(c.label){case 0:return r=!1,a=null,[4,(0,o.O)(e({payload:(0,s.D)(t,{clone:!0,traverse:!1}),integration:n,next:function(n){r=!0,null===n&&(a=null),n&&(a=n.obj)}}))];case 1:return c.sent(),r||null===a||((a=a).integrations=(0,i.pi)((0,i.pi)({},t.integrations),((u={})[n]=!1,u))),[2,a]}}))}))}var a,u,c,l;return(0,i.Jh)(this,(function(n){switch(n.label){case 0:a=0,u=e,n.label=1;case 1:return a