1"use strict";(self.webpackChunktwilio_com_frontend=self.webpackChunktwilio_com_frontend||[]).push([[339],{470:function(e,t,r){var o;r.d(t,{Q:function(){return o}}),function(e){function t(e){e?.classList.remove("field-error"),e?.removeAttribute("aria-invalid");const t=e?.querySelector(".form-error-message");t&&(t.textContent="",t.classList.remove("visible"))}e.isRecaptchaResponseFilled=function(){return"undefined"!=typeof grecaptcha&&grecaptcha.getResponse().length>0},e.submitFormWithFeedback=function(t,r,o,a,i){i&&(i.disabled=!0),e.sendForm(t,r).then(r=>{r.ok?(o?.classList.add("visible"),t.classList.add("hidden")):400===r.status?e.displayFieldError(t,"There was an error validating the captcha response","captcha"):(a?.classList.add("visible"),t.classList.add("hidden"))}).catch(()=>{a?.classList.add("visible"),t.classList.add("hidden")}).finally(()=>{i&&(i.disabled=!1)})},e.displayFieldError=function(e,t,r){const o=e?.querySelector(`[data-field-name="${r}"]`);o?.classList.add("field-error"),o?.setAttribute("aria-invalid","true");const a=o?.querySelector(".form-error-message");a&&(a.classList.add("visible"),a.textContent=t)},e.clearFieldError=t,e.clearFormErrors=function(e){e?.querySelectorAll(".form-group.field-error")?.forEach(t)},e.sendForm=function(e,t){return fetch(`${e.action}`,{method:"POST",headers:{"Content-Type":"application/json","Csrf-Token":t[":cq_csrf_token"]??""},body:JSON.stringify(t),credentials:"include"})},e.attachFieldErrorClearListeners=function(t){t.querySelectorAll(".form-group [name]").forEach(r=>{const o=t.querySelector(`[data-field-name="${r.name}"]`);"checkbox"===r.getAttribute("type")?r.addEventListener("change",()=>e.clearFieldError(o)):r.addEventListener("input",()=>e.clearFieldError(o))})},e.focusFirstInvalidField=function(e){const t=e.querySelector('[aria-invalid="true"]');"FIELDSET"===t?.nodeName?t.querySelector("input")?.focus():t?.focus()}}(o||(o={}))},9339:function(e,t,r){r.d(t,{registerPrivacyForm:function(){return f}});var o=r(9313),a=r(470);const i="This field is required",c="Please confirm you are not a robot",n="Data Subject Rights Request",l="Privacy Query",s="Law Enforcement Requests",u=(0,o.Yj)().transform(e=>""===e?void 0:e).matches(/^\d+$/,"Must contain only digits").min(4,"Must be at least 4 characters long").max(15,"Must be at most 15 characters long").optional(),d=(0,o.Ik)({fullName:(0,o.Yj)().required(i),email:(0,o.Yj)().owaspEmail().required(i),phoneNumber:u,jurisdictionCountry:(0,o.Yj)().when("typeOfQuery",{is:n,then:e=>e.required(i),otherwise:e=>e.optional()}),user:(0,o.Yj)().required(i),typeOfQuery:(0,o.Yj)().required(i),category:(0,o.YO)().of((0,o.Yj)()).when("typeOfQuery",{is:e=>e===n||e===l,then:e=>e.min(1,i).required(i),otherwise:e=>e.optional()}),subject:(0,o.Yj)().when("typeOfQuery",{is:e=>e===n||e===l,then:e=>e.max(50,"Must be at most 50 characters long").required(i),otherwise:e=>e.optional()}),details:(0,o.Yj)().when("typeOfQuery",{is:e=>e===n||e===l,then:e=>e.required(i),otherwise:e=>e.optional()}),":cq_csrf_token":(0,o.Yj)().optional()}),y={self:"[data-cmp-is='privacy']",form:"form",errorMessageContainer:".cmp-privacy__error",formGroupInputs:".form-group [name]",submitButton:"button[type=submit]",thankYouContainer:".cmp-privacy__thank-you",multiSelectDropdown:".multi-select-dropdown",multiSelectTrigger:".multi-select-trigger",multiSelectOptions:".multi-select-options",multiSelectPlaceholder:".multi-select-placeholder",categorySingleSelect:"select[name='category']",typeOfQuerySelect:"select[name='typeOfQuery']",jurisdictionFieldGroup:"[data-field-name='jurisdictionCountry']",categoryFieldGroup:"[data-field-name='category']",categoryLabelDsr:".cmp-privacy__category-label--dsr",categoryLabelPrivacyQuery:".cmp-privacy__category-label--privacy-query",categoryTooltipDsr:".cmp-privacy__category-tooltip--dsr",categoryTooltipPrivacyQuery:".cmp-privacy__category-tooltip--privacy-query",subjectFieldGroup:"[data-field-name='subject']",detailsFieldGroup:"[data-field-name='details']",dsrInfo:".cmp-privacy__dsr-info",lawEnforcementMessage:".cmp-privacy__law-enforcement-message",captchaGroup:"[data-field-name='captcha']"};function p(e,t){e instanceof HTMLElement&&(e.hidden=t)}function m(){const e=document.querySelector(y.self),t=e?.querySelector(y.form),r=e?.querySelector(y.thankYouContainer),i=e?.querySelector(y.errorMessageContainer),u=t?.querySelector(y.submitButton);if(t&&(function(e){const t=e.querySelector(y.multiSelectTrigger),r=e.querySelector(y.multiSelectOptions),o=e.querySelector(y.multiSelectPlaceholder);t&&r&&o&&(t.addEventListener("click",e=>{e.preventDefault();const o="true"===t.getAttribute("aria-expanded");t.setAttribute("aria-expanded",(!o).toString()),r.hidden=o}),r.querySelectorAll('input[type="checkbox"]').forEach(t=>{t.addEventListener("change",()=>{(()=>{const e=r.querySelectorAll('input[type="checkbox"]:checked');if(0===e.length)o.textContent="Select categories...",o.classList.remove("has-selection");else{const t=Array.from(e).map(e=>e.nextElementSibling?.textContent||"");o.textContent=t.join(", "),o.classList.add("has-selection")}})();const t=e.querySelector('[data-field-name="category"]');a.Q.clearFieldError(t)})}),document.addEventListener("click",e=>{t.contains(e.target)||r.contains(e.target)||(t.setAttribute("aria-expanded","fal
1se"),r.hidden=!0)}))}(t),function(e){const t=e.querySelector(y.typeOfQuerySelect),r=e.querySelector(y.multiSelectDropdown),o=e.querySelector(y.categorySingleSelect),i=e.querySelector(y.multiSelectPlaceholder),c=e.querySelector(y.jurisdictionFieldGroup),u=e.querySelector(y.categoryFieldGroup),d=e.querySelector(y.categoryLabelDsr),m=e.querySelector(y.categoryLabelPrivacyQuery),f=e.querySelector(y.categoryTooltipDsr),h=e.querySelector(y.categoryTooltipPrivacyQuery),g=e.querySelector(y.subjectFieldGroup),S=e.querySelector(y.detailsFieldGroup),b=e.querySelector(y.dsrInfo),v=e.querySelector(y.lawEnforcementMessage),q=e.querySelector(y.submitButton),E=e.querySelector(y.captchaGroup);if(!t)return;const F=()=>{const e=t.value,a=e===l,y=e===n,F=a&&(o?.value??"")===s,L=(y||a)&&!F;p(c,!y),p(b,!y),p(v,!F),p(u,!(y||a)),p(d,a),p(m,!a),p(f,a),p(h,!a),r&&(r.hidden=a,a&&(r.querySelectorAll('input[type="checkbox"]').forEach(e=>{e.checked=!1}),i&&(i.textContent="Select categories...",i.classList.remove("has-selection")))),o&&(o.hidden=!a,o.disabled=!a,a||(o.value="")),p(g,!L),p(S,!L),p(E,!L),q&&(q.disabled=!L)};F(),t.addEventListener("change",()=>{F(),a.Q.clearFieldError(e.querySelector('[data-field-name="category"]'))}),o?.addEventListener("change",()=>{F()})}(t),a.Q.attachFieldErrorClearListeners(t)),e){const t=e.querySelector('input[name="phoneNumber"]');t&&t.removeAttribute("aria-required")}t?.addEventListener("submit",e=>{e.preventDefault(),a.Q.clearFormErrors(t);const n=new FormData(t||void 0),l={};n.forEach((e,t)=>{"category"===t?(l[t]||(l[t]=[]),l[t].push(e)):l[t]=e}),d.validate(l,{abortEarly:!1}).then(e=>{a.Q.isRecaptchaResponseFilled()?(function(e){const t=document.getElementById("phoneNumberCode");t instanceof HTMLInputElement&&e.phoneNumber&&(e.phoneNumber=t.value+" "+e.phoneNumber)}(e),a.Q.submitFormWithFeedback(t,e,r,i,u)):a.Q.displayFieldError(t,c,"captcha")}).catch(e=>{if(e instanceof o.yI)return e.inner.forEach(e=>a.Q.displayFieldError(t,e.message,e.path??"")),void a.Q.focusFirstInvalidField(t);throw e})})}function f(){"loading"!==document.readyState?m():window.addEventListener("load",()=>{m()})}}}]);
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.