@commmerce/ui 1.8.1 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cdn.js CHANGED
@@ -1095,7 +1095,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1095
1095
  @media (max-width: 640px) {
1096
1096
  .label { font-size: var(--cm-type-heading-sm-resp-size); }
1097
1097
  }
1098
- `];$("cm-file-upload",yi);var e$=z("colorField",{swatch:"{name}, {hex}",hex:"Hex code",hexNamed:"{label}, hex code",placeholder:"#RRGGBB",picker:"Choose a custom colour",pickerNamed:"Choose a custom colour for {label}",required:"Please choose a colour.",invalid:"Enter a colour as #RRGGBB, for example #2e6faf.",black:"Black",grey:"Grey",lightGrey:"Light grey",red:"Red",darkOrange:"Dark orange",orange:"Orange",yellow:"Yellow",lightGreen:"Light green",green:"Green",lightBlue:"Light blue",blue:"Blue",indigo:"Indigo"}),cy=[{value:"#000000",key:"black"},{value:"#707070",key:"grey"},{value:"#c9c9c9",key:"lightGrey"},{value:"#de0000",key:"red"},{value:"#ad5500",key:"darkOrange"},{value:"#f1a953",key:"orange"},{value:"#ffc107",key:"yellow"},{value:"#81bb47",key:"lightGreen"},{value:"#3c7c00",key:"green"},{value:"#5394d9",key:"lightBlue"},{value:"#2e6faf",key:"blue"},{value:"#446beb",key:"indigo"}];function jt(o){let n=/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(o.trim());return n?`#${(n[1].length===3?[...n[1]].map(t=>t+t).join(""):n[1]).toLowerCase()}`:null}var dy=o=>{let n=parseInt(o.slice(1),16);return[n>>16&255,n>>8&255,n&255].map(e=>e/255).map(e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4).reduce((e,t,i)=>e+t*[.2126,.7152,.0722][i],0)};function hy(o){let n=dy(o);return(n+.05)/.05>=1.05/(n+.05)?"#000000":"#ffffff"}var Fe,yt,To,Da,Y,nr,Jm,Gg,Yg,Zm,Xg,Jg,Zg,Qg,xi=class extends T{constructor(){super(...arguments);p(this,Y);this.label="";this.hint="";this.helpText="";this.error="";this.name="";this.value="";this.picker=!1;this.required=!1;this.disabled=!1;this._invalid=!1;p(this,Fe,this.attachInternals());p(this,yt,A("cm-cf"));p(this,To,"");p(this,Da)}connectedCallback(){super.connectedCallback(),g(this,To,jt(this.value)??this.value)}get form(){return r(this,Fe).form}get validity(){return r(this,Fe).validity}get validationMessage(){return r(this,Fe).validationMessage}checkValidity(){return r(this,Fe).checkValidity()}reportValidity(){return r(this,Fe).reportValidity()}formResetCallback(){this.value=r(this,To),this._draft=void 0,this._invalid=!1}formDisabledCallback(e){this.disabled=e}formStateRestoreCallback(e){this.value=e}get items(){return this.swatches?this.swatches.flatMap(e=>{let t=typeof e=="string"?{value:e}:e,i=jt(t?.value??"");return i?[{value:i,name:t.name}]:[]}):cy.map(e=>({value:e.value,name:this.t(e.key)}))}willUpdate(e){if(e.has("value")){let t=jt(this.value??"");t&&t!==this.value&&(this.value=t),this.hasUpdated&&this.value!==r(this,Da)&&(this._draft=void 0,this._invalid=!1),g(this,Da,void 0)}}updated(){let e=!this.value||jt(this.value)!==null;r(this,Fe).setFormValue(this.value&&e?this.value:null,this.value);let t=this.renderRoot.querySelector(".input")??void 0;this.error?r(this,Fe).setValidity({customError:!0},this.error,t):this._invalid||!e?r(this,Fe).setValidity({patternMismatch:!0},this.t("invalid"),t):this.required&&!this.value?r(this,Fe).setValidity({valueMissing:!0},this.t("required"),t):r(this,Fe).setValidity({})}render(){let e=this.items,t=jt(this.value??""),i=e.findIndex(u=>u.value===t),a=this.error||(this._invalid||this.value&&!t?this.t("invalid"):""),l=[a&&`${r(this,yt)}-err`,this.helpText&&`${r(this,yt)}-help`].filter(Boolean).join(" ")||h,d=this.getAttribute("aria-label"),m=this.label||d||"";return c`<div class="field">
1098
+ `];$("cm-file-upload",yi);var e1=z("colorField",{swatch:"{name}, {hex}",hex:"Hex code",hexNamed:"{label}, hex code",placeholder:"#RRGGBB",picker:"Choose a custom colour",pickerNamed:"Choose a custom colour for {label}",required:"Please choose a colour.",invalid:"Enter a colour as #RRGGBB, for example #2e6faf.",black:"Black",grey:"Grey",lightGrey:"Light grey",red:"Red",darkOrange:"Dark orange",orange:"Orange",yellow:"Yellow",lightGreen:"Light green",green:"Green",lightBlue:"Light blue",blue:"Blue",indigo:"Indigo"}),cy=[{value:"#000000",key:"black"},{value:"#707070",key:"grey"},{value:"#c9c9c9",key:"lightGrey"},{value:"#de0000",key:"red"},{value:"#ad5500",key:"darkOrange"},{value:"#f1a953",key:"orange"},{value:"#ffc107",key:"yellow"},{value:"#81bb47",key:"lightGreen"},{value:"#3c7c00",key:"green"},{value:"#5394d9",key:"lightBlue"},{value:"#2e6faf",key:"blue"},{value:"#446beb",key:"indigo"}];function jt(o){let n=/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(o.trim());return n?`#${(n[1].length===3?[...n[1]].map(t=>t+t).join(""):n[1]).toLowerCase()}`:null}var dy=o=>{let n=parseInt(o.slice(1),16);return[n>>16&255,n>>8&255,n&255].map(e=>e/255).map(e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4).reduce((e,t,i)=>e+t*[.2126,.7152,.0722][i],0)};function hy(o){let n=dy(o);return(n+.05)/.05>=1.05/(n+.05)?"#000000":"#ffffff"}var Fe,yt,To,Da,Y,nr,Jm,Gg,Yg,Zm,Xg,Jg,Zg,Qg,xi=class extends T{constructor(){super(...arguments);p(this,Y);this.label="";this.hint="";this.helpText="";this.error="";this.name="";this.value="";this.picker=!1;this.required=!1;this.disabled=!1;this._invalid=!1;p(this,Fe,this.attachInternals());p(this,yt,A("cm-cf"));p(this,To,"");p(this,Da)}connectedCallback(){super.connectedCallback(),g(this,To,jt(this.value)??this.value)}get form(){return r(this,Fe).form}get validity(){return r(this,Fe).validity}get validationMessage(){return r(this,Fe).validationMessage}checkValidity(){return r(this,Fe).checkValidity()}reportValidity(){return r(this,Fe).reportValidity()}formResetCallback(){this.value=r(this,To),this._draft=void 0,this._invalid=!1}formDisabledCallback(e){this.disabled=e}formStateRestoreCallback(e){this.value=e}get items(){return this.swatches?this.swatches.flatMap(e=>{let t=typeof e=="string"?{value:e}:e,i=jt(t?.value??"");return i?[{value:i,name:t.name}]:[]}):cy.map(e=>({value:e.value,name:this.t(e.key)}))}willUpdate(e){if(e.has("value")){let t=jt(this.value??"");t&&t!==this.value&&(this.value=t),this.hasUpdated&&this.value!==r(this,Da)&&(this._draft=void 0,this._invalid=!1),g(this,Da,void 0)}}updated(){let e=!this.value||jt(this.value)!==null;r(this,Fe).setFormValue(this.value&&e?this.value:null,this.value);let t=this.renderRoot.querySelector(".input")??void 0;this.error?r(this,Fe).setValidity({customError:!0},this.error,t):this._invalid||!e?r(this,Fe).setValidity({patternMismatch:!0},this.t("invalid"),t):this.required&&!this.value?r(this,Fe).setValidity({valueMissing:!0},this.t("required"),t):r(this,Fe).setValidity({})}render(){let e=this.items,t=jt(this.value??""),i=e.findIndex(u=>u.value===t),a=this.error||(this._invalid||this.value&&!t?this.t("invalid"):""),l=[a&&`${r(this,yt)}-err`,this.helpText&&`${r(this,yt)}-help`].filter(Boolean).join(" ")||h,d=this.getAttribute("aria-label"),m=this.label||d||"";return c`<div class="field">
1099
1099
  ${this.label?c`<span class="label" id="${r(this,yt)}-l" part="label">${this.label}${this.required?c`<span class="req" aria-hidden="true">*</span>`:h}${this.hint?c`<span class="hint">[${this.hint}]</span>`:h}</span>`:h}
1100
1100
  ${e.length?c`<div class="swatches" part="swatches" role="radiogroup"
1101
1101
  aria-labelledby=${this.label?`${r(this,yt)}-l`:h} aria-label=${!this.label&&d?d:h}
@@ -1160,7 +1160,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1160
1160
  .input:disabled { background: var(--cm-bg-input-filled); color: var(--cm-text-secondary); border-color: var(--cm-border-subtle); cursor: not-allowed; }
1161
1161
  :host([disabled]) .pick { cursor: not-allowed; opacity: 0.4; }
1162
1162
  :host([disabled]) .preview { opacity: 0.4; }
1163
- `];$("cm-color-field",xi);var o$=z("signatureField",{modes:"How to sign",draw:"Draw",type:"Type",pad:"Signature drawing area",padSigned:"Signature drawing area, signed",instructions:"Draw your signature with a mouse, finger or pen. To sign with the keyboard, choose Type.",signHere:"Sign here",typeLabel:"Type your full name",typePlaceholder:"Type your full name",undo:"Undo",undoLabel:"Undo last stroke",clear:"Clear",clearLabel:"Clear signature",cleared:"Signature cleared",undone:"Last stroke removed",required:"Please sign here."}),Qm=3,Fd=.7,my=.0055,jd="#000000",eb=8,zo=2,py=400,uy=(o,n)=>({x:(o.x+n.x)/2,y:(o.y+n.y)/2,p:(o.p+n.p)/2}),it,_o,Aa,Co,rt,at,st,$i,ki,ze,So,Ei,Ra,C,ep,Ud,tp,Ut,Vd,ip,rp,tb,ap,Kd,sp,Wd,ib,np,rb,or,Gd,op,lp,ab,cp,sb,dp,nb,ob,wi=class extends T{constructor(){super(...arguments);p(this,C);this.label="";this.hint="";this.helpText="";this.error="";this.name="";this.value="";this.mode="draw";this.typedName="";this.required=!1;this.disabled=!1;this._announce="";p(this,it,this.attachInternals());p(this,_o,A("cm-sig"));p(this,Aa,"");p(this,Co,"");p(this,rt,[]);p(this,at);p(this,st);p(this,$i,"");p(this,ki,0);p(this,ze);p(this,So,"");p(this,Ei);p(this,Ra,0)}connectedCallback(){super.connectedCallback(),this.hasUpdated?s(this,C,ep).call(this):(g(this,Aa,this.value),g(this,Co,this.typedName))}disconnectedCallback(){super.disconnectedCallback(),r(this,Ei)?.disconnect(),g(this,Ei,void 0),cancelAnimationFrame(r(this,ki)),g(this,ki,0),r(this,ze)&&(clearTimeout(r(this,ze)),g(this,ze,void 0))}get form(){return r(this,it).form}get validity(){return r(this,it).validity}get validationMessage(){return r(this,it).validationMessage}checkValidity(){return r(this,it).checkValidity()}reportValidity(){return r(this,it).reportValidity()}formResetCallback(){g(this,rt,[]),g(this,at,void 0),g(this,st,void 0),r(this,ze)&&(clearTimeout(r(this,ze)),g(this,ze,void 0)),this.typedName=r(this,Co),r(this,Aa)?(g(this,$i,""),this.value=r(this,Aa)):this.updateComplete.then(()=>s(this,C,or).call(this,!1)),s(this,C,Ut).call(this)}formDisabledCallback(e){this.disabled=e}formStateRestoreCallback(e){this.value=e}get empty(){return this.mode==="type"?!this.typedName.trim():!r(this,rt).length&&!r(this,st)}toDataURL(){return s(this,C,op).call(this)?.toDataURL("image/png")??""}toBlob(){let e=s(this,C,op).call(this);return e?new Promise(t=>e.toBlob(t,"image/png")):Promise.resolve(null)}clear(){this.mode==="type"?this.typedName="":(g(this,rt,[]),g(this,at,void 0),g(this,st,void 0),s(this,C,Ut).call(this)),s(this,C,or).call(this,!0)}undo(){this.mode==="draw"&&(r(this,rt).length?r(this,rt).pop():g(this,st,void 0),g(this,at,void 0),s(this,C,Ut).call(this),s(this,C,or).call(this,!0))}willUpdate(e){if(e.has("value")&&(this.value??"")!==r(this,$i)){let t=this.value??"";if(g(this,$i,t),g(this,rt,[]),g(this,at,void 0),!t)g(this,st,void 0),this.hasUpdated&&(this.typedName="");else{let i=new Image;i.addEventListener("load",()=>{r(this,st)===i&&s(this,C,Ut).call(this)}),i.src=t,g(this,st,i),this.mode="draw"}s(this,C,Ut).call(this)}else if(this.hasUpdated&&(e.has("mode")||e.has("typedName")&&this.mode==="type")){let t=this.empty?"":this.toDataURL();g(this,$i,t),this.value=t}}firstUpdated(){s(this,C,ep).call(this),this.typedName&&!this.value&&this.updateComplete.then(()=>s(this,C,or).call(this,!1)),s(this,C,Wd).call(this)}updated(e){e.has("mode")&&this.mode==="type"&&s(this,C,Wd).call(this),r(this,it).setFormValue(this.value||null,this.value);let t=(this.mode==="type"?this.renderRoot.querySelector(".typed"):this.renderRoot.querySelector('.tab[aria-selected="true"]'))??void 0;this.error?r(this,it).setValidity({customError:!0},this.error,t):this.required&&this.empty?r(this,it).setValidity({valueMissing:!0},this.t("required"),t):r(this,it).setValidity({})}render(){let e=r(this,_o),t=this.getAttribute("aria-label"),i=this.error,a=[i&&`${e}-err`,this.helpText&&`${e}-help`].filter(Boolean).join(" "),l=this.empty,d=!r(this,rt).length&&!r(this,st),m=u=>c`<button type="button" role="tab" class="tab" id="${e}-tab-${u}"
1163
+ `];$("cm-color-field",xi);var o1=z("signatureField",{modes:"How to sign",draw:"Draw",type:"Type",pad:"Signature drawing area",padSigned:"Signature drawing area, signed",instructions:"Draw your signature with a mouse, finger or pen. To sign with the keyboard, choose Type.",signHere:"Sign here",typeLabel:"Type your full name",typePlaceholder:"Type your full name",undo:"Undo",undoLabel:"Undo last stroke",clear:"Clear",clearLabel:"Clear signature",cleared:"Signature cleared",undone:"Last stroke removed",required:"Please sign here."}),Qm=3,Fd=.7,my=.0055,jd="#000000",eb=8,zo=2,py=400,uy=(o,n)=>({x:(o.x+n.x)/2,y:(o.y+n.y)/2,p:(o.p+n.p)/2}),it,_o,Aa,Co,rt,at,st,$i,ki,ze,So,Ei,Ra,C,ep,Ud,tp,Ut,Vd,ip,rp,tb,ap,Kd,sp,Wd,ib,np,rb,or,Gd,op,lp,ab,cp,sb,dp,nb,ob,wi=class extends T{constructor(){super(...arguments);p(this,C);this.label="";this.hint="";this.helpText="";this.error="";this.name="";this.value="";this.mode="draw";this.typedName="";this.required=!1;this.disabled=!1;this._announce="";p(this,it,this.attachInternals());p(this,_o,A("cm-sig"));p(this,Aa,"");p(this,Co,"");p(this,rt,[]);p(this,at);p(this,st);p(this,$i,"");p(this,ki,0);p(this,ze);p(this,So,"");p(this,Ei);p(this,Ra,0)}connectedCallback(){super.connectedCallback(),this.hasUpdated?s(this,C,ep).call(this):(g(this,Aa,this.value),g(this,Co,this.typedName))}disconnectedCallback(){super.disconnectedCallback(),r(this,Ei)?.disconnect(),g(this,Ei,void 0),cancelAnimationFrame(r(this,ki)),g(this,ki,0),r(this,ze)&&(clearTimeout(r(this,ze)),g(this,ze,void 0))}get form(){return r(this,it).form}get validity(){return r(this,it).validity}get validationMessage(){return r(this,it).validationMessage}checkValidity(){return r(this,it).checkValidity()}reportValidity(){return r(this,it).reportValidity()}formResetCallback(){g(this,rt,[]),g(this,at,void 0),g(this,st,void 0),r(this,ze)&&(clearTimeout(r(this,ze)),g(this,ze,void 0)),this.typedName=r(this,Co),r(this,Aa)?(g(this,$i,""),this.value=r(this,Aa)):this.updateComplete.then(()=>s(this,C,or).call(this,!1)),s(this,C,Ut).call(this)}formDisabledCallback(e){this.disabled=e}formStateRestoreCallback(e){this.value=e}get empty(){return this.mode==="type"?!this.typedName.trim():!r(this,rt).length&&!r(this,st)}toDataURL(){return s(this,C,op).call(this)?.toDataURL("image/png")??""}toBlob(){let e=s(this,C,op).call(this);return e?new Promise(t=>e.toBlob(t,"image/png")):Promise.resolve(null)}clear(){this.mode==="type"?this.typedName="":(g(this,rt,[]),g(this,at,void 0),g(this,st,void 0),s(this,C,Ut).call(this)),s(this,C,or).call(this,!0)}undo(){this.mode==="draw"&&(r(this,rt).length?r(this,rt).pop():g(this,st,void 0),g(this,at,void 0),s(this,C,Ut).call(this),s(this,C,or).call(this,!0))}willUpdate(e){if(e.has("value")&&(this.value??"")!==r(this,$i)){let t=this.value??"";if(g(this,$i,t),g(this,rt,[]),g(this,at,void 0),!t)g(this,st,void 0),this.hasUpdated&&(this.typedName="");else{let i=new Image;i.addEventListener("load",()=>{r(this,st)===i&&s(this,C,Ut).call(this)}),i.src=t,g(this,st,i),this.mode="draw"}s(this,C,Ut).call(this)}else if(this.hasUpdated&&(e.has("mode")||e.has("typedName")&&this.mode==="type")){let t=this.empty?"":this.toDataURL();g(this,$i,t),this.value=t}}firstUpdated(){s(this,C,ep).call(this),this.typedName&&!this.value&&this.updateComplete.then(()=>s(this,C,or).call(this,!1)),s(this,C,Wd).call(this)}updated(e){e.has("mode")&&this.mode==="type"&&s(this,C,Wd).call(this),r(this,it).setFormValue(this.value||null,this.value);let t=(this.mode==="type"?this.renderRoot.querySelector(".typed"):this.renderRoot.querySelector('.tab[aria-selected="true"]'))??void 0;this.error?r(this,it).setValidity({customError:!0},this.error,t):this.required&&this.empty?r(this,it).setValidity({valueMissing:!0},this.t("required"),t):r(this,it).setValidity({})}render(){let e=r(this,_o),t=this.getAttribute("aria-label"),i=this.error,a=[i&&`${e}-err`,this.helpText&&`${e}-help`].filter(Boolean).join(" "),l=this.empty,d=!r(this,rt).length&&!r(this,st),m=u=>c`<button type="button" role="tab" class="tab" id="${e}-tab-${u}"
1164
1164
  aria-selected=${this.mode===u?"true":"false"} aria-controls="${e}-panel-${u}"
1165
1165
  tabindex=${this.mode===u?"0":"-1"} ?disabled=${this.disabled}
1166
1166
  @click=${()=>s(this,C,lp).call(this,u,!0)} @keydown=${s(this,C,ab)}>${this.t(u)}</button>`;return c`<div class="field">
@@ -1266,7 +1266,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1266
1266
  @media (pointer: coarse) { .act, .tab { min-height: var(--cm-control-height-touch); } }
1267
1267
 
1268
1268
  .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
1269
- `];function gy(o,n,e){let t=d=>e*my*(.35+d*1.3);if(n.length===1){o.beginPath(),o.arc(n[0].x*e,n[0].y*e,t(n[0].p)/2,0,Math.PI*2),o.fill();return}let i=d=>[d.x*e,d.y*e],a=n[0];for(let d=1;d<n.length-1;d++){let m=uy(n[d],n[d+1]);o.beginPath(),o.moveTo(...i(a)),o.quadraticCurveTo(...i(n[d]),...i(m)),o.lineWidth=t(n[d].p),o.stroke(),a=m}let l=n[n.length-1];o.beginPath(),o.moveTo(...i(a)),o.lineTo(...i(l)),o.lineWidth=t(l.p),o.stroke()}function by(o,n){let{width:e,height:t}=o,i=o.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,e,t).data,a=t,l=e,d=-1,m=-1;for(let v=0;v<t;v++){let b=v*e*4;for(let w=0;w<e;w++)i[b+w*4+3]>8&&(w<l&&(l=w),w>d&&(d=w),v<a&&(a=v),m=v)}if(d<0)return;let u=document.createElement("canvas");return u.width=d-l+1+2*n,u.height=m-a+1+2*n,u.getContext("2d").drawImage(o,l,a,d-l+1,m-a+1,n,n,d-l+1,m-a+1),u}function fy(o,n){let e=t=>{let i=/^#([0-9a-f]{6})$/i.exec(t.trim());if(i){let a=parseInt(i[1],16);return`${a>>16&255},${a>>8&255},${a&255}`}return(/\d+\s*,\s*\d+\s*,\s*\d+/.exec(t)?.[0]??t).replace(/\s/g,"")};return e(o)===e(n)}$("cm-signature-field",wi);var p$=z("optionGroup",{required:"Please select one of these options."}),ct,Lo,Ha,Do,wt,hp,mp,lb,xt=class extends T{constructor(){super(...arguments);p(this,wt);this.label="";this.name="";this.value="";this.options=[];this.required=!1;this.disabled=!1;this._slotted=[];p(this,ct,this.attachInternals());p(this,Lo,A("cm-og"));p(this,Ha,"");p(this,Do,new MutationObserver(()=>s(this,wt,hp).call(this)))}connectedCallback(){super.connectedCallback(),s(this,wt,hp).call(this),r(this,Do).observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["value","label","disabled","selected","tone"]})}disconnectedCallback(){super.disconnectedCallback(),r(this,Do).disconnect()}get form(){return r(this,ct).form}get validity(){return r(this,ct).validity}get validationMessage(){return r(this,ct).validationMessage}checkValidity(){return r(this,ct).checkValidity()}reportValidity(){return r(this,ct).reportValidity()}formResetCallback(){this.value=r(this,Ha)}formDisabledCallback(e){this.disabled=e}formStateRestoreCallback(e){this.value=e}focus(e){this.renderRoot.querySelector('button[tabindex="0"]')?.focus(e)}get items(){return this.options.length?this.options.map(e=>typeof e=="string"?{value:e,label:e}:e):this._slotted}firstUpdated(){r(this,Ha)||g(this,Ha,this.value)}updated(){r(this,ct).setFormValue(this.value||null,this.value);let e=this.renderRoot.querySelector("button")??void 0;this.required&&!this.value?r(this,ct).setValidity({valueMissing:!0},this.t("required"),e):r(this,ct).setValidity({})}render(){let e=this.items,t=e.findIndex(l=>l.value===this.value&&!l.disabled),i=t>=0?t:e.findIndex(l=>!l.disabled),a=this.getAttribute("aria-label");return c`
1269
+ `];function gy(o,n,e){let t=d=>e*my*(.35+d*1.3);if(n.length===1){o.beginPath(),o.arc(n[0].x*e,n[0].y*e,t(n[0].p)/2,0,Math.PI*2),o.fill();return}let i=d=>[d.x*e,d.y*e],a=n[0];for(let d=1;d<n.length-1;d++){let m=uy(n[d],n[d+1]);o.beginPath(),o.moveTo(...i(a)),o.quadraticCurveTo(...i(n[d]),...i(m)),o.lineWidth=t(n[d].p),o.stroke(),a=m}let l=n[n.length-1];o.beginPath(),o.moveTo(...i(a)),o.lineTo(...i(l)),o.lineWidth=t(l.p),o.stroke()}function by(o,n){let{width:e,height:t}=o,i=o.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,e,t).data,a=t,l=e,d=-1,m=-1;for(let v=0;v<t;v++){let b=v*e*4;for(let w=0;w<e;w++)i[b+w*4+3]>8&&(w<l&&(l=w),w>d&&(d=w),v<a&&(a=v),m=v)}if(d<0)return;let u=document.createElement("canvas");return u.width=d-l+1+2*n,u.height=m-a+1+2*n,u.getContext("2d").drawImage(o,l,a,d-l+1,m-a+1,n,n,d-l+1,m-a+1),u}function fy(o,n){let e=t=>{let i=/^#([0-9a-f]{6})$/i.exec(t.trim());if(i){let a=parseInt(i[1],16);return`${a>>16&255},${a>>8&255},${a&255}`}return(/\d+\s*,\s*\d+\s*,\s*\d+/.exec(t)?.[0]??t).replace(/\s/g,"")};return e(o)===e(n)}$("cm-signature-field",wi);var p1=z("optionGroup",{required:"Please select one of these options."}),ct,Lo,Ha,Do,wt,hp,mp,lb,xt=class extends T{constructor(){super(...arguments);p(this,wt);this.label="";this.name="";this.value="";this.options=[];this.required=!1;this.disabled=!1;this._slotted=[];p(this,ct,this.attachInternals());p(this,Lo,A("cm-og"));p(this,Ha,"");p(this,Do,new MutationObserver(()=>s(this,wt,hp).call(this)))}connectedCallback(){super.connectedCallback(),s(this,wt,hp).call(this),r(this,Do).observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["value","label","disabled","selected","tone"]})}disconnectedCallback(){super.disconnectedCallback(),r(this,Do).disconnect()}get form(){return r(this,ct).form}get validity(){return r(this,ct).validity}get validationMessage(){return r(this,ct).validationMessage}checkValidity(){return r(this,ct).checkValidity()}reportValidity(){return r(this,ct).reportValidity()}formResetCallback(){this.value=r(this,Ha)}formDisabledCallback(e){this.disabled=e}formStateRestoreCallback(e){this.value=e}focus(e){this.renderRoot.querySelector('button[tabindex="0"]')?.focus(e)}get items(){return this.options.length?this.options.map(e=>typeof e=="string"?{value:e,label:e}:e):this._slotted}firstUpdated(){r(this,Ha)||g(this,Ha,this.value)}updated(){r(this,ct).setFormValue(this.value||null,this.value);let e=this.renderRoot.querySelector("button")??void 0;this.required&&!this.value?r(this,ct).setValidity({valueMissing:!0},this.t("required"),e):r(this,ct).setValidity({})}render(){let e=this.items,t=e.findIndex(l=>l.value===this.value&&!l.disabled),i=t>=0?t:e.findIndex(l=>!l.disabled),a=this.getAttribute("aria-label");return c`
1270
1270
  ${this.label?c`<span class="label" id="${r(this,Lo)}-l" part="label">${this.label}${this.required?c`<span class="req" aria-hidden="true">*</span>`:h}</span>`:h}
1271
1271
  <div class="options" part="options" role="radiogroup"
1272
1272
  aria-labelledby=${this.label?`${r(this,Lo)}-l`:h} aria-label=${!this.label&&a?a:h}
@@ -1308,7 +1308,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1308
1308
  }
1309
1309
  slot { display: none; }
1310
1310
  @media (pointer: coarse) { button { min-height: var(--cm-control-height-touch, 44px); } }
1311
- `];$("cm-option-group",xt);var x$=z("segmentedControl",{required:"Please select one of these options."}),Na=class extends xt{constructor(){super(...arguments);this.size="default"}};Na.properties={...xt.properties,size:{reflect:!0}},Na.styles=[k,x`
1311
+ `];$("cm-option-group",xt);var x1=z("segmentedControl",{required:"Please select one of these options."}),Na=class extends xt{constructor(){super(...arguments);this.size="default"}};Na.properties={...xt.properties,size:{reflect:!0}},Na.styles=[k,x`
1312
1312
  :host { display: inline-block; vertical-align: middle; max-width: 100%; --_h: var(--cm-control-height-md, 36px); }
1313
1313
  :host([size='small']) { --_h: var(--cm-control-height-sm, 32px); }
1314
1314
  @media (pointer: coarse) { :host, :host([size='small']) { --_h: var(--cm-control-height-touch, 44px); } }
@@ -1338,7 +1338,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1338
1338
  button[aria-checked='true']:disabled { background: var(--cm-bg-input-filled); border-color: var(--cm-border-subtle); }
1339
1339
  :host([disabled]) .options { background: var(--cm-bg-input-filled); }
1340
1340
  slot { display: none; }
1341
- `];$("cm-segmented-control",Na);var M$=z("pageHeader",{back:"Back to {label}",backOnly:"Back",breadcrumbs:"Breadcrumb",records:"Records",previous:"Previous",next:"Next"}),Ao,pp,Ia=class extends T{constructor(){super(...arguments);p(this,Ao);this.heading="";this.description="";this.breadcrumbs=[];this.backHref="";this.backLabel="";this.pagination=!1;this.hasPrevious=!1;this.hasNext=!1}render(){let e=Array.isArray(this.breadcrumbs)?this.breadcrumbs:[],t=this.backHref?{href:this.backHref,label:this.backLabel}:[...e].reverse().find(i=>i.href);return c`<header part="header">
1341
+ `];$("cm-segmented-control",Na);var M1=z("pageHeader",{back:"Back to {label}",backOnly:"Back",breadcrumbs:"Breadcrumb",records:"Records",previous:"Previous",next:"Next"}),Ao,pp,Ia=class extends T{constructor(){super(...arguments);p(this,Ao);this.heading="";this.description="";this.breadcrumbs=[];this.backHref="";this.backLabel="";this.pagination=!1;this.hasPrevious=!1;this.hasNext=!1}render(){let e=Array.isArray(this.breadcrumbs)?this.breadcrumbs:[],t=this.backHref?{href:this.backHref,label:this.backLabel}:[...e].reverse().find(i=>i.href);return c`<header part="header">
1342
1342
  <div class=${this.description?"lead described":"lead"}>
1343
1343
  ${t?c`<a class=${this.backHref?"back always":"back"} part="back" href=${t.href} aria-label=${t.label?this.t("back",{label:t.label}):this.t("backOnly")}><cm-icon name="chevron-left" size="20"></cm-icon></a>`:h}
1344
1344
  <div class="titles">
@@ -1362,7 +1362,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1362
1362
  header {
1363
1363
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--cm-space-12) var(--cm-space-20);
1364
1364
  min-height: 64px; padding: var(--cm-space-12) var(--cm-space-24);
1365
- background: var(--cm-bg-surface); border-bottom: var(--cm-border-1) solid var(--cm-border-subtle);
1365
+ background: var(--cm-page-header-background, var(--cm-bg-surface)); border-bottom: var(--cm-border-1) solid var(--cm-border-subtle);
1366
1366
  }
1367
1367
  .lead { flex: 1 1 280px; display: flex; align-items: center; gap: var(--cm-space-8); min-width: 0; }
1368
1368
  /* flex: 1 (issue #32): the titles column takes the room the lead has, so a title-adornment badge sits beside the
@@ -1414,7 +1414,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1414
1414
  h1 { font-size: var(--cm-type-heading-lg-resp-size); line-height: var(--cm-type-heading-lg-resp-line-height); }
1415
1415
  .actions { gap: var(--cm-space-8); }
1416
1416
  }
1417
- `];$("cm-page-header",Ia);var L$=z("actionBar",{label:"Actions"}),Pa=class extends T{constructor(){super(...arguments);this.eyebrow="";this.heading="";this.tone="default";this.sticky=!1;this.label=""}render(){let e=this.tone==="critical";return c`<div class="bar" part="bar" role="region" aria-label=${this.label||this.heading||this.eyebrow||this.t("label")}>
1417
+ `];$("cm-page-header",Ia);var L1=z("actionBar",{label:"Actions"}),Pa=class extends T{constructor(){super(...arguments);this.eyebrow="";this.heading="";this.tone="default";this.sticky=!1;this.label=""}render(){let e=this.tone==="critical";return c`<div class="bar" part="bar" role="region" aria-label=${this.label||this.heading||this.eyebrow||this.t("label")}>
1418
1418
  <div class="lead">
1419
1419
  ${e?c`<span class="icon" aria-hidden="true"><cm-icon name="alert" size="20"></cm-icon></span>`:h}
1420
1420
  <div class="text">
@@ -1455,7 +1455,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1455
1455
 
1456
1456
  .actions { gap: var(--cm-space-8); }
1457
1457
  }
1458
- `];$("cm-action-bar",Pa);var N$=z("saveBar",{message:"Unsaved changes",save:"Save",discard:"Discard"}),$t,lr,Ro,_e,up,gp,bp,cb,db,Oa=class extends T{constructor(){super(...arguments);p(this,_e);this.open=!1;this.loading=!1;this.saveDisabled=!1;this.form="";p(this,$t,null);p(this,lr,()=>{this.open=!0});p(this,Ro,()=>{this.open=!1})}connectedCallback(){super.connectedCallback(),queueMicrotask(()=>s(this,_e,up).call(this))}disconnectedCallback(){super.disconnectedCallback(),s(this,_e,gp).call(this)}updated(e){e.has("form")&&this.isConnected&&s(this,_e,up).call(this)}render(){return c`<div class="bar" part="bar" role="region" aria-label=${this.message}>
1458
+ `];$("cm-action-bar",Pa);var N1=z("saveBar",{message:"Unsaved changes",save:"Save",discard:"Discard"}),$t,lr,Ro,_e,up,gp,bp,cb,db,Oa=class extends T{constructor(){super(...arguments);p(this,_e);this.open=!1;this.loading=!1;this.saveDisabled=!1;this.form="";p(this,$t,null);p(this,lr,()=>{this.open=!0});p(this,Ro,()=>{this.open=!1})}connectedCallback(){super.connectedCallback(),queueMicrotask(()=>s(this,_e,up).call(this))}disconnectedCallback(){super.disconnectedCallback(),s(this,_e,gp).call(this)}updated(e){e.has("form")&&this.isConnected&&s(this,_e,up).call(this)}render(){return c`<div class="bar" part="bar" role="region" aria-label=${this.message}>
1459
1459
  <p class="message" part="message" role="status">${this.open?this.message:""}</p>
1460
1460
  <div class="actions">
1461
1461
  <cm-button size="large" ?disabled=${this.loading} @click=${s(this,_e,db)}>${this.discardLabel}</cm-button>
@@ -1477,7 +1477,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1477
1477
  .message { font-size: var(--cm-font-size-14); line-height: var(--cm-line-height-14); font-weight: 500; }
1478
1478
 
1479
1479
  }
1480
- `];$("cm-save-bar",Oa);var qa=class extends S{constructor(){super(...arguments);this.heading="";this.action="";this.actionLabel="";this.headingLevel=2;this.variant="default";this.layout="stacked";this._list=!0}render(){let e=Math.min(6,Math.max(2,this.headingLevel||2));return c`<section part="panel" aria-label=${this.heading||h}>
1480
+ `];$("cm-save-bar",Oa);var F1=z("infoItem",{edit:"Edit {label}"}),qa=class extends S{constructor(){super(...arguments);this.heading="";this.action="";this.actionLabel="";this.headingLevel=2;this.variant="default";this.layout="stacked";this._list=!0}render(){let e=Math.min(6,Math.max(2,this.headingLevel||2));return c`<section part="panel" aria-label=${this.heading||h}>
1481
1481
  ${this.heading||this.action?c`<header>
1482
1482
  <div class="title" role="heading" aria-level=${e} part="title">${this.heading}</div>
1483
1483
  ${this.action?c`<button class="action" type="button" part="action" aria-label=${this.actionLabel||h}
@@ -1509,7 +1509,9 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1509
1509
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: baseline;
1510
1510
  column-gap: var(--cm-space-12); grid-column: 1 / -1; --_cm-info-value-gap: 0px;
1511
1511
  }
1512
- `];$("cm-info-panel",qa);var Ba=class extends S{constructor(){super(...arguments);this.label="";this.half=!1}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","listitem")}render(){return c`<div class="label" part="label">${this.label}</div><div class="value" part="value"><slot></slot></div>`}};Ba.properties={label:{},half:{type:Boolean,reflect:!0}},Ba.styles=[k,x`
1512
+ `];$("cm-info-panel",qa);var Ba=class extends T{constructor(){super(...arguments);this.label="";this.half=!1;this.editable=!1;this.editLabel=""}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","listitem")}render(){let e=c`<div class="value" part="value"><slot></slot></div>`;return this.editable?c`<div class="label" part="label">${this.label}</div><div class="row">${e}<button class="edit" part="edit" type="button"
1513
+ aria-label=${this.editLabel||this.t("edit",{label:this.label})}
1514
+ @click=${()=>this.dispatchEvent(new CustomEvent("cm-edit",{bubbles:!0,composed:!0}))}><cm-icon name="edit" size="16"></cm-icon></button></div>`:c`<div class="label" part="label">${this.label}</div>${e}`}};Ba.properties={label:{},half:{type:Boolean,reflect:!0},editable:{type:Boolean,reflect:!0},editLabel:{attribute:"edit-label"}},Ba.styles=[k,x`
1513
1515
  :host { display: block; grid-column: 1 / -1; min-width: 0; }
1514
1516
  :host([half]) { grid-column: auto; }
1515
1517
  .label { font-size: var(--cm-font-size-13); line-height: var(--cm-line-height-13); color: var(--cm-text-tertiary); }
@@ -1518,6 +1520,16 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1518
1520
  margin-top: var(--_cm-info-value-gap, var(--cm-space-4)); font-size: var(--cm-font-size-14); line-height: var(--cm-line-height-14); font-weight: 500; overflow-wrap: anywhere;
1519
1521
 
1520
1522
  }
1523
+ /* Editable (1.9.1): the value and a 28px pencil on one row, the pencil centred on the value's first 20px line. */
1524
+ .row { display: flex; align-items: flex-start; gap: var(--cm-space-4); margin-top: var(--_cm-info-value-gap, var(--cm-space-4)); }
1525
+ .row .value { margin-top: 0; min-width: 0; }
1526
+ .edit {
1527
+ position: relative; flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; margin-block: -4px; padding: 0;
1528
+ background: none; border: 0; border-radius: var(--cm-radius-sm); color: var(--cm-icon-default); cursor: pointer;
1529
+ }
1530
+ .edit:hover { background: var(--cm-bg-hover); color: var(--cm-icon-selected); }
1531
+ .edit:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; }
1532
+ @media (pointer: coarse) { .edit::after { content: ''; position: absolute; inset: -8px; } }
1521
1533
  `];$("cm-info-item",Ba);var cr,Fa=class extends S{constructor(){super(...arguments);this.heading="";this.open=!1;this.disabled=!1;this.headingLevel=3;p(this,cr,A("cm-accordion"))}toggle(){this.disabled||(this.open=!this.open,this.dispatchEvent(new CustomEvent("cm-toggle",{bubbles:!0,composed:!0,detail:{open:this.open}})))}render(){let e=Math.min(6,Math.max(2,this.headingLevel||3));return c`<div class="wrap" part="accordion">
1522
1534
  <div class="h" role="heading" aria-level=${e}>
1523
1535
  <button type="button" part="toggle" id="${r(this,cr)}-btn" aria-expanded=${this.open?"true":"false"} aria-controls="${r(this,cr)}-body"
@@ -1665,7 +1677,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1665
1677
  .body { grid-template-columns: minmax(0, 1fr); }
1666
1678
  .head { height: 60px; }
1667
1679
  }
1668
- `];$("cm-skeleton-display",Va);var n1=z("commentBox",{heading:"Comments",label:"Add a comment",action:"Post comment"}),Yd,pb,Ka=class extends T{constructor(){super(...arguments);p(this,Yd);this.author="";this.datetime="";this.time=""}connectedCallback(){super.connectedCallback(),!this.hasAttribute("role")&&this.parentElement?.localName==="cm-comment-box"&&this.setAttribute("role","listitem")}render(){let e=s(this,Yd,pb).call(this);return c`<article part="comment">
1680
+ `];$("cm-skeleton-display",Va);var l$=z("commentBox",{heading:"Comments",label:"Add a comment",action:"Post comment"}),Yd,pb,Ka=class extends T{constructor(){super(...arguments);p(this,Yd);this.author="";this.datetime="";this.time=""}connectedCallback(){super.connectedCallback(),!this.hasAttribute("role")&&this.parentElement?.localName==="cm-comment-box"&&this.setAttribute("role","listitem")}render(){let e=s(this,Yd,pb).call(this);return c`<article part="comment">
1669
1681
  ${e?c`<time class="meta" part="time" datetime=${this.datetime||h}>${e}</time>`:h}
1670
1682
  <div class="body" part="body"><slot></slot></div>
1671
1683
  ${this.author?c`<div class="meta" part="author">– ${this.author}</div>`:h}
@@ -1724,7 +1736,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1724
1736
  :host([open]) .tip { opacity: 1; visibility: visible; transition: opacity var(--cm-duration-fast) var(--cm-easing-standard); }
1725
1737
  @media (prefers-reduced-motion: reduce) { .tip { transition: none; } }
1726
1738
  @media (forced-colors: active) { .tip { border: 1px solid CanvasText; } }
1727
- `];$("cm-tooltip",Ga);var b1=z("timelineItem",{justNow:"Just now",minutesAgo:{one:"{count} minute ago",other:"{count} minutes ago"},hoursAgo:{one:"{count} hour ago",other:"{count} hours ago"},daysAgo:{one:"{count} day ago",other:"{count} days ago"},inMinutes:{one:"In {count} minute",other:"In {count} minutes"},inHours:{one:"In {count} hour",other:"In {count} hours"},inDays:{one:"In {count} day",other:"In {count} days"},showAll:"Show all",showLess:"Show less"}),f1=z("timeline",{label:"Activity",showMore:"Show more",loading:"Loading activity"}),xy=7,No=new Set,Io;function bb(o,n){n?No.add(o):No.delete(o),No.size&&!Io&&(Io=setInterval(()=>No.forEach(e=>e.requestUpdate()),6e4)),!No.size&&Io&&(clearInterval(Io),Io=void 0)}var Po,pr,dt,wp,ih,fb,Qa=class extends T{constructor(){super(...arguments);p(this,dt);this.icon="";this.tone="neutral";this.heading="";this.datetime="";this.time="";this.meta="";this.lines=3;this.expanded=!1;this._overflow=!1;this._body=!1;this._meta=!1;this._actions=!1;p(this,Po,A("cm-tl"));p(this,pr)}connectedCallback(){super.connectedCallback(),bb(this,!0)}disconnectedCallback(){super.disconnectedCallback(),bb(this,!1),r(this,pr)?.disconnect(),g(this,pr,void 0)}firstUpdated(){let e=this.renderRoot.querySelector(".body");e&&typeof ResizeObserver<"u"&&(g(this,pr,new ResizeObserver(()=>s(this,dt,wp).call(this))),r(this,pr).observe(e))}updated(e){(e.has("lines")||e.has("_body")||e.has("expanded"))&&s(this,dt,wp).call(this)}get date(){if(!this.datetime)return;let e=new Date(this.datetime);return Number.isNaN(e.getTime())?void 0:e}get relativeTime(){if(this.time)return this.time;let e=this.date;if(!e)return this.datetime;let t=Date.now()-e.getTime(),i=t<0,a=Math.floor(Math.abs(t)/6e4);if(a<1)return this.t("justNow");if(a<60)return this.t(i?"inMinutes":"minutesAgo",{count:a});let l=Math.floor(a/60);if(l<24)return this.t(i?"inHours":"hoursAgo",{count:l});let d=Math.floor(l/24);return d<xy?this.t(i?"inDays":"daysAgo",{count:d}):ae(e,{dateStyle:"medium"},this.locale)}get fullTime(){let e=this.date;return e?ae(e,{dateStyle:"full",timeStyle:"short"},this.locale):""}render(){let e=this.relativeTime,t=this.fullTime,i=this.tone&&this.tone!=="neutral"?this.tone:"",a=this.lines>0&&!this.expanded,l=e?t?c`<cm-tooltip class="when" content=${t} visual-only placement="top"><time part="time" tabindex="0" datetime=${this.datetime}>${e}<span class="sr">, ${t}</span></time></cm-tooltip>`:c`<time class="when" part="time" datetime=${this.datetime||h}>${e}</time>`:h;return c`<div class="item">
1739
+ `];$("cm-tooltip",Ga);var v$=z("timelineItem",{justNow:"Just now",minutesAgo:{one:"{count} minute ago",other:"{count} minutes ago"},hoursAgo:{one:"{count} hour ago",other:"{count} hours ago"},daysAgo:{one:"{count} day ago",other:"{count} days ago"},inMinutes:{one:"In {count} minute",other:"In {count} minutes"},inHours:{one:"In {count} hour",other:"In {count} hours"},inDays:{one:"In {count} day",other:"In {count} days"},showAll:"Show all",showLess:"Show less"}),y$=z("timeline",{label:"Activity",showMore:"Show more",loading:"Loading activity"}),xy=7,No=new Set,Io;function bb(o,n){n?No.add(o):No.delete(o),No.size&&!Io&&(Io=setInterval(()=>No.forEach(e=>e.requestUpdate()),6e4)),!No.size&&Io&&(clearInterval(Io),Io=void 0)}var Po,pr,dt,wp,ih,fb,Qa=class extends T{constructor(){super(...arguments);p(this,dt);this.icon="";this.tone="neutral";this.heading="";this.datetime="";this.time="";this.meta="";this.lines=3;this.expanded=!1;this._overflow=!1;this._body=!1;this._meta=!1;this._actions=!1;p(this,Po,A("cm-tl"));p(this,pr)}connectedCallback(){super.connectedCallback(),bb(this,!0)}disconnectedCallback(){super.disconnectedCallback(),bb(this,!1),r(this,pr)?.disconnect(),g(this,pr,void 0)}firstUpdated(){let e=this.renderRoot.querySelector(".body");e&&typeof ResizeObserver<"u"&&(g(this,pr,new ResizeObserver(()=>s(this,dt,wp).call(this))),r(this,pr).observe(e))}updated(e){(e.has("lines")||e.has("_body")||e.has("expanded"))&&s(this,dt,wp).call(this)}get date(){if(!this.datetime)return;let e=new Date(this.datetime);return Number.isNaN(e.getTime())?void 0:e}get relativeTime(){if(this.time)return this.time;let e=this.date;if(!e)return this.datetime;let t=Date.now()-e.getTime(),i=t<0,a=Math.floor(Math.abs(t)/6e4);if(a<1)return this.t("justNow");if(a<60)return this.t(i?"inMinutes":"minutesAgo",{count:a});let l=Math.floor(a/60);if(l<24)return this.t(i?"inHours":"hoursAgo",{count:l});let d=Math.floor(l/24);return d<xy?this.t(i?"inDays":"daysAgo",{count:d}):ae(e,{dateStyle:"medium"},this.locale)}get fullTime(){let e=this.date;return e?ae(e,{dateStyle:"full",timeStyle:"short"},this.locale):""}render(){let e=this.relativeTime,t=this.fullTime,i=this.tone&&this.tone!=="neutral"?this.tone:"",a=this.lines>0&&!this.expanded,l=e?t?c`<cm-tooltip class="when" content=${t} visual-only placement="top"><time part="time" tabindex="0" datetime=${this.datetime}>${e}<span class="sr">, ${t}</span></time></cm-tooltip>`:c`<time class="when" part="time" datetime=${this.datetime||h}>${e}</time>`:h;return c`<div class="item">
1728
1740
  <span class="icon ${i}" part="icon" aria-hidden="true">${this.icon?c`<cm-icon name=${this.icon} size="16"></cm-icon>`:c`<span class="dot"></span>`}</span>
1729
1741
  <div class="main">
1730
1742
  <div class="head">
@@ -1816,7 +1828,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1816
1828
  @media (max-width: 640px) {
1817
1829
  .more { padding-inline-start: 0; }
1818
1830
  }
1819
- `];$("cm-timeline",mr);var k1=z("smartTip",{newTab:"(opens in a new tab)"}),E1=z("smartTips",{heading:"Smart tips",tourAction:"Start"}),ts=class extends T{constructor(){super(...arguments);this.heading="";this.href="";this.target=""}connectedCallback(){super.connectedCallback(),!this.hasAttribute("role")&&this.parentElement?.localName==="cm-smart-tips"&&this.setAttribute("role","listitem")}render(){let e=this.target==="_blank";return c`<a part="tip" href=${this.href||h} target=${this.target||h} rel=${e?"noopener noreferrer":h}>
1831
+ `];$("cm-timeline",mr);var M$=z("smartTip",{newTab:"(opens in a new tab)"}),T$=z("smartTips",{heading:"Smart tips",tourAction:"Start"}),ts=class extends T{constructor(){super(...arguments);this.heading="";this.href="";this.target=""}connectedCallback(){super.connectedCallback(),!this.hasAttribute("role")&&this.parentElement?.localName==="cm-smart-tips"&&this.setAttribute("role","listitem")}render(){let e=this.target==="_blank";return c`<a part="tip" href=${this.href||h} target=${this.target||h} rel=${e?"noopener noreferrer":h}>
1820
1832
  <span class="text">
1821
1833
  <span class="title" part="heading">${this.heading}</span>
1822
1834
  <span class="desc" part="description"><slot></slot></span>
@@ -1868,7 +1880,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1868
1880
  margin: var(--cm-space-8) 0 var(--cm-space-16); text-align: center; font-size: var(--cm-type-heading-sm-size); line-height: var(--cm-type-heading-sm-line-height); font-weight: 600;
1869
1881
  }
1870
1882
  .list { display: flex; flex-direction: column; gap: var(--cm-space-8); }
1871
- `];$("cm-smart-tips",is);var C1=z("pagination",{label:"Pagination",rows:"Number of rows",summary:"Showing {from}\u2013{to} of {total} {resource}",page:"Page",of:"of {count}",previous:"Previous page",next:"Next page"}),Wt,as,yb,xb,rs=class extends T{constructor(){super(...arguments);p(this,as);this.page=1;this.total=0;this.pageSize=20;this.pageSizes=[10,20,50,100];this.resourceName="";this._draft=null;p(this,Wt,A("cm-pg"))}get pageCount(){return Math.max(1,Math.ceil((this.total||0)/Math.max(1,this.pageSize)))}goTo(e){let t=Math.min(this.pageCount,Math.max(1,Math.round(e)||1));if(this._draft=null,t===this.page){this.requestUpdate();return}this.page=t,this.dispatchEvent(new CustomEvent("cm-page-change",{detail:{page:t},bubbles:!0,composed:!0}))}render(){let e=this.pageCount,t=Math.min(e,Math.max(1,this.page)),i=this.total?(t-1)*this.pageSize+1:0,a=Math.min(this.total,t*this.pageSize),l=this.pageSizes??[];return c`
1883
+ `];$("cm-smart-tips",is);var L$=z("pagination",{label:"Pagination",rows:"Number of rows",summary:"Showing {from}\u2013{to} of {total} {resource}",page:"Page",of:"of {count}",previous:"Previous page",next:"Next page"}),Wt,as,yb,xb,rs=class extends T{constructor(){super(...arguments);p(this,as);this.page=1;this.total=0;this.pageSize=20;this.pageSizes=[10,20,50,100];this.resourceName="";this._draft=null;p(this,Wt,A("cm-pg"))}get pageCount(){return Math.max(1,Math.ceil((this.total||0)/Math.max(1,this.pageSize)))}goTo(e){let t=Math.min(this.pageCount,Math.max(1,Math.round(e)||1));if(this._draft=null,t===this.page){this.requestUpdate();return}this.page=t,this.dispatchEvent(new CustomEvent("cm-page-change",{detail:{page:t},bubbles:!0,composed:!0}))}render(){let e=this.pageCount,t=Math.min(e,Math.max(1,this.page)),i=this.total?(t-1)*this.pageSize+1:0,a=Math.min(this.total,t*this.pageSize),l=this.pageSizes??[];return c`
1872
1884
  <nav part="bar" aria-label=${this.label}>
1873
1885
  ${l.length?c`<div class="rows" part="rows">
1874
1886
  <label for="${r(this,Wt)}-s">${this.t("rows")}</label>
@@ -1938,7 +1950,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1938
1950
  select, input { height: var(--cm-control-height-touch); }
1939
1951
  button { width: var(--cm-control-height-touch); height: var(--cm-control-height-touch); }
1940
1952
  }
1941
- `];$("cm-pagination",rs);var H1=z("statusTabs",{label:"Status",option:"{label} ({count})"}),ns,Bo,me,qo,wb,kp,$b,Ep,kb,ss=class extends T{constructor(){super(...arguments);p(this,me);this.value="";this.tabs=[];this.controls="";this.size="large";this.mobile="scroll";this._more="";p(this,ns,new ResizeObserver(()=>s(this,me,qo).call(this)));this._slotted=[];p(this,Bo,new MutationObserver(()=>s(this,me,kp).call(this)))}connectedCallback(){super.connectedCallback(),s(this,me,kp).call(this),r(this,Bo).observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["value","label","count","disabled","selected"]})}disconnectedCallback(){super.disconnectedCallback(),r(this,Bo).disconnect(),r(this,ns).disconnect()}firstUpdated(){let e=this.renderRoot.querySelector(".tabs");r(this,ns).observe(e),e.addEventListener("scroll",()=>s(this,me,qo).call(this),{passive:!0}),document.fonts?.ready.then(()=>s(this,me,qo).call(this))}get items(){return this.tabs.length?this.tabs.map(e=>typeof e=="string"?{value:e,label:e}:e):this._slotted}focus(e){let t=this.renderRoot.querySelector(".pick select");t&&t.offsetParent!==null?t.focus(e):this.renderRoot.querySelector('button[tabindex="0"]')?.focus(e)}updated(e){s(this,me,qo).call(this);for(let a of this.renderRoot.querySelectorAll(".tabs > *"))r(this,ns).observe(a);if(!("ariaControlsElements"in Element.prototype))return;let t=this.getRootNode(),i=this.controls?t.getElementById?.(this.controls):null;for(let a of this.renderRoot.querySelectorAll("button, select"))a.ariaControlsElements=i?[i]:null}render(){let e=this.items,t=s(this,me,$b).call(this,e),i=this.getAttribute("aria-label")||this.t("label");return c`
1953
+ `];$("cm-pagination",rs);var I$=z("statusTabs",{label:"Status",option:"{label} ({count})"}),ns,Bo,me,qo,wb,kp,$b,Ep,kb,ss=class extends T{constructor(){super(...arguments);p(this,me);this.value="";this.tabs=[];this.controls="";this.size="large";this.mobile="scroll";this._more="";p(this,ns,new ResizeObserver(()=>s(this,me,qo).call(this)));this._slotted=[];p(this,Bo,new MutationObserver(()=>s(this,me,kp).call(this)))}connectedCallback(){super.connectedCallback(),s(this,me,kp).call(this),r(this,Bo).observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["value","label","count","disabled","selected"]})}disconnectedCallback(){super.disconnectedCallback(),r(this,Bo).disconnect(),r(this,ns).disconnect()}firstUpdated(){let e=this.renderRoot.querySelector(".tabs");r(this,ns).observe(e),e.addEventListener("scroll",()=>s(this,me,qo).call(this),{passive:!0}),document.fonts?.ready.then(()=>s(this,me,qo).call(this))}get items(){return this.tabs.length?this.tabs.map(e=>typeof e=="string"?{value:e,label:e}:e):this._slotted}focus(e){let t=this.renderRoot.querySelector(".pick select");t&&t.offsetParent!==null?t.focus(e):this.renderRoot.querySelector('button[tabindex="0"]')?.focus(e)}updated(e){s(this,me,qo).call(this);for(let a of this.renderRoot.querySelectorAll(".tabs > *"))r(this,ns).observe(a);if(!("ariaControlsElements"in Element.prototype))return;let t=this.getRootNode(),i=this.controls?t.getElementById?.(this.controls):null;for(let a of this.renderRoot.querySelectorAll("button, select"))a.ariaControlsElements=i?[i]:null}render(){let e=this.items,t=s(this,me,$b).call(this,e),i=this.getAttribute("aria-label")||this.t("label");return c`
1942
1954
  <div class=${`tabs${this._more?` more-${this._more}`:""}`} part="tabs" role="tablist" aria-label=${i}>
1943
1955
  ${e.map((a,l)=>c`<button type="button" role="tab" part="tab" aria-selected=${l===t?"true":"false"}
1944
1956
  tabindex=${l===t?"0":"-1"} ?disabled=${!!a.disabled}
@@ -2007,7 +2019,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
2007
2019
  :host([mobile='select']) .tabs { display: none; }
2008
2020
  :host([mobile='select']) .pick { display: block; }
2009
2021
  }
2010
- `];$("cm-status-tabs",ss);var B1=z("tableHeader",{selectAll:"Select all",sorted:", sorted {direction}",sortable:", sortable"}),rh,Fo,Gt,Mp,Eb,Mb,os=class extends T{constructor(){super(...arguments);p(this,Gt);this.columns=[];this.sort="";this.direction="ascending";this.selectable=!1;this.checked=!1;this.indeterminate=!1;this._slotted=[];this._inTable=!1;p(this,rh,A("cm-th"));p(this,Fo,new MutationObserver(()=>s(this,Gt,Mp).call(this)))}connectedCallback(){super.connectedCallback(),this._inTable=!!this.parentElement?.closest('table, [role="table"], [role="grid"], [role="treegrid"]'),s(this,Gt,Mp).call(this),r(this,Fo).observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0})}disconnectedCallback(){super.disconnectedCallback(),r(this,Fo).disconnect()}get items(){return this.columns.length?this.columns.map(e=>typeof e=="string"?{key:e,label:e}:{...e,key:e.key??e.label}):this._slotted}render(){let e=this._inTable,t=this.items;return c`
2022
+ `];$("cm-status-tabs",ss);var j$=z("tableHeader",{selectAll:"Select all",sorted:", sorted {direction}",sortable:", sortable"}),rh,Fo,Gt,Mp,Eb,Mb,os=class extends T{constructor(){super(...arguments);p(this,Gt);this.columns=[];this.sort="";this.direction="ascending";this.selectable=!1;this.checked=!1;this.indeterminate=!1;this._slotted=[];this._inTable=!1;p(this,rh,A("cm-th"));p(this,Fo,new MutationObserver(()=>s(this,Gt,Mp).call(this)))}connectedCallback(){super.connectedCallback(),this._inTable=!!this.parentElement?.closest('table, [role="table"], [role="grid"], [role="treegrid"]'),s(this,Gt,Mp).call(this),r(this,Fo).observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0})}disconnectedCallback(){super.disconnectedCallback(),r(this,Fo).disconnect()}get items(){return this.columns.length?this.columns.map(e=>typeof e=="string"?{key:e,label:e}:{...e,key:e.key??e.label}):this._slotted}render(){let e=this._inTable,t=this.items;return c`
2011
2023
  <div class="bar ${this.selectable?"sel":""}" part="bar" role=${e?"row":h}
2012
2024
  style="--_cols: repeat(${Math.max(1,t.length)}, minmax(0, 1fr))">
2013
2025
  ${this.selectable?c`<span class="cell" role=${e?"columnheader":h}><span class="check">
@@ -2075,7 +2087,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
2075
2087
  `];$("cm-table-header",os);var wy=`
2076
2088
  [data-cm-density="compact"] { --cm-table-row-height: 40px; --cm-resource-row-height: 40px; --cm-resource-row-padding: 4px; --cm-resource-media-size: 32px; }
2077
2089
  [data-cm-density="comfortable"] { --cm-table-row-height: 48px; --cm-resource-row-height: 56px; --cm-resource-row-padding: 8px; --cm-resource-media-size: 40px; }
2078
- `,ah=null,Tb=new WeakSet;function sh(o){if(typeof document>"u"||typeof CSSStyleSheet>"u")return;let n=[document],e=o.getRootNode();e instanceof ShadowRoot&&n.push(e);for(let t of n)if(!Tb.has(t)){Tb.add(t);try{ah||(ah=new CSSStyleSheet,ah.replaceSync(wy)),t.adoptedStyleSheets=[...t.adoptedStyleSheets,ah]}catch{}}}var Y1=z("dataTable",{empty:"No data",sorted:"Sorted by {column}, {direction}",scrollHint:"Scroll for more",columns:"Columns",showColumns:"Show columns",resize:"Resize {column} column",resized:"{column} column, {width} pixels wide",viewAll:"View all fields",viewLess:"Hide fields",rowAction:"{action}, {name}"}),zb=48,_b=16,Cb=!1,$y=`
2090
+ `,ah=null,Tb=new WeakSet;function sh(o){if(typeof document>"u"||typeof CSSStyleSheet>"u")return;let n=[document],e=o.getRootNode();e instanceof ShadowRoot&&n.push(e);for(let t of n)if(!Tb.has(t)){Tb.add(t);try{ah||(ah=new CSSStyleSheet,ah.replaceSync(wy)),t.adoptedStyleSheets=[...t.adoptedStyleSheets,ah]}catch{}}}var J$=z("dataTable",{empty:"No data",sorted:"Sorted by {column}, {direction}",scrollHint:"Scroll for more",columns:"Columns",showColumns:"Show columns",resize:"Resize {column} column",resized:"{column} column, {width} pixels wide",viewAll:"View all fields",viewLess:"Hide fields",rowAction:"{action}, {name}"}),zb=48,_b=16,Cb=!1,$y=`
2079
2091
  cm-data-table > table { width: 100%; border-collapse: separate; border-spacing: 0; font: inherit; font-size: var(--cm-font-size-13); line-height: var(--cm-line-height-13); font-variant-numeric: tabular-nums; color: var(--cm-text-default); }
2080
2092
  cm-data-table > table caption { text-align: start; font-weight: 600; font-size: var(--cm-font-size-16); line-height: var(--cm-line-height-16); padding-block-end: var(--cm-space-8); }
2081
2093
  cm-data-table > table th, cm-data-table > table td { box-sizing: border-box; }
@@ -2329,7 +2341,7 @@ cm-data-table:has(> table) { container-type: inline-size; }
2329
2341
  :host([mobile='priority']) tr.more { display: table-row; }
2330
2342
  }
2331
2343
  @media (forced-colors: active) { button.sort cm-icon { opacity: 1; } .acts { opacity: 1 !important; } }
2332
- `];$("cm-data-table",ms);var ik=z("resourceItem",{select:"Select {name}"}),rk=z("resourceList",{resourceName:"item",resourceNamePlural:"items",select:"Select",selectPageHidden:"all {count} {resource} on this page",selectionOptions:"Selection options",selectPage:"Select all {count} on this page",selectAll:"Select all {count} {resource}",selectNone:"Select none",selected:"{count} {resource} selected.",allSelected:"All {count} {resource} selected.",clearSelection:"Clear selection",loading:"Loading {resource}"}),Jb=x`
2344
+ `];$("cm-data-table",ms);var ak=z("resourceItem",{select:"Select {name}"}),sk=z("resourceList",{resourceName:"item",resourceNamePlural:"items",select:"Select",selectPageHidden:"all {count} {resource} on this page",selectionOptions:"Selection options",selectPage:"Select all {count} on this page",selectAll:"Select all {count} {resource}",selectNone:"Select none",selected:"{count} {resource} selected.",allSelected:"All {count} {resource} selected.",clearSelection:"Clear selection",loading:"Loading {resource}"}),Jb=x`
2333
2345
  .check { position: relative; display: inline-flex; flex: none; width: 16px; height: 16px; }
2334
2346
  .check input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
2335
2347
  .check input:disabled { cursor: not-allowed; }
@@ -2477,7 +2489,7 @@ cm-data-table:has(> table) { container-type: inline-size; }
2477
2489
  .toolbar .check { width: 20px; height: 20px; }
2478
2490
  .spinner { width: 32px; height: 32px; margin: -16px; border-width: 3px; }
2479
2491
  }
2480
- `];$("cm-resource-list",xs);var ck=z("nestedItem",{reorder:"Reorder {label}",hint:"Press up or down arrow to move.",hintGroup:"Press up or down arrow to move. At either end of the list, the arrow moves it into the list before or after.",moved:"{label} moved to position {position} of {total}.",movedTo:"{label} moved to {list}, position {position} of {total}."}),dk=z("nestedList",{show:"Show {heading}",hide:"Hide {heading}"}),fh,re,Np,Ip,tf,rf,zi,af,sf,nf,Pp,of,ht=class ht extends T{constructor(){super();p(this,re);this.label="";this.value="";this.sortable=!1;this._hasChildren=!1;p(this,fh,this.attachInternals());p(this,zi,!1);r(this,fh).role="listitem"}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","listitem")}get list(){let e=this.parentElement;return e?.localName==="cm-nested-list"?e:null}moveToList(e,t){let i=this.list;if(!i||!e)return!1;if(e===i)return t===void 0?!1:this.moveTo(t);if(!i.group||e.group!==i.group)return!1;let a=e.items,l=Math.max(0,Math.min(a.length,t??a.length)),d={item:this,from:i.items.indexOf(this),to:l,fromList:i,toList:e};return this.dispatchEvent(new CustomEvent("cm-move",{detail:d,bubbles:!0,composed:!0,cancelable:!0}))?(e.insertBefore(this,a[l]??null),e.announce(this.t("movedTo",{label:this.label,list:e.heading,position:l+1,total:a.length+1})),!0):!1}get siblings(){return[...this.parentElement.children].filter(e=>e.localName==="cm-nested-item")}moveTo(e){let t=this.siblings,i=t.indexOf(this);if(e=Math.max(0,Math.min(t.length-1,e)),e===i)return!1;let a=new CustomEvent("cm-reorder",{detail:{item:this,from:i,to:e},bubbles:!0,composed:!0,cancelable:!0});if(!this.dispatchEvent(a))return!1;let l=t[e];return l.parentElement.insertBefore(this,e>i?l.nextSibling:l),this.closest("cm-nested-list")?.announce(this.t("moved",{label:this.label,position:e+1,total:t.length})),!0}render(){return c`
2492
+ `];$("cm-resource-list",xs);var hk=z("nestedItem",{reorder:"Reorder {label}",hint:"Press up or down arrow to move.",hintGroup:"Press up or down arrow to move. At either end of the list, the arrow moves it into the list before or after.",moved:"{label} moved to position {position} of {total}.",movedTo:"{label} moved to {list}, position {position} of {total}."}),mk=z("nestedList",{show:"Show {heading}",hide:"Hide {heading}"}),fh,re,Np,Ip,tf,rf,zi,af,sf,nf,Pp,of,ht=class ht extends T{constructor(){super();p(this,re);this.label="";this.value="";this.sortable=!1;this._hasChildren=!1;p(this,fh,this.attachInternals());p(this,zi,!1);r(this,fh).role="listitem"}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","listitem")}get list(){let e=this.parentElement;return e?.localName==="cm-nested-list"?e:null}moveToList(e,t){let i=this.list;if(!i||!e)return!1;if(e===i)return t===void 0?!1:this.moveTo(t);if(!i.group||e.group!==i.group)return!1;let a=e.items,l=Math.max(0,Math.min(a.length,t??a.length)),d={item:this,from:i.items.indexOf(this),to:l,fromList:i,toList:e};return this.dispatchEvent(new CustomEvent("cm-move",{detail:d,bubbles:!0,composed:!0,cancelable:!0}))?(e.insertBefore(this,a[l]??null),e.announce(this.t("movedTo",{label:this.label,list:e.heading,position:l+1,total:a.length+1})),!0):!1}get siblings(){return[...this.parentElement.children].filter(e=>e.localName==="cm-nested-item")}moveTo(e){let t=this.siblings,i=t.indexOf(this);if(e=Math.max(0,Math.min(t.length-1,e)),e===i)return!1;let a=new CustomEvent("cm-reorder",{detail:{item:this,from:i,to:e},bubbles:!0,composed:!0,cancelable:!0});if(!this.dispatchEvent(a))return!1;let l=t[e];return l.parentElement.insertBefore(this,e>i?l.nextSibling:l),this.closest("cm-nested-list")?.announce(this.t("moved",{label:this.label,position:e+1,total:t.length})),!0}render(){return c`
2481
2493
  <div class="row" part="row" @dragover=${s(this,re,nf)} @dragleave=${s(this,re,Pp)} @drop=${s(this,re,of)}>
2482
2494
  ${this.sortable?c`<button class="handle" type="button" part="handle" draggable="true" aria-label=${this.t("reorder",{label:this.label})}
2483
2495
  aria-describedby="hint"
@@ -2554,7 +2566,7 @@ cm-data-table:has(> table) { container-type: inline-size; }
2554
2566
  .title { font-size: var(--cm-type-heading-sm-size); line-height: var(--cm-type-heading-sm-line-height); }
2555
2567
  .rows { margin-inline-start: var(--cm-space-8); }
2556
2568
  }
2557
- `];$("cm-nested-list",$s);var hf=(o,n,e)=>{let t=new Map;for(let i=n;i<=e;i++)t.set(o[i],i);return t},mf=Gr(class extends ti{constructor(o){if(super(o),o.type!==ot.CHILD)throw Error("repeat() can only be used in text expressions")}dt(o,n,e){let t;e===void 0?e=n:n!==void 0&&(t=n);let i=[],a=[],l=0;for(let d of o)i[l]=t?t(d,l):l,a[l]=e(d,l),l++;return{values:a,keys:i}}render(o,n,e){return this.dt(o,n,e).values}update(o,[n,e,t]){let i=mg(o),{values:a,keys:l}=this.dt(n,e,t);if(!Array.isArray(i))return this.ut=l,a;let d=this.ut??=[],m=[],u,v,b=0,w=i.length-1,y=0,M=a.length-1;for(;b<=w&&y<=M;)if(i[b]===null)b++;else if(i[w]===null)w--;else if(d[b]===l[y])m[y]=ii(i[b],a[y]),b++,y++;else if(d[w]===l[M])m[M]=ii(i[w],a[M]),w--,M--;else if(d[b]===l[M])m[M]=ii(i[b],a[M]),Yr(o,m[M+1],i[b]),b++,M--;else if(d[w]===l[y])m[y]=ii(i[w],a[y]),Yr(o,i[b],i[w]),w--,y++;else if(u===void 0&&(u=hf(l,y,M),v=hf(d,b,w)),u.has(d[b]))if(u.has(d[w])){let D=v.get(l[y]),H=D!==void 0?i[D]:null;if(H===null){let q=Yr(o,i[b]);ii(q,a[y]),m[y]=q}else m[y]=ii(H,a[y]),Yr(o,i[b],H),i[D]=null;y++}else zc(i[w]),w--;else zc(i[b]),b++;for(;y<=M;){let D=Yr(o,m[M+1]);ii(D,a[y]),m[y++]=D}for(;b<=w;){let D=i[b++];D!==null&&zc(D)}return this.ut=l,Tc(o,m),we}});function pf(o,n,e){let t=l=>e.slotCount(l),i=l=>Math.max(0,t(l)-1),a=l=>{for(let d=n.group+l;d>=0&&d<e.groupCount();d+=l)if(t(d)>0)return{group:d,index:Math.min(n.index,i(d))};return{...n}};switch(o){case"ArrowRight":return a(1);case"ArrowLeft":return a(-1);case"ArrowDown":return{group:n.group,index:Math.min(n.index+1,i(n.group))};case"ArrowUp":return{group:n.group,index:Math.max(n.index-1,0)};case"Home":return{group:n.group,index:0};case"End":return{group:n.group,index:i(n.group)};default:return null}}var le,Ue,Ve,xr=class{constructor(n){p(this,le);p(this,Ue,null);p(this,Ve,null);g(this,le,n)}get active(){return r(this,Ue)!==null}get from(){return r(this,Ue)&&{...r(this,Ue)}}get target(){return r(this,Ve)&&{...r(this,Ve)}}groupCount(){return r(this,le).groupCount()}slotCount(n){return n>=0&&n<r(this,le).groupCount()?r(this,le).slotCount(n):0}pickUp(n){this.active&&this.cancel(),g(this,Ue,{...n}),g(this,Ve,{...n}),r(this,le).onTarget?.(this.target),r(this,le).announce(r(this,le).messages.pickedUp(this.target))}moveTo(n){if(!r(this,Ve))return;let e=Math.max(0,Math.min(n.group,r(this,le).groupCount()-1)),t=this.slotCount(e);t<=0||(g(this,Ve,{group:e,index:Math.max(0,Math.min(n.index,t-1))}),r(this,le).onTarget?.(this.target),r(this,le).announce(r(this,le).messages.over(this.target)))}drop(){if(!r(this,Ue)||!r(this,Ve))return;let n=r(this,Ue),e=r(this,Ve);g(this,Ue,g(this,Ve,null)),r(this,le).onTarget?.(null),r(this,le).onDrop(n,e)}cancel(n=!1){if(!r(this,Ue))return;let e=r(this,Ue),t=n?"":r(this,le).messages.cancelled(e);g(this,Ue,g(this,Ve,null)),r(this,le).onTarget?.(null),r(this,le).onCancel?.(e),t&&r(this,le).announce(t)}handleKey(n,e=n.key){if(!this.active||n.altKey||n.ctrlKey||n.metaKey)return!1;if(e===" "||e==="Enter")return this.drop(),!0;if(e==="Escape")return this.cancel(),!0;if(e==="Tab")return this.cancel(),!1;let t=(r(this,le).navigate??pf)(e,r(this,Ve),this);return t?(this.moveTo(t),!0):!1}};le=new WeakMap,Ue=new WeakMap,Ve=new WeakMap;var Go,yr,wr=class{constructor(n=document,e="assertive"){p(this,Go);p(this,yr);let t=n.createElement("div");t.setAttribute("aria-live",e),t.setAttribute("aria-atomic","true"),t.className="cm-announcer",Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",border:"0"}),this.element=t}get text(){return r(this,yr)??this.element.textContent??""}announce(n){clearTimeout(r(this,Go)),this.element.textContent===n?(this.element.textContent="",g(this,yr,n),g(this,Go,setTimeout(()=>{this.element.textContent=n,g(this,yr,void 0)},50))):(g(this,yr,void 0),this.element.textContent=n)}};Go=new WeakMap,yr=new WeakMap;var zk=z("boardCard",{roleDescription:"movable card",instructions:"Press Space to pick up. Then use the arrow keys to choose a column and a position, Space or Enter to drop, and Escape to cancel.",openHint:"Press Enter to open.",saving:"Saving"}),_k=z("boardColumn",{count:{one:"{count} card",other:"{count} cards"},loadMore:"Load more",loading:"Loading {column}",empty:"No cards"}),Ck=z("board",{label:"Board",pickedUp:"Picked up {card}. Column {column}, position {position} of {count}.",over:"Column {column}, position {position} of {count}.",moved:"Moved {card} to {column}, position {position} of {count}.",sameSpot:"{card} dropped where it started.",cancelled:"Move cancelled. {card} is back in {column}.",refused:"{card} can't be moved to {column}.",reverted:"Couldn't move {card}. It is back in {column}."}),zy="input, select, textarea, [contenteditable], cm-action-menu, cm-select, cm-text-field, [data-no-drag]",Yo,wh,uf,$r=class extends T{constructor(){super(...arguments);p(this,wh);this.value="";this.label="";this.heading="";this.href="";this.locked=!1;this.pending=!1;this.moving=!1;this._badges=!1;this._slottedTitle="";p(this,Yo,A("cm-bc"))}get name(){let e=i=>(i??"").replace(/\s+/g," ").trim();if(this.label)return this.label;if(this.heading)return this.heading;let t=this.querySelector(':scope > [slot="heading"]');return t?e(t.textContent):e(this.textContent).slice(0,80)}get key(){return this.value||this.name}get opener(){if(this.href)return this.renderRoot?.querySelector(".title a")??null;let e=this.querySelector(':scope > [slot="heading"]');return e?e.matches("a[href], button, cm-button")?e:e.querySelector("a[href], button, cm-button"):null}focusHandle(e){let t=this.renderRoot?.querySelector(".handle");t?t.focus(e):this.focus(e)}open(){let e=this.opener;return e?(e.click(),!0):!1}render(){let e=!!(this.href||this.querySelector(':scope > [slot="heading"] a[href], :scope > [slot="heading"] button, :scope > a[slot="heading"][href], :scope > button[slot="heading"]')),t=this.pending;return c`<div class="card" part="card">
2569
+ `];$("cm-nested-list",$s);var hf=(o,n,e)=>{let t=new Map;for(let i=n;i<=e;i++)t.set(o[i],i);return t},mf=Gr(class extends ti{constructor(o){if(super(o),o.type!==ot.CHILD)throw Error("repeat() can only be used in text expressions")}dt(o,n,e){let t;e===void 0?e=n:n!==void 0&&(t=n);let i=[],a=[],l=0;for(let d of o)i[l]=t?t(d,l):l,a[l]=e(d,l),l++;return{values:a,keys:i}}render(o,n,e){return this.dt(o,n,e).values}update(o,[n,e,t]){let i=mg(o),{values:a,keys:l}=this.dt(n,e,t);if(!Array.isArray(i))return this.ut=l,a;let d=this.ut??=[],m=[],u,v,b=0,w=i.length-1,y=0,M=a.length-1;for(;b<=w&&y<=M;)if(i[b]===null)b++;else if(i[w]===null)w--;else if(d[b]===l[y])m[y]=ii(i[b],a[y]),b++,y++;else if(d[w]===l[M])m[M]=ii(i[w],a[M]),w--,M--;else if(d[b]===l[M])m[M]=ii(i[b],a[M]),Yr(o,m[M+1],i[b]),b++,M--;else if(d[w]===l[y])m[y]=ii(i[w],a[y]),Yr(o,i[b],i[w]),w--,y++;else if(u===void 0&&(u=hf(l,y,M),v=hf(d,b,w)),u.has(d[b]))if(u.has(d[w])){let D=v.get(l[y]),H=D!==void 0?i[D]:null;if(H===null){let q=Yr(o,i[b]);ii(q,a[y]),m[y]=q}else m[y]=ii(H,a[y]),Yr(o,i[b],H),i[D]=null;y++}else zc(i[w]),w--;else zc(i[b]),b++;for(;y<=M;){let D=Yr(o,m[M+1]);ii(D,a[y]),m[y++]=D}for(;b<=w;){let D=i[b++];D!==null&&zc(D)}return this.ut=l,Tc(o,m),we}});function pf(o,n,e){let t=l=>e.slotCount(l),i=l=>Math.max(0,t(l)-1),a=l=>{for(let d=n.group+l;d>=0&&d<e.groupCount();d+=l)if(t(d)>0)return{group:d,index:Math.min(n.index,i(d))};return{...n}};switch(o){case"ArrowRight":return a(1);case"ArrowLeft":return a(-1);case"ArrowDown":return{group:n.group,index:Math.min(n.index+1,i(n.group))};case"ArrowUp":return{group:n.group,index:Math.max(n.index-1,0)};case"Home":return{group:n.group,index:0};case"End":return{group:n.group,index:i(n.group)};default:return null}}var le,Ue,Ve,xr=class{constructor(n){p(this,le);p(this,Ue,null);p(this,Ve,null);g(this,le,n)}get active(){return r(this,Ue)!==null}get from(){return r(this,Ue)&&{...r(this,Ue)}}get target(){return r(this,Ve)&&{...r(this,Ve)}}groupCount(){return r(this,le).groupCount()}slotCount(n){return n>=0&&n<r(this,le).groupCount()?r(this,le).slotCount(n):0}pickUp(n){this.active&&this.cancel(),g(this,Ue,{...n}),g(this,Ve,{...n}),r(this,le).onTarget?.(this.target),r(this,le).announce(r(this,le).messages.pickedUp(this.target))}moveTo(n){if(!r(this,Ve))return;let e=Math.max(0,Math.min(n.group,r(this,le).groupCount()-1)),t=this.slotCount(e);t<=0||(g(this,Ve,{group:e,index:Math.max(0,Math.min(n.index,t-1))}),r(this,le).onTarget?.(this.target),r(this,le).announce(r(this,le).messages.over(this.target)))}drop(){if(!r(this,Ue)||!r(this,Ve))return;let n=r(this,Ue),e=r(this,Ve);g(this,Ue,g(this,Ve,null)),r(this,le).onTarget?.(null),r(this,le).onDrop(n,e)}cancel(n=!1){if(!r(this,Ue))return;let e=r(this,Ue),t=n?"":r(this,le).messages.cancelled(e);g(this,Ue,g(this,Ve,null)),r(this,le).onTarget?.(null),r(this,le).onCancel?.(e),t&&r(this,le).announce(t)}handleKey(n,e=n.key){if(!this.active||n.altKey||n.ctrlKey||n.metaKey)return!1;if(e===" "||e==="Enter")return this.drop(),!0;if(e==="Escape")return this.cancel(),!0;if(e==="Tab")return this.cancel(),!1;let t=(r(this,le).navigate??pf)(e,r(this,Ve),this);return t?(this.moveTo(t),!0):!1}};le=new WeakMap,Ue=new WeakMap,Ve=new WeakMap;var Go,yr,wr=class{constructor(n=document,e="assertive"){p(this,Go);p(this,yr);let t=n.createElement("div");t.setAttribute("aria-live",e),t.setAttribute("aria-atomic","true"),t.className="cm-announcer",Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",border:"0"}),this.element=t}get text(){return r(this,yr)??this.element.textContent??""}announce(n){clearTimeout(r(this,Go)),this.element.textContent===n?(this.element.textContent="",g(this,yr,n),g(this,Go,setTimeout(()=>{this.element.textContent=n,g(this,yr,void 0)},50))):(g(this,yr,void 0),this.element.textContent=n)}};Go=new WeakMap,yr=new WeakMap;var Ck=z("boardCard",{roleDescription:"movable card",instructions:"Press Space to pick up. Then use the arrow keys to choose a column and a position, Space or Enter to drop, and Escape to cancel.",openHint:"Press Enter to open.",saving:"Saving"}),Sk=z("boardColumn",{count:{one:"{count} card",other:"{count} cards"},loadMore:"Load more",loading:"Loading {column}",empty:"No cards"}),Lk=z("board",{label:"Board",pickedUp:"Picked up {card}. Column {column}, position {position} of {count}.",over:"Column {column}, position {position} of {count}.",moved:"Moved {card} to {column}, position {position} of {count}.",sameSpot:"{card} dropped where it started.",cancelled:"Move cancelled. {card} is back in {column}.",refused:"{card} can't be moved to {column}.",reverted:"Couldn't move {card}. It is back in {column}."}),zy="input, select, textarea, [contenteditable], cm-action-menu, cm-select, cm-text-field, [data-no-drag]",Yo,wh,uf,$r=class extends T{constructor(){super(...arguments);p(this,wh);this.value="";this.label="";this.heading="";this.href="";this.locked=!1;this.pending=!1;this.moving=!1;this._badges=!1;this._slottedTitle="";p(this,Yo,A("cm-bc"))}get name(){let e=i=>(i??"").replace(/\s+/g," ").trim();if(this.label)return this.label;if(this.heading)return this.heading;let t=this.querySelector(':scope > [slot="heading"]');return t?e(t.textContent):e(this.textContent).slice(0,80)}get key(){return this.value||this.name}get opener(){if(this.href)return this.renderRoot?.querySelector(".title a")??null;let e=this.querySelector(':scope > [slot="heading"]');return e?e.matches("a[href], button, cm-button")?e:e.querySelector("a[href], button, cm-button"):null}focusHandle(e){let t=this.renderRoot?.querySelector(".handle");t?t.focus(e):this.focus(e)}open(){let e=this.opener;return e?(e.click(),!0):!1}render(){let e=!!(this.href||this.querySelector(':scope > [slot="heading"] a[href], :scope > [slot="heading"] button, :scope > a[slot="heading"][href], :scope > button[slot="heading"]')),t=this.pending;return c`<div class="card" part="card">
2558
2570
  ${this.locked?h:c`<div class="handle" part="handle" tabindex="0" role="button" aria-roledescription=${this.t("roleDescription")}
2559
2571
  aria-label=${t?`${this.name}, ${this.t("saving")}`:this.name} aria-describedby="${r(this,Yo)}-help"></div>`}
2560
2572
  <div class="content">
@@ -2661,7 +2673,7 @@ cm-data-table:has(> table) { container-type: inline-size; }
2661
2673
  ::slotted(cm-board-column) { inline-size: calc(100% - 40px); scroll-snap-align: start; }
2662
2674
  ::slotted(cm-board-column[collapsed]) { inline-size: 48px; }
2663
2675
  }
2664
- `];$("cm-board",Ms);var Ik=z("calendar",{label:"Calendar",previousMonth:"Previous month",nextMonth:"Next month",previousWeek:"Previous week",nextWeek:"Next week",previousDays:"Previous {count} days",nextDays:"Next {count} days",previousDay:"Previous day",nextDay:"Next day",today:"Today",views:"View",month:"Month",week:"Week",day:"Day",allDay:"All day",time:"Time",add:"Add",addOn:"Add on {date}",addAllDay:"Add an all-day event on {date}",addAt:"Add at {time}, {date}",more:"+{count} more",moreLabel:"{count} more on {date}",dayEvents:{one:"{date}, {count} event",other:"{date}, {count} events"},noEvents:"No events",loading:"Loading events",timeRange:"{start} to {end}",timed:"{date}, {time}",allDayOn:"{date}, all day",allDayRange:"{start} to {end}, all day",eventName:"{title}, {when}",eventNameKind:"{title}, {when}, {kind}",roleDescription:"movable event",openHint:"Press Enter to open.",instructions:"Press Space to pick up, then the arrow keys to choose a day or time, Space or Enter to drop and Escape to cancel.",gridHelp:"Use the arrow keys to move between days, times and events, and Page Up and Page Down for the previous or next period.",saving:"Saving",pickedUp:"Picked up {event}. {place}.",over:"{place}.",moved:"Moved {event} to {place}.",sameSpot:"{event} dropped where it started.",cancelled:"Move cancelled. {event} is back on {place}.",refused:"{event} can't be moved to {place}.",reverted:"Couldn't move {event}. It is back on {place}."}),Ls=class extends S{constructor(){super(...arguments);this.value="";this.heading="";this.label="";this.start="";this.end="";this.allDay=!1;this.kind="";this.tone="neutral";this.icon="";this.href="";this.locked=!1;this.pending=!1;this.moving=!1}get name(){return this.label||this.heading||(this.textContent??"").replace(/\s+/g," ").trim()}get key(){return this.value||this.name}updated(){let e=this.parentElement;e?.localName==="cm-calendar"&&e.requestUpdate()}render(){return h}};Ls.properties={value:{reflect:!0},heading:{},label:{},start:{},end:{},allDay:{type:Boolean,attribute:"all-day",reflect:!0},kind:{},tone:{reflect:!0},icon:{},href:{},locked:{type:Boolean,reflect:!0},pending:{type:Boolean,reflect:!0},moving:{type:Boolean,reflect:!0}},Ls.styles=x`:host { display: none !important; }`;$("cm-calendar-event",Ls);var _h=o=>String(o).padStart(2,"0"),Ef=o=>`${P(o)}T${_h(o.getHours())}:${_h(o.getMinutes())}`,$h=(o,n)=>Math.round((Date.UTC(n.getFullYear(),n.getMonth(),n.getDate())-Date.UTC(o.getFullYear(),o.getMonth(),o.getDate()))/864e5),Mf=["month","week","day"],_y=600,Tf=new Map,zf=(o,n)=>{let e=`${o}|${JSON.stringify(n)}`,t=Tf.get(e);return t||(t=new Intl.DateTimeFormat(o,n),Tf.set(e,t)),t},Gp=o=>o.replace(/[  ]/g," ").trim(),As,Se,Le,xe,Z,Q,Tr,Et,We,ul,Di,Rs,Hs,Ns,Is,gl,f,Ee,Si,nl,kh,kt,Yp,ol,mt,Xp,_f,pt,Cs,Cf,Sf,Ke,ll,cl,Eh,Lf,Df,Af,Mr,Jp,dl,Rf,hl,Hf,Nf,If,Pf,bl,fl,Of,qf,vl,ml,Bf,Zp,Qp,eu,Ff,jf,tu,iu,ru,yl,au,Uf,xl,wl,$l,kl,El,Ml,su,Mh,Vf,Li,pl,Kf,nu,Wf,Th,ou,Ss,zh,Gf,Yf,Xf,Jf,Zf,Ds=class extends T{constructor(){super();p(this,f);this.view="month";this.date="";this.today="";this.step=15;p(this,As,"");this.hourCycle="";this.dayStart=8;this.maxEvents=3;this.headingLevel=2;this.loading=!1;this.readonly=!1;this.controlled=!1;this.dragging=!1;this._narrow=!1;this._more="";this._target=null;p(this,Se,A("cm-cal"));p(this,Le,new wr);p(this,xe);p(this,Z,null);p(this,Q,null);p(this,Tr,new WeakMap);p(this,Et,"");p(this,We,null);p(this,ul,"");p(this,Di,!0);p(this,Rs,0);p(this,Hs,!1);p(this,Ns);p(this,Is,0);p(this,gl,new MutationObserver(()=>this.requestUpdate()));p(this,bl,e=>{let t=e.composedPath()[0];if(t instanceof HTMLElement&&t.classList.contains("item")&&t.dataset.k){g(this,Et,t.dataset.k);for(let i of s(this,f,hl).call(this))i.tabIndex=i===t?0:-1}});p(this,fl,e=>{let t=e.relatedTarget;if(this._more&&!r(this,Z)){let i=this.renderRoot.querySelector(".pop"),a=e.composedPath()[0];i&&i.contains(a)&&!(t&&i.contains(t))&&queueMicrotask(()=>{i.contains(this.renderRoot.activeElement)||(this._more="")})}!r(this,xe).active||!r(this,Z)||!t&&document.hasFocus()===!1||this.updateComplete.then(()=>setTimeout(()=>{if(!r(this,xe).active||!r(this,Z))return;this.renderRoot.activeElement?.dataset.ev!==r(this,Z).ev.key&&r(this,xe).cancel()}))});p(this,vl,e=>{if(r(this,Q)?.started&&e.key==="Escape"){e.preventDefault(),this.cancelMove();return}let t=J(e,this);if(r(this,xe).active){r(this,xe).handleKey(e,t)&&(e.preventDefault(),e.stopPropagation());return}if(e.altKey||e.ctrlKey||e.metaKey)return;let i=e.composedPath()[0];if(!(i instanceof HTMLElement)||i.getRootNode()!==this.renderRoot)return;let a=i.closest(".pop");if(a&&e.key==="Escape"){e.preventDefault(),s(this,f,Th).call(this,!0);return}if(i.dataset.ev&&e.key===" "){e.preventDefault(),g(this,Rs,performance.now()+400),this.pickUp(i.dataset.ev,i.dataset.day);return}if(a&&(t==="ArrowDown"||t==="ArrowUp")){let d=[...a.querySelectorAll(".chip")],m=d[d.indexOf(i)+(t==="ArrowDown"?1:-1)];m&&(e.preventDefault(),m.focus());return}if(!i.classList.contains("item"))return;if(e.key==="PageUp"||e.key==="PageDown"){e.preventDefault(),s(this,f,qf).call(this,i,e.key==="PageUp"?-1:1);return}let l=s(this,f,Of).call(this,i,t);l?(e.preventDefault(),s(this,f,Pf).call(this,l)):(t.startsWith("Arrow")||t==="Home"||t==="End")&&e.preventDefault()});p(this,yl,e=>{e.composedPath().some(t=>t.dataset?.ev)&&e.preventDefault()});p(this,xl,e=>{if(r(this,Q)||this.readonly||!e.isPrimary||e.pointerType==="mouse"&&e.button!==0)return;let t=e.composedPath().find(m=>m.dataset?.ev);if(!t)return;let i=this.event(t.dataset.ev),a=i&&s(this,f,Cs).call(this,i);if(!a||i.locked||i.pending)return;let l=s(this,f,Qp).call(this,a,t.dataset.day??a.days[0]);if(!l)return;r(this,xe).active&&r(this,xe).cancel();let d=0;if(l.mode==="time"){let m=s(this,f,au).call(this,e.clientX,e.clientY);m&&t.classList.contains("time")&&(d=Math.max(0,Math.min(a.dur,m.min-a.min)))}g(this,Q,{...l,pointerId:e.pointerId,type:e.pointerType,x0:e.clientX,y0:e.clientY,x:e.clientX,y:e.clientY,started:!1,grab:d,to:{...l.from}}),e.pointerType!=="mouse"&&(r(this,Q).timer=setTimeout(()=>{r(this,Q)&&!r(this,Q).started&&s(this,f,su).call(this)},300)),window.addEventListener("pointermove",r(this,kl),!0),window.addEventListener("pointerup",r(this,El),!0),window.addEventListener("pointercancel",r(this,Ml),!0),window.addEventListener("touchmove",r(this,wl),{capture:!0,passive:!1}),window.addEventListener("contextmenu",r(this,$l),!0)});p(this,wl,e=>{r(this,Q)?.started&&e.cancelable&&e.preventDefault()});p(this,$l,e=>{r(this,Q)&&e.preventDefault()});p(this,kl,e=>{let t=r(this,Q);if(!(!t||e.pointerId!==t.pointerId)){if(t.x=e.clientX,t.y=e.clientY,!t.started){let i=Math.hypot(t.x-t.x0,t.y-t.y0);(t.type==="mouse"?i>4:i>8)&&(t.type==="mouse"?s(this,f,su).call(this):s(this,f,Li).call(this,!1));return}e.preventDefault(),s(this,f,Mh).call(this)}});p(this,El,e=>{let t=r(this,Q);if(!t||e.pointerId!==t.pointerId)return;if(!t.started){s(this,f,Li).call(this,!1);return}let i=a=>{a.stopPropagation(),a.preventDefault()};window.addEventListener("click",i,{capture:!0,once:!0}),setTimeout(()=>window.removeEventListener("click",i,!0),0),s(this,f,Li).call(this,!0)});p(this,Ml,e=>{r(this,Q)&&e.pointerId===r(this,Q).pointerId&&s(this,f,Li).call(this,!1)});g(this,xe,new xr({groupCount:()=>s(this,f,pt).call(this).length,slotCount:()=>r(this,Z)?r(this,Z).mode==="day"?1:s(this,f,ml).call(this,r(this,Z).ev.dur):0,navigate:(e,t)=>s(this,f,Bf).call(this,e,t),onTarget:e=>s(this,f,Ff).call(this,e),onDrop:(e,t)=>s(this,f,jf).call(this,e,t),onCancel:()=>s(this,f,eu).call(this),messages:{pickedUp:e=>this.t("pickedUp",{event:r(this,Z)?.ev.name??"",place:s(this,f,Mr).call(this,r(this,Z),e)}),over:e=>this.t("over",{place:s(this,f,Mr).call(this,r(this,Z),e)}),cancelled:e=>this.t("cancelled",{event:r(this,Z)?.ev.name??"",place:s(this,f,Mr).call(this,r(this,Z),e)})},announce:e=>r(this,Le).announce(e)}))}get locale(){return r(this,As)}set locale(e){let t=r(this,As);g(this,As,e??""),this.requestUpdate("locale",t)}get events(){return[...this.children].filter(e=>e.localName==="cm-calendar-event")}event(e){return this.events.find(t=>t.key===e)}get range(){let e=s(this,f,pt).call(this);return{view:r(this,f,Ee),start:P(e[0]),end:P(e[e.length-1])}}get heldEvent(){return r(this,Z)?.ev.el??null}get announcement(){return r(this,Le).text}announce(e){r(this,Le).announce(e)}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",r(this,vl)),this.addEventListener("focusin",r(this,bl)),this.addEventListener("focusout",r(this,fl)),this.addEventListener("pointerdown",r(this,xl)),this.addEventListener("dragstart",r(this,yl)),r(this,gl).observe(this,{childList:!0}),typeof ResizeObserver<"u"&&(g(this,Ns,new ResizeObserver(()=>{cancelAnimationFrame(r(this,Is)),g(this,Is,requestAnimationFrame(()=>s(this,f,Jp).call(this)))})),r(this,Ns).observe(this)),s(this,f,Jp).call(this)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",r(this,vl)),this.removeEventListener("focusin",r(this,bl)),this.removeEventListener("focusout",r(this,fl)),this.removeEventListener("pointerdown",r(this,xl)),this.removeEventListener("dragstart",r(this,yl)),r(this,gl).disconnect(),r(this,Ns)?.disconnect(),cancelAnimationFrame(r(this,Is)),r(this,xe).cancel(!0),s(this,f,Li).call(this,!1)}willUpdate(e){e.has("view")&&(g(this,Di,!0),e.get("view")!==void 0&&(this._more="",r(this,xe).cancel(!0))),(e.has("date")||e.has("_narrow"))&&(this._more=this._more&&this.range.start<=this._more&&this._more<=this.range.end?this._more:"")}firstUpdated(){this.renderRoot.appendChild(r(this,Le).element)}scrollToHour(e){let t=this.renderRoot.querySelector(".tg"),i=t?.querySelector(".tcell");!t||!i||(t.scrollTop=i.offsetHeight*Math.max(0,Math.min(23,Math.trunc(Number(e))||0)))}updated(e){if(e.has("dayStart")&&e.get("dayStart")!==void 0&&g(this,Di,!0),s(this,f,If).call(this),r(this,We)){let l=s(this,f,Hf).call(this,r(this,We).key);l?(g(this,We,null),l.focus({preventScroll:!1})):Date.now()>r(this,We).until&&g(this,We,null)}r(this,Hs)&&(g(this,Hs,!1),(this.renderRoot.querySelector(".pop .chip")??this.renderRoot.querySelector(".pop button"))?.focus());let t=this.renderRoot.querySelector(".tg");if(t&&r(this,Di)){let l=t.querySelector(".tcell"),d=Math.max(0,Math.min(23,Math.trunc(Number(this.dayStart))||0));l&&(t.scrollTop=l.offsetHeight*d),g(this,Di,!1)}t||g(this,Di,!0),r(this,Z)&&this._target&&this.renderRoot.querySelector(".ph")?.scrollIntoView?.({block:"nearest",inline:"nearest"});let i=this.range,a=`${i.view}|${i.start}|${i.end}`;a!==r(this,ul)&&(g(this,ul,a),this.dispatchEvent(new CustomEvent("cm-range-change",{detail:i,bubbles:!0,composed:!0})))}previous(){this.date=P(s(this,f,dl).call(this,r(this,f,mt),-1))}next(){this.date=P(s(this,f,dl).call(this,r(this,f,mt),1))}goToToday(){this.date=r(this,f,ol)}pickUp(e,t){let i=typeof e=="string"?this.event(e):e;if(!i||i.locked||i.pending||this.readonly)return!1;let a=s(this,f,Cs).call(this,i);if(!a)return!1;let l=s(this,f,pt).call(this).map(P),d=t&&a.days.includes(t)&&l.includes(t)?t:a.days.find(v=>l.includes(v));if(!d)return!1;let m=s(this,f,Qp).call(this,a,d);if(!m)return!1;s(this,f,Li).call(this,!1),r(this,xe).cancel(!0),this._more="",g(this,Z,m),i.moving=!0;let u=`ev:${a.key}:${d}`;return g(this,Et,u),g(this,We,{key:u,until:Date.now()+1e3}),this.requestUpdate(),r(this,xe).pickUp(m.from),!0}cancelMove(){let e=r(this,Q);e?.started&&(s(this,f,Li).call(this,!1),r(this,Le).announce(this.t("cancelled",{event:e.ev.name,place:s(this,f,Mr).call(this,e,e.from)}))),r(this,xe).cancel()}moveEvent(e,t,i){let a=typeof e=="string"?this.event(e):e,l=a&&s(this,f,Cs).call(this,a);if(!l)return!1;let d=l.allDay?N(Qe(t).date||t):vt(t);if(!d)return!1;let m=i?l.allDay?N(Qe(i).date||i):vt(i):null;return(!m||m<d)&&(m=l.allDay?G(d,$h(l.start,l.end)):new Date(d.getTime()+l.dur*6e4)),s(this,f,ru).call(this,l,d,m,"api",!1,P(d))}revert(e){let t=typeof e=="string"?this.event(e):e;if(!t)return!1;t.pending=!1;let i=r(this,Tr).get(t);if(this.controlled||!i)return!1;r(this,Tr).delete(t);let a=this.renderRoot.activeElement?.dataset.ev===t.key;t.start=i.start,t.end=i.end;let l=s(this,f,Cs).call(this,t);return l&&a&&g(this,We,{key:`ev:${l.key}:${l.days[0]}`,until:Date.now()+1e3}),r(this,Le).announce(this.t("reverted",{event:t.name,place:l?s(this,f,Eh).call(this,l):i.start})),!0}render(){let e=s(this,f,pt).call(this),t=s(this,f,Sf).call(this,s(this,f,Cf).call(this));return c`<div class="cal ${this._narrow?"narrow":""}" role="group" aria-label=${this.label}>
2676
+ `];$("cm-board",Ms);var Ok=z("calendar",{label:"Calendar",previousMonth:"Previous month",nextMonth:"Next month",previousWeek:"Previous week",nextWeek:"Next week",previousDays:"Previous {count} days",nextDays:"Next {count} days",previousDay:"Previous day",nextDay:"Next day",today:"Today",views:"View",month:"Month",week:"Week",day:"Day",allDay:"All day",time:"Time",add:"Add",addOn:"Add on {date}",addAllDay:"Add an all-day event on {date}",addAt:"Add at {time}, {date}",more:"+{count} more",moreLabel:"{count} more on {date}",dayEvents:{one:"{date}, {count} event",other:"{date}, {count} events"},noEvents:"No events",loading:"Loading events",timeRange:"{start} to {end}",timed:"{date}, {time}",allDayOn:"{date}, all day",allDayRange:"{start} to {end}, all day",eventName:"{title}, {when}",eventNameKind:"{title}, {when}, {kind}",roleDescription:"movable event",openHint:"Press Enter to open.",instructions:"Press Space to pick up, then the arrow keys to choose a day or time, Space or Enter to drop and Escape to cancel.",gridHelp:"Use the arrow keys to move between days, times and events, and Page Up and Page Down for the previous or next period.",saving:"Saving",pickedUp:"Picked up {event}. {place}.",over:"{place}.",moved:"Moved {event} to {place}.",sameSpot:"{event} dropped where it started.",cancelled:"Move cancelled. {event} is back on {place}.",refused:"{event} can't be moved to {place}.",reverted:"Couldn't move {event}. It is back on {place}."}),Ls=class extends S{constructor(){super(...arguments);this.value="";this.heading="";this.label="";this.start="";this.end="";this.allDay=!1;this.kind="";this.tone="neutral";this.icon="";this.href="";this.locked=!1;this.pending=!1;this.moving=!1}get name(){return this.label||this.heading||(this.textContent??"").replace(/\s+/g," ").trim()}get key(){return this.value||this.name}updated(){let e=this.parentElement;e?.localName==="cm-calendar"&&e.requestUpdate()}render(){return h}};Ls.properties={value:{reflect:!0},heading:{},label:{},start:{},end:{},allDay:{type:Boolean,attribute:"all-day",reflect:!0},kind:{},tone:{reflect:!0},icon:{},href:{},locked:{type:Boolean,reflect:!0},pending:{type:Boolean,reflect:!0},moving:{type:Boolean,reflect:!0}},Ls.styles=x`:host { display: none !important; }`;$("cm-calendar-event",Ls);var _h=o=>String(o).padStart(2,"0"),Ef=o=>`${P(o)}T${_h(o.getHours())}:${_h(o.getMinutes())}`,$h=(o,n)=>Math.round((Date.UTC(n.getFullYear(),n.getMonth(),n.getDate())-Date.UTC(o.getFullYear(),o.getMonth(),o.getDate()))/864e5),Mf=["month","week","day"],_y=600,Tf=new Map,zf=(o,n)=>{let e=`${o}|${JSON.stringify(n)}`,t=Tf.get(e);return t||(t=new Intl.DateTimeFormat(o,n),Tf.set(e,t)),t},Gp=o=>o.replace(/[  ]/g," ").trim(),As,Se,Le,xe,Z,Q,Tr,Et,We,ul,Di,Rs,Hs,Ns,Is,gl,f,Ee,Si,nl,kh,kt,Yp,ol,mt,Xp,_f,pt,Cs,Cf,Sf,Ke,ll,cl,Eh,Lf,Df,Af,Mr,Jp,dl,Rf,hl,Hf,Nf,If,Pf,bl,fl,Of,qf,vl,ml,Bf,Zp,Qp,eu,Ff,jf,tu,iu,ru,yl,au,Uf,xl,wl,$l,kl,El,Ml,su,Mh,Vf,Li,pl,Kf,nu,Wf,Th,ou,Ss,zh,Gf,Yf,Xf,Jf,Zf,Ds=class extends T{constructor(){super();p(this,f);this.view="month";this.date="";this.today="";this.step=15;p(this,As,"");this.hourCycle="";this.dayStart=8;this.maxEvents=3;this.headingLevel=2;this.loading=!1;this.readonly=!1;this.controlled=!1;this.dragging=!1;this._narrow=!1;this._more="";this._target=null;p(this,Se,A("cm-cal"));p(this,Le,new wr);p(this,xe);p(this,Z,null);p(this,Q,null);p(this,Tr,new WeakMap);p(this,Et,"");p(this,We,null);p(this,ul,"");p(this,Di,!0);p(this,Rs,0);p(this,Hs,!1);p(this,Ns);p(this,Is,0);p(this,gl,new MutationObserver(()=>this.requestUpdate()));p(this,bl,e=>{let t=e.composedPath()[0];if(t instanceof HTMLElement&&t.classList.contains("item")&&t.dataset.k){g(this,Et,t.dataset.k);for(let i of s(this,f,hl).call(this))i.tabIndex=i===t?0:-1}});p(this,fl,e=>{let t=e.relatedTarget;if(this._more&&!r(this,Z)){let i=this.renderRoot.querySelector(".pop"),a=e.composedPath()[0];i&&i.contains(a)&&!(t&&i.contains(t))&&queueMicrotask(()=>{i.contains(this.renderRoot.activeElement)||(this._more="")})}!r(this,xe).active||!r(this,Z)||!t&&document.hasFocus()===!1||this.updateComplete.then(()=>setTimeout(()=>{if(!r(this,xe).active||!r(this,Z))return;this.renderRoot.activeElement?.dataset.ev!==r(this,Z).ev.key&&r(this,xe).cancel()}))});p(this,vl,e=>{if(r(this,Q)?.started&&e.key==="Escape"){e.preventDefault(),this.cancelMove();return}let t=J(e,this);if(r(this,xe).active){r(this,xe).handleKey(e,t)&&(e.preventDefault(),e.stopPropagation());return}if(e.altKey||e.ctrlKey||e.metaKey)return;let i=e.composedPath()[0];if(!(i instanceof HTMLElement)||i.getRootNode()!==this.renderRoot)return;let a=i.closest(".pop");if(a&&e.key==="Escape"){e.preventDefault(),s(this,f,Th).call(this,!0);return}if(i.dataset.ev&&e.key===" "){e.preventDefault(),g(this,Rs,performance.now()+400),this.pickUp(i.dataset.ev,i.dataset.day);return}if(a&&(t==="ArrowDown"||t==="ArrowUp")){let d=[...a.querySelectorAll(".chip")],m=d[d.indexOf(i)+(t==="ArrowDown"?1:-1)];m&&(e.preventDefault(),m.focus());return}if(!i.classList.contains("item"))return;if(e.key==="PageUp"||e.key==="PageDown"){e.preventDefault(),s(this,f,qf).call(this,i,e.key==="PageUp"?-1:1);return}let l=s(this,f,Of).call(this,i,t);l?(e.preventDefault(),s(this,f,Pf).call(this,l)):(t.startsWith("Arrow")||t==="Home"||t==="End")&&e.preventDefault()});p(this,yl,e=>{e.composedPath().some(t=>t.dataset?.ev)&&e.preventDefault()});p(this,xl,e=>{if(r(this,Q)||this.readonly||!e.isPrimary||e.pointerType==="mouse"&&e.button!==0)return;let t=e.composedPath().find(m=>m.dataset?.ev);if(!t)return;let i=this.event(t.dataset.ev),a=i&&s(this,f,Cs).call(this,i);if(!a||i.locked||i.pending)return;let l=s(this,f,Qp).call(this,a,t.dataset.day??a.days[0]);if(!l)return;r(this,xe).active&&r(this,xe).cancel();let d=0;if(l.mode==="time"){let m=s(this,f,au).call(this,e.clientX,e.clientY);m&&t.classList.contains("time")&&(d=Math.max(0,Math.min(a.dur,m.min-a.min)))}g(this,Q,{...l,pointerId:e.pointerId,type:e.pointerType,x0:e.clientX,y0:e.clientY,x:e.clientX,y:e.clientY,started:!1,grab:d,to:{...l.from}}),e.pointerType!=="mouse"&&(r(this,Q).timer=setTimeout(()=>{r(this,Q)&&!r(this,Q).started&&s(this,f,su).call(this)},300)),window.addEventListener("pointermove",r(this,kl),!0),window.addEventListener("pointerup",r(this,El),!0),window.addEventListener("pointercancel",r(this,Ml),!0),window.addEventListener("touchmove",r(this,wl),{capture:!0,passive:!1}),window.addEventListener("contextmenu",r(this,$l),!0)});p(this,wl,e=>{r(this,Q)?.started&&e.cancelable&&e.preventDefault()});p(this,$l,e=>{r(this,Q)&&e.preventDefault()});p(this,kl,e=>{let t=r(this,Q);if(!(!t||e.pointerId!==t.pointerId)){if(t.x=e.clientX,t.y=e.clientY,!t.started){let i=Math.hypot(t.x-t.x0,t.y-t.y0);(t.type==="mouse"?i>4:i>8)&&(t.type==="mouse"?s(this,f,su).call(this):s(this,f,Li).call(this,!1));return}e.preventDefault(),s(this,f,Mh).call(this)}});p(this,El,e=>{let t=r(this,Q);if(!t||e.pointerId!==t.pointerId)return;if(!t.started){s(this,f,Li).call(this,!1);return}let i=a=>{a.stopPropagation(),a.preventDefault()};window.addEventListener("click",i,{capture:!0,once:!0}),setTimeout(()=>window.removeEventListener("click",i,!0),0),s(this,f,Li).call(this,!0)});p(this,Ml,e=>{r(this,Q)&&e.pointerId===r(this,Q).pointerId&&s(this,f,Li).call(this,!1)});g(this,xe,new xr({groupCount:()=>s(this,f,pt).call(this).length,slotCount:()=>r(this,Z)?r(this,Z).mode==="day"?1:s(this,f,ml).call(this,r(this,Z).ev.dur):0,navigate:(e,t)=>s(this,f,Bf).call(this,e,t),onTarget:e=>s(this,f,Ff).call(this,e),onDrop:(e,t)=>s(this,f,jf).call(this,e,t),onCancel:()=>s(this,f,eu).call(this),messages:{pickedUp:e=>this.t("pickedUp",{event:r(this,Z)?.ev.name??"",place:s(this,f,Mr).call(this,r(this,Z),e)}),over:e=>this.t("over",{place:s(this,f,Mr).call(this,r(this,Z),e)}),cancelled:e=>this.t("cancelled",{event:r(this,Z)?.ev.name??"",place:s(this,f,Mr).call(this,r(this,Z),e)})},announce:e=>r(this,Le).announce(e)}))}get locale(){return r(this,As)}set locale(e){let t=r(this,As);g(this,As,e??""),this.requestUpdate("locale",t)}get events(){return[...this.children].filter(e=>e.localName==="cm-calendar-event")}event(e){return this.events.find(t=>t.key===e)}get range(){let e=s(this,f,pt).call(this);return{view:r(this,f,Ee),start:P(e[0]),end:P(e[e.length-1])}}get heldEvent(){return r(this,Z)?.ev.el??null}get announcement(){return r(this,Le).text}announce(e){r(this,Le).announce(e)}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",r(this,vl)),this.addEventListener("focusin",r(this,bl)),this.addEventListener("focusout",r(this,fl)),this.addEventListener("pointerdown",r(this,xl)),this.addEventListener("dragstart",r(this,yl)),r(this,gl).observe(this,{childList:!0}),typeof ResizeObserver<"u"&&(g(this,Ns,new ResizeObserver(()=>{cancelAnimationFrame(r(this,Is)),g(this,Is,requestAnimationFrame(()=>s(this,f,Jp).call(this)))})),r(this,Ns).observe(this)),s(this,f,Jp).call(this)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",r(this,vl)),this.removeEventListener("focusin",r(this,bl)),this.removeEventListener("focusout",r(this,fl)),this.removeEventListener("pointerdown",r(this,xl)),this.removeEventListener("dragstart",r(this,yl)),r(this,gl).disconnect(),r(this,Ns)?.disconnect(),cancelAnimationFrame(r(this,Is)),r(this,xe).cancel(!0),s(this,f,Li).call(this,!1)}willUpdate(e){e.has("view")&&(g(this,Di,!0),e.get("view")!==void 0&&(this._more="",r(this,xe).cancel(!0))),(e.has("date")||e.has("_narrow"))&&(this._more=this._more&&this.range.start<=this._more&&this._more<=this.range.end?this._more:"")}firstUpdated(){this.renderRoot.appendChild(r(this,Le).element)}scrollToHour(e){let t=this.renderRoot.querySelector(".tg"),i=t?.querySelector(".tcell");!t||!i||(t.scrollTop=i.offsetHeight*Math.max(0,Math.min(23,Math.trunc(Number(e))||0)))}updated(e){if(e.has("dayStart")&&e.get("dayStart")!==void 0&&g(this,Di,!0),s(this,f,If).call(this),r(this,We)){let l=s(this,f,Hf).call(this,r(this,We).key);l?(g(this,We,null),l.focus({preventScroll:!1})):Date.now()>r(this,We).until&&g(this,We,null)}r(this,Hs)&&(g(this,Hs,!1),(this.renderRoot.querySelector(".pop .chip")??this.renderRoot.querySelector(".pop button"))?.focus());let t=this.renderRoot.querySelector(".tg");if(t&&r(this,Di)){let l=t.querySelector(".tcell"),d=Math.max(0,Math.min(23,Math.trunc(Number(this.dayStart))||0));l&&(t.scrollTop=l.offsetHeight*d),g(this,Di,!1)}t||g(this,Di,!0),r(this,Z)&&this._target&&this.renderRoot.querySelector(".ph")?.scrollIntoView?.({block:"nearest",inline:"nearest"});let i=this.range,a=`${i.view}|${i.start}|${i.end}`;a!==r(this,ul)&&(g(this,ul,a),this.dispatchEvent(new CustomEvent("cm-range-change",{detail:i,bubbles:!0,composed:!0})))}previous(){this.date=P(s(this,f,dl).call(this,r(this,f,mt),-1))}next(){this.date=P(s(this,f,dl).call(this,r(this,f,mt),1))}goToToday(){this.date=r(this,f,ol)}pickUp(e,t){let i=typeof e=="string"?this.event(e):e;if(!i||i.locked||i.pending||this.readonly)return!1;let a=s(this,f,Cs).call(this,i);if(!a)return!1;let l=s(this,f,pt).call(this).map(P),d=t&&a.days.includes(t)&&l.includes(t)?t:a.days.find(v=>l.includes(v));if(!d)return!1;let m=s(this,f,Qp).call(this,a,d);if(!m)return!1;s(this,f,Li).call(this,!1),r(this,xe).cancel(!0),this._more="",g(this,Z,m),i.moving=!0;let u=`ev:${a.key}:${d}`;return g(this,Et,u),g(this,We,{key:u,until:Date.now()+1e3}),this.requestUpdate(),r(this,xe).pickUp(m.from),!0}cancelMove(){let e=r(this,Q);e?.started&&(s(this,f,Li).call(this,!1),r(this,Le).announce(this.t("cancelled",{event:e.ev.name,place:s(this,f,Mr).call(this,e,e.from)}))),r(this,xe).cancel()}moveEvent(e,t,i){let a=typeof e=="string"?this.event(e):e,l=a&&s(this,f,Cs).call(this,a);if(!l)return!1;let d=l.allDay?N(Qe(t).date||t):vt(t);if(!d)return!1;let m=i?l.allDay?N(Qe(i).date||i):vt(i):null;return(!m||m<d)&&(m=l.allDay?G(d,$h(l.start,l.end)):new Date(d.getTime()+l.dur*6e4)),s(this,f,ru).call(this,l,d,m,"api",!1,P(d))}revert(e){let t=typeof e=="string"?this.event(e):e;if(!t)return!1;t.pending=!1;let i=r(this,Tr).get(t);if(this.controlled||!i)return!1;r(this,Tr).delete(t);let a=this.renderRoot.activeElement?.dataset.ev===t.key;t.start=i.start,t.end=i.end;let l=s(this,f,Cs).call(this,t);return l&&a&&g(this,We,{key:`ev:${l.key}:${l.days[0]}`,until:Date.now()+1e3}),r(this,Le).announce(this.t("reverted",{event:t.name,place:l?s(this,f,Eh).call(this,l):i.start})),!0}render(){let e=s(this,f,pt).call(this),t=s(this,f,Sf).call(this,s(this,f,Cf).call(this));return c`<div class="cal ${this._narrow?"narrow":""}" role="group" aria-label=${this.label}>
2665
2677
  ${s(this,f,Gf).call(this,e)}
2666
2678
  ${r(this,f,Ee)==="month"?s(this,f,Xf).call(this,e,t):s(this,f,Zf).call(this,e,t)}
2667
2679
  <span class="vh" role="status">${this.loading?this.t("loading"):""}</span>
@@ -2905,7 +2917,7 @@ cm-data-table:has(> table) { container-type: inline-size; }
2905
2917
  .chip.time > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
2906
2918
  .chip.time .lead { display: flex; align-items: center; gap: 4px; min-width: 0; }
2907
2919
  .ph.time { position: absolute; z-index: 3; inset-inline: 0 2px; inset-block-start: calc(var(--top) * var(--h)); height: calc(var(--len) * var(--h)); align-items: flex-start; }
2908
- `];$("cm-calendar",Ds);var jk=z("reportTile",{pinned:", pinned"}),zr=class extends T{constructor(){super(...arguments);this.label="";this.icon="chart";this.href="";this.pinned=!1}render(){let e=c`
2920
+ `];$("cm-calendar",Ds);var Vk=z("reportTile",{pinned:", pinned"}),zr=class extends T{constructor(){super(...arguments);this.label="";this.icon="chart";this.href="";this.pinned=!1}render(){let e=c`
2909
2921
  <span class="icon" aria-hidden="true"><slot name="icon"><cm-icon name=${this.icon} size="40"></cm-icon></slot></span>
2910
2922
  <span class="label">${this.label}</span>
2911
2923
  ${this.pinned?c`<span class="pin" part="pin"><cm-icon name="pin" size="16"></cm-icon>
@@ -2942,7 +2954,7 @@ cm-data-table:has(> table) { container-type: inline-size; }
2942
2954
  .title { margin-bottom: var(--cm-space-8); }
2943
2955
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--cm-space-8); }
2944
2956
  }
2945
- `];$("cm-report-tiles",Ps);var Gk=z("metric",{up:"Up {change}",down:"Down {change}",flat:"No change {change}",good:"{trend}, good",bad:"{trend}, bad",loadingValue:"Loading {label}"}),Qf=/^\s*-?\d+(\.\d+)?\s*$/,Os=class extends T{constructor(){super(...arguments);this.label="";this.value="";this.hint="";this.change="";this.trendSentiment="auto";this.href="";this.loading=!1;this._hasHint=!1;this.onHintSlot=e=>{this._hasHint=e.target.assignedNodes({flatten:!1}).some(t=>t.nodeType===1||t.textContent?.trim())}}connectedCallback(){super.connectedCallback(),this._hasHint=!!this.querySelector(':scope > [slot="hint"]')}figure(){let e=this.value;if(e===""||e===null||e===void 0)return"";let t=typeof e=="number"?e:Qf.test(String(e))?Number(e):NaN;return Number.isNaN(t)?String(e):this.formatNumber(t)}sentiment(){let e=this.trendSentiment;return e==="positive"||e==="negative"||e==="neutral"?e:this.trend==="up"?"positive":this.trend==="down"?"negative":"neutral"}renderChange(){let e=this.trend&&["up","down","flat"].includes(this.trend)?this.trend:void 0;if(!this.change&&!e)return h;if(!e)return c`<span class="change neutral" part="change">${this.change}</span>`;let t=this.sentiment(),i=this.t(e,{change:this.change}).trim(),a=t==="positive"?this.t("good",{trend:i}):t==="negative"?this.t("bad",{trend:i}):i;return c`<span class="change ${e} ${t}" part="change">
2957
+ `];$("cm-report-tiles",Ps);var Xk=z("metric",{up:"Up {change}",down:"Down {change}",flat:"No change {change}",good:"{trend}, good",bad:"{trend}, bad",loadingValue:"Loading {label}"}),Qf=/^\s*-?\d+(\.\d+)?\s*$/,Os=class extends T{constructor(){super(...arguments);this.label="";this.value="";this.hint="";this.change="";this.trendSentiment="auto";this.href="";this.loading=!1;this._hasHint=!1;this.onHintSlot=e=>{this._hasHint=e.target.assignedNodes({flatten:!1}).some(t=>t.nodeType===1||t.textContent?.trim())}}connectedCallback(){super.connectedCallback(),this._hasHint=!!this.querySelector(':scope > [slot="hint"]')}figure(){let e=this.value;if(e===""||e===null||e===void 0)return"";let t=typeof e=="number"?e:Qf.test(String(e))?Number(e):NaN;return Number.isNaN(t)?String(e):this.formatNumber(t)}sentiment(){let e=this.trendSentiment;return e==="positive"||e==="negative"||e==="neutral"?e:this.trend==="up"?"positive":this.trend==="down"?"negative":"neutral"}renderChange(){let e=this.trend&&["up","down","flat"].includes(this.trend)?this.trend:void 0;if(!this.change&&!e)return h;if(!e)return c`<span class="change neutral" part="change">${this.change}</span>`;let t=this.sentiment(),i=this.t(e,{change:this.change}).trim(),a=t==="positive"?this.t("good",{trend:i}):t==="negative"?this.t("bad",{trend:i}):i;return c`<span class="change ${e} ${t}" part="change">
2946
2958
  <cm-icon name=${e==="flat"?"arrow-left":"arrow-up-right"} size="16"></cm-icon><span aria-hidden="true">${this.change}</span><span class="sr">${a}</span>
2947
2959
  </span>`}render(){let e=this._hasHint||!!this.hint,t=this.loading?c`<cm-skeleton variant="block"></cm-skeleton>`:this.figure(),i=this.renderChange(),a=i!==h||e,l=c`
2948
2960
  <span class="label" id="label" part="label">${this.label}</span>
@@ -2987,7 +2999,7 @@ cm-data-table:has(> table) { container-type: inline-size; }
2987
2999
  .value { font-size: var(--cm-type-heading-lg-resp-size); }
2988
3000
  }
2989
3001
  @media (forced-colors: active) { .change { color: CanvasText; } }
2990
- `];$("cm-metric",Os);var qs=class extends S{constructor(){super(...arguments);this.label="";this.icon="";this.href="";this.value="";this.current=!1;this.badge="";this.expanded=!1;this.primary=!1}render(){return null}toItem(){return ev(this)}};qs.properties={label:{reflect:!0},icon:{reflect:!0},href:{reflect:!0},value:{reflect:!0},current:{type:Boolean,reflect:!0},badge:{reflect:!0},expanded:{type:Boolean,reflect:!0},primary:{type:Boolean,reflect:!0}},qs.styles=x`:host { display: none !important; }`;$("cm-nav-item",qs);function ev(o){let n=i=>o.getAttribute(i),e={label:n("label")||""};n("icon")&&(e.icon=n("icon")),n("href")&&(e.href=n("href")),n("value")&&(e.value=n("value")),o.hasAttribute("current")&&(e.current=!0),n("badge")&&(e.badge=n("badge")),o.hasAttribute("expanded")&&(e.expanded=!0),o.hasAttribute("primary")&&(e.primary=!0);let t=Yt(o);return t.length&&(e.items=t),e}var Yt=o=>[...o.children].filter(n=>n.localName==="cm-nav-item").map(ev),lu=o=>o.value||o.href||o.label,Ch=o=>!!o.current||!!o.items?.some(Ch),Ai=(o,n)=>{let e=new MutationObserver(n);return e.observe(o,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["label","icon","href","value","current","badge","expanded","primary"]}),e},Ri=(o,n)=>o.dispatchEvent(new CustomEvent("cm-navigate",{bubbles:!0,composed:!0,cancelable:!0,detail:{item:n,value:lu(n),href:n.href??""}}));var rE=z("sideNavigation",{label:"Main",collapse:"Collapse menu",expand:"Expand menu"}),Tl,zl,Dh,j,cu,Sh,du,tv,iv,hu,mu,rv,pu,uu,Lh,gu,av,Bs=class extends T{constructor(){super(...arguments);p(this,j);this.items=[];this.collapsed=!1;this.collapsible=!1;this._slotted=[];this._open=new Set;p(this,Tl,new Set);p(this,zl);p(this,Dh,A("cm-sidenav"))}connectedCallback(){super.connectedCallback(),s(this,j,cu).call(this),g(this,zl,Ai(this,()=>s(this,j,cu).call(this)))}disconnectedCallback(){super.disconnectedCallback(),r(this,zl)?.disconnect()}get navItems(){return this.items.length?this.items:this._slotted}willUpdate(){this.navItems.forEach((e,t)=>{let i=s(this,j,Sh).call(this,e,t);r(this,Tl).has(i)||!e.items?.length||(r(this,Tl).add(i),(e.expanded||Ch(e))&&this._open.add(i))})}toggle(e,t){let i=this.navItems[e];if(!i?.items?.length)return;let a=s(this,j,Sh).call(this,i,e),l=t??!this._open.has(a);if(l===this._open.has(a))return;let d=new Set(this._open);l?d.add(a):d.delete(a),this._open=d,this.dispatchEvent(new CustomEvent("cm-expand",{bubbles:!0,composed:!0,detail:{item:i,expanded:l}}))}render(){let e=this.collapsed;return c`
3002
+ `];$("cm-metric",Os);var qs=class extends S{constructor(){super(...arguments);this.label="";this.icon="";this.href="";this.value="";this.current=!1;this.badge="";this.expanded=!1;this.primary=!1}render(){return null}toItem(){return ev(this)}};qs.properties={label:{reflect:!0},icon:{reflect:!0},href:{reflect:!0},value:{reflect:!0},current:{type:Boolean,reflect:!0},badge:{reflect:!0},expanded:{type:Boolean,reflect:!0},primary:{type:Boolean,reflect:!0}},qs.styles=x`:host { display: none !important; }`;$("cm-nav-item",qs);function ev(o){let n=i=>o.getAttribute(i),e={label:n("label")||""};n("icon")&&(e.icon=n("icon")),n("href")&&(e.href=n("href")),n("value")&&(e.value=n("value")),o.hasAttribute("current")&&(e.current=!0),n("badge")&&(e.badge=n("badge")),o.hasAttribute("expanded")&&(e.expanded=!0),o.hasAttribute("primary")&&(e.primary=!0);let t=Yt(o);return t.length&&(e.items=t),e}var Yt=o=>[...o.children].filter(n=>n.localName==="cm-nav-item").map(ev),lu=o=>o.value||o.href||o.label,Ch=o=>!!o.current||!!o.items?.some(Ch),Ai=(o,n)=>{let e=new MutationObserver(n);return e.observe(o,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["label","icon","href","value","current","badge","expanded","primary"]}),e},Ri=(o,n)=>o.dispatchEvent(new CustomEvent("cm-navigate",{bubbles:!0,composed:!0,cancelable:!0,detail:{item:n,value:lu(n),href:n.href??""}}));var sE=z("sideNavigation",{label:"Main",collapse:"Collapse menu",expand:"Expand menu"}),Tl,zl,Dh,j,cu,Sh,du,tv,iv,hu,mu,rv,pu,uu,Lh,gu,av,Bs=class extends T{constructor(){super(...arguments);p(this,j);this.items=[];this.collapsed=!1;this.collapsible=!1;this._slotted=[];this._open=new Set;p(this,Tl,new Set);p(this,zl);p(this,Dh,A("cm-sidenav"))}connectedCallback(){super.connectedCallback(),s(this,j,cu).call(this),g(this,zl,Ai(this,()=>s(this,j,cu).call(this)))}disconnectedCallback(){super.disconnectedCallback(),r(this,zl)?.disconnect()}get navItems(){return this.items.length?this.items:this._slotted}willUpdate(){this.navItems.forEach((e,t)=>{let i=s(this,j,Sh).call(this,e,t);r(this,Tl).has(i)||!e.items?.length||(r(this,Tl).add(i),(e.expanded||Ch(e))&&this._open.add(i))})}toggle(e,t){let i=this.navItems[e];if(!i?.items?.length)return;let a=s(this,j,Sh).call(this,i,e),l=t??!this._open.has(a);if(l===this._open.has(a))return;let d=new Set(this._open);l?d.add(a):d.delete(a),this._open=d,this.dispatchEvent(new CustomEvent("cm-expand",{bubbles:!0,composed:!0,detail:{item:i,expanded:l}}))}render(){let e=this.collapsed;return c`
2991
3003
  <nav part="nav" aria-label=${this.label||this.t("label")} @keydown=${s(this,j,iv)}>
2992
3004
  <slot name="header"></slot>
2993
3005
  <ul part="list">
@@ -3067,7 +3079,7 @@ cm-data-table:has(> table) { container-type: inline-size; }
3067
3079
  .icon { background: var(--cm-bg-input-filled); color: var(--cm-icon-selected); }
3068
3080
  img { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }
3069
3081
  @media (forced-colors: active) { .avatar { border: 1px solid CanvasText; } }
3070
- `];$("cm-avatar",Fs);var pE=z("headerBar",{label:"Admin",store:"Store: {store}. Switch store",balance:"Wallet balance {balance}",account:"Account: {name}",search:"Search"}),Vs,Xt,Ks,Me,_l,bu,js,Us=class extends T{constructor(){super();p(this,Me);this.store="";this.balance="";this.userName="";this.avatarSrc="";this._narrow=!1;this._hasSearch=!1;this._searchOpen=!1;p(this,Vs);p(this,Xt,!1);p(this,Ks,null);this.addEventListener("cm-select",e=>{let t=s(this,Me,_l).call(this);this._searchOpen&&t&&e.composedPath().includes(t)&&this.closeSearch()})}get searchOpen(){return this._searchOpen}openSearch(){if(!this._narrow){s(this,Me,_l).call(this)?.focus();return}this._searchOpen||(g(this,Ks,_m()),this._searchOpen=!0)}closeSearch(){this._searchOpen&&(this._searchOpen=!1)}connectedCallback(){super.connectedCallback(),g(this,Vs,new ResizeObserver(([e])=>{let t=e.contentRect.width<=900;t!==this._narrow&&(this._narrow=t,t||this.closeSearch())})),r(this,Vs).observe(this)}disconnectedCallback(){super.disconnectedCallback(),r(this,Vs)?.disconnect(),r(this,Xt)&&(go(),g(this,Xt,!1))}updated(e){if(!e.has("_searchOpen"))return;let t=this.renderRoot.querySelector("dialog.layer");if(this._searchOpen&&t&&!t.open)t.showModal(),r(this,Xt)||(zm(),g(this,Xt,!0)),s(this,Me,_l).call(this)?.focus(),s(this,Me,js).call(this,"cm-search-toggle",{open:!0});else if(!this._searchOpen&&e.get("_searchOpen")){t?.open&&t.close(),r(this,Xt)&&(go(),g(this,Xt,!1));let i=r(this,Ks)??this.renderRoot.querySelector(".search-btn");g(this,Ks,null),i?.isConnected&&i.focus(),s(this,Me,js).call(this,"cm-search-toggle",{open:!1})}}render(){return c`
3082
+ `];$("cm-avatar",Fs);var gE=z("headerBar",{label:"Admin",store:"Store: {store}. Switch store",balance:"Wallet balance {balance}",account:"Account: {name}",search:"Search"}),Vs,Xt,Ks,Me,_l,bu,js,Us=class extends T{constructor(){super();p(this,Me);this.store="";this.balance="";this.userName="";this.avatarSrc="";this._narrow=!1;this._hasSearch=!1;this._searchOpen=!1;p(this,Vs);p(this,Xt,!1);p(this,Ks,null);this.addEventListener("cm-select",e=>{let t=s(this,Me,_l).call(this);this._searchOpen&&t&&e.composedPath().includes(t)&&this.closeSearch()})}get searchOpen(){return this._searchOpen}openSearch(){if(!this._narrow){s(this,Me,_l).call(this)?.focus();return}this._searchOpen||(g(this,Ks,_m()),this._searchOpen=!0)}closeSearch(){this._searchOpen&&(this._searchOpen=!1)}connectedCallback(){super.connectedCallback(),g(this,Vs,new ResizeObserver(([e])=>{let t=e.contentRect.width<=900;t!==this._narrow&&(this._narrow=t,t||this.closeSearch())})),r(this,Vs).observe(this)}disconnectedCallback(){super.disconnectedCallback(),r(this,Vs)?.disconnect(),r(this,Xt)&&(go(),g(this,Xt,!1))}updated(e){if(!e.has("_searchOpen"))return;let t=this.renderRoot.querySelector("dialog.layer");if(this._searchOpen&&t&&!t.open)t.showModal(),r(this,Xt)||(zm(),g(this,Xt,!0)),s(this,Me,_l).call(this)?.focus(),s(this,Me,js).call(this,"cm-search-toggle",{open:!0});else if(!this._searchOpen&&e.get("_searchOpen")){t?.open&&t.close(),r(this,Xt)&&(go(),g(this,Xt,!1));let i=r(this,Ks)??this.renderRoot.querySelector(".search-btn");g(this,Ks,null),i?.isConnected&&i.focus(),s(this,Me,js).call(this,"cm-search-toggle",{open:!1})}}render(){return c`
3071
3083
  <header part="bar" role="banner" aria-label=${this.label||h}>
3072
3084
  <div class="logo"><slot name="logo"></slot></div>
3073
3085
  ${this.store?c`<button type="button" class="store" part="store" aria-haspopup="true" aria-label=${this.t("store",{store:this.store})}
@@ -3171,7 +3183,7 @@ cm-data-table:has(> table) { container-type: inline-size; }
3171
3183
  @media (pointer: coarse) {
3172
3184
  @container (max-width: 640px) { .user { min-width: var(--_touch); } }
3173
3185
  }
3174
- `];$("cm-header-bar",Us);var xE=z("bottomNavigation",{label:"Main"}),Cl,_r,fu,nv,Ws=class extends T{constructor(){super(...arguments);p(this,_r);this.items=[];this.fixed=!1;this._slotted=[];p(this,Cl)}connectedCallback(){super.connectedCallback(),s(this,_r,fu).call(this),g(this,Cl,Ai(this,()=>s(this,_r,fu).call(this)))}disconnectedCallback(){super.disconnectedCallback(),r(this,Cl)?.disconnect()}get navItems(){return this.items.length?this.items:this._slotted}render(){return c`<nav part="nav" aria-label=${this.label||this.t("label")}>
3186
+ `];$("cm-header-bar",Us);var $E=z("bottomNavigation",{label:"Main"}),Cl,_r,fu,nv,Ws=class extends T{constructor(){super(...arguments);p(this,_r);this.items=[];this.fixed=!1;this._slotted=[];p(this,Cl)}connectedCallback(){super.connectedCallback(),s(this,_r,fu).call(this),g(this,Cl,Ai(this,()=>s(this,_r,fu).call(this)))}disconnectedCallback(){super.disconnectedCallback(),r(this,Cl)?.disconnect()}get navItems(){return this.items.length?this.items:this._slotted}render(){return c`<nav part="nav" aria-label=${this.label||this.t("label")}>
3175
3187
  <ul>${this.navItems.slice(0,5).map(e=>c`<li>${s(this,_r,nv).call(this,e)}</li>`)}</ul>
3176
3188
  <slot hidden></slot>
3177
3189
  </nav>`}};Cl=new WeakMap,_r=new WeakSet,fu=function(){this._slotted=Yt(this)},nv=function(e){let t=`item ${e.primary?"primary":""}`,i=c`<span class="icon">${e.icon?c`<cm-icon name=${e.icon} size=${e.primary?16:20}></cm-icon>`:h}</span><span class="label">${e.label}</span>`,a=l=>{Ri(this,e)||l.preventDefault()};return e.href?c`<a class=${t} part="item" href=${e.href} aria-current=${e.current?"page":h} @click=${a}>${i}</a>`:c`<button type="button" class=${t} part="item" aria-current=${e.current?"page":h} @click=${a}>${i}</button>`},Ws.properties={items:{type:Array},label:{string:"label"},fixed:{type:Boolean,reflect:!0},_slotted:{state:!0}},Ws.styles=[k,x`
@@ -3196,7 +3208,7 @@ cm-data-table:has(> table) { container-type: inline-size; }
3196
3208
  .icon { display: grid; place-items: center; width: var(--cm-icon-size-lg); height: var(--cm-icon-size-lg); }
3197
3209
  .primary .icon { color: var(--cm-action-primary-text); background: var(--cm-action-primary); border-radius: var(--cm-radius-xs); }
3198
3210
  .label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3199
- `];$("cm-bottom-navigation",Ws);var zE=z("mobileMenu",{label:"Menu",profile:"Profile",store:"Logged in to store"}),Sl,Cr,De,vu,ov,yu,xu,lv,Gs=class extends T{constructor(){super(...arguments);p(this,De);this.items=[];this.store="";this.userName="";this.userEmail="";this.avatarSrc="";this._slotted=[];this._page=null;p(this,Sl);p(this,Cr,A("cm-mmenu"))}connectedCallback(){super.connectedCallback(),s(this,De,vu).call(this),g(this,Sl,Ai(this,()=>s(this,De,vu).call(this)))}disconnectedCallback(){super.disconnectedCallback(),r(this,Sl)?.disconnect()}get sections(){return this.items.length?this.items:this._slotted}back(){if(!this._page)return;let[e,t]=this._page;this._page=null,this.updateComplete.then(()=>this.renderRoot.querySelector(`[data-row="${e}-${t}"]`)?.focus())}render(){let e=this.sections,t=this._page?e[this._page[0]]?.items?.[this._page[1]]:void 0;return t?c`<nav part="nav" class="sub" aria-label=${this.label||this.t("label")} id="${r(this,Cr)}-sub"
3211
+ `];$("cm-bottom-navigation",Ws);var CE=z("mobileMenu",{label:"Menu",profile:"Profile",store:"Logged in to store"}),Sl,Cr,De,vu,ov,yu,xu,lv,Gs=class extends T{constructor(){super(...arguments);p(this,De);this.items=[];this.store="";this.userName="";this.userEmail="";this.avatarSrc="";this._slotted=[];this._page=null;p(this,Sl);p(this,Cr,A("cm-mmenu"))}connectedCallback(){super.connectedCallback(),s(this,De,vu).call(this),g(this,Sl,Ai(this,()=>s(this,De,vu).call(this)))}disconnectedCallback(){super.disconnectedCallback(),r(this,Sl)?.disconnect()}get sections(){return this.items.length?this.items:this._slotted}back(){if(!this._page)return;let[e,t]=this._page;this._page=null,this.updateComplete.then(()=>this.renderRoot.querySelector(`[data-row="${e}-${t}"]`)?.focus())}render(){let e=this.sections,t=this._page?e[this._page[0]]?.items?.[this._page[1]]:void 0;return t?c`<nav part="nav" class="sub" aria-label=${this.label||this.t("label")} id="${r(this,Cr)}-sub"
3200
3212
  @keydown=${i=>{i.key==="Escape"&&(i.preventDefault(),this.back())}}>
3201
3213
  <button type="button" class="back" part="back" @click=${()=>this.back()}><cm-icon name="arrow-left" size="16"></cm-icon>
3202
3214
  ${t.label}</button>
@@ -3258,7 +3270,7 @@ ${t.label}</button>
3258
3270
  }
3259
3271
  .back:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; }
3260
3272
  .sub .row { font-size: var(--cm-font-size-14); line-height: var(--cm-line-height-14); }
3261
- `];$("cm-mobile-menu",Gs);var AE=z("flashOfferBar",{label:"Offer",dismiss:"Dismiss offer"}),Ah,cv,Ys=class extends T{constructor(){super(...arguments);p(this,Ah);this.icon="send";this.dismissible=!1}render(){return c`<div class="bar" part="bar" role="region" aria-label=${this.label||this.t("label")}>
3273
+ `];$("cm-mobile-menu",Gs);var HE=z("flashOfferBar",{label:"Offer",dismiss:"Dismiss offer"}),Ah,cv,Ys=class extends T{constructor(){super(...arguments);p(this,Ah);this.icon="send";this.dismissible=!1}render(){return c`<div class="bar" part="bar" role="region" aria-label=${this.label||this.t("label")}>
3262
3274
  <span class="icon" aria-hidden="true"><slot name="icon">${this.icon?c`<cm-icon name=${this.icon} size="20"></cm-icon>`:h}</slot></span>
3263
3275
  <span class="text"><slot></slot></span>
3264
3276
  ${this.dismissible?c`<button type="button" class="close" part="close" aria-label=${this.t("dismiss")} @click=${s(this,Ah,cv)}><cm-icon name="close" size="16"></cm-icon>
@@ -3285,7 +3297,7 @@ ${t.label}</button>
3285
3297
  @media (max-width: 640px) {
3286
3298
  .bar { min-height: 44px; justify-content: flex-start; text-align: start; }
3287
3299
  }
3288
- `];$("cm-flash-offer-bar",Ys);var qE=z("linkTabs",{label:"Sections"}),Ll,Dl,wu,Xs=class extends T{constructor(){super(...arguments);p(this,Dl);this.items=[];this._slotted=[];p(this,Ll)}connectedCallback(){super.connectedCallback(),s(this,Dl,wu).call(this),g(this,Ll,Ai(this,()=>s(this,Dl,wu).call(this)))}disconnectedCallback(){super.disconnectedCallback(),r(this,Ll)?.disconnect()}get tabs(){return this.items.length?this.items:this._slotted}render(){return c`<nav part="nav" aria-label=${this.label||this.t("label")}>
3300
+ `];$("cm-flash-offer-bar",Ys);var FE=z("linkTabs",{label:"Sections"}),Ll,Dl,wu,Xs=class extends T{constructor(){super(...arguments);p(this,Dl);this.items=[];this._slotted=[];p(this,Ll)}connectedCallback(){super.connectedCallback(),s(this,Dl,wu).call(this),g(this,Ll,Ai(this,()=>s(this,Dl,wu).call(this)))}disconnectedCallback(){super.disconnectedCallback(),r(this,Ll)?.disconnect()}get tabs(){return this.items.length?this.items:this._slotted}render(){return c`<nav part="nav" aria-label=${this.label||this.t("label")}>
3289
3301
  <ul part="tabs">${this.tabs.map(e=>c`<li><a part="tab" href=${e.href||"#"} aria-current=${e.current?"page":h}
3290
3302
  @click=${t=>{Ri(this,e)||t.preventDefault()}}>${e.label}${e.badge?c`<span class="badge">(${e.badge})</span>`:h}</a></li>`)}</ul>
3291
3303
  <slot hidden></slot>
@@ -3308,7 +3320,7 @@ ${t.label}</button>
3308
3320
  .badge { font-size: var(--cm-font-size-12); color: var(--cm-text-tertiary); font-variant-numeric: tabular-nums; }
3309
3321
  @media (max-width: 640px) { ul { gap: var(--cm-space-16); } }
3310
3322
 
3311
- `];$("cm-link-tabs",Xs);var KE=z("appCard",{developer:"By {developer}",rating:"Rated {rating} out of 5",reviews:{one:"{count} Review",other:"{count} Reviews"},offer:"Offer: ",details:"View Details",detailsLabel:"View details of {name}"}),Js=class extends T{constructor(){super(...arguments);this.name="";this.developer="";this.reviewsHref="";this.pricing="";this.offer="";this.href="";this.headingLevel=3}render(){let e=Math.min(6,Math.max(2,Math.round(this.headingLevel)||3)),t=typeof this.rating=="number"&&!Number.isNaN(this.rating),i=typeof this.reviews=="number"?this.t("reviews",{count:this.reviews}):"",a=t?this.formatNumber(this.rating,{minimumFractionDigits:1,maximumFractionDigits:1}):"";return c`<article part="card" aria-labelledby="name">
3323
+ `];$("cm-link-tabs",Xs);var GE=z("appCard",{developer:"By {developer}",rating:"Rated {rating} out of 5",reviews:{one:"{count} Review",other:"{count} Reviews"},offer:"Offer: ",details:"View Details",detailsLabel:"View details of {name}"}),Js=class extends T{constructor(){super(...arguments);this.name="";this.developer="";this.reviewsHref="";this.pricing="";this.offer="";this.href="";this.headingLevel=3}render(){let e=Math.min(6,Math.max(2,Math.round(this.headingLevel)||3)),t=typeof this.rating=="number"&&!Number.isNaN(this.rating),i=typeof this.reviews=="number"?this.t("reviews",{count:this.reviews}):"",a=t?this.formatNumber(this.rating,{minimumFractionDigits:1,maximumFractionDigits:1}):"";return c`<article part="card" aria-labelledby="name">
3312
3324
  <div class="logo" part="logo"><slot name="logo"></slot></div>
3313
3325
  <div class="status"><slot name="status"></slot></div>
3314
3326
  <div class="name" id="name" role="heading" aria-level=${e}>${this.name}</div>
@@ -3389,7 +3401,7 @@ ${t.label}</button>
3389
3401
  .panel { border-radius: var(--cm-radius-lg); }
3390
3402
 
3391
3403
  }
3392
- `];$("cm-side-panel",Mt);var lM=z("filterPanel",{heading:"Search and Filter",searchLabel:"Search",searchPlaceholder:"Search anything",apply:"Search",reset:"Reset"}),en,Nh,Qs=class extends Mt{constructor(){super(...arguments);this.search=!1;this.query="";p(this,en,()=>{this.dispatchEvent(new CustomEvent("cm-filter-apply",{detail:{values:this.values,query:this.query},bubbles:!0,composed:!0,cancelable:!0}))&&this.requestClose("action")});p(this,Nh,()=>{this.reset(),this.dispatchEvent(new CustomEvent("cm-filter-reset",{bubbles:!0,composed:!0}))})}get form(){return this.querySelector("form")}get values(){let e={},t=(a,l)=>{if(l==="")return;let d=e[a];e[a]=d===void 0?l:Array.isArray(d)?[...d,l]:[d,l]},i=this.form;if(i){for(let[a,l]of new FormData(i))typeof l=="string"&&t(a,l);return e}return this.querySelectorAll("[name]").forEach(a=>{let l=a.getAttribute("name");"checked"in a&&(a.type==="checkbox"||a.type==="radio"||a.localName.match(/^cm-(checkbox|radio|toggle)$/))?a.checked&&t(l,a.value||"on"):typeof a.value=="string"&&t(l,a.value)}),e}reset(){let e=this.form;e?e.reset():this.querySelectorAll("[name]").forEach(t=>t.formResetCallback?.()),this.query=""}renderBody(){return c`${this.search?c`<cm-search class="search" part="search" .value=${this.query} label=${this.searchLabel}
3404
+ `];$("cm-side-panel",Mt);var dM=z("filterPanel",{heading:"Search and Filter",searchLabel:"Search",searchPlaceholder:"Search anything",apply:"Search",reset:"Reset"}),en,Nh,Qs=class extends Mt{constructor(){super(...arguments);this.search=!1;this.query="";p(this,en,()=>{this.dispatchEvent(new CustomEvent("cm-filter-apply",{detail:{values:this.values,query:this.query},bubbles:!0,composed:!0,cancelable:!0}))&&this.requestClose("action")});p(this,Nh,()=>{this.reset(),this.dispatchEvent(new CustomEvent("cm-filter-reset",{bubbles:!0,composed:!0}))})}get form(){return this.querySelector("form")}get values(){let e={},t=(a,l)=>{if(l==="")return;let d=e[a];e[a]=d===void 0?l:Array.isArray(d)?[...d,l]:[d,l]},i=this.form;if(i){for(let[a,l]of new FormData(i))typeof l=="string"&&t(a,l);return e}return this.querySelectorAll("[name]").forEach(a=>{let l=a.getAttribute("name");"checked"in a&&(a.type==="checkbox"||a.type==="radio"||a.localName.match(/^cm-(checkbox|radio|toggle)$/))?a.checked&&t(l,a.value||"on"):typeof a.value=="string"&&t(l,a.value)}),e}reset(){let e=this.form;e?e.reset():this.querySelectorAll("[name]").forEach(t=>t.formResetCallback?.()),this.query=""}renderBody(){return c`${this.search?c`<cm-search class="search" part="search" .value=${this.query} label=${this.searchLabel}
3393
3405
  placeholder=${this.searchPlaceholder}
3394
3406
  @input=${e=>{this.query=e.target.value}}
3395
3407
  @cm-search=${e=>{e.stopPropagation(),r(this,en).call(this)}}></cm-search>`:h}
@@ -3442,7 +3454,7 @@ ${t.label}</button>
3442
3454
  }
3443
3455
  @keyframes cm-sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
3444
3456
  .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
3445
- `];$("cm-bottom-sheet",tn);var wM=z("notificationPanel",{heading:"Notifications",more:"See more notifications",empty:"No notifications yet.",unread:"Unread: ",markAllRead:"Mark all read"}),Cy={information:"bag",attention:"alert",success:"check-circle",critical:"x-circle"},rn=class extends S{constructor(){super(...arguments);this.time="";this.tone="information";this.href="";this.unread=!1;this.value="";this.description="";this.icon=""}render(){return null}};rn.properties={time:{reflect:!0},tone:{reflect:!0},href:{reflect:!0},unread:{type:Boolean,reflect:!0},value:{reflect:!0},description:{reflect:!0},icon:{reflect:!0}},rn.styles=x`:host { display: none; }`;$("cm-notification-item",rn);var sn,Ie,ku,Eu,pv,uv,gv,an=class extends ee{constructor(){super(...arguments);p(this,Ie);this.items=[];this.moreHref="";this.markAllRead=!1;this.loading=!1;this._slotted=[];this._footer=!1;p(this,sn)}connectedCallback(){super.connectedCallback(),s(this,Ie,ku).call(this),g(this,sn,new MutationObserver(()=>s(this,Ie,ku).call(this))),r(this,sn).observe(this,{childList:!0,subtree:!0,attributes:!0,characterData:!0})}disconnectedCallback(){super.disconnectedCallback(),r(this,sn)?.disconnect()}get notifications(){return this.items.length?this.items:this._slotted}render(){let e=this.notifications,t=this.markAllRead&&!this.loading&&e.some(a=>a.unread)?c`<button type="button" class="mark" part="mark-all-read" @click=${s(this,Ie,uv)}>${this.markAllLabel}</button>`:h,i=this.loading?c`<ul class="loading" part="list" aria-hidden="true">${[0,1,2].map(()=>c`<li>
3457
+ `];$("cm-bottom-sheet",tn);var kM=z("notificationPanel",{heading:"Notifications",more:"See more notifications",empty:"No notifications yet.",unread:"Unread: ",markAllRead:"Mark all read"}),Cy={information:"bag",attention:"alert",success:"check-circle",critical:"x-circle"},rn=class extends S{constructor(){super(...arguments);this.time="";this.tone="information";this.href="";this.unread=!1;this.value="";this.description="";this.icon=""}render(){return null}};rn.properties={time:{reflect:!0},tone:{reflect:!0},href:{reflect:!0},unread:{type:Boolean,reflect:!0},value:{reflect:!0},description:{reflect:!0},icon:{reflect:!0}},rn.styles=x`:host { display: none; }`;$("cm-notification-item",rn);var sn,Ie,ku,Eu,pv,uv,gv,an=class extends ee{constructor(){super(...arguments);p(this,Ie);this.items=[];this.moreHref="";this.markAllRead=!1;this.loading=!1;this._slotted=[];this._footer=!1;p(this,sn)}connectedCallback(){super.connectedCallback(),s(this,Ie,ku).call(this),g(this,sn,new MutationObserver(()=>s(this,Ie,ku).call(this))),r(this,sn).observe(this,{childList:!0,subtree:!0,attributes:!0,characterData:!0})}disconnectedCallback(){super.disconnectedCallback(),r(this,sn)?.disconnect()}get notifications(){return this.items.length?this.items:this._slotted}render(){let e=this.notifications,t=this.markAllRead&&!this.loading&&e.some(a=>a.unread)?c`<button type="button" class="mark" part="mark-all-read" @click=${s(this,Ie,uv)}>${this.markAllLabel}</button>`:h,i=this.loading?c`<ul class="loading" part="list" aria-hidden="true">${[0,1,2].map(()=>c`<li>
3446
3458
  <cm-skeleton class="sk-ic" variant="block" style="--cm-skeleton-height:22px"></cm-skeleton><cm-skeleton class="sk-text"></cm-skeleton></li>`)}</ul>`:e.length?c`<ul class="list" part="list">${e.map(a=>c`<li>${s(this,Ie,pv).call(this,a)}</li>`)}</ul>`:c`<p class="empty">${this.emptyText}</p>`;return this.renderDialog(c`<div class="panel" part="panel" tabindex="-1">
3447
3459
  ${this.renderHeader(t)}
3448
3460
  ${i}
@@ -3502,7 +3514,7 @@ ${t.label}</button>
3502
3514
  @media (max-width: 599px) {
3503
3515
  dialog { inset: var(--cm-notification-panel-top, 56px) 8px auto 8px; width: auto; }
3504
3516
  }
3505
- `];$("cm-notification-panel",an);var zM=z("toastRegion",{label:"Notifications"}),_M=z("toast",{undo:"Undo",shortcut:"Press F6 to reach it."}),bv=()=>{let o=document.activeElement;for(;o?.shadowRoot?.activeElement;)o=o.shadowRoot.activeElement;return o&&o!==document.body?o:null},Mu=(o,n)=>{for(let e=n;e;e=e.parentNode??e.host??null)if(e===o)return!0;return!1},Sy=2e3,fv=1e4,vv=150,Rl,ut,Jt,Hl,cn,dn,Lr,Hi,Dr,pe,Ih,yv,nn,Tu,Nl,Il,Pl,Ol,xv,on=class extends T{constructor(){super(...arguments);p(this,pe);this.message="";this.tone="default";this.actionLabel="";this.open=!0;this._inRegion=!1;this._primed=!1;p(this,Rl);p(this,ut);p(this,Jt,0);p(this,Hl,0);p(this,cn,!1);p(this,dn,!1);p(this,Lr);p(this,Hi);p(this,Dr);p(this,Nl,()=>{g(this,cn,!0),s(this,pe,Tu).call(this)});p(this,Il,()=>{g(this,cn,!1),s(this,pe,nn).call(this)});p(this,Pl,()=>{g(this,dn,!0),s(this,pe,Tu).call(this)});p(this,Ol,e=>{e.relatedTarget instanceof Node&&this.contains(e.relatedTarget)||e.relatedTarget instanceof Node&&this.shadowRoot?.contains(e.relatedTarget)||(g(this,dn,!1),s(this,pe,nn).call(this))})}get closed(){if(!r(this,Lr)){if(!this.open&&r(this,Dr))return Promise.resolve(r(this,Dr));g(this,Lr,new Promise(e=>{g(this,Hi,e)}))}return r(this,Lr)}get effectiveDuration(){let e=this.duration??(this.actionLabel?fv:5e3);return Math.min(fv,Math.max(Sy,Number(e)||5e3))}connectedCallback(){super.connectedCallback(),this._inRegion=!!this.parentElement?.closest("cm-toast-region"),!this._inRegion&&!this._primed&&g(this,Rl,setTimeout(()=>{this._primed=!0},vv)),this.addEventListener("pointerenter",r(this,Nl)),this.addEventListener("pointerleave",r(this,Il)),this.addEventListener("focusin",r(this,Pl)),this.addEventListener("focusout",r(this,Ol))}disconnectedCallback(){super.disconnectedCallback(),this.open&&r(this,Hi)&&queueMicrotask(()=>{!this.isConnected&&this.open&&s(this,pe,Ih).call(this,"removed")}),clearTimeout(r(this,ut)),clearTimeout(r(this,Rl)),this.removeEventListener("pointerenter",r(this,Nl)),this.removeEventListener("pointerleave",r(this,Il)),this.removeEventListener("focusin",r(this,Pl)),this.removeEventListener("focusout",r(this,Ol))}updated(e){e.has("open")&&e.get("open")!==void 0&&(this.open?g(this,Dr,void 0):r(this,Hi)&&s(this,pe,Ih).call(this,"close")),(e.has("open")||e.has("duration")||e.has("actionLabel")||e.has("_primed")||e.has("_inRegion"))&&(clearTimeout(r(this,ut)),this.open&&(this._inRegion||this._primed)&&(g(this,Jt,this.effectiveDuration),s(this,pe,nn).call(this)))}show(){this.open?(g(this,Jt,this.effectiveDuration),s(this,pe,nn).call(this)):this.open=!0}dismiss(e="close"){let t=new CustomEvent("cm-dismiss",{bubbles:!0,composed:!0,cancelable:!0,detail:{reason:e}});return this.dispatchEvent(t)?(clearTimeout(r(this,ut)),this.open=!1,s(this,pe,Ih).call(this,e),!0):(e==="timeout"&&(g(this,Jt,this.effectiveDuration),s(this,pe,nn).call(this)),!1)}render(){let e=c`<div class="toast" part="toast">
3517
+ `];$("cm-notification-panel",an);var CM=z("toastRegion",{label:"Notifications"}),SM=z("toast",{undo:"Undo",shortcut:"Press F6 to reach it."}),bv=()=>{let o=document.activeElement;for(;o?.shadowRoot?.activeElement;)o=o.shadowRoot.activeElement;return o&&o!==document.body?o:null},Mu=(o,n)=>{for(let e=n;e;e=e.parentNode??e.host??null)if(e===o)return!0;return!1},Sy=2e3,fv=1e4,vv=150,Rl,ut,Jt,Hl,cn,dn,Lr,Hi,Dr,pe,Ih,yv,nn,Tu,Nl,Il,Pl,Ol,xv,on=class extends T{constructor(){super(...arguments);p(this,pe);this.message="";this.tone="default";this.actionLabel="";this.open=!0;this._inRegion=!1;this._primed=!1;p(this,Rl);p(this,ut);p(this,Jt,0);p(this,Hl,0);p(this,cn,!1);p(this,dn,!1);p(this,Lr);p(this,Hi);p(this,Dr);p(this,Nl,()=>{g(this,cn,!0),s(this,pe,Tu).call(this)});p(this,Il,()=>{g(this,cn,!1),s(this,pe,nn).call(this)});p(this,Pl,()=>{g(this,dn,!0),s(this,pe,Tu).call(this)});p(this,Ol,e=>{e.relatedTarget instanceof Node&&this.contains(e.relatedTarget)||e.relatedTarget instanceof Node&&this.shadowRoot?.contains(e.relatedTarget)||(g(this,dn,!1),s(this,pe,nn).call(this))})}get closed(){if(!r(this,Lr)){if(!this.open&&r(this,Dr))return Promise.resolve(r(this,Dr));g(this,Lr,new Promise(e=>{g(this,Hi,e)}))}return r(this,Lr)}get effectiveDuration(){let e=this.duration??(this.actionLabel?fv:5e3);return Math.min(fv,Math.max(Sy,Number(e)||5e3))}connectedCallback(){super.connectedCallback(),this._inRegion=!!this.parentElement?.closest("cm-toast-region"),!this._inRegion&&!this._primed&&g(this,Rl,setTimeout(()=>{this._primed=!0},vv)),this.addEventListener("pointerenter",r(this,Nl)),this.addEventListener("pointerleave",r(this,Il)),this.addEventListener("focusin",r(this,Pl)),this.addEventListener("focusout",r(this,Ol))}disconnectedCallback(){super.disconnectedCallback(),this.open&&r(this,Hi)&&queueMicrotask(()=>{!this.isConnected&&this.open&&s(this,pe,Ih).call(this,"removed")}),clearTimeout(r(this,ut)),clearTimeout(r(this,Rl)),this.removeEventListener("pointerenter",r(this,Nl)),this.removeEventListener("pointerleave",r(this,Il)),this.removeEventListener("focusin",r(this,Pl)),this.removeEventListener("focusout",r(this,Ol))}updated(e){e.has("open")&&e.get("open")!==void 0&&(this.open?g(this,Dr,void 0):r(this,Hi)&&s(this,pe,Ih).call(this,"close")),(e.has("open")||e.has("duration")||e.has("actionLabel")||e.has("_primed")||e.has("_inRegion"))&&(clearTimeout(r(this,ut)),this.open&&(this._inRegion||this._primed)&&(g(this,Jt,this.effectiveDuration),s(this,pe,nn).call(this)))}show(){this.open?(g(this,Jt,this.effectiveDuration),s(this,pe,nn).call(this)):this.open=!0}dismiss(e="close"){let t=new CustomEvent("cm-dismiss",{bubbles:!0,composed:!0,cancelable:!0,detail:{reason:e}});return this.dispatchEvent(t)?(clearTimeout(r(this,ut)),this.open=!1,s(this,pe,Ih).call(this,e),!0):(e==="timeout"&&(g(this,Jt,this.effectiveDuration),s(this,pe,nn).call(this)),!1)}render(){let e=c`<div class="toast" part="toast">
3506
3518
  ${this.tone==="critical"?c`<cm-icon class="icon" name="alert" size="20"></cm-icon>`:h}
3507
3519
  <div class="message" part="message">${this.message}<slot></slot></div>
3508
3520
  ${this.actionLabel?c`<button class="action" part="action" aria-keyshortcuts=${this._inRegion?"F6":h} @click=${s(this,pe,xv)}>${this.actionLabel}</button>`:h}
@@ -3548,7 +3560,7 @@ ${t.label}</button>
3548
3560
  display: flex; flex-direction: column; align-items: center; gap: var(--cm-space-8);
3549
3561
  padding-inline: var(--cm-space-12); pointer-events: none;
3550
3562
  }
3551
- `];$("cm-toast-region",ln);function wv(o,n={}){let e=n.root??document.body,t=e.querySelector(":scope > cm-toast-region"),i=!t;t||(t=document.createElement("cm-toast-region"),e.append(t));let a=document.createElement("cm-toast");if(a.message=String(o),n.tone&&(a.tone=n.tone),n.duration!==void 0&&(a.duration=n.duration),n.action){a.actionLabel=n.action.label;let l=n.action.onAction;a.addEventListener("cm-action",()=>l())}if(i){let l=t;return setTimeout(()=>l.add(a),vv),a}return t.add(a)}async function Ly(o,n,e){await o();let{message:t,undoLabel:i,...a}=e,l=i??mc("toast","undo",void 0,a.root??document.body),d=await wv(t,{...a,action:{label:l,onAction:()=>{}}}).closed;return d==="action"&&await n(),d}var RM=z("progressBar",{inProgress:"In progress"}),Oh,mn=class extends T{constructor(){super(...arguments);this.value=null;this.label="";this.labelHidden=!1;this.showValue=!1;this.size="medium";p(this,Oh,A("cm-progress"))}get clampedValue(){let e=this.value;return e==null||Number.isNaN(Number(e))?null:Math.min(100,Math.max(0,Number(e)))}render(){let e=this.clampedValue,t=`${r(this,Oh)}-label`;return c`
3563
+ `];$("cm-toast-region",ln);function wv(o,n={}){let e=n.root??document.body,t=e.querySelector(":scope > cm-toast-region"),i=!t;t||(t=document.createElement("cm-toast-region"),e.append(t));let a=document.createElement("cm-toast");if(a.message=String(o),n.tone&&(a.tone=n.tone),n.duration!==void 0&&(a.duration=n.duration),n.action){a.actionLabel=n.action.label;let l=n.action.onAction;a.addEventListener("cm-action",()=>l())}if(i){let l=t;return setTimeout(()=>l.add(a),vv),a}return t.add(a)}async function Ly(o,n,e){await o();let{message:t,undoLabel:i,...a}=e,l=i??mc("toast","undo",void 0,a.root??document.body),d=await wv(t,{...a,action:{label:l,onAction:()=>{}}}).closed;return d==="action"&&await n(),d}var NM=z("progressBar",{inProgress:"In progress"}),Oh,mn=class extends T{constructor(){super(...arguments);this.value=null;this.label="";this.labelHidden=!1;this.showValue=!1;this.size="medium";p(this,Oh,A("cm-progress"))}get clampedValue(){let e=this.value;return e==null||Number.isNaN(Number(e))?null:Math.min(100,Math.max(0,Number(e)))}render(){let e=this.clampedValue,t=`${r(this,Oh)}-label`;return c`
3552
3564
  <div class="head ${this.labelHidden?"vh":""}">
3553
3565
  <span id=${t} part="label">${this.label}</span>
3554
3566
  ${this.showValue&&e!==null?c`<span class="value" aria-hidden="true">${this.formatNumber(Math.round(e)/100,{style:"percent"})}</span>`:h}
@@ -3695,6 +3707,16 @@ ${t.label}</button>
3695
3707
  :host([variant='record']) ::slotted([variant='aside']) { grid-column: 2; }
3696
3708
  :host([variant='record'][sticky-aside]:state(aside-fits)) ::slotted([variant='aside']) { position: sticky; }
3697
3709
  }
3710
+ /* Sidebar layout (1.8.2): a 240px column of views, folders or filters beside the list it filters (a ticket inbox,
3711
+ a mailbox), from 768px of the layout's width; stacked above the list on phones. */
3712
+ :host([variant='sidebar']) .layout { grid-template-columns: minmax(0, 1fr); }
3713
+ :host([variant='sidebar']) ::slotted(*) { grid-column: 1 / -1; }
3714
+ :host([variant='sidebar']) ::slotted([variant='sidebar']) { order: -1; }
3715
+ @container cm-layout (min-width: 768px) {
3716
+ :host([variant='sidebar']) .layout { grid-template-columns: 240px minmax(0, 1fr); grid-auto-flow: dense; } /* scale-exempt: the sidebar is a fixed 240px column */
3717
+ :host([variant='sidebar']) ::slotted(*) { grid-column: 2; }
3718
+ :host([variant='sidebar']) ::slotted([variant='sidebar']) { grid-column: 1; }
3719
+ }
3698
3720
  :host([variant='record'][sticky-aside]) ::slotted([variant='aside']) {
3699
3721
  /* Read back by #measure(); only takes effect once the aside is sticky. --_header: cm-app-frame's header height. */
3700
3722
  inset-block-start: var(--cm-layout-sticky-top, calc(var(--_header, 0px) + var(--cm-space-24)));
@@ -3730,7 +3752,7 @@ ${t.label}</button>
3730
3752
  border: var(--cm-border-1) solid var(--cm-border-subtle); border-radius: var(--cm-radius-lg);
3731
3753
  }
3732
3754
  /* Inherited, so a cm-page inside a wrapper element (not slotted directly) is transparent too. */
3733
- :host([panel]) { --cm-page-background: transparent; }
3755
+ :host([panel]) { --cm-page-background: transparent; --cm-page-header-background: transparent; } /* the white panel shows through, rounded corners intact (1.8.2) */
3734
3756
  :host([panel]) ::slotted(cm-page) { background: transparent; }
3735
3757
  main:focus { outline: none; }
3736
3758
  .bottom { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 40; }
@@ -3786,7 +3808,7 @@ ${t.label}</button>
3786
3808
  border-radius: var(--cm-radius-sm); color: inherit; cursor: pointer;
3787
3809
  }
3788
3810
  .close:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; }
3789
- `];$("cm-banner",Mn);var z2=z("thumbnail",{noImage:"{alt} (no image)"}),zn=class extends T{constructor(){super(...arguments);this.src="";this.alt="";this.size="medium";this.loading="eager";this._failed=!1}willUpdate(e){e.has("src")&&(this._failed=!1)}render(){if(this.src&&!this._failed)return c`<span class="box" part="thumbnail"><img src=${this.src} alt=${this.alt} loading=${this.loading}
3811
+ `];$("cm-banner",Mn);var C2=z("thumbnail",{noImage:"{alt} (no image)"}),zn=class extends T{constructor(){super(...arguments);this.src="";this.alt="";this.size="medium";this.loading="eager";this._failed=!1}willUpdate(e){e.has("src")&&(this._failed=!1)}render(){if(this.src&&!this._failed)return c`<span class="box" part="thumbnail"><img src=${this.src} alt=${this.alt} loading=${this.loading}
3790
3812
  @error=${()=>{this._failed=!0}}></span>`;let e=this.size==="small"?18:this.size==="large"?32:24;return c`<span class="box" part="thumbnail" role=${this.alt?"img":h}
3791
3813
  aria-label=${this.alt?this.t("noImage",{alt:this.alt}):h} aria-hidden=${this.alt?h:"true"}>
3792
3814
  <cm-icon name="box" size=${e}></cm-icon></span>`}};zn.properties={src:{},alt:{},size:{reflect:!0},loading:{},_failed:{state:!0}},zn.styles=[k,x`
@@ -208,7 +208,7 @@ CmAppFrame.styles = [
208
208
  border: var(--cm-border-1) solid var(--cm-border-subtle); border-radius: var(--cm-radius-lg);
209
209
  }
210
210
  /* Inherited, so a cm-page inside a wrapper element (not slotted directly) is transparent too. */
211
- :host([panel]) { --cm-page-background: transparent; }
211
+ :host([panel]) { --cm-page-background: transparent; --cm-page-header-background: transparent; } /* the white panel shows through, rounded corners intact (1.8.2) */
212
212
  :host([panel]) ::slotted(cm-page) { background: transparent; }
213
213
  main:focus { outline: none; }
214
214
  .bottom { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 40; }
@@ -1,4 +1,15 @@
1
1
  import { LitElement } from 'lit';
2
+ import { CmLocalizedElement } from '../localize.js';
3
+ import './icon.js';
4
+ declare const strings: {
5
+ /** Accessible name of an editable fact's edit button (`editable`). {label} is the fact's label. */
6
+ edit: string;
7
+ };
8
+ declare module '../localize.js' {
9
+ interface CmStrings {
10
+ infoItem: typeof strings;
11
+ }
12
+ }
2
13
  /**
3
14
  * Side card on detail pages that lists facts as label/value pairs (order details, SKU, tags).
4
15
  * Put `cm-info-item` elements inside. The Figma file calls this the "Additional Info Card".
@@ -54,21 +65,36 @@ export declare class CmInfoPanel extends LitElement {
54
65
  }
55
66
  /**
56
67
  * One fact in an info panel: a label (13px) and its value (14px): text, a link, a badge or tags.
68
+ * With `editable` (since 1.9.1) a light pencil button follows the value, centred on its first line, for editing one
69
+ * field in place on a record page; it fires `cm-edit`. Use it instead of an outlined button beside each value.
57
70
  * @element cm-info-item
58
71
  * @slot - The value.
72
+ * @fires cm-edit - When the pencil of an `editable` fact is pressed.
73
+ * @csspart edit - The pencil button.
59
74
  */
60
- export declare class CmInfoItem extends LitElement {
75
+ export declare class CmInfoItem extends CmLocalizedElement {
61
76
  static properties: {
62
77
  label: {};
63
78
  half: {
64
79
  type: BooleanConstructor;
65
80
  reflect: boolean;
66
81
  };
82
+ editable: {
83
+ type: BooleanConstructor;
84
+ reflect: boolean;
85
+ };
86
+ editLabel: {
87
+ attribute: string;
88
+ };
67
89
  };
68
90
  /** What the value is ("Ordered on", "SKU"). */
69
91
  label: string;
70
92
  /** Takes half the width, so two short facts share a line. */
71
93
  half: boolean;
94
+ /** Shows a pencil button after the value that fires `cm-edit`. Since 1.9.1. */
95
+ editable: boolean;
96
+ /** Accessible name of the pencil; default "Edit {label}". Since 1.9.1. */
97
+ editLabel: string;
72
98
  static styles: import("lit").CSSResult[];
73
99
  connectedCallback(): void;
74
100
  render(): import("lit-html").TemplateResult<1>;
@@ -79,3 +105,4 @@ declare global {
79
105
  'cm-info-item': CmInfoItem;
80
106
  }
81
107
  }
108
+ export {};
@@ -1,5 +1,11 @@
1
1
  import { LitElement, html, css, nothing } from 'lit';
2
2
  import { base, define } from '../base.js';
3
+ import { CmLocalizedElement, defineStrings } from '../localize.js';
4
+ import './icon.js';
5
+ const strings = defineStrings('infoItem', {
6
+ /** Accessible name of an editable fact's edit button (`editable`). {label} is the fact's label. */
7
+ edit: 'Edit {label}',
8
+ });
3
9
  /**
4
10
  * Side card on detail pages that lists facts as label/value pairs (order details, SKU, tags).
5
11
  * Put `cm-info-item` elements inside. The Figma file calls this the "Additional Info Card".
@@ -92,16 +98,24 @@ CmInfoPanel.styles = [
92
98
  define('cm-info-panel', CmInfoPanel);
93
99
  /**
94
100
  * One fact in an info panel: a label (13px) and its value (14px): text, a link, a badge or tags.
101
+ * With `editable` (since 1.9.1) a light pencil button follows the value, centred on its first line, for editing one
102
+ * field in place on a record page; it fires `cm-edit`. Use it instead of an outlined button beside each value.
95
103
  * @element cm-info-item
96
104
  * @slot - The value.
105
+ * @fires cm-edit - When the pencil of an `editable` fact is pressed.
106
+ * @csspart edit - The pencil button.
97
107
  */
98
- export class CmInfoItem extends LitElement {
108
+ export class CmInfoItem extends CmLocalizedElement {
99
109
  constructor() {
100
110
  super(...arguments);
101
111
  /** What the value is ("Ordered on", "SKU"). */
102
112
  this.label = '';
103
113
  /** Takes half the width, so two short facts share a line. */
104
114
  this.half = false;
115
+ /** Shows a pencil button after the value that fires `cm-edit`. Since 1.9.1. */
116
+ this.editable = false;
117
+ /** Accessible name of the pencil; default "Edit {label}". Since 1.9.1. */
118
+ this.editLabel = '';
105
119
  }
106
120
  connectedCallback() {
107
121
  super.connectedCallback();
@@ -109,12 +123,19 @@ export class CmInfoItem extends LitElement {
109
123
  this.setAttribute('role', 'listitem');
110
124
  }
111
125
  render() {
112
- return html `<div class="label" part="label">${this.label}</div><div class="value" part="value"><slot></slot></div>`;
126
+ const value = html `<div class="value" part="value"><slot></slot></div>`;
127
+ if (!this.editable)
128
+ return html `<div class="label" part="label">${this.label}</div>${value}`;
129
+ return html `<div class="label" part="label">${this.label}</div><div class="row">${value}<button class="edit" part="edit" type="button"
130
+ aria-label=${this.editLabel || this.t('edit', { label: this.label })}
131
+ @click=${() => this.dispatchEvent(new CustomEvent('cm-edit', { bubbles: true, composed: true }))}><cm-icon name="edit" size="16"></cm-icon></button></div>`;
113
132
  }
114
133
  }
115
134
  CmInfoItem.properties = {
116
135
  label: {},
117
136
  half: { type: Boolean, reflect: true },
137
+ editable: { type: Boolean, reflect: true },
138
+ editLabel: { attribute: 'edit-label' },
118
139
  };
119
140
  CmInfoItem.styles = [
120
141
  base,
@@ -127,6 +148,16 @@ CmInfoItem.styles = [
127
148
  margin-top: var(--_cm-info-value-gap, var(--cm-space-4)); font-size: var(--cm-font-size-14); line-height: var(--cm-line-height-14); font-weight: 500; overflow-wrap: anywhere;
128
149
 
129
150
  }
151
+ /* Editable (1.9.1): the value and a 28px pencil on one row, the pencil centred on the value's first 20px line. */
152
+ .row { display: flex; align-items: flex-start; gap: var(--cm-space-4); margin-top: var(--_cm-info-value-gap, var(--cm-space-4)); }
153
+ .row .value { margin-top: 0; min-width: 0; }
154
+ .edit {
155
+ position: relative; flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; margin-block: -4px; padding: 0;
156
+ background: none; border: 0; border-radius: var(--cm-radius-sm); color: var(--cm-icon-default); cursor: pointer;
157
+ }
158
+ .edit:hover { background: var(--cm-bg-hover); color: var(--cm-icon-selected); }
159
+ .edit:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; }
160
+ @media (pointer: coarse) { .edit::after { content: ''; position: absolute; inset: -8px; } }
130
161
  `,
131
162
  ];
132
163
  define('cm-info-item', CmInfoItem);
@@ -12,6 +12,10 @@ import { type SpaceStep } from '../spacing.js';
12
12
  * below it with `aside-position="below"`, and the gap is `space-16` once the layout is 640px wide or less. The aside
13
13
  * is placed by its variant, not by where it is in the source. Cards in a record layout's sections are as far apart as
14
14
  * the columns.
15
+ *
16
+ * `variant="sidebar"` (since 1.8.2) puts a 240px `cm-layout-section variant="sidebar"` (views, folders or filters) on the
17
+ * start side of the list it filters, from 768px of the layout's own width; narrower, it stacks above the list. Use it
18
+ * for a ticket inbox or a mailbox instead of `one-third` / `two-thirds`, which give the views a third of the page.
15
19
  * @element cm-layout
16
20
  * @slot - `cm-layout-section` elements.
17
21
  * @cssprop --cm-layout-sticky-top - With `sticky-aside`: how far from the top of the window the aside stops. Default
@@ -45,7 +49,7 @@ export declare class CmLayout extends LitElement {
45
49
  * `default`: a six-track grid for `full`, `one-half`, `one-third` and `two-thirds` sections.
46
50
  * `record` (since 1.7): a main column and a 320px `aside` section on the end side from 880px (a 1280px laptop window with the side navigation gives about 950px); see the element description.
47
51
  */
48
- variant: 'default' | 'record';
52
+ variant: 'default' | 'record' | 'sidebar';
49
53
  /** Record layout: where the aside goes once the columns stack (below 880px), `above` the main content (default) or `below` it. Since 1.7. */
50
54
  asidePosition: 'above' | 'below';
51
55
  /**
@@ -78,8 +82,9 @@ export declare class CmLayoutSection extends LitElement {
78
82
  * Width on wide layouts: `full` (default), `one-half`, `one-third` or `two-thirds`. A detail page is a
79
83
  * `two-thirds` main section and a `one-third` side section. Every section is full width once the layout stacks.
80
84
  * `aside` (since 1.7) is the 320px side column of a `cm-layout variant="record"`; in other layouts it is `one-third`.
85
+ * `sidebar` (since 1.8.2) is the 240px start column of a `cm-layout variant="sidebar"`.
81
86
  */
82
- variant: 'full' | 'one-half' | 'one-third' | 'two-thirds' | 'aside';
87
+ variant: 'full' | 'one-half' | 'one-third' | 'two-thirds' | 'aside' | 'sidebar';
83
88
  static styles: import("lit").CSSResult[];
84
89
  render(): import("lit-html").TemplateResult<1>;
85
90
  }
@@ -25,6 +25,10 @@ import { spaceRules } from '../spacing.js';
25
25
  * below it with `aside-position="below"`, and the gap is `space-16` once the layout is 640px wide or less. The aside
26
26
  * is placed by its variant, not by where it is in the source. Cards in a record layout's sections are as far apart as
27
27
  * the columns.
28
+ *
29
+ * `variant="sidebar"` (since 1.8.2) puts a 240px `cm-layout-section variant="sidebar"` (views, folders or filters) on the
30
+ * start side of the list it filters, from 768px of the layout's own width; narrower, it stacks above the list. Use it
31
+ * for a ticket inbox or a mailbox instead of `one-third` / `two-thirds`, which give the views a third of the page.
28
32
  * @element cm-layout
29
33
  * @slot - `cm-layout-section` elements.
30
34
  * @cssprop --cm-layout-sticky-top - With `sticky-aside`: how far from the top of the window the aside stops. Default
@@ -158,6 +162,16 @@ CmLayout.styles = [
158
162
  :host([variant='record']) ::slotted([variant='aside']) { grid-column: 2; }
159
163
  :host([variant='record'][sticky-aside]:state(aside-fits)) ::slotted([variant='aside']) { position: sticky; }
160
164
  }
165
+ /* Sidebar layout (1.8.2): a 240px column of views, folders or filters beside the list it filters (a ticket inbox,
166
+ a mailbox), from 768px of the layout's width; stacked above the list on phones. */
167
+ :host([variant='sidebar']) .layout { grid-template-columns: minmax(0, 1fr); }
168
+ :host([variant='sidebar']) ::slotted(*) { grid-column: 1 / -1; }
169
+ :host([variant='sidebar']) ::slotted([variant='sidebar']) { order: -1; }
170
+ @container cm-layout (min-width: 768px) {
171
+ :host([variant='sidebar']) .layout { grid-template-columns: 240px minmax(0, 1fr); grid-auto-flow: dense; } /* scale-exempt: the sidebar is a fixed 240px column */
172
+ :host([variant='sidebar']) ::slotted(*) { grid-column: 2; }
173
+ :host([variant='sidebar']) ::slotted([variant='sidebar']) { grid-column: 1; }
174
+ }
161
175
  :host([variant='record'][sticky-aside]) ::slotted([variant='aside']) {
162
176
  /* Read back by #measure(); only takes effect once the aside is sticky. --_header: cm-app-frame's header height. */
163
177
  inset-block-start: var(--cm-layout-sticky-top, calc(var(--_header, 0px) + var(--cm-space-24)));
@@ -178,6 +192,7 @@ export class CmLayoutSection extends LitElement {
178
192
  * Width on wide layouts: `full` (default), `one-half`, `one-third` or `two-thirds`. A detail page is a
179
193
  * `two-thirds` main section and a `one-third` side section. Every section is full width once the layout stacks.
180
194
  * `aside` (since 1.7) is the 320px side column of a `cm-layout variant="record"`; in other layouts it is `one-third`.
195
+ * `sidebar` (since 1.8.2) is the 240px start column of a `cm-layout variant="sidebar"`.
181
196
  */
182
197
  this.variant = 'full';
183
198
  }
@@ -33,6 +33,8 @@ export interface Breadcrumb {
33
33
  * @slot actions - Buttons, right-aligned, secondary first and the primary action last (large size).
34
34
  * @slot title-adornment - Badge or count next to the title.
35
35
  * @csspart description - The `description` line under the title.
36
+ * @cssprop --cm-page-header-background - The header's background (default `bg-surface`). `cm-app-frame panel` makes it
37
+ * transparent, so the header doesn't square off the panel's rounded corners. Since 1.8.2.
36
38
  * @fires cm-previous - When the previous-record arrow is pressed (with `pagination`).
37
39
  * @fires cm-next - When the next-record arrow is pressed (with `pagination`).
38
40
  */
@@ -31,6 +31,8 @@ const strings = defineStrings('pageHeader', {
31
31
  * @slot actions - Buttons, right-aligned, secondary first and the primary action last (large size).
32
32
  * @slot title-adornment - Badge or count next to the title.
33
33
  * @csspart description - The `description` line under the title.
34
+ * @cssprop --cm-page-header-background - The header's background (default `bg-surface`). `cm-app-frame panel` makes it
35
+ * transparent, so the header doesn't square off the panel's rounded corners. Since 1.8.2.
34
36
  * @fires cm-previous - When the previous-record arrow is pressed (with `pagination`).
35
37
  * @fires cm-next - When the next-record arrow is pressed (with `pagination`).
36
38
  */
@@ -116,7 +118,7 @@ CmPageHeader.styles = [
116
118
  header {
117
119
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--cm-space-12) var(--cm-space-20);
118
120
  min-height: 64px; padding: var(--cm-space-12) var(--cm-space-24);
119
- background: var(--cm-bg-surface); border-bottom: var(--cm-border-1) solid var(--cm-border-subtle);
121
+ background: var(--cm-page-header-background, var(--cm-bg-surface)); border-bottom: var(--cm-border-1) solid var(--cm-border-subtle);
120
122
  }
121
123
  .lead { flex: 1 1 280px; display: flex; align-items: center; gap: var(--cm-space-8); min-width: 0; }
122
124
  /* flex: 1 (issue #32): the titles column takes the room the lead has, so a title-adornment badge sits beside the
@@ -18372,8 +18372,14 @@
18372
18372
  },
18373
18373
  {
18374
18374
  "kind": "class",
18375
- "description": "One fact in an info panel: a label (13px) and its value (14px): text, a link, a badge or tags.",
18375
+ "description": "One fact in an info panel: a label (13px) and its value (14px): text, a link, a badge or tags.\nWith `editable` (since 1.9.1) a light pencil button follows the value, centred on its first line, for editing one\nfield in place on a record page; it fires `cm-edit`. Use it instead of an outlined button beside each value.",
18376
18376
  "name": "CmInfoItem",
18377
+ "cssParts": [
18378
+ {
18379
+ "description": "The pencil button.",
18380
+ "name": "edit"
18381
+ }
18382
+ ],
18377
18383
  "slots": [
18378
18384
  {
18379
18385
  "description": "The value.",
@@ -18403,6 +18409,134 @@
18403
18409
  "description": "Takes half the width, so two short facts share a line.",
18404
18410
  "attribute": "half",
18405
18411
  "reflects": true
18412
+ },
18413
+ {
18414
+ "kind": "field",
18415
+ "name": "editable",
18416
+ "privacy": "public",
18417
+ "type": {
18418
+ "text": "boolean"
18419
+ },
18420
+ "default": "false",
18421
+ "description": "Shows a pencil button after the value that fires `cm-edit`. Since 1.9.1.",
18422
+ "attribute": "editable",
18423
+ "reflects": true
18424
+ },
18425
+ {
18426
+ "kind": "field",
18427
+ "name": "editLabel",
18428
+ "privacy": "public",
18429
+ "type": {
18430
+ "text": "string"
18431
+ },
18432
+ "default": "''",
18433
+ "description": "Accessible name of the pencil; default \"Edit {label}\". Since 1.9.1.",
18434
+ "attribute": "edit-label"
18435
+ },
18436
+ {
18437
+ "kind": "method",
18438
+ "name": "finalize",
18439
+ "static": true,
18440
+ "description": "A property declared with `string: 'key'` (e.g. `saveLabel: { attribute: 'save-label', string: 'save' }`) reads\nas that built-in string until it is set, so `el.saveLabel` is \"Save\" in English and the translation elsewhere.\nSetting it overrides the string for this element; setting `undefined` goes back to the built-in one.",
18441
+ "inheritedFrom": {
18442
+ "name": "CmLocalizedElement",
18443
+ "module": "src/localize.ts"
18444
+ }
18445
+ },
18446
+ {
18447
+ "kind": "field",
18448
+ "name": "strings",
18449
+ "privacy": "public",
18450
+ "type": {
18451
+ "text": "Record<string, Message> | null | undefined"
18452
+ },
18453
+ "description": "Replaces this component's built-in text (labels, accessible names, messages), key by key. In HTML pass JSON:\n`strings='{\"close\":\"Fermer\"}'`. Keys and English defaults are listed under \"Built-in text\" on the component's\npage; set text for every component at once with `configure()` or `setStrings()` (see Localisation).",
18454
+ "attribute": "strings",
18455
+ "inheritedFrom": {
18456
+ "name": "CmLocalizedElement",
18457
+ "module": "src/localize.ts"
18458
+ }
18459
+ },
18460
+ {
18461
+ "kind": "field",
18462
+ "name": "stringsNamespace",
18463
+ "privacy": "protected",
18464
+ "description": "The string namespace: the tag name without `cm-`, in camelCase.",
18465
+ "readonly": true,
18466
+ "inheritedFrom": {
18467
+ "name": "CmLocalizedElement",
18468
+ "module": "src/localize.ts"
18469
+ }
18470
+ },
18471
+ {
18472
+ "kind": "method",
18473
+ "name": "t",
18474
+ "privacy": "protected",
18475
+ "parameters": [
18476
+ {
18477
+ "name": "key",
18478
+ "type": {
18479
+ "text": "string"
18480
+ }
18481
+ },
18482
+ {
18483
+ "name": "vars",
18484
+ "optional": true,
18485
+ "type": {
18486
+ "text": "MessageVars"
18487
+ }
18488
+ }
18489
+ ],
18490
+ "description": "The component's text for `key`, in its language, with `{placeholders}` filled from `vars`.",
18491
+ "inheritedFrom": {
18492
+ "name": "CmLocalizedElement",
18493
+ "module": "src/localize.ts"
18494
+ }
18495
+ },
18496
+ {
18497
+ "kind": "field",
18498
+ "name": "locale",
18499
+ "privacy": "protected",
18500
+ "description": "The locale used for numbers, dates and plurals.",
18501
+ "readonly": true,
18502
+ "inheritedFrom": {
18503
+ "name": "CmLocalizedElement",
18504
+ "module": "src/localize.ts"
18505
+ }
18506
+ },
18507
+ {
18508
+ "kind": "method",
18509
+ "name": "formatNumber",
18510
+ "privacy": "protected",
18511
+ "parameters": [
18512
+ {
18513
+ "name": "n",
18514
+ "type": {
18515
+ "text": "number"
18516
+ }
18517
+ },
18518
+ {
18519
+ "name": "options",
18520
+ "optional": true,
18521
+ "type": {
18522
+ "text": "Intl.NumberFormatOptions"
18523
+ }
18524
+ }
18525
+ ],
18526
+ "description": "A number formatted for the component's locale.",
18527
+ "inheritedFrom": {
18528
+ "name": "CmLocalizedElement",
18529
+ "module": "src/localize.ts"
18530
+ }
18531
+ }
18532
+ ],
18533
+ "events": [
18534
+ {
18535
+ "name": "cm-edit",
18536
+ "type": {
18537
+ "text": "CustomEvent"
18538
+ },
18539
+ "description": "When the pencil of an `editable` fact is pressed."
18406
18540
  }
18407
18541
  ],
18408
18542
  "attributes": [
@@ -18423,11 +18557,41 @@
18423
18557
  "default": "false",
18424
18558
  "description": "Takes half the width, so two short facts share a line.",
18425
18559
  "fieldName": "half"
18560
+ },
18561
+ {
18562
+ "name": "editable",
18563
+ "type": {
18564
+ "text": "boolean"
18565
+ },
18566
+ "default": "false",
18567
+ "description": "Shows a pencil button after the value that fires `cm-edit`. Since 1.9.1.",
18568
+ "fieldName": "editable"
18569
+ },
18570
+ {
18571
+ "name": "edit-label",
18572
+ "type": {
18573
+ "text": "string"
18574
+ },
18575
+ "default": "''",
18576
+ "description": "Accessible name of the pencil; default \"Edit {label}\". Since 1.9.1.",
18577
+ "fieldName": "editLabel"
18578
+ },
18579
+ {
18580
+ "name": "strings",
18581
+ "type": {
18582
+ "text": "Record<string, Message> | null | undefined"
18583
+ },
18584
+ "description": "Replaces this component's built-in text (labels, accessible names, messages), key by key. In HTML pass JSON:\n`strings='{\"close\":\"Fermer\"}'`. Keys and English defaults are listed under \"Built-in text\" on the component's\npage; set text for every component at once with `configure()` or `setStrings()` (see Localisation).",
18585
+ "fieldName": "strings",
18586
+ "inheritedFrom": {
18587
+ "name": "CmLocalizedElement",
18588
+ "module": "src/localize.ts"
18589
+ }
18426
18590
  }
18427
18591
  ],
18428
18592
  "superclass": {
18429
- "name": "LitElement",
18430
- "package": "lit"
18593
+ "name": "CmLocalizedElement",
18594
+ "module": "/src/localize.js"
18431
18595
  },
18432
18596
  "tagName": "cm-info-item",
18433
18597
  "customElement": true
@@ -18458,7 +18622,7 @@
18458
18622
  "declarations": [
18459
18623
  {
18460
18624
  "kind": "class",
18461
- "description": "The body of an admin page: sections side by side, for example the main column and side column of a detail page.\nSections stack into one column, in source order, when the layout is narrower than 768px (a container query, so\nit follows the space the layout gets, not the window). Put the main section first.\n\n`variant=\"record\"` (since 1.7) is the standard record page: a lead, contact, deal, account or ticket, an order or a\nproduct. Put in one main `cm-layout-section` and one `cm-layout-section variant=\"aside\"`. From 880px of the layout's\nown width the aside is a 320px column on the end side (on the left in right-to-left pages) and the main column takes\nthe rest, `space-24` apart. Narrower, they stack: the aside goes above the main content (the key facts first) or\nbelow it with `aside-position=\"below\"`, and the gap is `space-16` once the layout is 640px wide or less. The aside\nis placed by its variant, not by where it is in the source. Cards in a record layout's sections are as far apart as\nthe columns.",
18625
+ "description": "The body of an admin page: sections side by side, for example the main column and side column of a detail page.\nSections stack into one column, in source order, when the layout is narrower than 768px (a container query, so\nit follows the space the layout gets, not the window). Put the main section first.\n\n`variant=\"record\"` (since 1.7) is the standard record page: a lead, contact, deal, account or ticket, an order or a\nproduct. Put in one main `cm-layout-section` and one `cm-layout-section variant=\"aside\"`. From 880px of the layout's\nown width the aside is a 320px column on the end side (on the left in right-to-left pages) and the main column takes\nthe rest, `space-24` apart. Narrower, they stack: the aside goes above the main content (the key facts first) or\nbelow it with `aside-position=\"below\"`, and the gap is `space-16` once the layout is 640px wide or less. The aside\nis placed by its variant, not by where it is in the source. Cards in a record layout's sections are as far apart as\nthe columns.\n\n`variant=\"sidebar\"` (since 1.8.2) puts a 240px `cm-layout-section variant=\"sidebar\"` (views, folders or filters) on the\nstart side of the list it filters, from 768px of the layout's own width; narrower, it stacks above the list. Use it\nfor a ticket inbox or a mailbox instead of `one-third` / `two-thirds`, which give the views a third of the page.",
18462
18626
  "name": "CmLayout",
18463
18627
  "cssProperties": [
18464
18628
  {
@@ -18490,7 +18654,7 @@
18490
18654
  "name": "variant",
18491
18655
  "privacy": "public",
18492
18656
  "type": {
18493
- "text": "'default' | 'record'"
18657
+ "text": "'default' | 'record' | 'sidebar'"
18494
18658
  },
18495
18659
  "default": "'default'",
18496
18660
  "description": "`default`: a six-track grid for `full`, `one-half`, `one-third` and `two-thirds` sections.\n`record` (since 1.7): a main column and a 320px `aside` section on the end side from 880px (a 1280px laptop window with the side navigation gives about 950px); see the element description.",
@@ -18602,7 +18766,7 @@
18602
18766
  {
18603
18767
  "name": "variant",
18604
18768
  "type": {
18605
- "text": "'default' | 'record'"
18769
+ "text": "'default' | 'record' | 'sidebar'"
18606
18770
  },
18607
18771
  "default": "'default'",
18608
18772
  "description": "`default`: a six-track grid for `full`, `one-half`, `one-third` and `two-thirds` sections.\n`record` (since 1.7): a main column and a 320px `aside` section on the end side from 880px (a 1280px laptop window with the side navigation gives about 950px); see the element description.",
@@ -18650,10 +18814,10 @@
18650
18814
  "name": "variant",
18651
18815
  "privacy": "public",
18652
18816
  "type": {
18653
- "text": "'full' | 'one-half' | 'one-third' | 'two-thirds' | 'aside'"
18817
+ "text": "'full' | 'one-half' | 'one-third' | 'two-thirds' | 'aside' | 'sidebar'"
18654
18818
  },
18655
18819
  "default": "'full'",
18656
- "description": "Width on wide layouts: `full` (default), `one-half`, `one-third` or `two-thirds`. A detail page is a\n`two-thirds` main section and a `one-third` side section. Every section is full width once the layout stacks.\n`aside` (since 1.7) is the 320px side column of a `cm-layout variant=\"record\"`; in other layouts it is `one-third`.",
18820
+ "description": "Width on wide layouts: `full` (default), `one-half`, `one-third` or `two-thirds`. A detail page is a\n`two-thirds` main section and a `one-third` side section. Every section is full width once the layout stacks.\n`aside` (since 1.7) is the 320px side column of a `cm-layout variant=\"record\"`; in other layouts it is `one-third`.\n`sidebar` (since 1.8.2) is the 240px start column of a `cm-layout variant=\"sidebar\"`.",
18657
18821
  "attribute": "variant",
18658
18822
  "reflects": true
18659
18823
  }
@@ -18662,10 +18826,10 @@
18662
18826
  {
18663
18827
  "name": "variant",
18664
18828
  "type": {
18665
- "text": "'full' | 'one-half' | 'one-third' | 'two-thirds' | 'aside'"
18829
+ "text": "'full' | 'one-half' | 'one-third' | 'two-thirds' | 'aside' | 'sidebar'"
18666
18830
  },
18667
18831
  "default": "'full'",
18668
- "description": "Width on wide layouts: `full` (default), `one-half`, `one-third` or `two-thirds`. A detail page is a\n`two-thirds` main section and a `one-third` side section. Every section is full width once the layout stacks.\n`aside` (since 1.7) is the 320px side column of a `cm-layout variant=\"record\"`; in other layouts it is `one-third`.",
18832
+ "description": "Width on wide layouts: `full` (default), `one-half`, `one-third` or `two-thirds`. A detail page is a\n`two-thirds` main section and a `one-third` side section. Every section is full width once the layout stacks.\n`aside` (since 1.7) is the 320px side column of a `cm-layout variant=\"record\"`; in other layouts it is `one-third`.\n`sidebar` (since 1.8.2) is the 240px start column of a `cm-layout variant=\"sidebar\"`.",
18669
18833
  "fieldName": "variant"
18670
18834
  }
18671
18835
  ],
@@ -23130,6 +23294,12 @@
23130
23294
  "kind": "class",
23131
23295
  "description": "Top of an admin page: breadcrumbs, the page title and the page's main actions.\nThe Figma file calls this the \"Save Bar\" (80px desktop, 50px mobile).\nOn narrow screens the breadcrumbs collapse to a back link to the parent page. `back-href` (since 1.7) shows that\nback link at every width instead, before the title: use it on record pages opened from a list (a lead, an order).\nType (owner standard, 1.6): title 24/32 semibold (20/28 on phones), description 13/18, breadcrumbs 13/18.\nA badge in `title-adornment` sits beside the title and wraps under it only when the title runs out of room.",
23132
23296
  "name": "CmPageHeader",
23297
+ "cssProperties": [
23298
+ {
23299
+ "description": "The header's background (default `bg-surface`). `cm-app-frame panel` makes it transparent, so the header doesn't square off the panel's rounded corners. Since 1.8.2.",
23300
+ "name": "--cm-page-header-background"
23301
+ }
23302
+ ],
23133
23303
  "cssParts": [
23134
23304
  {
23135
23305
  "description": "The `description` line under the title.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commmerce/ui",
3
- "version": "1.8.1",
3
+ "version": "1.9.1",
4
4
  "description": "Commmerce UI web components: build apps that feel native to the Commmerce admin. Works in plain HTML, React, Vue and server-rendered pages.",
5
5
  "keywords": [
6
6
  "web-components",
@@ -50,8 +50,8 @@
50
50
  "test": "vitest run"
51
51
  },
52
52
  "dependencies": {
53
- "@commmerce/icons": "1.8.1",
54
- "@commmerce/tokens": "1.8.1",
53
+ "@commmerce/icons": "1.9.1",
54
+ "@commmerce/tokens": "1.9.1",
55
55
  "lit": "3.2.1"
56
56
  },
57
57
  "devDependencies": {