pwa-auth 3.7.1 → 3.7.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.
Files changed (59) hide show
  1. package/README.md +13 -0
  2. package/base/webcomponents/drawer/css/exit.js +1 -1
  3. package/base/webcomponents/drawer/drawer.d.ts +1 -0
  4. package/base/webcomponents/drawer/drawer.d.ts.map +1 -1
  5. package/base/webcomponents/drawer/drawer.js +24 -10
  6. package/base/webcomponents/drawer/drawer.js.map +1 -1
  7. package/base/webcomponents/form/css/button.js +2 -2
  8. package/base/webcomponents/form/css/input.d.ts.map +1 -1
  9. package/base/webcomponents/form/css/input.js +9 -1
  10. package/base/webcomponents/form/css/input.js.map +1 -1
  11. package/base/webcomponents/form/css/label.d.ts.map +1 -1
  12. package/base/webcomponents/form/css/label.js +5 -0
  13. package/base/webcomponents/form/css/label.js.map +1 -1
  14. package/base/webcomponents/form/css/status.d.ts.map +1 -1
  15. package/base/webcomponents/form/css/status.js +1 -0
  16. package/base/webcomponents/form/css/status.js.map +1 -1
  17. package/base/webcomponents/form/css/toggle.d.ts.map +1 -1
  18. package/base/webcomponents/form/css/toggle.js +6 -1
  19. package/base/webcomponents/form/css/toggle.js.map +1 -1
  20. package/base/webcomponents/form/forgot.d.ts.map +1 -1
  21. package/base/webcomponents/form/forgot.js +5 -1
  22. package/base/webcomponents/form/forgot.js.map +1 -1
  23. package/base/webcomponents/form/login.d.ts.map +1 -1
  24. package/base/webcomponents/form/login.js +14 -16
  25. package/base/webcomponents/form/login.js.map +1 -1
  26. package/base/webcomponents/form/signup.d.ts.map +1 -1
  27. package/base/webcomponents/form/signup.js +4 -6
  28. package/base/webcomponents/form/signup.js.map +1 -1
  29. package/base/webcomponents/icon/css/icon.js +1 -1
  30. package/base/webcomponents/icon/icon.d.ts +2 -0
  31. package/base/webcomponents/icon/icon.d.ts.map +1 -1
  32. package/base/webcomponents/icon/icon.js +19 -0
  33. package/base/webcomponents/icon/icon.js.map +1 -1
  34. package/base/webcomponents/login/css/auth.js +1 -1
  35. package/base/webcomponents/login/page.d.ts.map +1 -1
  36. package/base/webcomponents/login/page.js +9 -3
  37. package/base/webcomponents/login/page.js.map +1 -1
  38. package/base/webcomponents/settings/css/navigation.d.ts.map +1 -1
  39. package/base/webcomponents/settings/css/navigation.js +7 -0
  40. package/base/webcomponents/settings/css/navigation.js.map +1 -1
  41. package/base/webcomponents/settings/input/delete.d.ts.map +1 -1
  42. package/base/webcomponents/settings/input/delete.js +4 -5
  43. package/base/webcomponents/settings/input/delete.js.map +1 -1
  44. package/base/webcomponents/settings/input/email.js +5 -5
  45. package/base/webcomponents/settings/input/email.js.map +1 -1
  46. package/base/webcomponents/settings/input/name.d.ts.map +1 -1
  47. package/base/webcomponents/settings/input/name.js +1 -0
  48. package/base/webcomponents/settings/input/name.js.map +1 -1
  49. package/base/webcomponents/settings/input/password.d.ts.map +1 -1
  50. package/base/webcomponents/settings/input/password.js +12 -15
  51. package/base/webcomponents/settings/input/password.js.map +1 -1
  52. package/base/webcomponents/settings/input/uploader.js +1 -1
  53. package/base/webcomponents/settings/input/verify.js +1 -1
  54. package/base/webcomponents/settings/settings.d.ts +1 -0
  55. package/base/webcomponents/settings/settings.d.ts.map +1 -1
  56. package/base/webcomponents/settings/settings.js +48 -20
  57. package/base/webcomponents/settings/settings.js.map +1 -1
  58. package/package.json +1 -1
  59. package/source/pwa-auth.js +146 -97
@@ -146,7 +146,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
146
146
  background-color: var(--pwa_background, var(--section_background_color, #fff));
147
147
  }
148
148
 
149
- h3 {
149
+ h2 {
150
150
  margin: 0;
151
151
  padding: 18px var(--pwa_inset, 0px) 14px;
152
152
  font-size: 1.15rem;
@@ -196,7 +196,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
196
196
  .action-button:focus { outline: 0; }
197
197
 
198
198
  .action-button:focus-visible {
199
- outline: 2px solid var(--pwa_action_border_color, #214f34);
199
+ outline: 2px solid var(--pwa_focus, #1c2430);
200
200
  outline-offset: 2px;
201
201
  }
202
202
 
@@ -267,7 +267,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
267
267
  .google:focus { outline: 0; }
268
268
 
269
269
  .google:focus-visible {
270
- outline: 2px solid #1f1f1f;
270
+ outline: 2px solid var(--pwa_focus, #1c2430);
271
271
  outline-offset: 2px;
272
272
  }
273
273
 
@@ -318,6 +318,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
318
318
  padding-inline: var(--pwa_inset, 0px);
319
319
  }
320
320
 
321
+ /* Required - the show button sits beside the field, not inside the label. */
322
+ label:has(+ .pair) {
323
+ padding-bottom: 6px;
324
+ }
325
+
321
326
  label {
322
327
  display: grid;
323
328
  gap: 6px;
@@ -353,11 +358,19 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
353
358
  padding: 8px 14px;
354
359
  color: var(--pwa_drawer_text_color, #1c2430);
355
360
  background-color: var(--pwa_input_background_color, var(--pwa_background, #fff));
356
- border: 1px solid var(--pwa_line_color, #e3daca);
361
+ border: 1px solid var(--pwa_input_border_color, #8d8870);
357
362
  border-radius: 10px;
358
363
  font-size: 1rem;
359
364
  }
360
365
 
366
+ input[type=text]:focus-visible,
367
+ input[type=email]:focus-visible,
368
+ input[type=password]:focus-visible,
369
+ select:focus-visible {
370
+ outline: 2px solid var(--pwa_focus, #1c2430);
371
+ outline-offset: 1px;
372
+ }
373
+
361
374
  input.invalid { background-color: #ffdddd; }
362
375
 
363
376
  /* Required - Chrome paints a yellow autofill. Keep the field on the component background. */
@@ -393,6 +406,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
393
406
  min-height: var(--pwa_tap, 44px); /* Required - minimum tap target */
394
407
  }
395
408
 
409
+ .new:focus-visible {
410
+ outline: 2px solid var(--pwa_focus, #1c2430);
411
+ outline-offset: 2px;
412
+ }
413
+
396
414
  .reveal {
397
415
  appearance: none;
398
416
  border: 0;
@@ -410,7 +428,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
410
428
  .reveal:focus { outline: 0; }
411
429
 
412
430
  .reveal:focus-visible {
413
- outline: 2px solid var(--pwa_action_border_color, #214f34);
431
+ outline: 2px solid var(--pwa_focus, #1c2430);
414
432
  outline-offset: 2px;
415
433
  }
416
434
 
@@ -446,6 +464,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
446
464
  display: block;
447
465
  position: relative;
448
466
  min-width: 0;
467
+ margin: 0 0 14px;
449
468
  }
450
469
 
451
470
  /* Required - Show sits in the field so the input border matches the column. */
@@ -549,26 +568,24 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
549
568
 
550
569
  <li>
551
570
 
552
- <label for="${e}">Password
553
-
554
- <span class="pair">
571
+ <label for="${e}">Password</label>
555
572
 
556
- <input
557
- id= "${e}"
558
- name= "password"
559
- part= "password"
560
- type= "${this.showPassword?"text":"password"}"
561
- autocomplete= "current-password"
562
- aria-invalid= "${"error"===this.tone?"true":"false"}"
563
- aria-describedby="${n}"
564
- @input= "${this.handlePassword}"
565
- @change= "${this.handlePassword}">
573
+ <span class="pair">
566
574
 
567
- ${nD(this.showPassword,()=>{this.showPassword=!this.showPassword})}
575
+ <input
576
+ id= "${e}"
577
+ name= "password"
578
+ part= "password"
579
+ type= "${this.showPassword?"text":"password"}"
580
+ autocomplete= "current-password"
581
+ aria-invalid= "${"error"===this.tone?"true":"false"}"
582
+ aria-describedby="${n}"
583
+ @input= "${this.handlePassword}"
584
+ @change= "${this.handlePassword}">
568
585
 
569
- </span>
586
+ ${nD(this.showPassword,()=>{this.showPassword=!this.showPassword})}
570
587
 
571
- </label>
588
+ </span>
572
589
 
573
590
  </li>
574
591
 
@@ -669,9 +686,9 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
669
686
 
670
687
  <li>
671
688
 
672
- <label for="${e}">Password
673
-
674
- <span class="pair">
689
+ <label for="${e}">Password</label>
690
+
691
+ <span class="pair">
675
692
 
676
693
  <input
677
694
  id= "${e}"
@@ -690,9 +707,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
690
707
 
691
708
  </span>
692
709
 
693
- <p id="${n}" class="hint" part="hint">${VE}</p>
694
-
695
- </label>
710
+ <p id="${n}" class="hint" part="hint">${VE}</p>
696
711
 
697
712
  </li>
698
713
 
@@ -725,7 +740,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
725
740
 
726
741
  </form>
727
742
 
728
- `}change(){bn.dispatch(rn(this.source))}async google(){if(!this.busy){this.busy=!0,this.tone="",this.status="";try{await bE()}catch(t){this.show(mE(t))}finally{this.busy=!1}}}show(t){this.tone="error",this.status=KE(t),gE(PE,t)}readFields(){const t=this.renderRoot.querySelector('input[type="email"]'),e=this.renderRoot.querySelector('input[name="new-password"]');this.email=t?.value??"",this.password=e?.value??""}_handleSubmit(t){t.preventDefault(),this.signUp()}handleEmail(t){const e=t.target;this.email=e.value}handlePassword(t){const e=t.target;this.password=e.value}async signUp(){if(this.busy)return;if(this.readFields(),this.email.length<4)return void this.show({code:"pwa/missing-email",message:"Enter an email address."});const t=qE(this.password);t?this.show(t):await this.newAccount(this.email,this.password)}};function nb(t){if(lE())return;const e=t.getAttribute("firebase-config");if(e)try{dE({config:JSON.parse(e)})}catch(t){gE(PE,mE(t))}}function sb(t,e){const n=t.trim();if(n){return n.split(/\s+/).slice(0,2).map(t=>t.charAt(0)).join("").toUpperCase()}const s=e.trim();return s?s.charAt(0).toUpperCase():""}function rb(t,e){const n=t.trim();if(n)return n;const s=e.trim();return s||"Account"}Z_([lt({type:String}),tb("design:type",Object)],eb.prototype,"source",void 0),Z_([lt({type:Boolean,attribute:"hide-google",reflect:!0}),tb("design:type",Object)],eb.prototype,"hideGoogle",void 0),Z_([ut(),tb("design:type",Object)],eb.prototype,"email",void 0),Z_([ut(),tb("design:type",Object)],eb.prototype,"password",void 0),Z_([ut(),tb("design:type",Object)],eb.prototype,"status",void 0),Z_([ut(),tb("design:type",Object)],eb.prototype,"tone",void 0),Z_([ut(),tb("design:type",Object)],eb.prototype,"busy",void 0),Z_([ut(),tb("design:type",Object)],eb.prototype,"showPassword",void 0),Z_([ut(),tb("design:type",Object)],eb.prototype,"notice",void 0),eb=Z_([at("form-signup"),tb("design:paramtypes",[])],eb);var ib=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},ob=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let ab=class extends(wt(bn)(it)){constructor(){super(),this.subscribe=!1,this.hideGoogle=!1,this._name="",this._email="",this._verified=!1,this._notice="",this._log=!1,this._sign=!1,this.motion=!1,this.clipHeight="auto",this.sheetShift="none",this.rollMotion=!1,this.booted=!1,this.stopNotice=null,this.heldHeight=null,this.columnWidth=0,this.columnObserver=null,this.onClipEnd=t=>{t instanceof TransitionEvent&&t.target===t.currentTarget&&"max-height"===t.propertyName&&this.rest()}}connectedCallback(){nb(this),super.connectedCallback(),this._notice=Y_(),this.stopNotice=X_(()=>{this._notice=Y_()})}disconnectedCallback(){this.stopNotice?.(),this.stopNotice=null,this.columnObserver?.disconnect(),this.columnObserver=null,super.disconnectedCallback()}stateChanged(t){this._name=t.backend.name,this._email=t.backend.email,this._verified=Boolean(t.backend?.verified),this._log=t.frontend.login,this._sign=t.frontend.registerTwo}willUpdate(t){if(!this.booted)return;if(!t.has("_sign")&&!t.has("_log"))return;t.has("_sign")&&(this.motion=!0);const e=this.clip();e&&(this.heldHeight=Math.ceil(e.getBoundingClientRect().height),this.rollMotion=!1,this.clipHeight=`${this.heldHeight}px`,this.sheetShift="translate3d(0, 0, 0)")}updated(t){const e=!this.booted;if(this.booted=!0,e)return this.watchColumn(),void requestAnimationFrame(()=>{this.motion=!0});if(!t.has("_sign")&&!t.has("_log"))return;const n=this.clip(),s=this.sheet();if(!n||!s||null==this.heldHeight)return;const r=this.heldHeight;this.heldHeight=null;const i=Math.ceil(s.getBoundingClientRect().height);Math.abs(i-r)>1?this.rollBetween(n,s,r,i,i):this.rest()}watchColumn(){"undefined"!=typeof ResizeObserver&&(this.columnObserver=new ResizeObserver(()=>{const t=Math.round(this.getBoundingClientRect().width);if(!t||t===this.columnWidth)return;if(this.columnWidth=t,!this.rollMotion)return;const e=this.clip(),n=this.sheet();if(!e||!n)return;const s=Math.ceil(e.getBoundingClientRect().height),r=Math.ceil(n.getBoundingClientRect().height);this.rollBetween(e,n,s,r,r)}),this.columnObserver.observe(this))}clip(){return this.shadowRoot?.querySelector(".login-clip")??null}sheet(){return this.shadowRoot?.querySelector(".service")??null}reduced(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}rest(){this.rollMotion=!1,this.clipHeight="auto",this.sheetShift="none"}clipStyle(){const t=this.rollMotion&&!this.reduced();return{height:this.clipHeight,maxHeight:"auto"===this.clipHeight?"none":this.clipHeight,transition:t?"height var(--pwa_slide, 2s) ease-in-out, max-height var(--pwa_slide, 2s) ease-in-out":"none"}}sheetStyle(){const t=this.rollMotion&&!this.reduced();return{transform:this.sheetShift,transition:t?"transform var(--pwa_slide, 2s) ease-in-out":"none"}}rollBetween(t,e,n,s,r){const i=n-r,o=s-r,a=t=>`translate3d(0, ${t}px, 0)`;if(this.reduced()||Math.abs(s-n)<=1)return void this.rest();t.style.transition="none",e.style.transition="none",t.style.height=`${Math.max(0,n)}px`,t.style.maxHeight=`${Math.max(0,n)}px`,e.style.transform=a(i),t.offsetHeight,t.style.transition="height var(--pwa_slide, 2s) ease-in-out, max-height var(--pwa_slide, 2s) ease-in-out",e.style.transition="transform var(--pwa_slide, 2s) ease-in-out",t.style.height=`${Math.max(0,s)}px`,t.style.maxHeight=`${Math.max(0,s)}px`,e.style.transform=a(o),this.rollMotion=!0,this.clipHeight=`${Math.max(0,s)}px`,this.sheetShift=a(o)}static get styles(){return[Tn,On,An,Sn,vn,eD,K_,i`
743
+ `}change(){bn.dispatch(rn(this.source))}async google(){if(!this.busy){this.busy=!0,this.tone="",this.status="";try{await bE()}catch(t){this.show(mE(t))}finally{this.busy=!1}}}show(t){this.tone="error",this.status=KE(t),gE(PE,t)}readFields(){const t=this.renderRoot.querySelector('input[type="email"]'),e=this.renderRoot.querySelector('input[name="new-password"]');this.email=t?.value??"",this.password=e?.value??""}_handleSubmit(t){t.preventDefault(),this.signUp()}handleEmail(t){const e=t.target;this.email=e.value}handlePassword(t){const e=t.target;this.password=e.value}async signUp(){if(this.busy)return;if(this.readFields(),this.email.length<4)return void this.show({code:"pwa/missing-email",message:"Enter an email address."});const t=qE(this.password);t?this.show(t):await this.newAccount(this.email,this.password)}};function nb(t){if(lE())return;const e=t.getAttribute("firebase-config");if(e)try{dE({config:JSON.parse(e)})}catch(t){gE(PE,mE(t))}}function sb(t,e){const n=t.trim();if(n){return n.split(/\s+/).slice(0,2).map(t=>t.charAt(0)).join("").toUpperCase()}const s=e.trim();return s?s.charAt(0).toUpperCase():""}function rb(t,e){const n=t.trim();if(n)return n;const s=e.trim();return s||"Account"}Z_([lt({type:String}),tb("design:type",Object)],eb.prototype,"source",void 0),Z_([lt({type:Boolean,attribute:"hide-google",reflect:!0}),tb("design:type",Object)],eb.prototype,"hideGoogle",void 0),Z_([ut(),tb("design:type",Object)],eb.prototype,"email",void 0),Z_([ut(),tb("design:type",Object)],eb.prototype,"password",void 0),Z_([ut(),tb("design:type",Object)],eb.prototype,"status",void 0),Z_([ut(),tb("design:type",Object)],eb.prototype,"tone",void 0),Z_([ut(),tb("design:type",Object)],eb.prototype,"busy",void 0),Z_([ut(),tb("design:type",Object)],eb.prototype,"showPassword",void 0),Z_([ut(),tb("design:type",Object)],eb.prototype,"notice",void 0),eb=Z_([at("form-signup"),tb("design:paramtypes",[])],eb);var ib=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},ob=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let ab=class extends(wt(bn)(it)){constructor(){super(),this.subscribe=!1,this.hideGoogle=!1,this._name="",this._email="",this._verified=!1,this._notice="",this._log=!1,this._sign=!1,this.motion=!1,this.clipHeight="auto",this.sheetShift="none",this.rollMotion=!1,this.booted=!1,this.stopNotice=null,this.heldHeight=null,this.columnWidth=0,this.columnObserver=null,this.onClipEnd=t=>{t instanceof TransitionEvent&&t.target===t.currentTarget&&"max-height"===t.propertyName&&this.rest()}}connectedCallback(){nb(this),this.hasAttribute("role")||this.setAttribute("role","region"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Account"),super.connectedCallback(),this._notice=Y_(),this.stopNotice=X_(()=>{this._notice=Y_()})}disconnectedCallback(){this.stopNotice?.(),this.stopNotice=null,this.columnObserver?.disconnect(),this.columnObserver=null,super.disconnectedCallback()}stateChanged(t){this._name=t.backend.name,this._email=t.backend.email,this._verified=Boolean(t.backend?.verified),this._log=t.frontend.login,this._sign=t.frontend.registerTwo}willUpdate(t){if(!this.booted)return;if(!t.has("_sign")&&!t.has("_log"))return;t.has("_sign")&&(this.motion=!0);const e=this.clip();e&&(this.heldHeight=Math.ceil(e.getBoundingClientRect().height),this.rollMotion=!1,this.clipHeight=`${this.heldHeight}px`,this.sheetShift="translate3d(0, 0, 0)")}updated(t){const e=!this.booted;if(this.booted=!0,e)return this.watchColumn(),void requestAnimationFrame(()=>{this.motion=!0});if(!t.has("_sign")&&!t.has("_log"))return;const n=this.clip(),s=this.sheet();if(!n||!s||null==this.heldHeight)return;const r=this.heldHeight;this.heldHeight=null;const i=Math.ceil(s.getBoundingClientRect().height);Math.abs(i-r)>1?this.rollBetween(n,s,r,i,i):this.rest()}watchColumn(){"undefined"!=typeof ResizeObserver&&(this.columnObserver=new ResizeObserver(()=>{const t=Math.round(this.getBoundingClientRect().width);if(!t||t===this.columnWidth)return;if(this.columnWidth=t,!this.rollMotion)return;const e=this.clip(),n=this.sheet();if(!e||!n)return;const s=Math.ceil(e.getBoundingClientRect().height),r=Math.ceil(n.getBoundingClientRect().height);this.rollBetween(e,n,s,r,r)}),this.columnObserver.observe(this))}clip(){return this.shadowRoot?.querySelector(".login-clip")??null}sheet(){return this.shadowRoot?.querySelector(".service")??null}reduced(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}rest(){this.rollMotion=!1,this.clipHeight="auto",this.sheetShift="none"}clipStyle(){const t=this.rollMotion&&!this.reduced();return{height:this.clipHeight,maxHeight:"auto"===this.clipHeight?"none":this.clipHeight,transition:t?"height var(--pwa_slide, 2s) ease-in-out, max-height var(--pwa_slide, 2s) ease-in-out":"none"}}sheetStyle(){const t=this.rollMotion&&!this.reduced();return{transform:this.sheetShift,transition:t?"transform var(--pwa_slide, 2s) ease-in-out":"none"}}rollBetween(t,e,n,s,r){const i=n-r,o=s-r,a=t=>`translate3d(0, ${t}px, 0)`;if(this.reduced()||Math.abs(s-n)<=1)return void this.rest();t.style.transition="none",e.style.transition="none",t.style.height=`${Math.max(0,n)}px`,t.style.maxHeight=`${Math.max(0,n)}px`,e.style.transform=a(i),t.offsetHeight,t.style.transition="height var(--pwa_slide, 2s) ease-in-out, max-height var(--pwa_slide, 2s) ease-in-out",e.style.transition="transform var(--pwa_slide, 2s) ease-in-out",t.style.height=`${Math.max(0,s)}px`,t.style.maxHeight=`${Math.max(0,s)}px`,e.style.transform=a(o),this.rollMotion=!0,this.clipHeight=`${Math.max(0,s)}px`,this.sheetShift=a(o)}static get styles(){return[Tn,On,An,Sn,vn,eD,K_,i`
729
744
  /* Required - this card's roll only. Block, so the sheet is not stretched to the clip. */
730
745
  .login-clip {
731
746
  display: block;
@@ -745,9 +760,9 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
745
760
  @transitionend=${this.onClipEnd}>
746
761
  <section class="service" part="panel" style=${mt(this.sheetStyle())}>
747
762
 
748
- <header part="header">
749
- <h3 part="title">${this._log?rb(this._name,this._email):this._sign===this.subscribe?"Login":"Subscribe"}</h3>
750
- </header>
763
+ <div part="header">
764
+ <h2 part="title">${this._log?rb(this._name,this._email):this._sign===this.subscribe?"Login":"Subscribe"}</h2>
765
+ </div>
751
766
 
752
767
  <!-- Logged-out State -->
753
768
  <div
@@ -763,6 +778,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
763
778
  ?hide-google= "${this.hideGoogle}"
764
779
  exportparts= "email: login-email, password: login-password, submit: login-submit, switch: login-switch, forgot: login-forgot, status: login-status, reveal: login-reveal, google: login-google"
765
780
  ?inert= "${this._sign!==this.subscribe}"
781
+ aria-hidden= "${this._sign!==this.subscribe?"true":"false"}"
766
782
  class= ${ft({content:!0,opened:this._sign===this.subscribe,closed:this._sign!==this.subscribe})}></form-login>
767
783
 
768
784
  <!-- Sign-up State -->
@@ -771,6 +787,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
771
787
  ?hide-google= "${this.hideGoogle}"
772
788
  exportparts= "email: signup-email, password: signup-password, submit: signup-submit, switch: signup-switch, status: signup-status, reveal: signup-reveal, notice: signup-notice, google: signup-google"
773
789
  ?inert= "${this._sign===this.subscribe}"
790
+ aria-hidden= "${this._sign===this.subscribe?"true":"false"}"
774
791
  class= ${ft({content:!0,opened:!this._sign===this.subscribe,closed:!this._sign!==this.subscribe})}></form-signup>
775
792
 
776
793
  </div>
@@ -861,7 +878,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
861
878
  border-bottom: 1px solid var(--pwa_line_color, #e3daca);
862
879
  }
863
880
 
864
- .exit > h3 {
881
+ .exit > h2 {
865
882
  font-weight: 600;
866
883
  font-size: 1rem;
867
884
  margin: 0 auto;
@@ -1078,7 +1095,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1078
1095
  .status:focus { outline: 0; }
1079
1096
 
1080
1097
  .status:focus-visible {
1081
- outline: 2px solid var(--pwa_action_border_color, #214f34);
1098
+ outline: 2px solid var(--pwa_focus, #1c2430);
1082
1099
  outline-offset: 2px;
1083
1100
  }
1084
1101
 
@@ -1135,7 +1152,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1135
1152
  </form>
1136
1153
 
1137
1154
  </div>
1138
- `}showSent(){this.tone="",this.status="Check your inbox for the verification email.",this.cooldown=45,this.armCooldown(),this.updateComplete.then(()=>{this.focusStatus()})}showFirebase(t){this.tone="error",this.status=KE(t),this.updateComplete.then(()=>{this.focusStatus()})}focusStatus(){const t=this.renderRoot.querySelector("#pwa-verify-status");t?.focus()}clearWait(){window.clearInterval(this.timer),this.timer=0,this.cooldown=0}armCooldown(){window.clearInterval(this.timer),this.timer=window.setInterval(()=>{if(this.cooldown<=1)return this.cooldown=0,window.clearInterval(this.timer),void(this.timer=0);this.cooldown-=1},1e3)}}mb([ut(),wb("design:type",Object)],yb.prototype,"login",void 0),mb([ut(),wb("design:type",Object)],yb.prototype,"verified",void 0),mb([ut(),wb("design:type",Object)],yb.prototype,"email",void 0),mb([ut(),wb("design:type",Object)],yb.prototype,"status",void 0),mb([ut(),wb("design:type",Object)],yb.prototype,"tone",void 0),mb([ut(),wb("design:type",Object)],yb.prototype,"busy",void 0),mb([ut(),wb("design:type",Object)],yb.prototype,"cooldown",void 0),customElements.define("email-verify",yb);var Eb=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Db=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let _b=class extends(wt(bn)(it)){constructor(){super(),this.url="",this.drawer=!1,this.subscribe=!1,this.hideGoogle=!1,this.name="",this.email="",this.verified=!1,this.notice="",this.user=!1,this.signup=!1,this.sliding=!1,this.motion=!1,this.clipHeight="0px",this.sheetShift="translate3d(0, -100%, 0)",this.rollMotion=!1,this.booted=!1,this.wasOpen=!1,this.sawOpen=!1,this.returnFocus=null,this.stopNotice=null,this.heldHeight=null,this.columnWidth=0,this.columnObserver=null,this.onClipEnd=t=>{if(!(t instanceof TransitionEvent))return;if(t.target!==t.currentTarget)return;if("max-height"!==t.propertyName)return;const e=t.currentTarget;e instanceof HTMLElement&&(this.drawer?this.restOpen():e.getBoundingClientRect().height>1||(this.sliding=!1,this.restShut()))},this.onKey=t=>{if(!this.drawer)return;if("Escape"===t.key)return t.preventDefault(),void bn.dispatch(hn());if("Tab"!==t.key)return;const e=pb(this);if(!e.length)return;const n=e[0],s=e[e.length-1],r=fb(),i=!!r&&e.includes(r);t.shiftKey?i&&r!==n||(t.preventDefault(),s.focus({preventScroll:!0})):i&&r!==s||(t.preventDefault(),n.focus({preventScroll:!0}))},this.onLightClick=t=>{if(t.defaultPrevented)return;const e=t.target;if(!(e instanceof Element))return;const n=e.closest("a, button");n instanceof HTMLElement&&this.contains(n)&&(this.shadowRoot?.contains(n)||bn.dispatch(hn()))},this.onSettings=t=>{const e=this.destination();if(!this.dispatchEvent(new CustomEvent(FE,{bubbles:!0,composed:!0,cancelable:!0,detail:{url:e}})))return void t.preventDefault();if(bn.dispatch(hn()),e)return;t.preventDefault();const n=document.querySelector("user-settings");n instanceof HTMLElement&&n.scrollIntoView({block:"nearest"})}}connectedCallback(){nb(this),super.connectedCallback(),this.addEventListener("keydown",this.onKey),this.addEventListener("click",this.onLightClick),this.notice=Y_(),this.stopNotice=X_(()=>{this.notice=Y_()})}disconnectedCallback(){this.removeEventListener("keydown",this.onKey),this.removeEventListener("click",this.onLightClick),this.stopNotice?.(),this.stopNotice=null,this.columnObserver?.disconnect(),this.columnObserver=null,super.disconnectedCallback()}stateChanged(t){const e=t.frontend.drawer;this.name=t.backend.name,this.email=t.backend.email,this.verified=Boolean(t.backend?.verified),e?this.sliding=!0:this.reduced()&&(this.sliding=!1),this.drawer=e,this.user=t.frontend.login,this.signup=t.frontend.registerOne;(this.sawOpen?e!==this.wasOpen:e)&&function(t,e,n){t.dispatchEvent(new CustomEvent(e,{...fE,detail:n}))}(this,LE,{open:e}),this.wasOpen=e,this.sawOpen=!0}willUpdate(t){if(!this.booted)return void(this.drawer&&this.restOpen());if(t.has("signup")&&(this.motion=!0),t.has("drawer")||!t.has("signup")||!this.drawer)return;const e=this.clip();e&&(this.heldHeight=Math.ceil(e.getBoundingClientRect().height),this.rollMotion=!1,this.clipHeight=`${this.heldHeight}px`,this.sheetShift="translate3d(0, 0, 0)")}updated(t){const e=!this.booted;if(this.booted=!0,!e&&t.has("drawer"))this.heldHeight=null,this.drawer?this.unroll():this.rollUp();else if(!e&&null!=this.heldHeight&&this.drawer){const t=this.heldHeight;this.heldHeight=null;const e=this.clip(),n=this.sheet();if(e&&n){const s=Math.ceil(n.getBoundingClientRect().height);Math.abs(s-t)>1?this.rollBetween(e,n,t,s,s):this.restOpen()}}if(e&&requestAnimationFrame(()=>{this.motion=!0}),t.has("drawer")){if(this.drawer){const t=fb();return this.returnFocus=t&&!this.contains(t)?t:this.returnFocus,this.shadowRoot?.querySelector(".close")?.focus({preventScroll:!0}),void V_(!1)}this.returnFocus?.focus(),this.returnFocus=null}}clip(){return this.shadowRoot?.querySelector(".drawer-clip")??null}sheet(){return this.shadowRoot?.querySelector(".userDrawer")??null}reduced(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}restShut(){this.rollMotion=!1,this.clipHeight="0px",this.sheetShift="translate3d(0, -100%, 0)"}restOpen(){this.rollMotion=!1,this.clipHeight="auto",this.sheetShift="none"}clipStyle(){const t=this.rollMotion&&!this.reduced();return{height:this.clipHeight,maxHeight:"auto"===this.clipHeight?"none":this.clipHeight,transition:t?"height var(--pwa_slide, 2s) ease-in-out, max-height var(--pwa_slide, 2s) ease-in-out":"none"}}sheetStyle(){const t=this.rollMotion&&!this.reduced();return{transform:this.sheetShift,transition:t?"transform var(--pwa_slide, 2s) ease-in-out":"none"}}unroll(){const t=this.clip(),e=this.sheet();if(!t||!e)return;this.scrollTop=0,this.placeAnchor();const n=this.sheetPx(t,e),s=Math.ceil(t.getBoundingClientRect().height);this.rollBetween(t,e,s,n,n)}rollUp(){const t=this.clip(),e=this.sheet();if(!t||!e)return;const n=Math.ceil(e.getBoundingClientRect().height),s=Math.ceil(t.getBoundingClientRect().height);this.rollBetween(t,e,s,0,n),this.reduced()&&(this.sliding=!1)}sheetPx(t,e){const n=t.style.transition,s=t.style.maxHeight,r=t.style.height;t.style.transition="none",t.style.maxHeight="none",t.style.height="auto";const i=Math.ceil(e.getBoundingClientRect().height);return t.style.height=r,t.style.maxHeight=s,t.style.transition=n,i}rollBetween(t,e,n,s,r){const i=n-r,o=s-r,a=t=>`translate3d(0, ${t}px, 0)`;if(this.reduced()||Math.abs(s-n)<=1)return void(0===s?this.restShut():this.restOpen());t.style.transition="none",e.style.transition="none",t.style.height=`${Math.max(0,n)}px`,t.style.maxHeight=`${Math.max(0,n)}px`,e.style.transform=a(i),t.offsetHeight,t.style.transition="height var(--pwa_slide, 2s) ease-in-out, max-height var(--pwa_slide, 2s) ease-in-out",e.style.transition="transform var(--pwa_slide, 2s) ease-in-out",t.style.height=`${Math.max(0,s)}px`,t.style.maxHeight=`${Math.max(0,s)}px`,e.style.transform=a(o),this.rollMotion=!0,this.clipHeight=`${Math.max(0,s)}px`,this.sheetShift=a(o)}firstUpdated(){this.shadowRoot.querySelector(".close").addEventListener("click",()=>{bn.dispatch(hn())}),this.shadowRoot.querySelector(".leave").addEventListener("click",async()=>{if(this.user)try{await x_()}catch{return}bn.dispatch(hn())});this.shadowRoot.querySelectorAll("a").forEach(t=>{t.addEventListener("click",()=>{bn.dispatch(hn())})}),this.watchColumn()}placeAnchor(){const t=getComputedStyle(this).position;if("fixed"===t||"absolute"===t)return void(this.style.top&&(this.style.top=""));const e=this.parentElement;if(!e)return;const n=this.previousElementSibling,s=n?n.getBoundingClientRect().bottom:e.getBoundingClientRect().top+(parseFloat(getComputedStyle(e).paddingTop)||0),r=parseFloat(this.style.top)||0,i=s-(this.getBoundingClientRect().top-r);Math.abs(i-r)<=.5||(this.style.top=Math.abs(i)<=.5?"":`${i}px`)}watchColumn(){if("undefined"==typeof ResizeObserver)return;this.columnObserver=new ResizeObserver(()=>{this.placeAnchor();const t=Math.round(this.getBoundingClientRect().width);t&&t!==this.columnWidth&&(this.columnWidth=t,this.onColumnResize())}),this.columnObserver.observe(this);const t=this.previousElementSibling;t&&this.columnObserver.observe(t),this.placeAnchor()}onColumnResize(){if(!this.rollMotion)return;const t=this.clip(),e=this.sheet();if(!t||!e)return;const n=Math.ceil(t.getBoundingClientRect().height),s=this.sheetPx(t,e);this.rollBetween(t,e,n,this.drawer?s:0,s)}static get styles(){return[cb,vn,In,lb,ub,hb,db,Sn,eD,K_,gb,i`
1155
+ `}showSent(){this.tone="",this.status="Check your inbox for the verification email.",this.cooldown=45,this.armCooldown(),this.updateComplete.then(()=>{this.focusStatus()})}showFirebase(t){this.tone="error",this.status=KE(t),this.updateComplete.then(()=>{this.focusStatus()})}focusStatus(){const t=this.renderRoot.querySelector("#pwa-verify-status");t?.focus()}clearWait(){window.clearInterval(this.timer),this.timer=0,this.cooldown=0}armCooldown(){window.clearInterval(this.timer),this.timer=window.setInterval(()=>{if(this.cooldown<=1)return this.cooldown=0,window.clearInterval(this.timer),void(this.timer=0);this.cooldown-=1},1e3)}}mb([ut(),wb("design:type",Object)],yb.prototype,"login",void 0),mb([ut(),wb("design:type",Object)],yb.prototype,"verified",void 0),mb([ut(),wb("design:type",Object)],yb.prototype,"email",void 0),mb([ut(),wb("design:type",Object)],yb.prototype,"status",void 0),mb([ut(),wb("design:type",Object)],yb.prototype,"tone",void 0),mb([ut(),wb("design:type",Object)],yb.prototype,"busy",void 0),mb([ut(),wb("design:type",Object)],yb.prototype,"cooldown",void 0),customElements.define("email-verify",yb);var Eb=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Db=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let _b=class extends(wt(bn)(it)){constructor(){super(),this.url="",this.drawer=!1,this.subscribe=!1,this.hideGoogle=!1,this.name="",this.email="",this.verified=!1,this.notice="",this.user=!1,this.signup=!1,this.sliding=!1,this.motion=!1,this.clipHeight="0px",this.sheetShift="translate3d(0, -100%, 0)",this.rollMotion=!1,this.booted=!1,this.wasOpen=!1,this.sawOpen=!1,this.returnFocus=null,this.stopNotice=null,this.heldHeight=null,this.columnWidth=0,this.columnObserver=null,this.onClipEnd=t=>{if(!(t instanceof TransitionEvent))return;if(t.target!==t.currentTarget)return;if("max-height"!==t.propertyName)return;const e=t.currentTarget;e instanceof HTMLElement&&(this.drawer?this.restOpen():e.getBoundingClientRect().height>1||(this.sliding=!1,this.restShut()))},this.onKey=t=>{if(!this.drawer)return;if("Escape"===t.key)return t.preventDefault(),void bn.dispatch(hn());if("Tab"!==t.key)return;const e=pb(this);if(!e.length)return;const n=e[0],s=e[e.length-1],r=fb(),i=!!r&&e.includes(r);t.shiftKey?i&&r!==n||(t.preventDefault(),s.focus({preventScroll:!0})):i&&r!==s||(t.preventDefault(),n.focus({preventScroll:!0}))},this.onLightClick=t=>{if(t.defaultPrevented)return;const e=t.target;if(!(e instanceof Element))return;const n=e.closest("a, button");n instanceof HTMLElement&&this.contains(n)&&(this.shadowRoot?.contains(n)||bn.dispatch(hn()))},this.onSettings=t=>{const e=this.destination();if(!this.dispatchEvent(new CustomEvent(FE,{bubbles:!0,composed:!0,cancelable:!0,detail:{url:e}})))return void t.preventDefault();if(bn.dispatch(hn()),e)return;t.preventDefault();const n=document.querySelector("user-settings");n instanceof HTMLElement&&n.scrollIntoView({block:"nearest"})}}connectedCallback(){nb(this),this.id||(this.id="pwa-user-drawer"),super.connectedCallback(),this.addEventListener("keydown",this.onKey),this.addEventListener("click",this.onLightClick),this.notice=Y_(),this.stopNotice=X_(()=>{this.notice=Y_()})}disconnectedCallback(){this.removeEventListener("keydown",this.onKey),this.removeEventListener("click",this.onLightClick),this.stopNotice?.(),this.stopNotice=null,this.columnObserver?.disconnect(),this.columnObserver=null,super.disconnectedCallback()}stateChanged(t){const e=t.frontend.drawer;this.name=t.backend.name,this.email=t.backend.email,this.verified=Boolean(t.backend?.verified),e?this.sliding=!0:this.reduced()&&(this.sliding=!1),this.drawer=e,this.user=t.frontend.login,this.signup=t.frontend.registerOne;(this.sawOpen?e!==this.wasOpen:e)&&function(t,e,n){t.dispatchEvent(new CustomEvent(e,{...fE,detail:n}))}(this,LE,{open:e}),this.wasOpen=e,this.sawOpen=!0}willUpdate(t){if(!this.booted)return void(this.drawer&&this.restOpen());if(t.has("signup")&&(this.motion=!0),t.has("drawer")||!t.has("signup")||!this.drawer)return;const e=this.clip();e&&(this.heldHeight=Math.ceil(e.getBoundingClientRect().height),this.rollMotion=!1,this.clipHeight=`${this.heldHeight}px`,this.sheetShift="translate3d(0, 0, 0)")}updated(t){const e=!this.booted;if(this.booted=!0,!e&&t.has("drawer"))this.heldHeight=null,this.drawer?this.unroll():this.rollUp();else if(!e&&null!=this.heldHeight&&this.drawer){const t=this.heldHeight;this.heldHeight=null;const e=this.clip(),n=this.sheet();if(e&&n){const s=Math.ceil(n.getBoundingClientRect().height);Math.abs(s-t)>1?this.rollBetween(e,n,t,s,s):this.restOpen()}}if(e&&requestAnimationFrame(()=>{this.motion=!0}),!t.has("drawer"))return;if(this.drawer){const t=fb();return this.returnFocus=t&&!this.contains(t)?t:this.returnFocus,this.shadowRoot?.querySelector(".close")?.focus({preventScroll:!0}),void V_(!1)}const n=this.returnFocus??this.toggleButton();n?.focus(),this.returnFocus=null}clip(){return this.shadowRoot?.querySelector(".drawer-clip")??null}sheet(){return this.shadowRoot?.querySelector(".userDrawer")??null}toggleButton(){const t=document.querySelector("user-icon"),e=t?.shadowRoot?.querySelector("button");return e instanceof HTMLElement?e:null}reduced(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}restShut(){this.rollMotion=!1,this.clipHeight="0px",this.sheetShift="translate3d(0, -100%, 0)"}restOpen(){this.rollMotion=!1,this.clipHeight="auto",this.sheetShift="none"}clipStyle(){const t=this.rollMotion&&!this.reduced();return{height:this.clipHeight,maxHeight:"auto"===this.clipHeight?"none":this.clipHeight,transition:t?"height var(--pwa_slide, 2s) ease-in-out, max-height var(--pwa_slide, 2s) ease-in-out":"none"}}sheetStyle(){const t=this.rollMotion&&!this.reduced();return{transform:this.sheetShift,transition:t?"transform var(--pwa_slide, 2s) ease-in-out":"none"}}unroll(){const t=this.clip(),e=this.sheet();if(!t||!e)return;this.scrollTop=0,this.placeAnchor();const n=this.sheetPx(t,e),s=Math.ceil(t.getBoundingClientRect().height);this.rollBetween(t,e,s,n,n)}rollUp(){const t=this.clip(),e=this.sheet();if(!t||!e)return;const n=Math.ceil(e.getBoundingClientRect().height),s=Math.ceil(t.getBoundingClientRect().height);this.rollBetween(t,e,s,0,n),this.reduced()&&(this.sliding=!1)}sheetPx(t,e){const n=t.style.transition,s=t.style.maxHeight,r=t.style.height;t.style.transition="none",t.style.maxHeight="none",t.style.height="auto";const i=Math.ceil(e.getBoundingClientRect().height);return t.style.height=r,t.style.maxHeight=s,t.style.transition=n,i}rollBetween(t,e,n,s,r){const i=n-r,o=s-r,a=t=>`translate3d(0, ${t}px, 0)`;if(this.reduced()||Math.abs(s-n)<=1)return void(0===s?this.restShut():this.restOpen());t.style.transition="none",e.style.transition="none",t.style.height=`${Math.max(0,n)}px`,t.style.maxHeight=`${Math.max(0,n)}px`,e.style.transform=a(i),t.offsetHeight,t.style.transition="height var(--pwa_slide, 2s) ease-in-out, max-height var(--pwa_slide, 2s) ease-in-out",e.style.transition="transform var(--pwa_slide, 2s) ease-in-out",t.style.height=`${Math.max(0,s)}px`,t.style.maxHeight=`${Math.max(0,s)}px`,e.style.transform=a(o),this.rollMotion=!0,this.clipHeight=`${Math.max(0,s)}px`,this.sheetShift=a(o)}firstUpdated(){this.shadowRoot.querySelector(".close").addEventListener("click",()=>{bn.dispatch(hn())}),this.shadowRoot.querySelector(".leave").addEventListener("click",async()=>{if(this.user)try{await x_()}catch{return}bn.dispatch(hn())});this.shadowRoot.querySelectorAll("a").forEach(t=>{t.addEventListener("click",()=>{bn.dispatch(hn())})}),this.watchColumn()}placeAnchor(){const t=getComputedStyle(this).position;if("fixed"===t||"absolute"===t)return void(this.style.top&&(this.style.top=""));const e=this.parentElement;if(!e)return;const n=this.previousElementSibling,s=n?n.getBoundingClientRect().bottom:e.getBoundingClientRect().top+(parseFloat(getComputedStyle(e).paddingTop)||0),r=parseFloat(this.style.top)||0,i=s-(this.getBoundingClientRect().top-r);Math.abs(i-r)<=.5||(this.style.top=Math.abs(i)<=.5?"":`${i}px`)}watchColumn(){if("undefined"==typeof ResizeObserver)return;this.columnObserver=new ResizeObserver(()=>{this.placeAnchor();const t=Math.round(this.getBoundingClientRect().width);t&&t!==this.columnWidth&&(this.columnWidth=t,this.onColumnResize())}),this.columnObserver.observe(this);const t=this.previousElementSibling;t&&this.columnObserver.observe(t),this.placeAnchor()}onColumnResize(){if(!this.rollMotion)return;const t=this.clip(),e=this.sheet();if(!t||!e)return;const n=Math.ceil(t.getBoundingClientRect().height),s=this.sheetPx(t,e);this.rollBetween(t,e,n,this.drawer?s:0,s)}static get styles(){return[cb,vn,In,lb,ub,hb,db,Sn,eD,K_,gb,i`
1139
1156
  /* Required - this drawer's roll only. The clip hangs from the tag and grows down. */
1140
1157
  .drawer-clip {
1141
1158
  display: block;
@@ -1155,7 +1172,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1155
1172
  align-self: start;
1156
1173
  }
1157
1174
 
1158
- .exit > h3 {
1175
+ .exit > h2 {
1159
1176
  display: flex;
1160
1177
  align-items: center;
1161
1178
  justify-content: center;
@@ -1165,8 +1182,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1165
1182
 
1166
1183
  .close:focus-visible,
1167
1184
  .leave:focus-visible,
1168
- .settings:focus-visible {
1169
- outline: 2px solid var(--pwa_action_border_color, #214f34);
1185
+ .settings:focus-visible,
1186
+ a:focus-visible,
1187
+ ::slotted(a:focus-visible),
1188
+ ::slotted(button:focus-visible) {
1189
+ outline: 2px solid var(--pwa_focus, #1c2430);
1170
1190
  outline-offset: 2px;
1171
1191
  }
1172
1192
 
@@ -1205,7 +1225,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1205
1225
  color: var(--pwa_nav_highlight_color, #1c2430);
1206
1226
  background: var(--pwa_nav_on_background, #f2f2f2);
1207
1227
  }
1208
- `]}render(){return U`
1228
+ `]}render(){return this.toggleAttribute("sliding",this.sliding),U`
1209
1229
 
1210
1230
  <!-- Clip. The first render binds shut, with no transition. -->
1211
1231
  <div
@@ -1219,20 +1239,20 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1219
1239
  role="dialog"
1220
1240
  aria-modal="true"
1221
1241
  aria-labelledby="pwa-drawer-title"
1222
- aria-hidden="${this.sliding?"false":"true"}"
1223
- ?inert="${!this.sliding}"
1242
+ aria-hidden="${this.drawer?"false":"true"}"
1243
+ ?inert="${!this.drawer}"
1224
1244
  class="userDrawer"
1225
1245
  style=${mt(this.sheetStyle())}>
1226
1246
 
1227
1247
  <!-- Exit Button -->
1228
- <header class="exit" part="header">
1248
+ <div class="exit" part="header">
1229
1249
  <div></div>
1230
- <h3 id="pwa-drawer-title" part="title">
1250
+ <h2 id="pwa-drawer-title" part="title">
1231
1251
  <span class="who">${!1===this.user?this.signup===this.subscribe?"Login":"Subscribe":rb(this.name,this.email)}</span>
1232
1252
  ${this.user?this.verified?Cb:U`<span class="unverified" part="unverified">Not verified</span>`:""}
1233
- </h3>
1253
+ </h2>
1234
1254
  <button class="close" part="close" type="button" aria-label="Close">${Bb}</button>
1235
- </header>
1255
+ </div>
1236
1256
 
1237
1257
  <!-- Logged-out State -->
1238
1258
  <div
@@ -1248,6 +1268,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1248
1268
  ?hide-google="${this.hideGoogle}"
1249
1269
  exportparts="email: login-email, password: login-password, submit: login-submit, switch: login-switch, forgot: login-forgot, status: login-status, reveal: login-reveal, google: login-google"
1250
1270
  ?inert="${this.signup!==this.subscribe}"
1271
+ aria-hidden="${this.signup!==this.subscribe?"true":"false"}"
1251
1272
  class=${ft({content:!0,opened:this.signup===this.subscribe,closed:this.signup!==this.subscribe})}>
1252
1273
  </form-login>
1253
1274
 
@@ -1257,6 +1278,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1257
1278
  ?hide-google="${this.hideGoogle}"
1258
1279
  exportparts="email: signup-email, password: signup-password, submit: signup-submit, switch: signup-switch, status: signup-status, reveal: signup-reveal, notice: signup-notice, google: signup-google"
1259
1280
  ?inert="${this.signup===this.subscribe}"
1281
+ aria-hidden="${this.signup===this.subscribe?"true":"false"}"
1260
1282
  class=${ft({content:!0,opened:!this.signup===this.subscribe,closed:!this.signup!==this.subscribe})}>
1261
1283
  </form-signup>
1262
1284
 
@@ -1339,6 +1361,13 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1339
1361
 
1340
1362
  }
1341
1363
 
1364
+ nav > ul > li > button:focus-visible {
1365
+
1366
+ outline: 2px solid var(--pwa_focus, #1c2430);
1367
+ outline-offset: 2px;
1368
+
1369
+ }
1370
+
1342
1371
  /* Required - fit 320px */
1343
1372
  @media (max-width: 320px) {
1344
1373
 
@@ -1452,7 +1481,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1452
1481
 
1453
1482
  <label
1454
1483
  style="
1455
- border: 1px dashed var(--pwa_line_color, #e3daca);
1484
+ border: 1px dashed var(--pwa_input_border_color, #8d8870);
1456
1485
  border-radius: 12px;
1457
1486
  overflow: hidden;
1458
1487
  margin: 0;
@@ -1494,6 +1523,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1494
1523
  part = "name"
1495
1524
  type = "text"
1496
1525
  autocomplete = "name"
1526
+ aria-invalid = "${"error"===this.tone?"true":"false"}"
1497
1527
  aria-describedby = "pwa-name-status"
1498
1528
  @input = "${this.handleInput}"
1499
1529
  .value = "${this.draft}" />
@@ -1522,22 +1552,21 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1522
1552
  aria-busy="${this.busy?"true":"false"}"
1523
1553
  @submit="${this.saveEmail}">
1524
1554
 
1525
- <label for="pwa-current-email-password">Current password
1555
+ <label for="pwa-current-email-password">Current password</label>
1526
1556
 
1527
- <span class="pair">
1557
+ <span class="pair">
1528
1558
 
1529
1559
  <input
1530
1560
  id = "pwa-current-email-password"
1531
1561
  name = "current_password"
1532
1562
  type = "${this.showPassword?"text":"password"}"
1533
1563
  autocomplete = "current-password"
1564
+ aria-invalid = "${"error"===this.tone?"true":"false"}"
1534
1565
  aria-describedby = "pwa-email-status"/>
1535
1566
 
1536
1567
  ${nD(this.showPassword,()=>{this.showPassword=!this.showPassword})}
1537
1568
 
1538
- </span>
1539
-
1540
- </label>
1569
+ </span>
1541
1570
 
1542
1571
  <label for="pwa-email" >E-mail
1543
1572
 
@@ -1551,6 +1580,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1551
1580
  autocapitalize= "off"
1552
1581
  spellcheck = "false"
1553
1582
  class = "email"
1583
+ aria-invalid = "${"error"===this.tone?"true":"false"}"
1554
1584
  aria-describedby = "pwa-email-status"
1555
1585
  @input = "${this.handleEmail}"
1556
1586
  .value = "${this.mail}"/>
@@ -1586,30 +1616,29 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1586
1616
 
1587
1617
  <div>
1588
1618
 
1589
- <label for="pwa-current-password">Current Password
1619
+ <label for="pwa-current-password">Current Password</label>
1590
1620
 
1591
- <span class="pair">
1621
+ <span class="pair">
1592
1622
 
1593
1623
  <input
1594
1624
  id = "pwa-current-password"
1595
1625
  name = "current_password"
1596
1626
  type = "${this.showCurrent?"text":"password"}"
1597
1627
  autocomplete = "current-password"
1628
+ aria-invalid = "${"error"===this.tone?"true":"false"}"
1598
1629
  aria-describedby = "pwa-password-status">
1599
1630
 
1600
1631
  ${nD(this.showCurrent,()=>{this.showCurrent=!this.showCurrent})}
1601
1632
 
1602
- </span>
1603
-
1604
- </label>
1633
+ </span>
1605
1634
 
1606
1635
  </div>
1607
1636
 
1608
1637
  <div>
1609
1638
 
1610
- <label for="pwa-new-password">New Password
1639
+ <label for="pwa-new-password">New Password</label>
1611
1640
 
1612
- <span class="pair">
1641
+ <span class="pair">
1613
1642
 
1614
1643
  <input
1615
1644
  id = "pwa-new-password"
@@ -1621,23 +1650,22 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1621
1650
  maxlength = "${UE}"
1622
1651
  .value = "${this.password}"
1623
1652
  @input = "${this.handleInputChange}"
1653
+ aria-invalid = "${"error"===this.tone?"true":"false"}"
1624
1654
  aria-describedby = "pwa-new-password-hint pwa-password-status">
1625
1655
 
1626
1656
  ${nD(this.showNext,()=>{this.showNext=!this.showNext})}
1627
1657
 
1628
1658
  </span>
1629
1659
 
1630
- <p id="pwa-new-password-hint" class="hint" part="hint">${VE}</p>
1631
-
1632
- </label>
1660
+ <p id="pwa-new-password-hint" class="hint" part="hint">${VE}</p>
1633
1661
 
1634
1662
  </div>
1635
1663
 
1636
1664
  <div>
1637
1665
 
1638
- <label for="pwa-verify-password">Verify Password
1666
+ <label for="pwa-verify-password">Verify Password</label>
1639
1667
 
1640
- <span class="pair">
1668
+ <span class="pair">
1641
1669
 
1642
1670
  <input
1643
1671
  id = "pwa-verify-password"
@@ -1647,13 +1675,12 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1647
1675
  autocomplete = "new-password"
1648
1676
  minlength = "${8}"
1649
1677
  maxlength = "${UE}"
1678
+ aria-invalid = "${"error"===this.tone?"true":"false"}"
1650
1679
  aria-describedby = "pwa-password-status">
1651
1680
 
1652
1681
  ${nD(this.showVerify,()=>{this.showVerify=!this.showVerify})}
1653
1682
 
1654
- </span>
1655
-
1656
- </label>
1683
+ </span>
1657
1684
 
1658
1685
  </div>
1659
1686
 
@@ -1693,22 +1720,21 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1693
1720
 
1694
1721
  <p class="lead">Permanently delete the user account and data related to: ${this.email}</p>
1695
1722
 
1696
- <label for="pwa-delete-password">Current password
1723
+ <label for="pwa-delete-password">Current password</label>
1697
1724
 
1698
- <span class="pair">
1725
+ <span class="pair">
1699
1726
 
1700
1727
  <input
1701
1728
  id="pwa-delete-password"
1702
1729
  name="current_password"
1703
1730
  type="${this.showPassword?"text":"password"}"
1704
1731
  autocomplete="current-password"
1732
+ aria-invalid="${"error"===this.tone?"true":"false"}"
1705
1733
  aria-describedby="pwa-delete-status"/>
1706
1734
 
1707
1735
  ${nD(this.showPassword,()=>{this.showPassword=!this.showPassword})}
1708
1736
 
1709
- </span>
1710
-
1711
- </label>
1737
+ </span>
1712
1738
 
1713
1739
  ${tD("pwa-delete-status",this.status,this.tone)}
1714
1740
 
@@ -1720,7 +1746,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1720
1746
  ?disabled="${!1===this.login||this.busy}"
1721
1747
  @click="${this.alertDelete}">${this.busy?"Deleting…":"Delete"}</button>
1722
1748
 
1723
- `}show(t){this.tone="error",this.status=KE(t),gE(PE,t)}}Mb([ut(),Gb("design:type",Boolean)],Hb.prototype,"login",void 0),Mb([ut(),Gb("design:type",String)],Hb.prototype,"email",void 0),Mb([ut(),Gb("design:type",Object)],Hb.prototype,"busy",void 0),Mb([ut(),Gb("design:type",Object)],Hb.prototype,"status",void 0),Mb([ut(),Gb("design:type",Object)],Hb.prototype,"tone",void 0),Mb([ut(),Gb("design:type",Object)],Hb.prototype,"showPassword",void 0),customElements.define("delete-user",Hb);var Ub=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Vb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let jb=class extends(wt(bn)(it)){constructor(){super(),this.empty="",this.profileTopic="",this.name="",this.email="",this.login=!1,this.clipHeight="auto",this.sheetShift="none",this.rollMotion=!1,this.booted=!1,this.heldHeight=null,this.columnWidth=0,this.columnObserver=null,this.onSubmit=t=>{t.preventDefault()},this.onClipEnd=t=>{t instanceof TransitionEvent&&t.target===t.currentTarget&&"max-height"===t.propertyName&&this.rest()}}connectedCallback(){nb(this),super.connectedCallback(),this.addEventListener("submit",this.onSubmit)}disconnectedCallback(){this.removeEventListener("submit",this.onSubmit),this.columnObserver?.disconnect(),this.columnObserver=null,super.disconnectedCallback()}onTabKey(t){if("ArrowRight"!==t.key&&"ArrowLeft"!==t.key)return;const e=["profile","verification","password","delete"],n=e.indexOf(this.profileTopic),s=e[(n+("ArrowRight"===t.key?1:-1)+e.length)%e.length];bn.dispatch(on(s)),this.updateComplete.then(()=>{this.shadowRoot?.querySelector(`button[value="${s}"]`)?.focus()})}stateChanged(t){this.profileTopic=t.frontend.settings,this.login=Boolean(t.frontend?.login),this.name=t.backend.name,this.email=t.backend.email}static get styles(){return[bb,Sn,eD,i`
1749
+ `}show(t){this.tone="error",this.status=KE(t),gE(PE,t)}}Mb([ut(),Gb("design:type",Boolean)],Hb.prototype,"login",void 0),Mb([ut(),Gb("design:type",String)],Hb.prototype,"email",void 0),Mb([ut(),Gb("design:type",Object)],Hb.prototype,"busy",void 0),Mb([ut(),Gb("design:type",Object)],Hb.prototype,"status",void 0),Mb([ut(),Gb("design:type",Object)],Hb.prototype,"tone",void 0),Mb([ut(),Gb("design:type",Object)],Hb.prototype,"showPassword",void 0),customElements.define("delete-user",Hb);var Ub=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Vb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let jb=class extends(wt(bn)(it)){constructor(){super(),this.empty="",this.profileTopic="",this.name="",this.email="",this.login=!1,this.clipHeight="auto",this.sheetShift="none",this.rollMotion=!1,this.booted=!1,this.heldHeight=null,this.columnWidth=0,this.columnObserver=null,this.onSubmit=t=>{t.preventDefault()},this.onClipEnd=t=>{t instanceof TransitionEvent&&t.target===t.currentTarget&&"max-height"===t.propertyName&&this.rest()}}connectedCallback(){nb(this),this.hasAttribute("role")||this.setAttribute("role","region"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Account settings"),super.connectedCallback(),this.addEventListener("submit",this.onSubmit)}disconnectedCallback(){this.removeEventListener("submit",this.onSubmit),this.columnObserver?.disconnect(),this.columnObserver=null,super.disconnectedCallback()}onTabKey(t){if("ArrowRight"!==t.key&&"ArrowLeft"!==t.key)return;t.preventDefault();const e=["profile","verification","password","delete"],n=e.indexOf(this.profileTopic),s=e[(n+("ArrowRight"===t.key?1:-1)+e.length)%e.length];bn.dispatch(on(s)),this.updateComplete.then(()=>{this.shadowRoot?.querySelector(`button[value="${s}"]`)?.focus()})}stateChanged(t){this.profileTopic=t.frontend.settings,this.login=Boolean(t.frontend?.login),this.name=t.backend.name,this.email=t.backend.email}static get styles(){return[bb,Sn,eD,i`
1724
1750
 
1725
1751
  :host {
1726
1752
  display: block;
@@ -1776,7 +1802,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1776
1802
  }
1777
1803
  }
1778
1804
 
1779
- `]}openTab(t){bn.dispatch(on(t))}willUpdate(t){if(!this.booted||!this.login||t.has("login"))return;if(!t.has("profileTopic"))return;const e=this.clip();e&&(this.heldHeight=Math.ceil(e.getBoundingClientRect().height),this.rollMotion=!1,this.clipHeight=`${this.heldHeight}px`,this.sheetShift="translate3d(0, 0, 0)")}updated(t){const e=!this.booted;if(this.booted=!0,e&&this.watchColumn(),e||!t.has("profileTopic")||!this.login||t.has("login"))return;const n=this.clip(),s=this.sheet();if(!n||!s||null==this.heldHeight)return;const r=this.heldHeight;this.heldHeight=null;const i=Math.ceil(s.getBoundingClientRect().height);Math.abs(i-r)>1?this.rollBetween(n,s,r,i,i):this.rest()}watchColumn(){"undefined"!=typeof ResizeObserver&&(this.columnObserver=new ResizeObserver(()=>{const t=Math.round(this.getBoundingClientRect().width);if(!t||t===this.columnWidth)return;if(this.columnWidth=t,!this.rollMotion)return;const e=this.clip(),n=this.sheet();if(!e||!n)return;const s=Math.ceil(e.getBoundingClientRect().height),r=Math.ceil(n.getBoundingClientRect().height);this.rollBetween(e,n,s,r,r)}),this.columnObserver.observe(this))}clip(){return this.shadowRoot?.querySelector(".settings-clip")??null}sheet(){return this.shadowRoot?.querySelector(".settings-sheet")??null}reduced(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}rest(){this.rollMotion=!1,this.clipHeight="auto",this.sheetShift="none"}clipStyle(){const t=this.rollMotion&&!this.reduced();return{height:this.clipHeight,maxHeight:"auto"===this.clipHeight?"none":this.clipHeight,transition:t?"height var(--pwa_slide, 2s) ease-in-out, max-height var(--pwa_slide, 2s) ease-in-out":"none"}}sheetStyle(){const t=this.rollMotion&&!this.reduced();return{transform:this.sheetShift,transition:t?"transform var(--pwa_slide, 2s) ease-in-out":"none"}}rollBetween(t,e,n,s,r){const i=n-r,o=s-r,a=t=>`translate3d(0, ${t}px, 0)`;if(this.reduced()||Math.abs(s-n)<=1)return void this.rest();t.style.transition="none",e.style.transition="none",t.style.height=`${Math.max(0,n)}px`,t.style.maxHeight=`${Math.max(0,n)}px`,e.style.transform=a(i),t.offsetHeight,t.style.transition="height var(--pwa_slide, 2s) ease-in-out, max-height var(--pwa_slide, 2s) ease-in-out",e.style.transition="transform var(--pwa_slide, 2s) ease-in-out",t.style.height=`${Math.max(0,s)}px`,t.style.maxHeight=`${Math.max(0,s)}px`,e.style.transform=a(o),this.rollMotion=!0,this.clipHeight=`${Math.max(0,s)}px`,this.sheetShift=a(o)}render(){if(!this.login)return U`
1805
+ `]}openTab(t){bn.dispatch(on(t))}tabOn(t){return(this.profileTopic||"profile")===t}willUpdate(t){if(!this.booted||!this.login||t.has("login"))return;if(!t.has("profileTopic"))return;const e=this.clip();e&&(this.heldHeight=Math.ceil(e.getBoundingClientRect().height),this.rollMotion=!1,this.clipHeight=`${this.heldHeight}px`,this.sheetShift="translate3d(0, 0, 0)")}updated(t){const e=!this.booted;if(this.booted=!0,e&&this.watchColumn(),e||!t.has("profileTopic")||!this.login||t.has("login"))return;const n=this.clip(),s=this.sheet();if(!n||!s||null==this.heldHeight)return;const r=this.heldHeight;this.heldHeight=null;const i=Math.ceil(s.getBoundingClientRect().height);Math.abs(i-r)>1?this.rollBetween(n,s,r,i,i):this.rest()}watchColumn(){"undefined"!=typeof ResizeObserver&&(this.columnObserver=new ResizeObserver(()=>{const t=Math.round(this.getBoundingClientRect().width);if(!t||t===this.columnWidth)return;if(this.columnWidth=t,!this.rollMotion)return;const e=this.clip(),n=this.sheet();if(!e||!n)return;const s=Math.ceil(e.getBoundingClientRect().height),r=Math.ceil(n.getBoundingClientRect().height);this.rollBetween(e,n,s,r,r)}),this.columnObserver.observe(this))}clip(){return this.shadowRoot?.querySelector(".settings-clip")??null}sheet(){return this.shadowRoot?.querySelector(".settings-sheet")??null}reduced(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}rest(){this.rollMotion=!1,this.clipHeight="auto",this.sheetShift="none"}clipStyle(){const t=this.rollMotion&&!this.reduced();return{height:this.clipHeight,maxHeight:"auto"===this.clipHeight?"none":this.clipHeight,transition:t?"height var(--pwa_slide, 2s) ease-in-out, max-height var(--pwa_slide, 2s) ease-in-out":"none"}}sheetStyle(){const t=this.rollMotion&&!this.reduced();return{transform:this.sheetShift,transition:t?"transform var(--pwa_slide, 2s) ease-in-out":"none"}}rollBetween(t,e,n,s,r){const i=n-r,o=s-r,a=t=>`translate3d(0, ${t}px, 0)`;if(this.reduced()||Math.abs(s-n)<=1)return void this.rest();t.style.transition="none",e.style.transition="none",t.style.height=`${Math.max(0,n)}px`,t.style.maxHeight=`${Math.max(0,n)}px`,e.style.transform=a(i),t.offsetHeight,t.style.transition="height var(--pwa_slide, 2s) ease-in-out, max-height var(--pwa_slide, 2s) ease-in-out",e.style.transition="transform var(--pwa_slide, 2s) ease-in-out",t.style.height=`${Math.max(0,s)}px`,t.style.maxHeight=`${Math.max(0,s)}px`,e.style.transform=a(o),this.rollMotion=!0,this.clipHeight=`${Math.max(0,s)}px`,this.sheetShift=a(o)}render(){if(!this.login)return U`
1780
1806
  <p class="signed-out" part="signed-out" role="status">Sign in to change the photo, name, email, or password.</p>
1781
1807
  `;const t=rb(this.name,this.email);return U`
1782
1808
 
@@ -1789,10 +1815,13 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1789
1815
  <button
1790
1816
  type="button"
1791
1817
  role="tab"
1818
+ id="pwa-tab-profile"
1792
1819
  part="tab"
1793
1820
  value="profile"
1794
- aria-selected="${"profile"===this.profileTopic}"
1795
- ?on="${"profile"===this.profileTopic}"
1821
+ aria-selected="${this.tabOn("profile")}"
1822
+ aria-controls="pwa-panel-profile"
1823
+ tabindex="${this.tabOn("profile")?"0":"-1"}"
1824
+ ?on="${this.tabOn("profile")}"
1796
1825
  @click="${()=>this.openTab("profile")}">Icon
1797
1826
  </button>
1798
1827
  </li>
@@ -1801,10 +1830,13 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1801
1830
  <button
1802
1831
  type="button"
1803
1832
  role="tab"
1833
+ id="pwa-tab-verification"
1804
1834
  part="tab"
1805
1835
  value="verification"
1806
- aria-selected="${"verification"===this.profileTopic}"
1807
- ?on="${"verification"===this.profileTopic}"
1836
+ aria-selected="${this.tabOn("verification")}"
1837
+ aria-controls="pwa-panel-verification"
1838
+ tabindex="${this.tabOn("verification")?"0":"-1"}"
1839
+ ?on="${this.tabOn("verification")}"
1808
1840
  @click="${()=>this.openTab("verification")}">Profile
1809
1841
  </button>
1810
1842
  </li>
@@ -1813,10 +1845,13 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1813
1845
  <button
1814
1846
  type="button"
1815
1847
  role="tab"
1848
+ id="pwa-tab-password"
1816
1849
  part="tab"
1817
1850
  value="password"
1818
- aria-selected="${"password"===this.profileTopic}"
1819
- ?on="${"password"===this.profileTopic}"
1851
+ aria-selected="${this.tabOn("password")}"
1852
+ aria-controls="pwa-panel-password"
1853
+ tabindex="${this.tabOn("password")?"0":"-1"}"
1854
+ ?on="${this.tabOn("password")}"
1820
1855
  @click="${()=>this.openTab("password")}">Password
1821
1856
  </button>
1822
1857
  </li>
@@ -1825,10 +1860,13 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1825
1860
  <button
1826
1861
  type="button"
1827
1862
  role="tab"
1863
+ id="pwa-tab-delete"
1828
1864
  part="tab"
1829
1865
  value="delete"
1830
- aria-selected="${"delete"===this.profileTopic}"
1831
- ?on="${"delete"===this.profileTopic}"
1866
+ aria-selected="${this.tabOn("delete")}"
1867
+ aria-controls="pwa-panel-delete"
1868
+ tabindex="${this.tabOn("delete")?"0":"-1"}"
1869
+ ?on="${this.tabOn("delete")}"
1832
1870
  @click="${()=>this.openTab("delete")}">Delete
1833
1871
  </button>
1834
1872
  </li>
@@ -1847,11 +1885,13 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1847
1885
 
1848
1886
  <!-- Page 1: Profile -->
1849
1887
  <section
1888
+ id="pwa-panel-profile"
1850
1889
  part="panel"
1851
1890
  role="tabpanel"
1852
- aria-hidden="${"profile"===this.profileTopic?"false":"true"}"
1853
- ?inert="${"profile"!==this.profileTopic}"
1854
- ?hidden="${"profile"!==this.profileTopic}">
1891
+ aria-labelledby="pwa-tab-profile"
1892
+ aria-hidden="${this.tabOn("profile")?"false":"true"}"
1893
+ ?inert="${!this.tabOn("profile")}"
1894
+ ?hidden="${!this.tabOn("profile")}">
1855
1895
 
1856
1896
  <!-- Display Username -->
1857
1897
  <h2>${t}</h2>
@@ -1863,11 +1903,13 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1863
1903
 
1864
1904
  <!-- Page 2: Verification -->
1865
1905
  <section
1906
+ id="pwa-panel-verification"
1866
1907
  part="panel"
1867
1908
  role="tabpanel"
1868
- aria-hidden="${"verification"===this.profileTopic?"false":"true"}"
1869
- ?inert="${"verification"!==this.profileTopic}"
1870
- ?hidden="${"verification"!==this.profileTopic}">
1909
+ aria-labelledby="pwa-tab-verification"
1910
+ aria-hidden="${this.tabOn("verification")?"false":"true"}"
1911
+ ?inert="${!this.tabOn("verification")}"
1912
+ ?hidden="${!this.tabOn("verification")}">
1871
1913
 
1872
1914
  <!-- Page Title -->
1873
1915
  <h2>Contact Information</h2>
@@ -1885,11 +1927,13 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1885
1927
 
1886
1928
  <!-- Page 3: Password -->
1887
1929
  <section
1930
+ id="pwa-panel-password"
1888
1931
  part="panel"
1889
1932
  role="tabpanel"
1890
- aria-hidden="${"password"===this.profileTopic?"false":"true"}"
1891
- ?inert="${"password"!==this.profileTopic}"
1892
- ?hidden="${"password"!==this.profileTopic}">
1933
+ aria-labelledby="pwa-tab-password"
1934
+ aria-hidden="${this.tabOn("password")?"false":"true"}"
1935
+ ?inert="${!this.tabOn("password")}"
1936
+ ?hidden="${!this.tabOn("password")}">
1893
1937
 
1894
1938
  <!-- Page Title -->
1895
1939
  <h2>Password</h2>
@@ -1901,11 +1945,13 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1901
1945
 
1902
1946
  <!-- Page 4: Delete -->
1903
1947
  <section
1948
+ id="pwa-panel-delete"
1904
1949
  part="panel"
1905
1950
  role="tabpanel"
1906
- aria-hidden="${"delete"===this.profileTopic?"false":"true"}"
1907
- ?inert="${"delete"!==this.profileTopic}"
1908
- ?hidden="${"delete"!==this.profileTopic}">
1951
+ aria-labelledby="pwa-tab-delete"
1952
+ aria-hidden="${this.tabOn("delete")?"false":"true"}"
1953
+ ?inert="${!this.tabOn("delete")}"
1954
+ ?hidden="${!this.tabOn("delete")}">
1909
1955
 
1910
1956
  <!-- Page Title -->
1911
1957
  <h2>Delete Account</h2>
@@ -1948,7 +1994,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1948
1994
 
1949
1995
  .icon:focus-visible,
1950
1996
  .login:focus-visible {
1951
- outline: 2px solid var(--pwa_action_border_color, #214f34);
1997
+ outline: 2px solid var(--pwa_focus, #1c2430);
1952
1998
  outline-offset: 2px;
1953
1999
  }
1954
2000
 
@@ -1990,20 +2036,23 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1990
2036
  letter-spacing: 0.04em;
1991
2037
  }
1992
2038
 
1993
- `;var Jb=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},qb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let zb=class extends(wt(bn)(it)){constructor(){super(),this.subscribe=!1,this.empty="",this._user=!1,this._photoURL="",this._name="",this._email=""}connectedCallback(){nb(this),super.connectedCallback()}firstUpdated(){this.shadowRoot.querySelector(".toggles").addEventListener("click",()=>{bn.dispatch(ln())})}stateChanged(t){this._user=t.frontend.login,this._photoURL=t.backend.photoURL,this._name=t.backend.name,this._email=t.backend.email}static get styles(){return[$b,i`:host { border-radius: 10px; }`]}render(){return U`
2039
+ `;var Jb=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},qb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let zb=class extends(wt(bn)(it)){constructor(){super(),this.subscribe=!1,this.empty="",this._user=!1,this._open=!1,this._photoURL="",this._name="",this._email=""}connectedCallback(){nb(this),super.connectedCallback()}firstUpdated(){this.shadowRoot.querySelector(".toggles").addEventListener("click",()=>{bn.dispatch(ln())})}stateChanged(t){this._user=t.frontend.login,this._open=t.frontend.drawer,this._photoURL=t.backend.photoURL,this._name=t.backend.name,this._email=t.backend.email}updated(){const t=this.shadowRoot?.querySelector("button"),e=document.querySelector("user-drawer");if(!(t&&e instanceof HTMLElement&&e.id))return;t.setAttribute("aria-controls",e.id);"ariaControlsElements"in t&&(t.ariaControlsElements=[e])}static get styles(){return[$b,i`:host { border-radius: 10px; }`]}render(){return U`
1994
2040
 
1995
2041
  <!-- two classes: icon / login -->
1996
2042
  <button
1997
2043
  type="button"
1998
2044
  part="button"
1999
2045
  class="${this._user?"icon":"login"} toggles"
2046
+ aria-haspopup="dialog"
2047
+ aria-expanded="${this._open?"true":"false"}"
2048
+ aria-controls="pwa-user-drawer"
2000
2049
  aria-label="${this._user?"Account":this.subscribe?"Subscribe":"Login"}">
2001
2050
 
2002
2051
  ${this._user?this.face():this.subscribe?"Subscribe":"Login"}
2003
2052
 
2004
2053
  </button>
2005
2054
 
2006
- `}face(){if(this._photoURL)return U`<img class="userImage" part="photo" alt="" src="${this._photoURL}">`;const t=sb(this._name,this._email);return t?U`<span class="initials" part="initials" aria-hidden="true">${t}</span>`:this.empty?U`<img class="userImage" part="photo" alt="" src="${this.empty}">`:U`<span class="initials" part="initials" aria-hidden="true">?</span>`}};Jb([lt({type:Boolean,reflect:!0}),qb("design:type",Object)],zb.prototype,"subscribe",void 0),Jb([lt({type:String,reflect:!0}),qb("design:type",Object)],zb.prototype,"empty",void 0),Jb([ut(),qb("design:type",Object)],zb.prototype,"_user",void 0),Jb([ut(),qb("design:type",Object)],zb.prototype,"_photoURL",void 0),Jb([ut(),qb("design:type",Object)],zb.prototype,"_name",void 0),Jb([ut(),qb("design:type",Object)],zb.prototype,"_email",void 0),zb=Jb([at("user-icon"),qb("design:paramtypes",[])],zb);var Kb=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Qb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};class Wb extends it{constructor(){super(),this.active=!1}shouldUpdate(){return this.active}}function Yb(){bn.dispatch(un())}function Xb(){bn.dispatch(hn())}function Zb(){bn.dispatch(ln())}Kb([lt({type:Boolean}),Qb("design:type",Boolean)],Wb.prototype,"active",void 0);var tv=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},ev=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let nv=class extends Wb{constructor(){super(),this.userEmail="",this.status="",this.tone="",this.invalid=!1,this.busy=!1,this.cooldown=0,this.touched=!1,this.timer=0,this.stopDraft=null,this.resetPassword=async t=>{if(t.preventDefault(),this.busy||this.cooldown>0)return;const e=this.renderRoot.querySelector(".email");this.userEmail=(e?e.value:this.userEmail).trim(),e&&e.value!==this.userEmail&&(e.value=this.userEmail);const n=(s=this.userEmail).length<4?{code:"pwa/missing-email",message:"Enter an email address."}:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s)?null:{code:"pwa/invalid-email",message:"Enter a valid email address."};var s;if(n)this.showError(n,"email");else{this.busy=!0,this.tone="",this.status="";try{await Po(sE,this.userEmail),this.showSent()}catch(t){!function(t){return"auth/user-not-found"===mE(t).code}(t)?this.showFirebase(t):this.showSent()}finally{this.busy=!1}}},this.backToSignIn=()=>{const t=document.querySelector("user-drawer");if(t){const e=t.hasAttribute("subscribe");return Boolean(bn.getState().frontend?.registerOne)!==e&&bn.dispatch(rn("drawer")),void Yb()}const e=document.querySelector("user-login");if(!e)return;const n=e.hasAttribute("subscribe");Boolean(bn.getState().frontend?.registerTwo)!==n&&bn.dispatch(rn("page")),e.scrollIntoView({block:"nearest"})}}static{this.styles=[WE,YE,QE,XE,i`
2055
+ `}face(){if(this._photoURL)return U`<img class="userImage" part="photo" alt="" src="${this._photoURL}">`;const t=sb(this._name,this._email);return t?U`<span class="initials" part="initials" aria-hidden="true">${t}</span>`:this.empty?U`<img class="userImage" part="photo" alt="" src="${this.empty}">`:U`<span class="initials" part="initials" aria-hidden="true">?</span>`}};Jb([lt({type:Boolean,reflect:!0}),qb("design:type",Object)],zb.prototype,"subscribe",void 0),Jb([lt({type:String,reflect:!0}),qb("design:type",Object)],zb.prototype,"empty",void 0),Jb([ut(),qb("design:type",Object)],zb.prototype,"_user",void 0),Jb([ut(),qb("design:type",Object)],zb.prototype,"_open",void 0),Jb([ut(),qb("design:type",Object)],zb.prototype,"_photoURL",void 0),Jb([ut(),qb("design:type",Object)],zb.prototype,"_name",void 0),Jb([ut(),qb("design:type",Object)],zb.prototype,"_email",void 0),zb=Jb([at("user-icon"),qb("design:paramtypes",[])],zb);var Kb=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Qb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};class Wb extends it{constructor(){super(),this.active=!1}shouldUpdate(){return this.active}}function Yb(){bn.dispatch(un())}function Xb(){bn.dispatch(hn())}function Zb(){bn.dispatch(ln())}Kb([lt({type:Boolean}),Qb("design:type",Boolean)],Wb.prototype,"active",void 0);var tv=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},ev=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let nv=class extends Wb{constructor(){super(),this.userEmail="",this.status="",this.tone="",this.invalid=!1,this.busy=!1,this.cooldown=0,this.touched=!1,this.timer=0,this.stopDraft=null,this.resetPassword=async t=>{if(t.preventDefault(),this.busy||this.cooldown>0)return;const e=this.renderRoot.querySelector(".email");this.userEmail=(e?e.value:this.userEmail).trim(),e&&e.value!==this.userEmail&&(e.value=this.userEmail);const n=(s=this.userEmail).length<4?{code:"pwa/missing-email",message:"Enter an email address."}:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s)?null:{code:"pwa/invalid-email",message:"Enter a valid email address."};var s;if(n)this.showError(n,"email");else{this.busy=!0,this.tone="",this.status="";try{await Po(sE,this.userEmail),this.showSent()}catch(t){!function(t){return"auth/user-not-found"===mE(t).code}(t)?this.showFirebase(t):this.showSent()}finally{this.busy=!1}}},this.backToSignIn=()=>{const t=document.querySelector("user-drawer");if(t){const e=t.hasAttribute("subscribe");return Boolean(bn.getState().frontend?.registerOne)!==e&&bn.dispatch(rn("drawer")),void Yb()}const e=document.querySelector("user-login");if(!e)return;const n=e.hasAttribute("subscribe");Boolean(bn.getState().frontend?.registerTwo)!==n&&bn.dispatch(rn("page")),e.scrollIntoView({block:"nearest"})}}static{this.styles=[WE,YE,QE,XE,i`
2007
2056
  :host {
2008
2057
  display: block;
2009
2058
  background-color: var(--pwa_background, #fff);
@@ -2034,7 +2083,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
2034
2083
  .status:focus { outline: 0; }
2035
2084
 
2036
2085
  .status:focus-visible {
2037
- outline: 2px solid var(--pwa_action_border_color, #214f34);
2086
+ outline: 2px solid var(--pwa_focus, #1c2430);
2038
2087
  outline-offset: 2px;
2039
2088
  }
2040
2089
 
@@ -2046,7 +2095,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
2046
2095
  button.new {
2047
2096
  display: block;
2048
2097
  }
2049
- `]}connectedCallback(){var t;super.connectedCallback(),this.stopDraft=(t=()=>{this.prefill()},oD.add(t),()=>{oD.delete(t)}),this.prefill()}disconnectedCallback(){window.clearInterval(this.timer),this.timer=0,this.stopDraft?.(),this.stopDraft=null,super.disconnectedCallback()}updated(){this.paintEmail()}prefill(){if(this.touched)return;const t=BD();t&&t!==this.userEmail&&(this.userEmail=t,this.paintEmail())}paintEmail(){if(this.touched)return;const t=this.renderRoot.querySelector(".email");t&&!t.value&&this.userEmail&&(t.value=this.userEmail)}handleEmail(t){const e=t.target;this.touched=!0,this.userEmail=e.value,this.invalid&&(this.invalid=!1)}buttonLabel(){return this.busy?"Sending…":this.cooldown>0?`Send again in ${this.cooldown}s`:"Send reset email"}render(){const t="pwa-reset-status";return U`
2098
+ `]}connectedCallback(){var t;this.hasAttribute("role")||this.setAttribute("role","region"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Reset password"),super.connectedCallback(),this.stopDraft=(t=()=>{this.prefill()},oD.add(t),()=>{oD.delete(t)}),this.prefill()}disconnectedCallback(){window.clearInterval(this.timer),this.timer=0,this.stopDraft?.(),this.stopDraft=null,super.disconnectedCallback()}updated(){this.paintEmail()}prefill(){if(this.touched)return;const t=BD();t&&t!==this.userEmail&&(this.userEmail=t,this.paintEmail())}paintEmail(){if(this.touched)return;const t=this.renderRoot.querySelector(".email");t&&!t.value&&this.userEmail&&(t.value=this.userEmail)}handleEmail(t){const e=t.target;this.touched=!0,this.userEmail=e.value,this.invalid&&(this.invalid=!1)}buttonLabel(){return this.busy?"Sending…":this.cooldown>0?`Send again in ${this.cooldown}s`:"Send reset email"}render(){const t="pwa-reset-status";return U`
2050
2099
 
2051
2100
  <form
2052
2101
  class="resetPass"