var __spreadArrays=this&&this.__spreadArrays||function(){for(var e=0,r=0,t=arguments.length;r<t;r++)e+=arguments[r].length;for(var i=Array(e),o=0,r=0;r<t;r++)for(var s=arguments[r],a=0,n=s.length;a<n;a++,o++)i[o]=s[a];return i};System.register(["./p-ab920fae.system.js","./p-af2581c2.system.js","./p-4f84447e.system.js"],(function(e){"use strict";var r,t,i,o;return{setters:[function(e){r=e.r;t=e.h},function(e){i=e.a},function(e){o=e.s}],execute:function(){var s=".sc-resource-toc-h{display:block;position:-webkit-sticky;position:sticky;top:96px}@media (max-width: 768px){.sc-resource-toc-h{display:none}}nav.sc-resource-toc{margin:0;padding:0}ul.sc-resource-toc{font-size:14px;list-style:none;line-height:1.4em;padding-bottom:16px}li.sc-resource-toc{color:var(--c-carbon-80);-webkit-margin-before:var(--space-1);margin-block-start:var(--space-1);-webkit-margin-after:var(--space-1);margin-block-end:var(--space-1);cursor:pointer;list-style:none;color:var(--c-carbon-80);display:block;-webkit-transition:0.2s color, 0.2s -webkit-transform ease;transition:0.2s color, 0.2s -webkit-transform ease;transition:0.2s transform ease, 0.2s color;transition:0.2s transform ease, 0.2s color, 0.2s -webkit-transform ease}li.active.sc-resource-toc{-webkit-transform:translateX(8px);transform:translateX(8px);color:#597EFF}.title.sc-resource-toc{color:var(--c-indigo-60)}.cta-button.sc-resource-toc{-webkit-margin-before:var(--space-3);margin-block-start:var(--space-3);font-weight:600;border-radius:6px;letter-spacing:0;text-transform:none;padding:12px 19px 10px;font-size:14px;line-height:1em;background:#3880FF;color:#fff}.sharing.sc-resource-toc{margin:0;border-top:2px solid #f3f5f9;padding-top:26px}.sharing.sc-resource-toc li.sc-resource-toc{margin:0;margin-right:6px;display:inline-block}.sharing.sc-resource-toc a.sc-resource-toc{color:#CBD2DD;font-size:20px}.sharing.sc-resource-toc a.sc-resource-toc:hover{color:var(--c-ionic-brand)}.sharing.sc-resource-toc #web-share.sc-resource-toc{display:none}";var a=e("resource_toc",function(){function e(e){r(this,e);this.headings=new Map}e.prototype.componentDidLoad=function(){var e=this;i((function(r){var t=r.entries;t.forEach((function(r){var t=r.target,i=r.intersectionRatio;if(!e.headings.get(t.id))return;var o=e.headings.get(t.id);if(i===0){o.inView=false}else{o.inView=true}}));e.getFirstInView()}));this.titleNames.map((function(r){var t="h-"+o(r);var i=document.getElementById(t);e.headings.set(t,Object.assign(Object.assign({},e.headings.get(t)),{headingEl:i}))}))};e.prototype.getFirstInView=function(){var e=false;for(var r=0,t=this.headings.values();r<t.length;r++){var i=t[r];if(!i.tocEl)continue;if(i.inView&&!e){i.tocEl.classList.add("active");e=true}else{i.tocEl.classList.remove("active")}}if(!e){var o=__spreadArrays(this.headings.values()).reduce((function(e,r,t){var i,o;var s=(i=r.headingEl)===null||i===void 0?void 0:i.offsetTop;var a=(o=e.headingEl)===null||o===void 0?void 0:o.offsetTop;if(t===0||!a)return r;if(Math.abs(window.scrollY-s)<Math.abs(window.scrollY-a)){return r}else{return e}})).tocEl;o===null||o===void 0?void 0:o.classList.add("active")}};e.prototype.handleTocClick=function(e){var r;var t=e.target;if(!((r=t===null||t===void 0?void 0:t.dataset)===null||r===void 0?void 0:r.id))return;var i=this.headings.get(t.dataset.id).headingEl;window.scrollTo({top:i.offsetTop-100,behavior:"smooth"})};e.prototype.render=function(){var e=this;return t("nav",null,t("ul",null,this.titleNames.map((function(r){return t("li",{class:"ui-paragraph-4",onClick:function(r){return e.handleTocClick(r)},"data-id":"h-"+o(r),ref:function(r){var t;var i=(t=r===null||r===void 0?void 0:r.dataset)===null||t===void 0?void 0:t.id;if(!i||!r)return;e.headings.set(i,Object.assign(Object.assign({},e.headings.get(i)),{tocEl:r}))}},r)}))))};return e}());a.style=s}}}));