UNPKG

@codegouvfr/react-dsfr

Version:

French State Design System React integration library

2 lines 100 kB
/*! DSFR v1.14.2 | SPDX-License-Identifier: MIT | License-Filename: LICENSE.md | restricted use (see terms and conditions) */ !function(){"use strict";var t=window.dsfr,e={MANUAL:"manual",LOAD:"load",FULL:"full",HASH:"hash"},n="_EA_",i=n+"disabled",r=n+"toggle",o=function(){this._configure()},s={isDisabled:{configurable:!0}};o.prototype._configure=function(){var t=this;window[i]=function(){return t.isDisabled},window[r]=this.toggle.bind(this)},s.isDisabled.get=function(){return localStorage.getItem(n)},o.prototype.toggle=function(){this.isDisabled?this.enable():this.disable()},o.prototype.enable=function(){localStorage.getItem(n)&&localStorage.removeItem(n)},o.prototype.disable=function(){localStorage.setItem(n,"1")},Object.defineProperties(o.prototype,s);var a=new o,c="EA_push",l=function(t){var e=this;this._domain=t,this._isLoaded=!1,this._promise=new Promise(function(t,n){e._resolve=t,e._reject=n})},u={id:{configurable:!0},store:{configurable:!0}};u.id.get=function(){return this._id},u.store.get=function(){return this._store},l.prototype.configure=function(){return this.init(),this._promise},l.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[c]||(window[c]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return e.store.push(t)}),a.isDisabled?(t.inspector.warn("User opted out, eulerian is disabled"),this._reject("User opted out, eulerian is disabled")):this.load()},l.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)},l.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")},l.prototype.loaded=function(){this._isLoaded||(this._isLoaded=!0,this._resolve())},Object.defineProperties(l.prototype,u);var p=-1,h=0,f=1,g=2,d=3,_=function(t){var e=this;this._config=t,this._state=p,this._promise=new Promise(function(t,n){e._resolve=t,e._reject=n})};_.prototype.configure=function(){if(this._state>=f)return this._promise;this._state===p&&(t.inspector.info("analytics configures tarteaucitron"),this._state=h);var e=window.tarteaucitron;if(e&&e.services){this._state=f;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))},_.prototype.init=function(){if(!(this._state>=g)){this._state=g,window.__eaGenericCmpApi=this.integrate.bind(this);var t=this.update.bind(this);window.addEventListener("tac.close_alert",t),window.addEventListener("tac.close_panel",t)}},_.prototype.integrate=function(e){this._state>=d||(this._state=d,this._cmpApi=e,t.inspector.info("analytics has integrated tarteaucitron"),this._resolve(),this.update())},_.prototype.update=function(){this._state<d||this._cmpApi("tac",window.tarteaucitron,1)};var b=function(t){if(this._config=t,t&&"tarteaucitron"===t.id)this.integrateTarteAuCitron()};b.prototype.integrateTarteAuCitron=function(){return this._tac=new _(this._config),this._tac.configure()},b.prototype.optin=function(){};var y=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")},m={COLLECTOR:"collector",ACTION:"action",ACTION_PARAMETER:"actionparam"},v=function(){this._renderables=[],this._rendering=this.render.bind(this),requestAnimationFrame(this._rendering)};v.prototype.add=function(t){-1===this._renderables.indexOf(t)&&this._renderables.push(t)},v.prototype.remove=function(t){var e=this._renderables.indexOf(t);e>-1&&this._renderables.splice(e,1)},v.prototype.render=function(){this._renderables.forEach(function(t){return t.render()}),requestAnimationFrame(this._rendering)};var N=new v,O={ENFORCE:"enforce",PREVENT:"prevent",NONE:"none"},C=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()};C.prototype.setCollector=function(t){this._collector=t},C.prototype.reset=function(t){void 0===t&&(t=!1),this._type=m.ACTION,t||(this._startingActions.length=0),this._endingActions.length=0,this._count=0,this._delay=-1,this._isRequested=!1,this._unlisten()},C.prototype.start=function(){this._isStarted||(this._isStarted=!0,N.add(this))},C.prototype.collect=function(){this._type=m.COLLECTOR,this._request()},C.prototype.regulate=function(e,n){if(!e)return!1;if(n.some(function(t){return t.test(e)}))return t.inspector.log("action exists in queue",e),!1;switch(e.regulation){case O.PREVENT:return!1;case O.ENFORCE:return!0;default:return!0===this._collector.isActionEnabled}},C.prototype.appendStartingAction=function(t,e){if(this.regulate(t,this._startingActions)){var n=new E(t,e);this._startingActions.push(n),this._request()}},C.prototype.appendEndingAction=function(t,e){if(this.regulate(t,this._endingActions)){var n=new E(t,e);this._endingActions.push(n),this._request()}},C.prototype._request=function(){this._listen(),this._isRequested=!0,this._delay=4},C.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))},C.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))},C.prototype._handleVisibilityChange=function(t){"hidden"===document.visibilityState&&this.send()},C.prototype._handleEnd=function(){this.send()},C.prototype.render=function(){if(!(this._delay<=-1))switch(this._delay--,this._count++,!0){case this._count>20:case 0===this._delay:this.send()}},C.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===m.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&&y(m.COLLECTOR,s)}if(i.length>0)for(var c=0;c<i.length;c++){var l=i[c];l.length>0&&y(m.ACTION,l)}this.reset(t)}};var E=function(t,e){this._action=t,this._data=e};E.prototype.test=function(t){return this._action===t},E.prototype.start=function(){return this._action.start(this._data)},E.prototype.end=function(){return this._action.end(this._data)};var T=new C,A=function(){},L={debugger:{configurable:!0},isActive:{configurable:!0}};L.debugger.get=function(){return window._oEa},L.isActive.get=function(){return!!this.debugger&&"1"===this.debugger._dbg},L.isActive.set=function(t){this.debugger&&this.isActive!==t&&this.debugger.debug(t?1:0)},Object.defineProperties(A.prototype,L);var I=new A,j={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}},P={INDIVIDUAL:{id:"individual",value:"part"},PROFESSIONNAL:{id:"professionnal",value:"pro"}},S={"0x0022":""","0x0024":"$","0x0026":"&","0x0027":"'","0x002a":"*","0x002c":",","0x003c":"<","0x003e":">","0x003f":"?","0x005c":"\","0x005e":"^","0x0060":"`","0x007c":"|","0x007e":"~"},w=function(t){return t?t=(t=(t=[].concat(t).map(function(t){return S[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},k=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},x=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},D=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},R=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},M=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},B=function(t){return t.toISOString().split("T")[0]},F=function(t){this._config=t||{}},U={uid:{configurable:!0},email:{configurable:!0},isNew:{configurable:!0},status:{configurable:!0},profile:{configurable:!0},language:{configurable:!0},type:{configurable:!0},layer:{configurable:!0}};F.prototype.reset=function(t){void 0===t&&(t=!1),this._isConnected=!1,this.status=j.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},F.prototype.connect=function(e,n,i){void 0===i&&(i=!1),this._uid=k(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=k(n,"user.email"),this._isNew=D(i),this._isConnected=!0,this.status=j.CONNECTED},U.uid.get=function(){return this._uid},U.email.get=function(){return this._email},U.isNew.get=function(){return this._isNew},U.status.set=function(t){var e=this,n=Object.values(j).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]},U.status.get=function(){return this._status.id},U.profile.set=function(t){var e=k(t,"user.profile");null!==e&&(this._profile=e)},U.profile.get=function(){return this._profile.id},U.language.set=function(t){var e=R(t,"user.language");null!==e&&(this._language=e)},U.language.get=function(){return this._language||navigator.language},U.type.set=function(t){this._type=Object.values(P).filter(function(e){return e.id===t||e.value===t})[0]},U.type.get=function(){return this._type.id},U.layer.get=function(){var t=[];return this.uid&&t.push("uid",w(this.uid)),this.email&&t.push("email",w(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(F.prototype,U),F.Status=j,F.Type=P;var q={DEVELOPMENT:{id:"development",value:"dev"},STAGE:{id:"stage",value:"stage"},PRODUCTION:{id:"production",value:"prod"}},H=function(t){this._config=t||{}},K={environment:{configurable:!0},entity:{configurable:!0},language:{configurable:!0},target:{configurable:!0},type:{configurable:!0},region:{configurable:!0},department:{configurable:!0},version:{configurable:!0},api:{configurable:!0},layer:{configurable:!0}};H.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.version=e?void 0:this._config.version,this._api=t.version},K.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}},K.environment.get=function(){return this._environment?this._environment.id:q.DEVELOPMENT.id},K.entity.set=function(t){var e=k(t,"site.entity");null!==e&&(this._entity=e)},K.entity.get=function(){return this._entity},K.language.set=function(t){var e=R(t,"site.language");null!==e&&(this._language=e)},K.language.get=function(){return this._language||document.documentElement.lang},K.target.set=function(t){var e=k(t,"site.target");null!==e&&(this._target=e)},K.target.get=function(){return this._target},K.type.set=function(t){var e=k(t,"site.type");null!==e&&(this._type=e)},K.type.get=function(){return this._type},K.region.set=function(t){var e=M(t,"site.region");null!==e&&(this._region=e)},K.region.get=function(){return this._region},K.department.set=function(t){var e=M(t,"site.department");null!==e&&(this._department=e)},K.department.get=function(){return this._department},K.version.set=function(t){var e=k(t,"site.version");null!==e&&(this._version=e)},K.version.get=function(){return this._version},K.api.get=function(){return this._api},K.layer.get=function(){var e=[];return e.push("site_environment",this._environment.value),this.entity?e.push("site_entity",w(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",w(this.target)),this.type&&e.push("site_type",w(this.type)),this.region&&e.push("site_region",this.region),this.department&&e.push("site_department",this.department),this.version&&e.push("site_version",this.version),this.api&&e.push("api_version",this.api),e},Object.defineProperties(H.prototype,K),H.Environment=q;var V={accordion:t.internals.ns.selector("accordion"),alert:t.internals.ns.selector("alert"),badge:t.internals.ns.selector("badge"),breadcrumb:t.internals.ns.selector("breadcrumb"),button:t.internals.ns.selector("btn"),callout:t.internals.ns.selector("callout"),card:t.internals.ns.selector("card"),checkbox:t.internals.ns.selector("checkbox-group"),connect:t.internals.ns.selector("connect"),consent:t.internals.ns.selector("consent-banner"),content:t.internals.ns.selector("content-media"),download:t.internals.ns.selector("download"),follow:t.internals.ns.selector("follow"),footer:t.internals.ns.selector("footer"),header:t.internals.ns.selector("header"),highlight:t.internals.ns.selector("highlight"),input:t.internals.ns.selector("input-group"),link:t.internals.ns.selector("link"),modal:t.internals.ns.selector("modal"),navigation:t.internals.ns.selector("nav"),notice:t.internals.ns.selector("notice"),pagination:t.internals.ns.selector("pagination"),quote:t.internals.ns.selector("quote"),radio:t.internals.ns.selector("radio-group"),search:t.internals.ns.selector("search-bar"),select:t.internals.ns.selector("select"),share:t.internals.ns.selector("share"),sidemenu:t.internals.ns.selector("sidemenu"),stepper:t.internals.ns.selector("stepper"),summary:t.internals.ns.selector("summary"),tab:t.internals.ns.selector("tabs"),table:t.internals.ns.selector("table"),tag:t.internals.ns.selector("tag"),tile:t.internals.ns.selector("tile"),toggle:t.internals.ns.selector("toggle"),tooltip:t.internals.ns.selector("tooltip"),transcription:t.internals.ns.selector("transcription"),translate:t.internals.ns.selector("translate"),upload:t.internals.ns.selector("upload-group")},G="collectable",W="collecting",Y="collected",z=function(t){this._config=t||{},this._state=G},Z={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}};z.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},z.prototype.collecting=function(){return this._state!==G?(t.inspector.warn("current path '"+this.path+"' was already collected"),!1):(this._state=W,!0)},Z.isCollecting.get=function(){return this._state===W},Z.path.set=function(t){var e=k(t,"page.path");null!==e&&(this._path=e,this._state=G)},Z.path.get=function(){return this._path||""+document.location.pathname+document.location.search},Z.referrer.set=function(t){var e=k(t,"page.referrer");null!==e&&(this._referrer=e)},Z.referrer.get=function(){return this._referrer},Z.title.set=function(t){var e=k(t,"page.title");null!==e&&(this._title=e)},Z.title.get=function(){return this._title||document.title},Z.id.set=function(t){var e=k(t,"page.id");null!==e&&(this._id=e)},Z.id.get=function(){return this._id},Z.author.set=function(t){var e=k(t,"page.author");null!==e&&(this._author=e)},Z.author.get=function(){return this._author},Z.date.set=function(e){var n=function(e,n,i){switch(void 0===i&&(i=!0),!0){case e instanceof Date:return B(e);case"string"==typeof e:var r=new Date(e);if("Invalid Date"!==r.toString())return B(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)},Z.date.get=function(){return this._date},Z.tags.get=function(){return this._tags},Z.name.set=function(t){var e=k(t,"page.name");null!==e&&(this._name=e)},Z.name.get=function(){return this._name||this.title},Z.labels.get=function(){return this._labels},Z.categories.get=function(){return this._categories},Z.isError.set=function(t){var e=D(t,"page.isError");null!==e&&(this._isError=e)},Z.isError.get=function(){return this._isError},Z.template.set=function(t){var e=k(t,"page.template");null!==e&&(this._template=e)},Z.template.get=function(){return this._template||"autres"},Z.segment.set=function(t){var e=k(t,"page.segment");null!==e&&(this._segment=e)},Z.segment.get=function(){return this._segment||this.template},Z.group.set=function(t){var e=k(t,"page.group");null!==e&&(this._group=e)},Z.group.get=function(){return this._group||this.template},Z.subtemplate.set=function(t){var e=k(t,"page.subtemplate");null!==e&&(this._subtemplate=e)},Z.subtemplate.get=function(){return this._subtemplate},Z.theme.set=function(t){var e=k(t,"page.theme");null!==e&&(this._theme=e)},Z.theme.get=function(){return this._theme},Z.subtheme.set=function(t){var e=k(t,"page.subtheme");null!==e&&(this._subtheme=e)},Z.subtheme.get=function(){return this._subtheme},Z.related.set=function(t){var e=k(t,"page.related");null!==e&&(this._related=e)},Z.related.get=function(){return this._related},Z.depth.set=function(t){var e=x(t,"page.depth");null!==e&&(this._depth=e)},Z.depth.get=function(){return this._depth},Z.current.set=function(t){var e=x(t,"page.current");null!==e&&(this._current=e)},Z.current.get=function(){return this._current},Z.total.set=function(t){var e=x(t,"page.total");null!==e&&(this._total=e)},Z.total.get=function(){return this._total},Z.filters.get=function(){return this._filters},Z.layer.get=function(){this._state=Y;var t=[];this.path&&t.push("path",w(this.path)),this.referrer&&t.push("referrer",w(this.referrer)),this.title&&t.push("page_title",w(this.title)),this.name&&t.push("page_name",w(this.name)),this.id&&t.push("page_id",w(this.id)),this.author&&t.push("page_author",w(this.author)),this.date&&t.push("page_date",w(this.date));var e=Object.keys(V).map(function(t){return null!==document.querySelector(V[t])?t:null}).filter(function(t){return null!==t}).join(",");e&&t.push("page_components",e);var n=this._labels.slice(0,5);n.length=5,n.some(function(t){return t})&&t.push("pagelabel",n.map(function(t){return"string"==typeof t?w(t):""}).join(","));var i=this._tags;if(i.some(function(t){return t})&&t.push("pagetag",i.map(function(t){return"string"==typeof t?w(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",w(this.template)),t.push("pagegroup",w(this.group)),t.push("site-segment",w(this.segment)),this.subtemplate&&t.push("page_subtemplate",w(this.subtemplate)),this.theme&&t.push("page_theme",w(this.theme)),this.subtheme&&t.push("page_subtheme",w(this.subtheme)),this.related&&t.push("page_related",w(this.related)),isNaN(this.depth)||t.push("page_depth",this.depth),!isNaN(this.current)&&this.current>-1){var r=""+this.current;!isNaN(this.total)&&this.total>-1&&(r+="/"+this.total),t.push("page_pagination",r)}if(this.filters.length&&this.filters.some(function(t){return t})){var o=this.filters.map(function(t){return"string"==typeof t?w(t):""});t.push("page_filters",o.join(","))}return t},Object.defineProperties(z.prototype,Z);var X={STANDARD:{id:"standard",value:"standard",isDefault:!0},AUTOCOMPLETE:{id:"autocomplete",value:"autocompletion"}},$=function(t){this._config=t||{}},Q={engine:{configurable:!0},results:{configurable:!0},terms:{configurable:!0},category:{configurable:!0},theme:{configurable:!0},type:{configurable:!0},method:{configurable:!0},layer:{configurable:!0}};$.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},Q.engine.set=function(t){var e=k(t,"search.engine");null!==e&&(this._engine=e)},Q.engine.get=function(){return this._engine},Q.results.set=function(t){var e=x(t,"search.results");null!==e&&(this._results=e)},Q.results.get=function(){return this._results},Q.terms.set=function(t){var e=k(t,"search.terms");null!==e&&(this._terms=e)},Q.terms.get=function(){return this._terms},Q.category.set=function(t){var e=k(t,"search.category");null!==e&&(this._category=e)},Q.category.get=function(){return this._category},Q.theme.set=function(t){var e=k(t,"search.theme");null!==e&&(this._theme=e)},Q.theme.get=function(){return this._theme},Q.type.set=function(t){var e=k(t,"search.type");null!==e&&(this._type=e),this._type=t},Q.type.get=function(){return this._type},Q.method.set=function(t){var e=Object.values(X);this._method=e.filter(function(e){return e.id===t||e.value===t})[0]||e.filter(function(t){return t.isDefault})[0]},Q.method.get=function(){return this._method},Q.layer.get=function(){var t=[];return this.engine&&t.push("isearchengine",w(this.engine)),this.results>-1&&t.push("isearchresults",this.results),this.terms&&t.push("isearchkey","search_terms","isearchdata",w(this.terms)),this.category&&t.push("isearchkey","search_category","isearchdata",w(this.category)),this.theme&&t.push("isearchkey","search_theme","isearchdata",w(this.theme)),this.type&&t.push("isearchkey","search_type","isearchdata",w(this.type)),this._method&&t.length&&t.push("isearchkey","search_method","isearchdata",this._method.value),t},Object.defineProperties($.prototype,Q),$.Method=X;var J=function(t){this._config=t||{}},tt={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}};J.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},tt.id.set=function(t){var e=k(t,"funnel.id");null!==e&&(this._id=e)},tt.id.get=function(){return this._id},tt.type.set=function(t){var e=k(t,"funnel.type");null!==e&&(this._type=e)},tt.type.get=function(){return this._type},tt.name.set=function(t){var e=k(t,"funnel.name");null!==e&&(this._name=e)},tt.name.get=function(){return this._name},tt.step.set=function(t){var e=k(t,"funnel.step");null!==e&&(this._step=e)},tt.step.get=function(){return this._step},tt.current.set=function(t){var e=x(t,"funnel.current");null!==e&&(this._current=e)},tt.current.get=function(){return this._current},tt.total.set=function(t){var e=x(t,"funnel.total");null!==e&&(this._total=e)},tt.total.get=function(){return this._total},tt.objective.set=function(t){var e=k(t,"funnel.objective");null!==e&&(this._objective=e),this._objective=t},tt.objective.get=function(){return this._objective},tt.error.set=function(t){var e=k(t,"funnel.error");null!==e&&(this._error=e),this._error=t},tt.error.get=function(){return this._error},tt.layer.get=function(){var t=[];return this.id&&t.push("funnel_id",w(this.id)),this.type&&t.push("funnel_type",w(this.type)),this.name&&t.push("funnel_name",w(this.name)),this.step&&t.push("funnel_step_name",w(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",w(this.objective)),this.error&&t.push("funnel_error",w(this.error)),t},Object.defineProperties(J.prototype,tt);var et={IN:"in",OUT:"out",NONE:"none"},nt={id:"unstarted",value:-1},it={id:"started",value:1},rt={id:"singular",value:2},ot={id:"ended",value:3},st=function(t){return Object.entries(t).map(function(t){var e=t[0],n=t[1];return["actionpname",w(e),"actionpvalue",w(n)]}).flat()},at=function(t){this._isMuted=!1,this._regulation=O.NONE,this._name=t,this._status=nt,this._labels=[],this._parameters={},this._sentData=[]},ct={isMuted:{configurable:!0},regulation:{configurable:!0},isSingular:{configurable:!0},status:{configurable:!0},name:{configurable:!0},labels:{configurable:!0},reference:{configurable:!0},parameters:{configurable:!0},mode:{configurable:!0},_base:{configurable:!0}};ct.isMuted.get=function(){return this._isMuted},ct.isMuted.set=function(t){this._isMuted=t},ct.regulation.get=function(){return this._regulation},ct.regulation.set=function(t){Object.values(O).includes(t)&&(this._regulation=t)},ct.isSingular.get=function(){return this._status===rt},ct.status.get=function(){return this._status},ct.name.get=function(){return this._name},ct.labels.get=function(){return this._labels},ct.reference.get=function(){return this._reference},ct.parameters.get=function(){return this._parameters},ct.mode.get=function(){return this._mode},at.prototype.singularize=function(){this._status=rt},at.prototype.rewind=function(){this._sentData=[],this._status=nt},at.prototype.addParameter=function(t,e){this._parameters[t]=e},at.prototype.removeParameter=function(t){delete this._parameters[t]},ct.reference.set=function(t){var e=k(t,"action "+this._name);null!==e&&(this._reference=e)},ct._base.get=function(){return["actionname",this._name]},at.prototype._getLayer=function(t){if(void 0===t&&(t={}),this._isMuted)return[];this._mode!==et.IN&&this._sentData.push(JSON.stringify(t));var e=this._base;switch(this._mode){case et.IN:case et.OUT:e.push("actionmode",this._mode)}var n=this._labels.slice(0,5);return n.length=5,n.some(function(t){return t})&&e.push("actionlabel",n.map(function(t){return"string"==typeof t?w(t):""}).join(",")),this._reference&&e.push("actionref",this._reference),e.push.apply(e,st(Object.assign(this._parameters,t||{}))),e},at.prototype.start=function(e){switch(this._status){case nt:this._mode=et.IN,this._status=it;break;case rt:this._mode=et.NONE,this._status=ot;break;default:return t.inspector.error("unexpected start on action "+this._name+" with status "+this._status.id),[]}return this._getLayer(e)},at.prototype.end=function(t){switch(this._status){case it:this._mode=et.OUT,this._status=ot;break;case nt:case rt:this._mode=et.NONE,this._status=ot;break;case ot:if(this._sentData.includes(JSON.stringify(t)))return[];this._mode=et.NONE,this._status=ot;break;default:return[]}return this._getLayer(t)},at.prototype.resume=function(e){if(this._isMuted)return[];if(this._status.value>=ot.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,st(e)),n},Object.defineProperties(at.prototype,ct);var lt=function(){this._actions=[]};lt.prototype.rewind=function(){this._actions.forEach(function(t){return t.rewind()})},lt.prototype.getAction=function(t){var e=this._actions.filter(function(e){return e.name===t})[0];return e||(e=new at(t),this._actions.push(e)),e},lt.prototype.hasAction=function(t){return this._actions.some(function(e){return e.name===t})},lt.prototype.remove=function(t){var e=this._actions.indexOf(t);return-1!==e&&(this._actions.splice(e,1),!0)},lt.ActionMode=et;var ut=new lt;lt.instance=ut;var pt=function(t,e){void 0===e&&(e=!1),this._onRouteChange=t,this._isListeningHash=e,this._update(),N.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={ENABLE:{entries:["enable","enabled","true","yes","1",!0],value:!0,output:!0},DISABLE:{entries:["disable","disabled","false","no","0",!1],value:!1,output:!1},REDUCE:{entries:["reduce"],value:"reduce",output:!1}},_t=function(n){switch(n.collection){case e.MANUAL:case e.LOAD:case e.FULL:case e.HASH:this._collection=n.collection;break;default:if(n.mode&&"manual"===n.mode)this._collection=n.collection;switch(!0){case"manual"===n.mode:this._collection=e.MANUAL;break;case t.mode===t.Modes.ANGULAR:case t.mode===t.Modes.REACT:case t.mode===t.Modes.VUE:this._collection=e.FULL;break;default:this._collection=e.LOAD}}this.isActionEnabled=n.isActionEnabled,this._user=new F(n.user),this._site=new H(n.site),this._page=new z(n.page),this._search=new $(n.search),this._funnel=new J(n.funnel),this._delay=-1,T.setCollector(this)},bt={page:{configurable:!0},user:{configurable:!0},site:{configurable:!0},search:{configurable:!0},funnel:{configurable:!0},collection:{configurable:!0},isCollecting:{configurable:!0},isActionEnabled:{configurable:!0},isActionReduced:{configurable:!0},layer:{configurable:!0}};bt.page.get=function(){return this._page},bt.user.get=function(){return this._user},bt.site.get=function(){return this._site},bt.search.get=function(){return this._search},bt.funnel.get=function(){return this._funnel},_t.prototype.start=function(){var t=this._handleRouteChange.bind(this);switch(this._collection){case e.LOAD:this.collect();break;case e.FULL:this.collect(),this._location=new pt(t);break;case e.HASH:this.collect(),this._location=new pt(t,!0)}},_t.prototype._handleRouteChange=function(){T.send(!0),this._delay=6,N.add(this)},_t.prototype.render=function(){this._delay--,this._delay<0&&(N.remove(this),this._routeChanged())},_t.prototype._routeChanged=function(){ut.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)},_t.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)},_t.prototype.collect=function(){this.page.collecting()&&T.collect()},bt.collection.get=function(){return this._collection},bt.isCollecting.get=function(){return this._page.isCollecting},bt.isActionEnabled.get=function(){return this._isActionEnabled.value},bt.isActionEnabled.set=function(t){this._isActionEnabled=Object.values(dt).find(function(e){return e.entries.includes(t)})||dt.DISABLE},bt.isActionReduced.get=function(){return this._isActionEnabled===dt.REDUCE},bt.layer.get=function(){return this._user.layer.concat(this._site.layer,this._page.layer,this._search.layer,this._funnel.layer)},Object.defineProperties(_t.prototype,bt);var yt=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()},mt={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},isActionEnabled:{configurable:!0},isDebugging:{configurable:!0}};yt.prototype._configure=function(){switch(!0){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)")}},yt.prototype._build=function(){var t=this;this._init=new l(this._config.domain),this._init.configure().then(this._start.bind(this),function(e){return t._reject(e)})},mt.isReady.get=function(){return this._isReady},mt.readiness.get=function(){return this._readiness},yt.prototype._start=function(){this._isReady||(this._cmp=new b(this._config.cmp),this._collector=new _t(this._config),this._collector.reset(),this._isReady=!0,this._resolve(),T.start(),this._collector.start())},mt.page.get=function(){return this._collector.page},mt.user.get=function(){return this._collector.user},mt.site.get=function(){return this._collector._site},mt.search.get=function(){return this._collector.search},mt.funnel.get=function(){return this._collector.funnel},mt.cmp.get=function(){return this._cmp},mt.opt.get=function(){return a},mt.collection.get=function(){return this._collector.collection},mt.isActionEnabled.get=function(){return this._collector.isActionEnabled},mt.isActionEnabled.set=function(t){this._collector.isActionEnabled=t},mt.isDebugging.get=function(){return I.isActive},mt.isDebugging.set=function(t){I.isActive=t},yt.prototype.push=function(t,e){y(t,e)},yt.prototype.reset=function(t){this._collector.reset()},yt.prototype.collect=function(){this._collector.collect()},Object.defineProperties(yt.prototype,mt);var vt=new yt;vt.Collection=e,vt.PushType=m;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}(vt,{});var Nt={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",Et="component",Tt="content",At=Node.DOCUMENT_POSITION_PRECEDING|Node.DOCUMENT_POSITION_CONTAINED_BY,Lt=function(t){this._label=t.textContent.trim(),this._level=Number(t.tagName.charAt(1))},It={level:{configurable:!0},label:{configurable:!0}};It.level.get=function(){return this._level},It.label.get=function(){return this._label},Object.defineProperties(Lt.prototype,It);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()},Pt={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)&At)>0}).map(function(t){return new Lt(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=Et,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 Lt(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 Lt(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)}},Pt.type.get=function(){return this._type},Pt.level.get=function(){return this._level},Pt.label.get=function(){return this._label},Pt.component.get=function(){return this._component},Pt.node.get=function(){return this._node},Pt.target.get=function(){return this._target},Pt.isValid.get=function(){return this._isValid},Object.defineProperties(jt.prototype,Pt);var St=function(t){this._node=t,this._process()},wt={localComponent:{configurable:!0},globalComponent:{configurable:!0},label:{configurable:!0},title:{configurable:!0},component:{configurable:!0}};St.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===Et:break;case n.label===this._members[0].label&&n.type===Et&&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=w(this._members[this._members.length-1].label),this._title=w(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=w(i.join(" › ")),this._localComponent=i[i.length-1],this._globalComponent=i[0]},wt.localComponent.get=function(){return this._localComponent},wt.globalComponent.get=function(){return this._globalComponent},wt.label.get=function(){return this._label},wt.title.get=function(){return this._title},wt.component.get=function(){return this._component},Object.defineProperties(St.prototype,wt);var kt=function(t,e,n,i,r,o,s,a){void 0===i&&(i=""),void 0===r&&(r=null),void 0===o&&(o={}),void 0===s&&(s=!1),void 0===a&&(a=O.NONE),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._isRating=s,this._regulation=a,this._hasBegun=!1,requestAnimationFrame(this._init.bind(this))},xt={isMuted:{configurable:!0},regulation:{configurable:!0},action:{configurable:!0}};kt.prototype._init=function(){var e=this;this._hierarchy=new St(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=ut.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.regulation=this._regulation,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()},xt.isMuted.get=function(){return this._action?this._action.isMuted:this._isMuted},xt.isMuted.set=function(t){this._isMuted=t,this._action&&(this._action.isMuted=t)},xt.regulation.get=function(){return this._regulation},xt.regulation.set=function(t){this._regulation=t,this._action&&(this._action.regulation=t)},xt.action.get=function(){return this._action},kt.prototype.rewind=function(){this._hasBegun=!1,this.begin()},kt.prototype.begin=function(t){void 0===t&&(t={}),this._hasBegun||(this._hasBegun=!0,this._type.isBeginning&&(this._type.isSingular||this._isRating)&&T.appendStartingAction(this._action,t))},kt.prototype.act=function(t){var e=this;void 0===t&&(t={}),this._isMuted||(this._action?T.appendEndingAction(this._action,t):requestAnimationFrame(function(){return e.act(t)}))},kt.prototype.dispose=function(){ut.remove(this._action)},Object.defineProperties(kt.prototype,xt);var Dt={RATING:t.internals.ns.attr("analytics-rating"),ACTION:t.internals.ns.attr("analytics-action")},Rt=function(e){function n(t,n,i,r){void 0===t&&(t=-1),void 0===n&&(n=""),void 0===i&&(i=null),void 0===r&&(r=O.NONE),e.call(this),this._type=null,this._priority=t,this._category=n,this._title=i,this._parameters={},this._data={},this._isMuted=!1,this._regulation=r}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},get act(){return n.act.bind(n)}};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)return this._sort(t),void(this._isMuted=!0);var i=this.getRegulation();this._regulation=i!==O.NONE?i:this._regulation;var r=this.getAttribute(Dt.ACTION),o="string"==typeof r&&"false"!==r.toLowerCase()&&"true"!==r.toLowerCase()?w(r):this._title;this._isRating=this.hasAttribute(Dt.RATING),this._actionElement=new kt(this.node,this._type,this.id,this._category,o,this._parameters,this._isRating,this._regulation),this._isMuted&&(this._actionElement.isMuted=!0),this.addDescent(gt.REWIND,this.rewind.bind(this)),this._sort(t)},n.prototype.getRegulation=function(){var t=this.getAttribute(Dt.ACTION);switch(!0){case"string"==typeof t&&"false"===t.toLowerCase():return O.PREVENT;case null!==t:return O.ENFORCE;default:return O.NONE}},n.prototype.mutate=function(t){if(t.includes(Dt.ACTION)){var n=this.getRegulation();this._regulation!==n&&(this._regulation=n,this._actionElement&&(this._actionElement.regulation=n))}e.prototype.mutate.call(this,t)},n.prototype._sort=function(t){var e=t.instances.filter(func