PageSourceSearch

https://www.authy.com/etc.clientlibs/twilio-com/clientlibs/clientl…/resources/843.1bceaf7ed9ad65c486a2.js

js authy.com collected 2026-10-01 08:32:32 UTC 9,227 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunktwilio_com_frontend=self.webpackChunktwilio_com_frontend||[]).push([[843],{4843:function(e,t,s){s.d(t,{j:function(){return h}});var o=s(7519),n=s(4207);class r{element;component;submitButton;resetButton;filtersMobileButton;filterCategoryButtons;categoryDropdowns;filtersFacets;categoryTagContainer;selectors;constructor(e,t,s){this.element=t,this.selectors=e,this.component=s??document.body,this.submitButton=this.component.querySelector(e.FILTERS_FORM_SUBMIT_BUTTON),this.resetButton=this.component.querySelector(e.FILTERS_FORM_RESET_BUTTON),this.categoryTagContainer=this.component.querySelector(e.FILTERS_CATEGORY_TAGS),this.filtersMobileButton=this.component.querySelector(e.FILTERS_BUTTON),this.filtersFacets=this.component.querySelectorAll(e.FILTERS_FACETS),this.filterCategoryButtons=this.component.querySelectorAll(e.FILTERS_CATEGORY_BUTTON),this.categoryDropdowns=this.component.querySelectorAll(e.FILTERS_CATEGORY_DROPDOWN),this.initializeListeners()}initializeListeners(){this.toggleCategoryListVisibility(this.filterCategoryButtons,this.categoryDropdowns),this.filterCategoryButtons?.forEach(e=>e.addEventListener("click",this.filterMobileCategoryDisplayToggle.bind(this)));const e="twilio-checkbox-label__focused";this.element?.addEventListener("change",e=>{if(this.updateSelectionCount(),this.hideFilterTags(),!this.resetButton)return;var t;"INPUT"===(t=e.target).nodeName&&"checkbox"===t.getAttribute("type")?.toLowerCase()&&this.toggleButtonsAvailability()}),this.filtersMobileButton?.addEventListener("click",e=>{e.preventDefault(),this.mobileToggleElements()}),this.component.querySelector(this.selectors.FILTERS_CLOSE)?.addEventListener("click",e=>{e.preventDefault(),this.mobileToggleElements()}),this.element?.querySelectorAll("input[type='checkbox']").forEach(t=>t.addEventListener("focus",t=>{const s=t.target;s.parentElement?.querySelector("input:focus-visible")&&s.parentElement?.classList.add(e)})),this.element?.querySelectorAll("input[type='checkbox']").forEach(t=>t.addEventListener("blur",t=>{const s=t.target;s.parentElement?.classList.remove(e)})),this.submitButton?.addEventListener("click",e=>{e.preventDefault(),this.mobileToggleElements()}),this.onReset(()=>{this.resetButton&&(this.resetButton.disabled=!0),this.element?.querySelector("label:first-child")?.focus();const e=this.element?.querySelectorAll('input[type="checkbox"]');e?.forEach(e=>{e.checked=!1}),this.updateSelectionCount(),this.hideFilterTags(),this.resetTags(),this.element?.requestSubmit()}),this.checkboxSubmit()}toggleButtonsAvailability(){const e=!this.element?.querySelectorAll('input[type="checkbox"]:checked').length;this.resetButton&&(this.resetButton.disabled=e)}updateSelectionCount(){this.filtersFacets?.forEach(e=>{const t=e.querySelector(this.selectors.FILTERS_CATEGORY_DROPDOWN),s=this.countSelectedCheckboxes(t),o=e.querySelector(this.selectors.FILTER_BUTTON_COUNT_SPAN);o&&(o.textContent=s<=0?"":`(${s.toString()})`)})}resetTags(){this.categoryTagContainer?.querySelectorAll("span").forEach(e=>e.remove())}hideFilterTags(){this.categoryTagContainer?.classList.add(this.selectors.SELECTED_FILTERS_HIDDEN),this.filtersFacets?.forEach(e=>{const t=e.querySelector(this.selectors.FILTERS_CATEGORY_DROPDOWN);this.countSelectedCheckboxes(t)>0&&this.categoryTagContainer?.classList.remove(this.selectors.SELECTED_FILTERS_HIDDEN)})}addTag(e){const t=e.value.split(":").pop();if(this.categoryTagContainer?.classList.remove(this.selectors.SELECTED_FILTERS_HIDDEN),e.checked&&t){const s=document.createElement("span");s.className=this.selectors.FILTERS_TAG,s.id=t;const o=e&&e.labels?.length&&e.labels[0]?.textContent||t;s.innerHTML=o.trim();const n=document.createElement("button");n.className=this.selectors.FILTERS_TAG_CLOSE,n.innerHTML="x",n.onclick=()=>{this.removeTag(t)},s.appendChild(n),this.categoryTagContainer?.insertAdjacentElement("afterbegin",s)}else this.removeTag(t)}onSubmit(e){this.element?.addEventListener("submit",e)}onReset(e){this.element?.addEventListener("reset",e)}reset(){this.element?.reset()}getCheckedCategories(){return new FormData(this.element).getAll("categories")}checkboxSubmit(){this.element?.querySelectorAll("input[type='checkbox']").forEach(e
1=>e.addEventListener("change",()=>{this.toggleButtonsAvailability(),this.addTag(e),this.element?.requestSubmit()}))}filterMobileCategoryDisplayToggle(e){const t=e.currentTarget.parentElement;t?.classList.contains(this.selectors.EXPANDED_FILTER)?t?.classList.remove(this.selectors.EXPANDED_FILTER):t?.classList?.add(this.selectors.EXPANDED_FILTER)}countSelectedCheckboxes(e){if(e){const t=e?.querySelectorAll('input[type="checkbox"]');return Array.from(t).filter(e=>e.checked).length}return 0}toggleCategoryListVisibility(e,t){const s=()=>{t?.forEach(e=>e.classList.add(this.selectors.CATEGORY_LIST_HIDDEN)),e?.forEach(e=>{e.querySelector("span:last-child")?.classList.remove("arrow-up"),e?.classList.remove("expanded")})};e?.forEach((e,o)=>{e.addEventListener("click",n=>{if(n.preventDefault(),t){const n=t[o],r=!n?.classList.contains(this.selectors.CATEGORY_LIST_HIDDEN);s(),r||(n?.classList.remove(this.selectors.CATEGORY_LIST_HIDDEN),this.toggleButtonArrow(e))}})}),document.addEventListener("keydown",e=>{"Escape"===e.code&&t?.forEach(e=>{e.classList.add(this.selectors.CATEGORY_LIST_HIDDEN)})}),document.addEventListener("click",s=>{const o=s.target;o&&!this.component.contains(o)&&(t?.forEach(e=>{e.classList.add(this.selectors.CATEGORY_LIST_HIDDEN)}),e?.forEach(e=>{e.querySelector("span:last-child")?.classList.remove("arrow-up"),e?.classList.remove("expanded")}))})}toggleButtonArrow(e){e.querySelector("span:last-child")?.classList.toggle("arrow-up"),e?.classList.toggle("expanded")}removeTag(e=""){if(e){const t=this.categoryTagContainer?.querySelector(`#${CSS.escape(e)}`);t?.remove();const s=this.element?.querySelectorAll('input[type="checkbox"]');s?.forEach(t=>{t.value.endsWith(e)&&(t.checked=!1,this.element?.requestSubmit())}),this.updateSelectionCount(),this.hideFilterTags()}}mobileToggleElements(){document.body.classList.toggle(this.selectors.BODY_MOBILE_OVERFLOW_HIDDEN);const e=this.component.closest("main"),t=e?.querySelector("header")??document.querySelector("header");t?.classList.toggle(this.selectors.HIDE_HEADER),this.element?.classList.toggle(this.selectors.FILTERS_OPEN)}}var i=s(1093);function c(e){return e&&""!==e.trim()&&document.querySelectorAll("[data-cmp-hash]").length>1?e:null}function l(e,t){return e&&""!==e.trim()?`cmp_${e}_${t}`:t}var a=s(2349);function h(e,t,s,o){const h=new n.d(e,t.MAIN);if(h.addPageChangeListener(()=>(0,a.m)({component:e,pagination:h,selectors:t,cmpSelector:!1,servletProps:s,paginationCallback:o})),h.refresh(),!(0,i.t1)(t))return;const d=e.querySelector(t.CLEAR_ALL_BUTTON),g=e.querySelector(t.FILTERS_FORM);if(!g||!d)return;const E=new r(t,g,e),m=function(e,t,s,o){const n=new URLSearchParams(window.location.search),r=c(o.getAttribute("data-cmp-hash")),i=t=>{t.checked||(t.checked=!0,e.addTag(t))};e.element?.querySelectorAll("input[data-check-on-load]").forEach(i);const a=e.element?.querySelectorAll(t.FILTERS_CATEGORY_BUTTON)??[],h=Array.from(a).map(e=>{const t=e.dataset.tagId??"";return t.endsWith(":")?{parentTag:t.slice(0,-1),separator:":"}:{parentTag:t,separator:"/"}}).filter(e=>Boolean(e.parentTag));h.flatMap(({parentTag:e,separator:t})=>{const s=r?l(r,e):null,o=s&&n.get(s)||n.get(e??"");return o?.split(",").map(s=>`${e}${t}${decodeURIComponent(s)}`)}).filter(Boolean).forEach(t=>{const s=e?.element?.querySelector(`input[type="checkbox"][value="${t}"]`);s&&i(s)}),u(e,h,t,o),e.toggleButtonsAvailability(),e.updateSelectionCount();const d=e.getCheckedCategories()??[];return s.disabled=!d.length,h}(E,t,d,e);E.onSubmit(s=>function(e,t){const{event:s,filtersForm:o,parentTagFilters:n,component:r,pagination:i,clearAllButton:c}=e;s.preventDefault(),u(o,n,t,r),(0,a.C)(r,t),function(e,t){const s=e.querySelector(t.GRID_VIEW);if(s){const e=document.createElement("div");e.setAttribute("class","spinner-dual-ring"),s.appendChild(e)}}(r,t),i.setCurrentPage(1);const l=o.getCheckedCategories()??[];c&&(c.disabled=0===l?.length)}({event:s,component:e,pagination:h,filtersForm:E,parentTagFilters:m,clearAllButton:d},t)),d.addEventListener("click",()=>{!function(e,t,s,o,n,r){n.disabled=!0,s.reset(),u(s,o,r,e),function(e,t,s){(0,a.C)(e,s),t.setCurrentPage(1)}(e,t,r)}(e,h,E,m,d,t),E.updateSelectionCount(),E.resetTags()})}function u(e,t,s,n){const r=e.getCheckedCategories()??[],i=e.element?.querySelector(s.FILTERS_FORM_SUBMIT_BUTTON);if(i){const e=r.length>0?i.getAttribute("data-default-value")??"":i.getAttribute("data-close-value")??"";i.innerText=o.A.sanitize(e)}!function(e,t,s){const o=new URLSearchParams(window.location.search),n=function(e){return e.reduce((e,t)=>
1{const[s,o]=t.toString().split(/[/:](?=[^/:]*$)/,2);if(!s||!o)return e;const n=e.get(s)||[];return n.push(o),e.set(s,n),e},new Map)}(e),r=c(s.getAttribute("data-cmp-hash"));t.forEach(({parentTag:e})=>{if(r){const t=l(r,e);o.delete(t)}else o.delete(e)}),n.forEach((e,t)=>{const s=e.map(e=>encodeURIComponent(e)),n=r?l(r,t):t;o.append(n,s.join(","))});const i=o.size>0?`?${String(o)}`:"";history.replaceState(null,"",window.location.pathname+i)}(r,t,n)}}}]);

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.