UNPKG

@codegouvfr/react-dsfr

Version:

French State Design System React integration library

2 lines 99 kB
/*! DSFR v1.10.0 | SPDX-License-Identifier: MIT | License-Filename: LICENSE.md | restricted use (see terms and conditions) */ !function(){"use strict";var t=window.dsfr,e="a4e35ba2a938ba9d007689dbf3f46acbb9807869",n={MANUAL:"manual",LOAD:"load",FULL:"full",HASH:"hash"},i="_EA_",r=i+"disabled",o=i+"toggle",s=function(){this._configure()},a={isDisabled:{configurable:!0}};s.prototype._configure=function(){var t=this;window[r]=function(){return t.isDisabled},window[o]=this.toggle.bind(this)},a.isDisabled.get=function(){return localStorage.getItem(i)},s.prototype.toggle=function(){this.isDisabled?this.enable():this.disable()},s.prototype.enable=function(){localStorage.getItem(i)&&localStorage.removeItem(i)},s.prototype.disable=function(){localStorage.setItem(i,"1")},Object.defineProperties(s.prototype,a);var c=new s,l="EA_push",u=function(t){var e=this;this._domain=t,this._isLoaded=!1,this._promise=new Promise((function(t,n){e._resolve=t,e._reject=n}))},p={id:{configurable:!0},store:{configurable:!0}};p.id.get=function(){return this._id},p.store.get=function(){return this._store},u.prototype.configure=function(){return this.init(),this._promise},u.prototype.init=function(){for(var e=this,n=5381,i=this._domain.length-1;i>0;i--)n=33*n^this._domain.charCodeAt(i);n>>>=0,this._id="_EA_"+n,this._store=[],this._store.eah=this._domain,window[this._id]=this._store,window[l]||(window[l]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return e.store.push(t)}),c.isDisabled?(t.inspector.warn("User opted out, eulerian is disabled"),this._reject("User opted out, eulerian is disabled")):this.load()},u.prototype.load=function(){var t=new Date/1e7|0,e=t%26,n=String.fromCharCode(97+e,122-e,65+e)+t%1e3;this._script=document.createElement("script"),this._script.ea=this.id,this._script.async=!0,this._script.addEventListener("load",this.loaded.bind(this)),this._script.addEventListener("error",this.error.bind(this)),this._script.src="//"+this._domain+"/"+n+".js?2";var i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(this._script,i)},u.prototype.error=function(){t.inspector.error("unable to load Eulerian script file. the domain declared in your configuration must match the domain provided by the Eulerian interface (tag creation)"),this._reject("eulerian script loading error")},u.prototype.loaded=function(){this._isLoaded||(this._isLoaded=!0,this._resolve())},Object.defineProperties(u.prototype,p);var h=-1,f=0,g=1,d=2,_=3,b=function(t){var e=this;this._config=t,this._state=h,this._promise=new Promise((function(t,n){e._resolve=t,e._reject=n}))};b.prototype.configure=function(){if(this._state>=g)return this._promise;this._state===h&&(t.inspector.info("analytics configures tarteaucitron"),this._state=f);var e=window.tarteaucitron;if(e&&e.services){this._state=g;var n={key:"eulerian",type:"analytic",name:"Eulerian Analytics",needConsent:!0,cookies:["etuix"],uri:"https://eulerian.com/vie-privee",js:this.init.bind(this),fallback:function(){e.services.eulerian.js()}};return e.services.eulerian=n,e.job||(e.job=[]),e.job.push("eulerian"),this._promise}window.requestAnimationFrame(this.configure.bind(this))},b.prototype.init=function(){if(!(this._state>=d)){this._state=d,window.__eaGenericCmpApi=this.integrate.bind(this);var t=this.update.bind(this);window.addEventListener("tac.close_alert",t),window.addEventListener("tac.close_panel",t)}},b.prototype.integrate=function(e){this._state>=_||(this._state=_,this._cmpApi=e,t.inspector.info("analytics has integrated tarteaucitron"),this._resolve(),this.update())},b.prototype.update=function(){this._state<_||this._cmpApi("tac",window.tarteaucitron,1)};var y=function(t){if(this._config=t,t&&"tarteaucitron"===t.id)this.integrateTarteAuCitron()};y.prototype.integrateTarteAuCitron=function(){return this._tac=new b(this._config),this._tac.configure()},y.prototype.optin=function(){};var m=function(e,n){"function"==typeof window.EA_push?(t.inspector.info("analytics",e,n),window.EA_push(e,n)):t.inspector.warn("Analytics datalayer not sent, Eulerian API isn't yet avalaible")},v={COLLECTOR:"collector",ACTION:"action",ACTION_PARAMETER:"actionparam"},O={IN:"in",OUT:"out",NONE:"none"},C={"0x0022":""","0x0024":"$","0x0026":"&","0x0027":"'","0x002a":"*","0x002c":",","0x003c":"<","0x003e":">","0x003f":"?","0x005c":"\","0x005e":"^","0x0060":"`","0x007c":"|","0x007e":"~"},N=function(t){return t?t=(t=(t=[].concat(t).map((function(t){return C[function(t){var e=t.charCodeAt(0).toString(16);return"0x0000".slice(0,-e.length)+e}(t)]||t})).join("")).replace(/\s+/g," ").replace(/\s/g,"_")).toLowerCase():t},T=function(e,n,i){switch(void 0===i&&(i=!0),!0){case"number"==typeof e:return""+e;case"string"==typeof e:return e;case void 0===e&&i:case null===e&&i:return""}return t.inspector.warn("unexpected value '"+e+"' set at analytics."+n+". Expecting a String"),null},E=function(e,n,i){switch(void 0===i&&(i=!0),!0){case!isNaN(e):return e;case"string"==typeof e&&!isNaN(Number(e)):return Number(e);case void 0===e&&i:case null===e&&i:return-1}return t.inspector.warn("unexpected value '"+e+"' set at analytics."+n+". Expecting a Number"),null},A=function(e,n){switch(!0){case"boolean"==typeof e:return e;case"string"==typeof e&&"true"===e.toLowerCase():case"1"===e:case 1===e:return!0;case"string"==typeof e&&"false"===e.toLowerCase():case"0"===e:case 0===e:return!1;case void 0===e:case null===e:return e}return t.inspector.warn("unexpected value '"+e+"' set at analytics."+n+". Expecting a Boolean"),null},L=function(e,n,i){switch(void 0===i&&(i=!0),!0){case"string"==typeof e&&/^[A-Za-z]{2}$|^[A-Za-z]{2}[-_]/.test(e):return e.split(/[-_]/)[0].toLowerCase();case void 0===e&&i:case null===e&&i:return""}return t.inspector.warn("unexpected value '"+e+"' set at analytics."+n+". Expecting language as a String following ISO 639-1 format"),null},j=function(e,n,i){switch(void 0===i&&(i=!0),!0){case"string"==typeof e:return/^FR-[A-Z0-9]{2,3}$/.test(e)||t.inspector.warn("value '"+e+"' set at analytics."+n+" with wrong format. Geographic location should be a String following ISO 3166-2:FR format"),e;case void 0===e&&i:case null===e&&i:return""}return t.inspector.warn("unexpected value '"+e+"' set at analytics."+n+". Expecting geographic location as a String following ISO 3166-2:FR format"),null},I=function(t){return t.toISOString().split("T")[0]},P={id:"unstarted",value:-1},S={id:"started",value:1},w={id:"ended",value:2},k={id:"singular",value:3},x=function(t){return Object.entries(t).map((function(t){var e=t[0],n=t[1];return["actionpname",N(e),"actionpvalue",N(n)]})).flat()},D=function(t){this._isMuted=!1,this._name=t,this._status=P,this._labels=[],this._parameters={}},R={isMuted:{configurable:!0},isSingular:{configurable:!0},status:{configurable:!0},name:{configurable:!0},labels:{configurable:!0},reference:{configurable:!0},parameters:{configurable:!0},_base:{configurable:!0}};R.isMuted.get=function(){return this._isMuted},R.isMuted.set=function(t){this._isMuted=t},R.isSingular.get=function(){return this._status===k},R.status.get=function(){return this._status},R.name.get=function(){return this._name},R.labels.get=function(){return this._labels},R.reference.get=function(){return this._reference},R.parameters.get=function(){return this._parameters},D.prototype.singularize=function(){this._status=k},D.prototype.rewind=function(){switch(this._status){case S:case w:this._status=P}},D.prototype.addParameter=function(t,e){this._parameters[t]=e},D.prototype.removeParameter=function(t){delete this._parameters[t]},R.reference.set=function(t){var e=T(t,"action "+this._name);null!==e&&(this._reference=e)},R._base.get=function(){return["actionname",this._name]},D.prototype._getLayer=function(t,e){if(void 0===e&&(e={}),this._isMuted)return[];var n=this._base;switch(t){case O.IN:case O.OUT:n.push("actionmode",t)}var i=this._labels.slice(0,5);return i.length=5,i.some((function(t){return t}))&&n.push("actionlabel",i.map((function(t){return"string"==typeof t?N(t):""})).join(",")),this._reference&&n.push("actionref",this._reference),n.push.apply(n,x(Object.assign(this._parameters,e||{}))),n},D.prototype.start=function(e){var n;switch(this._status){case P:n=O.IN,this._status=S;break;case k:n=O.NONE;break;default:return t.inspector.error("unexpected start on action "+this._name+" with status "+this._status.id),[]}return this._getLayer(n,e)},D.prototype.end=function(t){var e;switch(this._status){case S:e=O.OUT,this._status=w;break;case P:case w:e=O.NONE,this._status=w;break;case k:e=O.NONE}return this._getLayer(e,t)},D.prototype.resume=function(e){if(this._isMuted)return[];if(this._status.value>=w.value)return t.inspector.error("unexpected resuming on action "+this._name+" with status "+this._status.id),[];var n=this._base;return e&&n.push.apply(n,x(e)),n},Object.defineProperties(D.prototype,R);var B=function(){this._actions=[],this._isRatingEnabled=!1},M={isRatingEnabled:{configurable:!0}};B.prototype.configure=function(t){this._isRatingEnabled=!0===t.enableRating},M.isRatingEnabled.get=function(){return this._isRatingEnabled},B.prototype.rewind=function(){this._actions.forEach((function(t){return t.rewind()}))},B.prototype.getAction=function(t){var e=this._actions.filter((function(e){return e.name===t}))[0];return e||(e=new D(t),this._actions.push(e)),e},B.prototype.hasAction=function(t){return this._actions.some((function(e){return e.name===t}))},B.prototype.remove=function(t){var e=this._actions.indexOf(t);return-1!==e&&(this._actions.splice(e,1),!0)},Object.defineProperties(B.prototype,M),B.ActionMode=O;var F=new B;B.instance=F;var U=function(){this._renderables=[],this._rendering=this.render.bind(this),requestAnimationFrame(this._rendering)};U.prototype.add=function(t){-1===this._renderables.indexOf(t)&&this._renderables.push(t)},U.prototype.remove=function(t){var e=this._renderables.indexOf(t);e>-1&&this._renderables.splice(e,1)},U.prototype.render=function(){this._renderables.forEach((function(t){return t.render()})),requestAnimationFrame(this._rendering)};var q=new U,H=function(){this._startingActions=[],this._endingActions=[],this._handlingVisibilityChange=this._handleVisibilityChange.bind(this),this._handlingEnd=this._handleEnd.bind(this),this._isStarted=!1,this._isListening=!1,this.reset()};H.prototype.setCollector=function(t){this._collector=t},H.prototype.reset=function(t){void 0===t&&(t=!1),this._type=v.ACTION,t||(this._startingActions.length=0),this._endingActions.length=0,this._count=0,this._delay=-1,this._isRequested=!1,this._unlisten()},H.prototype.start=function(){this._isStarted||(this._isStarted=!0,q.add(this))},H.prototype.collect=function(){this._type=v.COLLECTOR,this._request()},H.prototype.appendStartingAction=function(e,n){if(e&&!this._startingActions.some((function(t){return t.test(e)}))){var i=new K(e,n);this._startingActions.push(i),this._request()}else t.inspector.log("appendStartingAction exists or null",e)},H.prototype.appendEndingAction=function(e,n){if(e&&!this._endingActions.some((function(t){return t.test(e)}))){var i=new K(e,n);this._endingActions.push(i),this._request()}else t.inspector.log("appendEndingAction exists or null",e)},H.prototype._request=function(){this._listen(),this._isRequested=!0,this._delay=4},H.prototype._listen=function(){this._isListening||(this._isListening=!0,document.addEventListener("visibilitychange",this._handlingVisibilityChange),document.addEventListener("unload",this._handlingEnd),document.addEventListener("beforeunload",this._handlingEnd),document.addEventListener("pagehide",this._handlingEnd))},H.prototype._unlisten=function(){this._isListening&&(this._isListening=!1,document.removeEventListener("visibilitychange",this._handlingVisibilityChange),document.removeEventListener("unload",this._handlingEnd),document.removeEventListener("beforeunload",this._handlingEnd),document.removeEventListener("pagehide",this._handlingEnd))},H.prototype._handleVisibilityChange=function(t){"hidden"===document.visibilityState&&this.send()},H.prototype._handleEnd=function(){this.send()},H.prototype.render=function(){if(!(this._delay<=-1))switch(this._delay--,this._count++,!0){case this._count>20:case 0===this._delay:this.send()}},H.prototype.send=function(t){if(void 0===t&&(t=!1),this._isRequested){var e=[];t||e.push.apply(e,this._startingActions.map((function(t){return t.start()})).filter((function(t){return t.length>0}))),e.push.apply(e,this._endingActions.map((function(t){return t.end()})).filter((function(t){return t.length>0})));for(var n=e.length/80+1|0,i=[],r=0;r<n;r++){var o=e.slice(80*r,80*(r+1));i.push(o.flat())}if(this._type===v.COLLECTOR&&this._collector.isCollecting){var s=this._collector.layer;if(i.length>0){var a=i.splice(0,1)[0];a.length>0&&s.push.apply(s,a)}s.flat(),s.length>0&&m(v.COLLECTOR,s)}if(i.length>0)for(var c=0;c<i.length;c++){var l=i[c];l.length>0&&m(v.ACTION,l)}this.reset(t)}};var K=function(t,e){this._action=t,this._data=e};K.prototype.test=function(t){return this._action===t},K.prototype.start=function(){return this._action.start(this._data)},K.prototype.end=function(){return this._action.end(this._data)};var V=new H,G=function(){},W={debugger:{configurable:!0},isActive:{configurable:!0}};W.debugger.get=function(){return window._oEa},W.isActive.get=function(){return!!this.debugger&&"1"===this.debugger._dbg},W.isActive.set=function(t){this.debugger&&this.isActive!==t&&this.debugger.debug(t?1:0)},Object.defineProperties(G.prototype,W);var Y=new G,z={CONNECTED:{id:"connected",value:"connecté",isConnected:!0,isDefault:!0},ANONYMOUS:{id:"anonymous",value:"anonyme",isConnected:!1,isDefault:!0},GUEST:{id:"guest",value:"invité",isConnected:!1}},Z={INDIVIDUAL:{id:"individual",value:"part"},PROFESSIONNAL:{id:"professionnal",value:"pro"}},X=function(t){this._config=t||{}},$={uid:{configurable:!0},email:{configurable:!0},isNew:{configurable:!0},status:{configurable:!0},profile:{configurable:!0},language:{configurable:!0},type:{configurable:!0},layer:{configurable:!0}};X.prototype.reset=function(t){void 0===t&&(t=!1),this._isConnected=!1,this.status=z.ANONYMOUS,!t&&this._config.connect?this.connect(this._config.connect.uid,this._config.connect.email,this._config.connect.isNew):(this._uid=void 0,this._email=void 0,this._isNew=!1),this.profile=t?void 0:this._config.profile,this.language=t?void 0:this._config.language,this.type=t?void 0:this._config.type},X.prototype.connect=function(e,n,i){void 0===i&&(i=!1),this._uid=T(e,"user.uid"),/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]{2,}@[a-zA-Z0-9-]{2,}\.[a-zA-Z]{2,}$/.test(n)&&t.inspector.warn("Please check analytics.user.email is properly encrypted "),this._email=T(n,"user.email"),this._isNew=A(i),this._isConnected=!0,this.status=z.CONNECTED},$.uid.get=function(){return this._uid},$.email.get=function(){return this._email},$.isNew.get=function(){return this._isNew},$.status.set=function(t){var e=this,n=Object.values(z).filter((function(t){return t.isConnected===e._isConnected}));this._status=n.filter((function(e){return e.id===t||e.value===t}))[0]||n.filter((function(t){return t.isDefault}))[0]},$.status.get=function(){return this._status.id},$.profile.set=function(t){var e=T(t,"user.profile");null!==e&&(this._profile=e)},$.profile.get=function(){return this._profile.id},$.language.set=function(t){var e=L(t,"user.language");null!==e&&(this._language=e)},$.language.get=function(){return this._language||navigator.language},$.type.set=function(t){this._type=Object.values(Z).filter((function(e){return e.id===t||e.value===t}))[0]},$.type.get=function(){return this._type.id},$.layer.get=function(){var t=[];return this.uid&&t.push("uid",N(this.uid)),this.email&&t.push("email",N(this.email)),this.isNew&&t.push("newcustomer","1"),this.language&&t.push("user_language",this.language),t.push("user_login_status",this._status.value),this._profile&&t.push("profile",this._profile),this._type&&t.push("user_type",this._type.value),t},Object.defineProperties(X.prototype,$),X.Status=z,X.Type=Z;var Q={DEVELOPMENT:{id:"development",value:"dev"},STAGE:{id:"stage",value:"stage"},PRODUCTION:{id:"production",value:"prod"}},J=function(t){this._config=t||{}},tt={environment:{configurable:!0},entity:{configurable:!0},language:{configurable:!0},target:{configurable:!0},type:{configurable:!0},region:{configurable:!0},department:{configurable:!0},api:{configurable:!0},layer:{configurable:!0}};J.prototype.reset=function(e){void 0===e&&(e=!1),this.environment=e?Q.DEVELOPMENT.id:this._config.environment,this.entity=e?void 0:this._config.entity,this.language=e?void 0:this._config.language,this.target=e?void 0:this._config.target,this.type=e?void 0:this._config.type,this.region=e?void 0:this._config.region,this.department=e?void 0:this._config.department,this._api=t.version},tt.environment.set=function(t){switch(t){case Q.PRODUCTION.id:case Q.PRODUCTION.value:this._environment=Q.PRODUCTION;break;case Q.STAGE.id:case Q.STAGE.value:this._environment=Q.STAGE;break;case Q.DEVELOPMENT.id:case Q.DEVELOPMENT.value:default:this._environment=Q.DEVELOPMENT}},tt.environment.get=function(){return this._environment?this._environment.id:Q.DEVELOPMENT.id},tt.entity.set=function(t){var e=T(t,"site.entity");null!==e&&(this._entity=e)},tt.entity.get=function(){return this._entity},tt.language.set=function(t){var e=L(t,"site.language");null!==e&&(this._language=e)},tt.language.get=function(){return this._language||document.documentElement.lang},tt.target.set=function(t){var e=T(t,"site.target");null!==e&&(this._target=e)},tt.target.get=function(){return this._target},tt.type.set=function(t){var e=T(t,"site.type");null!==e&&(this._type=e)},tt.type.get=function(){return this._type},tt.region.set=function(t){var e=j(t,"site.region");null!==e&&(this._region=e)},tt.region.get=function(){return this._region},tt.department.set=function(t){var e=j(t,"site.department");null!==e&&(this._department=e)},tt.department.get=function(){return this._department},tt.api.get=function(){return this._api},tt.layer.get=function(){var e=[];return e.push("site_environment",this._environment.value),this.entity?e.push("site_entity",N(this.entity)):t.inspector.warn("entity is required in analytics.site"),this.language&&e.push("site_language",this.language),this.target&&e.push("site_target",N(this.target)),this.type&&e.push("site_type",N(this.type)),this.region&&e.push("site_region",this.region),this.department&&e.push("site_department",this.department),this.api&&e.push("api_version",this.api),e},Object.defineProperties(J.prototype,tt),J.Environment=Q;var et="collectable",nt="collecting",it="collected",rt=function(t){this._config=t||{},this._state=et},ot={isCollecting:{configurable:!0},path:{configurable:!0},referrer:{configurable:!0},title:{configurable:!0},id:{configurable:!0},author:{configurable:!0},date:{configurable:!0},tags:{configurable:!0},name:{configurable:!0},labels:{configurable:!0},categories:{configurable:!0},isError:{configurable:!0},template:{configurable:!0},segment:{configurable:!0},group:{configurable:!0},subtemplate:{configurable:!0},theme:{configurable:!0},subtheme:{configurable:!0},related:{configurable:!0},depth:{configurable:!0},current:{configurable:!0},total:{configurable:!0},filters:{configurable:!0},layer:{configurable:!0}};rt.prototype.reset=function(t){void 0===t&&(t=!1),this.path=t?"":this._config.path,this.referrer=t?"":this._config.referrer,this.title=t?"":this._config.title,this.name=t?"":this._config.name,this.id=t?"":this._config.id,this.author=t?"":this._config.author,this.date=t?"":this._config.date,this._labels=t||!this._config.labels?["","","","",""]:this._config.labels,this._labels.length=5,this._tags=t||!this._config.tags?[]:this._config.tags,this._categories=t||!this._config.categories?["","",""]:this._config.categories,this.isError=!t&&this._config.isError,this.template=t?"":this._config.template,this.group=t?"":this._config.group,this.segment=t?"":this._config.segment,this.subtemplate=t?"":this._config.subtemplate,this.theme=t?"":this._config.theme,this.subtheme=t?"":this._config.subtheme,this.related=t?"":this._config.related,this.depth=t||isNaN(this._config.depth)?0:this._config.depth,this.current=t||isNaN(this._config.current)?-1:this._config.current,this.total=t||isNaN(this._config.total)?-1:this._config.total,this._filters=t||!this._config.filters?[]:this._config.filters},rt.prototype.collecting=function(){return this._state!==et?(t.inspector.warn("current path '"+this.path+"' was already collected"),!1):(this._state=nt,!0)},ot.isCollecting.get=function(){return this._state===nt},ot.path.set=function(t){var e=T(t,"page.path");null!==e&&(this._path=e,this._state=et)},ot.path.get=function(){return this._path||""+document.location.pathname+document.location.search},ot.referrer.set=function(t){var e=T(t,"page.referrer");null!==e&&(this._referrer=e)},ot.referrer.get=function(){return this._referrer},ot.title.set=function(t){var e=T(t,"page.title");null!==e&&(this._title=e)},ot.title.get=function(){return this._title||document.title},ot.id.set=function(t){var e=T(t,"page.id");null!==e&&(this._id=e)},ot.id.get=function(){return this._id},ot.author.set=function(t){var e=T(t,"page.author");null!==e&&(this._author=e)},ot.author.get=function(){return this._author},ot.date.set=function(e){var n=function(e,n,i){switch(void 0===i&&(i=!0),!0){case e instanceof Date:return I(e);case"string"==typeof e:var r=new Date(e);if("Invalid Date"!==r.toString())return I(r);break;case void 0===e&&i:case null===e&&i:return null}return t.inspector.warn("unexpected value '"+e+"' set at analytics."+n+". Expecting a Date"),null}(e,"page.date");null!==n&&(this._date=n)},ot.date.get=function(){return this._date},ot.tags.get=function(){return this._tags},ot.name.set=function(t){var e=T(t,"page.name");null!==e&&(this._name=e)},ot.name.get=function(){return this._name||this.title},ot.labels.get=function(){return this._labels},ot.categories.get=function(){return this._categories},ot.isError.set=function(t){var e=A(t,"page.isError");null!==e&&(this._isError=e)},ot.isError.get=function(){return this._isError},ot.template.set=function(t){var e=T(t,"page.template");null!==e&&(this._template=e)},ot.template.get=function(){return this._template||"autres"},ot.segment.set=function(t){var e=T(t,"page.segment");null!==e&&(this._segment=e)},ot.segment.get=function(){return this._segment||this.template},ot.group.set=function(t){var e=T(t,"page.group");null!==e&&(this._group=e)},ot.group.get=function(){return this._group||this.template},ot.subtemplate.set=function(t){var e=T(t,"page.subtemplate");null!==e&&(this._subtemplate=e)},ot.subtemplate.get=function(){return this._subtemplate},ot.theme.set=function(t){var e=T(t,"page.theme");null!==e&&(this._theme=e)},ot.theme.get=function(){return this._theme},ot.subtheme.set=function(t){var e=T(t,"page.subtheme");null!==e&&(this._subtheme=e)},ot.subtheme.get=function(){return this._subtheme},ot.related.set=function(t){var e=T(t,"page.related");null!==e&&(this._related=e)},ot.related.get=function(){return this._related},ot.depth.set=function(t){var e=E(t,"page.depth");null!==e&&(this._depth=e)},ot.depth.get=function(){return this._depth},ot.current.set=function(t){var e=E(t,"page.current");null!==e&&(this._current=e)},ot.current.get=function(){return this._current},ot.total.set=function(t){var e=E(t,"page.total");null!==e&&(this._total=e)},ot.total.get=function(){return this._total},ot.filters.get=function(){return this._filters},ot.layer.get=function(){this._state=it;var t=[];this.path&&t.push("path",N(this.path)),this.referrer&&t.push("referrer",N(this.referrer)),this.title&&t.push("page_title",N(this.title)),this.name&&t.push("page_name",N(this.name)),this.id&&t.push("page_id",N(this.id)),this.author&&t.push("page_author",N(this.author)),this.date&&t.push("page_date",N(this.date));var e=this._labels.slice(0,5);e.length=5,e.some((function(t){return t}))&&t.push("pagelabel",e.map((function(t){return"string"==typeof t?N(t):""})).join(","));var n=this._tags;if(n.some((function(t){return t}))&&t.push("pagetag",n.map((function(t){return"string"==typeof t?N(t):""})).join(",")),this._categories.forEach((function(e,n){e&&t.push("page_category"+(n+1),e)})),this._isError&&t.push("error","1"),t.push("page_template",N(this.template)),t.push("pagegroup",N(this.group)),t.push("site-segment",N(this.segment)),this.subtemplate&&t.push("page_subtemplate",N(this.subtemplate)),this.theme&&t.push("page_theme",N(this.theme)),this.subtheme&&t.push("page_subtheme",N(this.subtheme)),this.related&&t.push("page_related",N(this.related)),isNaN(this.depth)||t.push("page_depth",this.depth),!isNaN(this.current)&&this.current>-1){var i=""+this.current;!isNaN(this.total)&&this.total>-1&&(i+="/"+this.total),t.push("page_pagination",i)}if(this.filters.length&&this.filters.some((function(t){return t}))){var r=this.filters.map((function(t){return"string"==typeof t?N(t):""}));t.push("page_filters",r.join(","))}return t},Object.defineProperties(rt.prototype,ot);var st={STANDARD:{id:"standard",value:"standard",isDefault:!0},AUTOCOMPLETE:{id:"autocomplete",value:"autocompletion"}},at=function(t){this._config=t||{}},ct={engine:{configurable:!0},results:{configurable:!0},terms:{configurable:!0},category:{configurable:!0},theme:{configurable:!0},type:{configurable:!0},method:{configurable:!0},layer:{configurable:!0}};at.prototype.reset=function(t){void 0===t&&(t=!1),this.engine=t?void 0:this._config.engine,this.results=t||isNaN(this._config.results)?-1:this._config.results,this.terms=t?void 0:this._config.terms,this.category=t?void 0:this._config.category,this.theme=t?void 0:this._config.theme,this.type=t?void 0:this._config.type,this.method=t?void 0:this._config.method},ct.engine.set=function(t){var e=T(t,"search.engine");null!==e&&(this._engine=e)},ct.engine.get=function(){return this._engine},ct.results.set=function(t){var e=E(t,"search.results");null!==e&&(this._results=e)},ct.results.get=function(){return this._results},ct.terms.set=function(t){var e=T(t,"search.terms");null!==e&&(this._terms=e)},ct.terms.get=function(){return this._terms},ct.category.set=function(t){var e=T(t,"search.category");null!==e&&(this._category=e)},ct.category.get=function(){return this._category},ct.theme.set=function(t){var e=T(t,"search.theme");null!==e&&(this._theme=e)},ct.theme.get=function(){return this._theme},ct.type.set=function(t){var e=T(t,"search.type");null!==e&&(this._type=e),this._type=t},ct.type.get=function(){return this._type},ct.method.set=function(t){var e=Object.values(st);this._method=e.filter((function(e){return e.id===t||e.value===t}))[0]||e.filter((function(t){return t.isDefault}))[0]},ct.method.get=function(){return this._method},ct.layer.get=function(){var t=[];return this.engine&&t.push("isearchengine",N(this.engine)),this.results>-1&&t.push("isearchresults",this.results),this.terms&&t.push("isearchkey","search_terms","isearchdata",N(this.terms)),this.category&&t.push("isearchkey","search_category","isearchdata",N(this.category)),this.theme&&t.push("isearchkey","search_theme","isearchdata",N(this.theme)),this.type&&t.push("isearchkey","search_type","isearchdata",N(this.type)),this._method&&t.length&&t.push("isearchkey","search_method","isearchdata",this._method.value),t},Object.defineProperties(at.prototype,ct),at.Method=st;var lt=function(t){this._config=t||{}},ut={id:{configurable:!0},type:{configurable:!0},name:{configurable:!0},step:{configurable:!0},current:{configurable:!0},total:{configurable:!0},objective:{configurable:!0},error:{configurable:!0},layer:{configurable:!0}};lt.prototype.reset=function(t){void 0===t&&(t=!1),this.id=t?void 0:this._config.id,this.type=t?void 0:this._config.type,this.name=t?void 0:this._config.name,this.step=t?void 0:this._config.step,this.current=t||isNaN(this._config.current)?-1:this._config.current,this.total=t||isNaN(this._config.total)?-1:this._config.total,this.objective=t?void 0:this._config.objective,this.error=t?void 0:this._config.error},ut.id.set=function(t){var e=T(t,"funnel.id");null!==e&&(this._id=e)},ut.id.get=function(){return this._id},ut.type.set=function(t){var e=T(t,"funnel.type");null!==e&&(this._type=e)},ut.type.get=function(){return this._type},ut.name.set=function(t){var e=T(t,"funnel.name");null!==e&&(this._name=e)},ut.name.get=function(){return this._name},ut.step.set=function(t){var e=T(t,"funnel.step");null!==e&&(this._step=e)},ut.step.get=function(){return this._step},ut.current.set=function(t){var e=E(t,"funnel.current");null!==e&&(this._current=e)},ut.current.get=function(){return this._current},ut.total.set=function(t){var e=E(t,"funnel.total");null!==e&&(this._total=e)},ut.total.get=function(){return this._total},ut.objective.set=function(t){var e=T(t,"funnel.objective");null!==e&&(this._objective=e),this._objective=t},ut.objective.get=function(){return this._objective},ut.error.set=function(t){var e=T(t,"funnel.error");null!==e&&(this._error=e),this._error=t},ut.error.get=function(){return this._error},ut.layer.get=function(){var t=[];return this.id&&t.push("funnel_id",N(this.id)),this.type&&t.push("funnel_type",N(this.type)),this.name&&t.push("funnel_name",N(this.name)),this.step&&t.push("funnel_step_name",N(this.step)),!isNaN(this.current)&&this.current>-1&&t.push("funnel_step_number",this.current),!isNaN(this.total)&&this.total>-1&&t.push("funnel_step_max",this.total),this.objective&&t.push("funnel_objective",N(this.objective)),this.error&&t.push("funnel_error",N(this.error)),t},Object.defineProperties(lt.prototype,ut);var pt=function(t,e){void 0===e&&(e=!1),this._onRouteChange=t,this._isListeningHash=e,this._update(),q.add(this)},ht={path:{configurable:!0},hasTitle:{configurable:!0},title:{configurable:!0},referrer:{configurable:!0}};pt.prototype._update=function(){this._pathname=document.location.pathname,this._search=document.location.search,this._hash=document.location.hash,this._path=""+this._pathname+this._search,this._isListeningHash&&(this._path+=this._hash),this._hasTitle=this._title===document.title,this._title=document.title},pt.prototype.render=function(){this._pathname===document.location.pathname&&this._search===document.location.search||this.change(),this._isListeningHash&&this._hash!==document.location.hash&&this.change()},pt.prototype.change=function(){this._referrer=this._path,this._update(),this._onRouteChange()},ht.path.get=function(){return this._path},ht.hasTitle.get=function(){return this._hasTitle},ht.title.get=function(){return this._title},ht.referrer.get=function(){return this._referrer},Object.defineProperties(pt.prototype,ht);var ft={COLLECT:t.internals.ns.event("collect")},gt={REWIND:t.internals.ns.emission("analytics","rewind")},dt=function(e){switch(e.collection){case n.MANUAL:case n.LOAD:case n.FULL:case n.HASH:this._collection=e.collection;break;default:if(e.mode&&"manual"===e.mode)this._collection=e.collection;switch(!0){case"manual"===e.mode:this._collection=n.MANUAL;break;case t.mode===t.Modes.ANGULAR:case t.mode===t.Modes.REACT:case t.mode===t.Modes.VUE:this._collection=n.FULL;break;default:this._collection=n.LOAD}}this._user=new X(e.user),this._site=new J(e.site),this._page=new rt(e.page),this._search=new at(e.search),this._funnel=new lt(e.funnel),this._delay=-1,V.setCollector(this)},_t={page:{configurable:!0},user:{configurable:!0},site:{configurable:!0},search:{configurable:!0},funnel:{configurable:!0},collection:{configurable:!0},isCollecting:{configurable:!0},layer:{configurable:!0}};_t.page.get=function(){return this._page},_t.user.get=function(){return this._user},_t.site.get=function(){return this._site},_t.search.get=function(){return this._search},_t.funnel.get=function(){return this._funnel},dt.prototype.start=function(){var t=this._handleRouteChange.bind(this);switch(this._collection){case n.LOAD:this.collect();break;case n.FULL:this.collect(),this._location=new pt(t);break;case n.HASH:this.collect(),this._location=new pt(t,!0)}},dt.prototype._handleRouteChange=function(){V.send(!0),this._delay=6,q.add(this)},dt.prototype.render=function(){this._delay--,this._delay<0&&(q.remove(this),this._routeChanged())},dt.prototype._routeChanged=function(){F.rewind(),this._page.referrer=this._location.referrer,this._location.hasTitle&&(this._page.title=this._location.title),this._page.path=this._location.path;var e=new CustomEvent(ft.COLLECT);document.documentElement.dispatchEvent(e),this.collect(),t.internals&&t.internals.stage&&t.internals.stage.root&&t.internals.stage.root.descend(gt.REWIND)},dt.prototype.reset=function(t){void 0===t&&(t=!1),this._user.reset(t),this._site.reset(t),this._page.reset(t),this._search.reset(t),this._funnel.reset(t)},dt.prototype.collect=function(){this.page.collecting()&&V.collect()},_t.collection.get=function(){return this._collection},_t.isCollecting.get=function(){return this._page.isCollecting},_t.layer.get=function(){return this._user.layer.concat(this._site.layer,this._page.layer,this._search.layer,this._funnel.layer)},Object.defineProperties(dt.prototype,_t);var bt=function(){var t=this;this._isReady=!1,this._readiness=new Promise((function(e,n){t._isReady?e():(t._resolve=e,t._reject=n)})),this._configure()},yt={isReady:{configurable:!0},readiness:{configurable:!0},page:{configurable:!0},user:{configurable:!0},site:{configurable:!0},search:{configurable:!0},funnel:{configurable:!0},cmp:{configurable:!0},opt:{configurable:!0},collection:{configurable:!0},isDebugging:{configurable:!0}};bt.prototype._configure=function(){switch(!0){case void 0!==window[e]:this._config=window[e].configuration.analytics,window[e].promise.then(this._build.bind(this),(function(){}));break;case void 0!==t.internals&&void 0!==t.internals.configuration&&void 0!==t.internals.configuration.analytics&&void 0!==t.internals.configuration.analytics.domain:this._config=t.internals.configuration.analytics,this._build();break;case void 0!==t.analytics&&void 0!==t.analytics.domain:this._config=t.analytics,this._build();break;default:t.inspector.warn("analytics configuration is incorrect or missing (required : domain)")}},bt.prototype._build=function(){var t=this;this._init=new u(this._config.domain),this._init.configure().then(this._start.bind(this),(function(e){return t._reject(e)}))},yt.isReady.get=function(){return this._isReady},yt.readiness.get=function(){return this._readiness},bt.prototype._start=function(){this._isReady||(this._cmp=new y(this._config.cmp),this._collector=new dt(this._config),this._collector.reset(),F.configure(this._config),this._isReady=!0,this._resolve(),V.start(),this._collector.start())},yt.page.get=function(){return this._collector.page},yt.user.get=function(){return this._collector.user},yt.site.get=function(){return this._collector._site},yt.search.get=function(){return this._collector.search},yt.funnel.get=function(){return this._collector.funnel},yt.cmp.get=function(){return this._cmp},yt.opt.get=function(){return c},yt.collection.get=function(){return this._collector.collection},yt.isDebugging.get=function(){return Y.isActive},yt.isDebugging.set=function(t){Y.isActive=t},bt.prototype.push=function(t,e){m(t,e)},bt.prototype.reset=function(t){this._collector.reset()},bt.prototype.collect=function(){this._collector.collect()},Object.defineProperties(bt.prototype,yt);var mt=new bt;mt.Collection=n,mt.PushType=v;t.analytics=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.forEach((function(e){var n=Object.keys(e).reduce((function(t,n){return t[n]=Object.getOwnPropertyDescriptor(e,n),t}),{});Object.getOwnPropertySymbols(e).forEach((function(t){var i=Object.getOwnPropertyDescriptor(e,t);i.enumerable&&(n[t]=i)})),Object.defineProperties(t,n)})),t}(mt,{});var vt={IMPRESSION:{id:"impression",isSingular:!0,isBeginning:!0,attributed:!1,type:"impression"},CLICK:{id:"click",isBeginning:!0,attributed:!0,type:"interaction",event:"click",method:"eventListener"},INTERNAL:{id:"internal",isBeginning:!0,attributed:!0,type:"interaction",event:"click",method:"eventListener"},EXTERNAL:{id:"external",isBeginning:!0,attributed:!0,type:"interaction",event:"click",method:"eventListener"},DOWNLOAD:{id:"download",isBeginning:!0,attributed:!0,type:"interaction",event:"click",method:"eventListener"},BUTTON:{id:"button",isBeginning:!0,attributed:!0,type:"interaction",event:"click",method:"eventListener"},DOUBLE_CLICK:{id:"dblclick",isBeginning:!0,attributed:!0,type:"interaction",event:"dblclick",method:"eventListener"},OPEN:{id:"open",isSingular:!0,attributed:!1,type:"event",method:"eventListener"},COMPLETE:{id:"complete",isSingular:!0,attributed:!1,type:"event",method:"eventListener"},FOCUS:{id:"focus",isSingular:!0,attributed:!1,type:"event",method:"eventListener"},ERROR:{id:"error",isSingular:!0,attributed:!1,type:"event"},ADD:{id:"add",isSingular:!0,attributed:!1,type:"event"},REMOVE:{id:"remove",isSingular:!0,attributed:!1,type:"event"},DISPLAY:{id:"display",isSingular:!0,attributed:!1,type:"event"},CHANGE:{id:"change",isSingular:!0,attributed:!0,type:"event",event:"change",method:"change"},PROGRESS:{id:"progress",isBeginning:!0,attributed:!0,type:"event"},SHARE:{id:"share",isBeginning:!0,attributed:!1,type:"interaction"},PRESS:{id:"press",isBeginning:!0,attributed:!1,type:"interaction"},RELEASE:{id:"release",isBeginning:!0,attributed:!1,type:"interaction"},DISMISS:{id:"dismiss",isBeginning:!0,attributed:!1,type:"interaction"},UPLOAD:{id:"upload",isBeginning:!0,attributed:!1,type:"interaction"},CHECK:{id:"check",isBeginning:!0,attributed:!1,type:"interaction"},UNCHECK:{id:"uncheck",isBeginning:!0,attributed:!1,type:"interaction"},SELECT:{id:"select",isBeginning:!0,attributed:!1,type:"interaction"},SUBSCRIBE:{id:"subscribe",isBeginning:!0,attributed:!1,type:"interaction"},DISCLOSE:{id:"disclose",isBeginning:!0,attributed:!1,type:"event"},SEARCH:{id:"search",isBeginning:!0,attributed:!1,type:"event"},SHOW:{id:"show",isSingular:!0,attributed:!1,type:"event"},HIDE:{id:"hide",isSingular:!0,attributed:!1,type:"event"},AUTOPLAY:{id:"autoplay",isBeginning:!0,attributed:!1,type:"event"},PLAY:{id:"play",isBeginning:!0,attributed:!1,type:"interaction"},PAUSE:{id:"pause",isBeginning:!0,attributed:!1,type:"interaction"},END:{id:"end",isBeginning:!0,attributed:!1,type:"event"}},Ot="undefined",Ct="heading",Nt="component",Tt="content",Et=Node.DOCUMENT_POSITION_PRECEDING|Node.DOCUMENT_POSITION_CONTAINED_BY,At=function(t){this._label=t.textContent.trim(),this._level=Number(t.tagName.charAt(1))},Lt={level:{configurable:!0},label:{configurable:!0}};Lt.level.get=function(){return this._level},Lt.label.get=function(){return this._label},Object.defineProperties(At.prototype,Lt);var jt=function(t,e,n){this._type=Ot,this._node=t,this._target=e,this._level=n,this._label="",this._component="",this._isValid=!0,this.analyse()},It={type:{configurable:!0},level:{configurable:!0},label:{configurable:!0},component:{configurable:!0},node:{configurable:!0},target:{configurable:!0},isValid:{configurable:!0}};jt.prototype._parseHeadings=function(){var t=this,e=Array.from({length:this._level},(function(t,e){return"h"+(e+1)})).join(",");this._headings=Array.from(this._node.querySelectorAll(e)).filter((function(e){return e===t._node||e.parentNode===t._node||null!=e.parentNode&&e.parentNode.parentNode===t._node})).filter((function(e){return(t._target.compareDocumentPosition(e)&Et)>0})).map((function(t){return new At(t)})).reverse()},jt.prototype._getComponent=function(){if("function"!=typeof t)return!1;var e=t(this._node);if(!e)return!1;var n=Object.values(e).filter((function(t){return t.isActionee})).sort((function(t,e){return e.priority-t.priority}))[0];if(!n)return!1;this._type=Nt,this._isValid=n.validate(this._target);var i=Array.from({length:6},(function(t,e){return"h"+(e+1)})).join(","),r=Array.from(this._node.querySelectorAll(i)).map((function(t){return new At(t)})).sort((function(t,e){return t.level-e.level}))[0];r&&r.level<=this._level&&(this._level=r.level-1);var o=this._node.closest(i);if(o){var s=new At(o);s.level<=this._level&&(this._level=s.level-1)}return!isNaN(n.level)&&n.level<this._level&&(this._level=n.level),this._label=n.label,this._component=n.component,!0},jt.prototype._getHeading=function(){var t=this;if(!this._headings.length)return!1;var e=[];return this._headings.forEach((function(n){n.level<=t._level&&(n.level>1&&e.unshift(n.label),t._level=n.level-1)})),!!e.length&&(this._type=Ct,this._label=e.join(" › "),!0)},jt.prototype.analyse=function(){if(this._parseHeadings(),!this._getComponent()&&!this._getHeading()&&this._node===this._target){var t=this._node.textContent.trim();t&&(this._type=Tt,this._label=t)}},It.type.get=function(){return this._type},It.level.get=function(){return this._level},It.label.get=function(){return this._label},It.component.get=function(){return this._component},It.node.get=function(){return this._node},It.target.get=function(){return this._target},It.isValid.get=function(){return this._isValid},Object.defineProperties(jt.prototype,It);var Pt=function(t){this._node=t,this._process()},St={localComponent:{configurable:!0},globalComponent:{configurable:!0},label:{configurable:!0},title:{configurable:!0},component:{configurable:!0}};Pt.prototype._process=function(){var t=new jt(this._node,this._node,6);this._level=t.level,this._members=[t];for(var e=this._node.parentNode;document.documentElement.contains(e)&&e!==document.documentElement&&this._level>0;){var n=new jt(e,this._node,this._level);switch(!0){case n.type===Ot:case!n.isValid:case n.label===this._members[0].label&&n.type===Ct&&this._members[0].type===Nt:break;case n.label===this._members[0].label&&n.type===Nt&&this._members[0].type===Ct:this._members.splice(0,1,n);break;default:this._members.unshift(n),n.level<this._level&&(this._level=n.level)}e=e.parentNode}this._label=N(this._members[this._members.length-1].label),this._title=N(this._members.filter((function(t){return t.label})).map((function(t){return t.label})).join(" › "));var i=this._members.filter((function(t){return t.component})).map((function(t){return t.component}));this._component=N(i.join(" › ")),this._localComponent=i[i.length-1],this._globalComponent=i[0]},St.localComponent.get=function(){return this._localComponent},St.globalComponent.get=function(){return this._globalComponent},St.label.get=function(){return this._label},St.title.get=function(){return this._title},St.component.get=function(){return this._component},Object.defineProperties(Pt.prototype,St);var wt=function(t,e,n,i,r,o,s){void 0===i&&(i=""),void 0===r&&(r=null),void 0===o&&(o={}),this._node=t,this._type=e,this._id=n||this._node.id,this._isMuted=!1,this._title=r,this._category=i,this._parameters=o,this._isRatingActive=s,this._hasBegun=!1,requestAnimationFrame(this._init.bind(this))},kt={isMuted:{configurable:!0},action:{configurable:!0}};wt.prototype._init=function(){var e=this;this._hierarchy=new Pt(this._node);var n="",i="";this._id?n="_["+this._id+"]":t.inspector.warn("Analytics API requires an id to be set on tracked element. Missing on "+this._node.outerHTML),this._type&&(i="("+this._type.id+")_"),this._name=""+i+(this._title||this._hierarchy.title)+n,this._action=F.getAction(this._name,this._type.status),this._type.isSingular&&this._action.singularize(),Object.keys(this._parameters).forEach((function(t){return e._action.addParameter(t,e._parameters[t])})),this._action.isMuted=this._isMuted,this._action.labels[0]=this._type.id,this._action.labels[1]=this._hierarchy.globalComponent,this._action.labels[2]=this._hierarchy.localComponent,this._action.labels[4]=this._category,this._hierarchy.label&&this._action.addParameter("component_label",this._hierarchy.label),this._hierarchy.title&&this._action.addParameter("heading_hierarchy",this._hierarchy.title),this._hierarchy.component&&this._action.addParameter("component_hierarchy",this._hierarchy.component),this.begin()},kt.isMuted.get=function(){return this._action?this._action.isMuted:this._isMuted},kt.isMuted.set=function(t){this._isMuted=t,this._action&&(this._action.isMuted=t)},kt.action.get=function(){return this._action},wt.prototype.rewind=function(){this._hasBegun=!1,this.begin()},wt.prototype.begin=function(t){void 0===t&&(t={}),!this._hasBegun&&this._isRatingActive&&(this._hasBegun=!0,this._type.isBeginning&&V.appendStartingAction(this._action,t))},wt.prototype.act=function(t){var e=this;void 0===t&&(t={}),this._isMuted||(this._action?V.appendEndingAction(this._action,t):requestAnimationFrame((function(){return e.act(t)})))},wt.prototype.dispose=function(){F.remove(this._action)},Object.defineProperties(wt.prototype,kt),wt.isRatingEnabled=!1;var xt=function(e){function n(t,n,i,r){void 0===t&&(t=-1),void 0===n&&(n=!1),void 0===i&&(i=""),void 0===r&&(r=null),e.call(this),this._type=null,this._priority=t,this._category=i,this._title=r,this._parameters={},this._data={},this._isMuted=!1,this._isRatingActive=n}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var i={proxy:{configurable:!0},data:{configurable:!0},isMuted:{configurable:!0},priority:{configurable:!0},isInteractive:{configurable:!0},actionElement:{configurable:!0},label:{configurable:!0},value:{configurable:!0},isActionee:{configurable:!0},level:{configurable:!0},type:{configurable:!0}},r={instanceClassName:{configurable:!0}};return r.instanceClassName.get=function(){return"Actionee"},i.proxy.get=function(){var n=this,i={validate:function(t,e){return n.validate(t,e)}},r={get isActionee(){return!0},get label(){return n.label},get priority(){return n.priority},get level(){return n.level},get node(){return n.node}};return t.internals.property.completeAssign.call(this,e.prototype.proxy,i,r)},i.data.get=function(){return this._data},n.prototype._config=function(t,n){if(e.prototype._config.call(this,t,n),null!==this._type){this._actionElement=new wt(this.node,this._type,this.id,this._category,this._title,this._parameters,this._isRatingActive),this._isMuted&&(this._actionElement.isMuted=!0),this.addDescent(gt.REWIND,this.rewind.bind(this));var i=t.instances.filter((function(t){return t.isActionee&&t.type})).sort((function(t,e){return e.priority-t.priority}));i.length<=1||i.forEach((function(t,e){t.isMuted=e>0}))}else this._isMuted=!0},i.isMuted.get=function(){return this._actionElement?this._actionElement.isMuted:this._isMuted},i.isMuted.set=function(t){this._isMuted=t,this._actionElement&&(this._actionElement.isMuted=t)},i.priority.get=function(){return this._priority},n.prototype.setPriority=function(t){this._priority=t},i.isInteractive.get=function(){return"A"===this.node.tagName||"BUTTON"===this.node.tagName},n.prototype.detectInteractionType=function(t){t||(t=this.node);var e=t.tagName,n=t.getAttribute("href"),i=t.hasAttribute("download"),r=t.hostname;switch(!0){case"A"!==e:this._type=vt.CLICK;break;case i:this._type=vt.DOWNLOAD,this.value=n;break;case r===location.hostname:this._type=vt.INTERNAL,this.value=n;break;case r.length>0:this._type=vt.EXTERNAL,this.value=n;break;default:this._type=vt.CLICK}},n.prototype.setClickType=function(){this._type=vt.CLICK},n.prototype.listenClick=function(t){t?(this._clickTarget=t,this._clickHandler=this.handleClick.bind(this),this._clickTarget.addEventListener("click",this._clickHandler,{capture:!0})):this.listen("click",this.handleClick.bind(this),{capture:!0})},n.prototype.handleClick=function(){this.act()},n.prototype.setImpressionType=function(){this._type=vt.IMPRESSION},n.prototype.rewind=function(){this._actionElement&&this._actionElement.rewind()},n.prototype.act=function(t){void 0===t&&(t={}),void 0!==this._actionElement&&(this._data.component_value=this.value,this._actionElement.act(Object.assign(this._data,t)))},n.prototype.getFirstText=function(t){if(t||(t=this.node),t.childNodes&&t.childNodes.length>0){for(var e=0;e<t.childNodes.length;e++)if(t.childNodes[e].nodeType===Node.TEXT_NODE){var n=t.childNodes[e].textContent.trim();if(n)return this.cropText(n)}for(var i=0;i<t.childNodes.length;i++){var r=this.getFirstText(t.childNodes[i]);if(r)return this.cropText(r)}}return""},n.prototype.cropText=function(t,e){return t.length>50?t.substring(0,50).trim()+"[...]":t},n.prototype.getInteractionLabel=function(){var t=this.getAttribute("title");if(t)return this.cropText(t);var e=this.getFirstText();if(e)return e;var n=this.node.querySelector("img");if(n){var i=n.getAttribute("alt");if(i)return this.cropText(i)}return null},n.prototype.getHeadingLabel=function(t){var e=this;void 0===t&&(t=6);var n=Array.from({length:t},(function(t,e){return"h"+(e+1)})).join(","),i=Array.from(this.querySelectorAll(n)).filter((function(t){return(e.node.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)>0}));if(i.length)for(var r=0,o=i;r<o.length;r+=1){var s=o[r],a=this.getFirstText(s);if(a)return a}},n.prototype.detectLevel=function(t){t||(t=this.node);var e=Array.from({length:6},(function(t,e){return"h"+(e+1)})).join(","),n=Array.from(t.querySelectorAll(e)).map((function(t){return Number(t.tagName.charAt(1))}));n.length&&(this._level=Math.min.apply(null,n)-1)},n.prototype.validate=function(t){return!0},i.actionElement.get=function(){return this._actionElement},i.label.get=function(){return null},i.value.get=function(){return this._value||this.label},i.value.set=function(t){this._value=t},i.isActionee.get=function(){return!0},i.level.get=function(){return this._level},i.type.get=function(){return this._type},n.prototype.dispose=function(){this._clickTarget&&this._clickTarget.removeEventListener("click",this._clickHandler),e.prototype.dispose.call(this)},Object.defineProperties(n.prototype,i),Object.defineProperties(n,r),n}(t.core.Instance),Dt=function(t){function e(){t.call(this,100)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"AttributeActionee"},e.prototype.init=function(){this._attribute=this.registration.selector.replace(/[[\]]/g,"");var t=this._attribute.split("-").pop();switch(this._type=Object.values(vt).filter((function(e){return e.id===t}))[0],this._title=this.getAttribu