@cfpb/ccdb5-ui 2.19.1 → 2.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ccdb5.js +1 -1
- package/package.json +1 -1
package/dist/ccdb5.js
CHANGED
|
@@ -38,4 +38,4 @@ Please change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}
|
|
|
38
38
|
</slot>
|
|
39
39
|
</div>
|
|
40
40
|
</div>
|
|
41
|
-
`}static init(){sd.init(),on("cfpb-tagline",e)}},sp="state_atomic_init";function sm(e,t){return function(e,t){if(!e||!e.classList)throw Error(e+' is not valid. Check that element is a DOM node with class "'+t+'"')}(e,t),function(e,t){let n=e.classList.contains(t)?e:e.querySelector("."+t);if(!n)throw Error(t+" not found on or in passed DOM node.");return n}(e,t)}function sg(e){return!so(e,sp)&&(ss(e,sp),!0)}function sv(e,t,n,r={}){let i=(n||document).querySelectorAll(e),a=[],o,s;for(let e=0,n=i.length;e<n;e++)!1===so(s=i[e],sp)&&((o=new t(s)).init(r),a.push(o));return a}function sy(){let e=getComputedStyle(document.body).fontSize;return parseFloat(e=""===e?-1:e)}var sb="o-expandable";function sx(e){let t=sm(e,sb),n,r,i,a,o;this.init=function(){if(!sg(t))return this;n=t.querySelector(`.${sb}__header`),r=t.querySelector(`.${sb}__content`),i=t.querySelector(`.${sb}__label`);let e=t.classList.contains(`${sb}--onload-open`);ss(t,"behavior_flyout-menu"),ss(n,"behavior_flyout-menu_trigger"),ss(r,"behavior_flyout-menu_content");let s=e?si.CLASSES.MH_DEFAULT:si.CLASSES.MH_ZERO;return a=new si(r).init(s),e||r.classList.add("u-hidden"),(o=new sh(t)).setTransition(a,a.maxHeightZero,a.maxHeightDefault),o.init(e),o.addEventListener("expandbegin",()=>{r.classList.remove("u-hidden"),this.dispatchEvent("expandbegin",{target:this})}),o.addEventListener("collapseend",()=>{r.classList.add("u-hidden")}),this},this.expand=()=>o.expand(),this.collapse=()=>o.collapse(),this.isExpanded=()=>o.isExpanded(),this.refresh=()=>o.getTransition().refresh(),this.getLabelText=function(){return i.textContent.trim()};let s=new st;return this.addEventListener=s.addEventListener,this.removeEventListener=s.removeEventListener,this.dispatchEvent=s.dispatchEvent,this}sx.BASE_CLASS=sb,sx.init=e=>sv(`.${sx.BASE_CLASS}`,sx,e);var sw="o-expandable-group";function s_(e){let t=sm(e,sw),n=t.classList.contains(`${sw}--accordion`),r;function i(e){let t=e.target;r&&r!==t&&r.collapse(),r=t}return this.init=function(e){return sg(t)&&n&&e.forEach(e=>{e.addEventListener("expandbegin",i)}),this},this}s_.BASE_CLASS=sw,s_.init=e=>{(e||document).querySelectorAll(`.${sw}`).forEach(e=>{let t=sv(`.${sx.BASE_CLASS}`,sx,e);new s_(e).init(t)})};var sk="o-summary";function sS(e){let t=sm(e,sk),n=t.classList.contains(`${sk}--mobile`),r=t.querySelector(`.${sk}__content`),i=t.querySelector(`.${sk}__btn`),a,o,s;function l(){window.removeEventListener("load",l),s=!d(),ss(t,"behavior_flyout-menu"),ss(r,"behavior_flyout-menu_content"),ss(i,"behavior_flyout-menu_trigger"),o=new sh(t,!1),(a=new si(r)).init(s?si.CLASSES.MH_SUMMARY:si.CLASSES.MH_DEFAULT),o.setTransition(a,a.maxHeightSummary,a.maxHeightDefault),o.addEventListener("triggerclick",f),o.init(),h(),window.addEventListener("resize",h),"onorientationchange"in window&&window.addEventListener("orientationchange",h),t.addEventListener("focusin",c),r.addEventListener("click",u)}function c(e){s||e.target===i||(i.click(),t.removeEventListener("focusin",c))}function u(e){"A"!==e.target.tagName&&o.isExpanded()&&a.refresh()}function h(){d()?s||=(a.animateOff(),o.expand(),m(),!0):s&&=(o.collapse(),a.animateOn(),i.classList.remove("u-hidden"),!1)}function d(){let e,t;return n&&(e=!1,t=function(e){let t,n={};for(t in e||=window.innerWidth,ot)n[t]=function(e,t){let n=e.min,r=e.max;return sy()>0&&16!==sy()&&(n=n/16*sy(),r=r/16*sy()),(n||0)<=t&&t<=(r||1/0)}(ot[t],e);return n}(),!t.bpXS&&1&&1||(e=!0),!e)||r.scrollHeight<=88}function f(){o.addEventListener("expandend",p)}function p(){m(),window.removeEventListener("resize",h),window.removeEventListener("orientationchange",h),o.removeEventListener("expandend",p),o.suspend(),a.remove()}function m(){i.classList.add("u-hidden")}let g=new st;return this.addEventListener=g.addEventListener,this.removeEventListener=g.removeEventListener,this.dispatchEvent=g.dispatchEvent,this.init=function(){return sg(t)&&window.addEventListener("load",l),this},this}sS.BASE_CLASS=sk,sS.init=e=>sv(`.${sk}`,sS,e);var sM="o-summary-minimal";function sA(e){let t=sm(e,sM),n=t.querySelector(`.${sM}__content`),r=t.querySelector(`.${sM}__btn`),i,a;function o(){window.removeEventListener("load",o),a=new sh(t,!1),(i=new si(n)).init(si.CLASSES.MH_SUMMARY),a.setTransition(i,i.maxHeightSummary,i.maxHeightDefault),a.init(),t.addEventListener("focusin",s),n.addEventListener("click",l),a.collapse(),i.animateOn()}function s(e){e.target!==r&&(r.click(),t.removeEventListener("focusin",s))}function l(e){"A"!==e.target.tagName&&a.isExpanded()&&i.refresh()}let c=new st;return this.addEventListener=c.addEventListener,this.removeEventListener=c.removeEventListener,this.dispatchEvent=c.dispatchEvent,this.init=function(){return sg(t)&&(ss(t,"behavior_flyout-menu"),ss(n,"behavior_flyout-menu_content"),ss(r,"behavior_flyout-menu_trigger"),window.addEventListener("load",o)),this},this}function sT(e,t,n){let r=n?.maxSelections||5,i=[],a=[],o=[],s=[],l=-1;function c(){return a.length>=r}return this.init=function(){return i=function(e){let n,r=[],i;for(let o=0,s=e.length;o<s;o++)n=e[o],i=!c()&&n.defaultSelected,r.push({id:t+"-"+n.value.trim().replace(/\s+/g,"-").toLowerCase(),value:n.value,text:n.text,checked:i}),i&&a.push(o);return r}(e),this},this.toggleOption=function(e){return i[e].checked=!i[e].checked,a.length<r&&i[e].checked?(a.push(e),a.sort(),!0):(i[e].checked=!1,a=a.filter(function(t){return t!==e}),!1)},this.getSelectedIndices=function(){return a},this.isAtMaxSelections=c,this.filterIndices=function(e){return"[object String]"!==Object.prototype.toString.call(e)&&(e=""),s=o,i.length>0&&(o=i.reduce(function(t,n,r){var i,a;return i=e,a=n.text,RegExp(i.trim().replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&"),"i").test(a)&&t.push(r),t},[])),l=-1,o},this.clearFilter=function(){o=s=[]},this.getFilterIndices=function(){return o},this.getLastFilterIndices=function(){return s},this.getIndex=function(){return l},this.setIndex=function(e){let t=o.length,n=0===t?i.length:t;l=e<0?-1:e>=n?n-1:e},this.resetIndex=function(){return l=-1},this.getOption=function(e){return i[e]},this}function sC(e,t,n){let r=document.createElement(e);return Object.keys(n).forEach(e=>{let t=n[e];e in r?r[e]=t:r.setAttribute(e,t)}),t&&t.appendChild(r),r}sA.BASE_CLASS=sM,sA.init=e=>sv(`.${sM}`,sA,e);var sP="o-multiselect",sE="prev",sO="next",sN="Enter",sj="Escape",sL="ArrowDown",sD={renderTags:!0,maxSelections:5};function sR(e){e.classList.add(sP);let t=sm(e,sP),n=!1,r,i,a,o,s,l,c,u,h,d,f,p=[],m;function g(){f.classList.remove("u-filtered","u-no-results");for(let e=0,t=f.children.length;e<t;e++)f.children[e].classList.remove("u-filter-match");a.clearFilter()}function v(){return l.classList.add("u-active"),d.classList.remove("u-invisible"),d.setAttribute("aria-hidden",!1),m.dispatchEvent("expandbegin",{target:m}),m}function y(){return l.classList.remove("u-active"),d.classList.add("u-invisible"),d.setAttribute("aria-hidden",!0),a.resetIndex(),m.dispatchEvent("collapsebegin",{target:m}),m}function b(e){e===sO?a.setIndex(a.getIndex()+1):e===sE&&a.setIndex(a.getIndex()-1);let t=a.getIndex();if(t>-1){let e=t,r=a.getFilterIndices();r.length>0&&(e=r[t]);let i=a.getOption(e).value,o=f.querySelector('[data-option="'+i+'"]').querySelector("input");n=!0,o.focus()}else n=!1,h.focus()}function x(){h.value="",g()}function w(e){let t=e.target;"BUTTON"===t.tagName&&(e.preventDefault(),t.removeEventListener("click",w),t.querySelector("label").click())}function _(e){if(" "===e.key||e.key===sN){let t=e.target.querySelector("label");f.querySelector("#"+t.getAttribute("for")).click()}}function k(e){return r+"-"+e.value.trim().replace(/[^\w]/g,"-").toLowerCase()}function S(e,t){let n=k(t),r=sC("li",null,{"data-option":t.value}),i=sC("button",r,{type:"button",class:"a-tag-filter",innerHTML:"<label for="+n+">"+t.text+'<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" class="cf-icon-svg cf-icon-svg--error" viewBox="0 0 12 19"><path d="M11.383 13.644A1.03 1.03 0 0 1 9.928 15.1L6 11.172 2.072 15.1a1.03 1.03 0 1 1-1.455-1.456l3.928-3.928L.617 5.79a1.03 1.03 0 1 1 1.455-1.456L6 8.261l3.928-3.928a1.03 1.03 0 0 1 1.455 1.456L7.455 9.716z"/></svg></label>'});e.appendChild(r),i.addEventListener("click",w),i.addEventListener("keydown",_)}function M(e){let t=a.getOption(e)||a.getOption(a.getIndex());if(t){if(t.checked){f.classList.contains("u-max-selections")&&f.classList.remove("u-max-selections");let e='[data-option="'+t.value+'"]',n=c.querySelector(e);void 0!==n&&n&&c?.removeChild(n)}else s?.renderTags&&c&&S(c,t);a.toggleOption(e),a.isAtMaxSelections()&&f.classList.add("u-max-selections"),m.dispatchEvent("selectionsupdated",{target:m})}a.resetIndex(),n=!1,"false"===d.getAttribute("aria-hidden")&&h.focus()}function A(e){M(Number(e.target.getAttribute("data-index"))),x()}this.init=function(e=sD){if(!sg(t)||new RegExp(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i).test(navigator.userAgent))return this;if(m=this,r=t.name||t.id,i=t.getAttribute("data-placeholder"),o=t.options||[],s={...sD,...e},o.length>0){a=new sT(o,r,s).init();let e=function(){let e,n,m;(l=document.createElement("div")).className=sP,c=sC("ul",null,{className:"m-tag-group"}),u=sC("header",l,{className:"o-multiselect__header"}),h=sC("input",u,{className:"o-multiselect__search a-text-input",type:"text",placeholder:i||"Select up to five",id:t.id,autocomplete:"off"}),d=sC("fieldset",l,{className:"o-multiselect__fieldset u-invisible","aria-hidden":"true"});let g="o-multiselect__options";a.isAtMaxSelections()&&(g+=" u-max-selections"),f=sC("ul",d,{className:g});for(let t=0,i=o.length;t<i;t++){n=k(e=o[t]),m=a.getOption(t).checked;let i=sC("li",f,{"data-option":e.value,"data-cy":"multiselect-option",class:"m-form-field m-form-field--checkbox"});sC("input",i,{id:n,type:"checkbox",value:e.value,name:r,class:"a-checkbox o-multiselect__checkbox",checked:m,"data-index":t}),sC("label",i,{for:n,textContent:e.text,className:"o-multiselect__label a-label"}),p.push(i),m&&s?.renderTags&&S(c,e)}return l.insertBefore(c,u),t.parentNode.insertBefore(l,t),l.appendChild(t),l}();t.parentNode.removeChild(t),sg(t=e),function(){u.addEventListener("mousemove",function(e){let t=e.target;e.offsetX>t.offsetWidth-35?t.style.cursor="pointer":t.style.cursor="auto"}),u.addEventListener("mouseup",function(e){let t=e.target;e.offsetX>t.offsetWidth-35&&140===d.offsetHeight&&h.blur()}),h.addEventListener("input",function(){var e=this.value;g(),a.resetIndex(),a.filterIndices(e).length>0?function(){f.classList.remove("u-no-results"),f.classList.add("u-filtered");let e=a.getLastFilterIndices();for(let t=0,n=e.length;t<n;t++)p[e[t]].classList.remove("u-filter-match");e=a.getFilterIndices();for(let t=0,n=e.length;t<n;t++)p[e[t]].classList.add("u-filter-match")}():(f.classList.add("u-no-results"),f.classList.remove("u-filtered"))}),h.addEventListener("focus",function(){"true"===d.getAttribute("aria-hidden")&&v()}),h.addEventListener("blur",function(){n||"false"!==d.getAttribute("aria-hidden")||y()}),h.addEventListener("keydown",function(e){let t=e.key;"true"===d.getAttribute("aria-hidden")&&"Tab"!==t&&v(),t===sN?(e.preventDefault(),b(sO)):t===sj?(x(),y()):t===sL?b(sO):"Tab"!==t||e.shiftKey||"false"!==d.getAttribute("aria-hidden")||y()}),f.addEventListener("mousedown",function(){n=!0}),f.addEventListener("keydown",function(e){let t=e.key,n=e.target,r=n.checked;if(t===sN){e.preventDefault(),n.checked=!r;let t=new Event("change",{bubbles:!1,cancelable:!0});n.dispatchEvent(t)}else t===sj?(h.focus(),y()):"ArrowUp"===t?b(sE):t===sL&&b(sO)}),d.addEventListener("mousedown",function(e){"LABEL"===e.target.tagName&&(n=!0)});let e=f.querySelectorAll("input");for(let t=0,n=e.length;t<n;t++)e[t].addEventListener("change",A);let t=c.querySelectorAll("button");for(let e=0,n=t.length;e<n;e++)t[e].addEventListener("click",w),t[e].addEventListener("keydown",_)}()}return this},this.expand=v,this.collapse=y;let T=new st;return this.addEventListener=T.addEventListener,this.removeEventListener=T.removeEventListener,this.dispatchEvent=T.dispatchEvent,this.getModel=function(){return a},this.updateSelections=M,this.selectionClickHandler=w,this.selectionKeyDownHandler=_,this}sR.BASE_CLASS=sP,sR.init=e=>sv(`.${sP}`,sR,void 0,e),sf.init();var sI=["a-btn"],sz={primary:[],secondary:["a-btn--secondary"],warning:["a-btn--warning"]},sB={default:[],full:["a-btn--full-on-xs"]},sF=(0,b.forwardRef)(({appearance:e="primary",isLink:t=!1,size:n="default",label:r,className:i,iconLeft:a,iconRight:o,children:s,...l},c)=>{let u=[...sI,...sz[e],...sB[n]];t&&u.push("a-btn--link"),i&&u.push(i),l.disabled&&u.push("a-btn--disabled");let h=!!a,d=!!o,f=r?h||d?(0,v.jsx)("span",{children:r}):r:null;if(h&&d)throw Error("Button component: only one of iconLeft or iconRight can be provided");return(0,v.jsxs)("button",{ref:c,type:"button",className:[...u].join(" "),...l,children:[s,!!a&&(0,v.jsx)(a7,{name:a,isPresentational:!0}),f,!!o&&(0,v.jsx)(a7,{name:o,isPresentational:!0})]})});sF.displayName="Button",(my={})[my.Full=12]="Full",my[my.ThreeQuarters=9]="ThreeQuarters",my[my.TwoThirds=8]="TwoThirds",my[my.Half=6]="Half",my[my.Third=4]="Third",my[my.Quarter=3]="Quarter",my[my.Single=1]="Single",(0,v.jsx)(a9,{href:"/",label:"Link"},"1"),(0,v.jsx)(a9,{className:"nav-item active",href:"/2",label:"Link"},"2"),(0,v.jsx)(a9,{className:"nav-item",href:"/3",label:"Link"},"3"),(0,v.jsx)(sF,{appearance:"secondary",label:"Log out",onClick:()=>{}},"logout");var sH=({type:e="1",children:t,className:n,...r})=>{let i,a=[n];return"slug"===e?(a.push("m-slug-header"),(0,v.jsx)("header",{className:(0,a1.default)(a),...r,children:(0,v.jsx)("h2",{className:"m-slug-header__heading",children:t})})):("display"===e?(i="h1",a.push("superheading")):"eyebrow"===e?(i="div",a.push("h5 eyebrow")):i=`h${e}`,(0,v.jsx)(i,{...r,className:(0,a1.default)(a),children:t}))},s$=()=>null,sU=()=>(0,v.jsx)(sF,{isLink:!0,className:"m-pagination__btn-submit",id:"m-pagination__btn-submit-default",label:"Go",type:"submit"}),sV=({tableId:e,page:t,pageCount:n,onChange:r})=>{let i=`${e}-pagination_current-page`;return(0,v.jsxs)("label",{className:"m-pagination__label",htmlFor:i,children:["Page",(0,v.jsx)("span",{className:"u-visually-hidden",children:`number ${t} out`}),(0,v.jsx)("input",{className:"m-pagination__current-page",id:i,name:"page",type:"number",min:"1",max:n,pattern:"[0-9]*",inputMode:"numeric",value:t,onChange:e=>{r(Number.parseInt(e.currentTarget.value,10))}}),`of ${n}`]})},sq=({tableId:e,page:t,pageCount:n,onClickPrevious:r=s$,onClickNext:i=s$,onClickGo:a=s$,previousLabel:o="Previous",nextLabel:s="Next"})=>{let[l,c]=(0,b.useState)(t);(0,b.useEffect)(()=>c(t),[t]);let u=(0,b.useId)();return(0,v.jsxs)("nav",{className:"m-pagination",role:"navigation","aria-label":"Pagination",children:[(0,v.jsx)(sF,{iconLeft:"left",className:`m-pagination__btn-prev${1===t?" a-btn--disabled":""}`,onClick:r,label:o,disabled:1===t}),(0,v.jsx)(sF,{iconRight:"right",className:`m-pagination__btn-next${t===n?" a-btn--disabled":""}`,onClick:i,label:s,disabled:t===n}),(0,v.jsxs)("form",{className:"m-pagination__form",action:"#pagination_content",onSubmit:e=>{e.preventDefault();let n=Number.parseInt(Object.fromEntries(new FormData(e.currentTarget)).page,10);n!==t&&a(n)},children:[(0,v.jsx)(sV,{tableId:e??u,page:l,pageCount:n,onChange:c}),(0,v.jsx)(sU,{})]})]})};function sY({children:e,isLead:t,className:n,...r}){let i=[n];return t&&i.push("lead-paragraph"),(0,v.jsx)("p",{...r,className:(0,a1.default)(i),children:e})}var sW=({children:e})=>e?(0,v.jsx)("caption",{children:e}):null;(0,b.forwardRef)(({id:e,caption:t,columns:n,rows:r,isResponsive:i=!1,isScrollableHorizontal:a=!1,isStriped:o=!1,isPaginated:s=!1,startPage:l=1,perPage:c=20,className:u,divRef:h,tableRef:d,...f},p)=>{let[m,g]=(({isPaginated:e=!0,startPage:t=1,rows:n=[],perPage:r=20})=>{let i=n.length,a=Math.max(Math.ceil(i/r),1),o=e&&i>r,[s,l]=(0,b.useState)(Math.min(t,a));if((0,b.useEffect)(()=>{l(Math.min(s,a))},[s,a,r]),!e||!o)return[n,{page:1,pageCount:1,onClickNext:s$,onClickPrevious:s$,onClickGo:s$}];let c=s-1;return[n.slice(c*r,c*r+r),{page:s,pageCount:a,onClickNext:()=>l(Math.min(s+1,a)),onClickPrevious:()=>l(Math.max(c,1)),onClickGo:e=>l(e)}]})({rows:r,isPaginated:s,startPage:l,perPage:c}),y=(0,b.useId)(),x=[];i&&x.push("o-table o-table--stack-on-small"),o&&x.push("o-table--striped"),s&&x.push("u-w100pct"),u&&x.push(u);let w=(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("table",{className:(0,a1.default)(x),ref:d,id:e??y,...f,children:[(0,v.jsx)(sW,{children:t}),(0,v.jsx)("thead",{children:(0,v.jsx)("tr",{children:n.map((e,t)=>{let n,r=[""],i=`header-${t}`;return"object"==typeof e?(n=e.header,e.isAlignRight&&r.push("o-table__cell--right-align"),e.width&&r.push(`u-w${e.width}pct`),e.isHeaderWordWrap||r.push("white-space-nowrap")):n=e,(0,v.jsx)("th",{className:(0,a1.default)(r),children:n},i)})})}),(0,v.jsx)("tbody",{children:m.map((e,t)=>{let r=`row-${t}`;return(0,v.jsx)("tr",{children:e.map((e,r)=>{let i=n[r],a=`row-${t}-col-${r}`;return(0,b.createElement)("td",{...(e=>{if(!e)return{};if("string"==typeof e)return{"data-label":e};let t=[""];return e.isAlignRight&&t.push("o-table__cell--right-align"),e.isCellDisableWordWrap&&t.push("white-space-nowrap"),!e.isCellDisableWordWrap&&e.isCellWordBreak&&t.push("word-break-break-all"),{"data-label":e.header,className:(0,a1.default)(t)}})(i),key:a},e)})},r)})})]}),s?(0,v.jsx)(sq,{...g,tableId:e??y}):null]});return a?(0,v.jsx)("div",{className:"o-table o-table--scrolling",ref:p??h,children:w}):w}).displayName="Table";var sG={success:"a-text-input--success",error:"a-text-input--error",warning:"a-text-input--warning"},sX=e=>e?sG[e]??"":"";(0,b.forwardRef)(({id:e,className:t="",status:n,placeholder:r="Placeholder text",isFullWidth:i=!1,isDisabled:a=!1,onChange:o=s$,...s},l)=>(0,v.jsx)("div",{className:"m-form-field",children:(0,v.jsx)("textarea",{className:(0,a1.default)(["a-text-input",sX(n),i?"a-text-input--full":"",t||""].filter(e=>e.length)),id:e,placeholder:r,onChange:e=>{e.preventDefault(),o(e.target.value)},disabled:a,ref:l,...s})})).displayName="TextArea",(0,b.forwardRef)(({className:e,id:t,inputRef:n,isDisabled:r=!1,name:i,status:a,type:o="text",isFullWidth:s=!1,...l},c)=>{let u=["a-text-input",e,sX(a)];return s?(u.push("a-text-input--full"),(0,v.jsx)("div",{className:"m-form-field",children:(0,v.jsx)("input",{className:(0,a1.default)(u),disabled:r,id:t,name:i,type:o,ref:c,...l})})):(0,v.jsx)("input",{className:(0,a1.default)(u),disabled:r,id:t,name:i,type:o,ref:c,...l})}).displayName="TextInput";var sK=e=>e?"string"==typeof e?(0,v.jsx)(sY,{children:e}):e:null,sZ=({heading:e,subheading:t,description:n,callToAction:r,className:i,...a})=>{let o=r&&(0,v.jsx)(a4,{isLinks:!0,children:(0,b.isValidElement)(r)&&(r.type===a6||r.type===oe)?r:(0,v.jsx)(a6,{children:(0,b.cloneElement)(r,{type:"list"})})});return(0,v.jsxs)("div",{className:(0,a1.default)(["o-text-introduction",i]),...a,children:[(0,v.jsx)(sH,{type:"1",children:e}),(0,v.jsx)(sY,{isLead:!0,children:t}),sK(n),o]})};sZ.Container=({className:e,children:t,...n})=>(0,v.jsx)("div",{className:(0,a1.default)(["o-text-introduction",e]),...n,children:t}),sZ.Container,sZ.Heading=({children:e})=>(0,v.jsx)(sH,{type:"1",children:e}),sZ.Heading,sZ.Description=({children:e})=>sK(e),sZ.Description,sZ.Subheading=({children:e})=>(0,v.jsx)(sY,{isLead:!0,children:e}),sZ.Subheading,sZ.Container.displayName="TextIntroduction.Container",sZ.Heading.displayName="TextIntroduction.Heading",sZ.Description.displayName="TextIntroduction.Description",sZ.Subheading.displayName="TextIntroduction.Subheading";var sQ=({children:e,className:t="",...n})=>(0,v.jsx)("div",{className:`o-well ${t}`,...n,children:e}),sJ=i(4137),s0=i.n(sJ),s1=i(6266);let s2=e=>{let{isLoading:t}=e;return t?(0,s1.createPortal)((0,v.jsx)("section",{className:"light-box","aria-busy":"true","aria-live":"polite",children:(0,v.jsxs)("div",{className:"loading-box",children:[(0,v.jsx)(a7,{name:"updating",isPresentational:!0})," ",(0,v.jsx)("span",{children:"This page is loading"})]})}),(()=>{let e=ah();if(e instanceof ShadowRoot){let t=ac(as),n=e.querySelector("#".concat(t));return n||((n=document.createElement("div")).id=as,n.className="ccdb-ui-overlay-portal",e.appendChild(n)),n}return e instanceof HTMLElement?e:document.body})()):null};s2.propTypes={isLoading:s0().bool.isRequired};let s3=e=>e.routes.params,s5=e=>e.routes.queryString,s7=e=>{let{label:t,value:n}=e;return n?(0,v.jsxs)("div",{className:"layout-row",children:[(0,v.jsx)("span",{className:"subitem",children:t}),(0,v.jsx)("span",{children:n})]}):null};s7.propTypes={label:s0().string,value:s0().string};let s4=e=>{let{value:t}=e;return t?(0,v.jsxs)("div",{children:[(0,v.jsx)("span",{className:"cf-icon__before",children:(0,v.jsx)(a7,{name:"clock-round",isPresentational:!0})}),(0,v.jsx)("span",{children:t})]}):(0,v.jsx)("span",{children:"N/A"})};s4.propTypes={value:s0().string};let s6=e=>{let{data:t,error:n,id:r}=e;if(n)return(0,v.jsxs)(sH,{type:"1",children:["There was a problem retrieving ",r]});let i=t.complaint_what_happened||"",a=i1(r);return(0,v.jsxs)("article",{children:[(0,v.jsx)(sH,{type:"1","aria-label":"Complaint "+a,children:r}),(0,v.jsxs)("div",{className:"card",children:[(0,v.jsxs)("div",{className:"card-left layout-column",children:[(0,v.jsx)(sH,{type:"4",children:"Date CFPB received the complaint"}),(0,v.jsx)("span",{children:ib(t.date_received)}),(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Consumer’s state"}),(0,v.jsx)("span",{children:t.state}),(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Consumer’s zip"}),(0,v.jsx)("span",{children:t.zip_code}),(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Submitted via"}),(0,v.jsx)("span",{children:t.submitted_via}),t.tags&&t.tags.length?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Tags"}),(0,v.jsx)("span",{children:t.tags})]}):null]}),(0,v.jsxs)("div",{className:"card-right layout-column",children:[(0,v.jsx)(sH,{type:"4",children:"Product"}),(0,v.jsx)(sH,{type:"3",children:t.product}),(0,v.jsx)(s7,{label:"Sub-product:",value:t.sub_product}),(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Issue"}),(0,v.jsx)(sH,{type:"3",children:t.issue}),(0,v.jsx)(s7,{label:"Sub-issue:",value:t.sub_issue}),i?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Consumer complaint narrative"}),(0,v.jsx)("span",{children:i})]}):null]})]}),(0,v.jsx)(sH,{type:"2",className:"company-information",children:"Company information"}),(0,v.jsxs)("div",{className:"card",children:[(0,v.jsxs)("div",{className:"card-left layout-column",children:[(0,v.jsx)(sH,{type:"4",children:"Date complaint sent to company"}),(0,v.jsx)("span",{children:ib(t.date_sent_to_company)}),(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Company name"}),(0,v.jsx)("span",{children:t.company})]}),(0,v.jsxs)("div",{className:"card-right layout-column",children:[(0,v.jsx)(sH,{type:"4",children:"Timely response?"}),(0,v.jsx)(s4,{value:t.timely}),(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Company response to consumer"}),(0,v.jsx)("span",{children:t.company_response?t.company_response:"N/A"}),(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Company public response"}),(0,v.jsx)("span",{children:t.company_public_response?t.company_public_response:"N/A"})]})]})]})};s6.propTypes={data:s0().object,error:s0().oneOfType([s0().string,s0().object]),id:s0().string};let s9=()=>{let e=eh(),{id:t}=function(){let{matches:e}=b.useContext(es),t=e[e.length-1];return t?.params??{}}(),n=ts(s3),r=(0,b.useMemo)(()=>{if(!e)return"";let t=e.pathname,r=t.indexOf("detail");return t.substring(0,r)+"?"+i0(n)},[e,n]),{data:i,isLoading:a,error:o}=aU(t);return(0,v.jsxs)("section",{className:"card-container",children:[(0,v.jsxs)("nav",{className:"layout-row",children:[(0,v.jsx)("div",{className:"back-to-search flex-fixed",children:(0,v.jsx)(a9,{href:r,isRouterLink:!0,iconLeft:"left",label:"Back to search results"})}),(0,v.jsx)("div",{className:"meaning flex-fixed",children:(0,v.jsx)(a9,{href:iU,target:"_blank",rel:"noopener noreferrer",label:"What do all these data points mean?"})})]}),a?(0,v.jsx)(s2,{isLoading:!0}):(0,v.jsx)(s6,{data:i,error:o,id:t})]})},s8=nW({name:"view",initialState:{expandedRows:[],isPrintMode:!1,hasAdvancedSearchTips:!1,hasFilters:!0,modalTypeShown:!1,showTour:!1,tab:"Trends",width:0},reducers:{hideAdvancedSearchTips:{reducer:e=>{e.hasAdvancedSearchTips=!1}},modalHidden(e){e.modalTypeShown=!1},modalShown(e,t){e.modalTypeShown=t.payload},showAdvancedSearchTips:{reducer:e=>{e.hasAdvancedSearchTips=!0}},updatePrintModeOn(e){e.isPrintMode=!0},updatePrintModeOff(e){e.isPrintMode=!1},updateScreenSize(e,t){e.hasFilters=t.payload>749,e.width=t.payload},updateFilterVisibility:{reducer:e=>{e.hasFilters=!e.hasFilters}},tabChanged:{reducer:(e,t)=>{e.tab=av(t.payload,"tab"),e.expandedRows=[]}},tourHidden:{reducer:e=>{e.showTour=!1}},tourShown:{reducer:e=>{e.showTour=!0}},rowCollapsed:{reducer:(e,t)=>{e.expandedRows=e.expandedRows.filter(e=>e!==t.payload)}},rowExpanded:{reducer:(e,t)=>{e.expandedRows.includes(t.payload)||e.expandedRows.push(t.payload)}}},extraReducers:e=>{e.addCase("trends/dataLensChanged",e=>{e.expandedRows=[]}).addCase("trends/focusChanged",e=>{e.tab="Trends"}).addCase("routes/routeChanged",(e,t)=>{let n=t.payload.params;e.isPrintMode="true"===n.isPrintMode,e.tab=av(n.tab,"tab"),an(n,e,["expandedRows"])})}}),{hideAdvancedSearchTips:le,modalHidden:lt,modalShown:ln,processParams:lr,rowCollapsed:li,rowExpanded:la,showAdvancedSearchTips:lo,tabChanged:ls,tourHidden:ll,tourShown:lc,updateFilterVisibility:lu,updatePrintModeOff:lh,updatePrintModeOn:ld,updateScreenSize:lf}=s8.actions;var lp=s8.reducer;let lm=()=>{let e=ta();return(0,v.jsxs)("header",{className:"content__hero",children:[(0,v.jsx)(sH,{type:"1",className:"content-header",children:"Consumer Complaint Database"}),(0,v.jsxs)("ul",{className:"m-list m-list--horizontal",children:[(0,v.jsx)("li",{className:"m-list__item",children:(0,v.jsx)(sF,{label:"Things to know before you use this database",isLink:!0,onClick:()=>{e(ln(iC))}})}),(0,v.jsx)("li",{className:"m-list__item",children:(0,v.jsx)(a9,{href:iU,label:"How we use complaint data",target:"_blank",rel:"noopener noreferrer"})}),(0,v.jsx)("li",{className:"m-list__item",children:(0,v.jsx)(a9,{href:"https://cfpb.github.io/api/ccdb/",iconRight:"external-link",target:"_blank",rel:"noopener noreferrer",label:"Technical documentation"})})]})]})},lg=e=>{let{className:t="",title:n,desc:r,children:i}=e,[a,o]=(0,b.useState)(!0),s=(0,v.jsx)("span",{className:"o-expandable__cue-close",role:"img","aria-label":"Hide",children:(0,v.jsx)(a7,{name:"minus-round",isPresentational:!0})}),l=(0,v.jsx)("span",{className:"o-expandable__cue-open",role:"img","aria-label":"Show",children:(0,v.jsx)(a7,{name:"plus-round",isPresentational:!0})}),c=a?"Collapse ".concat(n," filter"):"Expand ".concat(n," filter");return(0,v.jsxs)("section",{className:"o-expandable ".concat(t),children:[(0,v.jsxs)("button",{className:"o-expandable__header","aria-expanded":a,"aria-label":c,onClick:()=>o(!a),children:[(0,v.jsx)(sH,{type:"3",className:"o-expandable__label",children:n}),(0,v.jsx)("span",{className:"o-expandable__cues",children:a?s:l})]}),a?(0,v.jsxs)("div",{className:"o-expandable__content",children:[(0,v.jsx)("p",{children:r}),i]}):null]})};lg.propTypes={className:s0().string,title:s0().string.isRequired,desc:s0().string.isRequired,children:s0().node.isRequired};let lv=nW({name:"filters",initialState:{company:[],company_public_response:[],company_response:[],issue:[],product:[],state:[],submitted_via:[],tags:[],timely:[],zip_code:[]},reducers:{filterAdded:{reducer:(e,t)=>{let{filterName:n,filterValue:r}=t.payload;"has_narrative"===n?e.has_narrative=!0:n in e?-1===e[n].indexOf(r)&&e[n].push(r):e[n]=[r]},prepare:(e,t)=>({payload:{filterName:e,filterValue:t}})},filterRemoved:{reducer:(e,t)=>{let{filterName:n,filterValue:r}=t.payload;if("has_narrative"===n)delete e.has_narrative;else if(n in e){let t=e[n].indexOf(r);-1!==t&&e[n].splice(t,1)}},prepare:(e,t)=>({payload:{filterName:e,filterValue:t}})},filtersCleared:{reducer:(e,t)=>{let n=iE.concat(iL);if(iP===t.payload){let e=n.indexOf("has_narrative");n.splice(e,1)}n.forEach(t=>{t in e&&(e[t]=[])})}},filtersReplaced:{reducer:(e,t)=>{let{filterName:n,values:r}=t.payload;e[n]=[...new Set(r)]},prepare:(e,t)=>({payload:{filterName:e,values:t}})},filterToggled:{reducer:(e,t)=>{let{filterName:n,filterValue:r}=t.payload;e[n]=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return -1===e.indexOf(t)?e.push(t):e=e.filter(function(e){return e!==t}),[...e]}(e[n],r.key)},prepare:(e,t)=>({payload:{filterName:e,filterValue:t}})},multipleFiltersAdded:{reducer:(e,t)=>{let n=t.payload.filterName,r=i3(e,n,[]);t.payload.values.forEach(e=>{-1===r.indexOf(e)&&r.push(e)}),e[n]=r},prepare:(e,t)=>({payload:{filterName:e,values:t}})},multipleFiltersRemoved:{reducer:(e,t)=>{e[t.payload.filterName]&&t.payload.values.forEach(n=>{let r=e[t.payload.filterName].indexOf(n);-1!==r&&e[t.payload.filterName].splice(r,1)})},prepare:(e,t)=>({payload:{filterName:e,values:t}})},stateFilterAdded:{reducer:(e,t)=>{let n=i3(e,"state",[]),{abbr:r}=t.payload;n.includes(r)||n.push(r),e.state=n}},stateFilterCleared:{reducer:e=>{e.state=[]}},stateFilterRemoved:{reducer:(e,t)=>{let n=i3(e,"state",[]),{abbr:r}=t.payload;e.state=n.filter(e=>e!==r)}},toggleFlagFilter:{reducer:(e,t)=>{let n=t.payload;e[n]=!e[n],e[n]||delete e[n]}}},extraReducers:e=>{e.addCase("routes/routeChanged",(e,t)=>{let{params:n}=t.payload;an(n,e,iE)}).addCase("trends/focusChanged",(e,t)=>{let{focus:n,lens:r,filterValues:i}=t.payload,a=r.toLowerCase(),o=[];"company"===a?o.push(n):i.forEach(e=>{o.push(e)}),e[a]=o}).addCase("trends/focusRemoved",(e,t)=>{e[t.payload.toLowerCase()]=[]})}}),{filterAdded:ly,filterRemoved:lb,filtersCleared:lx,filtersReplaced:lw,filterToggled:l_,multipleFiltersAdded:lk,multipleFiltersRemoved:lS,stateFilterAdded:lM,stateFilterCleared:lA,stateFilterRemoved:lT,toggleFlagFilter:lC}=lv.actions;var lP=lv.reducer;let lE=e=>{let t=iB[e];return t?"".concat(t," (").concat(e,")"):e},lO=(e,t,n,r)=>{if(!iD.includes(r))return t;let i=e.split("•"),a=i[0],o=t.includes(a),s=t.filter(t=>t!==a&&e).filter(t=>t!==e),l=[],c=n.find(e=>e.key===a);return o&&c&&c["sub_"+r+".raw"].buckets.forEach(e=>{e.key!==i[1]&&l.push(a+"•"+e.key)}),s.concat(l)},lN=e=>e.filters,lj=e=>e.filters.company,lL=e=>e.filters.state,lD=e=>e.filters.has_narrative,lR=e=>e.filters.zip_code;function lI(e,t){let n=lB(t),r=Object.keys(n).filter(e=>!["frm","page","search_after","size","sort"].includes(e)),i=Object.keys(e);return Object.assign({size:0},lz(n,r),lz(e,i))}function lz(e,t){let n={};return t.forEach(t=>{let r=e[t];Array.isArray(r)?r.length>0&&(n[t]=r):r&&(n[t]=r)}),n}function lB(e){let t={company_received_max:null==e?void 0:e.company_received_max,company_received_min:null==e?void 0:e.company_received_min,date_received_max:e.date_received_max,date_received_min:e.date_received_min,field:av(e.searchField,"searchField"),frm:void 0!==e.from?e.from:i2(e.page-1,0)*e.size,page:e.page,size:e.size,sort:e.sort};e.searchText&&(t.search_term=e.searchText),e.searchAfter&&(t.search_after=e.searchAfter);let n=Object.keys(t).reduce((e,n)=>(null===t[n]||void 0===t[n]||""===t[n]||Number.isNaN(t[n])||(e[n]=t[n]),e),{});for(let e in n)Array.isArray(n[e])&&0===n[e].length&&delete n[e];return n}let lF=e=>e.query,lH=e=>e.query.company_received_max,l$=e=>e.query.company_received_min,lU=e=>e.query.dateLastIndexed,lV=e=>e.query.date_received_max,lq=e=>e.query.date_received_min,lY=e=>e.query.dateRange,lW=e=>e.query.page,lG=e=>e.query.searchField,lX=e=>e.query.searchText,lK=e=>e.query.size,lZ=e=>e.query.sort,lQ=e=>e.query.dateInterval,lJ=e=>e.query.trendsDateWarningEnabled,l0=()=>{let e=ts(lN),t=ts(lF),n=ts(s5),r=ts(lU);return a$(lI(e,t),{skip:i5([!r,""===n])})},l1=e=>{let{fieldName:t,item:n}=e,{data:r,isSuccess:i,error:a}=l0(),o=ts(lN),s=ta(),l=i3(r,t,[]),c=i3(o,t,[]);if(!i||!l||a)return null;let u=c.includes(n.key)||c.includes(n.key.split("•")[0]),h=n.value||n.key,d=i7(t+"-"+n.key);return(0,v.jsxs)("li",{className:"layout-row m-form-field m-form-field--checkbox",children:[(0,v.jsx)("input",{type:"checkbox",className:"flex-fixed a-checkbox","aria-label":n.key,disabled:n.isDisabled,checked:u,id:d,onChange:()=>{if(u)if(iD.includes(t)){let e=lO(n.key,c,l,t);s(lw(t,e))}else s(l_(t,n));else if(n.key.indexOf("•")>-1&&iD.includes(t)){let e=(e=>{let{fieldName:t,item:n,aggs:r,filters:i}=e,[a,o]=n.key.split("•"),s=r.find(e=>e.key===a)["sub_"+t+".raw"].buckets.map(e=>e.key).sort(),l=a+"•",c=i.filter(e=>e.indexOf(l)>-1).map(e=>e.replace(l,""));return(c.push(o),c.sort(),((e,t)=>{let n=e.length;if(n!==t.length)return!1;for(;n--;)if(e[n]!==t[n])return!1;return!0})(c,s))?i.filter(e=>-1===e.indexOf(l)).concat(a):i.concat(n.key)})({fieldName:t,item:n,aggs:l,filters:c});s(lw(t,e))}else s(l_(t,n))}}),(0,v.jsx)("label",{className:"a-label flex-all bucket-key",htmlFor:d,children:h}),(0,v.jsx)("span",{className:"flex-fixed bucket-count",children:n.doc_count.toLocaleString()})]})};l1.propTypes={fieldName:s0().string.isRequired,item:s0().shape({doc_count:s0().number.isRequired,key:s0().string.isRequired,value:s0().string,isDisabled:s0().bool}).isRequired};let l2=e=>{let{fieldName:t,options:n,selections:r,getLabel:i}=e,a=n.reduce((e,t)=>{if(r.includes(t.key)){let n=i?i(t.key):t.value;e.push(iV(tu({},t),{value:n}))}return e},[]);return r.forEach(e=>{a.some(t=>t.key===e)||a.push({key:e,value:i?i(e):e,doc_count:0})}),(0,v.jsx)("ul",{children:a.map(e=>(0,v.jsx)(l1,{item:e,fieldName:t},e.key))})};l2.propTypes={fieldName:s0().string.isRequired,options:s0().array.isRequired,selections:s0().array,getLabel:s0().func};let l3=e=>e.trends,l5=e=>e.trends.chartType,l7=e=>e.trends.focus,l4=e=>e.trends.lens,l6=e=>e.trends.subLens,l9=e=>e.trends.tooltip;function l8(){return(l8=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}function ce(e){return(ce="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})(e)}function ct(e){var t=function(e,t){if("object"!=ce(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ce(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ce(t)?t:t+""}function cn(e,t,n){return(t=ct(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cr(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function ci(e,t){if(null==e)return{};var n,r,i=cr(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&({}).propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var ca=i(2026),co=i.n(ca),cs="label",cl=i(1792),cc=i.n(cl);function cu(e){return"string"==typeof e?e:cs}function ch(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var cd=0;function cf(e){return"function"==typeof e}function cp(e){return"string"==typeof e}function cm(){}function cg(e,t){var n={};return t.forEach(function(t){n[t]=e[t]}),n}var cv=function(e,t){var n;return!cp(e)&&(ch(e,"paginationOption")||ch(e,"customOption"))?e[cu(t)]:(n=cf(t)?t(e):cp(e)?e:e[t],cp(n)||cc()(!1),n)},cy=function(e,t){var n=t.allowNew,r=t.labelKey,i=t.text;return!!n&&!!i.trim()&&(cf(n)?n(e,t):!e.some(function(e){return cv(e,r)===i}))},cb=i(6310),cx=i.n(cb);function cw(e,t){if(!cp(e))return e[t]}var c_=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹÐ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"OE",letters:"Œ"},{base:"oe",letters:"œ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}].reduce(function(e,t){var n=t.base;return t.letters.split("").forEach(function(t){e[t]=n}),e},{});function ck(e){return e.normalize("NFD").replace(RegExp("[".concat("̀-ͯ").concat("゙゚","]"),"g"),"").replace(/[^\u0000-\u007E]/g,function(e){return c_[e]||e})}var cS=i(5132),cM=i.n(cS),cA={};function cT(e,t){if(!e&&-1!==t.indexOf("deprecated")){if(cA[t])return;cA[t]=!0}for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];cM().apply(void 0,[e,"[react-bootstrap-typeahead] ".concat(t)].concat(r))}function cC(e,t,n){var r=e,i=t;return n.caseSensitive||(r=r.toLowerCase(),i=i.toLowerCase()),n.ignoreDiacritics&&(r=ck(r),i=ck(i)),-1!==i.indexOf(r)}function cP(e,t){var n=t.filterBy,r=t.labelKey,i=t.multiple,a=t.selected,o=t.text;if(i&&a.some(function(t){return cx()(t,e)}))return!1;if(cf(r))return cC(o,r(e),t);var s=n.slice();return(cp(r)&&-1===s.indexOf(r)&&s.unshift(r),cp(e))?(cT(s.length<=1,"You cannot filter by properties when `option` is a string."),cC(o,e,t)):s.some(function(n){var r=cw(e,n);return cp(r)||(cT(!1,"Fields passed to `filterBy` should have string values. Value will be converted to a string; results may be unexpected."),r=String(r)),cC(o,r,t)})}function cE(e){return null!=e.selectionStart}var cO=/[\u0300-\u036F]/;function cN(e,t){var n,r=RegExp(("string"!=typeof(n=ck(t))&&cc()(!1),n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")),"i").exec(ck(e));if(!r)return null;var i=r.index,a=r[0].length;if(cO.test(e)){for(var o=0;o<=i;o++)cO.test(e[o])&&(i+=1);for(var s=i;s<=i+a;s++)cO.test(e[s])&&(a+=1)}return{end:i+a,start:i}}var cj=function(e){var t=e.activeIndex,n=e.initialItem,r=e.isFocused,i=e.isMenuShown,a=e.labelKey,o=e.multiple,s=e.selected,l=e.text;if(!l||!r||!i||!n||!cp(n)&&ch(n,"customOption")||!cp(n)&&n.disabled||t>-1||s.length&&!o)return"";var c=cv(n,a),u=cN(c.toLowerCase(),l.toLowerCase());return u&&0===u.start?l+c.slice(u.end,c.length):""},cL=i(7721),cD=i.n(cL);function cR(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return"".concat(e,"-item-").concat(t)}var cI=["activeIndex","id","isFocused","isMenuShown","multiple","onClick","onFocus","placeholder"];function cz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cz(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var cF=function(e){var t=e.activeIndex,n=e.id,r=e.isFocused,i=e.isMenuShown,a=e.multiple,o=e.onClick,s=e.onFocus,l=e.placeholder,c=ci(e,cI);return function(){var e,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},h=ch(u,"className")?String(u.className):void 0;return cB(cB(cB(cB({autoComplete:"off",placeholder:l,type:"text"},u),c),{},{"aria-activedescendant":t>=0?cR(n,t):void 0,"aria-autocomplete":"both","aria-expanded":i,"aria-haspopup":"listbox","aria-multiselectable":a||void 0,"aria-owns":i?n:void 0,className:cD()((cn(e={},h||"",!a),cn(e,"focus",r),e))},a&&{inputClassName:h}),{},{onClick:o,onFocus:s,role:"combobox"})}},cH=function(e){var t=e.activeItem,n=e.labelKey,r=e.multiple,i=e.selected,a=e.text;return t?cv(t,n):!r&&i.length&&i[0]?cv(i[0],n):a},c$=function(e){var t=e.allowNew,n=e.highlightOnlyResult,r=e.results;return!!n&&!t&&1===r.length&&!cw(r[0],"disabled")};function cU(e,t,n){for(var r,i=e;(r=n[i])&&cw(r,"disabled");)i+="ArrowUp"===t?-1:1;return i}function cV(e){e.preventDefault()}var cq=["className","isInvalid","isValid","size"];function cY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cY(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cG(e){var t=e.className,n=e.isInvalid,r=e.isValid,i=e.size;return cW(cW({},ci(e,cq)),{},{className:cD()("form-control","rbt-input",{"form-control-lg":"lg"===i,"form-control-sm":"sm"===i,"is-invalid":n,"is-valid":r},t)})}var cX=[{alt:"onBlur",prop:"onBlur"},{alt:"onInputChange",prop:"onChange"},{alt:"onFocus",prop:"onFocus"},{alt:"onKeyDown",prop:"onKeyDown"}],cK=s0().oneOf(["lg","sm"]);function cZ(e,t){return function(n,r,i){s0().checkPropTypes(cn({},r,e),n,"prop",i),cf(t)&&t(n,r,i)}}function cQ(e,t,n){cT(null!=e[t],"The prop `".concat(t,"` is required to make `").concat(n,"` ")+"accessible for users of assistive technologies such as screen readers.")}var cJ=s0().oneOfType([s0().object,s0().string]),c0=["allowNew","delay","emptyLabel","isLoading","minLength","onInputChange","onSearch","options","promptText","searchText","useCache"];function c1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c1(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c1(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c3(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function c5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ct(r.key),r)}}function c7(e,t,n){return t&&c5(e.prototype,t),n&&c5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c4(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c6(e,t){return(c6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function c9(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c6(e,t)}function c8(e,t){if(t&&("object"==ce(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return c4(e)}function ue(e){return(ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}s0().number,s0().bool.isRequired,s0().number,s0().func.isRequired,s0().arrayOf(cJ),s0().node,s0().node,s0().bool;var ut=(0,b.createContext)({activeIndex:-1,hintText:"",id:"",initialItem:null,inputNode:null,isOnlyResult:!1,onActiveItemChange:cm,onAdd:cm,onInitialItemChange:cm,onMenuItemClick:cm,setItem:cm}),un=function(){return(0,b.useContext)(ut)};function ur(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ui(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ur(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ur(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ua=["activeIndex","disabled","id","inputRef","isFocused","isMenuShown","multiple","onBlur","onChange","onClick","onFocus","onKeyDown","placeholder"],uo=["activeIndex","hideMenu","isMenuShown","labelKey","onClear","onHide","onRemove","results","selected","text","toggleMenu"],us=["activeIndex","id","initialItem","inputNode","onActiveItemChange","onAdd","onInitialItemChange","onMenuItemClick","setItem"],ul=function(e){var t=e.allowNew,n=e.children,r=e.initialItem,i=e.isMenuShown,a=e.onAdd,o=e.onInitialItemChange,s=e.onKeyDown,l=e.onMenuToggle,c=e.results,u=e.selectHint,h=cj(e);(0,b.useEffect)(function(){t||c.length||o()});var d=(0,b.useRef)(!0);(0,b.useEffect)(function(){if(d.current){d.current=!1;return}l(i)},[i,l]);var f=ui(ui({},cg(e,uo)),{},{getInputProps:cF(ui(ui({},cg(e,ua)),{},{onKeyDown:function(t){if(s(t),r){var n,i="Enter"===t.key&&c$(e),o=h&&(n=!1,"ArrowRight"===t.key&&(n=!cE(t.currentTarget)||t.currentTarget.selectionStart===t.currentTarget.value.length),"Tab"===t.key&&(t.preventDefault(),n=!0),u?u(n,t):n);(i||o)&&a(r)}},value:cH(e)}))}),p=ui(ui({},cg(e,us)),{},{hintText:h,isOnlyResult:c$(e)});return b.createElement(ut.Provider,{value:p},cf(n)?n(f):n)};function uc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uc(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function uh(e){var t=e.defaultInputValue,n=e.defaultOpen,r=e.defaultSelected,i=e.maxResults,a=e.multiple,o=e.selected?e.selected.slice():r.slice(),s=t;return!a&&o.length&&(s=cv(o[0],e.labelKey),o.length>1&&(o=o.slice(0,1))),{activeIndex:-1,activeItem:void 0,initialItem:void 0,isFocused:!1,selected:o,showMenu:n,shownResults:i,text:s}}function ud(e,t){return uu(uu({},uh(t)),{},{isFocused:e.isFocused,selected:[],text:""})}function uf(e){return uu(uu({},e),{},{isFocused:!0,showMenu:!0})}function up(e,t){var n=uh(t),r=n.activeIndex,i=n.activeItem,a=n.initialItem,o=n.shownResults;return uu(uu({},e),{},{activeIndex:r,activeItem:i,initialItem:a,showMenu:!1,shownResults:o})}function um(e,t){return e.showMenu?up(e,t):uu(uu({},e),{},{showMenu:!0})}var ug=["onChange"];function uv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uv(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ub={allowNew:s0().oneOfType([s0().bool,s0().func]),autoFocus:s0().bool,caseSensitive:cZ(s0().bool,function(e){var t=e.caseSensitive,n=e.filterBy;cT(!t||"function"!=typeof n,"Your `filterBy` function will override the `caseSensitive` prop.")}),defaultInputValue:cZ(s0().string,function(e){var t=e.defaultInputValue,n=e.defaultSelected,r=e.multiple,i=e.selected,a=n.length?"defaultSelected":"selected";cT(!(!r&&t&&(n.length||i&&i.length)),"`defaultInputValue` will be overridden by the value from `".concat(a,"`."))}),defaultOpen:s0().bool,defaultSelected:cZ(s0().arrayOf(cJ),function(e){var t=e.defaultSelected;cT(e.multiple||t.length<=1,"You are passing multiple options to the `defaultSelected` prop of a Typeahead in single-select mode. The selections will be truncated to a single selection.")}),filterBy:s0().oneOfType([s0().arrayOf(s0().string.isRequired),s0().func]),highlightOnlyResult:cZ(s0().bool,function(e){var t=e.allowNew;cT(!(e.highlightOnlyResult&&t),"`highlightOnlyResult` will not work with `allowNew`.")}),id:cZ(s0().oneOfType([s0().number,s0().string]),cQ),ignoreDiacritics:cZ(s0().bool,function(e){var t=e.filterBy;cT(e.ignoreDiacritics||"function"!=typeof t,"Your `filterBy` function will override the `ignoreDiacritics` prop.")}),labelKey:cZ(s0().oneOfType([s0().string,s0().func]),function(e){var t=e.allowNew;cT(!(cf(e.labelKey)&&t),"`labelKey` must be a string when `allowNew={true}`.")}),maxResults:s0().number,minLength:s0().number,multiple:s0().bool,onBlur:s0().func,onChange:s0().func,onFocus:s0().func,onInputChange:s0().func,onKeyDown:s0().func,onMenuToggle:s0().func,onPaginate:s0().func,open:s0().bool,options:s0().arrayOf(cJ).isRequired,paginate:s0().bool,selected:cZ(s0().arrayOf(cJ),function(e){var t=e.multiple,n=e.onChange,r=e.selected;cT(t||!r||r.length<=1,"You are passing multiple options to the `selected` prop of a Typeahead in single-select mode. This may lead to unexpected behaviors or errors."),cT(!r||r&&cf(n),"You provided a `selected` prop without an `onChange` handler. If you want the typeahead to be uncontrolled, use `defaultSelected`. Otherwise, set `onChange`.")})},ux=function(e){c9(r,e);var t,n=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=ue(r);return e=t?Reflect.construct(n,arguments,ue(this).constructor):n.apply(this,arguments),c8(this,e)});function r(){var e;c3(this,r);for(var t=arguments.length,i=Array(t),a=0;a<t;a++)i[a]=arguments[a];return cn(c4(e=n.call.apply(n,[this].concat(i))),"state",uh(e.props)),cn(c4(e),"inputNode",null),cn(c4(e),"isMenuShown",!1),cn(c4(e),"items",[]),cn(c4(e),"blur",function(){e.inputNode&&e.inputNode.blur(),e.hideMenu()}),cn(c4(e),"clear",function(){e.setState(ud)}),cn(c4(e),"focus",function(){e.inputNode&&e.inputNode.focus()}),cn(c4(e),"getInput",function(){return e.inputNode}),cn(c4(e),"inputRef",function(t){e.inputNode=t}),cn(c4(e),"setItem",function(t,n){e.items[n]=t}),cn(c4(e),"hideMenu",function(){e.setState(up)}),cn(c4(e),"toggleMenu",function(){e.setState(um)}),cn(c4(e),"_handleActiveIndexChange",function(t){e.setState(function(e){return{activeIndex:t,activeItem:t>=0?e.activeItem:void 0}})}),cn(c4(e),"_handleActiveItemChange",function(t){cx()(t,e.state.activeItem)||e.setState({activeItem:t})}),cn(c4(e),"_handleBlur",function(t){t.persist(),e.setState({isFocused:!1},function(){return e.props.onBlur(t)})}),cn(c4(e),"_handleChange",function(t){e.props.onChange&&e.props.onChange(t)}),cn(c4(e),"_handleClear",function(){var t,n,r;e.inputNode&&(t=e.inputNode,(n=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))&&n.set&&n.set.call(t,""),r=new Event("input",{bubbles:!0}),t.dispatchEvent(r)),e.setState(ud,function(){e.props.multiple&&e._handleChange([])})}),cn(c4(e),"_handleClick",function(t){t.persist();var n,r=null==(n=e.props.inputProps)?void 0:n.onClick;e.setState(uf,function(){return cf(r)&&r(t)})}),cn(c4(e),"_handleFocus",function(t){t.persist(),e.setState(uf,function(){return e.props.onFocus(t)})}),cn(c4(e),"_handleInitialItemChange",function(t){cx()(t,e.state.initialItem)||e.setState({initialItem:t})}),cn(c4(e),"_handleInputChange",function(t){t.persist();var n=t.currentTarget.value,r=e.props,i=r.multiple,a=r.onInputChange,o=e.state.selected.length&&!i;e.setState(function(e,t){var r=uh(t),i=r.activeIndex,a=r.activeItem,s=r.shownResults;return{activeIndex:i,activeItem:a,selected:o?[]:e.selected,showMenu:!0,shownResults:s,text:n}},function(){a(n,t),o&&e._handleChange([])})}),cn(c4(e),"_handleKeyDown",function(t){var n,r,i,a,o=e.state.activeItem;if(!e.isMenuShown){("ArrowUp"===t.key||"ArrowDown"===t.key)&&e.setState({showMenu:!0}),e.props.onKeyDown(t);return}switch(t.key){case"ArrowUp":case"ArrowDown":t.preventDefault(),e._handleActiveIndexChange((n=e.state.activeIndex,r=t.key,i=e.items,(a=cU(a=n+("ArrowUp"===r?-1:1),r,i))===i.length?a=-1:-2===a&&(a=cU(a=i.length-1,r,i)),a));break;case"Enter":t.preventDefault(),o&&e._handleMenuItemSelect(o,t);break;case"Escape":case"Tab":e.hideMenu()}e.props.onKeyDown(t)}),cn(c4(e),"_handleMenuItemSelect",function(t,n){cw(t,"paginationOption")?e._handlePaginate(n):e._handleSelectionAdd(t)}),cn(c4(e),"_handlePaginate",function(t){t.persist(),e.setState(function(e,t){return{shownResults:e.shownResults+t.maxResults}},function(){return e.props.onPaginate(t,e.state.shownResults)})}),cn(c4(e),"_handleSelectionAdd",function(t){var n,r,i=e.props,a=i.multiple,o=i.labelKey,s=t;!cp(s)&&s.customOption&&(s=uy(uy({},s),{},{id:(cd+=1,String("new-id-")+cd)})),a?(n=e.state.selected.concat(s),r=""):(n=[s],r=cv(s,o)),e.setState(function(e,t){return uy(uy({},up(e,t)),{},{initialItem:s,selected:n,text:r})},function(){return e._handleChange(n)})}),cn(c4(e),"_handleSelectionRemove",function(t){var n=e.state.selected.filter(function(e){return!cx()(e,t)});e.focus(),e.setState(function(e,t){return uy(uy({},up(e,t)),{},{selected:n})},function(){return e._handleChange(n)})}),e}return c7(r,[{key:"componentDidMount",value:function(){this.props.autoFocus&&this.focus()}},{key:"componentDidUpdate",value:function(e,t){var n,r,i,a,o,s=this.props,l=s.labelKey,c=s.multiple,u=s.selected;n=e.selected,(o=!u&&n)?(r="uncontrolled",i="controlled",a="an"):(r="controlled",i="uncontrolled",a="a"),cT(!(o||u&&!n),"You are changing ".concat(a," ").concat(r," typeahead to be ").concat(i,". ")+"Input elements should not switch from ".concat(r," to ").concat(i," (or vice versa). ")+"Decide between using a controlled or uncontrolled element for the lifetime of the component."),u&&!cx()(u,t.selected)&&(this.setState({selected:u}),c||this.setState({text:u.length?cv(u[0],l):""}))}},{key:"render",value:function(){var e=this.props,t=uy(uy({},(e.onChange,ci(e,ug))),this.state),n=t.filterBy,r=t.labelKey,i=t.options,a=t.paginate,o=t.shownResults,s=t.text;this.isMenuShown=(c=t.open,u=t.minLength,h=t.showMenu,d=t.text,c||!1===c?c:!(d.length<u)&&h),this.items=[];var l=[];if(this.isMenuShown){var c,u,h,d,f,p,m=cf(n)?n:cP;l=i.filter(function(e){return m(e,t)});var g=a&&l.length>o;f=l,cy(l=o&&!(o>=f.length)?f.slice(0,o):f,t)&&l.push(cn({customOption:!0},cu(r),s)),g&&l.push((cn(p={},cu(r),""),cn(p,"paginationOption",!0),p))}return b.createElement(ul,l8({},t,{hideMenu:this.hideMenu,inputNode:this.inputNode,inputRef:this.inputRef,isMenuShown:this.isMenuShown,onActiveItemChange:this._handleActiveItemChange,onAdd:this._handleSelectionAdd,onBlur:this._handleBlur,onChange:this._handleInputChange,onClear:this._handleClear,onClick:this._handleClick,onFocus:this._handleFocus,onHide:this.hideMenu,onInitialItemChange:this._handleInitialItemChange,onKeyDown:this._handleKeyDown,onMenuItemClick:this._handleMenuItemSelect,onRemove:this._handleSelectionRemove,results:l,setItem:this.setItem,toggleMenu:this.toggleMenu}))}}]),r}(b.Component);cn(ux,"propTypes",ub),cn(ux,"defaultProps",{allowNew:!1,autoFocus:!1,caseSensitive:!1,defaultInputValue:"",defaultOpen:!1,defaultSelected:[],filterBy:[],highlightOnlyResult:!1,ignoreDiacritics:!0,labelKey:cs,maxResults:100,minLength:0,multiple:!1,onBlur:cm,onFocus:cm,onInputChange:cm,onKeyDown:cm,onMenuToggle:cm,onPaginate:cm,paginate:!0});var uw=["className","label","onClick","onKeyDown","size"],u_={label:s0().string,onClick:s0().func,onKeyDown:s0().func,size:cK},uk=function(e){var t=e.className,n=e.label,r=void 0===n?"Clear":n,i=e.onClick,a=e.onKeyDown,o=e.size,s=ci(e,uw);return b.createElement("button",l8({},s,{"aria-label":r,className:cD()("close","btn-close","rbt-close",{"rbt-close-lg":"lg"===o,"rbt-close-sm":"sm"===o},t),onClick:function(e){e.stopPropagation(),i&&i(e)},onKeyDown:function(e){"Backspace"===e.key&&e.preventDefault(),a&&a(e)},type:"button"}),b.createElement("span",{"aria-hidden":"true",className:"rbt-close-content"},"×"),b.createElement("span",{className:"sr-only visually-hidden"},r))};uk.propTypes=u_;var uS={label:s0().string},uM=function(e){var t=e.label;return b.createElement("div",{className:"rbt-loader spinner-border spinner-border-sm",role:"status"},b.createElement("span",{className:"sr-only visually-hidden"},void 0===t?"Loading...":t))};function uA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function uT(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return uA(e,t);var n=({}).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)?uA(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}uM.propTypes=uS;let uC=Math.min,uP=Math.max,uE=Math.round,uO=Math.floor,uN=e=>({x:e,y:e}),uj={left:"right",right:"left",bottom:"top",top:"bottom"};function uL(e,t){return"function"==typeof e?e(t):e}function uD(e){return e.split("-")[0]}function uR(e){return e.split("-")[1]}function uI(e){return"y"===e?"height":"width"}function uz(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function uB(e){return"x"===uz(e)?"y":"x"}function uF(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let uH=["left","right"],u$=["right","left"],uU=["top","bottom"],uV=["bottom","top"];function uq(e){let t=uD(e);return uj[t]+e.slice(t.length)}function uY(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function uW(e,t,n){let r,{reference:i,floating:a}=e,o=uz(t),s=uB(t),l=uI(s),c=uD(t),u=i.x+i.width/2-a.width/2,h=i.y+i.height/2-a.height/2,d=i[l]/2-a[l]/2;switch(c){case"top":r={x:u,y:i.y-a.height};break;case"bottom":r={x:u,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:h};break;case"left":r={x:i.x-a.width,y:h};break;default:r={x:i.x,y:i.y}}let f=uR(t);return f&&(r[s]+=d*("end"===f?1:-1)*(n&&"y"===o?-1:1)),r}async function uG(e,t){var n,r,i,a,o;void 0===t&&(t={});let{x:s,y:l,platform:c,rects:u,elements:h,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:g=!1,padding:v=0}=uL(t,e),y="number"!=typeof v?{top:null!=(r=v.top)?r:0,right:null!=(i=v.right)?i:0,bottom:null!=(a=v.bottom)?a:0,left:null!=(o=v.left)?o:0}:{top:v,right:v,bottom:v,left:v},b=h[g?"floating"===m?"reference":"floating":m],x=uY(await c.getClippingRect({element:null==(n=await (null==c.isElement?void 0:c.isElement(b)))||n?b:b.contextElement||await (null==c.getDocumentElement?void 0:c.getDocumentElement(h.floating)),boundary:f,rootBoundary:p,strategy:d})),w="floating"===m?{x:s,y:l,width:u.floating.width,height:u.floating.height}:u.reference,_=await (null==c.getOffsetParent?void 0:c.getOffsetParent(h.floating)),k=await (null==c.isElement?void 0:c.isElement(_))&&await (null==c.getScale?void 0:c.getScale(_))||{x:1,y:1},S=uY(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:w,offsetParent:_,strategy:d}):w);return{top:(x.top-S.top+y.top)/k.y,bottom:(S.bottom-x.bottom+y.bottom)/k.y,left:(x.left-S.left+y.left)/k.x,right:(S.right-x.right+y.right)/k.x}}let uX=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:uG},l=await (null==o.isRTL?void 0:o.isRTL(t)),c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=uW(c,r,l),d=r,f=0,p={};for(let n=0;n<a.length;n++){let m=a[n];if(!m)continue;let{name:g,fn:v}=m,{x:y,y:b,data:x,reset:w}=await v({x:u,y:h,initialPlacement:r,placement:d,strategy:i,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=y?y:u,h=null!=b?b:h,p[g]={...p[g],...x},w&&f<50&&(f++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(c=!0===w.rects?await o.getElementRects({reference:e,floating:t,strategy:i}):w.rects),{x:u,y:h}=uW(c,d,l)),n=-1)}return{x:u,y:h,placement:d,strategy:i,middlewareData:p}};function uK(){return"u">typeof window}function uZ(e){return u0(e)?(e.nodeName||"").toLowerCase():"#document"}function uQ(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function uJ(e){var t;return null==(t=(u0(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function u0(e){return!!uK()&&(e instanceof Node||e instanceof uQ(e).Node)}function u1(e){return!!uK()&&(e instanceof Element||e instanceof uQ(e).Element)}function u2(e){return!!uK()&&(e instanceof HTMLElement||e instanceof uQ(e).HTMLElement)}function u3(e){return!(!uK()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof uQ(e).ShadowRoot)}function u5(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=hn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==i&&"contents"!==i}function u7(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let u4=/transform|translate|scale|rotate|perspective|filter/,u6=/paint|layout|strict|content/,u9=e=>!!e&&"none"!==e;function u8(e){let t=u1(e)?hn(e):e;return u9(t.transform)||u9(t.translate)||u9(t.scale)||u9(t.rotate)||u9(t.perspective)||!he()&&(u9(t.backdropFilter)||u9(t.filter))||u4.test(t.willChange||"")||u6.test(t.contain||"")}function he(){return null==e&&(e="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),e}function ht(e){return/^(html|body|#document)$/.test(uZ(e))}function hn(e){return uQ(e).getComputedStyle(e)}function hr(e){return u1(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if("html"===uZ(e))return e;let t=e.assignedSlot||e.parentNode||u3(e)&&e.host||uJ(e);return u3(t)?t.host:t}function ha(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let i=function e(t){let n=hi(t);return ht(n)?(t.ownerDocument||t).body:u2(n)&&u5(n)?n:e(n)}(e),a=i===(null==(r=e.ownerDocument)?void 0:r.body),o=uQ(i);if(!a)return t.concat(i,ha(i,[],n));{let e=ho(o);return t.concat(o,o.visualViewport||[],u5(i)?i:[],e&&n?ha(e):[])}}function ho(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function hs(e){let t=hn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=u2(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=uE(n)!==a||uE(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function hl(e){return u1(e)?e:e.contextElement}function hc(e){let t=hl(e);if(!u2(t))return uN(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=hs(t),o=(a?uE(n.width):n.width)/r,s=(a?uE(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}let hu=uN(0);function hh(e){let t=uQ(e);return he()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:hu}function hd(e,t,n,r){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let a=e.getBoundingClientRect(),o=hl(e),s=uN(1);t&&(r?u1(r)&&(s=hc(r)):s=hc(e));let l=(void 0===(i=n)&&(i=!1),r&&i&&r===uQ(o))?hh(o):uN(0),c=(a.left+l.x)/s.x,u=(a.top+l.y)/s.y,h=a.width/s.x,d=a.height/s.y;if(o&&r){let e=uQ(o),t=u1(r)?uQ(r):r,n=e,i=ho(n);for(;i&&t!==n;){let e=hc(i),t=i.getBoundingClientRect(),r=hn(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,u*=e.y,h*=e.x,d*=e.y,c+=a,u+=o,i=ho(n=uQ(i))}}return uY({width:h,height:d,x:c,y:u})}function hf(e,t){let n=hr(e).scrollLeft;return t?t.left+n:hd(uJ(e)).left+n}function hp(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-hf(e,n),y:n.top+t.scrollTop}}function hm(e,t,n){var r;let i;if("viewport"===t||"layoutViewport"===t)i=function(e,t,n){void 0===n&&(n="viewport");let r="layoutViewport"===n,i=uQ(e),a=uJ(e),o=i.visualViewport,s=a.clientWidth,l=a.clientHeight,c=0,u=0;if(o){let e=!he()||"fixed"===t;r?e||(c=-o.offsetLeft,u=-o.offsetTop):(s=o.width,l=o.height,e&&(c=o.offsetLeft,u=o.offsetTop))}if(0>=hf(a)){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o="stable both-edges"===getComputedStyle(a).scrollbarGutter?i/2:i;o<=25&&(s-=o)}return{width:s,height:l,x:c,y:u}}(e,n,t);else if("document"===t){let t,n,a,o,s,l;t=hr(r=uJ(e)),n=r.ownerDocument.body,a=uP(r.scrollWidth,r.clientWidth,n.scrollWidth,n.clientWidth),o=uP(r.scrollHeight,r.clientHeight,n.scrollHeight,n.clientHeight),s=-t.scrollLeft+hf(r),l=-t.scrollTop,"rtl"===hn(n).direction&&(s+=uP(r.clientWidth,n.clientWidth)-a),i={width:a,height:o,x:s,y:l}}else if(u1(t)){let e,r,a,o,s,l;r=(e=hd(t,!0,"fixed"===n)).top+t.clientTop,a=e.left+t.clientLeft,o=hc(t),s=t.clientWidth*o.x,l=t.clientHeight*o.y,i={width:s,height:l,x:a*o.x,y:r*o.y}}else{let n=hh(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return uY(i)}function hg(e){return"static"===hn(e).position}function hv(e,t){if(!u2(e)||"fixed"===hn(e).position)return null;if(t)return t(e);let n=e.offsetParent;return uJ(e)===n&&(n=n.ownerDocument.body),n}function hy(e,t){var n;let r=uQ(e);if(u7(e))return r;if(!u2(e)){let t=hi(e);for(;t&&!ht(t);){if(u1(t)&&!hg(t))return t;t=hi(t)}return r}let i=hv(e,t);for(;i&&(n=i,/^(table|td|th)$/.test(uZ(n)))&&hg(i);)i=hv(i,t);return i&&ht(i)&&hg(i)&&!u8(i)?r:i||function(e){let t=hi(e);for(;u2(t)&&!ht(t);){if(u8(t))return t;if(u7(t))break;t=hi(t)}return null}(e)||r}let hb=async function(e){let t=this.getOffsetParent||hy,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=u2(t),i=uJ(t),a="fixed"===n,o=hd(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=uN(0);if((r||!a)&&(("body"!==uZ(t)||u5(i))&&(s=hr(t)),r)){let e=hd(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}!r&&i&&(l.x=hf(i));let c=!i||r||a?uN(0):hp(i,s);return{x:o.left+s.scrollLeft-l.x-c.x,y:o.top+s.scrollTop-l.y-c.y,width:o.width,height:o.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},hx={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a="fixed"===i,o=uJ(r),s=!!t&&u7(t.floating);if(r===o||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=uN(1),u=uN(0),h=u2(r);if((h||!a)&&(("body"!==uZ(r)||u5(o))&&(l=hr(r)),h)){let e=hd(r);c=hc(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let d=!o||h||a?uN(0):hp(o,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}},getDocumentElement:uJ,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[..."clippingAncestors"===n?u7(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=ha(e,[],!1).filter(e=>u1(e)&&"body"!==uZ(e)),i=null,a="fixed"===hn(e).position,o=a?hi(e):e;for(;u1(o)&&!ht(o);){let e=hn(o),t=u8(o),n=i?i.position:a?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?i=e:r=r.filter(e=>e!==o),o=hi(o)}return t.set(e,r),r}(t,this._c):[].concat(n),r],o=hm(t,a[0],i),s=o.top,l=o.right,c=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=hm(t,a[e],i);s=uP(n.top,s),l=uC(n.right,l),c=uC(n.bottom,c),u=uP(n.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:hy,getElementRects:hb,getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){let{width:t,height:n}=hs(e);return{width:t,height:n}},getScale:hc,isElement:u1,isRTL:function(e){return"rtl"===hn(e).direction}};function hw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function h_(e,t,n,r){let i;void 0===r&&(r={});let{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,u=hl(e),h=a||o?[...u?ha(u):[],...t?ha(t):[]]:[];h.forEach(e=>{a&&e.addEventListener("scroll",n),o&&e.addEventListener("resize",n)});let d=u&&l?function(e,t,n){let r,i=null,a=uJ(e);function o(){var e;clearTimeout(r),null==(e=i)||e.disconnect(),i=null}function s(n,l){void 0===n&&(n=!1),void 0===l&&(l=1),o();let c=e.getBoundingClientRect(),{left:u,top:h,width:d,height:f}=c;if(n||t(),!d||!f)return;let p={rootMargin:-uO(h)+"px "+-uO(a.clientWidth-(u+d))+"px "+-uO(a.clientHeight-(h+f))+"px "+-uO(u)+"px",threshold:uP(0,uC(1,l))||1},m=!0;function g(t){let n=t[0].intersectionRatio;if(!hw(c,e.getBoundingClientRect()))return s();if(n!==l){if(!m)return s();n?s(!1,n):r=setTimeout(()=>{s(!1,1e-7)},1e3)}m=!1}try{i=new IntersectionObserver(g,{...p,root:a.ownerDocument})}catch(e){i=new IntersectionObserver(g,p)}i.observe(e)}let l=uQ(e),c=()=>s(n);return l.addEventListener("resize",c),s(!0),()=>{l.removeEventListener("resize",c),o()}}(u,n,o):null,f=-1,p=null;s&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),n()}),u&&!c&&p.observe(u),t&&p.observe(t));let m=c?hd(e):null;return c&&function t(){let r=hd(e);m&&!hw(m,r)&&n(),m=r,i=requestAnimationFrame(t)}(),n(),()=>{var e;h.forEach(e=>{a&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=p)||e.disconnect(),p=null,c&&cancelAnimationFrame(i)}}var hk="u">typeof document?b.useLayoutEffect:function(){};function hS(e,t){let n,r,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!hS(e[r],t[r]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){let n=i[r];if(("_owner"!==n||!e.$$typeof)&&!hS(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function hM(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hA(e,t){let n=hM(e);return Math.round(t*n)/n}function hT(e){let t=b.useRef(e);return hk(()=>{t.current=e}),t}var hC=function(e,t){let n,r;var i,a,o,s,l,c,u=uT((0,b.useState)(null),2),h=u[0];return{innerRef:u[1],style:function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,h]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,f]=b.useState(r);hS(d,r)||f(r);let[p,m]=b.useState(null),[g,v]=b.useState(null),y=b.useCallback(e=>{e!==k.current&&(k.current=e,m(e))},[]),x=b.useCallback(e=>{e!==S.current&&(S.current=e,v(e))},[]),w=a||p,_=o||g,k=b.useRef(null),S=b.useRef(null),M=b.useRef(u),A=null!=l,T=hT(l),C=hT(i),P=hT(c),E=b.useCallback(()=>{var e,r;let i,a,o;if(!k.current||!S.current)return;let s={placement:t,strategy:n,middleware:d};C.current&&(s.platform=C.current),(e=k.current,r=S.current,i=new Map,a=null!=s?s:{},o={...hx,...a.platform,_c:i},uX(e,r,{...a,platform:o})).then(e=>{let t={...e,isPositioned:!1!==P.current};O.current&&!hS(M.current,t)&&(M.current=t,s1.flushSync(()=>{h(t)}))})},[d,t,n,C,P]);hk(()=>{!1===c&&M.current.isPositioned&&(M.current.isPositioned=!1,h(e=>({...e,isPositioned:!1})))},[c]);let O=b.useRef(!1);hk(()=>(O.current=!0,()=>{O.current=!1}),[]),hk(()=>{if(w&&(k.current=w),_&&(S.current=_),w&&_){if(T.current)return T.current(w,_,E);E()}},[w,_,E,T,A]);let N=b.useMemo(()=>({reference:k,floating:S,setReference:y,setFloating:x}),[y,x]),j=b.useMemo(()=>({reference:w,floating:_}),[w,_]),L=b.useMemo(()=>{let e={position:n,left:0,top:0};if(!j.floating)return e;let t=hA(j.floating,u.x),r=hA(j.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...hM(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,j.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:E,refs:N,elements:j,floatingStyles:L}),[u,E,N,j,L])}({elements:{floating:h,reference:e},middleware:(i=[],t.flip&&i.push((a=void 0,{name:(n={name:"flip",options:a={},async fn(e){var t,n,r,i,o,s;let l,c,u,{placement:h,middlewareData:d,rects:f,initialPlacement:p,platform:m,elements:g}=e,{mainAxis:v=!0,crossAxis:y=!0,fallbackPlacements:b,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:_=!0,...k}=uL(a,e);if(null!=(t=d.arrow)&&t.alignmentOffset)return{};let S=uD(h),M=uz(p),A=uD(p)===p,T=await (null==m.isRTL?void 0:m.isRTL(g.floating)),C=b||(A||!_?[uq(p)]:(l=uq(p),[uF(p),l,uF(l)])),P="none"!==w;!b&&P&&C.push(...(c=uR(p),u=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?u$:uH;return t?uH:u$;case"left":case"right":return t?uU:uV;default:return[]}}(uD(p),"start"===w,T),c&&(u=u.map(e=>e+"-"+c),_&&(u=u.concat(u.map(uF)))),u));let E=[p,...C],O=await m.detectOverflow(e,k),N=[],j=(null==(n=d.flip)?void 0:n.overflows)||[];if(v&&N.push(O[S]),y){let e,t,n,r,i=(void 0===(s=T)&&(s=!1),e=uR(h),n=uI(t=uB(h)),r="x"===t?e===(s?"end":"start")?"right":"left":"start"===e?"bottom":"top",f.reference[n]>f.floating[n]&&(r=uq(r)),[r,uq(r)]);N.push(O[i[0]],O[i[1]])}if(j=[...j,{placement:h,overflows:N}],!N.every(e=>e<=0)){let e=((null==(r=d.flip)?void 0:r.index)||0)+1,t=E[e];if(t&&("alignment"!==y||M===uz(t)||j.every(e=>uz(e.placement)!==M||e.overflows[0]>0)))return{data:{index:e,overflows:j},reset:{placement:t}};let n=null==(i=j.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(x){case"bestFit":{let e=null==(o=j.filter(e=>{if(P){let t=uz(e.placement);return t===M||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0];e&&(n=e);break}case"initialPlacement":n=p}if(h!==n)return{reset:{placement:n}}}return{}}}).name,fn:n.fn,options:[void 0,void 0]})),"right"!==t.align&&"left"!==t.align&&i.push({name:(r={name:"size",options:s=o={apply:function(e){var t=e.rects;Object.assign(e.elements.floating.style,{width:"".concat(t.reference.width,"px")})}},async fn(e){let t,n,{placement:r,rects:i,platform:a,elements:o}=e,{apply:l=()=>{},...c}=uL(s,e),u=await a.detectOverflow(e,c),h=uD(r),d=uR(r),f="y"===uz(r),{width:p,height:m}=i.floating;"top"===h||"bottom"===h?(t=h,n=d===(await (null==a.isRTL?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(n=h,t="end"===d?"top":"bottom");let g=m-u.top-u.bottom,v=p-u.left-u.right,y=uC(m-u[t],g),b=uC(p-u[n],v),x=e.middlewareData.shift,w=!x,_=y,k=b;null!=x&&x.enabled.x&&(k=v),null!=x&&x.enabled.y&&(_=g),w&&!d&&(f?k=p-2*uP(u.left,u.right):_=m-2*uP(u.top,u.bottom)),await l({...e,availableWidth:k,availableHeight:_});let S=await a.getDimensions(o.floating);return p!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}).name,fn:r.fn,options:[o,void 0]}),i),placement:(l="right"===t.align?"end":"start",c=t.dropup?"top":"bottom","".concat(c,"-").concat(l)),strategy:t.positionFixed?"fixed":"absolute",whileElementsMounted:h_}).floatingStyles}},hP=["referenceElement","isMenuShown"],hE="u"<typeof Element?cm:Element,hO={align:s0().oneOf(["justify","left","right"]),children:s0().func.isRequired,dropup:s0().bool,flip:s0().bool,isMenuShown:s0().bool,positionFixed:s0().bool,referenceElement:s0().instanceOf(hE)},hN=function(e){var t=e.referenceElement,n=e.isMenuShown,r=ci(e,hP),i=hC(t,r);return n?r.children(i):null};hN.propTypes=hO;var hj=!!("u">typeof window&&window.document&&window.document.createElement),hL=!1,hD=!1;try{var hR={get passive(){return hL=!0},get once(){return hD=hL=!0}};hj&&(window.addEventListener("test",hR,hR),window.removeEventListener("test",hR,!0))}catch(e){}var hI=function(e,t,n,r){if(r&&"boolean"!=typeof r&&!hD){var i=r.once,a=r.capture,o=n;!hD&&i&&(o=n.__once||function e(r){this.removeEventListener(t,e,a),n.call(this,r)},n.__once=o),e.addEventListener(t,o,hL?r:a)}e.addEventListener(t,n,r)},hz=function(e,t,n,r){var i=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)},hB=function(e,t,n,r){return hI(e,t,n,r),function(){hz(e,t,n,r)}};function hF(e){return e&&e.ownerDocument||document}var hH=function(e){let t=(0,b.useRef)(e);return(0,b.useEffect)(()=>{t.current=e},[e]),t};function h$(e){let t=hH(e);return(0,b.useCallback)(function(...e){return t.current&&t.current(...e)},[t])}function hU(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}let hV=()=>{},hq=e=>e&&("current"in e?e.current:e),hY={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};var hW=function(e,t=hV,{disabled:n,clickTrigger:r="click"}={}){let i=(0,b.useRef)(!1),a=(0,b.useRef)(!1),o=(0,b.useCallback)(t=>{let n=hq(e);cM()(!!n,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),i.current=!n||!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)||0!==t.button||!!hU(n,t.target)||a.current,a.current=!1},[e]),s=h$(t=>{let n=hq(e);n&&hU(n,t.target)?a.current=!0:a.current=!1}),l=h$(e=>{i.current||t(e)});(0,b.useEffect)(()=>{var t,i;if(n||null==e)return;let a=hF(hq(e)),c=a.defaultView||window,u=null!=(t=c.event)?t:null==(i=c.parent)?void 0:i.event,h=null;hY[r]&&(h=hB(a,hY[r],s,!0));let d=hB(a,r,o,!0),f=hB(a,r,e=>{if(e===u){u=void 0;return}l(e)}),p=[];return"ontouchstart"in a.documentElement&&(p=[].slice.call(a.body.children).map(e=>hB(e,"mousemove",hV))),()=>{null==h||h(),d(),f(),p.forEach(e=>e())}},[e,n,r,o,s,l])};function hG(e){let t;if(!e||"function"==typeof e)return null;let{major:n}={major:+(t=b.version.split("."))[0],minor:+t[1],patch:+t[2]};return n>=19?e.props.ref:e.ref}let hX=()=>{};var hK=function(e,t,{disabled:n,clickTrigger:r}={}){let i=t||hX;hW(e,i,{disabled:n,clickTrigger:r});let a=h$(e=>{("Escape"===e.code||27===e.keyCode)&&i(e)});(0,b.useEffect)(()=>{if(n||null==e)return;let t=hF(hq(e)),r=(t.defaultView||window).event,i=hB(t,"keyup",e=>{if(e===r){r=void 0;return}a(e)});return()=>{i()}},[e,n,a])},hZ=function(e,t){var n=(0,b.useRef)(null);return hK(n,e,t),n},hQ=["children","onRootClose"],hJ=function(e){return(0,e.children)(hZ(e.onRootClose,ci(e,hQ)))},h0=["onBlur","onClick","onFocus","onRemove","option"];function h1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h1(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h1(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}s0().func,s0().func,s0().func,s0().func,cJ.isRequired;var h3=["active","children","className","onRemove","tabIndex"],h5=["children","option","readOnly"],h7=["ref"];function h4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h6(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h4(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h4(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var h9=(0,b.forwardRef)(function(e,t){var n=e.active,r=e.children,i=e.className,a=e.onRemove,o=e.tabIndex,s=ci(e,h3);return b.createElement("div",l8({},s,{className:cD()("rbt-token","rbt-token-removeable",{"rbt-token-active":!!n},i),ref:t,tabIndex:o||0}),r,b.createElement(uk,{className:"rbt-token-remove-button",label:"Remove",onClick:a,tabIndex:-1}))}),h8=function(e){var t=e.children,n=e.className,r=e.disabled,i=e.href,a=cD()("rbt-token",{"rbt-token-disabled":r},n);return i&&!r?b.createElement("a",{className:a,href:i},t):b.createElement("div",{className:a},t)},de=function(e){var t,n,r,i,a,o,s,l,c,u,h,d,f,p=e.children,m=e.option,g=e.readOnly,v=ci(e,h5),y=(n=(t=h6(h6({},v),{},{option:m})).onBlur,r=t.onClick,i=t.onFocus,a=t.onRemove,o=t.option,s=ci(t,h0),c=(l=uT((0,b.useState)(!1),2))[0],u=l[1],h=function(e){u(!1),n&&n(e)},d=function(){a&&a(o)},f=hZ(h,h2(h2({},s),{},{disabled:!c})),{active:c,onBlur:h,onClick:function(e){u(!0),r&&r(e)},onFocus:function(e){u(!0),i&&i(e)},onKeyDown:function(e){"Backspace"===e.key&&c&&(e.preventDefault(),d())},onRemove:cf(a)?d:void 0,ref:f}),x=y.ref,w=ci(y,h7),_=b.createElement("div",{className:"rbt-token-label"},p);return!v.disabled&&!g&&cf(w.onRemove)?b.createElement(h9,l8({},v,w,{ref:x}),_):b.createElement(h8,v,_)};function dt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return n&&(n=n.replace(n[0],n[0].toUpperCase())),["Top","Right","Bottom","Left"].map(function(r){return e["".concat(t).concat(r).concat(n)]}).join(" ")}var dn=function(){var e=un(),t=e.hintText,n=e.inputNode,r=(0,b.useRef)(null);return(0,b.useEffect)(function(){var e=function(){r.current&&n&&(r.current.scrollLeft=n.scrollLeft)};return null==n||n.addEventListener("scroll",e),function(){null==n||n.removeEventListener("scroll",e)}},[n]),(0,b.useEffect)(function(){var e,t;n&&r.current&&(e=r.current,t=window.getComputedStyle(n),e.style.borderStyle=dt(t,"border","style"),e.style.borderWidth=dt(t,"border","width"),e.style.fontSize=t.fontSize,e.style.fontWeight=t.fontWeight,e.style.height=t.height,e.style.lineHeight=t.lineHeight,e.style.margin=dt(t,"margin"),e.style.padding=dt(t,"padding"))}),{hintRef:r,hintText:t}},dr=function(e){var t=e.children,n=e.className,r=dn(),i=r.hintRef,a=r.hintText;return b.createElement("div",{className:n,style:{display:"flex",flex:1,height:"100%",position:"relative"}},t,b.createElement("input",{"aria-hidden":!0,className:"rbt-input-hint",ref:i,readOnly:!0,style:{backgroundColor:"transparent",borderColor:"transparent",boxShadow:"none",color:"rgba(0, 0, 0, 0.54)",left:0,pointerEvents:"none",position:"absolute",top:0,width:"100%"},tabIndex:-1,value:a}))},di=(0,b.forwardRef)(function(e,t){return b.createElement("input",l8({},e,{className:cD()("rbt-input-main",e.className),ref:t}))}),da=["children","className","inputClassName","inputRef","referenceElementRef","selected"],ds=function(e){var t=b.useRef(null),n=b.useRef(null),r=cG(e),i=r.children,a=r.className,o=r.inputClassName,s=(r.inputRef,r.referenceElementRef),l=r.selected,c=ci(r,da);function u(t){if(e.disabled)return void t.currentTarget.blur();var r=n.current;!r||t.currentTarget.contains(t.target)&&t.currentTarget!==t.target||(cE(r)&&(r.selectionStart=r.value.length),r.focus())}return b.createElement("div",{className:cD()("rbt-input-multi",{disabled:e.disabled},a),onClick:u,onFocus:u,ref:s,tabIndex:-1},b.createElement("div",{className:"rbt-input-wrapper",ref:t},i,b.createElement(dr,null,b.createElement(di,l8({},c,{className:o,onKeyDown:function(n){if("Backspace"===n.key&&l.length&&!e.value){n.preventDefault();var r,i=null==(r=t.current)?void 0:r.children;if(null!=i&&i.length){var a=i[i.length-2];null==a||a.focus()}}e.onKeyDown&&e.onKeyDown(n)},ref:function(t){n.current=t,e.inputRef(t)},style:{backgroundColor:"transparent",border:0,boxShadow:"none",cursor:"inherit",outline:"none",padding:0,width:"100%",zIndex:1}})))))},dl=["inputRef","referenceElementRef"],dc=function(e){var t=e.inputRef,n=e.referenceElementRef,r=ci(e,dl);return b.createElement(dr,null,b.createElement(di,l8({},cG(r),{ref:function(e){t(e),n(e)}})))},du={children:s0().string.isRequired,highlightClassName:s0().string,search:s0().string.isRequired},dh=function(e){var t=e.children,n=e.highlightClassName,r=void 0===n?"rbt-highlight-text":n,i=e.search;if(!i||!t)return b.createElement(b.Fragment,null,t);for(var a=0,o=t,s=[];o;){var l=cN(o,i);if(!l){s.push(o);break}var c=o.slice(0,l.start);c&&s.push(c);var u=o.slice(l.start,l.end);s.push(b.createElement("mark",{className:r,key:a},u)),a+=1,o=o.slice(l.end)}return b.createElement(b.Fragment,null,s)};dh.propTypes=du;let dd=e=>"object"==typeof e&&null!=e&&1===e.nodeType,df=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,dp=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n,r=getComputedStyle(e,null);return df(r.overflowY,t)||df(r.overflowX,t)||!!(n=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e))&&(n.clientHeight<e.scrollHeight||n.clientWidth<e.scrollWidth)}return!1},dm=(e,t,n,r,i,a,o,s)=>a<e&&o>t||a>e&&o<t?0:a<=e&&s<=n||o>=t&&s>=n?a-e-r:o>t&&s<n||a<e&&s>n?o-t+i:0,dg=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},dv=(e,t)=>{var n,r,i,a;let o;if("u"<typeof document)return[];let{scrollMode:s,block:l,inline:c,boundary:u,skipOverflowHiddenElements:h}=t,d="function"==typeof u?u:e=>e!==u;if(!dd(e))throw TypeError("Invalid target");let f=document.scrollingElement||document.documentElement,p=[],m=e;for(;dd(m)&&d(m);){if((m=dg(m))===f){p.push(m);break}null!=m&&m===document.body&&dp(m)&&!dp(document.documentElement)||null!=m&&dp(m,h)&&p.push(m)}let g=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,v=null!=(a=null==(i=window.visualViewport)?void 0:i.height)?a:innerHeight,{scrollX:y,scrollY:b}=window,{height:x,width:w,top:_,right:k,bottom:S,left:M}=e.getBoundingClientRect(),{top:A,right:T,bottom:C,left:P}={top:parseFloat((o=window.getComputedStyle(e)).scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0},E="start"===l||"nearest"===l?_-A:"end"===l?S+C:_+x/2-A+C,O="center"===c?M+w/2-P+T:"end"===c?k+T:M-P,N=[];for(let e=0;e<p.length;e++){let t=p[e],{height:n,width:r,top:i,right:a,bottom:o,left:u}=t.getBoundingClientRect();if("if-needed"===s&&_>=0&&M>=0&&S<=v&&k<=g&&(t===f&&!dp(t)||_>=i&&S<=o&&M>=u&&k<=a))break;let h=getComputedStyle(t),d=parseInt(h.borderLeftWidth,10),m=parseInt(h.borderTopWidth,10),A=parseInt(h.borderRightWidth,10),T=parseInt(h.borderBottomWidth,10),C=0,P=0,j="offsetWidth"in t?t.offsetWidth-t.clientWidth-d-A:0,L="offsetHeight"in t?t.offsetHeight-t.clientHeight-m-T:0,D="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,R="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(f===t)C="start"===l?E:"end"===l?E-v:"nearest"===l?dm(b,b+v,v,m,T,b+E,b+E+x,x):E-v/2,P="start"===c?O:"center"===c?O-g/2:"end"===c?O-g:dm(y,y+g,g,d,A,y+O,y+O+w,w),C=Math.max(0,C+b),P=Math.max(0,P+y);else{C="start"===l?E-i-m:"end"===l?E-o+T+L:"nearest"===l?dm(i,o,n,m,T+L,E,E+x,x):E-(i+n/2)+L/2,P="start"===c?O-u-d:"center"===c?O-(u+r/2)+j/2:"end"===c?O-a+A+j:dm(u,a,r,d,A+j,O,O+w,w);let{scrollLeft:e,scrollTop:s}=t;C=0===R?0:Math.max(0,Math.min(s+C/R,t.scrollHeight-n/R+L)),P=0===D?0:Math.max(0,Math.min(e+P/D,t.scrollWidth-r/D+j)),E+=s-C,O+=e-P}N.push({el:t,top:C,left:P})}return N};var dy=["label","onClick","option","position"];function db(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?db(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):db(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}cJ.isRequired,s0().number;var dw=["active","children","className","disabled","onClick"],d_=(0,b.forwardRef)(function(e,t){var n=e.active,r=e.children,i=e.className,a=e.disabled,o=e.onClick,s=ci(e,dw);return b.createElement("a",l8({},s,{className:cD()("dropdown-item",{active:n,disabled:a},i),href:s.href||"#",onClick:function(e){e.preventDefault(),!a&&o&&o(e)},ref:t}),r)});function dk(e){var t,n,r,i,a,o,s,l,c,u,h,d,f,p,m,g;return b.createElement(d_,(t=e.label,n=e.onClick,r=e.option,i=e.position,a=ci(e,dy),s=(o=un()).activeIndex,l=o.id,c=o.isOnlyResult,u=o.onActiveItemChange,h=o.onInitialItemChange,d=o.onMenuItemClick,f=o.setItem,p=(0,b.useRef)(null),(0,b.useEffect)(function(){0===i&&h(r)}),(0,b.useEffect)(function(){if(i===s){u(r);var e=p.current;e&&function(e,t){let n;if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let r={top:parseFloat((n=window.getComputedStyle(e)).scrollMarginTop)||0,right:parseFloat(n.scrollMarginRight)||0,bottom:parseFloat(n.scrollMarginBottom)||0,left:parseFloat(n.scrollMarginLeft)||0};if("object"==typeof t&&"function"==typeof t.behavior)return t.behavior(dv(e,t));let i="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:n,top:a,left:o}of dv(e,!1===t?{block:"end",inline:"nearest"}:t===Object(t)&&0!==Object.keys(t).length?t:{block:"start",inline:"nearest"})){let e=a-r.top+r.bottom,t=o-r.left+r.right;n.scroll({top:e,left:t,behavior:i})}}(e,{boundary:e.parentNode,scrollMode:"if-needed"})}},[s,u,r,i]),m=(0,b.useCallback)(function(e){d(r,e),n&&n(e)},[n,d,r]),g=c||s===i,f(r,i),dx(dx({},a),{},{active:g,"aria-label":t,"aria-selected":g,id:cR(l,i),onClick:m,onMouseDown:cV,ref:p,role:"option"})))}var dS=["emptyLabel","innerRef","maxHeight","style"];function dM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dM(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var dT={"aria-label":s0().string,emptyLabel:s0().node,id:cZ(s0().oneOfType([s0().number,s0().string]),cQ),maxHeight:s0().string},dC=function(e){var t=e.emptyLabel,n=e.innerRef,r=e.maxHeight,i=e.style,a=ci(e,dS),o=0===b.Children.count(a.children)?b.createElement(d_,{disabled:!0,role:"option"},void 0===t?"No matches found.":t):a.children;return b.createElement("div",l8({},a,{"aria-label":a["aria-label"]||"menu-options",className:cD()("rbt-menu","dropdown-menu","show",a.className),onMouseDown:cV,ref:n,role:"listbox",style:dA(dA({},i),{},{display:"block",maxHeight:void 0===r?"300px":r,overflow:"auto"})}),o)};dC.propTypes=dT,dC.Divider=function(){return b.createElement("div",{className:"dropdown-divider",role:"separator"})},dC.Header=function(e){return b.createElement("div",l8({},e,{className:"dropdown-header",role:"heading"}))};var dP=["labelKey","newSelectionPrefix","options","paginationText","renderMenuItemChildren","text"],dE={newSelectionPrefix:s0().node,paginationText:s0().node,renderMenuItemChildren:s0().func};function dO(e,t){return b.createElement(dh,{search:t.text},cv(e,t.labelKey))}var dN=function(e){var t=e.labelKey,n=e.newSelectionPrefix,r=void 0===n?"New selection: ":n,i=e.options,a=e.paginationText,o=void 0===a?"Display additional results...":a,s=e.renderMenuItemChildren,l=void 0===s?dO:s,c=e.text,u=ci(e,dP);return b.createElement(dC,l8({},u,{key:c}),i.map(function(n,i){var a=cv(n,t),s={disabled:!!cw(n,"disabled"),label:a,option:n,position:i};return cw(n,"customOption")?b.createElement(dk,l8({},s,{className:"rbt-menu-custom-option",key:i,label:a}),r,b.createElement(dh,{search:c},a)):cw(n,"paginationOption")?b.createElement(b.Fragment,{key:"pagination-option-divider"},b.createElement(dC.Divider,null),b.createElement(dk,l8({},s,{className:"rbt-menu-pagination-option",label:cp(o)?o:""}),o)):b.createElement(dk,l8({},s,{key:i}),l(n,e,i))}))};function dj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dj(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}dN.propTypes=dE;var dD={clearButton:s0().bool,inputProps:cZ(s0().object,function(e){var t=e.inputProps;t&&"[object Object]"===Object.prototype.toString.call(t)&&cX.forEach(function(e){var n=e.alt,r=e.prop;cT(!t[r],"The `".concat(r,"` property of `inputProps` will be ignored.").concat(n?" Use the top-level `".concat(n,"` prop instead."):null))})}),isInvalid:s0().bool,isLoading:s0().bool,isValid:s0().bool,renderInput:s0().func,renderMenu:s0().func,renderToken:s0().func,size:cK},dR=["align","dropup","flip","positionFixed"],dI=function(e){c9(r,e);var t,n=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=ue(r);return e=t?Reflect.construct(n,arguments,ue(this).constructor):n.apply(this,arguments),c8(this,e)});function r(){var e;c3(this,r);for(var t=arguments.length,i=Array(t),a=0;a<t;a++)i[a]=arguments[a];return cn(c4(e=n.call.apply(n,[this].concat(i))),"_referenceElement",null),cn(c4(e),"referenceElementRef",function(t){e._referenceElement=t}),cn(c4(e),"_renderInput",function(t,n){var r=e.props,i=r.isInvalid,a=r.isValid,o=r.multiple,s=r.renderInput,l=r.renderToken,c=r.size;if(cf(s))return s(t,n);var u=dL(dL({},t),{},{isInvalid:i,isValid:a,size:c});if(!o)return b.createElement(dc,u);var h=n.labelKey,d=n.onRemove,f=n.selected;return b.createElement(ds,l8({},u,{placeholder:f.length?"":t.placeholder,selected:f}),f.map(function(e,t){return(l||function(e,t,n){return b.createElement(de,{disabled:t.disabled,key:n,onRemove:t.onRemove,option:e,tabIndex:t.tabIndex},cv(e,t.labelKey))})(e,dL(dL({},u),{},{labelKey:h,onRemove:d}),t)}))}),cn(c4(e),"_renderMenu",function(t,n,r){var i=e.props,a=i.emptyLabel,o=i.id,s=i.maxHeight,l=i.newSelectionPrefix,c=i.paginationText,u=i.renderMenu,h=i.renderMenuItemChildren;return(u||function(e,t,n){return b.createElement(dN,l8({},t,{labelKey:n.labelKey,options:e,text:n.text}))})(t,dL(dL({},n),{},{emptyLabel:a,id:o,maxHeight:s,newSelectionPrefix:l,paginationText:c,renderMenuItemChildren:h}),r)}),cn(c4(e),"_renderAux",function(t){var n,r=t.onClear,i=t.selected,a=e.props,o=a.clearButton,s=a.disabled,l=a.isLoading,c=a.size;return l?n=b.createElement(uM,null):o&&!s&&i.length&&(n=b.createElement(uk,{onClick:r,onMouseDown:cV,size:c})),n?b.createElement("div",{className:cD()("rbt-aux",{"rbt-aux-lg":"lg"===c})},n):null}),e}return c7(r,[{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.className,i=t.instanceRef,a=t.open,o=t.options,s=t.style;return b.createElement(ux,l8({},this.props,{options:o,ref:i}),function(t){var i=t.hideMenu,o=t.isMenuShown,l=t.results,c=e._renderAux(t);return b.createElement(hJ,{disabled:a||!o,onRootClose:i},function(i){return b.createElement("div",{className:cD()("rbt",{"has-aux":!!c,"is-invalid":e.props.isInvalid,"is-valid":e.props.isValid},r),ref:i,style:dL(dL({},s),{},{outline:"none",position:"relative"}),tabIndex:-1},e._renderInput(dL(dL({},t.getInputProps(e.props.inputProps)),{},{referenceElementRef:e.referenceElementRef}),t),b.createElement(hN,l8({},cg(e.props,dR),{isMenuShown:o,referenceElement:e._referenceElement}),function(n){return e._renderMenu(l,n,t)}),c,cf(n)?n(t):n)})})}}]),r}(b.Component);cn(dI,"propTypes",dD),cn(dI,"defaultProps",{isLoading:!1});var dz=(0,b.forwardRef)(function(e,t){return b.createElement(dI,l8({},e,{instanceRef:t}))}),dB=(0,b.forwardRef)(function(e,t){var n,r,i,a,o,s,l,c,u,h,d,f,p,m,g,v,y,x,w,_,k,S,M,A,T,C;let P;return b.createElement(dz,l8({},(n=e.allowNew,i=void 0===(r=e.delay)?200:r,a=e.emptyLabel,o=e.isLoading,l=void 0===(s=e.minLength)?2:s,c=e.onInputChange,u=e.onSearch,d=void 0===(h=e.options)?[]:h,p=void 0===(f=e.promptText)?"Type to search...":f,g=void 0===(m=e.searchText)?"Searching...":m,y=void 0===(v=e.useCache)||v,x=ci(e,c0),w=(0,b.useRef)({}),_=(0,b.useRef)(null),k=(0,b.useRef)(e.defaultInputValue||""),S=function(){let[,e]=(0,b.useReducer)(e=>!e,!1);return e}(),P=(0,b.useRef)(null),(0,b.useEffect)(()=>{P.current=e}),M=P.current,A=(0,b.useCallback)(function(e){if(k.current=e,e&&(!l||!(e.length<l))){if(y&&w.current[e])return void S();u(e)}},[S,l,u,y]),(0,b.useEffect)(function(){return _.current=co()(A,i),function(){_.current&&_.current.cancel()}},[i,A]),(0,b.useEffect)(function(){!o&&M&&M.isLoading&&y&&(w.current[k.current]=d)}),T=(0,b.useCallback)(function(e,t){c&&c(e,t),_.current&&_.current(e)},[c]),C=w.current[k.current],c2(c2({},x),{},{allowNew:cf(n)?n:n&&!o,emptyLabel:k.current.length?o?g:a:p,isLoading:o,minLength:l,onInputChange:T,options:y&&C?C:d})),{ref:t}))});let dF=e=>{let{label:t,position:n,value:r}=e;if(n<0||!r)return(0,v.jsx)("span",{children:t});let i=t.substring(0,n),a=t.slice(n,n+r.length),o=t.substring(n+r.length);return(0,v.jsxs)("span",{children:[i,(0,v.jsx)("b",{children:a}),o]})};dF.propTypes={label:s0().string.isRequired,position:s0().number.isRequired,value:s0().string.isRequired};let dH=e=>{let{onClear:t}=e;return(0,v.jsx)("button",{type:"reset",title:"Clear search",onClick:t,"aria-label":"clear search",children:(0,v.jsx)(a7,{name:"error",isPresentational:!0})})};function d$(e){let t=e.dateLastIndexed||i8(),n=e.date_received_max,r=e.date_received_min;if(id()(n).isSame(t)&&id()(r).isSame(i_)){e.dateRange="All";return}let i={"3y":id()(n).subtract(3,"years"),"3m":id()(n).subtract(3,"months"),"6m":id()(n).subtract(6,"months"),"1y":id()(n).subtract(1,"year")},a=Object.keys(i),o=!1;for(let t=0;t<a.length&&!o;t++){let n=a[t];id()(r).isSame(i[n],"day")&&(e.dateRange=n,o=!0)}o||(e.dateRange="")}function dU(e){let{date_received_min:t,date_received_max:n,dateInterval:r}=e;ag(t,n)&&"Day"===r&&(e.dateInterval="Week",e.trendsDateWarningEnabled=!0),ag(t,n)||(e.trendsDateWarningEnabled=!1)}function dV(e,t){return e&&e[t]?e[t].join("_"):""}function dq(e,t){return{from:(e-1)*t.size,page:e,searchAfter:dV(t,e)}}function dY(e){let t={};Object.keys(e).forEach(n=>{var r;if(!e[n])return;let i=e[n];-1!==iO.indexOf(n)&&(i="string"==typeof(r=i)?r.slice(0,10):"object"==typeof r&&null!==r?id()(r).toISOString().slice(0,10):""),-1!==iL.indexOf(n)&&(i=["yes","true"].includes(String(i).toLowerCase())),dG[n]?t[dG[n]]=i:t[n]=i});let n=[].concat([].concat(["search_term","field"],iO,iE,iL),{List:["frm","search_after","size","sort","format","no_aggs"],Map:[],Trends:["lens","focus","sub_lens","sub_lens_depth","trend_interval","trend_depth"]}[t.tab]);return Object.keys(t).includes("format")&&["size","format","no_aggs"].forEach(e=>{n.includes(e)||n.push(e)}),"?"+i0(Object.keys(t).filter(e=>n.includes(e)).reduce((e,n)=>(e[n]=t[n],e),{}))}dH.propTypes={onClear:s0().func.isRequired};let dW={company_received_max:"",company_received_min:"",dateInterval:"Month",dateRange:"",dateLastIndexed:"",date_received_max:"",date_received_min:"",from:0,page:1,searchAfter:"",searchField:"all",searchText:"",size:25,sort:"created_date_desc",trendsDateWarningEnabled:!1},dG={searchAfter:"search_after",searchText:"search_term",searchField:"field",from:"frm"},dX=nW({name:"query",initialState:dW,reducers:{dateIntervalChanged:{reducer:(e,t)=>{e.dateInterval=av(t.payload,"dateInterval"),dU(e)}},dateRangeChanged:{reducer:(e,t)=>{let n=av(t.payload,"dateRange"),r=iy(id()(i8())),i={All:iy(id()(i_)),"3m":iy(id()(r).subtract(3,"months")),"6m":iy(id()(r).subtract(6,"months")),"1y":iy(id()(r).subtract(1,"year")),"3y":iy(id()(r).subtract(3,"years"))};e.dateRange=n,e.date_received_min=i[n]?i[n]:e.date_received_min,e.date_received_max=r,dU(e)}},companyReceivedDateChanged:{reducer:(e,t)=>{let{maxDate:n,minDate:r}=t.payload;r=id()(r).isValid()?iy(id()(r).startOf("day")):null,n=id()(n).isValid()?iy(id()(n).startOf("day")):null,e.company_received_min=r,e.company_received_max=n},prepare:(e,t)=>({payload:{minDate:e,maxDate:t}})},datesChanged:{reducer:(e,t)=>{let{maxDate:n,minDate:r}=t.payload;r=id()(r).isValid()?iy(id()(r).startOf("day")):null,n=id()(n).isValid()?iy(id()(n).startOf("day")):null;let i=e.date_received_min!==r||e.date_received_max!==n,a=((e,t,n)=>{let r=n?id()(n):i8(),i=id()(t).startOf("day"),a=id()(e).startOf("day");if(0!==i.diff(r,"days"))return"";if(id()(e).isSame(i_,"day"))return"All";let o=i.diff(a,"years",!0);if(3===o||1===o)return o+"y";let s=i.diff(a,"months",!0);return 6===s||3===s?s+"m":""})(r,n,e.dateLastIndexed);a&&i?e.dateRange=a:delete e.dateRange,e.date_received_min=r||e.date_received_min,e.date_received_max=n||e.date_received_max,dU(e)},prepare:(e,t)=>({payload:{minDate:e,maxDate:t}})},searchFieldChanged:{reducer:(e,t)=>{e.searchField=t.payload}},searchTextChanged:{reducer:(e,t)=>{e.searchText=t.payload}},trendsDateWarningDismissed:{reducer:e=>{e.trendsDateWarningEnabled=!1}},prevPageShown:{reducer:(e,t)=>{let n=t.payload,r=e.page-1,i=dq(r,e);e.page=i.page,e.from=i.from,e.searchAfter=dV(n,r)}},nextPageShown:{reducer:(e,t)=>{let n=t.payload,r=e.page+1,i=dq(r,e);e.page=i.page,e.from=i.from,e.searchAfter=dV(n,r)}},sizeChanged:{reducer:(e,t)=>{e.size=av(t.payload,"size")}},sortChanged:{reducer:(e,t)=>{e.sort=av(t.payload,"sort")}}},extraReducers:e=>{e.addCase("filters/filtersCleared",e=>{e.dateRange="All",e.company_received_max="",e.company_received_min="",e.date_received_min=iM,e.date_received_max=e.dateLastIndexed,e.company_received_max="",e.company_received_min=""}).addCase("routes/routeChanged",(e,t)=>{let n,{params:r}=t.payload;["dateRange","dateInterval","searchField","searchText","sort"].forEach(t=>{r[t]&&(e[t]=av(r[t],t))}),iO.forEach(t=>{var n;void 0!==r[t]&&id()(r[t]).isValid()&&(e[t]=(n=r[t],id()(n).isValid()?iy(n):null))});let i=i3(r,"page",dW.page),a=i3(r,"size",dW.size);if(e.page=parseInt(i,10),e.size=parseInt(a,10),r.search_after&&(e.searchAfter=r.search_after),(n=Object.keys(r)).includes("dateRange")&&!n.includes("date_received_min")&&!n.includes("date_received_max")||"All"===r.dateRange){let t={payload:r.dateRange};dX.caseReducers.dateRangeChanged(e,t)}d$(e)}).addMatcher(aH.endpoints.getMeta.matchFulfilled,(e,t)=>{let{payload:n}=t;e.dateLastIndexed=id()(n._meta.last_updated).startOf("day").format("YYYY-MM-DD"),window.MAX_DATE=iy(id()(e.dateLastIndexed).startOf("day")),e.date_received_max||(e.date_received_max=iy(id()(e.dateLastIndexed))),e.date_received_min||(e.date_received_min=iy(id()(e.dateLastIndexed).subtract(3,"years"))),d$(e)}).addMatcher(nE(dK,dZ,dJ,dQ,ly,lb,l_,lx,lw,lk,lS,d3,d5,d7,d4,ls,lC),e=>{e.from=0,e.page=1,e.searchAfter=""})}}),{companyReceivedDateChanged:dK,datesChanged:dZ,dateRangeChanged:dQ,dateIntervalChanged:dJ,trendsDateWarningDismissed:d0,nextPageShown:d1,prevPageShown:d2,searchFieldChanged:d3,searchTextChanged:d5,sizeChanged:d7,sortChanged:d4}=dX.actions;var d6=dX.reducer;let d9=e=>{let{ariaLabel:t,defaultValue:n="",fieldName:r,htmlId:i,isDisabled:a=!1,handleChange:o,handleClear:s,handlePressEnter:l,hasClearButton:c=!1,hasSearchButton:u=!1,handleSelectionOverride:h,maxResults:d=5,placeholder:f="Enter your search text"}=e,p=ta(),m=(0,b.useRef)(),g=ts(lF),y=ts(lN),[x,w]=(0,b.useState)(n),[_,k]=(0,b.useState)(c&&(!!n||!!x)),[S,M]=(0,b.useState)(!1);(0,b.useEffect)(()=>{m.current.setState({text:n}),w(m.current.inputNode.value),""===n?(m.current.clear(),k(!1)):k(!0)},[n]);let A=(0,b.useCallback)(e=>{o&&o(e),M(!0),k(!!e),w(e)},[o,M,w]),T="company"===r?"company":"zip",C=Object.assign({},g,y);C.searchAfter="";let P=dY(C)+"&text="+encodeURIComponent(x),{currentData:E,isFetching:O,isLoading:N}=aW({url:"_suggest_".concat(T,"/").concat(P)},{skip:!x}),j=E?E.map(e=>({key:e,label:e,position:e.toLowerCase().indexOf(x.toLowerCase()),value:x})):[];return(0,v.jsx)("section",{className:"typeahead",children:(0,v.jsxs)("div",{className:"o-search-input",children:[(0,v.jsxs)("div",{className:"o-search-input__input",children:[(0,v.jsx)("label",{"aria-label":t,className:"o-search-input__input-label",htmlFor:i,children:(0,v.jsx)(a7,{name:"search",isPresentational:!0})}),(0,v.jsx)(dB,{id:i,minLength:1,className:"typeahead-selector",defaultInputValue:n,delay:250,disabled:a,filterBy:()=>!0,inputProps:{id:i,className:"a-text-input a-text-input--full"},isLoading:N||O,ref:m,onInputChange:A,onChange:e=>{h?h(e):p(lk(r,[e[0].key])),w(""),m.current.clear(),w("")},onKeyDown:e=>{l&&"Enter"===e.key&&(l(e),M(!1))},onSearch:A,options:j,maxResults:d,placeholder:f,renderMenuItemChildren:e=>(0,v.jsx)("li",{className:"typeahead-option",children:(0,v.jsx)(dF,{label:e.label,position:e.position,value:e.value},e.key)}),open:S,promptText:"",searchText:"",emptyLabel:x?"No matches found":"",useCache:!1}),!!_&&(0,v.jsx)(dH,{onClear:()=>{s&&s(),m.current.clear(),w(""),k(!1)}})]}),!!u&&(0,v.jsx)(sF,{type:"submit",label:"Search"})]})})};d9.propTypes={ariaLabel:s0().string.isRequired,defaultValue:s0().string,fieldName:s0().string.isRequired,isDisabled:s0().bool,handleChange:s0().func,handleClear:s0().func,handlePressEnter:s0().func,handleSelectionOverride:s0().func,hasClearButton:s0().bool,hasSearchButton:s0().bool,htmlId:s0().string.isRequired,maxResults:s0().number,placeholder:s0().string};let d8="company",fe=()=>{let{data:e,error:t}=l0(),n=ts(lj),r=ts(l7),i=ts(l4),a=structuredClone(t?[]:(null==e?void 0:e.company)||[]),o=r&&"Company"===i;return a.forEach(e=>{e.disabled=!!(o&&e.key!==r)}),(0,v.jsxs)(lg,{title:"Company name",desc:"The complaint is about this company.",className:"aggregation company",children:[(0,v.jsx)(d9,{fieldName:d8,id:"filter-company-typeahead",label:"Start typing to begin listing companies",placeholder:"Enter company name",ariaLabel:"Company Search",htmlId:d8+"-typeahead"}),(0,v.jsx)(l2,{fieldName:d8,options:a,selections:n})]})};var ft=i(6336),fn=i.n(ft),fr=i(8657),fi=i.n(fr);id().extend(fn()),id().extend(fi());let fa=()=>{let e="company_received",t=ts(l$),n=ts(lH),r=id()(t).isValid()?iy(t):"",i=id()(n).isValid()?iy(n):"",[a,o]=(0,b.useState)(null),[s,l]=(0,b.useState)(null),c=ta(),u=(0,b.useRef)(),h=(0,b.useRef)(),d=null!=a?a:r,f=null!=s?s:i,p=(0,b.useMemo)(()=>{let e=[];return id()(d).isAfter(f)&&e.push("'From' date must be less than 'through' date"),id()(d).isBefore(iM)&&e.push("'From' date must be after "+id()(iM).format(ik)),id()(f).isAfter(iS)&&e.push("'Through' date must be before "+id()(iS).format(ik)),e},[d,f]),m=()=>{let e=f,r=d;r&&!id()(d).isValid()&&(u.current.value="",r=""),e&&!id()(f).isValid()&&(h.current.value="",e=""),(t!==r||n!==e)&&c(dK(r,e)),o(null),l(null)},g=(0,b.useMemo)(()=>{let e=["a-text-input"];return(id()(d).isBefore(iM)||id()(d).isAfter(f))&&e.push("a-text-input--error"),e.join(" ")},[d,f]),y=(0,b.useMemo)(()=>{let e=["a-text-input"];return(id()(f).isAfter(iS)||id()(f).isBefore(d))&&e.push("a-text-input--error"),e.join(" ")},[d,f]);return(0,v.jsx)(lg,{title:"The date the CFPB sent the complaint to the company",className:"aggregation date-filter",desc:"",children:(0,v.jsxs)("div",{children:[(0,v.jsxs)("ul",{className:"date-inputs",children:[(0,v.jsxs)("li",{children:[(0,v.jsx)("label",{className:"a-label a-label__heading",htmlFor:"".concat(e,"-from"),children:"From"}),(0,v.jsx)("div",{className:"o-search-input",children:(0,v.jsx)("div",{className:"o-search-input__input",children:(0,v.jsx)("input",{id:"".concat(e,"-from"),className:g,onBlur:m,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"===e.key&&u.current.blur()},min:iM,max:iS,ref:u,placeholder:ik,type:"date",value:d})})})]}),(0,v.jsxs)("li",{children:[(0,v.jsx)("label",{className:"a-label a-label__heading",htmlFor:"".concat(e,"-through"),children:"Through"}),(0,v.jsx)("div",{className:"o-search-input",children:(0,v.jsx)("div",{className:"o-search-input__input",children:(0,v.jsx)("input",{id:"".concat(e,"-through"),className:y,onBlur:m,onChange:e=>l(e.target.value),onKeyDown:e=>{"Enter"===e.key&&h.current.blur()},min:iM,max:iS,placeholder:ik,ref:h,type:"date",value:f})})})]})]}),p.length?(0,v.jsx)("div",{className:"a-form-alert a-form-alert--error",role:"alert",children:p.map((e,t)=>(0,v.jsxs)("div",{children:[(0,v.jsx)("span",{"aria-hidden":"true",children:(0,v.jsx)(a7,{name:"error-round",isPresentational:!0})}),(0,v.jsx)("div",{className:"a-form-alert__text",children:e})]},t))}):null]})})},fo=e=>e.view.hasAdvancedSearchTips,fs=e=>e.view.expandedRows,fl=e=>e.view.hasFilters,fc=e=>e.view.isPrintMode,fu=e=>e.view.showTour,fh=e=>e.view.tab,fd=e=>e.view.width,ff=e=>e.view.modalTypeShown,fp=()=>{let e=ta(),t=ts(lY),n=ts(fh);return(0,v.jsxs)("section",{className:"date-ranges",children:[(0,v.jsx)("p",{children:"Date range (Click to modify range)"}),(0,v.jsx)("div",{className:"m-btn-group",children:Object.keys(ij).map(r=>{let i;return(0,v.jsx)(sF,{label:r,"aria-label":ij[r],className:(i=["a-btn","date-selector","range-"+r],r===t&&i.push("selected"),i.join(" ").toLowerCase()),title:ij[r],onClick:()=>{t!==r&&(ai("Button",n+":"+r),e(dQ(r)))}},r)})})]})};id().extend(fn()),id().extend(fi()),id().extend(iv());let fm=()=>{let e="date_received",t=ts(lq),n=ts(lV),r=id()(t).isValid()?ix(t):"",i=id()(n).isValid()?ix(n):"",[a,o]=(0,b.useState)(null),[s,l]=(0,b.useState)(null),c=ta(),u="'Through' date cannot be later than "+ib(iS),h=(0,b.useRef)(),d=(0,b.useRef)(),f=null!=a?a:r,p=null!=s?s:i,m=(0,b.useMemo)(()=>id()(f).isAfter(p)?"'From' date must be less than 'through' date":id()(f).isSame(p)?"'From' date cannot be the same as 'Through' date":!!id()(p).isAfter(iS)&&u,[u,f,p]),g=()=>{let e=f,t=p;if(i5([!id()(f).isValid(),id()(f).isBefore(iM),id()(f).isAfter(iS),!h.current.value])&&(h.current.value=iM,e=iM),i5([!id()(p).isValid(),id()(p).isAfter(iS),id()(p).isBefore(iM),id()(p).isBefore(f),!d.current.value])&&(d.current.value=iS,t=iS),id()(t).isAfter(e)){c(dZ(e,t)),o(null),l(null);return}o(e),l(t)},y=(0,b.useMemo)(()=>{let e=["a-text-input"];return i5([!id()(f).isValid(),id()(f).isBefore(iM),id()(f).isAfter(p),id()(f).isSame(p)])&&e.push("a-text-input--error"),e.join(" ")},[f,p]),x=(0,b.useMemo)(()=>{let e=["a-text-input"];return i5([!id()(p).isValid(),id()(p).isAfter(iS),id()(p).isBefore(f),id()(p).isSame(f)])&&e.push("a-text-input--error"),e.join(" ")},[f,p]);return(0,v.jsx)(lg,{title:"Date CFPB received the complaint",className:"aggregation date-filter",desc:"",children:(0,v.jsxs)("div",{children:[(0,v.jsxs)("p",{className:"u-mt15",children:[" ","CFPB updated product and issue options in April 2017 and August 2023."," ",(0,v.jsx)("a",{href:"https://www.consumerfinance.gov/data-research/consumer-complaints/#past-changes",target:"_blank",rel:"noopener noreferrer","aria-label":"Learn more about Product and\n Issue changes (opens in new window)",children:"Learn more"})]}),(0,v.jsxs)("ul",{className:"date-inputs",children:[(0,v.jsxs)("li",{children:[(0,v.jsx)("label",{className:"a-label a-label__heading",htmlFor:"".concat(e,"-from"),children:"From"}),(0,v.jsx)("div",{className:"o-search-input",children:(0,v.jsx)("div",{className:"o-search-input__input",children:(0,v.jsx)("input",{id:"".concat(e,"-from"),className:y,onBlur:g,onChange:e=>{o(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&h.current.blur()},min:iM,max:iS,ref:h,placeholder:ik,type:"date",value:f})})})]}),(0,v.jsxs)("li",{children:[(0,v.jsx)("label",{className:"a-label a-label__heading",htmlFor:"".concat(e,"-through"),children:"Through"}),(0,v.jsx)("div",{className:"o-search-input",children:(0,v.jsx)("div",{className:"o-search-input__input",children:(0,v.jsx)("input",{id:"".concat(e,"-through"),className:x,onBlur:g,onChange:e=>{l(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&d.current.blur()},min:iM,max:iS,placeholder:ik,ref:d,type:"date",value:p})})})]})]}),(0,v.jsx)(fp,{}),m?(0,v.jsxs)("div",{className:"a-form-alert a-form-alert--error",role:"alert",children:[(0,v.jsx)("span",{"aria-hidden":"true",children:(0,v.jsx)(a7,{name:"error-round",isPresentational:!0})}),(0,v.jsx)("span",{className:"a-form-alert__text",children:m+" "})]}):null]})})},fg=e=>{let{ariaLabel:t,htmlId:n,isDisabled:r=!1,handleChange:i,handleInputChange:a,maxResults:o=5,options:s,placeholder:l="Enter your search text"}=e,c=(0,b.useRef)(),[u,h]=(0,b.useState)(""),d=()=>{c.current.clear(),h("")};return(0,v.jsx)("section",{className:"typeahead",children:(0,v.jsx)("div",{className:"o-search-input",children:(0,v.jsxs)("div",{className:"o-search-input__input",children:[(0,v.jsx)("label",{"aria-label":t,className:"o-search-input__input-label",htmlFor:n,children:(0,v.jsx)(a7,{name:"search",isPresentational:!0})}),(0,v.jsx)(dz,{id:n,minLength:1,className:"typeahead-selector",disabled:r,isLoading:!1,ref:c,onChange:e=>{i(e),d()},onInputChange:e=>{a(e),h(e)},options:s,maxResults:o,placeholder:l,renderMenuItemChildren:e=>(0,v.jsx)("li",{className:"typeahead-option",children:(0,v.jsx)(dF,{label:e.label,position:e.position,value:e.value},e.key)}),inputProps:{id:n,className:"a-text-input a-text-input--full"}}),!!u&&(0,v.jsx)(dH,{onClear:d})]})})})};fg.propTypes={ariaLabel:s0().string.isRequired,isDisabled:s0().bool,handleChange:s0().func.isRequired,handleInputChange:s0().func.isRequired,htmlId:s0().string.isRequired,maxResults:s0().number,options:s0().array,placeholder:s0().string};let fv="state",fy=()=>{let{data:e,error:t}=l0(),n=structuredClone(t?[]:(null==e?void 0:e.state)||[]),r=ta(),i=ts(lL),a=e=>lE(e),o=Object.keys(iB).map(e=>{let t=a(e);return{key:e,label:t,position:0,normalized:t.toLowerCase(),value:e}}),[s,l]=(0,b.useState)(o);return(0,v.jsxs)(lg,{title:"State",desc:"The state in the mailing address provided by the consumer",className:"aggregation state",children:[(0,v.jsx)(fg,{ariaLabel:"Start typing to begin listing US states",htmlId:"state-typeahead",handleChange:e=>{r(lk(fv,[e[0].key]))},handleInputChange:e=>{let t=e.toLowerCase();""===t?l(o):l(o.map(n=>({key:n.key,label:n.label,normalized:n.normalized,position:n.normalized.indexOf(t),value:e})))},hasClearButton:!0,options:s,placeholder:"Enter state name or abbreviation"}),(0,v.jsx)(l2,{fieldName:fv,options:n,getLabel:a,selections:i})]})},fb="has_narrative",fx="SEARCHING",fw="NOTHING",f_=()=>{let e=ta(),t=ts(lD),n=ts(lG),r=fw;return n===iP?r=fx:t&&(r="FILTERING"),(0,v.jsxs)("section",{className:"single-checkbox",children:[(0,v.jsx)(sH,{type:"4",children:"Only show complaints with narratives?"}),(0,v.jsxs)("div",{className:"m-form-field m-form-field--checkbox",children:[(0,v.jsx)("input",{className:"a-checkbox",checked:r!==fw,disabled:r===fx,id:"filterHasNarrative",onChange:()=>{e(lC(fb))},type:"checkbox",value:fb}),(0,v.jsx)("label",{className:"a-label",htmlFor:"filterHasNarrative",children:"Yes"})]})]})},fk=e=>{let{fieldName:t,listComponent:n,options:r,perBucketProps:i=(e,t)=>t,hasMore:a=!1}=e,[o,s]=(0,b.useState)(a),l=i6(r,i3(ts(lN),t,[]),t),c=l.length>5?l.slice(0,5):l,u=l.length-5,h=e=>{let r=i(e,{fieldName:t,item:e,key:e.key});return(0,b.createElement)(n,r)};return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("ul",{children:o?l.map(e=>h(e)):c.map(e=>h(e))}),u>0?(0,v.jsx)("div",{children:(0,v.jsx)(sF,{label:o?"- Show ".concat(u," less"):"+ Show ".concat(u," more"),isLink:!0,className:"more",onClick:()=>{s(!o)}})}):null]})};fk.propTypes={fieldName:s0().string.isRequired,listComponent:s0().oneOfType([s0().element,s0().func,s0().object]).isRequired,options:s0().array.isRequired,perBucketProps:s0().func,hasMore:s0().bool};let fS=e=>{let{fieldName:t,title:n,desc:r}=e,{data:i,error:a}=l0(),o=i3(a?{}:i,t,[]);return(0,v.jsx)(lg,{title:n,desc:r,className:"aggregation simple "+t,children:(0,v.jsx)(fk,{fieldName:t,listComponent:l1,options:o})})};fS.propTypes={fieldName:s0().string.isRequired,title:s0().string.isRequired,desc:s0().string};let fM="zip_code",fA=()=>{let{data:e,error:t}=l0(),n=ts(lR),r=structuredClone(t?[]:(null==e?void 0:e.zip_code)||[]);return(0,v.jsxs)(lg,{title:"ZIP code",desc:"The mailing ZIP code provided by the consumer",className:"aggregation",children:[(0,v.jsx)(d9,{fieldName:fM,label:"Start typing to begin listing zip codes",placeholder:"Enter ZIP code",ariaLabel:"Start typing to begin listing zip codes",htmlId:fM+"typeahead",hasClearButton:!0}),(0,v.jsx)(l2,{fieldName:fM,options:r,selections:n})]})},fT="INDETERMINATE",fC="CHECKED",fP=e=>{let{fieldName:t,item:n,subitems:r}=e,i=ts(lN),a=ta(),[o,s]=(0,b.useState)(!1),l=i3(i,t,[]),c=l.filter(e=>0===e.indexOf(n.key)),u=c.filter(e=>-1!==e.indexOf("•")),h=c.filter(e=>e===n.key),d="UNCHECKED";0===h.length&&u.length>0?d=fT:h.length>0&&(d=fC);let f=i6(r.map(e=>({isDisabled:e.isDisabled,key:n.key+"•"+e.key,value:e.key,doc_count:e.doc_count})),l,t),p=i7("".concat(t," ").concat(n.key));return 0===f.length?(0,v.jsx)(l1,{item:n,fieldName:t},n.key):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("li",{className:"aggregation-branch ".concat(i7(n.key)," ").concat("parent m-form-field m-form-field--checkbox"),children:[(0,v.jsx)("input",{type:"checkbox","aria-label":n.key,disabled:n.isDisabled,checked:d===fC,className:"flex-fixed a-checkbox",id:p,onChange:()=>{let e=ar(n.key,r);if(u.forEach(t=>e.add(t)),d===fC)a(lS(t,[...e]));else{let e=l.filter(e=>-1===e.indexOf(n.key+"•"));e.push(n.key),a(lw(t,[...e]))}}}),(0,v.jsx)("label",{className:"toggle a-label ".concat(d===fT?" indeterminate":""),htmlFor:p,children:(0,v.jsx)("span",{className:"u-visually-hidden",children:n.key})}),(0,v.jsx)(sF,{label:n.key,iconRight:o?"up":"down",isLink:!0,className:"flex-all",onClick:()=>s(!o)}),(0,v.jsx)("span",{className:"flex-fixed parent-count",children:n.doc_count.toLocaleString()})]}),o?(0,v.jsx)("ul",{className:"children",children:f.map(e=>(0,v.jsx)(l1,{item:e,fieldName:t},e.key))}):null]})};fP.propTypes={fieldName:s0().string.isRequired,item:s0().shape({doc_count:s0().number.isRequired,key:s0().string.isRequired,value:s0().string,isDisabled:s0().bool}).isRequired,subitems:s0().array.isRequired};let fE=(e,t)=>{let{params:n,path:r}=t.payload;e.path=r,e.params=n,e.queryString=i0(n)},fO=nW({name:"routes",initialState:{path:"",params:{},queryString:""},reducers:{appUrlChanged:{reducer:fE,prepare:(e,t)=>({payload:{path:e,params:t}})},routeChanged:{reducer:fE,prepare:(e,t)=>(t.size&&(t.size=av(t.size.toString(),"size")),{payload:{path:e,params:t}})}}}),{appUrlChanged:fN,routeChanged:fj}=fO.actions;var fL=fO.reducer;let fD=i(9277),fR=nW({name:"actions",initialState:{actions:[]},reducers:{addAction:(e,t)=>{e.actions.push(t.payload)},clearActions:e=>{e.actions.length=0}}}),{addAction:fI,clearActions:fz}=fR.actions;fR.reducer;let fB=e=>{let{fieldName:t}=e,n=(0,b.useRef)(null),r=ta(),i=t.replace(/_/g," "),{data:a,error:o}=l0(),s=o||!a?[]:a[t]||[],l="sub_".concat(t,".raw").toLowerCase(),c=[],[u,h]=(0,b.useState)("");s.forEach(e=>{if(-1===c.findIndex(t=>t.key===e.key)){let t=tu({},e);t.isParent=!0,t.label=e.key,t.normalized=e.key.toLowerCase(),t.position=0,t.top={key:e.key,label:e.key,normalized:e.key.toLowerCase(),position:0},c.push(t)}e[l]&&e[l].buckets&&e[l].buckets.forEach(t=>{let n={key:e.key+"•"+t.key,label:t.key,normalized:t.key.toLowerCase(),position:0,top:{key:e.key,label:e.key,normalized:e.key.toLowerCase(),position:0}};c.push(n)})});let[d,f]=(0,b.useState)(c),p=()=>{n.current.clear(),h("")};return(0,v.jsx)("div",{className:"typeahead",children:(0,v.jsx)("div",{className:"o-search-input",children:(0,v.jsxs)("div",{className:"o-search-input__input",children:[(0,v.jsx)("label",{"aria-label":"Search "+t,className:"o-search-input__input-label",htmlFor:"filter-search"+t,children:(0,v.jsx)(a7,{name:"search",isPresentational:!0})}),(0,v.jsx)(dz,{id:"filter-search"+t,maxResults:5,minLength:2,className:"typeahead-selector",filterBy:["key"],onChange:e=>{r(ly(t,e[0].key)),p()},onInputChange:e=>{var t;let n;return h(t=e),void((n=t.toLowerCase())?f(c.map(e=>iV(tu({},e),{position:e.normalized.indexOf(n),value:t,top:iV(tu({},e.top),{position:e.top.normalized.indexOf(n),value:t})}))):f(c))},placeholder:"Enter name of "+i,labelKey:"key",options:d,ref:n,inputProps:{"aria-label":"".concat(i," Filter Menu Input"),className:"a-text-input a-text-input--full"},renderMenuItemChildren:e=>(0,v.jsxs)("li",{className:"typeahead-option typeahead-option--multi",children:[(0,v.jsx)(dF,tu({},e.top),e.value),e.isParent?null:(0,v.jsx)("div",{className:"typeahead-option__sub",children:e.value?(0,v.jsx)(dF,tu({},e),e.value):null})]})}),!!u&&(0,v.jsx)(dH,{onClear:p})]})})})};fB.propTypes={fieldName:s0().string.isRequired};let fF=e=>{let{desc:t,fieldName:n}=e,{data:r,error:i}=l0(),a=ts(lN)[n]||[],o=ts(l7),s=ts(l4),l=ts(fh),c="sub_".concat(n,".raw"),u=((e,t,n,r,i,a)=>{var o;let s,l=(s=i6(e,o=t||[],a),o.length>0&&o.forEach(e=>{if(-1!==e.indexOf("•")){let t,n;i4(s,e.split("•")[0],a),t=s.find(t=>t.key===e.split("•")[0]),t[n="sub_".concat(a,".raw")]&&!t[n].buckets.find(t=>t.key===e.split("•")[1])&&t[n].buckets.push({key:e.split("•")[1],doc_count:0})}else i4(s,e,a)}),s),c="sub_".concat(a,".raw");if(n){let e="Trends"===i&&r.toLowerCase()===a;l.forEach(t=>{t.isDisabled=!!e&&t.key!==n,t[c]&&t[c].buckets.forEach(n=>{n.isDisabled=!!e&&t.isDisabled})})}return l})(i?[]:(null==r?void 0:r[n])||[],a,o,s,l,n);return(0,v.jsxs)(lg,{title:("string"!=typeof n||0===n.length?n:n.charAt(0).toUpperCase()+n.slice(1))+" / sub-"+n,desc:t,className:"aggregation "+n,children:[o&&s.toLowerCase()===n?null:(0,v.jsx)(fB,{fieldName:n}),(0,v.jsx)(fk,{fieldName:n,listComponent:fP,options:u,perBucketProps:(e,t)=>(t.subitems=e[c]?e[c].buckets:[],t)})]})};fF.propTypes={desc:s0().string.isRequired,fieldName:s0().string.isRequired};let fH=()=>{let e=ta(),t=ts(fd),n=ts(fl);return(0,v.jsx)(v.Fragment,{children:!!n&&(0,v.jsxs)("section",{className:"filter-panel",children:[t<750&&(0,v.jsx)("div",{className:"filter-button",children:(0,v.jsx)(sF,{label:"Close filters",iconRight:"error",title:"Close filters",onClick:()=>e(lu())})}),(0,v.jsx)(sH,{type:"3",children:"Filter results by..."}),(0,v.jsx)(fm,{}),(0,v.jsx)("hr",{}),(0,v.jsx)(fF,{desc:"The type of product and sub-product the consumer identified in the complaint",fieldName:"product"}),(0,v.jsx)("hr",{}),(0,v.jsx)(fF,{desc:"The type of issue and sub-issue the consumer identified in the complaint",fieldName:"issue"}),(0,v.jsx)("hr",{}),(0,v.jsx)(fy,{}),(0,v.jsx)("hr",{}),(0,v.jsx)(fA,{}),(0,v.jsx)("hr",{}),(0,v.jsx)(fe,{}),(0,v.jsx)("hr",{}),(0,v.jsx)(fS,{title:"Did company provide a timely response?",desc:"Whether the company gave a timely response",fieldName:"timely"}),(0,v.jsx)("hr",{}),(0,v.jsx)(fS,{title:"Company response to consumer",desc:"This is how the company responded. For example,\n 'Closed with explanation'.",fieldName:"company_response"}),(0,v.jsx)("hr",{}),(0,v.jsx)(fS,{title:"Company public response",desc:"The company's optional public-facing response to a consumer's complaint. Companies can choose to select a response from a pre-set list of options that will be posted on the public database.",fieldName:"company_public_response"}),(0,v.jsx)("hr",{}),(0,v.jsx)(fa,{}),(0,v.jsx)("hr",{}),(0,v.jsx)(f_,{}),(0,v.jsx)("hr",{}),(0,v.jsx)(fS,{title:"How did the consumer submit the complaint to the CFPB?",fieldName:"submitted_via",desc:""}),(0,v.jsx)("hr",{}),(0,v.jsx)(fS,{title:"Tags",desc:"Data that supports easier searching and sorting of complaints submitted by or on behalf of consumers",fieldName:"tags"})]})})},f$=()=>{let e=ts(fh);return ts(fd)>749?(0,v.jsx)("aside",{className:"content__sidebar ".concat(e.toLowerCase()),children:(0,v.jsx)(fH,{})}):null},fU=e=>{let{text:t,closeFn:n}=e;return(0,v.jsxs)("div",{role:"alert",className:"warning m-notification m-notification--visible m-notification--warning",children:[(0,v.jsx)(a7,{name:"warning-round",isPresentational:!0}),(0,v.jsx)("div",{className:"m-notification__content",children:(0,v.jsx)("div",{className:"m-notification__message",children:t})}),n?(0,v.jsx)("button",{onClick:n,onKeyDown:n,"aria-label":"Dismiss",className:"close",children:(0,v.jsx)(a7,{name:"error",isPresentational:!0})}):""]})};fU.propTypes={text:s0().string.isRequired,closeFn:s0().func};let fV=()=>{let{data:e}=l0();return i5([null==e?void 0:e.hasDataIssue,null==e?void 0:e.isDataStale])?(0,v.jsx)("div",{children:(0,v.jsx)(fU,{text:"We’re currently experiencing technical issues that have delayed the refresh of data on the Consumer Complaint Database. We expect to refresh the data in the next few days."})}):null},fq=()=>{let e=ta(),t=ts(fh),{data:n,error:r}=l0(),i=r?0:(null==n?void 0:n.doc_count)||0,a=r?0:(null==n?void 0:n.total)||0;return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("div",{className:"action-bar",id:"search-summary",children:[a===i?(0,v.jsx)(sH,{type:"2",children:"Showing "+i.toLocaleString()+" total complaints"}):(0,v.jsx)(sH,{type:"2",children:"Showing "+a.toLocaleString()+" matches out of "+i.toLocaleString()+" total complaints"}),r?null:(0,v.jsx)("div",{children:(0,v.jsxs)(sH,{type:"3",className:"h4 flex-all export-results",children:[(0,v.jsx)(sF,{label:"Export data",isLink:!0,className:"export-btn","data-gtm_ignore":"true",onClick:()=>{ai("Export",t+":User Opens Export Modal"),e(ln(iA))}}),(0,v.jsx)(sF,{label:"Print",isLink:!0,iconLeft:"print",className:"print-preview",onClick:()=>{ai("Print","tab:"+t),e(ld())}})]})})]}),(0,v.jsx)(fV,{})]})},fY=e=>{var t;let n,{row:r}=e,i=r.complaint_id.replace(/(<em>)?(.*?)(<\/em>)?/gi,"$2"),a="detail/"+r.complaint_id.replace(/(<em>)?(.*?)(<\/em>)?/gi,"$2"),o=e=>(0,v.jsx)("span",{dangerouslySetInnerHTML:{__html:e}});return(0,v.jsx)("li",{className:"card-container",children:(0,v.jsxs)("div",{className:"card",children:[(0,v.jsxs)("div",{className:"card-left layout-column",children:[(0,v.jsx)(sH,{type:"3",className:"to-detail",children:(0,v.jsx)(eQ,{to:a,"aria-label":"Complaint "+i1(i),children:i})}),(0,v.jsx)(sH,{type:"4",children:"Company name"}),o(r.company),(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Company response to consumer"}),o(r.company_response),(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Timely response?"}),o(r.timely)]}),(0,v.jsxs)("div",{className:"card-right layout-column",children:[(0,v.jsxs)("div",{className:"layout-row",children:[(0,v.jsxs)("div",{className:"layout-row",children:[(0,v.jsx)(sH,{type:"4",children:"Date received:"}),(0,v.jsx)("span",{children:ib(r.date_received)})]}),(0,v.jsx)("div",{className:"spacer"}),(0,v.jsxs)("div",{className:"layout-row",children:[(0,v.jsx)(sH,{type:"4",children:"Consumer’s state:"}),o(r.state)]})]}),(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Product"}),(0,v.jsx)(sH,{type:"3",dangerouslySetInnerHTML:{__html:r.product}}),r.sub_product?(0,v.jsxs)("div",{className:"layout-row",children:[(0,v.jsx)("span",{className:"subitem",children:"Sub-product:"}),o(r.sub_product)]}):null,(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Issue"}),(0,v.jsx)(sH,{type:"3",dangerouslySetInnerHTML:{__html:r.issue}}),r.sub_issue?(0,v.jsxs)("div",{className:"layout-row",children:[(0,v.jsx)("span",{className:"subitem",children:"Sub-issue:"}),o(r.sub_issue)]}):null,(t=r.complaint_what_happened||"",n=t.length>300,(t=t.substring(0,300))?(0,v.jsxs)("div",{children:[(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Consumer Complaint Narrative"}),o(t),n?(0,v.jsxs)("span",{children:[" ",(0,v.jsx)(eQ,{to:a,children:"[...]"})]}):null]}):null)]})]})})};fY.propTypes={row:s0().object.isRequired};let fW=e=>{let{text:t}=e;return(0,v.jsxs)("div",{role:"alert",className:"error m-notification m-notification--visible m-notification--error",children:[(0,v.jsx)(a7,{name:"error-round",isPresentational:!0}),(0,v.jsx)("div",{className:"m-notification__content",children:(0,v.jsx)("div",{className:"m-notification__message",children:t})})]})};fW.propTypes={text:s0().string.isRequired};let fG=()=>{let e=ta(),t=ts(fl);return(0,v.jsx)("section",{className:"filter-panel-toggle"+(t?"":" u-mt30"),children:(0,v.jsx)("div",{className:"m-btn-group",children:(0,v.jsx)(sF,{label:t?"Close filters":"Filter results",className:"filter-toggle-button",onClick:()=>{e(lu())},iconRight:t?"error":"filter"})})})},fX="has_narrative",fK=()=>{let e=ta(),t=!0===ts(lD);return(0,v.jsxs)("section",{className:"narratives-buttons",children:[(0,v.jsx)(sY,{children:"Read"}),(0,v.jsxs)("div",{className:"m-btn-group",children:[(0,v.jsx)(sF,{id:"btn-add-narratives",label:"Only complaints with narratives",className:aa(!0,t),disabled:t,onClick:()=>{e(ly(fX,""))}}),(0,v.jsx)(sF,{id:"btn-remove-narratives",label:"All complaints",className:aa(!1,!!t),disabled:!t,onClick:()=>{e(lb(fX,""))}})]})]})},fZ=()=>{let e,t=ts(lN),n=ts(lF),r=ts(fh),i=ts(s5);return aV((e=Object.keys(t),Object.assign({no_aggs:!0},lB(n),lz(t,e))),{skip:i5(["List"!==r,""===i,!ts(lU)])})},fQ=()=>{let e=ta(),t=ts(lW),{data:n,error:r}=fZ(),i=null==n?void 0:n.hits,a=(null==n?void 0:n.totalPages)||0,o=null==n?void 0:n.breakPoints;return!r&&i&&i.length>0?(0,v.jsxs)("nav",{className:"m-pagination",role:"navigation","aria-label":"Pagination",children:[(0,v.jsx)(sF,{label:"Previous",iconLeft:"left",className:"a-btn m-pagination__btn-prev",onClick:()=>void e(d2(o)),disabled:t<=1}),(0,v.jsx)(sF,{label:"Next",iconRight:"right",className:"a-btn m-pagination__btn-next",onClick:()=>void e(d1(o)),disabled:t>=a}),(0,v.jsx)("div",{className:"m-pagination__form",children:(0,v.jsxs)("label",{className:"m-pagination__label",children:["Page ",t]})})]}):null},fJ=e=>{let{id:t,handleChange:n,label:r,title:i,value:a,values:o}=e,s="select-"+t,l=(0,b.useMemo)(()=>Array.isArray(o)?Object.prototype.hasOwnProperty.call(o[0],"name")?o:o.map(e=>({name:e,value:e,disabled:e.disabled})):Object.keys(o).map(e=>({name:o[e],value:e,disabled:e.disabled})),[o]);return(0,v.jsxs)("section",{className:"cf-select","data-tour":s,children:[(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:s,children:r}),(0,v.jsx)("p",{children:i}),(0,v.jsx)("select",{value:a,id:s,onChange:n,children:l.map(e=>(0,v.jsx)("option",{disabled:[e.value,e.name].includes(a)||e.disabled,value:e.value||e.name,children:e.name},e.name))})]})};fJ.propTypes={id:s0().string,handleChange:s0().func.isRequired,label:s0().string,title:s0().string,values:s0().oneOfType([s0().array,s0().object]).isRequired,value:s0().oneOfType([s0().string,s0().number])};let f0=()=>(0,v.jsx)("span",{className:"separator"}),f1=()=>{let e=ta(),t=ts(fh),n=e=>{let n=e.toLowerCase()+" tab";return t===e?n+" active":n};return(0,v.jsx)("div",{className:"tabbed-navigation","data-tour":"tabbed-navigation",children:(0,v.jsxs)("section",{children:[(0,v.jsxs)("button",{className:n("Trends"),onClick:()=>e(ls("Trends")),children:[(0,v.jsx)(a7,{name:"chart",isPresentational:!0}),"Trends"]}),(0,v.jsxs)("button",{className:n("List"),onClick:()=>e(ls("List")),children:[(0,v.jsx)(a7,{name:"list",isPresentational:!0}),"List"]}),(0,v.jsxs)("button",{className:n("Map"),onClick:()=>e(ls("Map")),children:[(0,v.jsx)(a7,{name:"map",isPresentational:!0}),"Map"]})]})})},f2="NO_RESULTS",f3=()=>{let e=ta(),{data:t,isLoading:n,isFetching:r,error:i}=fZ(),a=ts(lK),o=ts(lZ),s=ts(fd),l=(0,b.useMemo)(()=>s<750,[s]),c=(null==t?void 0:t.hits)||[],u=i?"ERROR":n||r||0===c.length?f2:c.length>0?"RESULTS":f2;return(0,v.jsxs)("section",{className:"list-panel",children:[(0,v.jsx)(fq,{}),(0,v.jsx)(f1,{}),!!l&&(0,v.jsx)(fH,{}),(0,v.jsx)(fG,{}),(0,v.jsxs)("div",{className:"layout-row refine-bar",children:[(0,v.jsx)(f0,{}),(0,v.jsx)(fJ,{label:"Select the number of results to display at a time",title:"Show",values:iI,id:"size",value:a,handleChange:t=>{let n=t.target.value;ai("Dropdown",n+" results"),e(d7(n))}}),(0,v.jsx)(fJ,{label:"Choose the order in which the results are displayed",title:"Sort",values:iz,id:"sort",value:o,handleChange:t=>{let{value:n}=t.target;ai("Dropdown",iz[n]),e(d4(n))}}),(0,v.jsx)(fK,{})]}),({ERROR:()=>(0,v.jsx)(fW,{text:"There was a problem executing your search"}),NO_RESULTS:()=>(0,v.jsx)(sH,{type:"2",children:"No results were found for your search"}),RESULTS:()=>(0,v.jsx)("ul",{className:"cards-panel",children:c.map(e=>(0,v.jsx)(fY,{row:e},e.complaint_id))})})[u](),(0,v.jsx)(fQ,{}),(0,v.jsx)(s2,{isLoading:n||r})]})},f5=e=>{let{fieldName:t,value:n,displayValue:r,onRemove:i}=e,{data:a,error:o}=l0(),s=ts(lN),l=i3(a,t,[]),c=i3(s,t,[]),u=(e=>{if("timely"===e){let t=e.replace(/_/g," ");return t[0].toUpperCase()+t.slice(1)+": "}return""})(t),h=(r||n).split("•").pop(),d=ta();return o?null:(0,v.jsx)("li",{children:(0,v.jsxs)("button",{className:"a-tag-filter","aria-label":"".concat(u).concat(h),onClick:()=>{if(i)return void i(n);if("date_received"===t)d(dQ("All"));else if(iD.includes(t)){let e=lO(n,c,l,t);d(lw(t,e))}else d(lb(t,n))},children:[u,h,(0,v.jsx)("span",{className:"a-btn--icon a-btn--icon--on-right",children:(0,v.jsx)(a7,{name:"error",isPresentational:!0})})]})})};f5.propTypes={fieldName:s0().string.isRequired,value:s0().string.isRequired,displayValue:s0().string,onRemove:s0().func};let f7=()=>{let e=ta(),t=(ts(lL)||[]).filter(e=>e in iB);return t.length>0&&(0,v.jsxs)("div",{className:"map-toolbar",children:[(0,v.jsx)("section",{className:"state-heading",children:(0,v.jsx)("span",{className:"state-heading__title",children:"State filters applied"})}),(0,v.jsx)("section",{className:"state-filters",children:(0,v.jsxs)("ul",{className:"state-filters__list m-tag-group",children:[t.map(t=>(0,v.jsx)(f5,{fieldName:"state",value:t,displayValue:lE(t),onRemove:()=>e(lT({abbr:t}))},t)),(0,v.jsx)("li",{className:"state-filters__clear",children:(0,v.jsx)(sF,{appearance:"warning",label:"Clear state filters",isLink:!0,"aria-label":"Clear all state filters",className:"state-filters__clear-button",onClick:()=>{e(lA())}})})]})})]})};var f4=i(9446),f6=i(8989),f9=i(6866);let f8=e=>{let{helperText:t,id:n,colorScheme:r,data:i,title:a,total:o}=e,s=ta(),{data:l}=l0(),c=ts(fh),u=ts(l4),h=ts(fs),d=ts(fc),f=ts(fd),p="Map"===c?"Product":u;return((0,b.useEffect)(()=>{let e="#row-chart-"+n,t=(e,t,n)=>{e.each(function(){let e=f4.select(this),r=n?e.attr("x"):0;if(e.node().children&&e.node().children.length>0)return;let i=e.text().split(/\s+/).reverse(),a=e.attr("y")||0,o=parseFloat(e.attr("dy")||0),s,l=[],c=0,u=0,h=e.text(null).append("tspan").attr("x",r).attr("y",a).attr("dy",o+"em");for(;s=i.pop();)l.push(s),h.text(l.join(" ")),h.node().getComputedTextLength()>t&&(l.pop(),h.text(l.join(" ")),l=[s],h=e.append("tspan").attr("x",r).attr("y",a).attr("dy",1.1*++c+o+"em").text(s),u++);if(u){let t=f4.select(e.node().parentNode).select(".view-more-background"),n=parseFloat(t.attr("height"))+12*u;t.attr("height",n)}})};if(!i)return;let a=i.filter(e=>!e.name||!d||-1===e.name.indexOf("Visualize trends for"));if(!a||!a.length||!o)return;let c=(0,f9.miniTooltip)();c.valueFormatter(e=>e.toLocaleString()+" complaints");let u=o/(0,f6.A)(a,e=>e.value),m=ah(),g=f4.select(m).select(e),v=d?750:g.node().getBoundingClientRect().width,y=1===a.length?100:60*a.length,b=(0,f9.row)(),x=v/4;return b.margin({left:x,right:v<600?40:-100,top:20,bottom:10}).colorSchema(r).backgroundColor("#f7f8f9").paddingBetweenGroups(25).enableLabels(!0).labelsTotalCount(o.toLocaleString()).labelsNumberFormat(",d").outerPadding(.1).percentageAxisToMaxRatio(u).yAxisLineWrapLimit(2).yAxisPaddingBetweenChart(20).width(v).wrapLabels(!0).height(y).on("customMouseOver",c.show).on("customMouseMove",c.update).on("customMouseOut",c.hide),g.datum(a).call(b),f4.select(m).selectAll(e+" .row-chart .metadata-group").datum([]).call(c),t(f4.select(m).select(e).selectAll(".tick text"),x),t(f4.select(m).select(e).selectAll(".view-more-label"),f/2,!0),g.selectAll(".y-axis-group .tick").on("click",e=>{let t=e.target.__data__;i.filter(e=>e.isParent).map(e=>e.name).includes(t)&&(h.includes(t)?(ai("Bar chart collapsed",t),s(li(t))):(ai("Bar chart expanded",t),s(la(t))))}),g.selectAll(".view-more-label").on("click",e=>{let t,n=e.target.__data__,r="Overview"===p?"Product":p,i=i3(l,r.toLowerCase(),[]);(t=af("search-summary"))&&t.scrollIntoView();let a=[];if("Company"===p)a.push(n.parent);else{let e=i.find(e=>e.key===n.parent),t="sub_"+r.toLowerCase()+".raw";a=e?ar(n.parent,e[t].buckets):[]}ai("Trends click",n.parent),s(aI(n.parent,p,[...a]))}),()=>{f4.select(m).selectAll(e+" .row-chart").remove()}},[s,l,r,i,h,n,d,p,o,f]),i&&o)?(0,v.jsxs)("div",{className:"row-chart-section","data-tour":"row-chart-section",children:[(0,v.jsx)(sH,{type:"3",children:a}),(0,v.jsx)(sY,{children:t}),(0,v.jsx)("div",{id:"row-chart-"+n,"data-testid":"row-chart-"+n})]}):null};f8.propTypes={helperText:s0().string,id:s0().string.isRequired,colorScheme:s0().oneOfType([s0().array,s0().bool]).isRequired,data:s0().array.isRequired,title:s0().string.isRequired,total:s0().number};var pe=i(8998),pt=i.n(pe);i(8847);let pn={AL:"M550,-337L633,-337,633,-253,550,-253,550,-337",AK:"M92,-245L175,-245,175,-162,92,-162,92,-245",AZ:"M92,-428L175,-428,175,-345,92,-345,92,-428",AR:"M367,-428L450,-428,450,-345,367,-345,367,-428",CA:"M0,-520L83,-520,83,-437,0,-437,0,-520",CO:"M183,-520L267,-520,267,-437,183,-437,183,-520",CT:"M825,-612L908,-612,908,-528,825,-528,825,-612",DE:"M825,-520L908,-520,908,-437,825,-437,825,-520",DC:"M733,-428L817,-428,817,-345,733,-345,733,-428",FL:"M733,-245L817,-245,817,-162,733,-162,733,-245",GA:"M642,-337L725,-337,725,-253,642,-253,642,-337",HI:"M0,-245L83,-245,83,-162,0,-162,0,-245",ID:"M92,-703L175,-703,175,-620,92,-620,92,-703",IL:"M458,-703L542,-703,542,-620,458,-620,458,-703",IN:"M458,-612L542,-612,542,-528,458,-528,458,-612",IA:"M367,-612L450,-612,450,-528,367,-528,367,-612",KS:"M275,-428L358,-428,358,-345,275,-345,275,-428",KY:"M458,-520L542,-520,542,-437,458,-437,458,-520",LA:"M367,-337L450,-337,450,-253,367,-253,367,-337",ME:"M917,-887L1000,-887,1000,-803,917,-803,917,-887",MD:"M733,-520L817,-520,817,-437,733,-437,733,-520",MA:"M825,-703L908,-703,908,-620,825,-620,825,-703",MI:"M550,-703L633,-703,633,-620,550,-620,550,-703",MN:"M367,-703L450,-703,450,-620,367,-620,367,-703",MS:"M458,-337L542,-337,542,-253,458,-253,458,-337",MO:"M367,-520L450,-520,450,-437,367,-437,367,-520",MT:"M183,-703L267,-703,267,-620,183,-620,183,-703",NE:"M275,-520L358,-520,358,-437,275,-437,275,-520",NV:"M92,-612L175,-612,175,-528,92,-528,92,-612",NH:"M917,-795L1000,-795,1000,-712,917,-712,917,-795",NJ:"M733,-612L817,-612,817,-528,733,-528,733,-612",NM:"M183,-428L267,-428,267,-345,183,-345,183,-428",NY:"M733,-703L817,-703,817,-620,733,-620,733,-703",NC:"M550,-428L633,-428,633,-345,550,-345,550,-428",ND:"M275,-703L358,-703,358,-620,275,-620,275,-703",OH:"M550,-612L633,-612,633,-528,550,-528,550,-612",OK:"M275,-337L358,-337,358,-253,275,-253,275,-337",OR:"M0,-612L83,-612,83,-528,0,-528,0,-612",PA:"M642,-612L725,-612,725,-528,642,-528,642,-612",RI:"M917,-612L1000,-612,1000,-528,917,-528,917,-612",SC:"M642,-428L725,-428,725,-345,642,-345,642,-428",SD:"M275,-612L358,-612,358,-528,275,-528,275,-612",TN:"M458,-428L542,-428,542,-345,458,-345,458,-428",TX:"M275,-245L358,-245,358,-162,275,-162,275,-245",UT:"M92,-520L175,-520,175,-437,92,-437,92,-520",VT:"M825,-795L908,-795,908,-712,825,-712,825,-795",VA:"M642,-520L725,-520,725,-437,642,-437,642,-520",WA:"M0,-703L83,-703,83,-620,0,-620,0,-703",WV:"M550,-520L633,-520,633,-437,550,-437,550,-520",WI:"M458,-795L542,-795,542,-712,458,-712,458,-795",WY:"M183,-612L267,-612,267,-528,183,-528,183,-612"},pr="#ffffff";function pi(e){return e<1e3?e.toLocaleString():e<1e4?(Math.floor(e/100)/10).toFixed(1)+"K":e<1e6?Math.floor(e/1e3)+"K":(Math.floor(e/1e5)/10).toFixed(1)+"M"}function pa(e,t){let n=10**t;return Math.round(e*n)/n}function po(e){return e&&0!==e.length?e.reduce((e,t)=>Math.max(e,Number.isFinite(t.displayValue)?t.displayValue:0),0):0}function ps(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,r=po(e);return 0===r?[]:function(e){let{colors:t,binCount:n,maxValue:r}=e,i=[],a=r/n,o=r>=n?0:1;for(let e=0;e<n;e+=1){let r=pa(a*e,o),s=e===n-1?void 0:pa(a*(e+1),o);i.push({from:r,to:s,color:t[e],name:"",shortName:""})}return i}({colors:t,binCount:n,maxValue:r})}let pl=(a=1/0,o=-1/0,s=1/0,l=-1/0,(Object.values(pn).forEach(e=>{let t=e.match(/-?\d+(?:\.\d+)?/g);if(t)for(let e=0;e<t.length;e+=2){let n=Number(t[e]),r=Number(t[e+1]);Number.isFinite(n)&&(a=Math.min(a,n),o=Math.max(o,n),Number.isFinite(r)&&(s=Math.min(s,r),l=Math.max(l,r)))}}),Number.isFinite(a)&&Number.isFinite(o)&&Number.isFinite(s)&&Number.isFinite(l))?{width:o-a,height:l-s}:{width:1e3,height:725}),pc=pl.width,pu=pl.height;function ph(e){return"".concat(e.fullName," ").concat(e.displayValue)}function pd(){let e=".tile-"+this.name;f4.select(ah()).select(e).classed("hover",!1)}function pf(){let e=".tile-"+this.name;f4.select(ah()).select(e).classed("hover",!0)}function pp(){let e=this.point||this,t="number"==typeof e.displayValue?e.displayValue>=1e3?"".concat(Math.floor(e.displayValue/1e3),"K"):e.displayValue.toLocaleString():e.displayValue||"";return'<div class="highcharts-data-label-state tile-'+e.name+" "+e.className+' "><p class="abbr">'+e.name+'</p><p class="value">'+t+"</p></div>"}function pm(){let e=this.product?'<div class="row row--product"><p class="u-float-left">Product with highest complaint volume</p><p class="u-right">'.concat(this.product,"</p></div>"):"",t=this.issue?'<div class="row row--issue"><p class="u-float-left">Issue with highest complaint volume</p><p class="u-right">'.concat(this.issue,"</p></div>"):"",n=this.value.toLocaleString(),r=lE(this.name);return'<h4 class="title">'.concat(r,"</h4>")+'<div class="row row--count"><p class="u-float-left">Complaint count</p><p class="u-right">'.concat(n,"</p></div>")+'<div class="row row--count-mobile"><p class="u-right">'.concat("".concat(n," complaints"),"</p></div>")+e+t}function pg(e,t){for(let n of t)if(e[n])return n;return null}function pv(e,t,n){return Math.min(Math.max(e,t),n)}let py="foreignObject body > div";function pb(e,t,n){var r,i;if(!n)return{x:0,y:0};let a=this.chart,o=function(e){let t,n,r,{plotX:i,plotY:a,plotWidth:o,plotHeight:s,labelWidth:l,labelHeight:c}=e,u=function(e){let{plotX:t,plotY:n,plotWidth:r,plotHeight:i,labelWidth:a,labelHeight:o}=e,s=function(e){let{spaces:t,labelWidth:n,labelHeight:r,gap:i}=e;return{top:t.top>=r+i,bottom:t.bottom>=r+i,left:t.left>=n+i,right:t.right>=n+i}}({spaces:function(e){let{plotX:t,plotY:n,plotWidth:r,plotHeight:i}=e;return{top:n,bottom:i-n,left:t,right:r-t}}({plotX:t,plotY:n,plotWidth:r,plotHeight:i}),labelWidth:a,labelHeight:o,gap:12}),l=pg(s,function(e){let{plotX:t,plotY:n,plotWidth:r,plotHeight:i}=e;return t<=.33*r?["right","top","bottom","left"]:t>=.66*r?["left","top","bottom","right"]:n<=.33*i?["bottom","left","right","top"]:n>=.66*i?["top","left","right","bottom"]:["top","bottom","right","left"]}({plotX:t,plotY:n,plotWidth:r,plotHeight:i})),c=pg(s,["top","bottom","right","left"]);return l||c||"top"}({plotX:i,plotY:a,plotWidth:o,plotHeight:s,labelWidth:l,labelHeight:c}),h=(t=i-l/2,"bottom"===u?{coordX:t,coordY:a+12}:"left"===u?{coordX:i-l-12,coordY:a-c/2}:"right"===u?{coordX:i+12,coordY:a-c/2}:{coordX:t,coordY:a-c-12}),d=pv(h.coordX,0,o-l),f=pv(h.coordY,0,s-c);return{caretPos:(n=Math.max(l-16,0),r=Math.max(c-16,0),"left"===u||"right"===u?pv(a-f-8,12,r-12):pv(i-d-8,12,n-12)),placement:u,coordX:d,coordY:f}}({plotX:null!=(r=n.plotX)?r:0,plotY:null!=(i=n.plotY)?i:0,plotWidth:a.plotWidth,plotHeight:a.plotHeight,labelWidth:e,labelHeight:t});return!function(e,t,n){var r,i,a,o;let s,l,c,{wrapper:u,content:h}=(l=(null==(s=(null==e?void 0:e.element)||null)||null==(r=s.classList)?void 0:r.contains("highcharts-tooltip"))?s:(null==s||null==(i=s.closest)?void 0:i.call(s,".highcharts-tooltip"))||(null==s?void 0:s.parentNode)||null,c=(null==s||null==(a=s.querySelector)?void 0:a.call(s,py))||(null==l||null==(o=l.querySelector)?void 0:o.call(l,py))||null,{wrapper:l,content:c});(null==u?void 0:u.setAttribute)&&(u.setAttribute("data-caret",t),u.style.setProperty("--caret-pos","".concat(n,"px"))),(null==h?void 0:h.setAttribute)&&(h.setAttribute("data-caret",t),h.style.setProperty("--caret-pos","".concat(n,"px")))}(this.label,o.placement,o.caretPos),{x:a.plotLeft+o.coordX,y:a.plotTop+o.coordY}}pt().setOptions({lang:{thousandsSep:","}});let px=["rgb(240, 247, 246)","rgb(212, 231, 230)","rgb(180, 210, 209)","rgb(137, 182, 181)","rgb(87, 150, 149)"];var pw=class{draw(e,t){pt().mapChart(e,t)}constructor({el:e,data:t,events:n,height:r,hasTip:i,width:a}){const o=function(e,t){let n=po(e);return f4.scaleQuantize().domain([0,n>0?n:1]).range(t)}(t,px),s=Number.isFinite(a)?a:pc,l=ps(t,px),c="Complaints",u={accessibility:{description:"",screenReaderSection:{afterChartFormat:"",beforeChartFormat:""},pointNavigation:{order:"xy"}},bins:l,chart:{styledMode:!0,height:r,width:a,margin:[1,3,1,3]},colorAxis:{dataClasses:l,dataClassColor:"category"},title:!1,credits:!1,legend:{enabled:!1,legendTitle:c},tooltip:{className:"tilemap-tooltip",enabled:i,headerFormat:"",pointFormatter:pm,useHTML:!0,borderWidth:0,shadow:!1,style:{padding:0},positioner:pb},plotOptions:{series:{dataLabels:{enabled:!0,formatter:pp,useHTML:!0},states:{hover:{enabled:i}}}},series:[{type:"map",clip:!1,data:t=function(e,t,n){e=e.filter(function(e){return!!e.name});let r=Number.isFinite(n)?n:0;return(e=e.map(function(e){var n,i;let a,o,s=function(e,t){if(!e||!Number.isFinite(t)||t<=0)return e;let n=e.match(/-?\d+(?:\.\d+)?/g);if(!n||n.length<8)return e;let r=Number(n[0]),i=Number(n[1]),a=Number(n[2]),o=Number(n[5]);if(![r,i,a,o].every(Number.isFinite))return e;let s=r+t,l=i+t,c=a-t,u=o-t;return"M".concat(s,",").concat(l,"L").concat(c,",").concat(l,",").concat(c,",").concat(u,",").concat(s,",").concat(u,",").concat(s,",").concat(l)}(pn[e.name],r),l=(o=function(e){if(!(Array.isArray(e)&&e.length>=8))return null;let t={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0};for(let n=0;n<e.length;n+=2){let r=e[n],i=e[n+1];Number.isFinite(r)&&Number.isFinite(i)&&(t.minX=Math.min(t.minX,r),t.maxX=Math.max(t.maxX,r),t.minY=Math.min(t.minY,i),t.maxY=Math.max(t.maxY,i))}return Number.isFinite(t.minX)&&Number.isFinite(t.maxX)&&Number.isFinite(t.minY)&&Number.isFinite(t.maxY)?t:null}((a=s.match(/-?\d+(?:\.\d+)?/g))?a.map(e=>Number(e)):[]))?{centerX:(o.minX+o.maxX)/2,centerY:(o.minY+o.maxY)/2}:{centerX:0,centerY:0},c=(n=e.displayValue,i=t,null!=n&&n?i(n):pr);return"selected"!==e.className&&c===pr&&(e.className="empty"),iV(tu({},e),{color:c,path:s,sortX:l.centerX,sortY:l.centerY})})).sort((e,t)=>e.sortY!==t.sortY?e.sortY-t.sortY:e.sortX-t.sortX),e}(t,o,4*pc/(2*s)),accessibility:{description:c+" in the United States",exposeAsGroupOnly:!1,keyboardNavigation:{enabled:!0},descriptionFormatter:ph}}]};if(n&&i){const{click:e}=n,t=function(e,t){if(null==e)return{};var n,r,i,a={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),i=0;i<n.length;i++)r=n[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r]);return a}if(a=function(e,t){if(null==e)return{};var n,r,i={},a=Object.getOwnPropertyNames(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),i=0;i<n.length;i++)r=n[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r]);return a}(n,["click"]);Object.keys(t).length&&(u.plotOptions.series.events=t),u.plotOptions.series.point={events:{mouseOver:pf,mouseOut:pd,click:function(t){e&&e(t?iV(tu({},t),{point:this}):{point:this})}}}}this.draw(e,u)}};let p_=()=>{let e=ts(lN),t=ts(lF),n=ts(fh),r=ts(s5),i=i5([!ts(lU),"Map"!==n,""===r]);return aq(lI(e,t),{skip:i})},pk=()=>{let e=ta(),t=ts(lL),n=ts(fc),r=ts(fd),{data:i}=p_(),a=null==i?void 0:i.results.state,o=(0,b.useMemo)(()=>a?a.map(e=>{let t=structuredClone(e),n=i3(iH,e.name,{name:""});return t.abbr=t.name,t.fullName=n.name,t}):null,[a]),s=!n,l=(0,b.useCallback)(n=>{let{abbr:r,fullName:i}=n.point,a={abbr:r,name:i};t&&t.includes(r)?(ai("State Event: remove",a.abbr),e(lT(a))):(ai("State Event: add",a.abbr),e(lM(a)))},[t,e]),c=(0,b.useCallback)(()=>{var e,i;let a=af("tile-chart-map"),c=a.clientWidth||r,u=n?650:c;if(!o)return;let h={el:a,data:(e=o,i=t,e.map(e=>{var t;return iV(tu({},e),{displayValue:e.value,className:(t=e.name,i&&0!==i.length?i.includes(t)?"selected":"deselected":"")})})),events:{click:l},hasTip:s,width:u};h.height=Math.round(pu/pc*u)+50*(r<750),new pw(h)},[o,s,n,t,r,l]);return(0,b.useEffect)(()=>(c(),function(){let e=af("tile-chart-map");if(e)for(;e.firstChild;)e.firstChild.remove()}),[c]),(0,v.jsx)("div",{id:"tile-chart-map",className:"cfpb-chart ".concat(n?"print":""),"data-chart-type":"tile_map","data-testid":"tile-chart-map"})},pS=()=>{var e;let{data:t,isLoading:n,isFetching:r}=p_(),i=null==t||null==(e=t.results)?void 0:e.state,a=(0,b.useMemo)(()=>i?i.map(e=>{let t=structuredClone(e),n=i3(iH,e.name,{name:""});return t.abbr=t.name,t.fullName=n.name,t}):null,[i]),o=(0,b.useMemo)(()=>a?a.map(e=>iV(tu({},e),{displayValue:e.value})):null,[a]),s=(0,b.useMemo)(()=>o&&0!==o.length?ps(o,px):[],[o]);return n||r||0===s.length?null:(0,v.jsxs)("div",{className:"map-legend","aria-label":"Map shading",children:[(0,v.jsx)(sH,{type:"4",children:"Complaint count by state"}),(0,v.jsx)("p",{className:"map-legend__description",children:"The map is shaded to reflect the complaint count for each state, based on the applied filters. Hover over a tile to view details or select a tile to add the state to your filters."}),(0,v.jsx)("ul",{className:"map-legend__bins",children:s.map((e,t)=>{let n=((e,t)=>{if(!t||!Number.isFinite(t.from))return"".concat(pi(e.from)," and up");let n=t.from-1;return n<e.from&&(n=t.from),"".concat(pi(e.from),"–").concat(pi(n))})(e,s[t+1]);return(0,v.jsxs)("li",{className:"map-legend__bin",children:[(0,v.jsx)("span",{className:"map-legend__swatch",style:{backgroundColor:e.color}}),(0,v.jsx)("p",{className:"map-legend__label",children:n})]},"".concat(e.from,"-").concat(n))})})]})},pM=()=>{let e=ta();return(0,v.jsx)("div",{className:"map-state-navigation",children:(0,v.jsx)(sF,{label:"View list of complaints based on applied filters",isLink:!0,onClick:()=>{e(ls("List"))}})})},pA=()=>{let{data:e,error:t}=l0(),{data:n,isLoading:r,isFetching:i,error:a}=p_(),o=t?0:(null==e?void 0:e.total)||0,s=ts(lV),l=ts(lq),c=ts(fs),u=ts(fd),h=(0,b.useMemo)(()=>a?{data:[],colorScheme:[]}:aM(null==n?void 0:n.results.product,!1,"Product",c)||{data:[],colorScheme:[]},[a,n,c]),d=((null==h?void 0:h.data)||[]).filter(e=>e.isParent).length>1,f=(d?"Products":"Product")+" by highest complaint volume "+"(".concat(ib(l)," to ").concat(ib(s),")");return(0,v.jsxs)("section",{className:"map-panel",children:[(0,v.jsx)(fq,{}),(0,v.jsx)(f1,{}),u<750&&(0,v.jsx)(fH,{}),(0,v.jsx)(fG,{}),a?(0,v.jsx)(fW,{text:"There was a problem executing your search"}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(pk,{}),(0,v.jsx)(pS,{}),(0,v.jsx)(f7,{}),(0,v.jsx)(f8,{id:"product",colorScheme:h.colorScheme,data:h.data,title:f,helperText:d?"The chart below shows the products with the highest complaint volume, based on the applied filters. Expand each product to view sub-products.":"The chart below shows the product with the highest complaint volume, based on the applied filters. Expand the product to view sub-products.",total:o}),(0,v.jsx)(pM,{})]}),(0,v.jsx)(s2,{isLoading:r||i})]})},pT=()=>{let{data:e,error:t}=l0(),n=ts(lq),r=ts(lV),i=i9(n)+" - "+i9(r),a=ts(lX),o=ts(fc),s=t?0:(null==e?void 0:e.doc_count)||0,l=t?0:(null==e?void 0:e.total)||0,c=(0,b.useMemo)(()=>s===l?(0,v.jsxs)("div",{children:["Showing ",(0,v.jsx)("span",{children:l.toLocaleString()})," complaints"]}):(0,v.jsxs)("div",{children:["Showing ",(0,v.jsx)("span",{children:l.toLocaleString()})," out of",(0,v.jsxs)("span",{children:[" ",s.toLocaleString()," "]})," total complaints"," "]}),[s,l]);return o?(0,v.jsxs)("section",{className:"print-info",children:[(0,v.jsxs)("p",{children:[(0,v.jsx)("span",{children:"Dates:"})," ",i]}),!!a&&(0,v.jsxs)("p",{children:[(0,v.jsx)("span",{children:"Search Term:"})," ",a]}),(0,v.jsx)("div",{children:c})]}):null},pC=()=>ts(fc)?(0,v.jsx)("section",{className:"print-info-footer",children:(0,v.jsxs)("p",{children:[(0,v.jsx)("span",{children:"URL:"})," ",window.location.href]})}):null,pP={"line-chart":(0,v.jsx)(e=>(0,v.jsxs)("svg",iV(tu({xmlns:"http://www.w3.org/2000/svg",id:"line-chart-icon","data-name":"line chart",viewBox:"0 0 27 21"},e),{children:[(0,v.jsxs)("g",{className:"cls-1",children:[(0,v.jsx)("path",{d:"M12 6.27 2 19M22.9 14l-8.8-8",className:"cls-2"}),(0,v.jsx)("path",{d:"M13 4a1 1 0 1 1-1 1 1 1 0 0 1 1-1m0-1a2 2 0 1 0 2 2 2 2 0 0 0-2-2M24 14a1 1 0 1 1-1 1 1 1 0 0 1 1-1m0-1a2 2 0 1 0 2 2 2 2 0 0 0-2-2",className:"cls-3"})]}),(0,v.jsx)("path",{d:"M12 16.45 2 11M23 6l-9 10",className:"cls-2"}),(0,v.jsx)("path",{d:"M13 16a1 1 0 1 1-1 1 1 1 0 0 1 1-1m0-1a2 2 0 1 0 2 2 2 2 0 0 0-2-2M24 4a1 1 0 1 1-1 1 1 1 0 0 1 1-1m0-1a2 2 0 1 0 2 2 2 2 0 0 0-2-2",className:"cls-3"})]})),{}),"area-chart":(0,v.jsx)(e=>(0,v.jsxs)("svg",iV(tu({xmlns:"http://www.w3.org/2000/svg",id:"area-chart-icon","data-name":"area chart",viewBox:"0 0 27 21"},e),{children:[(0,v.jsx)("path",{d:"m27 11-3.52 3-8.22-5-8.22 8L0 15v6h27z",className:"cls-1"}),(0,v.jsx)("g",{className:"cls-2",children:(0,v.jsx)("path",{d:"m6.32 14.79 8.6-8.33 8.44 5.12L27 8.5V1l-3.52 3-8.22-3-8.22 6L0 9v3.94z",className:"cls-1"})})]})),{})};var pE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!Object.hasOwn(pP,e))return console.error("No icon with the name ".concat(e,".")),!1;let n=pP[e];return(0,b.cloneElement)(n,{className:"cf-icon-svg ".concat(t).trim()})};let pO=()=>{let e=ta(),t=ts(l5),n=t=>{ai("Button","Trends:"+t),e(aN(t))};return(0,v.jsxs)("section",{className:"chart-toggles",children:[(0,v.jsx)("p",{children:"Chart type"}),(0,v.jsxs)("div",{className:"m-btn-group",children:[(0,v.jsx)(sF,{"aria-label":"Toggle line chart",className:aa("line",t),disabled:"line"===t,onClick:()=>{n("line")},children:pE("line-chart")}),(0,v.jsx)(sF,{"aria-label":"Toggle area chart",className:aa("area",t),disabled:"area"===t,onClick:()=>{n("area")},children:pE("area-chart")})]})]})},pN=()=>{let e=ts(lN),t=ts(lF),n=ts(l3),r=i5(["Trends"!==ts(fh),""===ts(s5),!ts(lU)]);return aG(function(e,t,n){let{dateInterval:r,searchField:i}=t,a=lB(t),{chartType:o,focus:s,lens:l,subLens:c,trendDepth:u}=n,h={chartType:o,lens:l.replace(" ","_").toLowerCase(),searchField:i,trend_depth:u,trend_interval:r.toLowerCase(),reducerValues:{focus:s,lens:l,subLens:c,trendDepth:n.trendDepth}};c&&(h.sub_lens=c.replace("-","_").replace(" ","_").toLowerCase()),s&&(h.focus=s);let d=Object.keys(a).filter(e=>!["frm","page","search_after","size","sort"].includes(e)),f=Object.keys(e);return Object.assign(h,lz(a,d),lz(e,f),{size:0,no_aggs:!0})}(e,t,n),{skip:r})},pj={Company:{tab1:{displayName:"Products",filterName:"product"}},Product:{tab1:{displayName:"Sub-products",filterName:"sub_product"},tab2:{displayName:"Issues",filterName:"issue"}}},pL=()=>{let e=ta(),t=ts(l7),n=ts(l4),r=ts(l6),{data:i}=pN(),a=null==i?void 0:i.results["sub-product"];if("Overview"===n)return null;let o=!t||!!a&&!!a.length,s=(t,n)=>{ai("Button",t+":"+({sub_product:"Sub-products",issue:"Issues",product:"Products"})[n]),e(aL(n.toLowerCase()))},l=e=>{let t=["tab",e=e.toLowerCase()],n=RegExp(r.toLowerCase(),"g");return e.replace("-","_").match(n)&&t.push("active"),t.join(" ")},c=pj[n];return(0,v.jsx)("div",{className:"tabbed-navigation lens",children:(0,v.jsxs)("section",{children:[!!o&&(0,v.jsx)("button",{className:l(c.tab1.filterName),onClick:()=>{s(n,c.tab1.filterName)},children:c.tab1.displayName}),!!pj[n].tab2&&(0,v.jsx)("button",{className:l(c.tab2.filterName),onClick:()=>{s(n,c.tab2.filterName)},children:c.tab2.displayName})]})})},pD=()=>{let e=ts(l7),t=ts(l4),{data:n}=pN(),r=(null==n?void 0:n.total)||0,i=ta();return e?(0,v.jsxs)("div",{className:"focus-header",children:[(0,v.jsx)(sF,{label:"View "+t.toLowerCase()+" trends",iconLeft:"left",isLink:!0,className:"clear-focus",id:"clear-focus",onClick:()=>{i(az(t))}}),(0,v.jsx)("div",{children:(0,v.jsxs)("section",{className:"focus",children:[(0,v.jsx)(sH,{type:"1",children:e}),(0,v.jsx)("span",{className:"divider"}),(0,v.jsx)(sH,{type:"2",children:r.toLocaleString()+" Complaints"})]})}),(0,v.jsx)(pL,{showTitle:!1},"lens-tab")]}):null};var pR=i(3595),pI=i.n(pR),pz=i(5358),pB=i.n(pz);let pF=e=>{let{domId:t,hasKey:n}=e;return(0,v.jsx)("section",{className:"".concat(n?"ext-tooltip":""),children:(0,v.jsxs)("div",{className:"chart-wrapper",children:[(0,v.jsx)(sY,{className:"y-axis-label",children:"Complaints"}),(0,v.jsx)("div",{id:t}),(0,v.jsx)(sY,{className:"x-axis-label",children:"Date received by the CFPB"})]})})};pF.propTypes={domId:s0().string.isRequired,hasKey:s0().bool.isRequired};let pH=()=>{var e;let t=ta(),{data:n}=pN(),r=null==n?void 0:n.colorMap,i=null==n||null==(e=n.results)?void 0:e.dateRangeLine,a=ts(l4),o=ts(lQ),s=ts(lq),l=ts(lV),c=ts(fc),u=ts(fd),h=(0,b.useMemo)(()=>i?((e,t,n)=>{let r=structuredClone(e),{from:i,to:a}=t;if(!r.dataByTopic)return e;let o=r.dataByTopic[0].dates,s=r.dataByTopic[0].dates[0].date,l=r.dataByTopic[0].dates[o.length-1].date;return aT(i,s,n)&&r.dataByTopic.forEach(e=>{e.dates=e.dates.filter(e=>e.date!==s)}),aC(a,l,n)&&r.dataByTopic.forEach(e=>{e.dates=e.dates.filter(e=>e.date!==l)}),r})(i,{from:s,to:l},o):[],[i,s,l,o]),d=aP(h);return((0,b.useEffect)(()=>{let e={from:s,to:l},n="#line-chart",i="".concat(n," .line-chart"),u=ah(),d=f4.select(u).select(n);if(!d.node()||aP(h))return;let f=pB()().shouldShowDateInTitle(!1).topicLabel("topics").title("Complaints");f4.select(u).select(i).remove();let p=pI()(),m=c?"Overview"===a?750:500:d.node().getBoundingClientRect().width,g=h.dataByTopic.map(e=>r[e.topic]);return p.margin({left:60,right:10,top:10,bottom:40}).initializeVerticalMarker(!0).isAnimated(!0).tooltipThreshold(1).grid("horizontal").aspectRatio(.5).width(m).dateLabel("date").colorSchema(g),"Overview"===a?p.on("customMouseOver",f.show).on("customMouseMove",(t,n,r)=>{f.title(aS(t.date,o,e,!1)),f.update(t,n,r)}).on("customMouseOut",f.hide):p.on("customMouseMove",ae(n=>{t(aB({date:new Date(n.date).toJSON(),dateRange:e,interval:o,values:n.topics}))},200)),d.datum(h).call(p),f4.select(u).select(n+" .metadata-group .vertical-marker-container").datum([]).call(f),"Overview"!==a&&t(aB(((e,t)=>{if(!e||!e.dataByTopic||0===e.dataByTopic.length)return null;let n=[];e.dataByTopic.forEach(e=>{n=n.concat(e.dates)});let r=[...new Set(n.map(e=>e.date))].sort().pop(),i=e.dataByTopic.map(e=>{let t=e.dates.find(e=>iw(e.date,r)),n=t?t.value:0;return{name:e.topic,date:r,value:n}});return{key:r,date:r,dateRange:t.dateRange,interval:t.interval,values:i}})(h,{dateRange:e,interval:o}))),()=>{f4.select(u).select(i).remove(),d.datum([])}},[r,s,l,t,o,c,a,h,u]),d)?(0,v.jsx)(fW,{text:"Cannot display chart. Adjust your date range or date interval."}):(0,v.jsx)("section",{className:"chart",children:(0,v.jsx)(pF,{hasKey:"Overview"!==a,domId:"line-chart"})})},p$=()=>{var e;let t=ta(),{data:n}=pN(),r=null==n?void 0:n.colorMap,i=null==n||null==(e=n.results)?void 0:e.dateRangeArea,a=ts(lq),o=ts(lV),s=ts(l4),l=ts(lQ),c=ts(fc),u=ts(fd),h=(0,b.useMemo)(()=>i?((e,t,n)=>{let{from:r,to:i}=t,a=structuredClone(e),o=[...new Set(a.map(e=>e.date))];o.sort();let s=o[0],l=o[o.length-1];return aT(r,s,n)&&(a=a.filter(e=>e.date!==s)),aC(i,l,n)&&(a=a.filter(e=>e.date!==l)),a})(i,{from:a,to:o},l):[],[i,a,o,l]),d=!h||!h.length||[...new Set(h.map(e=>e.date))].length<2;return((0,b.useEffect)(()=>{var e;let n={from:a,to:o},i="#stacked-area-chart",s=i+" .stacked-area",u=ah(),f=f4.select(u).select(i);if(!f.node()||d)return;f4.select(u).select(s).remove();let p=c?550:f.node().getBoundingClientRect().width,m=[...new Set(h.filter(e=>"Other"!==e.name).map(e=>e.name))].map(e=>r[e]);m.push(iq.DataLens["10"]);let g=(0,f9.stackedArea)();return g.margin({left:70,right:10,top:10,bottom:40}).areaCurve("linear").initializeVerticalMarker(!0).isAnimated(!1).tooltipThreshold(1).grid("horizontal").aspectRatio(.5).width(p).dateLabel("date").colorSchema(m).on("customMouseMove",ae(e=>{"string"!=typeof e.date&&(e.date=new Date(e.date).toJSON()),e.values=e.values.map(e=>"string"!=typeof e.date?iV(tu({},e),{date:new Date(e.date).toJSON()}):e),t(aB({date:e.date,dateRange:n,interval:l,values:e.values}))},200)),f.datum(h).call(g),(e=((e,t)=>{if(!e||0===e.length)return null;let n=[...new Set(e.map(e=>id()(e.date).toISOString()))].sort().pop(),r=e.filter(e=>iw(e.date,n));return{key:n,date:n,dateRange:t.dateRange,interval:t.interval,values:r}})(h,{dateRange:n,interval:l})).values=e.values.map(e=>"string"!=typeof e.date?iV(tu({},e),{date:new Date(e.date).toJSON()}):e),"string"!=typeof e.date&&(e.date=new Date(e.date).toJSON()),t(aB(e)),()=>{f4.select(u).select(s).remove(),f.datum([])}},[r,a,o,t,h,l,c,d,u]),d)?(0,v.jsx)(fW,{text:"Cannot display chart. Adjust your date range or date interval."}):(0,v.jsx)("section",{className:"chart",children:(0,v.jsx)(pF,{hasKey:"Overview"!==s,domId:"stacked-area-chart"})})},pU=e=>{let{value:t}=e,n=ta(),r=ts(l7)?"focus":"",i=ts(l4),a=ts(l6),o=[];return"Other"===t.name?o.push((0,v.jsxs)("span",{className:"u-left",children:["All other ",{Product:"products",product:"products",issue:"issues","Sub-Issue":"sub-issues",sub_product:"sub-products",Company:"companies"}[r?a:i]]},t.name)):r?o.push((0,v.jsx)("span",{className:"u-left",children:t.name},t.name)):(o.push((0,v.jsx)("span",{className:"u-left",id:i7("focus-"+t.name),children:t.name},t.name)),"Company"!==i||r||o.push((0,v.jsx)(sF,{label:"",iconLeft:"error","aria-label":"Remove "+t.name+" from comparison set",isLink:!0,className:"u-right close",onClick:()=>{n(lb("company",t.name))}},"close_"+t.name))),o},pV=()=>{let{data:e}=pN(),t=e?null==e?void 0:e.colorMap:{},n=ts(l7),r=ts(l4),i=ts(l5),a=((e,t)=>{if(!e||!t)return e;let n=structuredClone(e),r=e.title.split(":"),i=Object.values(iq.DataLens);return n.values.forEach(e=>{Object.hasOwn(e,"colorIndex")||(e.colorIndex=i.indexOf(t[e.name])||0),Object.hasOwn(e,"value")||(e.value=i3(e,"value",0))}),iV(tu({},n),{heading:r[0]+":",date:r[1]?r[1].trim():""})})(ts(l9),t);return a&&a.values?(0,v.jsxs)("section",{className:"tooltip-container u-clearfix",children:[!!("Company"===r&&!(n?"focus":""))&&(0,v.jsx)(d9,{htmlId:"external-tooltip",fieldName:"company",label:"Start typing to begin listing companies",placeholder:"Enter company name",ariaLabel:"Company search bar"}),(0,v.jsxs)(sY,{className:"a-micro-copy",children:[(0,v.jsx)("span",{className:"heading",children:a.heading}),(0,v.jsx)("span",{className:"date",children:a.date})]}),(0,v.jsxs)("div",{children:[(0,v.jsx)("ul",{className:"tooltip-ul",children:a.values.map((e,t)=>(0,v.jsxs)("li",{className:"color__"+e.colorIndex,children:[(0,v.jsx)(pU,{value:e}),(0,v.jsx)("span",{className:"u-right",children:e.value.toLocaleString()})]},t+"-id"))}),"area"===i&&(0,v.jsx)("ul",{className:"m-list--unstyled tooltip-ul total",children:(0,v.jsxs)("li",{children:[(0,v.jsx)("span",{className:"u-left",children:"Total"}),(0,v.jsx)("span",{className:"u-right",children:a.total.toLocaleString()})]})})]}),(0,v.jsxs)("p",{className:"a-micro-copy warn",children:["CFPB updated product and issue options in April 2017 and August 2023."," ",(0,v.jsx)("a",{href:"https://www.consumerfinance.gov/data-research/consumer-complaints/#past-changes",target:"_blank",rel:"noopener noreferrer","aria-label":"Learn more about Product and\n Issue changes (opens in new window)",children:"Learn more"})]})]}):null},pq={Overview:"product",Product:"product",Company:"company"},pY=()=>{var e;let t=ta(),{data:n}=l0(),{data:r,error:i}=pN(),a=ts(lN),o=ts(l7),s=ts(l4),l=null==r?void 0:r.results,c=pq[s],u=i3(l,c,[]).filter(e=>e.isParent).length,h=0;h="product"===c?i3(n,c,[]).length:i2(i3(a,c,[]).length,0,10);let d=a[c]?a[c].filter(e=>-1===e.indexOf("•")).length:h,f=h-u,p=(e=h,(!(d>0)||!(d<=5))&&(e>5||d>5));return o||"Overview"===s||i?null:p?u<=5||d>5&&d!==u?(0,v.jsx)("div",{className:"trend-depth-toggle",children:(0,v.jsx)(sF,{label:"Show more",iconLeft:"plus",isLink:!0,id:"trend-depth-button",onClick:()=>{t(aD(f+5))}})}):(0,v.jsx)("div",{className:"trend-depth-toggle",children:(0,v.jsx)(sF,{label:"Show less",iconLeft:"minus",isLink:!0,id:"trend-depth-button",onClick:()=>{t(aR())}})}):void 0},pW={sub_product:"Sub-products",sub_issue:"Sub-issues",issue:"Issues",product:"Products"},pG={product:"Product the consumer identified in the complaint. Click on a company name to expand products.",company:"Product the consumer identified in the complaint. Click on a company name to expand products.",sub_product:"Product and sub-product the consumer identified in the complaint. Click on a product to expand sub-products.",issue:"Product and issue the consumer identified in the complaint. Click on a product to expand issues.",overview:"Product the consumer identified in the complaint. Click on a product to expand sub-products"},pX={sub_product:"Sub-products the consumer identified in the complaint",product:"Product the consumer identified in the complaint",issue:"Issues the consumer identified in the complaint"},pK=()=>{let e=ta(),{data:t,isLoading:n,isFetching:r,error:i}=pN(),a=ts(lj),o=ts(lQ),s=ts(lq),l=ts(lV),c=ts(lJ),u=ts(l5),h=ts(l7),d=ts(l4),f=ts(l6),p=ts(fs),m=ts(fd),g=d.toLowerCase(),y=f.replace("_","-"),b=""===f?pG[g]:pG[f],x=""===f?pX[g]:pX[f],w=i?{}:(null==t?void 0:t.results)||{},_=i?{}:null==t?void 0:t.colorMap,k=i?0:null==t?void 0:t.total,S=!n&&!r&&"Company"===d&&(!a||0===a.length),M=aM(w[y],_,d,p),A=iN.map(e=>({name:e,disabled:ag(s,l)&&"Day"===e})),T=aM(w.product,!1,d,p),C=aM(w[g],_,d,p),P=ib(s),E=ib(l),O="Overview"===d,N=pW[f]+", by "+d.toLowerCase()+" from",j=()=>{if(O);else if(h)return"Complaints by "+pW[f].toLowerCase()+", by date received by the CFPB";return"Complaints by date received by the CFPB"};return(0,v.jsxs)("section",{className:"trends-panel"+(O?"":" external-tooltip"),children:[(0,v.jsx)(fq,{}),(0,v.jsx)(f1,{}),c?(0,v.jsx)(fU,{text:"“Day” interval is disabled when the date range is longer than one year",closeFn:()=>{e(d0())}}):null,m<750?(0,v.jsx)(fH,{}):null,(0,v.jsx)(fG,{}),(0,v.jsxs)("div",{className:"layout-row refine-bar",children:[(0,v.jsx)(fJ,{label:"Aggregate complaints by",title:"Aggregate by",values:iR,id:"lens",value:d,handleChange:t=>{let{value:n}=t.target;ai("Dropdown","Trends:"+n),e(aj(n))}}),(0,v.jsx)(f0,{}),(0,v.jsx)(fJ,{label:"Choose the Date interval",title:"Date interval",values:A,id:"interval",value:o,handleChange:t=>{let{value:n}=t.target;ai("Dropdown","Trends:"+n),e(dJ(n))}}),O?null:[(0,v.jsx)(f0,{},"separator"),(0,v.jsx)(pO,{},"chart-toggles")]]}),i?(0,v.jsx)(fW,{text:"There was a problem executing your search"}):null,S?(0,v.jsx)("div",{className:"layout-row company-overlay",children:(0,v.jsxs)("section",{className:"company-search",children:[(0,v.jsx)("p",{children:"Choose a company to start your visualization using the type-ahead menu below. You can add more than one company to your view"}),(0,v.jsx)(d9,{htmlId:"modal-search",fieldName:"company",label:"Start typing to begin listing companies",placeholder:"Enter company name",ariaLabel:"Type company name to view in detail"})]})}):null,h?(0,v.jsx)(pD,{}):null,!S&&O&&k>0?(0,v.jsx)("div",{className:"layout-row",children:(0,v.jsxs)("section",{className:"chart-description",children:[(0,v.jsx)(sH,{type:"2",className:"area-chart-title",children:j()}),(0,v.jsx)("p",{className:"chart-helper-text",children:"A time series graph of complaints for the selected date range. Hover on the chart to see the count for each date interval. Your filter selections will update what you see on the graph."})]})}):null,S||O||!(k>0)?null:(0,v.jsx)("div",{className:"layout-row",children:(0,v.jsxs)("section",{className:"chart-description",children:[(0,v.jsx)(sH,{type:"2",className:"area-chart-title",children:j()}),(0,v.jsx)("p",{className:"chart-helper-text",children:"A time series graph of the (up to five) highest volume complaints for the selected date range. However, you can view all of your selections in the bar chart, below. Hover on the chart to see the count for each date interval. Your filter selections will update what you see on the graph."})]})}),!S&&k>0?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("div",{className:"layout-row date-range-disclaimer",children:(0,v.jsx)("strong",{children:"Note: Data from incomplete time intervals are not shown"})}),(0,v.jsxs)("div",{className:"layout-row",children:[(0,v.jsxs)(v.Fragment,{children:["line"===u&&(0,v.jsx)(pH,{}),"area"===u&&(0,v.jsx)(p$,{})]}),!O&&(0,v.jsx)(pV,{})]})]}):null,k>0&&(S?null:O?(0,v.jsx)(f8,{id:"product",colorScheme:T.colorScheme,data:T.data,title:"Product by highest complaint volume "+P+" to "+E,helperText:b,total:k}):h?(0,v.jsx)(f8,{id:d,colorScheme:M.colorScheme,data:M.data,title:N+" "+P+" to "+E,helperText:x,total:k}):[(0,v.jsx)(pL,{showTitle:!0},"lens-tab"),(0,v.jsx)(f8,{id:d,colorScheme:C.colorScheme,data:C.data,title:N+" "+P+" to "+E,helperText:b,total:k},d+"row")]),(0,v.jsx)(pY,{}),(0,v.jsx)(s2,{isLoading:n||r})]})},pZ=()=>{let e,t=ts(fh);switch(t){case"Map":e=(0,v.jsx)(pA,{});break;case"List":e=(0,v.jsx)(f3,{});break;default:e=(0,v.jsx)(pK,{})}return(0,v.jsxs)("div",{className:"content__main "+t.toLowerCase(),children:[(0,v.jsx)(pT,{}),e,(0,v.jsx)(pC,{})]})},pQ="json",pJ="filtered",p0="full",p1=()=>{let e=ta(),t=ts(lF),n=ts(lN),r=ts(fh),{data:i}=l0(),a=(null==i?void 0:i.total)||0,o=(null==i?void 0:i.doc_count)||0,s=a===o,[l,c]=(0,b.useState)(p0),[u,h]=(0,b.useState)("csv"),[d,f]=(0,b.useState)(!1),p=s?p0:l,m=(0,b.useMemo)(()=>{let e,r=tu({},n,t);var i=p===p0?"https://files.consumerfinance.gov/ccdb/complaints."+u+".zip":((e=tu({},r)).size=a,e.format=u,e.no_aggs=!0,delete e.from,delete e.searchAfter,i$+dY(e));if(!i)return i;let o=document.createElement("a");return o.href=i,o.href},[p,u,a,n,t]);return(0,v.jsxs)("section",{className:"export-modal",children:[(0,v.jsxs)("div",{className:"header layout-row",children:[(0,v.jsx)(sH,{type:"3",className:"flex-all",children:"Export complaints"}),(0,v.jsx)(sF,{label:"Close",iconRight:"error-round",isLink:!0,"data-gtm_ignore":"true",onClick:()=>{e(lt())}})]}),(0,v.jsxs)("div",{className:"body",children:[(0,v.jsx)("div",{className:"instructions",children:"To download a copy of this dataset, choose the file format and which complaints you want to export below."}),(0,v.jsxs)("div",{className:"group",children:[(0,v.jsx)("div",{className:"group-title",children:"Select a format for the exported file"}),(0,v.jsxs)("div",{children:[(0,v.jsxs)("div",{className:"m-form-field m-form-field--radio m-form-field--lg-target",children:[(0,v.jsx)("input",{checked:"csv"===u,className:"a-radio",id:"format_csv",onChange:()=>{f(!1),h("csv")},type:"radio",value:"csv"}),(0,v.jsx)("label",{className:"a-label",htmlFor:"format_csv",children:"CSV"})]}),(0,v.jsxs)("div",{className:"m-form-field m-form-field--radio m-form-field--lg-target",children:[(0,v.jsx)("input",{checked:u===pQ,className:"a-radio",id:"format_json",onChange:()=>{f(!1),h(pQ)},type:"radio",value:"json"}),(0,v.jsx)("label",{className:"a-label",htmlFor:"format_json",children:"JSON"})]})]})]}),s?null:(0,v.jsxs)("div",{className:"group",children:[(0,v.jsx)("div",{className:"group-title",children:"Select which complaints you’d like to export"}),(0,v.jsxs)("div",{children:[(0,v.jsxs)("div",{className:"m-form-field m-form-field--radio m-form-field--lg-target",children:[(0,v.jsx)("input",{checked:l===pJ,className:"a-radio",id:"dataset_filtered",onChange:()=>{f(!1),c(pJ)},type:"radio",value:"filtered"}),(0,v.jsxs)("label",{className:"a-label",htmlFor:"dataset_filtered",children:["Filtered dataset ("+a.toLocaleString()+" complaints)",(0,v.jsx)("br",{}),"(only the results of the last search and/or filter)"]})]}),(0,v.jsxs)("div",{className:"m-form-field m-form-field--radio m-form-field--lg-target",children:[(0,v.jsx)("input",{checked:l===p0,className:"a-radio",id:"dataset_full",onChange:()=>{f(!1),c(p0)},type:"radio",value:"full"}),(0,v.jsxs)("label",{className:"a-label",htmlFor:"dataset_full",children:["Full dataset ("+o.toLocaleString()+" complaints)",(0,v.jsx)("br",{}),"(not recommended due to very large file size)"]})]})]})]}),(0,v.jsxs)("div",{className:"heres-the-url",children:[(0,v.jsx)(sH,{type:"4",children:"Link to your complaint search results for future reference"}),(0,v.jsxs)("div",{className:"layout-row",children:[(0,v.jsx)("input",{className:"flex-all a-text-input",id:"export-uri-input",type:"text",value:m,readOnly:!0}),(0,v.jsx)(sF,{label:d?"Copied":"Copy",iconLeft:d?"checkmark-round":"copy",className:"a-btn ".concat(d?"export-url-copied":"a-btn__secondary"),disabled:!m,onClick:e=>{let t=af("export-uri-input");t.select(),t.setSelectionRange(0,99999),navigator.clipboard.writeText(t.value),e.target.focus(),f(!0)}})]})]}),(0,v.jsx)("div",{className:"timeliness-warning",children:"The export process could take several minutes if you’re downloading many complaints"})]}),(0,v.jsxs)("div",{className:"footer layout-row",children:[(0,v.jsx)(sF,{label:"Start export","data-gtm_ignore":"true",onClick:()=>{p===p0?ai("Export All Data",r+":"+u):ai("Export Some Data",r+":"+u),window.location.assign(m),e(ln(iT))}}),(0,v.jsx)(sF,{label:"Cancel",isLink:!0,appearance:"warning","data-gtm_ignore":"true",onClick:()=>{e(lt())}})]})]})},p2=()=>{let e=ta();return(0,v.jsxs)("section",{className:"export-modal",children:[(0,v.jsxs)("div",{className:"header layout-row",children:[(0,v.jsx)(sH,{type:"3",className:"flex-all",children:"Export complaints"}),(0,v.jsx)(sF,{label:"Close",iconRight:"error-round",isLink:!0,"data-gtm_ignore":"true",onClick:()=>{e(lt())}})]}),(0,v.jsx)("div",{className:"body",children:(0,v.jsx)("div",{className:"instructions",children:"It may take a few minutes for your file to download. You can keep working while it processes."})})]})},p3=e=>{let{onClose:t}=e;return(0,v.jsxs)("section",{className:"more-about-modal",children:[(0,v.jsx)("div",{className:"header",children:(0,v.jsx)(sH,{type:"3",children:"Things you should know before you use this database"})}),(0,v.jsxs)("div",{className:"body",children:[(0,v.jsx)(sY,{children:"This database only includes complaints the CFPB sent to companies and complaints are only published after the company responds, confirming a commercial relationship or after 15 days, whichever comes first. This database does not include complaints referred to other regulators, such as complaints about depository institutions with less than $10 billion in assets."}),(0,v.jsx)(sY,{children:"This database is not a statistical sample of consumers’ experiences in the marketplace. Complaints are not necessarily representative of all consumers’ experiences with a financial product or company. Company-specific information should be considered in the context of that company’s size and/or market share."}),(0,v.jsxs)(sY,{children:["This database only includes a consumer’s description of what happened in their own words if the consumer agrees to share it and after we take steps to ",(0,v.jsx)(a9,{href:"https://files.consumerfinance.gov/f/documents/201503_cfpb_Narrative-Scrubbing-Standard.pdf",target:"_blank",rel:"noopener noreferrer",label:"remove personal information"}),". One consumer’s experience is not necessarily representative of all consumers’ experiences and narratives are not verified before publication."]}),(0,v.jsx)(sY,{children:"This database generally updates daily."})]}),(0,v.jsx)("div",{className:"footer layout-row",children:(0,v.jsx)(sF,{label:"Close",onClick:t})})]})};p3.propTypes={onClose:s0().func.isRequired};var p5=i(567),p7=i.n(p5);let p4=()=>{let e=ts(ff),t=ta(),n=(()=>{let e=af(au());if(e)return e;let t=ah();return t instanceof ShadowRoot?t.host||null:t instanceof HTMLElement?t:null})(),r=ad(),i=(0,b.useMemo)(()=>({[iA]:p1,[iT]:p2,[iC]:p3})[e],[e]);return i?(0,v.jsx)(p7(),iV(tu({},n?{appElement:n}:{}),{isOpen:!0,contentLabel:"CFPB Modal Dialog",className:"modal-body",overlayClassName:"modal-overlay",parentSelector:()=>r,onRequestClose:()=>{t(lt())},children:(0,v.jsx)(i,{onClose:()=>{t(lt())}})})):null},p6=".ccdb-content",p9="".concat("".concat(p6," aside.content__sidebar")," .filter-panel"),p8={CONTENT:"".concat(p6,".content"),HERO_LINKS:"".concat(p6," header.content__hero .m-list--horizontal"),TABBED_NAVIGATION:"".concat(p6,' [data-tour="tabbed-navigation"] section'),FILTER_PANEL:p9,DATE_FILTER:"".concat(p9," .date-filter"),PRODUCT_AGGREGATION:"".concat(p9," .aggregation.product"),FILTER_SHOW_HIDE:"".concat(p9," .aggregation button"),SEARCH_BAR:"".concat(p6," .search-bar"),SEARCH_SUMMARY:"".concat(p6," #search-summary"),EXPORT_BTN:"".concat(p6," .export-results .export-btn"),PRINT_BTN:"".concat(p6," .export-results .print-preview"),MAP_SHADING:"".concat(p6," .map-shading"),TILE_MAP:"".concat(p6," #tile-chart-map"),ROW_CHART_SECTION:"".concat(p6,' [data-tour="row-chart-section"]'),MAP_ROW_CHART_SECTION:"".concat(p6,' .map-panel [data-tour="row-chart-section"]'),SELECT_SIZE:"".concat(p6,' [data-tour="select-size"]'),SELECT_SORT:"".concat(p6,' [data-tour="select-sort"]'),SELECT_LENS:"".concat(p6,' [data-tour="select-lens"]'),SELECT_INTERVAL:"".concat(p6,' [data-tour="select-interval"]'),NARRATIVES_BUTTONS:"".concat(p6," .refine-bar section.narratives-buttons .m-btn-group"),CARDS_PANEL:"".concat(p6," .cards-panel"),TO_DETAIL:"".concat(p6," .cards-panel .to-detail"),ROW_CHART_EXPANDABLE:"".concat(p6," #row-chart-product .tick.expandable"),MOBILE_FILTER_TOGGLE:"".concat(p6," .filter-panel-toggle .m-btn-group .a-btn")},me=(e,t)=>({selector:e,label:t}),mt={INDEX:me(p8.CONTENT,"Index"),HELP_LINKS:me(p8.HERO_LINKS,"Help Links"),VIEWS:me(p8.TABBED_NAVIGATION,"Views"),FILTERS:me(p8.FILTER_PANEL,"Filters"),DATE_RECEIVED:me(p8.DATE_FILTER,"Date Received"),PRODUCT_ISSUE:me(p8.PRODUCT_AGGREGATION,"Product/Issue"),SHOW_HIDE:me(p8.FILTER_SHOW_HIDE,"Show/Hide"),SEARCH_BAR:me(p8.SEARCH_BAR,"Search Bar"),SEARCH_SUMMARY:me(p8.SEARCH_SUMMARY,"Search Summary"),EXPORT_DATA:me(p8.EXPORT_BTN,"Export Data"),PRINT_PAGE:me(p8.PRINT_BTN,"Print Page"),TABBED_NAVIGATION:me(p8.TABBED_NAVIGATION,"Tabbed Navigation"),MAP_SHADING:me(p8.MAP_SHADING,"Map Shading"),TILE_MAP:me(p8.TILE_MAP,"Tile Map"),ROW_CHARTS:me(p8.ROW_CHART_SECTION,"Row Charts"),MAP_ROW_CHARTS:me(p8.MAP_ROW_CHART_SECTION,"Row Charts"),SELECT_SIZE:me(p8.SELECT_SIZE,"Show Number"),SELECT_SORT:me(p8.SELECT_SORT,"Sort Results"),SELECT_LENS:me(p8.SELECT_LENS,"Aggregate By"),SELECT_INTERVAL:me(p8.SELECT_INTERVAL,"Date Interval"),NARRATIVES:me(p8.NARRATIVES_BUTTONS,"Show Narratives"),RESULTS:me(p8.CARDS_PANEL,"Results"),COMPLAINT_DETAIL:me(p8.TO_DETAIL,"View Detailed Complaints")},mn={STEP_1:mt.INDEX,STEP_2:mt.HELP_LINKS,STEP_3:mt.VIEWS,STEP_4:mt.FILTERS,STEP_5:mt.DATE_RECEIVED,STEP_6:mt.PRODUCT_ISSUE,STEP_7:mt.SHOW_HIDE,STEP_8:mt.SEARCH_BAR,STEP_9:mt.SEARCH_SUMMARY,STEP_10:mt.EXPORT_DATA,STEP_11:mt.PRINT_PAGE,STEP_12:mt.MAP_SHADING,STEP_13:mt.TILE_MAP,STEP_14:mt.MAP_ROW_CHARTS,STEP_15:mt.TABBED_NAVIGATION},mr={STEP_1:mt.INDEX,STEP_2:mt.HELP_LINKS,STEP_3:mt.VIEWS,STEP_4:mt.FILTERS,STEP_5:mt.DATE_RECEIVED,STEP_6:mt.PRODUCT_ISSUE,STEP_7:mt.SHOW_HIDE,STEP_8:mt.SEARCH_BAR,STEP_9:mt.SEARCH_SUMMARY,STEP_10:mt.EXPORT_DATA,STEP_11:mt.PRINT_PAGE,STEP_12:mt.SELECT_SIZE,STEP_13:mt.SELECT_SORT,STEP_14:mt.NARRATIVES,STEP_15:mt.RESULTS,STEP_16:mt.COMPLAINT_DETAIL,STEP_17:mt.TABBED_NAVIGATION},mi={STEP_1:mt.INDEX,STEP_2:mt.HELP_LINKS,STEP_3:mt.VIEWS,STEP_4:mt.FILTERS,STEP_5:mt.DATE_RECEIVED,STEP_6:mt.PRODUCT_ISSUE,STEP_7:mt.SHOW_HIDE,STEP_8:mt.SEARCH_BAR,STEP_9:mt.SEARCH_SUMMARY,STEP_10:mt.EXPORT_DATA,STEP_11:mt.PRINT_PAGE,STEP_12:mt.SELECT_LENS,STEP_13:mt.SELECT_INTERVAL,STEP_14:mt.ROW_CHARTS,STEP_15:mt.TABBED_NAVIGATION},ma=(e,t)=>'<li><button class="a-btn a-btn--link" onclick="(function(){var t=window.__ccdbDom&&window.__ccdbDom.querySelectorAll(\'.introjs-bullets li a\')['.concat(e+1,'];t&&t.click();})()">')+t[1].label+"</button></li>",mo="";Object.entries(mn).slice(1).forEach((e,t)=>{mo+=ma(t,e)});let ms="";Object.entries(mr).slice(1).forEach((e,t)=>{ms+=ma(t,e)});let ml="";Object.entries(mi).slice(1).forEach((e,t)=>{ml+=ma(t,e)});let mc={Map:[{element:mn.STEP_1.selector,intro:'<div><div class="left">Welcome to the Consumer Complaint Database!<br /><br />Complaints the CFPB sends to companies for response are published in the Consumer Complaint Database after the company responds, confirming a commercial relationship with the consumer, or after 15 days, whichever comes first.<br /><br />Complaints the CFPB refers to other regulators, such as complaints about depository institutions with less than $10 billion in assets, are not published in the database. This database is not a statistical sample of consumers’ experiences in the marketplace.</div><div class="right"><h4>Index</h4><ul>'+mo+"</ul></div></div>",tooltipClass:"wide"},{element:mn.STEP_2.selector,intro:"These links provide more information about this database."},{element:mn.STEP_3.selector,intro:"You can change how to view complaint data by selecting the three views we have available — Trends, List, and Map.<br /><br />You are currently on the Map view, which displays complaints by state.<br /><br />To read individual complaints, select List view<br /><br />To visualize complaint data with product and issue breakdowns, select Trends view",position:"top"},{element:mn.STEP_4.selector,intro:"The “Filter results by” panel lets you filter complaint data. To clear filters, uncheck individual selections in the filter panel or to select “Clear all filters” under the Search bar."},{element:mn.STEP_5.selector,intro:"You can adjust the date range of the complaint data showed using the “Date CFPB received the complaint” filter. <br /> The default date range is three years from today’s date."},{element:mn.STEP_6.selector,intro:"You can filter complaints by the product and issue the consumer selected when they submitted their complaint.<br /><br />Expand a product or issue to see its sub-products or sub-issues, where available. "},{element:mn.STEP_7.selector,intro:"The blue show/hide icon allows you to expand or collapse specific filters."},{element:mn.STEP_8.selector,intro:"Use the “Search within” bar to find specific words or phrases in complaints. By default, this will search “All data”, but you can change this using the gray dropdown menu.<br /> <br />Click “Show advanced search tips” to see some advanced ways to refine your word search."},{element:mn.STEP_9.selector,intro:"As you apply filters and search terms, this will display how many complaints are included out of the total number of complaints published in the database."},{element:mn.STEP_10.selector,intro:"You can export full or filtered results to CSV or JSON by selecting “Export data”."},{element:mn.STEP_11.selector,intro:"Select “Print” to generate a pdf of the current page."},{element:mn.STEP_13.selector,intro:"Hover over a tile on the map to view complaint information specific to that state. You can filter to see data specific to a state by selecting the state or using the filter panel."},{element:mn.STEP_14.selector,intro:"View complaint volume by product in the bar chart. Use the blue arrow by each product to view breakdowns by sub-products.<br /><br />Once the product is expanded, select the “Visualize” link as shown below, to view trends on sub-products and issues:"},{element:mn.STEP_15.selector,intro:"To learn how to use Trends and List views, select the view and then start the tour."}],List:[{element:mr.STEP_1.selector,intro:'<div><div class="left">Welcome to the Consumer Complaint Database!<br /><br />Complaints the CFPB sends to companies for response are published in the Consumer Complaint Database after the company responds, confirming a commercial relationship with the consumer, or after 15 days, whichever comes first.<br /><br />Complaints the CFPB refers to other regulators, such as complaints about depository institutions with less than $10 billion in assets, are not published in the database. This database is not a statistical sample of consumers’ experiences in the marketplace.</div><div class="right"><h4>Index</h4><ul>'+ms+"</ul></div></div>",tooltipClass:"wide"},{element:mr.STEP_2.selector,intro:"These links provide more information about this database."},{element:mr.STEP_3.selector,intro:"You can change how to view complaint data by selecting the three views we have available — Trends, List, and Map.<br /><br />You are currently on the List view, which shows individual complaints.<br /><br />To visualize complaint data with product and issue breakdowns, select Trends view.<br /><br />To view complaints by state, select Map view."},{element:mr.STEP_4.selector,intro:"The “Filter results by” panel lets you filter complaint data. To clear filters, uncheck individual selections in the filter panel or to select “Clear all filters” under the Search bar."},{element:mr.STEP_5.selector,intro:"You can adjust the date range of the complaint data showed using the “Date CFPB received the complaint” filter. <br /> The default date range is three years from today’s date."},{element:mr.STEP_6.selector,intro:"You can filter complaints by the product and issue the consumer selected when they submitted their complaint.<br /><br />Expand a product or issue to see its sub-products or sub-issues, where available. "},{element:mr.STEP_7.selector,intro:"The blue show/hide icon allows you to expand or collapse specific filters."},{element:mr.STEP_8.selector,intro:"Use the “Search within” bar to find specific words or phrases in complaints. By default, this will search “All data”, but you can change this using the gray dropdown menu.<br /> <br />Click “Show advanced search tips” to see some advanced ways to refine your word search."},{element:mr.STEP_9.selector,intro:"As you apply filters and search terms, this will display how many complaints are included out of the total number of complaints published in the database."},{element:mr.STEP_10.selector,intro:"You can export full or filtered results to CSV or JSON by selecting “Export data”."},{element:mr.STEP_11.selector,intro:"Select “Print” to generate a pdf of the current page."},{element:mr.STEP_12.selector,intro:"Select the number of complaints to view per page here."},{element:mr.STEP_13.selector,intro:"Sort complaints in the list view by “Newest to oldest,” “Oldest to newest,” “Relevance,” and “Relevance (asc).”<br /><br />Relevancy are based on any applied search terms."},{element:mr.STEP_14.selector,intro:"You can see all complaints or focus on those with consumer complaint narratives.<br /><br />We publish the consumer’s narrative description of what happened from their complaint if the consumer opts to share it publicly and after taking steps to remove personal information."},{element:mr.STEP_15.selector,intro:"These are your search results. As you apply filters and search terms, your results will display here. This view shows a preview of the complaint."},{element:mr.STEP_16.selector,intro:"Click the blue ID number to see more details about a particular complaint."},{element:mr.STEP_17.selector,intro:"To learn how to use Map and Trend views, select the view and then start the tour."}],Trends:[{element:mi.STEP_1.selector,intro:'<div><div class="left">Welcome to the Consumer Complaint Database!<br /><br />Complaints the CFPB sends to companies for response are published in the Consumer Complaint Database after the company responds, confirming a commercial relationship with the consumer, or after 15 days, whichever comes first.<br /><br />Complaints the CFPB refers to other regulators, such as complaints about depository institutions with less than $10 billion in assets, are not published in the database. This database is not a statistical sample of consumers’ experiences in the marketplace.</div><div class="right"><h4>Index</h4><ul>'+ml+"</ul></div></div>",tooltipClass:"wide first-step"},{element:mi.STEP_2.selector,intro:"These links provide more information about this database."},{element:mi.STEP_3.selector,intro:"You can change how to view complaint data by selecting the three views we have available—Trends, List, and Map.<br /><br />You are currently on the Trends view, which visualizes complaint data using a trend line with product and issue breakdowns.<br /><br />To read individual complaints, select List view.<br /><br />To view complaints by state, select Map view.",position:"top"},{element:mi.STEP_4.selector,intro:"The “Filter results by” panel lets you filter complaint data. To clear filters, uncheck individual selections in the filter panel or to select “Clear all filters” under the Search bar."},{element:mi.STEP_5.selector,intro:"You can adjust the date range of the complaint data showed using the “Date CFPB received the complaint” filter. <br /> The default date range is three years from today’s date."},{element:mi.STEP_6.selector,intro:"You can filter complaints by the product and issue the consumer selected when they submitted their complaint.<br /><br />Expand a product or issue to see its sub-products or sub-issues, where available. "},{element:mi.STEP_7.selector,intro:"The blue show/hide icon allows you to expand or collapse specific filters."},{element:mi.STEP_8.selector,intro:"Use the “Search within” bar to find specific words or phrases in complaints. By default, this will search “All data”, but you can change this using the gray dropdown menu.<br /> <br />Click “Show advanced search tips” to see some advanced ways to refine your word search."},{element:mi.STEP_9.selector,intro:"As you apply filters and search terms, this will display how many complaints are included out of the total number of complaints published in the database."},{element:mi.STEP_10.selector,intro:"You can export full or filtered results to CSV or JSON by selecting “Export data”."},{element:mi.STEP_11.selector,intro:"Select “Print” to generate a pdf of the current page."},{element:mi.STEP_12.selector,intro:"Select the dropdown to aggregate the data by product or by the company to which the CFPB sent the complaint for response."},{element:mi.STEP_13.selector,intro:"Select this dropdown to change the time interval displayed on the trend line."},{element:mi.STEP_14.selector,intro:"View complaint volume by product in the bar chart. Use the blue arrow by each product to view breakdowns by sub-products.<br /><br />Once the product is expanded, select the “Visualize” link as shown below, to view trends on sub-products and issues:"},{element:mi.STEP_15.selector,intro:"To learn how to use List and Map views, select the view and then start the tour.",position:"top"}]},mu={disableInteraction:!0,scrollToElement:!0,scrollTo:"tooltip",showStepNumbers:!1,exitOnOverlayClick:!1,exitOnEsc:!0,nextLabel:"Next",prevLabel:"Previous",doneLabel:"End Tour"},mh=()=>{let e=ta();return(0,v.jsx)(sF,{label:"Take a tour",iconLeft:"help-round",className:"tour-button",onClick:()=>e(lc())})};function md(e){return(md="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})(e)}function mf(e,t,n,r){return new(n||(n=Promise))(function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(o,s)}l((r=r.apply(e,t||[])).next())})}function mp(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(6===c[0]&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function mm(e,t,n){var r,i=((r={})[e]=t,r.path="/",r.expires=void 0,r);if(n){var a=new Date;a.setTime(a.getTime()+24*n*36e5),i.expires=a.toUTCString()}var o=[];for(var s in i)o.push("".concat(s,"=").concat(i[s]));return document.cookie=o.join("; "),mg(e)}function mg(e){var t;return(t={},document.cookie.split(";").forEach(function(e){var n=e.split("="),r=n[0],i=n[1];t[r.trim()]=i}),t)[e]}"function"==typeof SuppressedError&&SuppressedError;var mv,my,mb,mx,mw=(mx={},function(e,t){return void 0===t&&(t="introjs-stamp"),mx[t]=mx[t]||0,void 0===e[t]&&(e[t]=mx[t]++),e[t]}),m_=new(function(){function e(){this.events_key="introjs_event"}return e.prototype._id=function(e,t,n){return e+mw(t)+(n?"_".concat(mw(n)):"")},e.prototype.on=function(e,t,n,r,i){var a=this._id(t,n,r),o=function(t){return n(r||e,t||window.event)};"addEventListener"in e?e.addEventListener(t,o,i):"attachEvent"in e&&e.attachEvent("on".concat(t),o),e[this.events_key]=e[this.events_key]||{},e[this.events_key][a]=o},e.prototype.off=function(e,t,n,r,i){var a=this._id(t,n,r),o=e[this.events_key]&&e[this.events_key][a];o&&("removeEventListener"in e?e.removeEventListener(t,o,i):"detachEvent"in e&&e.detachEvent("on".concat(t),o),e[this.events_key][a]=null)},e}()),mk=function(e){return"function"==typeof e};function mS(e,t){if(e instanceof SVGElement){var n=e.getAttribute("class")||"";n.match(t)||e.setAttribute("class","".concat(n," ").concat(t))}else if(void 0!==e.classList)for(var r=0,i=t.split(" ");r<i.length;r++){var a=i[r];e.classList.add(a)}else e.className.match(t)||(e.className+=" ".concat(t))}function mM(e,t){var n="";return"currentStyle"in e?n=e.currentStyle[t]:document.defaultView&&document.defaultView.getComputedStyle&&(n=document.defaultView.getComputedStyle(e,null).getPropertyValue(t)),n&&n.toLowerCase?n.toLowerCase():n}function mA(e,t){if(e){var n=function(e){var t=window.getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.body;for(var i=e;i=i.parentElement;)if(t=window.getComputedStyle(i),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.body}(t);n!==document.body&&(n.scrollTop=t.offsetTop-n.offsetTop)}}function mT(){if(void 0!==window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var e=document.documentElement;return{width:e.clientWidth,height:e.clientHeight}}function mC(e,t,n,r,i){if("off"!==t&&e&&(a="tooltip"===t?i.getBoundingClientRect():r.getBoundingClientRect(),!((o=r.getBoundingClientRect()).top>=0&&o.left>=0&&o.bottom+80<=window.innerHeight&&o.right<=window.innerWidth))){var a,o,s=mT().height;a.bottom-(a.bottom-a.top)<0||r.clientHeight>s?window.scrollBy(0,a.top-(s/2-a.height/2)-n):window.scrollBy(0,a.top-(s/2-a.height/2)+n)}}function mP(e){e.setAttribute("role","button"),e.tabIndex=0}function mE(e){var t=e.parentElement;return!(!t||"HTML"===t.nodeName)&&("fixed"===mM(e,"position")||mE(t))}function mO(e,t){var n=document.body,r=document.documentElement,i=window.pageYOffset||r.scrollTop||n.scrollTop,a=window.pageXOffset||r.scrollLeft||n.scrollLeft;t=t||n;var o=e.getBoundingClientRect(),s=t.getBoundingClientRect(),l=mM(t,"position"),c={width:o.width,height:o.height};return"body"!==t.tagName.toLowerCase()&&"relative"===l||"sticky"===l?Object.assign(c,{top:o.top-s.top,left:o.left-s.left}):mE(e)?Object.assign(c,{top:o.top,left:o.left}):Object.assign(c,{top:o.top+i,left:o.left+a})}function mN(e,t){if(e instanceof SVGElement){var n=e.getAttribute("class")||"";e.setAttribute("class",n.replace(t,"").replace(/^\s+|\s+$/g,""))}else e.className=e.className.replace(t,"").replace(/^\s+|\s+$/g,"")}function mj(e,t){var n="";if(e.style.cssText&&(n+=e.style.cssText),"string"==typeof t)n+=t;else for(var r in t)n+="".concat(r,":").concat(t[r],";");e.style.cssText=n}function mL(e,t,n){if(n&&t){var r=mO(t.element,e._targetElement),i=e._options.helperElementPadding;t.element instanceof Element&&mE(t.element)?mS(n,"introjs-fixedTooltip"):mN(n,"introjs-fixedTooltip"),"floating"===t.position&&(i=0),mj(n,{width:"".concat(r.width+i,"px"),height:"".concat(r.height+i,"px"),top:"".concat(r.top-i/2,"px"),left:"".concat(r.left-i/2,"px")})}}function mD(e,t,n,r,i){return e.left+t+n.width>r.width?(i.style.left="".concat(r.width-n.width-e.left,"px"),!1):(i.style.left="".concat(t,"px"),!0)}function mR(e,t,n,r){return e.left+e.width-t-n.width<0?(r.style.left="".concat(-e.left,"px"),!1):(r.style.right="".concat(t,"px"),!0)}function mI(e,t){e.includes(t)&&e.splice(e.indexOf(t),1)}function mz(e,t,n,r,i){if(void 0===i&&(i=!1),t){n.style.top="",n.style.right="",n.style.bottom="",n.style.left="",n.style.marginLeft="",n.style.marginTop="",r.style.display="inherit",n.className=["introjs-tooltip","string"==typeof t.tooltipClass?t.tooltipClass:e._options.tooltipClass].filter(Boolean).join(" "),n.setAttribute("role","dialog"),"floating"!==(l=t.position)&&e._options.autoPosition&&(l=function(e,t,n,r){var i=e.slice(),a=mT(),o=mO(n).height+10,s=mO(n).width+20,l=t.getBoundingClientRect(),c="floating";if(l.bottom+o>a.height&&mI(i,"bottom"),l.top-o<0&&mI(i,"top"),l.right+s>a.width&&mI(i,"right"),l.left-s<0&&mI(i,"left"),r&&(r=r.split("-")[0]),i.length&&(c=i[0],i.includes(r)&&(c=r)),"top"===c||"bottom"===c){var u,h,d,f,p,m=void 0,g=[];"top"===c?(m="top-middle-aligned",g=["top-left-aligned","top-middle-aligned","top-right-aligned"]):(m="bottom-middle-aligned",g=["bottom-left-aligned","bottom-middle-aligned","bottom-right-aligned"]),u=l.left,h=a.width,d=g,f=s/2,(p=Math.min(h,window.screen.width))-u<s&&(mI(d,"top-left-aligned"),mI(d,"bottom-left-aligned")),(u<f||p-u<f)&&(mI(d,"top-middle-aligned"),mI(d,"bottom-middle-aligned")),u<s&&(mI(d,"top-right-aligned"),mI(d,"bottom-right-aligned")),c=(d.length?d[0]:null)||m}return c}(e._options.positionPrecedence,t.element,n,l)),o=mO(t.element),a=mO(n),s=mT(),mS(n,"introjs-".concat(l));var a,o,s,l,c=o.width/2-a.width/2;switch(l){case"top-right-aligned":r.className="introjs-arrow bottom-right";mR(o,0,a,n),n.style.bottom="".concat(o.height+20,"px");break;case"top-middle-aligned":r.className="introjs-arrow bottom-middle",i&&(c+=5),mR(o,c,a,n)&&(n.style.right="",mD(o,c,a,s,n)),n.style.bottom="".concat(o.height+20,"px");break;case"top-left-aligned":case"top":r.className="introjs-arrow bottom",mD(o,15*!i,a,s,n),n.style.bottom="".concat(o.height+20,"px");break;case"right":n.style.left="".concat(o.width+20,"px"),o.top+a.height>s.height?(r.className="introjs-arrow left-bottom",n.style.top="-".concat(a.height-o.height-20,"px")):r.className="introjs-arrow left";break;case"left":i||!0!==e._options.showStepNumbers||(n.style.top="15px"),o.top+a.height>s.height?(n.style.top="-".concat(a.height-o.height-20,"px"),r.className="introjs-arrow right-bottom"):r.className="introjs-arrow right",n.style.right="".concat(o.width+20,"px");break;case"floating":r.style.display="none",n.style.left="50%",n.style.top="50%",n.style.marginLeft="-".concat(a.width/2,"px"),n.style.marginTop="-".concat(a.height/2,"px");break;case"bottom-right-aligned":r.className="introjs-arrow top-right",mR(o,0,a,n),n.style.top="".concat(o.height+20,"px");break;case"bottom-middle-aligned":r.className="introjs-arrow top-middle",i&&(c+=5),mR(o,c,a,n)&&(n.style.right="",mD(o,c,a,s,n)),n.style.top="".concat(o.height+20,"px");break;default:r.className="introjs-arrow top",mD(o,0,a,s,n),n.style.top="".concat(o.height+20,"px")}}}function mB(){for(var e=0,t=Array.from(document.querySelectorAll(".introjs-showElement"));e<t.length;e++)mN(t[e],/introjs-[a-zA-Z]+/g)}function mF(e,t){var n=document.createElement(e),r=/^(?:role|data-|aria-)/;for(var i in t=t||{}){var a=t[i];"style"===i&&"function"!=typeof a?mj(n,a):"string"==typeof a&&i.match(r)?n.setAttribute(i,a):n[i]=a}return n}function mH(e,t,n){if(void 0===n&&(n=!1),n){var r=t.style.opacity||"1";mj(t,{opacity:"0"}),window.setTimeout(function(){mj(t,{opacity:r})},10)}e.appendChild(t)}function m$(e,t){var n=mF("div",{className:"introjs-bullets"});!1===e._options.showBullets&&(n.style.display="none");var r=mF("ul");r.setAttribute("role","tablist");for(var i=function(){var t=this.getAttribute("data-step-number");null!=t&&e.goToStep(parseInt(t,10))},a=0;a<e._introItems.length;a++){var o=e._introItems[a].step,s=mF("li"),l=mF("a");s.setAttribute("role","presentation"),l.setAttribute("role","tab"),l.onclick=i,a===t.step-1&&(l.className="active"),mP(l),l.innerHTML=" ",l.setAttribute("data-step-number",o.toString()),s.appendChild(l),r.appendChild(s)}return n.appendChild(r),n}function mU(e,t,n){var r=e.querySelector(".introjs-progress .introjs-progressbar");if(r){var i=(t+1)/n*100;r.style.cssText="width:".concat(i,"%;"),r.setAttribute("aria-valuenow",i.toString())}}function mV(e,t){return mf(this,void 0,void 0,function(){var n,r,i,a,o,s,l,c,u,h,d,f,p,m,g,v,y,b,x,w,_,k,S,M,A=this;return mp(this,function(T){switch(T.label){case 0:return mk(e._introChangeCallback)?[4,e._introChangeCallback.call(e,t.element)]:[3,2];case 1:T.sent(),T.label=2;case 2:var C,P,E,O,N,j;return n=document.querySelector(".introjs-helperLayer"),r=document.querySelector(".introjs-tooltipReferenceLayer"),i="introjs-helperLayer","string"==typeof t.highlightClass&&(i+=" ".concat(t.highlightClass)),"string"==typeof e._options.highlightClass&&(i+=" ".concat(e._options.highlightClass)),null!==n&&null!==r?(l=r.querySelector(".introjs-helperNumberLayer"),c=r.querySelector(".introjs-tooltiptext"),u=r.querySelector(".introjs-tooltip-title"),h=r.querySelector(".introjs-arrow"),d=r.querySelector(".introjs-tooltip"),s=r.querySelector(".introjs-skipbutton"),o=r.querySelector(".introjs-prevbutton"),a=r.querySelector(".introjs-nextbutton"),n.className=i,d.style.opacity="0",d.style.display="none",mA(e._options.scrollToElement,t.element),mL(e,t,n),mL(e,t,r),mB(),e._lastShowElementTimer&&window.clearTimeout(e._lastShowElementTimer),e._lastShowElementTimer=window.setTimeout(function(){null!==l&&(l.innerHTML="".concat(t.step," ").concat(e._options.stepNumbersOfLabel," ").concat(e._introItems.length)),c.innerHTML=t.intro||"",u.innerHTML=t.title||"",d.style.display="block",mz(e,t,d,h),function(e,t,n){if(e){var r=t.querySelector(".introjs-bullets li > a.active"),i=t.querySelector('.introjs-bullets li > a[data-step-number="'.concat(n.step,'"]'));r&&i&&(r.className="",i.className="active")}}(e._options.showBullets,r,t),mU(r,e._currentStep,e._introItems.length),d.style.opacity="1",(null!=a&&/introjs-donebutton/gi.test(a.className)||null!=a)&&a.focus(),mC(e._options.scrollToElement,t.scrollTo,e._options.scrollPadding,t.element,c)},350)):(f=mF("div",{className:i}),p=mF("div",{className:"introjs-tooltipReferenceLayer"}),m=mF("div",{className:"introjs-arrow"}),g=mF("div",{className:"introjs-tooltip"}),v=mF("div",{className:"introjs-tooltiptext"}),y=mF("div",{className:"introjs-tooltip-header"}),b=mF("h1",{className:"introjs-tooltip-title"}),x=mF("div"),mj(f,{"box-shadow":"0 0 1px 2px rgba(33, 33, 33, 0.8), rgba(33, 33, 33, ".concat(e._options.overlayOpacity.toString(),") 0 0 0 5000px")}),mA(e._options.scrollToElement,t.element),mL(e,t,f),mL(e,t,p),mH(e._targetElement,f,!0),mH(e._targetElement,p),v.innerHTML=t.intro,b.innerHTML=t.title,x.className="introjs-tooltipbuttons",!1===e._options.showButtons&&(x.style.display="none"),y.appendChild(b),g.appendChild(y),g.appendChild(v),e._options.dontShowAgain&&(w=mF("div",{className:"introjs-dontShowAgain"}),(_=mF("input",{type:"checkbox",id:"introjs-dontShowAgain",name:"introjs-dontShowAgain"})).onchange=function(t){e.setDontShowAgain(t.target.checked)},(k=mF("label",{htmlFor:"introjs-dontShowAgain"})).innerText=e._options.dontShowAgainLabel,w.appendChild(_),w.appendChild(k),g.appendChild(w)),g.appendChild(m$(e,t)),g.appendChild(((C=mF("div")).className="introjs-progress",!1===e._options.showProgress&&(C.style.display="none"),P=mF("div",{className:"introjs-progressbar"}),e._options.progressBarAdditionalClass&&(P.className+=" "+e._options.progressBarAdditionalClass),E=(e._currentStep+1)/e._introItems.length*100,P.setAttribute("role","progress"),P.setAttribute("aria-valuemin","0"),P.setAttribute("aria-valuemax","100"),P.setAttribute("aria-valuenow",E.toString()),P.style.cssText="width:".concat(E,"%;"),C.appendChild(P),C)),S=mF("div"),!0===e._options.showStepNumbers&&(S.className="introjs-helperNumberLayer",S.innerHTML="".concat(t.step," ").concat(e._options.stepNumbersOfLabel," ").concat(e._introItems.length),g.appendChild(S)),g.appendChild(m),p.appendChild(g),(a=mF("a")).onclick=function(){return mf(A,void 0,void 0,function(){return mp(this,function(t){switch(t.label){case 0:return e._introItems.length-1===e._currentStep?[3,2]:[4,mq(e)];case 1:return t.sent(),[3,6];case 2:return/introjs-donebutton/gi.test(a.className)?mk(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"done")]:[3,4]:[3,6];case 3:t.sent(),t.label=4;case 4:return[4,m9(e,e._targetElement)];case 5:t.sent(),t.label=6;case 6:return[2]}})})},mP(a),a.innerHTML=e._options.nextLabel,(o=mF("a")).onclick=function(){return mf(A,void 0,void 0,function(){return mp(this,function(t){switch(t.label){case 0:return e._currentStep>0?[4,mY(e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},mP(o),o.innerHTML=e._options.prevLabel,mP(s=mF("a",{className:"introjs-skipbutton"})),s.innerHTML=e._options.skipLabel,s.onclick=function(){return mf(A,void 0,void 0,function(){return mp(this,function(t){switch(t.label){case 0:return e._introItems.length-1===e._currentStep&&mk(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"skip")]:[3,2];case 1:t.sent(),t.label=2;case 2:return mk(e._introSkipCallback)?[4,e._introSkipCallback.call(e,e._currentStep)]:[3,4];case 3:t.sent(),t.label=4;case 4:return[4,m9(e,e._targetElement)];case 5:return t.sent(),[2]}})})},y.appendChild(s),e._introItems.length>1&&x.appendChild(o),x.appendChild(a),g.appendChild(x),mz(e,t,g,m),mC(e._options.scrollToElement,t.scrollTo,e._options.scrollPadding,t.element,g)),(M=e._targetElement.querySelector(".introjs-disableInteraction"))&&M.parentNode&&M.parentNode.removeChild(M),t.disableInteraction&&(null===(O=document.querySelector(".introjs-disableInteraction"))&&(O=mF("div",{className:"introjs-disableInteraction"}),e._targetElement.appendChild(O)),mL(e,t,O)),0===e._currentStep&&e._introItems.length>1?(null!=a&&(a.className="".concat(e._options.buttonClass," introjs-nextbutton"),a.innerHTML=e._options.nextLabel),!0===e._options.hidePrev?(null!=o&&(o.className="".concat(e._options.buttonClass," introjs-prevbutton introjs-hidden")),null!=a&&mS(a,"introjs-fullbutton")):null!=o&&(o.className="".concat(e._options.buttonClass," introjs-prevbutton introjs-disabled"))):e._introItems.length-1===e._currentStep||1===e._introItems.length?(null!=o&&(o.className="".concat(e._options.buttonClass," introjs-prevbutton")),!0===e._options.hideNext?(null!=a&&(a.className="".concat(e._options.buttonClass," introjs-nextbutton introjs-hidden")),null!=o&&mS(o,"introjs-fullbutton")):null!=a&&(!0===e._options.nextToDone?(a.innerHTML=e._options.doneLabel,mS(a,"".concat(e._options.buttonClass," introjs-nextbutton introjs-donebutton"))):a.className="".concat(e._options.buttonClass," introjs-nextbutton introjs-disabled"))):(null!=o&&(o.className="".concat(e._options.buttonClass," introjs-prevbutton")),null!=a&&(a.className="".concat(e._options.buttonClass," introjs-nextbutton"),a.innerHTML=e._options.nextLabel)),null!=o&&o.setAttribute("role","button"),null!=a&&a.setAttribute("role","button"),null!=s&&s.setAttribute("role","button"),null!=a&&a.focus(),mS(N=t.element,"introjs-showElement"),"absolute"!==(j=mM(N,"position"))&&"relative"!==j&&"sticky"!==j&&"fixed"!==j&&mS(N,"introjs-relativePosition"),mk(e._introAfterChangeCallback)?[4,e._introAfterChangeCallback.call(e,t.element)]:[3,4];case 3:T.sent(),T.label=4;case 4:return[2]}})})}function mq(e){return mf(this,void 0,void 0,function(){var t,n,r;return mp(this,function(i){switch(i.label){case 0:if(e._direction="forward",void 0!==e._currentStepNumber)for(t=0;t<e._introItems.length;t++)e._introItems[t].step===e._currentStepNumber&&(e._currentStep=t-1,e._currentStepNumber=void 0);return -1===e._currentStep?e._currentStep=0:++e._currentStep,n=e._introItems[e._currentStep],r=!0,mk(e._introBeforeChangeCallback)?[4,e._introBeforeChangeCallback.call(e,n&&n.element,e._currentStep,e._direction)]:[3,2];case 1:r=i.sent(),i.label=2;case 2:return!1===r?(--e._currentStep,[2,!1]):e._introItems.length<=e._currentStep?mk(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"end")]:[3,4]:[3,6];case 3:i.sent(),i.label=4;case 4:return[4,m9(e,e._targetElement)];case 5:return i.sent(),[2,!1];case 6:return[4,mV(e,n)];case 7:return i.sent(),[2,!0]}})})}function mY(e){return mf(this,void 0,void 0,function(){var t,n;return mp(this,function(r){switch(r.label){case 0:return e._direction="backward",e._currentStep<=0?[2,!1]:(--e._currentStep,t=e._introItems[e._currentStep],n=!0,mk(e._introBeforeChangeCallback)?[4,e._introBeforeChangeCallback.call(e,t&&t.element,e._currentStep,e._direction)]:[3,2]);case 1:n=r.sent(),r.label=2;case 2:return!1===n?(++e._currentStep,[2,!1]):[4,mV(e,t)];case 3:return r.sent(),[2,!0]}})})}function mW(e,t){return mf(this,void 0,void 0,function(){var n,r;return mp(this,function(i){switch(i.label){case 0:return null===(n=void 0===t.code?t.which:t.code)&&(n=null===t.charCode?t.keyCode:t.charCode),"Escape"!==n&&27!==n||!0!==e._options.exitOnEsc?[3,2]:[4,m9(e,e._targetElement)];case 1:case 3:case 5:return i.sent(),[3,16];case 2:return"ArrowLeft"!==n&&37!==n?[3,4]:[4,mY(e)];case 4:return"ArrowRight"!==n&&39!==n?[3,6]:[4,mq(e)];case 6:return"Enter"!==n&&"NumpadEnter"!==n&&13!==n?[3,16]:(r=t.target||t.srcElement)&&r.className.match("introjs-prevbutton")?[4,mY(e)]:[3,8];case 7:return i.sent(),[3,15];case 8:return r&&r.className.match("introjs-skipbutton")?e._introItems.length-1===e._currentStep&&mk(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"skip")]:[3,10]:[3,12];case 9:i.sent(),i.label=10;case 10:return[4,m9(e,e._targetElement)];case 11:return i.sent(),[3,15];case 12:return r&&r.getAttribute("data-step-number")?(r.click(),[3,15]):[3,13];case 13:return[4,mq(e)];case 14:i.sent(),i.label=15;case 15:t.preventDefault?t.preventDefault():t.returnValue=!1,i.label=16;case 16:return[2]}})})}function mG(e){if(null===e||"object"!==md(e)||"nodeType"in e)return e;var t={};for(var n in e)"jQuery"in window&&e[n]instanceof window.jQuery?t[n]=e[n]:t[n]=mG(e[n]);return t}function mX(e){var t=document.querySelector(".introjs-hints");return t?Array.from(t.querySelectorAll(e)):[]}function mK(e,t){return mf(this,void 0,void 0,function(){var n;return mp(this,function(r){switch(r.label){case 0:return n=mX('.introjs-hint[data-step="'.concat(t,'"]'))[0],m1(),n&&mS(n,"introjs-hidehint"),mk(e._hintCloseCallback)?[4,e._hintCloseCallback.call(e,t)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})}function mZ(e){var t=mX('.introjs-hint[data-step="'.concat(e,'"]'))[0];t&&mN(t,/introjs-hidehint/g)}function mQ(e){var t=mX('.introjs-hint[data-step="'.concat(e,'"]'))[0];t&&t.parentNode&&t.parentNode.removeChild(t)}function mJ(e,t,n){if(void 0!==n){var r=mO(n);switch(e){default:case"top-left":t.style.left="".concat(r.left,"px"),t.style.top="".concat(r.top,"px");break;case"top-right":t.style.left="".concat(r.left+r.width-20,"px"),t.style.top="".concat(r.top,"px");break;case"bottom-left":t.style.left="".concat(r.left,"px"),t.style.top="".concat(r.top+r.height-20,"px");break;case"bottom-right":t.style.left="".concat(r.left+r.width-20,"px"),t.style.top="".concat(r.top+r.height-20,"px");break;case"middle-left":t.style.left="".concat(r.left,"px"),t.style.top="".concat(r.top+(r.height-20)/2,"px");break;case"middle-right":t.style.left="".concat(r.left+r.width-20,"px"),t.style.top="".concat(r.top+(r.height-20)/2,"px");break;case"middle-middle":t.style.left="".concat(r.left+(r.width-20)/2,"px"),t.style.top="".concat(r.top+(r.height-20)/2,"px");break;case"bottom-middle":t.style.left="".concat(r.left+(r.width-20)/2,"px"),t.style.top="".concat(r.top+r.height-20,"px");break;case"top-middle":t.style.left="".concat(r.left+(r.width-20)/2,"px"),t.style.top="".concat(r.top,"px")}}}function m0(e,t){return mf(this,void 0,void 0,function(){var n,r,i,a,o,s,l,c,u,h,d;return mp(this,function(f){switch(f.label){case 0:return n=document.querySelector('.introjs-hint[data-step="'.concat(t,'"]')),r=e._hintItems[t],mk(e._hintClickCallback)?[4,e._hintClickCallback.call(e,n,r,t)]:[3,2];case 1:f.sent(),f.label=2;case 2:return void 0!==(i=m1())&&parseInt(i,10)===t||(a=mF("div",{className:"introjs-tooltip"}),o=mF("div"),s=mF("div"),l=mF("div"),a.onclick=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},o.className="introjs-tooltiptext",(c=mF("p")).innerHTML=r.hint||"",o.appendChild(c),e._options.hintShowButton&&((u=mF("a")).className=e._options.buttonClass,u.setAttribute("role","button"),u.innerHTML=e._options.hintButtonLabel,u.onclick=function(){return mK(e,t)},o.appendChild(u)),s.className="introjs-arrow",a.appendChild(s),a.appendChild(o),e._currentStep=parseInt(h=n.getAttribute("data-step")||"",10),d=e._hintItems[e._currentStep],l.className="introjs-tooltipReferenceLayer introjs-hintReference",l.setAttribute("data-step",h),mL(e,d,l),l.appendChild(a),document.body.appendChild(l),mz(e,d,a,s,!0)),[2]}})})}function m1(){var e=document.querySelector(".introjs-hintReference");if(e&&e.parentNode){var t=e.getAttribute("data-step");if(!t)return;return e.parentNode.removeChild(e),t}}function m2(e,t){return mf(this,void 0,void 0,function(){var n,r,i,a,o,s,l,c,u;return mp(this,function(h){switch(h.label){case 0:if(e._hintItems=[],e._options.hints&&e._options.hints.length>0)for(n=0,r=e._options.hints;n<r.length;n++)"string"==typeof(i=mG(r[n])).element&&(i.element=document.querySelector(i.element)),i.hintPosition=i.hintPosition||e._options.hintPosition,i.hintAnimation=i.hintAnimation||e._options.hintAnimation,null!==i.element&&e._hintItems.push(i);else{if(!(a=Array.from(t.querySelectorAll("*[data-hint]")))||!a.length)return[2,!1];for(o=0,s=a;o<s.length;o++)c=(l=s[o]).getAttribute("data-hint-animation"),u=e._options.hintAnimation,c&&(u="true"===c),e._hintItems.push({element:l,hint:l.getAttribute("data-hint")||"",hintPosition:l.getAttribute("data-hint-position")||e._options.hintPosition,hintAnimation:u,tooltipClass:l.getAttribute("data-tooltip-class")||void 0,position:l.getAttribute("data-position")||e._options.tooltipPosition})}return[4,function(e){return mf(this,void 0,void 0,function(){var t,n,r,i,a,o,s;return mp(this,function(l){var c,u,h;switch(l.label){case 0:for(null===(t=document.querySelector(".introjs-hints"))&&(t=mF("div",{className:"introjs-hints"})),n=function(t){return function(n){var r=n||window.event;r&&r.stopPropagation&&r.stopPropagation(),r&&null!==r.cancelBubble&&(r.cancelBubble=!0),m0(e,t)}},r=0;r<e._hintItems.length;r++){if(i=e._hintItems[r],document.querySelector('.introjs-hint[data-step="'.concat(r,'"]')))return[2];mP(a=mF("a",{className:"introjs-hint"})),a.onclick=n(r),i.hintAnimation||mS(a,"introjs-hint-no-anim"),mE(i.element)&&mS(a,"introjs-fixedhint"),o=mF("div",{className:"introjs-hint-dot"}),s=mF("div",{className:"introjs-hint-pulse"}),a.appendChild(o),a.appendChild(s),a.setAttribute("data-step",r.toString()),i.hintTargetElement=i.element,i.element=a,mJ(i.hintPosition,a,i.hintTargetElement),t.appendChild(a)}return document.body.appendChild(t),mk(e._hintsAddedCallback)?[4,e._hintsAddedCallback.call(e)]:[3,2];case 1:l.sent(),l.label=2;case 2:return e._options.hintAutoRefreshInterval>=0&&(c=function(){return m3(e)},u=e._options.hintAutoRefreshInterval,e._hintsAutoRefreshFunction=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];window.clearTimeout(h),h=window.setTimeout(function(){c()},u)},m_.on(window,"scroll",e._hintsAutoRefreshFunction,e,!0)),[2]}})})}(e)];case 1:return h.sent(),m_.on(document,"click",m1,e,!1),m_.on(window,"resize",m3,e,!0),[2,!0]}})})}function m3(e){for(var t=0,n=e._hintItems;t<n.length;t++){var r=n[t],i=r.hintTargetElement;mJ(r.hintPosition,r.element,i)}}function m5(e,t){var n=Array.from(t.querySelectorAll("*[data-intro]")),r=[];if(e._options.steps&&e._options.steps.length)for(var i=0,a=e._options.steps;i<a.length;i++){var o=mG(h=a[i]);if(o.step=r.length+1,o.title=o.title||"","string"==typeof o.element&&(o.element=document.querySelector(o.element)||void 0),void 0===o.element||null===o.element){var s=document.querySelector(".introjsFloatingElement");null===s&&(s=mF("div",{className:"introjsFloatingElement"}),document.body.appendChild(s)),o.element=s,o.position="floating"}o.position=o.position||e._options.tooltipPosition,o.scrollTo=o.scrollTo||e._options.scrollTo,void 0===o.disableInteraction&&(o.disableInteraction=e._options.disableInteraction),null!==o.element&&r.push(o)}else{var l=void 0;if(n.length<1)return[];for(var c=0;c<n.length;c++){var u=n[c];if((!e._options.group||u.getAttribute("data-intro-group")===e._options.group)&&"none"!==u.style.display){var h=parseInt(u.getAttribute("data-step")||"",10);l=e._options.disableInteraction,u.hasAttribute("data-disable-interaction")&&(l=!!u.getAttribute("data-disable-interaction")),h>0&&(r[h-1]={step:h,element:u,title:u.getAttribute("data-title")||"",intro:u.getAttribute("data-intro")||"",tooltipClass:u.getAttribute("data-tooltip-class")||void 0,highlightClass:u.getAttribute("data-highlight-class")||void 0,position:u.getAttribute("data-position")||e._options.tooltipPosition,scrollTo:u.getAttribute("data-scroll-to")||e._options.scrollTo,disableInteraction:l})}}for(var d=0,f=0;f<n.length;f++)if(u=n[f],(!e._options.group||u.getAttribute("data-intro-group")===e._options.group)&&null===u.getAttribute("data-step")){for(;void 0!==r[d];)d++;l=u.hasAttribute("data-disable-interaction")?!!u.getAttribute("data-disable-interaction"):e._options.disableInteraction,r[d]={element:u,title:u.getAttribute("data-title")||"",intro:u.getAttribute("data-intro")||"",step:d+1,tooltipClass:u.getAttribute("data-tooltip-class")||void 0,highlightClass:u.getAttribute("data-highlight-class")||void 0,position:u.getAttribute("data-position")||e._options.tooltipPosition,scrollTo:u.getAttribute("data-scroll-to")||e._options.scrollTo,disableInteraction:l}}}for(var p=[],m=0;m<r.length;m++)r[m]&&p.push(r[m]);return(r=p).sort(function(e,t){return e.step-t.step}),r}function m7(e,t){var n=e._currentStep;if(null!=n&&-1!=n){var r=e._introItems[n],i=document.querySelector(".introjs-tooltipReferenceLayer"),a=document.querySelector(".introjs-helperLayer"),o=document.querySelector(".introjs-disableInteraction");mL(e,r,a),mL(e,r,i),mL(e,r,o),t&&(e._introItems=m5(e,e._targetElement),function(e,t){if(e._options.showBullets){var n=document.querySelector(".introjs-bullets");n&&n.parentNode&&n.parentNode.replaceChild(m$(e,t),n)}}(e,r),mU(i,n,e._introItems.length));var s=document.querySelector(".introjs-arrow"),l=document.querySelector(".introjs-tooltip");return l&&s&&mz(e,e._introItems[n],l,s),m3(e),e}}function m4(e){m7(e)}function m6(e,t){if(void 0===t&&(t=!1),e&&e.parentElement){var n=e.parentElement;t?(mj(e,{opacity:"0"}),window.setTimeout(function(){try{n.removeChild(e)}catch(e){}},500)):n.removeChild(e)}}function m9(e,t,n){return void 0===n&&(n=!1),mf(this,void 0,void 0,function(){var r,i,a,o;return mp(this,function(s){switch(s.label){case 0:return r=!0,void 0===e._introBeforeExitCallback?[3,2]:[4,e._introBeforeExitCallback.call(e,t)];case 1:r=s.sent(),s.label=2;case 2:if(!n&&!1===r)return[2];if((i=Array.from(t.querySelectorAll(".introjs-overlay")))&&i.length)for(a=0,o=i;a<o.length;a++)m6(o[a]);return m6(t.querySelector(".introjs-helperLayer"),!0),m6(t.querySelector(".introjs-tooltipReferenceLayer")),m6(t.querySelector(".introjs-disableInteraction")),m6(document.querySelector(".introjsFloatingElement")),mB(),m_.off(window,"keydown",mW,e,!0),m_.off(window,"resize",m4,e,!0),mk(e._introExitCallback)?[4,e._introExitCallback.call(e)]:[3,4];case 3:s.sent(),s.label=4;case 4:return e._currentStep=-1,[2]}})})}var m8=function(){function e(e){this._currentStep=-1,this._introItems=[],this._hintItems=[],this._targetElement=e,this._options={steps:[],hints:[],isActive:!0,nextLabel:"Next",prevLabel:"Back",skipLabel:"×",doneLabel:"Done",hidePrev:!1,hideNext:!1,nextToDone:!0,tooltipPosition:"bottom",tooltipClass:"",group:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!1,stepNumbersOfLabel:"of",keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,scrollTo:"element",scrollPadding:30,overlayOpacity:.5,autoPosition:!0,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1,dontShowAgain:!1,dontShowAgainLabel:"Don't show this again",dontShowAgainCookie:"introjs-dontShowAgain",dontShowAgainCookieDays:365,helperElementPadding:10,hintPosition:"top-middle",hintButtonLabel:"Got it",hintShowButton:!0,hintAutoRefreshInterval:10,hintAnimation:!0,buttonClass:"introjs-button",progressBarAdditionalClass:!1}}return e.prototype.isActive=function(){var e;return(!this._options.dontShowAgain||""===(e=mg(this._options.dontShowAgainCookie))||"true"!==e)&&this._options.isActive},e.prototype.clone=function(){return new e(this._targetElement)},e.prototype.setOption=function(e,t){var n;return this._options=(n=this._options,n[e]=t,n),this},e.prototype.setOptions=function(e){return this._options=function(e,t){for(var n=0,r=Object.entries(t);n<r.length;n++){var i,a,o,s=r[n];i=e,a=s[0],o=s[1],i[a]=o,e=i}return e}(this._options,e),this},e.prototype.start=function(){return mf(this,void 0,void 0,function(){return mp(this,function(e){switch(e.label){case 0:return[4,function(e,t){return mf(this,void 0,void 0,function(){var n;return mp(this,function(r){switch(r.label){case 0:return e.isActive()?mk(e._introStartCallback)?[4,e._introStartCallback.call(e,t)]:[3,2]:[2,!1];case 1:r.sent(),r.label=2;case 2:return 0===(n=m5(e,t)).length?[2,!1]:(e._introItems=n,function(e,t){var n=this,r=mF("div",{className:"introjs-overlay"});mj(r,{top:0,bottom:0,left:0,right:0,position:"fixed"}),t.appendChild(r),!0===e._options.exitOnOverlayClick&&(mj(r,{cursor:"pointer"}),r.onclick=function(){return mf(n,void 0,void 0,function(){return mp(this,function(n){switch(n.label){case 0:return[4,m9(e,t)];case 1:return n.sent(),[2]}})})})}(e,t),[4,mq(e)]);case 3:r.sent(),t.addEventListener,e._options.keyboardNavigation&&m_.on(window,"keydown",mW,e,!0),m_.on(window,"resize",m4,e,!0),r.label=4;case 4:return[2,!1]}})})}(this,this._targetElement)];case 1:return e.sent(),[2,this]}})})},e.prototype.goToStep=function(e){return mf(this,void 0,void 0,function(){return mp(this,function(t){switch(t.label){case 0:return[4,function(e,t){return mf(this,void 0,void 0,function(){return mp(this,function(n){switch(n.label){case 0:return e._currentStep=t-2,void 0===e._introItems?[3,2]:[4,mq(e)];case 1:n.sent(),n.label=2;case 2:return[2]}})})}(this,e)];case 1:return t.sent(),[2,this]}})})},e.prototype.addStep=function(e){return this._options.steps||(this._options.steps=[]),this._options.steps.push(e),this},e.prototype.addSteps=function(e){if(!e.length)return this;for(var t=0;t<e.length;t++)this.addStep(e[t]);return this},e.prototype.goToStepNumber=function(e){return mf(this,void 0,void 0,function(){return mp(this,function(t){switch(t.label){case 0:return[4,function(e,t){return mf(this,void 0,void 0,function(){return mp(this,function(n){switch(n.label){case 0:return e._currentStepNumber=t,void 0===e._introItems?[3,2]:[4,mq(e)];case 1:n.sent(),n.label=2;case 2:return[2]}})})}(this,e)];case 1:return t.sent(),[2,this]}})})},e.prototype.nextStep=function(){return mf(this,void 0,void 0,function(){return mp(this,function(e){switch(e.label){case 0:return[4,mq(this)];case 1:return e.sent(),[2,this]}})})},e.prototype.previousStep=function(){return mf(this,void 0,void 0,function(){return mp(this,function(e){switch(e.label){case 0:return[4,mY(this)];case 1:return e.sent(),[2,this]}})})},e.prototype.currentStep=function(){return this._currentStep},e.prototype.exit=function(e){return mf(this,void 0,void 0,function(){return mp(this,function(t){switch(t.label){case 0:return[4,m9(this,this._targetElement,e)];case 1:return t.sent(),[2,this]}})})},e.prototype.refresh=function(e){return m7(this,e),this},e.prototype.setDontShowAgain=function(e){return e?mm(this._options.dontShowAgainCookie,"true",this._options.dontShowAgainCookieDays):mm(this._options.dontShowAgainCookie,"",-1),this},e.prototype.onbeforechange=function(e){if(!mk(e))throw Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=e,this},e.prototype.onchange=function(e){if(!mk(e))throw Error("Provided callback for onchange was not a function.");return this._introChangeCallback=e,this},e.prototype.onafterchange=function(e){if(!mk(e))throw Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=e,this},e.prototype.oncomplete=function(e){if(!mk(e))throw Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=e,this},e.prototype.onhintsadded=function(e){if(!mk(e))throw Error("Provided callback for onhintsadded was not a function.");return this._hintsAddedCallback=e,this},e.prototype.onhintclick=function(e){if(!mk(e))throw Error("Provided callback for onhintclick was not a function.");return this._hintClickCallback=e,this},e.prototype.onhintclose=function(e){if(!mk(e))throw Error("Provided callback for onhintclose was not a function.");return this._hintCloseCallback=e,this},e.prototype.onstart=function(e){if(!mk(e))throw Error("Provided callback for onstart was not a function.");return this._introStartCallback=e,this},e.prototype.onexit=function(e){if(!mk(e))throw Error("Provided callback for onexit was not a function.");return this._introExitCallback=e,this},e.prototype.onskip=function(e){if(!mk(e))throw Error("Provided callback for onskip was not a function.");return this._introSkipCallback=e,this},e.prototype.onbeforeexit=function(e){if(!mk(e))throw Error("Provided callback for onbeforeexit was not a function.");return this._introBeforeExitCallback=e,this},e.prototype.addHints=function(){return mf(this,void 0,void 0,function(){return mp(this,function(e){switch(e.label){case 0:return[4,m2(this,this._targetElement)];case 1:return e.sent(),[2,this]}})})},e.prototype.hideHint=function(e){return mf(this,void 0,void 0,function(){return mp(this,function(t){switch(t.label){case 0:return[4,mK(this,e)];case 1:return t.sent(),[2,this]}})})},e.prototype.hideHints=function(){return mf(this,void 0,void 0,function(){return mp(this,function(e){switch(e.label){case 0:return[4,function(e){return mf(this,void 0,void 0,function(){var t,n,r,i;return mp(this,function(a){switch(a.label){case 0:t=mX(".introjs-hint"),n=0,r=t,a.label=1;case 1:return n<r.length?(i=r[n].getAttribute("data-step"))?[4,mK(e,parseInt(i,10))]:[3,3]:[3,4];case 2:a.sent(),a.label=3;case 3:return n++,[3,1];case 4:return[2]}})})}(this)];case 1:return e.sent(),[2,this]}})})},e.prototype.showHint=function(e){return mZ(e),this},e.prototype.showHints=function(){return mf(this,void 0,void 0,function(){return mp(this,function(e){switch(e.label){case 0:return[4,function(e){return mf(this,void 0,void 0,function(){var t,n,r,i;return mp(this,function(a){switch(a.label){case 0:if(!(t=mX(".introjs-hint"))||!t.length)return[3,1];for(n=0,r=t;n<r.length;n++)(i=r[n].getAttribute("data-step"))&&mZ(parseInt(i,10));return[3,3];case 1:return[4,m2(e,e._targetElement)];case 2:a.sent(),a.label=3;case 3:return[2]}})})}(this)];case 1:return e.sent(),[2,this]}})})},e.prototype.removeHints=function(){return function(e){for(var t=0,n=mX(".introjs-hint");t<n.length;t++){var r=n[t].getAttribute("data-step");r&&mQ(parseInt(r,10))}m_.off(document,"click",m1,e,!1),m_.off(window,"resize",m3,e,!0),e._hintsAutoRefreshFunction&&m_.off(window,"scroll",e._hintsAutoRefreshFunction,e,!0)}(this),this},e.prototype.removeHint=function(e){return mQ(e),this},e.prototype.showHintDialog=function(e){return mf(this,void 0,void 0,function(){return mp(this,function(t){switch(t.label){case 0:return[4,m0(this,e)];case 1:return t.sent(),[2,this]}})})},e}(),ge=function e(t){var n;if("object"===md(t))n=new m8(t);else if("string"==typeof t){var r=document.querySelector(t);if(!r)throw Error("There is no element with given selector.");n=new m8(r)}else n=new m8(document.body);return e.instances[mw(n,"introjs-instance")]=n,n};ge.version="7.2.0",ge.instances={};var gt=i(7897);class gn extends b.Component{componentDidMount(){this.props.isEnabled&&(this.configureIntroJs(),this.renderSteps())}componentDidUpdate(e){let{isEnabled:t,steps:n,options:r}=this.props,i=!this.isConfigured||e.steps!==n||e.options!==r,a=e.isEnabled!==t;i&&this.configureIntroJs(),(i||a)&&this.renderSteps()}componentWillUnmount(){var e;this.restoreDocumentQueryPatch(),null==(e=this.introJs)||e.exit()}enableDocumentQueryPatch(){let e=am();e===document.body||this._documentQuerySelector||(this._queryTarget=e,this._documentQuerySelector=document.querySelector,this._documentQuerySelectorAll=document.querySelectorAll,document.querySelector=e=>{if("string"==typeof e&&e.includes("introjs")){let t=this._queryTarget.querySelector(e);if(t)return t}return this._documentQuerySelector.call(document,e)},document.querySelectorAll=e=>{if("string"==typeof e&&e.includes("introjs")){let t=this._queryTarget.querySelectorAll(e);if(t.length)return t}return this._documentQuerySelectorAll.call(document,e)})}restoreDocumentQueryPatch(){this._documentQuerySelector&&(document.querySelector=this._documentQuerySelector,document.querySelectorAll=this._documentQuerySelectorAll,this._documentQuerySelector=null,this._documentQuerySelectorAll=null,this._queryTarget=null)}installIntroJs(){"u">typeof window&&(this.introJs=ge(am()),this.introJs.onexit(this.onExit),this.introJs.onbeforeexit(this.onBeforeExit),this.introJs.onbeforechange(this.onBeforeChange),this.introJs.onafterchange(this.onAfterChange),this.introJs.onchange(this.onChange),this.introJs.oncomplete(this.onComplete))}configureIntroJs(){let{options:e,steps:t}=this.props,n=t.map(e=>this.prepareStep(e));this.introJs.setOptions(iV(tu({},e),{steps:n})),this.isConfigured=!0}renderSteps(){let{isEnabled:e,initialStep:t,steps:n,onStart:r}=this.props;e&&n.length>0&&!this.isVisible?(this.enableDocumentQueryPatch(),this.configureIntroJs(),this.introJs.start(),this.refreshAllStepElements(),this.isVisible=!0,this.introJs.goToStepNumber(t+1),r&&r(this.introJs._currentStep)):!e&&this.isVisible&&(this.isVisible=!1,this.introJs.exit(),this.restoreDocumentQueryPatch())}render(){return null}constructor(e){super(e),tc(this,"onExit",()=>{this.restoreDocumentQueryPatch();let{onExit:e}=this.props;this.isVisible=!1,e(this.introJs._currentStep)}),tc(this,"onBeforeExit",()=>{let{onBeforeExit:e}=this.props;return!e||e(this.introJs._currentStep)}),tc(this,"onBeforeChange",e=>{if(!this.isVisible)return!0;this.refreshAllStepElements();let{onBeforeChange:t,onPreventChange:n}=this.props;if(t){let r=t(this.introJs._currentStep,e);return!1===r&&n&&setTimeout(()=>{n(this.introJs._currentStep)},0),r}return!0}),tc(this,"onAfterChange",e=>{var t;if(!this.isVisible)return;this.refreshAllStepElements(),"function"==typeof(null==(t=this.introJs)?void 0:t.refresh)&&this.introJs.refresh(!0);let{onAfterChange:n}=this.props;n&&n(this.introJs._currentStep,e)}),tc(this,"onChange",e=>{if(!this.isVisible)return;let{onChange:t}=this.props;t&&t(this.introJs._currentStep,e)}),tc(this,"onComplete",()=>{let{onComplete:e}=this.props;e&&e()}),tc(this,"updateStepElement",e=>{var t,n,r,i,a;let o=null==(r=this.introJs)||null==(n=r._options)||null==(t=n.steps)?void 0:t[e],s=null==(a=this.introJs)||null==(i=a._introItems)?void 0:i[e],l=null==o?void 0:o._selector;if(!l||!s)return;let c=ap(l);c&&(s.element=c,s.position=o.position||"auto")}),tc(this,"refreshAllStepElements",()=>{var e,t;let n=(null==(t=this.introJs)||null==(e=t._options)?void 0:e.steps)||[];for(let e=0;e<n.length;e++)this.updateStepElement(e)}),tc(this,"prepareStep",e=>{let t="string"==typeof e.element?e.element:null,n=e.intro;if((0,b.isValidElement)(n)&&(n=(0,gt.qV)(n)),!t)return iV(tu({},e),{intro:n});let r=ap(t);return iV(tu({},e),{intro:n,_selector:t,element:r||void 0})}),this.introJs=null,this.isConfigured=!1,this.isVisible=!1,this._documentQuerySelector=null,this._documentQuerySelectorAll=null,this._queryTarget=null,this.installIntroJs()}}tc(gn,"propTypes",{isEnabled:s0().bool,initialStep:s0().number.isRequired,steps:s0().arrayOf(s0().shape({element:s0().oneOfType([s0().string,"u"<typeof Element?s0().any:s0().instanceOf(Element)]),intro:s0().node.isRequired,position:s0().string,tooltipClass:s0().string,highlightClass:s0().string})).isRequired,onStart:s0().func,onExit:s0().func.isRequired,onBeforeExit:s0().func,onBeforeChange:s0().func,onAfterChange:s0().func,onChange:s0().func,onPreventChange:s0().func,onComplete:s0().func,options:s0().object}),tc(gn,"defaultProps",{isEnabled:!1,onStart:null,onBeforeExit:null,onBeforeChange:null,onAfterChange:null,onChange:null,onPreventChange:null,onComplete:null,options:{}});let gr=p8.MOBILE_FILTER_TOGGLE,gi=p8.ROW_CHART_SECTION,ga=p8.MAP_ROW_CHART_SECTION,go={disableInteraction:!1,element:gr,intro:"On mobile devices, click the Filter Panel toggle button to open the Filter Panel. Please click the button to proceed."},gs={disableInteraction:!1,element:gr,intro:"Click the Filter Panel toggle button again to close the Filter Panel. Please close the Filter Panel to proceed."},gl=()=>{let e=ta(),{isLoading:t,isFetching:n}=l0(),{isLoading:r,isFetching:i}=p_(),{isLoading:a,isFetching:o}=fZ(),{isLoading:s,isFetching:l}=pN(),c=ts(fu),u=ts(fh),h=ts(fc),d=ts(fd),f=(0,b.useRef)(),p=i5([t,n,h,r,i,a,o,s,l]),m=d<750,g=(0,b.useMemo)(()=>m?mc[u].slice(0,3).concat(go,mc[u].slice(4,7),gs,mc[u].slice(7)):mc[u],[u,m]),y=(0,b.useCallback)(e=>{var t,n,r;let i,a;if(!e.current)return;let o=e.current.introJs.currentStep();if(!g[o])return;((i=null==(t=g[o])?void 0:t.element)===gi||i===ga)&&(null==(a=ap(ga)||ap(gi))||a.scrollIntoView({block:"center"}),requestAnimationFrame(()=>{let e=ap(p8.ROW_CHART_EXPANDABLE);null==e||e.click()}));let s=()=>{var t;null==(t=ap(".introjs-nextbutton"))||t.setAttribute("style","display: inline"),(7===o?Promise.resolve():new Promise(e=>{let t=Date.now(),n=setInterval(()=>{if(null!==ap(p8.DATE_FILTER)){clearInterval(n),e();return}Date.now()-t>=5e3&&(clearInterval(n),e())},10)})).then(()=>{e.current.introJs.nextStep().then(()=>{var e;null==(e=ap(gr))||e.removeEventListener("click",s)})})};m&&(3===o||7===o)&&(null==(n=ap(".introjs-nextbutton"))||n.setAttribute("style","display: none"),null==(r=ap(gr))||r.addEventListener("click",s))},[g,m]),x=(0,b.useCallback)(e=>null===e.current||!c||!(e.current.introJs.currentStep()+1<g.length)||window.confirm("Are you sure you want to exit the tour?"),[g.length,c]),w=(0,b.useCallback)(()=>{c&&e(ll())},[e,c]),_=(0,b.useCallback)(()=>y(f),[y]),k=(0,b.useCallback)(()=>x(f),[x]);return p?null:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(mh,{}),(0,v.jsx)(gn,{isEnabled:c,initialStep:0,steps:g,onExit:w,options:mu,onBeforeChange:_,onBeforeExit:k,ref:f})]})};function gc(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,b.useEffect)(()=>(window.addEventListener(e,t,n),function(){window.removeEventListener(e,t)}))}let gu=()=>{let e=ta(),t=ts(lN),n=ts(lD),r=ts(lU),i=ts(lq),a=ts(lV),o=ts(lG),s=iE.filter(e=>e in t).reduce((e,n)=>{let r=t[n].map(e=>({fieldName:n,value:e}));return e.concat(r)},[]);return(n&&s.push({fieldName:"has_narrative",value:"Has narrative"}),id()(i).isSame(id()(i_),"day")&&id()(a).isSame(id()(r),"day")||s.unshift({fieldName:"date_received",value:"Date Received: "+id()(i).format("M/D/YYYY")+" - "+id()(a).format("M/D/YYYY")}),s.length)?(0,v.jsxs)("section",{className:"pill-panel",children:[(0,v.jsx)(sH,{type:"3",className:"h4 pill-label flex-fixed",children:"Filters applied:"}),(0,v.jsxs)("ul",{className:"m-tag-group pill-panel__list",children:[s.map(e=>(0,v.jsx)(f5,{fieldName:e.fieldName,value:e.value,displayValue:"state"===e.fieldName?lE(e.value):void 0},e.fieldName+e.value)),(0,v.jsx)("li",{className:"pill-panel__clear",children:(0,v.jsx)(sF,{appearance:"warning",label:"Clear all filters",isLink:!0,onClick:()=>e(lx(o))})})]})]}):null},gh=0x80000000-1;i(3544);let gd=e=>e&&"function"!=typeof e?t=>{e.current=t}:e;var gf=function(e,t){return(0,b.useMemo)(()=>{let n,r;return n=gd(e),r=gd(t),e=>{n&&n(e),r&&r(e)}},[e,t])};function gp(){return(0,b.useState)(null)}let gm=e=>e&&"function"!=typeof e?t=>{e.current=t}:e;var gg=function(e,t){return(0,b.useMemo)(()=>{let n,r;return n=gm(e),r=gm(t),e=>{n&&n(e),r&&r(e)}},[e,t])},gv=Object.prototype.hasOwnProperty;function gy(e,t,n){for(n of e.keys())if(gb(n,t))return n}function gb(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&gb(e[r],t[r]););return -1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if((i=r)&&"object"==typeof i&&!(i=gy(t,i))||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if((i=r[0])&&"object"==typeof i&&!(i=gy(t,i))||!gb(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return -1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return -1===r}if(!n||"object"==typeof e){for(n in r=0,e)if(gv.call(e,n)&&++r&&!gv.call(t,n)||!(n in t)||!gb(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}var gx=function(e){let t,n,r=(t=(0,b.useRef)(!0),n=(0,b.useRef)(()=>t.current),(0,b.useEffect)(()=>(t.current=!0,()=>{t.current=!1}),[]),n.current);return[e[0],(0,b.useCallback)(t=>{if(r())return e[1](t)},[r,e[1]])]};function gw(e){return e.split("-")[0]}function g_(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function gk(e){var t=g_(e).Element;return e instanceof t||e instanceof Element}function gS(e){var t=g_(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function gM(e){if("u"<typeof ShadowRoot)return!1;var t=g_(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var gA=Math.max,gT=Math.min,gC=Math.round;function gP(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function gE(){return!/^((?!chrome|android).)*safari/i.test(gP())}function gO(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&gS(e)&&(i=e.offsetWidth>0&&gC(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&gC(r.height)/e.offsetHeight||1);var o=(gk(e)?g_(e):window).visualViewport,s=!gE()&&n,l=(r.left+(s&&o?o.offsetLeft:0))/i,c=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,h=r.height/a;return{width:u,height:h,top:c,right:l+u,bottom:c+h,left:l,x:l,y:c}}function gN(e){var t=gO(e),n=e.offsetWidth,r=e.offsetHeight;return 1>=Math.abs(t.width-n)&&(n=t.width),1>=Math.abs(t.height-r)&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function gj(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&gM(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function gL(e){return e?(e.nodeName||"").toLowerCase():null}function gD(e){return g_(e).getComputedStyle(e)}function gR(e){return((gk(e)?e.ownerDocument:e.document)||window.document).documentElement}function gI(e){return"html"===gL(e)?e:e.assignedSlot||e.parentNode||(gM(e)?e.host:null)||gR(e)}function gz(e){return gS(e)&&"fixed"!==gD(e).position?e.offsetParent:null}function gB(e){for(var t=g_(e),n=gz(e);n&&["table","td","th"].indexOf(gL(n))>=0&&"static"===gD(n).position;)n=gz(n);return n&&("html"===gL(n)||"body"===gL(n)&&"static"===gD(n).position)?t:n||function(e){var t=/firefox/i.test(gP());if(/Trident/i.test(gP())&&gS(e)&&"fixed"===gD(e).position)return null;var n=gI(e);for(gM(n)&&(n=n.host);gS(n)&&0>["html","body"].indexOf(gL(n));){var r=gD(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function gF(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function gH(e,t,n){return gA(e,gT(t,n))}function g$(){return{top:0,right:0,bottom:0,left:0}}function gU(e){return Object.assign({},g$(),e)}function gV(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var gq="bottom",gY="right",gW="left",gG="auto",gX=["top",gq,gY,gW],gK="start",gZ="viewport",gQ="popper",gJ=gX.reduce(function(e,t){return e.concat([t+"-"+gK,t+"-end"])},[]),g0=[].concat(gX,[gG]).reduce(function(e,t){return e.concat([t,t+"-"+gK,t+"-end"])},[]),g1=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function g2(e){return e.split("-")[1]}var g3={top:"auto",right:"auto",bottom:"auto",left:"auto"};function g5(e){var t,n,r,i,a,o,s,l=e.popper,c=e.popperRect,u=e.placement,h=e.variation,d=e.offsets,f=e.position,p=e.gpuAcceleration,m=e.adaptive,g=e.roundOffsets,v=e.isFixed,y=d.x,b=void 0===y?0:y,x=d.y,w=void 0===x?0:x,_="function"==typeof g?g({x:b,y:w}):{x:b,y:w};b=_.x,w=_.y;var k=d.hasOwnProperty("x"),S=d.hasOwnProperty("y"),M=gW,A="top",T=window;if(m){var C=gB(l),P="clientHeight",E="clientWidth";C===g_(l)&&"static"!==gD(C=gR(l)).position&&"absolute"===f&&(P="scrollHeight",E="scrollWidth"),("top"===u||(u===gW||u===gY)&&"end"===h)&&(A=gq,w-=(v&&C===T&&T.visualViewport?T.visualViewport.height:C[P])-c.height,w*=p?1:-1),(u===gW||("top"===u||u===gq)&&"end"===h)&&(M=gY,b-=(v&&C===T&&T.visualViewport?T.visualViewport.width:C[E])-c.width,b*=p?1:-1)}var O=Object.assign({position:f},m&&g3),N=!0===g?(t={x:b,y:w},n=g_(l),r=t.x,i=t.y,{x:gC(r*(a=n.devicePixelRatio||1))/a||0,y:gC(i*a)/a||0}):{x:b,y:w};return(b=N.x,w=N.y,p)?Object.assign({},O,((s={})[A]=S?"0":"",s[M]=k?"0":"",s.transform=1>=(T.devicePixelRatio||1)?"translate("+b+"px, "+w+"px)":"translate3d("+b+"px, "+w+"px, 0)",s)):Object.assign({},O,((o={})[A]=S?w+"px":"",o[M]=k?b+"px":"",o.transform="",o))}var g7={passive:!0},g4={left:"right",right:"left",bottom:"top",top:"bottom"};function g6(e){return e.replace(/left|right|bottom|top/g,function(e){return g4[e]})}var g9={start:"end",end:"start"};function g8(e){return e.replace(/start|end/g,function(e){return g9[e]})}function ve(e){var t=g_(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function vt(e){return gO(gR(e)).left+ve(e).scrollLeft}function vn(e){var t=gD(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function vr(e,t){void 0===t&&(t=[]);var n,r=function e(t){return["html","body","#document"].indexOf(gL(t))>=0?t.ownerDocument.body:gS(t)&&vn(t)?t:e(gI(t))}(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),a=g_(r),o=i?[a].concat(a.visualViewport||[],vn(r)?r:[]):r,s=t.concat(o);return i?s:s.concat(vr(gI(o)))}function vi(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function va(e,t,n){var r,i,a,o,s,l,c,u,h,d;return t===gZ?vi(function(e,t){var n=g_(e),r=gR(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;var c=gE();(c||!c&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s+vt(e),y:l}}(e,n)):gk(t)?((r=gO(t,!1,"fixed"===n)).top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r):vi((i=gR(e),o=gR(i),s=ve(i),l=null==(a=i.ownerDocument)?void 0:a.body,c=gA(o.scrollWidth,o.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),u=gA(o.scrollHeight,o.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),h=-s.scrollLeft+vt(i),d=-s.scrollTop,"rtl"===gD(l||o).direction&&(h+=gA(o.clientWidth,l?l.clientWidth:0)-c),{width:c,height:u,x:h,y:d}))}function vo(e){var t,n=e.reference,r=e.element,i=e.placement,a=i?gw(i):null,o=i?g2(i):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(a){case"top":t={x:s,y:n.y-r.height};break;case gq:t={x:s,y:n.y+n.height};break;case gY:t={x:n.x+n.width,y:l};break;case gW:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=a?gF(a):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case gK:t[c]=t[c]-(n[u]/2-r[u]/2);break;case"end":t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function vs(e,t){void 0===t&&(t={});var n,r,i,a,o,s,l,c,u=t,h=u.placement,d=void 0===h?e.placement:h,f=u.strategy,p=void 0===f?e.strategy:f,m=u.boundary,g=u.rootBoundary,v=u.elementContext,y=void 0===v?gQ:v,b=u.altBoundary,x=u.padding,w=void 0===x?0:x,_=gU("number"!=typeof w?w:gV(w,gX)),k=e.rects.popper,S=e.elements[void 0!==b&&b?y===gQ?"reference":gQ:y],M=(n=gk(S)?S:S.contextElement||gR(e.elements.popper),r=void 0===m?"clippingParents":m,i=void 0===g?gZ:g,l=(s=[].concat("clippingParents"===r?(a=vr(gI(n)),!gk(o=["absolute","fixed"].indexOf(gD(n).position)>=0&&gS(n)?gB(n):n)?[]:a.filter(function(e){return gk(e)&&gj(e,o)&&"body"!==gL(e)})):[].concat(r),[i]))[0],(c=s.reduce(function(e,t){var r=va(n,t,p);return e.top=gA(r.top,e.top),e.right=gT(r.right,e.right),e.bottom=gT(r.bottom,e.bottom),e.left=gA(r.left,e.left),e},va(n,l,p))).width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c),A=gO(e.elements.reference),T=vo({reference:A,element:k,strategy:"absolute",placement:d}),C=vi(Object.assign({},k,T)),P=y===gQ?C:A,E={top:M.top-P.top+_.top,bottom:P.bottom-M.bottom+_.bottom,left:M.left-P.left+_.left,right:P.right-M.right+_.right},O=e.modifiersData.offset;if(y===gQ&&O){var N=O[d];Object.keys(E).forEach(function(e){var t=[gY,gq].indexOf(e)>=0?1:-1,n=["top",gq].indexOf(e)>=0?"y":"x";E[e]+=N[n]*t})}return E}function vl(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function vc(e){return["top",gY,gq,gW].some(function(t){return e[t]>=0})}var vu={placement:"bottom",modifiers:[],strategy:"absolute"};function vh(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}let vd=(h=void 0===(u=(c={defaultModifiers:[{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=vs(t,{elementContext:"reference"}),s=vs(t,{altBoundary:!0}),l=vl(o,r),c=vl(s,i,a),u=vc(l),h=vc(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=vo({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=n.adaptive,a=n.roundOffsets,o=void 0===a||a,s={placement:gw(t.placement),variation:g2(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===r||r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,g5(Object.assign({},s,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===i||i,roundOffsets:o})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,g5(Object.assign({},s,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:o})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=void 0===i||i,o=r.resize,s=void 0===o||o,l=g_(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(e){e.addEventListener("scroll",n.update,g7)}),s&&l.addEventListener("resize",n.update,g7),function(){a&&c.forEach(function(e){e.removeEventListener("scroll",n.update,g7)}),s&&l.removeEventListener("resize",n.update,g7)}},data:{}},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=void 0===i?[0,0]:i,o=g0.reduce(function(e,n){var r,i,o,s,l,c;return e[n]=(r=t.rects,o=[gW,"top"].indexOf(i=gw(n))>=0?-1:1,l=(s="function"==typeof a?a(Object.assign({},r,{placement:n})):a)[0],c=s[1],l=l||0,c=(c||0)*o,[gW,gY].indexOf(i)>=0?{x:c,y:l}:{x:l,y:c}),e},{}),s=o[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=o}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=void 0===i||i,o=n.altAxis,s=void 0===o||o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,h=n.rootBoundary,d=n.altBoundary,f=n.flipVariations,p=void 0===f||f,m=n.allowedAutoPlacements,g=t.options.placement,v=gw(g)===g,y=l||(v||!p?[g6(g)]:function(e){if(gw(e)===gG)return[];var t=g6(e);return[g8(e),t,g8(t)]}(g)),b=[g].concat(y).reduce(function(e,n){var r,i,a,o,s,l,d,f,g,v,y,b;return e.concat(gw(n)===gG?(i=(r={placement:n,boundary:u,rootBoundary:h,padding:c,flipVariations:p,allowedAutoPlacements:m}).placement,a=r.boundary,o=r.rootBoundary,s=r.padding,l=r.flipVariations,f=void 0===(d=r.allowedAutoPlacements)?g0:d,0===(y=(v=(g=g2(i))?l?gJ:gJ.filter(function(e){return g2(e)===g}):gX).filter(function(e){return f.indexOf(e)>=0})).length&&(y=v),Object.keys(b=y.reduce(function(e,n){return e[n]=vs(t,{placement:n,boundary:a,rootBoundary:o,padding:s})[gw(n)],e},{})).sort(function(e,t){return b[e]-b[t]})):n)},[]),x=t.rects.reference,w=t.rects.popper,_=new Map,k=!0,S=b[0],M=0;M<b.length;M++){var A=b[M],T=gw(A),C=g2(A)===gK,P=["top",gq].indexOf(T)>=0,E=P?"width":"height",O=vs(t,{placement:A,boundary:u,rootBoundary:h,altBoundary:d,padding:c}),N=P?C?gY:gW:C?gq:"top";x[E]>w[E]&&(N=g6(N));var j=g6(N),L=[];if(a&&L.push(O[T]<=0),s&&L.push(O[N]<=0,O[j]<=0),L.every(function(e){return e})){S=A,k=!1;break}_.set(A,L)}if(k)for(var D=p?3:1,R=function(e){var t=b.find(function(t){var n=_.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return S=t,"break"},I=D;I>0&&"break"!==R(I);I--);t.placement!==S&&(t.modifiersData[r]._skip=!0,t.placement=S,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=n.altAxis,o=n.boundary,s=n.rootBoundary,l=n.altBoundary,c=n.padding,u=n.tether,h=void 0===u||u,d=n.tetherOffset,f=void 0===d?0:d,p=vs(t,{boundary:o,rootBoundary:s,padding:c,altBoundary:l}),m=gw(t.placement),g=g2(t.placement),v=!g,y=gF(m),b="x"===y?"y":"x",x=t.modifiersData.popperOffsets,w=t.rects.reference,_=t.rects.popper,k="function"==typeof f?f(Object.assign({},t.rects,{placement:t.placement})):f,S="number"==typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),M=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,A={x:0,y:0};if(x){if(void 0===i||i){var T,C="y"===y?"top":gW,P="y"===y?gq:gY,E="y"===y?"height":"width",O=x[y],N=O+p[C],j=O-p[P],L=h?-_[E]/2:0,D=g===gK?w[E]:_[E],R=g===gK?-_[E]:-w[E],I=t.elements.arrow,z=h&&I?gN(I):{width:0,height:0},B=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:g$(),F=B[C],H=B[P],$=gH(0,w[E],z[E]),U=v?w[E]/2-L-$-F-S.mainAxis:D-$-F-S.mainAxis,V=v?-w[E]/2+L+$+H+S.mainAxis:R+$+H+S.mainAxis,q=t.elements.arrow&&gB(t.elements.arrow),Y=q?"y"===y?q.clientTop||0:q.clientLeft||0:0,W=null!=(T=null==M?void 0:M[y])?T:0,G=gH(h?gT(N,O+U-W-Y):N,O,h?gA(j,O+V-W):j);x[y]=G,A[y]=G-O}if(void 0!==a&&a){var X,K,Z="x"===y?"top":gW,Q="x"===y?gq:gY,J=x[b],ee="y"===b?"height":"width",et=J+p[Z],en=J-p[Q],er=-1!==["top",gW].indexOf(m),ei=null!=(K=null==M?void 0:M[b])?K:0,ea=er?et:J-w[ee]-_[ee]-ei+S.altAxis,eo=er?J+w[ee]+_[ee]-ei-S.altAxis:en,es=h&&er?(X=gH(ea,J,eo))>eo?eo:X:gH(h?ea:et,J,h?eo:en);x[b]=es,A[b]=es-J}t.modifiersData[r]=A}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=gw(n.placement),l=gF(s),c=[gW,gY].indexOf(s)>=0?"height":"width";if(a&&o){var u,h=(u=i.padding,gU("number"!=typeof(u="function"==typeof u?u(Object.assign({},n.rects,{placement:n.placement})):u)?u:gV(u,gX))),d=gN(a),f="y"===l?"top":gW,p="y"===l?gq:gY,m=n.rects.reference[c]+n.rects.reference[l]-o[l]-n.rects.popper[c],g=o[l]-n.rects.reference[l],v=gB(a),y=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,b=h[f],x=y-d[c]-h[p],w=y/2-d[c]/2+(m/2-g/2),_=gH(b,w,x);n.modifiersData[r]=((t={})[l]=_,t.centerOffset=_-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null==r||("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&gj(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}]}).defaultModifiers)?[]:u,f=void 0===(d=c.defaultOptions)?vu:d,function(e,t,n){void 0===n&&(n=f);var r,i,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},vu,f),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,l={state:a,setOptions:function(n){var r,i,s,u,d,p,m="function"==typeof n?n(a.options):n;c(),a.options=Object.assign({},f,a.options,m),a.scrollParents={reference:gk(e)?vr(e):e.contextElement?vr(e.contextElement):[],popper:vr(t)};var g=(i=Object.keys(r=[].concat(h,a.options.modifiers).reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{})).map(function(e){return r[e]}),s=new Map,u=new Set,d=[],i.forEach(function(e){s.set(e.name,e)}),i.forEach(function(e){u.has(e.name)||function e(t){u.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!u.has(t)){var n=s.get(t);n&&e(n)}}),d.push(t)}(e)}),p=d,g1.reduce(function(e,t){return e.concat(p.filter(function(e){return e.phase===t}))},[]));return a.orderedModifiers=g.filter(function(e){return e.enabled}),a.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=e.effect;if("function"==typeof r){var i=r({state:a,name:t,instance:l,options:void 0===n?{}:n});o.push(i||function(){})}}),l.update()},forceUpdate:function(){if(!s){var e=a.elements,t=e.reference,n=e.popper;if(vh(t,n)){a.rects={reference:(r=gB(n),i="fixed"===a.options.strategy,o=gS(r),d=gS(r)&&(u=gC((c=r.getBoundingClientRect()).width)/r.offsetWidth||1,h=gC(c.height)/r.offsetHeight||1,1!==u||1!==h),f=gR(r),p=gO(t,d,i),m={scrollLeft:0,scrollTop:0},g={x:0,y:0},(o||!o&&!i)&&(("body"!==gL(r)||vn(f))&&(m=function(e){return e!==g_(e)&&gS(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:ve(e)}(r)),gS(r)?(g=gO(r,!0),g.x+=r.clientLeft,g.y+=r.clientTop):f&&(g.x=vt(f))),{x:p.left+m.scrollLeft-g.x,y:p.top+m.scrollTop-g.y,width:p.width,height:p.height}),popper:gN(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(e){return a.modifiersData[e.name]=Object.assign({},e.data)});for(var r,i,o,c,u,h,d,f,p,m,g,v=0;v<a.orderedModifiers.length;v++){if(!0===a.reset){a.reset=!1,v=-1;continue}var y=a.orderedModifiers[v],b=y.fn,x=y.options,w=void 0===x?{}:x,_=y.name;"function"==typeof b&&(a=b({state:a,options:w,name:_,instance:l})||a)}}}},update:(r=function(){return new Promise(function(e){l.forceUpdate(),e(a)})},function(){return i||(i=new Promise(function(e){Promise.resolve().then(function(){i=void 0,e(r())})})),i}),destroy:function(){c(),s=!0}};if(!vh(e,t))return l;function c(){o.forEach(function(e){return e()}),o=[]}return l.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)}),l}),vf=["enabled","placement","strategy","modifiers"],vp={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>void 0},vm={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{let{reference:t,popper:n}=e.elements;if("removeAttribute"in t){let e=(t.getAttribute("aria-describedby")||"").split(",").filter(e=>e.trim()!==n.id);e.length?t.setAttribute("aria-describedby",e.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;let{popper:n,reference:r}=e.elements,i=null==(t=n.getAttribute("role"))?void 0:t.toLowerCase();if(n.id&&"tooltip"===i&&"setAttribute"in r){let e=r.getAttribute("aria-describedby");if(e&&-1!==e.split(",").indexOf(n.id))return;r.setAttribute("aria-describedby",e?`${e},${n.id}`:n.id)}}},vg=[];var vv=function(e,t,n={}){let{enabled:r=!0,placement:i="bottom",strategy:a="absolute",modifiers:o=vg}=n,s=function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(n,vf),l=(0,b.useRef)(o),c=(0,b.useRef)(),u=(0,b.useCallback)(()=>{var e;null==(e=c.current)||e.update()},[]),h=(0,b.useCallback)(()=>{var e;null==(e=c.current)||e.forceUpdate()},[]),[d,f]=gx((0,b.useState)({placement:i,update:u,forceUpdate:h,attributes:{},styles:{popper:{},arrow:{}}})),p=(0,b.useMemo)(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:e})=>{let t={},n={};Object.keys(e.elements).forEach(r=>{t[r]=e.styles[r],n[r]=e.attributes[r]}),f({state:e,styles:t,attributes:n,update:u,forceUpdate:h,placement:e.placement})}}),[u,h,f]),m=(0,b.useMemo)(()=>(gb(l.current,o)||(l.current=o),l.current),[o]);return(0,b.useEffect)(()=>{c.current&&r&&c.current.setOptions({placement:i,strategy:a,modifiers:[...m,p,vp]})},[a,i,p,r,m]),(0,b.useEffect)(()=>{if(r&&null!=e&&null!=t)return c.current=vd(e,t,Object.assign({},s,{placement:i,strategy:a,modifiers:[...m,vm,p]})),()=>{null!=c.current&&(c.current.destroy(),c.current=void 0,f(e=>Object.assign({},e,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),d};let vy=(0,b.createContext)(hj?window:void 0);vy.Provider;let vb=(e,t)=>hj?null==e?(t||hF()).body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect))?e:null:null;function vx(e,t){let n=(0,b.useContext)(vy),[r,i]=(0,b.useState)(()=>vb(e,null==n?void 0:n.document));if(!r){let t=vb(e);t&&i(t)}return(0,b.useEffect)(()=>{t&&r&&t(r)},[t,r]),(0,b.useEffect)(()=>{let t=vb(e);t!==r&&i(t)},[e,r]),r}let vw=void 0!==i.g&&i.g.navigator&&"ReactNative"===i.g.navigator.product;var v_="u">typeof document||vw?b.useLayoutEffect:b.useEffect,vk=function({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:i}){let a=(0,b.useRef)(null),o=(0,b.useRef)(t),s=h$(n);(0,b.useEffect)(()=>{t?o.current=!0:s(a.current)},[t,s]);let l=gg(a,hG(e)),c=(0,b.cloneElement)(e,{ref:l});return t?c:i||!o.current&&r?null:c};let vS=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"],vM=["component"],vA=b.forwardRef((e,t)=>{let{component:n}=e,r=function(e){let{onEnter:t,onEntering:n,onEntered:r,onExit:i,onExiting:a,onExited:o,addEndListener:s,children:l}=e,c=function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,vS),u=(0,b.useRef)(null),h=gg(u,hG(l)),d=e=>t=>{e&&u.current&&e(u.current,t)},f=(0,b.useCallback)(d(t),[t]),p=(0,b.useCallback)(d(n),[n]),m=(0,b.useCallback)(d(r),[r]),g=(0,b.useCallback)(d(i),[i]),v=(0,b.useCallback)(d(a),[a]),y=(0,b.useCallback)(d(o),[o]),x=(0,b.useCallback)(d(s),[s]);return Object.assign({},c,{nodeRef:u},t&&{onEnter:f},n&&{onEntering:p},r&&{onEntered:m},i&&{onExit:g},a&&{onExiting:v},o&&{onExited:y},s&&{addEndListener:x},{children:"function"==typeof l?(e,t)=>l(e,Object.assign({},t,{ref:h})):(0,b.cloneElement)(l,{ref:h})})}(function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,vM));return(0,v.jsx)(n,Object.assign({ref:t},r))});function vT({children:e,in:t,onExited:n,onEntered:r,transition:i}){let[a,o]=(0,b.useState)(!t);t&&a&&o(!1);let s=gg(function({in:e,onTransition:t}){let n=(0,b.useRef)(null),r=(0,b.useRef)(!0),i=h$(t);return v_(()=>{if(!n.current)return;let t=!1;return i({in:e,element:n.current,initial:r.current,isStale:()=>t}),()=>{t=!0}},[e,i]),v_(()=>(r.current=!1,()=>{r.current=!0}),[]),n}({in:!!t,onTransition:e=>{Promise.resolve(i(e)).then(()=>{e.isStale()||(e.in?null==r||r(e.element,e.initial):(o(!0),null==n||n(e.element)))},t=>{throw e.in||o(!0),t})}}),hG(e));return a&&!t?null:(0,b.cloneElement)(e,{ref:s})}let vC=b.forwardRef((e,t)=>{var n;let{flip:r,offset:i,placement:a,containerPadding:o,popperConfig:s={},transition:l,runTransition:c}=e,[u,h]=gp(),[d,f]=gp(),p=gg(h,t),m=vx(e.container),g=vx(e.target),[y,x]=(0,b.useState)(!e.show),w=vv(g,u,function({enabled:e,enableEvents:t,placement:n,flip:r,offset:i,fixed:a,containerPadding:o,arrowElement:s,popperConfig:l={}}){var c,u,h,d,f,p;let m,g=(p=l.modifiers,m={},Array.isArray(p)?(null==p||p.forEach(e=>{m[e.name]=e}),m):p||m);return Object.assign({},l,{placement:n,enabled:e,strategy:a?"fixed":l.strategy,modifiers:function(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}(Object.assign({},g,{eventListeners:{enabled:t,options:null==(c=g.eventListeners)?void 0:c.options},preventOverflow:Object.assign({},g.preventOverflow,{options:o?Object.assign({padding:o},null==(u=g.preventOverflow)?void 0:u.options):null==(h=g.preventOverflow)?void 0:h.options}),offset:{options:Object.assign({offset:i},null==(d=g.offset)?void 0:d.options)},arrow:Object.assign({},g.arrow,{enabled:!!s,options:Object.assign({},null==(f=g.arrow)?void 0:f.options,{element:s})}),flip:Object.assign({enabled:!!r},g.flip)}))})}({placement:a,enableEvents:!!e.show,containerPadding:o||5,flip:r,offset:i,arrowElement:d,popperConfig:s}));e.show&&y&&x(!1);let _=e.show||!y;if(hK(u,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!_)return null;let{onExit:k,onExiting:S,onEnter:M,onEntering:A,onEntered:T}=e,C=e.children(Object.assign({},w.attributes.popper,{style:w.styles.popper,ref:p}),{popper:w,placement:a,show:!!e.show,arrowProps:Object.assign({},w.attributes.arrow,{style:w.styles.arrow,ref:f})});return n={in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:C,onExit:k,onExiting:S,onExited:(...t)=>{x(!0),e.onExited&&e.onExited(...t)},onEnter:M,onEntering:A,onEntered:T},C=l?(0,v.jsx)(vA,Object.assign({},n,{component:l})):c?(0,v.jsx)(vT,Object.assign({},n,{transition:c})):(0,v.jsx)(vk,Object.assign({},n)),m?s1.createPortal(C,m):null});vC.displayName="Overlay";var vP=function(e){let t=(0,b.useRef)(e);return(0,b.useEffect)(()=>{t.current=e},[e]),t};let vE=void 0!==i.g&&i.g.navigator&&"ReactNative"===i.g.navigator.product;var vO="u">typeof document||vE?b.useLayoutEffect:b.useEffect;function vN(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}let vj=b.createContext({prefixes:{},breakpoints:["xxl","xl","lg","md","sm","xs"],minBreakpoint:"xs"}),{Consumer:vL,Provider:vD}=vj;function vR(e,t){let{prefixes:n}=(0,b.useContext)(vj);return e||n[t]||t}function vI(){let{dir:e}=(0,b.useContext)(vj);return"rtl"===e}let vz=b.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=vR(t,"popover-header"),(0,v.jsx)(n,{ref:i,className:cD()(e,t),...r})));vz.displayName="PopoverHeader";let vB=b.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=vR(t,"popover-body"),(0,v.jsx)(n,{ref:i,className:cD()(e,t),...r})));function vF(e,t){let n=e;return"left"===e?n=t?"end":"start":"right"===e&&(n=t?"start":"end"),n}function vH(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}vB.displayName="PopoverBody",b.Component;let v$=b.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:i,body:a,arrowProps:o,hasDoneInitialMeasure:s,popper:l,show:c,...u},h)=>{let d=vR(e,"popover"),f=vI(),[p]=(null==t?void 0:t.split("-"))||[],m=vF(p,f),g=r;return c&&!s&&(g={...r,...vH(null==l?void 0:l.strategy)}),(0,v.jsxs)("div",{ref:h,role:"tooltip",style:g,"x-placement":p,className:cD()(n,d,p&&`bs-popover-${m}`),...u,children:[(0,v.jsx)("div",{className:"popover-arrow",...o}),a?(0,v.jsx)(vB,{children:i}):i]})});v$.displayName="Popover";var vU=Object.assign(v$,{Header:vz,Body:vB,POPPER_OFFSET:[0,8]});let vV=b.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:i,arrowProps:a,hasDoneInitialMeasure:o,popper:s,show:l,...c},u)=>{e=vR(e,"tooltip");let h=vI(),[d]=(null==t?void 0:t.split("-"))||[],f=vF(d,h),p=r;return l&&!o&&(p={...r,...vH(null==s?void 0:s.strategy)}),(0,v.jsxs)("div",{ref:u,style:p,role:"tooltip","x-placement":d,className:cD()(n,e,`bs-tooltip-${f}`),...c,children:[(0,v.jsx)("div",{className:"tooltip-arrow",...a}),(0,v.jsx)("div",{className:`${e}-inner`,children:i})]})});vV.displayName="Tooltip";var vq=Object.assign(vV,{TOOLTIP_OFFSET:[0,6]}),vY=b.createContext(null),vW="unmounted",vG="exited",vX="entering",vK="entered",vZ="exiting",vQ=function(e){function t(t,n){var r,i=e.call(this,t,n)||this,a=n&&!n.isMounting?t.enter:t.appear;return i.appearStatus=null,t.in?a?(r=vG,i.appearStatus=vX):r=vK:r=t.unmountOnExit||t.mountOnEnter?vW:vG,i.state={status:r},i.nextCallback=null,i}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,c6(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===vW?{status:vG}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==vX&&n!==vK&&(t=vX):(n===vX||n===vK)&&(t=vZ)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===vX){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:s1.findDOMNode(this);n&&n.scrollTop}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===vG&&this.setState({status:vW})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[s1.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;(e||n)&&1?(this.props.onEnter(a,o),this.safeSetState({status:vX},function(){t.props.onEntering(a,o),t.onTransitionEnd(l,function(){t.safeSetState({status:vK},function(){t.props.onEntered(a,o)})})})):this.safeSetState({status:vK},function(){t.props.onEntered(a)})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:s1.findDOMNode(this);t?(this.props.onExit(r),this.safeSetState({status:vZ},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:vG},function(){e.props.onExited(r)})})})):this.safeSetState({status:vG},function(){e.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:s1.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(!n||r)return void setTimeout(this.nextCallback,0);if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}null!=e&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===vW)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,cr(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return b.createElement(vY.Provider,{value:null},"function"==typeof n?n(e,r):b.cloneElement(b.Children.only(n),r))},t}(b.Component);function vJ(){}vQ.contextType=vY,vQ.propTypes={},vQ.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:vJ,onEntering:vJ,onEntered:vJ,onExit:vJ,onExiting:vJ,onExited:vJ},vQ.UNMOUNTED=vW,vQ.EXITED=vG,vQ.ENTERING=vX,vQ.ENTERED=vK,vQ.EXITING=vZ;var v0=/([A-Z])/g,v1=/^ms-/;function v2(e){return e.replace(v0,"-$1").toLowerCase().replace(v1,"-ms-")}var v3=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,v5=function(e,t){var n,r,i="",a="";if("string"==typeof t){return e.style.getPropertyValue(v2(t))||((r=hF(n=e))&&r.defaultView||window).getComputedStyle(n,void 0).getPropertyValue(v2(t))}Object.keys(t).forEach(function(n){var r=t[n];r||0===r?n&&v3.test(n)?a+=n+"("+r+") ":i+=v2(n)+": "+r+";":e.style.removeProperty(v2(n))}),a&&(i+="transform: "+a+";"),e.style.cssText+=";"+i};function v7(e,t){let n=v5(e,t)||"",r=-1===n.indexOf("ms")?1e3:1;return parseFloat(n)*r}function v4(e,t){let n=v7(e,"transitionDuration"),r=v7(e,"transitionDelay"),i=function(e,t,n){null==n&&(i=-1===(r=v5(e,"transitionDuration")||"").indexOf("ms")?1e3:1,n=parseFloat(r)*i||0);var r,i,a,o,s,l=(a=!1,o=setTimeout(function(){a||function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,n,r),e.dispatchEvent(i)}}(e,"transitionend",!0)},n+5),s=hB(e,"transitionend",function(){a=!0},{once:!0}),function(){clearTimeout(o),s()}),c=hB(e,"transitionend",t);return function(){l(),c()}}(e,n=>{n.target===e&&(i(),t(n))},n+r)}function v6(e){return e&&"setState"in e?s1.findDOMNode(e):null!=e?e:null}let v9=b.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:i,onExited:a,addEndListener:o,children:s,childRef:l,...c},u)=>{let h=(0,b.useRef)(null),d=gf(h,l),f=e=>{d(v6(e))},p=e=>t=>{e&&h.current&&e(h.current,t)},m=(0,b.useCallback)(p(e),[e]),g=(0,b.useCallback)(p(t),[t]),y=(0,b.useCallback)(p(n),[n]),x=(0,b.useCallback)(p(r),[r]),w=(0,b.useCallback)(p(i),[i]),_=(0,b.useCallback)(p(a),[a]),k=(0,b.useCallback)(p(o),[o]);return(0,v.jsx)(vQ,{ref:u,...c,onEnter:m,onEntered:y,onEntering:g,onExit:x,onExited:_,onExiting:w,addEndListener:k,nodeRef:h,children:"function"==typeof s?(e,t)=>s(e,{...t,ref:f}):b.cloneElement(s,{ref:f})})});v9.displayName="TransitionWrapper";let v8={[vX]:"show",[vK]:"show"},ye=b.forwardRef(({className:e,children:t,transitionClasses:n={},onEnter:r,...i},a)=>{let o={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...i},s=(0,b.useCallback)((e,t)=>{e.offsetHeight,null==r||r(e,t)},[r]);return(0,v.jsx)(v9,{ref:a,addEndListener:v4,...o,onEnter:s,childRef:hG(t),children:(r,i)=>b.cloneElement(t,{...i,className:cD()("fade",e,t.props.className,v8[r],n[r])})})});ye.displayName="Fade";var yt=ye;let yn=b.forwardRef(({children:e,transition:t=yt,popperConfig:n={},rootClose:r=!1,placement:i="top",show:a=!1,...o},s)=>{var l;let c,u,h,d,f,p=(0,b.useRef)({}),[m,g]=(0,b.useState)(null),[y,x]=(l=o.offset,c=(0,b.useRef)(null),u=vR(void 0,"popover"),h=vR(void 0,"tooltip"),d=(0,b.useMemo)(()=>({name:"offset",options:{offset:()=>{if(l)return l;if(c.current){if(vN(c.current,u))return vU.POPPER_OFFSET;if(vN(c.current,h))return vq.TOOLTIP_OFFSET}return[0,0]}}}),[l,u,h]),[c,[d]]),w=gf(s,y),_=!0===t?yt:t||void 0,k=(f=vP(e=>{g(e),null==n||null==n.onFirstUpdate||n.onFirstUpdate(e)}),(0,b.useCallback)(function(...e){return f.current&&f.current(...e)},[f]));return vO(()=>{m&&o.target&&(null==p.current.scheduleUpdate||p.current.scheduleUpdate())},[m,o.target]),(0,b.useEffect)(()=>{a||g(null)},[a]),(0,v.jsx)(vC,{...o,ref:w,popperConfig:{...n,modifiers:x.concat(n.modifiers||[]),onFirstUpdate:k},transition:_,rootClose:r,placement:i,show:a,children:(r,{arrowProps:i,popper:a,show:o})=>{var s;!function(e,t){let{ref:n}=e,{ref:r}=t;e.ref=n.__wrapped||(n.__wrapped=e=>n(v6(e))),t.ref=r.__wrapped||(r.__wrapped=e=>r(v6(e)))}(r,i);let l=null==a?void 0:a.placement,c=Object.assign(p.current,{state:null==a?void 0:a.state,scheduleUpdate:null==a?void 0:a.update,placement:l,outOfBoundaries:(null==a||null==(s=a.state)||null==(s=s.modifiersData.hide)?void 0:s.isReferenceHidden)||!1,strategy:n.strategy}),u=!!m;return"function"==typeof e?e({...r,placement:l,show:o,...!t&&o&&{className:"show"},popper:c,arrowProps:i,hasDoneInitialMeasure:u}):b.cloneElement(e,{...r,placement:l,arrowProps:i,popper:c,hasDoneInitialMeasure:u,className:cD()(e.props.className,!t&&o&&"show"),style:{...e.props.style,...r.style}})}})});function yr(e,t,n){let[r]=t,i=r.currentTarget,a=r.relatedTarget||r.nativeEvent[n];a&&a===i||hU(i,a)||e(...t)}yn.displayName="Overlay",s0().oneOf(["click","hover","focus"]);var yi=({trigger:e=["hover","focus"],overlay:t,children:n,popperConfig:r={},show:i,defaultShow:a=!1,onToggle:o,delay:s,placement:l,flip:c=l&&-1!==l.indexOf("auto"),...u})=>{var h,d,f,p,m,g,y;let x,w,_,k,S,M,A=(0,b.useRef)(null),T=gf(A,hG(n)),C=(S=(x=(0,b.useRef)(!0),w=(0,b.useRef)(()=>x.current),(0,b.useEffect)(()=>(x.current=!0,()=>{x.current=!1}),[]),w.current),M=(0,b.useRef)(),y=()=>clearTimeout(M.current),(_=(0,b.useRef)(y)).current=y,k=_,(0,b.useEffect)(()=>()=>k.current(),[]),(0,b.useMemo)(()=>{let e=()=>clearTimeout(M.current);return{set:function(t,n=0){S()&&(e(),n<=gh?M.current=setTimeout(t,n):function e(t,n,r){let i=r-Date.now();t.current=i<=gh?setTimeout(n,i):setTimeout(()=>e(t,n,r),gh)}(M,t,Date.now()+n))},clear:e,handleRef:M}},[])),P=(0,b.useRef)(""),[E,O]=(h=(0,b.useRef)(void 0!==i),f=(d=(0,b.useState)(a))[0],p=d[1],m=void 0!==i,g=h.current,h.current=m,!m&&g&&f!==a&&p(a),[m?i:f,(0,b.useCallback)(function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o&&o.apply(void 0,[e].concat(n)),p(e)},[o])]),N=s&&"object"==typeof s?s:{show:s,hide:s},{onFocus:j,onBlur:L,onClick:D}="function"!=typeof n?b.Children.only(n).props:{},R=(0,b.useCallback)(()=>{(C.clear(),P.current="show",N.show)?C.set(()=>{"show"===P.current&&O(!0)},N.show):O(!0)},[N.show,O,C]),I=(0,b.useCallback)(()=>{(C.clear(),P.current="hide",N.hide)?C.set(()=>{"hide"===P.current&&O(!1)},N.hide):O(!1)},[N.hide,O,C]),z=(0,b.useCallback)((...e)=>{R(),null==j||j(...e)},[R,j]),B=(0,b.useCallback)((...e)=>{I(),null==L||L(...e)},[I,L]),F=(0,b.useCallback)((...e)=>{O(!E),null==D||D(...e)},[D,O,E]),H=(0,b.useCallback)((...e)=>{yr(R,e,"fromElement")},[R]),$=(0,b.useCallback)((...e)=>{yr(I,e,"toElement")},[I]),U=null==e?[]:[].concat(e),V={ref:e=>{T(v6(e))}};return -1!==U.indexOf("click")&&(V.onClick=F),-1!==U.indexOf("focus")&&(V.onFocus=z,V.onBlur=B),-1!==U.indexOf("hover")&&(V.onMouseOver=H,V.onMouseOut=$),(0,v.jsxs)(v.Fragment,{children:["function"==typeof n?n(V):(0,b.cloneElement)(n,V),(0,v.jsx)(yn,{...u,show:E,onHide:I,flip:c,placement:l,popperConfig:r,target:A.current,children:t})]})};let ya=e=>{let{children:t,placement:n,text:r}=e;return(0,v.jsx)(yi,{placement:n,overlay:(0,v.jsx)(vq,{children:r}),children:t})};ya.propTypes={children:s0().element.isRequired,placement:s0().string,text:s0().string.isRequired};let yo=e=>{let{id:t,notes:n,placeholderText:r,tooltipText:i}=e,[a,o]=(0,b.useState)(!1);return(0,v.jsxs)("div",{className:"o-expandable complex-example",children:[(0,v.jsxs)("button",{className:"o-expandable__header","aria-expanded":a,onClick:()=>{o(!a)},title:"Expand content",children:[(0,v.jsx)(sH,{type:"3",className:"o-expandable__label",children:"Additional information and examples"}),(0,v.jsx)("span",{className:"o-expandable__cues",children:a?(0,v.jsx)("span",{className:"o-expandable__cue-close",role:"img","aria-label":"Hide",children:(0,v.jsx)("span",{className:"u-visually-hidden-on-mobile",children:(0,v.jsx)(a7,{name:"up",isPresentational:!0})})}):(0,v.jsx)("span",{className:"o-expandable__cue-open",role:"img","aria-label":"Show",children:(0,v.jsx)("span",{className:"u-visually-hidden-on-mobile",children:(0,v.jsx)(a7,{name:"down",isPresentational:!0})})})})]}),a?(0,v.jsxs)("div",{className:"o-expandable__content",children:[i&&r?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("label",{className:"descriptor",htmlFor:"example-".concat(t),children:"Complex example:"}),(0,v.jsx)("span",{className:"u-visually-hidden",children:i}),(0,v.jsx)(ya,{text:i,children:r.length>30?(0,v.jsx)("textarea",{className:"a-text-input example-input",id:"example-".concat(t),rows:2,readOnly:!0,value:r}):(0,v.jsx)("input",{className:"a-text-input example-input",id:"example-".concat(t),rows:2,readOnly:!0,value:r})})]}):null,(0,v.jsx)(sH,{type:"4",className:"descriptor",children:"Notes:"}),(0,v.jsx)("ul",{className:"m-list",children:n.map((e,t)=>(0,v.jsx)("li",{className:"m-list__item",children:e},t))})]}):null]})};yo.propTypes={id:s0().string.isRequired,notes:s0().array.isRequired,placeholderText:s0().string,tooltipText:s0().string};let ys=()=>(0,v.jsxs)("div",{className:"advanced-tips",children:[(0,v.jsxs)("div",{children:[(0,v.jsx)(sH,{type:"3",children:"Search tips"}),(0,v.jsxs)("ul",{className:"m-list",children:[(0,v.jsx)("li",{className:"m-list__item",children:"Hover over the examples within the sample search bars below to see what their results should return"}),(0,v.jsx)("li",{className:"m-list__item",children:'When searching within "All data", terms must be found in the same field to be considered a match'}),(0,v.jsx)("li",{className:"m-list__item",children:"The search function will look for any variations of the word that includes the stem – for example, if deferment is searched, it would return the following variations: deferment, defer, deferred, deferral, etc."})]})]}),(0,v.jsxs)("div",{className:"tips content-l",children:[(0,v.jsxs)("div",{className:"tip content-l__col content-l__col-1-3",children:[(0,v.jsx)(sH,{type:"4",children:"AND / OR / NOT"}),(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:"example-and",children:"Use AND when results must contain all terms"}),(0,v.jsx)(ya,{text:"Results would include both call (call, called, calling, etc.) as well as harass (harass, harassed, harassing, etc.).",children:(0,v.jsx)("input",{className:"a-text-input",id:"example-and",type:"text",readOnly:!0,value:"call AND harass"})}),(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:"example-or",children:"Use OR when results should contain at least one of the terms"}),(0,v.jsx)(ya,{text:"Results would include either loan (loan, loans, loaned, etc.) or mortage (mortgage, mortgages, etc.).",children:(0,v.jsx)("input",{className:"a-text-input",id:"example-or",type:"text",readOnly:!0,value:"loan OR mortgage"})}),(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:"example-not",children:"Use NOT when results should contain at least one of the terms"}),(0,v.jsx)(ya,{text:"Results would only include claim (claim, claims, claimed, etc.) and cannot include the term accident (accident, accidents, etc.)",children:(0,v.jsx)("input",{className:"a-text-input",id:"example-not",type:"text",readOnly:!0,value:"claim NOT accident"})}),(0,v.jsxs)("div",{className:"tip-description",children:[(0,v.jsx)("p",{children:"Use AND when results must contain both terms"}),(0,v.jsx)("p",{children:"Use OR when results should contain at least one of the terms"}),(0,v.jsx)("p",{children:"Use NOT when results must not contain the term"})]}),(0,v.jsx)(yo,{id:"and-or-not",notes:["The Boolean operators (AND / OR / NOT) must be capitalized","Boolean operators do not honor precedence rules, so parentheses should be used whenever multiple operators are used together – if they are not used correctly (i.e., having multiple operators outside of parentheses), then your results might not return what you intended."],placeholderText:"call AND (harass* OR annoy* OR threat OR repeat) AND NOT spam",tooltipText:"This example would return results that include the word call (called, calling, etc.) and one of the words in the parentheses, but exclude the word spam (spammed, spamming, etc.)."})]}),(0,v.jsxs)("div",{className:"tip content-l__col content-l__col-1-3",children:[(0,v.jsx)(sH,{type:"4",children:"Must/Must not contain"}),(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:"example-must-plus",children:"Use + if the search must contain the selected term"}),(0,v.jsx)(ya,{text:"Results must include the word foreclosure (foreclosure, foreclosed, etc.).",children:(0,v.jsx)("input",{className:"a-text-input",id:"example-must-plus",type:"text",readOnly:!0,value:"+foreclosure"})}),(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:"example-must-minus",children:"Use - if the search must not contain the selected term"}),(0,v.jsx)(ya,{text:"Results cannot include the word collect (collect, collects, collecting, etc.).",children:(0,v.jsx)("input",{className:"a-text-input",id:"example-must-minus",type:"text",readOnly:!0,value:"-collect"})}),(0,v.jsxs)("div",{className:"tip-description",children:[(0,v.jsx)("p",{children:"Use + if the search must contain the selected term"}),(0,v.jsx)("p",{children:"Use - if the search must not contain the selected term"})]}),(0,v.jsx)(yo,{id:"must-or-must-not",notes:['Since the terms "insurance" and "claim" do not have to be included in the results, their appearance will give the result a greater relevance score.',"There cannot be a space between the operator (+ / -) and searched term."],placeholderText:"insurance claim +agent +car -accident",tooltipText:"Results must include the terms agent and car but exclude accident – the terms insurance and claim are optional"})]}),(0,v.jsxs)("div",{className:"tip content-l__col content-l__col-1-3",children:[(0,v.jsx)(sH,{type:"4",children:"Wildcard search"}),(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:"example-wc-star",children:"Use * to substitute any consecutive number of characters."}),(0,v.jsx)(ya,{text:'Results would include all terms that start with the base "report" (report, reports, reported, reporting, etc.) and "$*.00" would include all variations of whole number dollar values ($8.00, $1234.00, etc.).',children:(0,v.jsx)("input",{className:"a-text-input",id:"example-wc-star",type:"text",readOnly:!0,value:"report* AND $*.00"})}),(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:"example-wc-question",children:"Use ? to replace any single character anywhere in a term."}),(0,v.jsx)(ya,{text:"Results would return variations such as: woman, women, etc.",children:(0,v.jsx)("input",{className:"a-text-input",id:"example-wc-question",type:"text",readOnly:!0,value:"wom?n"})}),(0,v.jsxs)("div",{className:"tip-description",children:[(0,v.jsx)("p",{children:"Use * to substitute any consecutive number of characters."}),(0,v.jsx)("p",{children:"Use ? to replace any single character anywhere in a term."})]})]}),(0,v.jsxs)("div",{className:"tip content-l__col content-l__col-1-3",children:[(0,v.jsx)(sH,{type:"4",children:"Proximity search"}),(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:"example-proximity",children:'Use ~[#] at the end of a phrase to search for terms with up to that number of gap words between them; Order does not matter and the terms should be in a single set of quotation marks (" ").'}),(0,v.jsx)(ya,{text:'Results would include the terms "auto", "loan", and "default" in any order, with up to three (3) gap words in between them. For example, results could include: "defaulted auto loan", "auto loan that went into default", "Auto Loan with the same defaulted", etc.',children:(0,v.jsx)("input",{className:"a-text-input example-input",id:"example-proximity",type:"text",readOnly:!0,value:'"auto loan default"~3'})}),(0,v.jsx)("div",{className:"tip-description",children:(0,v.jsx)("p",{children:'Use ~[#] at the end of a phrase to search for terms with up to that number of gap words between them; Order does not matter and the terms should be in a single set of quotation marks (" ").'})}),(0,v.jsx)(yo,{id:"proximity",notes:['Proximity phrase search must use straight quotes (" ") versus curly quotes (“ ”), or else the search function will not perform properly',"The closer the specified terms are within the data, the more relevant the search results become."]})]}),(0,v.jsxs)("div",{className:"tip content-l__col content-l__col-1-3",children:[(0,v.jsx)(sH,{type:"4",children:"Fuzzy search"}),(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:"example-fuzzy",children:"Use ~1 at the end of a term to search for terms that are spelled similarly to your keyword within a certain margin of error."}),(0,v.jsx)(ya,{text:"Results would include the correct spelling of escrow, as well as other (potentially misspelled) versions, such as: escrow, escrowed, escro, esrow, etc.",children:(0,v.jsx)("input",{className:"a-text-input example-input",id:"example-fuzzy",type:"text",readOnly:!0,value:"escrow~1"})}),(0,v.jsx)("div",{className:"tip-description",children:(0,v.jsx)("p",{children:"Use ~1 at the end of a term to search for terms that are spelled similarly to your keyword within a certain margin of error."})}),(0,v.jsx)(yo,{id:"fuzzy",notes:["The search looks for a maximum of two changes in the term, where a change is the insertion, deletion or substitution of a single character or transposition of two adjacent characters (this catches about 80% of misspelled words).","Fuzzy term search can only be used with single terms, it does not support phrases."],placeholderText:"escrow~1 -escrow -escrowed",tooltipText:'Results would return the various misspellings of the word "escrow" that fuzzy term search identifies (after excluding the escrow and escrowed).'})]}),(0,v.jsxs)("div",{className:"tip content-l__col content-l__col-1-3",children:[(0,v.jsx)(sH,{type:"4",children:"Boost search"}),(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:"example-boost",children:"Use ^[#] at the end of a term or terms to increase or decrease its relevance compared to the other term(s)."}),(0,v.jsx)(ya,{text:'Results would be sorted by relevance in favor of the term "pay"',children:(0,v.jsx)("input",{className:"a-text-input example-input",id:"example-boost",type:"text",readOnly:!0,value:"pay^2 OR credit"})}),(0,v.jsx)("div",{className:"tip-description",children:(0,v.jsx)("p",{children:"Use ^[#] at the end of a term or terms to increase or decrease its relevance compared to the other term(s)."})}),(0,v.jsx)(yo,{id:"boost",notes:["A boost value between 0 and 1.0 decreases the relevance score while a value greater than 1.0 increases the relevance score."]})]})]}),(0,v.jsxs)("div",{className:"footer",children:[(0,v.jsx)(sH,{type:"3",children:"Additional notes:"}),(0,v.jsxs)("ul",{className:"m-list",children:[(0,v.jsx)("li",{className:"m-list__item",children:'Putting a phrase only in quotations (" ") will search for the words in that order, but it will not be an exact match – meaning it may include stemmed versions of the term.'}),(0,v.jsx)("li",{className:"m-list__item",children:'The default operator is "AND", meaning if you search "foreclosure house", it will search results that include both words (i.e., foreclosure AND house).'}),(0,v.jsx)("li",{className:"m-list__item",children:"Capitalization does not have an effect on searched terms (expect for the AND / OR / NOT operators)."}),(0,v.jsxs)("li",{className:"m-list__item",children:[(0,v.jsxs)("a",{href:"https://www.elastic.co/guide/en/elasticsearch/reference/7.17/elasticsearch-intro.html",target:"_blank",rel:"noopener noreferrer",children:["Find out more ",(0,v.jsx)(a7,{name:"external-link",isPresentational:!0})]})," ","about Elastic Search"]})]})]})]}),yl=e=>{let{ariaLabel:t,className:n,htmlId:r,isDisabled:i=!1,handleChange:a,handleClear:o,handlePressEnter:s,placeholder:l="Enter your search text",value:c}=e;return(0,v.jsxs)("div",{className:"o-search-input",children:[(0,v.jsxs)("div",{className:"o-search-input__input",children:[(0,v.jsx)("label",{htmlFor:r,className:"o-search-input__input-label","aria-label":t,children:(0,v.jsx)(a7,{name:"search",isPresentational:!0})}),(0,v.jsx)("input",{type:"search",id:r,disabled:i,value:c,onChange:a,onKeyDown:s,className:"a-text-input a-text-input--full "+n,placeholder:l,title:l,autoComplete:"off",maxLength:"75"}),(0,v.jsx)(dH,{onClear:o})]}),(0,v.jsx)(sF,{type:"submit",label:"Search"})]})};yl.propTypes={ariaLabel:s0().string.isRequired,className:s0().string,isDisabled:s0().bool,handleChange:s0().func.isRequired,handleClear:s0().func,handlePressEnter:s0().func,htmlId:s0().string.isRequired,placeholder:s0().string,value:s0().string.isRequired};let yc={all:"All data",company:"Company name",complaint_what_happened:"Narratives"},yu=()=>{let e=ta(),t=ts(lG),n=ts(lX),r=ts(fo),[i,a]=(0,b.useState)(n),[o,s]=(0,b.useState)(!1),[l,c]=(0,b.useState)(!0),u=o?i:n,h=t=>{e(d5(t&&t[0]?t[0].key:""))},d=t=>{"Enter"===t.key&&(c(!1),e(d5(t.target.value)),a(t.target.value),s(!1))};return(0,v.jsxs)("div",{children:[(0,v.jsx)("div",{className:"search-bar u-mb25",role:"search",children:(0,v.jsxs)("form",{action:"",onSubmit:t=>{t.preventDefault(),e(d5(u)),s(!1)},children:[(0,v.jsx)(sH,{type:"3",className:"h4",children:"Search within"}),(0,v.jsxs)("div",{className:"layout-row",children:[(0,v.jsx)("div",{className:"cf-select flex-fixed",children:(0,v.jsx)("select",{"aria-label":"Choose which field will be searched",id:"searchField",onChange:t=>{e(d3(t.target.value))},value:t,children:(0,v.jsx)("optgroup",{label:"Search Within",children:Object.keys(yc).map(e=>(0,v.jsx)("option",{value:e,children:yc[e]},e))})})}),(0,v.jsx)("div",{className:"flex-all typeahead-portal",children:"company"===t?(0,v.jsx)(d9,{ariaLabel:"Enter your search term(s)",htmlId:"searchText",defaultValue:n,handleChange:h,handleClear:()=>{e(d5(""))},handlePressEnter:d,handleSelectionOverride:h,hasClearButton:!0,hasSearchButton:!0,placeholder:"Enter your search term(s)",fieldName:"company"}):(0,v.jsx)(yl,{handleChange:e=>{a(e.target.value),s(!0)},handleClear:()=>{l&&(e(d5("")),a(""),s(!1)),c(!0)},handlePressEnter:d,htmlId:"searchText",value:u,ariaLabel:"Enter the term you want to search for",placeholder:"Enter your search term(s)"})}),(0,v.jsx)(a9,{className:"u-visually-hidden",href:"#search-summary",label:"Skip to Results"}),(0,v.jsx)("div",{className:"advanced-container flex-fixed",children:(0,v.jsx)(sF,{label:r?"Hide advanced search tips":"Show advanced search tips",isLink:!0,onClick:t=>{t.preventDefault(),r?e(le()):e(lo())}})})]})]})}),r?(0,v.jsx)(ys,{}):null]})},yh=()=>{var e;let{data:t,isLoading:n,isFetching:r}=aY("meta"),i=null==t||null==(e=t._meta)?void 0:e.last_indexed,a=i?(0,v.jsxs)("span",{className:"date-subscript",children:["(last updated: ",ib(i),")"]}):null;return n||r?(0,v.jsx)(s2,{isLoading:!0}):(0,v.jsxs)(sQ,{className:"search-panel",children:[(0,v.jsxs)(sH,{type:"2",children:["Search complaint data ",a]}),(0,v.jsx)(yu,{}),(0,v.jsx)(gu,{})]})},yd=()=>{let e,t,n,r;e=ta(),t=eh(),(0,b.useEffect)(()=>{var n,r;e((n=t.pathname,r=function(e,t){iK((t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...t}).arrayFormatSeparator);let n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{if(t=/\[(\d*)]$/.exec(e),e=e.replace(/\[\d*]$/,""),!t){r[e]=n;return}void 0===r[e]&&(r[e]={}),r[e][t[1]]=n};case"bracket":return(e,n,r)=>{if(t=/(\[])$/.exec(e),e=e.replace(/\[]$/,""),!t){r[e]=n;return}if(void 0===r[e]){r[e]=[n];return}if(!Array.isArray(r[e])){r[e]=[r[e],n];return}r[e].push(n)};case"colon-list-separator":return(e,n,r)=>{if(t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),!t){r[e]=n;return}if(void 0===r[e]){r[e]=[n];return}if(!Array.isArray(r[e])){r[e]=[r[e],n];return}r[e].push(n)};case"comma":case"separator":return(t,n,r)=>{let i="string"==typeof n&&n.includes(e.arrayFormatSeparator)?n.split(e.arrayFormatSeparator).map(t=>iQ(t,e)):null===n?n:iQ(n,e);r[t]=i};case"bracket-separator":return(t,n,r)=>{let i=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!i){r[t]=n?iQ(n,e):n;return}let a=null===n?[]:iQ(n,e).split(e.arrayFormatSeparator);if(void 0===r[t]){r[t]=a;return}for(let e of(Array.isArray(r[t])||(r[t]=[r[t]]),a))r[t].push(e)};default:return(e,t,n)=>{if(void 0===n[e]){n[e]=t;return}Array.isArray(n[e])?n[e].push(t):n[e]=[n[e],t]}}}(t),r=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return r;let i=0;for(let a=0;a<=e.length;a++){if(a<e.length&&"&"!==e[a])continue;if(a===i){i=a+1;continue}let o=e.slice(i,a);i=a+1;let s=t.decode?o.replaceAll("+"," "):o,[l,c]=function(e){if("string"!=typeof e)throw TypeError("Expected the arguments to be of type `string`");if(""===e)return[];let t=e.indexOf("=");return -1===t?[]:[e.slice(0,t),e.slice(t+1)]}(s);void 0===l&&(l=s),c=void 0===c?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?c:iQ(c,t),n(iQ(l,t),c,r)}for(let[e,n]of Object.entries(r))if("object"==typeof n&&null!==n&&"string"!==t.types[e])for(let[r,i]of Object.entries(n)){let a=t.types[e],o="function"==typeof a?a:a?a.replace("[]",""):void 0;n[r]=iJ(i,t,o)}else"object"==typeof n&&null!==n&&"string"===t.types[e]?r[e]=Object.values(n).join(t.arrayFormatSeparator):r[e]=iJ(n,t,t.types[e]);return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((e,t)=>{let n=r[t];return e[t]=n&&"object"==typeof n&&!Array.isArray(n)?function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(n):n,e},Object.create(null))}(t.search),function(e,t){let i,a=t(),o=(i=tu({},r),["search_after"].forEach(e=>{Object.prototype.hasOwnProperty.call(i,e)&&delete i[e]}),["size","page","trend_depth"].forEach(e=>{Object.prototype.hasOwnProperty.call(i,e)&&(i[e]=parseInt(i[e],10))}),i),s=id()(r.date_received_max).isValid()&&id()(r.date_received_min).isValid(),{routes:l}=a;!(l.path===n&&fD(l.params,o))&&s&&e(fj(n,o))}))},[t,e]),n=ts(fd),r=ta(),(0,b.useEffect)(()=>{let e=ae(()=>{n!==window.innerWidth&&r(lf(window.innerWidth))},500);return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[r,n]);let i=ts(fc),a=ta();return gc("afterprint",()=>{i&&a(lh())}),gc("beforeprint",()=>{i||a(ld())}),(0,b.useEffect)(()=>{i&&setTimeout(()=>{window.print()},2e3)},[i]),(0,v.jsxs)("main",{className:"content content--1-3 ccdb-content ".concat(i?"print":""),role:"main",children:[(0,v.jsx)(lm,{}),(0,v.jsxs)("div",{className:"content__wrapper",children:[(0,v.jsx)(yh,{}),(0,v.jsx)(f$,{}),(0,v.jsx)(pZ,{})]}),(0,v.jsx)(gl,{}),(0,v.jsx)(p4,{})]})};(p=g||(g={})).Pop="POP",p.Push="PUSH",p.Replace="REPLACE";var yf=function(e){return e},yp="beforeunload";function ym(e){e.preventDefault(),e.returnValue=""}function yg(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter(function(e){return e!==t})}},call:function(t){e.forEach(function(e){return e&&e(t)})}}}var yv=e=>t=>n=>{let r=t(n),i=e.getState();if("routes/routeChanged"===n.type||!i.query.dateLastIndexed)return r;let a=function(e){let t,n,{tab:r}=e.view,i=Object.keys(e.filters),a=(t=["dateRange","company_received_min","company_received_max","date_received_min","date_received_max","searchText","searchField"],"List"===r?t.concat(["search_after","size","page","sort"]):"Trends"===r?t.concat(["dateInterval"]):t),o=(n=["debug","tour","tab"],["Trends"].includes(r)&&n.push("interval"),n),s=Object.assign({},lz(e.query,a),lz(e.filters,i),lz(e.view,o),lz(e.trends,"Trends"===r?["chartType","focus","lens","subLens","trend_depth"]:[]));return e.query.searchAfter&&(s.search_after=e.query.searchAfter),s}(i),o=function(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,r=n.history;function i(){var e=n.location,t=e.pathname,i=e.search,a=e.hash,o=r.state||{};return[o.idx,yf({pathname:t,search:i,hash:a,state:o.usr||null,key:o.key||"default"})]}var a=null;n.addEventListener("popstate",function(){if(a)h.call(a),a=null;else{var e=g.Pop,t=i(),n=t[0],r=t[1];if(h.length){if(null!=n){var o=l-n;o&&(a={action:e,location:r,retry:function(){y(-1*o)}},y(o))}}else v(e)}});var o=g.Pop,s=i(),l=s[0],c=s[1],u=yg(),h=yg();function d(e){var t,n,r,i,a,o,s;return"string"==typeof e?e:(r=void 0===(n=(t=e).pathname)?"/":n,a=void 0===(i=t.search)?"":i,s=void 0===(o=t.hash)?"":o,a&&"?"!==a&&(r+="?"===a.charAt(0)?a:"?"+a),s&&"#"!==s&&(r+="#"===s.charAt(0)?s:"#"+s),r)}function f(e,t){return void 0===t&&(t=null),yf(l8({pathname:c.pathname,hash:"",search:""},"string"==typeof e?function(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}(e):e,{state:t,key:Math.random().toString(36).substr(2,8)}))}function p(e,t){return[{usr:e.state,key:e.key,idx:t},d(e)]}function m(e,t,n){return!h.length||(h.call({action:e,location:t,retry:n}),!1)}function v(e){o=e;var t=i();l=t[0],c=t[1],u.call({action:o,location:c})}function y(e){r.go(e)}return null==l&&(l=0,r.replaceState(l8({},r.state,{idx:l}),"")),{get action(){return o},get location(){return c},createHref:d,push:function e(t,i){var a=g.Push,o=f(t,i);if(m(a,o,function(){e(t,i)})){var s=p(o,l+1),c=s[0],u=s[1];try{r.pushState(c,"",u)}catch(e){n.location.assign(u)}v(a)}},replace:function e(t,n){var i=g.Replace,a=f(t,n);if(m(i,a,function(){e(t,n)})){var o=p(a,l),s=o[0],c=o[1];r.replaceState(s,"",c),v(i)}},go:y,back:function(){y(-1)},forward:function(){y(1)},listen:function(e){return u.push(e)},block:function(e){var t=h.push(e);return 1===h.length&&n.addEventListener(yp,ym),function(){t(),h.length||n.removeEventListener(yp,ym)}}}}(),s=o.location,{queryString:l}=i.routes,c=i0(a);return(""!==l&&l!==c||""===l)&&(o.push({pathname:s.pathname,search:"?"+c}),e.dispatch(fN(s.pathname,a))),r};let yy=function(e){let t,n,r,i=function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new n_;return t&&("boolean"==typeof t?a.push(nb):a.push(ny(t.extraArgument))),a},{reducer:a,middleware:o,devTools:s=!0,duplicateMiddlewareCheck:l=!0,preloadedState:c,enhancers:u}=e||{};if("function"==typeof a)t=a;else if(tm(a))t=tg(a);else throw Error(nJ(1));n="function"==typeof o?o(i):i();let h=tv;s&&(h=nx({trace:!1,..."object"==typeof s&&s}));let d=(r=function(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(th(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=tv(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}(...n),function(e){let{autoBatch:t=!0}=e??{},n=new n_(r);return t&&n.push(((e={type:"raf"})=>t=>(...n)=>{let r,i=t(...n),a=!0,o=!1,s=!1,l=new Set,c="tick"===e.type?queueMicrotask:"raf"===e.type?"u">typeof window&&window.requestAnimationFrame?(r=window.requestAnimationFrame,e=>{let t=!1,n=()=>{t||(t=!0,cancelAnimationFrame(i),clearTimeout(a),e())},i=r(n),a=setTimeout(n,100)}):nT(10):"callback"===e.type?e.queueNotification:nT(e.timeout),u=()=>{s=!1,o&&(o=!1,l.forEach(e=>e()))};return Object.assign({},i,{subscribe(e){let t=i.subscribe(()=>a&&e());return l.add(e),()=>{t(),l.delete(e)}},dispatch(e){try{return(o=!(a=!e?.meta?.[nM]))&&!s&&(s=!0,c(u)),i.dispatch(e)}finally{a=!0}}})})("object"==typeof t?t:void 0)),n});return function e(t,n,r){if("function"!=typeof t)throw Error(th(2));if("function"==typeof n&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw Error(th(0));if("function"==typeof n&&void 0===r&&(r=n,n=void 0),void 0!==r){if("function"!=typeof r)throw Error(th(1));return r(e)(t,n)}let i=t,a=n,o=new Map,s=o,l=0,c=!1;function u(){s===o&&(s=new Map,o.forEach((e,t)=>{s.set(t,e)}))}function h(){if(c)throw Error(th(3));return a}function d(e){if("function"!=typeof e)throw Error(th(4));if(c)throw Error(th(5));let t=!0;u();let n=l++;return s.set(n,e),function(){if(t){if(c)throw Error(th(6));t=!1,u(),s.delete(n),o=null}}}function f(e){if(!tm(e))throw Error(th(7));if(void 0===e.type)throw Error(th(8));if("string"!=typeof e.type)throw Error(th(17));if(c)throw Error(th(9));try{c=!0,a=i(a,e)}finally{c=!1}return(o=s).forEach(e=>{e()}),e}return f({type:tp.INIT}),{dispatch:f,subscribe:d,getState:h,replaceReducer:function(e){if("function"!=typeof e)throw Error(th(10));i=e,f({type:tp.REPLACE})},[td]:function(){return{subscribe(e){if("object"!=typeof e||null===e)throw Error(th(11));function t(){e.next&&e.next(h())}return t(),{unsubscribe:d(t)}},[td](){return this}}}}}(t,c,h(..."function"==typeof u?u(d):d()))}({devTools:!0,reducer:{[aH.reducerPath]:aH.reducer,filters:lP,query:d6,routes:fL,trends:aF,view:lp},middleware:e=>e().concat([yv,aH.middleware])});m=yy.dispatch,function(){let[e,t,n,r]=[rg,rv,ry,rb].map(e=>()=>m(e()));if(!rx&&"u">typeof window&&window.addEventListener){let i=function(e){Object.entries(a).forEach(([t,n])=>{e?window.addEventListener(t,n,!1):window.removeEventListener(t,n)})},a={focus:e,visibilitychange:()=>{"visible"===window.document.visibilityState?e():t()},[rf]:n,[rp]:r};i(!0),rx=!0}}(),"u">typeof window&&(window.__ccdbDom={querySelector:ap,querySelectorAll:e=>{let t=ah();if(t&&t.querySelectorAll){let n=t.querySelectorAll(e);if(n&&n.length)return n}return t instanceof ShadowRoot?[]:document.querySelectorAll(e)}});let yb=af(au());if(!yb)throw Error("ccdb5-ui mount element not found.");(0,y.createRoot)(yb).render((0,v.jsx)(b.StrictMode,{children:(0,v.jsx)(function(e){let{children:t,context:n,serverState:r,store:i}=e,a=b.useMemo(()=>{let e=function(e){let t,n=e2,r=0,i=!1;function a(){l.onStateChange&&l.onStateChange()}function o(){if(r++,!t){let r,i;t=e.subscribe(a),r=null,i=null,n={clear(){r=null,i=null},notify(){let e=r;for(;e;)e.callback(),e=e.next},get(){let e=[],t=r;for(;t;)e.push(t),t=t.next;return e},subscribe(e){let t=!0,n=i={callback:e,next:null,prev:i};return n.prev?n.prev.next=n:r=n,function(){t&&null!==r&&(t=!1,n.next?n.next.prev=n.prev:i=n.prev,n.prev?n.prev.next=n.next:r=n.next)}}}}}function s(){r--,t&&0===r&&(t(),t=void 0,n.clear(),n=e2)}let l={addNestedSub:function(e){o();let t=n.subscribe(e),r=!1;return()=>{r||(r=!0,t(),s())}},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,o())},tryUnsubscribe:function(){i&&(i=!1,s())},getListeners:()=>n};return l}(i);return{store:i,subscription:e,getServerState:r?()=>r:void 0}},[i,r]),o=b.useMemo(()=>i.getState(),[i]);return e7(()=>{let{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),o!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,o]),b.createElement((n||te).Provider,{value:a},t)},{store:yy,children:(0,v.jsx)(()=>(0,v.jsx)(eZ,{children:(0,v.jsxs)(eC,{children:[(0,v.jsx)(eA,{index:!0,element:(0,v.jsx)(yd,{})}),(0,v.jsx)(eA,{path:"/data-research/consumer-complaints/search",element:(0,v.jsx)(yd,{})}),(0,v.jsx)(eA,{path:"/data-research/consumer-complaints/search/detail/:id",element:(0,v.jsx)(s9,{})}),(0,v.jsx)(eA,{path:"/detail/:id",element:(0,v.jsx)(s9,{})})]})}),{})})}))})()})();
|
|
41
|
+
`}static init(){sd.init(),on("cfpb-tagline",e)}},sp="state_atomic_init";function sm(e,t){return function(e,t){if(!e||!e.classList)throw Error(e+' is not valid. Check that element is a DOM node with class "'+t+'"')}(e,t),function(e,t){let n=e.classList.contains(t)?e:e.querySelector("."+t);if(!n)throw Error(t+" not found on or in passed DOM node.");return n}(e,t)}function sg(e){return!so(e,sp)&&(ss(e,sp),!0)}function sv(e,t,n,r={}){let i=(n||document).querySelectorAll(e),a=[],o,s;for(let e=0,n=i.length;e<n;e++)!1===so(s=i[e],sp)&&((o=new t(s)).init(r),a.push(o));return a}function sy(){let e=getComputedStyle(document.body).fontSize;return parseFloat(e=""===e?-1:e)}var sb="o-expandable";function sx(e){let t=sm(e,sb),n,r,i,a,o;this.init=function(){if(!sg(t))return this;n=t.querySelector(`.${sb}__header`),r=t.querySelector(`.${sb}__content`),i=t.querySelector(`.${sb}__label`);let e=t.classList.contains(`${sb}--onload-open`);ss(t,"behavior_flyout-menu"),ss(n,"behavior_flyout-menu_trigger"),ss(r,"behavior_flyout-menu_content");let s=e?si.CLASSES.MH_DEFAULT:si.CLASSES.MH_ZERO;return a=new si(r).init(s),e||r.classList.add("u-hidden"),(o=new sh(t)).setTransition(a,a.maxHeightZero,a.maxHeightDefault),o.init(e),o.addEventListener("expandbegin",()=>{r.classList.remove("u-hidden"),this.dispatchEvent("expandbegin",{target:this})}),o.addEventListener("collapseend",()=>{r.classList.add("u-hidden")}),this},this.expand=()=>o.expand(),this.collapse=()=>o.collapse(),this.isExpanded=()=>o.isExpanded(),this.refresh=()=>o.getTransition().refresh(),this.getLabelText=function(){return i.textContent.trim()};let s=new st;return this.addEventListener=s.addEventListener,this.removeEventListener=s.removeEventListener,this.dispatchEvent=s.dispatchEvent,this}sx.BASE_CLASS=sb,sx.init=e=>sv(`.${sx.BASE_CLASS}`,sx,e);var sw="o-expandable-group";function s_(e){let t=sm(e,sw),n=t.classList.contains(`${sw}--accordion`),r;function i(e){let t=e.target;r&&r!==t&&r.collapse(),r=t}return this.init=function(e){return sg(t)&&n&&e.forEach(e=>{e.addEventListener("expandbegin",i)}),this},this}s_.BASE_CLASS=sw,s_.init=e=>{(e||document).querySelectorAll(`.${sw}`).forEach(e=>{let t=sv(`.${sx.BASE_CLASS}`,sx,e);new s_(e).init(t)})};var sk="o-summary";function sS(e){let t=sm(e,sk),n=t.classList.contains(`${sk}--mobile`),r=t.querySelector(`.${sk}__content`),i=t.querySelector(`.${sk}__btn`),a,o,s;function l(){window.removeEventListener("load",l),s=!d(),ss(t,"behavior_flyout-menu"),ss(r,"behavior_flyout-menu_content"),ss(i,"behavior_flyout-menu_trigger"),o=new sh(t,!1),(a=new si(r)).init(s?si.CLASSES.MH_SUMMARY:si.CLASSES.MH_DEFAULT),o.setTransition(a,a.maxHeightSummary,a.maxHeightDefault),o.addEventListener("triggerclick",f),o.init(),h(),window.addEventListener("resize",h),"onorientationchange"in window&&window.addEventListener("orientationchange",h),t.addEventListener("focusin",c),r.addEventListener("click",u)}function c(e){s||e.target===i||(i.click(),t.removeEventListener("focusin",c))}function u(e){"A"!==e.target.tagName&&o.isExpanded()&&a.refresh()}function h(){d()?s||=(a.animateOff(),o.expand(),m(),!0):s&&=(o.collapse(),a.animateOn(),i.classList.remove("u-hidden"),!1)}function d(){let e,t;return n&&(e=!1,t=function(e){let t,n={};for(t in e||=window.innerWidth,ot)n[t]=function(e,t){let n=e.min,r=e.max;return sy()>0&&16!==sy()&&(n=n/16*sy(),r=r/16*sy()),(n||0)<=t&&t<=(r||1/0)}(ot[t],e);return n}(),!t.bpXS&&1&&1||(e=!0),!e)||r.scrollHeight<=88}function f(){o.addEventListener("expandend",p)}function p(){m(),window.removeEventListener("resize",h),window.removeEventListener("orientationchange",h),o.removeEventListener("expandend",p),o.suspend(),a.remove()}function m(){i.classList.add("u-hidden")}let g=new st;return this.addEventListener=g.addEventListener,this.removeEventListener=g.removeEventListener,this.dispatchEvent=g.dispatchEvent,this.init=function(){return sg(t)&&window.addEventListener("load",l),this},this}sS.BASE_CLASS=sk,sS.init=e=>sv(`.${sk}`,sS,e);var sM="o-summary-minimal";function sA(e){let t=sm(e,sM),n=t.querySelector(`.${sM}__content`),r=t.querySelector(`.${sM}__btn`),i,a;function o(){window.removeEventListener("load",o),a=new sh(t,!1),(i=new si(n)).init(si.CLASSES.MH_SUMMARY),a.setTransition(i,i.maxHeightSummary,i.maxHeightDefault),a.init(),t.addEventListener("focusin",s),n.addEventListener("click",l),a.collapse(),i.animateOn()}function s(e){e.target!==r&&(r.click(),t.removeEventListener("focusin",s))}function l(e){"A"!==e.target.tagName&&a.isExpanded()&&i.refresh()}let c=new st;return this.addEventListener=c.addEventListener,this.removeEventListener=c.removeEventListener,this.dispatchEvent=c.dispatchEvent,this.init=function(){return sg(t)&&(ss(t,"behavior_flyout-menu"),ss(n,"behavior_flyout-menu_content"),ss(r,"behavior_flyout-menu_trigger"),window.addEventListener("load",o)),this},this}function sT(e,t,n){let r=n?.maxSelections||5,i=[],a=[],o=[],s=[],l=-1;function c(){return a.length>=r}return this.init=function(){return i=function(e){let n,r=[],i;for(let o=0,s=e.length;o<s;o++)n=e[o],i=!c()&&n.defaultSelected,r.push({id:t+"-"+n.value.trim().replace(/\s+/g,"-").toLowerCase(),value:n.value,text:n.text,checked:i}),i&&a.push(o);return r}(e),this},this.toggleOption=function(e){return i[e].checked=!i[e].checked,a.length<r&&i[e].checked?(a.push(e),a.sort(),!0):(i[e].checked=!1,a=a.filter(function(t){return t!==e}),!1)},this.getSelectedIndices=function(){return a},this.isAtMaxSelections=c,this.filterIndices=function(e){return"[object String]"!==Object.prototype.toString.call(e)&&(e=""),s=o,i.length>0&&(o=i.reduce(function(t,n,r){var i,a;return i=e,a=n.text,RegExp(i.trim().replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&"),"i").test(a)&&t.push(r),t},[])),l=-1,o},this.clearFilter=function(){o=s=[]},this.getFilterIndices=function(){return o},this.getLastFilterIndices=function(){return s},this.getIndex=function(){return l},this.setIndex=function(e){let t=o.length,n=0===t?i.length:t;l=e<0?-1:e>=n?n-1:e},this.resetIndex=function(){return l=-1},this.getOption=function(e){return i[e]},this}function sC(e,t,n){let r=document.createElement(e);return Object.keys(n).forEach(e=>{let t=n[e];e in r?r[e]=t:r.setAttribute(e,t)}),t&&t.appendChild(r),r}sA.BASE_CLASS=sM,sA.init=e=>sv(`.${sM}`,sA,e);var sP="o-multiselect",sE="prev",sO="next",sN="Enter",sj="Escape",sL="ArrowDown",sD={renderTags:!0,maxSelections:5};function sR(e){e.classList.add(sP);let t=sm(e,sP),n=!1,r,i,a,o,s,l,c,u,h,d,f,p=[],m;function g(){f.classList.remove("u-filtered","u-no-results");for(let e=0,t=f.children.length;e<t;e++)f.children[e].classList.remove("u-filter-match");a.clearFilter()}function v(){return l.classList.add("u-active"),d.classList.remove("u-invisible"),d.setAttribute("aria-hidden",!1),m.dispatchEvent("expandbegin",{target:m}),m}function y(){return l.classList.remove("u-active"),d.classList.add("u-invisible"),d.setAttribute("aria-hidden",!0),a.resetIndex(),m.dispatchEvent("collapsebegin",{target:m}),m}function b(e){e===sO?a.setIndex(a.getIndex()+1):e===sE&&a.setIndex(a.getIndex()-1);let t=a.getIndex();if(t>-1){let e=t,r=a.getFilterIndices();r.length>0&&(e=r[t]);let i=a.getOption(e).value,o=f.querySelector('[data-option="'+i+'"]').querySelector("input");n=!0,o.focus()}else n=!1,h.focus()}function x(){h.value="",g()}function w(e){let t=e.target;"BUTTON"===t.tagName&&(e.preventDefault(),t.removeEventListener("click",w),t.querySelector("label").click())}function _(e){if(" "===e.key||e.key===sN){let t=e.target.querySelector("label");f.querySelector("#"+t.getAttribute("for")).click()}}function k(e){return r+"-"+e.value.trim().replace(/[^\w]/g,"-").toLowerCase()}function S(e,t){let n=k(t),r=sC("li",null,{"data-option":t.value}),i=sC("button",r,{type:"button",class:"a-tag-filter",innerHTML:"<label for="+n+">"+t.text+'<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" class="cf-icon-svg cf-icon-svg--error" viewBox="0 0 12 19"><path d="M11.383 13.644A1.03 1.03 0 0 1 9.928 15.1L6 11.172 2.072 15.1a1.03 1.03 0 1 1-1.455-1.456l3.928-3.928L.617 5.79a1.03 1.03 0 1 1 1.455-1.456L6 8.261l3.928-3.928a1.03 1.03 0 0 1 1.455 1.456L7.455 9.716z"/></svg></label>'});e.appendChild(r),i.addEventListener("click",w),i.addEventListener("keydown",_)}function M(e){let t=a.getOption(e)||a.getOption(a.getIndex());if(t){if(t.checked){f.classList.contains("u-max-selections")&&f.classList.remove("u-max-selections");let e='[data-option="'+t.value+'"]',n=c.querySelector(e);void 0!==n&&n&&c?.removeChild(n)}else s?.renderTags&&c&&S(c,t);a.toggleOption(e),a.isAtMaxSelections()&&f.classList.add("u-max-selections"),m.dispatchEvent("selectionsupdated",{target:m})}a.resetIndex(),n=!1,"false"===d.getAttribute("aria-hidden")&&h.focus()}function A(e){M(Number(e.target.getAttribute("data-index"))),x()}this.init=function(e=sD){if(!sg(t)||new RegExp(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i).test(navigator.userAgent))return this;if(m=this,r=t.name||t.id,i=t.getAttribute("data-placeholder"),o=t.options||[],s={...sD,...e},o.length>0){a=new sT(o,r,s).init();let e=function(){let e,n,m;(l=document.createElement("div")).className=sP,c=sC("ul",null,{className:"m-tag-group"}),u=sC("header",l,{className:"o-multiselect__header"}),h=sC("input",u,{className:"o-multiselect__search a-text-input",type:"text",placeholder:i||"Select up to five",id:t.id,autocomplete:"off"}),d=sC("fieldset",l,{className:"o-multiselect__fieldset u-invisible","aria-hidden":"true"});let g="o-multiselect__options";a.isAtMaxSelections()&&(g+=" u-max-selections"),f=sC("ul",d,{className:g});for(let t=0,i=o.length;t<i;t++){n=k(e=o[t]),m=a.getOption(t).checked;let i=sC("li",f,{"data-option":e.value,"data-cy":"multiselect-option",class:"m-form-field m-form-field--checkbox"});sC("input",i,{id:n,type:"checkbox",value:e.value,name:r,class:"a-checkbox o-multiselect__checkbox",checked:m,"data-index":t}),sC("label",i,{for:n,textContent:e.text,className:"o-multiselect__label a-label"}),p.push(i),m&&s?.renderTags&&S(c,e)}return l.insertBefore(c,u),t.parentNode.insertBefore(l,t),l.appendChild(t),l}();t.parentNode.removeChild(t),sg(t=e),function(){u.addEventListener("mousemove",function(e){let t=e.target;e.offsetX>t.offsetWidth-35?t.style.cursor="pointer":t.style.cursor="auto"}),u.addEventListener("mouseup",function(e){let t=e.target;e.offsetX>t.offsetWidth-35&&140===d.offsetHeight&&h.blur()}),h.addEventListener("input",function(){var e=this.value;g(),a.resetIndex(),a.filterIndices(e).length>0?function(){f.classList.remove("u-no-results"),f.classList.add("u-filtered");let e=a.getLastFilterIndices();for(let t=0,n=e.length;t<n;t++)p[e[t]].classList.remove("u-filter-match");e=a.getFilterIndices();for(let t=0,n=e.length;t<n;t++)p[e[t]].classList.add("u-filter-match")}():(f.classList.add("u-no-results"),f.classList.remove("u-filtered"))}),h.addEventListener("focus",function(){"true"===d.getAttribute("aria-hidden")&&v()}),h.addEventListener("blur",function(){n||"false"!==d.getAttribute("aria-hidden")||y()}),h.addEventListener("keydown",function(e){let t=e.key;"true"===d.getAttribute("aria-hidden")&&"Tab"!==t&&v(),t===sN?(e.preventDefault(),b(sO)):t===sj?(x(),y()):t===sL?b(sO):"Tab"!==t||e.shiftKey||"false"!==d.getAttribute("aria-hidden")||y()}),f.addEventListener("mousedown",function(){n=!0}),f.addEventListener("keydown",function(e){let t=e.key,n=e.target,r=n.checked;if(t===sN){e.preventDefault(),n.checked=!r;let t=new Event("change",{bubbles:!1,cancelable:!0});n.dispatchEvent(t)}else t===sj?(h.focus(),y()):"ArrowUp"===t?b(sE):t===sL&&b(sO)}),d.addEventListener("mousedown",function(e){"LABEL"===e.target.tagName&&(n=!0)});let e=f.querySelectorAll("input");for(let t=0,n=e.length;t<n;t++)e[t].addEventListener("change",A);let t=c.querySelectorAll("button");for(let e=0,n=t.length;e<n;e++)t[e].addEventListener("click",w),t[e].addEventListener("keydown",_)}()}return this},this.expand=v,this.collapse=y;let T=new st;return this.addEventListener=T.addEventListener,this.removeEventListener=T.removeEventListener,this.dispatchEvent=T.dispatchEvent,this.getModel=function(){return a},this.updateSelections=M,this.selectionClickHandler=w,this.selectionKeyDownHandler=_,this}sR.BASE_CLASS=sP,sR.init=e=>sv(`.${sP}`,sR,void 0,e),sf.init();var sI=["a-btn"],sz={primary:[],secondary:["a-btn--secondary"],warning:["a-btn--warning"]},sB={default:[],full:["a-btn--full-on-xs"]},sF=(0,b.forwardRef)(({appearance:e="primary",isLink:t=!1,size:n="default",label:r,className:i,iconLeft:a,iconRight:o,children:s,...l},c)=>{let u=[...sI,...sz[e],...sB[n]];t&&u.push("a-btn--link"),i&&u.push(i),l.disabled&&u.push("a-btn--disabled");let h=!!a,d=!!o,f=r?h||d?(0,v.jsx)("span",{children:r}):r:null;if(h&&d)throw Error("Button component: only one of iconLeft or iconRight can be provided");return(0,v.jsxs)("button",{ref:c,type:"button",className:[...u].join(" "),...l,children:[s,!!a&&(0,v.jsx)(a7,{name:a,isPresentational:!0}),f,!!o&&(0,v.jsx)(a7,{name:o,isPresentational:!0})]})});sF.displayName="Button",(my={})[my.Full=12]="Full",my[my.ThreeQuarters=9]="ThreeQuarters",my[my.TwoThirds=8]="TwoThirds",my[my.Half=6]="Half",my[my.Third=4]="Third",my[my.Quarter=3]="Quarter",my[my.Single=1]="Single",(0,v.jsx)(a9,{href:"/",label:"Link"},"1"),(0,v.jsx)(a9,{className:"nav-item active",href:"/2",label:"Link"},"2"),(0,v.jsx)(a9,{className:"nav-item",href:"/3",label:"Link"},"3"),(0,v.jsx)(sF,{appearance:"secondary",label:"Log out",onClick:()=>{}},"logout");var sH=({type:e="1",children:t,className:n,...r})=>{let i,a=[n];return"slug"===e?(a.push("m-slug-header"),(0,v.jsx)("header",{className:(0,a1.default)(a),...r,children:(0,v.jsx)("h2",{className:"m-slug-header__heading",children:t})})):("display"===e?(i="h1",a.push("superheading")):"eyebrow"===e?(i="div",a.push("h5 eyebrow")):i=`h${e}`,(0,v.jsx)(i,{...r,className:(0,a1.default)(a),children:t}))},s$=()=>null,sU=()=>(0,v.jsx)(sF,{isLink:!0,className:"m-pagination__btn-submit",id:"m-pagination__btn-submit-default",label:"Go",type:"submit"}),sV=({tableId:e,page:t,pageCount:n,onChange:r})=>{let i=`${e}-pagination_current-page`;return(0,v.jsxs)("label",{className:"m-pagination__label",htmlFor:i,children:["Page",(0,v.jsx)("span",{className:"u-visually-hidden",children:`number ${t} out`}),(0,v.jsx)("input",{className:"m-pagination__current-page",id:i,name:"page",type:"number",min:"1",max:n,pattern:"[0-9]*",inputMode:"numeric",value:t,onChange:e=>{r(Number.parseInt(e.currentTarget.value,10))}}),`of ${n}`]})},sq=({tableId:e,page:t,pageCount:n,onClickPrevious:r=s$,onClickNext:i=s$,onClickGo:a=s$,previousLabel:o="Previous",nextLabel:s="Next"})=>{let[l,c]=(0,b.useState)(t);(0,b.useEffect)(()=>c(t),[t]);let u=(0,b.useId)();return(0,v.jsxs)("nav",{className:"m-pagination",role:"navigation","aria-label":"Pagination",children:[(0,v.jsx)(sF,{iconLeft:"left",className:`m-pagination__btn-prev${1===t?" a-btn--disabled":""}`,onClick:r,label:o,disabled:1===t}),(0,v.jsx)(sF,{iconRight:"right",className:`m-pagination__btn-next${t===n?" a-btn--disabled":""}`,onClick:i,label:s,disabled:t===n}),(0,v.jsxs)("form",{className:"m-pagination__form",action:"#pagination_content",onSubmit:e=>{e.preventDefault();let n=Number.parseInt(Object.fromEntries(new FormData(e.currentTarget)).page,10);n!==t&&a(n)},children:[(0,v.jsx)(sV,{tableId:e??u,page:l,pageCount:n,onChange:c}),(0,v.jsx)(sU,{})]})]})};function sY({children:e,isLead:t,className:n,...r}){let i=[n];return t&&i.push("lead-paragraph"),(0,v.jsx)("p",{...r,className:(0,a1.default)(i),children:e})}var sW=({children:e})=>e?(0,v.jsx)("caption",{children:e}):null;(0,b.forwardRef)(({id:e,caption:t,columns:n,rows:r,isResponsive:i=!1,isScrollableHorizontal:a=!1,isStriped:o=!1,isPaginated:s=!1,startPage:l=1,perPage:c=20,className:u,divRef:h,tableRef:d,...f},p)=>{let[m,g]=(({isPaginated:e=!0,startPage:t=1,rows:n=[],perPage:r=20})=>{let i=n.length,a=Math.max(Math.ceil(i/r),1),o=e&&i>r,[s,l]=(0,b.useState)(Math.min(t,a));if((0,b.useEffect)(()=>{l(Math.min(s,a))},[s,a,r]),!e||!o)return[n,{page:1,pageCount:1,onClickNext:s$,onClickPrevious:s$,onClickGo:s$}];let c=s-1;return[n.slice(c*r,c*r+r),{page:s,pageCount:a,onClickNext:()=>l(Math.min(s+1,a)),onClickPrevious:()=>l(Math.max(c,1)),onClickGo:e=>l(e)}]})({rows:r,isPaginated:s,startPage:l,perPage:c}),y=(0,b.useId)(),x=[];i&&x.push("o-table o-table--stack-on-small"),o&&x.push("o-table--striped"),s&&x.push("u-w100pct"),u&&x.push(u);let w=(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("table",{className:(0,a1.default)(x),ref:d,id:e??y,...f,children:[(0,v.jsx)(sW,{children:t}),(0,v.jsx)("thead",{children:(0,v.jsx)("tr",{children:n.map((e,t)=>{let n,r=[""],i=`header-${t}`;return"object"==typeof e?(n=e.header,e.isAlignRight&&r.push("o-table__cell--right-align"),e.width&&r.push(`u-w${e.width}pct`),e.isHeaderWordWrap||r.push("white-space-nowrap")):n=e,(0,v.jsx)("th",{className:(0,a1.default)(r),children:n},i)})})}),(0,v.jsx)("tbody",{children:m.map((e,t)=>{let r=`row-${t}`;return(0,v.jsx)("tr",{children:e.map((e,r)=>{let i=n[r],a=`row-${t}-col-${r}`;return(0,b.createElement)("td",{...(e=>{if(!e)return{};if("string"==typeof e)return{"data-label":e};let t=[""];return e.isAlignRight&&t.push("o-table__cell--right-align"),e.isCellDisableWordWrap&&t.push("white-space-nowrap"),!e.isCellDisableWordWrap&&e.isCellWordBreak&&t.push("word-break-break-all"),{"data-label":e.header,className:(0,a1.default)(t)}})(i),key:a},e)})},r)})})]}),s?(0,v.jsx)(sq,{...g,tableId:e??y}):null]});return a?(0,v.jsx)("div",{className:"o-table o-table--scrolling",ref:p??h,children:w}):w}).displayName="Table";var sG={success:"a-text-input--success",error:"a-text-input--error",warning:"a-text-input--warning"},sX=e=>e?sG[e]??"":"";(0,b.forwardRef)(({id:e,className:t="",status:n,placeholder:r="Placeholder text",isFullWidth:i=!1,isDisabled:a=!1,onChange:o=s$,...s},l)=>(0,v.jsx)("div",{className:"m-form-field",children:(0,v.jsx)("textarea",{className:(0,a1.default)(["a-text-input",sX(n),i?"a-text-input--full":"",t||""].filter(e=>e.length)),id:e,placeholder:r,onChange:e=>{e.preventDefault(),o(e.target.value)},disabled:a,ref:l,...s})})).displayName="TextArea",(0,b.forwardRef)(({className:e,id:t,inputRef:n,isDisabled:r=!1,name:i,status:a,type:o="text",isFullWidth:s=!1,...l},c)=>{let u=["a-text-input",e,sX(a)];return s?(u.push("a-text-input--full"),(0,v.jsx)("div",{className:"m-form-field",children:(0,v.jsx)("input",{className:(0,a1.default)(u),disabled:r,id:t,name:i,type:o,ref:c,...l})})):(0,v.jsx)("input",{className:(0,a1.default)(u),disabled:r,id:t,name:i,type:o,ref:c,...l})}).displayName="TextInput";var sK=e=>e?"string"==typeof e?(0,v.jsx)(sY,{children:e}):e:null,sZ=({heading:e,subheading:t,description:n,callToAction:r,className:i,...a})=>{let o=r&&(0,v.jsx)(a4,{isLinks:!0,children:(0,b.isValidElement)(r)&&(r.type===a6||r.type===oe)?r:(0,v.jsx)(a6,{children:(0,b.cloneElement)(r,{type:"list"})})});return(0,v.jsxs)("div",{className:(0,a1.default)(["o-text-introduction",i]),...a,children:[(0,v.jsx)(sH,{type:"1",children:e}),(0,v.jsx)(sY,{isLead:!0,children:t}),sK(n),o]})};sZ.Container=({className:e,children:t,...n})=>(0,v.jsx)("div",{className:(0,a1.default)(["o-text-introduction",e]),...n,children:t}),sZ.Container,sZ.Heading=({children:e})=>(0,v.jsx)(sH,{type:"1",children:e}),sZ.Heading,sZ.Description=({children:e})=>sK(e),sZ.Description,sZ.Subheading=({children:e})=>(0,v.jsx)(sY,{isLead:!0,children:e}),sZ.Subheading,sZ.Container.displayName="TextIntroduction.Container",sZ.Heading.displayName="TextIntroduction.Heading",sZ.Description.displayName="TextIntroduction.Description",sZ.Subheading.displayName="TextIntroduction.Subheading";var sQ=({children:e,className:t="",...n})=>(0,v.jsx)("div",{className:`o-well ${t}`,...n,children:e}),sJ=i(4137),s0=i.n(sJ),s1=i(6266);let s2=e=>{let{isLoading:t}=e;return t?(0,s1.createPortal)((0,v.jsx)("section",{className:"light-box","aria-busy":"true","aria-live":"polite",children:(0,v.jsxs)("div",{className:"loading-box",children:[(0,v.jsx)(a7,{name:"updating",isPresentational:!0})," ",(0,v.jsx)("span",{children:"This page is loading"})]})}),(()=>{let e=ah();if(e instanceof ShadowRoot){let t=ac(as),n=e.querySelector("#".concat(t));return n||((n=document.createElement("div")).id=as,n.className="ccdb-ui-overlay-portal",e.appendChild(n)),n}return e instanceof HTMLElement?e:document.body})()):null};s2.propTypes={isLoading:s0().bool.isRequired};let s3=e=>e.routes.params,s5=e=>e.routes.queryString,s7=e=>{let{label:t,value:n}=e;return n?(0,v.jsxs)("div",{className:"layout-row",children:[(0,v.jsx)("span",{className:"subitem",children:t}),(0,v.jsx)("span",{children:n})]}):null};s7.propTypes={label:s0().string,value:s0().string};let s4=e=>{let{value:t}=e;return t?(0,v.jsxs)("div",{children:[(0,v.jsx)("span",{className:"cf-icon__before",children:(0,v.jsx)(a7,{name:"clock-round",isPresentational:!0})}),(0,v.jsx)("span",{children:t})]}):(0,v.jsx)("span",{children:"N/A"})};s4.propTypes={value:s0().string};let s6=e=>{let{data:t,error:n,id:r}=e;if(n)return(0,v.jsxs)(sH,{type:"1",children:["There was a problem retrieving ",r]});let i=t.complaint_what_happened||"",a=i1(r);return(0,v.jsxs)("article",{children:[(0,v.jsx)(sH,{type:"1","aria-label":"Complaint "+a,children:r}),(0,v.jsxs)("div",{className:"card",children:[(0,v.jsxs)("div",{className:"card-left layout-column",children:[(0,v.jsx)(sH,{type:"4",children:"Date CFPB received the complaint"}),(0,v.jsx)("span",{children:ib(t.date_received)}),(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Consumer’s state"}),(0,v.jsx)("span",{children:t.state}),(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Consumer’s zip"}),(0,v.jsx)("span",{children:t.zip_code}),(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Submitted via"}),(0,v.jsx)("span",{children:t.submitted_via}),t.tags&&t.tags.length?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Tags"}),(0,v.jsx)("span",{children:t.tags})]}):null]}),(0,v.jsxs)("div",{className:"card-right layout-column",children:[(0,v.jsx)(sH,{type:"4",children:"Product"}),(0,v.jsx)(sH,{type:"3",children:t.product}),(0,v.jsx)(s7,{label:"Sub-product:",value:t.sub_product}),(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Issue"}),(0,v.jsx)(sH,{type:"3",children:t.issue}),(0,v.jsx)(s7,{label:"Sub-issue:",value:t.sub_issue}),i?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Consumer complaint narrative"}),(0,v.jsx)("span",{children:i})]}):null]})]}),(0,v.jsx)(sH,{type:"2",className:"company-information",children:"Company information"}),(0,v.jsxs)("div",{className:"card",children:[(0,v.jsxs)("div",{className:"card-left layout-column",children:[(0,v.jsx)(sH,{type:"4",children:"Date complaint sent to company"}),(0,v.jsx)("span",{children:ib(t.date_sent_to_company)}),(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Company name"}),(0,v.jsx)("span",{children:t.company})]}),(0,v.jsxs)("div",{className:"card-right layout-column",children:[(0,v.jsx)(sH,{type:"4",children:"Timely response?"}),(0,v.jsx)(s4,{value:t.timely}),(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Company response to consumer"}),(0,v.jsx)("span",{children:t.company_response?t.company_response:"N/A"}),(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Company public response"}),(0,v.jsx)("span",{children:t.company_public_response?t.company_public_response:"N/A"})]})]})]})};s6.propTypes={data:s0().object,error:s0().oneOfType([s0().string,s0().object]),id:s0().string};let s9=()=>{let e=eh(),{id:t}=function(){let{matches:e}=b.useContext(es),t=e[e.length-1];return t?.params??{}}(),n=ts(s3),r=(0,b.useMemo)(()=>{if(!e)return"";let t=e.pathname,r=t.indexOf("detail");return t.substring(0,r)+"?"+i0(n)},[e,n]),{data:i,isLoading:a,error:o}=aU(t);return(0,v.jsxs)("section",{className:"card-container",children:[(0,v.jsxs)("nav",{className:"layout-row",children:[(0,v.jsx)("div",{className:"back-to-search flex-fixed",children:(0,v.jsx)(a9,{href:r,isRouterLink:!0,iconLeft:"left",label:"Back to search results"})}),(0,v.jsx)("div",{className:"meaning flex-fixed",children:(0,v.jsx)(a9,{href:iU,target:"_blank",rel:"noopener noreferrer",label:"What do all these data points mean?"})})]}),a?(0,v.jsx)(s2,{isLoading:!0}):(0,v.jsx)(s6,{data:i,error:o,id:t})]})},s8=nW({name:"view",initialState:{expandedRows:[],isPrintMode:!1,hasAdvancedSearchTips:!1,hasFilters:!0,modalTypeShown:!1,showTour:!1,tab:"Trends",width:0},reducers:{hideAdvancedSearchTips:{reducer:e=>{e.hasAdvancedSearchTips=!1}},modalHidden(e){e.modalTypeShown=!1},modalShown(e,t){e.modalTypeShown=t.payload},showAdvancedSearchTips:{reducer:e=>{e.hasAdvancedSearchTips=!0}},updatePrintModeOn(e){e.isPrintMode=!0},updatePrintModeOff(e){e.isPrintMode=!1},updateScreenSize(e,t){e.hasFilters=t.payload>749,e.width=t.payload},updateFilterVisibility:{reducer:e=>{e.hasFilters=!e.hasFilters}},tabChanged:{reducer:(e,t)=>{e.tab=av(t.payload,"tab"),e.expandedRows=[]}},tourHidden:{reducer:e=>{e.showTour=!1}},tourShown:{reducer:e=>{e.showTour=!0}},rowCollapsed:{reducer:(e,t)=>{e.expandedRows=e.expandedRows.filter(e=>e!==t.payload)}},rowExpanded:{reducer:(e,t)=>{e.expandedRows.includes(t.payload)||e.expandedRows.push(t.payload)}}},extraReducers:e=>{e.addCase("trends/dataLensChanged",e=>{e.expandedRows=[]}).addCase("trends/focusChanged",e=>{e.tab="Trends"}).addCase("routes/routeChanged",(e,t)=>{let n=t.payload.params;e.isPrintMode="true"===n.isPrintMode,e.tab=av(n.tab,"tab"),an(n,e,["expandedRows"])})}}),{hideAdvancedSearchTips:le,modalHidden:lt,modalShown:ln,processParams:lr,rowCollapsed:li,rowExpanded:la,showAdvancedSearchTips:lo,tabChanged:ls,tourHidden:ll,tourShown:lc,updateFilterVisibility:lu,updatePrintModeOff:lh,updatePrintModeOn:ld,updateScreenSize:lf}=s8.actions;var lp=s8.reducer;let lm=()=>{let e=ta();return(0,v.jsxs)("header",{className:"content__hero",children:[(0,v.jsx)(sH,{type:"1",className:"content-header",children:"Consumer Complaint Database"}),(0,v.jsxs)("ul",{className:"m-list m-list--horizontal",children:[(0,v.jsx)("li",{className:"m-list__item",children:(0,v.jsx)(sF,{label:"Things to know before you use this database",isLink:!0,onClick:()=>{e(ln(iC))}})}),(0,v.jsx)("li",{className:"m-list__item",children:(0,v.jsx)(a9,{href:iU,label:"How we use complaint data",target:"_blank",rel:"noopener noreferrer"})}),(0,v.jsx)("li",{className:"m-list__item",children:(0,v.jsx)(a9,{href:"https://cfpb.github.io/api/ccdb/",iconRight:"external-link",target:"_blank",rel:"noopener noreferrer",label:"Technical documentation"})})]})]})},lg=e=>{let{className:t="",title:n,desc:r,children:i}=e,[a,o]=(0,b.useState)(!0),s=(0,v.jsx)("span",{className:"o-expandable__cue-close",role:"img","aria-label":"Hide",children:(0,v.jsx)(a7,{name:"minus-round",isPresentational:!0})}),l=(0,v.jsx)("span",{className:"o-expandable__cue-open",role:"img","aria-label":"Show",children:(0,v.jsx)(a7,{name:"plus-round",isPresentational:!0})}),c=a?"Collapse ".concat(n," filter"):"Expand ".concat(n," filter");return(0,v.jsxs)("section",{className:"o-expandable ".concat(t),children:[(0,v.jsxs)("button",{className:"o-expandable__header","aria-expanded":a,"aria-label":c,onClick:()=>o(!a),children:[(0,v.jsx)(sH,{type:"3",className:"o-expandable__label",children:n}),(0,v.jsx)("span",{className:"o-expandable__cues",children:a?s:l})]}),a?(0,v.jsxs)("div",{className:"o-expandable__content",children:[(0,v.jsx)("p",{children:r}),i]}):null]})};lg.propTypes={className:s0().string,title:s0().string.isRequired,desc:s0().string.isRequired,children:s0().node.isRequired};let lv=nW({name:"filters",initialState:{company:[],company_public_response:[],company_response:[],issue:[],product:[],state:[],submitted_via:[],tags:[],timely:[],zip_code:[]},reducers:{filterAdded:{reducer:(e,t)=>{let{filterName:n,filterValue:r}=t.payload;"has_narrative"===n?e.has_narrative=!0:n in e?-1===e[n].indexOf(r)&&e[n].push(r):e[n]=[r]},prepare:(e,t)=>({payload:{filterName:e,filterValue:t}})},filterRemoved:{reducer:(e,t)=>{let{filterName:n,filterValue:r}=t.payload;if("has_narrative"===n)delete e.has_narrative;else if(n in e){let t=e[n].indexOf(r);-1!==t&&e[n].splice(t,1)}},prepare:(e,t)=>({payload:{filterName:e,filterValue:t}})},filtersCleared:{reducer:(e,t)=>{let n=iE.concat(iL);if(iP===t.payload){let e=n.indexOf("has_narrative");n.splice(e,1)}n.forEach(t=>{t in e&&(e[t]=[])})}},filtersReplaced:{reducer:(e,t)=>{let{filterName:n,values:r}=t.payload;e[n]=[...new Set(r)]},prepare:(e,t)=>({payload:{filterName:e,values:t}})},filterToggled:{reducer:(e,t)=>{let{filterName:n,filterValue:r}=t.payload;e[n]=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return -1===e.indexOf(t)?e.push(t):e=e.filter(function(e){return e!==t}),[...e]}(e[n],r.key)},prepare:(e,t)=>({payload:{filterName:e,filterValue:t}})},multipleFiltersAdded:{reducer:(e,t)=>{let n=t.payload.filterName,r=i3(e,n,[]);t.payload.values.forEach(e=>{-1===r.indexOf(e)&&r.push(e)}),e[n]=r},prepare:(e,t)=>({payload:{filterName:e,values:t}})},multipleFiltersRemoved:{reducer:(e,t)=>{e[t.payload.filterName]&&t.payload.values.forEach(n=>{let r=e[t.payload.filterName].indexOf(n);-1!==r&&e[t.payload.filterName].splice(r,1)})},prepare:(e,t)=>({payload:{filterName:e,values:t}})},stateFilterAdded:{reducer:(e,t)=>{let n=i3(e,"state",[]),{abbr:r}=t.payload;n.includes(r)||n.push(r),e.state=n}},stateFilterCleared:{reducer:e=>{e.state=[]}},stateFilterRemoved:{reducer:(e,t)=>{let n=i3(e,"state",[]),{abbr:r}=t.payload;e.state=n.filter(e=>e!==r)}},toggleFlagFilter:{reducer:(e,t)=>{let n=t.payload;e[n]=!e[n],e[n]||delete e[n]}}},extraReducers:e=>{e.addCase("routes/routeChanged",(e,t)=>{let{params:n}=t.payload;an(n,e,iE)}).addCase("trends/focusChanged",(e,t)=>{let{focus:n,lens:r,filterValues:i}=t.payload,a=r.toLowerCase(),o=[];"company"===a?o.push(n):i.forEach(e=>{o.push(e)}),e[a]=o}).addCase("trends/focusRemoved",(e,t)=>{e[t.payload.toLowerCase()]=[]})}}),{filterAdded:ly,filterRemoved:lb,filtersCleared:lx,filtersReplaced:lw,filterToggled:l_,multipleFiltersAdded:lk,multipleFiltersRemoved:lS,stateFilterAdded:lM,stateFilterCleared:lA,stateFilterRemoved:lT,toggleFlagFilter:lC}=lv.actions;var lP=lv.reducer;let lE=e=>{let t=iB[e];return t?"".concat(t," (").concat(e,")"):e},lO=(e,t,n,r)=>{if(!iD.includes(r))return t;let i=e.split("•"),a=i[0],o=t.includes(a),s=t.filter(t=>t!==a&&e).filter(t=>t!==e),l=[],c=n.find(e=>e.key===a);return o&&c&&c["sub_"+r+".raw"].buckets.forEach(e=>{e.key!==i[1]&&l.push(a+"•"+e.key)}),s.concat(l)},lN=e=>e.filters,lj=e=>e.filters.company,lL=e=>e.filters.state,lD=e=>e.filters.has_narrative,lR=e=>e.filters.zip_code;function lI(e,t){let n=lB(t),r=Object.keys(n).filter(e=>!["frm","page","search_after","size","sort"].includes(e)),i=Object.keys(e);return Object.assign({size:0},lz(n,r),lz(e,i))}function lz(e,t){let n={};return t.forEach(t=>{let r=e[t];Array.isArray(r)?r.length>0&&(n[t]=r):r&&(n[t]=r)}),n}function lB(e){let t={company_received_max:null==e?void 0:e.company_received_max,company_received_min:null==e?void 0:e.company_received_min,date_received_max:e.date_received_max,date_received_min:e.date_received_min,field:av(e.searchField,"searchField"),frm:void 0!==e.from?e.from:i2(e.page-1,0)*e.size,page:e.page,size:e.size,sort:e.sort};e.searchText&&(t.search_term=e.searchText),e.searchAfter&&(t.search_after=e.searchAfter);let n=Object.keys(t).reduce((e,n)=>(null===t[n]||void 0===t[n]||""===t[n]||Number.isNaN(t[n])||(e[n]=t[n]),e),{});for(let e in n)Array.isArray(n[e])&&0===n[e].length&&delete n[e];return n}let lF=e=>e.query,lH=e=>e.query.company_received_max,l$=e=>e.query.company_received_min,lU=e=>e.query.dateLastIndexed,lV=e=>e.query.date_received_max,lq=e=>e.query.date_received_min,lY=e=>e.query.dateRange,lW=e=>e.query.page,lG=e=>e.query.searchField,lX=e=>e.query.searchText,lK=e=>e.query.size,lZ=e=>e.query.sort,lQ=e=>e.query.dateInterval,lJ=e=>e.query.trendsDateWarningEnabled,l0=()=>{let e=ts(lN),t=ts(lF),n=ts(s5),r=ts(lU);return a$(lI(e,t),{skip:i5([!r,""===n])})},l1=e=>{let{fieldName:t,item:n}=e,{data:r,isSuccess:i,error:a}=l0(),o=ts(lN),s=ta(),l=i3(r,t,[]),c=i3(o,t,[]);if(!i||!l||a)return null;let u=c.includes(n.key)||c.includes(n.key.split("•")[0]),h=n.value||n.key,d=i7(t+"-"+n.key);return(0,v.jsxs)("li",{className:"layout-row m-form-field m-form-field--checkbox",children:[(0,v.jsx)("input",{type:"checkbox",className:"flex-fixed a-checkbox","aria-label":n.key,disabled:n.isDisabled,checked:u,id:d,onChange:()=>{if(u)if(iD.includes(t)){let e=lO(n.key,c,l,t);s(lw(t,e))}else s(l_(t,n));else if(n.key.indexOf("•")>-1&&iD.includes(t)){let e=(e=>{let{fieldName:t,item:n,aggs:r,filters:i}=e,[a,o]=n.key.split("•"),s=r.find(e=>e.key===a)["sub_"+t+".raw"].buckets.map(e=>e.key).sort(),l=a+"•",c=i.filter(e=>e.indexOf(l)>-1).map(e=>e.replace(l,""));return(c.push(o),c.sort(),((e,t)=>{let n=e.length;if(n!==t.length)return!1;for(;n--;)if(e[n]!==t[n])return!1;return!0})(c,s))?i.filter(e=>-1===e.indexOf(l)).concat(a):i.concat(n.key)})({fieldName:t,item:n,aggs:l,filters:c});s(lw(t,e))}else s(l_(t,n))}}),(0,v.jsx)("label",{className:"a-label flex-all bucket-key",htmlFor:d,children:h}),(0,v.jsx)("span",{className:"flex-fixed bucket-count",children:n.doc_count.toLocaleString()})]})};l1.propTypes={fieldName:s0().string.isRequired,item:s0().shape({doc_count:s0().number.isRequired,key:s0().string.isRequired,value:s0().string,isDisabled:s0().bool}).isRequired};let l2=e=>{let{fieldName:t,options:n,selections:r,getLabel:i}=e,a=n.reduce((e,t)=>{if(r.includes(t.key)){let n=i?i(t.key):t.value;e.push(iV(tu({},t),{value:n}))}return e},[]);return r.forEach(e=>{a.some(t=>t.key===e)||a.push({key:e,value:i?i(e):e,doc_count:0})}),(0,v.jsx)("ul",{children:a.map(e=>(0,v.jsx)(l1,{item:e,fieldName:t},e.key))})};l2.propTypes={fieldName:s0().string.isRequired,options:s0().array.isRequired,selections:s0().array,getLabel:s0().func};let l3=e=>e.trends,l5=e=>e.trends.chartType,l7=e=>e.trends.focus,l4=e=>e.trends.lens,l6=e=>e.trends.subLens,l9=e=>e.trends.tooltip;function l8(){return(l8=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}function ce(e){return(ce="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})(e)}function ct(e){var t=function(e,t){if("object"!=ce(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ce(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ce(t)?t:t+""}function cn(e,t,n){return(t=ct(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cr(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function ci(e,t){if(null==e)return{};var n,r,i=cr(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&({}).propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var ca=i(2026),co=i.n(ca),cs="label",cl=i(1792),cc=i.n(cl);function cu(e){return"string"==typeof e?e:cs}function ch(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var cd=0;function cf(e){return"function"==typeof e}function cp(e){return"string"==typeof e}function cm(){}function cg(e,t){var n={};return t.forEach(function(t){n[t]=e[t]}),n}var cv=function(e,t){var n;return!cp(e)&&(ch(e,"paginationOption")||ch(e,"customOption"))?e[cu(t)]:(n=cf(t)?t(e):cp(e)?e:e[t],cp(n)||cc()(!1),n)},cy=function(e,t){var n=t.allowNew,r=t.labelKey,i=t.text;return!!n&&!!i.trim()&&(cf(n)?n(e,t):!e.some(function(e){return cv(e,r)===i}))},cb=i(6310),cx=i.n(cb);function cw(e,t){if(!cp(e))return e[t]}var c_=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹÐ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"OE",letters:"Œ"},{base:"oe",letters:"œ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}].reduce(function(e,t){var n=t.base;return t.letters.split("").forEach(function(t){e[t]=n}),e},{});function ck(e){return e.normalize("NFD").replace(RegExp("[".concat("̀-ͯ").concat("゙゚","]"),"g"),"").replace(/[^\u0000-\u007E]/g,function(e){return c_[e]||e})}var cS=i(5132),cM=i.n(cS),cA={};function cT(e,t){if(!e&&-1!==t.indexOf("deprecated")){if(cA[t])return;cA[t]=!0}for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];cM().apply(void 0,[e,"[react-bootstrap-typeahead] ".concat(t)].concat(r))}function cC(e,t,n){var r=e,i=t;return n.caseSensitive||(r=r.toLowerCase(),i=i.toLowerCase()),n.ignoreDiacritics&&(r=ck(r),i=ck(i)),-1!==i.indexOf(r)}function cP(e,t){var n=t.filterBy,r=t.labelKey,i=t.multiple,a=t.selected,o=t.text;if(i&&a.some(function(t){return cx()(t,e)}))return!1;if(cf(r))return cC(o,r(e),t);var s=n.slice();return(cp(r)&&-1===s.indexOf(r)&&s.unshift(r),cp(e))?(cT(s.length<=1,"You cannot filter by properties when `option` is a string."),cC(o,e,t)):s.some(function(n){var r=cw(e,n);return cp(r)||(cT(!1,"Fields passed to `filterBy` should have string values. Value will be converted to a string; results may be unexpected."),r=String(r)),cC(o,r,t)})}function cE(e){return null!=e.selectionStart}var cO=/[\u0300-\u036F]/;function cN(e,t){var n,r=RegExp(("string"!=typeof(n=ck(t))&&cc()(!1),n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")),"i").exec(ck(e));if(!r)return null;var i=r.index,a=r[0].length;if(cO.test(e)){for(var o=0;o<=i;o++)cO.test(e[o])&&(i+=1);for(var s=i;s<=i+a;s++)cO.test(e[s])&&(a+=1)}return{end:i+a,start:i}}var cj=function(e){var t=e.activeIndex,n=e.initialItem,r=e.isFocused,i=e.isMenuShown,a=e.labelKey,o=e.multiple,s=e.selected,l=e.text;if(!l||!r||!i||!n||!cp(n)&&ch(n,"customOption")||!cp(n)&&n.disabled||t>-1||s.length&&!o)return"";var c=cv(n,a),u=cN(c.toLowerCase(),l.toLowerCase());return u&&0===u.start?l+c.slice(u.end,c.length):""},cL=i(7721),cD=i.n(cL);function cR(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return"".concat(e,"-item-").concat(t)}var cI=["activeIndex","id","isFocused","isMenuShown","multiple","onClick","onFocus","placeholder"];function cz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cz(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var cF=function(e){var t=e.activeIndex,n=e.id,r=e.isFocused,i=e.isMenuShown,a=e.multiple,o=e.onClick,s=e.onFocus,l=e.placeholder,c=ci(e,cI);return function(){var e,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},h=ch(u,"className")?String(u.className):void 0;return cB(cB(cB(cB({autoComplete:"off",placeholder:l,type:"text"},u),c),{},{"aria-activedescendant":t>=0?cR(n,t):void 0,"aria-autocomplete":"both","aria-expanded":i,"aria-haspopup":"listbox","aria-multiselectable":a||void 0,"aria-owns":i?n:void 0,className:cD()((cn(e={},h||"",!a),cn(e,"focus",r),e))},a&&{inputClassName:h}),{},{onClick:o,onFocus:s,role:"combobox"})}},cH=function(e){var t=e.activeItem,n=e.labelKey,r=e.multiple,i=e.selected,a=e.text;return t?cv(t,n):!r&&i.length&&i[0]?cv(i[0],n):a},c$=function(e){var t=e.allowNew,n=e.highlightOnlyResult,r=e.results;return!!n&&!t&&1===r.length&&!cw(r[0],"disabled")};function cU(e,t,n){for(var r,i=e;(r=n[i])&&cw(r,"disabled");)i+="ArrowUp"===t?-1:1;return i}function cV(e){e.preventDefault()}var cq=["className","isInvalid","isValid","size"];function cY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cY(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cG(e){var t=e.className,n=e.isInvalid,r=e.isValid,i=e.size;return cW(cW({},ci(e,cq)),{},{className:cD()("form-control","rbt-input",{"form-control-lg":"lg"===i,"form-control-sm":"sm"===i,"is-invalid":n,"is-valid":r},t)})}var cX=[{alt:"onBlur",prop:"onBlur"},{alt:"onInputChange",prop:"onChange"},{alt:"onFocus",prop:"onFocus"},{alt:"onKeyDown",prop:"onKeyDown"}],cK=s0().oneOf(["lg","sm"]);function cZ(e,t){return function(n,r,i){s0().checkPropTypes(cn({},r,e),n,"prop",i),cf(t)&&t(n,r,i)}}function cQ(e,t,n){cT(null!=e[t],"The prop `".concat(t,"` is required to make `").concat(n,"` ")+"accessible for users of assistive technologies such as screen readers.")}var cJ=s0().oneOfType([s0().object,s0().string]),c0=["allowNew","delay","emptyLabel","isLoading","minLength","onInputChange","onSearch","options","promptText","searchText","useCache"];function c1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c1(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c1(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c3(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function c5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ct(r.key),r)}}function c7(e,t,n){return t&&c5(e.prototype,t),n&&c5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c4(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c6(e,t){return(c6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function c9(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c6(e,t)}function c8(e,t){if(t&&("object"==ce(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return c4(e)}function ue(e){return(ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}s0().number,s0().bool.isRequired,s0().number,s0().func.isRequired,s0().arrayOf(cJ),s0().node,s0().node,s0().bool;var ut=(0,b.createContext)({activeIndex:-1,hintText:"",id:"",initialItem:null,inputNode:null,isOnlyResult:!1,onActiveItemChange:cm,onAdd:cm,onInitialItemChange:cm,onMenuItemClick:cm,setItem:cm}),un=function(){return(0,b.useContext)(ut)};function ur(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ui(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ur(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ur(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ua=["activeIndex","disabled","id","inputRef","isFocused","isMenuShown","multiple","onBlur","onChange","onClick","onFocus","onKeyDown","placeholder"],uo=["activeIndex","hideMenu","isMenuShown","labelKey","onClear","onHide","onRemove","results","selected","text","toggleMenu"],us=["activeIndex","id","initialItem","inputNode","onActiveItemChange","onAdd","onInitialItemChange","onMenuItemClick","setItem"],ul=function(e){var t=e.allowNew,n=e.children,r=e.initialItem,i=e.isMenuShown,a=e.onAdd,o=e.onInitialItemChange,s=e.onKeyDown,l=e.onMenuToggle,c=e.results,u=e.selectHint,h=cj(e);(0,b.useEffect)(function(){t||c.length||o()});var d=(0,b.useRef)(!0);(0,b.useEffect)(function(){if(d.current){d.current=!1;return}l(i)},[i,l]);var f=ui(ui({},cg(e,uo)),{},{getInputProps:cF(ui(ui({},cg(e,ua)),{},{onKeyDown:function(t){if(s(t),r){var n,i="Enter"===t.key&&c$(e),o=h&&(n=!1,"ArrowRight"===t.key&&(n=!cE(t.currentTarget)||t.currentTarget.selectionStart===t.currentTarget.value.length),"Tab"===t.key&&(t.preventDefault(),n=!0),u?u(n,t):n);(i||o)&&a(r)}},value:cH(e)}))}),p=ui(ui({},cg(e,us)),{},{hintText:h,isOnlyResult:c$(e)});return b.createElement(ut.Provider,{value:p},cf(n)?n(f):n)};function uc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uc(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function uh(e){var t=e.defaultInputValue,n=e.defaultOpen,r=e.defaultSelected,i=e.maxResults,a=e.multiple,o=e.selected?e.selected.slice():r.slice(),s=t;return!a&&o.length&&(s=cv(o[0],e.labelKey),o.length>1&&(o=o.slice(0,1))),{activeIndex:-1,activeItem:void 0,initialItem:void 0,isFocused:!1,selected:o,showMenu:n,shownResults:i,text:s}}function ud(e,t){return uu(uu({},uh(t)),{},{isFocused:e.isFocused,selected:[],text:""})}function uf(e){return uu(uu({},e),{},{isFocused:!0,showMenu:!0})}function up(e,t){var n=uh(t),r=n.activeIndex,i=n.activeItem,a=n.initialItem,o=n.shownResults;return uu(uu({},e),{},{activeIndex:r,activeItem:i,initialItem:a,showMenu:!1,shownResults:o})}function um(e,t){return e.showMenu?up(e,t):uu(uu({},e),{},{showMenu:!0})}var ug=["onChange"];function uv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uv(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ub={allowNew:s0().oneOfType([s0().bool,s0().func]),autoFocus:s0().bool,caseSensitive:cZ(s0().bool,function(e){var t=e.caseSensitive,n=e.filterBy;cT(!t||"function"!=typeof n,"Your `filterBy` function will override the `caseSensitive` prop.")}),defaultInputValue:cZ(s0().string,function(e){var t=e.defaultInputValue,n=e.defaultSelected,r=e.multiple,i=e.selected,a=n.length?"defaultSelected":"selected";cT(!(!r&&t&&(n.length||i&&i.length)),"`defaultInputValue` will be overridden by the value from `".concat(a,"`."))}),defaultOpen:s0().bool,defaultSelected:cZ(s0().arrayOf(cJ),function(e){var t=e.defaultSelected;cT(e.multiple||t.length<=1,"You are passing multiple options to the `defaultSelected` prop of a Typeahead in single-select mode. The selections will be truncated to a single selection.")}),filterBy:s0().oneOfType([s0().arrayOf(s0().string.isRequired),s0().func]),highlightOnlyResult:cZ(s0().bool,function(e){var t=e.allowNew;cT(!(e.highlightOnlyResult&&t),"`highlightOnlyResult` will not work with `allowNew`.")}),id:cZ(s0().oneOfType([s0().number,s0().string]),cQ),ignoreDiacritics:cZ(s0().bool,function(e){var t=e.filterBy;cT(e.ignoreDiacritics||"function"!=typeof t,"Your `filterBy` function will override the `ignoreDiacritics` prop.")}),labelKey:cZ(s0().oneOfType([s0().string,s0().func]),function(e){var t=e.allowNew;cT(!(cf(e.labelKey)&&t),"`labelKey` must be a string when `allowNew={true}`.")}),maxResults:s0().number,minLength:s0().number,multiple:s0().bool,onBlur:s0().func,onChange:s0().func,onFocus:s0().func,onInputChange:s0().func,onKeyDown:s0().func,onMenuToggle:s0().func,onPaginate:s0().func,open:s0().bool,options:s0().arrayOf(cJ).isRequired,paginate:s0().bool,selected:cZ(s0().arrayOf(cJ),function(e){var t=e.multiple,n=e.onChange,r=e.selected;cT(t||!r||r.length<=1,"You are passing multiple options to the `selected` prop of a Typeahead in single-select mode. This may lead to unexpected behaviors or errors."),cT(!r||r&&cf(n),"You provided a `selected` prop without an `onChange` handler. If you want the typeahead to be uncontrolled, use `defaultSelected`. Otherwise, set `onChange`.")})},ux=function(e){c9(r,e);var t,n=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=ue(r);return e=t?Reflect.construct(n,arguments,ue(this).constructor):n.apply(this,arguments),c8(this,e)});function r(){var e;c3(this,r);for(var t=arguments.length,i=Array(t),a=0;a<t;a++)i[a]=arguments[a];return cn(c4(e=n.call.apply(n,[this].concat(i))),"state",uh(e.props)),cn(c4(e),"inputNode",null),cn(c4(e),"isMenuShown",!1),cn(c4(e),"items",[]),cn(c4(e),"blur",function(){e.inputNode&&e.inputNode.blur(),e.hideMenu()}),cn(c4(e),"clear",function(){e.setState(ud)}),cn(c4(e),"focus",function(){e.inputNode&&e.inputNode.focus()}),cn(c4(e),"getInput",function(){return e.inputNode}),cn(c4(e),"inputRef",function(t){e.inputNode=t}),cn(c4(e),"setItem",function(t,n){e.items[n]=t}),cn(c4(e),"hideMenu",function(){e.setState(up)}),cn(c4(e),"toggleMenu",function(){e.setState(um)}),cn(c4(e),"_handleActiveIndexChange",function(t){e.setState(function(e){return{activeIndex:t,activeItem:t>=0?e.activeItem:void 0}})}),cn(c4(e),"_handleActiveItemChange",function(t){cx()(t,e.state.activeItem)||e.setState({activeItem:t})}),cn(c4(e),"_handleBlur",function(t){t.persist(),e.setState({isFocused:!1},function(){return e.props.onBlur(t)})}),cn(c4(e),"_handleChange",function(t){e.props.onChange&&e.props.onChange(t)}),cn(c4(e),"_handleClear",function(){var t,n,r;e.inputNode&&(t=e.inputNode,(n=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))&&n.set&&n.set.call(t,""),r=new Event("input",{bubbles:!0}),t.dispatchEvent(r)),e.setState(ud,function(){e.props.multiple&&e._handleChange([])})}),cn(c4(e),"_handleClick",function(t){t.persist();var n,r=null==(n=e.props.inputProps)?void 0:n.onClick;e.setState(uf,function(){return cf(r)&&r(t)})}),cn(c4(e),"_handleFocus",function(t){t.persist(),e.setState(uf,function(){return e.props.onFocus(t)})}),cn(c4(e),"_handleInitialItemChange",function(t){cx()(t,e.state.initialItem)||e.setState({initialItem:t})}),cn(c4(e),"_handleInputChange",function(t){t.persist();var n=t.currentTarget.value,r=e.props,i=r.multiple,a=r.onInputChange,o=e.state.selected.length&&!i;e.setState(function(e,t){var r=uh(t),i=r.activeIndex,a=r.activeItem,s=r.shownResults;return{activeIndex:i,activeItem:a,selected:o?[]:e.selected,showMenu:!0,shownResults:s,text:n}},function(){a(n,t),o&&e._handleChange([])})}),cn(c4(e),"_handleKeyDown",function(t){var n,r,i,a,o=e.state.activeItem;if(!e.isMenuShown){("ArrowUp"===t.key||"ArrowDown"===t.key)&&e.setState({showMenu:!0}),e.props.onKeyDown(t);return}switch(t.key){case"ArrowUp":case"ArrowDown":t.preventDefault(),e._handleActiveIndexChange((n=e.state.activeIndex,r=t.key,i=e.items,(a=cU(a=n+("ArrowUp"===r?-1:1),r,i))===i.length?a=-1:-2===a&&(a=cU(a=i.length-1,r,i)),a));break;case"Enter":t.preventDefault(),o&&e._handleMenuItemSelect(o,t);break;case"Escape":case"Tab":e.hideMenu()}e.props.onKeyDown(t)}),cn(c4(e),"_handleMenuItemSelect",function(t,n){cw(t,"paginationOption")?e._handlePaginate(n):e._handleSelectionAdd(t)}),cn(c4(e),"_handlePaginate",function(t){t.persist(),e.setState(function(e,t){return{shownResults:e.shownResults+t.maxResults}},function(){return e.props.onPaginate(t,e.state.shownResults)})}),cn(c4(e),"_handleSelectionAdd",function(t){var n,r,i=e.props,a=i.multiple,o=i.labelKey,s=t;!cp(s)&&s.customOption&&(s=uy(uy({},s),{},{id:(cd+=1,String("new-id-")+cd)})),a?(n=e.state.selected.concat(s),r=""):(n=[s],r=cv(s,o)),e.setState(function(e,t){return uy(uy({},up(e,t)),{},{initialItem:s,selected:n,text:r})},function(){return e._handleChange(n)})}),cn(c4(e),"_handleSelectionRemove",function(t){var n=e.state.selected.filter(function(e){return!cx()(e,t)});e.focus(),e.setState(function(e,t){return uy(uy({},up(e,t)),{},{selected:n})},function(){return e._handleChange(n)})}),e}return c7(r,[{key:"componentDidMount",value:function(){this.props.autoFocus&&this.focus()}},{key:"componentDidUpdate",value:function(e,t){var n,r,i,a,o,s=this.props,l=s.labelKey,c=s.multiple,u=s.selected;n=e.selected,(o=!u&&n)?(r="uncontrolled",i="controlled",a="an"):(r="controlled",i="uncontrolled",a="a"),cT(!(o||u&&!n),"You are changing ".concat(a," ").concat(r," typeahead to be ").concat(i,". ")+"Input elements should not switch from ".concat(r," to ").concat(i," (or vice versa). ")+"Decide between using a controlled or uncontrolled element for the lifetime of the component."),u&&!cx()(u,t.selected)&&(this.setState({selected:u}),c||this.setState({text:u.length?cv(u[0],l):""}))}},{key:"render",value:function(){var e=this.props,t=uy(uy({},(e.onChange,ci(e,ug))),this.state),n=t.filterBy,r=t.labelKey,i=t.options,a=t.paginate,o=t.shownResults,s=t.text;this.isMenuShown=(c=t.open,u=t.minLength,h=t.showMenu,d=t.text,c||!1===c?c:!(d.length<u)&&h),this.items=[];var l=[];if(this.isMenuShown){var c,u,h,d,f,p,m=cf(n)?n:cP;l=i.filter(function(e){return m(e,t)});var g=a&&l.length>o;f=l,cy(l=o&&!(o>=f.length)?f.slice(0,o):f,t)&&l.push(cn({customOption:!0},cu(r),s)),g&&l.push((cn(p={},cu(r),""),cn(p,"paginationOption",!0),p))}return b.createElement(ul,l8({},t,{hideMenu:this.hideMenu,inputNode:this.inputNode,inputRef:this.inputRef,isMenuShown:this.isMenuShown,onActiveItemChange:this._handleActiveItemChange,onAdd:this._handleSelectionAdd,onBlur:this._handleBlur,onChange:this._handleInputChange,onClear:this._handleClear,onClick:this._handleClick,onFocus:this._handleFocus,onHide:this.hideMenu,onInitialItemChange:this._handleInitialItemChange,onKeyDown:this._handleKeyDown,onMenuItemClick:this._handleMenuItemSelect,onRemove:this._handleSelectionRemove,results:l,setItem:this.setItem,toggleMenu:this.toggleMenu}))}}]),r}(b.Component);cn(ux,"propTypes",ub),cn(ux,"defaultProps",{allowNew:!1,autoFocus:!1,caseSensitive:!1,defaultInputValue:"",defaultOpen:!1,defaultSelected:[],filterBy:[],highlightOnlyResult:!1,ignoreDiacritics:!0,labelKey:cs,maxResults:100,minLength:0,multiple:!1,onBlur:cm,onFocus:cm,onInputChange:cm,onKeyDown:cm,onMenuToggle:cm,onPaginate:cm,paginate:!0});var uw=["className","label","onClick","onKeyDown","size"],u_={label:s0().string,onClick:s0().func,onKeyDown:s0().func,size:cK},uk=function(e){var t=e.className,n=e.label,r=void 0===n?"Clear":n,i=e.onClick,a=e.onKeyDown,o=e.size,s=ci(e,uw);return b.createElement("button",l8({},s,{"aria-label":r,className:cD()("close","btn-close","rbt-close",{"rbt-close-lg":"lg"===o,"rbt-close-sm":"sm"===o},t),onClick:function(e){e.stopPropagation(),i&&i(e)},onKeyDown:function(e){"Backspace"===e.key&&e.preventDefault(),a&&a(e)},type:"button"}),b.createElement("span",{"aria-hidden":"true",className:"rbt-close-content"},"×"),b.createElement("span",{className:"sr-only visually-hidden"},r))};uk.propTypes=u_;var uS={label:s0().string},uM=function(e){var t=e.label;return b.createElement("div",{className:"rbt-loader spinner-border spinner-border-sm",role:"status"},b.createElement("span",{className:"sr-only visually-hidden"},void 0===t?"Loading...":t))};function uA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function uT(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return uA(e,t);var n=({}).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)?uA(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}uM.propTypes=uS;let uC=Math.min,uP=Math.max,uE=Math.round,uO=Math.floor,uN=e=>({x:e,y:e}),uj={left:"right",right:"left",bottom:"top",top:"bottom"};function uL(e,t){return"function"==typeof e?e(t):e}function uD(e){return e.split("-")[0]}function uR(e){return e.split("-")[1]}function uI(e){return"y"===e?"height":"width"}function uz(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function uB(e){return"x"===uz(e)?"y":"x"}function uF(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let uH=["left","right"],u$=["right","left"],uU=["top","bottom"],uV=["bottom","top"];function uq(e){let t=uD(e);return uj[t]+e.slice(t.length)}function uY(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function uW(e,t,n){let r,{reference:i,floating:a}=e,o=uz(t),s=uB(t),l=uI(s),c=uD(t),u=i.x+i.width/2-a.width/2,h=i.y+i.height/2-a.height/2,d=i[l]/2-a[l]/2;switch(c){case"top":r={x:u,y:i.y-a.height};break;case"bottom":r={x:u,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:h};break;case"left":r={x:i.x-a.width,y:h};break;default:r={x:i.x,y:i.y}}let f=uR(t);return f&&(r[s]+=d*("end"===f?1:-1)*(n&&"y"===o?-1:1)),r}async function uG(e,t){var n,r,i,a,o;void 0===t&&(t={});let{x:s,y:l,platform:c,rects:u,elements:h,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:g=!1,padding:v=0}=uL(t,e),y="number"!=typeof v?{top:null!=(r=v.top)?r:0,right:null!=(i=v.right)?i:0,bottom:null!=(a=v.bottom)?a:0,left:null!=(o=v.left)?o:0}:{top:v,right:v,bottom:v,left:v},b=h[g?"floating"===m?"reference":"floating":m],x=uY(await c.getClippingRect({element:null==(n=await (null==c.isElement?void 0:c.isElement(b)))||n?b:b.contextElement||await (null==c.getDocumentElement?void 0:c.getDocumentElement(h.floating)),boundary:f,rootBoundary:p,strategy:d})),w="floating"===m?{x:s,y:l,width:u.floating.width,height:u.floating.height}:u.reference,_=await (null==c.getOffsetParent?void 0:c.getOffsetParent(h.floating)),k=await (null==c.isElement?void 0:c.isElement(_))&&await (null==c.getScale?void 0:c.getScale(_))||{x:1,y:1},S=uY(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:w,offsetParent:_,strategy:d}):w);return{top:(x.top-S.top+y.top)/k.y,bottom:(S.bottom-x.bottom+y.bottom)/k.y,left:(x.left-S.left+y.left)/k.x,right:(S.right-x.right+y.right)/k.x}}let uX=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:uG},l=await (null==o.isRTL?void 0:o.isRTL(t)),c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=uW(c,r,l),d=r,f=0,p={};for(let n=0;n<a.length;n++){let m=a[n];if(!m)continue;let{name:g,fn:v}=m,{x:y,y:b,data:x,reset:w}=await v({x:u,y:h,initialPlacement:r,placement:d,strategy:i,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=y?y:u,h=null!=b?b:h,p[g]={...p[g],...x},w&&f<50&&(f++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(c=!0===w.rects?await o.getElementRects({reference:e,floating:t,strategy:i}):w.rects),{x:u,y:h}=uW(c,d,l)),n=-1)}return{x:u,y:h,placement:d,strategy:i,middlewareData:p}};function uK(){return"u">typeof window}function uZ(e){return u0(e)?(e.nodeName||"").toLowerCase():"#document"}function uQ(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function uJ(e){var t;return null==(t=(u0(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function u0(e){return!!uK()&&(e instanceof Node||e instanceof uQ(e).Node)}function u1(e){return!!uK()&&(e instanceof Element||e instanceof uQ(e).Element)}function u2(e){return!!uK()&&(e instanceof HTMLElement||e instanceof uQ(e).HTMLElement)}function u3(e){return!(!uK()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof uQ(e).ShadowRoot)}function u5(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=hn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==i&&"contents"!==i}function u7(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let u4=/transform|translate|scale|rotate|perspective|filter/,u6=/paint|layout|strict|content/,u9=e=>!!e&&"none"!==e;function u8(e){let t=u1(e)?hn(e):e;return u9(t.transform)||u9(t.translate)||u9(t.scale)||u9(t.rotate)||u9(t.perspective)||!he()&&(u9(t.backdropFilter)||u9(t.filter))||u4.test(t.willChange||"")||u6.test(t.contain||"")}function he(){return null==e&&(e="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),e}function ht(e){return/^(html|body|#document)$/.test(uZ(e))}function hn(e){return uQ(e).getComputedStyle(e)}function hr(e){return u1(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if("html"===uZ(e))return e;let t=e.assignedSlot||e.parentNode||u3(e)&&e.host||uJ(e);return u3(t)?t.host:t}function ha(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let i=function e(t){let n=hi(t);return ht(n)?(t.ownerDocument||t).body:u2(n)&&u5(n)?n:e(n)}(e),a=i===(null==(r=e.ownerDocument)?void 0:r.body),o=uQ(i);if(!a)return t.concat(i,ha(i,[],n));{let e=ho(o);return t.concat(o,o.visualViewport||[],u5(i)?i:[],e&&n?ha(e):[])}}function ho(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function hs(e){let t=hn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=u2(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=uE(n)!==a||uE(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function hl(e){return u1(e)?e:e.contextElement}function hc(e){let t=hl(e);if(!u2(t))return uN(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=hs(t),o=(a?uE(n.width):n.width)/r,s=(a?uE(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}let hu=uN(0);function hh(e){let t=uQ(e);return he()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:hu}function hd(e,t,n,r){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let a=e.getBoundingClientRect(),o=hl(e),s=uN(1);t&&(r?u1(r)&&(s=hc(r)):s=hc(e));let l=(void 0===(i=n)&&(i=!1),r&&i&&r===uQ(o))?hh(o):uN(0),c=(a.left+l.x)/s.x,u=(a.top+l.y)/s.y,h=a.width/s.x,d=a.height/s.y;if(o&&r){let e=uQ(o),t=u1(r)?uQ(r):r,n=e,i=ho(n);for(;i&&t!==n;){let e=hc(i),t=i.getBoundingClientRect(),r=hn(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,u*=e.y,h*=e.x,d*=e.y,c+=a,u+=o,i=ho(n=uQ(i))}}return uY({width:h,height:d,x:c,y:u})}function hf(e,t){let n=hr(e).scrollLeft;return t?t.left+n:hd(uJ(e)).left+n}function hp(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-hf(e,n),y:n.top+t.scrollTop}}function hm(e,t,n){var r;let i;if("viewport"===t||"layoutViewport"===t)i=function(e,t,n){void 0===n&&(n="viewport");let r="layoutViewport"===n,i=uQ(e),a=uJ(e),o=i.visualViewport,s=a.clientWidth,l=a.clientHeight,c=0,u=0;if(o){let e=!he()||"fixed"===t;r?e||(c=-o.offsetLeft,u=-o.offsetTop):(s=o.width,l=o.height,e&&(c=o.offsetLeft,u=o.offsetTop))}if(0>=hf(a)){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o="stable both-edges"===getComputedStyle(a).scrollbarGutter?i/2:i;o<=25&&(s-=o)}return{width:s,height:l,x:c,y:u}}(e,n,t);else if("document"===t){let t,n,a,o,s,l;t=hr(r=uJ(e)),n=r.ownerDocument.body,a=uP(r.scrollWidth,r.clientWidth,n.scrollWidth,n.clientWidth),o=uP(r.scrollHeight,r.clientHeight,n.scrollHeight,n.clientHeight),s=-t.scrollLeft+hf(r),l=-t.scrollTop,"rtl"===hn(n).direction&&(s+=uP(r.clientWidth,n.clientWidth)-a),i={width:a,height:o,x:s,y:l}}else if(u1(t)){let e,r,a,o,s,l;r=(e=hd(t,!0,"fixed"===n)).top+t.clientTop,a=e.left+t.clientLeft,o=hc(t),s=t.clientWidth*o.x,l=t.clientHeight*o.y,i={width:s,height:l,x:a*o.x,y:r*o.y}}else{let n=hh(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return uY(i)}function hg(e){return"static"===hn(e).position}function hv(e,t){if(!u2(e)||"fixed"===hn(e).position)return null;if(t)return t(e);let n=e.offsetParent;return uJ(e)===n&&(n=n.ownerDocument.body),n}function hy(e,t){var n;let r=uQ(e);if(u7(e))return r;if(!u2(e)){let t=hi(e);for(;t&&!ht(t);){if(u1(t)&&!hg(t))return t;t=hi(t)}return r}let i=hv(e,t);for(;i&&(n=i,/^(table|td|th)$/.test(uZ(n)))&&hg(i);)i=hv(i,t);return i&&ht(i)&&hg(i)&&!u8(i)?r:i||function(e){let t=hi(e);for(;u2(t)&&!ht(t);){if(u8(t))return t;if(u7(t))break;t=hi(t)}return null}(e)||r}let hb=async function(e){let t=this.getOffsetParent||hy,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=u2(t),i=uJ(t),a="fixed"===n,o=hd(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=uN(0);if((r||!a)&&(("body"!==uZ(t)||u5(i))&&(s=hr(t)),r)){let e=hd(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}!r&&i&&(l.x=hf(i));let c=!i||r||a?uN(0):hp(i,s);return{x:o.left+s.scrollLeft-l.x-c.x,y:o.top+s.scrollTop-l.y-c.y,width:o.width,height:o.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},hx={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a="fixed"===i,o=uJ(r),s=!!t&&u7(t.floating);if(r===o||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=uN(1),u=uN(0),h=u2(r);if((h||!a)&&(("body"!==uZ(r)||u5(o))&&(l=hr(r)),h)){let e=hd(r);c=hc(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let d=!o||h||a?uN(0):hp(o,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}},getDocumentElement:uJ,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[..."clippingAncestors"===n?u7(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=ha(e,[],!1).filter(e=>u1(e)&&"body"!==uZ(e)),i=null,a="fixed"===hn(e).position,o=a?hi(e):e;for(;u1(o)&&!ht(o);){let e=hn(o),t=u8(o),n=i?i.position:a?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?i=e:r=r.filter(e=>e!==o),o=hi(o)}return t.set(e,r),r}(t,this._c):[].concat(n),r],o=hm(t,a[0],i),s=o.top,l=o.right,c=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=hm(t,a[e],i);s=uP(n.top,s),l=uC(n.right,l),c=uC(n.bottom,c),u=uP(n.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:hy,getElementRects:hb,getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){let{width:t,height:n}=hs(e);return{width:t,height:n}},getScale:hc,isElement:u1,isRTL:function(e){return"rtl"===hn(e).direction}};function hw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function h_(e,t,n,r){let i;void 0===r&&(r={});let{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,u=hl(e),h=a||o?[...u?ha(u):[],...t?ha(t):[]]:[];h.forEach(e=>{a&&e.addEventListener("scroll",n),o&&e.addEventListener("resize",n)});let d=u&&l?function(e,t,n){let r,i=null,a=uJ(e);function o(){var e;clearTimeout(r),null==(e=i)||e.disconnect(),i=null}function s(n,l){void 0===n&&(n=!1),void 0===l&&(l=1),o();let c=e.getBoundingClientRect(),{left:u,top:h,width:d,height:f}=c;if(n||t(),!d||!f)return;let p={rootMargin:-uO(h)+"px "+-uO(a.clientWidth-(u+d))+"px "+-uO(a.clientHeight-(h+f))+"px "+-uO(u)+"px",threshold:uP(0,uC(1,l))||1},m=!0;function g(t){let n=t[0].intersectionRatio;if(!hw(c,e.getBoundingClientRect()))return s();if(n!==l){if(!m)return s();n?s(!1,n):r=setTimeout(()=>{s(!1,1e-7)},1e3)}m=!1}try{i=new IntersectionObserver(g,{...p,root:a.ownerDocument})}catch(e){i=new IntersectionObserver(g,p)}i.observe(e)}let l=uQ(e),c=()=>s(n);return l.addEventListener("resize",c),s(!0),()=>{l.removeEventListener("resize",c),o()}}(u,n,o):null,f=-1,p=null;s&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),n()}),u&&!c&&p.observe(u),t&&p.observe(t));let m=c?hd(e):null;return c&&function t(){let r=hd(e);m&&!hw(m,r)&&n(),m=r,i=requestAnimationFrame(t)}(),n(),()=>{var e;h.forEach(e=>{a&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=p)||e.disconnect(),p=null,c&&cancelAnimationFrame(i)}}var hk="u">typeof document?b.useLayoutEffect:function(){};function hS(e,t){let n,r,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!hS(e[r],t[r]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){let n=i[r];if(("_owner"!==n||!e.$$typeof)&&!hS(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function hM(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hA(e,t){let n=hM(e);return Math.round(t*n)/n}function hT(e){let t=b.useRef(e);return hk(()=>{t.current=e}),t}var hC=function(e,t){let n,r;var i,a,o,s,l,c,u=uT((0,b.useState)(null),2),h=u[0];return{innerRef:u[1],style:function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,h]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,f]=b.useState(r);hS(d,r)||f(r);let[p,m]=b.useState(null),[g,v]=b.useState(null),y=b.useCallback(e=>{e!==k.current&&(k.current=e,m(e))},[]),x=b.useCallback(e=>{e!==S.current&&(S.current=e,v(e))},[]),w=a||p,_=o||g,k=b.useRef(null),S=b.useRef(null),M=b.useRef(u),A=null!=l,T=hT(l),C=hT(i),P=hT(c),E=b.useCallback(()=>{var e,r;let i,a,o;if(!k.current||!S.current)return;let s={placement:t,strategy:n,middleware:d};C.current&&(s.platform=C.current),(e=k.current,r=S.current,i=new Map,a=null!=s?s:{},o={...hx,...a.platform,_c:i},uX(e,r,{...a,platform:o})).then(e=>{let t={...e,isPositioned:!1!==P.current};O.current&&!hS(M.current,t)&&(M.current=t,s1.flushSync(()=>{h(t)}))})},[d,t,n,C,P]);hk(()=>{!1===c&&M.current.isPositioned&&(M.current.isPositioned=!1,h(e=>({...e,isPositioned:!1})))},[c]);let O=b.useRef(!1);hk(()=>(O.current=!0,()=>{O.current=!1}),[]),hk(()=>{if(w&&(k.current=w),_&&(S.current=_),w&&_){if(T.current)return T.current(w,_,E);E()}},[w,_,E,T,A]);let N=b.useMemo(()=>({reference:k,floating:S,setReference:y,setFloating:x}),[y,x]),j=b.useMemo(()=>({reference:w,floating:_}),[w,_]),L=b.useMemo(()=>{let e={position:n,left:0,top:0};if(!j.floating)return e;let t=hA(j.floating,u.x),r=hA(j.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...hM(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,j.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:E,refs:N,elements:j,floatingStyles:L}),[u,E,N,j,L])}({elements:{floating:h,reference:e},middleware:(i=[],t.flip&&i.push((a=void 0,{name:(n={name:"flip",options:a={},async fn(e){var t,n,r,i,o,s;let l,c,u,{placement:h,middlewareData:d,rects:f,initialPlacement:p,platform:m,elements:g}=e,{mainAxis:v=!0,crossAxis:y=!0,fallbackPlacements:b,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:_=!0,...k}=uL(a,e);if(null!=(t=d.arrow)&&t.alignmentOffset)return{};let S=uD(h),M=uz(p),A=uD(p)===p,T=await (null==m.isRTL?void 0:m.isRTL(g.floating)),C=b||(A||!_?[uq(p)]:(l=uq(p),[uF(p),l,uF(l)])),P="none"!==w;!b&&P&&C.push(...(c=uR(p),u=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?u$:uH;return t?uH:u$;case"left":case"right":return t?uU:uV;default:return[]}}(uD(p),"start"===w,T),c&&(u=u.map(e=>e+"-"+c),_&&(u=u.concat(u.map(uF)))),u));let E=[p,...C],O=await m.detectOverflow(e,k),N=[],j=(null==(n=d.flip)?void 0:n.overflows)||[];if(v&&N.push(O[S]),y){let e,t,n,r,i=(void 0===(s=T)&&(s=!1),e=uR(h),n=uI(t=uB(h)),r="x"===t?e===(s?"end":"start")?"right":"left":"start"===e?"bottom":"top",f.reference[n]>f.floating[n]&&(r=uq(r)),[r,uq(r)]);N.push(O[i[0]],O[i[1]])}if(j=[...j,{placement:h,overflows:N}],!N.every(e=>e<=0)){let e=((null==(r=d.flip)?void 0:r.index)||0)+1,t=E[e];if(t&&("alignment"!==y||M===uz(t)||j.every(e=>uz(e.placement)!==M||e.overflows[0]>0)))return{data:{index:e,overflows:j},reset:{placement:t}};let n=null==(i=j.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(x){case"bestFit":{let e=null==(o=j.filter(e=>{if(P){let t=uz(e.placement);return t===M||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0];e&&(n=e);break}case"initialPlacement":n=p}if(h!==n)return{reset:{placement:n}}}return{}}}).name,fn:n.fn,options:[void 0,void 0]})),"right"!==t.align&&"left"!==t.align&&i.push({name:(r={name:"size",options:s=o={apply:function(e){var t=e.rects;Object.assign(e.elements.floating.style,{width:"".concat(t.reference.width,"px")})}},async fn(e){let t,n,{placement:r,rects:i,platform:a,elements:o}=e,{apply:l=()=>{},...c}=uL(s,e),u=await a.detectOverflow(e,c),h=uD(r),d=uR(r),f="y"===uz(r),{width:p,height:m}=i.floating;"top"===h||"bottom"===h?(t=h,n=d===(await (null==a.isRTL?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(n=h,t="end"===d?"top":"bottom");let g=m-u.top-u.bottom,v=p-u.left-u.right,y=uC(m-u[t],g),b=uC(p-u[n],v),x=e.middlewareData.shift,w=!x,_=y,k=b;null!=x&&x.enabled.x&&(k=v),null!=x&&x.enabled.y&&(_=g),w&&!d&&(f?k=p-2*uP(u.left,u.right):_=m-2*uP(u.top,u.bottom)),await l({...e,availableWidth:k,availableHeight:_});let S=await a.getDimensions(o.floating);return p!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}).name,fn:r.fn,options:[o,void 0]}),i),placement:(l="right"===t.align?"end":"start",c=t.dropup?"top":"bottom","".concat(c,"-").concat(l)),strategy:t.positionFixed?"fixed":"absolute",whileElementsMounted:h_}).floatingStyles}},hP=["referenceElement","isMenuShown"],hE="u"<typeof Element?cm:Element,hO={align:s0().oneOf(["justify","left","right"]),children:s0().func.isRequired,dropup:s0().bool,flip:s0().bool,isMenuShown:s0().bool,positionFixed:s0().bool,referenceElement:s0().instanceOf(hE)},hN=function(e){var t=e.referenceElement,n=e.isMenuShown,r=ci(e,hP),i=hC(t,r);return n?r.children(i):null};hN.propTypes=hO;var hj=!!("u">typeof window&&window.document&&window.document.createElement),hL=!1,hD=!1;try{var hR={get passive(){return hL=!0},get once(){return hD=hL=!0}};hj&&(window.addEventListener("test",hR,hR),window.removeEventListener("test",hR,!0))}catch(e){}var hI=function(e,t,n,r){if(r&&"boolean"!=typeof r&&!hD){var i=r.once,a=r.capture,o=n;!hD&&i&&(o=n.__once||function e(r){this.removeEventListener(t,e,a),n.call(this,r)},n.__once=o),e.addEventListener(t,o,hL?r:a)}e.addEventListener(t,n,r)},hz=function(e,t,n,r){var i=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)},hB=function(e,t,n,r){return hI(e,t,n,r),function(){hz(e,t,n,r)}};function hF(e){return e&&e.ownerDocument||document}var hH=function(e){let t=(0,b.useRef)(e);return(0,b.useEffect)(()=>{t.current=e},[e]),t};function h$(e){let t=hH(e);return(0,b.useCallback)(function(...e){return t.current&&t.current(...e)},[t])}function hU(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}let hV=()=>{},hq=e=>e&&("current"in e?e.current:e),hY={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};var hW=function(e,t=hV,{disabled:n,clickTrigger:r="click"}={}){let i=(0,b.useRef)(!1),a=(0,b.useRef)(!1),o=(0,b.useCallback)(t=>{let n=hq(e);cM()(!!n,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),i.current=!n||!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)||0!==t.button||!!hU(n,t.target)||a.current,a.current=!1},[e]),s=h$(t=>{let n=hq(e);n&&hU(n,t.target)?a.current=!0:a.current=!1}),l=h$(e=>{i.current||t(e)});(0,b.useEffect)(()=>{var t,i;if(n||null==e)return;let a=hF(hq(e)),c=a.defaultView||window,u=null!=(t=c.event)?t:null==(i=c.parent)?void 0:i.event,h=null;hY[r]&&(h=hB(a,hY[r],s,!0));let d=hB(a,r,o,!0),f=hB(a,r,e=>{if(e===u){u=void 0;return}l(e)}),p=[];return"ontouchstart"in a.documentElement&&(p=[].slice.call(a.body.children).map(e=>hB(e,"mousemove",hV))),()=>{null==h||h(),d(),f(),p.forEach(e=>e())}},[e,n,r,o,s,l])};function hG(e){let t;if(!e||"function"==typeof e)return null;let{major:n}={major:+(t=b.version.split("."))[0],minor:+t[1],patch:+t[2]};return n>=19?e.props.ref:e.ref}let hX=()=>{};var hK=function(e,t,{disabled:n,clickTrigger:r}={}){let i=t||hX;hW(e,i,{disabled:n,clickTrigger:r});let a=h$(e=>{("Escape"===e.code||27===e.keyCode)&&i(e)});(0,b.useEffect)(()=>{if(n||null==e)return;let t=hF(hq(e)),r=(t.defaultView||window).event,i=hB(t,"keyup",e=>{if(e===r){r=void 0;return}a(e)});return()=>{i()}},[e,n,a])},hZ=function(e,t){var n=(0,b.useRef)(null);return hK(n,e,t),n},hQ=["children","onRootClose"],hJ=function(e){return(0,e.children)(hZ(e.onRootClose,ci(e,hQ)))},h0=["onBlur","onClick","onFocus","onRemove","option"];function h1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h1(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h1(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}s0().func,s0().func,s0().func,s0().func,cJ.isRequired;var h3=["active","children","className","onRemove","tabIndex"],h5=["children","option","readOnly"],h7=["ref"];function h4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h6(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h4(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h4(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var h9=(0,b.forwardRef)(function(e,t){var n=e.active,r=e.children,i=e.className,a=e.onRemove,o=e.tabIndex,s=ci(e,h3);return b.createElement("div",l8({},s,{className:cD()("rbt-token","rbt-token-removeable",{"rbt-token-active":!!n},i),ref:t,tabIndex:o||0}),r,b.createElement(uk,{className:"rbt-token-remove-button",label:"Remove",onClick:a,tabIndex:-1}))}),h8=function(e){var t=e.children,n=e.className,r=e.disabled,i=e.href,a=cD()("rbt-token",{"rbt-token-disabled":r},n);return i&&!r?b.createElement("a",{className:a,href:i},t):b.createElement("div",{className:a},t)},de=function(e){var t,n,r,i,a,o,s,l,c,u,h,d,f,p=e.children,m=e.option,g=e.readOnly,v=ci(e,h5),y=(n=(t=h6(h6({},v),{},{option:m})).onBlur,r=t.onClick,i=t.onFocus,a=t.onRemove,o=t.option,s=ci(t,h0),c=(l=uT((0,b.useState)(!1),2))[0],u=l[1],h=function(e){u(!1),n&&n(e)},d=function(){a&&a(o)},f=hZ(h,h2(h2({},s),{},{disabled:!c})),{active:c,onBlur:h,onClick:function(e){u(!0),r&&r(e)},onFocus:function(e){u(!0),i&&i(e)},onKeyDown:function(e){"Backspace"===e.key&&c&&(e.preventDefault(),d())},onRemove:cf(a)?d:void 0,ref:f}),x=y.ref,w=ci(y,h7),_=b.createElement("div",{className:"rbt-token-label"},p);return!v.disabled&&!g&&cf(w.onRemove)?b.createElement(h9,l8({},v,w,{ref:x}),_):b.createElement(h8,v,_)};function dt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return n&&(n=n.replace(n[0],n[0].toUpperCase())),["Top","Right","Bottom","Left"].map(function(r){return e["".concat(t).concat(r).concat(n)]}).join(" ")}var dn=function(){var e=un(),t=e.hintText,n=e.inputNode,r=(0,b.useRef)(null);return(0,b.useEffect)(function(){var e=function(){r.current&&n&&(r.current.scrollLeft=n.scrollLeft)};return null==n||n.addEventListener("scroll",e),function(){null==n||n.removeEventListener("scroll",e)}},[n]),(0,b.useEffect)(function(){var e,t;n&&r.current&&(e=r.current,t=window.getComputedStyle(n),e.style.borderStyle=dt(t,"border","style"),e.style.borderWidth=dt(t,"border","width"),e.style.fontSize=t.fontSize,e.style.fontWeight=t.fontWeight,e.style.height=t.height,e.style.lineHeight=t.lineHeight,e.style.margin=dt(t,"margin"),e.style.padding=dt(t,"padding"))}),{hintRef:r,hintText:t}},dr=function(e){var t=e.children,n=e.className,r=dn(),i=r.hintRef,a=r.hintText;return b.createElement("div",{className:n,style:{display:"flex",flex:1,height:"100%",position:"relative"}},t,b.createElement("input",{"aria-hidden":!0,className:"rbt-input-hint",ref:i,readOnly:!0,style:{backgroundColor:"transparent",borderColor:"transparent",boxShadow:"none",color:"rgba(0, 0, 0, 0.54)",left:0,pointerEvents:"none",position:"absolute",top:0,width:"100%"},tabIndex:-1,value:a}))},di=(0,b.forwardRef)(function(e,t){return b.createElement("input",l8({},e,{className:cD()("rbt-input-main",e.className),ref:t}))}),da=["children","className","inputClassName","inputRef","referenceElementRef","selected"],ds=function(e){var t=b.useRef(null),n=b.useRef(null),r=cG(e),i=r.children,a=r.className,o=r.inputClassName,s=(r.inputRef,r.referenceElementRef),l=r.selected,c=ci(r,da);function u(t){if(e.disabled)return void t.currentTarget.blur();var r=n.current;!r||t.currentTarget.contains(t.target)&&t.currentTarget!==t.target||(cE(r)&&(r.selectionStart=r.value.length),r.focus())}return b.createElement("div",{className:cD()("rbt-input-multi",{disabled:e.disabled},a),onClick:u,onFocus:u,ref:s,tabIndex:-1},b.createElement("div",{className:"rbt-input-wrapper",ref:t},i,b.createElement(dr,null,b.createElement(di,l8({},c,{className:o,onKeyDown:function(n){if("Backspace"===n.key&&l.length&&!e.value){n.preventDefault();var r,i=null==(r=t.current)?void 0:r.children;if(null!=i&&i.length){var a=i[i.length-2];null==a||a.focus()}}e.onKeyDown&&e.onKeyDown(n)},ref:function(t){n.current=t,e.inputRef(t)},style:{backgroundColor:"transparent",border:0,boxShadow:"none",cursor:"inherit",outline:"none",padding:0,width:"100%",zIndex:1}})))))},dl=["inputRef","referenceElementRef"],dc=function(e){var t=e.inputRef,n=e.referenceElementRef,r=ci(e,dl);return b.createElement(dr,null,b.createElement(di,l8({},cG(r),{ref:function(e){t(e),n(e)}})))},du={children:s0().string.isRequired,highlightClassName:s0().string,search:s0().string.isRequired},dh=function(e){var t=e.children,n=e.highlightClassName,r=void 0===n?"rbt-highlight-text":n,i=e.search;if(!i||!t)return b.createElement(b.Fragment,null,t);for(var a=0,o=t,s=[];o;){var l=cN(o,i);if(!l){s.push(o);break}var c=o.slice(0,l.start);c&&s.push(c);var u=o.slice(l.start,l.end);s.push(b.createElement("mark",{className:r,key:a},u)),a+=1,o=o.slice(l.end)}return b.createElement(b.Fragment,null,s)};dh.propTypes=du;let dd=e=>"object"==typeof e&&null!=e&&1===e.nodeType,df=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,dp=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n,r=getComputedStyle(e,null);return df(r.overflowY,t)||df(r.overflowX,t)||!!(n=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e))&&(n.clientHeight<e.scrollHeight||n.clientWidth<e.scrollWidth)}return!1},dm=(e,t,n,r,i,a,o,s)=>a<e&&o>t||a>e&&o<t?0:a<=e&&s<=n||o>=t&&s>=n?a-e-r:o>t&&s<n||a<e&&s>n?o-t+i:0,dg=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},dv=(e,t)=>{var n,r,i,a;let o;if("u"<typeof document)return[];let{scrollMode:s,block:l,inline:c,boundary:u,skipOverflowHiddenElements:h}=t,d="function"==typeof u?u:e=>e!==u;if(!dd(e))throw TypeError("Invalid target");let f=document.scrollingElement||document.documentElement,p=[],m=e;for(;dd(m)&&d(m);){if((m=dg(m))===f){p.push(m);break}null!=m&&m===document.body&&dp(m)&&!dp(document.documentElement)||null!=m&&dp(m,h)&&p.push(m)}let g=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,v=null!=(a=null==(i=window.visualViewport)?void 0:i.height)?a:innerHeight,{scrollX:y,scrollY:b}=window,{height:x,width:w,top:_,right:k,bottom:S,left:M}=e.getBoundingClientRect(),{top:A,right:T,bottom:C,left:P}={top:parseFloat((o=window.getComputedStyle(e)).scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0},E="start"===l||"nearest"===l?_-A:"end"===l?S+C:_+x/2-A+C,O="center"===c?M+w/2-P+T:"end"===c?k+T:M-P,N=[];for(let e=0;e<p.length;e++){let t=p[e],{height:n,width:r,top:i,right:a,bottom:o,left:u}=t.getBoundingClientRect();if("if-needed"===s&&_>=0&&M>=0&&S<=v&&k<=g&&(t===f&&!dp(t)||_>=i&&S<=o&&M>=u&&k<=a))break;let h=getComputedStyle(t),d=parseInt(h.borderLeftWidth,10),m=parseInt(h.borderTopWidth,10),A=parseInt(h.borderRightWidth,10),T=parseInt(h.borderBottomWidth,10),C=0,P=0,j="offsetWidth"in t?t.offsetWidth-t.clientWidth-d-A:0,L="offsetHeight"in t?t.offsetHeight-t.clientHeight-m-T:0,D="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,R="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(f===t)C="start"===l?E:"end"===l?E-v:"nearest"===l?dm(b,b+v,v,m,T,b+E,b+E+x,x):E-v/2,P="start"===c?O:"center"===c?O-g/2:"end"===c?O-g:dm(y,y+g,g,d,A,y+O,y+O+w,w),C=Math.max(0,C+b),P=Math.max(0,P+y);else{C="start"===l?E-i-m:"end"===l?E-o+T+L:"nearest"===l?dm(i,o,n,m,T+L,E,E+x,x):E-(i+n/2)+L/2,P="start"===c?O-u-d:"center"===c?O-(u+r/2)+j/2:"end"===c?O-a+A+j:dm(u,a,r,d,A+j,O,O+w,w);let{scrollLeft:e,scrollTop:s}=t;C=0===R?0:Math.max(0,Math.min(s+C/R,t.scrollHeight-n/R+L)),P=0===D?0:Math.max(0,Math.min(e+P/D,t.scrollWidth-r/D+j)),E+=s-C,O+=e-P}N.push({el:t,top:C,left:P})}return N};var dy=["label","onClick","option","position"];function db(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?db(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):db(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}cJ.isRequired,s0().number;var dw=["active","children","className","disabled","onClick"],d_=(0,b.forwardRef)(function(e,t){var n=e.active,r=e.children,i=e.className,a=e.disabled,o=e.onClick,s=ci(e,dw);return b.createElement("a",l8({},s,{className:cD()("dropdown-item",{active:n,disabled:a},i),href:s.href||"#",onClick:function(e){e.preventDefault(),!a&&o&&o(e)},ref:t}),r)});function dk(e){var t,n,r,i,a,o,s,l,c,u,h,d,f,p,m,g;return b.createElement(d_,(t=e.label,n=e.onClick,r=e.option,i=e.position,a=ci(e,dy),s=(o=un()).activeIndex,l=o.id,c=o.isOnlyResult,u=o.onActiveItemChange,h=o.onInitialItemChange,d=o.onMenuItemClick,f=o.setItem,p=(0,b.useRef)(null),(0,b.useEffect)(function(){0===i&&h(r)}),(0,b.useEffect)(function(){if(i===s){u(r);var e=p.current;e&&function(e,t){let n;if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let r={top:parseFloat((n=window.getComputedStyle(e)).scrollMarginTop)||0,right:parseFloat(n.scrollMarginRight)||0,bottom:parseFloat(n.scrollMarginBottom)||0,left:parseFloat(n.scrollMarginLeft)||0};if("object"==typeof t&&"function"==typeof t.behavior)return t.behavior(dv(e,t));let i="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:n,top:a,left:o}of dv(e,!1===t?{block:"end",inline:"nearest"}:t===Object(t)&&0!==Object.keys(t).length?t:{block:"start",inline:"nearest"})){let e=a-r.top+r.bottom,t=o-r.left+r.right;n.scroll({top:e,left:t,behavior:i})}}(e,{boundary:e.parentNode,scrollMode:"if-needed"})}},[s,u,r,i]),m=(0,b.useCallback)(function(e){d(r,e),n&&n(e)},[n,d,r]),g=c||s===i,f(r,i),dx(dx({},a),{},{active:g,"aria-label":t,"aria-selected":g,id:cR(l,i),onClick:m,onMouseDown:cV,ref:p,role:"option"})))}var dS=["emptyLabel","innerRef","maxHeight","style"];function dM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dM(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var dT={"aria-label":s0().string,emptyLabel:s0().node,id:cZ(s0().oneOfType([s0().number,s0().string]),cQ),maxHeight:s0().string},dC=function(e){var t=e.emptyLabel,n=e.innerRef,r=e.maxHeight,i=e.style,a=ci(e,dS),o=0===b.Children.count(a.children)?b.createElement(d_,{disabled:!0,role:"option"},void 0===t?"No matches found.":t):a.children;return b.createElement("div",l8({},a,{"aria-label":a["aria-label"]||"menu-options",className:cD()("rbt-menu","dropdown-menu","show",a.className),onMouseDown:cV,ref:n,role:"listbox",style:dA(dA({},i),{},{display:"block",maxHeight:void 0===r?"300px":r,overflow:"auto"})}),o)};dC.propTypes=dT,dC.Divider=function(){return b.createElement("div",{className:"dropdown-divider",role:"separator"})},dC.Header=function(e){return b.createElement("div",l8({},e,{className:"dropdown-header",role:"heading"}))};var dP=["labelKey","newSelectionPrefix","options","paginationText","renderMenuItemChildren","text"],dE={newSelectionPrefix:s0().node,paginationText:s0().node,renderMenuItemChildren:s0().func};function dO(e,t){return b.createElement(dh,{search:t.text},cv(e,t.labelKey))}var dN=function(e){var t=e.labelKey,n=e.newSelectionPrefix,r=void 0===n?"New selection: ":n,i=e.options,a=e.paginationText,o=void 0===a?"Display additional results...":a,s=e.renderMenuItemChildren,l=void 0===s?dO:s,c=e.text,u=ci(e,dP);return b.createElement(dC,l8({},u,{key:c}),i.map(function(n,i){var a=cv(n,t),s={disabled:!!cw(n,"disabled"),label:a,option:n,position:i};return cw(n,"customOption")?b.createElement(dk,l8({},s,{className:"rbt-menu-custom-option",key:i,label:a}),r,b.createElement(dh,{search:c},a)):cw(n,"paginationOption")?b.createElement(b.Fragment,{key:"pagination-option-divider"},b.createElement(dC.Divider,null),b.createElement(dk,l8({},s,{className:"rbt-menu-pagination-option",label:cp(o)?o:""}),o)):b.createElement(dk,l8({},s,{key:i}),l(n,e,i))}))};function dj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dj(Object(n),!0).forEach(function(t){cn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}dN.propTypes=dE;var dD={clearButton:s0().bool,inputProps:cZ(s0().object,function(e){var t=e.inputProps;t&&"[object Object]"===Object.prototype.toString.call(t)&&cX.forEach(function(e){var n=e.alt,r=e.prop;cT(!t[r],"The `".concat(r,"` property of `inputProps` will be ignored.").concat(n?" Use the top-level `".concat(n,"` prop instead."):null))})}),isInvalid:s0().bool,isLoading:s0().bool,isValid:s0().bool,renderInput:s0().func,renderMenu:s0().func,renderToken:s0().func,size:cK},dR=["align","dropup","flip","positionFixed"],dI=function(e){c9(r,e);var t,n=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=ue(r);return e=t?Reflect.construct(n,arguments,ue(this).constructor):n.apply(this,arguments),c8(this,e)});function r(){var e;c3(this,r);for(var t=arguments.length,i=Array(t),a=0;a<t;a++)i[a]=arguments[a];return cn(c4(e=n.call.apply(n,[this].concat(i))),"_referenceElement",null),cn(c4(e),"referenceElementRef",function(t){e._referenceElement=t}),cn(c4(e),"_renderInput",function(t,n){var r=e.props,i=r.isInvalid,a=r.isValid,o=r.multiple,s=r.renderInput,l=r.renderToken,c=r.size;if(cf(s))return s(t,n);var u=dL(dL({},t),{},{isInvalid:i,isValid:a,size:c});if(!o)return b.createElement(dc,u);var h=n.labelKey,d=n.onRemove,f=n.selected;return b.createElement(ds,l8({},u,{placeholder:f.length?"":t.placeholder,selected:f}),f.map(function(e,t){return(l||function(e,t,n){return b.createElement(de,{disabled:t.disabled,key:n,onRemove:t.onRemove,option:e,tabIndex:t.tabIndex},cv(e,t.labelKey))})(e,dL(dL({},u),{},{labelKey:h,onRemove:d}),t)}))}),cn(c4(e),"_renderMenu",function(t,n,r){var i=e.props,a=i.emptyLabel,o=i.id,s=i.maxHeight,l=i.newSelectionPrefix,c=i.paginationText,u=i.renderMenu,h=i.renderMenuItemChildren;return(u||function(e,t,n){return b.createElement(dN,l8({},t,{labelKey:n.labelKey,options:e,text:n.text}))})(t,dL(dL({},n),{},{emptyLabel:a,id:o,maxHeight:s,newSelectionPrefix:l,paginationText:c,renderMenuItemChildren:h}),r)}),cn(c4(e),"_renderAux",function(t){var n,r=t.onClear,i=t.selected,a=e.props,o=a.clearButton,s=a.disabled,l=a.isLoading,c=a.size;return l?n=b.createElement(uM,null):o&&!s&&i.length&&(n=b.createElement(uk,{onClick:r,onMouseDown:cV,size:c})),n?b.createElement("div",{className:cD()("rbt-aux",{"rbt-aux-lg":"lg"===c})},n):null}),e}return c7(r,[{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.className,i=t.instanceRef,a=t.open,o=t.options,s=t.style;return b.createElement(ux,l8({},this.props,{options:o,ref:i}),function(t){var i=t.hideMenu,o=t.isMenuShown,l=t.results,c=e._renderAux(t);return b.createElement(hJ,{disabled:a||!o,onRootClose:i},function(i){return b.createElement("div",{className:cD()("rbt",{"has-aux":!!c,"is-invalid":e.props.isInvalid,"is-valid":e.props.isValid},r),ref:i,style:dL(dL({},s),{},{outline:"none",position:"relative"}),tabIndex:-1},e._renderInput(dL(dL({},t.getInputProps(e.props.inputProps)),{},{referenceElementRef:e.referenceElementRef}),t),b.createElement(hN,l8({},cg(e.props,dR),{isMenuShown:o,referenceElement:e._referenceElement}),function(n){return e._renderMenu(l,n,t)}),c,cf(n)?n(t):n)})})}}]),r}(b.Component);cn(dI,"propTypes",dD),cn(dI,"defaultProps",{isLoading:!1});var dz=(0,b.forwardRef)(function(e,t){return b.createElement(dI,l8({},e,{instanceRef:t}))}),dB=(0,b.forwardRef)(function(e,t){var n,r,i,a,o,s,l,c,u,h,d,f,p,m,g,v,y,x,w,_,k,S,M,A,T,C;let P;return b.createElement(dz,l8({},(n=e.allowNew,i=void 0===(r=e.delay)?200:r,a=e.emptyLabel,o=e.isLoading,l=void 0===(s=e.minLength)?2:s,c=e.onInputChange,u=e.onSearch,d=void 0===(h=e.options)?[]:h,p=void 0===(f=e.promptText)?"Type to search...":f,g=void 0===(m=e.searchText)?"Searching...":m,y=void 0===(v=e.useCache)||v,x=ci(e,c0),w=(0,b.useRef)({}),_=(0,b.useRef)(null),k=(0,b.useRef)(e.defaultInputValue||""),S=function(){let[,e]=(0,b.useReducer)(e=>!e,!1);return e}(),P=(0,b.useRef)(null),(0,b.useEffect)(()=>{P.current=e}),M=P.current,A=(0,b.useCallback)(function(e){if(k.current=e,e&&(!l||!(e.length<l))){if(y&&w.current[e])return void S();u(e)}},[S,l,u,y]),(0,b.useEffect)(function(){return _.current=co()(A,i),function(){_.current&&_.current.cancel()}},[i,A]),(0,b.useEffect)(function(){!o&&M&&M.isLoading&&y&&(w.current[k.current]=d)}),T=(0,b.useCallback)(function(e,t){c&&c(e,t),_.current&&_.current(e)},[c]),C=w.current[k.current],c2(c2({},x),{},{allowNew:cf(n)?n:n&&!o,emptyLabel:k.current.length?o?g:a:p,isLoading:o,minLength:l,onInputChange:T,options:y&&C?C:d})),{ref:t}))});let dF=e=>{let{label:t,position:n,value:r}=e;if(n<0||!r)return(0,v.jsx)("span",{children:t});let i=t.substring(0,n),a=t.slice(n,n+r.length),o=t.substring(n+r.length);return(0,v.jsxs)("span",{children:[i,(0,v.jsx)("b",{children:a}),o]})};dF.propTypes={label:s0().string.isRequired,position:s0().number.isRequired,value:s0().string.isRequired};let dH=e=>{let{onClear:t}=e;return(0,v.jsx)("button",{type:"reset",title:"Clear search",onClick:t,"aria-label":"clear search",children:(0,v.jsx)(a7,{name:"error",isPresentational:!0})})};function d$(e){let t=e.dateLastIndexed||i8(),n=e.date_received_max,r=e.date_received_min;if(id()(n).isSame(t)&&id()(r).isSame(i_)){e.dateRange="All";return}let i={"3y":id()(n).subtract(3,"years"),"3m":id()(n).subtract(3,"months"),"6m":id()(n).subtract(6,"months"),"1y":id()(n).subtract(1,"year")},a=Object.keys(i),o=!1;for(let t=0;t<a.length&&!o;t++){let n=a[t];id()(r).isSame(i[n],"day")&&(e.dateRange=n,o=!0)}o||(e.dateRange="")}function dU(e){let{date_received_min:t,date_received_max:n,dateInterval:r}=e;ag(t,n)&&"Day"===r&&(e.dateInterval="Week",e.trendsDateWarningEnabled=!0),ag(t,n)||(e.trendsDateWarningEnabled=!1)}function dV(e,t){return e&&e[t]?e[t].join("_"):""}function dq(e,t){return{from:(e-1)*t.size,page:e,searchAfter:dV(t,e)}}function dY(e){let t={};Object.keys(e).forEach(n=>{var r;if(!e[n])return;let i=e[n];-1!==iO.indexOf(n)&&(i="string"==typeof(r=i)?r.slice(0,10):"object"==typeof r&&null!==r?id()(r).toISOString().slice(0,10):""),-1!==iL.indexOf(n)&&(i=["yes","true"].includes(String(i).toLowerCase())),dG[n]?t[dG[n]]=i:t[n]=i});let n=[].concat([].concat(["search_term","field"],iO,iE,iL),{List:["frm","search_after","size","sort","format","no_aggs"],Map:[],Trends:["lens","focus","sub_lens","sub_lens_depth","trend_interval","trend_depth"]}[t.tab]);return Object.keys(t).includes("format")&&["size","format","no_aggs"].forEach(e=>{n.includes(e)||n.push(e)}),"?"+i0(Object.keys(t).filter(e=>n.includes(e)).reduce((e,n)=>(e[n]=t[n],e),{}))}dH.propTypes={onClear:s0().func.isRequired};let dW={company_received_max:"",company_received_min:"",dateInterval:"Month",dateRange:"",dateLastIndexed:"",date_received_max:"",date_received_min:"",from:0,page:1,searchAfter:"",searchField:"all",searchText:"",size:25,sort:"created_date_desc",trendsDateWarningEnabled:!1},dG={searchAfter:"search_after",searchText:"search_term",searchField:"field",from:"frm"},dX=nW({name:"query",initialState:dW,reducers:{dateIntervalChanged:{reducer:(e,t)=>{e.dateInterval=av(t.payload,"dateInterval"),dU(e)}},dateRangeChanged:{reducer:(e,t)=>{let n=av(t.payload,"dateRange"),r=iy(id()(i8())),i={All:iy(id()(i_)),"3m":iy(id()(r).subtract(3,"months")),"6m":iy(id()(r).subtract(6,"months")),"1y":iy(id()(r).subtract(1,"year")),"3y":iy(id()(r).subtract(3,"years"))};e.dateRange=n,e.date_received_min=i[n]?i[n]:e.date_received_min,e.date_received_max=r,dU(e)}},companyReceivedDateChanged:{reducer:(e,t)=>{let{maxDate:n,minDate:r}=t.payload;r=id()(r).isValid()?iy(id()(r).startOf("day")):null,n=id()(n).isValid()?iy(id()(n).startOf("day")):null,e.company_received_min=r,e.company_received_max=n},prepare:(e,t)=>({payload:{minDate:e,maxDate:t}})},datesChanged:{reducer:(e,t)=>{let{maxDate:n,minDate:r}=t.payload;r=id()(r).isValid()?iy(id()(r).startOf("day")):null,n=id()(n).isValid()?iy(id()(n).startOf("day")):null;let i=e.date_received_min!==r||e.date_received_max!==n,a=((e,t,n)=>{let r=n?id()(n):i8(),i=id()(t).startOf("day"),a=id()(e).startOf("day");if(0!==i.diff(r,"days"))return"";if(id()(e).isSame(i_,"day"))return"All";let o=i.diff(a,"years",!0);if(3===o||1===o)return o+"y";let s=i.diff(a,"months",!0);return 6===s||3===s?s+"m":""})(r,n,e.dateLastIndexed);a&&i?e.dateRange=a:delete e.dateRange,e.date_received_min=r||e.date_received_min,e.date_received_max=n||e.date_received_max,dU(e)},prepare:(e,t)=>({payload:{minDate:e,maxDate:t}})},searchFieldChanged:{reducer:(e,t)=>{e.searchField=t.payload}},searchTextChanged:{reducer:(e,t)=>{e.searchText=t.payload}},trendsDateWarningDismissed:{reducer:e=>{e.trendsDateWarningEnabled=!1}},prevPageShown:{reducer:(e,t)=>{let n=t.payload,r=e.page-1,i=dq(r,e);e.page=i.page,e.from=i.from,e.searchAfter=dV(n,r)}},nextPageShown:{reducer:(e,t)=>{let n=t.payload,r=e.page+1,i=dq(r,e);e.page=i.page,e.from=i.from,e.searchAfter=dV(n,r)}},sizeChanged:{reducer:(e,t)=>{e.size=av(t.payload,"size")}},sortChanged:{reducer:(e,t)=>{e.sort=av(t.payload,"sort")}}},extraReducers:e=>{e.addCase("filters/filtersCleared",e=>{e.dateRange="All",e.company_received_max="",e.company_received_min="",e.date_received_min=iM,e.date_received_max=e.dateLastIndexed,e.company_received_max="",e.company_received_min=""}).addCase("routes/routeChanged",(e,t)=>{let n,{params:r}=t.payload;["dateRange","dateInterval","searchField","searchText","sort"].forEach(t=>{r[t]&&(e[t]=av(r[t],t))}),iO.forEach(t=>{var n;void 0!==r[t]&&id()(r[t]).isValid()&&(e[t]=(n=r[t],id()(n).isValid()?iy(n):null))});let i=i3(r,"page",dW.page),a=i3(r,"size",dW.size);if(e.page=parseInt(i,10),e.size=parseInt(a,10),r.search_after&&(e.searchAfter=r.search_after),(n=Object.keys(r)).includes("dateRange")&&!n.includes("date_received_min")&&!n.includes("date_received_max")||"All"===r.dateRange){let t={payload:r.dateRange};dX.caseReducers.dateRangeChanged(e,t)}d$(e)}).addMatcher(aH.endpoints.getMeta.matchFulfilled,(e,t)=>{let{payload:n}=t;e.dateLastIndexed=id()(n._meta.last_updated).startOf("day").format("YYYY-MM-DD"),window.MAX_DATE=iy(id()(e.dateLastIndexed).startOf("day")),e.date_received_max||(e.date_received_max=iy(id()(e.dateLastIndexed))),e.date_received_min||(e.date_received_min=iy(id()(e.dateLastIndexed).subtract(3,"years"))),d$(e)}).addMatcher(nE(dK,dZ,dJ,dQ,ly,lb,l_,lx,lw,lk,lS,d3,d5,d7,d4,ls,lC),e=>{e.from=0,e.page=1,e.searchAfter=""})}}),{companyReceivedDateChanged:dK,datesChanged:dZ,dateRangeChanged:dQ,dateIntervalChanged:dJ,trendsDateWarningDismissed:d0,nextPageShown:d1,prevPageShown:d2,searchFieldChanged:d3,searchTextChanged:d5,sizeChanged:d7,sortChanged:d4}=dX.actions;var d6=dX.reducer;let d9=e=>{let{ariaLabel:t,defaultValue:n="",fieldName:r,htmlId:i,isDisabled:a=!1,handleChange:o,handleClear:s,handlePressEnter:l,hasClearButton:c=!1,hasSearchButton:u=!1,handleSelectionOverride:h,maxResults:d=5,placeholder:f="Enter your search text"}=e,p=ta(),m=(0,b.useRef)(),g=ts(lF),y=ts(lN),[x,w]=(0,b.useState)(n),[_,k]=(0,b.useState)(c&&(!!n||!!x)),[S,M]=(0,b.useState)(!1);(0,b.useEffect)(()=>{m.current.setState({text:n}),w(m.current.inputNode.value),""===n?(m.current.clear(),k(!1)):k(!0)},[n]);let A=(0,b.useCallback)(e=>{o&&o(e),M(!0),k(!!e),w(e)},[o,M,w]),T="company"===r?"company":"zip",C=Object.assign({},g,y);C.searchAfter="";let P=dY(C)+"&text="+encodeURIComponent(x),{currentData:E,isFetching:O,isLoading:N}=aW({url:"_suggest_".concat(T,"/").concat(P)},{skip:!x}),j=E?E.map(e=>({key:e,label:e,position:e.toLowerCase().indexOf(x.toLowerCase()),value:x})):[];return(0,v.jsx)("section",{className:"typeahead",children:(0,v.jsxs)("div",{className:"o-search-input",children:[(0,v.jsxs)("div",{className:"o-search-input__input",children:[(0,v.jsx)("label",{"aria-label":t,className:"o-search-input__input-label",htmlFor:i,children:(0,v.jsx)(a7,{name:"search",isPresentational:!0})}),(0,v.jsx)(dB,{id:i,minLength:1,className:"typeahead-selector",defaultInputValue:n,delay:250,disabled:a,filterBy:()=>!0,inputProps:{id:i,className:"a-text-input a-text-input--full"},isLoading:N||O,ref:m,onInputChange:A,onChange:e=>{h?h(e):p(lk(r,[e[0].key])),w(""),m.current.clear(),w("")},onKeyDown:e=>{l&&"Enter"===e.key&&(l(e),M(!1))},onSearch:A,options:j,maxResults:d,placeholder:f,renderMenuItemChildren:e=>(0,v.jsx)("li",{className:"typeahead-option",children:(0,v.jsx)(dF,{label:e.label,position:e.position,value:e.value},e.key)}),open:S,promptText:"",searchText:"",emptyLabel:x?"No matches found":"",useCache:!1}),!!_&&(0,v.jsx)(dH,{onClear:()=>{s&&s(),m.current.clear(),w(""),k(!1)}})]}),!!u&&(0,v.jsx)(sF,{type:"submit",label:"Search"})]})})};d9.propTypes={ariaLabel:s0().string.isRequired,defaultValue:s0().string,fieldName:s0().string.isRequired,isDisabled:s0().bool,handleChange:s0().func,handleClear:s0().func,handlePressEnter:s0().func,handleSelectionOverride:s0().func,hasClearButton:s0().bool,hasSearchButton:s0().bool,htmlId:s0().string.isRequired,maxResults:s0().number,placeholder:s0().string};let d8="company",fe=()=>{let{data:e,error:t}=l0(),n=ts(lj),r=ts(l7),i=ts(l4),a=structuredClone(t?[]:(null==e?void 0:e.company)||[]),o=r&&"Company"===i;return a.forEach(e=>{e.disabled=!!(o&&e.key!==r)}),(0,v.jsxs)(lg,{title:"Company name",desc:"The complaint is about this company.",className:"aggregation company",children:[(0,v.jsx)(d9,{fieldName:d8,id:"filter-company-typeahead",label:"Start typing to begin listing companies",placeholder:"Enter company name",ariaLabel:"Company Search",htmlId:d8+"-typeahead"}),(0,v.jsx)(l2,{fieldName:d8,options:a,selections:n})]})};var ft=i(6336),fn=i.n(ft),fr=i(8657),fi=i.n(fr);id().extend(fn()),id().extend(fi());let fa=()=>{let e="company_received",t=ts(l$),n=ts(lH),r=id()(t).isValid()?iy(t):"",i=id()(n).isValid()?iy(n):"",[a,o]=(0,b.useState)(null),[s,l]=(0,b.useState)(null),c=ta(),u=(0,b.useRef)(),h=(0,b.useRef)(),d=null!=a?a:r,f=null!=s?s:i,p=(0,b.useMemo)(()=>{let e=[];return id()(d).isAfter(f)&&e.push("'From' date must be less than 'through' date"),id()(d).isBefore(iM)&&e.push("'From' date must be after "+id()(iM).format(ik)),id()(f).isAfter(iS)&&e.push("'Through' date must be before "+id()(iS).format(ik)),e},[d,f]),m=()=>{let e=f,r=d;r&&!id()(d).isValid()&&(u.current.value="",r=""),e&&!id()(f).isValid()&&(h.current.value="",e=""),(t!==r||n!==e)&&c(dK(r,e)),o(null),l(null)},g=(0,b.useMemo)(()=>{let e=["a-text-input"];return(id()(d).isBefore(iM)||id()(d).isAfter(f))&&e.push("a-text-input--error"),e.join(" ")},[d,f]),y=(0,b.useMemo)(()=>{let e=["a-text-input"];return(id()(f).isAfter(iS)||id()(f).isBefore(d))&&e.push("a-text-input--error"),e.join(" ")},[d,f]);return(0,v.jsx)(lg,{title:"The date the CFPB sent the complaint to the company",className:"aggregation date-filter",desc:"",children:(0,v.jsxs)("div",{children:[(0,v.jsxs)("ul",{className:"date-inputs",children:[(0,v.jsxs)("li",{children:[(0,v.jsx)("label",{className:"a-label a-label__heading",htmlFor:"".concat(e,"-from"),children:"From"}),(0,v.jsx)("div",{className:"o-search-input",children:(0,v.jsx)("div",{className:"o-search-input__input",children:(0,v.jsx)("input",{id:"".concat(e,"-from"),className:g,onBlur:m,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"===e.key&&u.current.blur()},min:iM,max:iS,ref:u,placeholder:ik,type:"date",value:d})})})]}),(0,v.jsxs)("li",{children:[(0,v.jsx)("label",{className:"a-label a-label__heading",htmlFor:"".concat(e,"-through"),children:"Through"}),(0,v.jsx)("div",{className:"o-search-input",children:(0,v.jsx)("div",{className:"o-search-input__input",children:(0,v.jsx)("input",{id:"".concat(e,"-through"),className:y,onBlur:m,onChange:e=>l(e.target.value),onKeyDown:e=>{"Enter"===e.key&&h.current.blur()},min:iM,max:iS,placeholder:ik,ref:h,type:"date",value:f})})})]})]}),p.length?(0,v.jsx)("div",{className:"a-form-alert a-form-alert--error",role:"alert",children:p.map((e,t)=>(0,v.jsxs)("div",{children:[(0,v.jsx)("span",{"aria-hidden":"true",children:(0,v.jsx)(a7,{name:"error-round",isPresentational:!0})}),(0,v.jsx)("div",{className:"a-form-alert__text",children:e})]},t))}):null]})})},fo=e=>e.view.hasAdvancedSearchTips,fs=e=>e.view.expandedRows,fl=e=>e.view.hasFilters,fc=e=>e.view.isPrintMode,fu=e=>e.view.showTour,fh=e=>e.view.tab,fd=e=>e.view.width,ff=e=>e.view.modalTypeShown,fp=()=>{let e=ta(),t=ts(lY),n=ts(fh);return(0,v.jsxs)("section",{className:"date-ranges",children:[(0,v.jsx)("p",{children:"Date range (Click to modify range)"}),(0,v.jsx)("div",{className:"m-btn-group",children:Object.keys(ij).map(r=>{let i;return(0,v.jsx)(sF,{label:r,"aria-label":ij[r],className:(i=["a-btn","date-selector","range-"+r],r===t&&i.push("selected"),i.join(" ").toLowerCase()),title:ij[r],onClick:()=>{t!==r&&(ai("Button",n+":"+r),e(dQ(r)))}},r)})})]})};id().extend(fn()),id().extend(fi()),id().extend(iv());let fm=()=>{let e="date_received",t=ts(lq),n=ts(lV),r=id()(t).isValid()?ix(t):"",i=id()(n).isValid()?ix(n):"",[a,o]=(0,b.useState)(null),[s,l]=(0,b.useState)(null),c=ta(),u="'Through' date cannot be later than "+ib(iS),h=(0,b.useRef)(),d=(0,b.useRef)(),f=null!=a?a:r,p=null!=s?s:i,m=(0,b.useMemo)(()=>id()(f).isAfter(p)?"'From' date must be less than 'through' date":id()(f).isSame(p)?"'From' date cannot be the same as 'Through' date":!!id()(p).isAfter(iS)&&u,[u,f,p]),g=()=>{let e=f,t=p;if(i5([!id()(f).isValid(),id()(f).isBefore(iM),id()(f).isAfter(iS),!h.current.value])&&(h.current.value=iM,e=iM),i5([!id()(p).isValid(),id()(p).isAfter(iS),id()(p).isBefore(iM),id()(p).isBefore(f),!d.current.value])&&(d.current.value=iS,t=iS),id()(t).isAfter(e)){c(dZ(e,t)),o(null),l(null);return}o(e),l(t)},y=(0,b.useMemo)(()=>{let e=["a-text-input"];return i5([!id()(f).isValid(),id()(f).isBefore(iM),id()(f).isAfter(p),id()(f).isSame(p)])&&e.push("a-text-input--error"),e.join(" ")},[f,p]),x=(0,b.useMemo)(()=>{let e=["a-text-input"];return i5([!id()(p).isValid(),id()(p).isAfter(iS),id()(p).isBefore(f),id()(p).isSame(f)])&&e.push("a-text-input--error"),e.join(" ")},[f,p]);return(0,v.jsx)(lg,{title:"Date CFPB received the complaint",className:"aggregation date-filter",desc:"",children:(0,v.jsxs)("div",{children:[(0,v.jsxs)("p",{className:"u-mt15",children:[" ","CFPB updated product and issue options in April 2017 and August 2023."," ",(0,v.jsx)("a",{href:"https://www.consumerfinance.gov/data-research/consumer-complaints/#past-changes",target:"_blank",rel:"noopener noreferrer","aria-label":"Learn more about Product and\n Issue changes (opens in new window)",children:"Learn more"})]}),(0,v.jsxs)("ul",{className:"date-inputs",children:[(0,v.jsxs)("li",{children:[(0,v.jsx)("label",{className:"a-label a-label__heading",htmlFor:"".concat(e,"-from"),children:"From"}),(0,v.jsx)("div",{className:"o-search-input",children:(0,v.jsx)("div",{className:"o-search-input__input",children:(0,v.jsx)("input",{id:"".concat(e,"-from"),className:y,onBlur:g,onChange:e=>{o(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&h.current.blur()},min:iM,max:iS,ref:h,placeholder:ik,type:"date",value:f})})})]}),(0,v.jsxs)("li",{children:[(0,v.jsx)("label",{className:"a-label a-label__heading",htmlFor:"".concat(e,"-through"),children:"Through"}),(0,v.jsx)("div",{className:"o-search-input",children:(0,v.jsx)("div",{className:"o-search-input__input",children:(0,v.jsx)("input",{id:"".concat(e,"-through"),className:x,onBlur:g,onChange:e=>{l(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&d.current.blur()},min:iM,max:iS,placeholder:ik,ref:d,type:"date",value:p})})})]})]}),(0,v.jsx)(fp,{}),m?(0,v.jsxs)("div",{className:"a-form-alert a-form-alert--error",role:"alert",children:[(0,v.jsx)("span",{"aria-hidden":"true",children:(0,v.jsx)(a7,{name:"error-round",isPresentational:!0})}),(0,v.jsx)("span",{className:"a-form-alert__text",children:m+" "})]}):null]})})},fg=e=>{let{ariaLabel:t,htmlId:n,isDisabled:r=!1,handleChange:i,handleInputChange:a,maxResults:o=5,options:s,placeholder:l="Enter your search text"}=e,c=(0,b.useRef)(),[u,h]=(0,b.useState)(""),d=()=>{c.current.clear(),h("")};return(0,v.jsx)("section",{className:"typeahead",children:(0,v.jsx)("div",{className:"o-search-input",children:(0,v.jsxs)("div",{className:"o-search-input__input",children:[(0,v.jsx)("label",{"aria-label":t,className:"o-search-input__input-label",htmlFor:n,children:(0,v.jsx)(a7,{name:"search",isPresentational:!0})}),(0,v.jsx)(dz,{id:n,minLength:1,className:"typeahead-selector",disabled:r,isLoading:!1,ref:c,onChange:e=>{i(e),d()},onInputChange:e=>{a(e),h(e)},options:s,maxResults:o,placeholder:l,renderMenuItemChildren:e=>(0,v.jsx)("li",{className:"typeahead-option",children:(0,v.jsx)(dF,{label:e.label,position:e.position,value:e.value},e.key)}),inputProps:{id:n,className:"a-text-input a-text-input--full"}}),!!u&&(0,v.jsx)(dH,{onClear:d})]})})})};fg.propTypes={ariaLabel:s0().string.isRequired,isDisabled:s0().bool,handleChange:s0().func.isRequired,handleInputChange:s0().func.isRequired,htmlId:s0().string.isRequired,maxResults:s0().number,options:s0().array,placeholder:s0().string};let fv="state",fy=()=>{let{data:e,error:t}=l0(),n=structuredClone(t?[]:(null==e?void 0:e.state)||[]),r=ta(),i=ts(lL),a=e=>lE(e),o=Object.keys(iB).map(e=>{let t=a(e);return{key:e,label:t,position:0,normalized:t.toLowerCase(),value:e}}),[s,l]=(0,b.useState)(o);return(0,v.jsxs)(lg,{title:"State",desc:"The state in the mailing address provided by the consumer",className:"aggregation state",children:[(0,v.jsx)(fg,{ariaLabel:"Start typing to begin listing US states",htmlId:"state-typeahead",handleChange:e=>{r(lk(fv,[e[0].key]))},handleInputChange:e=>{let t=e.toLowerCase();""===t?l(o):l(o.map(n=>({key:n.key,label:n.label,normalized:n.normalized,position:n.normalized.indexOf(t),value:e})))},hasClearButton:!0,options:s,placeholder:"Enter state name or abbreviation"}),(0,v.jsx)(l2,{fieldName:fv,options:n,getLabel:a,selections:i})]})},fb="has_narrative",fx="SEARCHING",fw="NOTHING",f_=()=>{let e=ta(),t=ts(lD),n=ts(lG),r=fw;return n===iP?r=fx:t&&(r="FILTERING"),(0,v.jsxs)("section",{className:"single-checkbox",children:[(0,v.jsx)(sH,{type:"4",children:"Only show complaints with narratives?"}),(0,v.jsxs)("div",{className:"m-form-field m-form-field--checkbox",children:[(0,v.jsx)("input",{className:"a-checkbox",checked:r!==fw,disabled:r===fx,id:"filterHasNarrative",onChange:()=>{e(lC(fb))},type:"checkbox",value:fb}),(0,v.jsx)("label",{className:"a-label",htmlFor:"filterHasNarrative",children:"Yes"})]})]})},fk=e=>{let{fieldName:t,listComponent:n,options:r,perBucketProps:i=(e,t)=>t,hasMore:a=!1}=e,[o,s]=(0,b.useState)(a),l=i6(r,i3(ts(lN),t,[]),t),c=l.length>5?l.slice(0,5):l,u=l.length-5,h=e=>{let r=i(e,{fieldName:t,item:e,key:e.key});return(0,b.createElement)(n,r)};return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("ul",{children:o?l.map(e=>h(e)):c.map(e=>h(e))}),u>0?(0,v.jsx)("div",{children:(0,v.jsx)(sF,{label:o?"- Show ".concat(u," less"):"+ Show ".concat(u," more"),isLink:!0,className:"more",onClick:()=>{s(!o)}})}):null]})};fk.propTypes={fieldName:s0().string.isRequired,listComponent:s0().oneOfType([s0().element,s0().func,s0().object]).isRequired,options:s0().array.isRequired,perBucketProps:s0().func,hasMore:s0().bool};let fS=e=>{let{fieldName:t,title:n,desc:r}=e,{data:i,error:a}=l0(),o=i3(a?{}:i,t,[]);return(0,v.jsx)(lg,{title:n,desc:r,className:"aggregation simple "+t,children:(0,v.jsx)(fk,{fieldName:t,listComponent:l1,options:o})})};fS.propTypes={fieldName:s0().string.isRequired,title:s0().string.isRequired,desc:s0().string};let fM="zip_code",fA=()=>{let{data:e,error:t}=l0(),n=ts(lR),r=structuredClone(t?[]:(null==e?void 0:e.zip_code)||[]);return(0,v.jsxs)(lg,{title:"ZIP code",desc:"The mailing ZIP code provided by the consumer",className:"aggregation",children:[(0,v.jsx)(d9,{fieldName:fM,label:"Start typing to begin listing zip codes",placeholder:"Enter ZIP code",ariaLabel:"Start typing to begin listing zip codes",htmlId:fM+"typeahead",hasClearButton:!0}),(0,v.jsx)(l2,{fieldName:fM,options:r,selections:n})]})},fT="INDETERMINATE",fC="CHECKED",fP=e=>{let{fieldName:t,item:n,subitems:r}=e,i=ts(lN),a=ta(),[o,s]=(0,b.useState)(!1),l=i3(i,t,[]),c=l.filter(e=>0===e.indexOf(n.key)),u=c.filter(e=>-1!==e.indexOf("•")),h=c.filter(e=>e===n.key),d="UNCHECKED";0===h.length&&u.length>0?d=fT:h.length>0&&(d=fC);let f=i6(r.map(e=>({isDisabled:e.isDisabled,key:n.key+"•"+e.key,value:e.key,doc_count:e.doc_count})),l,t),p=i7("".concat(t," ").concat(n.key));return 0===f.length?(0,v.jsx)(l1,{item:n,fieldName:t},n.key):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("li",{className:"aggregation-branch ".concat(i7(n.key)," ").concat("parent m-form-field m-form-field--checkbox"),children:[(0,v.jsx)("input",{type:"checkbox","aria-label":n.key,disabled:n.isDisabled,checked:d===fC,className:"flex-fixed a-checkbox",id:p,onChange:()=>{let e=ar(n.key,r);if(u.forEach(t=>e.add(t)),d===fC)a(lS(t,[...e]));else{let e=l.filter(e=>-1===e.indexOf(n.key+"•"));e.push(n.key),a(lw(t,[...e]))}}}),(0,v.jsx)("label",{className:"toggle a-label ".concat(d===fT?" indeterminate":""),htmlFor:p,children:(0,v.jsx)("span",{className:"u-visually-hidden",children:n.key})}),(0,v.jsx)(sF,{label:n.key,iconRight:o?"up":"down",isLink:!0,className:"flex-all",onClick:()=>s(!o)}),(0,v.jsx)("span",{className:"flex-fixed parent-count",children:n.doc_count.toLocaleString()})]}),o?(0,v.jsx)("ul",{className:"children",children:f.map(e=>(0,v.jsx)(l1,{item:e,fieldName:t},e.key))}):null]})};fP.propTypes={fieldName:s0().string.isRequired,item:s0().shape({doc_count:s0().number.isRequired,key:s0().string.isRequired,value:s0().string,isDisabled:s0().bool}).isRequired,subitems:s0().array.isRequired};let fE=(e,t)=>{let{params:n,path:r}=t.payload;e.path=r,e.params=n,e.queryString=i0(n)},fO=nW({name:"routes",initialState:{path:"",params:{},queryString:""},reducers:{appUrlChanged:{reducer:fE,prepare:(e,t)=>({payload:{path:e,params:t}})},routeChanged:{reducer:fE,prepare:(e,t)=>(t.size&&(t.size=av(t.size.toString(),"size")),{payload:{path:e,params:t}})}}}),{appUrlChanged:fN,routeChanged:fj}=fO.actions;var fL=fO.reducer;let fD=i(9277),fR=nW({name:"actions",initialState:{actions:[]},reducers:{addAction:(e,t)=>{e.actions.push(t.payload)},clearActions:e=>{e.actions.length=0}}}),{addAction:fI,clearActions:fz}=fR.actions;fR.reducer;let fB=e=>{let{fieldName:t}=e,n=(0,b.useRef)(null),r=ta(),i=t.replace(/_/g," "),{data:a,error:o}=l0(),s=o||!a?[]:a[t]||[],l="sub_".concat(t,".raw").toLowerCase(),c=[],[u,h]=(0,b.useState)("");s.forEach(e=>{if(-1===c.findIndex(t=>t.key===e.key)){let t=tu({},e);t.isParent=!0,t.label=e.key,t.normalized=e.key.toLowerCase(),t.position=0,t.top={key:e.key,label:e.key,normalized:e.key.toLowerCase(),position:0},c.push(t)}e[l]&&e[l].buckets&&e[l].buckets.forEach(t=>{let n={key:e.key+"•"+t.key,label:t.key,normalized:t.key.toLowerCase(),position:0,top:{key:e.key,label:e.key,normalized:e.key.toLowerCase(),position:0}};c.push(n)})});let[d,f]=(0,b.useState)(c),p=()=>{n.current.clear(),h("")};return(0,v.jsx)("div",{className:"typeahead",children:(0,v.jsx)("div",{className:"o-search-input",children:(0,v.jsxs)("div",{className:"o-search-input__input",children:[(0,v.jsx)("label",{"aria-label":"Search "+t,className:"o-search-input__input-label",htmlFor:"filter-search"+t,children:(0,v.jsx)(a7,{name:"search",isPresentational:!0})}),(0,v.jsx)(dz,{id:"filter-search"+t,maxResults:5,minLength:2,className:"typeahead-selector",filterBy:["key"],onChange:e=>{r(ly(t,e[0].key)),p()},onInputChange:e=>{var t;let n;return h(t=e),void((n=t.toLowerCase())?f(c.map(e=>iV(tu({},e),{position:e.normalized.indexOf(n),value:t,top:iV(tu({},e.top),{position:e.top.normalized.indexOf(n),value:t})}))):f(c))},placeholder:"Enter name of "+i,labelKey:"key",options:d,ref:n,inputProps:{"aria-label":"".concat(i," Filter Menu Input"),className:"a-text-input a-text-input--full"},renderMenuItemChildren:e=>(0,v.jsxs)("li",{className:"typeahead-option typeahead-option--multi",children:[(0,v.jsx)(dF,tu({},e.top),e.value),e.isParent?null:(0,v.jsx)("div",{className:"typeahead-option__sub",children:e.value?(0,v.jsx)(dF,tu({},e),e.value):null})]})}),!!u&&(0,v.jsx)(dH,{onClear:p})]})})})};fB.propTypes={fieldName:s0().string.isRequired};let fF=e=>{let{desc:t,fieldName:n}=e,{data:r,error:i}=l0(),a=ts(lN)[n]||[],o=ts(l7),s=ts(l4),l=ts(fh),c="sub_".concat(n,".raw"),u=((e,t,n,r,i,a)=>{var o;let s,l=(s=i6(e,o=t||[],a),o.length>0&&o.forEach(e=>{if(-1!==e.indexOf("•")){let t,n;i4(s,e.split("•")[0],a),t=s.find(t=>t.key===e.split("•")[0]),t[n="sub_".concat(a,".raw")]&&!t[n].buckets.find(t=>t.key===e.split("•")[1])&&t[n].buckets.push({key:e.split("•")[1],doc_count:0})}else i4(s,e,a)}),s),c="sub_".concat(a,".raw");if(n){let e="Trends"===i&&r.toLowerCase()===a;l.forEach(t=>{t.isDisabled=!!e&&t.key!==n,t[c]&&t[c].buckets.forEach(n=>{n.isDisabled=!!e&&t.isDisabled})})}return l})(i?[]:(null==r?void 0:r[n])||[],a,o,s,l,n);return(0,v.jsxs)(lg,{title:("string"!=typeof n||0===n.length?n:n.charAt(0).toUpperCase()+n.slice(1))+" / sub-"+n,desc:t,className:"aggregation "+n,children:[o&&s.toLowerCase()===n?null:(0,v.jsx)(fB,{fieldName:n}),(0,v.jsx)(fk,{fieldName:n,listComponent:fP,options:u,perBucketProps:(e,t)=>(t.subitems=e[c]?e[c].buckets:[],t)})]})};fF.propTypes={desc:s0().string.isRequired,fieldName:s0().string.isRequired};let fH=()=>{let e=ta(),t=ts(fd),n=ts(fl);return(0,v.jsx)(v.Fragment,{children:!!n&&(0,v.jsxs)("section",{className:"filter-panel",children:[t<750&&(0,v.jsx)("div",{className:"filter-button",children:(0,v.jsx)(sF,{label:"Close filters",iconRight:"error",title:"Close filters",onClick:()=>e(lu())})}),(0,v.jsx)(sH,{type:"3",children:"Filter results by..."}),(0,v.jsx)(fm,{}),(0,v.jsx)("hr",{}),(0,v.jsx)(fF,{desc:"The type of product and sub-product the consumer identified in the complaint",fieldName:"product"}),(0,v.jsx)("hr",{}),(0,v.jsx)(fF,{desc:"The type of issue and sub-issue the consumer identified in the complaint",fieldName:"issue"}),(0,v.jsx)("hr",{}),(0,v.jsx)(fy,{}),(0,v.jsx)("hr",{}),(0,v.jsx)(fA,{}),(0,v.jsx)("hr",{}),(0,v.jsx)(fe,{}),(0,v.jsx)("hr",{}),(0,v.jsx)(fS,{title:"Did company provide a timely response?",desc:"Whether the company gave a timely response",fieldName:"timely"}),(0,v.jsx)("hr",{}),(0,v.jsx)(fS,{title:"Company response to consumer",desc:"This is how the company responded. For example,\n 'Closed with explanation'.",fieldName:"company_response"}),(0,v.jsx)("hr",{}),(0,v.jsx)(fS,{title:"Company public response",desc:"The company's optional public-facing response to a consumer's complaint. Companies can choose to select a response from a pre-set list of options that will be posted on the public database.",fieldName:"company_public_response"}),(0,v.jsx)("hr",{}),(0,v.jsx)(fa,{}),(0,v.jsx)("hr",{}),(0,v.jsx)(f_,{}),(0,v.jsx)("hr",{}),(0,v.jsx)(fS,{title:"How did the consumer submit the complaint to the CFPB?",fieldName:"submitted_via",desc:""}),(0,v.jsx)("hr",{}),(0,v.jsx)(fS,{title:"Tags",desc:"Data that supports easier searching and sorting of complaints submitted by or on behalf of consumers",fieldName:"tags"})]})})},f$=()=>{let e=ts(fh);return ts(fd)>749?(0,v.jsx)("aside",{className:"content__sidebar ".concat(e.toLowerCase()),children:(0,v.jsx)(fH,{})}):null},fU=e=>{let{text:t,closeFn:n}=e;return(0,v.jsxs)("div",{role:"alert",className:"warning m-notification m-notification--visible m-notification--warning",children:[(0,v.jsx)(a7,{name:"warning-round",isPresentational:!0}),(0,v.jsx)("div",{className:"m-notification__content",children:(0,v.jsx)("div",{className:"m-notification__message",children:t})}),n?(0,v.jsx)("button",{onClick:n,onKeyDown:n,"aria-label":"Dismiss",className:"close",children:(0,v.jsx)(a7,{name:"error",isPresentational:!0})}):""]})};fU.propTypes={text:s0().string.isRequired,closeFn:s0().func};let fV=()=>{let{data:e}=l0();return i5([null==e?void 0:e.hasDataIssue,null==e?void 0:e.isDataStale])?(0,v.jsx)("div",{children:(0,v.jsx)(fU,{text:"We’re currently experiencing technical issues that have delayed the refresh of data on the Consumer Complaint Database. We expect to refresh the data in the next few days."})}):null},fq=()=>{let e=ta(),t=ts(fh),{data:n,error:r}=l0(),i=r?0:(null==n?void 0:n.doc_count)||0,a=r?0:(null==n?void 0:n.total)||0;return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("div",{className:"action-bar",id:"search-summary",children:[a===i?(0,v.jsx)(sH,{type:"2",children:"Showing "+i.toLocaleString()+" total complaints"}):(0,v.jsx)(sH,{type:"2",children:"Showing "+a.toLocaleString()+" matches out of "+i.toLocaleString()+" total complaints"}),r?null:(0,v.jsx)("div",{children:(0,v.jsxs)(sH,{type:"3",className:"h4 flex-all export-results",children:[(0,v.jsx)(sF,{label:"Export data",isLink:!0,className:"export-btn","data-gtm_ignore":"true",onClick:()=>{ai("Export",t+":User Opens Export Modal"),e(ln(iA))}}),(0,v.jsx)(sF,{label:"Print",isLink:!0,iconLeft:"print",className:"print-preview",onClick:()=>{ai("Print","tab:"+t),e(ld())}})]})})]}),(0,v.jsx)(fV,{})]})},fY=e=>{var t;let n,{row:r}=e,i=r.complaint_id.replace(/(<em>)?(.*?)(<\/em>)?/gi,"$2"),a="detail/"+r.complaint_id.replace(/(<em>)?(.*?)(<\/em>)?/gi,"$2"),o=e=>(0,v.jsx)("span",{dangerouslySetInnerHTML:{__html:e}});return(0,v.jsx)("li",{className:"card-container",children:(0,v.jsxs)("div",{className:"card",children:[(0,v.jsxs)("div",{className:"card-left layout-column",children:[(0,v.jsx)(sH,{type:"3",className:"to-detail",children:(0,v.jsx)(eQ,{to:a,"aria-label":"Complaint "+i1(i),children:i})}),(0,v.jsx)(sH,{type:"4",children:"Company name"}),o(r.company),(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Company response to consumer"}),o(r.company_response),(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Timely response?"}),o(r.timely)]}),(0,v.jsxs)("div",{className:"card-right layout-column",children:[(0,v.jsxs)("div",{className:"layout-row",children:[(0,v.jsxs)("div",{className:"layout-row",children:[(0,v.jsx)(sH,{type:"4",children:"Date received:"}),(0,v.jsx)("span",{children:ib(r.date_received)})]}),(0,v.jsx)("div",{className:"spacer"}),(0,v.jsxs)("div",{className:"layout-row",children:[(0,v.jsx)(sH,{type:"4",children:"Consumer’s state:"}),o(r.state)]})]}),(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Product"}),(0,v.jsx)(sH,{type:"3",dangerouslySetInnerHTML:{__html:r.product}}),r.sub_product?(0,v.jsxs)("div",{className:"layout-row",children:[(0,v.jsx)("span",{className:"subitem",children:"Sub-product:"}),o(r.sub_product)]}):null,(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Issue"}),(0,v.jsx)(sH,{type:"3",dangerouslySetInnerHTML:{__html:r.issue}}),r.sub_issue?(0,v.jsxs)("div",{className:"layout-row",children:[(0,v.jsx)("span",{className:"subitem",children:"Sub-issue:"}),o(r.sub_issue)]}):null,(t=r.complaint_what_happened||"",n=t.length>300,(t=t.substring(0,300))?(0,v.jsxs)("div",{children:[(0,v.jsx)(sH,{type:"4",className:"u-mt15",children:"Consumer Complaint Narrative"}),o(t),n?(0,v.jsxs)("span",{children:[" ",(0,v.jsx)(eQ,{to:a,children:"[...]"})]}):null]}):null)]})]})})};fY.propTypes={row:s0().object.isRequired};let fW=e=>{let{text:t}=e;return(0,v.jsxs)("div",{role:"alert",className:"error m-notification m-notification--visible m-notification--error",children:[(0,v.jsx)(a7,{name:"error-round",isPresentational:!0}),(0,v.jsx)("div",{className:"m-notification__content",children:(0,v.jsx)("div",{className:"m-notification__message",children:t})})]})};fW.propTypes={text:s0().string.isRequired};let fG=()=>{let e=ta(),t=ts(fl);return(0,v.jsx)("section",{className:"filter-panel-toggle"+(t?"":" u-mt30"),children:(0,v.jsx)("div",{className:"m-btn-group",children:(0,v.jsx)(sF,{label:t?"Close filters":"Filter results",className:"filter-toggle-button",onClick:()=>{e(lu())},iconRight:t?"error":"filter"})})})},fX="has_narrative",fK=()=>{let e=ta(),t=!0===ts(lD);return(0,v.jsxs)("section",{className:"narratives-buttons",children:[(0,v.jsx)(sY,{children:"Read"}),(0,v.jsxs)("div",{className:"m-btn-group",children:[(0,v.jsx)(sF,{id:"btn-add-narratives",label:"Only complaints with narratives",className:aa(!0,t),disabled:t,onClick:()=>{e(ly(fX,""))}}),(0,v.jsx)(sF,{id:"btn-remove-narratives",label:"All complaints",className:aa(!1,!!t),disabled:!t,onClick:()=>{e(lb(fX,""))}})]})]})},fZ=()=>{let e,t=ts(lN),n=ts(lF),r=ts(fh),i=ts(s5);return aV((e=Object.keys(t),Object.assign({no_aggs:!0},lB(n),lz(t,e))),{skip:i5(["List"!==r,""===i,!ts(lU)])})},fQ=()=>{let e=ta(),t=ts(lW),{data:n,error:r}=fZ(),i=null==n?void 0:n.hits,a=(null==n?void 0:n.totalPages)||0,o=null==n?void 0:n.breakPoints;return!r&&i&&i.length>0?(0,v.jsxs)("nav",{className:"m-pagination",role:"navigation","aria-label":"Pagination",children:[(0,v.jsx)(sF,{label:"Previous",iconLeft:"left",className:"a-btn m-pagination__btn-prev",onClick:()=>void e(d2(o)),disabled:t<=1}),(0,v.jsx)(sF,{label:"Next",iconRight:"right",className:"a-btn m-pagination__btn-next",onClick:()=>void e(d1(o)),disabled:t>=a}),(0,v.jsx)("div",{className:"m-pagination__form",children:(0,v.jsxs)("label",{className:"m-pagination__label",children:["Page ",t]})})]}):null},fJ=e=>{let{id:t,handleChange:n,label:r,title:i,value:a,values:o}=e,s="select-"+t,l=(0,b.useMemo)(()=>Array.isArray(o)?Object.prototype.hasOwnProperty.call(o[0],"name")?o:o.map(e=>({name:e,value:e,disabled:e.disabled})):Object.keys(o).map(e=>({name:o[e],value:e,disabled:e.disabled})),[o]);return(0,v.jsxs)("section",{className:"cf-select","data-tour":s,children:[(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:s,children:r}),(0,v.jsx)("p",{children:i}),(0,v.jsx)("select",{value:a,id:s,onChange:n,children:l.map(e=>(0,v.jsx)("option",{disabled:[e.value,e.name].includes(a)||e.disabled,value:e.value||e.name,children:e.name},e.name))})]})};fJ.propTypes={id:s0().string,handleChange:s0().func.isRequired,label:s0().string,title:s0().string,values:s0().oneOfType([s0().array,s0().object]).isRequired,value:s0().oneOfType([s0().string,s0().number])};let f0=()=>(0,v.jsx)("span",{className:"separator"}),f1=()=>{let e=ta(),t=ts(fh),n=e=>{let n=e.toLowerCase()+" tab";return t===e?n+" active":n};return(0,v.jsx)("div",{className:"tabbed-navigation","data-tour":"tabbed-navigation",children:(0,v.jsxs)("section",{children:[(0,v.jsxs)("button",{className:n("Trends"),onClick:()=>e(ls("Trends")),children:[(0,v.jsx)(a7,{name:"chart",isPresentational:!0}),"Trends"]}),(0,v.jsxs)("button",{className:n("List"),onClick:()=>e(ls("List")),children:[(0,v.jsx)(a7,{name:"list",isPresentational:!0}),"List"]}),(0,v.jsxs)("button",{className:n("Map"),onClick:()=>e(ls("Map")),children:[(0,v.jsx)(a7,{name:"map",isPresentational:!0}),"Map"]})]})})},f2="NO_RESULTS",f3=()=>{let e=ta(),{data:t,isLoading:n,isFetching:r,error:i}=fZ(),a=ts(lK),o=ts(lZ),s=ts(fd),l=(0,b.useMemo)(()=>s<750,[s]),c=(null==t?void 0:t.hits)||[],u=i?"ERROR":n||r||0===c.length?f2:c.length>0?"RESULTS":f2;return(0,v.jsxs)("section",{className:"list-panel",children:[(0,v.jsx)(fq,{}),(0,v.jsx)(f1,{}),!!l&&(0,v.jsx)(fH,{}),(0,v.jsx)(fG,{}),(0,v.jsxs)("div",{className:"layout-row refine-bar",children:[(0,v.jsx)(f0,{}),(0,v.jsx)(fJ,{label:"Select the number of results to display at a time",title:"Show",values:iI,id:"size",value:a,handleChange:t=>{let n=t.target.value;ai("Dropdown",n+" results"),e(d7(n))}}),(0,v.jsx)(fJ,{label:"Choose the order in which the results are displayed",title:"Sort",values:iz,id:"sort",value:o,handleChange:t=>{let{value:n}=t.target;ai("Dropdown",iz[n]),e(d4(n))}}),(0,v.jsx)(fK,{})]}),({ERROR:()=>(0,v.jsx)(fW,{text:"There was a problem executing your search"}),NO_RESULTS:()=>(0,v.jsx)(sH,{type:"2",children:"No results were found for your search"}),RESULTS:()=>(0,v.jsx)("ul",{className:"cards-panel",children:c.map(e=>(0,v.jsx)(fY,{row:e},e.complaint_id))})})[u](),(0,v.jsx)(fQ,{}),(0,v.jsx)(s2,{isLoading:n||r})]})},f5=e=>{let{fieldName:t,value:n,displayValue:r,onRemove:i}=e,{data:a,error:o}=l0(),s=ts(lN),l=i3(a,t,[]),c=i3(s,t,[]),u=(e=>{if("timely"===e){let t=e.replace(/_/g," ");return t[0].toUpperCase()+t.slice(1)+": "}return""})(t),h=(r||n).split("•").pop(),d=ta();return o?null:(0,v.jsx)("li",{children:(0,v.jsxs)("button",{className:"a-tag-filter","aria-label":"".concat(u).concat(h),onClick:()=>{if(i)return void i(n);if("date_received"===t)d(dQ("All"));else if(iD.includes(t)){let e=lO(n,c,l,t);d(lw(t,e))}else d(lb(t,n))},children:[u,h,(0,v.jsx)("span",{className:"a-btn--icon a-btn--icon--on-right",children:(0,v.jsx)(a7,{name:"error",isPresentational:!0})})]})})};f5.propTypes={fieldName:s0().string.isRequired,value:s0().string.isRequired,displayValue:s0().string,onRemove:s0().func};let f7=()=>{let e=ta(),t=(ts(lL)||[]).filter(e=>e in iB);return t.length>0&&(0,v.jsxs)("div",{className:"map-toolbar",children:[(0,v.jsx)("section",{className:"state-heading",children:(0,v.jsx)("span",{className:"state-heading__title",children:"State filters applied"})}),(0,v.jsx)("section",{className:"state-filters",children:(0,v.jsxs)("ul",{className:"state-filters__list m-tag-group",children:[t.map(t=>(0,v.jsx)(f5,{fieldName:"state",value:t,displayValue:lE(t),onRemove:()=>e(lT({abbr:t}))},t)),(0,v.jsx)("li",{className:"state-filters__clear",children:(0,v.jsx)(sF,{appearance:"warning",label:"Clear state filters",isLink:!0,"aria-label":"Clear all state filters",className:"state-filters__clear-button",onClick:()=>{e(lA())}})})]})})]})};var f4=i(9446),f6=i(8989),f9=i(6866);let f8=e=>{let{helperText:t,id:n,colorScheme:r,data:i,title:a,total:o}=e,s=ta(),{data:l}=l0(),c=ts(fh),u=ts(l4),h=ts(fs),d=ts(fc),f=ts(fd),p="Map"===c?"Product":u;return((0,b.useEffect)(()=>{let e="#row-chart-"+n,t=(e,t,n)=>{e.each(function(){let e=f4.select(this),r=n?e.attr("x"):0;if(e.node().children&&e.node().children.length>0)return;let i=e.text().split(/\s+/).reverse(),a=e.attr("y")||0,o=parseFloat(e.attr("dy")||0),s,l=[],c=0,u=0,h=e.text(null).append("tspan").attr("x",r).attr("y",a).attr("dy",o+"em");for(;s=i.pop();)l.push(s),h.text(l.join(" ")),h.node().getComputedTextLength()>t&&(l.pop(),h.text(l.join(" ")),l=[s],h=e.append("tspan").attr("x",r).attr("y",a).attr("dy",1.1*++c+o+"em").text(s),u++);if(u){let t=f4.select(e.node().parentNode).select(".view-more-background"),n=parseFloat(t.attr("height"))+12*u;t.attr("height",n)}})};if(!i)return;let a=i.filter(e=>!e.name||!d||-1===e.name.indexOf("Visualize trends for"));if(!a||!a.length||!o)return;let c=(0,f9.miniTooltip)();c.valueFormatter(e=>e.toLocaleString()+" complaints");let u=o/(0,f6.A)(a,e=>e.value),m=ah(),g=f4.select(m).select(e),v=d?750:g.node().getBoundingClientRect().width,y=1===a.length?100:60*a.length,b=(0,f9.row)(),x=v/4;return b.margin({left:x,right:v<600?40:-100,top:20,bottom:10}).colorSchema(r).backgroundColor("#f7f8f9").paddingBetweenGroups(25).enableLabels(!0).labelsTotalCount(o.toLocaleString()).labelsNumberFormat(",d").outerPadding(.1).percentageAxisToMaxRatio(u).yAxisLineWrapLimit(2).yAxisPaddingBetweenChart(20).width(v).wrapLabels(!0).height(y).on("customMouseOver",c.show).on("customMouseMove",c.update).on("customMouseOut",c.hide),g.datum(a).call(b),f4.select(m).selectAll(e+" .row-chart .metadata-group").datum([]).call(c),t(f4.select(m).select(e).selectAll(".tick text"),x),t(f4.select(m).select(e).selectAll(".view-more-label"),f/2,!0),g.selectAll(".y-axis-group .tick").on("click",e=>{let t=e.target.__data__;i.filter(e=>e.isParent).map(e=>e.name).includes(t)&&(h.includes(t)?(ai("Bar chart collapsed",t),s(li(t))):(ai("Bar chart expanded",t),s(la(t))))}),g.selectAll(".view-more-label").on("click",e=>{let t,n=e.target.__data__,r="Overview"===p?"Product":p,i=i3(l,r.toLowerCase(),[]);(t=af("search-summary"))&&t.scrollIntoView();let a=[];if("Company"===p)a.push(n.parent);else{let e=i.find(e=>e.key===n.parent),t="sub_"+r.toLowerCase()+".raw";a=e?ar(n.parent,e[t].buckets):[]}ai("Trends click",n.parent),s(aI(n.parent,p,[...a]))}),()=>{f4.select(m).selectAll(e+" .row-chart").remove()}},[s,l,r,i,h,n,d,p,o,f]),i&&o)?(0,v.jsxs)("div",{className:"row-chart-section","data-tour":"row-chart-section",children:[(0,v.jsx)(sH,{type:"3",children:a}),(0,v.jsx)(sY,{children:t}),(0,v.jsx)("div",{id:"row-chart-"+n,"data-testid":"row-chart-"+n})]}):null};f8.propTypes={helperText:s0().string,id:s0().string.isRequired,colorScheme:s0().oneOfType([s0().array,s0().bool]).isRequired,data:s0().array.isRequired,title:s0().string.isRequired,total:s0().number};var pe=i(8998),pt=i.n(pe);i(8847);let pn={AL:"M550,-337L633,-337,633,-253,550,-253,550,-337",AK:"M92,-245L175,-245,175,-162,92,-162,92,-245",AZ:"M92,-428L175,-428,175,-345,92,-345,92,-428",AR:"M367,-428L450,-428,450,-345,367,-345,367,-428",CA:"M0,-520L83,-520,83,-437,0,-437,0,-520",CO:"M183,-520L267,-520,267,-437,183,-437,183,-520",CT:"M825,-612L908,-612,908,-528,825,-528,825,-612",DE:"M825,-520L908,-520,908,-437,825,-437,825,-520",DC:"M733,-428L817,-428,817,-345,733,-345,733,-428",FL:"M733,-245L817,-245,817,-162,733,-162,733,-245",GA:"M642,-337L725,-337,725,-253,642,-253,642,-337",HI:"M0,-245L83,-245,83,-162,0,-162,0,-245",ID:"M92,-703L175,-703,175,-620,92,-620,92,-703",IL:"M458,-703L542,-703,542,-620,458,-620,458,-703",IN:"M458,-612L542,-612,542,-528,458,-528,458,-612",IA:"M367,-612L450,-612,450,-528,367,-528,367,-612",KS:"M275,-428L358,-428,358,-345,275,-345,275,-428",KY:"M458,-520L542,-520,542,-437,458,-437,458,-520",LA:"M367,-337L450,-337,450,-253,367,-253,367,-337",ME:"M917,-887L1000,-887,1000,-803,917,-803,917,-887",MD:"M733,-520L817,-520,817,-437,733,-437,733,-520",MA:"M825,-703L908,-703,908,-620,825,-620,825,-703",MI:"M550,-703L633,-703,633,-620,550,-620,550,-703",MN:"M367,-703L450,-703,450,-620,367,-620,367,-703",MS:"M458,-337L542,-337,542,-253,458,-253,458,-337",MO:"M367,-520L450,-520,450,-437,367,-437,367,-520",MT:"M183,-703L267,-703,267,-620,183,-620,183,-703",NE:"M275,-520L358,-520,358,-437,275,-437,275,-520",NV:"M92,-612L175,-612,175,-528,92,-528,92,-612",NH:"M917,-795L1000,-795,1000,-712,917,-712,917,-795",NJ:"M733,-612L817,-612,817,-528,733,-528,733,-612",NM:"M183,-428L267,-428,267,-345,183,-345,183,-428",NY:"M733,-703L817,-703,817,-620,733,-620,733,-703",NC:"M550,-428L633,-428,633,-345,550,-345,550,-428",ND:"M275,-703L358,-703,358,-620,275,-620,275,-703",OH:"M550,-612L633,-612,633,-528,550,-528,550,-612",OK:"M275,-337L358,-337,358,-253,275,-253,275,-337",OR:"M0,-612L83,-612,83,-528,0,-528,0,-612",PA:"M642,-612L725,-612,725,-528,642,-528,642,-612",RI:"M917,-612L1000,-612,1000,-528,917,-528,917,-612",SC:"M642,-428L725,-428,725,-345,642,-345,642,-428",SD:"M275,-612L358,-612,358,-528,275,-528,275,-612",TN:"M458,-428L542,-428,542,-345,458,-345,458,-428",TX:"M275,-245L358,-245,358,-162,275,-162,275,-245",UT:"M92,-520L175,-520,175,-437,92,-437,92,-520",VT:"M825,-795L908,-795,908,-712,825,-712,825,-795",VA:"M642,-520L725,-520,725,-437,642,-437,642,-520",WA:"M0,-703L83,-703,83,-620,0,-620,0,-703",WV:"M550,-520L633,-520,633,-437,550,-437,550,-520",WI:"M458,-795L542,-795,542,-712,458,-712,458,-795",WY:"M183,-612L267,-612,267,-528,183,-528,183,-612"},pr="#ffffff";function pi(e){return e<1e3?e.toLocaleString():e<1e4?(Math.floor(e/100)/10).toFixed(1)+"K":e<1e6?Math.floor(e/1e3)+"K":(Math.floor(e/1e5)/10).toFixed(1)+"M"}function pa(e,t){let n=10**t;return Math.round(e*n)/n}function po(e){return e&&0!==e.length?e.reduce((e,t)=>Math.max(e,Number.isFinite(t.displayValue)?t.displayValue:0),0):0}function ps(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,r=po(e);return 0===r?[]:function(e){let{colors:t,binCount:n,maxValue:r}=e,i=[],a=r/n,o=r>=n?0:1;for(let e=0;e<n;e+=1){let r=pa(a*e,o),s=e===n-1?void 0:pa(a*(e+1),o);i.push({from:r,to:s,color:t[e],name:"",shortName:""})}return i}({colors:t,binCount:n,maxValue:r})}let pl=(a=1/0,o=-1/0,s=1/0,l=-1/0,(Object.values(pn).forEach(e=>{let t=e.match(/-?\d+(?:\.\d+)?/g);if(t)for(let e=0;e<t.length;e+=2){let n=Number(t[e]),r=Number(t[e+1]);Number.isFinite(n)&&(a=Math.min(a,n),o=Math.max(o,n),Number.isFinite(r)&&(s=Math.min(s,r),l=Math.max(l,r)))}}),Number.isFinite(a)&&Number.isFinite(o)&&Number.isFinite(s)&&Number.isFinite(l))?{width:o-a,height:l-s}:{width:1e3,height:725}),pc=pl.width,pu=pl.height;function ph(e){return"".concat(e.fullName," ").concat(e.displayValue)}function pd(){let e=".tile-"+this.name;f4.select(ah()).select(e).classed("hover",!1)}function pf(){let e=".tile-"+this.name;f4.select(ah()).select(e).classed("hover",!0)}function pp(){let e=this.point||this,t="number"==typeof e.displayValue?e.displayValue>=1e3?"".concat(Math.floor(e.displayValue/1e3),"K"):e.displayValue.toLocaleString():e.displayValue||"";return'<div class="highcharts-data-label-state tile-'+e.name+" "+e.className+' "><p class="abbr">'+e.name+'</p><p class="value">'+t+"</p></div>"}function pm(){let e=this.product?'<div class="row row--product"><p class="u-float-left">Product with highest complaint volume</p><p class="u-right">'.concat(this.product,"</p></div>"):"",t=this.issue?'<div class="row row--issue"><p class="u-float-left">Issue with highest complaint volume</p><p class="u-right">'.concat(this.issue,"</p></div>"):"",n=this.value.toLocaleString(),r=lE(this.name);return'<h4 class="title">'.concat(r,"</h4>")+'<div class="row row--count"><p class="u-float-left">Complaint count</p><p class="u-right">'.concat(n,"</p></div>")+'<div class="row row--count-mobile"><p class="u-right">'.concat("".concat(n," complaints"),"</p></div>")+e+t}function pg(e,t){for(let n of t)if(e[n])return n;return null}function pv(e,t,n){return Math.min(Math.max(e,t),n)}let py="foreignObject body > div";function pb(e,t,n){var r,i;if(!n)return{x:0,y:0};let a=this.chart,o=function(e){let t,n,r,{plotX:i,plotY:a,plotWidth:o,plotHeight:s,labelWidth:l,labelHeight:c}=e,u=function(e){let{plotX:t,plotY:n,plotWidth:r,plotHeight:i,labelWidth:a,labelHeight:o}=e,s=function(e){let{spaces:t,labelWidth:n,labelHeight:r,gap:i}=e;return{top:t.top>=r+i,bottom:t.bottom>=r+i,left:t.left>=n+i,right:t.right>=n+i}}({spaces:function(e){let{plotX:t,plotY:n,plotWidth:r,plotHeight:i}=e;return{top:n,bottom:i-n,left:t,right:r-t}}({plotX:t,plotY:n,plotWidth:r,plotHeight:i}),labelWidth:a,labelHeight:o,gap:12}),l=pg(s,function(e){let{plotX:t,plotY:n,plotWidth:r,plotHeight:i}=e;return t<=.33*r?["right","top","bottom","left"]:t>=.66*r?["left","top","bottom","right"]:n<=.33*i?["bottom","left","right","top"]:n>=.66*i?["top","left","right","bottom"]:["top","bottom","right","left"]}({plotX:t,plotY:n,plotWidth:r,plotHeight:i})),c=pg(s,["top","bottom","right","left"]);return l||c||"top"}({plotX:i,plotY:a,plotWidth:o,plotHeight:s,labelWidth:l,labelHeight:c}),h=(t=i-l/2,"bottom"===u?{coordX:t,coordY:a+12}:"left"===u?{coordX:i-l-12,coordY:a-c/2}:"right"===u?{coordX:i+12,coordY:a-c/2}:{coordX:t,coordY:a-c-12}),d=pv(h.coordX,0,o-l),f=pv(h.coordY,0,s-c);return{caretPos:(n=Math.max(l-16,0),r=Math.max(c-16,0),"left"===u||"right"===u?pv(a-f-8,12,r-12):pv(i-d-8,12,n-12)),placement:u,coordX:d,coordY:f}}({plotX:null!=(r=n.plotX)?r:0,plotY:null!=(i=n.plotY)?i:0,plotWidth:a.plotWidth,plotHeight:a.plotHeight,labelWidth:e,labelHeight:t});return!function(e,t,n){var r,i,a,o;let s,l,c,{wrapper:u,content:h}=(l=(null==(s=(null==e?void 0:e.element)||null)||null==(r=s.classList)?void 0:r.contains("highcharts-tooltip"))?s:(null==s||null==(i=s.closest)?void 0:i.call(s,".highcharts-tooltip"))||(null==s?void 0:s.parentNode)||null,c=(null==s||null==(a=s.querySelector)?void 0:a.call(s,py))||(null==l||null==(o=l.querySelector)?void 0:o.call(l,py))||null,{wrapper:l,content:c});(null==u?void 0:u.setAttribute)&&(u.setAttribute("data-caret",t),u.style.setProperty("--caret-pos","".concat(n,"px"))),(null==h?void 0:h.setAttribute)&&(h.setAttribute("data-caret",t),h.style.setProperty("--caret-pos","".concat(n,"px")))}(this.label,o.placement,o.caretPos),{x:a.plotLeft+o.coordX,y:a.plotTop+o.coordY}}pt().setOptions({lang:{thousandsSep:","}});let px=["rgb(240, 247, 246)","rgb(212, 231, 230)","rgb(180, 210, 209)","rgb(137, 182, 181)","rgb(87, 150, 149)"];var pw=class{draw(e,t){pt().mapChart(e,t)}constructor({el:e,data:t,events:n,height:r,hasTip:i,width:a}){const o=function(e,t){let n=po(e);return f4.scaleQuantize().domain([0,n>0?n:1]).range(t)}(t,px),s=Number.isFinite(a)?a:pc,l=ps(t,px),c="Complaints",u={accessibility:{description:"",screenReaderSection:{afterChartFormat:"",beforeChartFormat:""},pointNavigation:{order:"xy"}},bins:l,chart:{styledMode:!0,height:r,width:a,margin:[1,3,1,3]},colorAxis:{dataClasses:l,dataClassColor:"category"},title:!1,credits:!1,legend:{enabled:!1,legendTitle:c},tooltip:{className:"tilemap-tooltip",enabled:i,headerFormat:"",pointFormatter:pm,useHTML:!0,borderWidth:0,shadow:!1,style:{padding:0},positioner:pb},plotOptions:{series:{dataLabels:{enabled:!0,formatter:pp,useHTML:!0},states:{hover:{enabled:i}}}},series:[{type:"map",clip:!1,data:t=function(e,t,n){e=e.filter(function(e){return!!e.name});let r=Number.isFinite(n)?n:0;return(e=e.map(function(e){var n,i;let a,o,s=function(e,t){if(!e||!Number.isFinite(t)||t<=0)return e;let n=e.match(/-?\d+(?:\.\d+)?/g);if(!n||n.length<8)return e;let r=Number(n[0]),i=Number(n[1]),a=Number(n[2]),o=Number(n[5]);if(![r,i,a,o].every(Number.isFinite))return e;let s=r+t,l=i+t,c=a-t,u=o-t;return"M".concat(s,",").concat(l,"L").concat(c,",").concat(l,",").concat(c,",").concat(u,",").concat(s,",").concat(u,",").concat(s,",").concat(l)}(pn[e.name],r),l=(o=function(e){if(!(Array.isArray(e)&&e.length>=8))return null;let t={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0};for(let n=0;n<e.length;n+=2){let r=e[n],i=e[n+1];Number.isFinite(r)&&Number.isFinite(i)&&(t.minX=Math.min(t.minX,r),t.maxX=Math.max(t.maxX,r),t.minY=Math.min(t.minY,i),t.maxY=Math.max(t.maxY,i))}return Number.isFinite(t.minX)&&Number.isFinite(t.maxX)&&Number.isFinite(t.minY)&&Number.isFinite(t.maxY)?t:null}((a=s.match(/-?\d+(?:\.\d+)?/g))?a.map(e=>Number(e)):[]))?{centerX:(o.minX+o.maxX)/2,centerY:(o.minY+o.maxY)/2}:{centerX:0,centerY:0},c=(n=e.displayValue,i=t,null!=n&&n?i(n):pr);return"selected"!==e.className&&c===pr&&(e.className="empty"),iV(tu({},e),{color:c,path:s,sortX:l.centerX,sortY:l.centerY})})).sort((e,t)=>e.sortY!==t.sortY?e.sortY-t.sortY:e.sortX-t.sortX),e}(t,o,4*pc/(2*s)),accessibility:{description:c+" in the United States",exposeAsGroupOnly:!1,keyboardNavigation:{enabled:!0},descriptionFormatter:ph}}]};if(n&&i){const{click:e}=n,t=function(e,t){if(null==e)return{};var n,r,i,a={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),i=0;i<n.length;i++)r=n[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r]);return a}if(a=function(e,t){if(null==e)return{};var n,r,i={},a=Object.getOwnPropertyNames(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),i=0;i<n.length;i++)r=n[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r]);return a}(n,["click"]);Object.keys(t).length&&(u.plotOptions.series.events=t),u.plotOptions.series.point={events:{mouseOver:pf,mouseOut:pd,click:function(t){e&&e(t?iV(tu({},t),{point:this}):{point:this})}}}}this.draw(e,u)}};let p_=()=>{let e=ts(lN),t=ts(lF),n=ts(fh),r=ts(s5),i=i5([!ts(lU),"Map"!==n,""===r]);return aq(lI(e,t),{skip:i})},pk=()=>{let e=ta(),t=ts(lL),n=ts(fc),r=ts(fd),{data:i}=p_(),a=null==i?void 0:i.results.state,o=(0,b.useMemo)(()=>a?a.map(e=>{let t=structuredClone(e),n=i3(iH,e.name,{name:""});return t.abbr=t.name,t.fullName=n.name,t}):null,[a]),s=!n,l=(0,b.useCallback)(n=>{let{abbr:r,fullName:i}=n.point,a={abbr:r,name:i};t&&t.includes(r)?(ai("State Event: remove",a.abbr),e(lT(a))):(ai("State Event: add",a.abbr),e(lM(a)))},[t,e]),c=(0,b.useCallback)(()=>{var e,i;let a=af("tile-chart-map"),c=a.clientWidth||r,u=n?650:c;if(!o)return;let h={el:a,data:(e=o,i=t,e.map(e=>{var t;return iV(tu({},e),{displayValue:e.value,className:(t=e.name,i&&0!==i.length?i.includes(t)?"selected":"deselected":"")})})),events:{click:l},hasTip:s,width:u};h.height=Math.round(pu/pc*u)+50*(r<750),new pw(h)},[o,s,n,t,r,l]);return(0,b.useEffect)(()=>(c(),function(){let e=af("tile-chart-map");if(e)for(;e.firstChild;)e.firstChild.remove()}),[c]),(0,v.jsx)("div",{id:"tile-chart-map",className:"cfpb-chart ".concat(n?"print":""),"data-chart-type":"tile_map","data-testid":"tile-chart-map"})},pS=()=>{var e;let{data:t,isLoading:n,isFetching:r}=p_(),i=null==t||null==(e=t.results)?void 0:e.state,a=(0,b.useMemo)(()=>i?i.map(e=>{let t=structuredClone(e),n=i3(iH,e.name,{name:""});return t.abbr=t.name,t.fullName=n.name,t}):null,[i]),o=(0,b.useMemo)(()=>a?a.map(e=>iV(tu({},e),{displayValue:e.value})):null,[a]),s=(0,b.useMemo)(()=>o&&0!==o.length?ps(o,px):[],[o]);return n||r||0===s.length?null:(0,v.jsxs)("div",{className:"map-legend","aria-label":"Map shading",children:[(0,v.jsx)(sH,{type:"4",children:"Complaint count by state"}),(0,v.jsx)("p",{className:"map-legend__description",children:"The map is shaded to reflect the complaint count for each state, based on the applied filters. Hover over a tile to view details or select a tile to add the state to your filters."}),(0,v.jsx)("ul",{className:"map-legend__bins",children:s.map((e,t)=>{let n=((e,t)=>{if(!t||!Number.isFinite(t.from))return"".concat(pi(e.from)," and up");let n=t.from-1;return n<e.from&&(n=t.from),"".concat(pi(e.from),"–").concat(pi(n))})(e,s[t+1]);return(0,v.jsxs)("li",{className:"map-legend__bin",children:[(0,v.jsx)("span",{className:"map-legend__swatch",style:{backgroundColor:e.color}}),(0,v.jsx)("p",{className:"map-legend__label",children:n})]},"".concat(e.from,"-").concat(n))})})]})},pM=()=>{let e=ta();return(0,v.jsx)("div",{className:"map-state-navigation",children:(0,v.jsx)(sF,{label:"View list of complaints based on applied filters",isLink:!0,onClick:()=>{e(ls("List"))}})})},pA=()=>{let{data:e,error:t}=l0(),{data:n,isLoading:r,isFetching:i,error:a}=p_(),o=t?0:(null==e?void 0:e.total)||0,s=ts(lV),l=ts(lq),c=ts(fs),u=ts(fd),h=(0,b.useMemo)(()=>a?{data:[],colorScheme:[]}:aM(null==n?void 0:n.results.product,!1,"Product",c)||{data:[],colorScheme:[]},[a,n,c]),d=((null==h?void 0:h.data)||[]).filter(e=>e.isParent).length>1,f=(d?"Products":"Product")+" by highest complaint volume "+"(".concat(ib(l)," to ").concat(ib(s),")");return(0,v.jsxs)("section",{className:"map-panel",children:[(0,v.jsx)(fq,{}),(0,v.jsx)(f1,{}),u<750&&(0,v.jsx)(fH,{}),(0,v.jsx)(fG,{}),a?(0,v.jsx)(fW,{text:"There was a problem executing your search"}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(pk,{}),(0,v.jsx)(pS,{}),(0,v.jsx)(f7,{}),(0,v.jsx)(f8,{id:"product",colorScheme:h.colorScheme,data:h.data,title:f,helperText:d?"The chart below shows the products with the highest complaint volume, based on the applied filters. Expand each product to view sub-products.":"The chart below shows the product with the highest complaint volume, based on the applied filters. Expand the product to view sub-products.",total:o}),(0,v.jsx)(pM,{})]}),(0,v.jsx)(s2,{isLoading:r||i})]})},pT=()=>{let{data:e,error:t}=l0(),n=ts(lq),r=ts(lV),i=i9(n)+" - "+i9(r),a=ts(lX),o=ts(fc),s=t?0:(null==e?void 0:e.doc_count)||0,l=t?0:(null==e?void 0:e.total)||0,c=(0,b.useMemo)(()=>s===l?(0,v.jsxs)("div",{children:["Showing ",(0,v.jsx)("span",{children:l.toLocaleString()})," complaints"]}):(0,v.jsxs)("div",{children:["Showing ",(0,v.jsx)("span",{children:l.toLocaleString()})," out of",(0,v.jsxs)("span",{children:[" ",s.toLocaleString()," "]})," total complaints"," "]}),[s,l]);return o?(0,v.jsxs)("section",{className:"print-info",children:[(0,v.jsxs)("p",{children:[(0,v.jsx)("span",{children:"Dates:"})," ",i]}),!!a&&(0,v.jsxs)("p",{children:[(0,v.jsx)("span",{children:"Search Term:"})," ",a]}),(0,v.jsx)("div",{children:c})]}):null},pC=()=>ts(fc)?(0,v.jsx)("section",{className:"print-info-footer",children:(0,v.jsxs)("p",{children:[(0,v.jsx)("span",{children:"URL:"})," ",window.location.href]})}):null,pP={"line-chart":(0,v.jsx)(e=>(0,v.jsxs)("svg",iV(tu({xmlns:"http://www.w3.org/2000/svg",id:"line-chart-icon","data-name":"line chart",viewBox:"0 0 27 21"},e),{children:[(0,v.jsxs)("g",{className:"cls-1",children:[(0,v.jsx)("path",{d:"M12 6.27 2 19M22.9 14l-8.8-8",className:"cls-2"}),(0,v.jsx)("path",{d:"M13 4a1 1 0 1 1-1 1 1 1 0 0 1 1-1m0-1a2 2 0 1 0 2 2 2 2 0 0 0-2-2M24 14a1 1 0 1 1-1 1 1 1 0 0 1 1-1m0-1a2 2 0 1 0 2 2 2 2 0 0 0-2-2",className:"cls-3"})]}),(0,v.jsx)("path",{d:"M12 16.45 2 11M23 6l-9 10",className:"cls-2"}),(0,v.jsx)("path",{d:"M13 16a1 1 0 1 1-1 1 1 1 0 0 1 1-1m0-1a2 2 0 1 0 2 2 2 2 0 0 0-2-2M24 4a1 1 0 1 1-1 1 1 1 0 0 1 1-1m0-1a2 2 0 1 0 2 2 2 2 0 0 0-2-2",className:"cls-3"})]})),{}),"area-chart":(0,v.jsx)(e=>(0,v.jsxs)("svg",iV(tu({xmlns:"http://www.w3.org/2000/svg",id:"area-chart-icon","data-name":"area chart",viewBox:"0 0 27 21"},e),{children:[(0,v.jsx)("path",{d:"m27 11-3.52 3-8.22-5-8.22 8L0 15v6h27z",className:"cls-1"}),(0,v.jsx)("g",{className:"cls-2",children:(0,v.jsx)("path",{d:"m6.32 14.79 8.6-8.33 8.44 5.12L27 8.5V1l-3.52 3-8.22-3-8.22 6L0 9v3.94z",className:"cls-1"})})]})),{})};var pE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!Object.hasOwn(pP,e))return console.error("No icon with the name ".concat(e,".")),!1;let n=pP[e];return(0,b.cloneElement)(n,{className:"cf-icon-svg ".concat(t).trim()})};let pO=()=>{let e=ta(),t=ts(l5),n=t=>{ai("Button","Trends:"+t),e(aN(t))};return(0,v.jsxs)("section",{className:"chart-toggles",children:[(0,v.jsx)("p",{children:"Chart type"}),(0,v.jsxs)("div",{className:"m-btn-group",children:[(0,v.jsx)(sF,{"aria-label":"Toggle line chart",className:aa("line",t),disabled:"line"===t,onClick:()=>{n("line")},children:pE("line-chart")}),(0,v.jsx)(sF,{"aria-label":"Toggle area chart",className:aa("area",t),disabled:"area"===t,onClick:()=>{n("area")},children:pE("area-chart")})]})]})},pN=()=>{let e=ts(lN),t=ts(lF),n=ts(l3),r=i5(["Trends"!==ts(fh),""===ts(s5),!ts(lU)]);return aG(function(e,t,n){let{dateInterval:r,searchField:i}=t,a=lB(t),{chartType:o,focus:s,lens:l,subLens:c,trendDepth:u}=n,h={chartType:o,lens:l.replace(" ","_").toLowerCase(),searchField:i,trend_depth:u,trend_interval:r.toLowerCase(),reducerValues:{focus:s,lens:l,subLens:c,trendDepth:n.trendDepth}};c&&(h.sub_lens=c.replace("-","_").replace(" ","_").toLowerCase()),s&&(h.focus=s);let d=Object.keys(a).filter(e=>!["frm","page","search_after","size","sort"].includes(e)),f=Object.keys(e);return Object.assign(h,lz(a,d),lz(e,f),{size:0,no_aggs:!0})}(e,t,n),{skip:r})},pj={Company:{tab1:{displayName:"Products",filterName:"product"}},Product:{tab1:{displayName:"Sub-products",filterName:"sub_product"},tab2:{displayName:"Issues",filterName:"issue"}}},pL=()=>{let e=ta(),t=ts(l7),n=ts(l4),r=ts(l6),{data:i}=pN(),a=null==i?void 0:i.results["sub-product"];if("Overview"===n)return null;let o=!t||!!a&&!!a.length,s=(t,n)=>{ai("Button",t+":"+({sub_product:"Sub-products",issue:"Issues",product:"Products"})[n]),e(aL(n.toLowerCase()))},l=e=>{let t=["tab",e=e.toLowerCase()],n=RegExp(r.toLowerCase(),"g");return e.replace("-","_").match(n)&&t.push("active"),t.join(" ")},c=pj[n];return(0,v.jsx)("div",{className:"tabbed-navigation lens",children:(0,v.jsxs)("section",{children:[!!o&&(0,v.jsx)("button",{className:l(c.tab1.filterName),onClick:()=>{s(n,c.tab1.filterName)},children:c.tab1.displayName}),!!pj[n].tab2&&(0,v.jsx)("button",{className:l(c.tab2.filterName),onClick:()=>{s(n,c.tab2.filterName)},children:c.tab2.displayName})]})})},pD=()=>{let e=ts(l7),t=ts(l4),{data:n}=pN(),r=(null==n?void 0:n.total)||0,i=ta();return e?(0,v.jsxs)("div",{className:"focus-header",children:[(0,v.jsx)(sF,{label:"View "+t.toLowerCase()+" trends",iconLeft:"left",isLink:!0,className:"clear-focus",id:"clear-focus",onClick:()=>{i(az(t))}}),(0,v.jsx)("div",{children:(0,v.jsxs)("section",{className:"focus",children:[(0,v.jsx)(sH,{type:"1",children:e}),(0,v.jsx)("span",{className:"divider"}),(0,v.jsx)(sH,{type:"2",children:r.toLocaleString()+" Complaints"})]})}),(0,v.jsx)(pL,{showTitle:!1},"lens-tab")]}):null};var pR=i(3595),pI=i.n(pR),pz=i(5358),pB=i.n(pz);let pF=e=>{let{domId:t,hasKey:n}=e;return(0,v.jsx)("section",{className:"".concat(n?"ext-tooltip":""),children:(0,v.jsxs)("div",{className:"chart-wrapper",children:[(0,v.jsx)(sY,{className:"y-axis-label",children:"Complaints"}),(0,v.jsx)("div",{id:t}),(0,v.jsx)(sY,{className:"x-axis-label",children:"Date received by the CFPB"})]})})};pF.propTypes={domId:s0().string.isRequired,hasKey:s0().bool.isRequired};let pH=()=>{var e;let t=ta(),{data:n}=pN(),r=null==n?void 0:n.colorMap,i=null==n||null==(e=n.results)?void 0:e.dateRangeLine,a=ts(l4),o=ts(lQ),s=ts(lq),l=ts(lV),c=ts(fc),u=ts(fd),h=(0,b.useMemo)(()=>i?((e,t,n)=>{let r=structuredClone(e),{from:i,to:a}=t;if(!r.dataByTopic)return e;let o=r.dataByTopic[0].dates,s=r.dataByTopic[0].dates[0].date,l=r.dataByTopic[0].dates[o.length-1].date;return aT(i,s,n)&&r.dataByTopic.forEach(e=>{e.dates=e.dates.filter(e=>e.date!==s)}),aC(a,l,n)&&r.dataByTopic.forEach(e=>{e.dates=e.dates.filter(e=>e.date!==l)}),r})(i,{from:s,to:l},o):[],[i,s,l,o]),d=aP(h);return((0,b.useEffect)(()=>{let e={from:s,to:l},n="#line-chart",i="".concat(n," .line-chart"),u=ah(),d=f4.select(u).select(n);if(!d.node()||aP(h))return;let f=pB()().shouldShowDateInTitle(!1).topicLabel("topics").title("Complaints");f4.select(u).select(i).remove();let p=pI()(),m=c?"Overview"===a?750:500:d.node().getBoundingClientRect().width,g=h.dataByTopic.map(e=>r[e.topic]);return p.margin({left:60,right:10,top:10,bottom:40}).initializeVerticalMarker(!0).isAnimated(!0).tooltipThreshold(1).grid("horizontal").aspectRatio(.5).width(m).dateLabel("date").colorSchema(g),"Overview"===a?p.on("customMouseOver",f.show).on("customMouseMove",(t,n,r)=>{f.title(aS(t.date,o,e,!1)),f.update(t,n,r)}).on("customMouseOut",f.hide):p.on("customMouseMove",ae(n=>{t(aB({date:new Date(n.date).toJSON(),dateRange:e,interval:o,values:n.topics}))},200)),d.datum(h).call(p),f4.select(u).select(n+" .metadata-group .vertical-marker-container").datum([]).call(f),"Overview"!==a&&t(aB(((e,t)=>{if(!e||!e.dataByTopic||0===e.dataByTopic.length)return null;let n=[];e.dataByTopic.forEach(e=>{n=n.concat(e.dates)});let r=[...new Set(n.map(e=>e.date))].sort().pop(),i=e.dataByTopic.map(e=>{let t=e.dates.find(e=>iw(e.date,r)),n=t?t.value:0;return{name:e.topic,date:r,value:n}});return{key:r,date:r,dateRange:t.dateRange,interval:t.interval,values:i}})(h,{dateRange:e,interval:o}))),()=>{f4.select(u).select(i).remove(),d.datum([])}},[r,s,l,t,o,c,a,h,u]),d)?(0,v.jsx)(fW,{text:"Cannot display chart. Adjust your date range or date interval."}):(0,v.jsx)("section",{className:"chart",children:(0,v.jsx)(pF,{hasKey:"Overview"!==a,domId:"line-chart"})})},p$=()=>{var e;let t=ta(),{data:n}=pN(),r=null==n?void 0:n.colorMap,i=null==n||null==(e=n.results)?void 0:e.dateRangeArea,a=ts(lq),o=ts(lV),s=ts(l4),l=ts(lQ),c=ts(fc),u=ts(fd),h=(0,b.useMemo)(()=>i?((e,t,n)=>{let{from:r,to:i}=t,a=structuredClone(e),o=[...new Set(a.map(e=>e.date))];o.sort();let s=o[0],l=o[o.length-1];return aT(r,s,n)&&(a=a.filter(e=>e.date!==s)),aC(i,l,n)&&(a=a.filter(e=>e.date!==l)),a})(i,{from:a,to:o},l):[],[i,a,o,l]),d=!h||!h.length||[...new Set(h.map(e=>e.date))].length<2;return((0,b.useEffect)(()=>{var e;let n={from:a,to:o},i="#stacked-area-chart",s=i+" .stacked-area",u=ah(),f=f4.select(u).select(i);if(!f.node()||d)return;f4.select(u).select(s).remove();let p=c?550:f.node().getBoundingClientRect().width,m=[...new Set(h.filter(e=>"Other"!==e.name).map(e=>e.name))].map(e=>r[e]);m.push(iq.DataLens["10"]);let g=(0,f9.stackedArea)();return g.margin({left:70,right:10,top:10,bottom:40}).areaCurve("linear").initializeVerticalMarker(!0).isAnimated(!1).tooltipThreshold(1).grid("horizontal").aspectRatio(.5).width(p).dateLabel("date").colorSchema(m).on("customMouseMove",ae(e=>{"string"!=typeof e.date&&(e.date=new Date(e.date).toJSON()),e.values=e.values.map(e=>"string"!=typeof e.date?iV(tu({},e),{date:new Date(e.date).toJSON()}):e),t(aB({date:e.date,dateRange:n,interval:l,values:e.values}))},200)),f.datum(h).call(g),(e=((e,t)=>{if(!e||0===e.length)return null;let n=[...new Set(e.map(e=>id()(e.date).toISOString()))].sort().pop(),r=e.filter(e=>iw(e.date,n));return{key:n,date:n,dateRange:t.dateRange,interval:t.interval,values:r}})(h,{dateRange:n,interval:l})).values=e.values.map(e=>"string"!=typeof e.date?iV(tu({},e),{date:new Date(e.date).toJSON()}):e),"string"!=typeof e.date&&(e.date=new Date(e.date).toJSON()),t(aB(e)),()=>{f4.select(u).select(s).remove(),f.datum([])}},[r,a,o,t,h,l,c,d,u]),d)?(0,v.jsx)(fW,{text:"Cannot display chart. Adjust your date range or date interval."}):(0,v.jsx)("section",{className:"chart",children:(0,v.jsx)(pF,{hasKey:"Overview"!==s,domId:"stacked-area-chart"})})},pU=e=>{let{value:t}=e,n=ta(),r=ts(l7)?"focus":"",i=ts(l4),a=ts(l6),o=[];return"Other"===t.name?o.push((0,v.jsxs)("span",{className:"u-left",children:["All other ",{Product:"products",product:"products",issue:"issues","Sub-Issue":"sub-issues",sub_product:"sub-products",Company:"companies"}[r?a:i]]},t.name)):r?o.push((0,v.jsx)("span",{className:"u-left",children:t.name},t.name)):(o.push((0,v.jsx)("span",{className:"u-left",id:i7("focus-"+t.name),children:t.name},t.name)),"Company"!==i||r||o.push((0,v.jsx)(sF,{label:"",iconLeft:"error","aria-label":"Remove "+t.name+" from comparison set",isLink:!0,className:"u-right close",onClick:()=>{n(lb("company",t.name))}},"close_"+t.name))),o},pV=()=>{let{data:e}=pN(),t=e?null==e?void 0:e.colorMap:{},n=ts(l7),r=ts(l4),i=ts(l5),a=((e,t)=>{if(!e||!t)return e;let n=structuredClone(e),r=e.title.split(":"),i=Object.values(iq.DataLens);return n.values.forEach(e=>{Object.hasOwn(e,"colorIndex")||(e.colorIndex=i.indexOf(t[e.name])||0),Object.hasOwn(e,"value")||(e.value=i3(e,"value",0))}),iV(tu({},n),{heading:r[0]+":",date:r[1]?r[1].trim():""})})(ts(l9),t);return a&&a.values?(0,v.jsxs)("section",{className:"tooltip-container u-clearfix",children:[!!("Company"===r&&!(n?"focus":""))&&(0,v.jsx)(d9,{htmlId:"external-tooltip",fieldName:"company",label:"Start typing to begin listing companies",placeholder:"Enter company name",ariaLabel:"Company search bar"}),(0,v.jsxs)(sY,{className:"a-micro-copy",children:[(0,v.jsx)("span",{className:"heading",children:a.heading}),(0,v.jsx)("span",{className:"date",children:a.date})]}),(0,v.jsxs)("div",{children:[(0,v.jsx)("ul",{className:"tooltip-ul",children:a.values.map((e,t)=>(0,v.jsxs)("li",{className:"color__"+e.colorIndex,children:[(0,v.jsx)(pU,{value:e}),(0,v.jsx)("span",{className:"u-right",children:e.value.toLocaleString()})]},t+"-id"))}),"area"===i&&(0,v.jsx)("ul",{className:"m-list--unstyled tooltip-ul total",children:(0,v.jsxs)("li",{children:[(0,v.jsx)("span",{className:"u-left",children:"Total"}),(0,v.jsx)("span",{className:"u-right",children:a.total.toLocaleString()})]})})]}),(0,v.jsxs)("p",{className:"a-micro-copy warn",children:["CFPB updated product and issue options in April 2017 and August 2023."," ",(0,v.jsx)("a",{href:"https://www.consumerfinance.gov/data-research/consumer-complaints/#past-changes",target:"_blank",rel:"noopener noreferrer","aria-label":"Learn more about Product and\n Issue changes (opens in new window)",children:"Learn more"})]})]}):null},pq={Overview:"product",Product:"product",Company:"company"},pY=()=>{var e;let t=ta(),{data:n}=l0(),{data:r,error:i}=pN(),a=ts(lN),o=ts(l7),s=ts(l4),l=null==r?void 0:r.results,c=pq[s],u=i3(l,c,[]).filter(e=>e.isParent).length,h=0;h="product"===c?i3(n,c,[]).length:i2(i3(a,c,[]).length,0,10);let d=a[c]?a[c].filter(e=>-1===e.indexOf("•")).length:h,f=h-u,p=(e=h,(!(d>0)||!(d<=5))&&(e>5||d>5));return o||"Overview"===s||i?null:p?u<=5||d>5&&d!==u?(0,v.jsx)("div",{className:"trend-depth-toggle",children:(0,v.jsx)(sF,{label:"Show more",iconLeft:"plus",isLink:!0,id:"trend-depth-button",onClick:()=>{t(aD(f+5))}})}):(0,v.jsx)("div",{className:"trend-depth-toggle",children:(0,v.jsx)(sF,{label:"Show less",iconLeft:"minus",isLink:!0,id:"trend-depth-button",onClick:()=>{t(aR())}})}):void 0},pW={sub_product:"Sub-products",sub_issue:"Sub-issues",issue:"Issues",product:"Products"},pG={product:"Product the consumer identified in the complaint. Click on a company name to expand products.",company:"Product the consumer identified in the complaint. Click on a company name to expand products.",sub_product:"Product and sub-product the consumer identified in the complaint. Click on a product to expand sub-products.",issue:"Product and issue the consumer identified in the complaint. Click on a product to expand issues.",overview:"Product the consumer identified in the complaint. Click on a product to expand sub-products"},pX={sub_product:"Sub-products the consumer identified in the complaint",product:"Product the consumer identified in the complaint",issue:"Issues the consumer identified in the complaint"},pK=()=>{let e=ta(),{data:t,isLoading:n,isFetching:r,error:i}=pN(),a=ts(lj),o=ts(lQ),s=ts(lq),l=ts(lV),c=ts(lJ),u=ts(l5),h=ts(l7),d=ts(l4),f=ts(l6),p=ts(fs),m=ts(fd),g=d.toLowerCase(),y=f.replace("_","-"),b=""===f?pG[g]:pG[f],x=""===f?pX[g]:pX[f],w=i?{}:(null==t?void 0:t.results)||{},_=i?{}:null==t?void 0:t.colorMap,k=i?0:null==t?void 0:t.total,S=!n&&!r&&"Company"===d&&(!a||0===a.length),M=aM(w[y],_,d,p),A=iN.map(e=>({name:e,disabled:ag(s,l)&&"Day"===e})),T=aM(w.product,!1,d,p),C=aM(w[g],_,d,p),P=ib(s),E=ib(l),O="Overview"===d,N=pW[f]+", by "+d.toLowerCase()+" from",j=()=>{if(O);else if(h)return"Complaints by "+pW[f].toLowerCase()+", by date received by the CFPB";return"Complaints by date received by the CFPB"};return(0,v.jsxs)("section",{className:"trends-panel"+(O?"":" external-tooltip"),children:[(0,v.jsx)(fq,{}),(0,v.jsx)(f1,{}),c?(0,v.jsx)(fU,{text:"“Day” interval is disabled when the date range is longer than one year",closeFn:()=>{e(d0())}}):null,m<750?(0,v.jsx)(fH,{}):null,(0,v.jsx)(fG,{}),(0,v.jsxs)("div",{className:"layout-row refine-bar",children:[(0,v.jsx)(fJ,{label:"Aggregate complaints by",title:"Aggregate by",values:iR,id:"lens",value:d,handleChange:t=>{let{value:n}=t.target;ai("Dropdown","Trends:"+n),e(aj(n))}}),(0,v.jsx)(f0,{}),(0,v.jsx)(fJ,{label:"Choose the Date interval",title:"Date interval",values:A,id:"interval",value:o,handleChange:t=>{let{value:n}=t.target;ai("Dropdown","Trends:"+n),e(dJ(n))}}),O?null:[(0,v.jsx)(f0,{},"separator"),(0,v.jsx)(pO,{},"chart-toggles")]]}),i?(0,v.jsx)(fW,{text:"There was a problem executing your search"}):null,S?(0,v.jsx)("div",{className:"layout-row company-overlay",children:(0,v.jsxs)("section",{className:"company-search",children:[(0,v.jsx)("p",{children:"Choose a company to start your visualization using the type-ahead menu below. You can add more than one company to your view"}),(0,v.jsx)(d9,{htmlId:"modal-search",fieldName:"company",label:"Start typing to begin listing companies",placeholder:"Enter company name",ariaLabel:"Type company name to view in detail"})]})}):null,h?(0,v.jsx)(pD,{}):null,!S&&O&&k>0?(0,v.jsx)("div",{className:"layout-row",children:(0,v.jsxs)("section",{className:"chart-description",children:[(0,v.jsx)(sH,{type:"2",className:"area-chart-title",children:j()}),(0,v.jsx)("p",{className:"chart-helper-text",children:"A time series graph of complaints for the selected date range. Hover on the chart to see the count for each date interval. Your filter selections will update what you see on the graph."})]})}):null,S||O||!(k>0)?null:(0,v.jsx)("div",{className:"layout-row",children:(0,v.jsxs)("section",{className:"chart-description",children:[(0,v.jsx)(sH,{type:"2",className:"area-chart-title",children:j()}),(0,v.jsx)("p",{className:"chart-helper-text",children:"A time series graph of the (up to five) highest volume complaints for the selected date range. However, you can view all of your selections in the bar chart, below. Hover on the chart to see the count for each date interval. Your filter selections will update what you see on the graph."})]})}),!S&&k>0?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("div",{className:"layout-row date-range-disclaimer",children:(0,v.jsx)("strong",{children:"Note: Data from incomplete time intervals are not shown"})}),(0,v.jsxs)("div",{className:"layout-row",children:[(0,v.jsxs)(v.Fragment,{children:["line"===u&&(0,v.jsx)(pH,{}),"area"===u&&(0,v.jsx)(p$,{})]}),!O&&(0,v.jsx)(pV,{})]})]}):null,k>0&&(S?null:O?(0,v.jsx)(f8,{id:"product",colorScheme:T.colorScheme,data:T.data,title:"Product by highest complaint volume "+P+" to "+E,helperText:b,total:k}):h?(0,v.jsx)(f8,{id:d,colorScheme:M.colorScheme,data:M.data,title:N+" "+P+" to "+E,helperText:x,total:k}):[(0,v.jsx)(pL,{showTitle:!0},"lens-tab"),(0,v.jsx)(f8,{id:d,colorScheme:C.colorScheme,data:C.data,title:N+" "+P+" to "+E,helperText:b,total:k},d+"row")]),(0,v.jsx)(pY,{}),(0,v.jsx)(s2,{isLoading:n||r})]})},pZ=()=>{let e,t=ts(fh);switch(t){case"Map":e=(0,v.jsx)(pA,{});break;case"List":e=(0,v.jsx)(f3,{});break;default:e=(0,v.jsx)(pK,{})}return(0,v.jsxs)("div",{className:"content__main "+t.toLowerCase(),children:[(0,v.jsx)(pT,{}),e,(0,v.jsx)(pC,{})]})},pQ="json",pJ="filtered",p0="full",p1=()=>{let e=ta(),t=ts(lF),n=ts(lN),r=ts(fh),{data:i}=l0(),a=(null==i?void 0:i.total)||0,o=(null==i?void 0:i.doc_count)||0,s=a===o,[l,c]=(0,b.useState)(a>1e5?p0:pJ),[u,h]=(0,b.useState)("csv"),[d,f]=(0,b.useState)(!1),p=s?p0:l,m=(0,b.useMemo)(()=>{let e,r=tu({},n,t);var i=p===p0?"https://files.consumerfinance.gov/ccdb/complaints."+u+".zip":((e=tu({},r)).size=a,e.format=u,e.no_aggs=!0,delete e.from,delete e.searchAfter,i$+dY(e));if(!i)return i;let o=document.createElement("a");return o.href=i,o.href},[p,u,a,n,t]);return(0,v.jsxs)("section",{className:"export-modal",children:[(0,v.jsxs)("div",{className:"header layout-row",children:[(0,v.jsx)(sH,{type:"3",className:"flex-all",children:"Export complaints"}),(0,v.jsx)(sF,{label:"Close",iconRight:"error-round",isLink:!0,"data-gtm_ignore":"true",onClick:()=>{e(lt())}})]}),(0,v.jsxs)("div",{className:"body",children:[(0,v.jsx)("div",{className:"instructions",children:"To download a copy of this dataset, choose the file format and which complaints you want to export below."}),(0,v.jsxs)("div",{className:"group",children:[(0,v.jsx)("div",{className:"group-title",children:"Select a format for the exported file"}),(0,v.jsxs)("div",{children:[(0,v.jsxs)("div",{className:"m-form-field m-form-field--radio m-form-field--lg-target",children:[(0,v.jsx)("input",{checked:"csv"===u,className:"a-radio",id:"format_csv",onChange:()=>{f(!1),h("csv")},type:"radio",value:"csv"}),(0,v.jsx)("label",{className:"a-label",htmlFor:"format_csv",children:"CSV"})]}),(0,v.jsxs)("div",{className:"m-form-field m-form-field--radio m-form-field--lg-target",children:[(0,v.jsx)("input",{checked:u===pQ,className:"a-radio",id:"format_json",onChange:()=>{f(!1),h(pQ)},type:"radio",value:"json"}),(0,v.jsx)("label",{className:"a-label",htmlFor:"format_json",children:"JSON"})]})]})]}),s?null:(0,v.jsxs)("div",{className:"group",children:[(0,v.jsx)("div",{className:"group-title",children:"Select which complaints you’d like to export"}),(0,v.jsxs)("div",{children:[(0,v.jsxs)("div",{className:"m-form-field m-form-field--radio m-form-field--lg-target",children:[(0,v.jsx)("input",{checked:l===pJ,disabled:a>1e5,className:"a-radio",id:"dataset_filtered",onChange:()=>{f(!1),c(pJ)},type:"radio",value:"filtered"}),(0,v.jsxs)("label",{className:"a-label",htmlFor:"dataset_filtered",children:["Filtered dataset ("+a.toLocaleString()+" complaints)",(0,v.jsx)("br",{}),a>1e5?"(limited to ".concat(1e5.toLocaleString()," complaints or fewer)"):"(only the results of the last search and/or filter)"]})]}),(0,v.jsxs)("div",{className:"m-form-field m-form-field--radio m-form-field--lg-target",children:[(0,v.jsx)("input",{checked:l===p0,className:"a-radio",id:"dataset_full",onChange:()=>{f(!1),c(p0)},type:"radio",value:"full"}),(0,v.jsxs)("label",{className:"a-label",htmlFor:"dataset_full",children:["Full dataset ("+o.toLocaleString()+" complaints)",(0,v.jsx)("br",{}),"(large, zipped file of every complaint)"]})]})]})]}),(0,v.jsxs)("div",{className:"heres-the-url",children:[(0,v.jsx)(sH,{type:"4",children:"Link to your complaint search results for future reference"}),(0,v.jsxs)("div",{className:"layout-row",children:[(0,v.jsx)("input",{className:"flex-all a-text-input",id:"export-uri-input",type:"text",value:m,readOnly:!0}),(0,v.jsx)(sF,{label:d?"Copied":"Copy",iconLeft:d?"checkmark-round":"copy",className:"a-btn ".concat(d?"export-url-copied":"a-btn__secondary"),disabled:!m,onClick:e=>{let t=af("export-uri-input");t.select(),t.setSelectionRange(0,99999),navigator.clipboard.writeText(t.value),e.target.focus(),f(!0)}})]})]}),(0,v.jsx)("div",{className:"timeliness-warning",children:"The export process could take several minutes if you’re downloading many complaints"})]}),(0,v.jsxs)("div",{className:"footer layout-row",children:[(0,v.jsx)(sF,{label:"Start export","data-gtm_ignore":"true",onClick:()=>{p===p0?ai("Export All Data",r+":"+u):ai("Export Some Data",r+":"+u),window.location.assign(m),e(ln(iT))}}),(0,v.jsx)(sF,{label:"Cancel",isLink:!0,appearance:"warning","data-gtm_ignore":"true",onClick:()=>{e(lt())}})]})]})},p2=()=>{let e=ta();return(0,v.jsxs)("section",{className:"export-modal",children:[(0,v.jsxs)("div",{className:"header layout-row",children:[(0,v.jsx)(sH,{type:"3",className:"flex-all",children:"Export complaints"}),(0,v.jsx)(sF,{label:"Close",iconRight:"error-round",isLink:!0,"data-gtm_ignore":"true",onClick:()=>{e(lt())}})]}),(0,v.jsx)("div",{className:"body",children:(0,v.jsx)("div",{className:"instructions",children:"It may take a few minutes for your file to download. You can keep working while it processes."})})]})},p3=e=>{let{onClose:t}=e;return(0,v.jsxs)("section",{className:"more-about-modal",children:[(0,v.jsx)("div",{className:"header",children:(0,v.jsx)(sH,{type:"3",children:"Things you should know before you use this database"})}),(0,v.jsxs)("div",{className:"body",children:[(0,v.jsx)(sY,{children:"This database only includes complaints the CFPB sent to companies and complaints are only published after the company responds, confirming a commercial relationship or after 15 days, whichever comes first. This database does not include complaints referred to other regulators, such as complaints about depository institutions with less than $10 billion in assets."}),(0,v.jsx)(sY,{children:"This database is not a statistical sample of consumers’ experiences in the marketplace. Complaints are not necessarily representative of all consumers’ experiences with a financial product or company. Company-specific information should be considered in the context of that company’s size and/or market share."}),(0,v.jsxs)(sY,{children:["This database only includes a consumer’s description of what happened in their own words if the consumer agrees to share it and after we take steps to ",(0,v.jsx)(a9,{href:"https://files.consumerfinance.gov/f/documents/201503_cfpb_Narrative-Scrubbing-Standard.pdf",target:"_blank",rel:"noopener noreferrer",label:"remove personal information"}),". One consumer’s experience is not necessarily representative of all consumers’ experiences and narratives are not verified before publication."]}),(0,v.jsx)(sY,{children:"This database generally updates daily."})]}),(0,v.jsx)("div",{className:"footer layout-row",children:(0,v.jsx)(sF,{label:"Close",onClick:t})})]})};p3.propTypes={onClose:s0().func.isRequired};var p5=i(567),p7=i.n(p5);let p4=()=>{let e=ts(ff),t=ta(),n=(()=>{let e=af(au());if(e)return e;let t=ah();return t instanceof ShadowRoot?t.host||null:t instanceof HTMLElement?t:null})(),r=ad(),i=(0,b.useMemo)(()=>({[iA]:p1,[iT]:p2,[iC]:p3})[e],[e]);return i?(0,v.jsx)(p7(),iV(tu({},n?{appElement:n}:{}),{isOpen:!0,contentLabel:"CFPB Modal Dialog",className:"modal-body",overlayClassName:"modal-overlay",parentSelector:()=>r,onRequestClose:()=>{t(lt())},children:(0,v.jsx)(i,{onClose:()=>{t(lt())}})})):null},p6=".ccdb-content",p9="".concat("".concat(p6," aside.content__sidebar")," .filter-panel"),p8={CONTENT:"".concat(p6,".content"),HERO_LINKS:"".concat(p6," header.content__hero .m-list--horizontal"),TABBED_NAVIGATION:"".concat(p6,' [data-tour="tabbed-navigation"] section'),FILTER_PANEL:p9,DATE_FILTER:"".concat(p9," .date-filter"),PRODUCT_AGGREGATION:"".concat(p9," .aggregation.product"),FILTER_SHOW_HIDE:"".concat(p9," .aggregation button"),SEARCH_BAR:"".concat(p6," .search-bar"),SEARCH_SUMMARY:"".concat(p6," #search-summary"),EXPORT_BTN:"".concat(p6," .export-results .export-btn"),PRINT_BTN:"".concat(p6," .export-results .print-preview"),MAP_SHADING:"".concat(p6," .map-shading"),TILE_MAP:"".concat(p6," #tile-chart-map"),ROW_CHART_SECTION:"".concat(p6,' [data-tour="row-chart-section"]'),MAP_ROW_CHART_SECTION:"".concat(p6,' .map-panel [data-tour="row-chart-section"]'),SELECT_SIZE:"".concat(p6,' [data-tour="select-size"]'),SELECT_SORT:"".concat(p6,' [data-tour="select-sort"]'),SELECT_LENS:"".concat(p6,' [data-tour="select-lens"]'),SELECT_INTERVAL:"".concat(p6,' [data-tour="select-interval"]'),NARRATIVES_BUTTONS:"".concat(p6," .refine-bar section.narratives-buttons .m-btn-group"),CARDS_PANEL:"".concat(p6," .cards-panel"),TO_DETAIL:"".concat(p6," .cards-panel .to-detail"),ROW_CHART_EXPANDABLE:"".concat(p6," #row-chart-product .tick.expandable"),MOBILE_FILTER_TOGGLE:"".concat(p6," .filter-panel-toggle .m-btn-group .a-btn")},me=(e,t)=>({selector:e,label:t}),mt={INDEX:me(p8.CONTENT,"Index"),HELP_LINKS:me(p8.HERO_LINKS,"Help Links"),VIEWS:me(p8.TABBED_NAVIGATION,"Views"),FILTERS:me(p8.FILTER_PANEL,"Filters"),DATE_RECEIVED:me(p8.DATE_FILTER,"Date Received"),PRODUCT_ISSUE:me(p8.PRODUCT_AGGREGATION,"Product/Issue"),SHOW_HIDE:me(p8.FILTER_SHOW_HIDE,"Show/Hide"),SEARCH_BAR:me(p8.SEARCH_BAR,"Search Bar"),SEARCH_SUMMARY:me(p8.SEARCH_SUMMARY,"Search Summary"),EXPORT_DATA:me(p8.EXPORT_BTN,"Export Data"),PRINT_PAGE:me(p8.PRINT_BTN,"Print Page"),TABBED_NAVIGATION:me(p8.TABBED_NAVIGATION,"Tabbed Navigation"),MAP_SHADING:me(p8.MAP_SHADING,"Map Shading"),TILE_MAP:me(p8.TILE_MAP,"Tile Map"),ROW_CHARTS:me(p8.ROW_CHART_SECTION,"Row Charts"),MAP_ROW_CHARTS:me(p8.MAP_ROW_CHART_SECTION,"Row Charts"),SELECT_SIZE:me(p8.SELECT_SIZE,"Show Number"),SELECT_SORT:me(p8.SELECT_SORT,"Sort Results"),SELECT_LENS:me(p8.SELECT_LENS,"Aggregate By"),SELECT_INTERVAL:me(p8.SELECT_INTERVAL,"Date Interval"),NARRATIVES:me(p8.NARRATIVES_BUTTONS,"Show Narratives"),RESULTS:me(p8.CARDS_PANEL,"Results"),COMPLAINT_DETAIL:me(p8.TO_DETAIL,"View Detailed Complaints")},mn={STEP_1:mt.INDEX,STEP_2:mt.HELP_LINKS,STEP_3:mt.VIEWS,STEP_4:mt.FILTERS,STEP_5:mt.DATE_RECEIVED,STEP_6:mt.PRODUCT_ISSUE,STEP_7:mt.SHOW_HIDE,STEP_8:mt.SEARCH_BAR,STEP_9:mt.SEARCH_SUMMARY,STEP_10:mt.EXPORT_DATA,STEP_11:mt.PRINT_PAGE,STEP_12:mt.MAP_SHADING,STEP_13:mt.TILE_MAP,STEP_14:mt.MAP_ROW_CHARTS,STEP_15:mt.TABBED_NAVIGATION},mr={STEP_1:mt.INDEX,STEP_2:mt.HELP_LINKS,STEP_3:mt.VIEWS,STEP_4:mt.FILTERS,STEP_5:mt.DATE_RECEIVED,STEP_6:mt.PRODUCT_ISSUE,STEP_7:mt.SHOW_HIDE,STEP_8:mt.SEARCH_BAR,STEP_9:mt.SEARCH_SUMMARY,STEP_10:mt.EXPORT_DATA,STEP_11:mt.PRINT_PAGE,STEP_12:mt.SELECT_SIZE,STEP_13:mt.SELECT_SORT,STEP_14:mt.NARRATIVES,STEP_15:mt.RESULTS,STEP_16:mt.COMPLAINT_DETAIL,STEP_17:mt.TABBED_NAVIGATION},mi={STEP_1:mt.INDEX,STEP_2:mt.HELP_LINKS,STEP_3:mt.VIEWS,STEP_4:mt.FILTERS,STEP_5:mt.DATE_RECEIVED,STEP_6:mt.PRODUCT_ISSUE,STEP_7:mt.SHOW_HIDE,STEP_8:mt.SEARCH_BAR,STEP_9:mt.SEARCH_SUMMARY,STEP_10:mt.EXPORT_DATA,STEP_11:mt.PRINT_PAGE,STEP_12:mt.SELECT_LENS,STEP_13:mt.SELECT_INTERVAL,STEP_14:mt.ROW_CHARTS,STEP_15:mt.TABBED_NAVIGATION},ma=(e,t)=>'<li><button class="a-btn a-btn--link" onclick="(function(){var t=window.__ccdbDom&&window.__ccdbDom.querySelectorAll(\'.introjs-bullets li a\')['.concat(e+1,'];t&&t.click();})()">')+t[1].label+"</button></li>",mo="";Object.entries(mn).slice(1).forEach((e,t)=>{mo+=ma(t,e)});let ms="";Object.entries(mr).slice(1).forEach((e,t)=>{ms+=ma(t,e)});let ml="";Object.entries(mi).slice(1).forEach((e,t)=>{ml+=ma(t,e)});let mc={Map:[{element:mn.STEP_1.selector,intro:'<div><div class="left">Welcome to the Consumer Complaint Database!<br /><br />Complaints the CFPB sends to companies for response are published in the Consumer Complaint Database after the company responds, confirming a commercial relationship with the consumer, or after 15 days, whichever comes first.<br /><br />Complaints the CFPB refers to other regulators, such as complaints about depository institutions with less than $10 billion in assets, are not published in the database. This database is not a statistical sample of consumers’ experiences in the marketplace.</div><div class="right"><h4>Index</h4><ul>'+mo+"</ul></div></div>",tooltipClass:"wide"},{element:mn.STEP_2.selector,intro:"These links provide more information about this database."},{element:mn.STEP_3.selector,intro:"You can change how to view complaint data by selecting the three views we have available — Trends, List, and Map.<br /><br />You are currently on the Map view, which displays complaints by state.<br /><br />To read individual complaints, select List view<br /><br />To visualize complaint data with product and issue breakdowns, select Trends view",position:"top"},{element:mn.STEP_4.selector,intro:"The “Filter results by” panel lets you filter complaint data. To clear filters, uncheck individual selections in the filter panel or to select “Clear all filters” under the Search bar."},{element:mn.STEP_5.selector,intro:"You can adjust the date range of the complaint data showed using the “Date CFPB received the complaint” filter. <br /> The default date range is three years from today’s date."},{element:mn.STEP_6.selector,intro:"You can filter complaints by the product and issue the consumer selected when they submitted their complaint.<br /><br />Expand a product or issue to see its sub-products or sub-issues, where available. "},{element:mn.STEP_7.selector,intro:"The blue show/hide icon allows you to expand or collapse specific filters."},{element:mn.STEP_8.selector,intro:"Use the “Search within” bar to find specific words or phrases in complaints. By default, this will search “All data”, but you can change this using the gray dropdown menu.<br /> <br />Click “Show advanced search tips” to see some advanced ways to refine your word search."},{element:mn.STEP_9.selector,intro:"As you apply filters and search terms, this will display how many complaints are included out of the total number of complaints published in the database."},{element:mn.STEP_10.selector,intro:"You can export full or filtered results to CSV or JSON by selecting “Export data”."},{element:mn.STEP_11.selector,intro:"Select “Print” to generate a pdf of the current page."},{element:mn.STEP_13.selector,intro:"Hover over a tile on the map to view complaint information specific to that state. You can filter to see data specific to a state by selecting the state or using the filter panel."},{element:mn.STEP_14.selector,intro:"View complaint volume by product in the bar chart. Use the blue arrow by each product to view breakdowns by sub-products.<br /><br />Once the product is expanded, select the “Visualize” link as shown below, to view trends on sub-products and issues:"},{element:mn.STEP_15.selector,intro:"To learn how to use Trends and List views, select the view and then start the tour."}],List:[{element:mr.STEP_1.selector,intro:'<div><div class="left">Welcome to the Consumer Complaint Database!<br /><br />Complaints the CFPB sends to companies for response are published in the Consumer Complaint Database after the company responds, confirming a commercial relationship with the consumer, or after 15 days, whichever comes first.<br /><br />Complaints the CFPB refers to other regulators, such as complaints about depository institutions with less than $10 billion in assets, are not published in the database. This database is not a statistical sample of consumers’ experiences in the marketplace.</div><div class="right"><h4>Index</h4><ul>'+ms+"</ul></div></div>",tooltipClass:"wide"},{element:mr.STEP_2.selector,intro:"These links provide more information about this database."},{element:mr.STEP_3.selector,intro:"You can change how to view complaint data by selecting the three views we have available — Trends, List, and Map.<br /><br />You are currently on the List view, which shows individual complaints.<br /><br />To visualize complaint data with product and issue breakdowns, select Trends view.<br /><br />To view complaints by state, select Map view."},{element:mr.STEP_4.selector,intro:"The “Filter results by” panel lets you filter complaint data. To clear filters, uncheck individual selections in the filter panel or to select “Clear all filters” under the Search bar."},{element:mr.STEP_5.selector,intro:"You can adjust the date range of the complaint data showed using the “Date CFPB received the complaint” filter. <br /> The default date range is three years from today’s date."},{element:mr.STEP_6.selector,intro:"You can filter complaints by the product and issue the consumer selected when they submitted their complaint.<br /><br />Expand a product or issue to see its sub-products or sub-issues, where available. "},{element:mr.STEP_7.selector,intro:"The blue show/hide icon allows you to expand or collapse specific filters."},{element:mr.STEP_8.selector,intro:"Use the “Search within” bar to find specific words or phrases in complaints. By default, this will search “All data”, but you can change this using the gray dropdown menu.<br /> <br />Click “Show advanced search tips” to see some advanced ways to refine your word search."},{element:mr.STEP_9.selector,intro:"As you apply filters and search terms, this will display how many complaints are included out of the total number of complaints published in the database."},{element:mr.STEP_10.selector,intro:"You can export full or filtered results to CSV or JSON by selecting “Export data”."},{element:mr.STEP_11.selector,intro:"Select “Print” to generate a pdf of the current page."},{element:mr.STEP_12.selector,intro:"Select the number of complaints to view per page here."},{element:mr.STEP_13.selector,intro:"Sort complaints in the list view by “Newest to oldest,” “Oldest to newest,” “Relevance,” and “Relevance (asc).”<br /><br />Relevancy are based on any applied search terms."},{element:mr.STEP_14.selector,intro:"You can see all complaints or focus on those with consumer complaint narratives.<br /><br />We publish the consumer’s narrative description of what happened from their complaint if the consumer opts to share it publicly and after taking steps to remove personal information."},{element:mr.STEP_15.selector,intro:"These are your search results. As you apply filters and search terms, your results will display here. This view shows a preview of the complaint."},{element:mr.STEP_16.selector,intro:"Click the blue ID number to see more details about a particular complaint."},{element:mr.STEP_17.selector,intro:"To learn how to use Map and Trend views, select the view and then start the tour."}],Trends:[{element:mi.STEP_1.selector,intro:'<div><div class="left">Welcome to the Consumer Complaint Database!<br /><br />Complaints the CFPB sends to companies for response are published in the Consumer Complaint Database after the company responds, confirming a commercial relationship with the consumer, or after 15 days, whichever comes first.<br /><br />Complaints the CFPB refers to other regulators, such as complaints about depository institutions with less than $10 billion in assets, are not published in the database. This database is not a statistical sample of consumers’ experiences in the marketplace.</div><div class="right"><h4>Index</h4><ul>'+ml+"</ul></div></div>",tooltipClass:"wide first-step"},{element:mi.STEP_2.selector,intro:"These links provide more information about this database."},{element:mi.STEP_3.selector,intro:"You can change how to view complaint data by selecting the three views we have available—Trends, List, and Map.<br /><br />You are currently on the Trends view, which visualizes complaint data using a trend line with product and issue breakdowns.<br /><br />To read individual complaints, select List view.<br /><br />To view complaints by state, select Map view.",position:"top"},{element:mi.STEP_4.selector,intro:"The “Filter results by” panel lets you filter complaint data. To clear filters, uncheck individual selections in the filter panel or to select “Clear all filters” under the Search bar."},{element:mi.STEP_5.selector,intro:"You can adjust the date range of the complaint data showed using the “Date CFPB received the complaint” filter. <br /> The default date range is three years from today’s date."},{element:mi.STEP_6.selector,intro:"You can filter complaints by the product and issue the consumer selected when they submitted their complaint.<br /><br />Expand a product or issue to see its sub-products or sub-issues, where available. "},{element:mi.STEP_7.selector,intro:"The blue show/hide icon allows you to expand or collapse specific filters."},{element:mi.STEP_8.selector,intro:"Use the “Search within” bar to find specific words or phrases in complaints. By default, this will search “All data”, but you can change this using the gray dropdown menu.<br /> <br />Click “Show advanced search tips” to see some advanced ways to refine your word search."},{element:mi.STEP_9.selector,intro:"As you apply filters and search terms, this will display how many complaints are included out of the total number of complaints published in the database."},{element:mi.STEP_10.selector,intro:"You can export full or filtered results to CSV or JSON by selecting “Export data”."},{element:mi.STEP_11.selector,intro:"Select “Print” to generate a pdf of the current page."},{element:mi.STEP_12.selector,intro:"Select the dropdown to aggregate the data by product or by the company to which the CFPB sent the complaint for response."},{element:mi.STEP_13.selector,intro:"Select this dropdown to change the time interval displayed on the trend line."},{element:mi.STEP_14.selector,intro:"View complaint volume by product in the bar chart. Use the blue arrow by each product to view breakdowns by sub-products.<br /><br />Once the product is expanded, select the “Visualize” link as shown below, to view trends on sub-products and issues:"},{element:mi.STEP_15.selector,intro:"To learn how to use List and Map views, select the view and then start the tour.",position:"top"}]},mu={disableInteraction:!0,scrollToElement:!0,scrollTo:"tooltip",showStepNumbers:!1,exitOnOverlayClick:!1,exitOnEsc:!0,nextLabel:"Next",prevLabel:"Previous",doneLabel:"End Tour"},mh=()=>{let e=ta();return(0,v.jsx)(sF,{label:"Take a tour",iconLeft:"help-round",className:"tour-button",onClick:()=>e(lc())})};function md(e){return(md="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})(e)}function mf(e,t,n,r){return new(n||(n=Promise))(function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(o,s)}l((r=r.apply(e,t||[])).next())})}function mp(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(6===c[0]&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function mm(e,t,n){var r,i=((r={})[e]=t,r.path="/",r.expires=void 0,r);if(n){var a=new Date;a.setTime(a.getTime()+24*n*36e5),i.expires=a.toUTCString()}var o=[];for(var s in i)o.push("".concat(s,"=").concat(i[s]));return document.cookie=o.join("; "),mg(e)}function mg(e){var t;return(t={},document.cookie.split(";").forEach(function(e){var n=e.split("="),r=n[0],i=n[1];t[r.trim()]=i}),t)[e]}"function"==typeof SuppressedError&&SuppressedError;var mv,my,mb,mx,mw=(mx={},function(e,t){return void 0===t&&(t="introjs-stamp"),mx[t]=mx[t]||0,void 0===e[t]&&(e[t]=mx[t]++),e[t]}),m_=new(function(){function e(){this.events_key="introjs_event"}return e.prototype._id=function(e,t,n){return e+mw(t)+(n?"_".concat(mw(n)):"")},e.prototype.on=function(e,t,n,r,i){var a=this._id(t,n,r),o=function(t){return n(r||e,t||window.event)};"addEventListener"in e?e.addEventListener(t,o,i):"attachEvent"in e&&e.attachEvent("on".concat(t),o),e[this.events_key]=e[this.events_key]||{},e[this.events_key][a]=o},e.prototype.off=function(e,t,n,r,i){var a=this._id(t,n,r),o=e[this.events_key]&&e[this.events_key][a];o&&("removeEventListener"in e?e.removeEventListener(t,o,i):"detachEvent"in e&&e.detachEvent("on".concat(t),o),e[this.events_key][a]=null)},e}()),mk=function(e){return"function"==typeof e};function mS(e,t){if(e instanceof SVGElement){var n=e.getAttribute("class")||"";n.match(t)||e.setAttribute("class","".concat(n," ").concat(t))}else if(void 0!==e.classList)for(var r=0,i=t.split(" ");r<i.length;r++){var a=i[r];e.classList.add(a)}else e.className.match(t)||(e.className+=" ".concat(t))}function mM(e,t){var n="";return"currentStyle"in e?n=e.currentStyle[t]:document.defaultView&&document.defaultView.getComputedStyle&&(n=document.defaultView.getComputedStyle(e,null).getPropertyValue(t)),n&&n.toLowerCase?n.toLowerCase():n}function mA(e,t){if(e){var n=function(e){var t=window.getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.body;for(var i=e;i=i.parentElement;)if(t=window.getComputedStyle(i),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.body}(t);n!==document.body&&(n.scrollTop=t.offsetTop-n.offsetTop)}}function mT(){if(void 0!==window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var e=document.documentElement;return{width:e.clientWidth,height:e.clientHeight}}function mC(e,t,n,r,i){if("off"!==t&&e&&(a="tooltip"===t?i.getBoundingClientRect():r.getBoundingClientRect(),!((o=r.getBoundingClientRect()).top>=0&&o.left>=0&&o.bottom+80<=window.innerHeight&&o.right<=window.innerWidth))){var a,o,s=mT().height;a.bottom-(a.bottom-a.top)<0||r.clientHeight>s?window.scrollBy(0,a.top-(s/2-a.height/2)-n):window.scrollBy(0,a.top-(s/2-a.height/2)+n)}}function mP(e){e.setAttribute("role","button"),e.tabIndex=0}function mE(e){var t=e.parentElement;return!(!t||"HTML"===t.nodeName)&&("fixed"===mM(e,"position")||mE(t))}function mO(e,t){var n=document.body,r=document.documentElement,i=window.pageYOffset||r.scrollTop||n.scrollTop,a=window.pageXOffset||r.scrollLeft||n.scrollLeft;t=t||n;var o=e.getBoundingClientRect(),s=t.getBoundingClientRect(),l=mM(t,"position"),c={width:o.width,height:o.height};return"body"!==t.tagName.toLowerCase()&&"relative"===l||"sticky"===l?Object.assign(c,{top:o.top-s.top,left:o.left-s.left}):mE(e)?Object.assign(c,{top:o.top,left:o.left}):Object.assign(c,{top:o.top+i,left:o.left+a})}function mN(e,t){if(e instanceof SVGElement){var n=e.getAttribute("class")||"";e.setAttribute("class",n.replace(t,"").replace(/^\s+|\s+$/g,""))}else e.className=e.className.replace(t,"").replace(/^\s+|\s+$/g,"")}function mj(e,t){var n="";if(e.style.cssText&&(n+=e.style.cssText),"string"==typeof t)n+=t;else for(var r in t)n+="".concat(r,":").concat(t[r],";");e.style.cssText=n}function mL(e,t,n){if(n&&t){var r=mO(t.element,e._targetElement),i=e._options.helperElementPadding;t.element instanceof Element&&mE(t.element)?mS(n,"introjs-fixedTooltip"):mN(n,"introjs-fixedTooltip"),"floating"===t.position&&(i=0),mj(n,{width:"".concat(r.width+i,"px"),height:"".concat(r.height+i,"px"),top:"".concat(r.top-i/2,"px"),left:"".concat(r.left-i/2,"px")})}}function mD(e,t,n,r,i){return e.left+t+n.width>r.width?(i.style.left="".concat(r.width-n.width-e.left,"px"),!1):(i.style.left="".concat(t,"px"),!0)}function mR(e,t,n,r){return e.left+e.width-t-n.width<0?(r.style.left="".concat(-e.left,"px"),!1):(r.style.right="".concat(t,"px"),!0)}function mI(e,t){e.includes(t)&&e.splice(e.indexOf(t),1)}function mz(e,t,n,r,i){if(void 0===i&&(i=!1),t){n.style.top="",n.style.right="",n.style.bottom="",n.style.left="",n.style.marginLeft="",n.style.marginTop="",r.style.display="inherit",n.className=["introjs-tooltip","string"==typeof t.tooltipClass?t.tooltipClass:e._options.tooltipClass].filter(Boolean).join(" "),n.setAttribute("role","dialog"),"floating"!==(l=t.position)&&e._options.autoPosition&&(l=function(e,t,n,r){var i=e.slice(),a=mT(),o=mO(n).height+10,s=mO(n).width+20,l=t.getBoundingClientRect(),c="floating";if(l.bottom+o>a.height&&mI(i,"bottom"),l.top-o<0&&mI(i,"top"),l.right+s>a.width&&mI(i,"right"),l.left-s<0&&mI(i,"left"),r&&(r=r.split("-")[0]),i.length&&(c=i[0],i.includes(r)&&(c=r)),"top"===c||"bottom"===c){var u,h,d,f,p,m=void 0,g=[];"top"===c?(m="top-middle-aligned",g=["top-left-aligned","top-middle-aligned","top-right-aligned"]):(m="bottom-middle-aligned",g=["bottom-left-aligned","bottom-middle-aligned","bottom-right-aligned"]),u=l.left,h=a.width,d=g,f=s/2,(p=Math.min(h,window.screen.width))-u<s&&(mI(d,"top-left-aligned"),mI(d,"bottom-left-aligned")),(u<f||p-u<f)&&(mI(d,"top-middle-aligned"),mI(d,"bottom-middle-aligned")),u<s&&(mI(d,"top-right-aligned"),mI(d,"bottom-right-aligned")),c=(d.length?d[0]:null)||m}return c}(e._options.positionPrecedence,t.element,n,l)),o=mO(t.element),a=mO(n),s=mT(),mS(n,"introjs-".concat(l));var a,o,s,l,c=o.width/2-a.width/2;switch(l){case"top-right-aligned":r.className="introjs-arrow bottom-right";mR(o,0,a,n),n.style.bottom="".concat(o.height+20,"px");break;case"top-middle-aligned":r.className="introjs-arrow bottom-middle",i&&(c+=5),mR(o,c,a,n)&&(n.style.right="",mD(o,c,a,s,n)),n.style.bottom="".concat(o.height+20,"px");break;case"top-left-aligned":case"top":r.className="introjs-arrow bottom",mD(o,15*!i,a,s,n),n.style.bottom="".concat(o.height+20,"px");break;case"right":n.style.left="".concat(o.width+20,"px"),o.top+a.height>s.height?(r.className="introjs-arrow left-bottom",n.style.top="-".concat(a.height-o.height-20,"px")):r.className="introjs-arrow left";break;case"left":i||!0!==e._options.showStepNumbers||(n.style.top="15px"),o.top+a.height>s.height?(n.style.top="-".concat(a.height-o.height-20,"px"),r.className="introjs-arrow right-bottom"):r.className="introjs-arrow right",n.style.right="".concat(o.width+20,"px");break;case"floating":r.style.display="none",n.style.left="50%",n.style.top="50%",n.style.marginLeft="-".concat(a.width/2,"px"),n.style.marginTop="-".concat(a.height/2,"px");break;case"bottom-right-aligned":r.className="introjs-arrow top-right",mR(o,0,a,n),n.style.top="".concat(o.height+20,"px");break;case"bottom-middle-aligned":r.className="introjs-arrow top-middle",i&&(c+=5),mR(o,c,a,n)&&(n.style.right="",mD(o,c,a,s,n)),n.style.top="".concat(o.height+20,"px");break;default:r.className="introjs-arrow top",mD(o,0,a,s,n),n.style.top="".concat(o.height+20,"px")}}}function mB(){for(var e=0,t=Array.from(document.querySelectorAll(".introjs-showElement"));e<t.length;e++)mN(t[e],/introjs-[a-zA-Z]+/g)}function mF(e,t){var n=document.createElement(e),r=/^(?:role|data-|aria-)/;for(var i in t=t||{}){var a=t[i];"style"===i&&"function"!=typeof a?mj(n,a):"string"==typeof a&&i.match(r)?n.setAttribute(i,a):n[i]=a}return n}function mH(e,t,n){if(void 0===n&&(n=!1),n){var r=t.style.opacity||"1";mj(t,{opacity:"0"}),window.setTimeout(function(){mj(t,{opacity:r})},10)}e.appendChild(t)}function m$(e,t){var n=mF("div",{className:"introjs-bullets"});!1===e._options.showBullets&&(n.style.display="none");var r=mF("ul");r.setAttribute("role","tablist");for(var i=function(){var t=this.getAttribute("data-step-number");null!=t&&e.goToStep(parseInt(t,10))},a=0;a<e._introItems.length;a++){var o=e._introItems[a].step,s=mF("li"),l=mF("a");s.setAttribute("role","presentation"),l.setAttribute("role","tab"),l.onclick=i,a===t.step-1&&(l.className="active"),mP(l),l.innerHTML=" ",l.setAttribute("data-step-number",o.toString()),s.appendChild(l),r.appendChild(s)}return n.appendChild(r),n}function mU(e,t,n){var r=e.querySelector(".introjs-progress .introjs-progressbar");if(r){var i=(t+1)/n*100;r.style.cssText="width:".concat(i,"%;"),r.setAttribute("aria-valuenow",i.toString())}}function mV(e,t){return mf(this,void 0,void 0,function(){var n,r,i,a,o,s,l,c,u,h,d,f,p,m,g,v,y,b,x,w,_,k,S,M,A=this;return mp(this,function(T){switch(T.label){case 0:return mk(e._introChangeCallback)?[4,e._introChangeCallback.call(e,t.element)]:[3,2];case 1:T.sent(),T.label=2;case 2:var C,P,E,O,N,j;return n=document.querySelector(".introjs-helperLayer"),r=document.querySelector(".introjs-tooltipReferenceLayer"),i="introjs-helperLayer","string"==typeof t.highlightClass&&(i+=" ".concat(t.highlightClass)),"string"==typeof e._options.highlightClass&&(i+=" ".concat(e._options.highlightClass)),null!==n&&null!==r?(l=r.querySelector(".introjs-helperNumberLayer"),c=r.querySelector(".introjs-tooltiptext"),u=r.querySelector(".introjs-tooltip-title"),h=r.querySelector(".introjs-arrow"),d=r.querySelector(".introjs-tooltip"),s=r.querySelector(".introjs-skipbutton"),o=r.querySelector(".introjs-prevbutton"),a=r.querySelector(".introjs-nextbutton"),n.className=i,d.style.opacity="0",d.style.display="none",mA(e._options.scrollToElement,t.element),mL(e,t,n),mL(e,t,r),mB(),e._lastShowElementTimer&&window.clearTimeout(e._lastShowElementTimer),e._lastShowElementTimer=window.setTimeout(function(){null!==l&&(l.innerHTML="".concat(t.step," ").concat(e._options.stepNumbersOfLabel," ").concat(e._introItems.length)),c.innerHTML=t.intro||"",u.innerHTML=t.title||"",d.style.display="block",mz(e,t,d,h),function(e,t,n){if(e){var r=t.querySelector(".introjs-bullets li > a.active"),i=t.querySelector('.introjs-bullets li > a[data-step-number="'.concat(n.step,'"]'));r&&i&&(r.className="",i.className="active")}}(e._options.showBullets,r,t),mU(r,e._currentStep,e._introItems.length),d.style.opacity="1",(null!=a&&/introjs-donebutton/gi.test(a.className)||null!=a)&&a.focus(),mC(e._options.scrollToElement,t.scrollTo,e._options.scrollPadding,t.element,c)},350)):(f=mF("div",{className:i}),p=mF("div",{className:"introjs-tooltipReferenceLayer"}),m=mF("div",{className:"introjs-arrow"}),g=mF("div",{className:"introjs-tooltip"}),v=mF("div",{className:"introjs-tooltiptext"}),y=mF("div",{className:"introjs-tooltip-header"}),b=mF("h1",{className:"introjs-tooltip-title"}),x=mF("div"),mj(f,{"box-shadow":"0 0 1px 2px rgba(33, 33, 33, 0.8), rgba(33, 33, 33, ".concat(e._options.overlayOpacity.toString(),") 0 0 0 5000px")}),mA(e._options.scrollToElement,t.element),mL(e,t,f),mL(e,t,p),mH(e._targetElement,f,!0),mH(e._targetElement,p),v.innerHTML=t.intro,b.innerHTML=t.title,x.className="introjs-tooltipbuttons",!1===e._options.showButtons&&(x.style.display="none"),y.appendChild(b),g.appendChild(y),g.appendChild(v),e._options.dontShowAgain&&(w=mF("div",{className:"introjs-dontShowAgain"}),(_=mF("input",{type:"checkbox",id:"introjs-dontShowAgain",name:"introjs-dontShowAgain"})).onchange=function(t){e.setDontShowAgain(t.target.checked)},(k=mF("label",{htmlFor:"introjs-dontShowAgain"})).innerText=e._options.dontShowAgainLabel,w.appendChild(_),w.appendChild(k),g.appendChild(w)),g.appendChild(m$(e,t)),g.appendChild(((C=mF("div")).className="introjs-progress",!1===e._options.showProgress&&(C.style.display="none"),P=mF("div",{className:"introjs-progressbar"}),e._options.progressBarAdditionalClass&&(P.className+=" "+e._options.progressBarAdditionalClass),E=(e._currentStep+1)/e._introItems.length*100,P.setAttribute("role","progress"),P.setAttribute("aria-valuemin","0"),P.setAttribute("aria-valuemax","100"),P.setAttribute("aria-valuenow",E.toString()),P.style.cssText="width:".concat(E,"%;"),C.appendChild(P),C)),S=mF("div"),!0===e._options.showStepNumbers&&(S.className="introjs-helperNumberLayer",S.innerHTML="".concat(t.step," ").concat(e._options.stepNumbersOfLabel," ").concat(e._introItems.length),g.appendChild(S)),g.appendChild(m),p.appendChild(g),(a=mF("a")).onclick=function(){return mf(A,void 0,void 0,function(){return mp(this,function(t){switch(t.label){case 0:return e._introItems.length-1===e._currentStep?[3,2]:[4,mq(e)];case 1:return t.sent(),[3,6];case 2:return/introjs-donebutton/gi.test(a.className)?mk(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"done")]:[3,4]:[3,6];case 3:t.sent(),t.label=4;case 4:return[4,m9(e,e._targetElement)];case 5:t.sent(),t.label=6;case 6:return[2]}})})},mP(a),a.innerHTML=e._options.nextLabel,(o=mF("a")).onclick=function(){return mf(A,void 0,void 0,function(){return mp(this,function(t){switch(t.label){case 0:return e._currentStep>0?[4,mY(e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},mP(o),o.innerHTML=e._options.prevLabel,mP(s=mF("a",{className:"introjs-skipbutton"})),s.innerHTML=e._options.skipLabel,s.onclick=function(){return mf(A,void 0,void 0,function(){return mp(this,function(t){switch(t.label){case 0:return e._introItems.length-1===e._currentStep&&mk(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"skip")]:[3,2];case 1:t.sent(),t.label=2;case 2:return mk(e._introSkipCallback)?[4,e._introSkipCallback.call(e,e._currentStep)]:[3,4];case 3:t.sent(),t.label=4;case 4:return[4,m9(e,e._targetElement)];case 5:return t.sent(),[2]}})})},y.appendChild(s),e._introItems.length>1&&x.appendChild(o),x.appendChild(a),g.appendChild(x),mz(e,t,g,m),mC(e._options.scrollToElement,t.scrollTo,e._options.scrollPadding,t.element,g)),(M=e._targetElement.querySelector(".introjs-disableInteraction"))&&M.parentNode&&M.parentNode.removeChild(M),t.disableInteraction&&(null===(O=document.querySelector(".introjs-disableInteraction"))&&(O=mF("div",{className:"introjs-disableInteraction"}),e._targetElement.appendChild(O)),mL(e,t,O)),0===e._currentStep&&e._introItems.length>1?(null!=a&&(a.className="".concat(e._options.buttonClass," introjs-nextbutton"),a.innerHTML=e._options.nextLabel),!0===e._options.hidePrev?(null!=o&&(o.className="".concat(e._options.buttonClass," introjs-prevbutton introjs-hidden")),null!=a&&mS(a,"introjs-fullbutton")):null!=o&&(o.className="".concat(e._options.buttonClass," introjs-prevbutton introjs-disabled"))):e._introItems.length-1===e._currentStep||1===e._introItems.length?(null!=o&&(o.className="".concat(e._options.buttonClass," introjs-prevbutton")),!0===e._options.hideNext?(null!=a&&(a.className="".concat(e._options.buttonClass," introjs-nextbutton introjs-hidden")),null!=o&&mS(o,"introjs-fullbutton")):null!=a&&(!0===e._options.nextToDone?(a.innerHTML=e._options.doneLabel,mS(a,"".concat(e._options.buttonClass," introjs-nextbutton introjs-donebutton"))):a.className="".concat(e._options.buttonClass," introjs-nextbutton introjs-disabled"))):(null!=o&&(o.className="".concat(e._options.buttonClass," introjs-prevbutton")),null!=a&&(a.className="".concat(e._options.buttonClass," introjs-nextbutton"),a.innerHTML=e._options.nextLabel)),null!=o&&o.setAttribute("role","button"),null!=a&&a.setAttribute("role","button"),null!=s&&s.setAttribute("role","button"),null!=a&&a.focus(),mS(N=t.element,"introjs-showElement"),"absolute"!==(j=mM(N,"position"))&&"relative"!==j&&"sticky"!==j&&"fixed"!==j&&mS(N,"introjs-relativePosition"),mk(e._introAfterChangeCallback)?[4,e._introAfterChangeCallback.call(e,t.element)]:[3,4];case 3:T.sent(),T.label=4;case 4:return[2]}})})}function mq(e){return mf(this,void 0,void 0,function(){var t,n,r;return mp(this,function(i){switch(i.label){case 0:if(e._direction="forward",void 0!==e._currentStepNumber)for(t=0;t<e._introItems.length;t++)e._introItems[t].step===e._currentStepNumber&&(e._currentStep=t-1,e._currentStepNumber=void 0);return -1===e._currentStep?e._currentStep=0:++e._currentStep,n=e._introItems[e._currentStep],r=!0,mk(e._introBeforeChangeCallback)?[4,e._introBeforeChangeCallback.call(e,n&&n.element,e._currentStep,e._direction)]:[3,2];case 1:r=i.sent(),i.label=2;case 2:return!1===r?(--e._currentStep,[2,!1]):e._introItems.length<=e._currentStep?mk(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"end")]:[3,4]:[3,6];case 3:i.sent(),i.label=4;case 4:return[4,m9(e,e._targetElement)];case 5:return i.sent(),[2,!1];case 6:return[4,mV(e,n)];case 7:return i.sent(),[2,!0]}})})}function mY(e){return mf(this,void 0,void 0,function(){var t,n;return mp(this,function(r){switch(r.label){case 0:return e._direction="backward",e._currentStep<=0?[2,!1]:(--e._currentStep,t=e._introItems[e._currentStep],n=!0,mk(e._introBeforeChangeCallback)?[4,e._introBeforeChangeCallback.call(e,t&&t.element,e._currentStep,e._direction)]:[3,2]);case 1:n=r.sent(),r.label=2;case 2:return!1===n?(++e._currentStep,[2,!1]):[4,mV(e,t)];case 3:return r.sent(),[2,!0]}})})}function mW(e,t){return mf(this,void 0,void 0,function(){var n,r;return mp(this,function(i){switch(i.label){case 0:return null===(n=void 0===t.code?t.which:t.code)&&(n=null===t.charCode?t.keyCode:t.charCode),"Escape"!==n&&27!==n||!0!==e._options.exitOnEsc?[3,2]:[4,m9(e,e._targetElement)];case 1:case 3:case 5:return i.sent(),[3,16];case 2:return"ArrowLeft"!==n&&37!==n?[3,4]:[4,mY(e)];case 4:return"ArrowRight"!==n&&39!==n?[3,6]:[4,mq(e)];case 6:return"Enter"!==n&&"NumpadEnter"!==n&&13!==n?[3,16]:(r=t.target||t.srcElement)&&r.className.match("introjs-prevbutton")?[4,mY(e)]:[3,8];case 7:return i.sent(),[3,15];case 8:return r&&r.className.match("introjs-skipbutton")?e._introItems.length-1===e._currentStep&&mk(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"skip")]:[3,10]:[3,12];case 9:i.sent(),i.label=10;case 10:return[4,m9(e,e._targetElement)];case 11:return i.sent(),[3,15];case 12:return r&&r.getAttribute("data-step-number")?(r.click(),[3,15]):[3,13];case 13:return[4,mq(e)];case 14:i.sent(),i.label=15;case 15:t.preventDefault?t.preventDefault():t.returnValue=!1,i.label=16;case 16:return[2]}})})}function mG(e){if(null===e||"object"!==md(e)||"nodeType"in e)return e;var t={};for(var n in e)"jQuery"in window&&e[n]instanceof window.jQuery?t[n]=e[n]:t[n]=mG(e[n]);return t}function mX(e){var t=document.querySelector(".introjs-hints");return t?Array.from(t.querySelectorAll(e)):[]}function mK(e,t){return mf(this,void 0,void 0,function(){var n;return mp(this,function(r){switch(r.label){case 0:return n=mX('.introjs-hint[data-step="'.concat(t,'"]'))[0],m1(),n&&mS(n,"introjs-hidehint"),mk(e._hintCloseCallback)?[4,e._hintCloseCallback.call(e,t)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})}function mZ(e){var t=mX('.introjs-hint[data-step="'.concat(e,'"]'))[0];t&&mN(t,/introjs-hidehint/g)}function mQ(e){var t=mX('.introjs-hint[data-step="'.concat(e,'"]'))[0];t&&t.parentNode&&t.parentNode.removeChild(t)}function mJ(e,t,n){if(void 0!==n){var r=mO(n);switch(e){default:case"top-left":t.style.left="".concat(r.left,"px"),t.style.top="".concat(r.top,"px");break;case"top-right":t.style.left="".concat(r.left+r.width-20,"px"),t.style.top="".concat(r.top,"px");break;case"bottom-left":t.style.left="".concat(r.left,"px"),t.style.top="".concat(r.top+r.height-20,"px");break;case"bottom-right":t.style.left="".concat(r.left+r.width-20,"px"),t.style.top="".concat(r.top+r.height-20,"px");break;case"middle-left":t.style.left="".concat(r.left,"px"),t.style.top="".concat(r.top+(r.height-20)/2,"px");break;case"middle-right":t.style.left="".concat(r.left+r.width-20,"px"),t.style.top="".concat(r.top+(r.height-20)/2,"px");break;case"middle-middle":t.style.left="".concat(r.left+(r.width-20)/2,"px"),t.style.top="".concat(r.top+(r.height-20)/2,"px");break;case"bottom-middle":t.style.left="".concat(r.left+(r.width-20)/2,"px"),t.style.top="".concat(r.top+r.height-20,"px");break;case"top-middle":t.style.left="".concat(r.left+(r.width-20)/2,"px"),t.style.top="".concat(r.top,"px")}}}function m0(e,t){return mf(this,void 0,void 0,function(){var n,r,i,a,o,s,l,c,u,h,d;return mp(this,function(f){switch(f.label){case 0:return n=document.querySelector('.introjs-hint[data-step="'.concat(t,'"]')),r=e._hintItems[t],mk(e._hintClickCallback)?[4,e._hintClickCallback.call(e,n,r,t)]:[3,2];case 1:f.sent(),f.label=2;case 2:return void 0!==(i=m1())&&parseInt(i,10)===t||(a=mF("div",{className:"introjs-tooltip"}),o=mF("div"),s=mF("div"),l=mF("div"),a.onclick=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},o.className="introjs-tooltiptext",(c=mF("p")).innerHTML=r.hint||"",o.appendChild(c),e._options.hintShowButton&&((u=mF("a")).className=e._options.buttonClass,u.setAttribute("role","button"),u.innerHTML=e._options.hintButtonLabel,u.onclick=function(){return mK(e,t)},o.appendChild(u)),s.className="introjs-arrow",a.appendChild(s),a.appendChild(o),e._currentStep=parseInt(h=n.getAttribute("data-step")||"",10),d=e._hintItems[e._currentStep],l.className="introjs-tooltipReferenceLayer introjs-hintReference",l.setAttribute("data-step",h),mL(e,d,l),l.appendChild(a),document.body.appendChild(l),mz(e,d,a,s,!0)),[2]}})})}function m1(){var e=document.querySelector(".introjs-hintReference");if(e&&e.parentNode){var t=e.getAttribute("data-step");if(!t)return;return e.parentNode.removeChild(e),t}}function m2(e,t){return mf(this,void 0,void 0,function(){var n,r,i,a,o,s,l,c,u;return mp(this,function(h){switch(h.label){case 0:if(e._hintItems=[],e._options.hints&&e._options.hints.length>0)for(n=0,r=e._options.hints;n<r.length;n++)"string"==typeof(i=mG(r[n])).element&&(i.element=document.querySelector(i.element)),i.hintPosition=i.hintPosition||e._options.hintPosition,i.hintAnimation=i.hintAnimation||e._options.hintAnimation,null!==i.element&&e._hintItems.push(i);else{if(!(a=Array.from(t.querySelectorAll("*[data-hint]")))||!a.length)return[2,!1];for(o=0,s=a;o<s.length;o++)c=(l=s[o]).getAttribute("data-hint-animation"),u=e._options.hintAnimation,c&&(u="true"===c),e._hintItems.push({element:l,hint:l.getAttribute("data-hint")||"",hintPosition:l.getAttribute("data-hint-position")||e._options.hintPosition,hintAnimation:u,tooltipClass:l.getAttribute("data-tooltip-class")||void 0,position:l.getAttribute("data-position")||e._options.tooltipPosition})}return[4,function(e){return mf(this,void 0,void 0,function(){var t,n,r,i,a,o,s;return mp(this,function(l){var c,u,h;switch(l.label){case 0:for(null===(t=document.querySelector(".introjs-hints"))&&(t=mF("div",{className:"introjs-hints"})),n=function(t){return function(n){var r=n||window.event;r&&r.stopPropagation&&r.stopPropagation(),r&&null!==r.cancelBubble&&(r.cancelBubble=!0),m0(e,t)}},r=0;r<e._hintItems.length;r++){if(i=e._hintItems[r],document.querySelector('.introjs-hint[data-step="'.concat(r,'"]')))return[2];mP(a=mF("a",{className:"introjs-hint"})),a.onclick=n(r),i.hintAnimation||mS(a,"introjs-hint-no-anim"),mE(i.element)&&mS(a,"introjs-fixedhint"),o=mF("div",{className:"introjs-hint-dot"}),s=mF("div",{className:"introjs-hint-pulse"}),a.appendChild(o),a.appendChild(s),a.setAttribute("data-step",r.toString()),i.hintTargetElement=i.element,i.element=a,mJ(i.hintPosition,a,i.hintTargetElement),t.appendChild(a)}return document.body.appendChild(t),mk(e._hintsAddedCallback)?[4,e._hintsAddedCallback.call(e)]:[3,2];case 1:l.sent(),l.label=2;case 2:return e._options.hintAutoRefreshInterval>=0&&(c=function(){return m3(e)},u=e._options.hintAutoRefreshInterval,e._hintsAutoRefreshFunction=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];window.clearTimeout(h),h=window.setTimeout(function(){c()},u)},m_.on(window,"scroll",e._hintsAutoRefreshFunction,e,!0)),[2]}})})}(e)];case 1:return h.sent(),m_.on(document,"click",m1,e,!1),m_.on(window,"resize",m3,e,!0),[2,!0]}})})}function m3(e){for(var t=0,n=e._hintItems;t<n.length;t++){var r=n[t],i=r.hintTargetElement;mJ(r.hintPosition,r.element,i)}}function m5(e,t){var n=Array.from(t.querySelectorAll("*[data-intro]")),r=[];if(e._options.steps&&e._options.steps.length)for(var i=0,a=e._options.steps;i<a.length;i++){var o=mG(h=a[i]);if(o.step=r.length+1,o.title=o.title||"","string"==typeof o.element&&(o.element=document.querySelector(o.element)||void 0),void 0===o.element||null===o.element){var s=document.querySelector(".introjsFloatingElement");null===s&&(s=mF("div",{className:"introjsFloatingElement"}),document.body.appendChild(s)),o.element=s,o.position="floating"}o.position=o.position||e._options.tooltipPosition,o.scrollTo=o.scrollTo||e._options.scrollTo,void 0===o.disableInteraction&&(o.disableInteraction=e._options.disableInteraction),null!==o.element&&r.push(o)}else{var l=void 0;if(n.length<1)return[];for(var c=0;c<n.length;c++){var u=n[c];if((!e._options.group||u.getAttribute("data-intro-group")===e._options.group)&&"none"!==u.style.display){var h=parseInt(u.getAttribute("data-step")||"",10);l=e._options.disableInteraction,u.hasAttribute("data-disable-interaction")&&(l=!!u.getAttribute("data-disable-interaction")),h>0&&(r[h-1]={step:h,element:u,title:u.getAttribute("data-title")||"",intro:u.getAttribute("data-intro")||"",tooltipClass:u.getAttribute("data-tooltip-class")||void 0,highlightClass:u.getAttribute("data-highlight-class")||void 0,position:u.getAttribute("data-position")||e._options.tooltipPosition,scrollTo:u.getAttribute("data-scroll-to")||e._options.scrollTo,disableInteraction:l})}}for(var d=0,f=0;f<n.length;f++)if(u=n[f],(!e._options.group||u.getAttribute("data-intro-group")===e._options.group)&&null===u.getAttribute("data-step")){for(;void 0!==r[d];)d++;l=u.hasAttribute("data-disable-interaction")?!!u.getAttribute("data-disable-interaction"):e._options.disableInteraction,r[d]={element:u,title:u.getAttribute("data-title")||"",intro:u.getAttribute("data-intro")||"",step:d+1,tooltipClass:u.getAttribute("data-tooltip-class")||void 0,highlightClass:u.getAttribute("data-highlight-class")||void 0,position:u.getAttribute("data-position")||e._options.tooltipPosition,scrollTo:u.getAttribute("data-scroll-to")||e._options.scrollTo,disableInteraction:l}}}for(var p=[],m=0;m<r.length;m++)r[m]&&p.push(r[m]);return(r=p).sort(function(e,t){return e.step-t.step}),r}function m7(e,t){var n=e._currentStep;if(null!=n&&-1!=n){var r=e._introItems[n],i=document.querySelector(".introjs-tooltipReferenceLayer"),a=document.querySelector(".introjs-helperLayer"),o=document.querySelector(".introjs-disableInteraction");mL(e,r,a),mL(e,r,i),mL(e,r,o),t&&(e._introItems=m5(e,e._targetElement),function(e,t){if(e._options.showBullets){var n=document.querySelector(".introjs-bullets");n&&n.parentNode&&n.parentNode.replaceChild(m$(e,t),n)}}(e,r),mU(i,n,e._introItems.length));var s=document.querySelector(".introjs-arrow"),l=document.querySelector(".introjs-tooltip");return l&&s&&mz(e,e._introItems[n],l,s),m3(e),e}}function m4(e){m7(e)}function m6(e,t){if(void 0===t&&(t=!1),e&&e.parentElement){var n=e.parentElement;t?(mj(e,{opacity:"0"}),window.setTimeout(function(){try{n.removeChild(e)}catch(e){}},500)):n.removeChild(e)}}function m9(e,t,n){return void 0===n&&(n=!1),mf(this,void 0,void 0,function(){var r,i,a,o;return mp(this,function(s){switch(s.label){case 0:return r=!0,void 0===e._introBeforeExitCallback?[3,2]:[4,e._introBeforeExitCallback.call(e,t)];case 1:r=s.sent(),s.label=2;case 2:if(!n&&!1===r)return[2];if((i=Array.from(t.querySelectorAll(".introjs-overlay")))&&i.length)for(a=0,o=i;a<o.length;a++)m6(o[a]);return m6(t.querySelector(".introjs-helperLayer"),!0),m6(t.querySelector(".introjs-tooltipReferenceLayer")),m6(t.querySelector(".introjs-disableInteraction")),m6(document.querySelector(".introjsFloatingElement")),mB(),m_.off(window,"keydown",mW,e,!0),m_.off(window,"resize",m4,e,!0),mk(e._introExitCallback)?[4,e._introExitCallback.call(e)]:[3,4];case 3:s.sent(),s.label=4;case 4:return e._currentStep=-1,[2]}})})}var m8=function(){function e(e){this._currentStep=-1,this._introItems=[],this._hintItems=[],this._targetElement=e,this._options={steps:[],hints:[],isActive:!0,nextLabel:"Next",prevLabel:"Back",skipLabel:"×",doneLabel:"Done",hidePrev:!1,hideNext:!1,nextToDone:!0,tooltipPosition:"bottom",tooltipClass:"",group:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!1,stepNumbersOfLabel:"of",keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,scrollTo:"element",scrollPadding:30,overlayOpacity:.5,autoPosition:!0,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1,dontShowAgain:!1,dontShowAgainLabel:"Don't show this again",dontShowAgainCookie:"introjs-dontShowAgain",dontShowAgainCookieDays:365,helperElementPadding:10,hintPosition:"top-middle",hintButtonLabel:"Got it",hintShowButton:!0,hintAutoRefreshInterval:10,hintAnimation:!0,buttonClass:"introjs-button",progressBarAdditionalClass:!1}}return e.prototype.isActive=function(){var e;return(!this._options.dontShowAgain||""===(e=mg(this._options.dontShowAgainCookie))||"true"!==e)&&this._options.isActive},e.prototype.clone=function(){return new e(this._targetElement)},e.prototype.setOption=function(e,t){var n;return this._options=(n=this._options,n[e]=t,n),this},e.prototype.setOptions=function(e){return this._options=function(e,t){for(var n=0,r=Object.entries(t);n<r.length;n++){var i,a,o,s=r[n];i=e,a=s[0],o=s[1],i[a]=o,e=i}return e}(this._options,e),this},e.prototype.start=function(){return mf(this,void 0,void 0,function(){return mp(this,function(e){switch(e.label){case 0:return[4,function(e,t){return mf(this,void 0,void 0,function(){var n;return mp(this,function(r){switch(r.label){case 0:return e.isActive()?mk(e._introStartCallback)?[4,e._introStartCallback.call(e,t)]:[3,2]:[2,!1];case 1:r.sent(),r.label=2;case 2:return 0===(n=m5(e,t)).length?[2,!1]:(e._introItems=n,function(e,t){var n=this,r=mF("div",{className:"introjs-overlay"});mj(r,{top:0,bottom:0,left:0,right:0,position:"fixed"}),t.appendChild(r),!0===e._options.exitOnOverlayClick&&(mj(r,{cursor:"pointer"}),r.onclick=function(){return mf(n,void 0,void 0,function(){return mp(this,function(n){switch(n.label){case 0:return[4,m9(e,t)];case 1:return n.sent(),[2]}})})})}(e,t),[4,mq(e)]);case 3:r.sent(),t.addEventListener,e._options.keyboardNavigation&&m_.on(window,"keydown",mW,e,!0),m_.on(window,"resize",m4,e,!0),r.label=4;case 4:return[2,!1]}})})}(this,this._targetElement)];case 1:return e.sent(),[2,this]}})})},e.prototype.goToStep=function(e){return mf(this,void 0,void 0,function(){return mp(this,function(t){switch(t.label){case 0:return[4,function(e,t){return mf(this,void 0,void 0,function(){return mp(this,function(n){switch(n.label){case 0:return e._currentStep=t-2,void 0===e._introItems?[3,2]:[4,mq(e)];case 1:n.sent(),n.label=2;case 2:return[2]}})})}(this,e)];case 1:return t.sent(),[2,this]}})})},e.prototype.addStep=function(e){return this._options.steps||(this._options.steps=[]),this._options.steps.push(e),this},e.prototype.addSteps=function(e){if(!e.length)return this;for(var t=0;t<e.length;t++)this.addStep(e[t]);return this},e.prototype.goToStepNumber=function(e){return mf(this,void 0,void 0,function(){return mp(this,function(t){switch(t.label){case 0:return[4,function(e,t){return mf(this,void 0,void 0,function(){return mp(this,function(n){switch(n.label){case 0:return e._currentStepNumber=t,void 0===e._introItems?[3,2]:[4,mq(e)];case 1:n.sent(),n.label=2;case 2:return[2]}})})}(this,e)];case 1:return t.sent(),[2,this]}})})},e.prototype.nextStep=function(){return mf(this,void 0,void 0,function(){return mp(this,function(e){switch(e.label){case 0:return[4,mq(this)];case 1:return e.sent(),[2,this]}})})},e.prototype.previousStep=function(){return mf(this,void 0,void 0,function(){return mp(this,function(e){switch(e.label){case 0:return[4,mY(this)];case 1:return e.sent(),[2,this]}})})},e.prototype.currentStep=function(){return this._currentStep},e.prototype.exit=function(e){return mf(this,void 0,void 0,function(){return mp(this,function(t){switch(t.label){case 0:return[4,m9(this,this._targetElement,e)];case 1:return t.sent(),[2,this]}})})},e.prototype.refresh=function(e){return m7(this,e),this},e.prototype.setDontShowAgain=function(e){return e?mm(this._options.dontShowAgainCookie,"true",this._options.dontShowAgainCookieDays):mm(this._options.dontShowAgainCookie,"",-1),this},e.prototype.onbeforechange=function(e){if(!mk(e))throw Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=e,this},e.prototype.onchange=function(e){if(!mk(e))throw Error("Provided callback for onchange was not a function.");return this._introChangeCallback=e,this},e.prototype.onafterchange=function(e){if(!mk(e))throw Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=e,this},e.prototype.oncomplete=function(e){if(!mk(e))throw Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=e,this},e.prototype.onhintsadded=function(e){if(!mk(e))throw Error("Provided callback for onhintsadded was not a function.");return this._hintsAddedCallback=e,this},e.prototype.onhintclick=function(e){if(!mk(e))throw Error("Provided callback for onhintclick was not a function.");return this._hintClickCallback=e,this},e.prototype.onhintclose=function(e){if(!mk(e))throw Error("Provided callback for onhintclose was not a function.");return this._hintCloseCallback=e,this},e.prototype.onstart=function(e){if(!mk(e))throw Error("Provided callback for onstart was not a function.");return this._introStartCallback=e,this},e.prototype.onexit=function(e){if(!mk(e))throw Error("Provided callback for onexit was not a function.");return this._introExitCallback=e,this},e.prototype.onskip=function(e){if(!mk(e))throw Error("Provided callback for onskip was not a function.");return this._introSkipCallback=e,this},e.prototype.onbeforeexit=function(e){if(!mk(e))throw Error("Provided callback for onbeforeexit was not a function.");return this._introBeforeExitCallback=e,this},e.prototype.addHints=function(){return mf(this,void 0,void 0,function(){return mp(this,function(e){switch(e.label){case 0:return[4,m2(this,this._targetElement)];case 1:return e.sent(),[2,this]}})})},e.prototype.hideHint=function(e){return mf(this,void 0,void 0,function(){return mp(this,function(t){switch(t.label){case 0:return[4,mK(this,e)];case 1:return t.sent(),[2,this]}})})},e.prototype.hideHints=function(){return mf(this,void 0,void 0,function(){return mp(this,function(e){switch(e.label){case 0:return[4,function(e){return mf(this,void 0,void 0,function(){var t,n,r,i;return mp(this,function(a){switch(a.label){case 0:t=mX(".introjs-hint"),n=0,r=t,a.label=1;case 1:return n<r.length?(i=r[n].getAttribute("data-step"))?[4,mK(e,parseInt(i,10))]:[3,3]:[3,4];case 2:a.sent(),a.label=3;case 3:return n++,[3,1];case 4:return[2]}})})}(this)];case 1:return e.sent(),[2,this]}})})},e.prototype.showHint=function(e){return mZ(e),this},e.prototype.showHints=function(){return mf(this,void 0,void 0,function(){return mp(this,function(e){switch(e.label){case 0:return[4,function(e){return mf(this,void 0,void 0,function(){var t,n,r,i;return mp(this,function(a){switch(a.label){case 0:if(!(t=mX(".introjs-hint"))||!t.length)return[3,1];for(n=0,r=t;n<r.length;n++)(i=r[n].getAttribute("data-step"))&&mZ(parseInt(i,10));return[3,3];case 1:return[4,m2(e,e._targetElement)];case 2:a.sent(),a.label=3;case 3:return[2]}})})}(this)];case 1:return e.sent(),[2,this]}})})},e.prototype.removeHints=function(){return function(e){for(var t=0,n=mX(".introjs-hint");t<n.length;t++){var r=n[t].getAttribute("data-step");r&&mQ(parseInt(r,10))}m_.off(document,"click",m1,e,!1),m_.off(window,"resize",m3,e,!0),e._hintsAutoRefreshFunction&&m_.off(window,"scroll",e._hintsAutoRefreshFunction,e,!0)}(this),this},e.prototype.removeHint=function(e){return mQ(e),this},e.prototype.showHintDialog=function(e){return mf(this,void 0,void 0,function(){return mp(this,function(t){switch(t.label){case 0:return[4,m0(this,e)];case 1:return t.sent(),[2,this]}})})},e}(),ge=function e(t){var n;if("object"===md(t))n=new m8(t);else if("string"==typeof t){var r=document.querySelector(t);if(!r)throw Error("There is no element with given selector.");n=new m8(r)}else n=new m8(document.body);return e.instances[mw(n,"introjs-instance")]=n,n};ge.version="7.2.0",ge.instances={};var gt=i(7897);class gn extends b.Component{componentDidMount(){this.props.isEnabled&&(this.configureIntroJs(),this.renderSteps())}componentDidUpdate(e){let{isEnabled:t,steps:n,options:r}=this.props,i=!this.isConfigured||e.steps!==n||e.options!==r,a=e.isEnabled!==t;i&&this.configureIntroJs(),(i||a)&&this.renderSteps()}componentWillUnmount(){var e;this.restoreDocumentQueryPatch(),null==(e=this.introJs)||e.exit()}enableDocumentQueryPatch(){let e=am();e===document.body||this._documentQuerySelector||(this._queryTarget=e,this._documentQuerySelector=document.querySelector,this._documentQuerySelectorAll=document.querySelectorAll,document.querySelector=e=>{if("string"==typeof e&&e.includes("introjs")){let t=this._queryTarget.querySelector(e);if(t)return t}return this._documentQuerySelector.call(document,e)},document.querySelectorAll=e=>{if("string"==typeof e&&e.includes("introjs")){let t=this._queryTarget.querySelectorAll(e);if(t.length)return t}return this._documentQuerySelectorAll.call(document,e)})}restoreDocumentQueryPatch(){this._documentQuerySelector&&(document.querySelector=this._documentQuerySelector,document.querySelectorAll=this._documentQuerySelectorAll,this._documentQuerySelector=null,this._documentQuerySelectorAll=null,this._queryTarget=null)}installIntroJs(){"u">typeof window&&(this.introJs=ge(am()),this.introJs.onexit(this.onExit),this.introJs.onbeforeexit(this.onBeforeExit),this.introJs.onbeforechange(this.onBeforeChange),this.introJs.onafterchange(this.onAfterChange),this.introJs.onchange(this.onChange),this.introJs.oncomplete(this.onComplete))}configureIntroJs(){let{options:e,steps:t}=this.props,n=t.map(e=>this.prepareStep(e));this.introJs.setOptions(iV(tu({},e),{steps:n})),this.isConfigured=!0}renderSteps(){let{isEnabled:e,initialStep:t,steps:n,onStart:r}=this.props;e&&n.length>0&&!this.isVisible?(this.enableDocumentQueryPatch(),this.configureIntroJs(),this.introJs.start(),this.refreshAllStepElements(),this.isVisible=!0,this.introJs.goToStepNumber(t+1),r&&r(this.introJs._currentStep)):!e&&this.isVisible&&(this.isVisible=!1,this.introJs.exit(),this.restoreDocumentQueryPatch())}render(){return null}constructor(e){super(e),tc(this,"onExit",()=>{this.restoreDocumentQueryPatch();let{onExit:e}=this.props;this.isVisible=!1,e(this.introJs._currentStep)}),tc(this,"onBeforeExit",()=>{let{onBeforeExit:e}=this.props;return!e||e(this.introJs._currentStep)}),tc(this,"onBeforeChange",e=>{if(!this.isVisible)return!0;this.refreshAllStepElements();let{onBeforeChange:t,onPreventChange:n}=this.props;if(t){let r=t(this.introJs._currentStep,e);return!1===r&&n&&setTimeout(()=>{n(this.introJs._currentStep)},0),r}return!0}),tc(this,"onAfterChange",e=>{var t;if(!this.isVisible)return;this.refreshAllStepElements(),"function"==typeof(null==(t=this.introJs)?void 0:t.refresh)&&this.introJs.refresh(!0);let{onAfterChange:n}=this.props;n&&n(this.introJs._currentStep,e)}),tc(this,"onChange",e=>{if(!this.isVisible)return;let{onChange:t}=this.props;t&&t(this.introJs._currentStep,e)}),tc(this,"onComplete",()=>{let{onComplete:e}=this.props;e&&e()}),tc(this,"updateStepElement",e=>{var t,n,r,i,a;let o=null==(r=this.introJs)||null==(n=r._options)||null==(t=n.steps)?void 0:t[e],s=null==(a=this.introJs)||null==(i=a._introItems)?void 0:i[e],l=null==o?void 0:o._selector;if(!l||!s)return;let c=ap(l);c&&(s.element=c,s.position=o.position||"auto")}),tc(this,"refreshAllStepElements",()=>{var e,t;let n=(null==(t=this.introJs)||null==(e=t._options)?void 0:e.steps)||[];for(let e=0;e<n.length;e++)this.updateStepElement(e)}),tc(this,"prepareStep",e=>{let t="string"==typeof e.element?e.element:null,n=e.intro;if((0,b.isValidElement)(n)&&(n=(0,gt.qV)(n)),!t)return iV(tu({},e),{intro:n});let r=ap(t);return iV(tu({},e),{intro:n,_selector:t,element:r||void 0})}),this.introJs=null,this.isConfigured=!1,this.isVisible=!1,this._documentQuerySelector=null,this._documentQuerySelectorAll=null,this._queryTarget=null,this.installIntroJs()}}tc(gn,"propTypes",{isEnabled:s0().bool,initialStep:s0().number.isRequired,steps:s0().arrayOf(s0().shape({element:s0().oneOfType([s0().string,"u"<typeof Element?s0().any:s0().instanceOf(Element)]),intro:s0().node.isRequired,position:s0().string,tooltipClass:s0().string,highlightClass:s0().string})).isRequired,onStart:s0().func,onExit:s0().func.isRequired,onBeforeExit:s0().func,onBeforeChange:s0().func,onAfterChange:s0().func,onChange:s0().func,onPreventChange:s0().func,onComplete:s0().func,options:s0().object}),tc(gn,"defaultProps",{isEnabled:!1,onStart:null,onBeforeExit:null,onBeforeChange:null,onAfterChange:null,onChange:null,onPreventChange:null,onComplete:null,options:{}});let gr=p8.MOBILE_FILTER_TOGGLE,gi=p8.ROW_CHART_SECTION,ga=p8.MAP_ROW_CHART_SECTION,go={disableInteraction:!1,element:gr,intro:"On mobile devices, click the Filter Panel toggle button to open the Filter Panel. Please click the button to proceed."},gs={disableInteraction:!1,element:gr,intro:"Click the Filter Panel toggle button again to close the Filter Panel. Please close the Filter Panel to proceed."},gl=()=>{let e=ta(),{isLoading:t,isFetching:n}=l0(),{isLoading:r,isFetching:i}=p_(),{isLoading:a,isFetching:o}=fZ(),{isLoading:s,isFetching:l}=pN(),c=ts(fu),u=ts(fh),h=ts(fc),d=ts(fd),f=(0,b.useRef)(),p=i5([t,n,h,r,i,a,o,s,l]),m=d<750,g=(0,b.useMemo)(()=>m?mc[u].slice(0,3).concat(go,mc[u].slice(4,7),gs,mc[u].slice(7)):mc[u],[u,m]),y=(0,b.useCallback)(e=>{var t,n,r;let i,a;if(!e.current)return;let o=e.current.introJs.currentStep();if(!g[o])return;((i=null==(t=g[o])?void 0:t.element)===gi||i===ga)&&(null==(a=ap(ga)||ap(gi))||a.scrollIntoView({block:"center"}),requestAnimationFrame(()=>{let e=ap(p8.ROW_CHART_EXPANDABLE);null==e||e.click()}));let s=()=>{var t;null==(t=ap(".introjs-nextbutton"))||t.setAttribute("style","display: inline"),(7===o?Promise.resolve():new Promise(e=>{let t=Date.now(),n=setInterval(()=>{if(null!==ap(p8.DATE_FILTER)){clearInterval(n),e();return}Date.now()-t>=5e3&&(clearInterval(n),e())},10)})).then(()=>{e.current.introJs.nextStep().then(()=>{var e;null==(e=ap(gr))||e.removeEventListener("click",s)})})};m&&(3===o||7===o)&&(null==(n=ap(".introjs-nextbutton"))||n.setAttribute("style","display: none"),null==(r=ap(gr))||r.addEventListener("click",s))},[g,m]),x=(0,b.useCallback)(e=>null===e.current||!c||!(e.current.introJs.currentStep()+1<g.length)||window.confirm("Are you sure you want to exit the tour?"),[g.length,c]),w=(0,b.useCallback)(()=>{c&&e(ll())},[e,c]),_=(0,b.useCallback)(()=>y(f),[y]),k=(0,b.useCallback)(()=>x(f),[x]);return p?null:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(mh,{}),(0,v.jsx)(gn,{isEnabled:c,initialStep:0,steps:g,onExit:w,options:mu,onBeforeChange:_,onBeforeExit:k,ref:f})]})};function gc(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,b.useEffect)(()=>(window.addEventListener(e,t,n),function(){window.removeEventListener(e,t)}))}let gu=()=>{let e=ta(),t=ts(lN),n=ts(lD),r=ts(lU),i=ts(lq),a=ts(lV),o=ts(lG),s=iE.filter(e=>e in t).reduce((e,n)=>{let r=t[n].map(e=>({fieldName:n,value:e}));return e.concat(r)},[]);return(n&&s.push({fieldName:"has_narrative",value:"Has narrative"}),id()(i).isSame(id()(i_),"day")&&id()(a).isSame(id()(r),"day")||s.unshift({fieldName:"date_received",value:"Date Received: "+id()(i).format("M/D/YYYY")+" - "+id()(a).format("M/D/YYYY")}),s.length)?(0,v.jsxs)("section",{className:"pill-panel",children:[(0,v.jsx)(sH,{type:"3",className:"h4 pill-label flex-fixed",children:"Filters applied:"}),(0,v.jsxs)("ul",{className:"m-tag-group pill-panel__list",children:[s.map(e=>(0,v.jsx)(f5,{fieldName:e.fieldName,value:e.value,displayValue:"state"===e.fieldName?lE(e.value):void 0},e.fieldName+e.value)),(0,v.jsx)("li",{className:"pill-panel__clear",children:(0,v.jsx)(sF,{appearance:"warning",label:"Clear all filters",isLink:!0,onClick:()=>e(lx(o))})})]})]}):null},gh=0x80000000-1;i(3544);let gd=e=>e&&"function"!=typeof e?t=>{e.current=t}:e;var gf=function(e,t){return(0,b.useMemo)(()=>{let n,r;return n=gd(e),r=gd(t),e=>{n&&n(e),r&&r(e)}},[e,t])};function gp(){return(0,b.useState)(null)}let gm=e=>e&&"function"!=typeof e?t=>{e.current=t}:e;var gg=function(e,t){return(0,b.useMemo)(()=>{let n,r;return n=gm(e),r=gm(t),e=>{n&&n(e),r&&r(e)}},[e,t])},gv=Object.prototype.hasOwnProperty;function gy(e,t,n){for(n of e.keys())if(gb(n,t))return n}function gb(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&gb(e[r],t[r]););return -1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if((i=r)&&"object"==typeof i&&!(i=gy(t,i))||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if((i=r[0])&&"object"==typeof i&&!(i=gy(t,i))||!gb(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return -1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return -1===r}if(!n||"object"==typeof e){for(n in r=0,e)if(gv.call(e,n)&&++r&&!gv.call(t,n)||!(n in t)||!gb(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}var gx=function(e){let t,n,r=(t=(0,b.useRef)(!0),n=(0,b.useRef)(()=>t.current),(0,b.useEffect)(()=>(t.current=!0,()=>{t.current=!1}),[]),n.current);return[e[0],(0,b.useCallback)(t=>{if(r())return e[1](t)},[r,e[1]])]};function gw(e){return e.split("-")[0]}function g_(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function gk(e){var t=g_(e).Element;return e instanceof t||e instanceof Element}function gS(e){var t=g_(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function gM(e){if("u"<typeof ShadowRoot)return!1;var t=g_(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var gA=Math.max,gT=Math.min,gC=Math.round;function gP(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function gE(){return!/^((?!chrome|android).)*safari/i.test(gP())}function gO(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&gS(e)&&(i=e.offsetWidth>0&&gC(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&gC(r.height)/e.offsetHeight||1);var o=(gk(e)?g_(e):window).visualViewport,s=!gE()&&n,l=(r.left+(s&&o?o.offsetLeft:0))/i,c=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,h=r.height/a;return{width:u,height:h,top:c,right:l+u,bottom:c+h,left:l,x:l,y:c}}function gN(e){var t=gO(e),n=e.offsetWidth,r=e.offsetHeight;return 1>=Math.abs(t.width-n)&&(n=t.width),1>=Math.abs(t.height-r)&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function gj(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&gM(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function gL(e){return e?(e.nodeName||"").toLowerCase():null}function gD(e){return g_(e).getComputedStyle(e)}function gR(e){return((gk(e)?e.ownerDocument:e.document)||window.document).documentElement}function gI(e){return"html"===gL(e)?e:e.assignedSlot||e.parentNode||(gM(e)?e.host:null)||gR(e)}function gz(e){return gS(e)&&"fixed"!==gD(e).position?e.offsetParent:null}function gB(e){for(var t=g_(e),n=gz(e);n&&["table","td","th"].indexOf(gL(n))>=0&&"static"===gD(n).position;)n=gz(n);return n&&("html"===gL(n)||"body"===gL(n)&&"static"===gD(n).position)?t:n||function(e){var t=/firefox/i.test(gP());if(/Trident/i.test(gP())&&gS(e)&&"fixed"===gD(e).position)return null;var n=gI(e);for(gM(n)&&(n=n.host);gS(n)&&0>["html","body"].indexOf(gL(n));){var r=gD(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function gF(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function gH(e,t,n){return gA(e,gT(t,n))}function g$(){return{top:0,right:0,bottom:0,left:0}}function gU(e){return Object.assign({},g$(),e)}function gV(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var gq="bottom",gY="right",gW="left",gG="auto",gX=["top",gq,gY,gW],gK="start",gZ="viewport",gQ="popper",gJ=gX.reduce(function(e,t){return e.concat([t+"-"+gK,t+"-end"])},[]),g0=[].concat(gX,[gG]).reduce(function(e,t){return e.concat([t,t+"-"+gK,t+"-end"])},[]),g1=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function g2(e){return e.split("-")[1]}var g3={top:"auto",right:"auto",bottom:"auto",left:"auto"};function g5(e){var t,n,r,i,a,o,s,l=e.popper,c=e.popperRect,u=e.placement,h=e.variation,d=e.offsets,f=e.position,p=e.gpuAcceleration,m=e.adaptive,g=e.roundOffsets,v=e.isFixed,y=d.x,b=void 0===y?0:y,x=d.y,w=void 0===x?0:x,_="function"==typeof g?g({x:b,y:w}):{x:b,y:w};b=_.x,w=_.y;var k=d.hasOwnProperty("x"),S=d.hasOwnProperty("y"),M=gW,A="top",T=window;if(m){var C=gB(l),P="clientHeight",E="clientWidth";C===g_(l)&&"static"!==gD(C=gR(l)).position&&"absolute"===f&&(P="scrollHeight",E="scrollWidth"),("top"===u||(u===gW||u===gY)&&"end"===h)&&(A=gq,w-=(v&&C===T&&T.visualViewport?T.visualViewport.height:C[P])-c.height,w*=p?1:-1),(u===gW||("top"===u||u===gq)&&"end"===h)&&(M=gY,b-=(v&&C===T&&T.visualViewport?T.visualViewport.width:C[E])-c.width,b*=p?1:-1)}var O=Object.assign({position:f},m&&g3),N=!0===g?(t={x:b,y:w},n=g_(l),r=t.x,i=t.y,{x:gC(r*(a=n.devicePixelRatio||1))/a||0,y:gC(i*a)/a||0}):{x:b,y:w};return(b=N.x,w=N.y,p)?Object.assign({},O,((s={})[A]=S?"0":"",s[M]=k?"0":"",s.transform=1>=(T.devicePixelRatio||1)?"translate("+b+"px, "+w+"px)":"translate3d("+b+"px, "+w+"px, 0)",s)):Object.assign({},O,((o={})[A]=S?w+"px":"",o[M]=k?b+"px":"",o.transform="",o))}var g7={passive:!0},g4={left:"right",right:"left",bottom:"top",top:"bottom"};function g6(e){return e.replace(/left|right|bottom|top/g,function(e){return g4[e]})}var g9={start:"end",end:"start"};function g8(e){return e.replace(/start|end/g,function(e){return g9[e]})}function ve(e){var t=g_(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function vt(e){return gO(gR(e)).left+ve(e).scrollLeft}function vn(e){var t=gD(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function vr(e,t){void 0===t&&(t=[]);var n,r=function e(t){return["html","body","#document"].indexOf(gL(t))>=0?t.ownerDocument.body:gS(t)&&vn(t)?t:e(gI(t))}(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),a=g_(r),o=i?[a].concat(a.visualViewport||[],vn(r)?r:[]):r,s=t.concat(o);return i?s:s.concat(vr(gI(o)))}function vi(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function va(e,t,n){var r,i,a,o,s,l,c,u,h,d;return t===gZ?vi(function(e,t){var n=g_(e),r=gR(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;var c=gE();(c||!c&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s+vt(e),y:l}}(e,n)):gk(t)?((r=gO(t,!1,"fixed"===n)).top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r):vi((i=gR(e),o=gR(i),s=ve(i),l=null==(a=i.ownerDocument)?void 0:a.body,c=gA(o.scrollWidth,o.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),u=gA(o.scrollHeight,o.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),h=-s.scrollLeft+vt(i),d=-s.scrollTop,"rtl"===gD(l||o).direction&&(h+=gA(o.clientWidth,l?l.clientWidth:0)-c),{width:c,height:u,x:h,y:d}))}function vo(e){var t,n=e.reference,r=e.element,i=e.placement,a=i?gw(i):null,o=i?g2(i):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(a){case"top":t={x:s,y:n.y-r.height};break;case gq:t={x:s,y:n.y+n.height};break;case gY:t={x:n.x+n.width,y:l};break;case gW:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=a?gF(a):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case gK:t[c]=t[c]-(n[u]/2-r[u]/2);break;case"end":t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function vs(e,t){void 0===t&&(t={});var n,r,i,a,o,s,l,c,u=t,h=u.placement,d=void 0===h?e.placement:h,f=u.strategy,p=void 0===f?e.strategy:f,m=u.boundary,g=u.rootBoundary,v=u.elementContext,y=void 0===v?gQ:v,b=u.altBoundary,x=u.padding,w=void 0===x?0:x,_=gU("number"!=typeof w?w:gV(w,gX)),k=e.rects.popper,S=e.elements[void 0!==b&&b?y===gQ?"reference":gQ:y],M=(n=gk(S)?S:S.contextElement||gR(e.elements.popper),r=void 0===m?"clippingParents":m,i=void 0===g?gZ:g,l=(s=[].concat("clippingParents"===r?(a=vr(gI(n)),!gk(o=["absolute","fixed"].indexOf(gD(n).position)>=0&&gS(n)?gB(n):n)?[]:a.filter(function(e){return gk(e)&&gj(e,o)&&"body"!==gL(e)})):[].concat(r),[i]))[0],(c=s.reduce(function(e,t){var r=va(n,t,p);return e.top=gA(r.top,e.top),e.right=gT(r.right,e.right),e.bottom=gT(r.bottom,e.bottom),e.left=gA(r.left,e.left),e},va(n,l,p))).width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c),A=gO(e.elements.reference),T=vo({reference:A,element:k,strategy:"absolute",placement:d}),C=vi(Object.assign({},k,T)),P=y===gQ?C:A,E={top:M.top-P.top+_.top,bottom:P.bottom-M.bottom+_.bottom,left:M.left-P.left+_.left,right:P.right-M.right+_.right},O=e.modifiersData.offset;if(y===gQ&&O){var N=O[d];Object.keys(E).forEach(function(e){var t=[gY,gq].indexOf(e)>=0?1:-1,n=["top",gq].indexOf(e)>=0?"y":"x";E[e]+=N[n]*t})}return E}function vl(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function vc(e){return["top",gY,gq,gW].some(function(t){return e[t]>=0})}var vu={placement:"bottom",modifiers:[],strategy:"absolute"};function vh(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}let vd=(h=void 0===(u=(c={defaultModifiers:[{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=vs(t,{elementContext:"reference"}),s=vs(t,{altBoundary:!0}),l=vl(o,r),c=vl(s,i,a),u=vc(l),h=vc(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=vo({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=n.adaptive,a=n.roundOffsets,o=void 0===a||a,s={placement:gw(t.placement),variation:g2(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===r||r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,g5(Object.assign({},s,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===i||i,roundOffsets:o})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,g5(Object.assign({},s,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:o})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=void 0===i||i,o=r.resize,s=void 0===o||o,l=g_(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(e){e.addEventListener("scroll",n.update,g7)}),s&&l.addEventListener("resize",n.update,g7),function(){a&&c.forEach(function(e){e.removeEventListener("scroll",n.update,g7)}),s&&l.removeEventListener("resize",n.update,g7)}},data:{}},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=void 0===i?[0,0]:i,o=g0.reduce(function(e,n){var r,i,o,s,l,c;return e[n]=(r=t.rects,o=[gW,"top"].indexOf(i=gw(n))>=0?-1:1,l=(s="function"==typeof a?a(Object.assign({},r,{placement:n})):a)[0],c=s[1],l=l||0,c=(c||0)*o,[gW,gY].indexOf(i)>=0?{x:c,y:l}:{x:l,y:c}),e},{}),s=o[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=o}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=void 0===i||i,o=n.altAxis,s=void 0===o||o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,h=n.rootBoundary,d=n.altBoundary,f=n.flipVariations,p=void 0===f||f,m=n.allowedAutoPlacements,g=t.options.placement,v=gw(g)===g,y=l||(v||!p?[g6(g)]:function(e){if(gw(e)===gG)return[];var t=g6(e);return[g8(e),t,g8(t)]}(g)),b=[g].concat(y).reduce(function(e,n){var r,i,a,o,s,l,d,f,g,v,y,b;return e.concat(gw(n)===gG?(i=(r={placement:n,boundary:u,rootBoundary:h,padding:c,flipVariations:p,allowedAutoPlacements:m}).placement,a=r.boundary,o=r.rootBoundary,s=r.padding,l=r.flipVariations,f=void 0===(d=r.allowedAutoPlacements)?g0:d,0===(y=(v=(g=g2(i))?l?gJ:gJ.filter(function(e){return g2(e)===g}):gX).filter(function(e){return f.indexOf(e)>=0})).length&&(y=v),Object.keys(b=y.reduce(function(e,n){return e[n]=vs(t,{placement:n,boundary:a,rootBoundary:o,padding:s})[gw(n)],e},{})).sort(function(e,t){return b[e]-b[t]})):n)},[]),x=t.rects.reference,w=t.rects.popper,_=new Map,k=!0,S=b[0],M=0;M<b.length;M++){var A=b[M],T=gw(A),C=g2(A)===gK,P=["top",gq].indexOf(T)>=0,E=P?"width":"height",O=vs(t,{placement:A,boundary:u,rootBoundary:h,altBoundary:d,padding:c}),N=P?C?gY:gW:C?gq:"top";x[E]>w[E]&&(N=g6(N));var j=g6(N),L=[];if(a&&L.push(O[T]<=0),s&&L.push(O[N]<=0,O[j]<=0),L.every(function(e){return e})){S=A,k=!1;break}_.set(A,L)}if(k)for(var D=p?3:1,R=function(e){var t=b.find(function(t){var n=_.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return S=t,"break"},I=D;I>0&&"break"!==R(I);I--);t.placement!==S&&(t.modifiersData[r]._skip=!0,t.placement=S,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=n.altAxis,o=n.boundary,s=n.rootBoundary,l=n.altBoundary,c=n.padding,u=n.tether,h=void 0===u||u,d=n.tetherOffset,f=void 0===d?0:d,p=vs(t,{boundary:o,rootBoundary:s,padding:c,altBoundary:l}),m=gw(t.placement),g=g2(t.placement),v=!g,y=gF(m),b="x"===y?"y":"x",x=t.modifiersData.popperOffsets,w=t.rects.reference,_=t.rects.popper,k="function"==typeof f?f(Object.assign({},t.rects,{placement:t.placement})):f,S="number"==typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),M=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,A={x:0,y:0};if(x){if(void 0===i||i){var T,C="y"===y?"top":gW,P="y"===y?gq:gY,E="y"===y?"height":"width",O=x[y],N=O+p[C],j=O-p[P],L=h?-_[E]/2:0,D=g===gK?w[E]:_[E],R=g===gK?-_[E]:-w[E],I=t.elements.arrow,z=h&&I?gN(I):{width:0,height:0},B=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:g$(),F=B[C],H=B[P],$=gH(0,w[E],z[E]),U=v?w[E]/2-L-$-F-S.mainAxis:D-$-F-S.mainAxis,V=v?-w[E]/2+L+$+H+S.mainAxis:R+$+H+S.mainAxis,q=t.elements.arrow&&gB(t.elements.arrow),Y=q?"y"===y?q.clientTop||0:q.clientLeft||0:0,W=null!=(T=null==M?void 0:M[y])?T:0,G=gH(h?gT(N,O+U-W-Y):N,O,h?gA(j,O+V-W):j);x[y]=G,A[y]=G-O}if(void 0!==a&&a){var X,K,Z="x"===y?"top":gW,Q="x"===y?gq:gY,J=x[b],ee="y"===b?"height":"width",et=J+p[Z],en=J-p[Q],er=-1!==["top",gW].indexOf(m),ei=null!=(K=null==M?void 0:M[b])?K:0,ea=er?et:J-w[ee]-_[ee]-ei+S.altAxis,eo=er?J+w[ee]+_[ee]-ei-S.altAxis:en,es=h&&er?(X=gH(ea,J,eo))>eo?eo:X:gH(h?ea:et,J,h?eo:en);x[b]=es,A[b]=es-J}t.modifiersData[r]=A}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=gw(n.placement),l=gF(s),c=[gW,gY].indexOf(s)>=0?"height":"width";if(a&&o){var u,h=(u=i.padding,gU("number"!=typeof(u="function"==typeof u?u(Object.assign({},n.rects,{placement:n.placement})):u)?u:gV(u,gX))),d=gN(a),f="y"===l?"top":gW,p="y"===l?gq:gY,m=n.rects.reference[c]+n.rects.reference[l]-o[l]-n.rects.popper[c],g=o[l]-n.rects.reference[l],v=gB(a),y=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,b=h[f],x=y-d[c]-h[p],w=y/2-d[c]/2+(m/2-g/2),_=gH(b,w,x);n.modifiersData[r]=((t={})[l]=_,t.centerOffset=_-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null==r||("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&gj(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}]}).defaultModifiers)?[]:u,f=void 0===(d=c.defaultOptions)?vu:d,function(e,t,n){void 0===n&&(n=f);var r,i,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},vu,f),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,l={state:a,setOptions:function(n){var r,i,s,u,d,p,m="function"==typeof n?n(a.options):n;c(),a.options=Object.assign({},f,a.options,m),a.scrollParents={reference:gk(e)?vr(e):e.contextElement?vr(e.contextElement):[],popper:vr(t)};var g=(i=Object.keys(r=[].concat(h,a.options.modifiers).reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{})).map(function(e){return r[e]}),s=new Map,u=new Set,d=[],i.forEach(function(e){s.set(e.name,e)}),i.forEach(function(e){u.has(e.name)||function e(t){u.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!u.has(t)){var n=s.get(t);n&&e(n)}}),d.push(t)}(e)}),p=d,g1.reduce(function(e,t){return e.concat(p.filter(function(e){return e.phase===t}))},[]));return a.orderedModifiers=g.filter(function(e){return e.enabled}),a.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=e.effect;if("function"==typeof r){var i=r({state:a,name:t,instance:l,options:void 0===n?{}:n});o.push(i||function(){})}}),l.update()},forceUpdate:function(){if(!s){var e=a.elements,t=e.reference,n=e.popper;if(vh(t,n)){a.rects={reference:(r=gB(n),i="fixed"===a.options.strategy,o=gS(r),d=gS(r)&&(u=gC((c=r.getBoundingClientRect()).width)/r.offsetWidth||1,h=gC(c.height)/r.offsetHeight||1,1!==u||1!==h),f=gR(r),p=gO(t,d,i),m={scrollLeft:0,scrollTop:0},g={x:0,y:0},(o||!o&&!i)&&(("body"!==gL(r)||vn(f))&&(m=function(e){return e!==g_(e)&&gS(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:ve(e)}(r)),gS(r)?(g=gO(r,!0),g.x+=r.clientLeft,g.y+=r.clientTop):f&&(g.x=vt(f))),{x:p.left+m.scrollLeft-g.x,y:p.top+m.scrollTop-g.y,width:p.width,height:p.height}),popper:gN(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(e){return a.modifiersData[e.name]=Object.assign({},e.data)});for(var r,i,o,c,u,h,d,f,p,m,g,v=0;v<a.orderedModifiers.length;v++){if(!0===a.reset){a.reset=!1,v=-1;continue}var y=a.orderedModifiers[v],b=y.fn,x=y.options,w=void 0===x?{}:x,_=y.name;"function"==typeof b&&(a=b({state:a,options:w,name:_,instance:l})||a)}}}},update:(r=function(){return new Promise(function(e){l.forceUpdate(),e(a)})},function(){return i||(i=new Promise(function(e){Promise.resolve().then(function(){i=void 0,e(r())})})),i}),destroy:function(){c(),s=!0}};if(!vh(e,t))return l;function c(){o.forEach(function(e){return e()}),o=[]}return l.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)}),l}),vf=["enabled","placement","strategy","modifiers"],vp={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>void 0},vm={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{let{reference:t,popper:n}=e.elements;if("removeAttribute"in t){let e=(t.getAttribute("aria-describedby")||"").split(",").filter(e=>e.trim()!==n.id);e.length?t.setAttribute("aria-describedby",e.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;let{popper:n,reference:r}=e.elements,i=null==(t=n.getAttribute("role"))?void 0:t.toLowerCase();if(n.id&&"tooltip"===i&&"setAttribute"in r){let e=r.getAttribute("aria-describedby");if(e&&-1!==e.split(",").indexOf(n.id))return;r.setAttribute("aria-describedby",e?`${e},${n.id}`:n.id)}}},vg=[];var vv=function(e,t,n={}){let{enabled:r=!0,placement:i="bottom",strategy:a="absolute",modifiers:o=vg}=n,s=function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(n,vf),l=(0,b.useRef)(o),c=(0,b.useRef)(),u=(0,b.useCallback)(()=>{var e;null==(e=c.current)||e.update()},[]),h=(0,b.useCallback)(()=>{var e;null==(e=c.current)||e.forceUpdate()},[]),[d,f]=gx((0,b.useState)({placement:i,update:u,forceUpdate:h,attributes:{},styles:{popper:{},arrow:{}}})),p=(0,b.useMemo)(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:e})=>{let t={},n={};Object.keys(e.elements).forEach(r=>{t[r]=e.styles[r],n[r]=e.attributes[r]}),f({state:e,styles:t,attributes:n,update:u,forceUpdate:h,placement:e.placement})}}),[u,h,f]),m=(0,b.useMemo)(()=>(gb(l.current,o)||(l.current=o),l.current),[o]);return(0,b.useEffect)(()=>{c.current&&r&&c.current.setOptions({placement:i,strategy:a,modifiers:[...m,p,vp]})},[a,i,p,r,m]),(0,b.useEffect)(()=>{if(r&&null!=e&&null!=t)return c.current=vd(e,t,Object.assign({},s,{placement:i,strategy:a,modifiers:[...m,vm,p]})),()=>{null!=c.current&&(c.current.destroy(),c.current=void 0,f(e=>Object.assign({},e,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),d};let vy=(0,b.createContext)(hj?window:void 0);vy.Provider;let vb=(e,t)=>hj?null==e?(t||hF()).body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect))?e:null:null;function vx(e,t){let n=(0,b.useContext)(vy),[r,i]=(0,b.useState)(()=>vb(e,null==n?void 0:n.document));if(!r){let t=vb(e);t&&i(t)}return(0,b.useEffect)(()=>{t&&r&&t(r)},[t,r]),(0,b.useEffect)(()=>{let t=vb(e);t!==r&&i(t)},[e,r]),r}let vw=void 0!==i.g&&i.g.navigator&&"ReactNative"===i.g.navigator.product;var v_="u">typeof document||vw?b.useLayoutEffect:b.useEffect,vk=function({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:i}){let a=(0,b.useRef)(null),o=(0,b.useRef)(t),s=h$(n);(0,b.useEffect)(()=>{t?o.current=!0:s(a.current)},[t,s]);let l=gg(a,hG(e)),c=(0,b.cloneElement)(e,{ref:l});return t?c:i||!o.current&&r?null:c};let vS=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"],vM=["component"],vA=b.forwardRef((e,t)=>{let{component:n}=e,r=function(e){let{onEnter:t,onEntering:n,onEntered:r,onExit:i,onExiting:a,onExited:o,addEndListener:s,children:l}=e,c=function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,vS),u=(0,b.useRef)(null),h=gg(u,hG(l)),d=e=>t=>{e&&u.current&&e(u.current,t)},f=(0,b.useCallback)(d(t),[t]),p=(0,b.useCallback)(d(n),[n]),m=(0,b.useCallback)(d(r),[r]),g=(0,b.useCallback)(d(i),[i]),v=(0,b.useCallback)(d(a),[a]),y=(0,b.useCallback)(d(o),[o]),x=(0,b.useCallback)(d(s),[s]);return Object.assign({},c,{nodeRef:u},t&&{onEnter:f},n&&{onEntering:p},r&&{onEntered:m},i&&{onExit:g},a&&{onExiting:v},o&&{onExited:y},s&&{addEndListener:x},{children:"function"==typeof l?(e,t)=>l(e,Object.assign({},t,{ref:h})):(0,b.cloneElement)(l,{ref:h})})}(function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,vM));return(0,v.jsx)(n,Object.assign({ref:t},r))});function vT({children:e,in:t,onExited:n,onEntered:r,transition:i}){let[a,o]=(0,b.useState)(!t);t&&a&&o(!1);let s=gg(function({in:e,onTransition:t}){let n=(0,b.useRef)(null),r=(0,b.useRef)(!0),i=h$(t);return v_(()=>{if(!n.current)return;let t=!1;return i({in:e,element:n.current,initial:r.current,isStale:()=>t}),()=>{t=!0}},[e,i]),v_(()=>(r.current=!1,()=>{r.current=!0}),[]),n}({in:!!t,onTransition:e=>{Promise.resolve(i(e)).then(()=>{e.isStale()||(e.in?null==r||r(e.element,e.initial):(o(!0),null==n||n(e.element)))},t=>{throw e.in||o(!0),t})}}),hG(e));return a&&!t?null:(0,b.cloneElement)(e,{ref:s})}let vC=b.forwardRef((e,t)=>{var n;let{flip:r,offset:i,placement:a,containerPadding:o,popperConfig:s={},transition:l,runTransition:c}=e,[u,h]=gp(),[d,f]=gp(),p=gg(h,t),m=vx(e.container),g=vx(e.target),[y,x]=(0,b.useState)(!e.show),w=vv(g,u,function({enabled:e,enableEvents:t,placement:n,flip:r,offset:i,fixed:a,containerPadding:o,arrowElement:s,popperConfig:l={}}){var c,u,h,d,f,p;let m,g=(p=l.modifiers,m={},Array.isArray(p)?(null==p||p.forEach(e=>{m[e.name]=e}),m):p||m);return Object.assign({},l,{placement:n,enabled:e,strategy:a?"fixed":l.strategy,modifiers:function(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}(Object.assign({},g,{eventListeners:{enabled:t,options:null==(c=g.eventListeners)?void 0:c.options},preventOverflow:Object.assign({},g.preventOverflow,{options:o?Object.assign({padding:o},null==(u=g.preventOverflow)?void 0:u.options):null==(h=g.preventOverflow)?void 0:h.options}),offset:{options:Object.assign({offset:i},null==(d=g.offset)?void 0:d.options)},arrow:Object.assign({},g.arrow,{enabled:!!s,options:Object.assign({},null==(f=g.arrow)?void 0:f.options,{element:s})}),flip:Object.assign({enabled:!!r},g.flip)}))})}({placement:a,enableEvents:!!e.show,containerPadding:o||5,flip:r,offset:i,arrowElement:d,popperConfig:s}));e.show&&y&&x(!1);let _=e.show||!y;if(hK(u,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!_)return null;let{onExit:k,onExiting:S,onEnter:M,onEntering:A,onEntered:T}=e,C=e.children(Object.assign({},w.attributes.popper,{style:w.styles.popper,ref:p}),{popper:w,placement:a,show:!!e.show,arrowProps:Object.assign({},w.attributes.arrow,{style:w.styles.arrow,ref:f})});return n={in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:C,onExit:k,onExiting:S,onExited:(...t)=>{x(!0),e.onExited&&e.onExited(...t)},onEnter:M,onEntering:A,onEntered:T},C=l?(0,v.jsx)(vA,Object.assign({},n,{component:l})):c?(0,v.jsx)(vT,Object.assign({},n,{transition:c})):(0,v.jsx)(vk,Object.assign({},n)),m?s1.createPortal(C,m):null});vC.displayName="Overlay";var vP=function(e){let t=(0,b.useRef)(e);return(0,b.useEffect)(()=>{t.current=e},[e]),t};let vE=void 0!==i.g&&i.g.navigator&&"ReactNative"===i.g.navigator.product;var vO="u">typeof document||vE?b.useLayoutEffect:b.useEffect;function vN(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}let vj=b.createContext({prefixes:{},breakpoints:["xxl","xl","lg","md","sm","xs"],minBreakpoint:"xs"}),{Consumer:vL,Provider:vD}=vj;function vR(e,t){let{prefixes:n}=(0,b.useContext)(vj);return e||n[t]||t}function vI(){let{dir:e}=(0,b.useContext)(vj);return"rtl"===e}let vz=b.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=vR(t,"popover-header"),(0,v.jsx)(n,{ref:i,className:cD()(e,t),...r})));vz.displayName="PopoverHeader";let vB=b.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=vR(t,"popover-body"),(0,v.jsx)(n,{ref:i,className:cD()(e,t),...r})));function vF(e,t){let n=e;return"left"===e?n=t?"end":"start":"right"===e&&(n=t?"start":"end"),n}function vH(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}vB.displayName="PopoverBody",b.Component;let v$=b.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:i,body:a,arrowProps:o,hasDoneInitialMeasure:s,popper:l,show:c,...u},h)=>{let d=vR(e,"popover"),f=vI(),[p]=(null==t?void 0:t.split("-"))||[],m=vF(p,f),g=r;return c&&!s&&(g={...r,...vH(null==l?void 0:l.strategy)}),(0,v.jsxs)("div",{ref:h,role:"tooltip",style:g,"x-placement":p,className:cD()(n,d,p&&`bs-popover-${m}`),...u,children:[(0,v.jsx)("div",{className:"popover-arrow",...o}),a?(0,v.jsx)(vB,{children:i}):i]})});v$.displayName="Popover";var vU=Object.assign(v$,{Header:vz,Body:vB,POPPER_OFFSET:[0,8]});let vV=b.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:i,arrowProps:a,hasDoneInitialMeasure:o,popper:s,show:l,...c},u)=>{e=vR(e,"tooltip");let h=vI(),[d]=(null==t?void 0:t.split("-"))||[],f=vF(d,h),p=r;return l&&!o&&(p={...r,...vH(null==s?void 0:s.strategy)}),(0,v.jsxs)("div",{ref:u,style:p,role:"tooltip","x-placement":d,className:cD()(n,e,`bs-tooltip-${f}`),...c,children:[(0,v.jsx)("div",{className:"tooltip-arrow",...a}),(0,v.jsx)("div",{className:`${e}-inner`,children:i})]})});vV.displayName="Tooltip";var vq=Object.assign(vV,{TOOLTIP_OFFSET:[0,6]}),vY=b.createContext(null),vW="unmounted",vG="exited",vX="entering",vK="entered",vZ="exiting",vQ=function(e){function t(t,n){var r,i=e.call(this,t,n)||this,a=n&&!n.isMounting?t.enter:t.appear;return i.appearStatus=null,t.in?a?(r=vG,i.appearStatus=vX):r=vK:r=t.unmountOnExit||t.mountOnEnter?vW:vG,i.state={status:r},i.nextCallback=null,i}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,c6(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===vW?{status:vG}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==vX&&n!==vK&&(t=vX):(n===vX||n===vK)&&(t=vZ)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===vX){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:s1.findDOMNode(this);n&&n.scrollTop}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===vG&&this.setState({status:vW})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[s1.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;(e||n)&&1?(this.props.onEnter(a,o),this.safeSetState({status:vX},function(){t.props.onEntering(a,o),t.onTransitionEnd(l,function(){t.safeSetState({status:vK},function(){t.props.onEntered(a,o)})})})):this.safeSetState({status:vK},function(){t.props.onEntered(a)})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:s1.findDOMNode(this);t?(this.props.onExit(r),this.safeSetState({status:vZ},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:vG},function(){e.props.onExited(r)})})})):this.safeSetState({status:vG},function(){e.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:s1.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(!n||r)return void setTimeout(this.nextCallback,0);if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}null!=e&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===vW)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,cr(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return b.createElement(vY.Provider,{value:null},"function"==typeof n?n(e,r):b.cloneElement(b.Children.only(n),r))},t}(b.Component);function vJ(){}vQ.contextType=vY,vQ.propTypes={},vQ.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:vJ,onEntering:vJ,onEntered:vJ,onExit:vJ,onExiting:vJ,onExited:vJ},vQ.UNMOUNTED=vW,vQ.EXITED=vG,vQ.ENTERING=vX,vQ.ENTERED=vK,vQ.EXITING=vZ;var v0=/([A-Z])/g,v1=/^ms-/;function v2(e){return e.replace(v0,"-$1").toLowerCase().replace(v1,"-ms-")}var v3=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,v5=function(e,t){var n,r,i="",a="";if("string"==typeof t){return e.style.getPropertyValue(v2(t))||((r=hF(n=e))&&r.defaultView||window).getComputedStyle(n,void 0).getPropertyValue(v2(t))}Object.keys(t).forEach(function(n){var r=t[n];r||0===r?n&&v3.test(n)?a+=n+"("+r+") ":i+=v2(n)+": "+r+";":e.style.removeProperty(v2(n))}),a&&(i+="transform: "+a+";"),e.style.cssText+=";"+i};function v7(e,t){let n=v5(e,t)||"",r=-1===n.indexOf("ms")?1e3:1;return parseFloat(n)*r}function v4(e,t){let n=v7(e,"transitionDuration"),r=v7(e,"transitionDelay"),i=function(e,t,n){null==n&&(i=-1===(r=v5(e,"transitionDuration")||"").indexOf("ms")?1e3:1,n=parseFloat(r)*i||0);var r,i,a,o,s,l=(a=!1,o=setTimeout(function(){a||function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,n,r),e.dispatchEvent(i)}}(e,"transitionend",!0)},n+5),s=hB(e,"transitionend",function(){a=!0},{once:!0}),function(){clearTimeout(o),s()}),c=hB(e,"transitionend",t);return function(){l(),c()}}(e,n=>{n.target===e&&(i(),t(n))},n+r)}function v6(e){return e&&"setState"in e?s1.findDOMNode(e):null!=e?e:null}let v9=b.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:i,onExited:a,addEndListener:o,children:s,childRef:l,...c},u)=>{let h=(0,b.useRef)(null),d=gf(h,l),f=e=>{d(v6(e))},p=e=>t=>{e&&h.current&&e(h.current,t)},m=(0,b.useCallback)(p(e),[e]),g=(0,b.useCallback)(p(t),[t]),y=(0,b.useCallback)(p(n),[n]),x=(0,b.useCallback)(p(r),[r]),w=(0,b.useCallback)(p(i),[i]),_=(0,b.useCallback)(p(a),[a]),k=(0,b.useCallback)(p(o),[o]);return(0,v.jsx)(vQ,{ref:u,...c,onEnter:m,onEntered:y,onEntering:g,onExit:x,onExited:_,onExiting:w,addEndListener:k,nodeRef:h,children:"function"==typeof s?(e,t)=>s(e,{...t,ref:f}):b.cloneElement(s,{ref:f})})});v9.displayName="TransitionWrapper";let v8={[vX]:"show",[vK]:"show"},ye=b.forwardRef(({className:e,children:t,transitionClasses:n={},onEnter:r,...i},a)=>{let o={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...i},s=(0,b.useCallback)((e,t)=>{e.offsetHeight,null==r||r(e,t)},[r]);return(0,v.jsx)(v9,{ref:a,addEndListener:v4,...o,onEnter:s,childRef:hG(t),children:(r,i)=>b.cloneElement(t,{...i,className:cD()("fade",e,t.props.className,v8[r],n[r])})})});ye.displayName="Fade";var yt=ye;let yn=b.forwardRef(({children:e,transition:t=yt,popperConfig:n={},rootClose:r=!1,placement:i="top",show:a=!1,...o},s)=>{var l;let c,u,h,d,f,p=(0,b.useRef)({}),[m,g]=(0,b.useState)(null),[y,x]=(l=o.offset,c=(0,b.useRef)(null),u=vR(void 0,"popover"),h=vR(void 0,"tooltip"),d=(0,b.useMemo)(()=>({name:"offset",options:{offset:()=>{if(l)return l;if(c.current){if(vN(c.current,u))return vU.POPPER_OFFSET;if(vN(c.current,h))return vq.TOOLTIP_OFFSET}return[0,0]}}}),[l,u,h]),[c,[d]]),w=gf(s,y),_=!0===t?yt:t||void 0,k=(f=vP(e=>{g(e),null==n||null==n.onFirstUpdate||n.onFirstUpdate(e)}),(0,b.useCallback)(function(...e){return f.current&&f.current(...e)},[f]));return vO(()=>{m&&o.target&&(null==p.current.scheduleUpdate||p.current.scheduleUpdate())},[m,o.target]),(0,b.useEffect)(()=>{a||g(null)},[a]),(0,v.jsx)(vC,{...o,ref:w,popperConfig:{...n,modifiers:x.concat(n.modifiers||[]),onFirstUpdate:k},transition:_,rootClose:r,placement:i,show:a,children:(r,{arrowProps:i,popper:a,show:o})=>{var s;!function(e,t){let{ref:n}=e,{ref:r}=t;e.ref=n.__wrapped||(n.__wrapped=e=>n(v6(e))),t.ref=r.__wrapped||(r.__wrapped=e=>r(v6(e)))}(r,i);let l=null==a?void 0:a.placement,c=Object.assign(p.current,{state:null==a?void 0:a.state,scheduleUpdate:null==a?void 0:a.update,placement:l,outOfBoundaries:(null==a||null==(s=a.state)||null==(s=s.modifiersData.hide)?void 0:s.isReferenceHidden)||!1,strategy:n.strategy}),u=!!m;return"function"==typeof e?e({...r,placement:l,show:o,...!t&&o&&{className:"show"},popper:c,arrowProps:i,hasDoneInitialMeasure:u}):b.cloneElement(e,{...r,placement:l,arrowProps:i,popper:c,hasDoneInitialMeasure:u,className:cD()(e.props.className,!t&&o&&"show"),style:{...e.props.style,...r.style}})}})});function yr(e,t,n){let[r]=t,i=r.currentTarget,a=r.relatedTarget||r.nativeEvent[n];a&&a===i||hU(i,a)||e(...t)}yn.displayName="Overlay",s0().oneOf(["click","hover","focus"]);var yi=({trigger:e=["hover","focus"],overlay:t,children:n,popperConfig:r={},show:i,defaultShow:a=!1,onToggle:o,delay:s,placement:l,flip:c=l&&-1!==l.indexOf("auto"),...u})=>{var h,d,f,p,m,g,y;let x,w,_,k,S,M,A=(0,b.useRef)(null),T=gf(A,hG(n)),C=(S=(x=(0,b.useRef)(!0),w=(0,b.useRef)(()=>x.current),(0,b.useEffect)(()=>(x.current=!0,()=>{x.current=!1}),[]),w.current),M=(0,b.useRef)(),y=()=>clearTimeout(M.current),(_=(0,b.useRef)(y)).current=y,k=_,(0,b.useEffect)(()=>()=>k.current(),[]),(0,b.useMemo)(()=>{let e=()=>clearTimeout(M.current);return{set:function(t,n=0){S()&&(e(),n<=gh?M.current=setTimeout(t,n):function e(t,n,r){let i=r-Date.now();t.current=i<=gh?setTimeout(n,i):setTimeout(()=>e(t,n,r),gh)}(M,t,Date.now()+n))},clear:e,handleRef:M}},[])),P=(0,b.useRef)(""),[E,O]=(h=(0,b.useRef)(void 0!==i),f=(d=(0,b.useState)(a))[0],p=d[1],m=void 0!==i,g=h.current,h.current=m,!m&&g&&f!==a&&p(a),[m?i:f,(0,b.useCallback)(function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o&&o.apply(void 0,[e].concat(n)),p(e)},[o])]),N=s&&"object"==typeof s?s:{show:s,hide:s},{onFocus:j,onBlur:L,onClick:D}="function"!=typeof n?b.Children.only(n).props:{},R=(0,b.useCallback)(()=>{(C.clear(),P.current="show",N.show)?C.set(()=>{"show"===P.current&&O(!0)},N.show):O(!0)},[N.show,O,C]),I=(0,b.useCallback)(()=>{(C.clear(),P.current="hide",N.hide)?C.set(()=>{"hide"===P.current&&O(!1)},N.hide):O(!1)},[N.hide,O,C]),z=(0,b.useCallback)((...e)=>{R(),null==j||j(...e)},[R,j]),B=(0,b.useCallback)((...e)=>{I(),null==L||L(...e)},[I,L]),F=(0,b.useCallback)((...e)=>{O(!E),null==D||D(...e)},[D,O,E]),H=(0,b.useCallback)((...e)=>{yr(R,e,"fromElement")},[R]),$=(0,b.useCallback)((...e)=>{yr(I,e,"toElement")},[I]),U=null==e?[]:[].concat(e),V={ref:e=>{T(v6(e))}};return -1!==U.indexOf("click")&&(V.onClick=F),-1!==U.indexOf("focus")&&(V.onFocus=z,V.onBlur=B),-1!==U.indexOf("hover")&&(V.onMouseOver=H,V.onMouseOut=$),(0,v.jsxs)(v.Fragment,{children:["function"==typeof n?n(V):(0,b.cloneElement)(n,V),(0,v.jsx)(yn,{...u,show:E,onHide:I,flip:c,placement:l,popperConfig:r,target:A.current,children:t})]})};let ya=e=>{let{children:t,placement:n,text:r}=e;return(0,v.jsx)(yi,{placement:n,overlay:(0,v.jsx)(vq,{children:r}),children:t})};ya.propTypes={children:s0().element.isRequired,placement:s0().string,text:s0().string.isRequired};let yo=e=>{let{id:t,notes:n,placeholderText:r,tooltipText:i}=e,[a,o]=(0,b.useState)(!1);return(0,v.jsxs)("div",{className:"o-expandable complex-example",children:[(0,v.jsxs)("button",{className:"o-expandable__header","aria-expanded":a,onClick:()=>{o(!a)},title:"Expand content",children:[(0,v.jsx)(sH,{type:"3",className:"o-expandable__label",children:"Additional information and examples"}),(0,v.jsx)("span",{className:"o-expandable__cues",children:a?(0,v.jsx)("span",{className:"o-expandable__cue-close",role:"img","aria-label":"Hide",children:(0,v.jsx)("span",{className:"u-visually-hidden-on-mobile",children:(0,v.jsx)(a7,{name:"up",isPresentational:!0})})}):(0,v.jsx)("span",{className:"o-expandable__cue-open",role:"img","aria-label":"Show",children:(0,v.jsx)("span",{className:"u-visually-hidden-on-mobile",children:(0,v.jsx)(a7,{name:"down",isPresentational:!0})})})})]}),a?(0,v.jsxs)("div",{className:"o-expandable__content",children:[i&&r?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("label",{className:"descriptor",htmlFor:"example-".concat(t),children:"Complex example:"}),(0,v.jsx)("span",{className:"u-visually-hidden",children:i}),(0,v.jsx)(ya,{text:i,children:r.length>30?(0,v.jsx)("textarea",{className:"a-text-input example-input",id:"example-".concat(t),rows:2,readOnly:!0,value:r}):(0,v.jsx)("input",{className:"a-text-input example-input",id:"example-".concat(t),rows:2,readOnly:!0,value:r})})]}):null,(0,v.jsx)(sH,{type:"4",className:"descriptor",children:"Notes:"}),(0,v.jsx)("ul",{className:"m-list",children:n.map((e,t)=>(0,v.jsx)("li",{className:"m-list__item",children:e},t))})]}):null]})};yo.propTypes={id:s0().string.isRequired,notes:s0().array.isRequired,placeholderText:s0().string,tooltipText:s0().string};let ys=()=>(0,v.jsxs)("div",{className:"advanced-tips",children:[(0,v.jsxs)("div",{children:[(0,v.jsx)(sH,{type:"3",children:"Search tips"}),(0,v.jsxs)("ul",{className:"m-list",children:[(0,v.jsx)("li",{className:"m-list__item",children:"Hover over the examples within the sample search bars below to see what their results should return"}),(0,v.jsx)("li",{className:"m-list__item",children:'When searching within "All data", terms must be found in the same field to be considered a match'}),(0,v.jsx)("li",{className:"m-list__item",children:"The search function will look for any variations of the word that includes the stem – for example, if deferment is searched, it would return the following variations: deferment, defer, deferred, deferral, etc."})]})]}),(0,v.jsxs)("div",{className:"tips content-l",children:[(0,v.jsxs)("div",{className:"tip content-l__col content-l__col-1-3",children:[(0,v.jsx)(sH,{type:"4",children:"AND / OR / NOT"}),(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:"example-and",children:"Use AND when results must contain all terms"}),(0,v.jsx)(ya,{text:"Results would include both call (call, called, calling, etc.) as well as harass (harass, harassed, harassing, etc.).",children:(0,v.jsx)("input",{className:"a-text-input",id:"example-and",type:"text",readOnly:!0,value:"call AND harass"})}),(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:"example-or",children:"Use OR when results should contain at least one of the terms"}),(0,v.jsx)(ya,{text:"Results would include either loan (loan, loans, loaned, etc.) or mortage (mortgage, mortgages, etc.).",children:(0,v.jsx)("input",{className:"a-text-input",id:"example-or",type:"text",readOnly:!0,value:"loan OR mortgage"})}),(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:"example-not",children:"Use NOT when results should contain at least one of the terms"}),(0,v.jsx)(ya,{text:"Results would only include claim (claim, claims, claimed, etc.) and cannot include the term accident (accident, accidents, etc.)",children:(0,v.jsx)("input",{className:"a-text-input",id:"example-not",type:"text",readOnly:!0,value:"claim NOT accident"})}),(0,v.jsxs)("div",{className:"tip-description",children:[(0,v.jsx)("p",{children:"Use AND when results must contain both terms"}),(0,v.jsx)("p",{children:"Use OR when results should contain at least one of the terms"}),(0,v.jsx)("p",{children:"Use NOT when results must not contain the term"})]}),(0,v.jsx)(yo,{id:"and-or-not",notes:["The Boolean operators (AND / OR / NOT) must be capitalized","Boolean operators do not honor precedence rules, so parentheses should be used whenever multiple operators are used together – if they are not used correctly (i.e., having multiple operators outside of parentheses), then your results might not return what you intended."],placeholderText:"call AND (harass* OR annoy* OR threat OR repeat) AND NOT spam",tooltipText:"This example would return results that include the word call (called, calling, etc.) and one of the words in the parentheses, but exclude the word spam (spammed, spamming, etc.)."})]}),(0,v.jsxs)("div",{className:"tip content-l__col content-l__col-1-3",children:[(0,v.jsx)(sH,{type:"4",children:"Must/Must not contain"}),(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:"example-must-plus",children:"Use + if the search must contain the selected term"}),(0,v.jsx)(ya,{text:"Results must include the word foreclosure (foreclosure, foreclosed, etc.).",children:(0,v.jsx)("input",{className:"a-text-input",id:"example-must-plus",type:"text",readOnly:!0,value:"+foreclosure"})}),(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:"example-must-minus",children:"Use - if the search must not contain the selected term"}),(0,v.jsx)(ya,{text:"Results cannot include the word collect (collect, collects, collecting, etc.).",children:(0,v.jsx)("input",{className:"a-text-input",id:"example-must-minus",type:"text",readOnly:!0,value:"-collect"})}),(0,v.jsxs)("div",{className:"tip-description",children:[(0,v.jsx)("p",{children:"Use + if the search must contain the selected term"}),(0,v.jsx)("p",{children:"Use - if the search must not contain the selected term"})]}),(0,v.jsx)(yo,{id:"must-or-must-not",notes:['Since the terms "insurance" and "claim" do not have to be included in the results, their appearance will give the result a greater relevance score.',"There cannot be a space between the operator (+ / -) and searched term."],placeholderText:"insurance claim +agent +car -accident",tooltipText:"Results must include the terms agent and car but exclude accident – the terms insurance and claim are optional"})]}),(0,v.jsxs)("div",{className:"tip content-l__col content-l__col-1-3",children:[(0,v.jsx)(sH,{type:"4",children:"Wildcard search"}),(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:"example-wc-star",children:"Use * to substitute any consecutive number of characters."}),(0,v.jsx)(ya,{text:'Results would include all terms that start with the base "report" (report, reports, reported, reporting, etc.) and "$*.00" would include all variations of whole number dollar values ($8.00, $1234.00, etc.).',children:(0,v.jsx)("input",{className:"a-text-input",id:"example-wc-star",type:"text",readOnly:!0,value:"report* AND $*.00"})}),(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:"example-wc-question",children:"Use ? to replace any single character anywhere in a term."}),(0,v.jsx)(ya,{text:"Results would return variations such as: woman, women, etc.",children:(0,v.jsx)("input",{className:"a-text-input",id:"example-wc-question",type:"text",readOnly:!0,value:"wom?n"})}),(0,v.jsxs)("div",{className:"tip-description",children:[(0,v.jsx)("p",{children:"Use * to substitute any consecutive number of characters."}),(0,v.jsx)("p",{children:"Use ? to replace any single character anywhere in a term."})]})]}),(0,v.jsxs)("div",{className:"tip content-l__col content-l__col-1-3",children:[(0,v.jsx)(sH,{type:"4",children:"Proximity search"}),(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:"example-proximity",children:'Use ~[#] at the end of a phrase to search for terms with up to that number of gap words between them; Order does not matter and the terms should be in a single set of quotation marks (" ").'}),(0,v.jsx)(ya,{text:'Results would include the terms "auto", "loan", and "default" in any order, with up to three (3) gap words in between them. For example, results could include: "defaulted auto loan", "auto loan that went into default", "Auto Loan with the same defaulted", etc.',children:(0,v.jsx)("input",{className:"a-text-input example-input",id:"example-proximity",type:"text",readOnly:!0,value:'"auto loan default"~3'})}),(0,v.jsx)("div",{className:"tip-description",children:(0,v.jsx)("p",{children:'Use ~[#] at the end of a phrase to search for terms with up to that number of gap words between them; Order does not matter and the terms should be in a single set of quotation marks (" ").'})}),(0,v.jsx)(yo,{id:"proximity",notes:['Proximity phrase search must use straight quotes (" ") versus curly quotes (“ ”), or else the search function will not perform properly',"The closer the specified terms are within the data, the more relevant the search results become."]})]}),(0,v.jsxs)("div",{className:"tip content-l__col content-l__col-1-3",children:[(0,v.jsx)(sH,{type:"4",children:"Fuzzy search"}),(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:"example-fuzzy",children:"Use ~1 at the end of a term to search for terms that are spelled similarly to your keyword within a certain margin of error."}),(0,v.jsx)(ya,{text:"Results would include the correct spelling of escrow, as well as other (potentially misspelled) versions, such as: escrow, escrowed, escro, esrow, etc.",children:(0,v.jsx)("input",{className:"a-text-input example-input",id:"example-fuzzy",type:"text",readOnly:!0,value:"escrow~1"})}),(0,v.jsx)("div",{className:"tip-description",children:(0,v.jsx)("p",{children:"Use ~1 at the end of a term to search for terms that are spelled similarly to your keyword within a certain margin of error."})}),(0,v.jsx)(yo,{id:"fuzzy",notes:["The search looks for a maximum of two changes in the term, where a change is the insertion, deletion or substitution of a single character or transposition of two adjacent characters (this catches about 80% of misspelled words).","Fuzzy term search can only be used with single terms, it does not support phrases."],placeholderText:"escrow~1 -escrow -escrowed",tooltipText:'Results would return the various misspellings of the word "escrow" that fuzzy term search identifies (after excluding the escrow and escrowed).'})]}),(0,v.jsxs)("div",{className:"tip content-l__col content-l__col-1-3",children:[(0,v.jsx)(sH,{type:"4",children:"Boost search"}),(0,v.jsx)("label",{className:"u-visually-hidden",htmlFor:"example-boost",children:"Use ^[#] at the end of a term or terms to increase or decrease its relevance compared to the other term(s)."}),(0,v.jsx)(ya,{text:'Results would be sorted by relevance in favor of the term "pay"',children:(0,v.jsx)("input",{className:"a-text-input example-input",id:"example-boost",type:"text",readOnly:!0,value:"pay^2 OR credit"})}),(0,v.jsx)("div",{className:"tip-description",children:(0,v.jsx)("p",{children:"Use ^[#] at the end of a term or terms to increase or decrease its relevance compared to the other term(s)."})}),(0,v.jsx)(yo,{id:"boost",notes:["A boost value between 0 and 1.0 decreases the relevance score while a value greater than 1.0 increases the relevance score."]})]})]}),(0,v.jsxs)("div",{className:"footer",children:[(0,v.jsx)(sH,{type:"3",children:"Additional notes:"}),(0,v.jsxs)("ul",{className:"m-list",children:[(0,v.jsx)("li",{className:"m-list__item",children:'Putting a phrase only in quotations (" ") will search for the words in that order, but it will not be an exact match – meaning it may include stemmed versions of the term.'}),(0,v.jsx)("li",{className:"m-list__item",children:'The default operator is "AND", meaning if you search "foreclosure house", it will search results that include both words (i.e., foreclosure AND house).'}),(0,v.jsx)("li",{className:"m-list__item",children:"Capitalization does not have an effect on searched terms (expect for the AND / OR / NOT operators)."}),(0,v.jsxs)("li",{className:"m-list__item",children:[(0,v.jsxs)("a",{href:"https://www.elastic.co/guide/en/elasticsearch/reference/7.17/elasticsearch-intro.html",target:"_blank",rel:"noopener noreferrer",children:["Find out more ",(0,v.jsx)(a7,{name:"external-link",isPresentational:!0})]})," ","about Elastic Search"]})]})]})]}),yl=e=>{let{ariaLabel:t,className:n,htmlId:r,isDisabled:i=!1,handleChange:a,handleClear:o,handlePressEnter:s,placeholder:l="Enter your search text",value:c}=e;return(0,v.jsxs)("div",{className:"o-search-input",children:[(0,v.jsxs)("div",{className:"o-search-input__input",children:[(0,v.jsx)("label",{htmlFor:r,className:"o-search-input__input-label","aria-label":t,children:(0,v.jsx)(a7,{name:"search",isPresentational:!0})}),(0,v.jsx)("input",{type:"search",id:r,disabled:i,value:c,onChange:a,onKeyDown:s,className:"a-text-input a-text-input--full "+n,placeholder:l,title:l,autoComplete:"off",maxLength:"75"}),(0,v.jsx)(dH,{onClear:o})]}),(0,v.jsx)(sF,{type:"submit",label:"Search"})]})};yl.propTypes={ariaLabel:s0().string.isRequired,className:s0().string,isDisabled:s0().bool,handleChange:s0().func.isRequired,handleClear:s0().func,handlePressEnter:s0().func,htmlId:s0().string.isRequired,placeholder:s0().string,value:s0().string.isRequired};let yc={all:"All data",company:"Company name",complaint_what_happened:"Narratives"},yu=()=>{let e=ta(),t=ts(lG),n=ts(lX),r=ts(fo),[i,a]=(0,b.useState)(n),[o,s]=(0,b.useState)(!1),[l,c]=(0,b.useState)(!0),u=o?i:n,h=t=>{e(d5(t&&t[0]?t[0].key:""))},d=t=>{"Enter"===t.key&&(c(!1),e(d5(t.target.value)),a(t.target.value),s(!1))};return(0,v.jsxs)("div",{children:[(0,v.jsx)("div",{className:"search-bar u-mb25",role:"search",children:(0,v.jsxs)("form",{action:"",onSubmit:t=>{t.preventDefault(),e(d5(u)),s(!1)},children:[(0,v.jsx)(sH,{type:"3",className:"h4",children:"Search within"}),(0,v.jsxs)("div",{className:"layout-row",children:[(0,v.jsx)("div",{className:"cf-select flex-fixed",children:(0,v.jsx)("select",{"aria-label":"Choose which field will be searched",id:"searchField",onChange:t=>{e(d3(t.target.value))},value:t,children:(0,v.jsx)("optgroup",{label:"Search Within",children:Object.keys(yc).map(e=>(0,v.jsx)("option",{value:e,children:yc[e]},e))})})}),(0,v.jsx)("div",{className:"flex-all typeahead-portal",children:"company"===t?(0,v.jsx)(d9,{ariaLabel:"Enter your search term(s)",htmlId:"searchText",defaultValue:n,handleChange:h,handleClear:()=>{e(d5(""))},handlePressEnter:d,handleSelectionOverride:h,hasClearButton:!0,hasSearchButton:!0,placeholder:"Enter your search term(s)",fieldName:"company"}):(0,v.jsx)(yl,{handleChange:e=>{a(e.target.value),s(!0)},handleClear:()=>{l&&(e(d5("")),a(""),s(!1)),c(!0)},handlePressEnter:d,htmlId:"searchText",value:u,ariaLabel:"Enter the term you want to search for",placeholder:"Enter your search term(s)"})}),(0,v.jsx)(a9,{className:"u-visually-hidden",href:"#search-summary",label:"Skip to Results"}),(0,v.jsx)("div",{className:"advanced-container flex-fixed",children:(0,v.jsx)(sF,{label:r?"Hide advanced search tips":"Show advanced search tips",isLink:!0,onClick:t=>{t.preventDefault(),r?e(le()):e(lo())}})})]})]})}),r?(0,v.jsx)(ys,{}):null]})},yh=()=>{var e;let{data:t,isLoading:n,isFetching:r}=aY("meta"),i=null==t||null==(e=t._meta)?void 0:e.last_indexed,a=i?(0,v.jsxs)("span",{className:"date-subscript",children:["(last updated: ",ib(i),")"]}):null;return n||r?(0,v.jsx)(s2,{isLoading:!0}):(0,v.jsxs)(sQ,{className:"search-panel",children:[(0,v.jsxs)(sH,{type:"2",children:["Search complaint data ",a]}),(0,v.jsx)(yu,{}),(0,v.jsx)(gu,{})]})},yd=()=>{let e,t,n,r;e=ta(),t=eh(),(0,b.useEffect)(()=>{var n,r;e((n=t.pathname,r=function(e,t){iK((t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...t}).arrayFormatSeparator);let n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{if(t=/\[(\d*)]$/.exec(e),e=e.replace(/\[\d*]$/,""),!t){r[e]=n;return}void 0===r[e]&&(r[e]={}),r[e][t[1]]=n};case"bracket":return(e,n,r)=>{if(t=/(\[])$/.exec(e),e=e.replace(/\[]$/,""),!t){r[e]=n;return}if(void 0===r[e]){r[e]=[n];return}if(!Array.isArray(r[e])){r[e]=[r[e],n];return}r[e].push(n)};case"colon-list-separator":return(e,n,r)=>{if(t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),!t){r[e]=n;return}if(void 0===r[e]){r[e]=[n];return}if(!Array.isArray(r[e])){r[e]=[r[e],n];return}r[e].push(n)};case"comma":case"separator":return(t,n,r)=>{let i="string"==typeof n&&n.includes(e.arrayFormatSeparator)?n.split(e.arrayFormatSeparator).map(t=>iQ(t,e)):null===n?n:iQ(n,e);r[t]=i};case"bracket-separator":return(t,n,r)=>{let i=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!i){r[t]=n?iQ(n,e):n;return}let a=null===n?[]:iQ(n,e).split(e.arrayFormatSeparator);if(void 0===r[t]){r[t]=a;return}for(let e of(Array.isArray(r[t])||(r[t]=[r[t]]),a))r[t].push(e)};default:return(e,t,n)=>{if(void 0===n[e]){n[e]=t;return}Array.isArray(n[e])?n[e].push(t):n[e]=[n[e],t]}}}(t),r=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return r;let i=0;for(let a=0;a<=e.length;a++){if(a<e.length&&"&"!==e[a])continue;if(a===i){i=a+1;continue}let o=e.slice(i,a);i=a+1;let s=t.decode?o.replaceAll("+"," "):o,[l,c]=function(e){if("string"!=typeof e)throw TypeError("Expected the arguments to be of type `string`");if(""===e)return[];let t=e.indexOf("=");return -1===t?[]:[e.slice(0,t),e.slice(t+1)]}(s);void 0===l&&(l=s),c=void 0===c?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?c:iQ(c,t),n(iQ(l,t),c,r)}for(let[e,n]of Object.entries(r))if("object"==typeof n&&null!==n&&"string"!==t.types[e])for(let[r,i]of Object.entries(n)){let a=t.types[e],o="function"==typeof a?a:a?a.replace("[]",""):void 0;n[r]=iJ(i,t,o)}else"object"==typeof n&&null!==n&&"string"===t.types[e]?r[e]=Object.values(n).join(t.arrayFormatSeparator):r[e]=iJ(n,t,t.types[e]);return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((e,t)=>{let n=r[t];return e[t]=n&&"object"==typeof n&&!Array.isArray(n)?function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(n):n,e},Object.create(null))}(t.search),function(e,t){let i,a=t(),o=(i=tu({},r),["search_after"].forEach(e=>{Object.prototype.hasOwnProperty.call(i,e)&&delete i[e]}),["size","page","trend_depth"].forEach(e=>{Object.prototype.hasOwnProperty.call(i,e)&&(i[e]=parseInt(i[e],10))}),i),s=id()(r.date_received_max).isValid()&&id()(r.date_received_min).isValid(),{routes:l}=a;!(l.path===n&&fD(l.params,o))&&s&&e(fj(n,o))}))},[t,e]),n=ts(fd),r=ta(),(0,b.useEffect)(()=>{let e=ae(()=>{n!==window.innerWidth&&r(lf(window.innerWidth))},500);return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[r,n]);let i=ts(fc),a=ta();return gc("afterprint",()=>{i&&a(lh())}),gc("beforeprint",()=>{i||a(ld())}),(0,b.useEffect)(()=>{i&&setTimeout(()=>{window.print()},2e3)},[i]),(0,v.jsxs)("main",{className:"content content--1-3 ccdb-content ".concat(i?"print":""),role:"main",children:[(0,v.jsx)(lm,{}),(0,v.jsxs)("div",{className:"content__wrapper",children:[(0,v.jsx)(yh,{}),(0,v.jsx)(f$,{}),(0,v.jsx)(pZ,{})]}),(0,v.jsx)(gl,{}),(0,v.jsx)(p4,{})]})};(p=g||(g={})).Pop="POP",p.Push="PUSH",p.Replace="REPLACE";var yf=function(e){return e},yp="beforeunload";function ym(e){e.preventDefault(),e.returnValue=""}function yg(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter(function(e){return e!==t})}},call:function(t){e.forEach(function(e){return e&&e(t)})}}}var yv=e=>t=>n=>{let r=t(n),i=e.getState();if("routes/routeChanged"===n.type||!i.query.dateLastIndexed)return r;let a=function(e){let t,n,{tab:r}=e.view,i=Object.keys(e.filters),a=(t=["dateRange","company_received_min","company_received_max","date_received_min","date_received_max","searchText","searchField"],"List"===r?t.concat(["search_after","size","page","sort"]):"Trends"===r?t.concat(["dateInterval"]):t),o=(n=["debug","tour","tab"],["Trends"].includes(r)&&n.push("interval"),n),s=Object.assign({},lz(e.query,a),lz(e.filters,i),lz(e.view,o),lz(e.trends,"Trends"===r?["chartType","focus","lens","subLens","trend_depth"]:[]));return e.query.searchAfter&&(s.search_after=e.query.searchAfter),s}(i),o=function(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,r=n.history;function i(){var e=n.location,t=e.pathname,i=e.search,a=e.hash,o=r.state||{};return[o.idx,yf({pathname:t,search:i,hash:a,state:o.usr||null,key:o.key||"default"})]}var a=null;n.addEventListener("popstate",function(){if(a)h.call(a),a=null;else{var e=g.Pop,t=i(),n=t[0],r=t[1];if(h.length){if(null!=n){var o=l-n;o&&(a={action:e,location:r,retry:function(){y(-1*o)}},y(o))}}else v(e)}});var o=g.Pop,s=i(),l=s[0],c=s[1],u=yg(),h=yg();function d(e){var t,n,r,i,a,o,s;return"string"==typeof e?e:(r=void 0===(n=(t=e).pathname)?"/":n,a=void 0===(i=t.search)?"":i,s=void 0===(o=t.hash)?"":o,a&&"?"!==a&&(r+="?"===a.charAt(0)?a:"?"+a),s&&"#"!==s&&(r+="#"===s.charAt(0)?s:"#"+s),r)}function f(e,t){return void 0===t&&(t=null),yf(l8({pathname:c.pathname,hash:"",search:""},"string"==typeof e?function(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}(e):e,{state:t,key:Math.random().toString(36).substr(2,8)}))}function p(e,t){return[{usr:e.state,key:e.key,idx:t},d(e)]}function m(e,t,n){return!h.length||(h.call({action:e,location:t,retry:n}),!1)}function v(e){o=e;var t=i();l=t[0],c=t[1],u.call({action:o,location:c})}function y(e){r.go(e)}return null==l&&(l=0,r.replaceState(l8({},r.state,{idx:l}),"")),{get action(){return o},get location(){return c},createHref:d,push:function e(t,i){var a=g.Push,o=f(t,i);if(m(a,o,function(){e(t,i)})){var s=p(o,l+1),c=s[0],u=s[1];try{r.pushState(c,"",u)}catch(e){n.location.assign(u)}v(a)}},replace:function e(t,n){var i=g.Replace,a=f(t,n);if(m(i,a,function(){e(t,n)})){var o=p(a,l),s=o[0],c=o[1];r.replaceState(s,"",c),v(i)}},go:y,back:function(){y(-1)},forward:function(){y(1)},listen:function(e){return u.push(e)},block:function(e){var t=h.push(e);return 1===h.length&&n.addEventListener(yp,ym),function(){t(),h.length||n.removeEventListener(yp,ym)}}}}(),s=o.location,{queryString:l}=i.routes,c=i0(a);return(""!==l&&l!==c||""===l)&&(o.push({pathname:s.pathname,search:"?"+c}),e.dispatch(fN(s.pathname,a))),r};let yy=function(e){let t,n,r,i=function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new n_;return t&&("boolean"==typeof t?a.push(nb):a.push(ny(t.extraArgument))),a},{reducer:a,middleware:o,devTools:s=!0,duplicateMiddlewareCheck:l=!0,preloadedState:c,enhancers:u}=e||{};if("function"==typeof a)t=a;else if(tm(a))t=tg(a);else throw Error(nJ(1));n="function"==typeof o?o(i):i();let h=tv;s&&(h=nx({trace:!1,..."object"==typeof s&&s}));let d=(r=function(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(th(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=tv(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}(...n),function(e){let{autoBatch:t=!0}=e??{},n=new n_(r);return t&&n.push(((e={type:"raf"})=>t=>(...n)=>{let r,i=t(...n),a=!0,o=!1,s=!1,l=new Set,c="tick"===e.type?queueMicrotask:"raf"===e.type?"u">typeof window&&window.requestAnimationFrame?(r=window.requestAnimationFrame,e=>{let t=!1,n=()=>{t||(t=!0,cancelAnimationFrame(i),clearTimeout(a),e())},i=r(n),a=setTimeout(n,100)}):nT(10):"callback"===e.type?e.queueNotification:nT(e.timeout),u=()=>{s=!1,o&&(o=!1,l.forEach(e=>e()))};return Object.assign({},i,{subscribe(e){let t=i.subscribe(()=>a&&e());return l.add(e),()=>{t(),l.delete(e)}},dispatch(e){try{return(o=!(a=!e?.meta?.[nM]))&&!s&&(s=!0,c(u)),i.dispatch(e)}finally{a=!0}}})})("object"==typeof t?t:void 0)),n});return function e(t,n,r){if("function"!=typeof t)throw Error(th(2));if("function"==typeof n&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw Error(th(0));if("function"==typeof n&&void 0===r&&(r=n,n=void 0),void 0!==r){if("function"!=typeof r)throw Error(th(1));return r(e)(t,n)}let i=t,a=n,o=new Map,s=o,l=0,c=!1;function u(){s===o&&(s=new Map,o.forEach((e,t)=>{s.set(t,e)}))}function h(){if(c)throw Error(th(3));return a}function d(e){if("function"!=typeof e)throw Error(th(4));if(c)throw Error(th(5));let t=!0;u();let n=l++;return s.set(n,e),function(){if(t){if(c)throw Error(th(6));t=!1,u(),s.delete(n),o=null}}}function f(e){if(!tm(e))throw Error(th(7));if(void 0===e.type)throw Error(th(8));if("string"!=typeof e.type)throw Error(th(17));if(c)throw Error(th(9));try{c=!0,a=i(a,e)}finally{c=!1}return(o=s).forEach(e=>{e()}),e}return f({type:tp.INIT}),{dispatch:f,subscribe:d,getState:h,replaceReducer:function(e){if("function"!=typeof e)throw Error(th(10));i=e,f({type:tp.REPLACE})},[td]:function(){return{subscribe(e){if("object"!=typeof e||null===e)throw Error(th(11));function t(){e.next&&e.next(h())}return t(),{unsubscribe:d(t)}},[td](){return this}}}}}(t,c,h(..."function"==typeof u?u(d):d()))}({devTools:!0,reducer:{[aH.reducerPath]:aH.reducer,filters:lP,query:d6,routes:fL,trends:aF,view:lp},middleware:e=>e().concat([yv,aH.middleware])});m=yy.dispatch,function(){let[e,t,n,r]=[rg,rv,ry,rb].map(e=>()=>m(e()));if(!rx&&"u">typeof window&&window.addEventListener){let i=function(e){Object.entries(a).forEach(([t,n])=>{e?window.addEventListener(t,n,!1):window.removeEventListener(t,n)})},a={focus:e,visibilitychange:()=>{"visible"===window.document.visibilityState?e():t()},[rf]:n,[rp]:r};i(!0),rx=!0}}(),"u">typeof window&&(window.__ccdbDom={querySelector:ap,querySelectorAll:e=>{let t=ah();if(t&&t.querySelectorAll){let n=t.querySelectorAll(e);if(n&&n.length)return n}return t instanceof ShadowRoot?[]:document.querySelectorAll(e)}});let yb=af(au());if(!yb)throw Error("ccdb5-ui mount element not found.");(0,y.createRoot)(yb).render((0,v.jsx)(b.StrictMode,{children:(0,v.jsx)(function(e){let{children:t,context:n,serverState:r,store:i}=e,a=b.useMemo(()=>{let e=function(e){let t,n=e2,r=0,i=!1;function a(){l.onStateChange&&l.onStateChange()}function o(){if(r++,!t){let r,i;t=e.subscribe(a),r=null,i=null,n={clear(){r=null,i=null},notify(){let e=r;for(;e;)e.callback(),e=e.next},get(){let e=[],t=r;for(;t;)e.push(t),t=t.next;return e},subscribe(e){let t=!0,n=i={callback:e,next:null,prev:i};return n.prev?n.prev.next=n:r=n,function(){t&&null!==r&&(t=!1,n.next?n.next.prev=n.prev:i=n.prev,n.prev?n.prev.next=n.next:r=n.next)}}}}}function s(){r--,t&&0===r&&(t(),t=void 0,n.clear(),n=e2)}let l={addNestedSub:function(e){o();let t=n.subscribe(e),r=!1;return()=>{r||(r=!0,t(),s())}},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,o())},tryUnsubscribe:function(){i&&(i=!1,s())},getListeners:()=>n};return l}(i);return{store:i,subscription:e,getServerState:r?()=>r:void 0}},[i,r]),o=b.useMemo(()=>i.getState(),[i]);return e7(()=>{let{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),o!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,o]),b.createElement((n||te).Provider,{value:a},t)},{store:yy,children:(0,v.jsx)(()=>(0,v.jsx)(eZ,{children:(0,v.jsxs)(eC,{children:[(0,v.jsx)(eA,{index:!0,element:(0,v.jsx)(yd,{})}),(0,v.jsx)(eA,{path:"/data-research/consumer-complaints/search",element:(0,v.jsx)(yd,{})}),(0,v.jsx)(eA,{path:"/data-research/consumer-complaints/search/detail/:id",element:(0,v.jsx)(s9,{})}),(0,v.jsx)(eA,{path:"/detail/:id",element:(0,v.jsx)(s9,{})})]})}),{})})}))})()})();
|