/*! For license information please see Pulse.js.LICENSE.txt */ (()=>{"use strict";var e={};function t(e,t){if(!e)return null;let n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;for(;e&&!n.call(e,t);)e=e.parentElement;return e}function n(e){"complete"===document.readyState?e():window.addEventListener("load",(()=>{setTimeout(e)}))}e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();class i{constructor(){this._unloadCallbacks=[],this._initEventListener()}_initEventListener(){window.addEventListener("beforeunload",(e=>{for(let t=0;t{for(let t=0;t=0,o=t.left<=i&&t.left+t.width>=0;return r&&o}function c(){let{scrollTop:e=scrollY,clientHeight:t=window.innerHeight,scrollHeight:n=document.body.scrollHeight}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(arguments.length>2?arguments[2]:void 0)?e<=t*i:e>=n-(t+t*i)}function u(e,t,n){const i=new RegExp(`([\\?&])${n?t:encodeURIComponent(t)}=([^&#]*)`).exec(e);return i&&(n?i[2]:decodeURIComponent(i[2]))}function d(e,t){return h(e,"trk",t)}function h(e,t,n,i){if(!e||!t)throw new Error(`Required param of addQueryParam missing: url = ${e}, key = ${t}`);t=encodeURIComponent(t),n=encodeURIComponent(n);const r=u(e,t,!0);if(r)return i?e.replace(r,n):e;{const i=e.indexOf("?");let[r,o]=e.split("#"),a="&";return i<0?a="?":i===e.length-1&&(a=""),o&&(o=`#${o}`),`${r}${a}${t}=${n}${o||""}`}}function p(e,t,n){var i=this;if("function"!=typeof e)throw new TypeError("Expected a function.");let r;return function(){for(var o=arguments.length,a=new Array(o),s=0;s{r=null,n||e.apply(i,a)}),t),l&&e.apply(i,a)}}function f(e){const t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return t&&t[2]}function m(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=document.createEvent("CustomEvent");i.initCustomEvent(t,!0,!0,n),e.dispatchEvent(i)}function g(){let e,t;const n=new Promise(((n,i)=>{e=n,t=i}));return n.resolve=e,n.reject=t,n}function v(e){return void 0!==e.msHidden?e.msHidden:void 0!==e.hidden?e.hidden:void 0}function y(e){return"string"!=typeof e?null:e.split("?")[0]}var E=Object.freeze({__proto__:null,closest:t,onload:n,UnloadHandler:r,PagehideHandler:a,makeArray:s,outerWidth:function(e){let t=e.offsetWidth,n=getComputedStyle(e);return t+=(parseInt(n.marginLeft,10)||0)+(parseInt(n.marginRight,10)||0),t},elementInViewport:l,hasElementScrolledToThreshold:c,getQueryParam:u,addTrackingCode:d,addQueryParam:h,debounce:p,getCookie:f,dispatchCustomEvent:m,getDeferredPromise:g,isDocumentHidden:v,stripQueryParams:y,getUrlWithQueryParamObject:function(e,t){if(!e||!t)return e;let n=e;for(const e of Object.keys(t))n=h(n,e,t[e],!0);return n},getQueryParameters:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.href;const t={};if(e){const n=e.split("?")[1],i=n&&n.split("&");i&&i.forEach((e=>{const n=e.split("=");t[n[0]]=decodeURIComponent(n[1])}))}return t}});function b(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.querySelector('meta[name="pageKey"]'),i=e.getElementById("config"),r=i&&"true"===i.dataset.disableJsbeaconPagekeySuffix;return n&&n.content?`${n.content}${r||t.skipSuffix?"":"_jsbeacon"}`:""}function _(e){let t=e.querySelector('meta[name="linkedin:pageTag"]');return t&&t.content||""}function w(){var e,t;const n=null===(e=window.atob(f("li_gp")))||void 0===e||null===(t=e.split(";")[2])||void 0===t?void 0:t[0];return!!n&&!parseInt(n)}function T(e){let t=e.querySelector('meta[name="locale"]');return t&&t.content||""}function S(e){let t=e.domain;return t?t.split(".").slice(-2).join("."):""}function C(e){return e&&'"'===e.charAt(0)&&'"'===e.charAt(e.length-1)?e.slice(1,-1):e}var I=Object.freeze({__proto__:null,getPageKey:b,getPageTag:_,getLiSugrCookie:function(){return f("li_sugr")},getGuestRetargetingOptOut:w,getLocale:T,getDomain:S,trimDoubleQuotes:C});const k={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",ESCAPE:"Escape",ENTER:"Enter",SPACEBAR:" ",TAB:"Tab"},A={Down:k.ARROW_DOWN,Right:k.ARROW_RIGHT,Left:k.ARROW_LEFT,Up:k.ARROW_UP,Esc:k.ESCAPE,Spacebar:k.SPACEBAR,Tab:k.TAB};function L(e){return A[e]||e}const O="click",R="keydown",N="focusEl";class x{constructor(e,t,n){let{mainButton:i,closeButton:r}=n,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!e)throw Error("An element must be provided to Collapsible");if(!t)throw Error("An expandable element must be provided to Collapsible");if(!i)throw Error("A main button element must be provided to Collapsible");this.el=e,this.expandableEl=t,this._isList=["UL","OL","DL"].includes(this.expandableEl.tagName);const{isOpen:a=!1}=o;this.isOpen=a,this.mainButton=i,this.closeButton=r,this.buttons=[i],this._isList&&this.el.addEventListener("keyup",(e=>this._onKeyUp(e))),this.expandableEl.addEventListener(R,(e=>this._onKeyDown(e))),this.mainButton.addEventListener(O,(e=>this.closeButton?this._open(e):this._toggle(e))),this.mainButton.addEventListener(R,(e=>this._onButtonKeyDown(e))),this.closeButton&&(this.closeButton.addEventListener(O,(()=>this.close())),this.closeButton.addEventListener(R,(e=>this._onButtonKeyDown(e))),this.buttons.push(this.closeButton))}get isList(){return this._isList}_toggle(e){this.isOpen?this.close():this._open(e)}_onButtonKeyDown(e){switch(L(e.key)){case k.ENTER:case k.SPACEBAR:e.preventDefault(),this.isOpen?this.close():this._open(e);break;case k.ARROW_UP:this.isOpen||this._open(e);break;case k.ARROW_DOWN:this.isOpen&&this.close()}}_onKeyUp(e){L(e.key)===k.SPACEBAR&&e.preventDefault()}_onKeyDown(e){const n=L(e.key);if(n===k.ESCAPE&&this.isOpen)this.close();else if(this._isList){let i;switch(n){case k.SPACEBAR:m(e.target,O);break;case k.ARROW_LEFT:case k.ARROW_UP:i=t(e.target,"li");let n=i.previousElementSibling;n&&m(n,N);break;case k.ARROW_RIGHT:case k.ARROW_DOWN:i=t(e.target,"li");let r=i.nextElementSibling;r&&m(r,N)}}}_open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isOpen){const{key:t}=e;this.isOpen=!0,this.buttons.forEach((e=>e.setAttribute("aria-expanded",this.isOpen))),m(this.el,"open",{key:t})}}close(){let{shouldReturnFocusToTrigger:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.isOpen&&(this.isOpen=!1,this.buttons.forEach((e=>e.setAttribute("aria-expanded",this.isOpen))),m(this.el,"close"),e&&setTimeout((()=>{this.mainButton.focus()}),250))}}let P,M;const D=1e4,U=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([disabled]):not([tabindex^="-"]):not([type="hidden"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])'],B=[...U,'[tabindex]:not([tabindex^="-"]):not([disabled])'].join(","),F=[...U,"[tabindex]:not([disabled])"].join(",");function q(e){const t=window.getComputedStyle(e);return"hidden"===t.visibility||"none"===t.display}function H(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement,i=arguments.length>2?arguments[2]:void 0;return e===n?!q(e):i&&i.get(e)?i.get(e):(q(e)?t=!1:e.parentNode&&(t=H(e.parentNode,n,i)),i&&i.set(e,t),t)}const G=["CODE","TEMPLATE","SCRIPT"],j={POLITE:"polite",ASSERTIVE:"assertive"};function W(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j.POLITE,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D;P&&(P.removeAttribute("aria-hidden"),P.setAttribute("aria-live",t),P.textContent=e,clearTimeout(M),M=setTimeout((()=>{P.textContent=""}),n))}class V{constructor(e){if(!e)throw new Error("An element must be passed in to Disable Background Navigation");this._container=e,this._hiddenElements=[]}disableBackground(){let e=this._container;for(;e&&e!==document.body&&e.parentElement;)this._hiddenElements=this._hiddenElements.concat([...e.parentElement.children].filter((t=>t!==e&&"true"!==t.getAttribute("aria-hidden")&&!t.classList.contains("top-level-modal-container")&&(t.setAttribute("aria-hidden",!0),!0)))),e=e.parentElement}enableBackground(){this._hiddenElements.forEach((e=>{e.removeAttribute("aria-hidden")})),this._hiddenElements=[]}}const K=["class","disabled","style","tabindex","type"];class z{constructor(e){if(!e)throw new Error("FocusTrap: No focus trap container passed in");this._container=e,this._observer=new MutationObserver((()=>this._setFirstAndLastFocusableEls(this._container))),this._handleKeyDown=this._focusTrap.bind(this),this._backgroundNavigationDisabler=new V(this._container)}init(){this._observer.observe(this._container,{attributeFilter:K,attributes:!0,childList:!0,subtree:!0}),this._setFirstAndLastFocusableEls(this._container),this._container.addEventListener("keydown",this._handleKeyDown),this._backgroundNavigationDisabler.disableBackground()}tearDown(){this._observer.disconnect(),this._container.removeEventListener("keydown",this._handleKeyDown),this._backgroundNavigationDisabler.enableBackground()}_focusTrap(e){const{key:t,target:n}=e,i=L(t),r=i===k.TAB&&e.shiftKey;!r&&i===k.TAB&&n===this.lastFocusableEl?(this.firstFocusableEl.focus(),e.preventDefault()):r&&n===this.firstFocusableEl&&(this.lastFocusableEl.focus(),e.preventDefault())}_setFirstAndLastFocusableEls(e){const[t,n]=this._getFirstAndLastFocusableEls(e);this.firstFocusableEl=t,this.lastFocusableEl=n,setTimeout((()=>{this._hasFocusBeenDropped()&&("-1"===e.getAttribute("tabindex")?e.focus():this.firstFocusableEl.focus())}),100)}_hasFocusBeenDropped(){const e=document.activeElement;return!e||e===document.body}_getFirstAndLastFocusableEls(e){const t=[...e.querySelectorAll(B)],n=new Map;let i,r,o=0,a=t.length-1;for(;(!i||!r)&&o<=a;){if(!i){const r=t[o];i=H(r,e,n)&&r,o++}if(!r){const i=t[a];r=H(i,e,n)&&i,a--}}return r=r||i,[i,r]}}const $=/.*(iPad|iPod|iPhone|Android|BB10|BlackBerry|IEMobile).*/;function X(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return!!e&&$.test(e)}const Y="collapsible-dropdown",Q=`.${Y}__list`,J=`.${Y}__button`,Z=`.${Y}__close-button`,ee="no-focus-ring";class te{constructor(e){let{getFocusItemFromListItem:t=e=>e.querySelector(B),elementToFocus:n,dropdownTriggerEl:i,dropdownContentEl:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw Error("An element must be provided to CollapsibleDropdown");this.el=e,this.dropdownContentEl=r||this.el.querySelector(Q),this._closeButton=this.el.querySelector(Z),this._isMobile=X();const o=this.dropdownContentEl.closest(`.${Y}`);if(this._isMobile&&o&&(this._focusTrap=new z(o)),!n){const e=this.dropdownContentEl===this.dropdownContentEl.parentElement.querySelector(B),t="-1"===this.dropdownContentEl.getAttribute("tabIndex");e||t||console.warn('elementToFocus not provided and the dropdown container is not focusable. Consider adding tabindex="-1" to:',this.dropdownContentEl)}this.elementToFocus=n||this.dropdownContentEl,this.dropdownTriggerEl=i||this.el.querySelector(J),this.hideClass="hidden",this.collapsible=new x(e,this.dropdownContentEl,{mainButton:this.dropdownTriggerEl}),this._handleBodyClick=this._handleBodyClick.bind(this),this._focusOutsideDropdown=this._focusOutsideDropdown.bind(this),this._leaveWindow=this._leaveWindow.bind(this),this._attachEventListeners(),this.collapsible.isList&&(this._getFocusItemFromListItem=t)}_attachEventListeners(){var e;this.el.addEventListener("open",(e=>this._showDropdownList(e))),this.el.addEventListener("close",(()=>this._hideDropdownList())),this.collapsible.isList&&this.dropdownContentEl.addEventListener("focusEl",(e=>this._manageFocus(e))),null===(e=this._closeButton)||void 0===e||e.addEventListener("click",(e=>this._handleCloseButtonClick(e)))}_manageFocus(e){const{target:t}=e;if(t&&this._getFocusItemFromListItem){const e=this._getFocusItemFromListItem(t);e&&e.focus()}}_handleBodyClick(e){this.el.contains(e.target)||this.collapsible.close({shouldReturnFocusToTrigger:!1})}_handleCloseButtonClick(e){var t;null===(t=e.stopPropagation)||void 0===t||t.call(e),this.collapsible.close({shouldReturnFocusToTrigger:!0})}_showDropdownList(e){window.addEventListener("blur",this._leaveWindow),this.dropdownContentEl.classList.remove(this.hideClass),this.elementToFocus.focus();const{key:t}=e&&e.detail;var n;(t?this.elementToFocus.classList.remove(ee):this.elementToFocus.classList.add(ee),document.addEventListener("mousedown",this._handleBodyClick),this._isMobile)?null===(n=this._focusTrap)||void 0===n||n.init():this.el.addEventListener("focusout",this._focusOutsideDropdown)}_hideDropdownList(){var e;this._isMobile?null===(e=this._focusTrap)||void 0===e||e.tearDown():this.el.removeEventListener("focusout",this._focusOutsideDropdown);document.removeEventListener("mousedown",this._handleBodyClick),window.removeEventListener("blur",this._leaveWindow),this.dropdownContentEl.classList.add(this.hideClass)}_focusOutsideDropdown(e){e.relatedTarget&&!this.el.contains(e.relatedTarget)&&this.collapsible.isOpen&&this.collapsible.close({shouldReturnFocusToTrigger:this._shouldReturnFocusToTrigger})}_leaveWindow(){this.collapsible.isOpen&&this.collapsible.close({shouldReturnFocusToTrigger:this._shouldReturnFocusToTrigger})}shouldReturnFocusToTrigger(e){this._shouldReturnFocusToTrigger=e}close(){this.collapsible.close({shouldReturnFocusToTrigger:this._shouldReturnFocusToTrigger})}}function ne(e){let{method:t="GET",headers:n={},sendCookies:i=!0,skipCsrfToken:r=!1,postData:o,isPemEnabled:a=!1,pemDegradationTrackingMetadata:s=[],pemEntityIds:l=[]}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const c={method:t,headers:n,body:null};if(!r){const e=f("JSESSIONID");e&&(c.headers["Csrf-Token"]=C(e))}i&&(c.credentials="include"),"POST"!==c.method&&"PUT"!==c.method||(c.body=o);const u=fetch(e,c),d=u.then((n=>n.ok||304===n.status?n.text().then((e=>(n.responseText=e,n))):n.text().then((i=>{const r=new Error(`${t} request for ${e} has failed with status code ${n.status}`);return n.responseText=i,r.response=n,Promise.reject(r)}))));return a&&(s.length?function(e,t,n,i){try{window.tracking.then((r=>{window.pemTracking.then((o=>{o.trackFeatureDegradationsForFetch(t,n,i,e,r.state.currentPageInstance)}))}))}catch(e){}}(u,e,l,s):console.warn("Please set the value for the option pemDegradationTrackingMetadata when PEM is enabled.")),d}class ie{constructor(e){if(!e)throw Error("An element must be provided to LanguageSelector");this._el=e,this.listEl=this._el.querySelector(".collapsible-dropdown__list"),this.dropdownTriggerEl=this._el.querySelector(".language-selector__button"),this.currentListItem=this.listEl.querySelector(".language-selector__link--selected"),this.collapsibleDropdown=new te(e,{dropdownTriggerEl:this.dropdownTriggerEl,elementToFocus:this.currentListItem}),this._attachCustomEventListeners()}_attachCustomEventListeners(){this.listEl.addEventListener("click",this._handleLocaleButtonClick.bind(this))}_handleLocaleButtonClick(e){return function(e){const t=C(f("bcookie")||"");return ne(`${function(e){let t="";return e.indexOf("linkedin.cn")>-1?t="https://www.linkedin.cn":e.indexOf("linkedin-ei.cn")>-1?t="https://www.linkedin-ei.cn":e.indexOf("linkedin-ei.com")>-1?t="https://www.linkedin-ei.com":e.indexOf("linkedin.com")>-1&&(t="https://www.linkedin.com"),t}(S(document))}/psettings/update-language/cors?csrfToken=${encodeURIComponent(t)}`,{method:"POST",headers:{"Content-Type":"application/json"},postData:JSON.stringify({locale:e}),skipCsrfToken:!0})}(e.target.getAttribute("data-locale")).then((()=>{location.reload()}))}}var re="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e.g?e.g:"undefined"!=typeof self?self:{},oe=(parseInt,"object"==typeof re&&re&&re.Object===Object&&re),ae="object"==typeof self&&self&&self.Object===Object&&self;oe||ae||Function("return this")(),Object.prototype.toString,Math.max,Math.min;const se={LIGHT:"light",DARK:"dark",SYSTEM:"system"},le="dark";function ce(){const e=document.getElementById("config");let t;return e&&e.dataset&&(t=e.dataset.theme),t?document.documentElement.classList.contains(le)?se.DARK:se.LIGHT:void 0}var ue,de=["transporterKeys"],he=["breadcrumb"],pe=["$type"],fe=["requestStart"],me=["requestTime","viewNames","requestType","requestTag"],ge=["requestStart"],ve=["requestStart"],ye=["requestTime","viewNames","requestType"];function Ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function be(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Le(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Re(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Oe(e){return function(e){if(Array.isArray(e))return Ne(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Re(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Re(e,t){if(e){if("string"==typeof e)return Ne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ne(e,t):void 0}}function Ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:0;return(Ve[e[t+0]]+Ve[e[t+1]]+Ve[e[t+2]]+Ve[e[t+3]]+"-"+Ve[e[t+4]]+Ve[e[t+5]]+"-"+Ve[e[t+6]]+Ve[e[t+7]]+"-"+Ve[e[t+8]]+Ve[e[t+9]]+"-"+Ve[e[t+10]]+Ve[e[t+11]]+Ve[e[t+12]]+Ve[e[t+13]]+Ve[e[t+14]]+Ve[e[t+15]]).toLowerCase()}function $e(e){if(!We(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function Xe(e,t,n){function i(e,i,r,o){var a;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n>>9<<4)+1}function Qe(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function Je(e,t,n,i,r,o){return Qe((a=Qe(Qe(t,e),Qe(i,o)))<<(s=r)|a>>>32-s,n);var a,s}function Ze(e,t,n,i,r,o,a){return Je(t&n|~t&i,e,t,r,o,a)}function et(e,t,n,i,r,o,a){return Je(t&i|n&~i,e,t,r,o,a)}function tt(e,t,n,i,r,o,a){return Je(t^n^i,e,t,r,o,a)}function nt(e,t,n,i,r,o,a){return Je(n^(t|~i),e,t,r,o,a)}Xe("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n>5]>>>r%32&255,a=parseInt(i.charAt(o>>>4&15)+i.charAt(15&o),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[i/8])<>>32-t}Xe("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var i=unescape(encodeURIComponent(e));e=[];for(var r=0;r>>0;E=y,y=v,v=at(g,30)>>>0,g=m,m=w}n[0]=n[0]+m>>>0,n[1]=n[1]+g>>>0,n[2]=n[2]+v>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+E>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));var st=Uint8Array,lt=Uint16Array,ct=Uint32Array,ut=new st([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),dt=new st([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ht=new st([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),pt=function(e,t){for(var n=new lt(31),i=0;i<31;++i)n[i]=t+=1<>>1|(21845&Et)<<1;bt=(61680&(bt=(52428&bt)>>>2|(13107&bt)<<2))>>>4|(3855&bt)<<4,yt[Et]=((65280&bt)>>>8|(255&bt)<<8)>>>1}var _t=function(e,t,n){for(var i=e.length,r=0,o=new lt(t);r>>l]=c}else for(a=new lt(i),r=0;r>>15-e[r]);return a},wt=new st(288);for(Et=0;Et<144;++Et)wt[Et]=8;for(Et=144;Et<256;++Et)wt[Et]=9;for(Et=256;Et<280;++Et)wt[Et]=7;for(Et=280;Et<288;++Et)wt[Et]=8;var Tt=new st(32);for(Et=0;Et<32;++Et)Tt[Et]=5;var St=_t(wt,9,0),Ct=_t(Tt,5,0),It=function(e){return(e+7)/8|0},kt=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8},At=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},Lt=function(e,t){for(var n=[],i=0;ih&&(h=o[i].s);var p=new lt(h+1),f=Ot(n[u-1],p,0);if(f>t){i=0;var m=0,g=f-t,v=1<t))break;m+=v-(1<>>=g;m>0;){var E=o[i].s;p[E]=0&&m;--i){var b=o[i].s;p[b]==t&&(--p[b],++m)}f=t}return[new st(p),f]},Ot=function e(t,n,i){return-1==t.s?Math.max(e(t.l,n,i+1),e(t.r,n,i+1)):n[t.s]=i},Rt=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new lt(++t),i=0,r=e[0],o=1,a=function(e){n[i++]=e},s=1;s<=t;++s)if(e[s]==r&&s!=t)++o;else{if(!r&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(r),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(r);o=1,r=e[s]}return[n.subarray(0,i),t]},Nt=function(e,t){for(var n=0,i=0;i>>8,e[r+2]=255^e[r],e[r+3]=255^e[r+1];for(var o=0;o4&&!I[ht[A-1]];--A);var L,O,R,N,x=c+5<<3,P=Nt(r,wt)+Nt(o,Tt)+a,M=Nt(r,h)+Nt(o,m)+a+14+3*A+Nt(T,I)+(2*T[16]+3*T[17]+7*T[18]);if(x<=P&&x<=M)return xt(t,u,e.subarray(l,l+c));if(kt(t,u,1+(M15&&(kt(t,u,F[S]>>>5&127),u+=F[S]>>>12)}}}else L=St,O=wt,R=Ct,N=Tt;for(S=0;S255){q=i[S]>>>18&31,At(t,u,L[q+257]),u+=O[q+257],q>7&&(kt(t,u,i[S]>>>23&31),u+=ut[q]);var H=31&i[S];At(t,u,R[H]),u+=N[H],H>3&&(At(t,u,i[S]>>>5&8191),u+=dt[H])}else At(t,u,L[i[S]]),u+=O[i[S]];return At(t,u,L[256]),u+O[256]},Mt=new ct([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Dt=new st(0),Ut=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,i=9;--i;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),Bt=function(e,t,n,i,r){return function(e,t,n,i,r,o){var a=e.length,s=new st(i+a+5*(1+Math.ceil(a/7e3))+r),l=s.subarray(i,s.length-r),c=0;if(!t||a<8)for(var u=0;u<=a;u+=65535){var d=u+65535;d>=a&&(l[c>>3]=o),c=xt(l,c+1,e.subarray(u,d))}else{for(var h=Mt[t-1],p=h>>>13,f=8191&h,m=(1<7e3||I>24576)&&N>423){c=Pt(e,l,0,_,w,T,C,I,A,u-A,c),I=S=C=0,A=u;for(var x=0;x<286;++x)w[x]=0;for(x=0;x<30;++x)T[x]=0}var P=2,M=0,D=f,U=O-R&32767;if(N>2&&L==b(u-U))for(var B=Math.min(p,N)-1,F=Math.min(32767,u),q=Math.min(258,N);U<=F&&--D&&O!=R;){if(e[u+P]==e[u+P-U]){for(var H=0;HP){if(P=H,M=U,H>B)break;var G=Math.min(U,H-2),j=0;for(x=0;xj&&(j=V,R=W)}}}U+=(O=R)-(R=g[O])+32768&32767}if(M){_[I++]=268435456|gt[P]<<18|vt[M];var K=31>[P],z=31&vt[M];C+=ut[K]+dt[z],++w[257+K],++T[z],k=u+P,++S}else _[I++]=e[u],++w[e[u]]}}c=Pt(e,l,o,_,w,T,C,I,A,u-A,c),!o&&7&c&&(c=xt(l,c+1,Dt))}return function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var i=new(2==e.BYTES_PER_ELEMENT?lt:4==e.BYTES_PER_ELEMENT?ct:st)(n-t);return i.set(e.subarray(t,n)),i}(s,0,i+It(c)+r)}(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,i,!r)},Ft=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},qt="undefined"!=typeof TextDecoder&&new TextDecoder;try{qt.decode(Dt,{stream:!0})}catch(Sr){}function Ht(){return"undefined"!=typeof window&&"function"==typeof window.fetch}function Gt(){try{return Ht()&&"keepalive"in new Request("")}catch(e){return!1}}function jt(e){var t=e.body,n=e.keepalive,i=e.headers,r=e.compress;i["content-type"]||(i["content-type"]="text/plain;charset=UTF-8");var o=t;if(r&&"undefined"!=typeof TextEncoder)try{o=function(e,t){t||(t={});var n=function(){var e=-1;return{p:function(t){for(var n=e,i=0;i>>8;e=n},d:function(){return~e}}}(),i=e.length;n.p(e);var r=Bt(e,t,function(e){return 10+(e.filename&&e.filename.length+1||0)}(t),8),o=r.length;return function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&Ft(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var i=0;i<=n.length;++i)e[i+10]=n.charCodeAt(i)}}(r,t),Ft(r,o-8,n.d()),Ft(r,o-4,i),r}((new TextEncoder).encode(t)),i["content-encoding"]="gzip"}catch(e){}return{body:o,keepalive:n,credentials:"include",headers:i,method:"POST",mode:"cors"}}function Wt(e){return e&&"message"in e?e.message:"UNKNOWN_ERROR"}var Vt,Kt="undefined"!=typeof navigator&&"sendBeacon"in navigator,zt=Gt()?function(e,t,n,i){return new Promise((function(r){fetch(e,jt({body:t,keepalive:!0,headers:n,compress:i})).catch((function(){return fetch(e,jt({body:t,keepalive:!1,headers:n,compress:i}))})).then((function(e){e.ok?r({type:"success",drop:!1,statusCode:e.status}):r({type:"response",drop:!0,statusCode:e.status,rawError:e.statusText})}),(function(e){return r({type:"network",drop:!0,rawError:Wt(e)})}))}))}:function(e,t,n,i){return new Promise((function(r){if(Kt){var o=!1;try{o=navigator.sendBeacon(e,t)}catch(e){}if(o)return void r({type:"unknown",drop:!1})}fetch(e,jt({body:t,keepalive:!1,headers:n,compress:i})).then((function(e){e.ok?r({type:"success",drop:!1,statusCode:200}):r({type:"response",drop:!0,statusCode:e.status,rawError:e.statusText})}),(function(e){return r({type:"network",drop:!0,rawError:Wt(e)})}))}))};function $t(e){return new Promise((function(t,n){e.oncomplete=e.onsuccess=function(){return t(e.result)},e.onabort=e.onerror=function(){return n(e.error)}}))}function Xt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"key",i=arguments.length>3?arguments[3]:void 0,r=indexedDB.open(e);r.onupgradeneeded=function(){try{r.result.createObjectStore(t,{keyPath:n})}catch(e){null==i||i.onError(e)}};var o=new Promise((function(e,t){r.onsuccess=function(){var t=r.result;t.onversionchange=function(){return t.close()},e(t),null==i||i.onSuccess()},r.onerror=function(){t(r.error),null==i||i.onError(r.error)}}));return function(e,n){return o.then((function(i){return n(i.transaction(t,e).objectStore(t))}))}}function Yt(){return Vt||(Vt=Xt("idb-queue","default")),Vt}function Qt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{maxNumber:1e3,batchEvictionNumber:300},n=0,i=null;return e.openKeyCursor().onsuccess=function(){var r=this.result;r&&n++1&&void 0!==arguments[1]?arguments[1]:{maxNumber:1e3,batchEvictionNumber:300},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Yt();return Jt?Promise.resolve():function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{maxNumber:1e3,batchEvictionNumber:300},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Yt();return n("readwrite",(function(n){return n.put(e),$t(n.count()).then((function(e){if(!(e<=t.maxNumber))return Qt(n,t)}))})).catch((function(e){if(e&&"QuotaExceededError"===e.name)return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{maxNumber:1e3,batchEvictionNumber:300};return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Yt())("readwrite",(function(t){return Qt(t,e)}))}(t,n)}))}(e,t,n)}function en(e,t,n){return t("readonly",(function(t){var i=[];return t.openCursor(null,n).onsuccess=function(){var t=this.result;t&&(i.push(t.value),(e<0||i.length0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;return!t||n<1||(e[t]=JSON.stringify({attempt:n,errorCode:i})),e}function nn(e){"undefined"!=typeof window&&window.__DEBUG_BEACON_TRANSPORTER&&console.debug("[beacon-transporter] ",e())}function rn(e){"undefined"!=typeof window&&window.__DEBUG_BEACON_TRANSPORTER&&console.error("[beacon-transporter] ",e())}function on(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{timeRemaining:5,timeout:1e4};"undefined"==typeof requestIdleCallback?setTimeout(e,t.fallbackTimeout||10):function n(){requestIdleCallback((function(i){i.timeRemaining()>t.timeRemaining||i.didTimeout?e():n()}),{timeout:t.timeout})}()}var an=function(){function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Pe(this,e),Ue(this,"config",void 0),Ue(this,"compress",void 0),Ue(this,"throttleControl",void 0),Ue(this,"withStore",void 0),Ue(this,"disablePersistence",!1),this.config=t,this.compress=i;var r,o,a,s=t.measureIDB;s&&performance.mark(s.createStartMark),this.withStore=Xt(t.idbName,"beacons","timestamp",{onSuccess:function(){s&&performance.measure(s.createSuccessMeasure,s.createStartMark)},onError:function(){s&&performance.measure(s.createFailMeasure,s.createStartMark),n.disablePersistence=!0}}),this.throttleControl=(r=this.replayEntries.bind(this),o=t.throttleWait,a=0,{throttledFn:function(){var e=Date.now();e-a>o&&(nn((function(){return"[throttle] Run fn() at "+String(e)})),r(),a=e)},resetThrottle:function(){a=0}})}return De(e,[{key:"onNotify",value:function(){this.disablePersistence||this.throttleControl.throttledFn()}},{key:"push",value:function(e){var t=this;if(!this.disablePersistence){var n=function(){nn((function(){return"Persisting to DB "+e.url})),Zt(e,t.config,t.withStore).then((function(){t.throttleControl.resetThrottle(),nn((function(){return"push completed"}))})).catch((function(){t.disablePersistence=!0,rn((function(){return"push failed"}))}))};this.config.useIdle?on(n):n()}}},{key:"clear",value:function(){var e=this;return this.disablePersistence?Promise.resolve():function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Yt();return Jt=!0,e("readwrite",(function(e){return e.clear(),$t(e.transaction).finally((function(){return Jt=!1}))}))}(this.withStore).catch((function(){e.disablePersistence=!0,rn((function(){return"clear failed"}))}))}},{key:"peek",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.disablePersistence?Promise.resolve([]):function(){return en(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Yt(),"next")}(t,this.withStore).catch((function(){return e.disablePersistence=!0,rn((function(){return"peek failed"})),[]}))}},{key:"peekBack",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.disablePersistence?Promise.resolve([]):function(){return en(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Yt(),"prev")}(t,this.withStore).catch((function(){return e.disablePersistence=!0,rn((function(){return"peekBack failed"})),[]}))}},{key:"replayEntries",value:function(){var e=this;if(!this.disablePersistence){var t=function(){nn((function(){return"Replaying entry: shift from store"})),function(){return function(e,t){return t("readwrite",(function(t){var n=[];return t.openCursor(null,"next").onsuccess=function(){var t=this.result;t&&(n.push(t.value),t.delete(),(e<0||n.length0&&void 0!==arguments[0]?arguments[0]:1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Yt())}(1,e.withStore).then((function(t){if(t.length>0){var n,i,r=t[0],o=r.url,a=r.body,s=r.headers,l=r.timestamp,c=r.statusCode,u=r.attemptCount;return nn((function(){return"header: ".concat(String(e.config.headerName),"; attemptCount: ").concat(u)})),null===(n=(i=e.config).onBeforeRetry)||void 0===n||n.call(i,a),zt(o,a,tn(s,e.config.headerName,u,c),e.compress).then((function(t){if("unknown"===t.type||"success"===t.type){var n,i;null===(n=(i=e.config).onResult)||void 0===n||n.call(i,t,a),e.replayEntries()}else{var r,s,d,h,p,f;if(u+1>e.config.attemptLimit)return nn((function(){return"Exceeded attempt count, dropping the entry: "+JSON.stringify({url:o,timestamp:l,statusCode:c},null,2)})),t.drop=!0,void(null===(r=(s=e.config).onResult)||void 0===r||r.call(s,t,a));if("network"===t.type||e.config.statusCodes.includes(t.statusCode))return t.drop=!1,null===(d=(h=e.config).onResult)||void 0===d||d.call(h,t,a),nn((function(){return"Replaying the entry failed, pushing back to IDB: "+JSON.stringify({url:o,timestamp:l,statusCode:c},null,2)})),Zt({url:o,body:a,timestamp:l,statusCode:c,attemptCount:u+1},e.config,e.withStore);t.drop=!0,null===(p=(f=e.config).onResult)||void 0===p||p.call(f,t,a)}}))}})).catch((function(t){e.disablePersistence=!0,t&&t.message&&rn((function(){return"Replay entry failed: ".concat(t.message)}))}))};this.config.useIdle?on(t):t()}}}]),e}(),sn=function(){function e(){Pe(this,e)}return De(e,[{key:"onNotify",value:function(){}},{key:"push",value:function(){}},{key:"clear",value:function(){return Promise.resolve()}},{key:"peek",value:function(){return Promise.resolve([])}},{key:"peekBack",value:function(){return Promise.resolve([])}}]),e}(),ln=function(){function e(t,n){Pe(this,e),Ue(this,"queue",void 0),Ue(this,"beaconListeners",new Set),this.queue=e.hasSupport&&!n.disablePersistenceRetry?new an(t,n.compress):new sn}return De(e,[{key:"pushToQueue",value:function(e){this.queue.push(e)}},{key:"notifyQueue",value:function(){this.queue.onNotify()}},{key:"clearQueue",value:function(){return this.beaconListeners.forEach((function(e){return e()})),this.queue.clear()}},{key:"peekQueue",value:function(e){return this.queue.peek(e)}},{key:"peekBackQueue",value:function(e){return this.queue.peekBack(e)}},{key:"onClear",value:function(e){this.beaconListeners.add(e)}},{key:"removeOnClear",value:function(e){this.beaconListeners.delete(e)}}]),e}();Ue(ln,"hasSupport","undefined"!=typeof globalThis&&!!globalThis.indexedDB);var cn=[502,504],un=[429,503],dn=function(){function e(t,n,i,r){var o=this,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Pe(this,e),Ue(this,"url",void 0),Ue(this,"body",void 0),Ue(this,"config",void 0),Ue(this,"persistenceConfig",void 0),Ue(this,"compress",void 0),Ue(this,"timestamp",void 0),Ue(this,"isClearQueuePending",!1),Ue(this,"onClearCallback",void 0),this.url=t,this.body=n,this.config=i,this.persistenceConfig=r,this.compress=a,this.timestamp=Date.now(),this.onClearCallback=function(){return o.isClearQueuePending=!0}}return De(e,[{key:"send",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.persistenceConfig.db.onClear(this.onClearCallback);var n=this.retryLimit;return this.retry((function(t){return zt(e.url,e.body,t,e.compress)}),n,t).finally((function(){nn((function(){return"beacon finished"})),e.persistenceConfig.db.removeOnClear(e.onClearCallback)}))}},{key:"retryLimit",get:function(){return this.config.attemptLimit}},{key:"getAttemptCount",value:function(e){return this.retryLimit-e+1}},{key:"retry",value:function(e,t,n,i){var r=this,o=this.getAttemptCount(t)-1;return e(tn(n,this.config.headerName,o,i)).then((function(i){var o,a,s,l;if(i.drop=!1,"unknown"===i.type||"success"===i.type)r.isClearQueuePending||r.persistenceConfig.disabled||r.persistenceConfig.db.notifyQueue(),s=i;else if(nn((function(){return"retry rejected "+JSON.stringify(i)})),r.shouldPersist(t,i))r.persistenceConfig.db.pushToQueue({url:r.url,body:r.body,headers:n,statusCode:i.statusCode,timestamp:r.timestamp,attemptCount:r.getAttemptCount(t)}),s={type:"persisted",drop:!1,statusCode:i.statusCode};else{if(t>0&&r.isRetryableError(i)){var c,u;null===(c=(u=r.config).onIntermediateResult)||void 0===c||c.call(u,i,r.body);var d=r.config.calculateRetryDelay(r.getAttemptCount(t),t);return nn((function(){return"in memory retry in ".concat(d,"ms")})),(l=d,new Promise((function(e){return setTimeout(e,l)}))).then((function(){return r.retry(e,t-1,n,i.statusCode)}))}(s=i).drop=!0}return null===(o=(a=r.config).onIntermediateResult)||void 0===o||o.call(a,s,r.body),s}))}},{key:"isRetryableError",value:function(e){return!("network"!==e.type&&!this.config.statusCodes.includes(e.statusCode))}},{key:"shouldPersist",value:function(e,t){return!(this.isClearQueuePending||this.persistenceConfig.disabled||navigator.onLine&&(0!==e||"network"!==t.type)&&("response"!==t.type||!this.persistenceConfig.statusCodes.includes(t.statusCode)))}}]),e}(),hn="internal:hide",pn="internal:error";function fn(e,t,n){var i=e.get(t);i&&i.push(n)||e.set(t,[n])}function mn(e,t,n){var i=e.get(t);i&&i.splice(i.indexOf(n)>>>0,1)}var gn,vn,yn=(gn=new Map,vn=new Map,{on:function(e,t){fn(gn,e,t)},before:function(e,t){fn(vn,e,t)},off:function(e,t){mn(gn,e,t)},offBefore:function(e,t){mn(vn,e,t)},emit:function(e,t){(vn.get(e)||[]).concat(gn.get(e)||[]).slice().map((function(e){e(t)}))},clear:function(){vn.clear(),gn.clear()}});if("undefined"!=typeof document&&"undefined"!=typeof window){var En=function(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||yn.emit(hn,e)};document.addEventListener("visibilitychange",En),window.addEventListener("pagehide",En)}var bn=null;if("undefined"==typeof crypto||!crypto.getRandomValues){var _n=("undefined"!=typeof FastBoot?FastBoot.require:require)("crypto");if(_n){var wn=new Uint8Array(256),Tn=wn.length;bn={rng:function(){return Tn>wn.length-16&&(_n.randomFillSync(wn),Tn=0),wn.slice(Tn,Tn+=16)}}}}"object"===("undefined"==typeof crypto?"undefined":xe(crypto))&&crypto.randomUUID;function Sn(){return rt(bn,new Array(16),0)}function Cn(e){return Oe(e).map((function(e){return String.fromCharCode(e)})).join("")}function In(){return Cn(Sn())}var kn=/^[a-zA-Z0-9/+]+[=]+$/;function An(e,t){return{pageUrn:On(e),trackingId:t||function(e){for(var t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=[],r=0,o=e.length,a=o%3,s=o-a;r>>18&63)),i.push(n.charAt(t>>>12&63)),i.push(n.charAt(t>>>6&63)),i.push(n.charAt(63&t)),r+=3;switch(a){case 2:t=e[r]<<16,t|=e[r+1]<<8,i.push(n.charAt(t>>>18&63)),i.push(n.charAt(t>>>12&63)),i.push(n.charAt(t>>>6&63)),i.push("=");break;case 1:t=e[r]<<16,i.push(n.charAt(t>>>18&63)),i.push(n.charAt(t>>>12&63)),i.push("="),i.push("=")}return i.join("")}(Sn())}}function Ln(e,t){return"urn:li:control:".concat(e,"-").concat(t)}function On(e){return"urn:li:page:".concat(e)}function Rn(e,t){return{pageInstance:t.assign({},e.pageInstance),pageKey:e.pageKey,applicationInstance:e.applicationInstance}}function Nn(e,t){return void 0!==t.allSettled?t.allSettled(e):function(e){return new Promise((function(t){var n=new Set,i=function(e){n.delete(e),0===n.size&&t()};0===e.length?t():e.map((function(e){return e.then((function(){return i(e)})).catch((function(){return i(e)}))}))}))}(e)}function xn(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}function Pn(e,t,n){if("undefined"!=typeof window&&window.indexedDB){var i,r="sequenceNumber";try{i=window.indexedDB.open(r)}catch(e){return Promise.resolve(null)}return new Promise((function(o,a){i.onupgradeneeded=function(){var e=i.result;e.objectStoreNames.contains(r)||e.createObjectStore(r,{autoIncrement:!0})},i.onsuccess=function(){var s=i.result,l=s.transaction(r,"readwrite"),c=l.objectStore(r),u=c.get(1);u.onsuccess=function(){var i=u.result;if(i){if("read"===e)return o(i);if("update"!==e)return o(null);var r,s=Object.assign({},i),l=!1,d=null!==(r=s.sequenceNumber)&&void 0!==r?r:0;if(void 0!==t&&t>d&&(s.sequenceNumber=t,l=!0),n&&Object.keys(n).forEach((function(e){var t,i=null!==(t=s[e])&&void 0!==t?t:0,r=n[e];r>i&&(s[e]=r,l=!0)})),l){var h=c.put(s,1);h.onsuccess=function(){return o(null)},h.onerror=function(){a(h.error)}}}else{var p={sequenceNumber:0};n&&Object.keys(n).forEach((function(e){p[e]=0}));var f=c.add(p);f.onsuccess=function(){return o(0)},f.onerror=function(){a(f.error)}}},u.onerror=function(){return s.close(),a(new Error("Error: get sequence number from indexedDB ".concat(String(u.error))))},l.oncomplete=function(){return s.close()}},i.onerror=function(){return o(null)}}))}return Promise.resolve(null)}function Mn(){return"undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1||!Ht()||"undefined"==typeof Promise}function Dn(e,t,n,i){var r=["core-web-tracking:".concat(e)];null==i||i.forEach((function(e){return r.push(e)})),yn.emit(pn,{tags:r,reason:t instanceof Error?t:new Error("".concat(e,": ").concat(t)),responseHeaders:n})}function Un(e){var t=window.structuredClone;return t?t(e):JSON.parse(JSON.stringify(e))}var Bn=function(){function e(t){Pe(this,e),Ue(this,"heap",void 0),Ue(this,"comparator",void 0),this.comparator=t,this.heap=[]}return De(e,[{key:"heapsize",value:function(){return this.heap.length}},{key:"peak",value:function(){return this.heap[0]}},{key:"heapArray",get:function(){return this.heap}},{key:"heapClear",value:function(){var e=Oe(this.heap);return this.heap=[],e}},{key:"heappop",value:function(){var e=this.heap.length,t=[this.heap[e-1],this.heap[0]];this.heap[0]=t[0],this.heap[e-1]=t[1];for(var n=this.heap.pop(),i=0;2*i+10;){var n=Math.floor((t-1)/2);if(!this.comparator(this.heap[t],this.heap[n]))break;var i=[this.heap[n],this.heap[t]];this.heap[t]=i[0],this.heap[n]=i[1],t=n}}}]),e}();var Fn=function(e){if(!Hn(e))return[];for(var t=[],n=0,i=Object.keys(e);n0){var c,u=Le(s);try{for(u.s();!(c=u.n()).done;){var d,h=c.value;t.includes(h)?(null!==(d=n[h])&&void 0!==d||(n[h]=[]),n[h].push(l)):i.push(l)}}catch(e){u.e(e)}finally{u.f()}}else i.push(l)}}catch(e){o.e(e)}finally{o.f()}return[n,i]};var Hn=function(e){return e&&void 0!==e&&Object.keys(e).length>0},Gn=function(e,t){return(e.endsWith("/")?e:"".concat(e,"/"))+(t.startsWith("/")?t.slice(1):t)},jn="beacons";function Wn(){if("undefined"==typeof Promise||"undefined"==typeof navigator)return!1;var e=navigator.userAgent.indexOf("Chrome")>-1,t=navigator.cookieEnabled,n=navigator.storage;return e&&Gt()&&t&&n}function Vn(e,t,n,i,r){"control"!==i&&e.retryConfig&&Wn()&&navigator.storage.estimate().then((function(o){if(!((o.quota||0)-(o.usage||0)>52428800))return function(e){var t=window.indexedDB.deleteDatabase(e);return new Promise((function(e,n){t.onsuccess=function(){return e()},t.onerror=function(){return n(t.error)}}))}(jn);var a,s,l=null!==(a=e.retryConfig.inMemory)&&void 0!==a?a:{attemptLimit:4,statusCodes:[502,504]},c=null!==(s=e.retryConfig.persist)&&void 0!==s?s:{attemptLimit:3,statusCodes:[429,503],maxNumber:1e3,batchEvictionNumber:300,throttleWait:3e5},u={compress:n,inMemoryRetry:{onIntermediateResult:null==r?void 0:r.onIntermediateResult,attemptLimit:l.attemptLimit,statusCodes:l.statusCodes,headerName:"x-li-retry-context",calculateRetryDelay:function(e){return function(e){return 1e3*Math.pow(2,e)}(e)}},disablePersistenceRetry:e.retryConfig.disablePersistence,persistenceRetry:{onBeforeRetry:null==r?void 0:r.onBeforeRetry,onResult:null==r?void 0:r.onResult,idbName:jn,attemptLimit:c.attemptLimit,statusCodes:c.statusCodes,maxNumber:c.maxNumber,batchEvictionNumber:c.batchEvictionNumber,throttleWait:c.throttleWait,useIdle:!0,measureIDB:{createStartMark:"idb_open_start",createSuccessMeasure:"idb_open_success_phase",createFailMeasure:"idb_open_fail_phase"}}},d=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Boolean(t.compress),i=Object.assign({attemptLimit:0,statusCodes:cn,calculateRetryDelay:function(e,t){return 2e3*t}},t.inMemoryRetry);if(t.retryDB)e=t.retryDB;else{var r=Object.assign({idbName:"beacon-transporter",attemptLimit:3,statusCodes:un,maxNumber:1e3,batchEvictionNumber:300,throttleWait:3e5},t.persistenceRetry);r.headerName=r.headerName||i.headerName,e=new ln(r,{compress:t.compress,disablePersistenceRetry:t.disablePersistenceRetry})}return{beacon:function(r,o,a){var s;return Ht()?new dn(r,o,i,{db:e,disabled:Boolean(t.disablePersistenceRetry),statusCodes:(null===(s=t.persistenceRetry)||void 0===s?void 0:s.statusCodes)||un},n).send(a):Promise.resolve({type:"unknown",drop:!0})},database:e}}(u),h=d.beacon,p=d.database;return e.retryBeacon={shouldRetry:!0,beacon:h,database:p},"enabled"===i?(e.retryBeacon.shouldRetry=!1,!u.disablePersistenceRetry&&t.shouldAnonymizeMemberId()?p.peekQueue(1).then((function(e){if(Array.isArray(e)&&e[0]){var t=JSON.parse(e[0].body);if(Array.isArray(t)&&t.some((function(e){return!e.eventInfo.shouldAnonymizeMemberId})))return p.clearQueue()}}),(function(){return p.clearQueue()})).then((function(){e.retryBeacon.shouldRetry=!0})).catch((function(e){Dn("retry:idb",e)})):(e.retryBeacon.shouldRetry=!0,Promise.resolve())):void 0})).catch((function(e){Dn("retry:setup",e)}))}var Kn=function(){function e(t){Pe(this,e),Ue(this,"host",void 0),this.host=t}return De(e,[{key:"checkAndEnablePersistentRetry",value:function(e,t){if("function"==typeof(null==e?void 0:e.shouldAnonymizeMemberId)&&!this.host.retryBeacon){var n=this.getRetryTreatment();this.host.retryConfig&&Vn(this.host,e,this.shouldCompressPayload(),n,t)}}},{key:"clearPersistedEventsOnLogout",value:function(){var e=this.host.retryBeacon;if(e&&e.shouldRetry)return e.shouldRetry=!1,e.database.clearQueue().catch((function(e){Dn("retry:logout",e)}))}},{key:"sendPayload",value:function(e,t,n,i){var r,o=this.getRetryTreatment();Gt()&&"control"!==o&&null!==(r=this.host.retryBeacon)&&void 0!==r&&r.shouldRetry?this.sendPayloadWithRetry(e,t,n):this.sendPayloadFireForget(e,t,n,i)}},{key:"sendPayloadWithRetry",value:function(e,t,n){(!Array.isArray(t)||t.length>0)&&this.host.retryBeacon.beacon(e,JSON.stringify(t),n).catch((function(e){Dn("retry:beacon",e)}))}},{key:"sendPayloadFireForget",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;(!Array.isArray(t)||t.length>0)&&(Mn()?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("undefined"!=typeof window&&void 0!==window.XMLHttpRequest){var i=new XMLHttpRequest;if(i.open("POST",e,!0),i.withCredentials=!0,n.headers)for(var r=0,o=Object.keys(n.headers);r0&&void 0!==arguments[0]?arguments[0]:{},t=e.cacheLifeSpan,n=void 0===t?1e4:t,i=e.regex,r=void 0===i?$n:i;if(!Xn||Date.now()-Yn>n){var o=zn&&document.cookie.match(r);Xn=o&&o[1]||"",Yn=Date.now()}return Xn}var Jn={prod:{pattern:new RegExp(/https: \/\/www.linkedin.com\/.+|https:\/\/www.linkedin.com\/li\/track$/),monitorEndpoint:"https://www.linkedin.com/trackingMonitoring/?action=reportClientFailures"},ei:{pattern:new RegExp(/https: \/\/www.linkedin-ei.com\/.+|https:\/\/www.linkedin-ei.com\/li\/track$/),monitorEndpoint:"https://www.linkedin-ei.com/trackingMonitoring/?action=reportClientFailures"},eiValidate:{pattern:new RegExp(/https:\/\/www\.linkedin-ei\.com\/.+\/validate$/),monitorEndpoint:"https://www.linkedin-ei.com/trackingMonitoring/?action=reportClientFailures"}},Zn=function(){function e(t){Pe(this,e),Ue(this,"networkTransporter",void 0),Ue(this,"inactive",void 0),Ue(this,"mpName",void 0),Ue(this,"endpoint",void 0),Ue(this,"debug",void 0),this.networkTransporter=new Kn(t),this.mpName=t.appId,this.inactive=t.inactive;var n=function(e){var t,n=!1;return Jn.prod.pattern.test(e)?t=Jn.prod.monitorEndpoint:Jn.eiValidate.pattern.test(e)?(n=!0,t=Jn.eiValidate.monitorEndpoint):Jn.ei.pattern.test(e)?t=Jn.ei.monitorEndpoint:(t=Jn.ei.monitorEndpoint,n=!0),{endpoint:t,debug:n}}(t.endpoint);this.endpoint=n.endpoint,this.debug=n.debug}return De(e,[{key:"fireFragment",value:function(e){var t;if(!this.inactive){var n={"content-type":"application/json; charset=UTF-8","x-li-track":JSON.stringify({mpName:this.mpName}),"csrf-token":Qn(),"x-restli-protocol-version":"2.0.0"},i=[],r=null!==(t=null==e?void 0:e.stats)&&void 0!==t?t:{},o=r.failures,a=r.previousInstanceEventStats.reduce((function(e,t){return e.push.apply(e,Oe(t.failures)),e}),[]);[].concat(Oe(o),Oe(a)).forEach((function(e){var t=e.reason,n=e.rawError,r=e.eventTopic,o=e.header,a=e.requestHeader;i.push({reason:t,rawError:n,failedTopicName:r,header:o,requestHeader:a})}));var s={clientTrackingFailures:i,debug:this.debug};this.networkTransporter.sendPayload(this.endpoint,s,n)}}}]),e}();function ei(e){return"string"==typeof e}function ti(e){return ei(e)?e:e.topicName||e.eventName}function ni(e){return ei(e)?e:e.eventName}var ii,ri,oi=function(){function e(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Pe(this,e),Ue(this,"host",void 0),Ue(this,"cmoTransporter",void 0),Ue(this,"clientMonitoringInstanceId",In()),Ue(this,"currentContext",{pageKey:qe,pageInstance:An(qe)}),Ue(this,"appState",{}),Ue(this,"estimatedFragmentSize",0),Ue(this,"fragmentSizeLimit",void 0),Ue(this,"activeFragmentEvent",void 0),Ue(this,"debounceTimer",void 0),this.host=t,this.cmoTransporter=i.cmoTransporter||new Zn(t),this.fragmentSizeLimit=(null===(n=t.clientMonitoringConfig)||void 0===n?void 0:n.fragmentSizeLimit)||10240,this.activeFragmentEvent=si(this.clientMonitoringInstanceId,0,0,!1,this.getEventHeaders())}return De(e,[{key:"getCurrentInstanceId",value:function(){return this.clientMonitoringInstanceId}},{key:"scheduleDebouncedFiring",value:function(){var e,t,n=this;void 0!==this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=void 0),this.fragmentIsFull()&&this.fireFragmentEventIfFull(!0),this.debounceTimer=setTimeout((function(){n.fireFragmentEventIfFull()}),null!==(e=null===(t=this.host.batching)||void 0===t?void 0:t.debounceTime)&&void 0!==e?e:1)}},{key:"logEventGenerated",value:function(e){this.scheduleDebouncedFiring();var t=this.activeFragmentEvent.stats,n=this.activeFragmentEvent.firstEventNumber+t.eventsGenerated;return t.eventTopics.push(e),t.eventsGenerated++,this.estimatedFragmentSize+=e.length,n}},{key:"logEventReadyToSend",value:function(e){this.activeFragmentEvent.stats.eventsReadyToSend+=e}},{key:"logEventSent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCurrentInstanceId();t===this.getCurrentInstanceId()?this.activeFragmentEvent.stats.eventsSent+=e:this.findPreviousInstanceStat(t,(function(t){t.eventsSent+=e}))}},{key:"logNetworkResponseCode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCurrentInstanceId(),n=this.activeFragmentEvent.stats.networkResponseStats;t!==this.getCurrentInstanceId()&&this.findPreviousInstanceStat(t,(function(e){n=e.networkResponseStats})),e>=200&&e<300?n.eventsWith2XXResponse++:400===e?n.eventsWith400Response++:408===e?n.eventsWith408Response++:429===e?n.eventsWith429Response++:e>400&&e<500?n.eventsWith4XXResponse++:500===e?n.eventsWith500Response++:502===e?n.eventsWith502Response++:503===e?n.eventsWith503Response++:504===e?n.eventsWith504Response++:e>500&&e<600&&n.eventsWith5XXResponse++}},{key:"findPreviousInstanceStat",value:function(e,t){var n,i=Le(this.activeFragmentEvent.stats.previousInstanceEventStats);try{for(i.s();!(n=i.n()).done;){var r=n.value;if(r.instanceId===e)return void t(r)}}catch(e){i.e(e)}finally{i.f()}var o=this.getEventHeaders(),a=o.header,s=o.requestHeader,l={header:Object.assign(a,{memberId:-1}),requestHeader:s,instanceId:e,eventsSent:0,eventTopics:[],networkResponseStats:{eventsWith2XXResponse:0,eventsWith400Response:0,eventsWith408Response:0,eventsWith429Response:0,eventsWith4XXResponse:0,eventsWith500Response:0,eventsWith502Response:0,eventsWith503Response:0,eventsWith504Response:0,eventsWith5XXResponse:0},failures:[]};t(l),this.activeFragmentEvent.stats.previousInstanceEventStats.push(l)}},{key:"logFailedEvent",value:function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.getCurrentInstanceId(),o=this.getEventHeaders(),a=o.header,s=o.requestHeader,l={header:Object.assign(a,{memberId:-1}),requestHeader:s,instanceId:r,instanceEventNumber:i,reason:e,rawError:n,eventName:ni(t),eventTopic:ti(t)};this.estimatedFragmentSize+=JSON.stringify(l).length,r===this.getCurrentInstanceId()?this.activeFragmentEvent.stats.failures.push(l):this.findPreviousInstanceStat(r,(function(e){e.failures.push(l)})),this.fireFragmentEventIfFull()}},{key:"flush",value:function(){this.activeFragmentEvent.isLastFragment=!0,this.fireFragmentEventIfFull(!0)}},{key:"fragmentIsFull",value:function(){return this.activeFragmentEvent.stats.eventsGenerated>=100||this.estimatedFragmentSize>=this.fragmentSizeLimit}},{key:"fireFragmentEventIfFull",value:function(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.fragmentIsFull()){this.debounceTimer=void 0;var e=this.getEventHeaders(),t=e.header,n=e.requestHeader,i=this.activeFragmentEvent;i.header=t,i.requestHeader=n,this.cmoTransporter.fireFragment(i),this.estimatedFragmentSize=0,this.activeFragmentEvent=si(this.clientMonitoringInstanceId,i.fragmentNumber+1,i.firstEventNumber+i.stats.eventsGenerated,!1,e)}}},{key:"setCurrentContext",value:function(e){this.currentContext=e}},{key:"updateAppState",value:function(e){this.host.api.assign(this.appState,e)}},{key:"getEventHeaders",value:function(){var e=void 0;this.appState.clientApplicationInstance&&((e=this.appState.clientApplicationInstance).trackingId=li(e.trackingId));var t=this.currentContext.pageInstance;return t.trackingId=li(t.trackingId),{requestHeader:{interfaceLocale:this.host.locale,pageKey:this.currentContext.pageKey,path:this.host.api.location.pathname+this.host.api.location.search,referer:this.host.api.document.referrer},header:{applicationViewerUrn:this.appState.applicationViewerUrn,clientApplicationInstance:e,pageInstance:t,time:Date.now(),version:this.host.appVersion,server:"",service:"",guid:In(),memberId:0}}}}]),e}();function ai(e){return ii||(ii=new oi(e)),{getCurrentInstanceId:function(){return ii.getCurrentInstanceId()},logEventGenerated:function(e){return ii.logEventGenerated(e)},logEventReadyToSend:function(e){ii.logEventReadyToSend(e)},logEventSent:function(e){ii.logEventSent(e)},logPersistedEventSent:function(e,t){ii.logEventSent(t,e)},logNetworkResponseCode:function(e){ii.logNetworkResponseCode(e)},logPersistedNetworkResponseCode:function(e,t){var n;null===(n=ii)||void 0===n||n.logNetworkResponseCode(t,e)},logFailedEvent:function(e,t,n,i){ii.logFailedEvent(e,t,n,i)},logPersistedFailedEvent:function(e,t,n,i,r){ii.logFailedEvent(t,n,i,r,e)},flush:function(){ii.flush()},destroy:function(){ii=void 0},isDestroyed:function(){return void 0===ii},setCurrentContext:function(e){ii.setCurrentContext(e)},updateAppState:function(e){ii.updateAppState(e)}}}function si(e,t,n,i,r){return{fragmentNumber:t,firstEventNumber:n,isLastFragment:i,stats:{instanceId:e,eventsGenerated:0,eventsReadyToSend:0,eventsSent:0,networkResponseStats:{eventsWith2XXResponse:0,eventsWith400Response:0,eventsWith408Response:0,eventsWith429Response:0,eventsWith4XXResponse:0,eventsWith500Response:0,eventsWith502Response:0,eventsWith503Response:0,eventsWith504Response:0,eventsWith5XXResponse:0},eventTopics:[],failures:[],previousInstanceEventStats:[]},requestHeader:r.requestHeader,header:r.header}}function li(e){return Array.isArray(e)?Cn(e):16===e.length?e:function(e){return"string"==typeof e&&!!e.match(kn)}(e)?atob(e):Cn(function(e){return $e(e)}(e))}!function(e){e.NONE="NONE",e.UNKNOWN_EXECUTION_ERROR="UNKNOWN_EXECUTION_ERROR",e.MISSING_REQUIRED_PROPERTIES="MISSING_REQUIRED_PROPERITES",e.STORAGE_WRITE_FAILURE="STORAGE_WRITE_FAILURE",e.RETRIES_EXCEEDED="RETRIES_EXCEEDED",e.EVENT_EVICTED_FROM_STORAGE="EVENT_EVICTED_FROM_STORAGE",e.STORAGE_UNAVAILABLE="STORAGE_UNAVAILABLE",e.SERIALIZATION_FAILURE="SERIALIZATION_FAILURE"}(ri||(ri={}));var ci=["PageViewEvent","SponsoredImpressionEvent","JobViewEvent"],ui="PageViewEvent",di=function(){function e(t){var n,i,r,o=this;Pe(this,e),Ue(this,"host",void 0),Ue(this,"queue",void 0),Ue(this,"preContextQueue",void 0),Ue(this,"debounceTimer",void 0),Ue(this,"unloadHandlers",void 0),Ue(this,"maxQueueSize",void 0),Ue(this,"flushDebounceTime",void 0),Ue(this,"trackingEventListeners",[]),Ue(this,"onHideHandler",(function(){o.forceFlush()})),Ue(this,"networkTransporter",void 0),Ue(this,"clientMonitoringConn",void 0),Ue(this,"clientGlobalSequenceNumberCounter",void 0),Ue(this,"clientTopicLocalSequenceNumberCountersMap",{}),Ue(this,"isTimerRunning",void 0),Ue(this,"trackingEndpoint",void 0),Ue(this,"isEvenBatchEnabled",void 0),this.host=t,this.queue=[],this.preContextQueue=[],this.unloadHandlers=[];var a=t.batching,s=null!==(n=null==a?void 0:a.evenBatchEnabled)&&void 0!==n&&n,l="development"===t.environment||(null===(i=t.api)||void 0===i||null===(i=i.location)||void 0===i||null===(i=i.host)||void 0===i?void 0:i.indexOf("-ei."))>-1?"https://www.linkedin-ei.com/li/track/validate":t.endpoint||"https://www.linkedin.com/li/track";this.trackingEndpoint=function(e,t){return/linkedin(?:-ei)?\.cn/.test(t)?e.replace(/\/\/(\S+?)\.linkedin(-ei)?\.com/,"//$1.linkedin$2.cn"):e}(l,null===(r=t.api)||void 0===r||null===(r=r.location)||void 0===r?void 0:r.host),this.maxQueueSize=a&&a.maxSize||1,this.flushDebounceTime=a&&a.debounceTime||0,yn.on(hn,this.onHideHandler),this.networkTransporter=new Kn(t),this.isLixEnabled("pemberly.tracking.monitoring")&&t.clientMonitoringConfig&&!t.inactive&&(this.clientMonitoringConn=ai(t)),this.getSequenceNumberFromIDB(),this.updateSequenceNumberOnExit(),this.isTimerRunning=!1,this.isEvenBatchEnabled=this.isLixEnabled("pemberly.tracking.even-batch")||s}return De(e,[{key:"checkAndEnablePersistentRetry",value:function(e){var t,n=(t=this.clientMonitoringConn,{onIntermediateResult:function(e,n){var i;if(t&&!t.isDestroyed())try{if(i=JSON.parse(n),!Array.isArray(i)||0===i.length)return;e.statusCode&&t.logNetworkResponseCode(e.statusCode),!0===e.drop&&i.forEach((function(n){var i,r=n.eventInfo.eventName,o=n.eventInfo.topicName||r,a="rawError"in e?e.rawError:"null",s=["type: ".concat(e.type),"statusCode: ".concat(e.statusCode||"null"),"drop: ".concat(String(e.drop)),"rawError: ".concat(a)].join(", ");t.logFailedEvent(ri.UNKNOWN_EXECUTION_ERROR,{eventName:r,topicName:o},s,null!==(i=n.eventBody.header.clientMonitoringInstanceEventNumber)&&void 0!==i?i:-1)}))}catch(e){}},onBeforeRetry:function(e){var n;if(t&&!t.isDestroyed())try{if(n=JSON.parse(e),!Array.isArray(n)||0===n.length||!n[0].eventBody.header.clientMonitoringInstanceId)return;var i=n[0].eventBody.header.clientMonitoringInstanceId,r=n.length;t.logPersistedEventSent(i,r)}catch(e){}},onResult:function(e,n){var i;if(t)try{if(i=JSON.parse(n),!Array.isArray(i)||0===i.length||!i[0].eventBody.header.clientMonitoringInstanceId)return;var r=i[0].eventBody.header.clientMonitoringInstanceId;e.statusCode&&t.logPersistedNetworkResponseCode(r,e.statusCode),!0===e.drop&&i.forEach((function(n){var i=n.eventInfo.eventName,o=n.eventInfo.topicName||i,a="rawError"in e?e.rawError:"null",s=["type: ".concat(e.type),"statusCode: ".concat(e.statusCode||"null"),"drop: ".concat(String(e.drop)),"rawError: ".concat(a)].join(", ");t.logPersistedFailedEvent(r,ri.UNKNOWN_EXECUTION_ERROR,{eventName:i,topicName:o},s,n.eventBody.header.clientMonitoringInstanceEventNumber)}))}catch(e){}}});this.networkTransporter.checkAndEnablePersistentRetry(e,n)}},{key:"clearPersistedEventsOnLogout",value:function(){return this.networkTransporter.clearPersistedEventsOnLogout()}},{key:"on",value:function(e){this.trackingEventListeners.push(e)}},{key:"fireEvent",value:function(e){var t=function(e){return e.meta.time=Date.now(),e}(e);this.clientMonitoringConn&&(t.meta.clientMonitoringInstanceId=this.clientMonitoringConn.getCurrentInstanceId(),t.meta.clientMonitoringInstanceEventNumber=this.clientMonitoringConn.logEventGenerated(ti(e.id)));var n=this.host,i=n.api.Promise,r=n.batching;if(function(e){return!!e.meta.context}(t)){var o,a=this.prepareCompleteEnvelopeQueue(t);return null===(o=this.clientMonitoringConn)||void 0===o||o.logEventReadyToSend(1),this.queue.push(a),r?(this.batchFire(),i.resolve(!0)):(this.flush(!0),i.resolve(!0))}return this.preContextQueue.push(t),i.resolve(!0)}},{key:"callOnDestroy",value:function(e){this.unloadHandlers.push(e)}},{key:"destroy",value:function(){var e,t,n;this.unloadHandlers.forEach((function(e){return e()})),this.forceFlush(),this.trackingEventListeners=[],this.clientMonitoringConn=void 0,yn.off(hn,this.onHideHandler),null!==(e=this.host)&&void 0!==e&&e.__getLixTreatment&&(this.host.__getLixTreatment=void 0),null!==(t=this.host)&&void 0!==t&&null!==(t=t.api)&&void 0!==t&&t.location&&(this.host.api.location=null===(n=window)||void 0===n?void 0:n.location)}},{key:"forceFlush",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.populatePreContextQueue({pageInstance:An(qe),pageKey:qe}).forEach((function(t){e.queue.push(t)})),this.isEvenBatchEnabled?1===t?this.sendPayload(void 0,!0):this.sendPayload():this.flush(!0)}},{key:"isLixEnabled",value:function(e){var t,n;return"enabled"===(null===(t=(n=this.host).__getLixTreatment)||void 0===t?void 0:t.call(n,e))}},{key:"getSequenceNumberFromIDB",value:function(){var e=this;Pn("read").then((function(t){var n;e.clientGlobalSequenceNumberCounter=null!==(n=null==t?void 0:t.sequenceNumber)&&void 0!==n?n:0,ci.forEach((function(n){var i;e.clientTopicLocalSequenceNumberCountersMap[n]=null!==(i=null==t?void 0:t[n])&&void 0!==i?i:0}))})).catch((function(e){Dn("sequence-number:idb-read",e)}))}},{key:"updateSequenceNumberToIDB",value:function(){Pn("update",this.clientGlobalSequenceNumberCounter,this.clientTopicLocalSequenceNumberCountersMap).catch((function(e){Dn("sequence-number:idb-update",e)}))}},{key:"updateSequenceNumberOnExit",value:function(){var e=this;"undefined"!=typeof window&&"undefined"!=typeof document&&window.addEventListener("beforeunload",(function t(){e.updateSequenceNumberToIDB(),window.removeEventListener("beforeunload",t)}))}},{key:"prepareCompleteEnvelopeQueue",value:function(e){var t=this,n=e.meta.context=Rn(e.meta.context,this.host.api);return"function"==typeof e.body&&(e.body=e.body(n)),this.preContextQueue.length>0&&this.populatePreContextQueue(n).forEach((function(e){return t.queue.push(e)})),e}},{key:"envelop",value:function(e,t,n){var i=this.host,r=i.appId,o=i.api,a={eventBody:t,eventInfo:"string"==typeof e?{appId:r,eventName:e,topicName:e}:o.assign({appId:r},e)};return n.length>0&&this.host.api.assign(a,{clientBreadcrumbs:n}),a}},{key:"getBreadcrumbs",value:function(e){return e.clientBreadcrumbs||[]}},{key:"getGenericEventBody",value:function(e){var t,n=this.host,i=n.appVersion,r=n.locale,o=n.api,a=o.location,s=o.document,l=o.assign,c=e.meta.context,u=c.pageKey,d=c.pageInstance,h=function(e){return"string"==typeof e?e===ui:e.eventName===ui}(e.id)&&(null===(t=e.body.requestHeader)||void 0===t?void 0:t.pageKey)||u,p=e.meta.requestHeader||{referer:s.referrer,path:"".concat(a.pathname).concat(a.search)},f=p.referer,m=p.path,g=null;"string"!=typeof r&&null!==this.host.locale||(g=r);var v={interfaceLocale:g,pageKey:h,referer:f,path:m,isFlushOnCloseBrowserTabEnabled:!Mn()&&(Gt()||"undefined"!=typeof navigator&&"sendBeacon"in navigator),isBrowserPersistentRetryEnabled:this.networkTransporter.isBrowserPersistentRetryEnabled(),clientDeviceType:"DESKTOP",timeZoneOffsetMinutes:-1*(new Date).getTimezoneOffset()},y={pageInstance:d,time:e.meta.time,version:i,server:"",service:"",guid:In(),memberId:0};"number"==typeof this.clientGlobalSequenceNumberCounter&&l(y,{clientGlobalSequenceNumber:this.clientGlobalSequenceNumberCounter});var E=ti(e.id);if(ci.includes(E)){var b=this.clientTopicLocalSequenceNumberCountersMap[E];"number"==typeof b&&l(y,{clientTopicLocalSequenceNumber:b})}var _={header:l(y,e.meta.header||{}),requestHeader:l(v,e.meta.requestHeader||{})},w=e.meta.clientMonitoringInstanceId,T=e.meta.clientMonitoringInstanceEventNumber;return w&&l(_.header,{clientMonitoringInstanceId:w,clientMonitoringInstanceEventNumber:T}),l(e.body,_)}},{key:"populatePreContextQueue",value:function(e){var t,n=this.preContextQueue;return this.preContextQueue=[],null===(t=this.clientMonitoringConn)||void 0===t||t.logEventReadyToSend(n.length),n.map((function(t){return t.meta.context=e,"function"==typeof t.body&&(t.body=t.body(e)),t}))}},{key:"trigger",value:function(e,t){this.trackingEventListeners.forEach((function(n){return n(e,t)}))}},{key:"requestFlush",value:function(e){var t=this;e((function(){t.forceFlush(0)}),{timeout:1e4})}},{key:"flush",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.host.api.requestIdleCallback;e||!t?this.sendPayload(void 0,!0):this.requestFlush(t)}},{key:"batchFire",value:function(){var e=this;this.queue.length>this.maxQueueSize?this.flush():(this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){return e.flush()}),this.flushDebounceTime))}},{key:"sendPayload",value:function(e){var t,n=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.isEvenBatchEnabled)if(Array.isArray(e)&&e.length>0)t=e;else{var r=this.maxQueueSize+1;this.queue.length>0&&(this.queue.length<=r||i)?(t=this.queue,this.queue=[]):t=this.queue.splice(0,r)}else Array.isArray(e)&&e.length>0?t=e:(t=this.queue,this.queue=[]);if(0!==t.length){"undefined"!=typeof window&&!1===this.isTimerRunning&&(this.isTimerRunning=!0,setInterval((function(){n.updateSequenceNumberToIDB()}),5e3));var o,a,s=[],l=[];t.forEach((function(e){var t=n.getGenericEventBody(e),i=n.getBreadcrumbs(e),r=n.envelop(e.id,t,i);n.trigger(r,e.meta);var o=r.eventInfo.eventName;"LixTreatmentsEvent"===o||"JavaScriptErrorEvent"===o?s.push(r):l.push(r),"number"==typeof n.clientGlobalSequenceNumberCounter&&n.clientGlobalSequenceNumberCounter++;var a=ti(e.id);ci.includes(a)&&"number"==typeof n.clientTopicLocalSequenceNumberCountersMap[a]&&n.clientTopicLocalSequenceNumberCountersMap[a]++})),this.host.inactive||(this.clientMonitoringConn&&(this.clientMonitoringConn.logEventSent(s.length+l.length),a=this.clientMonitoringConn,o={onResult:function(e,t){a&&!a.isDestroyed()&&(e.statusCode&&a.logNetworkResponseCode(e.statusCode),!0===e.drop&&t.forEach((function(t){var n=t.eventInfo.eventName,i=t.eventInfo.topicName||n,r="rawError"in e?e.rawError:"null",o=["type: ".concat(e.type),"statusCode: ".concat(e.statusCode||"null"),"drop: ".concat(String(e.drop)),"rawError: ".concat(r)].join(", ");null==a||a.logFailedEvent(ri.UNKNOWN_EXECUTION_ERROR,{eventName:n,topicName:i},o,t.eventBody.header.clientMonitoringInstanceEventNumber||-1)})))}}),this.networkTransporter.sendPayloadFireForget(this.trackingEndpoint,s,void 0,o),this.networkTransporter.sendPayload(this.trackingEndpoint,l,void 0,o))}}},{key:"getTrackingEndpoint",value:function(){return this.trackingEndpoint}}]),e}();var hi,pi=function(){function e(t,n){Pe(this,e),this.clientBreadcrumbType=t,this.id=n}return De(e,[{key:"builder",get:function(){return function(){var e={},t=new Proxy({},{get:function(n,i){return"build"===i?function(){return e}:function(n){return e[i.toString()]=n,t}}});return t}().id(this.id).clientBreadcrumbType(this.clientBreadcrumbType)}}],[{key:"toPointer",value:function(e){return{id:e.id,type:e.clientBreadcrumbType}}}]),e}();!function(e){e.UNKNOWN="UNKNOWN",e.ME_NOTIFICATION="ME_NOTIFICATION",e.ME_NOTIFICATION_ACTION="ME_NOTIFICATION_ACTION",e.JOB_VIEW="JOB_VIEW",e.MEDIA="MEDIA",e.FEED_UPDATE_SERVED="FEED_UPDATE_SERVED",e.MESSAGE_SEND_CLIENT_SUCCESS="MESSAGE_SEND_CLIENT_SUCCESS",e.MESSAGE_SEND_CLIENT_FAILURE="MESSAGE_SEND_CLIENT_FAILURE",e.MESSAGE_SEND_FUNNEL="MESSAGE_SEND_FUNNEL",e.SPONSORED_UPDATE_SERVED="SPONSORED_UPDATE_SERVED",e.GUIDE_ENTRYPOINT="GUIDE_ENTRYPOINT",e.GUIDE_FEEDBACK="GUIDE_FEEDBACK"}(hi||(hi={}));var fi=function(){function e(){return Pe(this,e),we(this,e,[hi.FEED_UPDATE_SERVED,In()])}return Ie(e,pi),De(e)}(),mi=function(){function e(){var t;return Pe(this,e),Ue(Te(t=we(this,e,[hi.UNKNOWN,In()])),"content",void 0),Ue(Te(t),"featureBreadcrumbType",void 0),t}return Ie(e,pi),De(e)}(),gi=function(){function e(){return Pe(this,e),we(this,e,[hi.SPONSORED_UPDATE_SERVED,In()])}return Ie(e,pi),De(e)}();function vi(e,t){var n;switch(t){case"proto.sdui.breadcrumbs.feed.FeedUpdateServedBreadcrumb":n=(new fi).builder;break;case"proto.sdui.breadcrumbs.feed.SponsoredUpdateServedBreadcrumb":n=(new gi).builder;break;case"proto.sdui.tracking.TrackingBreadcrumb":n=(new mi).builder;var i,r=e;try{if(void 0!==r.content.type)i=(new TextDecoder).decode(new Uint8Array(r.content.data));else{if(!(r.content instanceof Uint8Array))throw new Error("Invalid breadcrumb content type");i=(new TextDecoder).decode(r.content)}for(var o=null==e?void 0:e.breadcrumbType,a={content:JSON.parse(i),breadcrumbType:o},s=0,l=Object.entries(a);s1)return{pageUrn:t[0],trackingId:t[1]}}(e.lipi);if(o?r={pageInstance:o,pageKey:t}:t&&(r={pageKey:t}),e.external_page&&e.external_page_instance){var a=decodeURIComponent(e.external_page);r={pageInstance:{pageUrn:"urn:li:externalPage:".concat(a),trackingId:e.external_page_instance},pageKey:a},n=!0}var s=e.external_app&&e.external_app_instance?{applicationUrn:"urn:li:externalApplication:".concat(decodeURIComponent(e.external_app)),trackingId:e.external_app_instance,version:""}:void 0;return s&&((r=r||{}).applicationInstance=s),{fromExternalApp:n||!!s,previousApplicationInstance:s,previousContext:r,previousControlId:e.lici&&decodeURIComponent(e.lici),previousControlUrn:i}}var _i=Object.freeze({__proto__:null,voyagerTransporterConfig:{sponsored:{endpoint:"li/tscp/sct",batching:!1,disableCompression:!1,retryConfig:{persist:{attemptLimit:4,statusCodes:[429,431,401,403,404,500,405,501,406,502,407,503,408,504,409,505,506,507,508,413,509,510,511]},inMemory:{attemptLimit:4,statusCodes:[429,431,401,403,404,500,405,501,406,502,407,503,408,504,409,505,506,507,508,413,509,510,511]}}},default:{endpoint:"li/track",batching:{evenBatchEnabled:!0,maxSize:29},disableCompression:!1,retryConfig:{persist:{attemptLimit:4,statusCodes:[429,431,401,403,404,500,405,501,406,502,407,503,408,504,409,505,506,507,508,413,509,510,511]},inMemory:{attemptLimit:4,statusCodes:[429,431,401,403,404,500,405,501,406,502,407,503,408,504,409,505,506,507,508,413,509,510,511]}}}}});function wi(e){return"retryConfig"in e.host}function Ti(e){return"location"in e.api}var Si,Ci=function(){function e(t,n,i,r,o,a,s,l){var c,u,d,h;if(Pe(this,e),Ue(this,"transporter",void 0),Ue(this,"delegate",void 0),Ue(this,"viewSpecs",void 0),Ue(this,"transportConfig",void 0),Ue(this,"dynamicTransporterSupportLixKey",void 0),Ue(this,"domain",void 0),Ue(this,"trackingAppName",void 0),Ue(this,"dynamicTransporterSupportLixValue",void 0),Ue(this,"currentContext",void 0),Ue(this,"appState",void 0),Ue(this,"referrer",void 0),Ue(this,"previousAppContext",void 0),Ue(this,"customTransporters",void 0),Ue(this,"clientMonitoringConn",void 0),Ue(this,"dynamicTransporterSupportEnabled",void 0),this.transporter=t,this.delegate=n,this.viewSpecs=i,this.transportConfig=r,this.dynamicTransporterSupportLixKey=o,this.domain=a,this.trackingAppName=s,this.dynamicTransporterSupportLixValue=l,this.appState={},this.customTransporters={},this.transportConfig={},this.dynamicTransporterSupportEnabled=!1,o?this.dynamicTransporterSupportEnabled=function(e){return!(!e||"control"===e)}(null===(d=(h=t.host).__getLixTreatment)||void 0===d?void 0:d.call(h,o)):l&&(this.dynamicTransporterSupportEnabled=!!s&&l),this.dynamicTransporterSupportEnabled){var p=null==_i?void 0:_i["".concat(null==s?void 0:s.toLowerCase(),"TransporterConfig")];Hn(p)?this.transportConfig=p:this.transportConfig=r}if(n&&n.customTransporterHosts)for(var f in n.customTransporterHosts)if(Object.prototype.hasOwnProperty.call(n.customTransporterHosts,f)){var m=this.transporter.host.api.assign({},this.transporter.host);this.customTransporters[f]=new di(this.transporter.host.api.assign(m,n.customTransporterHosts[f]))}if(this.dynamicTransporterSupportEnabled&&Hn(this.transportConfig))for(var g=0,v=Object.entries(this.transportConfig);g1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.navMetaFromSeed(e,bi(t),null==n?void 0:n.pageInstanceTrackingId);if(this.setCurrentContext(i.to),!n.suppressEventsFiring)return this.fireNavEvents(i)}},{key:"setCurrentContext",value:function(e){var t;this.currentContext=Rn(e,this.host.api),null===(t=this.clientMonitoringConn)||void 0===t||t.setCurrentContext(Rn(e,this.host.api))}},{key:"updateAppState",value:function(e){var t;this.host.api.assign(this.appState,e),null===(t=this.clientMonitoringConn)||void 0===t||t.updateAppState(e)}},{key:"fireCIE",value:function(e,t,n,i,r){return this.fireEvent("ControlInteractionEvent",(function(n){var o=Ln(n.pageKey,e),a={controlTrackingId:i,controlUrn:o,interactionType:t};return r&&r(o),a}),{context:n})}},{key:"getViewHierarchy",value:function(e){for(var t=[],n=e;n instanceof Element&&"body"!==n.tagName.toLowerCase();){var i=n.closest("[data-view-name]");if(i){var r=i.getAttribute("data-view-name");r&&t.push(r)}n=null==i?void 0:i.parentElement}return t}},{key:"getViewTrackingScope",value:function(e){for(var t=[],n=e;n instanceof Element&&"body"!==n.tagName.toLowerCase();){var i=n.closest("[data-view-tracking-scope]");if(i){var r=i.getAttribute("data-view-tracking-scope");if(r)try{var o=JSON.parse(r);o&&o.length&&t.push.apply(t,Oe(o))}catch(e){Dn("getViewTrackingScope","Error parsing trackingScope ".concat(r))}}n=null==i?void 0:i.parentElement}return t}},{key:"fireInteraction",value:function(e){var t,n=e.manualFireReason,i=e.interactionType,r=e.targetView,o=e.viewHierarchy,a=void 0===o?[]:o,s=e.viewTrackingScope,l=void 0===s?[]:s,c=e.verticalPosition,u=e.horizontalPosition,d=e.controlUrn,h=void 0===d?"":d,p=e.actionType,f=e.contentTrackingId,m=void 0===f?void 0:f,g=e.clientBreadcrumbs,v=void 0===g?[]:g,y=e.isShadowEvent,E=e.cooloffToken,b=e.testId,_=e.mediaStateInfo,w=r?this.getViewHierarchy(r):[],T=w.length>0?w:a;0!==T.length&&(!this.viewSpecs||null!==(t=this.viewSpecs)&&void 0!==t&&t.some((function(e){return e.viewName==T[0]})))||console.warn("No viewHierarchy provided or found from element.");var S=l.length>0?l:this.getViewTrackingScope(r);if(this.dynamicTransporterSupportEnabled){var C=Fn(this.transportConfig),I=_e(qn(S,C),2),k=I[0],A=I[1],L="GenericActionEvent",O={verticalPosition:c,horizontalPosition:u,controlUrn:h,interactionType:i,actionType:p,contentTrackingId:""===m?void 0:m,manualFireReason:n,cooloffToken:E,mediaStateInfo:_};if(Hn(k)){for(var R=0,N=Object.entries(k);R0?k:a;0!==A.length&&(!this.viewSpecs||null!==(n=this.viewSpecs)&&void 0!==n&&n.some((function(e){return e.viewName==A[0]})))||console.warn("No viewHierarchy provided or found from element.");var L=l.length>0?l:this.getViewTrackingScope(r);if(this.dynamicTransporterSupportEnabled){var O=Fn(this.transportConfig),R=_e(qn(L,O),2),N=R[0],x=R[1],P="GenericImpressionEvent",M={viewDurationInMilliseconds:u,contentViewFraction:h,width:f,height:g,verticalPosition:v,horizontalPosition:y,impressionTime:E,contentTrackingId:""===b?void 0:b,manualFireReason:i,cooloffToken:S,mediaStateInfo:I},D={header:{viewHierarchy:A,testId:C},context:null==t?void 0:t.context};if(Hn(N)){for(var U=0,B=Object.entries(N);U0){var d=(u=u.map((function(e){return o.transformBreadcrumb(e)}))).map((function(e){return pi.toPointer(e)}));this.host.api.assign(t,{clientBreadcrumbPointers:d})}var h=u.length>0?this.generateEnvelopeWithBreadcrumbs(e,t,n,u,r):this.generateEnvelope(e,t,n,r);return this.fireEnvelope(h)}},{key:"generateEnvelopeWithBreadcrumbs",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=this.generateEnvelope(e,t,n,r);return i.length>0?this.addBreadcrumbsToEnvelope(o,i):o}},{key:"transformBreadcrumb",value:function(e){try{if(Hn(e.content))return be({id:e.id,clientBreadcrumbType:e.breadcrumbType},e.content)}catch(e){console.error("Error transforming breadcrumb:",e)}return e}},{key:"addBreadcrumbsToEnvelope",value:function(e,t){return this.host.api.assign(e,{clientBreadcrumbs:t}),e}},{key:"fireEnvelope",value:function(e){var t,n;if(null!==(t=this.delegate)&&void 0!==t&&null!==(n=t.shouldAnonymizeMemberId)&&void 0!==n&&n.call(t))if(ei(e.id)){var i=e.id;e.id={eventName:i,topicName:i,shouldAnonymizeMemberId:!0}}else e.id.shouldAnonymizeMemberId=!0;var r=this.delegate&&this.delegate.preTransporter?this.delegate.preTransporter(e):e;if(r){var o=r.meta.transporterKey,a=o?this.customTransporters[o]:this.transporter;if(!a&&o){var s=ti(r.id),l="Could not find custom transporter: ".concat(o);if(this.clientMonitoringConn){var c=this.clientMonitoringConn.logEventGenerated(s);this.clientMonitoringConn.logFailedEvent(ri.UNKNOWN_EXECUTION_ERROR,r.id,l,c)}throw new Error(l)}return a.fireEvent(r)}return this.host.api.Promise.resolve(!0)}},{key:"generatePageInstance",value:function(e,t){return An(e,t)}},{key:"firePVE",value:function(e,t,n){return this._firePVE(e,t,n)}},{key:"_firePVE",value:function(e,t,n){var i={pageType:"full",totalTime:0,trackingCode:this.getTrackingCode(),trackingInfo:{}},r=this.host.api.assign(i,t),o=this.generateEnvelope("PageViewEvent",r,{context:n});return o.meta.requestHeader.pageKey=e,this.fireEnvelope(o)}},{key:"destroy",value:function(){for(var e in this.transporter.destroy(),this.customTransporters)this.customTransporters[e].destroy();this.clientMonitoringConn&&(this.clientMonitoringConn.flush(),this.clientMonitoringConn.destroy(),this.clientMonitoringConn=void 0),yn.clear()}},{key:"forceFlush",value:function(){for(var e in this.transporter.forceFlush(),this.customTransporters)this.customTransporters[e].forceFlush()}},{key:"generateControlUrn",value:function(e,t){return Ln((t||this.currentContext||{pageKey:qe}).pageKey,e)}},{key:"fireRawCIE",value:function(e,t,n,i){var r={controlTrackingId:i,controlUrn:e,interactionType:t};return{beacon:this.fireEvent("ControlInteractionEvent",r,{context:n}),controlUrn:e}}},{key:"generateNavigationEvent",value:function(e){var t=e.triggerId,n=e.triggerUrn,i=e.from;return{previousPageInstance:i&&i.pageInstance,triggerControlTrackingId:t,triggerControlUrn:n}}},{key:"getTrackingCode",value:function(){return this.previousAppContext&&this.previousAppContext.pageKey}},{key:"navMetaFromSeed",value:function(e,t,n){var i="NavigationEvent";this.previousAppContext=t.previousContext;var r=t.fromExternalApp?{eventName:i,topicName:"InboundNavigationEvent"}:i;return t.fromExternalApp||(this.referrer="https://www.linkedin.com"),{from:t.previousContext,navEventId:r,to:{applicationInstance:t.applicationInstance,pageInstance:this.generatePageInstance(e,n||t.pageTrackingId),pageKey:e},triggerId:t.previousControlId,triggerUrn:t.previousControlUrn}}},{key:"fireNavEvents",value:function(e){var t=this.generateNavigationEvent(e),n=e.to,i=e.from,r=e.navEventId,o=this.generateEnvelope(r,t);o.meta.requestHeader.pageKey=n.pageKey;var a=i&&i.applicationInstance;return a&&(o.meta.header.clientApplicationInstance=a),this.host.api.Promise.all([this._firePVE(n.pageKey),this.fireEnvelope(o)])}},{key:"generateEnvelope",value:function(e,t){var n,i,r,o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l={directive:a.directive,transporterKey:a.transporterKey,context:a.context||this.currentContext&&Rn(this.currentContext,this.host.api),requestHeader:this.host.api.assign({trackingCode:this.getTrackingCode()},a.requestHeader||{},Ti(this.host)?{path:"".concat(this.host.api.location.pathname).concat(this.host.api.location.search),referer:"enabled"===(null===(n=(i=this.host).__getLixTreatment)||void 0===n?void 0:n.call(i,"pai.referrer.fix.subsquent"))?this.referrer?this.referrer:null===(r=this.host.api.document)||void 0===r?void 0:r.referrer:null===(o=this.host.api.document)||void 0===o?void 0:o.referrer}:{}),header:this.host.api.assign({applicationViewerUrn:this.appState.applicationViewerUrn,clientApplicationInstance:this.appState.clientApplicationInstance,isShadowEvent:s},a.header||{})};return{body:"function"==typeof t?t:function(){return t},id:e,meta:l}}}]),e}();!function(e){e.INTERNAL_OTEL_JET_EVENT="internal:otel:jet",e.INTERNAL_OTEL_RESOURCE="internal:otel:resource",e.INTERNAL_OTEL_LARGEST_CONTENTFUL_PAINT="internal:otel:lcp",e.INTERNAL_OTEL_CUMULATIVE_LAYOUT_SHIFT="internal:otel:cls",e.INTERNAL_OTEL_FIRST_INPUT_DELAY="internal:otel:fid"}(Si||(Si={}));var Ii,ki;!function(){function e(t,n){var i,r,o=this;Pe(this,e),Ue(this,"core",void 0),Ue(this,"protocol",void 0),Ue(this,"throttleKeySet",new Set),Ue(this,"config",void 0),Ue(this,"reportTransporterError",(function(e){e.reason instanceof Error||(e.reason=new Error(e.reason||"An error occurred in the transporter")),o.reportError(e.reason,e.tags.concat(["info"]),{responseHeaders:e.responseHeaders}).catch((function(){}))})),this.core=t;var a=this.core.host.api.location.protocol;this.protocol=a.substring(0,a.length-1),this.config={throttleTime:null!==(i=null==n?void 0:n.throttleTime)&&void 0!==i?i:100,useOTel:null!==(r=null==n?void 0:n.useOTel)&&void 0!==r&&r},yn.on(pn,this.reportTransporterError)}De(e,[{key:"reportError",value:function(e){var t,n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.callTreeId,a=void 0===o?"":o,s=r.responseHeaders,l=void 0===s?{}:s,c=r.sduiScreenId,u=r.componentKey,d=e.message,h=e.name,p=e.stack,f=void 0===p?"":p,m=e.fileName,g=void 0===m?"":m,v=e.lineNumber,y=void 0===v?0:v,E=e.columnNumber,b=void 0===E?0:E,_=this.core.host,w=_.appId,T=_.appVersion,S=_.service,C=_.serviceInstance,I=_.treeID,k=void 0===I?"":I,A=_.api,L=A.Promise,O=A.location,R=O.host,N=O.pathname,x=O.search,P=O.hash,M=void 0===P?"":P;if(this.config.useOTel&&!i.includes("otel-origin-jet-tag")&&yn.emit(Si.INTERNAL_OTEL_JET_EVENT,{error:e,tags:i,callTreeId:a,responseHeaders:l}),l){t={};var D=new Map;Object.keys(l).forEach((function(e){D.set(e.toLowerCase(),l[e])})),t.callTreeId=D.get("x-li-uuid"),t.microsoftEdgeReference=D.get("x-msedge-ref"),t.pointOfPresenceId=D.get("x-li-pop"),t.fabric=D.get("x-li-fabric")}var U=function(){return n.core.fireEvent("JavaScriptErrorEvent",(function(e){return{appId:w,e:{c:b,l:y,m:d,s:f,t:h,u:g},h:M,l:n.protocol,o:R,p:N,pageKey:e.pageKey,q:x,service:S,serviceInstance:C,serviceVersion:T,t:i,trackingID:e.pageInstance.trackingId,treeID:k,callTreeId:a,responseTraceHeaders:t,sduiScreenId:c,componentKey:u}}))};if(this.config.throttleTime<0)return U();var B=(h+d+f+i.join("")+a).split("").reduce((function(e,t){return(e<<5)-e+t.charCodeAt(0)|0}),0);return this.throttleKeySet.has(B)?L.resolve(!1):(this.throttleKeySet.add(B),setTimeout((function(){return n.throttleKeySet.delete(B)}),this.config.throttleTime),U())}},{key:"flush",value:function(){this.core.forceFlush()}},{key:"destroy",value:function(){this.core.destroy(),yn.off(pn,this.reportTransporterError)}}])}(),function(e){e.RealUserMonitoringEvent="RealUserMonitoringEvent",e.FeaturePerformanceMeasurementEvent="FeaturePerformanceMeasurementEvent",e.ClientPerfMetricsEvent="ClientPerfMetricsEvent",e.WEB_UI_FRAMEWORK="web-ui-framework",e.APP_ID="app-id",e.APP_VERSION="app-version",e.IS_SINGLE_PAGE_APP="is-single-page-app",e.IS_APP_RENDER_FAILED="is-app-render-failed",e.APP_RENDER_MODE="app-render-mode",e.USER_TIMING_MARK_ENABLED="user-timing-mark-enabled",e.USER_TIMING_MEASURE_ENABLED="user-timing-measure-enabled",e.BEACON_SOURCE="beacon-source",e.BEACON_TIMEOUT="beacon-timeout",e.ENABLE_RS_TIMING="enable-rs-timing",e.ENABLE_CDN_TRACKING="enable-cdn-tracking",e.ASYNC_PLUGINS_TIMEOUT="async-plugins-timeout",e.ENABLE_MEMORY_MEASUREMENT="enable-memory-measurement",e.PAGE_KEY_PREFIX="pageKeyPrefix",e.ENABLE_T_3="enable-tracking-3",e.ENABLE_PEM_T_3="enable-pem-tracking-3",e.ENABLE_OTEL="enable-otel"}(Ii||(Ii={})),function(e){e.PageLoadStartEvent="PageLoadStartEvent",e.PageLoadEndEvent="PageLoadEndEvent",e.ResourceLoadEvent="ResourceLoadEvent",e.ViewLoadEvent="ViewLoadEvent",e.PEMTracer="PEMTracer"}(ki||(ki={}));var Ai,Li,Oi,Ri,Ni,xi,Pi,Mi=(Ue(Ue(Ue(Ue(Ue(Ue(Ue(Ue(Ue(Ue(ue={},"web-ui-framework","EMBER"),"app-id","linkedin.rum.tracking"),"app-version","unknown"),"is-single-page-app",!0),"user-timing-mark-enabled",!1),"user-timing-measure-enabled",!0),"beacon-source","apps"),"enable-rs-timing",!0),"enable-cdn-tracking",!1),"async-plugins-timeout",5e3),Ue(Ue(Ue(Ue(Ue(Ue(ue,"beacon-timeout",3e4),"enable-memory-measurement",!1),"pageKeyPrefix",""),"enable-pem-tracking-3",!1),"enable-tracking-3",!1),"enable-otel",!1)),Di={VALUE_NOT_OBTAINED:-1,METRIC_NOT_SUPPORTED:-2},Ui=["loadEventEnd","loadEventStart","domComplete","domContentLoadedEventEnd","domContentLoadedEventStart","domInteractive","domLoading","responseEnd","responseStart","requestStart","secureConnectionStart","connectEnd","connectStart","domainLookupEnd","domainLookupStart","fetchStart","redirectEnd","redirectStart","unloadEventEnd","unloadEventStart","navigationStart"],Bi={redirectStart:"REDIRECT_START",redirectEnd:"REDIRECT_END",fetchStart:"FETCH_START",domainLookupStart:"DOMAIN_LOOKUP_START",domainLookupEnd:"DOMAIN_LOOKUP_END",connectStart:"CONNECT_START",connectEnd:"CONNECT_END",secureConnectionStart:"SECURE_CONNECTION_START",requestStart:"REQUEST_START",responseStart:"RESPONSE_START",responseEnd:"RESPONSE_END",workerStart:"WORKER_START"},Fi={"http/0.9":"HTTP0_9","http/1.0":"HTTP1_0","http/1.1":"HTTP1_1",h2:"HTTP2"},qi="pageLoadId does not exist",Hi="rum token passed is invalid",Gi=new RegExp(/batch-(\d+)$|enabled$/),ji=function(){function e(){Pe(this,e),Ue(this,"userTimingEntries",[]),Ue(this,"longTasks",[]),Ue(this,"resourceTimingEntries",[]),Ue(this,"cdnData",void 0)}return De(e,[{key:"reset",value:function(){this.userTimingEntries=[],this.longTasks=[],this.resourceTimingEntries=[]}},{key:"attachTreeIds",value:function(e){this.resourceTimingEntries.forEach((function(t){var n=e.get(t.name);n&&(t.resourceTreeId=n)}))}},{key:"getData",value:function(){return{userTimingEntries:this.userTimingEntries,longTasks:this.longTasks,resourceTimingEntries:this.resourceTimingEntries.map(Vi),cdnData:this.cdnData}}}]),e}(),Wi=["resourceTreeId","name","entryType","startTime","duration","initiatorType","nextHopProtocol","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","transferSize","encodedBodySize","decodedBodySize","workerStart"];function Vi(e){return Wi.reduce((function(t,n){var i=e[n];return void 0!==i&&(t[n]=i),t}),{})}function Ki(e,t){if(e.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if("html"===e.tagName.toLowerCase())return"html";var n={root:document.body,idName:function(e){return!0},className:function(e){return!0},tagName:function(e){return!0},attr:function(e,t){return!1},seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4};xi=Object.assign(Object.assign({},n),t),Pi=function(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e}(xi.root,n);var i=zi(e,Ni.All,(function(){return zi(e,Ni.Two,(function(){return zi(e,Ni.One)}))}));if(i){var r=ir(rr(i,e));return r.length>0&&(i=r[0]),Xi(i)}throw new Error("Selector was not found.")}function zi(e,t,n){for(var i=null,r=[],o=e,a=0,s=function(){var e=er(function(e){var t=e.getAttribute("id");return t&&xi.idName(t)?{name:"#"+ur(t,{isIdentifier:!0}),penalty:0}:null}(o))||er.apply(void 0,Oe(function(e){return Array.from(e.attributes).filter((function(e){return xi.attr(e.name,e.value)})).map((function(e){return{name:"["+ur(e.name,{isIdentifier:!0})+'="'+ur(e.value)+'"]',penalty:.5}}))}(o)))||er.apply(void 0,Oe(function(e){return Array.from(e.classList).filter(xi.className).map((function(e){return{name:"."+ur(e,{isIdentifier:!0}),penalty:1}}))}(o)))||er(function(e){var t=e.tagName.toLowerCase();return xi.tagName(t)?{name:t,penalty:2}:null}(o))||[{name:"*",penalty:3}],s=function(e){var t=e.parentNode;if(!t)return null;var n=t.firstChild;if(!n)return null;for(var i=0;n&&(n.nodeType===Node.ELEMENT_NODE&&i++,n!==e);)n=n.nextSibling;return i}(o);if(t===Ni.All)s&&(e=e.concat(e.filter(Zi).map((function(e){return Ji(e,s)}))));else if(t===Ni.Two)e=e.slice(0,1),s&&(e=e.concat(e.filter(Zi).map((function(e){return Ji(e,s)}))));else if(t===Ni.One){var l=_e(e=e.slice(0,1),1)[0];s&&Zi(l)&&(e=[Ji(l,s)])}var c,u=Le(e);try{for(u.s();!(c=u.n()).done;)c.value.level=a}catch(e){u.e(e)}finally{u.f()}if(r.push(e),r.length>=xi.seedMinLength&&(i=$i(r,n)))return 1;o=o.parentElement,a++};o&&o!==xi.root.parentElement&&!s(););return i||(i=$i(r,n)),i}function $i(e,t){var n=ir(nr(e));if(n.length>xi.threshold)return t?t():null;var i,r=Le(n);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(Qi(o))return o}}catch(e){r.e(e)}finally{r.f()}return null}function Xi(e){for(var t=e[0],n=t.name,i=1;i ").concat(n):"".concat(e[i].name," ").concat(n),t=e[i]}return n}function Yi(e){return e.map((function(e){return e.penalty})).reduce((function(e,t){return e+t}),0)}function Qi(e){switch(Pi.querySelectorAll(Xi(e)).length){case 0:throw new Error("Can't select any node with this selector: ".concat(Xi(e)));case 1:return!0;default:return!1}}function Ji(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}}function Zi(e){return"html"!==e.name&&!e.name.startsWith("#")}function er(){for(var e=arguments.length,t=new Array(e),n=0;n0?i:null}function tr(e){return null!=e}function nr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e.length>0){var n,i=[],r=Le(e[0]);try{for(r.s();!(n=r.n()).done;){var o=n.value;i=i.concat(nr(e.slice(1,e.length),t.concat(o)))}}catch(e){r.e(e)}finally{r.f()}return i}return[t]}function ir(e){return Array.from(e).sort((function(e,t){return Yi(e)-Yi(t)}))}function rr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{counter:0,visited:new Map},i=[];if(e.length>2&&e.length>xi.optimizedMinLength)for(var r=1;rxi.maxNumberOfTries)return i;n.counter+=1;var o=Oe(e);o.splice(r,1);var a=Xi(o);if(n.visited.has(a))return i;Qi(o)&&or(o,t)&&(i.push(o),n.visited.set(a,!0),i=i.concat(rr(o,t,n)))}return i}function or(e,t){return Pi.querySelector(Xi(e))===t}!function(e){e.HTTP0_9="HTTP0_9",e.HTTP1_0="HTTP1_0",e.HTTP1_1="HTTP1_1",e.HTTP2="HTTP2",e.UNKNOWN="UNKNOWN"}(Ai||(Ai={})),function(e){e.REDIRECT_START="REDIRECT_START",e.REDIRECT_END="REDIRECT_END",e.FETCH_START="FETCH_START",e.DOMAIN_LOOKUP_START="DOMAIN_LOOKUP_START",e.DOMAIN_LOOKUP_END="DOMAIN_LOOKUP_END",e.CONNECT_START="CONNECT_START",e.CONNECT_END="CONNECT_END",e.SECURE_CONNECTION_START="SECURE_CONNECTION_START",e.REQUEST_START="REQUEST_START",e.RESPONSE_START="RESPONSE_START",e.RESPONSE_END="RESPONSE_END",e.WORKER_START="WORKER_START"}(Li||(Li={})),function(e){e.redirectStart="redirectStart",e.redirectEnd="redirectEnd",e.fetchStart="fetchStart",e.domainLookupStart="domainLookupStart",e.domainLookupEnd="domainLookupEnd",e.connectStart="connectStart",e.connectEnd="connectEnd",e.secureConnectionStart="secureConnectionStart",e.requestStart="requestStart",e.responseStart="responseStart",e.responseEnd="responseEnd",e.workerStart="workerStart"}(Oi||(Oi={})),function(e){e.DEFAULT="DEFAULT",e.INITIAL="INITIAL",e.SUBSEQUENT="SUBSEQUENT",e.PAGINATED="PAGINATED"}(Ri||(Ri={})),function(e){e[e.All=0]="All",e[e.Two=1]="Two",e[e.One=2]="One"}(Ni||(Ni={}));var ar=/[ -,\.\/:-@\[-\^`\{-~]/,sr=/[ -,\.\/:-@\[\]\^`\{-~]/,lr=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,cr={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};function ur(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign(Object.assign({},cr),t);"single"!=n.quotes&&"double"!=n.quotes&&(n.quotes="single");for(var i="double"==n.quotes?'"':"'",r=n.isIdentifier,o=e.charAt(0),a="",s=0,l=e.length;s126){if(u>=55296&&u<=56319&&s1&&void 0!==arguments[1]&&arguments[1];if(e&&"function"==typeof e.now&&(e.timeOrigin||e.timing)){var n,i=e.now();return n=!e.timing&&t?Math.floor(e.timeOrigin):e.timing.navigationStart,Math.round(i+n)}return Date.now()}function fr(e){var t=e||performance;return Math.round(t.now())}function mr(e){if(!e)return"null";if(e.nodeType===Node.ELEMENT_NODE)try{return Ki(e,{idName:function(e){return 0!==e.indexOf("ember")}})}catch(e){return"serialization_error"}var t=mr(e.parentElement||void 0);return"".concat(t," > nodeType(").concat(e.nodeType,")")}function gr(e,t,n){var i=[];return e&&"function"==typeof e.getEntriesByType&&(t["user-timing-measure-enabled"]&&e.getEntriesByType("measure").forEach((function(e){var t=e.name,n=e.startTime,r=e.duration;i.push({entryType:"MEASURE",name:t,startTime:n,duration:r})})),t["user-timing-mark-enabled"]&&e.getEntriesByType("mark").forEach((function(e){var t=e.name,n=e.startTime,r=e.duration;i.push({entryType:"MARK",name:t,startTime:n,duration:r})})),n&&(e.clearMeasures(),e.clearMarks())),i}function vr(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}var yr=function(){function e(t){Pe(this,e),Ue(this,"hostApis",void 0),Ue(this,"hostnameProperties",void 0),Ue(this,"usedHostnames",void 0),Ue(this,"abortController",void 0),Ue(this,"pendingPromises",void 0),this.hostApis=t;var n=t.AbortController;this.hostnameProperties={},this.usedHostnames=new Set,this.abortController=new n,this.pendingPromises=new Set}return De(e,[{key:"clearUsedHostnames",value:function(){this.usedHostnames=new Set}},{key:"getPresentData",value:function(){var e=this;return xn(this.usedHostnames).map((function(t){return e.hostnameProperties[t]||{hostname:t,provider:"",ipVersion:"",httpVersion:""}}))}},{key:"getDataWhenReady",value:function(e){var t=this,n=this.hostApis,i=n.AbortController,r=n.Promise,o=Nn(xn(this.pendingPromises),r),a=setTimeout((function(){t.abortController.abort(),t.abortController=new i}),e);return o.then((function(){return clearTimeout(a),t.getPresentData()}))}},{key:"inspectEntryForCdnData",value:function(e){var t=this;if(!(e.name.indexOf(".licdn.")<0)){var n,i,r=this.hostApis.assign,o=(n=e.name,i=this.hostApis.document,(dr=dr||i.createElement("a")).href=n,dr.hostname);if(this.usedHostnames.add(o),!this.hostnameProperties[o]&&!this.isResourcePossiblyFromCache(e)){var a=this.fetchCdnFromUrl(e.name).then((function(e){var n=r({hostname:o},e);return t.hostnameProperties[o]||(t.hostnameProperties[o]=n),t.pendingPromises.delete(a),n}));this.pendingPromises.add(a)}}}},{key:"fetchCdnFromUrl",value:function(e){return(0,this.hostApis.fetch)(e,{method:"HEAD",signal:this.abortController.signal}).then((function(e){return{provider:e.headers.get("X-CDN")||"",ipVersion:e.headers.get("X-CDN-CLIENT-IP-VERSION")||"",httpVersion:e.headers.get("X-CDN-Proto")||""}}))}},{key:"isResourcePossiblyFromCache",value:function(e){return void 0!==e.transferSize?0===e.transferSize:e.domainLookupStart===e.domainLookupEnd&&e.connectEnd===e.connectStart&&0===e.secureConnectionStart}}]),e}();!function(){var e=function(){function e(){Pe(this,e)}return De(e,null,[{key:"x64Add",value:function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}},{key:"x64Multiply",value:function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}},{key:"x64Rotl",value:function(e,t){return 32==(t%=64)?[e[1],e[0]]:t<32?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])}},{key:"x64LeftShift",value:function(e,t){return 0==(t%=64)?e:t<32?[e[0]<>>32-t,e[1]<>>1]),t=e.x64Multiply(t,[4283543511,3981806797]),t=e.x64Xor(t,[0,t[0]>>>1]),t=e.x64Multiply(t,[3301882366,444984403]),e.x64Xor(t,[0,t[0]>>>1])}},{key:"x64hash128",value:function(t,n){n=n||0;var i,r=(t=t||"").length%16,o=t.length-r,a=[0,n],s=[0,n],l=[0,0],c=[0,0],u=[2277735313,289559509],d=[1291169091,658871167];for(i=0;i>>0).toString(16)).slice(-8)+("00000000"+(a[1]>>>0).toString(16)).slice(-8)+("00000000"+(s[0]>>>0).toString(16)).slice(-8)+("00000000"+(s[1]>>>0).toString(16)).slice(-8)}}]),e}(),t=function(){function t(){Pe(this,t),this.components=[{key:"webrtc",getData:t.webRtcKey,shouldEnforceDataLimit:!0,dataLimit:1e3},{key:"enumerateDevices",getData:t.enumerateDevicesKey,shouldEnforceDataLimit:!0,dataLimit:22e3},{key:"appName",getData:t.appNameKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"tsSeed",getData:t.seedKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"appVersion",getData:t.appVersionKey,shouldEnforceDataLimit:!0,dataLimit:300},{key:"appCodeName",getData:t.appCodeNameKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"location",getData:t.locationKey,shouldEnforceDataLimit:!0,dataLimit:1500},{key:"javascripts",getData:t.javascriptsKey,shouldEnforceDataLimit:!0,dataLimit:2200},{key:"platform",getData:t.platformKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"product",getData:t.productKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"productSub",getData:t.productSubKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"cpuClass",getData:t.cpuClassKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"oscpu",getData:t.oscpuKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"hardwareConcurrency",getData:t.hardwareConcurrencyKey,alias:"numOfCores",shouldEnforceDataLimit:!0,dataLimit:100},{key:"deviceMemory",getData:t.deviceMemoryKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"vendor",getData:t.vendorKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"vendorSub",getData:t.vendorSubKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"language",getData:t.languageKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"timezoneOffset",getData:t.timezoneOffset,shouldEnforceDataLimit:!0,dataLimit:100},{key:"timezone",getData:t.timezone,shouldEnforceDataLimit:!0,dataLimit:100},{key:"userAgent",getData:t.UserAgent,shouldEnforceDataLimit:!0,dataLimit:1500},{key:"webdriver",getData:t.webdriver,shouldEnforceDataLimit:!0,dataLimit:100},{key:"doNotTrack",getData:t.doNotTrackKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"incognito",getData:t.incognitoKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"colorDepth",getData:t.colorDepthKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"pixelDepth",getData:t.pixelDepthKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"pixelRatio",getData:t.pixelRatioKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"screenResolution",getData:t.screenResolutionKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"screenOrientation",getData:t.screenOrientationKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"availableScreenResolution",getData:t.availableScreenResolutionKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"sessionStorage",getData:t.sessionStorageKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"localStorage",getData:t.localStorageKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"indexedDb",getData:t.indexedDbKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"addBehavior",getData:t.addBehaviorKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"openDatabase",getData:t.openDatabaseKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"canvas",getData:t.canvasKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"webgl",getData:t.webglKey,shouldEnforceDataLimit:!0,dataLimit:6e3},{key:"signals",getData:t.signalsKey,shouldEnforceDataLimit:!0,dataLimit:150},{key:"touchSupport",getData:t.touchSupportKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"networkInfo",getData:t.networkInfoKey,shouldEnforceDataLimit:!0,dataLimit:150},{key:"battery",getData:t.batteryKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"audio",getData:t.audioKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"automation",getData:t.automationKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"plugins",getData:t.pluginsComponent,shouldEnforceDataLimit:!0,dataLimit:17e3},{key:"mimetyps",getData:t.mimetypesComponent,shouldEnforceDataLimit:!0,dataLimit:27e3},{key:"fonts",getData:t.jsFontsKey,shouldEnforceDataLimit:!0,dataLimit:1500},{key:"fontsFlash",getData:t.flashFontsKey,shouldEnforceDataLimit:!0,dataLimit:100}]}return De(t,[{key:"getFeatures",value:function(e,t){if("function"==typeof e){if(!t)return e({error:"Options not provided"});var n={data:{latency:{acq_time:{}},errors:{}}},i=Date.now(),r={},o=0,a=0;this.components.forEach((function(s){if(!t.excludes[s.key]){var l=s.key;void 0!==s.alias&&null!==s.alias&&s.alias.length>0&&(l=s.alias),o++;var c=function(){r[l]=Date.now();try{s.getData((function(t){if(!1!==s.shouldEnforceDataLimit){var c=s.hasOwnProperty("dataLimit")&&"number"==typeof s.dataLimit?s.dataLimit:1e3,u=JSON.stringify(t).length;u>c&&(n.data.errors[l]="Exceeded current data limit:"+c+" Data length for:"+l+" was found to be:"+u,t={})}n.data[l]=t,n.data.latency.acq_time[l]=Date.now()-r[l],++a>=o&&(n.data.latency.acq_time.allFeatures=Date.now()-i,n.data.allFeaturesCollectionAt=Date.now(),e(n.data,!0))}),t)}catch(e){n.data.errors[l]=String(e)}};"function"==typeof window.requestIdleCallback&&!1!==t.useRequestIdleCallBack?window.requestIdleCallback(c):c()}})),n.data.latency.acq_time.allFeatures=Date.now()-i,e(n.data,!1)}}}],[{key:"each",value:function(e,t){if(Array.prototype.forEach&&e.forEach===Array.prototype.forEach)e.forEach(t);else if(e.length===+e.length)for(var n=0,i=e.length;n0&&t.pluginsShouldBeSorted(e)&&(n=n.sort((function(e,t){return e.name>t.name?1:e.name=0?"Windows Phone":t.indexOf("win")>=0?"Windows":t.indexOf("android")>=0?"Android":t.indexOf("linux")>=0||t.indexOf("cros")>=0?"Linux":t.indexOf("iphone")>=0||t.indexOf("ipad")>=0?"iOS":t.indexOf("mac")>=0?"Mac":"Other",("ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)&&"Windows Phone"!==e&&"Android"!==e&&"iOS"!==e&&"Other"!==e)return!0;if(void 0!==n){if((n=n.toLowerCase()).indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e)return!0;if(n.indexOf("linux")>=0&&"Linux"!==e&&"Android"!==e)return!0;if(n.indexOf("mac")>=0&&"Mac"!==e&&"iOS"!==e)return!0;if((-1===n.indexOf("win")&&-1===n.indexOf("linux")&&-1===n.indexOf("mac"))!=("Other"===e))return!0}return i.indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e||(i.indexOf("linux")>=0||i.indexOf("android")>=0||i.indexOf("pike")>=0)&&"Linux"!==e&&"Android"!==e||(i.indexOf("mac")>=0||i.indexOf("ipad")>=0||i.indexOf("ipod")>=0||i.indexOf("iphone")>=0)&&"Mac"!==e&&"iOS"!==e||(i.indexOf("win")<0&&i.indexOf("linux")<0&&i.indexOf("mac")<0&&i.indexOf("iphone")<0&&i.indexOf("ipad")<0)!=("Other"===e)||void 0===navigator.plugins&&"Windows"!==e&&"Windows Phone"!==e}},{key:"getHasLiedBrowser",value:function(){var e,t=navigator.userAgent.toLowerCase(),n=navigator.productSub;if(("Chrome"==(e=t.indexOf("firefox")>=0?"Firefox":t.indexOf("opera")>=0||t.indexOf("opr")>=0?"Opera":t.indexOf("chrome")>=0?"Chrome":t.indexOf("safari")>=0?"Safari":t.indexOf("trident")>=0?"Internet Explorer":"Other")||"Safari"===e||"Opera"===e)&&"20030107"!==n)return!0;var i,r=eval.toString().length;if(37===r&&"Safari"!==e&&"Firefox"!==e&&"Other"!==e)return!0;if(39===r&&"Internet Explorer"!==e&&"Other"!==e)return!0;if(33===r&&"Chrome"!==e&&"Opera"!==e&&"Other"!==e)return!0;try{throw"a"}catch(t){try{t.toSource(),i=!0}catch(t){i=!1}}return i&&"Firefox"!==e&&"Other"!==e}},{key:"isCanvasSupported",value:function(){var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))}},{key:"isWebGlSupported",value:function(){if(!t.isCanvasSupported())return!1;var e=t.getWebglCanvas();return!!window.WebGLRenderingContext&&!!e}},{key:"isIE",value:function(){return"Microsoft Internet Explorer"===navigator.appName||!("Netscape"!==navigator.appName||!/Trident/.test(navigator.userAgent))}},{key:"hasSwfObjectLoaded",value:function(){return void 0!==window.swfobject}},{key:"hasMinFlashInstalled",value:function(){return window.swfobject.hasFlashPlayerVersion("9.0.0")}},{key:"addFlashDivNode",value:function(e){var t=document.createElement("div");t.setAttribute("id",e.fonts.swfContainerId),document.body.appendChild(t)}},{key:"loadSwfAndDetectFonts",value:function(e,n){window.___fp_swf_loaded=function(t){e(t)};var i=n.fonts.swfContainerId;t.addFlashDivNode(),window.swfobject.embedSWF(n.fonts.swfPath,i,"1","1","9.0.0",!1,{onReady:"___fp_swf_loaded"},{allowScriptAccess:"always",menu:"false"},{})}},{key:"getWebglCanvas",value:function(){var e=document.createElement("canvas"),t=null;try{t=e.getContext("webgl")||e.getContext("experimental-webgl")}catch(e){}return t||(t=null),t}}]),t}(),n={getItem:function(e){var t=this.getCookieString().match(this._cookieRegEx(e));return t?t[1].replace(/^"(.*)"$/,"$1"):""},getBcookie:function(){try{for(var e=document.cookie.split(/\s*;\s*/),t=0;t1&&"bcookie"===n[0]){var i=n[n.length-1];return i.substring(2,i.length-1)}}}catch(e){return""}return""},setItem:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.getDomain(),r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"/";if(n){var o=["".concat(e,"=").concat(t,"; path=").concat(r,"; secure=true")];"string"==typeof i&&i.length>0&&o.push("domain="+i),o.push("expires="+(n instanceof Date?n.toUTCString():n)),document.cookie=o.join("; ")}},deleteItem:function(e){this.setItem(e,"",new Date(0)),this.setItem(e,"",new Date(0),"");var t=this.getDomain().split(".");t.length>2&&(t=t.slice(t.length-2));var n=t.join(".");this.setItem(e,"",new Date(0),n)},_cookieRegEx:function(e){return new RegExp(e+"=([^;]*)")},getCookieString:function(){return document.cookie},getDomain:function(){return window.location?window.location.hostname:""}},i="HUMAN",r="DFP_WEB";function o(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,i=n?n.querySelector("#"+e):document.getElementById(e);if(i){var r=i.firstChild.nodeValue;if(t&&i.parentNode.removeChild(i),r)try{return JSON.parse(r)}catch(e){return}}}function a(e,t,n){var i=new XMLHttpRequest,r=n?"https://www.linkedin.com":"https://www.linkedin-ei.com";r+=String(t),i.open("POST",r),i.setRequestHeader("Content-Type","application/json"),i.send(e)}function s(e){var t=document.getElementsByClassName(e);return void 0!==t&&t.length>=1}var l=function(){function e(){Pe(this,e)}return De(e,null,[{key:"str2ab",value:function(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),i=0,r=e.length;i>e/4).toString(16)}))}},{key:"generateSha256HashOrDefault",value:function(e){var t=(new TextEncoder).encode(e);return crypto.subtle.digest("SHA-256",t).then((function(e){return Array.from(new Uint8Array(e)).map((function(e){return("00"+e.toString(16)).slice(-2)})).join("")})).catch((function(){return""}))}}]),e}(),c=function(){var e={compressToBase64:function(t){if(null==t)return"";var n=e._compress(t,6,(function(e){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e)}));switch(n.length%4){default:case 0:return n;case 1:return n+"===";case 2:return n+"==";case 3:return n+"="}},_compress:function(e,t,n){if(null==e)return"";var i,r,o,a={},s={},l="",c="",u="",d=2,h=3,p=2,f=[],m=0,g=0;for(o=0;o>=1}else{for(r=1,i=0;i>=1}0==--d&&(d=Math.pow(2,p),p++),delete s[u]}else for(r=a[u],i=0;i>=1;0==--d&&(d=Math.pow(2,p),p++),a[c]=h++,u=String(l)}if(""!==u){if(Object.prototype.hasOwnProperty.call(s,u)){if(u.charCodeAt(0)<256){for(i=0;i>=1}else{for(r=1,i=0;i>=1}0==--d&&(d=Math.pow(2,p),p++),delete s[u]}else for(r=a[u],i=0;i>=1;0==--d&&(d=Math.pow(2,p),p++)}for(r=2,i=0;i>=1;for(;;){if(m<<=1,g==t-1){f.push(n(m));break}g++}return f.join("")}};return e}(),u={apfcTypes:1,collectionType:2,trackingId:3},d={protocol:1,hostname:2,port:3,origin:4,host:5,href:6,hash:7,pathname:8},h={saveData:1,effectiveType:2,rtt:3,downlink:4,downlinkMax:5,type:6},p={liedOS:1,liedBrowser:2,liedResolution:3,adBlockInstalled:4,liedLanguages:5},f={type:1,description:2,suffixes:3},m={canvasHash:1,canvasWinding:2},g={label:1,gid:2,id:3,kind:4},v={lists:1,fontsHash:2},y={Orientation:1,Enabled:2},E={charging:1,dischargingTime:2,level:3,chargingTime:4},b={touchStart:1,touchEvent:2,maxTouchPoints:3},_={"webgl stencil bits":1,"webgl vertex shader high float precision rangeMax":2,"webgl antialiasing":3,"webgl max vertex texture image units":4,"webgl fragment shader medium int precision rangeMax":5,"webgl fragment shader low int precision rangeMin":6,"webgl max vertex uniform vectors":7,"webgl renderer":8,"webgl vertex shader high float precision":9,"webgl green bits":10,"webgl fragment shader medium int precision rangeMin":11,"webgl fragment shader low int precision rangeMax":12,"webgl fragment shader medium int precision":13,"webgl blue bits":14,"webgl max viewport dims":15,"webgl unmasked vendor":16,"webgl vertex shader medium float precision":17,"webgl fragment shader low int precision":18,"webgl vertex shader high int precision":19,"webgl vertex shader medium int precision rangeMax":20,"webgl unmasked renderer":21,"webgl fragment shader high int precision":22,"webgl aliased point size range":23,"webgl vertex shader medium float precision rangeMax":24,"webgl vertex shader low int precision rangeMax":25,"webgl fragment shader low float precision":26,"webgl fragment shader high int precision rangeMin":27,"webgl vertex shader high float precision rangeMin":28,"webgl red bits":29,vendorAndRenderer:30,"webgl vertex shader medium int precision rangeMin":31,"webgl vertex shader low float precision":32,"webgl vertex shader medium int precision":33,"webgl fragment shader medium float precision rangeMax":34,"webgl max texture image units":35,"webgl vertex shader medium float precision rangeMin":36,"webgl fragment shader high float precision rangeMin":37,"webgl fragment shader high int precision rangeMax":38,"webgl vertex shader high int precision rangeMax":39,webglHash:40,"webgl max varying vectors":41,"webgl fragment shader medium float precision rangeMin":42,"webgl vertex shader low int precision":43,"webgl fragment shader low float precision rangeMin":44,"webgl aliased line width range":45,"webgl max combined texture image units":46,"webgl shading language version":47,"webgl vertex shader high int precision rangeMin":48,"webgl max anisotropy":49,"webgl max render buffer size":50,"webgl vendor":51,"webgl vertex shader low int precision rangeMin":52,"webgl max fragment uniform vectors":53,"webgl fragment shader high float precision rangeMax":54,"webgl version":55,"webgl fragment shader high float precision":56,"webgl max texture size":57,"webgl max cube map texture size":58,"webgl fragment shader medium float precision":59,"webgl vertex shader low float precision rangeMin":60,"webgl max vertex attribs":61,"webgl alpha bits":62,"webgl vertex shader low float precision rangeMax":63,"webgl fragment shader low float precision rangeMax":64,"webgl depth bits":65,extensions:66},w={ANGLE_instanced_arrays:67,EXT_blend_minmax:68,EXT_clip_control:69,EXT_color_buffer_float:70,EXT_color_buffer_half_float:71,EXT_conservative_depth:72,EXT_depth_clamp:73,EXT_disjoint_timer_query:74,EXT_disjoint_timer_query_webgl2:75,EXT_float_blend:76,EXT_frag_depth:77,EXT_polygon_offset_clamp:78,EXT_render_snorm:79,EXT_shader_texture_lod:80,EXT_texture_compression_bptc:81,EXT_texture_compression_rgtc:82,EXT_texture_filter_anisotropic:83,EXT_texture_mirror_clamp_to_edge:84,EXT_texture_norm16:85,EXT_sRGB:86,KHR_parallel_shader_compile:87,NV_shader_noperspective_interpolation:88,OES_draw_buffers_indexed:89,OES_element_index_uint:90,OES_fbo_render_mipmap:91,OES_sample_variables:92,OES_shader_multisample_interpolation:93,OVR_multiview2:94,OES_standard_derivatives:95,OES_texture_float:96,OES_texture_float_linear:97,OES_texture_half_float:98,OES_texture_half_float_linear:99,OES_vertex_array_object:100,WEBGL_blend_func_extended:101,WEBGL_clip_cull_distance:102,WEBGL_color_buffer_float:103,WEBGL_compressed_texture_astc:104,WEBGL_compressed_texture_etc:105,WEBGL_compressed_texture_etc1:106,WEBGL_compressed_texture_pvrtc:107,WEBGL_compressed_texture_s3tc:108,WEBGL_compressed_texture_s3tc_srgb:109,WEBGL_debug_renderer_info:110,WEBGL_debug_shaders:111,WEBGL_depth_texture:112,WEBGL_draw_buffers:113,WEBGL_lose_context:114,WEBGL_multi_draw:115,WEBGL_polygon_mode:116,WEBGL_provoking_vertex:117,WEBGL_render_shared_exponent:118,WEBGL_stencil_texturing:119},T={"American Typewriter":1,"Andale Mono":2,Arial:3,"Arial Black":4,"Arial Hebrew":5,"Arial Narrow":6,"Arial Rounded MT Bold":7,"Arial Unicode MS":8,Avenir:9,"Avenir Next":10,"Avenir Next Condensed":11,Bahnschrift:12,Baskerville:13,"Big Caslon":14,"Bodoni 72":15,"Bodoni 72 Oldstyle":16,"Bodoni 72 Smallcaps":17,"Bradley Hand":18,"Brush Script MT":19,Calibri:20,Cambria:21,"Cambria Math":22,Candara:23,Chalkboard:24,"Chalkboard SE":25,Chalkduster:26,Charter:27,Cochin:28,"Comic Sans MS":29,Consolas:30,Constantia:31,Corbel:32,Copperplate:33,Courier:34,"Courier New":35,Didot:36,"DIN Alternate":37,"DIN Condensed":38,Ebrima:39,"Franklin Gothic Medium":40,Futura:41,Gabriola:42,Gadugi:43,Geneva:44,Georgia:45,"Gill Sans":46,Helvetica:47,"Helvetica Neue":48,Herculanum:49,"Hoefler Text":50,"HoloLens MDL2 Assets":51,Impact:52,"Ink Free":53,"Javanese Text":54,"Leelawadee UI":55,"Lucida Console":56,"LUCIDA GRANDE":57,"Lucida Grande":58,"Lucida Sans Unicode":59,Luminari:60,"Malgun Gothic":61,"Marker Felt":62,Marlett:63,Menlo:64,"Microsoft Himalaya":65,"Microsoft JhengHei":66,"Microsoft New Tai Lue":67,"Microsoft PhagsPa":68,"Microsoft Sans Serif":69,"Microsoft Tai Le":70,"Microsoft YaHei":71,"Microsoft Yi Baiti":72,"MingLiU-ExtB":73,Monaco:74,"Mongolian Baiti":75,"MS Gothic":76,"MV Boli":77,"Myanmar Text":78,"Nirmala UI":79,Noteworthy:80,Optima:81,Palatino:82,"Palatino Linotype":83,Papyrus:84,Phosphate:85,Rockwell:86,"Savoye LET":87,"Segoe MDL2 Assets":88,"Segoe Print":89,"Segoe Script":90,"Segoe UI":91,"Segoe UI Historic":92,"Segoe UI Emoji":93,"Segoe UI Symbol":94,SignPainter:95,SimSun:96,Sitka:97,Skia:98,"Snell Roundhand":99,Sylfaen:100,Symbol:101,Tahoma:102,Times:103,"Times New Roman":104,Trattatello:105,"Trebuchet MS":106,Verdana:107,Webdings:108,Wingdings:109,"Wingdings 2":110,"Wingdings 3":111,"Yu Gothic":112,Zapfino:113},S={appVersion:1,numOfCores:2,webrtc:3,touchSupport:4,webgl:5,timezone:6,plugins:7,localStorage:8,incognito:9,language:10,appCodeName:11,battery:12,platform:13,javascripts:14,automation:15,pixelDepth:16,screenOrientation:17,availableScreenResolution:18,timezoneOffset:19,oscpu:20,fonts:21,vendor:22,sessionStorage:23,webdriver:24,audio:25,openDatabase:26,screenResolution:27,vendorSub:28,enumerateDevices:29,product:30,canvas:31,appName:32,mimetyps:33,cpuClass:34,indexedDb:35,userAgent:36,deviceMemory:37,productSub:38,addBehavior:39,signals:40,networkInfo:41,location:42,colorDepth:43,FPDataCookie:44,tsSeed:45,errors:46,pixelRatio:47};function C(e){var t={};return function(e){var t=e.webgl,n={};if(void 0!==t&&void 0!==t.extensions&&null!==t&&null!==t.extensions){for(var i=t.extensions,r=[],o=0;oe.length)&&(t=e.length);for(var n=0,i=new Array(t);n1?n[1]:null},M={ADVERTISING:"ADVERTISING",ANALYTICS_AND_RESEARCH:"ANALYTICS_AND_RESEARCH",FUNCTIONAL:"FUNCTIONAL"},D="GUEST",U="MEMBER",B="ENTERPRISE_UNBOUND",F=(I(O={},D,"li_gc"),I(O,U,"li_mc"),I(O,B,"li_ec"),O);I(R={},D,"mypreferences/g/guest-cookies"),I(R,U,"settings/member-cookies"),I(R,B,"mypreferences/e/enterprise-cookies");var q,H,G,j,W=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;for(var o in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=t||{},this.consentAvailable=!1,this.issuedAt=n,this.userMode=i,this.optedInConsentMap={},M)t[o]=t[o]||0,0!==t[o]&&(this.consentAvailable=!0),this.optedInConsentMap[o]=1===t[o]||0===t[o]&&1===r},V=(q=[M.ADVERTISING,M.ANALYTICS_AND_RESEARCH,M.FUNCTIONAL],H=[0,1,2,0],G=function(e){for(var t={},n=0;n>2*n&3];return t},j=function(e){var t=0;return e>=0&&e<=3&&(t=H[e]),t},{parseConsentBody:function(e,t){var n=new RegExp(["^(\\d+)","(\\d+)","(\\d+)","((?:.|\\s)+)"].join(";")),i=e.match(n);if(!i)return{error:"Invalid consent body encoding",consent:new W};var r=G(parseInt(i[1],10)),o=new Date(1e3*parseInt(i[2],10)),a=j(parseInt(i[3],10));return{error:null,consent:new W(r,o,t,a)}},parseConsentBodyEnterpriseUnbound:function(e,t,n){var i=function(e){try{var t=x(e);if(t&&t.enterpriseProfile&&t.enterpriseProfile.length>=2&&t.enterpriseProfile[0].enterpriseAccount)return{enterpriseAccountId:parseInt(t.enterpriseProfile[0].enterpriseAccount,10),enterpriseProfileId:parseInt(t.enterpriseProfile[1],10)}}catch(e){return null}return null}(t);if(!i)return{error:"Invalid enterprise profile urn provided",consent:new W};var r=i.enterpriseAccountId,o=i.enterpriseProfileId,a=new RegExp(["^((?:\\d+,\\d+,\\d+,\\d+,\\d+)(?:\\|(?:\\d+,\\d+,\\d+,\\d+,\\d+))*)","(\\d+)","(\\d+)","(?:(?:.|\\s)+)$"].join(";")),s=e.match(a);if(!s)return{error:"Invalid consent body encoding",consent:new W};var l=s[1].split("|").map((function(e){return e.split(",").map((function(e){return parseInt(e,10)}))})).filter((function(e){var t=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var t=[],n=!0,i=!1,r=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done)&&(t.push(o.value),4!==t.length);n=!0);}catch(e){i=!0,r=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw r}}return t}}(e)||function(e){if(e){if("string"==typeof e)return k(e,4);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?k(e,4):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e),i=t[1],a=t[2],s=t[3];return i===r&&a===o&&s===n}))[0];if(!l)return{error:null,consent:new W};var c=G(l[0]),u=new Date(1e3*parseInt(s[2],10)),d=j(parseInt(s[3],10));return{error:null,consent:new W(c,u,B,d)}}}),K=new RegExp(["^(\\d+)","((?:.|\\s)+)"].join(";")),z=function(e){var t={};for(var n in M)t[n]=e;return{error:null,consent:new W(t,null,null,e)}},$=function(e,t,n,i){e&&e.length>1&&'"'==e.charAt(0)&&'"'==e.charAt(e.length-1)&&(e=e.substring(1,e.length-1));var r,o=null;try{o=(r=e,"undefined"==typeof atob&&"undefined"!=typeof Buffer?Buffer.from(r,"base64").toString("binary"):atob(r)).match(K)}catch(e){}if(!o)return{error:"Invalid consent encoding",consent:new W};var a=parseInt(o[1],10),s=o[2];return 1===a?t===B?V.parseConsentBodyEnterpriseUnbound(s,n,i):V.parseConsentBody(s,t):{error:"Invalid encoded consent version ".concat(a),consent:new W}},X={preprocessor:null,audio:{timeout:1e3,excludeIOS11:!0},fonts:{swfContainerId:"apfcDf",swfPath:"flash/compiled/FontList.swf",userDefinedFonts:[],extendedJsFonts:void 0,hashOnly:!1},screen:{detectScreenOrientation:!0},plugins:{sortPluginsFor:[/palemoon/i],excludeIE:!1},webgl:{hashOnly:!1},telemetryCollectPath:"/platform-telemetry/li/apfcDf",gloablIntegrationDataCollectionPath:"/apfc/collect",extraComponents:[],excludes:{pixelRatio:!0,doNotTrack:!0,fontsFlash:!0},debug:!1,NOT_AVAILABLE:"n/a",ERROR:"err",EXCLUDED:"excluded",useRequestIdleCallBack:!0};try{var Y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.enterpriseProfileUrn,r=n.enterpriseAppInstanceId;if("string"!=typeof t){if("undefined"==typeof document)return{error:"cookie string must be provided in SSR mode",consent:new W};t=document.cookie}if(i&&!r||!i&&r)return{error:"enterpriseProfileUrn and enterpriseAppInstanceId must both be provided if at least one is provided",consent:new W};if(!(e!==B||i&&r))return{error:"enterpriseProfileUrn and enterpriseAppInstanceId are required for unbound userMode",consent:new W};if(!e){var o=P(F[B],t);if(o&&i&&r){var a=$(o,B,i,r);if(a.consent.userMode===B||a.error)return a}e=P("liap",t)?P(F[U],t)?U:D:P(F[D],t)?D:U}return function(e,t,n,i){var r=P(F[e],t);return r?$(r,e,n,i):P(F[D],t)||P(F[U],t)||P(F[B],t)?z(2):z(1)}(e,t,i,r)}().consent.optedInConsentMap;Y[M.FUNCTIONAL],function(){throw new TypeError('"re" is read-only')}()}catch(e){}var Q=function(){function e(t,n,i){var r=this;if(Pe(this,e),void 0!==n&&void 0!==t&&"enabled"===t.globalIntegration)"complete"===document.readyState?this.checkConfigAndInitializeAllIntegration(n,i):window.addEventListener("load",(function(){r.checkConfigAndInitializeAllIntegration(n,i)}));else if(void 0!==t){var o=JSON.parse(JSON.stringify(X));s("settings-iframe")||s("setting-headline")||(o.useRequestIdleCallBack=!1),this.initialize(o,t)}else{var a=JSON.parse(JSON.stringify(X));s("settings-iframe")||s("setting-headline")||(a.useRequestIdleCallBack=!1),"complete"===document.readyState?this.initialize(a):window.addEventListener("load",(function(){r.initialize(a)}))}}return De(e,[{key:"isDfCollectionRequired",value:function(e){return"number"!=typeof e.samplingTimeWindowInMillis||e.samplingTimeWindowInMillis<=0||""===n.getItem("df_ts")}},{key:"checkConfigAndInitializeAllIntegration",value:function(e,t){!0!==globalThis.pauseApfc&&(globalThis.pauseApfc=!0,setTimeout((function(){globalThis.pauseApfc=!1}),3e4),!0===t.enableOnDemandMode?(this.checkConfigAndInitializeGlobalIntegration(e,t),this.checkConfigAndInitializeThirdPartyIntegration(e,t)):(this.deleteDfCookieIfRequired(t),this.isDfCollectionRequired(t)&&(this.checkConfigAndInitializeGlobalIntegration(e,t),this.checkConfigAndInitializeThirdPartyIntegration(e,t),this.addDfCookieIfRequired(t))))}},{key:"checkConfigAndInitializeGlobalIntegration",value:function(e,t){(!0===t.enableOnDemandMode&&t.fpDataCookie.apfcTypes.includes("DNA")||!0===t.dnaIntegrationEnabled&&!0!==globalThis.dnaIntegrationCompleted)&&this.intializeGlobalIntegration(X,e,t)}},{key:"checkConfigAndInitializeThirdPartyIntegration",value:function(e,t){(!0===t.enableOnDemandMode&&t.fpDataCookie.apfcTypes.includes(i)||!0===t.humanIntegrationEnabled&&!0!==globalThis.humanIntegrationCompleted)&&this.initializeHumanIntegration(e,t),(!0===t.enableOnDemandMode&&t.fpDataCookie.apfcTypes.includes(r)||!0===t.dfpIntegrationEnabled&&!0!==globalThis.dfpIntegrationCompleted)&&this.intializeDfpIntegration(e,t)}},{key:"deleteDfCookieIfRequired",value:function(e){"number"!=typeof e.samplingTimeWindowInMillis||e.samplingTimeWindowInMillis,""!==n.getItem("df_ts")&&(Number(n.getItem("df_ts")),n.deleteItem("df_ts"))}},{key:"addDfCookieIfRequired",value:function(e){}},{key:"initialize",value:function(e,n){if(null!=n||null!=o("apfcDfPK")){var i=this.reqid,r=this.pageInstance,s=this.isProd();return(new t).getFeatures((function(t,o){t.reqid=i,t.pageInstance=r,t.fullFeatureCollection=o,l.encryptWithKeyFromDifferentSources(JSON.stringify(t),"apfcDfPK","apfcDfPKV",n,s).then((function(t){globalThis.apfcDf=t,!0===o&&a(JSON.stringify(t),e.telemetryCollectPath,s)}))}),e)}globalThis.triggerApfc=this.reentry}},{key:"intializeGlobalIntegration",value:function(i,r,o){var s=this.isProd();return(new t).getFeatures((function(t,u){if(!0===u){if(e.prototype.populateFpDataCookie(t,o),!0===o.isSyncEnabledWithHeaders){var d=JSON.stringify(C(t));globalThis.apfcDfH=(h=d,c.compressToBase64(h))}l.encryptWithKeyIds(JSON.stringify(t),"apfcDfPK","apfcDfPKV").then((function(e){if(globalThis.apfcDf=e,!0===o.isSyncEnabledWithHeaders||!0===o.isSyncEnabledWithCb){var t=function(e){var t={};t[btoa("DNA_ENCRYPTED")]=e;var i={};return i.payload=t,i.browserId=n.getBcookie(),i}(e);a(JSON.stringify(t),i.gloablIntegrationDataCollectionPath,s)}r("DNA",JSON.stringify(e))})),globalThis.dnaIntegrationCompleted=!0}var h}),i)}},{key:"intializeDfpIntegration",value:function(t,i){var o=n.getBcookie(),a=this.isProd()?"fb6bbd47-fa7c-4264-b4e9-b25948407586":"ee078acd-0704-4344-9e5b-6b84b480c30a";try{if(RegExp("^[\\w-]*$").test(o)){var s="https://merchantpool1.linkedin.com/mdt.js?session_id=".concat(o,"&instanceId=").concat(a),l=document.createElement("script");l.setAttribute("src",s),l.setAttribute("id","dfpIframeScript"),l.addEventListener("load",(function(){return window.dfp.doFpt(document)})),document.getElementsByTagName("head")[0].appendChild(l);var c={sessionId:o,instanceId:a};e.prototype.populateFpDataCookie(c,i),t(r,JSON.stringify(c))}else{var u={error:"Invalid session_id: "+o};t(r,JSON.stringify(u))}}catch(i){var d={error:i};t(r,JSON.stringify(d))}globalThis.dfpIntegrationCompleted=!0}},{key:"initializeHumanIntegration",value:function(t,r){var o=r.treeId,a=Date.now(),s=this.isProd()?"PXdOjV695v":"PXgoH0hfKu",c=n.getBcookie(),u="https://li.protechts.net/index.html?ts="+a+"&r_id="+encodeURIComponent(o)+"&app_id="+s+"&uc=scraping";l.generateSha256HashOrDefault(c).then((function(n){""!==(c=n)&&(u+="&d_id="+c);try{var l=document.createElement("iframe");l.setAttribute("id","humanThirdPartyIframe"),l.setAttribute("src",u),l.setAttribute("sandbox","allow-same-origin allow-scripts"),l.setAttribute("aria-hidden","true"),l.style.height="0px",l.style.width="0px",l.style.border="none",l.style.position="absolute",l.style.left="-9999px",document.body.appendChild(l);var d={app_id:s,ts:a,d_id:c,r_id:o,uc:"scraping"};e.prototype.populateFpDataCookie(d,r),t(i,JSON.stringify(d))}catch(e){var h={error:e};t(i,JSON.stringify(h))}})),globalThis.humanIntegrationCompleted=!0}}]),e}();Q.prototype.reentry=function(e){globalThis.triggerApfc=null,new Q(e)},Q.prototype.reentryGlobalIntegration=function(e,t){globalThis.triggerDnaApfcEvent=null,new Q({globalIntegration:"enabled"},e,t)},Q.prototype.reentryGlobalIntegrationOnDemand=function(e,t){if(void 0!==t&&void 0!==e){var n=Q.prototype.extractDataCookie();!0===t.onlyOnDemandFlow&&null===n||(t.fpDataCookie=n,null!==n&&(t.enableOnDemandMode=!0),Q.prototype.reentryGlobalIntegration(e,t))}},Q.prototype.extractDataCookie=function(){var e=n.getItem("li_apfcdc");if(n.deleteItem("li_apfcdc"),!e||""===e)return null;var t=(e=atob(e)).split(":::");if(t.length<5)return null;var i={};return i.trackingId=t[0],i.memberId=t[1],i.sessionUrn=t[2],i.collectionType=t[3],i.apfcTypes=t[4].split(","),i},Q.prototype.populateFpDataCookie=function(e,t){"object"==xe(e)&&"object"==xe(t)&&(e.FPDataCookie=t.fpDataCookie)},Q.prototype.isProd=function(){var e=location&&location.host;return e&&e.indexOf(".linkedin.com")>-1&&!e.startsWith("pemberly")},Q.prototype.isEmpty=function(e){return e&&0===Object.keys(e).length},"undefined"!=typeof globalThis&&"undefined"!=typeof document&&"undefined"!=typeof window&&(void 0===globalThis.triggerDnaApfcEvent&&(globalThis.triggerDnaApfcEvent=Q.prototype.reentryGlobalIntegration),void 0===globalThis.triggerDnaApfcEventOnDemand&&(globalThis.triggerDnaApfcEventOnDemand=Q.prototype.reentryGlobalIntegrationOnDemand),new Q)}();var Er=function(){function e(){Pe(this,e)}return De(e,null,[{key:"collectFeatures",value:function(e,t){try{"undefined"!=typeof globalThis&&"undefined"!=typeof document&&"undefined"!=typeof window&&"undefined"!==globalThis.triggerDnaApfcEventOnDemand&&globalThis.triggerDnaApfcEventOnDemand(t,e)}catch(e){}}}]),e}(),br=function(){function e(t,n,i,r,o,a,s,l,c,u){Pe(this,e),Ue(this,"hostApis",void 0),Ue(this,"statics",void 0),Ue(this,"options",void 0),Ue(this,"allowTimingOrigin",void 0),Ue(this,"fireResourceLoadEvent",void 0),Ue(this,"isTracerEnabled",void 0),Ue(this,"responseRleCache",void 0),Ue(this,"fireApfcEvent",void 0),Ue(this,"abuseDeviceSignalCollectionConfig",void 0),Ue(this,"trackingEndpoint",void 0),Ue(this,"collectResourceTimings",void 0),Ue(this,"collectCdnData",void 0),Ue(this,"perfObserver",void 0),Ue(this,"renderTimings",new Map),Ue(this,"urlToTreeId",new Map),Ue(this,"cdnDataProvider",void 0),Ue(this,"observables",new ji),Ue(this,"trackingEndpointPattern",void 0),this.hostApis=t,this.statics=n,this.options=i,this.allowTimingOrigin=r,this.fireResourceLoadEvent=o,this.isTracerEnabled=a,this.responseRleCache=s,this.fireApfcEvent=l,this.abuseDeviceSignalCollectionConfig=c,this.trackingEndpoint=u,this.collectResourceTimings=i["enable-rs-timing"],this.collectCdnData=i["enable-cdn-tracking"],this.collectCdnData&&(this.cdnDataProvider=new yr(t)),this.trackingEndpointPattern=function(e){if(!e)return"/li/track";try{return new URL(e).pathname}catch(t){return e}}(this.trackingEndpoint)}return De(e,[{key:"recordTreeId",value:function(e,t){this.collectResourceTimings&&this.urlToTreeId.set(function(e,t){return(dr=dr||t.createElement("a")).href=e,dr.href}(t,this.hostApis.document),e)}},{key:"recordRenderStart",value:function(e,t){this.renderTimings.has(e)||this.renderTimings.set(e,{renderName:t,viewId:e,renderStart:pr(this.hostApis.performance,this.allowTimingOrigin)})}},{key:"recordRenderEnd",value:function(e,t,n){var i=this.renderTimings.get(e);if(i&&(i.renderEnd=i.renderEnd||pr(this.hostApis.performance,this.allowTimingOrigin),t))return n?this.collectViewLoadEventData(i,n):void Dn("ViewLoadEvent",qi)}},{key:"collectViewLoadEventData",value:function(e,t){var n=e.renderName,i=e.renderEnd,r=void 0===i?-1:i,o=e.renderStart,a=void 0===o?-1:o,s=[];return s.push({viewProgressType:"RENDER_START",timestamp:a}),s.push({viewProgressType:"RENDER_END",timestamp:r}),{parentPageLoadId:t,viewHierarchy:[n],viewProgressStates:s}}},{key:"startObserving",value:function(){var e=this.hostApis,t=e.PerformanceObserver,n=e.performance;this.stopObserving(),t?this.setupPerformanceObserver(t,n.timeOrigin):this.collectResourceTimings&&this.emulateResourceTimingObserver(n),this.collectResourceTimings&&this.processNewResourceTimings()}},{key:"stopObserving",value:function(){var e;null===(e=this.perfObserver)||void 0===e||e.disconnect(),this.reset()}},{key:"collect",value:function(e){var t=this,n=e.isInitial,i=e.immediate,r=this.collectSynchronousData(n);if(i)return r;var o=this.collectAsynchronousData();return"then"in o?o.then((function(e){return(0,t.hostApis.assign)(r,e),r})):r}},{key:"collectPageLoadStartData",value:function(e){var t=e.isInitial,n=e.rumKey,i=Object.create(null);i.pageKey=n,i.pageLoadType=t?"INITIAL_LOAD":"SUBSEQUENT_LOAD",i.networkInformationMetrics=this.snapshot.networkInformationMetrics;var r=this.statics,o=r.webUIFramework,a=r.timeSource,s=r.isSinglePageApp,l=r.appRenderMode,c=r.isAppRenderFailed,u=r.isFromServiceWorker,d=r.treeId;return i.treeId=d,i.browserPageLoadStartContext={webUIFramework:o,timeSource:a,isSinglePageApp:s,appRenderMode:l,isAppRenderFailed:c,isFromServiceWorker:u},i}},{key:"collectPageLoadEndData",value:function(e){var t=Object.create(null),n=Object.create(null);t.cdnData=[],t.browserPageLoadEndContext={},t.navigationTiming=Object.create(null);var i=e.isInitial,r=e.immediate,o=this.hostApis.assign;if(i){var a=wr(this.hostApis.performance),s=a.htmlMetrics,l=a.redirectCount,c=a.navigationType,u=a.workerStart;s&&(t.browserPageLoadEndContext.htmlMetrics=Object.create(null),o(t.browserPageLoadEndContext.htmlMetrics,s)),Object.prototype.hasOwnProperty.call(a,"redirectCount")&&(n.redirectCount=l),Object.prototype.hasOwnProperty.call(a,"navigationType")&&(n.navigationType=c),n.workerStart=null!=u?u:0,Ui.forEach((function(e){Object.prototype.hasOwnProperty.call(a,e)&&(n[e]=a[e])})),o(t.navigationTiming,n)}if(!r){var d=this.collectAsynchronousData();if("then"in d)return d.then((function(e){return o(t.cdnData,e.cdnData),t}))}var h=this.collectAsynchronousData(!0);return o(t.cdnData,h.cdnData),t}},{key:"collectResourceLoadEvent",value:function(e,t){var n=e.name,i=e.transferSize,r=e.initiatorType,o=e.nextHopProtocol,a=e.encodedBodySize,s=e.decodedBodySize,l=e.requestStart,c={};c.resourceKey=n,c.isNetwork=!!i&&0!==i,c.loadType=r||"unknown",c.timeOrigin=t;var u=[];Object.keys(Bi).forEach((function(t){var n;t in Oi&&void 0!==e[t]&&u.push({resourceProgressType:Bi[t],duration:null!==(n=e[t])&&void 0!==n?n:-1})})),c.resourceProgressStates=u;var d={},h=Fi[o];d.nextHopProtocol=null!=h?h:"UNKNOWN",d.transferSize=i,d.encodedBodySize=a,d.decodedBodySize=s,c.resourceNetworkContext=d,c.requestStart=l;try{var p,f,m=new URL(n),g=m.pathname+m.search+m.hash;return null===(p=this.responseRleCache)||void 0===p||p.offerResourceLoadEvent(g,c),null===(f=this.responseRleCache)||void 0===f?void 0:f.flushCacheByUrl(g)}catch(e){var v,y="".concat("Invalid url from ResourceLoadEvent"," request url ").concat(n);return e instanceof Error?(e.message="".concat(y," ").concat(e.message),Dn("ResourceLoadEvent",e)):Dn("ResourceLoadEvent",y),null===(v=this.responseRleCache)||void 0===v?void 0:v.flushCacheByUrl()}}},{key:"reset",value:function(){var e;this.observables.reset(),null===(e=this.cdnDataProvider)||void 0===e||e.clearUsedHostnames()}},{key:"collectSynchronousData",value:function(e){var t=this.hostApis,n=t.assign,i=t.PerformanceObserver,r=Object.create(null);return this.statics.pageLoadMode=e?"INITIAL":"PARTIAL",i||(this.observables.userTimingEntries=gr(this.hostApis.performance,this.options,!0),this.collectResourceTimings&&this.processNewResourceTimings()),this.observables.attachTreeIds(this.urlToTreeId),this.urlToTreeId.clear(),n(r,this.observables.getData(),this.snapshot,this.statics),e&&n(r,wr(this.hostApis.performance)),n(r,this.collectAsynchronousData(!0)),r}},{key:"collectAsynchronousData",value:function(e){var t=this,n={cdnData:[],usedCDN:this.extractUsedCDN([])};if(e){if(this.collectCdnData){var i=this.cdnDataProvider.getPresentData();n.cdnData=i,n.usedCDN=this.extractUsedCDN(i)}return n}var r=[];return this.collectCdnData&&r.push(this.cdnDataProvider.getDataWhenReady(this.options["async-plugins-timeout"]).then((function(e){n.cdnData=e,n.usedCDN=t.extractUsedCDN(e)}))),r.length>0?Nn(r,Promise).then((function(){return n})):n}},{key:"triggerDeviceSignalCollection",value:function(e){var t=e.onlyTriggerOnDemandFlow;try{var n=this.abuseDeviceSignalCollectionConfig||{},i=n.isDnaIntegrationLixEnabled,r=n.isHumanIntegrationLixEnabled,o=n.isDfpIntegrationLixEnabled,a=n.samplingTimeWindowInMillis,s=n.isOnDemandFingerprintingEnabled,l=n.isSyncFingerprintingWithHeadersLixEnabled,c=n.isSyncFingerprintingWithCbLixEnabled;if(r||o||i||l||c){var u,d,h={treeId:null!==(u=null===(d=this.statics.treeId)||void 0===d?void 0:d.toString())&&void 0!==u?u:"",humanIntegrationEnabled:r,dfpIntegrationEnabled:o,dnaIntegrationEnabled:i,samplingTimeWindowInMillis:a,onlyOnDemandFlow:t,isSyncEnabledWithHeaders:l,isSyncEnabledWithCb:c};(!t||t&&s||l||c)&&Er.collectFeatures(h,this.fireApfcEvent)}}catch(e){}}},{key:"setupPerformanceObserver",value:function(e,t){var n=this;this.perfObserver=new e((function(e){var i=(n.abuseDeviceSignalCollectionConfig||{}).disablePerfMarkerOptimization;i&&n.triggerDeviceSignalCollection({onlyTriggerOnDemandFlow:!1}),e.getEntries().forEach((function(e){var r=e.entryType,o=e.name,a=e.startTime,s=e.duration;"resource"===r?n.processSingleResourceTiming(e,t):"mark"===r?(n.observables.userTimingEntries.push({entryType:"MARK",name:o,startTime:a,duration:s}),"mark_meaningful_paint_end"!==o||i||n.triggerDeviceSignalCollection({onlyTriggerOnDemandFlow:!1})):"measure"===r?n.observables.userTimingEntries.push({entryType:"MEASURE",name:o,startTime:a,duration:s}):"longtask"===r&&n.observables.longTasks.push({duration:s,name:o,startTime:a})}))})),this.observables.userTimingEntries=gr(this.hostApis.performance,this.options,!1);var i=["longtask"];(this.collectResourceTimings||this.collectCdnData)&&i.push("resource"),this.options["user-timing-mark-enabled"]&&i.push("mark"),this.options["user-timing-measure-enabled"]&&i.push("measure"),this.perfObserver.observe({entryTypes:i})}},{key:"emulateResourceTimingObserver",value:function(e){var t=this;e&&"function"==typeof e.setResourceTimingBufferSize&&"function"==typeof e.onresourcetimingbufferfull&&(e.setResourceTimingBufferSize(100),e.onresourcetimingbufferfull=function(){return t.processNewResourceTimings()})}},{key:"processNewResourceTimings",value:function(){var e=this,t=this.hostApis.performance;"function"==typeof t.getEntriesByType&&"function"==typeof t.clearResourceTimings&&(t.getEntriesByType("resource").forEach((function(n){return e.processSingleResourceTiming(n,t.timeOrigin)})),t.clearResourceTimings())}},{key:"processSingleResourceTiming",value:function(e,t){var n=this;if(this.collectResourceTimings){this.options["enable-otel"]&&yn.emit(Si.INTERNAL_OTEL_RESOURCE,{resourceTiming:e}),this.observables.resourceTimingEntries.push(e);var i=-1!==e.name.indexOf(this.trackingEndpointPattern);if(this.isTracerEnabled&&!i&&!function(e){for(var t=0,n=hr;t=0})),n=t.length>0?t[0]:{hostname:"",provider:"",httpVersion:"",ipVersion:""};return{static_domain:n.provider,http_version:n.httpVersion,ip_version:n.ipVersion}}},{key:"snapshot",get:function(){var e={detailedRenderTimingEntries:vr(this.renderTimings),networkInformationMetrics:_r(this.hostApis.connection)};return this.renderTimings.clear(),e}}]),e}();function _r(e){return e?{connectionType:e.type&&e.type.toUpperCase()||"UNKNOWN",effectiveType:function(e){switch(e){case"2g":return"TWO_G";case"3g":return"THREE_G";case"4g":return"FOUR_G";default:return"SLOW_2G"}}(e.effectiveType),roundTripTime:e.rtt||-1,downlinkBandwidth:e.downlink||-1,downlinkMaxBandwidth:void 0===e.downlinkMax?-1:e.downlinkMax===1/0?0:e.downlinkMax}:void 0}function wr(e){if(!e)return{navigationTimingApi:!1};var t=Object.create({});if("function"==typeof e.getEntriesByType){var n=e.getEntriesByType("navigation")[0];n&&(["fetchStart","responseEnd","decodedBodySize","encodedBodySize","transferSize"].every((function(e){return"number"==typeof n[e]}))&&(t.htmlMetrics={htmlFetchStart:n.fetchStart,htmlResponseEnd:n.responseEnd,htmlDecodedBodySize:n.decodedBodySize,htmlEncodedBodySize:n.encodedBodySize,htmlTransferSize:n.transferSize}),t.workerStart=n.workerStart)}var i=e.timing,r=e.navigation;return i&&r?(t.navigationTimingApi=!0,Ui.forEach((function(e){e in i&&(t[e]=i[e])})),t.navigationType=r.type,t.redirectCount=r.redirectCount):t.navigationTimingApi=!1,t}var Tr=function(){function e(t,n,i){Pe(this,e),Ue(this,"featureName",void 0),Ue(this,"trackingCore",void 0),Ue(this,"rumConfig",void 0),Ue(this,"observing",!1),Ue(this,"basePageTreeId",void 0),Ue(this,"startPageInstance",void 0),Ue(this,"startMemory",void 0),Ue(this,"reportTimeouts",[]),this.featureName=t,this.trackingCore=n,this.rumConfig=i}return De(e,[{key:"startObserving",value:function(){var t,n=this,i=this.getMemory();i&&!this.observing&&(this.basePageTreeId=this.trackingCore.host.treeID||"",this.startPageInstance=(null===(t=this.trackingCore.getCurrentContext())||void 0===t?void 0:t.pageInstance)||An(qe),this.startMemory=i,this.reportTimeouts=e.checkpoints.map((function(e){return setTimeout((function(){return n.reportMemory(e)}),60*e*1e3)})))}},{key:"stopObserving",value:function(){this.reportTimeouts.forEach((function(e){return clearTimeout(e)})),this.observing=!1}},{key:"reportMemory",value:function(e){var t={name:this.featureName,basePageTreeId:this.basePageTreeId,startTime:fr(this.trackingCore.host.api.performance),duration:0,startPageInstance:this.startPageInstance,marks:this.createMemoryMarks("-".concat(e,"min")),spans:[]};this.trackingCore.fireEvent({appId:this.rumConfig["app-id"],eventName:"FeaturePerformanceMeasurementEvent"},t)}},{key:"createMemoryMarks",value:function(e){var t=this.getMemory(),n=["jsHeapSizeLimit","totalJSHeapSize","usedJSHeapSize"].map((function(n){return{name:n+e,startTime:t[n]}})),i=t.usedJSHeapSize-this.startMemory.usedJSHeapSize;return n.push({name:(i<0?"usedJSHeapSizeDecrease":"usedJSHeapSizeIncrease")+e,startTime:Math.abs(i)},{name:"utilization"+e,startTime:Math.round(t.usedJSHeapSize/t.totalJSHeapSize*100)}),n}},{key:"getMemory",value:function(){return this.trackingCore.host.api.performance.memory}}]),e}();Ue(Tr,"checkpoints",[1,3,10,30,90,180,300]);var Sr,Cr,Ir,kr,Ar,Lr=De((function e(t,n,i){Pe(this,e),Ue(this,"webUIFramework",void 0),Ue(this,"timeSource",void 0),Ue(this,"isSinglePageApp",void 0),Ue(this,"appRenderMode",void 0),Ue(this,"isAppRenderFailed",void 0),Ue(this,"pageLoadMode","INITIAL"),Ue(this,"isSSL",void 0),Ue(this,"treeId",void 0),Ue(this,"isFromServiceWorker",void 0),this.webUIFramework=n["web-ui-framework"],this.timeSource=n["beacon-source"],this.isSinglePageApp=n["is-single-page-app"],this.appRenderMode=t["app-render-mode"],this.isAppRenderFailed=t["is-app-render-failed"],this.isSSL="https:"===i.api.location.protocol?1:0,this.treeId=i.treeID,this.isFromServiceWorker=i.isFromServiceWorker})),Or=function(){function e(t){Pe(this,e),Ue(this,"isPEMTracerEnabled",void 0),Ue(this,"responseContextMap",new Map),Ue(this,"resourceLoadEventsMap",new Map),this.isPEMTracerEnabled=t}return De(e,[{key:"offerResponseContext",value:function(e,t){if(this.isPEMTracerEnabled)if(this.responseContextMap.has(e)){var n;null===(n=this.responseContextMap.get(e))||void 0===n||n.heapPush(t)}else{var i=new Bn((function(e,t){return e.requestTime0&&n.heapsize()===t.heapsize()}},{key:"clear",value:function(){this.resourceLoadEventsMap.clear(),this.responseContextMap.clear()}},{key:"flushCache",value:function(){var e=this.responseContextMap.keys(),t=[];if(e){var n,i=Le(e);try{for(i.s();!(n=i.n()).done;){var r=n.value;t=[].concat(Oe(t),Oe(this.flushCacheByUrl(r)))}}catch(e){i.e(e)}finally{i.f()}}var o=this.resourceLoadEventsMap.keys();if(o){var a,s=Le(o);try{for(s.s();!(a=s.n()).done;){var l,c=a.value,u=null===(l=this.resourceLoadEventsMap.get(c))||void 0===l?void 0:l.heapClear();u&&(t=[].concat(Oe(t),Oe(u.map((function(e){return e.requestStart,Un(Ae(e,ge))})))))}}catch(e){s.e(e)}finally{s.f()}}return t}},{key:"flushCacheByUrl",value:function(e){var t,n=[];if(!e)return n;if(!this.isPEMTracerEnabled)return(null===(t=this.resourceLoadEventsMap)||void 0===t||null===(t=t.get(e))||void 0===t||null===(t=t.heapClear())||void 0===t?void 0:t.map((function(e){return e.requestStart,Un(Ae(e,ve))})))||n;if(this.canFlush(e)){for(var i=this.responseContextMap.get(e);i&&i.heapsize()>0;){var r=this.mergeAndConsume(e);r&&n.push(r)}this.deleteEntryByRequestUrl(e)}return n}}]),e}(),Rr=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},Nr=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},xr=function(e,t){var n=function n(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(e(i),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},Pr=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},Mr=function(e,t,n){var i;return function(r){t.value>=0&&(r||n)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},Dr=-1,Ur=function(){return"hidden"===document.visibilityState?0:1/0},Br=function(){xr((function(e){var t=e.timeStamp;Dr=t}),!0)},Fr=function(){return Dr<0&&(Dr=Ur(),Br(),Pr((function(){setTimeout((function(){Dr=Ur(),Br()}),0)}))),{get firstHiddenTime(){return Dr}}},qr=!1,Hr=-1,Gr=function(e,t){qr||(function(e,t){var n,i=Fr(),r=Rr("FCP"),o=function(e){"first-contentful-paint"===e.name&&(s&&s.disconnect(),e.startTime-1&&e(t)},r=Rr("CLS",0),o=0,a=[],s=function(e){if(!e.hadRecentInput){var t=a[0],i=a[a.length-1];o&&e.startTime-i.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,a.push(e)):(o=e.value,a=[e]),o>r.value&&(r.value=o,r.entries=a,n())}},l=Nr("layout-shift",s);l&&(n=Mr(i,r,t),xr((function(){l.takeRecords().map(s),n(!0)})),Pr((function(){o=0,Hr=-1,r=Rr("CLS",0),n=Mr(i,r,t)})))},jr={passive:!0,capture:!0},Wr=new Date,Vr=function(e,t){Sr||(Sr=t,Cr=e,Ir=new Date,$r(removeEventListener),Kr())},Kr=function(){if(Cr>=0&&Cr1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){Vr(e,t),r()},i=function(){r()},r=function(){removeEventListener("pointerup",n,jr),removeEventListener("pointercancel",i,jr)};addEventListener("pointerup",n,jr),addEventListener("pointercancel",i,jr)}(t,e):Vr(t,e)}},$r=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,zr,jr)}))},Xr=function(e,t){var n,i=Fr(),r=Rr("FID"),o=function(e){e.startTime0&&(n=r[0])}return(null===(e=n)||void 0===e?void 0:e.name)||window.location.href}(),no=!1,io=new Set,ro={LCP:"largest-contentful-paint",FID:"first-input",CLS:"layout-shift"};function oo(){var e=!0===window.__test__resetWebVitalsState;if(!no||e){e&&(io=new Set),Jr.forEach(ao);var t=Symbol();Ar=t,[Qr,Xr,Gr].forEach((function(e){return e(so.bind(null,t),!0)})),[Qr,Xr,Gr].forEach((function(e){return e(lo.bind(null,t))})),no=!0}}function ao(e){eo[e]={name:e,verboseName:Zr[e]||e,value:Di.VALUE_NOT_OBTAINED,updateHistory:[]};var t=ro[e];"undefined"!=typeof PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&"string"==typeof t&&PerformanceObserver.supportedEntryTypes.indexOf(t)>-1||(eo[e].value=Di.METRIC_NOT_SUPPORTED)}function so(e,t){if(e===Ar){var n=eo[t.name],i=fr();n&&(n.updateHistory.push({time:i,data:t}),n.value=t.value),io.forEach((function(e){return e(t,i,!1)}))}}function lo(e,t){e===Ar&&io.forEach((function(e){return e(t,fr(),!0)}))}var co,uo=function(){function e(t,n){var i=this;Pe(this,e),Ue(this,"basePageTreeId",void 0),Ue(this,"basePageKey",void 0),Ue(this,"observing",!1),Ue(this,"appContextMap",new Map),Ue(this,"rumConfig",void 0),Ue(this,"trackingCore",void 0),Ue(this,"onMetricUpdate",(function(e,t,n){var r;i.observing&&(n?i.reportMetric(e.name):i.appContextMap.set(t,{time:t,url:location.href,pageKey:null===(r=i.trackingCore.getCurrentContext())||void 0===r?void 0:r.pageKey}))})),this.trackingCore=t,this.rumConfig=n}return De(e,[{key:"startObserving",value:function(){var e,t,n=this;oo(),this.observing||(this.observing=!0,this.basePageTreeId=this.trackingCore.host.treeID||"_unknown",this.basePageKey=(null===(e=this.trackingCore.getCurrentContext())||void 0===e?void 0:e.pageKey)||"_unknown",Jr.forEach((function(e){var t;(null===(t=eo[e])||void 0===t?void 0:t.value)===Di.METRIC_NOT_SUPPORTED&&n.reportMetric(e)})),t=this.onMetricUpdate,io.add(t))}},{key:"stopObserving",value:function(){var e;this.observing=!1,e=this.onMetricUpdate,io.delete(e)}},{key:"reportMetric",value:function(e){var t=eo[e];if(t){var n={name:Zr[e]||e};"CLS"===e?n.doubleValue=t.value:n.longValue=Math.round(t.value);var i=function(e,t,n,i,r){var o={basePageTreeId:e,basePageKey:t,basePageUrl:to},a=null;switch(n.name){case"LCP":a=function(e,t){var n;if(0===e.updateHistory.length)return null;var i=e.updateHistory[e.updateHistory.length-1],r=i.data.entries,o=r[r.length-1],a={pageKey:(null===(n=t.get(i.time))||void 0===n?void 0:n.pageKey)||"_unknown",element:mr(o.element),renderTime:Math.round(o.renderTime),loadTime:Math.round(o.loadTime),size:Math.round(o.size)};return o.url&&(a.url=o.url),a}(n,i);break;case"FID":a=function(e,t){var n;if(0===e.updateHistory.length)return null;var i=e.updateHistory[e.updateHistory.length-1],r=i.data.entries,o=r[r.length-1];return{pageKey:(null===(n=t.get(i.time))||void 0===n?void 0:n.pageKey)||"_unknown",processingStart:Math.round(o.processingStart),processingEnd:Math.round(o.processingEnd),target:mr(o.target)}}(n,i);break;case"CLS":a=function(e,t){if(0===e.updateHistory.length)return null;var n=e.updateHistory.map((function(e){return e.data.entries})).flat();if(0===n.length)return null;var i=n.reduce((function(e,t){return e&&e.value>t.value?e:t})),r=e.updateHistory.find((function(e){return e.data.entries.includes(i)})),o=null;i&&i.sources&&i.sources.length&&(o=i.sources.reduce((function(e,t){return e.node&&e.previousRect.width*e.previousRect.height>t.previousRect.width*t.previousRect.height?e:t})));var a,s=t.get(r.time);return o&&s?{shiftCount:n.length,"largestShift.value":i.value,"largestShift.hadRecentInput":i.hadRecentInput,"largestShift.largestSource.node":mr(null===(a=o)||void 0===a?void 0:a.node),"largestShift.pageKey":s.pageKey||"_unknown","largestShift.url":s.url,"largestShift.startTime":Math.round(i.startTime)}:null}(n,i)}if(a){var s={};return r(s,o,a),s}return o}(this.basePageTreeId,this.basePageKey,t,this.appContextMap,this.trackingCore.host.api.assign);n.metadata=function(e){var t={};return Object.keys(e).forEach((function(n){var i=e[n];t[n]="string"==typeof i?i:JSON.stringify(i)})),t}(i);var r={scope:{scopeType:"APPLICATION_INSTANCE",scopeKey:this.basePageTreeId},metrics:[n]};if(this.trackingCore.fireEvent({appId:this.rumConfig["app-id"],eventName:"ClientPerfMetricsEvent"},r),this.rumConfig["enable-otel"])if("LCP"===e){var o={value:n.longValue,metadata:i};yn.emit(Si.INTERNAL_OTEL_LARGEST_CONTENTFUL_PAINT,o)}else if("CLS"===e){var a={value:n.doubleValue,metadata:i};yn.emit(Si.INTERNAL_OTEL_CUMULATIVE_LAYOUT_SHIFT,a)}else if("FID"===e){var s={value:n.longValue,metadata:i};yn.emit(Si.INTERNAL_OTEL_FIRST_INPUT_DELAY,s)}}}}]),e}(),ho="x-li-uuid",po="x-li-pop",fo="x-msedge-ref",mo="x-li-fabric",go="x-li-pem-resp-meta",vo="content-type",yo="x-cache",Eo=function(){function e(t){Pe(this,e),Ue(this,"_callTreeId",void 0),Ue(this,"_fabric",void 0),Ue(this,"_msEdgeRef",void 0),Ue(this,"_pointOfPresenceId",void 0),Ue(this,"_responseMetadata",void 0),Ue(this,"_contentType",void 0),Ue(this,"_cdnCacheMetadata",void 0),Ue(this,"_downstreamAvailability",void 0);var n=new Map;null==t||t.forEach((function(e,t){n.set(t.toLowerCase(),e)})),this._callTreeId=n.get(ho)||null,this._pointOfPresenceId=n.get(po)||null,this._msEdgeRef=n.get(fo)||null,this._fabric=n.get(mo)||null,this._responseMetadata=n.get(go)||null,this._contentType=n.get(vo)||null,this._cdnCacheMetadata=n.get(yo)||null,this._downstreamAvailability=function(e){if(null==e)return 1;var t,n=Le(e.split(","));try{for(n.s();!(t=n.n()).done;){var i=t.value.split("=",2);if(2===i.length&&"availability"===i[0]){var r=parseFloat(i[1]);if(r>=0&&r<=1)return r}}}catch(e){n.e(e)}finally{n.f()}return 1}(this._responseMetadata)}return De(e,[{key:"callTreeId",get:function(){return this._callTreeId}},{key:"pointOfPresenceId",get:function(){return this._pointOfPresenceId}},{key:"microsoftEdgeReference",get:function(){return this._msEdgeRef}},{key:"fabric",get:function(){return this._fabric}},{key:"contentType",get:function(){return this._contentType}},{key:"cdnCacheMetadata",get:function(){return this._cdnCacheMetadata}},{key:"responseMetadata",get:function(){return this._responseMetadata}},{key:"downstreamAvailability",get:function(){return this._downstreamAvailability}},{key:"hasAnyLinkedInHeaders",value:function(){return!!(this._fabric||this._pointOfPresenceId||this._msEdgeRef||this._callTreeId)}}]),e}();!function(e){e.CLIENT_TIMEOUT="CLIENT_TIMEOUT",e.CLIENT_ABORTED="CLIENT_ABORTED",e.SERVER_ERROR="SERVER_ERROR",e.NETWORK_ERROR="NETWORK_ERROR",e.UNCLASSIFIED="UNCLASSIFIED",e.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",e.CLIENT_ERROR="CLIENT_ERROR",e.GRAPHQL_FULL_FAILURE="GRAPHQL_FULL_FAILURE",e.BLOCKED_BY_CLIENT_PROXY="BLOCKED_BY_CLIENT_PROXY",e.DOWNSTREAM_GRACEFUL_DEGRADATION="DOWNSTREAM_GRACEFUL_DEGRADATION",e.TRAFFIC_AFD_TO_LI_POP_ERROR="TRAFFIC_AFD_TO_LI_POP_ERROR",e.TRAFFIC_LI_POP_TO_DC_ERROR="TRAFFIC_LI_POP_TO_DC_ERROR"}(co||(co={}));function bo(e,t,n,i,r){var o=new Eo(i),a=function(e,t,n){if(t){if(429===t||999===t)return co.TOO_MANY_REQUESTS;if(e&&!e.hasAnyLinkedInHeaders()&&t&&t>=400&&t<600)return co.BLOCKED_BY_CLIENT_PROXY;if((i=t)>=400&&i<500)return co.CLIENT_ERROR;if(function(e){return e>=500&&e<600}(t))return function(e){if(e){if(e.fabric)return co.SERVER_ERROR;if(e.pointOfPresenceId)return co.TRAFFIC_LI_POP_TO_DC_ERROR;if(e.microsoftEdgeReference)return co.TRAFFIC_AFD_TO_LI_POP_ERROR}return co.SERVER_ERROR}(e);if(function(e,t){return!!(e>=200&&e<300&&t&&t.downstreamAvailability<1)}(t,e))return co.DOWNSTREAM_GRACEFUL_DEGRADATION;if(!n)return null}var i;if(n instanceof Error){if("AbortError"===n.name)return co.CLIENT_ABORTED;if(n instanceof TypeError&&(n.message.indexOf("Network request failed")>=0||n.message.indexOf("NetworkError when attempting to fetch resource")>=0||n.message.indexOf("Failed to fetch")>=0))return co.NETWORK_ERROR}else if(function(e){return!!e&&("string"==typeof e.statusText||"number"==typeof e.status||"number"==typeof e.readyState)}(n)){if("timeout"===n.statusText)return co.CLIENT_TIMEOUT;if(0===n.status&&"abort"===n.statusText)return co.CLIENT_ABORTED;if("readyState"in n&&0===n.readyState)return co.NETWORK_ERROR}return co.UNCLASSIFIED}(o,n,r),s=null;return a&&(s={errorType:a},a===co.UNCLASSIFIED&&r&&(s.errorMessage=r.message,function(e,t,n){var i=["tracer-unclassified-error"];null==n||n.forEach((function(e){return i.push("target-view-name-".concat(e))})),Dn("resource-load-tracer",e instanceof Error||"string"==typeof e?e:JSON.stringify(e),Object.fromEntries(t||[]),i)}(r,i,t))),{cdnCache:o.cdnCacheMetadata||void 0,contentType:o.contentType||void 0,fabric:o.fabric||void 0,msEdgeReference:o.microsoftEdgeReference||void 0,pointOfPresenceId:o.pointOfPresenceId||void 0,resourceTreeId:o.callTreeId?o.callTreeId:void 0,responseStatusCode:n||void 0,networkResourceError:s||void 0,viewNames:t||[],requestTime:e,responseMetadata:o.responseMetadata||void 0}}!function(){function e(t,n,i){var r,o,a,s,l,c,u,d,h,p,f,m,g,v,y,E,b,_,w,T,S,C,I,k,A,L,O,R,N,x=this;Pe(this,e),Ue(this,"core",void 0),Ue(this,"config",void 0),Ue(this,"collector",void 0),Ue(this,"boomerangStart",-1),Ue(this,"webVitalsObserver",void 0),Ue(this,"appMemoryObserver",void 0),Ue(this,"pageMemoryObserver",void 0),Ue(this,"liveTokens",new Set),Ue(this,"stateWM",new WeakMap),Ue(this,"activeToken",void 0),Ue(this,"isInitial",void 0),Ue(this,"pageLoadId",void 0),Ue(this,"initialResourcesEvents",[]),Ue(this,"responseRleCache",void 0),Ue(this,"beforeHideHandlerBound",this.beforeHideHandler.bind(this)),Ue(this,"fireApfcEventBound",this.fireApfcEvent.bind(this)),Ue(this,"isTracerEnabled",void 0),Ue(this,"isPEMTracerEnabled",void 0),this.core=i,this.config=function(e,t){for(var n in e)void 0!==t[n]&&(e[n]=t[n]);return e}(i.host.api.assign({},Mi),n);var P="enabled"===(null===(r=(o=i.host).__getLixTreatment)||void 0===r?void 0:r.call(o,"pemberly.tracking.time-origin-epoch-time")),M={isDnaIntegrationLixEnabled:"enabled"===(null===(a=(s=i.host).__getLixTreatment)||void 0===a?void 0:a.call(s,"pemberly.tracking.fireApfcEvent"))||"enabled"===(null===(l=i.host.abuseDeviceSignalCollectionConfig)||void 0===l?void 0:l.webviewDnaMemberLixTreatment)||"enabled"===(null===(c=i.host.abuseDeviceSignalCollectionConfig)||void 0===c?void 0:c.dnaMemberLixTreatment),isHumanIntegrationLixEnabled:"enabled"===(null===(u=(d=i.host).__getLixTreatment)||void 0===u?void 0:u.call(d,"pemberly.tracking.human.integration"))||"enabled"===(null===(h=i.host.abuseDeviceSignalCollectionConfig)||void 0===h?void 0:h.webviewHumanMemberLixTreatment)||"enabled"===(null===(p=i.host.abuseDeviceSignalCollectionConfig)||void 0===p?void 0:p.humanMemberLixTreatment),isDfpIntegrationLixEnabled:"enabled"===(null===(f=(m=i.host).__getLixTreatment)||void 0===f?void 0:f.call(m,"pemberly.tracking.dfp.integration"))||"enabled"===(null===(g=i.host.abuseDeviceSignalCollectionConfig)||void 0===g?void 0:g.webviewDfpMemberLixTreatment)||"enabled"===(null===(v=i.host.abuseDeviceSignalCollectionConfig)||void 0===v?void 0:v.dfpMemberLixTreatment),disablePerfMarkerOptimization:i.host.abuseDeviceSignalCollectionConfig&&i.host.abuseDeviceSignalCollectionConfig.disablePerfMarkerOptimization||"enabled"===(null===(y=(E=i.host).__getLixTreatment)||void 0===y?void 0:y.call(E,"fingerprinting.collection.skip.performance.marker.check")),samplingTimeWindowInMillis:null===(b=i.host.abuseDeviceSignalCollectionConfig)||void 0===b?void 0:b.samplingTimeWindowInMillis,isOnDemandFingerprintingEnabled:"enabled"===(null===(_=(w=i.host).__getLixTreatment)||void 0===_?void 0:_.call(w,"pemberly.web.ondemand")),isSyncFingerprintingWithHeadersLixEnabled:"enabled"===(null===(T=(S=i.host).__getLixTreatment)||void 0===T?void 0:T.call(S,"sync.apfc.headers"))||"enabled"===(null===(C=i.host.abuseDeviceSignalCollectionConfig)||void 0===C?void 0:C.syncFingerprintingEnabledWithHeadersLixTreatment),isSyncFingerprintingWithCbLixEnabled:"enabled"===(null===(I=(k=i.host).__getLixTreatment)||void 0===I?void 0:I.call(k,"sync.apfc.couchbase"))||"enabled"===(null===(A=i.host.abuseDeviceSignalCollectionConfig)||void 0===A?void 0:A.syncFingerprintingEnabledWithCbLixTreatment)},D=null===(L=(O=i.host).__getLixTreatment)||void 0===L?void 0:L.call(O,"pemberly.tracking.generic-tracers"),U=!!D&&Gi.test(D);this.isTracerEnabled=U||this.config["enable-tracking-3"];var B="enabled"===(null===(R=(N=i.host).__getLixTreatment)||void 0===R?void 0:R.call(N,"pemberly.tracking.pem-tracers"));this.isPEMTracerEnabled=B||this.config["enable-pem-tracking-3"],this.responseRleCache=new Or(this.isPEMTracerEnabled),this.collector=new br(i.host.api,new Lr(t,this.config,i.host),this.config,P,(function(e){return x.fireResourceLoadEvent(e,x.activeToken)}),this.isTracerEnabled,this.responseRleCache,this.fireApfcEventBound,M,i.host.endpoint),this.collector.startObserving(),yn.before(hn,this.beforeHideHandlerBound)}De(e,[{key:"pingCDN",value:function(){}},{key:"recordTreeId",value:function(e,t){e&&this.collector.recordTreeId(e,t)}},{key:"recordRenderStart",value:function(e,t){this.collector.recordRenderStart(e,t||e)}},{key:"recordRenderEnd",value:function(e){var t,n=null!==(t=this.getPageLoadIdFromState())&&void 0!==t?t:this.pageLoadId,i=this.collector.recordRenderEnd(e,this.isTracerEnabled,n);i&&this.isTracerEnabled&&this.core.fireEvent({appId:this.config["app-id"],eventName:"ViewLoadEvent"},i)}},{key:"provisionNetworkResponse",value:function(e,t){var n,i,r=this;null===(n=this.responseRleCache)||void 0===n||n.offerResponseContext(e,t);var o=null===(i=this.responseRleCache)||void 0===i?void 0:i.flushCacheByUrl(e);null==o||o.forEach((function(e){r.fireResourceLoadEvent(e,r.activeToken)}))}},{key:"start",value:function(e){var t,n;!this.isTracerEnabled&&this.activeToken&&this.abort(this.activeToken),this.flushEndedSessions(),this.isInitial=void 0===this.isInitial,this.isInitial||this.collector.reset();var i,r=Object.create(null),o="enabled"===(null===(t=(n=this.core.host).__getLixTreatment)||void 0===t?void 0:t.call(n,"pemberly.tracking.time-origin-epoch-time"));return this.activeToken=r,this.liveTokens.add(r),this.isTracerEnabled?(this.stateWM.set(r,{isInitial:this.isInitial,startTime:pr(this.core.host.api.performance,o),pageKey:e}),this.firePageLoadStartEvent(r)):this.stateWM.set(r,{isInitial:this.isInitial,startTime:pr(this.core.host.api.performance,o)}),this.config["enable-memory-measurement"]&&(null===(i=this.pageMemoryObserver)||void 0===i||i.stopObserving(),this.pageMemoryObserver=new Tr("page-memory",this.core,this.config),this.pageMemoryObserver.startObserving(),void 0===this.appMemoryObserver&&(this.appMemoryObserver=new Tr("application-memory",this.core,this.config),this.appMemoryObserver.startObserving())),r}},{key:"observeWebVitals",value:function(){void 0===this.webVitalsObserver&&(this.webVitalsObserver=new uo(this.core,this.config),this.webVitalsObserver.startObserving())}},{key:"end",value:function(e){var t,n,i=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2?arguments[2]:void 0;if(e&&this.activeToken&&this.activeToken===e){var a=this.stateWM.get(e),s="enabled"===(null===(t=(n=this.core.host).__getLixTreatment)||void 0===t?void 0:t.call(n,"pemberly.tracking.time-origin-epoch-time")),l=pr(this.core.host.api.performance,s);a.endProps={renderCompleteTime:l,isImpactedByHiddenWindow:r,rumKey:o},this.isTracerEnabled&&o&&(a.pageKey=o);var c=this.activeToken,u=this.isTracerEnabled?5e3:this.config["beacon-timeout"];a.fireRumEventTimeout=setTimeout((function(){if(i.isTracerEnabled){i.flushResourceLoadEvents(c);var e=i.collector.collectPageLoadEndData({isInitial:a.isInitial});"then"in e?e.then((function(e){i.firePageLoadEndEvent(e,c)})):i.firePageLoadEndEvent(e,c)}var t=i.collector.collect({isInitial:a.isInitial});"then"in t?t.then((function(e){i.fireRumEvent(e,c)})):i.fireRumEvent(t,c)}),u),this.activeToken=void 0}else Dn("rum-end",Hi)}},{key:"onDataResponse",value:function(e,t,n,i,r,o,a){var s=bo(t,n,i,r,o);if(null!=a&&a.serverSideResponse){var l=this.generateResourceLoadEventFromResponseContext(e,be({nextHopProtocol:Ai.UNKNOWN},s));this.fireResourceLoadEvent(l,this.activeToken)}else this.provisionNetworkResponse(e,s)}},{key:"onOopsPage",value:function(e,t){Dn("rum-oops",e,Object.fromEntries(t||[]),["oops-page"])}},{key:"firePageLoadStartEvent",value:function(e){if(e&&this.activeToken&&this.activeToken===e){var t=this.stateWM.get(e);this.pageLoadId=In(),t.pageLoadId=this.pageLoadId;var n=this.collector.collectPageLoadStartData({isInitial:t.isInitial,rumKey:t.pageKey});n.pageLoadId=t.pageLoadId,this.core.fireEvent({appId:this.config["app-id"],eventName:"PageLoadStartEvent"},n)}else Dn("PageLoadStartEvent",Hi)}},{key:"destroy",value:function(){var e,t,n;yn.offBefore(hn,this.beforeHideHandlerBound),this.activeToken&&this.abort(this.activeToken),this.flushEndedSessions(),this.collector.stopObserving(),null===(e=this.webVitalsObserver)||void 0===e||e.stopObserving(),null===(t=this.appMemoryObserver)||void 0===t||t.stopObserving(),null===(n=this.pageMemoryObserver)||void 0===n||n.stopObserving(),this.responseRleCache=void 0,this.core.destroy()}},{key:"getPageLoadIdFromState",value:function(e){var t,n=null!=e?e:this.activeToken;return n&&(t=this.stateWM.get(n).pageLoadId),t}},{key:"abort",value:function(e){var t;if(!e||this.activeToken!==e)throw new Error("RUM abort: rum token passed is invalid");if(null!==(t=this.stateWM.get(e))&&void 0!==t&&t.endProps)throw new Error("RUM abort: Can't abort a session that was already ended");this.activeToken=void 0,this.stateWM.delete(e),this.liveTokens.delete(e)}},{key:"flushEndedSessions",value:function(){var e=this;this.liveTokens.forEach((function(t){var n=e.stateWM.get(t);if(n.endProps){if(e.isTracerEnabled){var i=e.collector.collectPageLoadEndData({isInitial:n.isInitial,immediate:!0});e.firePageLoadEndEvent(i,t),e.flushResourceLoadEvents(t)}var r=e.collector.collect({isInitial:n.isInitial,immediate:!0});e.fireRumEvent(r,t)}}))}},{key:"flushResourceLoadEvents",value:function(e){var t,n,i=this,r=null===(t=this.responseRleCache)||void 0===t?void 0:t.flushCache();null==r||r.map((function(t){i.fireResourceLoadEvent(t,e)})),null===(n=this.responseRleCache)||void 0===n||n.clear()}},{key:"firePageLoadEndEvent",value:function(e,t){if(this.stateWM.get(t)){var n=this.core.host.api.assign,i=this.stateWM.get(t),r=i.startTime,o=i.endProps,a=i.pageLoadId,s=i.pageKey;if(o){var l=o.renderCompleteTime,c=o.isImpactedByHiddenWindow;if(a?e.pageLoadId=a:Dn("PageLoadEndEvent",qi),e.browserPageLoadEndContext&&(e.browserPageLoadEndContext.isImpactedByHiddenWindow=c),e.navigationTiming){var u,d=null===(u=e.navigationTiming)||void 0===u?void 0:u.navigationStart,h=this.boomerangStart=d||this.boomerangStart,p=d||r,f=l-p;e.navigationTiming.boomerangStart=h,e.navigationTiming.timeDone=f,e.navigationTiming.navigationStart=p,void 0===e.navigationTiming.workerStart&&(e.navigationTiming.workerStart=0)}this.core.fireEvent({appId:this.config["app-id"],eventName:"PageLoadEndEvent"},(function(t){return n({pageKey:s||t.pageKey},e)}))}else this.abort(t)}}},{key:"fireResourceLoadEvent",value:function(e,t){var n=this;if(this.isTracerEnabled){var i,r=null!==(i=this.getPageLoadIdFromState(t))&&void 0!==i?i:this.pageLoadId;if(!r)return void this.initialResourcesEvents.push(e);this.initialResourcesEvents.length>0&&(this.initialResourcesEvents.forEach((function(e){e.parentPageLoadId=r,n.core.fireEvent({appId:n.config["app-id"],eventName:"ResourceLoadEvent"},e)})),this.initialResourcesEvents=[]),e.parentPageLoadId=r,this.core.fireEvent({appId:this.config["app-id"],eventName:"ResourceLoadEvent"},e)}}},{key:"fireRumEvent",value:function(e,t){if(this.stateWM.get(t)){var n=this.core.host.api.assign,i=this.stateWM.get(t),r=i.startTime,o=i.endProps;if(o){var a=o.renderCompleteTime,s=o.isImpactedByHiddenWindow,l=o.rumKey,c=this.boomerangStart=e.navigationStart||this.boomerangStart,u=e.navigationStart||r,d=a-u,h=this.config["app-version"];this.core.fireEvent({appId:this.config["app-id"],eventName:"RealUserMonitoringEvent"},(function(t){return n({pageKey:l||t.pageKey,isImpactedByHiddenWindow:s,appVersion:h,timeDone:d,navigationStart:u,boomerangStart:c,renderCompleteTime:a},e)})),i.fireRumEventTimeout&&clearTimeout(i.fireRumEventTimeout),this.liveTokens.delete(t),this.stateWM.delete(t)}else this.abort(t)}}},{key:"beforeHideHandler",value:function(){this.flushEndedSessions()}},{key:"fireApfcEvent",value:function(e,t){var n,i=null===(n=document)||void 0===n||null===(n=n.cookie)||void 0===n?void 0:n.split(";"),r={issueTime:0,browserId:""};try{r=function(e){var t,n={issueTime:0,browserId:""},i=Le(e);try{for(i.s();!(t=i.n()).done;){var r=t.value.split("=");if(r.length>1&&"bscookie"===r[0]){var o=decodeURIComponent(r[1]),a=Number(o.substring(4,18)),s=isNaN(a)?0:a,l=o.substring(18,50);return n.browserId=l,n.issueTime=s,n}}}catch(e){i.e(e)}finally{i.f()}return n}(i)}catch(e){}var o={type:e,bsCookieInfo:r,payload:t};this.core.fireEvent({appId:this.config["app-id"],eventName:"ApfcEvent"},o)}},{key:"generateResourceLoadEventFromResponseContext",value:function(e,t){var n=t.requestTime,i=t.viewNames,r=t.requestType,o={resourceKey:e,isNetwork:!0,targetViewNames:i||[],loadType:"serversideresponse",resourceNetworkContext:be({},Ae(t,ye)),resourceProgressStates:[],timeOrigin:n};return r&&(o.loadType=r),o}},{key:"triggerDeviceSignalCollection",value:function(e){var t=e.onlyTriggerOnDemandFlow;this.collector.triggerDeviceSignalCollection({onlyTriggerOnDemandFlow:t})}}])}();var _o,wo="undefined"!=typeof window&&"undefined"!=typeof performance,To="undefined"!=typeof location&&-1!==location.search.indexOf("_LI_MEASURE_DEBUG");function So(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ajax",n=arguments.length>2?arguments[2]:void 0;e.fireTrackingEvent("PageViewEvent",Co(n,t))}function Co(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ajax";const n=_(document),i=T(document),r=ce();let o={};return r&&(o.theme=r.toUpperCase()),i&&(o.interfaceLocale=i),e&&(o.pageKey=e),{header:{},requestHeader:o,pageType:t,trackingInfo:{clientTimestamp:Date.now(),pageTag:n}}}function Io(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||null==t||!t.length)throw new Error("Invalid input to fireViewModuleImpressionEvent");const n=T(document),i={};n&&(i.interfaceLocale=n);const r={header:{},requestHeader:i,moduleNames:t};e.fireTrackingEvent("ViewModuleImpressionEvent",r)}function ko(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.state&&e.state.currentPageInstance||{};let{trackingId:n}=t;return n&&!function(e){return"string"==typeof e&&"=="===e.slice(-2)}(n)&&e.convertUuidTrackingIdToBase64&&(n=e.convertUuidTrackingIdToBase64(n)),`${t.pageUrn};${n}`}function Ao(){const e={...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}},t=u(window.location.href,"originalReferer")||u(window.location.href,"original_referer");return t&&(e.requestHeader={...e.requestHeader,referer:t}),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={...e},n=ce();n&&(t.requestHeader={...t.requestHeader,theme:n.toUpperCase()});return t}(e)}!function(){function e(t,n){Pe(this,e),Ue(this,"trackingCore",void 0),Ue(this,"endPageInstance",void 0),Ue(this,"startPageInstance",void 0),Ue(this,"featureIdentifier",void 0),Ue(this,"marks",[]),Ue(this,"spans",[]),Ue(this,"spanStarts",new Map),Ue(this,"started",!1),Ue(this,"ended",!1),Ue(this,"featureKey",void 0),Ue(this,"productName",void 0),Ue(this,"flushOnEnd",void 0),Ue(this,"basePageTreeId",void 0),Ue(this,"debounceFlush",void 0),Ue(this,"disableAutoFlush",void 0),Ue(this,"isCanceled",!1),Ue(this,"isClosed",!1),this.trackingCore=t;var i=n.featureKey,r=n.productName,o=n.flushDebounceMilliseconds,a=n.flushOnEnd;this.featureKey=i,this.productName=r,this.flushOnEnd=a;var s=r?"::".concat(r):"";this.featureIdentifier="".concat(i).concat(s);var l=void 0!==o?o:3e3;l>0&&(this.debounceFlush=function(e,t,n){var i,r,o;void 0===t&&(t=50),void 0===n&&(n={});var a=null!=(i=n.isImmediate)&&i,s=null!=(r=n.callback)&&r,l=n.maxWait,c=Date.now(),u=[];function d(){if(void 0!==l){var e=Date.now()-c;if(e+t>=l)return l-e}return t}var h=function(){var t=[].slice.call(arguments),n=this;return new Promise((function(i,r){var l=a&&void 0===o;if(void 0!==o&&clearTimeout(o),o=setTimeout((function(){if(o=void 0,c=Date.now(),!a){var i=e.apply(n,t);s&&s(i),u.forEach((function(e){return(0,e.resolve)(i)})),u=[]}}),d()),l){var h=e.apply(n,t);return s&&s(h),i(h)}u.push({resolve:i,reject:r})}))};return h.cancel=function(e){void 0!==o&&clearTimeout(o),u.forEach((function(t){return(0,t.reject)(e)})),u=[]},h}(this.flush.bind(this),l)),this.disableAutoFlush=l<0}De(e,[{key:"start",value:function(e){var t;if(wo){if(this.started)throw new Error("Same PerfMeasurement (".concat(this.featureIdentifier,") cannot be started twice"));this.startPageInstance=e||(null===(t=this.trackingCore.getCurrentContext())||void 0===t?void 0:t.pageInstance),this.spanStart("load"),this.started=!0}}},{key:"end",value:function(e){var t;if(!this.isClosed){if(this.isClosed=!0,this.isCanceled)throw new Error('[rum measurement] cannot end a canceled measurement "'.concat(this.featureIdentifier,'"'));if(wo){if(this.ended)throw new Error("Same PerfMeasurement (".concat(this.featureIdentifier,") should not be ended twice"));this.endPageInstance=e||(null===(t=this.trackingCore.getCurrentContext())||void 0===t?void 0:t.pageInstance),this.spanEnd("load"),this.ended=!0,this.flushOnEnd&&this.flush()}}}},{key:"mark",value:function(e){wo&&(this.marks.push({name:e,startTime:fr()}),To&&(performance.mark("LI:".concat(this.featureIdentifier,"-mark-").concat(e)),performance.measure("LI:".concat(this.featureIdentifier,"-mark-").concat(e),"LI:".concat(this.featureIdentifier,"-start"),"LI:".concat(this.featureIdentifier,"-mark-").concat(e))),this.handleNewData())}},{key:"spanStart",value:function(e){wo&&(this.spanStarts.set(e,fr()),To&&performance.mark("LI:".concat(this.featureIdentifier,"-span-").concat(e,"-start")))}},{key:"spanEnd",value:function(e,t){if(wo&&this.spanStarts.has(e)){var n=this.spanStarts.get(e),i=t||e;this.spans.push({name:i,startTime:n,duration:fr()-n}),To&&(performance.mark("LI:".concat(this.featureIdentifier,"-span-").concat(e,"-end")),performance.measure("LI:".concat(this.featureIdentifier,"-span-").concat(t||e),"LI:".concat(this.featureIdentifier,"-span-").concat(e,"-start"),"LI:".concat(this.featureIdentifier,"-span-").concat(e,"-end"))),this.handleNewData()}}},{key:"clearSpan",value:function(e){wo&&this.spanStarts.has(e)&&this.spanStarts.delete(e)}},{key:"addSpan",value:function(e){this.spans.push(e),this.handleNewData()}},{key:"setBasePageTreeId",value:function(e){this.basePageTreeId=e}},{key:"getTimestamp",value:function(){return fr()}},{key:"flush",value:function(){0===this.marks.length&&0===this.spans.length||(this.fireEvent(),this.marks=[],this.spans=[],this.debounceFlush&&this.debounceFlush.cancel())}},{key:"handleNewData",value:function(){this.debounceFlush?this.debounceFlush().catch((function(e){})):this.disableAutoFlush||this.flush()}},{key:"fireEvent",value:function(){var e=this,t=this.endPageInstance&&{header:{pageInstance:this.endPageInstance}};this.trackingCore.fireEvent("FeaturePerformanceMeasurementEvent",(function(t){var n=e.startPageInstance||t.pageInstance||An(qe),i={name:e.featureKey,startTime:-1,duration:-1,startPageInstance:n,marks:e.marks,spans:e.spans};return e.productName&&(i.productName=e.productName),e.basePageTreeId&&(i.basePageTreeId=e.basePageTreeId),i}),t)}},{key:"cancel",value:function(){this.isCanceled=!0}},{key:"check",value:function(){if(wo){if(this.isCanceled)throw new Error('[rum measurement] "'.concat(this.featureIdentifier,'" has been canceled'));if(!this.isClosed)throw new Error('[rum measurement] "'.concat(this.featureIdentifier,'" is still open'))}}}])}(),function(e){e[e.BATCH=0]="BATCH",e[e.FLUSH_ALL=1]="FLUSH_ALL"}(_o||(_o={}));const{ENTER:Lo,ESCAPE:Oo}=k,Ro="modal",No="modal__overlay--visible",xo="overflow-hidden",Po="top-level-modal-container";class Mo{constructor(e){let{enablePageViewTracking:t=!1,shouldHideModal:n=()=>!1,triggerByOutletEl:i=!0,shouldMoveToTopContainer:r=!0,events:o={},focusElement:a,pageKey:s,onClose:l}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw new Error("No modal element passed in");this._el=e,this._parentNode=this._el.parentNode,r&&(this._topLevelContainer=this._getTopLevelContainer()),this._wrapperEl=this._el.querySelector(".modal__wrapper"),this._overlayEl=this._el.querySelector(".modal__overlay"),o&&(this._events=o),i&&(this._outletEls=this._getOutletEls()),this._exitButtonEl=this._el.querySelector(".modal__dismiss"),this._onKeyDownEvent=e=>this._onKeyDown(e),this._enablePageViewTracking=t,this._pageKey=s,this._shouldHideModal=n,this._shouldMoveToTopContainer=r,this.onClose=l;this._el.querySelector("[id='modalNoDismiss']")&&(this._isModalNonDismissible=!0),this._focusElement=a,i&&this._outletEls.forEach((e=>{e.addEventListener("click",(e=>{var t;const n=null===(t=e.target)||void 0===t?void 0:t.getAttribute("data-no-cool-off");this.open({noCoolOff:n})}))})),this._isModalNonDismissible||(this._exitButtonEl&&this._exitButtonEl.addEventListener("click",(()=>this.close())),this._overlayEl.addEventListener("click",this._handleOverlayClick.bind(this))),this._focusTrap=new z(this._wrapperEl)}_getOutletEls(){const e=this._el.dataset.outlet,t=[...("default-outlet"===e?this._parentNode:document).querySelectorAll(`[data-modal="${e}"]`)];return t.length||console.warn(`No outlet was found with a data-modal attribute equal to the provided dataCustomOutlet param ${e}`),t}_getTopLevelContainer(){const e=document.querySelector(`.${Po}`);if(!e){const e=document.createElement("div");return e.className=Po,document.body.appendChild(e)}return e}_handleOverlayClick(e){e.target===this._wrapperEl||this._wrapperEl.contains(e.target)||this.close()}_onKeyDown(e){const t=L(e.key),n=t===Lo&&document.activeElement===this._exitButtonEl;(t===Oo||n)&&(this._isModalNonDismissible||this.close(),e.preventDefault())}open(){let{focusElement:e,noCoolOff:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t||!this._shouldHideModal())return this._focusElement=e||this._focusElement,this._previouslyFocusedEl=document.activeElement,this._overlayEl.classList.add(No),this._overlayEl.setAttribute("aria-hidden","false"),this._shouldMoveToTopContainer&&this._topLevelContainer.appendChild(this._el),this.noScroll(),document.addEventListener("keydown",this._onKeyDownEvent),m(this._el,"open"),this._wrapperEl&&this._wrapperEl.focus(),this._focusTrap.init(),this._enablePageViewTracking&&window.tracking?window.tracking.then((e=>{So(e,"ajax",this._pageKey||`${this._el.id}`)})):(m(this._wrapperEl,"afterOpen"),Promise.resolve());m(this._el,"didNotOpen")}async close(){var e,t,n,i,r;this._events.onBeforeClose&&await(null===(n=this._events)||void 0===n||null===(i=n.onBeforeClose)||void 0===i?void 0:i.call(n,this._wrapperEl));this.isOpen&&(null===(r=this.onClose)||void 0===r||r.call(this));this._overlayEl.classList.remove(No),this._overlayEl.setAttribute("aria-hidden","true"),this._shouldMoveToTopContainer&&(this.setFocus(),this._parentNode.appendChild(this._el)),this.removeNoScroll(),document.removeEventListener("keydown",this._onKeyDownEvent),m(this._el,"close"),null!==(e=this._focusElement)&&void 0!==e&&null!==(t=e.classList)&&void 0!==t&&t.contains("ellipsis-menu__trigger")?(this.setFocus(),this._focusTrap.tearDown()):setTimeout((()=>{this.setFocus(),this._focusTrap.tearDown()}),150)}setFocus(){const e=this._focusElement||this._previouslyFocusedEl;null==e||e.focus()}noScroll(){document.body.classList.add(xo)}removeNoScroll(){document.body.classList.remove(xo)}get isOpen(){return this._overlayEl.classList.contains(No)}}class Do{constructor(e){if(!e)throw Error("An element must be provided to SidePanel");this.el=e,this.modalEl=this.el.querySelector(".modal"),this.modal=new Mo(this.modalEl,{events:this._events()}),this._onAfterOpen()}_onAfterOpen(){this.modalEl.addEventListener("afterOpen",(e=>{e.target.classList.remove("translate-x-full")}))}_events(){return{onBeforeClose:e=>new Promise((t=>{e.classList.add("translate-x-full"),setTimeout((()=>{t()}),330)}))}}}const Uo="member-nav-header__search--focused";class Bo{constructor(){const e=document.querySelector(".member-nav-menu");if(!e)throw Error("The member header should have a dropdown element");const t=document.querySelector('[data-id="member-nav-header__link-item-me"]');this.collapsibleDropdown=new te(e,{dropdownTriggerEl:t}),this.searchEl=document.querySelector('[data-id="member-nav-header__search"]'),this.searchEl&&(this.searchEl.addEventListener("focusin",(()=>this.searchEl.classList.add(Uo))),this.searchEl.addEventListener("focusout",(()=>this.searchEl.classList.remove(Uo)))),this.sidePanelEl=document.querySelector(".sidepanel-menu"),this.sidePanelEl&&(this.sidePanel=new Do(this.sidePanelEl))}}function Fo(e,t){t=t||"log";if("undefined"!=typeof window&&window&&window.jet&&"error"===t.toLowerCase())try{throw new Error(e)}catch(e){try{window.jet.error(e)}catch(e){}}"undefined"!=typeof console&&"function"==typeof console[t]&&console[t](e)}const qo=/ /g,Ho=/[\s\u0000<>"]|%00/,Go=/\\/,jo=/([.]|%2e){2}/i;let Wo=new RegExp("^(?:HTTPS?|https?|ftp|mailto|tel|sms|blob|voyager|android-app|linkedin|chrome-extension|invalid|data:(?:(?:image/(?:gif|jpe?g|png|webp|bmp|tiff))|(?:application/x-font-woff)|(?:font/(?:opentype|ttf)))[;,]|[/.#?])");function Vo(e){let t,n="invalid://";if("string"!=typeof e)return Fo("jSecure Warning: url must be a string","error"),n;if(t=e.trim(),t.indexOf(" ")>-1&&(Fo("jSecure Warning: url should not contain spaces: "+e,"warn"),t=t.replace(qo,"+")),!Wo.test(t))return Fo("jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. "+e,"error"),n;if(Ho.test(t))return Fo("jSecure Error: not valid url character found in url: "+e,"error"),n;let i,r=t.split("?")[0],o=!1;try{i=decodeURI(r)}catch(e){o=!0}return o?(Fo("jSecure Error: malformed url path detected: "+r),n):Go.test(r)||jo.test(r)||jo.test(i)?(Fo("jSecure Error: malicious data found in url path: "+r,"error"),n):e}const Ko={redirect(e){window&&(window.location.href=e)}};function zo(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).innerWidth<=769}function $o(e){return e.scrollHeight>e.offsetHeight}const Xo="hidden",Yo="aria-hidden";function Qo(e,t){const n=s(e);for(let e=0;e{e.classList.add(Xo),e.setAttribute(Yo,"true")}))}function ta(e){Qo(e,(e=>{e.classList.remove(Xo),e.setAttribute(Yo,"false")}))}function na(e){null==e||e.setAttribute("disabled","disabled"),null==e||e.setAttribute("aria-disabled","true")}function ia(e){null==e||e.removeAttribute("disabled"),null==e||e.removeAttribute("aria-disabled")}function ra(){return document.documentElement.classList.contains("safari")}function oa(){return document.documentElement.classList.contains("ios")}function aa(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document;const i=null==n?void 0:n.querySelector(`.${e}`);if(i&&$o(i)){const r=n.querySelector(t);null==r||r.classList.remove("invisible"),null==r||r.addEventListener("click",(()=>{i.classList.remove(e),r.classList.add("invisible")}))}}const sa={};function la(e){const t=document.getElementById(e);if(!t&&void 0!==sa[e])return sa[e];if(!t)return console.warn(`Element with id: ${e} not found`),sa[e]=null,sa[e];let n;for(const e of t.childNodes)try{if(e.nodeType===Node.COMMENT_NODE){n=JSON.parse(e.nodeValue);break}}catch(e){}return void 0===n?(console.warn(`Error retrieving content with id: ${e}. Use embedJson helper to embed this content`),null):(sa[e]=n,t.parentNode.removeChild(t),sa[e])}function ca(e,t){const n=document.getElementById(e),i=document.createComment(JSON.stringify(t));if(n)n.textContent="",n.appendChild(i);else{const t=document.createElement("code");t.setAttribute("id",e),t.style.display="none",t.appendChild(i),document.body.appendChild(t)}}const ua="prev",da="next",ha="slide-list__list--dragging",pa="slide-list__indicator-button-container",fa="slide-list__indicator--selected";class ma{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!e)throw new Error("No element passed in");this._el=e,this._previousButton=e.querySelector('.slide-list__nav-button[data-direction="prev"]'),this._nextButton=e.querySelector('.slide-list__nav-button[data-direction="next"]'),this._listEl=e.querySelector(".slide-list__list"),this._dragLimit=this._listEl.offsetWidth,this._items=[...this._listEl.children],this._lock={},this._currentPage=t,this._isRtl="rtl"===document.body.dir,this._isMinimalNav=e.querySelector(".slide-list__header-nav--minimal"),this._prevTabIndexMap=new Map,this._boundFireScrollEvent=this._fireScrollEvent.bind(this),this._indicatorElement=e.querySelector(`.${pa}`),this._indicatorClickHandler=this._handleIndicatorClick.bind(this),this._noMorePreviousContentAlert=this._el.querySelector(".previous-slide-list__a11y-notification"),this._noMoreNextContentAlert=this._el.querySelector(".next-slide-list__a11y-notification"),this._slideListContainer=this._el.querySelector(".slide-list__container"),this._initCalc(),window.addEventListener("resize",this._handleWindowResize.bind(this)),"ontouchstart"in window&&(this._el.addEventListener("touchstart",this._handleTouchStart.bind(this)),this._el.addEventListener("touchmove",this._handleTouchMove.bind(this)),this._el.addEventListener("touchend",this._handleTouchEnd.bind(this))),e.querySelector(".slide-list__nav")&&this._el.addEventListener("click",this._handleScrollAction.bind(this))}next(e){return e=e||1,this._currentPage+e<=this._pageTranslates.length-1&&(this._currentPage+=e,this._updateSlideButtons(),this._updateListPosition(),this._updateFocusableElements(),this._dispatchPageChangeEvent()),this._currentPage}prev(e){return e=e||1,this._currentPage-e>=0&&(this._currentPage-=e,this._updateSlideButtons(),this._updateListPosition(),this._updateFocusableElements(),this._dispatchPageChangeEvent()),this._currentPage}goToItem(e){const t=Number(e)-this._currentPage;if(0===t)return this._currentPage;t<0?this.prev(Math.abs(t)):this.next(t)}_handleIndicatorClick(e){const t=e.target.closest("[data-position]");t&&this.goToItem(t.dataset.position)}_handleWindowResize(){this._isResizing||(this._isResizing=!0,window.requestAnimationFrame(this._initCalc.bind(this)))}_updateIndicator(){this._indicatorElement&&(this._pageItems.length===this._items.length?(Zo(this._indicatorElement),this._indicatorElement.isActive=!0,this._indicatorElement.addEventListener("click",this._indicatorClickHandler)):(Jo(this._indicatorElement),this._indicatorElement.isActive=!1,this._indicatorElement.removeEventListener("click",this._indicatorClickHandler)))}_initCalc(){this._pageTranslates=this._getPageTranslates(),this._pageTranslates[this._currentPage]||(this._currentPage=0),this._updateIndicator(),this._updateSlideButtons(!0),this._updateListPosition(),this._isResizing=!1,this._updateFocusableElements()}_getPageTranslates(){const e=this._listEl.offsetWidth,t=this._listEl.scrollWidth,n=this._isRtl?e-this._items[0].offsetLeft-this._items[0].offsetWidth:this._items[0].offsetLeft,i=t-e;let r=[0];const o=[new Set],a=[];let s=0;for(let t=0;t=0)c.add(this._items[t]);else if(0===h&&0===n||0===s)s=p,c.add(this._items[t]);else{if(p>l+e){if(h>=i){o.push(new Set(this._items.slice(t)));break}r.push((this._isRtl?s:h)-n),o.push(new Set([this._items[t]]))}else c.add(this._items[t]);s=p}}return r.push(i),a.forEach(((e,t)=>{e>=i&&o[o.length-1].add(this._items[t])})),this._pageItems=o,r}_updateFocusableElements(){const e=this._pageItems[this._currentPage],t=this._items.filter((t=>!e.has(t)));for(const e of this._items)e.removeAttribute("aria-hidden");for(const[e,t]of this._prevTabIndexMap)null===t?e.removeAttribute("tabindex"):e.setAttribute("tabindex",t);for(const e of t){e.setAttribute("aria-hidden","true");e.querySelectorAll(B).forEach((e=>{const t=e.getAttribute("tabindex");this._prevTabIndexMap.set(e,t),e.setAttribute("tabindex","-1")}))}}_handleScrollAction(e){const n=t(e.target,".slide-list__nav-button"),i=n&&n.dataset.direction;i&&(this._listEl.addEventListener("transitionend",this._boundFireScrollEvent),i===ua?this.prev():i===da&&this.next())}_fireScrollEvent(){m(window,"scroll"),this._listEl.removeEventListener("transitionend",this._boundFireScrollEvent)}_updateListPosition(){this._updateTranslateXY(this._isRtl?this._pageTranslates[this._currentPage]:-this._pageTranslates[this._currentPage],0)}_updateIndicatorButtons(){if(this._indicatorElement&&this._indicatorElement.isActive){const e=this._el.querySelector(".slide-list__indicator-button-container > .slide-list__indicator--selected");e&&(e.classList.remove(fa),e.querySelector(".current-slide").textContent="");const t=this._el.querySelector(`.${pa} > :nth-child(${this._currentPage+1})`);t.classList.add(fa),t.querySelector(".current-slide").textContent=la("i18n_slide_list_current_slide_aria_label")}}_updateSlideButtons(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._previousButton&&this._nextButton){if(this._previousButton.disabled=!1,this._nextButton.disabled=!1,!this._pageTranslates[1]||this._pageTranslates[1]<0)return this._previousButton.disabled=!0,void(this._nextButton.disabled=!0);0===this._currentPage&&(this._previousButton.disabled=!0,this._setNoMoreContentAlert(this._noMorePreviousContentAlert,e)),this._currentPage!==this._pageTranslates.length-1&&0!==this._pageTranslates.length||(this._nextButton.disabled=!0,this._setNoMoreContentAlert(this._noMoreNextContentAlert,e))}this._updateIndicatorButtons()}_setNoMoreContentAlert(e){!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])&&e&&(e.classList.remove("hidden"),e.setAttribute("aria-hidden","false"),setTimeout((()=>{e.classList.add("hidden"),e.setAttribute("aria-hidden","true")}),1e3))}_resetTouchEvents(){this._dragging=!1,this._dragCanceled=!1,this._listEl.classList.remove(ha),this._lock.left=this._isRtl?this._currentPage===this._pageTranslates.length-1:0===this._currentPage,this._lock.right=this._isRtl?0===this._currentPage:this._currentPage===this._pageTranslates.length-1,this._dragThresholdMet=!1,this._t={current:{x:0,y:0}}}_handleTouchStart(e){this._resetTouchEvents(),this._t.start=this._getEventPosition(e),this._dragging=!0,this._listEl.classList.add(ha)}_handleTouchMove(e){if(!this._dragging||this._dragCanceled)return;let t=this._getEventPosition(e);this._t.current={x:this._t.start.x-t.x,y:this._t.start.y-t.y},this._canDrag()?(this._dragThresholdMet=!0,e.preventDefault(),this._lock.left&&this._t.current.x<0?this._t.current.x=this._t.current.x*-this._dragLimit/(this._t.current.x-this._dragLimit):this._lock.right&&this._t.current.x>0&&(this._t.current.x=this._t.current.x*this._dragLimit/(this._t.current.x+this._dragLimit)),this._updateTranslateXY((this._isRtl?this._pageTranslates[this._currentPage]:-this._pageTranslates[this._currentPage])-this._t.current.x)):this._isVerticalScrolling()&&(this._dragCanceled=!0)}_handleTouchEnd(){this._dragging&&(!this._dragCanceled&&Math.abs(this._t.current.x)>20&&(this._t.current.x>0&&!this._lock.right?this._isRtl?this._currentPage--:this._currentPage++:this._t.current.x<0&&!this._lock.left&&(this._isRtl?this._currentPage++:this._currentPage--),this._dispatchPageChangeEvent()),this._resetTouchEvents(),this._updateSlideButtons(),this._updateListPosition())}_getEventPosition(e){return{x:e.touches[0].clientX,y:e.touches[0].clientY}}_isVerticalScrolling(){return Math.abs(this._t.current.x)10}_canDrag(){return this._dragThresholdMet||Math.abs(this._t.current.x)>Math.abs(this._t.current.y)&&Math.abs(this._t.current.x)>10}_updateTranslateXY(e,t){this._listEl.style.transform=`translate3d(${e||0}px, ${t||0}px, 0px)`}_dispatchPageChangeEvent(){var e;m(this._el,"pagechange",{pageNumber:this._currentPage}),null===(e=this._slideListContainer)||void 0===e||e.focus()}}function ga(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function va(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,Ea(e,t,"get"))}function ya(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,Ea(e,t,"set"),n),n}function Ea(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function ba(e,t,n){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return n}function _a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function wa(e,t,n){_a(e,t),t.set(e,n)}function Ta(e,t){_a(e,t),t.add(e)}var Sa=Object.hasOwnProperty,Ca=Object.setPrototypeOf,Ia=Object.isFrozen,ka=Object.getPrototypeOf,Aa=Object.getOwnPropertyDescriptor,La=Object.freeze,Oa=Object.seal,Ra=Object.create,Na="undefined"!=typeof Reflect&&Reflect,xa=Na.apply,Pa=Na.construct;xa||(xa=function(e,t,n){return e.apply(t,n)}),La||(La=function(e){return e}),Oa||(Oa=function(e){return e}),Pa||(Pa=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1?n-1:0),r=1;r/gm),cs=Oa(/^data-[\-\w.\u00B7-\uFFFF]/),us=Oa(/^aria-[\-\w]+$/),ds=Oa(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),hs=Oa(/^(?:\w+script|data):/i),ps=Oa(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function ms(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:gs(),n=function(t){return e(t)};if(n.version="2.3.5",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var i=t.document,r=t.document,o=t.DocumentFragment,a=t.HTMLTemplateElement,s=t.Node,l=t.Element,c=t.NodeFilter,u=t.NamedNodeMap,d=void 0===u?t.NamedNodeMap||t.MozNamedAttrMap:u,h=t.HTMLFormElement,p=t.DOMParser,f=t.trustedTypes,m=l.prototype,g=Xa(m,"cloneNode"),v=Xa(m,"nextSibling"),y=Xa(m,"childNodes"),E=Xa(m,"parentNode");if("function"==typeof a){var b=r.createElement("template");b.content&&b.content.ownerDocument&&(r=b.content.ownerDocument)}var _=function(e,t){if("object"!==(void 0===e?"undefined":fs(e))||"function"!=typeof e.createPolicy)return null;var n=null,i="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(i)&&(n=t.currentScript.getAttribute(i));var r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(f,i),w=_?_.createHTML(""):"",T=r,S=T.implementation,C=T.createNodeIterator,I=T.createDocumentFragment,k=T.getElementsByTagName,A=i.importNode,L={};try{L=$a(r).documentMode?r.documentMode:{}}catch(e){}var O={};n.isSupported="function"==typeof E&&S&&void 0!==S.createHTMLDocument&&9!==L;var R=ss,N=ls,x=cs,P=us,M=hs,D=ps,U=ds,B=null,F=za({},[].concat(ms(Ya),ms(Qa),ms(Ja),ms(es),ms(ns))),q=null,H=za({},[].concat(ms(is),ms(rs),ms(os),ms(as))),G=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),j=null,W=null,V=!0,K=!0,z=!1,$=!1,X=!1,Y=!1,Q=!1,J=!1,Z=!1,ee=!1,te=!0,ne=!0,ie=!1,re={},oe=null,ae=za({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),se=null,le=za({},["audio","video","img","source","image","track"]),ce=null,ue=za({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),de="http://www.w3.org/1998/Math/MathML",he="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml",fe=pe,me=!1,ge=void 0,ve=["application/xhtml+xml","text/html"],ye=void 0,Ee=null,be=r.createElement("form"),_e=function(e){return e instanceof RegExp||e instanceof Function},we=function(e){Ee&&Ee===e||(e&&"object"===(void 0===e?"undefined":fs(e))||(e={}),e=$a(e),B="ALLOWED_TAGS"in e?za({},e.ALLOWED_TAGS):F,q="ALLOWED_ATTR"in e?za({},e.ALLOWED_ATTR):H,ce="ADD_URI_SAFE_ATTR"in e?za($a(ue),e.ADD_URI_SAFE_ATTR):ue,se="ADD_DATA_URI_TAGS"in e?za($a(le),e.ADD_DATA_URI_TAGS):le,oe="FORBID_CONTENTS"in e?za({},e.FORBID_CONTENTS):ae,j="FORBID_TAGS"in e?za({},e.FORBID_TAGS):{},W="FORBID_ATTR"in e?za({},e.FORBID_ATTR):{},re="USE_PROFILES"in e&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,K=!1!==e.ALLOW_DATA_ATTR,z=e.ALLOW_UNKNOWN_PROTOCOLS||!1,$=e.SAFE_FOR_TEMPLATES||!1,X=e.WHOLE_DOCUMENT||!1,J=e.RETURN_DOM||!1,Z=e.RETURN_DOM_FRAGMENT||!1,ee=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,te=!1!==e.SANITIZE_DOM,ne=!1!==e.KEEP_CONTENT,ie=e.IN_PLACE||!1,U=e.ALLOWED_URI_REGEXP||U,fe=e.NAMESPACE||pe,e.CUSTOM_ELEMENT_HANDLING&&_e(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&_e(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(G.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ge=ge=-1===ve.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ye="application/xhtml+xml"===ge?function(e){return e}:Fa,$&&(K=!1),Z&&(J=!0),re&&(B=za({},[].concat(ms(ns))),q=[],!0===re.html&&(za(B,Ya),za(q,is)),!0===re.svg&&(za(B,Qa),za(q,rs),za(q,as)),!0===re.svgFilters&&(za(B,Ja),za(q,rs),za(q,as)),!0===re.mathMl&&(za(B,es),za(q,os),za(q,as))),e.ADD_TAGS&&(B===F&&(B=$a(B)),za(B,e.ADD_TAGS)),e.ADD_ATTR&&(q===H&&(q=$a(q)),za(q,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&za(ce,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(oe===ae&&(oe=$a(oe)),za(oe,e.FORBID_CONTENTS)),ne&&(B["#text"]=!0),X&&za(B,["html","head","body"]),B.table&&(za(B,["tbody"]),delete j.tbody),La&&La(e),Ee=e)},Te=za({},["mi","mo","mn","ms","mtext"]),Se=za({},["foreignobject","desc","title","annotation-xml"]),Ce=za({},Qa);za(Ce,Ja),za(Ce,Za);var Ie=za({},es);za(Ie,ts);var ke=function(e){Ba(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=w}catch(t){e.remove()}}},Ae=function(e,t){try{Ba(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Ba(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!q[e])if(J||Z)try{ke(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Le=function(e){var t=void 0,n=void 0;if(Q)e=""+e;else{var i=qa(e,/^[\r\n\t ]+/);n=i&&i[0]}"application/xhtml+xml"===ge&&(e=''+e+"");var o=_?_.createHTML(e):e;if(fe===pe)try{t=(new p).parseFromString(o,ge)}catch(e){}if(!t||!t.documentElement){t=S.createDocument(fe,"template",null);try{t.documentElement.innerHTML=me?"":o}catch(e){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),fe===pe?k.call(t,X?"html":"body")[0]:X?t.documentElement:a},Oe=function(e){return C.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},Re=function(e){return"object"===(void 0===s?"undefined":fs(s))?e instanceof s:e&&"object"===(void 0===e?"undefined":fs(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Ne=function(e,t,i){O[e]&&Da(O[e],(function(e){e.call(n,t,i,Ee)}))},xe=function(e){var t,i=void 0;if(Ne("beforeSanitizeElements",e,null),(t=e)instanceof h&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof d)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore))return ke(e),!0;if(qa(e.nodeName,/[\u0080-\uFFFF]/))return ke(e),!0;var r=ye(e.nodeName);if(Ne("uponSanitizeElement",e,{tagName:r,allowedTags:B}),!Re(e.firstElementChild)&&(!Re(e.content)||!Re(e.content.firstElementChild))&&Wa(/<[/\w]/g,e.innerHTML)&&Wa(/<[/\w]/g,e.textContent))return ke(e),!0;if("select"===r&&Wa(/