PageSourceSearch

https://www.fool.ca/wp-content/themes/freesite-2020-theme/assets/dist/scripts.js?ver=1.2.0.1790172300

js fool.ca collected 2026-09-24 19:28:40 UTC 53,483 bytes, 25 lines download raw bytes

1(()=>{function l(e,t=document){return Array.from(t.querySelectorAll(e))}function T(e,t,o=document.documentElement){let i="closest"in HTMLElement.prototype&&e.parentElement?e.parentElement.closest(t):l(t,o).reverse().find(r=>r.contains(e));return i&&o.contains(i)?i:null}function It(e,t,o){let i=e;t.split(".").forEach(r=>{typeof i[r]!="object"&&(i[r]={}),i=i[r]}),i[t.split(".").pop()]=o}function Ke(e,t){e.classList.add("toggled"),e.setAttribute("aria-expanded",!0),t.classList.add("toggled"),t.setAttribute("aria-expanded",!0)}function Je(e,t){e.classList.remove("toggled"),e.setAttribute("aria-expanded",!1),t.classList.remove("toggled"),t.setAttribute("aria-expanded",!1)}function Ut(e){let t=document.getElementById(e.getAttribute("aria-controls"));if(!t){console.error("Toggler element has an invalid target.",e);return}(e.classList.contains("toggled")?Je:Ke)(e,t)}function Ze(e){return new Promise((t,o)=>{e.addEventListener("load",t),e.addEventListener("error",o)})}function to(e,t){e.src=t,document.head.appendChild(e)}function Vt(e){console.log("Freesite2020.addAsyncJS url:",e);let t=document.createElement("script"),o=Ze(t);return t.async=!0,to(t,e),o}function Qt(){l(".abh_twitter").filter(e=>e.nodeName==="A"&&e.href).forEach(e=>{let t=e.href.split("/").pop();e.insertAdjacentHTML("beforeend",`<img class="dashicons" src="https://upload.wikimedia.org/wikipedia/commons/5/53/X_logo_2023_original.svg" alt="">
2            <span class="handle">@${t}</span>`)})}function zt(){let e=document.querySelectorAll(".abh_image img"),t=document.querySelector(".author-and-post-info");t&&t.classList.add((e.length?"has":"no")+"-image")}function eo(){let e=document.querySelector(".ecap-page-bg img"),t=document.querySelector(".header-bar");if(e&&t){let o=t.getBoundingClientRect().bottom+window.scrollY;e.style.top=`${o}px`,e.style.height=`calc(100vh - ${o}px)`,e.classList.add("repositioned")}}function Gt(){eo()}var oo=window.FOOL_FREESITE,io=window.SiteInfo,ro=window.FoolEcapData,v={FOOL_FREESITE:oo,SiteInfo:io,FoolEcapData:ro};function F(e){return parseInt(e,10)===1}var no=typeof global=="object"&&global&&global.Object===Object&&global,Xt=no;var so=typeof self=="object"&&self&&self.Object===Object&&self,ao=Xt||so||Function("return this")(),rt=ao;var lo=rt.Symbol,W=lo;var Yt=Object.prototype,co=Yt.hasOwnProperty,fo=Yt.toString,G=W?W.toStringTag:void 0;function uo(e){var t=co.call(e,G),o=e[G];try{e[G]=void 0;var i=!0}catch{}var r=fo.call(e);return i&&(t?e[G]=o:delete e[G]),r}var Kt=uo;var mo=Object.prototype,po=mo.toString;function ho(e){return po.call(e)}var Jt=ho;var go="[object Null]",xo="[object Undefined]",Zt=W?W.toStringTag:void 0;function bo(e){return e==null?e===void 0?xo:go:Zt&&Zt in Object(e)?Kt(e):Jt(e)}var nt=bo;function yo(e){return e!=null&&typeof e=="object"}var te=yo;var wo="[object Symbol]";function vo(e){return typeof e=="symbol"||te(e)&&nt(e)==wo}var ee=vo;var Eo=/\s/;function Lo(e){for(var t=e.length;t--&&Eo.test(e.charAt(t)););return t}var oe=Lo;var To=/^\s+/;function Ao(e){return e&&e.slice(0,oe(e)+1).replace(To,"")}var ie=Ao;function So(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var C=So;var re=NaN,Oo=/^[-+]0x[0-9a-f]+$/i,Co=/^0b[01]+$/i,ko=/^0o[0-7]+$/i,Ro=parseInt;function Fo(e){if(typeof e=="number")return e;if(ee(e))return re;if(C(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=C(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ie(e);var o=Co.test(e);return o||ko.test(e)?Ro(e.slice(2),o?2:8):Oo.test(e)?re:+e}var X=Fo;var ne=1/0,Io=17976931348623157e292;function Po(e){if(!e)return e===0?e:0;if(e=X(e),e===ne||e===-ne){var t=e<0?-1:1;return t*Io}return e===e?e:0}var se=Po;function Mo(e){var t=se(e),o=t%1;return t===t?o?t-o:t:0}var st=Mo;var Bo="[object AsyncFunction]",$o="[object Function]",_o="[object GeneratorFunction]",qo="[object Proxy]";function Do(e){if(!C(e))return!1;var t=nt(e);return t==$o||t==_o||t==Bo||t==qo}var ae=Do;var No=9007199254740991,jo=/^(?:0|[1-9]\d*)$/;function Wo(e,t){var o=typeof e;return t=t??No,!!t&&(o=="number"||o!="symbol"&&jo.test(e))&&e>-1&&e%1==0&&e<t}var le=Wo;function Ho(e,t){return e===t||e!==e&&t!==t}var ce=Ho;var Uo=9007199254740991;function Vo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Uo}var fe=Vo;function Qo(e){return e!=null&&fe(e.length)&&!ae(e)}var de=Qo;function zo(e,t,o){if(!C(o))return!1;var i=typeof t;return(i=="number"?de(o)&&le(t,o.length):i=="string"&&t in o)?ce(o[t],e):!1}var ue=zo;var Go="Expected a function";function Xo(e,t){var o;if(typeof t!="function")throw new TypeError(Go);return e=st(e),function(){return--e>0&&(o=t.apply(this,arguments)),e<=1&&(t=void 0),o}}var me=Xo;function Yo(e,t,o){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),o=o>r?r:o,o<0&&(o+=r),r=t>o?0:o-t>>>0,t>>>=0;for(var n=Array(r);++i<r;)n[i]=e[i+t];return n}var pe=Yo;var Ko=Math.ceil,Jo=Math.max;function Zo(e,t,o){(o?ue(e,t,o):t===void 0)?t=1:t=Jo(st(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var r=0,n=0,s=Array(Ko(i/t));r<i;)s[n++]=pe(e,r,r+=t);return s}var at=Zo;var ti=function(){return rt.Date.now()},lt=ti;var ei="Expected a function",oi=Math.max,ii=Math.min;function ri(e,t,o){var i,r,n,s,a,f,c=0,u=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(ei);t=X(t)||0,C(o)&&(u=!!o.leading,d="maxWait"in o,n=d?oi(X(o.maxWait)||0,t):n,p="trailing"in o?!!o.trailing:p);function m(g){var O=i,B=r;return i=r=void 0,c=g,s=e.apply(B,O),s}function x(g){return c=g,a=setTimeout(h,t),u?m(g):s}function b(g){var O=g-f,B=g-c,z=t-O;return d?ii(z,n-B):z}function y(g){var O=g-f,B=g-c;return f===void 0||O>=t||O<0||d&&B>=n}function h(){var g=lt();if(y(g))return w(g);a=setTimeout(h,b(g))}function w(g){return a=void 0,p&&i?m(g):(i=r=void 0,s)}function E(){a!==void 0&&clearTimeout(a),c=0,i=f=r=a=void 0}function A(){return a===void 0?s:w(lt())}function S(){var g=lt(),O=y(g);if(i=arguments,r=this,f=g,O){if(a===void 0)return x(f);if(d)return clearTimeout(a),a=setTimeout(h,t),m(f)}return a===void 0&&(a=setTimeout(h,t)),s}return S.cancel=E,S.flush=A,S}var he=ri;function ni(e){return me(2,e)}var ct=ni;var si="Expected a function";function ai(e,t,o){var i=!0,r=!0;if(typeof e!="function")throw new TypeError(si);return C(o)&&(i="leading"in o?!!o.leading:i,r="trailing"in o?!!o.trailing:r),he(e,t,{leading:i,maxWait:t,trailing:r})}var Pt=ai;function Mt(e,t){let o=t.shift();t.length&&e.addEventListener("error",ct(()=>Mt(e,t))),e.src=o}
2function ge(e,t){if(!e.naturalWidth){if(e.complete){Mt(e,t);return}e.addEventListener("error",ct(()=>Mt(e,t)))}}var ft=class{constructor(t){this.table=t,this.headings=l("th:not(.not-sortable)",t.querySelector("thead")),this.lang="languages"in navigator?navigator.languages[0]:navigator.language}addIcons(){let t=document.createElement("span");t.innerHTML=["leftright","arrow-up","arrow-down"].map(o=>`<span class="dashicons dashicons-${o}"></span>`).join(""),t.className="sortable-table__icons",this.headings.forEach(o=>o.appendChild(t.cloneNode(!0)))}getColumnOrder(t){if(this.headings[t].classList.contains("order-desc"))return"desc";if(this.headings[t].classList.contains("order-asc"))return"asc"}compare(t,o){return t===void 0?o===void 0?0:1:o===void 0?t===void 0?0:-1:typeof t=="number"&&typeof o=="number"?t<o?-1:1:t.indexOf("-")===0||o.indexOf("-")===0?parseFloat(t)<parseFloat(o)?-1:1:t.localeCompare(o,navigator.languages[0]||navigator.language,{numeric:!0,ignorePunctuation:!0})}getSortableContent(t){if(t.textContent==="")return;let o=t.getAttribute("data-timestamp");return o?String(parseInt(o,10)):t.textContent.replace("+","").replace("%","").replace("$","").replace(/,/g,"")}sort(t,o){let i=this.table.querySelector("tbody");
2this.headings.forEach(n=>n.classList.remove("order-asc","order-desc")),this.headings[t].classList.add("order-"+o);let r=l(`td:nth-child(${t+1})`,i).map((n,s)=>({content:this.getSortableContent(n),i:s})).sort((n,s)=>this.compare(n.content,s.content)).map(n=>i.children[n.i]);o==="desc"&&r.reverse(),r.forEach(n=>i.appendChild(n)),this.table.dispatchEvent(new Event("tablesort")),this.table.dispatchEvent(new Event("htmlchange"))}onHeadingClick(t){let o=t.currentTarget;if(o.classList.contains("not-sortable"))return;let i=this.headings.indexOf(o);this.sort(i,this.getColumnOrder(i)==="asc"?"desc":"asc"),console.log("SortableTable.onHeadingClick",i)}addTimestamps(){l(".full-date",this.table).forEach(t=>{t.parentElement.setAttribute("data-timestamp",String(new Date(t.textContent.trim()+"Z").getTime()*.001))})}init(){this.table.classList.add("sortable-table"),this.addIcons(),this.headings.forEach(t=>t.addEventListener("click",this.onHeadingClick.bind(this))),this.addTimestamps(),this.table.addEventListener("datachange",()=>this.addTimestamps())}};var dt=class{constructor(t){this.table=t}addFixedColumn(){let t=this.table.cloneNode(!0);t.classList.add("fixed-symbol-table__fixed-column"),t.classList.remove("fixed-symbol-table__table"),l("[data-quoteapi]",t).forEach(o=>o.removeAttribute("data-quoteapi")),this.table.parentElement.insertAdjacentElement("beforebegin",t),this.fixedColumn=t}addClasses(){this.table.classList.add("fixed-symbol-table__table"),this.table.parentElement.parentElement.classList.add("fixed-symbol-table-container")}hasFirstColumnSymbol(){let t=this.table.querySelector("td:first-child");return!!t&&t.classList.contains("symbol")}refresh(){this.fixedColumn.remove(),this.addFixedColumn()}init(){console.log("FixedSymbolTable.init",this.table),this.hasFirstColumnSymbol()&&(this.addFixedColumn(),this.addClasses(),this.table.addEventListener("htmlchange",()=>this.refresh()))}};var ut=class{constructor(t){this.table=t,this.container=T(t,".financial-table-section"),this.lastRow=t.querySelector("tbody").lastElementChild,this.delay=0}expand(){if(console.log("ExpandableTable.expand",this.table),this.delay===0)return this.onExpansion();if(this.container.classList.add("table-expanding"),typeof this.delay=="number"&&this.delay!==0){setTimeout(()=>this.onExpansion(),2e3);return}this.onExpansion(),console.error("Invalid expandable table delay",this.delay)}onExpansion(){this.container.classList.remove("table-expanding"),this.container.classList.add("table-expanded"),setTimeout(()=>this.table.dispatchEvent(new Event("htmlchange")),1e3)}setConstantDelay(t){this.delay=t}init(){this.container||(this.container=this.table.parentElement);let t=this.container.querySelector(".expand-table-btn, .show-more-button");console.log("ExpandableTable.init",this.table,t),t&&t.addEventListener("click",()=>this.expand())}};var mt=class{constructor(t,o,i="value"){this.select=t,this.buttonsParent=o,this.datasetAttribute=i}markAsSelected(t){this.buttonsParent.querySelector(".selected").classList.remove("selected"),t.classList.add("selected")}getButtonValue(t){return t.dataset[this.datasetAttribute]}updateValue(t){this.select.value=t,this.select.dispatchEvent(new Event("change"))}onButtonClick(t){t.classList.contains("selected")||(this.markAsSelected(t),this.updateValue(this.getButtonValue(t)))}listenForButtonClicks(){this.buttonsParent.addEventListener("click",t=>{t.target.nodeName==="BUTTON"&&this.onButtonClick(t.target)})}assertValidElements(){if(!(this.select instanceof HTMLElement)||this.select.nodeName!=="SELECT")throw new TypeError("Not a select element.");if(!(this.buttonsParent instanceof HTMLElement)||this.buttonsParent.querySelectorAll("button").length===0)throw new Error("Could not find any buttons.")}init(){this.assertValidElements(),this.listenForButtonClicks()}};var pt=class{constructor(t){this.container=t,this.hasClass=o=>t.classList.contains(o)}init(){this.hasClass("main-chart")&&this.initMainChart()}getChartLabels(t,o,i){let r=`.quoteapi-chart-${t}axis`;return l(`${r}-${o} ${r}-${i} ${r}-label-container`,this.container)}initRangeButtons(){new mt(document.querySelector("#main-chart-range-selector"),document.querySelector("#main-chart-range-buttons"),"range").init()}createSpaceForLeftYAxis(){let t=this.getChartLabels("y","left","outside"),o=()=>setTimeout(this.createSpaceForLeftYAxis.bind(this),1e3);if(t.length===0)return o();let i=Math.max.apply(this,t.map(r=>r.offsetWidth));if(i===0)return o();this.container.style.paddingLeft=i+"px"}initMainChart(){this.createSpaceForLeftYAxis(),this.initRangeButtons()}};var ht=class{getQuoteApiMarketStatus(){let t=document.querySelector('[data-quoteapi="changeSignCSS"]');return t?t.className:""}getFoolQuoteMarketStatus(t="positive",o="negative"){let i=document.querySelector(".price-change-arrow");if(!i)return"";let r={increase:t,decrease:o},n=i.firstElementChild.className.trim();return n in r?r[n]:""}updateRootMarketStatus(t){t&&document.body.setAttribute("data-market-status",t)}initArrowForFoolQuoteInfo(){let t=document.querySelector(".dynamic-arrow"),o=document.querySelector(".price-change-arrow");if(t&&o){let i=this.getFoolQuoteMarketStatus("up","down");i&&t.classList.add("arrow-"+i),o.insertAdjacentElement("beforebegin",t)}}addChangeClassToFoolQuoteElements(){let t=`is-${this.getFoolQuoteMarketStatus()}`;l([".price-change-dollars",".price-change-percent"].join(",")).forEac
vendor: 5,567 bytes, line 2
2h(i=>i.classList.add(t))}initBodyMarketStatusAttribute(){this.updateRootMarketStatus(this.getQuoteApiMarketStatus()),this.updateRootMarketStatus(this.getFoolQuoteMarketStatus())}init(){this.initBodyMarketStatusAttribute(),this.addChangeClassToFoolQuoteElements(),this.initArrowForFoolQuoteInfo()}};function xe(e,t,o,i=document.documentElement){return i.addEventListener(e,function(r){if(r.target.matches(t))return o(r,r.target);let n=T(r.target,t,i);if(n)return o(r,n)})}var Y=Math.min,$=Math.max,K=Math.round,J=Math.floor,I=e=>({x:e,y:e});function be(e,t){return typeof e=="function"?e(t):e}function ye(e){return e.split("-")[0]}function we(e){return e.split("-")[1]}function ve(e){return e==="x"?"y":"x"}function Ee(e){return e==="y"?"height":"width"}function Bt(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Le(e){return ve(Bt(e))}function li(e){var t,o,i,r;return{top:(t=e.top)!=null?t:0,right:(o=e.right)!=null?o:0,bottom:(i=e.bottom)!=null?i:0,left:(r=e.left)!=null?r:0}}function Te(e){return typeof e!="number"?li(e):{top:e,right:e,bottom:e,left:e}}function q(e){let{x:t,y:o,width:i,height:r}=e;return{width:i,height:r,top:o,left:t,right:t+i,bottom:o+r,x:t,y:o}}function Ae(e,t,o){let{reference:i,floating:r}=e,n=Bt(t),s=Le(t),a=Ee(s),f=ye(t),c=n==="y",u=i.x+i.width/2-r.width/2,d=i.y+i.height/2-r.height/2,p=i[a]/2-r[a]/2,m;switch(f){case"top":m={x:u,y:i.y-r.height};break;case"bottom":m={x:u,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:d};break;case"left":m={x:i.x-r.width,y:d};break;default:m={x:i.x,y:i.y}}let x=we(t);return x&&(m[s]+=p*(x==="end"?1:-1)*(o&&c?-1:1)),m}async function Se(e,t){var o;t===void 0&&(t={});let{x:i,y:r,platform:n,rects:s,elements:a,strategy:f}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:m=0}=be(t,e),x=Te(m),y=a[p?d==="floating"?"reference":"floating":d],h=q(await n.getClippingRect({element:(o=await(n.isElement==null?void 0:n.isElement(y)))==null||o?y:y.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:f})),w=d==="floating"?{x:i,y:r,width:s.floating.width,height:s.floating.height}:s.reference,E=await(n.getOffsetParent==null?void 0:n.getOffsetParent(a.floating)),A=await(n.isElement==null?void 0:n.isElement(E))&&await(n.getScale==null?void 0:n.getScale(E))||{x:1,y:1},S=q(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:E,strategy:f}):w);return{top:(h.top-S.top+x.top)/A.y,bottom:(S.bottom-h.bottom+x.bottom)/A.y,left:(h.left-S.left+x.left)/A.x,right:(S.right-h.right+x.right)/A.x}}var ci=50,Oe=async(e,t,o)=>{let{placement:i="bottom",strategy:r="absolute",middleware:n=[],platform:s}=o,a=s.detectOverflow?s:{...s,detectOverflow:Se},f=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=Ae(c,i,f),p=i,m=0,x={};for(let b=0;b<n.length;b++){let y=n[b];if(!y)continue;let{name:h,fn:w}=y,{x:E,y:A,data:S,reset:g}=await w({x:u,y:d,initialPlacement:i,placement:p,strategy:r,middlewareData:x,rects:c,platform:a,elements:{reference:e,floating:t}});u=E??u,d=A??d,x[h]={...x[h],...S},g&&m<ci&&(m++,typeof g=="object"&&(g.placement&&(p=g.placement),g.rects&&(c=g.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):g.rects),{x:u,y:d}=Ae(c,p,f)),b=-1)}return{x:u,y:d,placement:p,strategy:r,middlewareData:x}};function gt(){return typeof window<"u"}function N(e){return ke(e)?(e.nodeName||"").toLowerCase():"#document"}function L(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function P(e){var t;return(t=(ke(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ke(e){return gt()?e instanceof Node||e instanceof L(e).Node:!1}function k(e){return gt()?e instanceof Element||e instanceof L(e).Element:!1}function M(e){return gt()?e instanceof HTMLElement||e instanceof L(e).HTMLElement:!1}function Ce(e){return!gt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof L(e).ShadowRoot}function Z(e){let{overflow:t,overflowX:o,overflowY:i,display:r}=R(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+o)&&r!=="inline"&&r!=="contents"}function Re(e){return/^(table|td|th)$/.test(N(e))}function tt(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var fi=/transform|translate|scale|rotate|perspective|filter/,di=/paint|layout|strict|content/,D=e=>!!e&&e!=="none",$t;function xt(e){let t=k(e)?R(e):e;return D(t.transform)||D(t.translate)||D(t.scale)||D(t.rotate)||D(t.perspective)||!bt()&&(D(t.backdropFilter)||D(t.filter))||fi.test(t.willChange||"")||di.test(t.contain||"")}function Fe(e){let t=_(e);for(;M(t)&&!U(t);){if(xt(t))return t;if(tt(t))return null;t=_(t)}return null}function bt(){return $t==null&&($t=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),$t}function U(e){return/^(html|body|#document)$/.test(N(e))}function R(e){return L(e).getComputedStyle(e)}function et(e){return k(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _(e){if(N(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ce(e)&&e.host||P(e);return Ce(t)?t.host:t}function Ie(e){let t=_(e);return U(t)?(e.ownerDocument||e).body:M(t)&&Z(t)?t:Ie(t)}function H(e,t,o){var i;t===void 0&&(t=[]),o===void 0&&(o=!0);let r=Ie(e),n=r===((i=e.ownerDocument)==null?void 0:i.body),s=L(r);if(n){let a=yt(s);
vendor: 7,699 bytes, line 2
2return t.concat(s,s.visualViewport||[],Z(r)?r:[],a&&o?H(a):[])}else return t.concat(r,H(r,[],o))}function yt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Be(e){let t=R(e),o=parseFloat(t.width)||0,i=parseFloat(t.height)||0,r=M(e),n=r?e.offsetWidth:o,s=r?e.offsetHeight:i,a=K(o)!==n||K(i)!==s;return a&&(o=n,i=s),{width:o,height:i,$:a}}function qt(e){return k(e)?e:e.contextElement}function V(e){let t=qt(e);if(!M(t))return I(1);let o=t.getBoundingClientRect(),{width:i,height:r,$:n}=Be(t),s=(n?K(o.width):o.width)/i,a=(n?K(o.height):o.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var ui=I(0);function $e(e){let t=L(e);return!bt()||!t.visualViewport?ui:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mi(e,t,o){return t===void 0&&(t=!1),!!o&&t&&o===L(e)}function j(e,t,o,i){t===void 0&&(t=!1),o===void 0&&(o=!1);let r=e.getBoundingClientRect(),n=qt(e),s=I(1);t&&(i?k(i)&&(s=V(i)):s=V(e));let a=mi(n,o,i)?$e(n):I(0),f=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(n&&i){let p=L(n),m=k(i)?L(i):i,x=p,b=yt(x);for(;b&&m!==x;){let y=V(b),h=b.getBoundingClientRect(),w=R(b),E=h.left+(b.clientLeft+parseFloat(w.paddingLeft))*y.x,A=h.top+(b.clientTop+parseFloat(w.paddingTop))*y.y;f*=y.x,c*=y.y,u*=y.x,d*=y.y,f+=E,c+=A,x=L(b),b=yt(x)}}return q({width:u,height:d,x:f,y:c})}function wt(e,t){let o=et(e).scrollLeft;return t?t.left+o:j(P(e)).left+o}function _e(e,t){let o=e.getBoundingClientRect(),i=o.left+t.scrollLeft-wt(e,o),r=o.top+t.scrollTop;return{x:i,y:r}}function pi(e){let{elements:t,rect:o,offsetParent:i,strategy:r}=e,n=r==="fixed",s=P(i),a=t?tt(t.floating):!1;if(i===s||a&&n)return o;let f={scrollLeft:0,scrollTop:0},c=I(1),u=I(0),d=M(i);if((d||!n)&&((N(i)!=="body"||Z(s))&&(f=et(i)),d)){let m=j(i);c=V(i),u.x=m.x+i.clientLeft,u.y=m.y+i.clientTop}let p=s&&!d&&!n?_e(s,f):I(0);return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-f.scrollLeft*c.x+u.x+p.x,y:o.y*c.y-f.scrollTop*c.y+u.y+p.y}}function hi(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function gi(e){let t=et(e),o=e.ownerDocument.body,i=$(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=$(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),n=-t.scrollLeft+wt(e),s=-t.scrollTop;return R(o).direction==="rtl"&&(n+=$(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:n,y:s}}var xi=25;function bi(e,t,o){o===void 0&&(o="viewport");let i=o==="layoutViewport",r=L(e),n=P(e),s=r.visualViewport,a=n.clientWidth,f=n.clientHeight,c=0,u=0;if(s){let p=!bt()||t==="fixed";i?p||(c=-s.offsetLeft,u=-s.offsetTop):(a=s.width,f=s.height,p&&(c=s.offsetLeft,u=s.offsetTop))}if(wt(n)<=0){let p=n.ownerDocument,m=p.body,x=getComputedStyle(m),b=p.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,y=Math.abs(n.clientWidth-m.clientWidth-b),h=getComputedStyle(n).scrollbarGutter==="stable both-edges"?y/2:y;h<=xi&&(a-=h)}return{width:a,height:f,x:c,y:u}}function yi(e,t){let o=j(e,!0,t==="fixed"),i=o.top+e.clientTop,r=o.left+e.clientLeft,n=V(e),s=e.clientWidth*n.x,a=e.clientHeight*n.y,f=r*n.x,c=i*n.y;return{width:s,height:a,x:f,y:c}}function Pe(e,t,o){let i;if(t==="viewport"||t==="layoutViewport")i=bi(e,o,t);else if(t==="document")i=gi(P(e));else if(k(t))i=yi(t,o);else{let r=$e(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return q(i)}function wi(e,t){let o=t.get(e);if(o)return o;let i=H(e,[],!1).filter(a=>k(a)&&N(a)!=="body"),r=null,n=R(e).position==="fixed",s=n?_(e):e;for(;k(s)&&!U(s);){let a=R(s),f=xt(s),c=r?r.position:n?"fixed":"";!f&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(d=>d!==s):r=a,s=_(s)}return t.set(e,i),i}function vi(e){let{element:t,boundary:o,rootBoundary:i,strategy:r}=e,s=[...o==="clippingAncestors"?tt(t)?[]:wi(t,this._c):[].concat(o),i],a=Pe(t,s[0],r),f=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<s.length;p++){let m=Pe(t,s[p],r);f=$(m.top,f),c=Y(m.right,c),u=Y(m.bottom,u),d=$(m.left,d)}return{width:c-d,height:u-f,x:d,y:f}}function Ei(e){let{width:t,height:o}=Be(e);return{width:t,height:o}}function Li(e,t,o){let i=M(t),r=P(t),n=o==="fixed",s=j(e,!0,n,t),a={scrollLeft:0,scrollTop:0},f=I(0);if((i||!n)&&((N(t)!=="body"||Z(r))&&(a=et(t)),i)){let p=j(t,!0,n,t);f.x=p.x+t.clientLeft,f.y=p.y+t.clientTop}!i&&r&&(f.x=wt(r));let c=r&&!i&&!n?_e(r,a):I(0),u=s.left+a.scrollLeft-f.x-c.x,d=s.top+a.scrollTop-f.y-c.y;return{x:u,y:d,width:s.width,height:s.height}}function _t(e){return R(e).position==="static"}function Me(e,t){if(!M(e)||R(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return P(e)===o&&(o=o.ownerDocument.body),o}function qe(e,t){let o=L(e);if(tt(e))return o;if(!M(e)){let r=_(e);for(;r&&!U(r);){if(k(r)&&!_t(r))return r;r=_(r)}return o}let i=Me(e,t);for(;i&&Re(i)&&_t(i);)i=Me(i,t);return i&&U(i)&&_t(i)&&!xt(i)?o:i||Fe(e)||o}var Ti=async function(e){let t=this.getOffsetParent||qe,o=this.getDimensions,i=await o(e.floating);return{reference:Li(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Ai(e){return R(e).direction==="rtl"}var Si={convertOffsetParentRelativeRectToViewportRelativeRect:pi,getDocumentElement:P,getClippingRect:vi,getOffsetParent:qe,getElementRects:Ti,getClientRects:hi,getDimensions:Ei,getScale:V,isElement:k,isRTL:Ai};function De(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Oi(e,t,o){let i=null,r,n=P(e);function s(){var u;clearTimeout(r),(u=i)==null||u.disconnect(),i=null}function a(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),s();let p=e.getBoundingClientRect(),{left:m,top:x,width:b,height:y}=p;if(u||t(),!b||!y)return;let h=J(x),w=J(n.clientWidth-(m+b)),E=J(n.clientHeight-(x+y)),A=J(m),g={rootMargin:-h+"px "+-w+"px "+-E+"px "+-A+"px",threshold:$(0,Y(1,d))||1},O=!0;function B(z){let Ft=z[0].intersectionRatio;if(!De(p,e.getBoundingClientRect()))return a();if(Ft!==d){if(!O)return a();Ft?a(!1,Ft):r=setTimeout(()=>{a(!1,1e-7)},1e3)}O=!1}try{i=new IntersectionObserver(B,{...g,root:n.ownerDocument})}catch{i=new IntersectionObserver(B,g)}i.observe(e)}let f=L(e),c=()=>a(o);return f.addEventListener("resize",c),a(!0),()=>{f.removeEventListener("resize",c),s()}}function Ne(e,t,o,i){i===void 0&&(i={});let{ancestorScroll:r=!0,ancestorResize:n=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,c=qt(e),u=r||n?[...c?H(c):[],...t?H(t):[]]:[];u.forEach(h=>{r&&h.addEventListener("scroll",o),n&&h.addEventListener("resize",o)});let d=c&&a?Oi(c,o,n):null,p=-1,m=null;s&&(m=new ResizeObserver(h=>{let[w]=h;w&&w.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var E;(E=m)==null||E.observe(t)})),o()}),c&&!f&&m.observe(c),t&&m.observe(t));let x,b=f?j(e):null;f&&y();function y(){let h=j(e);b&&!De(b,h)&&o(),b=h,x=requestAnimationFrame(y)}return o(),()=>{var h;u.forEach(w=>{r&&w.removeEventListener("scroll",o),n&&w.removeEventListener("resize",o)}),d?.(),(h=m)==null||h.disconnect(),m=null,f&&cancelAnimationFrame(x)}}var je=(e,t,o)=>{let i=new Map,r=o??{},n={...Si,...r.platform,_c:i};return Oe(e,t,{...r,platform:n})};var vt=class{constructor(t,o){this.name=t,this.dataProviderElement=o,this.attributes={},this.modal=null,this.autoUpdateStopper=null,console.log("Tooltip",t,o)}extractAttributes(){let t="data-"+this.name+"-attribute";l(`[${t}]`,this.dataProviderElement).map(o=>{let i=o.getAttribute(t+"-value");this.attributes[o.getAttribute(t)]=i||o.innerHTML}),console.log("Tooltip.extractAttributes",this.attributes)}hydrateModal(){this.modal=document.getElementById(this.name+"-modal"),Object.keys(this.attributes).forEac
2h(t=>{this.modal.querySelector(`.${this.name}-${t}`).innerHTML=this.attributes[t]})}show(t,o,i=null){this.autoUpdateStopper=Ne(t,o,()=>{je(t,o,{placement:"top"}).then(({x:r,y:n})=>{Object.assign(o.style,{left:`${r}px`,top:`${n}px`}),i&&i()})}),console.log("Tooltip.show",this.modal,t,o)}kill(t){this.autoUpdateStopper&&(this.autoUpdateStopper(),Object.assign(t.style,{left:"",top:""}))}init(){this.extractAttributes(),this.hydrateModal()}};var Et=class{constructor(){this.tooltip=null,this.activeTooltip=null,this.activeButton=null}init(){this.modalsContainer=document.getElementById("morningstar-modals"),this.modalsContainer&&(xe("click",".popup-btn",(t,o)=>this.onButtonClick(o)),this.modalsContainer.querySelector(".close-button").addEventListener("click",()=>this.killActiveTooltip()),document.addEventListener("click",t=>this.checkForOutsideClick(t.target)))}show(t,o){o.show(t,this.modalsContainer,()=>{this.activeButton=t,t.classList.add("active"),this.tooltip.modal.classList.add("active"),setTimeout(()=>this.modalsContainer.classList.add("active"),16)}),this.tooltip=o,console.log("TableTooltips.show")}killActiveTooltip(){this.tooltip&&(this.tooltip.kill(this.modalsContainer),this.tooltip=null,this.activeButton=null,Array.from(this.modalsContainer.children).forEach(t=>t.classList.remove("active")),this.modalsContainer.classList.remove("active"),console.log("TableTooltips.killActiveTooltip"))}onButtonClick(t){if(t===this.activeButton){t.classList.remove("active"),this.killActiveTooltip();return}this.killActiveTooltip();let o=new vt(t.dataset.popup,T(t,"tr"));o.init(),setTimeout(()=>this.show(t,o),64),console.log("FinancialTableTooltips.onButtonClick",t)}checkForOutsideClick(t){this.modalsContainer.contains(t)||this.killActiveTooltip()}};var Dt=class{constructor(t,o){this.chartInfo=t,this.extraInfo=o}cloneItem(t){let o=t.querySelector(".core-figure-name").textContent,i=t.querySelector(".core-figure-value").textContent,r=document.createElement("div");return r.className="financial-info-item",r.innerHTML=`<h5>${o}</h5><p>${i}</p>`,r}cloneInto(){let t=l(".inner-container > div",this.extraInfo).slice(3).map(this.cloneItem.bind(this));at(t,2).map(o=>{let i=document.createElement("div");return i.className="financial-info-section fundamentals-section",o.forEach(r=>i.appendChild(r)),i}).forEach(o=>this.chartInfo.insertAdjacentElement("afterbegin",o)),this.chartInfo.classList.add("fouc-ready")}},Nt=class{constructor(t,o){this.chartInfo=t,this.foolStockTable=o}cloneItem(t){let o=t.querySelector("strong").textContent,i=t.querySelector("span").textContent,r=document.createElement("div");return r.className="financial-info-item",r.innerHTML=`<h5>${o}</h5><p>${i}</p>`,r}cloneInto(){let t=Array.from(this.foolStockTable.children).map(this.cloneItem.bind(this));at(t,4).map(o=>{let i=document.createElement("div");return i.className="financial-info-section",o.forEach(r=>i.appendChild(r)),i}).forEach(o=>this.chartInfo.insertAdjacentElement("afterbegin",o)),this.chartInfo.classList.add("fouc-ready")}};function We(){let e=document.querySelector(".chart-financial-info"),t=document.querySelector(".ticker-extra-info"),o=document.querySelector(".company-data-table");t&&e&&new Dt(e,t).cloneInto(),e&&o&&new Nt(e,o).cloneInto()}function Lt(){return"MediaQueryList"in window&&"addEventListener"in MediaQueryList.prototype}var Q=class{constructor(t,o,i=""){this.toggler=t,this.content=o,this.isEnabledMediaQuery=i,this.isToggleOnIconOnlyEnabled=!1}toggleOnIconOnly(){this.isToggleOnIconOnlyEnabled=!0}expand(){this.toggler.classList.add("expanded"),this.content.classList.add("expanded"),this.container.classList.add("expanded"),this.isExpanded=!0}collapse(){this.toggler.classList.remove("expanded"),this.content.classList.remove("expanded"),this.container.classList.remove("expanded"),this.isExpanded=!1}onTogglerClick(t){this.isToggleOnIconOnlyEnabled&&!t.target.classList.contains("accordion-icon")||this.toggle()}toggle(){if(this.isExpanded)return this.collapse();this.expand()}enable(){this.container.classList.add("enabled")}disable(){this.container.classList.remove("enabled")}addClasses(){this.container.classList.add("single-accordion"),this.toggler.classList.add("single-accordion__toggler"),this.content.classList.add("single-accordion__content")}initStatusMediaQuery(){if(!this.isEnabledMediaQuery||!Lt()){this.enable();return}let t=window.matchMedia(this.isEnabledMediaQuery);t.addEventListener("change",o=>o.matches?this.enable():this.disable()),t.matches?this.enable():this.disable()}init(){if(!this.toggler)return;this.container=T(this.toggler,".single-accordion"),this.container||(this.container=this.toggler.parentElement),this.initStatusMediaQuery(),this.addClasses();let t=window.getComputedStyle(this.content).getPropertyValue("visibility")!=="hidden",o=this.container.getAttribute("data-always-expands-on-page-load")==="true";this.isExpanded=t||o,this.isExpanded?this.expand():this.collapse(),this.toggler.insertAdjacentHTML("beforeend",`
3            <span class="dashicons accordion-icon dashicons-plus-alt2"></span>
4            <span class="dashicons accordion-icon dashicons-minus"></span>
5        `),this.toggler.addEventListener("click",i=>this.onTogglerClick(i))}};function He(){let e=l(".market-movers__listing, .articles-listing, .financial-table-section").map(t=>[t.querySelector("header"),t.querySelector("main")]);e.push([document.querySelector("#market-index-columns .content-header"),document.querySelector("#market-index-columns .entry-content")]),e.filter(t=>!!t[0]&&!!t[1]).forEach(t=>{let o=new Q(t[0],t[1],"(max-width: 842px)");o.toggleOnIconOnly(),o.init()})}function Ci(e){let t=T(e,".market-announcements");if(!t){console.warn("Could not find the container ancestor for pagination button.",e);return}let o=t.querySelector("table");if(!o){console.warn("Could not find the table for pagination button.",e);return}o.dispatchEvent(new Event("datachange")),o.dispatchEvent(new Event("htmlchange"))}function Ue(){l(".announcements-pagination button").forEach(e=>{e.addEventListener("click",()=>setTimeout(()=>Ci(e),1e3))})}function ki(){l(".financial-table, .morningstar-table").forEach(e=>{new ft(e).init(),new dt(e).init();let t=new ut(e);e.querySelector("[data-quoteapi]")&&t.setConstantDelay(2e3),t.init()}),Ue(),F(v.FOOL_FREESITE.hasQuoteApi)&&Ri()}function Ri(){l(".market-movers").filter(e=>e.querySelectorAll("tbody tr").length<5).forEach(e=>e.classList.add("no-data"))}function Fi(){let e=v.FOOL_FREESITE.ticker,t=document.createElement("img"),o="https://g.foolcdn.com/art/companylogos/medium";t.addEventListener("load",()=>t.classList.add("loaded")),t.classList.add("company-logo"),t.src=`${o}/${e.exchange}:${e.symbol}.png`,ge(t,[`${o}/${e.symbol}.png`,`${o}/${e.exchange}_${e.symbol}.png`]),t.alt=e.name+" Logo",document.querySelector(".entry-title").appendChild(t)}function Ii(){return document.body.className.indexOf("company-announcements")!==-1}function jt(){let e=document.querySelector("#main-container");if(Ii()){e&&e.classList.add("quoteapi-ready");return}new ht().init(),l(".financial-chart").forEach(t=>new pt(t).init()),F(v.FOOL_FREESITE.isTickerPage)&&!F(v.FOOL_FREESITE.hasQuoteMediaApi)&&Fi(),He(),We(),new Et().init(),l('[data-quoteapi="dateTime"]').forEach(t=>t.innerHTML=t.innerHTML.replace("as at","As at")),l(".price-change-dollars").forEach(t=>{t.classList.add("movement"),t.insertAdjacentHTML("afterbegin",`<h5>${v.FOOL_FREESITE.tickerMovementLabel}</h5>`)}),e&&e.classList.add("quoteapi-ready"),F(v.FOOL_FREESITE.hasQuoteMediaApi)&&e&&(e.classList.remove("quoteapi-ready"),e.classList.add("quotemediaapi-ready")),setTimeout(ki,100),setTimeout(function(){document.querySelectorAll(".qmod-btn").forEach(t=>t.classList.add("no-btn-style"))},5e3)}function Ve(){"initOrderFormCountrySelector"in window&&window.initOrderFormCountrySelector();let e=document.querySelector(".order-page-bottom");e&&(e.classList.add("first-order-footer"),e.offsetHeight>0&&e.classList.add("has-visible-content")),document.querySelector(".portfolio-returns-table ~ .caption_1")?.removeAttribute("style"),l(".dynamic-rec-returns").forEach(t=>t.parentElement.style.textAlign="center"),l("#marketing-page-container").filter(t=>t.children.length===0).forEach(t=>t.remove())}var Tt=class{constructor(t){this.container=t}init(){this.initBadgerAccordion()}initBadgerAccordion(){console.log("Accordion.initBadgerAccordion",this.container),this.accordion=new BadgerAccordion(this.container,{openHeadersOnLoad:[0],openMultiplePanels:!0}),this.container.classList.add("fouc-ready")}};var ot=class{constructor(t){this.container=t}init(){setTimeout(()=>this.container.classList.add("fouc-ready"),64)}};function Qe(){l(".pagination").forEach(e=>new ot(e).init())}var Wt=class{static initClosableElements(){document.addEventListener("click",t=>{let o=T(t.target,"[data-closable]");o&&(t.target.hasAttribute("data-close")||t.target.querySelector("[data-close]"))&&(o.style.display="none")})}};function ze(){Wt.initClosableElements()}var Ht=class{static init(){Object.keys(window).filter(t=>
5t.indexOf("initFlipClock_")===0).forEach(t=>window[t].call(window))}};function Ge(){Ht.init()}var At=class{constructor(t){this.container=t,this.$=o=>t.querySelector(o)}init(){this.tabs=l(".tabs__tab",this.container),this.headerUl=this.$(".tabs__header ul"),this.tabs.length!==0&&(this.createToggleButtons(),this.enableTabTogglers(),this.toggleTabByTitle(this.tabs[0].dataset.tabTitle),this.container.classList.add("init"),setTimeout(()=>this.container.classList.add("fouc-ready"),100))}createToggleButton(t){return`<button
6            class="tabs__tab-toggler no-btn-style"
7            data-tab-title="${t.dataset.tabTitle}"
8            style="border-color: ${t.dataset.tabColor};"
9        >
10            ${t.dataset.tabTitle}
11        </button>`}createToggleButtons(){let t=this.tabs.map(o=>`<li>${this.createToggleButton(o)}</li>`).join("");this.headerUl.insertAdjacentHTML("beforeend",t),this.toggleButtons=l(".tabs__tab-toggler",this.container)}toggleTabByTitle(t){this.tabs.forEach(o=>{o.classList[o.dataset.tabTitle===t?"add":"remove"]("selected")}),this.toggleButtons.forEach(o=>{o.classList[o.dataset.tabTitle===t?"add":"remove"]("selected")})}enableTabTogglers(){this.headerUl.addEventListener("click",t=>{t.target.nodeName==="BUTTON"&&this.toggleTabByTitle(t.target.dataset.tabTitle)})}};var St=class{constructor(t){this.container=t,this.$=o=>t.querySelector(o),this.isDisplaying=!1}init(){this.findElements(),this.hasDescription()&&(this.name.insertAdjacentHTML("beforeend",'<span class="description-arrow">\u276F</span>'),window.requestAnimationFrame(()=>this.initToggler()))}findElements(){this.name=this.$(".abh_name"),this.description=this.$(".abh_description")}hasDescription(){return this.description&&this.description.textContent.trim().length>0}show(){this.isDisplaying=!0,this.container.dataset.showDescription="true"}hide(){this.isDisplaying=!1,this.container.dataset.showDescription="false"}toggle(){return this.isDisplaying?this.hide():this.show()}initToggler(){this.toggler=this.name.lastElementChild,this.toggler.addEventListener("click",()=>this.toggle()),hoverintent(this.toggler,()=>this.show(),()=>this.hide()).options({timeout:500})}};var it=class{constructor(t=null){this.container=t||document.querySelector("#sources"),this.status=this.container?this.container.getAttribute("data-state"):null}toggleStatus(){this.container.setAttribute("data-state",this.container.getAttribute("data-state")==="collapsed"?"expanded":"collapsed")}toggleBody(){jQuery(this.container).find(".evergreen__sources__body-js").slideToggle()}toggle(){this.container!==null&&(this.toggleStatus(),this.toggleBody())}expand(){this.status==="collapsed"&&this.toggle()}collapse(){this.status==="expanded"&&this.toggle()}};function Pi(){l(".evergreen__sources__title-js").forEach(e=>{e.addEventListener("click",()=>{new it(e.parentElement).toggle()})}),window.addEventListener("hashchange",()=>{window.location.hash==="#sources"&&new it().expand()}),window.location.hash==="#sources"&&new it().expand()}function Xe(){"jQuery"in window&&jQuery(document).ready(function(){Pi()})}var Ot=class{constructor(t){this.buttonsContainer=t}getPageNumFromHref(t){let o=[t.match(/\/page\/([0-9]+)\//),t.match(/paged=([0-9]+)/)];for(let i of o)if(i)return parseInt(i[1],10);return 1}findPaginatedListing(){this.listing=document.querySelector('.articles-listing[data-has-pagination="true"][data-query]')}createPagedQuery(t){let o=new URLSearchParams(this.listing.getAttribute("data-query"));return o.set("paged",String(t)),o.toString()}beginLoadingTransition(){this.listing.style.height=this.listing.offsetHeight+"px",this.listing.insertAdjacentHTML("beforeend",'<div class="loading-spinner"></div>'),this.buttonsContainer.classList.add("busy"),setTimeout(()=>{this.listing.scrollIntoView({behavior:"auto",block:"start"}),this.listing.classList.add("loading-listing")},64)}endLoadingTransition(){this.listing.querySelector(".loading-spinner").remove(),this.listing.classList.remove("loading-listing"),this.buttonsContainer.classList.remove("busy"),this.listing.style.height=""}replaceListing(t){this.listing.querySelector("main").remove(),this.listing.insertAdjacentHTML("beforeend",t)}fetchListing(t){let o=new URL(v.FOOL_FREESITE.postsListingApiUrl);return o.searchParams.append("fetchArgs",this.createPagedQuery(t)),fetch(o.href)}replacePagination(t){let o=document.createElement("div");
11this.buttonsContainer.innerHTML="",o.innerHTML=t,setTimeout(()=>{Array.from(o.querySelector(".pagination").children).forEach(i=>this.buttonsContainer.appendChild(i)),new ot(this.buttonsContainer).init()},16)}fetchPagination(t){let o=new URL(v.FOOL_FREESITE.paginationApiUrl);return o.searchParams.append("baseUrl",this.buttonsContainer.getAttribute("data-base-url")),o.searchParams.append("pageCount",this.buttonsContainer.getAttribute("data-page-count")),o.searchParams.append("currentPageNum",String(t)),fetch(o.href)}updateCurrentHistoryState(){history.replaceState({pageNum:parseInt(this.buttonsContainer.getAttribute("data-current-page"),10)},document.title)}pushHistoryState(t,o){history.pushState({pageNum:o},document.title,t)}onHistoryStatePop(t){t.state&&"pageNum"in t.state&&this.goToPage(t.state.pageNum)}goToPageFromUrl(t){return this.goToPage(this.getPageNumFromHref(t))}goToPage(t){if(typeof t!="number"||isNaN(t)||t<1)throw new TypeError("Invalid page number.");return this.beginLoadingTransition(),Promise.all([this.fetchListing(t).then(o=>o.text()).then(o=>this.replaceListing(o)),this.fetchPagination(t).then(o=>o.text()).then(o=>this.replacePagination(o))]).then(()=>(setTimeout(()=>{this.endLoadingTransition()},64),Promise.resolve(t)))}onClick(t){t.preventDefault();let o=t.target;if(o.nodeName==="A"&&!o.classList.contains("current")){let i=o.href;this.updateCurrentHistoryState(),this.goToPageFromUrl(i).then(r=>this.pushHistoryState(i,r))}}init(){this.findPaginatedListing(),this.listing&&(window.onpopstate=this.onHistoryStatePop.bind(this),this.buttonsContainer.addEventListener("click",t=>this.onClick(t)))}};var Ct=class{constructor(){this.container=document.querySelector("#main-menu"),this.menu=document.querySelector("#mega-menu-main-menu-2020"),this.topBar=document.querySelector("#mega-menu-header-buttons-2020"),this.footer=document.querySelector("#footer-nav-menu")}expand(t){t.children[0].focus(),document.body.dataset.hasSubmenuOpen="true"}collapse(t){t.children[0].blur(),document.body.dataset.hasSubmenuOpen="false"}initMouseToggle(){hoverintent(this.menu,()=>this.menu.classList.add("no-outline"),()=>this.menu.classList.remove("no-outline")).options({timeout:10,interval:100}),Array.from(this.menu.children).filter(o=>o.nodeName==="LI").forEach(o=>{hoverintent(o,()=>this.expand(o),()=>this.collapse(o)).options({timeout:10,interval:100})})}initDesktop(){this.menu&&this.initMouseToggle()}toggleAriaAttribute(t,o){let i=t.getAttribute(o)!=="true"?"true":"false";t.setAttribute(o,i)}onToggleMenuClick(t){this.toggleAriaAttribute(t,"aria-selected"),this.toggleAriaAttribute(this.container,"aria-expanded")}makeTextWidgetCollapsible(t,o){o&&(o.ariaHasPopup="true",o.ariaExpanded="false",o.insertAdjacentHTML("beforeend",'<span class="mega-indicator"></span>'),o.addEventListener("click",()=>{this.toggleAriaAttribute(o,"aria-expanded")}))}makeSubmenuContentCollapsible(){l(".mega-sub-menu .textwidget",this.menu).forEach(o=>{let i=o.previousElementSibling;this.makeTextWidgetCollapsible(o,i)})}makeSubmenusCollapsible(){l(".mega-menu-link + .mega-sub-menu",this.container).forEach(t=>{let o=t.previousElementSibling;o.addEventListener("click",i=>{window.innerWidth<=900&&i.preventDefault(),this.toggleAriaAttribute(o,"aria-expanded")})})}initMobileAccountButtons(){!this.menu||!this.topBar||(this.menu.lastElementChild.classList.add("last-desktop-item"),l(".mega-header-login, .mega-header-logout",this.topBar).forEach(t=>{let o=t.cloneNode(!0);this.menu.insertAdjacentElement("beforeend",o)}))}initMobile(){!this.menu||!this.topBar||(this.topBar.querySelector(".mega-toggle-menu a").addEventListener("click",t=>{t.preventDefault();let o=t.target;this.onToggleMenuClick(o)}),this.makeSubmenusCollapsible(),this.makeSubmenuContentCollapsible())}isEdgeItem(t){let o=t.previousElementSibling,i=!o||o.offsetTop!==t.offsetTop;return i&&console.log("Navigation.isEdgeItem","yes",t.textContent,t.offsetTop,o?o.offsetTop:0),i}removeEdgeItemSeparators(t){l("li",t).forEach((i,r)=>{setTimeout(()=>{i.classList.toggle("has-sep",!this.isEdgeItem(i))},(r+1)*100)})}initFooter(){this.footer&&window.addEventListener("load",()=>{this.removeEdgeItemSeparators(this.footer)})}};var kt=class{constructor(t){this.button=t}init(){this.button&&(this.initReveal(),this.initClick())}initReveal(){this.scrollUpBottom=0,this.scrollHeight=window.innerHeight,this.scrolledFromClick=!1,window.addEventListener("scroll",Pt(()=>this.onScroll(),100))}onScroll(){let t=window.scrollY;t>this.scrollY?this.onScrollDown(t):this.onScrollUp(t),this.scrollY=t}onScrollDown(){this.button.classList.remove("visible"),this.scrollUpBottom=0,this.scrolledFromClick=!1}onScrollUp(t){if(!this.scrolledFromClick){if(this.scrollUpBottom===0)return this.scrollUpBottom=t,this.button.classList.remove("visible");if(t<this.scrollHeight||this.scrollUpBottom-t<100)return this.button.classList.remove("visible");this.button.classList.add("visible")}}initClick(){this.button.addEventListener("click",()=>{this.button.classList.remove("visible"),this.scrolledFromClick=!0,window.scrollTo({top:0,left:0,behavior:"smooth"})})}};function Mi(){let e=i=>i.classList.toggle("visible"),t=document.querySelector(".mega-header-search"),o=document.querySelector(".mega-toggle-search");!o||!t||o.addEventListener("click",i=>{i.preventDefault(),e(t)}
11)}function Bi(e){e.addEventListener("awesomplete-select",t=>{t.origin.classList.add("selected"),document.body.classList.add("redirecting")})}function $i(){return l(".search-form, .mega-search").map(e=>e.querySelector('input[name="s"]')).filter(e=>!!e)}function Ye(){$i().forEach(e=>{e.setAttribute("value",window.FOOL_FREESITE.searchTerm),e.value=window.FOOL_FREESITE.searchTerm,Bi(e)}),Mi()}var Rt=class{constructor(t){this.isEnabledMediaQuery=t,this.keys={end:35,home:36,left:37,up:38,right:39,down:40,delete:46},this.direction={37:-1,38:-1,39:1,40:1}}init(){if(F(v.FOOL_FREESITE.hasQuoteMediaApi))return;let t=document.querySelectorAll('[role="tablist"]');if(t.length===0)return;this.tablist=t[0],this.delay=this.determineDelay(),this.generateArrays();let o;for(o=0;o<this.tabs.length;++o)this.addListeners(o);let i=this.getTabFromURL();this.initStatusMediaQuery(),this.activateTheTab(i??this.tabs[0]),i&&this.focusActiveTab(i),this.popped=!1,window.onpopstate=function(){let r=this.getTabFromURL();r&&(this.popped=!0,this.activateTheTab(r,!0))}.bind(this)}initStatusMediaQuery(){if(!this.isEnabledMediaQuery||!Lt())return;let t=window.matchMedia(this.isEnabledMediaQuery);t.addEventListener("change",o=>{o.matches?this.enableAccordion():this.disableAccordion()}),t.matches?this.enableAccordion():this.disableAccordion()}determineDelay(){let t=this.tablist.hasAttribute("data-delay"),o=0;if(t){let i=this.tablist.getAttribute("data-delay");i?o=i:o=300}return o}generateArrays(){this.tabs=document.querySelectorAll('[role="tab"]'),this.panels=document.querySelectorAll('[role="tabpanel"]')}addListeners(t){this.tabs[t].addEventListener("click",o=>{this.clickEventListener(o)}),this.tabs[t].addEventListener("keydown",o=>{this.keydownEventListener(o)}),this.tabs[t].addEventListener("keyup",o=>{this.keyupEventListener(o)}),this.tabs[t].index=t}getTabFromURL(){if(!location.hash)return null;let t=location.hash,o=document.querySelector(t),i=Array.from(this.tabs).find(r=>r===o);return t&&i?o:null}clickEventListener(t){t.preventDefault();let o=t.target;this.popped=!1,this.activateTheTab(o),this.focusActiveTab(o)}keydownEventListener(t){switch(t.keyCode){case this.keys.end:t.preventDefault(),this.activateTheTab(this.tabs[this.tabs.length-1]);break;case this.keys.home:t.preventDefault(),this.activateTheTab(this.tabs[0]);break;case this.keys.up:case this.keys.down:this.determineOrientation(t);break}}keyupEventListener(t){switch(t.keyCode){case this.keys.left:case this.keys.right:this.determineOrientation(t);break;case this.keys.delete:this.determineDeletable(t);break}}activateTheTab(t){let o=this.tablist.querySelector('[aria-expanded="true"]')??t;this.deactivateTabs(),t.removeAttribute("tabindex"),t.setAttribute("aria-selected","true");let i=t.getAttribute("aria-controls");if(this.tablist.classList.contains("is-accordion")){let r=document.getElementById(i);r.classList.add("moved"),this.tablist.insertBefore(r,t.nextSibling)}this.tablist.classList.contains("is-accordion")&&t.id===o.id?t.getAttribute("aria-expanded")==="true"?(document.getElementById(i).setAttribute("hidden","hidden"),t.setAttribute("aria-selected","false"),t.setAttribute("aria-expanded","false")):(document.getElementById(i).removeAttribute("hidden"),t.setAttribute("aria-expanded","true")):(document.getElementById(i).removeAttribute("hidden"),t.setAttribute("aria-expanded","true"),o.setAttribute("aria-expanded","false")),window.dispatchEvent(new Event("resize"))}focusActiveTab(t){this.tablist.classList.contains("is-accordion")&&t.scrollIntoView({behavior:"smooth",block:"start",inline:"center"}),t.focus(),this.popped||(history.pushState?history.pushState(null,null,"#"+t.id):window.location.hash=t.id)}deactivateTabs(){let t;for(t=0;t<this.tabs.length;t++)this.tabs[t].setAttribute("tabindex","-1"),this.tabs[t].setAttribute("aria-selected","false"),this.tabs[t].removeEventListener("focus",this.focusEventHandler);let o;for(o=0;o<this.panels.length;o++)this.panels[o].setAttribute("hidden","hidden")}determineOrientation(t){let o=t.keyCode,i=this.tablist.getAttribute("aria-orientation")==="vertical",r=!1;
11i?(o===this.keys.up||o===this.keys.down)&&(t.preventDefault(),r=!0):(o===this.keys.left||o===this.keys.right)&&(r=!0),r&&this.switchTabOnArrowPress(t)}switchTabOnArrowPress(t){let o=t.keyCode,i;for(i=0;i<this.tabs.length;i++)this.tabs[i].addEventListener("focus",this.focusEventHandler);if(this.direction[o]){let r=t.target;r.index!==void 0&&(this.tabs[r.index+this.direction[o]]?this.tabs[r.index+this.direction[o]].focus():o===this.keys.left||o===this.keys.up?this.focusLastTab():(o===this.keys.right||o===this.keys.down)&&this.focusFirstTab())}}focusEventHandler(t){let o=t.target;setTimeout(this.checkTabFocus,this.delay,o)}focusFirstTab(){this.tabs[0].focus()}focusLastTab(){this.tabs[this.tabs.length-1].focus()}checkTabFocus(t){let o=document.activeElement;t===o&&this.activateTheTab(t)}determineDeletable(t){let o=t.target;o.getAttribute("data-deletable")!==null&&(this.deleteTab(t,o),this.generateArrays(),o.index-1<0?this.activateTheTab(this.tabs[0]):this.activateTheTab(this.tabs[o.index-1]))}deleteTab(t){let o=t.target,i=document.getElementById(o.getAttribute("aria-controls"));o.parentElement.removeChild(o),i.parentElement.removeChild(i)}enableAccordion(){this.tablist.classList.add("is-accordion"),this.tabs.forEac
11h(function(t){t.setAttribute("aria-expanded","false")})}disableAccordion(){let t=document.querySelectorAll(".is-accordion .moved"),o;for(o=0;o<t.length;++o)t[o].classList.remove("moved"),this.tablist.parentNode.appendChild(t[o]);this.tabs.forEach(function(i){i.removeAttribute("aria-expanded")}),this.tablist.classList.remove("is-accordion")}};It(window,"process.env.NODE_ENV","production");It(window,"process.NODE_ENV","production");Object.defineProperty(HTMLElement.prototype,"$$",{value:function(e){return l(e,this)}});document.addEventListener("DOMContentLoaded",()=>{let e=r=>document.body.classList.contains(r);l(".toggler").forEach(r=>Ut(r)),Qt(),zt();let t=new Ct;e("no-megamenu")&&(t.initDesktop(),t.initMobile(),t.initFooter()),l(".js-badger-accordion").forEach(r=>new Tt(r).init()),e("home")&&l("#home-services-tabs").forEach(r=>new At(r).init()),(e("single-post")||e("page"))&&l("#primary .author-and-post-info").forEach(r=>{r.querySelectorAll(".abh_box").forEach(n=>new St(n).init())}),l(".posts-pagination").forEach(r=>new Ot(r).init()),l("#secondary > .article-sidebar-widget").slice(0,1).forEach(r=>{try{new Q(r.querySelector("h3"),r.querySelector(".textwidget"),"(max-width: 842px)").init()}catch(n){console.log("Could not create accordion"),console.log(n.message)}}),setTimeout(()=>{if(e("no-megamenu")){let r=document.querySelector(".site-header");r&&r.childElementCount>0&&t.initMobileAccountButtons()}new kt(document.querySelector("#scroll-up-btn")).init(),ze(),Ge(),Ye(),Qe(),Gt(),new Rt("(max-width: 767px)").init()},1e3);let o=r=>`${v.FOOL_FREESITE.parentThemeUrl}/assets/dist/${r}.js?ver=${v.FOOL_FREESITE.assetsVersions[r]}`,i=r=>Vt(o(r));window.initFinancial=jt,F(v.FOOL_FREESITE.hasQuoteApi)?i("quoteapi"):jt(),"FoolCriteo"in window&&window.FoolCriteo.pushToGTM(),Ve(),l(".gpt-advert").forEach(r=>T(r,".widget").classList.add("googletag"in window?"advert-widget":"screen-reader-text")),document.querySelector(".wistia_responsive_wrapper")||l(".single-sfrecap .entry-content [style]").filter(r=>r.getAttribute("class")&&r.getAttribute("class").indexOf("wistia")===-1).filter(r=>r.style.display!=="none").forEach(r=>r.removeAttribute("style")),F(v.FOOL_FREESITE.isEmptyShell)&&document.body.classList.add("fouc-ready"),Xe(),l(".row > .column, .row > .columns").map(r=>r.parentElement).filter(r=>r.children.length>1).filter(r=>Array.from(r.children).every(n=>n.classList.contains("columns")||n.classList.contains("column"))).forEach(r=>r.classList.add("grid-x")),l(".mega-header-login a").forEach(r=>r.href=`/wp-login.php?redirect_to=${encodeURIComponent(location.pathname)}`)});})();
12/*! Bundled license information:
13
14lodash-es/lodash.js:
15  (**
16   * @license
17   * Lodash (Custom Build) <https://lodash.com/>
18   * Build: `lodash modularize exports="es" --repo lodash/lodash#4.18.1 -o ./`
19   * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
20   * Released under MIT license <https://lodash.com/license>
21   * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
22   * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
23   *)
24*/
25//# sourceMappingURL=scripts.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.