@codegouvfr/react-dsfr
Version:
French State Design System React integration library
2 lines • 100 kB
JavaScript
/*! DSFR v1.13.2 | 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"},N=function(){this._renderables=[],this._rendering=this.render.bind(this),requestAnimationFrame(this._rendering)};N.prototype.add=function(t){-1===this._renderables.indexOf(t)&&this._renderables.push(t)},N.prototype.remove=function(t){var e=this._renderables.indexOf(t);e>-1&&this._renderables.splice(e,1)},N.prototype.render=function(){this._renderables.forEach((function(t){return t.render()})),requestAnimationFrame(this._rendering)};var O=new N,C={ENFORCE:"enforce",PREVENT:"prevent",NONE:"none"},E=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()};E.prototype.setCollector=function(t){this._collector=t},E.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()},E.prototype.start=function(){this._isStarted||(this._isStarted=!0,O.add(this))},E.prototype.collect=function(){this._type=v.COLLECTOR,this._request()},E.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 C.PREVENT:return!1;case C.ENFORCE:return!0;default:return!0===this._collector.isActionEnabled}},E.prototype.appendStartingAction=function(t,e){if(this.regulate(t,this._startingActions)){var n=new T(t,e);this._startingActions.push(n),this._request()}},E.prototype.appendEndingAction=function(t,e){if(this.regulate(t,this._endingActions)){var n=new T(t,e);this._endingActions.push(n),this._request()}},E.prototype._request=function(){this._listen(),this._isRequested=!0,this._delay=4},E.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))},E.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))},E.prototype._handleVisibilityChange=function(t){"hidden"===document.visibilityState&&this.send()},E.prototype._handleEnd=function(){this.send()},E.prototype.render=function(){if(!(this._delay<=-1))switch(this._delay--,this._count++,!0){case this._count>20:case 0===this._delay:this.send()}},E.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 T=function(t,e){this._action=t,this._data=e};T.prototype.test=function(t){return this._action===t},T.prototype.start=function(){return this._action.start(this._data)},T.prototype.end=function(){return this._action.end(this._data)};var A=new E,L=function(){},I={debugger:{configurable:!0},isActive:{configurable:!0}};I.debugger.get=function(){return window._oEa},I.isActive.get=function(){return!!this.debugger&&"1"===this.debugger._dbg},I.isActive.set=function(t){this.debugger&&this.isActive!==t&&this.debugger.debug(t?1:0)},Object.defineProperties(L.prototype,I);var j=new L,P={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}},S={INDIVIDUAL:{id:"individual",value:"part"},PROFESSIONNAL:{id:"professionnal",value:"pro"}},w={"0x0022":""","0x0024":"$","0x0026":"&","0x0027":"'","0x002a":"*","0x002c":",","0x003c":"<","0x003e":">","0x003f":"?","0x005c":"\","0x005e":"^","0x0060":"`","0x007c":"|","0x007e":"~"},k=function(t){return t?t=(t=(t=[].concat(t).map((function(t){return w[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},x=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},D=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},R=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},M=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},B=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},F=function(t){return t.toISOString().split("T")[0]},U=function(t){this._config=t||{}},q={uid:{configurable:!0},email:{configurable:!0},isNew:{configurable:!0},status:{configurable:!0},profile:{configurable:!0},language:{configurable:!0},type:{configurable:!0},layer:{configurable:!0}};U.prototype.reset=function(t){void 0===t&&(t=!1),this._isConnected=!1,this.status=P.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},U.prototype.connect=function(e,n,i){void 0===i&&(i=!1),this._uid=x(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=x(n,"user.email"),this._isNew=R(i),this._isConnected=!0,this.status=P.CONNECTED},q.uid.get=function(){return this._uid},q.email.get=function(){return this._email},q.isNew.get=function(){return this._isNew},q.status.set=function(t){var e=this,n=Object.values(P).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]},q.status.get=function(){return this._status.id},q.profile.set=function(t){var e=x(t,"user.profile");null!==e&&(this._profile=e)},q.profile.get=function(){return this._profile.id},q.language.set=function(t){var e=M(t,"user.language");null!==e&&(this._language=e)},q.language.get=function(){return this._language||navigator.language},q.type.set=function(t){this._type=Object.values(S).filter((function(e){return e.id===t||e.value===t}))[0]},q.type.get=function(){return this._type.id},q.layer.get=function(){var t=[];return this.uid&&t.push("uid",k(this.uid)),this.email&&t.push("email",k(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(U.prototype,q),U.Status=P,U.Type=S;var H={DEVELOPMENT:{id:"development",value:"dev"},STAGE:{id:"stage",value:"stage"},PRODUCTION:{id:"production",value:"prod"}},K=function(t){this._config=t||{}},V={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}};K.prototype.reset=function(e){void 0===e&&(e=!1),this.environment=e?H.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},V.environment.set=function(t){switch(t){case H.PRODUCTION.id:case H.PRODUCTION.value:this._environment=H.PRODUCTION;break;case H.STAGE.id:case H.STAGE.value:this._environment=H.STAGE;break;case H.DEVELOPMENT.id:case H.DEVELOPMENT.value:default:this._environment=H.DEVELOPMENT}},V.environment.get=function(){return this._environment?this._environment.id:H.DEVELOPMENT.id},V.entity.set=function(t){var e=x(t,"site.entity");null!==e&&(this._entity=e)},V.entity.get=function(){return this._entity},V.language.set=function(t){var e=M(t,"site.language");null!==e&&(this._language=e)},V.language.get=function(){return this._language||document.documentElement.lang},V.target.set=function(t){var e=x(t,"site.target");null!==e&&(this._target=e)},V.target.get=function(){return this._target},V.type.set=function(t){var e=x(t,"site.type");null!==e&&(this._type=e)},V.type.get=function(){return this._type},V.region.set=function(t){var e=B(t,"site.region");null!==e&&(this._region=e)},V.region.get=function(){return this._region},V.department.set=function(t){var e=B(t,"site.department");null!==e&&(this._department=e)},V.department.get=function(){return this._department},V.version.set=function(t){var e=x(t,"site.version");null!==e&&(this._version=e)},V.version.get=function(){return this._version},V.api.get=function(){return this._api},V.layer.get=function(){var e=[];return e.push("site_environment",this._environment.value),this.entity?e.push("site_entity",k(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",k(this.target)),this.type&&e.push("site_type",k(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(K.prototype,V),K.Environment=H;var G={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")},W="collectable",Y="collecting",z="collected",Z=function(t){this._config=t||{},this._state=W},X={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!==W?(t.inspector.warn("current path '"+this.path+"' was already collected"),!1):(this._state=Y,!0)},X.isCollecting.get=function(){return this._state===Y},X.path.set=function(t){var e=x(t,"page.path");null!==e&&(this._path=e,this._state=W)},X.path.get=function(){return this._path||""+document.location.pathname+document.location.search},X.referrer.set=function(t){var e=x(t,"page.referrer");null!==e&&(this._referrer=e)},X.referrer.get=function(){return this._referrer},X.title.set=function(t){var e=x(t,"page.title");null!==e&&(this._title=e)},X.title.get=function(){return this._title||document.title},X.id.set=function(t){var e=x(t,"page.id");null!==e&&(this._id=e)},X.id.get=function(){return this._id},X.author.set=function(t){var e=x(t,"page.author");null!==e&&(this._author=e)},X.author.get=function(){return this._author},X.date.set=function(e){var n=function(e,n,i){switch(void 0===i&&(i=!0),!0){case e instanceof Date:return F(e);case"string"==typeof e:var r=new Date(e);if("Invalid Date"!==r.toString())return F(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)},X.date.get=function(){return this._date},X.tags.get=function(){return this._tags},X.name.set=function(t){var e=x(t,"page.name");null!==e&&(this._name=e)},X.name.get=function(){return this._name||this.title},X.labels.get=function(){return this._labels},X.categories.get=function(){return this._categories},X.isError.set=function(t){var e=R(t,"page.isError");null!==e&&(this._isError=e)},X.isError.get=function(){return this._isError},X.template.set=function(t){var e=x(t,"page.template");null!==e&&(this._template=e)},X.template.get=function(){return this._template||"autres"},X.segment.set=function(t){var e=x(t,"page.segment");null!==e&&(this._segment=e)},X.segment.get=function(){return this._segment||this.template},X.group.set=function(t){var e=x(t,"page.group");null!==e&&(this._group=e)},X.group.get=function(){return this._group||this.template},X.subtemplate.set=function(t){var e=x(t,"page.subtemplate");null!==e&&(this._subtemplate=e)},X.subtemplate.get=function(){return this._subtemplate},X.theme.set=function(t){var e=x(t,"page.theme");null!==e&&(this._theme=e)},X.theme.get=function(){return this._theme},X.subtheme.set=function(t){var e=x(t,"page.subtheme");null!==e&&(this._subtheme=e)},X.subtheme.get=function(){return this._subtheme},X.related.set=function(t){var e=x(t,"page.related");null!==e&&(this._related=e)},X.related.get=function(){return this._related},X.depth.set=function(t){var e=D(t,"page.depth");null!==e&&(this._depth=e)},X.depth.get=function(){return this._depth},X.current.set=function(t){var e=D(t,"page.current");null!==e&&(this._current=e)},X.current.get=function(){return this._current},X.total.set=function(t){var e=D(t,"page.total");null!==e&&(this._total=e)},X.total.get=function(){return this._total},X.filters.get=function(){return this._filters},X.layer.get=function(){this._state=z;var t=[];this.path&&t.push("path",k(this.path)),this.referrer&&t.push("referrer",k(this.referrer)),this.title&&t.push("page_title",k(this.title)),this.name&&t.push("page_name",k(this.name)),this.id&&t.push("page_id",k(this.id)),this.author&&t.push("page_author",k(this.author)),this.date&&t.push("page_date",k(this.date));var e=Object.keys(G).map((function(t){return null!==document.querySelector(G[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?k(t):""})).join(","));var i=this._tags;if(i.some((function(t){return t}))&&t.push("pagetag",i.map((function(t){return"string"==typeof t?k(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",k(this.template)),t.push("pagegroup",k(this.group)),t.push("site-segment",k(this.segment)),this.subtemplate&&t.push("page_subtemplate",k(this.subtemplate)),this.theme&&t.push("page_theme",k(this.theme)),this.subtheme&&t.push("page_subtheme",k(this.subtheme)),this.related&&t.push("page_related",k(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?k(t):""}));t.push("page_filters",o.join(","))}return t},Object.defineProperties(Z.prototype,X);var $={STANDARD:{id:"standard",value:"standard",isDefault:!0},AUTOCOMPLETE:{id:"autocomplete",value:"autocompletion"}},Q=function(t){this._config=t||{}},J={engine:{configurable:!0},results:{configurable:!0},terms:{configurable:!0},category:{configurable:!0},theme:{configurable:!0},type:{configurable:!0},method:{configurable:!0},layer:{configurable:!0}};Q.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},J.engine.set=function(t){var e=x(t,"search.engine");null!==e&&(this._engine=e)},J.engine.get=function(){return this._engine},J.results.set=function(t){var e=D(t,"search.results");null!==e&&(this._results=e)},J.results.get=function(){return this._results},J.terms.set=function(t){var e=x(t,"search.terms");null!==e&&(this._terms=e)},J.terms.get=function(){return this._terms},J.category.set=function(t){var e=x(t,"search.category");null!==e&&(this._category=e)},J.category.get=function(){return this._category},J.theme.set=function(t){var e=x(t,"search.theme");null!==e&&(this._theme=e)},J.theme.get=function(){return this._theme},J.type.set=function(t){var e=x(t,"search.type");null!==e&&(this._type=e),this._type=t},J.type.get=function(){return this._type},J.method.set=function(t){var e=Object.values($);this._method=e.filter((function(e){return e.id===t||e.value===t}))[0]||e.filter((function(t){return t.isDefault}))[0]},J.method.get=function(){return this._method},J.layer.get=function(){var t=[];return this.engine&&t.push("isearchengine",k(this.engine)),this.results>-1&&t.push("isearchresults",this.results),this.terms&&t.push("isearchkey","search_terms","isearchdata",k(this.terms)),this.category&&t.push("isearchkey","search_category","isearchdata",k(this.category)),this.theme&&t.push("isearchkey","search_theme","isearchdata",k(this.theme)),this.type&&t.push("isearchkey","search_type","isearchdata",k(this.type)),this._method&&t.length&&t.push("isearchkey","search_method","isearchdata",this._method.value),t},Object.defineProperties(Q.prototype,J),Q.Method=$;var tt=function(t){this._config=t||{}},et={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}};tt.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},et.id.set=function(t){var e=x(t,"funnel.id");null!==e&&(this._id=e)},et.id.get=function(){return this._id},et.type.set=function(t){var e=x(t,"funnel.type");null!==e&&(this._type=e)},et.type.get=function(){return this._type},et.name.set=function(t){var e=x(t,"funnel.name");null!==e&&(this._name=e)},et.name.get=function(){return this._name},et.step.set=function(t){var e=x(t,"funnel.step");null!==e&&(this._step=e)},et.step.get=function(){return this._step},et.current.set=function(t){var e=D(t,"funnel.current");null!==e&&(this._current=e)},et.current.get=function(){return this._current},et.total.set=function(t){var e=D(t,"funnel.total");null!==e&&(this._total=e)},et.total.get=function(){return this._total},et.objective.set=function(t){var e=x(t,"funnel.objective");null!==e&&(this._objective=e),this._objective=t},et.objective.get=function(){return this._objective},et.error.set=function(t){var e=x(t,"funnel.error");null!==e&&(this._error=e),this._error=t},et.error.get=function(){return this._error},et.layer.get=function(){var t=[];return this.id&&t.push("funnel_id",k(this.id)),this.type&&t.push("funnel_type",k(this.type)),this.name&&t.push("funnel_name",k(this.name)),this.step&&t.push("funnel_step_name",k(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",k(this.objective)),this.error&&t.push("funnel_error",k(this.error)),t},Object.defineProperties(tt.prototype,et);var nt={IN:"in",OUT:"out",NONE:"none"},it={id:"unstarted",value:-1},rt={id:"started",value:1},ot={id:"singular",value:2},st={id:"ended",value:3},at=function(t){return Object.entries(t).map((function(t){var e=t[0],n=t[1];return["actionpname",k(e),"actionpvalue",k(n)]})).flat()},ct=function(t){this._isMuted=!1,this._regulation=C.NONE,this._name=t,this._status=it,this._labels=[],this._parameters={},this._sentData=[]},lt={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}};lt.isMuted.get=function(){return this._isMuted},lt.isMuted.set=function(t){this._isMuted=t},lt.regulation.get=function(){return this._regulation},lt.regulation.set=function(t){Object.values(C).includes(t)&&(this._regulation=t)},lt.isSingular.get=function(){return this._status===ot},lt.status.get=function(){return this._status},lt.name.get=function(){return this._name},lt.labels.get=function(){return this._labels},lt.reference.get=function(){return this._reference},lt.parameters.get=function(){return this._parameters},lt.mode.get=function(){return this._mode},ct.prototype.singularize=function(){this._status=ot},ct.prototype.rewind=function(){this._sentData=[],this._status=it},ct.prototype.addParameter=function(t,e){this._parameters[t]=e},ct.prototype.removeParameter=function(t){delete this._parameters[t]},lt.reference.set=function(t){var e=x(t,"action "+this._name);null!==e&&(this._reference=e)},lt._base.get=function(){return["actionname",this._name]},ct.prototype._getLayer=function(t){if(void 0===t&&(t={}),this._isMuted)return[];this._mode!==nt.IN&&this._sentData.push(JSON.stringify(t));var e=this._base;switch(this._mode){case nt.IN:case nt.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?k(t):""})).join(",")),this._reference&&e.push("actionref",this._reference),e.push.apply(e,at(Object.assign(this._parameters,t||{}))),e},ct.prototype.start=function(e){switch(this._status){case it:this._mode=nt.IN,this._status=rt;break;case ot:this._mode=nt.NONE,this._status=st;break;default:return t.inspector.error("unexpected start on action "+this._name+" with status "+this._status.id),[]}return this._getLayer(e)},ct.prototype.end=function(t){switch(this._status){case rt:this._mode=nt.OUT,this._status=st;break;case it:case ot:this._mode=nt.NONE,this._status=st;break;case st:if(this._sentData.includes(JSON.stringify(t)))return[];this._mode=nt.NONE,this._status=st;break;default:return[]}return this._getLayer(t)},ct.prototype.resume=function(e){if(this._isMuted)return[];if(this._status.value>=st.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,at(e)),n},Object.defineProperties(ct.prototype,lt);var ut=function(){this._actions=[]};ut.prototype.rewind=function(){this._actions.forEach((function(t){return t.rewind()}))},ut.prototype.getAction=function(t){var e=this._actions.filter((function(e){return e.name===t}))[0];return e||(e=new ct(t),this._actions.push(e)),e},ut.prototype.hasAction=function(t){return this._actions.some((function(e){return e.name===t}))},ut.prototype.remove=function(t){var e=this._actions.indexOf(t);return-1!==e&&(this._actions.splice(e,1),!0)},ut.ActionMode=nt;var pt=new ut;ut.instance=pt;var ht=function(t,e){void 0===e&&(e=!1),this._onRouteChange=t,this._isListeningHash=e,this._update(),O.add(this)},ft={path:{configurable:!0},hasTitle:{configurable:!0},title:{configurable:!0},referrer:{configurable:!0}};ht.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},ht.prototype.render=function(){this._pathname===document.location.pathname&&this._search===document.location.search||this.change(),this._isListeningHash&&this._hash!==document.location.hash&&this.change()},ht.prototype.change=function(){this._referrer=this._path,this._update(),this._onRouteChange()},ft.path.get=function(){return this._path},ft.hasTitle.get=function(){return this._hasTitle},ft.title.get=function(){return this._title},ft.referrer.get=function(){return this._referrer},Object.defineProperties(ht.prototype,ft);var gt={COLLECT:t.internals.ns.event("collect")},dt={REWIND:t.internals.ns.emission("analytics","rewind")},_t={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}},bt=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.isActionEnabled=e.isActionEnabled,this._user=new U(e.user),this._site=new K(e.site),this._page=new Z(e.page),this._search=new Q(e.search),this._funnel=new tt(e.funnel),this._delay=-1,A.setCollector(this)},yt={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}};yt.page.get=function(){return this._page},yt.user.get=function(){return this._user},yt.site.get=function(){return this._site},yt.search.get=function(){return this._search},yt.funnel.get=function(){return this._funnel},bt.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 ht(t);break;case n.HASH:this.collect(),this._location=new ht(t,!0)}},bt.prototype._handleRouteChange=function(){A.send(!0),this._delay=6,O.add(this)},bt.prototype.render=function(){this._delay--,this._delay<0&&(O.remove(this),this._routeChanged())},bt.prototype._routeChanged=function(){pt.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(gt.COLLECT);document.documentElement.dispatchEvent(e),this.collect(),t.internals&&t.internals.stage&&t.internals.stage.root&&t.internals.stage.root.descend(dt.REWIND)},bt.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)},bt.prototype.collect=function(){this.page.collecting()&&A.collect()},yt.collection.get=function(){return this._collection},yt.isCollecting.get=function(){return this._page.isCollecting},yt.isActionEnabled.get=function(){return this._isActionEnabled.value},yt.isActionEnabled.set=function(t){this._isActionEnabled=Object.values(_t).find((function(e){return e.entries.includes(t)}))||_t.DISABLE},yt.isActionReduced.get=function(){return this._isActionEnabled===_t.REDUCE},yt.layer.get=function(){return this._user.layer.concat(this._site.layer,this._page.layer,this._search.layer,this._funnel.layer)},Object.defineProperties(bt.prototype,yt);var mt=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()},vt={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}};mt.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)")}},mt.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)}))},vt.isReady.get=function(){return this._isReady},vt.readiness.get=function(){return this._readiness},mt.prototype._start=function(){this._isReady||(this._cmp=new y(this._config.cmp),this._collector=new bt(this._config),this._collector.reset(),this._isReady=!0,this._resolve(),A.start(),this._collector.start())},vt.page.get=function(){return this._collector.page},vt.user.get=function(){return this._collector.user},vt.site.get=function(){return this._collector._site},vt.search.get=function(){return this._collector.search},vt.funnel.get=function(){return this._collector.funnel},vt.cmp.get=function(){return this._cmp},vt.opt.get=function(){return c},vt.collection.get=function(){return this._collector.collection},vt.isActionEnabled.get=function(){return this._collector.isActionEnabled},vt.isActionEnabled.set=function(t){this._collector.isActionEnabled=t},vt.isDebugging.get=function(){return j.isActive},vt.isDebugging.set=function(t){j.isActive=t},mt.prototype.push=function(t,e){m(t,e)},mt.prototype.reset=function(t){this._collector.reset()},mt.prototype.collect=function(){this._collector.collect()},Object.defineProperties(mt.prototype,vt);var Nt=new mt;Nt.Collection=n,Nt.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}(Nt,{});var Ot={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"}},Ct="undefined",Et="heading",Tt="component",At="content",Lt=Node.DOCUMENT_POSITION_PRECEDING|Node.DOCUMENT_POSITION_CONTAINED_BY,It=function(t){this._label=t.textContent.trim(),this._level=Number(t.tagName.charAt(1))},jt={level:{configurable:!0},label:{configurable:!0}};jt.level.get=function(){return this._level},jt.label.get=function(){return this._label},Object.defineProperties(It.prototype,jt);var Pt=function(t,e,n){this._type=Ct,this._node=t,this._target=e,this._level=n,this._label="",this._component="",this._isValid=!0,this.analyse()},St={type:{configurable:!0},level:{configurable:!0},label:{configurable:!0},component:{configurable:!0},node:{configurable:!0},target:{configurable:!0},isValid:{configurable:!0}};Pt.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)&Lt)>0})).map((function(t){return new It(t)})).reverse()},Pt.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=Tt,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 It(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 It(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},Pt.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=Et,this._label=e.join(" › "),!0)},Pt.prototype.analyse=function(){if(this._parseHeadings(),!this._getComponent()&&!this._getHeading()&&this._node===this._target){var t=this._node.textContent.trim();t&&(this._type=At,this._label=t)}},St.type.get=function(){return this._type},St.level.get=function(){return this._level},St.label.get=function(){return this._label},St.component.get=function(){return this._component},St.node.get=function(){return this._node},St.target.get=function(){return this._target},St.isValid.get=function(){return this._isValid},Object.defineProperties(Pt.prototype,St);var wt=function(t){this._node=t,this._process()},kt={localComponent:{configurable:!0},globalComponent:{configurable:!0},label:{configurable:!0},title:{configurable:!0},component:{configurable:!0}};wt.prototype._process=function(){var t=new Pt(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 Pt(e,this._node,this._level);switch(!0){case n.type===Ct:case!n.isValid:case n.label===this._members[0].label&&n.type===Et&&this._members[0].type===Tt:break;case n.label===this._members[0].label&&n.type===Tt&&this._members[0].type===Et: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=k(this._members[this._members.length-1].label),this._title=k(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=k(i.join(" › ")),this._localComponent=i[i.length-1],this._globalComponent=i[0]},kt.localComponent.get=function(){return this._localComponent},kt.globalComponent.get=function(){return this._globalComponent},kt.label.get=function(){return this._label},kt.title.get=function(){return this._title},kt.component.get=function(){return this._component},Object.defineProperties(wt.prototype,kt);var xt=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=C.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))},Dt={isMuted:{configurable:!0},regulation:{configurable:!0},action:{configurable:!0}};xt.prototype._init=function(){var e=this;this._hierarchy=new wt(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=pt.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()},Dt.isMuted.get=function(){return this._action?this._action.isMuted:this._isMuted},Dt.isMuted.set=function(t){this._isMuted=t,this._action&&(this._action.isMuted=t)},Dt.regulation.get=function(){return this._regulation},Dt.regulation.set=function(t){this._regulation=t,this._action&&(this._action.regulation=t)},Dt.action.get=function(){return this._action},xt.prototype.rewind=function(){this._hasBegun=!1,this.begin()},xt.prototype.begin=function(t){void 0===t&&(t={}),this._hasBegun||(this._hasBegun=!0,this._type.isBeginning&&(this._type.isSingular||this._isRating)&&A.appendStartingAction(this._action,t))},xt.prototype.act=function(t){var e=this;void 0===t&&(t={}),this._isMuted||(this._action?A.appendEndingAction(this._action,t):requestAnimationFrame((function(){return e.act(t)})))},xt.prototype.dispose=function(){pt.remove(this._action)},Object.defineProperties(xt.prototype,Dt);var Rt={RATING:t.internals.ns.attr("analytics-rating"),ACTION:t.internals.ns.attr("analytics-action")},Mt=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=C.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!==C.NONE?i:this._regulation;var r=this.getAttribute(Rt.ACTION),o="string"==typeof r&&"false"!==r.toLowerCase()&&"true"!==r.toLowerCase()?k(r):this._title;this._isRating=this.hasAttribute(Rt.RATING),this._actionElement=new xt(this.node,this._type,this.id,this._category,o,this._parameters,this._isRating,this._regulation),this._isMuted&&(this._actionElement.isMuted=!0),this.addDescent(dt.REWIND,this.rewind.bind(this)),this._sort(t)},n.prototype.getRegulation=function(){var t=this.getAttribute(Rt.ACTION);switch(!0){case"string"==typeof t&&"false"===t.toLowerCase():return C.PREVENT;case null!==t:return C.ENFORCE;default