@cfpb/cfpb-design-system
Version:
CFPB's UI framework
30 lines (26 loc) • 28 kB
JavaScript
(()=>{var Me=Object.defineProperty;var oe=r=>{throw TypeError(r)};var Re=(r,e,t)=>e in r?Me(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var ie=(r,e,t)=>Re(r,typeof e!="symbol"?e+"":e,t),Te=(r,e,t)=>e.has(r)||oe("Cannot "+t);var re=(r,e,t)=>(Te(r,e,"read from private field"),t?t.call(r):e.get(r)),se=(r,e,t)=>e.has(r)?oe("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t);var ae=(r,e,t)=>new Promise((o,i)=>{var a=n=>{try{c(t.next(n))}catch(l){i(l)}},s=n=>{try{c(t.throw(n))}catch(l){i(l)}},c=n=>n.done?o(n.value):Promise.resolve(n.value).then(a,s);c((t=t.apply(r,e)).next())});var T=globalThis,N=T.ShadowRoot&&(T.ShadyCSS===void 0||T.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,D=Symbol(),ne=new WeakMap,S=class{constructor(e,t,o){if(this._$cssResult$=!0,o!==D)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(N&&e===void 0){let o=t!==void 0&&t.length===1;o&&(e=ne.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&ne.set(t,e))}return e}toString(){return this.cssText}},L=r=>new S(typeof r=="string"?r:r+"",void 0,D),I=(r,...e)=>{let t=r.length===1?r[0]:e.reduce(((o,i,a)=>o+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[a+1]),r[0]);return new S(t,r,D)},ce=(r,e)=>{if(N)r.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(let t of e){let o=document.createElement("style"),i=T.litNonce;i!==void 0&&o.setAttribute("nonce",i),o.textContent=t.cssText,r.appendChild(o)}},V=N?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(let o of e.cssRules)t+=o.cssText;return L(t)})(r):r;var{is:Ne,defineProperty:Le,getOwnPropertyDescriptor:ze,getOwnPropertyNames:je,getOwnPropertySymbols:Be,getPrototypeOf:De}=Object,b=globalThis,le=b.trustedTypes,Ie=le?le.emptyScript:"",W=b.reactiveElementPolyfillSupport,E=(r,e)=>r,q={toAttribute(r,e){switch(e){case Boolean:r=r?Ie:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch(o){t=null}}return t}},fe=(r,e)=>!Ne(r,e),he={attribute:!0,type:String,converter:q,reflect:!1,useDefault:!1,hasChanged:fe},de,pe;(de=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(pe=b.litPropertyMetadata)!=null||(b.litPropertyMetadata=new WeakMap);var f=class extends HTMLElement{static addInitializer(e){var t;this._$Ei(),((t=this.l)!=null?t:this.l=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=he){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let o=Symbol(),i=this.getPropertyDescriptor(e,o,t);i!==void 0&&Le(this.prototype,e,i)}}static getPropertyDescriptor(e,t,o){var s;let{get:i,set:a}=(s=ze(this.prototype,e))!=null?s:{get(){return this[t]},set(c){this[t]=c}};return{get:i,set(c){let n=i==null?void 0:i.call(this);a==null||a.call(this,c),this.requestUpdate(e,n,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){var t;return(t=this.elementProperties.get(e))!=null?t:he}static _$Ei(){if(this.hasOwnProperty(E("elementProperties")))return;let e=De(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(E("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(E("properties"))){let t=this.properties,o=[...je(t),...Be(t)];for(let i of o)this.createProperty(i,t[i])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[o,i]of t)this.elementProperties.set(o,i)}this._$Eh=new Map;for(let[t,o]of this.elementProperties){let i=this._$Eu(t,o);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let o=new Set(e.flat(1/0).reverse());for(let i of o)t.unshift(V(i))}else e!==void 0&&t.push(V(e));return t}static _$Eu(e,t){let o=t.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach((t=>t(this)))}addController(e){var t,o;((t=this._$EO)!=null?t:this._$EO=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&((o=e.hostConnected)==null||o.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let o of t.keys())this.hasOwnProperty(o)&&(e.set(o,this[o]),delete this[o]);e.size>0&&(this._$Ep=e)}createRenderRoot(){var t;let e=(t=this.shadowRoot)!=null?t:this.attachShadow(this.constructor.shadowRootOptions);return ce(e,this.constructor.elementStyles),e}connectedCallback(){var e,t;(e=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach((o=>{var i;return(i=o.hostConnected)==null?void 0:i.call(o)}))}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach((t=>{var o;return(o=t.hostDisconnected)==null?void 0:o.call(t)}))}attributeChangedCallback(e,t,o){this._$AK(e,o)}_$ET(e,t){var a;let o=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,o);if(i!==void 0&&o.reflect===!0){let s=(((a=o.converter)==null?void 0:a.toAttribute)!==void 0?o.converter:q).toAttribute(t,o.type);this._$Em=e,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(e,t){var a,s,c,n;let o=this.constructor,i=o._$Eh.get(e);if(i!==void 0&&this._$Em!==i){let l=o.getPropertyOptions(i),d=typeof l.converter=="function"?{fromAttribute:l.converter}:((a=l.converter)==null?void 0:a.fromAttribute)!==void 0?l.converter:q;this._$Em=i,this[i]=(n=(c=d.fromAttribute(t,l.type))!=null?c:(s=this._$Ej)==null?void 0:s.get(i))!=null?n:null,this._$Em=null}}requestUpdate(e,t,o){var i,a;if(e!==void 0){let s=this.constructor,c=this[e];if(o!=null||(o=s.getPropertyOptions(e)),!(((i=o.hasChanged)!=null?i:fe)(c,t)||o.useDefault&&o.reflect&&c===((a=this._$Ej)==null?void 0:a.get(e))&&!this.hasAttribute(s._$Eu(e,o))))return;this.C(e,t,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:o,reflect:i,wrapped:a},s){var c,n,l;o&&!((c=this._$Ej)!=null?c:this._$Ej=new Map).has(e)&&(this._$Ej.set(e,(n=s!=null?s:t)!=null?n:this[e]),a!==!0||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||o||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&((l=this._$Eq)!=null?l:this._$Eq=new Set).add(e))}_$EP(){return ae(this,null,function*(){this.isUpdatePending=!0;try{yield this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&(yield e),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var o,i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((o=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[s,c]of this._$Ep)this[s]=c;this._$Ep=void 0}let a=this.constructor.elementProperties;if(a.size>0)for(let[s,c]of a){let{wrapped:n}=c,l=this[s];n!==!0||this._$AL.has(s)||l===void 0||this.C(s,void 0,c,l)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach((a=>{var s;return(s=a.hostUpdate)==null?void 0:s.call(a)})),this.update(t)):this._$EM()}catch(a){throw e=!1,this._$EM(),a}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach((o=>{var i;return(i=o.hostUpdated)==null?void 0:i.call(o)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach((t=>this._$ET(t,this[t])))),this._$EM()}updated(e){}firstUpdated(e){}},ue;f.elementStyles=[],f.shadowRootOptions={mode:"open"},f[E("elementProperties")]=new Map,f[E("finalized")]=new Map,W==null||W({ReactiveElement:f}),((ue=b.reactiveElementVersions)!=null?ue:b.reactiveElementVersions=[]).push("2.1.0");var P=globalThis,z=P.trustedTypes,me=z?z.createPolicy("lit-html",{createHTML:r=>r}):void 0,ye="$lit$",g=`lit$${Math.random().toFixed(9).slice(2)}$`,we="?"+g,Ve=`<${we}>`,_=document,U=()=>_.createComment(""),O=r=>r===null||typeof r!="object"&&typeof r!="function",Y=Array.isArray,We=r=>Y(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",K=`[
\f\r]`,C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,be=/-->/g,ge=/>/g,$=RegExp(`>|${K}(?:([^\\s"'>=/]+)(${K}*=${K}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),ve=/'/g,$e=/"/g,Ae=/^(?:script|style|textarea|title)$/i,ee=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),ke=ee(1),Ye=ee(2),et=ee(3),y=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),xe=new WeakMap,x=_.createTreeWalker(_,129);function Se(r,e){if(!Y(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return me!==void 0?me.createHTML(e):e}var qe=(r,e)=>{let t=r.length-1,o=[],i,a=e===2?"<svg>":e===3?"<math>":"",s=C;for(let c=0;c<t;c++){let n=r[c],l,d,h=-1,u=0;for(;u<n.length&&(s.lastIndex=u,d=s.exec(n),d!==null);)u=s.lastIndex,s===C?d[1]==="!--"?s=be:d[1]!==void 0?s=ge:d[2]!==void 0?(Ae.test(d[2])&&(i=RegExp("</"+d[2],"g")),s=$):d[3]!==void 0&&(s=$):s===$?d[0]===">"?(s=i!=null?i:C,h=-1):d[1]===void 0?h=-2:(h=s.lastIndex-d[2].length,l=d[1],s=d[3]===void 0?$:d[3]==='"'?$e:ve):s===$e||s===ve?s=$:s===be||s===ge?s=C:(s=$,i=void 0);let m=s===$&&r[c+1].startsWith("/>")?" ":"";a+=s===C?n+Ve:h>=0?(o.push(l),n.slice(0,h)+ye+n.slice(h)+g+m):n+g+(h===-2?c:m)}return[Se(r,a+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),o]},H=class r{constructor({strings:e,_$litType$:t},o){let i;this.parts=[];let a=0,s=0,c=e.length-1,n=this.parts,[l,d]=qe(e,t);if(this.el=r.createElement(l,o),x.currentNode=this.el.content,t===2||t===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=x.nextNode())!==null&&n.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(let h of i.getAttributeNames())if(h.endsWith(ye)){let u=d[s++],m=i.getAttribute(h).split(g),R=/([.?@])?(.*)/.exec(u);n.push({type:1,index:a,name:R[2],strings:m,ctor:R[1]==="."?J:R[1]==="?"?G:R[1]==="@"?Q:k}),i.removeAttribute(h)}else h.startsWith(g)&&(n.push({type:6,index:a}),i.removeAttribute(h));if(Ae.test(i.tagName)){let h=i.textContent.split(g),u=h.length-1;if(u>0){i.textContent=z?z.emptyScript:"";for(let m=0;m<u;m++)i.append(h[m],U()),x.nextNode(),n.push({type:2,index:++a});i.append(h[u],U())}}}else if(i.nodeType===8)if(i.data===we)n.push({type:2,index:a});else{let h=-1;for(;(h=i.data.indexOf(g,h+1))!==-1;)n.push({type:7,index:a}),h+=g.length-1}a++}}static createElement(e,t){let o=_.createElement("template");return o.innerHTML=e,o}};function A(r,e,t=r,o){var s,c,n;if(e===y)return e;let i=o!==void 0?(s=t._$Co)==null?void 0:s[o]:t._$Cl,a=O(e)?void 0:e._$litDirective$;return(i==null?void 0:i.constructor)!==a&&((c=i==null?void 0:i._$AO)==null||c.call(i,!1),a===void 0?i=void 0:(i=new a(r),i._$AT(r,t,o)),o!==void 0?((n=t._$Co)!=null?n:t._$Co=[])[o]=i:t._$Cl=i),i!==void 0&&(e=A(r,i._$AS(r,e.values),i,o)),e}var F=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var l;let{el:{content:t},parts:o}=this._$AD,i=((l=e==null?void 0:e.creationScope)!=null?l:_).importNode(t,!0);x.currentNode=i;let a=x.nextNode(),s=0,c=0,n=o[0];for(;n!==void 0;){if(s===n.index){let d;n.type===2?d=new M(a,a.nextSibling,this,e):n.type===1?d=new n.ctor(a,n.name,n.strings,this,e):n.type===6&&(d=new X(a,this,e)),this._$AV.push(d),n=o[++c]}s!==(n==null?void 0:n.index)&&(a=x.nextNode(),s++)}return x.currentNode=_,i}p(e){let t=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(e,o,t),t+=o.strings.length-2):o._$AI(e[t])),t++}},M=class r{get _$AU(){var e,t;return(t=(e=this._$AM)==null?void 0:e._$AU)!=null?t:this._$Cv}constructor(e,t,o,i){var a;this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=o,this.options=i,this._$Cv=(a=i==null?void 0:i.isConnected)!=null?a:!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=A(this,e,t),O(e)?e===p||e==null||e===""?(this._$AH!==p&&this._$AR(),this._$AH=p):e!==this._$AH&&e!==y&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):We(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==p&&O(this._$AH)?this._$AA.nextSibling.data=e:this.T(_.createTextNode(e)),this._$AH=e}$(e){var a;let{values:t,_$litType$:o}=e,i=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=H.createElement(Se(o.h,o.h[0]),this.options)),o);if(((a=this._$AH)==null?void 0:a._$AD)===i)this._$AH.p(t);else{let s=new F(i,this),c=s.u(this.options);s.p(t),this.T(c),this._$AH=s}}_$AC(e){let t=xe.get(e.strings);return t===void 0&&xe.set(e.strings,t=new H(e)),t}k(e){Y(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,o,i=0;for(let a of e)i===t.length?t.push(o=new r(this.O(U()),this.O(U()),this,this.options)):o=t[i],o._$AI(a),i++;i<t.length&&(this._$AR(o&&o._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var o;for((o=this._$AP)==null?void 0:o.call(this,!1,!0,t);e&&e!==this._$AB;){let i=e.nextSibling;e.remove(),e=i}}setConnected(e){var t;this._$AM===void 0&&(this._$Cv=e,(t=this._$AP)==null||t.call(this,e))}},k=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,o,i,a){this.type=1,this._$AH=p,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=a,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=p}_$AI(e,t=this,o,i){let a=this.strings,s=!1;if(a===void 0)e=A(this,e,t,0),s=!O(e)||e!==this._$AH&&e!==y,s&&(this._$AH=e);else{let c=e,n,l;for(e=a[0],n=0;n<a.length-1;n++)l=A(this,c[o+n],t,n),l===y&&(l=this._$AH[n]),s||(s=!O(l)||l!==this._$AH[n]),l===p?e=p:e!==p&&(e+=(l!=null?l:"")+a[n+1]),this._$AH[n]=l}s&&!i&&this.j(e)}j(e){e===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}},J=class extends k{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===p?void 0:e}},G=class extends k{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==p)}},Q=class extends k{constructor(e,t,o,i,a){super(e,t,o,i,a),this.type=5}_$AI(e,t=this){var s;if((e=(s=A(this,e,t,0))!=null?s:p)===y)return;let o=this._$AH,i=e===p&&o!==p||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,a=e!==p&&(o===p||i);i&&this.element.removeEventListener(this.name,this,o),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,o;typeof this._$AH=="function"?this._$AH.call((o=(t=this.options)==null?void 0:t.host)!=null?o:this.element,e):this._$AH.handleEvent(e)}},X=class{constructor(e,t,o){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(e){A(this,e)}};var Z=P.litHtmlPolyfillSupport,_e;Z==null||Z(H,M),((_e=P.litHtmlVersions)!=null?_e:P.litHtmlVersions=[]).push("3.3.0");var Ee=(r,e,t)=>{var a,s;let o=(a=t==null?void 0:t.renderBefore)!=null?a:e,i=o._$litPart$;if(i===void 0){let c=(s=t==null?void 0:t.renderBefore)!=null?s:null;o._$litPart$=i=new M(e.insertBefore(U(),c),c,void 0,t!=null?t:{})}return i._$AI(r),i};var w=globalThis,v=class extends f{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,o;let e=super.createRenderRoot();return(o=(t=this.renderOptions).renderBefore)!=null||(t.renderBefore=e.firstChild),e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ee(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return y}},Ce;v._$litElement$=!0,v.finalized=!0,(Ce=w.litElementHydrateSupport)==null||Ce.call(w,{LitElement:v});var te=w.litElementPolyfillSupport;te==null||te({LitElement:v});var Pe;((Pe=w.litElementVersions)!=null?Pe:w.litElementVersions=[]).push("4.2.0");var Ue=`:root{--input-text-default:var(--black);--input-text-disabled-default:var(--gray-dark);--input-text-placeholder-default:var(--gray-dark);--input-border-default:var(--gray-60);--input-border-disabled:var(--gray-60);--input-border-success:var(--green);--input-border-warning:var(--gold);--input-border-error:var(--red);--input-border-hover-default:var(--pacific);--input-border-focus-default:var(--pacific);--input-bg-default:var(--white);--input-bg-disabled-default:var(--gray-10);--form-alert-icon-color-default:var(--gray);--form-alert-icon-color-success:var(--green);--form-alert-icon-color-warning:var(--gold);--form-alert-icon-color-error:var(--red);--select-border-default:var(--gray-60);--select-border-width-default:1px;--select-border-error:var(--red);--select-border-width-error:2px;--select-border-hover-default:var(--pacific);--select-border-focus-default:var(--pacific);--select-bg-disabled-default:var(--gray-10);--select-icon-bg-default:var(--gray-10);--select-text-disabled-default:var(--gray-dark);--choice-border-default:var(--gray-60);--choice-border-disabled:var(--gray-60);--choice-border-success:var(--green);--choice-border-warning:var(--gold);--choice-border-error:var(--red);--choice-border-hover-default:var(--pacific);--choice-border-focus-default:var(--pacific);--choice-outline-focus-default:var(--pacific);--choice-bg-default:var(--white);--choice-bg-disabled:var(--gray-10);--choice-bg-selected-default:var(--pacific);--choice-bg-selected-disabled:var(--gray-40);--choice-bg-selected-focus-default:var(--pacific);--choice-label-disabled-default:var(--gray-dark)}.no-js .u-js-only,.u-hide-if-js{display:none!important}.no-js .u-hide-if-js{display:block!important}@media screen{.u-print-only{display:none}}@media print{.u-screen-only{display:none}}.u-clearfix:after{clear:both;content:"";display:table}.u-visually-hidden{border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0 0 0 0)}@media only screen and (max-width:37.5em){.u-hide-on-mobile{display:none}}@media only screen and (min-width:37.5625em){.u-show-on-mobile{display:none}}.u-hidden{display:none!important}.u-invisible{visibility:hidden}.u-right{float:right}.u-nowrap{white-space:nowrap}.u-flexible-container{height:0;padding-bottom:56.25%;position:relative}.u-flexible-container__inner{height:100%;left:0;position:absolute;top:0;width:100%}.u-flexible-container--4-3{height:0;padding-bottom:75%;position:relative}.u-mt0{margin-top:0!important}.u-mb0{margin-bottom:0!important}.u-mt5{margin-top:5px!important}.u-mb5{margin-bottom:5px!important}.u-mt10{margin-top:10px!important}.u-mb10{margin-bottom:10px!important}.u-mt15{margin-top:15px!important}.u-mb15{margin-bottom:15px!important}.u-mt20{margin-top:20px!important}.u-mb20{margin-bottom:20px!important}.u-mt30{margin-top:30px!important}.u-mb30{margin-bottom:30px!important}.u-mt45{margin-top:45px!important}.u-mb45{margin-bottom:45px!important}.u-mt60{margin-top:60px!important}.u-mb60{margin-bottom:60px!important}.u-w100pct{width:100%}.u-w90pct{width:90%}.u-w80pct{width:80%}.u-w70pct{width:70%}.u-w60pct{width:60%}.u-w50pct{width:50%}.u-w40pct{width:40%}.u-w30pct{width:30%}.u-w20pct{width:20%}.u-w10pct{width:10%}.u-w75pct{width:75%}.u-w65pct{width:65%}.u-w25pct{width:25%}.u-w15pct{width:15%}.u-w66pct{width:66.6666666667%}.u-w33pct{width:33.3333333333%}.u-small-text,small{font-size:.875em}.u-small-text--subtle,small--subtle{color:var(--gray)}.u-no-animation{transition-duration:0s!important}.u-move-transition{transition:transform .25s ease-out}.u-move-to-origin{transform:translateZ(0)}.u-move-left{transform:translate3d(-100%,0,0)}.u-move-left-2x{transform:translate3d(-200%,0,0)}.u-move-left-3x{transform:translate3d(-300%,0,0)}.u-move-right{transform:translate3d(100%,0,0)}.u-move-up{transform:translate3d(0,-100%,0)}.u-alpha-transition{transition:opacity .25s linear}.u-alpha-100{opacity:1}.u-alpha-0{opacity:0}.u-max-height-transition{contain:paint;overflow:hidden;transition:max-height .2s ease-out}.u-max-height-zero{max-height:0!important}.u-max-height-summary{max-height:88px!important}:host .m-form-field{--choice-border:var(--choice-border-default);--choice-border-hover:var(--choice-border-hover-default);--choice-border-focus:var(--choice-border-focus-default);--choice-outline-focus:var(--choice-outline-focus-default);--choice-bg:var(--choice-bg-default);--choice-bg-selected:var(--choice-bg-selected-default);--choice-bg-selected-focus:var(--choice-bg-selected-focus-default);--choice-label-disabled:var(--choice-label-disabled-default);--choice-border-width-addendum:0}:host .m-form-field .a-text-input--full{width:100%}:host .m-form-field .a-label+.a-text-input{margin-top:.3125em}:host .m-form-field--checkbox .a-label{cursor:pointer;display:inline-grid;grid-template-columns:1.875em auto;overflow-wrap:anywhere;vertical-align:top}:host .m-form-field--checkbox .a-label:before{background-color:var(--choice-bg);border:1px solid var(--choice-border);content:"";display:inline-block;grid-row-end:3;grid-row-start:1;height:1.125em;left:1px;margin-right:10px;outline:var(--choice-border-width-addendum) solid var(--choice-border);position:relative;top:1px;vertical-align:top;width:1.125em}:host .m-form-field--checkbox .a-label.hover:before,:host .m-form-field--checkbox .a-label:hover:before{border-color:var(--choice-border-hover)}:host .m-form-field--checkbox .a-checkbox{border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0 0 0 0)}:host .m-form-field--checkbox .a-checkbox.focus+.a-label,:host .m-form-field--checkbox .a-checkbox:focus+.a-label{outline:1px dotted var(--choice-outline-focus);outline-offset:1px}:host .m-form-field--checkbox .a-checkbox:disabled.focus+.a-label:before,:host .m-form-field--checkbox .a-checkbox:disabled.hover+.a-label:before,:host .m-form-field--checkbox .a-checkbox:disabled:checked+.a-label:before,:host .m-form-field--checkbox .a-checkbox:disabled:focus+.a-label:before,:host .m-form-field--checkbox .a-checkbox:disabled:hover+.a-label:before{border-color:var(--choice-border);box-shadow:none;outline:none}:host .m-form-field--checkbox .a-checkbox:disabled+.a-label{color:var(--choice-label-disabled);cursor:not-allowed}:host .m-form-field--checkbox .a-checkbox:disabled+.a-label:before{outline:none}:host .m-form-field--checkbox:has(.a-checkbox:disabled){--choice-border:var(--choice-border-disabled);--choice-bg:var(--choice-bg-disabled);--choice-bg-selected:var(--choice-bg-selected-disabled)}:host .m-form-field--checkbox-error,:host .m-form-field--checkbox-success,:host .m-form-field--checkbox-warning{--choice-border-width-addendum:1px}:host .m-form-field--checkbox-success{--choice-border:var(--choice-border-success)}:host .m-form-field--checkbox-warning{--choice-border:var(--choice-border-warning)}:host .m-form-field--checkbox-error{--choice-border:var(--choice-border-error)}:host .m-form-field--checkbox .a-checkbox.focus+.a-label:before,:host .m-form-field--checkbox .a-checkbox:focus+.a-label:before{border-color:var(--choice-border-focus);box-shadow:0 0 0 1px var(--choice-border-focus);outline-color:var(--choice-border-focus)}:host .m-form-field--checkbox .a-checkbox.hover+.a-label:before,:host .m-form-field--checkbox .a-checkbox:hover+.a-label:before{border-color:var(--choice-border-hover);box-shadow:0 0 0 1px var(--choice-border-hover);outline-color:var(--choice-border-hover)}:host .m-form-field--checkbox .a-checkbox:checked+.a-label:before{background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" class="cf-icon-svg cf-icon-svg--approved" viewBox="0 0 12 19"><path d="M4.63 15.638a1.03 1.03 0 0 1-.79-.37L.36 11.09a1.03 1.03 0 1 1 1.58-1.316l2.535 3.043L9.958 3.32a1.029 1.029 0 0 1 1.783 1.03L5.52 15.122a1.03 1.03 0 0 1-.803.511l-.088.004z"/></svg>');background-position:center 0;background-repeat:no-repeat;background-size:auto 1.1875em}:host .m-form-field--checkbox .a-checkbox:disabled:checked+.a-label:before{background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" fill="%235a5d61" aria-hidden="true" viewBox="0 0 12 19"><path d="M4.63 15.638a1.03 1.03 0 0 1-.79-.37L.36 11.09a1.03 1.03 0 1 1 1.58-1.316l2.535 3.043L9.958 3.32a1.029 1.029 0 0 1 1.783 1.03L5.52 15.122a1.03 1.03 0 0 1-.803.511l-.088.004z"/></svg>')}:host .m-form-field--lg-target{display:block}:host .m-form-field--lg-target .a-label{background-color:var(--gray-10);box-sizing:border-box;padding:15px;width:100%}:host .m-form-field--lg-target .a-checkbox:checked+.a-label{background-color:var(--pacific-20);box-shadow:inset 0 0 0 1px var(--pacific)}:host .m-form-field--lg-target .a-checkbox.focus+.a-label,:host .m-form-field--lg-target .a-checkbox.hover+.a-label,:host .m-form-field--lg-target .a-checkbox:focus+.a-label,:host .m-form-field--lg-target .a-checkbox:hover+.a-label{box-shadow:inset 0 0 0 2px var(--pacific)}:host .m-form-field--lg-target .a-checkbox.focus+.a-label,:host .m-form-field--lg-target .a-checkbox:checked+.a-label,:host .m-form-field--lg-target .a-checkbox:focus+.a-label{outline-offset:1px}:host .m-form-field--lg-target .a-checkbox:checked:disabled+.a-label,:host .m-form-field--lg-target .a-checkbox:disabled+.a-label,:host .m-form-field--lg-target .a-checkbox:hover:disabled+.a-label{background-color:var(--gray-20);box-shadow:none;color:var(--choice-label-disabled)}:host .m-form-field--lg-target .a-checkbox:checked:disabled+.a-label,:host .m-form-field--lg-target .a-checkbox:checked:disabled+.a-label:before{border:1px solid var(--form-field-border-disabled)}`;var j,He,B=class B extends v{constructor(){super();se(this,j);this.disabled=!1,this.validation="",this.type=""}static get properties(){return{disabled:{type:Boolean},validation:{type:String},type:{type:String}}}render(){return ke`<div class="${re(this,j,He)}"><input class="a-checkbox" type="checkbox" id="checkbox" ?disabled="${this.disabled}"> <label class="a-label" for="checkbox"><slot></slot></label></div>`}static init(){window.customElements.get("cfpb-checkbox")||window.customElements.define("cfpb-checkbox",B)}};j=new WeakSet,He=function(){let t="m-form-field m-form-field--checkbox";switch(this.type){case"success":t+=" m-form-field--checkbox-success";break;case"warning":t+=" m-form-field--checkbox-warning";break;case"error":t+=" m-form-field--checkbox-error";break;case"large":t+=" m-form-field--lg-target";break}return t},ie(B,"styles",I`${L(Ue)}`);var Oe=B;})();
/*! Bundled license information:
@lit/reactive-element/css-tag.js:
(**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
@lit/reactive-element/reactive-element.js:
lit-html/lit-html.js:
lit-element/lit-element.js:
(**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
lit-html/is-server.js:
(**
* @license
* Copyright 2022 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
*/
//# sourceMappingURL=index.js.map