PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 1.1.12
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v1.1.12
1.1.13 1.1.12 1.1.11 1.1.10 1.1.9 1.1.8 1.1.7 1.1.6 1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.1 1.0.0 0.9.8 0.9.7 0.9.6 0.9.4 0.9.5 0.9.3 0.9.2 0.9.1 0.9.0 All 37 releases
← All changes | assets/js/workspace-wizard.min.js +42 -41 1.1.10 → 1.1.12 View file →
@@ -1,12 +1,12 @@
1 -(function(){"use strict";function v(s,...e){return{__wpdHtml:!0,strings:s,values:e}}function kt(s){return!!s&&s.__wpdHtml===!0}const yt="$$wpd$$",j=/\$\$wpd\$\$(\d+)\$\$/g,At="$$wpd-node$$",Ct=/^\$\$wpd-node\$\$(\d+)\$\$$/,$t=new Set(["style","script","textarea","title"]);function Et(s){let e="",t=!1,o=null,i=!1,n=null,r="",d=!1;for(let h=0;h<s.length;h++){const x=s[h];e+=x;for(let w=0;w<x.length;w++){const C=x[w];if(i){x.startsWith("-->",w)&&(i=!1,w+=2);continue}if(n!==null){C==="<"&&x[w+1]==="/"&&x.slice(w+2,w+2+n.length).toLowerCase()===n&&(w+=1+n.length,n=null,t=!0,d=!1,r="");continue}if(o!==null){C===o&&(o=null);continue}if(t){C==='"'||C==="'"?(o=C,d=!1):C===">"?(t=!1,d=!1,$t.has(r)&&(n=r),r=""):d&&(/[a-zA-Z0-9-]/.test(C)?r+=C.toLowerCase():d=!1);continue}if(x.startsWith("<!--",w)){i=!0,w+=3;continue}const I=x[w+1]??"";C==="<"&&/[a-zA-Z/!]/.test(I)&&(t=!0,r="",d=/[a-zA-Z]/.test(I))}h<s.length-1&&(e+=t||i||n!==null?`${yt}${h}$$`:`<!--${At}${h}$$-->`)}return e}const Fe=new WeakMap;function Xe(s){const e=Fe.get(s);if(e)return e;const t=document.createElement("template");t.innerHTML=Et(s);const o=[],i=(d,h)=>{if(d.nodeType===Node.ELEMENT_NODE){const C=d;for(const I of Array.from(C.attributes)){const b=I.name,_=I.value,N=b[0];if(j.test(_))if(j.lastIndex=0,N==="@"){const P=j.exec(_);j.lastIndex=0,o.push({path:h,kind:"event",name:b.slice(1),valueIndex:P?Number(P[1]):0}),C.removeAttribute(b)}else if(N==="."){const P=j.exec(_);j.lastIndex=0,o.push({path:h,kind:"prop",name:b.slice(1),valueIndex:P?Number(P[1]):0}),C.removeAttribute(b)}else if(N==="?"){const P=j.exec(_);j.lastIndex=0,o.push({path:h,kind:"bool",name:b.slice(1),valueIndex:P?Number(P[1]):0}),C.removeAttribute(b)}else{const P=[],D=[];let a=0,$;for(j.lastIndex=0;($=j.exec(_))!==null;)P.push(_.slice(a,$.index)),D.push(Number($[1])),a=$.index+$[0].length;P.push(_.slice(a)),o.push({path:h,kind:"attr",name:b,template:P,valueIndices:D}),C.setAttribute(b,"")}}}const x=Array.from(d.childNodes);let w=0;for(let C=0;C<x.length;C++){const I=x[C],b=C+w;if(I.nodeType===Node.COMMENT_NODE){const _=Ct.exec(I.data);if(_){const N=document.createTextNode("");I.parentNode.replaceChild(N,I),o.push({path:[...h,b],kind:"node",valueIndex:Number(_[1])})}continue}if(I.nodeType===Node.TEXT_NODE){const _=I.textContent||"";if(!j.test(_)){j.lastIndex=0;continue}j.lastIndex=0;const N=I.parentNode;let P=0,D;const a=[],$=[];for(j.lastIndex=0;(D=j.exec(_))!==null;){D.index>P&&a.push(document.createTextNode(_.slice(P,D.index)));const A=document.createTextNode("");a.push(A),$.push({path:[...h,b+a.length-1],kind:"node",valueIndex:Number(D[1])}),P=D.index+D[0].length}P<_.length&&a.push(document.createTextNode(_.slice(P)));for(const A of a)N.insertBefore(A,I);N.removeChild(I),w+=a.length-1,o.push(...$)}else i(I,[...h,b])}};i(t.content,[]);const r={template:t,buildParts:d=>{const h=[];for(const x of o){let w=d;for(const C of x.path)w=w.childNodes[C];x.kind==="node"?h.push({kind:"node",valueIndex:x.valueIndex,child:{anchor:w,state:null}}):x.kind==="attr"?h.push({kind:"attr",element:w,name:x.name,template:x.template,valueIndices:x.valueIndices}):x.kind==="event"?h.push({kind:"event",valueIndex:x.valueIndex,element:w,name:x.name}):x.kind==="prop"?h.push({kind:"prop",valueIndex:x.valueIndex,element:w,name:x.name}):x.kind==="bool"&&h.push({kind:"bool",valueIndex:x.valueIndex,element:w,name:x.name})}return h}};return Fe.set(s,r),r}const Ye=new WeakMap;function zt(s,e){for(const t of s.nodes)if(t.parentNode!==e)return!1;return!0}function Lt(s,e){const t=Ye.get(e);if(t&&t.strings===s.strings&&zt(t,e)){we(t.parts,s.values);return}const o=Xe(s.strings),i=o.template.content.cloneNode(!0),n=o.buildParts(i),r=Array.from(i.childNodes);for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(i),we(n,s.values),Ye.set(e,{strings:s.strings,parts:n,nodes:r})}function we(s,e){for(const t of s)if(t.kind==="node")_e(t.child,e[t.valueIndex]);else if(t.kind==="attr"){let o=t.template[0];for(let i=0;i<t.valueIndices.length;i++)o+=Qe(e[t.valueIndices[i]]),o+=t.template[i+1];o!==t.last&&(t.last=o,o===""?t.element.removeAttribute(t.name):t.element.setAttribute(t.name,o))}else if(t.kind==="event"){const o=e[t.valueIndex];o!==t.current&&(t.current&&t.element.removeEventListener(t.name,t.current),o&&t.element.addEventListener(t.name,o),t.current=o)}else if(t.kind==="prop"){const o=e[t.valueIndex];o!==t.last&&(t.last=o,t.element[t.name]=o)}else if(t.kind==="bool"){const o=!!e[t.valueIndex];o!==t.last&&(t.last=o,o?t.element.setAttribute(t.name,""):t.element.removeAttribute(t.name))}}function _e(s,e){if(e==null||e===!1){s.state&&(Z(s.state),s.state=null);return}if(Array.isArray(e)){Mt(s,e);return}if(kt(e)){St(s,e);return}if(e instanceof Node){Tt(s,e);return}It(s,Qe(e))}function Tt(s,e){const t=s.state;t?.shape==="node"&&t.node===e||(t&&Z(t),J(s,[e]),s.state={shape:"node",node:e})}function It(s,e){const t=s.state;if(t?.shape==="text"){t.text!==e&&(t.node.textContent=e,t.text=e);return}t&&Z(t);const o=document.createTextNode(e);J(s,[o]),s.state={shape:"text",node:o,text:e}}function St(s,e){const t=s.state;if(t?.shape==="template"&&t.strings===e.strings){we(t.parts,e.values);return}t&&Z(t);const o=Xe(e.strings),i=o.template.content.cloneNode(!0),n=o.buildParts(i),r=Array.from(i.childNodes);J(s,[i]),we(n,e.values),s.state={shape:"template",strings:e.strings,parts:n,nodes:r}}function Mt(s,e){const t=s.state;if(t?.shape==="array"){const i=Math.min(t.entries.length,e.length);for(let n=0;n<i;n++)_e(t.entries[n],e[n]);if(e.length<t.entries.length){for(let n=e.length;n<t.entries.length;n++){const r=t.entries[n];r.state&&Z(r.state),r.anchor.remove()}t.entries.length=e.length}else for(let n=t.entries.length;n<e.length;n++){const r=document.createTextNode("");J(s,[r]);const d={anchor:r,state:null};_e(d,e[n]),t.entries.push(d)}return}t&&Z(t);const o=[];for(const i of e){const n=document.createTextNode("");J(s,[n]);const r={anchor:n,state:null};_e(r,i),o.push(r)}s.state={shape:"array",entries:o}}function J(s,e){const t=s.anchor.parentNode;if(t)for(const o of e)t.insertBefore(o,s.anchor)}function Z(s){if(s.shape==="text"){s.node.remove();return}if(s.shape==="template"){for(const e of s.parts)e.kind==="node"&&e.child.state&&(Z(e.child.state),e.child.state=null);for(const e of s.nodes)e.parentNode&&e.parentNode.removeChild(e);return}if(s.shape==="node"){s.node.parentNode&&s.node.parentNode.removeChild(s.node);return}for(const e of s.entries)e.state&&Z(e.state),e.anchor.remove()}function Qe(s){return s==null||s===!1?"":String(s)}const O=class O extends HTMLElement{constructor(){super(),this._renderScheduled=!1,this._propValues={},this.constructor.shadow?(this.attachShadow({mode:"open"}),this._renderRoot=this.shadowRoot):this._renderRoot=this,this._installPropAccessors()}static get observedAttributes(){return this.props.map(Ge)}connectedCallback(){this._adoptStyles(),this.requestUpdate()}attributeChangedCallback(e,t,o){if(t===o)return;const i=Pt(e);this._propValues[i]=o,this.requestUpdate()}get classNames(){return Array.from(this.classList)}set classNames(e){if(e==null){this.removeAttribute("class");return}const o=(Array.isArray(e)?e:String(e).split(/\s+/)).map(i=>String(i).trim()).filter(i=>i!=="");this.className=o.join(" ")}requestUpdate(){this._scheduleRender()}emit(e,t){return this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}_installPropAccessors(){const e=this.constructor;for(const t of e.props){if(Object.getOwnPropertyDescriptor(this,t))continue;const o=Ge(t);Object.defineProperty(this,t,{get:()=>t in this._propValues?this._propValues[t]:this.getAttribute(o),set:i=>{let n;i==null||i===!1?n=null:i===!0?n="":n=String(i),this._propValues[t]=n,n===null?this.removeAttribute(o):this.setAttribute(o,n),this.requestUpdate()},enumerable:!0,configurable:!0})}}_scheduleRender(){this._renderScheduled||!this.isConnected||(this._renderScheduled=!0,queueMicrotask(()=>{this._renderScheduled=!1,this.isConnected&&Lt(this.render(),this._renderRoot)}))}_adoptStyles(){const e=this.constructor;if(e.styles.length!==0)if(e.shadow&&this.shadowRoot){const t=e.styles.map(o=>o.sheet).filter(o=>o!==null);if(this.shadowRoot.adoptedStyleSheets=t,t.length!==e.styles.length){for(const o of e.styles)if(!o.sheet){const i=document.createElement("style");i.textContent=o.cssText,this.shadowRoot.appendChild(i)}}}else this._adoptLightStyles(e)}_adoptLightStyles(e){if(!O._lightStylesAdopted.has(e)){O._lightStylesAdopted.add(e);for(const t of e.styles){const o=document.createElement("style");o.dataset.osUi=this.tagName.toLowerCase(),o.textContent=t.cssText,document.head.appendChild(o)}}}};O.props=[],O.styles=[],O.shadow=!0,O._lightStylesAdopted=new WeakSet;let R=O;function H(s,e){customElements.get(s)||customElements.define(s,e)}function Ge(s){return s.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Pt(s){return s.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}const Nt=(()=>{try{return typeof new CSSStyleSheet().replaceSync=="function"}catch{return!1}})();function z(s,...e){let t=s[0];for(let o=1;o<s.length;o++){const i=e[o-1];if(typeof i=="string"||typeof i=="number")t+=String(i);else if(i&&i.__wpdCss)t+=i.cssText;else throw new TypeError("[os-ui] css`` interpolations must be strings, numbers, or other css`` results. Got: "+typeof i);t+=s[o]}if(Nt){const o=new CSSStyleSheet;return o.replaceSync(t),{__wpdCss:!0,sheet:o,cssText:t}}return{__wpdCss:!0,sheet:null,cssText:t}}function Rt(s){const e=[],t=[];let o=null,i=s.parentElement;for(;i&&!(i===document.body||i===document.documentElement);){const r=i.id||"";if(r.startsWith("wp-window-")){o=r.slice(10);break}if(i.tagName.toLowerCase()==="os-tabpanel"){const d=i.getAttribute("for");d&&t.unshift(d)}i=i.parentElement}o&&e.push(Ae(o));for(const r of t)e.push("tab-"+Ae(r));const n=s.getAttribute("label");return n&&e.push(Ae(n)),e.length===0?"os-unnamed":"os-"+e.filter(r=>r!=="").join("-")}function Ae(s){return s.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function Je(s){if(s.id)return s.id;const e=Rt(s);return s.id=e,e}const q=z`:host{--_holo-fill:var( --os-ui-holo-fill,${"linear-gradient( 124deg, #afa2e8 0%, #f5a8ea 46%, #8ee9f7 100% )"} );--_holo-ink:var( --os-ui-holo-ink,#0c0b0f );--_holo-sheen:var( --os-ui-holo-sheen,linear-gradient( 124deg,rgba( 159,214,255,0.1 ) 0%,rgba( 236,155,255,0.12 ) 34%,rgba( 242,82,252,0.1 ) 58%,rgba( 147,240,198,0.09 ) 100% ) );--_holo-edge:var( --os-ui-holo-edge,linear-gradient( 124deg,rgba( 154,242,255,0.7 ) 0%,rgba( 236,155,255,0.85 ) 38%,rgba( 242,82,252,0.7 ) 62%,rgba( 159,152,255,0.6 ) 100% ) );--_holo-edge-quiet:var( --os-ui-holo-edge-quiet,linear-gradient( 124deg,rgba( 154,242,255,0.22 ) 0%,rgba( 236,155,255,0.28 ) 38%,rgba( 242,82,252,0.22 ) 62%,rgba( 159,152,255,0.2 ) 100% ) );--_holo-glow:var( --os-ui-holo-glow,0 0 0 1px rgba( 242,82,252,0.28 ),0 2px 10px rgba( 242,82,252,0.22 ) );--_holo-glow-strong:var( --os-ui-holo-glow-strong,0 0 0 1px rgba( 242,82,252,0.42 ),0 4px 18px rgba( 242,82,252,0.38 ),0 1px 3px rgba( 12,11,15,0.6 ) );--_holo-track:var( --os-ui-holo-track,rgba( 255,251,255,0.16 ) );--_holo-track-edge:var( --os-ui-holo-track-edge,#8c8f94 );--_holo-ring-color:var( --os-ui-accent-dim,#2271b1 );--_holo-focus:var( --os-ui-focus-ring,0 0 0 2px rgba( 12,11,15,0.9 ),0 0 0 4px #f252fc,0 0 12px 2px rgba( 242,82,252,0.45 ) );--_holo-focus-field:var( --os-ui-focus-ring-field,0 0 0 1px #f252fc,0 0 0 4px rgba( 242,82,252,0.18 ) );--_holo-t:var( --os-ui-holo-transition,220ms );--_holo-t-fast:var( --os-ui-motion-fast,140ms );--_holo-t-slow:var( --os-ui-motion-slow,340ms );--_holo-t-ambient:var( --os-ui-motion-ambient,12s );--_holo-spring:var( --os-ui-ease-spring,cubic-bezier( 0.32,1.5,0.55,1 ) );--_holo-ease:var( --os-ui-ease-out,cubic-bezier( 0.22,0.9,0.28,1 ) );--_holo-loop:var( --os-ui-ease-loop,cubic-bezier( 0.45,0,0.55,1 ) )}`,Wt=z` .os-holo-fill{background-color:transparent;background-image:var( --_holo-fill );background-size:220% 220%;background-position:22% 28%;background-repeat:no-repeat;color:var( --_holo-ink );transition:background-position var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease,filter var( --_holo-t ) ease}.os-holo-fill:hover{background-position:74% 66%}.os-holo-fill:active{background-position:88% 82%;filter:brightness( 0.94 )}@media ( prefers-reduced-motion:reduce ){.os-holo-fill{transition-duration:1ms}.os-holo-fill:hover,.os-holo-fill:active{background-position:22% 28%}}`,Ce=z` .os-holo-sheen{position:relative;isolation:isolate}.os-holo-sheen::before{content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;background-image:var( --_holo-sheen );background-size:200% 200%;background-position:20% 30%;opacity:0;pointer-events:none;transition:opacity var( --_holo-t ) ease,background-position var( --_holo-t ) ease}.os-holo-sheen:hover::before,.os-holo-sheen:focus-visible::before{opacity:1;background-position:76% 68%}@media ( prefers-reduced-motion:reduce ){.os-holo-sheen::before{transition-duration:1ms}.os-holo-sheen:hover::before,.os-holo-sheen:focus-visible::before{background-position:20% 30%}}`,et=z` .os-holo-edge{position:relative}.os-holo-edge::after{content:'';position:absolute;inset:0;border-radius:inherit;padding:1px;background-image:var( --_holo-edge-quiet );opacity:0;pointer-events:none;-webkit-mask:linear-gradient( #000 0 0 ) content-box,linear-gradient( #000 0 0 );-webkit-mask-composite:xor;mask:linear-gradient( #000 0 0 ) content-box,linear-gradient( #000 0 0 );mask-composite:exclude;transition:opacity var( --_holo-t ) ease}.os-holo-edge:hover::after,.os-holo-edge:focus-visible::after{background-image:var( --_holo-edge );opacity:1}.os-holo-edge.is-lit::after{background-image:var( --_holo-edge );opacity:1}@media ( prefers-reduced-motion:reduce ){.os-holo-edge::after{transition-duration:1ms}}`,$e=z` .os-holo-glint{position:absolute;inset:0;border-radius:inherit;overflow:hidden;pointer-events:none}.os-holo-glint::before{content:'';position:absolute;top:-60%;bottom:-60%;width:45%;inset-inline-start:-60%;background:linear-gradient( 90deg,transparent 0%,rgba( 255,251,255,0.14 ) 45%,rgba( 255,251,255,0.22 ) 50%,rgba( 255,251,255,0.14 ) 55%,transparent 100% );transform:rotate( 18deg ) translateX( 0 );opacity:0}:hover>.os-holo-glint::before,:focus-visible>.os-holo-glint::before,:host(:hover )>.os-holo-glint::before,:host(:focus-visible )>.os-holo-glint::before{animation:os-holo-glint var( --_holo-t-slow ) var( --_holo-ease )}@keyframes os-holo-glint{0%{opacity:0;transform:rotate( 18deg ) translateX( 0 )}15%{opacity:1}85%{opacity:1}100%{opacity:0;transform:rotate( 18deg ) translateX( 240vw )}}@media ( prefers-reduced-motion:reduce ){:hover>.os-holo-glint::before,:focus-visible>.os-holo-glint::before,:host(:hover )>.os-holo-glint::before,:host(:focus-visible )>.os-holo-glint::before{animation:none}}`,tt=z` .os-holo-ring{position:absolute;inset:0;border-radius:inherit;box-shadow:0 0 0 0 var( --_holo-ring-color );opacity:0;pointer-events:none}:active:not(:disabled )>.os-holo-ring,:host(:active:not( [ disabled ] ) )>.os-holo-ring{animation:os-holo-ring var( --_holo-t-slow ) var( --_holo-ease )}@keyframes os-holo-ring{0%{opacity:0.45;box-shadow:0 0 0 0 var( --_holo-ring-color )}100%{opacity:0;box-shadow:0 0 0 10px transparent}}@media ( prefers-reduced-motion:reduce ){:active:not(:disabled )>.os-holo-ring,:host(:active:not( [ disabled ] ) )>.os-holo-ring{animation:none}}`,Dt=z` .os-holo-shimmer{background-image:var( --_holo-fill );background-size:300% 300%;background-repeat:no-repeat;animation:os-holo-shimmer 2.4s var( --_holo-loop ) infinite}@keyframes os-holo-shimmer{0%{background-position:0% 50%}100%{background-position:100% 50%}}@media ( prefers-reduced-motion:reduce ){.os-holo-shimmer{animation:none;background-position:30% 50%}}`,Ht=z` .os-holo-enter{animation:os-holo-enter var( --_holo-t ) var( --_holo-spring )}@keyframes os-holo-enter{from{opacity:0;transform:scale( 0.96 )}}@media ( prefers-reduced-motion:reduce ){.os-holo-enter{animation:none}}`,ot=z` input:where(:not( [ type='checkbox' ] ):not( [ type='radio' ] ) ),select,textarea{transition:background-color var( --_holo-t ) ease,border-color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease}input:where(:not( [ type='checkbox' ] ):not( [ type='radio' ] ) ):hover:not(:disabled ),select:hover:not(:disabled ),textarea:hover:not(:disabled ){border-color:var( --os-ui-border-strong,#8c8f94 )}input:where(:not( [ type='checkbox' ] ):not( [ type='radio' ] ) ):focus,input:where(:not( [ type='checkbox' ] ):not( [ type='radio' ] ) ):focus-visible,select:focus,select:focus-visible,textarea:focus,textarea:focus-visible{outline:none;border-color:var( --os-ui-accent,#2271b1 );box-shadow:var( --_holo-focus-field )}input::placeholder,textarea::placeholder{color:var( --os-ui-fg-faint,#8c8f94 );opacity:1}input::selection,textarea::selection{background:var( --os-ui-selection-bg,rgba( 159,152,255,0.6 ) );color:var( --os-ui-selection-fg,#fffbff )}@media ( prefers-reduced-motion:reduce ){input:where(:not( [ type='checkbox' ] ):not( [ type='radio' ] ) ),select,textarea{transition-duration:1ms}}`,st=z` input[ type='checkbox' ],input[ type='radio' ]{appearance:none;-webkit-appearance:none;position:relative;flex:0 0 auto;box-sizing:border-box;width:16px;height:16px;margin:0;padding:0;border:1px solid var( --_holo-track-edge );border-radius:4px;background-color:var( --_holo-track );background-image:none;background-repeat:no-repeat;cursor:inherit;transition:background-color var( --_holo-t ) ease,border-color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease}input[ type='radio' ]{border-radius:50%}input[ type='checkbox' ]:hover:not(:disabled ),input[ type='radio' ]:hover:not(:disabled ){border-color:var( --os-ui-accent,#2271b1 )}input[ type='checkbox' ]:focus-visible,input[ type='radio' ]:focus-visible{outline:none;box-shadow:var( --_holo-focus )}input[ type='checkbox' ]:checked,input[ type='checkbox' ]:indeterminate,input[ type='radio' ]:checked{border-color:transparent;background-color:var( --os-ui-accent,#2271b1 )}input[ type='checkbox' ]:checked:focus-visible,input[ type='radio' ]:checked:focus-visible{box-shadow:var( --_holo-focus )}input[ type='checkbox' ]:checked::after{content:'';position:absolute;inset-inline-start:50%;top:46%;width:3.5px;height:7.5px;border:solid var( --os-ui-accent-ink,var( --os-ui-fg-on-accent,#fff ) );border-width:0 2px 2px 0;transform:translate( -50%,-50% ) rotate( 45deg );animation:os-holo-tick 180ms cubic-bezier( 0.3,1.4,0.6,1 )}input[ type='checkbox' ]:indeterminate::after{content:'';position:absolute;inset-inline-start:50%;top:50%;width:8px;height:2px;border:0;border-radius:1px;background:var( --os-ui-accent-ink,var( --os-ui-fg-on-accent,#fff ) );transform:translate( -50%,-50% )}input[ type='radio' ]:checked::after{content:'';position:absolute;inset-inline-start:50%;top:50%;width:6px;height:6px;border-radius:50%;background:var( --os-ui-accent-ink,var( --os-ui-fg-on-accent,#fff ) );transform:translate( -50%,-50% );animation:os-holo-tick 180ms cubic-bezier( 0.3,1.4,0.6,1 )}input[ type='checkbox' ]:disabled,input[ type='radio' ]:disabled{cursor:not-allowed}@keyframes os-holo-tick{from{opacity:0;transform:translate( -50%,-50% ) rotate( 45deg ) scale( 0.4 )}}@media ( prefers-reduced-motion:reduce ){input[ type='checkbox' ]:checked::after,input[ type='radio' ]:checked::after{animation:none}}`,it=z` @keyframes os-holo-drift{0%{background-position:16% 26%}50%{background-position:84% 74%}100%{background-position:16% 26%}}.os-holo-alive{animation:os-holo-drift var( --_holo-t-ambient ) var( --_holo-loop ) infinite}@media ( prefers-reduced-motion:reduce ){.os-holo-alive{animation:none}}`;z` ${q} ${Wt} ${Ce} ${et} ${$e} ${tt} ${Dt} ${Ht} ${ot} ${st} ${it} `;const Vt=z` ${q}:host{display:none;position:fixed;inset:0;align-items:center;justify-content:center;background:var( --os-ui-scrim,rgba( 0,0,0,0.45 ) );background-image:var( --os-ui-scrim-image,none );background-repeat:var( --os-ui-scrim-image-repeat,repeat );background-size:var( --os-ui-scrim-image-size,auto );background-position:var( --os-ui-scrim-image-position,center );backdrop-filter:blur( 2px );z-index:10000;--os-ui-fg:var( --os-ui-modal-text,#f0f0f1 );--os-ui-fg-muted:var( --os-ui-modal-text-muted,#a7aaad );--os-ui-border:var( --os-ui-modal-border,rgba( 255,255,255,0.25 ) );--os-window-bg:var( --os-ui-modal-field-bg,#2c3338 );--os-ui-button-bg-hover:var( --os-ui-modal-button-bg-hover,rgba( 255,255,255,0.08 ) );--os-ui-surface:var( --os-ui-modal-surface,#2c3338 );--os-ui-surface-elevated:var( --os-ui-modal-surface-elevated,#3c434a );--os-ui-border-strong:var( --os-ui-modal-border-strong,rgba( 255,255,255,0.35 ) );--os-ui-hover:var( --os-ui-modal-hover,rgba( 255,255,255,0.08 ) );--os-ui-notice-color:var( --os-ui-modal-text,#f0f0f1 );--os-ui-card-bg:var( --os-ui-modal-surface,#2c3338 );--os-ui-card-fg:var( --os-ui-modal-text,#f0f0f1 );--os-ui-card-border:var( --os-ui-modal-border,rgba( 255,255,255,0.25 ) );--os-ui-card-border-hover:var( --os-ui-modal-border-strong,rgba( 255,255,255,0.35 ) )}:host( [ open ] ){display:flex;animation:os-modal-scrim var( --_holo-t ) var( --_holo-ease )}:host( [ open ] ) .dialog{animation:os-modal-dialog var( --_holo-t ) var( --_holo-spring )}@keyframes os-modal-scrim{from{opacity:0}}@keyframes os-modal-dialog{from{opacity:0;transform:scale( 0.96 ) translateY( 8px )}}@media ( prefers-reduced-motion:reduce ){:host( [ open ] ),:host( [ open ] ) .dialog{animation:none}}.dialog{max-width:92vw;max-height:90vh;background-color:var( --os-ui-modal-bg,#1d2327 );background-image:var( --os-ui-dialog-bg-image,none );background-repeat:var( --os-ui-dialog-bg-image-repeat,repeat );background-size:var( --os-ui-dialog-bg-image-size,auto );background-position:var( --os-ui-dialog-bg-image-position,center );color:var( --os-ui-modal-fg,var( --os-fg,#fff ) );border:1px solid var( --os-ui-border,rgba( 255,255,255,0.08 ) );border-radius:10px;box-shadow:0 20px 50px rgba( 0,0,0,0.6 );display:flex;flex-direction:column;overflow:hidden}:host( [ size='sm' ] ) .dialog{width:min( 360px,92vw )}:host(:not( [ size ] ) ) .dialog,:host( [ size='md' ] ) .dialog{width:min( 540px,92vw )}:host( [ size='lg' ] ) .dialog{width:min( 760px,94vw )}.header{display:flex;align-items:center;gap:10px;padding:16px 20px 12px;border-bottom:1px solid var( --os-ui-border,rgba( 255,255,255,0.06 ) )}.title{margin:0;flex:1;font-size:15px;font-weight:600}.header-actions{display:flex;gap:6px}.header-actions::slotted( * ){margin-inline-start:6px}.close{background:transparent;border:0;color:inherit;font-size:18px;line-height:1;padding:4px 8px;border-radius:4px;cursor:pointer;opacity:0.7}.close:hover{opacity:1;background:var( --os-ui-hover,rgba( 255,255,255,0.08 ) )}.body{padding:16px 20px;overflow:auto;flex:1 1 auto;font-size:13px;line-height:1.5}.footer{padding:12px 20px 16px;border-top:1px solid var( --os-ui-border,rgba( 255,255,255,0.06 ) )}.footer slot{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}:host( [ mandatory ] ) .close{display:none}`,nt='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',te=class te extends R{constructor(){super(...arguments),this._prevFocus=null,this._onKey=e=>{if(e.key==="Escape"&&!this.hasAttribute("mandatory")){e.preventDefault(),this._cancel();return}if(e.key==="Tab"){const t=this._focusables();if(t.length===0)return;const o=t[0],i=t[t.length-1],n=this.ownerDocument,r=n?n.activeElement:null,d=e.composedPath()[0]||r;e.shiftKey&&d===o?(e.preventDefault(),i.focus()):!e.shiftKey&&d===i&&(e.preventDefault(),o.focus())}},this._onBackdrop=e=>{if(this.hasAttribute("mandatory"))return;const t=e.composedPath();(t.length>0?t[0]:e.target)===this&&this._cancel()}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","dialog"),this.setAttribute("aria-modal","true"),this.addEventListener("keydown",this._onKey),this.addEventListener("click",this._onBackdrop)}disconnectedCallback(){this.removeEventListener("keydown",this._onKey),this.removeEventListener("click",this._onBackdrop)}attributeChangedCallback(e,t,o){if(super.attributeChangedCallback?.(e,t,o),e==="open"){if(o!==null){const i=this.ownerDocument;this._prevFocus=i?i.activeElement:null,queueMicrotask(()=>this._focusFirst())}else if(this._prevFocus){try{this._prevFocus.focus()}catch{}this._prevFocus=null}}}showModal(){this.setAttribute("open","")}hideModal(){this.removeAttribute("open")}_focusables(){const e=this.shadowRoot;if(!e)return[];const t=Array.from(this.querySelectorAll(nt)),o=Array.from(e.querySelectorAll(nt));return[...t,...o].filter(i=>i.offsetParent!==null||i.tagName==="BUTTON")}_focusFirst(){const e=this._focusables();e.length>0?e[0].focus():this.shadowRoot?.querySelector(".dialog")?.focus?.()}_cancel(){const e=new CustomEvent("os-modal-cancel",{bubbles:!0,cancelable:!0,composed:!0});this.dispatchEvent(e)&&this.hideModal()}render(){const e=this.getAttribute("title")??"",t=this.hasAttribute("mandatory");return v`
1 +(function(){"use strict";function g(s,...e){return{__wpdHtml:!0,strings:s,values:e}}function kt(s){return!!s&&s.__wpdHtml===!0}const yt="$$wpd$$",j=/\$\$wpd\$\$(\d+)\$\$/g,At="$$wpd-node$$",Ct=/^\$\$wpd-node\$\$(\d+)\$\$$/,$t=new Set(["style","script","textarea","title"]);function Et(s){let e="",t=!1,o=null,i=!1,n=null,r="",d=!1;for(let h=0;h<s.length;h++){const x=s[h];e+=x;for(let w=0;w<x.length;w++){const C=x[w];if(i){x.startsWith("-->",w)&&(i=!1,w+=2);continue}if(n!==null){C==="<"&&x[w+1]==="/"&&x.slice(w+2,w+2+n.length).toLowerCase()===n&&(w+=1+n.length,n=null,t=!0,d=!1,r="");continue}if(o!==null){C===o&&(o=null);continue}if(t){C==='"'||C==="'"?(o=C,d=!1):C===">"?(t=!1,d=!1,$t.has(r)&&(n=r),r=""):d&&(/[a-zA-Z0-9-]/.test(C)?r+=C.toLowerCase():d=!1);continue}if(x.startsWith("<!--",w)){i=!0,w+=3;continue}const I=x[w+1]??"";C==="<"&&/[a-zA-Z/!]/.test(I)&&(t=!0,r="",d=/[a-zA-Z]/.test(I))}h<s.length-1&&(e+=t||i||n!==null?`${yt}${h}$$`:`<!--${At}${h}$$-->`)}return e}const Fe=new WeakMap;function Xe(s){const e=Fe.get(s);if(e)return e;const t=document.createElement("template");t.innerHTML=Et(s);const o=[],i=(d,h)=>{if(d.nodeType===Node.ELEMENT_NODE){const C=d;for(const I of Array.from(C.attributes)){const b=I.name,_=I.value,N=b[0];if(j.test(_))if(j.lastIndex=0,N==="@"){const P=j.exec(_);j.lastIndex=0,o.push({path:h,kind:"event",name:b.slice(1),valueIndex:P?Number(P[1]):0}),C.removeAttribute(b)}else if(N==="."){const P=j.exec(_);j.lastIndex=0,o.push({path:h,kind:"prop",name:b.slice(1),valueIndex:P?Number(P[1]):0}),C.removeAttribute(b)}else if(N==="?"){const P=j.exec(_);j.lastIndex=0,o.push({path:h,kind:"bool",name:b.slice(1),valueIndex:P?Number(P[1]):0}),C.removeAttribute(b)}else{const P=[],W=[];let a=0,$;for(j.lastIndex=0;($=j.exec(_))!==null;)P.push(_.slice(a,$.index)),W.push(Number($[1])),a=$.index+$[0].length;P.push(_.slice(a)),o.push({path:h,kind:"attr",name:b,template:P,valueIndices:W}),C.setAttribute(b,"")}}}const x=Array.from(d.childNodes);let w=0;for(let C=0;C<x.length;C++){const I=x[C],b=C+w;if(I.nodeType===Node.COMMENT_NODE){const _=Ct.exec(I.data);if(_){const N=document.createTextNode("");I.parentNode.replaceChild(N,I),o.push({path:[...h,b],kind:"node",valueIndex:Number(_[1])})}continue}if(I.nodeType===Node.TEXT_NODE){const _=I.textContent||"";if(!j.test(_)){j.lastIndex=0;continue}j.lastIndex=0;const N=I.parentNode;let P=0,W;const a=[],$=[];for(j.lastIndex=0;(W=j.exec(_))!==null;){W.index>P&&a.push(document.createTextNode(_.slice(P,W.index)));const A=document.createTextNode("");a.push(A),$.push({path:[...h,b+a.length-1],kind:"node",valueIndex:Number(W[1])}),P=W.index+W[0].length}P<_.length&&a.push(document.createTextNode(_.slice(P)));for(const A of a)N.insertBefore(A,I);N.removeChild(I),w+=a.length-1,o.push(...$)}else i(I,[...h,b])}};i(t.content,[]);const r={template:t,buildParts:d=>{const h=[];for(const x of o){let w=d;for(const C of x.path)w=w.childNodes[C];x.kind==="node"?h.push({kind:"node",valueIndex:x.valueIndex,child:{anchor:w,state:null}}):x.kind==="attr"?h.push({kind:"attr",element:w,name:x.name,template:x.template,valueIndices:x.valueIndices}):x.kind==="event"?h.push({kind:"event",valueIndex:x.valueIndex,element:w,name:x.name}):x.kind==="prop"?h.push({kind:"prop",valueIndex:x.valueIndex,element:w,name:x.name}):x.kind==="bool"&&h.push({kind:"bool",valueIndex:x.valueIndex,element:w,name:x.name})}return h}};return Fe.set(s,r),r}const Ye=new WeakMap;function zt(s,e){for(const t of s.nodes)if(t.parentNode!==e)return!1;return!0}function Lt(s,e){const t=Ye.get(e);if(t&&t.strings===s.strings&&zt(t,e)){we(t.parts,s.values);return}const o=Xe(s.strings),i=o.template.content.cloneNode(!0),n=o.buildParts(i),r=Array.from(i.childNodes);for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(i),we(n,s.values),Ye.set(e,{strings:s.strings,parts:n,nodes:r})}function we(s,e){for(const t of s)if(t.kind==="node")_e(t.child,e[t.valueIndex]);else if(t.kind==="attr"){let o=t.template[0];for(let i=0;i<t.valueIndices.length;i++)o+=Qe(e[t.valueIndices[i]]),o+=t.template[i+1];o!==t.last&&(t.last=o,o===""?t.element.removeAttribute(t.name):t.element.setAttribute(t.name,o))}else if(t.kind==="event"){const o=e[t.valueIndex];o!==t.current&&(t.current&&t.element.removeEventListener(t.name,t.current),o&&t.element.addEventListener(t.name,o),t.current=o)}else if(t.kind==="prop"){const o=e[t.valueIndex];o!==t.last&&(t.last=o,t.element[t.name]=o)}else if(t.kind==="bool"){const o=!!e[t.valueIndex];o!==t.last&&(t.last=o,o?t.element.setAttribute(t.name,""):t.element.removeAttribute(t.name))}}function _e(s,e){if(e==null||e===!1){s.state&&(Z(s.state),s.state=null);return}if(Array.isArray(e)){St(s,e);return}if(kt(e)){Mt(s,e);return}if(e instanceof Node){Tt(s,e);return}It(s,Qe(e))}function Tt(s,e){const t=s.state;t?.shape==="node"&&t.node===e||(t&&Z(t),J(s,[e]),s.state={shape:"node",node:e})}function It(s,e){const t=s.state;if(t?.shape==="text"){t.text!==e&&(t.node.textContent=e,t.text=e);return}t&&Z(t);const o=document.createTextNode(e);J(s,[o]),s.state={shape:"text",node:o,text:e}}function Mt(s,e){const t=s.state;if(t?.shape==="template"&&t.strings===e.strings){we(t.parts,e.values);return}t&&Z(t);const o=Xe(e.strings),i=o.template.content.cloneNode(!0),n=o.buildParts(i),r=Array.from(i.childNodes);J(s,[i]),we(n,e.values),s.state={shape:"template",strings:e.strings,parts:n,nodes:r}}function St(s,e){const t=s.state;if(t?.shape==="array"){const i=Math.min(t.entries.length,e.length);for(let n=0;n<i;n++)_e(t.entries[n],e[n]);if(e.length<t.entries.length){for(let n=e.length;n<t.entries.length;n++){const r=t.entries[n];r.state&&Z(r.state),r.anchor.remove()}t.entries.length=e.length}else for(let n=t.entries.length;n<e.length;n++){const r=document.createTextNode("");J(s,[r]);const d={anchor:r,state:null};_e(d,e[n]),t.entries.push(d)}return}t&&Z(t);const o=[];for(const i of e){const n=document.createTextNode("");J(s,[n]);const r={anchor:n,state:null};_e(r,i),o.push(r)}s.state={shape:"array",entries:o}}function J(s,e){const t=s.anchor.parentNode;if(t)for(const o of e)t.insertBefore(o,s.anchor)}function Z(s){if(s.shape==="text"){s.node.remove();return}if(s.shape==="template"){for(const e of s.parts)e.kind==="node"&&e.child.state&&(Z(e.child.state),e.child.state=null);for(const e of s.nodes)e.parentNode&&e.parentNode.removeChild(e);return}if(s.shape==="node"){s.node.parentNode&&s.node.parentNode.removeChild(s.node);return}for(const e of s.entries)e.state&&Z(e.state),e.anchor.remove()}function Qe(s){return s==null||s===!1?"":String(s)}const O=class O extends HTMLElement{constructor(){super(),this._renderScheduled=!1,this._propValues={},this.constructor.shadow?(this.attachShadow({mode:"open"}),this._renderRoot=this.shadowRoot):this._renderRoot=this,this._installPropAccessors()}static get observedAttributes(){return this.props.map(Ge)}connectedCallback(){this._adoptStyles(),this.requestUpdate()}attributeChangedCallback(e,t,o){if(t===o)return;const i=Pt(e);this._propValues[i]=o,this.requestUpdate()}get classNames(){return Array.from(this.classList)}set classNames(e){if(e==null){this.removeAttribute("class");return}const o=(Array.isArray(e)?e:String(e).split(/\s+/)).map(i=>String(i).trim()).filter(i=>i!=="");this.className=o.join(" ")}requestUpdate(){this._scheduleRender()}emit(e,t){return this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}_installPropAccessors(){const e=this.constructor;for(const t of e.props){if(Object.getOwnPropertyDescriptor(this,t))continue;const o=Ge(t);Object.defineProperty(this,t,{get:()=>t in this._propValues?this._propValues[t]:this.getAttribute(o),set:i=>{let n;i==null||i===!1?n=null:i===!0?n="":n=String(i),this._propValues[t]=n,n===null?this.removeAttribute(o):this.setAttribute(o,n),this.requestUpdate()},enumerable:!0,configurable:!0})}}_scheduleRender(){this._renderScheduled||!this.isConnected||(this._renderScheduled=!0,queueMicrotask(()=>{this._renderScheduled=!1,this.isConnected&&Lt(this.render(),this._renderRoot)}))}_adoptStyles(){const e=this.constructor;if(e.styles.length!==0)if(e.shadow&&this.shadowRoot){const t=e.styles.map(o=>o.sheet).filter(o=>o!==null);if(this.shadowRoot.adoptedStyleSheets=t,t.length!==e.styles.length){for(const o of e.styles)if(!o.sheet){const i=document.createElement("style");i.textContent=o.cssText,this.shadowRoot.appendChild(i)}}}else this._adoptLightStyles(e)}_adoptLightStyles(e){if(!O._lightStylesAdopted.has(e)){O._lightStylesAdopted.add(e);for(const t of e.styles){const o=document.createElement("style");o.dataset.osUi=this.tagName.toLowerCase(),o.textContent=t.cssText,document.head.appendChild(o)}}}};O.props=[],O.styles=[],O.shadow=!0,O._lightStylesAdopted=new WeakSet;let R=O;function D(s,e){customElements.get(s)||customElements.define(s,e)}function Ge(s){return s.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Pt(s){return s.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}const Nt=(()=>{try{return typeof new CSSStyleSheet().replaceSync=="function"}catch{return!1}})();function z(s,...e){let t=s[0];for(let o=1;o<s.length;o++){const i=e[o-1];if(typeof i=="string"||typeof i=="number")t+=String(i);else if(i&&i.__wpdCss)t+=i.cssText;else throw new TypeError("[os-ui] css`` interpolations must be strings, numbers, or other css`` results. Got: "+typeof i);t+=s[o]}if(Nt){const o=new CSSStyleSheet;return o.replaceSync(t),{__wpdCss:!0,sheet:o,cssText:t}}return{__wpdCss:!0,sheet:null,cssText:t}}function Rt(s){const e=[],t=[];let o=null,i=s.parentElement;for(;i&&!(i===document.body||i===document.documentElement);){const r=i.id||"";if(r.startsWith("wp-window-")){o=r.slice(10);break}if(i.tagName.toLowerCase()==="os-tabpanel"){const d=i.getAttribute("for");d&&t.unshift(d)}i=i.parentElement}o&&e.push(Ae(o));for(const r of t)e.push("tab-"+Ae(r));const n=s.getAttribute("label");return n&&e.push(Ae(n)),e.length===0?"os-unnamed":"os-"+e.filter(r=>r!=="").join("-")}function Ae(s){return s.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function Je(s){if(s.id)return s.id;const e=Rt(s);return s.id=e,e}const q=z`:host{--_holo-fill:var( --os-ui-holo-fill,${"linear-gradient( 124deg, #afa2e8 0%, #f5a8ea 46%, #8ee9f7 100% )"} );--_holo-ink:var( --os-ui-holo-ink,#0c0b0f );--_holo-sheen:var( --os-ui-holo-sheen,linear-gradient( 124deg,rgba( 159,214,255,0.1 ) 0%,rgba( 236,155,255,0.12 ) 34%,rgba( 242,82,252,0.1 ) 58%,rgba( 147,240,198,0.09 ) 100% ) );--_holo-edge:var( --os-ui-holo-edge,linear-gradient( 124deg,rgba( 154,242,255,0.7 ) 0%,rgba( 236,155,255,0.85 ) 38%,rgba( 242,82,252,0.7 ) 62%,rgba( 159,152,255,0.6 ) 100% ) );--_holo-edge-quiet:var( --os-ui-holo-edge-quiet,linear-gradient( 124deg,rgba( 154,242,255,0.22 ) 0%,rgba( 236,155,255,0.28 ) 38%,rgba( 242,82,252,0.22 ) 62%,rgba( 159,152,255,0.2 ) 100% ) );--_holo-glow:var( --os-ui-holo-glow,0 0 0 1px rgba( 242,82,252,0.28 ),0 2px 10px rgba( 242,82,252,0.22 ) );--_holo-glow-strong:var( --os-ui-holo-glow-strong,0 0 0 1px rgba( 242,82,252,0.42 ),0 4px 18px rgba( 242,82,252,0.38 ),0 1px 3px rgba( 12,11,15,0.6 ) );--_holo-track:var( --os-ui-holo-track,rgba( 255,251,255,0.16 ) );--_holo-track-edge:var( --os-ui-holo-track-edge,#8c8f94 );--_holo-ring-color:var( --os-ui-accent-dim,#2271b1 );--_holo-focus:var( --os-ui-focus-ring,0 0 0 2px rgba( 12,11,15,0.9 ),0 0 0 4px #f252fc,0 0 12px 2px rgba( 242,82,252,0.45 ) );--_holo-focus-field:var( --os-ui-focus-ring-field,0 0 0 1px #f252fc,0 0 0 4px rgba( 242,82,252,0.18 ) );--_holo-t:var( --os-ui-holo-transition,220ms );--_holo-t-fast:var( --os-ui-motion-fast,140ms );--_holo-t-slow:var( --os-ui-motion-slow,340ms );--_holo-t-ambient:var( --os-ui-motion-ambient,12s );--_holo-spring:var( --os-ui-ease-spring,cubic-bezier( 0.32,1.5,0.55,1 ) );--_holo-ease:var( --os-ui-ease-out,cubic-bezier( 0.22,0.9,0.28,1 ) );--_holo-loop:var( --os-ui-ease-loop,cubic-bezier( 0.45,0,0.55,1 ) )}`,Wt=z` .os-holo-fill{background-color:transparent;background-image:var( --_holo-fill );background-size:220% 220%;background-position:22% 28%;background-repeat:no-repeat;color:var( --_holo-ink );transition:background-position var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease,filter var( --_holo-t ) ease}.os-holo-fill:hover{background-position:74% 66%}.os-holo-fill:active{background-position:88% 82%;filter:brightness( 0.94 )}@media ( prefers-reduced-motion:reduce ){.os-holo-fill{transition-duration:1ms}.os-holo-fill:hover,.os-holo-fill:active{background-position:22% 28%}}`,Ce=z` .os-holo-sheen{position:relative;isolation:isolate}.os-holo-sheen::before{content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;background-image:var( --_holo-sheen );background-size:200% 200%;background-position:20% 30%;opacity:0;pointer-events:none;transition:opacity var( --_holo-t ) ease,background-position var( --_holo-t ) ease}.os-holo-sheen:hover::before,.os-holo-sheen:focus-visible::before{opacity:1;background-position:76% 68%}@media ( prefers-reduced-motion:reduce ){.os-holo-sheen::before{transition-duration:1ms}.os-holo-sheen:hover::before,.os-holo-sheen:focus-visible::before{background-position:20% 30%}}`,et=z` .os-holo-edge{position:relative}.os-holo-edge::after{content:'';position:absolute;inset:0;border-radius:inherit;padding:1px;background-image:var( --_holo-edge-quiet );opacity:0;pointer-events:none;-webkit-mask:linear-gradient( #000 0 0 ) content-box,linear-gradient( #000 0 0 );-webkit-mask-composite:xor;mask:linear-gradient( #000 0 0 ) content-box,linear-gradient( #000 0 0 );mask-composite:exclude;transition:opacity var( --_holo-t ) ease}.os-holo-edge:hover::after,.os-holo-edge:focus-visible::after{background-image:var( --_holo-edge );opacity:1}.os-holo-edge.is-lit::after{background-image:var( --_holo-edge );opacity:1}@media ( prefers-reduced-motion:reduce ){.os-holo-edge::after{transition-duration:1ms}}`,$e=z` .os-holo-glint{position:absolute;inset:0;border-radius:inherit;overflow:hidden;pointer-events:none}.os-holo-glint::before{content:'';position:absolute;top:-60%;bottom:-60%;width:45%;inset-inline-start:-60%;background:linear-gradient( 90deg,transparent 0%,rgba( 255,251,255,0.14 ) 45%,rgba( 255,251,255,0.22 ) 50%,rgba( 255,251,255,0.14 ) 55%,transparent 100% );transform:rotate( 18deg ) translateX( 0 );opacity:0}:hover>.os-holo-glint::before,:focus-visible>.os-holo-glint::before,:host(:hover )>.os-holo-glint::before,:host(:focus-visible )>.os-holo-glint::before{animation:os-holo-glint var( --_holo-t-slow ) var( --_holo-ease )}@keyframes os-holo-glint{0%{opacity:0;transform:rotate( 18deg ) translateX( 0 )}15%{opacity:1}85%{opacity:1}100%{opacity:0;transform:rotate( 18deg ) translateX( 240vw )}}@media ( prefers-reduced-motion:reduce ){:hover>.os-holo-glint::before,:focus-visible>.os-holo-glint::before,:host(:hover )>.os-holo-glint::before,:host(:focus-visible )>.os-holo-glint::before{animation:none}}`,tt=z` .os-holo-ring{position:absolute;inset:0;border-radius:inherit;box-shadow:0 0 0 0 var( --_holo-ring-color );opacity:0;pointer-events:none}:active:not(:disabled )>.os-holo-ring,:host(:active:not( [ disabled ] ) )>.os-holo-ring{animation:os-holo-ring var( --_holo-t-slow ) var( --_holo-ease )}@keyframes os-holo-ring{0%{opacity:0.45;box-shadow:0 0 0 0 var( --_holo-ring-color )}100%{opacity:0;box-shadow:0 0 0 10px transparent}}@media ( prefers-reduced-motion:reduce ){:active:not(:disabled )>.os-holo-ring,:host(:active:not( [ disabled ] ) )>.os-holo-ring{animation:none}}`,Ht=z` .os-holo-shimmer{background-image:var( --_holo-fill );background-size:300% 300%;background-repeat:no-repeat;animation:os-holo-shimmer 2.4s var( --_holo-loop ) infinite}@keyframes os-holo-shimmer{0%{background-position:0% 50%}100%{background-position:100% 50%}}@media ( prefers-reduced-motion:reduce ){.os-holo-shimmer{animation:none;background-position:30% 50%}}`,Dt=z` .os-holo-enter{animation:os-holo-enter var( --_holo-t ) var( --_holo-spring )}@keyframes os-holo-enter{from{opacity:0;transform:scale( 0.96 )}}@media ( prefers-reduced-motion:reduce ){.os-holo-enter{animation:none}}`,ot=z` input:where(:not( [ type='checkbox' ] ):not( [ type='radio' ] ) ),select,textarea{transition:background-color var( --_holo-t ) ease,border-color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease}input:where(:not( [ type='checkbox' ] ):not( [ type='radio' ] ) ):hover:not(:disabled ),select:hover:not(:disabled ),textarea:hover:not(:disabled ){border-color:var( --os-ui-border-strong,#8c8f94 )}input:where(:not( [ type='checkbox' ] ):not( [ type='radio' ] ) ):focus,input:where(:not( [ type='checkbox' ] ):not( [ type='radio' ] ) ):focus-visible,select:focus,select:focus-visible,textarea:focus,textarea:focus-visible{outline:none;border-color:var( --os-ui-accent,#2271b1 );box-shadow:var( --_holo-focus-field )}input::placeholder,textarea::placeholder{color:var( --os-ui-fg-faint,#8c8f94 );opacity:1}input::selection,textarea::selection{background:var( --os-ui-selection-bg,rgba( 159,152,255,0.6 ) );color:var( --os-ui-selection-fg,#fffbff )}@media ( prefers-reduced-motion:reduce ){input:where(:not( [ type='checkbox' ] ):not( [ type='radio' ] ) ),select,textarea{transition-duration:1ms}}`,st=z` input[ type='checkbox' ],input[ type='radio' ]{appearance:none;-webkit-appearance:none;position:relative;flex:0 0 auto;box-sizing:border-box;width:16px;height:16px;margin:0;padding:0;border:1px solid var( --_holo-track-edge );border-radius:4px;background-color:var( --_holo-track );background-image:none;background-repeat:no-repeat;cursor:inherit;transition:background-color var( --_holo-t ) ease,border-color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease}input[ type='radio' ]{border-radius:50%}input[ type='checkbox' ]:hover:not(:disabled ),input[ type='radio' ]:hover:not(:disabled ){border-color:var( --os-ui-accent,#2271b1 )}input[ type='checkbox' ]:focus-visible,input[ type='radio' ]:focus-visible{outline:none;box-shadow:var( --_holo-focus )}input[ type='checkbox' ]:checked,input[ type='checkbox' ]:indeterminate,input[ type='radio' ]:checked{border-color:transparent;background-color:var( --os-ui-accent,#2271b1 )}input[ type='checkbox' ]:checked:focus-visible,input[ type='radio' ]:checked:focus-visible{box-shadow:var( --_holo-focus )}input[ type='checkbox' ]:checked::after{content:'';position:absolute;inset-inline-start:50%;top:46%;width:3.5px;height:7.5px;border:solid var( --os-ui-accent-ink,var( --os-ui-fg-on-accent,#fff ) );border-width:0 2px 2px 0;transform:translate( -50%,-50% ) rotate( 45deg );animation:os-holo-tick 180ms cubic-bezier( 0.3,1.4,0.6,1 )}input[ type='checkbox' ]:indeterminate::after{content:'';position:absolute;inset-inline-start:50%;top:50%;width:8px;height:2px;border:0;border-radius:1px;background:var( --os-ui-accent-ink,var( --os-ui-fg-on-accent,#fff ) );transform:translate( -50%,-50% )}input[ type='radio' ]:checked::after{content:'';position:absolute;inset-inline-start:50%;top:50%;width:6px;height:6px;border-radius:50%;background:var( --os-ui-accent-ink,var( --os-ui-fg-on-accent,#fff ) );transform:translate( -50%,-50% );animation:os-holo-tick 180ms cubic-bezier( 0.3,1.4,0.6,1 )}input[ type='checkbox' ]:disabled,input[ type='radio' ]:disabled{cursor:not-allowed}@keyframes os-holo-tick{from{opacity:0;transform:translate( -50%,-50% ) rotate( 45deg ) scale( 0.4 )}}@media ( prefers-reduced-motion:reduce ){input[ type='checkbox' ]:checked::after,input[ type='radio' ]:checked::after{animation:none}}`,it=z` @keyframes os-holo-drift{0%{background-position:16% 26%}50%{background-position:84% 74%}100%{background-position:16% 26%}}.os-holo-alive{animation:os-holo-drift var( --_holo-t-ambient ) var( --_holo-loop ) infinite}@media ( prefers-reduced-motion:reduce ){.os-holo-alive{animation:none}}`;z` ${q} ${Wt} ${Ce} ${et} ${$e} ${tt} ${Ht} ${Dt} ${ot} ${st} ${it} `;const Vt=z` ${q}:host{display:none;position:fixed;inset:0;align-items:center;justify-content:center;background:var( --os-ui-scrim,rgba( 0,0,0,0.45 ) );background-image:var( --os-ui-scrim-image,none );background-repeat:var( --os-ui-scrim-image-repeat,repeat );background-size:var( --os-ui-scrim-image-size,auto );background-position:var( --os-ui-scrim-image-position,center );backdrop-filter:blur( 2px );z-index:10000;--os-ui-fg:var( --os-ui-modal-text,#f0f0f1 );--os-ui-fg-muted:var( --os-ui-modal-text-muted,#a7aaad );--os-ui-border:var( --os-ui-modal-border,rgba( 255,255,255,0.25 ) );--os-window-bg:var( --os-ui-modal-field-bg,#2c3338 );--os-ui-button-bg-hover:var( --os-ui-modal-button-bg-hover,rgba( 255,255,255,0.08 ) );--os-ui-surface:var( --os-ui-modal-surface,#2c3338 );--os-ui-surface-elevated:var( --os-ui-modal-surface-elevated,#3c434a );--os-ui-border-strong:var( --os-ui-modal-border-strong,rgba( 255,255,255,0.35 ) );--os-ui-hover:var( --os-ui-modal-hover,rgba( 255,255,255,0.08 ) );--os-ui-notice-color:var( --os-ui-modal-text,#f0f0f1 );--os-ui-card-bg:var( --os-ui-modal-surface,#2c3338 );--os-ui-card-fg:var( --os-ui-modal-text,#f0f0f1 );--os-ui-card-border:var( --os-ui-modal-border,rgba( 255,255,255,0.25 ) );--os-ui-card-border-hover:var( --os-ui-modal-border-strong,rgba( 255,255,255,0.35 ) )}:host( [ open ] ){display:flex;animation:os-modal-scrim var( --_holo-t ) var( --_holo-ease )}:host( [ open ] ) .dialog{animation:os-modal-dialog var( --_holo-t ) var( --_holo-spring )}@keyframes os-modal-scrim{from{opacity:0}}@keyframes os-modal-dialog{from{opacity:0;transform:scale( 0.96 ) translateY( 8px )}}@media ( prefers-reduced-motion:reduce ){:host( [ open ] ),:host( [ open ] ) .dialog{animation:none}}.dialog{max-width:92vw;max-height:90vh;background-color:var( --os-ui-modal-bg,#1d2327 );background-image:var( --os-ui-dialog-bg-image,none );background-repeat:var( --os-ui-dialog-bg-image-repeat,repeat );background-size:var( --os-ui-dialog-bg-image-size,auto );background-position:var( --os-ui-dialog-bg-image-position,center );color:var( --os-ui-modal-fg,var( --os-fg,#fff ) );border:1px solid var( --os-ui-border,rgba( 255,255,255,0.08 ) );border-radius:10px;box-shadow:0 20px 50px rgba( 0,0,0,0.6 );display:flex;flex-direction:column;overflow:hidden}:host( [ size='sm' ] ) .dialog{width:min( 360px,92vw )}:host(:not( [ size ] ) ) .dialog,:host( [ size='md' ] ) .dialog{width:min( 540px,92vw )}:host( [ size='lg' ] ) .dialog{width:min( 760px,94vw )}.header{display:flex;align-items:center;gap:10px;padding:16px 20px 12px;border-bottom:1px solid var( --os-ui-border,rgba( 255,255,255,0.06 ) )}.title{margin:0;flex:1;font-size:15px;font-weight:600}.header-actions{display:flex;gap:6px}.header-actions::slotted( * ){margin-inline-start:6px}.close{background:transparent;border:0;color:inherit;font-size:18px;line-height:1;padding:4px 8px;border-radius:4px;cursor:pointer;opacity:0.7}.close:hover{opacity:1;background:var( --os-ui-hover,rgba( 255,255,255,0.08 ) )}.body{padding:16px 20px;overflow:auto;flex:1 1 auto;font-size:13px;line-height:1.5}.footer{padding:12px 20px 16px;border-top:1px solid var( --os-ui-border,rgba( 255,255,255,0.06 ) )}.footer slot{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}:host( [ mandatory ] ) .close{display:none}`,nt='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',te=class te extends R{constructor(){super(...arguments),this._prevFocus=null,this._onKey=e=>{if(e.key==="Escape"&&!this.hasAttribute("mandatory")){e.preventDefault(),this._cancel();return}if(e.key==="Tab"){const t=this._focusables();if(t.length===0)return;const o=t[0],i=t[t.length-1],n=this.ownerDocument,r=n?n.activeElement:null,d=e.composedPath()[0]||r;e.shiftKey&&d===o?(e.preventDefault(),i.focus()):!e.shiftKey&&d===i&&(e.preventDefault(),o.focus())}},this._onBackdrop=e=>{if(this.hasAttribute("mandatory"))return;const t=e.composedPath();(t.length>0?t[0]:e.target)===this&&this._cancel()}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","dialog"),this.setAttribute("aria-modal","true"),this.addEventListener("keydown",this._onKey),this.addEventListener("click",this._onBackdrop)}disconnectedCallback(){this.removeEventListener("keydown",this._onKey),this.removeEventListener("click",this._onBackdrop)}attributeChangedCallback(e,t,o){if(super.attributeChangedCallback?.(e,t,o),e==="open"){if(o!==null){const i=this.ownerDocument;this._prevFocus=i?i.activeElement:null,queueMicrotask(()=>this._focusFirst())}else if(this._prevFocus){try{this._prevFocus.focus()}catch{}this._prevFocus=null}}}showModal(){this.setAttribute("open","")}hideModal(){this.removeAttribute("open")}_focusables(){const e=this.shadowRoot;if(!e)return[];const t=Array.from(this.querySelectorAll(nt)),o=Array.from(e.querySelectorAll(nt));return[...t,...o].filter(i=>i.offsetParent!==null||i.tagName==="BUTTON")}_focusFirst(){const e=this._focusables();e.length>0?e[0].focus():this.shadowRoot?.querySelector(".dialog")?.focus?.()}_cancel(){const e=new CustomEvent("os-modal-cancel",{bubbles:!0,cancelable:!0,composed:!0});this.dispatchEvent(e)&&this.hideModal()}render(){const e=this.getAttribute("title")??"",t=this.hasAttribute("mandatory");return g`
2 2 <div part="dialog" class="dialog" tabindex="-1">
3 - ${e?v`
3 + ${e?g`
4 4 <div class="header">
5 5 <h2 class="title">${e}</h2>
6 6 <div class="header-actions">
7 7 <slot name="header-actions"></slot>
8 - ${t?v``:v`<button
8 + ${t?g``:g`<button
9 9 type="button"
10 10 class="close"
11 11 aria-label="Close"
12 12 @click=${()=>this._cancel()}
@@ -12,9 +12,9 @@
12 12 @click=${()=>this._cancel()}
13 13 >×</button>`}
14 14 </div>
15 15 </div>
16 - `:v``}
16 + `:g``}
17 17 <div class="body">
18 18 <slot></slot>
19 19 </div>
20 20 <div class="footer">
@@ -20,9 +20,9 @@
20 20 <div class="footer">
21 21 <slot name="footer"></slot>
22 22 </div>
23 23 </div>
24 - `}};te.props=["open","title","size","mandatory"],te.styles=[Vt],te.help=void 0;let Ee=te;H("os-modal",Ee);const jt=z` ${q} ${Ce} ${et} ${$e} ${tt} ${it}:host{display:inline-flex}:host( [ fill-cell ] ){display:flex;width:100%}button{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:var( --os-ui-button-padding,6px 12px );border-radius:var( --os-ui-button-border-radius,6px );font:inherit;font-weight:500;cursor:pointer;transition:background-color var( --_holo-t ) ease,color var( --_holo-t ) ease,border-color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease,transform 80ms ease;background:var( --os-ui-button-bg,transparent );background-image:var( --os-ui-button-bg-image,none );background-repeat:var( --os-ui-button-bg-image-repeat,repeat );background-size:var( --os-ui-button-bg-image-size,auto );background-position:var( --os-ui-button-bg-image-position,center );color:var( --os-ui-button-fg,var( --os-ui-fg,#1d2327 ) );border:var( --os-ui-button-border,1px solid var( --os-ui-border,#c3c4c7 ) )}:host( [ fill-cell ] ) button{width:100%;min-height:var( --os-ui-button-min-height,44px )}button:disabled{opacity:0.5;cursor:not-allowed}button:active:not(:disabled ){transform:translateY( 1px )}button:hover:not(:disabled ){background-color:var( --os-ui-button-bg-hover,var( --os-ui-hover,rgba( 0,0,0,0.04 ) ) )}button:focus-visible{outline:none;box-shadow:var( --_holo-focus )}button:disabled::before,button:disabled::after,button:disabled .os-holo-glint{opacity:0 !important}:host( [ variant='primary' ] ) button{background-color:var( --os-ui-button-bg,var( --wp-admin-theme-color,#2271b1 ) );color:var( --os-ui-button-fg,var( --os-ui-accent-ink,var( --os-ui-fg-on-accent,#fff ) ) );border:var( --os-ui-button-border,1px solid transparent )}:host( [ variant='primary' ] ) button:hover:not(:disabled ){filter:brightness( 1.06 );background-color:var( --os-ui-button-bg,var( --wp-admin-theme-color,#2271b1 ) );box-shadow:var( --_holo-glow )}:host( [ variant='holo' ] ) button{background-color:transparent;background-image:var( --_holo-fill );background-size:220% 220%;background-position:22% 28%;background-repeat:no-repeat;color:var( --os-ui-button-fg,var( --_holo-ink ) );border:var( --os-ui-button-border,1px solid transparent );box-shadow:var( --_holo-glow );font-weight:600;transition:background-position var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease,filter var( --_holo-t ) ease,transform 80ms ease}:host( [ variant='holo' ] ) button:hover:not(:disabled ){background-color:transparent;background-position:74% 66%;box-shadow:var( --_holo-glow-strong )}:host( [ variant='holo' ] ) button:active:not(:disabled ){background-position:88% 82%;filter:brightness( 0.94 )}:host( [ variant='holo' ] ) button::before{display:none}@media ( prefers-reduced-motion:reduce ){:host( [ variant='holo' ] ) button:hover:not(:disabled ),:host( [ variant='holo' ] ) button:active:not(:disabled ){background-position:22% 28%}}:host( [ variant='secondary' ] ) button{background-color:var( --os-ui-button-bg,var( --os-ui-hover,rgba( 0,0,0,0.06 ) ) );color:var( --os-ui-button-fg,var( --os-ui-fg,#1d2327 ) );border:var( --os-ui-button-border,1px solid transparent )}:host( [ variant='secondary' ] ) button:hover:not(:disabled ){background-color:var( --os-ui-button-bg-hover,var( --os-ui-hover,rgba( 0,0,0,0.1 ) ) )}:host( [ variant='danger' ] ) button{background-color:var( --os-ui-button-bg,transparent );color:var( --os-ui-button-fg,var( --os-ui-danger,#d63638 ) );border:var( --os-ui-button-border,1px solid currentColor )}:host( [ variant='danger' ] ) button:hover:not(:disabled ){background-color:var( --os-ui-danger,#d63638 );color:var( --os-ui-fg-on-accent,#fff )}:host( [ variant='danger' ] ) button::after{display:none}:host( [ variant='link' ] ) button{background-color:transparent;background-image:none;color:var( --os-ui-button-fg,var( --wp-admin-theme-color,#2271b1 ) );border:0;padding:0;text-decoration:underline}:host( [ variant='link' ] ) button::before,:host( [ variant='link' ] ) button::after,:host( [ variant='link' ] ) .os-holo-glint,:host( [ variant='link' ] ) .os-holo-ring{display:none}:host( [ variant='link' ] ) button:active:not(:disabled ){transform:none}:host( [ busy ] ) button{pointer-events:none;opacity:0.75}:host( [ variant='holo' ][ busy ] ) button{animation:os-holo-drift 12s ease-in-out infinite}@media ( prefers-reduced-motion:reduce ){:host( [ variant='holo' ][ busy ] ) button{animation:none}}.os-button__spinner{box-sizing:border-box;display:inline-block;width:12px;height:12px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:os-button-spin 0.6s linear infinite;flex-shrink:0}@keyframes os-button-spin{to{transform:rotate( 360deg )}}`,oe=class oe extends R{render(){const e=this.disabled!==null,t=this.busy!==null,o=this.type||"button";return v`
24 + `}};te.props=["open","title","size","mandatory"],te.styles=[Vt],te.help=void 0;let Ee=te;D("os-modal",Ee);const jt=z` ${q} ${Ce} ${et} ${$e} ${tt} ${it}:host{display:inline-flex}:host( [ fill-cell ] ){display:flex;width:100%}button{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:var( --os-ui-button-padding,6px 12px );border-radius:var( --os-ui-button-border-radius,6px );font:inherit;font-weight:500;cursor:pointer;transition:background-color var( --_holo-t ) ease,color var( --_holo-t ) ease,border-color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease,transform 80ms ease;background:var( --os-ui-button-bg,transparent );background-image:var( --os-ui-button-bg-image,none );background-repeat:var( --os-ui-button-bg-image-repeat,repeat );background-size:var( --os-ui-button-bg-image-size,auto );background-position:var( --os-ui-button-bg-image-position,center );color:var( --os-ui-button-fg,var( --os-ui-fg,#1d2327 ) );border:var( --os-ui-button-border,1px solid var( --os-ui-border,#c3c4c7 ) )}:host( [ fill-cell ] ) button{width:100%;min-height:var( --os-ui-button-min-height,44px )}button:disabled{opacity:0.5;cursor:not-allowed}button:active:not(:disabled ){transform:translateY( 1px )}button:hover:not(:disabled ){background-color:var( --os-ui-button-bg-hover,var( --os-ui-hover,rgba( 0,0,0,0.04 ) ) )}button:focus-visible{outline:none;box-shadow:var( --_holo-focus )}button:disabled::before,button:disabled::after,button:disabled .os-holo-glint{opacity:0 !important}:host( [ variant='primary' ] ) button{background-color:var( --os-ui-button-bg,var( --wp-admin-theme-color,#2271b1 ) );color:var( --os-ui-button-fg,var( --os-ui-accent-ink,var( --os-ui-fg-on-accent,#fff ) ) );border:var( --os-ui-button-border,1px solid transparent )}:host( [ variant='primary' ] ) button:hover:not(:disabled ){filter:brightness( 1.06 );background-color:var( --os-ui-button-bg,var( --wp-admin-theme-color,#2271b1 ) );box-shadow:var( --_holo-glow )}:host( [ variant='holo' ] ) button{background-color:transparent;background-image:var( --_holo-fill );background-size:220% 220%;background-position:22% 28%;background-repeat:no-repeat;color:var( --os-ui-button-fg,var( --_holo-ink ) );border:var( --os-ui-button-border,1px solid transparent );box-shadow:var( --_holo-glow );font-weight:600;transition:background-position var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease,filter var( --_holo-t ) ease,transform 80ms ease}:host( [ variant='holo' ] ) button:hover:not(:disabled ){background-color:transparent;background-position:74% 66%;box-shadow:var( --_holo-glow-strong )}:host( [ variant='holo' ] ) button:active:not(:disabled ){background-position:88% 82%;filter:brightness( 0.94 )}:host( [ variant='holo' ] ) button::before{display:none}@media ( prefers-reduced-motion:reduce ){:host( [ variant='holo' ] ) button:hover:not(:disabled ),:host( [ variant='holo' ] ) button:active:not(:disabled ){background-position:22% 28%}}:host( [ variant='secondary' ] ) button{background-color:var( --os-ui-button-bg,var( --os-ui-hover,rgba( 0,0,0,0.06 ) ) );color:var( --os-ui-button-fg,var( --os-ui-fg,#1d2327 ) );border:var( --os-ui-button-border,1px solid transparent )}:host( [ variant='secondary' ] ) button:hover:not(:disabled ){background-color:var( --os-ui-button-bg-hover,var( --os-ui-hover,rgba( 0,0,0,0.1 ) ) )}:host( [ variant='danger' ] ) button{background-color:var( --os-ui-button-bg,transparent );color:var( --os-ui-button-fg,var( --os-ui-danger,#d63638 ) );border:var( --os-ui-button-border,1px solid currentColor )}:host( [ variant='danger' ] ) button:hover:not(:disabled ){background-color:var( --os-ui-danger,#d63638 );color:var( --os-ui-fg-on-accent,#fff )}:host( [ variant='danger' ] ) button::after{display:none}:host( [ variant='link' ] ) button{background-color:transparent;background-image:none;color:var( --os-ui-button-fg,var( --wp-admin-theme-color,#2271b1 ) );border:0;padding:0;text-decoration:underline}:host( [ variant='link' ] ) button::before,:host( [ variant='link' ] ) button::after,:host( [ variant='link' ] ) .os-holo-glint,:host( [ variant='link' ] ) .os-holo-ring{display:none}:host( [ variant='link' ] ) button:active:not(:disabled ){transform:none}:host( [ busy ] ) button{pointer-events:none;opacity:0.75}:host( [ variant='holo' ][ busy ] ) button{animation:os-holo-drift 12s ease-in-out infinite}@media ( prefers-reduced-motion:reduce ){:host( [ variant='holo' ][ busy ] ) button{animation:none}}.os-button__spinner{box-sizing:border-box;display:inline-block;width:12px;height:12px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:os-button-spin 0.6s linear infinite;flex-shrink:0}@keyframes os-button-spin{to{transform:rotate( 360deg )}}`,oe=class oe extends R{static get observedAttributes(){return[...super.observedAttributes,"aria-label"]}render(){const e=this.disabled!==null,t=this.busy!==null,o=this.type||"button",i=this.getAttribute("aria-label")||"";return g`
25 25 <button
26 26 part="button"
27 27 class="os-holo-edge os-holo-sheen"
28 28 type=${o}
@@ -27,10 +27,11 @@
27 27 class="os-holo-edge os-holo-sheen"
28 28 type=${o}
29 29 ?disabled=${e||t}
30 30 aria-busy=${t?"true":"false"}
31 + aria-label=${i}
31 32 >
32 - ${t?v`<span class="os-button__spinner" aria-hidden="true"></span>`:""}
33 + ${t?g`<span class="os-button__spinner" aria-hidden="true"></span>`:""}
33 34 <slot></slot>
34 35 <!--
35 36 The two motion layers. Elements rather than
36 37 pseudo-elements because the sheen and the hairline
@@ -40,16 +41,16 @@
40 41 -->
41 42 <span class="os-holo-glint" aria-hidden="true"></span>
42 43 <span class="os-holo-ring" aria-hidden="true"></span>
43 44 </button>
44 - `}};oe.props=["variant","disabled","type","busy","fill-cell"],oe.styles=[jt],oe.help=void 0;let ze=oe;H("os-button",ze);const qt=z` ${q} ${ot}:host{--_field-size:var( --os-ui-field-font-size,13px );--_field-radius:var( --os-ui-field-radius,6px );display:flex;flex-direction:column;gap:4px;font-size:var( --_field-size );color:var( --os-ui-fg,#1d2327 );min-width:0}:host( [ hidden ] ){display:none}.os-text-field__label{font-size:12px;color:var( --os-ui-fg-muted,#646970 )}.os-text-field__label--hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;white-space:nowrap;clip-path:inset( 50% )}.os-text-field__row{position:relative;display:flex;align-items:center;width:100%}input{appearance:none;-webkit-appearance:none;display:block;width:100%;min-width:0;box-sizing:border-box;padding:7px 10px;background:var( --os-window-bg,#fff );border:1px solid var( --os-ui-border,#dcdcde );border-radius:var( --_field-radius );font:inherit;font-size:var( --_field-size );color:var( --os-ui-fg,#1d2327 )}.os-text-field__suffix{position:absolute;inset-inline-end:10px;top:50%;transform:translateY( -50% );pointer-events:none;font-size:12px;color:var( --os-ui-fg-muted,#646970 )}.os-text-field__row--has-reveal input{padding-inline-end:36px}:host( [ clearable ] ) input::-webkit-search-cancel-button{-webkit-appearance:none;display:none}.os-text-field__row--has-clear input{padding-inline-end:36px}.os-text-field__row--has-reveal.os-text-field__row--has-clear input{padding-inline-end:68px}.os-text-field__clear{position:absolute;inset-inline-end:0;top:0;bottom:0;width:34px;display:flex;align-items:center;justify-content:center;padding:0;border:none;background:transparent;color:var( --os-ui-fg-muted,#646970 );cursor:pointer;border-radius:0 6px 6px 0}.os-text-field__row--has-reveal .os-text-field__clear{inset-inline-end:34px;border-radius:0}.os-text-field__clear:hover{color:var( --os-ui-accent,#2271b1 )}.os-text-field__clear:focus-visible{outline:none;color:var( --os-ui-accent,#2271b1 );box-shadow:inset 0 0 0 2px var( --os-ui-accent,#2271b1 )}.os-text-field__clear:disabled{opacity:0.45;cursor:default}.os-text-field__reveal{position:absolute;inset-inline-end:0;top:0;bottom:0;width:34px;display:flex;align-items:center;justify-content:center;padding:0;border:none;background:transparent;color:var( --os-ui-fg-muted,#646970 );cursor:pointer;border-radius:0 6px 6px 0;transition:color 0.12s ease}.os-text-field__reveal:hover{color:var( --os-ui-accent,#2271b1 )}.os-text-field__reveal:focus-visible{outline:none;color:var( --os-ui-accent,#2271b1 );box-shadow:inset 0 0 0 2px var( --os-ui-accent,#2271b1 );border-radius:0 6px 6px 0}.os-text-field__reveal:disabled{opacity:0.45;cursor:not-allowed}.os-text-field__input--masked{-webkit-text-security:disc;text-security:disc}@supports not ( ( -webkit-text-security:disc ) or ( text-security:disc ) ){.os-text-field__input--masked{font-family:text-security-disc,"password",monospace;letter-spacing:0.2em}}input:disabled{opacity:0.55;cursor:not-allowed;background:var( --os-ui-hover,rgba( 0,0,0,0.03 ) )}input[ aria-invalid='true' ],input[ aria-invalid='true' ]:hover:not(:disabled ){border-color:var( --os-ui-danger,#d63638 )}input[ aria-invalid='true' ]:focus,input[ aria-invalid='true' ]:focus-visible{border-color:var( --os-ui-danger,#d63638 );box-shadow:0 0 0 1px var( --os-ui-danger,#d63638 ),0 0 0 4px rgba( 214,54,56,0.18 )}input[ type='number' ]::-webkit-inner-spin-button,input[ type='number' ]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[ type='number' ]{-moz-appearance:textfield}`,se=class se extends R{constructor(){super(...arguments),this._revealed=!1}connectedCallback(){super.connectedCallback(),Je(this)}render(){const e=this.label||"",t=this.hideLabel!==null,o=this.value??"",i=this.placeholder||"",n=this.disabled!==null,r=this.readonly!==null,d=this.autocomplete,h=this.type||"text",x=h==="password";let w=d||"off";x&&(!d||w==="off")&&(w="new-password");const C=this.maxlength,I=this.minlength,b=this.pattern||"",_=this.name||"",N=this.suffix||"",P=this.invalid!==null,D=this.reveal!==null,a=this.clearable!==null,$=h==="password",A=$&&!(D&&this._revealed);let U;$||D&&this._revealed?U="text":U=h;const G=["os-text-field__row",D?"os-text-field__row--has-reveal":"",a?"os-text-field__row--has-clear":""].filter(Boolean).join(" "),B=A?"os-text-field__input os-text-field__input--masked":"os-text-field__input",W=`${this.id||"os-unnamed"}__input`;return v`
45 - ${e?v`<label
45 + `}};oe.props=["variant","disabled","type","busy","fill-cell"],oe.styles=[jt],oe.help=void 0;let ze=oe;D("os-button",ze);const qt=z` ${q} ${ot}:host{--_field-size:var( --os-ui-field-font-size,13px );--_field-radius:var( --os-ui-field-radius,6px );display:flex;flex-direction:column;gap:4px;font-size:var( --_field-size );color:var( --os-ui-fg,#1d2327 );min-width:0}:host( [ hidden ] ){display:none}.os-text-field__label{font-size:12px;color:var( --os-ui-fg-muted,#646970 )}.os-text-field__label--hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;white-space:nowrap;clip-path:inset( 50% )}.os-text-field__row{position:relative;display:flex;align-items:center;width:100%}input{appearance:none;-webkit-appearance:none;display:block;width:100%;min-width:0;box-sizing:border-box;padding:7px 10px;background:var( --os-window-bg,#fff );border:1px solid var( --os-ui-border,#dcdcde );border-radius:var( --_field-radius );font:inherit;font-size:var( --_field-size );color:var( --os-ui-fg,#1d2327 )}input:is( [ type='date' ],[ type='datetime-local' ],[ type='month' ],[ type='week' ] )::-webkit-calendar-picker-indicator{--_calendar-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='M4.75 7.25L4.75 18C4.75 18.6904 5.30964 19.25 6 19.25H18C18.6904 19.25 19.25 18.6904 19.25 18V7.25V6C19.25 5.30964 18.6904 4.75 18 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V7.25ZM19.25 7.25H4.75M7.25 10.75H9.25M11 10.75H13M14.75 10.75H16.75M7.25 14.5H9.25M11 14.5H13M14.75 14.5H16.75' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M18 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V7.25H19.25V6C19.25 5.30964 18.6904 4.75 18 4.75Z' fill='currentColor' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");background:var( --os-ui-fg-muted,#646970 );-webkit-mask:var( --_calendar-icon ) center / contain no-repeat;mask:var( --_calendar-icon ) center / contain no-repeat;width:16px;height:16px;cursor:pointer}@media ( forced-colors:active ){input:is( [ type='date' ],[ type='datetime-local' ],[ type='month' ],[ type='week' ] )::-webkit-calendar-picker-indicator{background:ButtonText;forced-color-adjust:none}}.os-text-field__suffix{position:absolute;inset-inline-end:10px;top:50%;transform:translateY( -50% );pointer-events:none;font-size:12px;color:var( --os-ui-fg-muted,#646970 )}.os-text-field__row--has-reveal input{padding-inline-end:36px}:host( [ clearable ] ) input::-webkit-search-cancel-button{-webkit-appearance:none;display:none}.os-text-field__row--has-clear input{padding-inline-end:36px}.os-text-field__row--has-reveal.os-text-field__row--has-clear input{padding-inline-end:68px}.os-text-field__clear{position:absolute;inset-inline-end:0;top:0;bottom:0;width:34px;display:flex;align-items:center;justify-content:center;padding:0;border:none;background:transparent;color:var( --os-ui-fg-muted,#646970 );cursor:pointer;border-radius:0 6px 6px 0}.os-text-field__row--has-reveal .os-text-field__clear{inset-inline-end:34px;border-radius:0}.os-text-field__clear:hover{color:var( --os-ui-accent,#2271b1 )}.os-text-field__clear:focus-visible{outline:none;color:var( --os-ui-accent,#2271b1 );box-shadow:inset 0 0 0 2px var( --os-ui-accent,#2271b1 )}.os-text-field__clear:disabled{opacity:0.45;cursor:default}.os-text-field__reveal{position:absolute;inset-inline-end:0;top:0;bottom:0;width:34px;display:flex;align-items:center;justify-content:center;padding:0;border:none;background:transparent;color:var( --os-ui-fg-muted,#646970 );cursor:pointer;border-radius:0 6px 6px 0;transition:color 0.12s ease}.os-text-field__reveal:hover{color:var( --os-ui-accent,#2271b1 )}.os-text-field__reveal:focus-visible{outline:none;color:var( --os-ui-accent,#2271b1 );box-shadow:inset 0 0 0 2px var( --os-ui-accent,#2271b1 );border-radius:0 6px 6px 0}.os-text-field__reveal:disabled{opacity:0.45;cursor:not-allowed}.os-text-field__input--masked{-webkit-text-security:disc;text-security:disc}@supports not ( ( -webkit-text-security:disc ) or ( text-security:disc ) ){.os-text-field__input--masked{font-family:text-security-disc,"password",monospace;letter-spacing:0.2em}}input:disabled{opacity:0.55;cursor:not-allowed;background:var( --os-ui-hover,rgba( 0,0,0,0.03 ) )}input[ aria-invalid='true' ],input[ aria-invalid='true' ]:hover:not(:disabled ){border-color:var( --os-ui-danger,#d63638 )}input[ aria-invalid='true' ]:focus,input[ aria-invalid='true' ]:focus-visible{border-color:var( --os-ui-danger,#d63638 );box-shadow:0 0 0 1px var( --os-ui-danger,#d63638 ),0 0 0 4px rgba( 214,54,56,0.18 )}input[ type='number' ]::-webkit-inner-spin-button,input[ type='number' ]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[ type='number' ]{-moz-appearance:textfield}`,se=class se extends R{constructor(){super(...arguments),this._revealed=!1}connectedCallback(){super.connectedCallback(),Je(this)}render(){const e=this.label||"",t=this.hideLabel!==null,o=this.value??"",i=this.placeholder||"",n=this.disabled!==null,r=this.readonly!==null,d=this.autocomplete,h=this.type||"text",x=h==="password";let w=d||"off";x&&(!d||w==="off")&&(w="new-password");const C=this.maxlength,I=this.minlength,b=this.pattern||"",_=this.name||"",N=this.suffix||"",P=this.invalid!==null,W=this.reveal!==null,a=this.clearable!==null,$=h==="password",A=$&&!(W&&this._revealed);let U;$||W&&this._revealed?U="text":U=h;const G=["os-text-field__row",W?"os-text-field__row--has-reveal":"",a?"os-text-field__row--has-clear":""].filter(Boolean).join(" "),B=A?"os-text-field__input os-text-field__input--masked":"os-text-field__input",H=`${this.id||"os-unnamed"}__input`;return g`
46 + ${e?g`<label
46 47 class=${t?"os-text-field__label os-text-field__label--hidden":"os-text-field__label"}
47 - for=${W}
48 - >${e}</label>`:v``}
48 + for=${H}
49 + >${e}</label>`:g``}
49 50 <span class=${G}>
50 51 <input
51 - id=${W}
52 + id=${H}
52 53 class=${B}
53 54 type=${U}
54 55 .value=${o}
55 56 placeholder=${i}
@@ -65,13 +66,13 @@
65 66 @input=${F=>this._onInput(F)}
66 67 @change=${F=>this._onChange(F)}
67 68 @keydown=${F=>this._onKeyDown(F)}
68 69 />
69 - ${N?v`<span class="os-text-field__suffix">${N}</span>`:v``}
70 - ${a&&o!==""?this._renderClearButton(n):v``}
71 - ${D?this._renderRevealButton(n):v``}
70 + ${N?g`<span class="os-text-field__suffix">${N}</span>`:g``}
71 + ${a&&o!==""?this._renderClearButton(n):g``}
72 + ${W?this._renderRevealButton(n):g``}
72 73 </span>
73 - `}_renderClearButton(e){return v`
74 + `}_renderClearButton(e){return g`
74 75 <button
75 76 type="button"
76 77 class="os-text-field__clear"
77 78 aria-label="Clear"
@@ -80,9 +81,9 @@
80 81 @click=${()=>this._onClear()}
81 82 >
82 83 ${Ut()}
83 84 </button>
84 - `}_onClear(){this.value="",this.emit("os-input-change",{value:""}),this.emit("os-input-commit",{value:""}),this.shadowRoot?.querySelector("input")?.focus()}_renderRevealButton(e){const t=this._revealed?"Hide":"Show";return v`
85 + `}_onClear(){this.value="",this.emit("os-input-change",{value:""}),this.emit("os-input-commit",{value:""}),this.shadowRoot?.querySelector("input")?.focus()}_renderRevealButton(e){const t=this._revealed?"Hide":"Show";return g`
85 86 <button
86 87 type="button"
87 88 class="os-text-field__reveal"
88 89 aria-label=${t}
@@ -92,9 +93,9 @@
92 93 @click=${()=>this._onToggleReveal()}
93 94 >
94 95 ${this._revealed?Bt():Kt()}
95 96 </button>
96 - `}_onToggleReveal(){this._revealed=!this._revealed,this.requestUpdate()}_onInput(e){const t=e.target;this.value=t.value,this.emit("os-input-change",{value:t.value})}_onChange(e){const t=e.target;this.emit("os-input-commit",{value:t.value})}_onKeyDown(e){if(e.key==="Enter"&&!e.shiftKey&&!e.altKey&&!e.metaKey){const t=e.target;this.emit("os-submit",{value:t.value})}}};se.props=["label","hideLabel","value","placeholder","disabled","readonly","autocomplete","type","maxlength","minlength","pattern","name","suffix","invalid","reveal","clearable"],se.styles=[qt],se.help=void 0;let Le=se;H("os-text-field",Le);function Ut(){return v`
97 + `}_onToggleReveal(){this._revealed=!this._revealed,this.requestUpdate()}_onInput(e){const t=e.target;this.value=t.value,this.emit("os-input-change",{value:t.value})}_onChange(e){const t=e.target;this.emit("os-input-commit",{value:t.value})}_onKeyDown(e){if(e.key==="Enter"&&!e.shiftKey&&!e.altKey&&!e.metaKey){const t=e.target;this.emit("os-submit",{value:t.value})}}};se.props=["label","hideLabel","value","placeholder","disabled","readonly","autocomplete","type","maxlength","minlength","pattern","name","suffix","invalid","reveal","clearable"],se.styles=[qt],se.help=void 0;let Le=se;D("os-text-field",Le);function Ut(){return g`
97 98 <svg
98 99 viewBox="0 0 16 16"
99 100 width="14"
100 101 height="14"
@@ -106,9 +107,9 @@
106 107 focusable="false"
107 108 >
108 109 <path d="M4 4l8 8M12 4l-8 8" />
109 110 </svg>
110 - `}function Kt(){return v`
111 + `}function Kt(){return g`
111 112 <svg
112 113 viewBox="0 0 16 16"
113 114 width="14"
114 115 height="14"
@@ -122,9 +123,9 @@
122 123 >
123 124 <path d="M1 8C1 8 3.5 3 8 3s7 5 7 5-2.5 5-7 5S1 8 1 8z" />
124 125 <circle cx="8" cy="8" r="2" />
125 126 </svg>
126 - `}function Bt(){return v`
127 + `}function Bt(){return g`
127 128 <svg
128 129 viewBox="0 0 16 16"
129 130 width="14"
130 131 height="14"
@@ -139,9 +140,9 @@
139 140 <path d="M1 8C1 8 3.5 3 8 3s7 5 7 5-2.5 5-7 5S1 8 1 8z" />
140 141 <circle cx="8" cy="8" r="2" />
141 142 <line x1="2" y1="2" x2="14" y2="14" />
142 143 </svg>
143 - `}const Zt=z` ${q} ${st}:host{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var( --os-ui-fg,#1d2327 );cursor:pointer}:host( [ disabled ] ){cursor:not-allowed;opacity:0.55}:host( [ block ] ){display:flex;cursor:default}:host( [ block ] ) label{cursor:pointer}:host( [ block ][ disabled ] ) label{cursor:not-allowed}label{display:inline-flex;align-items:center;gap:6px;cursor:inherit}.os-checkbox__label{line-height:1.3}.os-checkbox__label:empty{display:none}`,ie=class ie extends R{render(){const e=this.checked!==null,t=this.disabled!==null,o=this.label||"",i=this.value;return v`
144 + `}const Zt=z` ${q} ${st}:host{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var( --os-ui-fg,#1d2327 );cursor:pointer}:host( [ disabled ] ){cursor:not-allowed;opacity:0.55}:host( [ block ] ){display:flex;cursor:default}:host( [ block ] ) label{cursor:pointer}:host( [ block ][ disabled ] ) label{cursor:not-allowed}label{display:inline-flex;align-items:center;gap:6px;cursor:inherit}.os-checkbox__label{line-height:1.3}.os-checkbox__label:empty{display:none}`,ie=class ie extends R{render(){const e=this.checked!==null,t=this.disabled!==null,o=this.label||"",i=this.value;return g`
144 145 <label>
145 146 <input
146 147 type="checkbox"
147 148 .checked=${e}
@@ -150,9 +151,9 @@
150 151 @change=${n=>this._onChange(n)}
151 152 />
152 153 <span class="os-checkbox__label">${o}</span>
153 154 </label>
154 - `}_onChange(e){const o=e.target.checked;o?this.setAttribute("checked",""):this.removeAttribute("checked"),this.emit("os-checkbox-change",{checked:o,value:this.value})}};ie.props=["checked","value","label","disabled"],ie.styles=[Zt],ie.help=void 0;let Te=ie;H("os-checkbox",Te);const Ot=z` ${q}:host{--_h:22px;--_pad:2px;--_knob:calc( var( --_h ) - 2 * var( --_pad ) );--_travel:calc( var( --_w ) - var( --_knob ) - 2 * var( --_pad ) );--_w:calc( var( --_h ) * 1.85 );--_drag:0px;--_dir:1;display:inline-flex;align-items:center;gap:10px;font-size:13px;line-height:1.3;color:var( --os-ui-fg,#1d2327 );cursor:pointer;-webkit-user-select:none;user-select:none}:host( [ size='sm' ] ){--_h:16px;--_pad:2px;font-size:12px;gap:8px}:host( [ size='lg' ] ){--_h:30px;--_pad:3px;font-size:14px;gap:12px}:host( [ block ] ){display:flex;width:100%;justify-content:space-between}:host( [ label-position='start' ] ) .os-switch__row{flex-direction:row-reverse}:host( [ disabled ] ){cursor:not-allowed;opacity:0.5}.os-switch__row{display:inline-flex;align-items:center;gap:inherit;flex:1 1 auto;justify-content:inherit}button{appearance:none;flex:0 0 auto;position:relative;box-sizing:border-box;width:var( --_w );height:var( --_h );padding:0;margin:0;border:0;border-radius:999px;background-color:var( --_holo-track );background-image:none;box-shadow:inset 0 0 0 1px var( --_holo-track-edge );cursor:inherit;outline:none;transition:background-color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease}button:disabled{cursor:not-allowed}:host( [ checked ] ) button{background-image:none;background-color:var( --os-ui-accent,#2271b1 );box-shadow:none}button:focus-visible{box-shadow:var( --_holo-focus ),inset 0 0 0 1px var( --_holo-track-edge )}:host( [ checked ] ) button:focus-visible{box-shadow:var( --_holo-focus )}:host( [ tone='accent' ][ checked ] ) button,:host( [ tone='danger' ][ checked ] ) button,:host( [ tone='success' ][ checked ] ) button{background-image:none}:host( [ tone='accent' ][ checked ] ) button{background-color:var( --os-ui-accent,#2271b1 )}:host( [ tone='danger' ][ checked ] ) button{background-color:var( --os-ui-danger,#d63638 );box-shadow:0 0 0 1px rgba( 255,90,90,0.3 ),0 2px 10px rgba( 255,90,90,0.25 )}:host( [ tone='success' ][ checked ] ) button{background-color:var( --os-ui-success-fg,#00a32a );box-shadow:0 0 0 1px rgba( 147,240,198,0.3 ),0 2px 10px rgba( 147,240,198,0.25 )}.os-switch__knob{position:absolute;top:var( --_pad );inset-inline-start:var( --_pad );width:var( --_knob );height:var( --_knob );border-radius:999px;background:var( --os-ui-switch-knob,#fffbff );box-shadow:0 1px 2px rgba( 12,11,15,0.45 ),0 0 0 1px var( --os-ui-switch-knob-edge,rgba( 12,11,15,0.55 ) );pointer-events:none;transition:transform var( --_holo-t ) var( --_holo-spring ),width var( --_holo-t ) ease}.os-switch__knob{transform:translateX( calc( var( --_dir ) * var( --_drag ) ) )}:host( [ checked ] ) .os-switch__knob{transform:translateX( calc( var( --_dir ) * ( var( --_travel ) + var( --_drag ) ) ) )}:host(:not( [ disabled ] ) ) button:active .os-switch__knob{width:calc( var( --_knob ) * 1.28 )}:host( [ checked ]:not( [ disabled ] ) ) button:active .os-switch__knob{width:calc( var( --_knob ) * 1.28 );transform:translateX( calc( var( --_dir ) * ( var( --_travel ) - var( --_knob ) * 0.28 + var( --_drag ) ) ) )}:host( [ data-dragging ] ) .os-switch__knob{transition:width var( --_holo-t ) ease}.os-switch__label{line-height:1.3}.os-switch__label:empty{display:none}.os-switch__text{display:flex;flex-direction:column;gap:2px;min-width:0}.os-switch__description{font-size:0.92em;color:var( --os-ui-fg-muted,#646970 )}@media ( prefers-reduced-motion:reduce ){.os-switch__knob{transition-duration:1ms}}`,Ft=4,ne=class ne extends R{constructor(){super(...arguments),this._pointerId=null,this._startX=0,this._travel=0,this._moved=!1,this._dir=1,this._swallowClick=!1}render(){const e=this._attr("checked")!==null,t=this._attr("disabled")!==null,o=this._attr("label")||"",i=this._attr("description")||"";return v`
155 + `}_onChange(e){const o=e.target.checked;o?this.setAttribute("checked",""):this.removeAttribute("checked"),this.emit("os-checkbox-change",{checked:o,value:this.value})}};ie.props=["checked","value","label","disabled"],ie.styles=[Zt],ie.help=void 0;let Te=ie;D("os-checkbox",Te);const Ot=z` ${q}:host{--_h:22px;--_pad:2px;--_knob:calc( var( --_h ) - 2 * var( --_pad ) );--_travel:calc( var( --_w ) - var( --_knob ) - 2 * var( --_pad ) );--_w:calc( var( --_h ) * 1.85 );--_drag:0px;--_dir:1;display:inline-flex;align-items:center;gap:10px;font-size:13px;line-height:1.3;color:var( --os-ui-fg,#1d2327 );cursor:pointer;-webkit-user-select:none;user-select:none}:host( [ size='sm' ] ){--_h:16px;--_pad:2px;font-size:12px;gap:8px}:host( [ size='lg' ] ){--_h:30px;--_pad:3px;font-size:14px;gap:12px}:host( [ block ] ){display:flex;width:100%;justify-content:space-between}:host( [ label-position='start' ] ) .os-switch__row{flex-direction:row-reverse}:host( [ disabled ] ){cursor:not-allowed;opacity:0.5}.os-switch__row{display:inline-flex;align-items:center;gap:inherit;flex:1 1 auto;justify-content:inherit}button{appearance:none;flex:0 0 auto;position:relative;box-sizing:border-box;width:var( --_w );height:var( --_h );padding:0;margin:0;border:0;border-radius:999px;background-color:var( --_holo-track );background-image:none;box-shadow:inset 0 0 0 1px var( --_holo-track-edge );cursor:inherit;outline:none;transition:background-color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease}button:disabled{cursor:not-allowed}:host( [ checked ] ) button{background-image:none;background-color:var( --os-ui-accent,#2271b1 );box-shadow:none}button:focus-visible{box-shadow:var( --_holo-focus ),inset 0 0 0 1px var( --_holo-track-edge )}:host( [ checked ] ) button:focus-visible{box-shadow:var( --_holo-focus )}:host( [ tone='accent' ][ checked ] ) button,:host( [ tone='danger' ][ checked ] ) button,:host( [ tone='success' ][ checked ] ) button{background-image:none}:host( [ tone='accent' ][ checked ] ) button{background-color:var( --os-ui-accent,#2271b1 )}:host( [ tone='danger' ][ checked ] ) button{background-color:var( --os-ui-danger,#d63638 );box-shadow:0 0 0 1px rgba( 255,90,90,0.3 ),0 2px 10px rgba( 255,90,90,0.25 )}:host( [ tone='success' ][ checked ] ) button{background-color:var( --os-ui-success-fg,#00a32a );box-shadow:0 0 0 1px rgba( 147,240,198,0.3 ),0 2px 10px rgba( 147,240,198,0.25 )}.os-switch__knob{position:absolute;top:var( --_pad );inset-inline-start:var( --_pad );width:var( --_knob );height:var( --_knob );border-radius:999px;background:var( --os-ui-switch-knob,#fffbff );box-shadow:0 1px 2px rgba( 12,11,15,0.45 ),0 0 0 1px var( --os-ui-switch-knob-edge,rgba( 12,11,15,0.55 ) );pointer-events:none;transition:transform var( --_holo-t ) var( --_holo-spring ),width var( --_holo-t ) ease}.os-switch__knob{transform:translateX( calc( var( --_dir ) * var( --_drag ) ) )}:host( [ checked ] ) .os-switch__knob{transform:translateX( calc( var( --_dir ) * ( var( --_travel ) + var( --_drag ) ) ) )}:host(:not( [ disabled ] ) ) button:active .os-switch__knob{width:calc( var( --_knob ) * 1.28 )}:host( [ checked ]:not( [ disabled ] ) ) button:active .os-switch__knob{width:calc( var( --_knob ) * 1.28 );transform:translateX( calc( var( --_dir ) * ( var( --_travel ) - var( --_knob ) * 0.28 + var( --_drag ) ) ) )}:host( [ data-dragging ] ) .os-switch__knob{transition:width var( --_holo-t ) ease}.os-switch__label{line-height:1.3}.os-switch__label:empty{display:none}.os-switch__text{display:flex;flex-direction:column;gap:2px;min-width:0}.os-switch__description{font-size:0.92em;color:var( --os-ui-fg-muted,#646970 )}@media ( prefers-reduced-motion:reduce ){.os-switch__knob{transition-duration:1ms}}`,Ft=4,ne=class ne extends R{constructor(){super(...arguments),this._pointerId=null,this._startX=0,this._travel=0,this._moved=!1,this._dir=1,this._swallowClick=!1}render(){const e=this._attr("checked")!==null,t=this._attr("disabled")!==null,o=this._attr("label")||"",i=this._attr("description")||"";return g`
155 156 <div class="os-switch__row">
156 157 <span class="os-switch__text">
157 158 <span class="os-switch__label">${o}</span>
158 159 <span class="os-switch__description" id="os-switch-desc"
@@ -175,20 +176,20 @@
175 176 >
176 177 <span class="os-switch__knob"></span>
177 178 </button>
178 179 </div>
179 - `}_onPointerDown(e){if(this._attr("disabled")!==null)return;const t=e.currentTarget;this._pointerId=e.pointerId,this._startX=e.clientX,this._moved=!1,this._dir=getComputedStyle(this).direction==="rtl"?-1:1,this.style.setProperty("--_dir",String(this._dir)),this._travel=Math.max(0,t.clientWidth-t.clientHeight),t.setPointerCapture(e.pointerId)}_onPointerMove(e){if(this._pointerId!==e.pointerId||this._travel===0)return;const t=(e.clientX-this._startX)*this._dir;if(!this._moved&&Math.abs(t)>=Ft&&(this._moved=!0,this.setAttribute("data-dragging","")),!this._moved)return;const o=this._attr("checked")!==null,i=o?-this._travel:0,n=o?0:this._travel;this.style.setProperty("--_drag",`${Math.min(n,Math.max(i,t))}px`)}_onPointerUp(e){if(this._pointerId!==e.pointerId)return;const t=this._moved,o=(e.clientX-this._startX)*this._dir;if(this._swallowClick=t,this._endGesture(),!t)return;const i=this._attr("checked")!==null,r=(i?this._travel:0)+o>this._travel/2;r!==i&&this._commit(r)}_endGesture(){this._pointerId=null,this._moved=!1,this.removeAttribute("data-dragging"),this.style.removeProperty("--_drag")}_onClick(){if(this._swallowClick){this._swallowClick=!1;return}this._attr("disabled")===null&&this._commit(this._attr("checked")===null)}_onKeyDown(e){this._attr("disabled")===null&&(e.key==="ArrowRight"||e.key==="End"?(e.preventDefault(),this._attr("checked")===null&&this._commit(!0)):(e.key==="ArrowLeft"||e.key==="Home")&&(e.preventDefault(),this._attr("checked")!==null&&this._commit(!1)))}_commit(e){e?this.setAttribute("checked",""):this.removeAttribute("checked");const t={checked:e,value:this._attr("value")};this.emit("os-switch-change",t),this.emit("os-checkbox-change",t)}_attr(e){return this[e]??null}};ne.props=["checked","value","label","description","disabled","size","tone","block","labelPosition"],ne.styles=[Ot],ne.help=void 0;let Ie=ne;H("os-switch",Ie);const Xt=z`:host{display:block;counter-reset:os-step}:host( [ hidden ] ){display:none}.os-steps__list{display:flex;flex-direction:column;gap:var( --os-ui-steps-gap,16px );margin:0;padding:0;list-style:none}:host( [ horizontal ] ){--os-ui-step-connector-width:20px;--os-ui-step-title-color:var( --os-ui-fg-muted,#646970 );--os-ui-step-title-weight:400}:host( [ horizontal ] ) .os-steps__list{flex-direction:row;align-items:center;flex-wrap:wrap;gap:var( --os-ui-steps-gap,10px )}`,Yt=z`:host{display:grid;grid-template-columns:var( --os-ui-step-chip-size,28px ) 1fr var( --os-ui-step-connector-width,0 );column-gap:var( --os-ui-step-gap,12px );align-items:start;counter-increment:os-step}:host( [ hidden ] ){display:none}:host::before{content:counter( os-step );display:inline-flex;align-items:center;justify-content:center;width:var( --os-ui-step-chip-size,28px );height:var( --os-ui-step-chip-size,28px );box-sizing:border-box;border-radius:50%;background:var( --os-ui-step-chip-bg,var( --wp-admin-theme-color,#2271b1 ) );background-size:200% 200%;background-position:30% 40%;color:var( --os-ui-step-chip-fg,var( --os-ui-fg-on-accent,#fff ) );border:var( --os-ui-step-chip-border,0 );font-family:var( --os-ui-step-chip-family,inherit );font-size:var( --os-ui-step-chip-font-size,13px );font-weight:600;line-height:1;flex-shrink:0}:host( [ done ] )::before{content:'✓';background:var( --os-ui-step-chip-done-bg,var( --os-ui-fg-muted,#646970 ) )}:host( [ current ] ) .os-step__title{color:var( --os-ui-fg,#1d2327 );font-weight:600}:host( [ interactive ] ){cursor:pointer}:host( [ interactive ]:focus-visible ){outline:var( --os-ui-focus-ring,2px solid #2271b1 );outline-offset:2px;border-radius:var( --os-ui-radius,4px )}:host::after{content:'';inline-size:var( --os-ui-step-connector-width,0 );block-size:1px;background:var( --os-ui-border,rgba( 0,0,0,0.08 ) );align-self:center}:host(:last-of-type )::after{content:none}.os-step__body{min-width:0}:host( [ trail ] ){align-items:center}:host( [ trail ] ) .os-step__title{margin:0}.os-step__title{margin:0 0 4px;font-family:var( --os-ui-step-title-family,inherit );font-size:var( --os-ui-step-title-size,14px );font-weight:var( --os-ui-step-title-weight,600 );color:var( --os-ui-step-title-color,var( --os-ui-fg,#1d2327 ) );text-transform:var( --os-ui-step-title-transform,none );letter-spacing:var( --os-ui-step-title-spacing,normal );line-height:1.3}.os-step__title:empty{display:none}.os-step__body::slotted( * ){margin-block:0}`,re=class re extends R{constructor(){super(...arguments),this.syncTrail=()=>{const e=this.hasAttribute("horizontal");for(const t of Array.from(this.children))t.tagName==="OS-STEP"&&t.toggleAttribute("trail",e)}}connectedCallback(){super.connectedCallback(),this.syncTrail()}render(){return this.syncTrail(),v`<ol class="os-steps__list"><slot @slotchange=${this.syncTrail}></slot></ol>`}};re.props=["horizontal"],re.styles=[Xt],re.help=void 0;let Se=re;H("os-steps",Se);const ae=class ae extends R{constructor(){super(...arguments),this.onClick=e=>{if(!this.isInteractive())return;const t=e.composedPath();for(const o of t){if(o===this)break;if(o instanceof HTMLElement&&o.hasAttribute("data-noclick"))return}this.dispatchEvent(new CustomEvent("os-step-click",{bubbles:!0,composed:!0}))},this.onKeyDown=e=>{if(!this.isInteractive()||e.key!=="Enter"&&e.key!==" ")return;const t=e.target;t instanceof HTMLElement&&t!==this&&t.closest("button, a, input, select, textarea")||(e.preventDefault(),this.onClick(e))}}isInteractive(){return this.hasAttribute("interactive")}syncRoles(){this.hasAttribute("current")?this.setAttribute("aria-current","step"):this.removeAttribute("aria-current"),this.isInteractive()?(this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")):(this.removeAttribute("role"),this.removeAttribute("tabindex"))}connectedCallback(){super.connectedCallback(),this.syncRoles(),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeyDown)}disconnectedCallback(){this.removeEventListener("click",this.onClick),this.removeEventListener("keydown",this.onKeyDown)}render(){const e=this.title||"";return this.syncRoles(),v`
180 + `}_onPointerDown(e){if(this._attr("disabled")!==null)return;const t=e.currentTarget;this._pointerId=e.pointerId,this._startX=e.clientX,this._moved=!1,this._dir=getComputedStyle(this).direction==="rtl"?-1:1,this.style.setProperty("--_dir",String(this._dir)),this._travel=Math.max(0,t.clientWidth-t.clientHeight),t.setPointerCapture(e.pointerId)}_onPointerMove(e){if(this._pointerId!==e.pointerId||this._travel===0)return;const t=(e.clientX-this._startX)*this._dir;if(!this._moved&&Math.abs(t)>=Ft&&(this._moved=!0,this.setAttribute("data-dragging","")),!this._moved)return;const o=this._attr("checked")!==null,i=o?-this._travel:0,n=o?0:this._travel;this.style.setProperty("--_drag",`${Math.min(n,Math.max(i,t))}px`)}_onPointerUp(e){if(this._pointerId!==e.pointerId)return;const t=this._moved,o=(e.clientX-this._startX)*this._dir;if(this._swallowClick=t,this._endGesture(),!t)return;const i=this._attr("checked")!==null,r=(i?this._travel:0)+o>this._travel/2;r!==i&&this._commit(r)}_endGesture(){this._pointerId=null,this._moved=!1,this.removeAttribute("data-dragging"),this.style.removeProperty("--_drag")}_onClick(){if(this._swallowClick){this._swallowClick=!1;return}this._attr("disabled")===null&&this._commit(this._attr("checked")===null)}_onKeyDown(e){this._attr("disabled")===null&&(e.key==="ArrowRight"||e.key==="End"?(e.preventDefault(),this._attr("checked")===null&&this._commit(!0)):(e.key==="ArrowLeft"||e.key==="Home")&&(e.preventDefault(),this._attr("checked")!==null&&this._commit(!1)))}_commit(e){e?this.setAttribute("checked",""):this.removeAttribute("checked");const t={checked:e,value:this._attr("value")};this.emit("os-switch-change",t),this.emit("os-checkbox-change",t)}_attr(e){return this[e]??null}};ne.props=["name","checked","value","label","description","disabled","size","tone","block","labelPosition"],ne.styles=[Ot],ne.help=void 0;let Ie=ne;D("os-switch",Ie);const Xt=z`:host{display:block;counter-reset:os-step}:host( [ hidden ] ){display:none}.os-steps__list{display:flex;flex-direction:column;gap:var( --os-ui-steps-gap,16px );margin:0;padding:0;list-style:none}:host( [ horizontal ] ){--os-ui-step-connector-width:20px;--os-ui-step-title-color:var( --os-ui-fg-muted,#646970 );--os-ui-step-title-weight:400}:host( [ horizontal ] ) .os-steps__list{flex-direction:row;align-items:center;flex-wrap:wrap;gap:var( --os-ui-steps-gap,10px )}`,Yt=z`:host{display:grid;grid-template-columns:var( --os-ui-step-chip-size,28px ) 1fr var( --os-ui-step-connector-width,0 );column-gap:var( --os-ui-step-gap,12px );align-items:start;counter-increment:os-step}:host( [ hidden ] ){display:none}:host::before{content:counter( os-step );display:inline-flex;align-items:center;justify-content:center;width:var( --os-ui-step-chip-size,28px );height:var( --os-ui-step-chip-size,28px );box-sizing:border-box;border-radius:50%;background:var( --os-ui-step-chip-bg,var( --wp-admin-theme-color,#2271b1 ) );background-size:200% 200%;background-position:30% 40%;color:var( --os-ui-step-chip-fg,var( --os-ui-fg-on-accent,#fff ) );border:var( --os-ui-step-chip-border,0 );font-family:var( --os-ui-step-chip-family,inherit );font-size:var( --os-ui-step-chip-font-size,13px );font-weight:600;line-height:1;flex-shrink:0}:host( [ done ] )::before{content:'✓';background:var( --os-ui-step-chip-done-bg,var( --os-ui-fg-muted,#646970 ) )}:host( [ current ] ) .os-step__title{color:var( --os-ui-fg,#1d2327 );font-weight:600}:host( [ interactive ] ){cursor:pointer}:host( [ interactive ] ) .os-step__title{transition:color 120ms ease}:host( [ interactive ] )::before{transition:border-color 120ms ease}:host( [ interactive ]:hover ) .os-step__title{color:var( --os-ui-step-title-hover-color,var( --os-ui-fg,#1d2327 ) )}:host( [ interactive ]:hover )::before{border-color:var( --os-ui-step-title-hover-color,var( --os-ui-fg,#1d2327 ) )}:host( [ interactive ]:focus-visible ){outline:var( --os-ui-focus-ring,2px solid #2271b1 );outline-offset:2px;border-radius:var( --os-ui-radius,4px )}:host::after{content:'';inline-size:var( --os-ui-step-connector-width,0 );block-size:1px;background:var( --os-ui-border,rgba( 0,0,0,0.08 ) );align-self:center}:host(:last-of-type )::after{content:none}.os-step__body{min-width:0}:host( [ trail ] ){align-items:center}:host( [ trail ] ) .os-step__title{margin:0}.os-step__title{margin:0 0 4px;font-family:var( --os-ui-step-title-family,inherit );font-size:var( --os-ui-step-title-size,14px );font-weight:var( --os-ui-step-title-weight,600 );color:var( --os-ui-step-title-color,var( --os-ui-fg,#1d2327 ) );text-transform:var( --os-ui-step-title-transform,none );letter-spacing:var( --os-ui-step-title-spacing,normal );line-height:1.3}.os-step__title:empty{display:none}.os-step__body::slotted( * ){margin-block:0}`,re=class re extends R{constructor(){super(...arguments),this.syncTrail=()=>{const e=this.hasAttribute("horizontal");for(const t of Array.from(this.children))t.tagName==="OS-STEP"&&t.toggleAttribute("trail",e)}}connectedCallback(){super.connectedCallback(),this.syncTrail()}render(){return this.syncTrail(),g`<ol class="os-steps__list"><slot @slotchange=${this.syncTrail}></slot></ol>`}};re.props=["horizontal"],re.styles=[Xt],re.help=void 0;let Me=re;D("os-steps",Me);const ae=class ae extends R{constructor(){super(...arguments),this.onClick=e=>{if(!this.isInteractive())return;const t=e.composedPath();for(const o of t){if(o===this)break;if(o instanceof HTMLElement&&o.hasAttribute("data-noclick"))return}this.dispatchEvent(new CustomEvent("os-step-click",{bubbles:!0,composed:!0}))},this.onKeyDown=e=>{if(!this.isInteractive()||e.key!=="Enter"&&e.key!==" ")return;const t=e.target;t instanceof HTMLElement&&t!==this&&t.closest("button, a, input, select, textarea")||(e.preventDefault(),this.onClick(e))}}isInteractive(){return this.hasAttribute("interactive")}syncRoles(){this.hasAttribute("current")?this.setAttribute("aria-current","step"):this.removeAttribute("aria-current"),this.isInteractive()?(this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")):(this.removeAttribute("role"),this.removeAttribute("tabindex"))}connectedCallback(){super.connectedCallback(),this.syncRoles(),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeyDown)}disconnectedCallback(){this.removeEventListener("click",this.onClick),this.removeEventListener("keydown",this.onKeyDown)}render(){const e=this.title||"";return this.syncRoles(),g`
180 181 <div class="os-step__body">
181 182 <div class="os-step__title">${e}</div>
182 183 <slot></slot>
183 184 </div>
184 - `}};ae.props=["title","done","current","interactive"],ae.styles=[Yt],ae.help={title:"Step",summary:"A single numbered step inside <os-steps>. Renders an auto-numbered chip and an optional bold title above the slotted body.",status:"stable",props:[{name:"title",type:"string",description:"Optional bold title rendered above the body."},{name:"done",type:"boolean",description:"When present, the chip shows a ✓ in a muted colour instead of the number."},{name:"current",type:"boolean",description:'Marks the step the reader is on. Mirrors aria-current="step" onto the host.'},{name:"interactive",type:"boolean",description:"Makes the step a way back: focusable, activated by click or Enter/Space, and emits os-step-click."}],events:[{name:"os-step-click",detail:"none",description:"Fired when an interactive step is activated by pointer or keyboard."}],slots:[{name:"(default)",description:"Step body content."}],cssProps:[{name:"--os-ui-step-gap",default:"12px"},{name:"--os-ui-step-chip-size",default:"28px"},{name:"--os-ui-step-chip-bg",default:"var(--wp-admin-theme-color)"},{name:"--os-ui-step-chip-fg",default:"#fff"},{name:"--os-ui-step-chip-done-bg",default:"var(--os-ui-fg-muted)"},{name:"--os-ui-step-chip-font-size",default:"13px"}],example:v`
185 + `}};ae.props=["title","done","current","interactive"],ae.styles=[Yt],ae.help={title:"Step",summary:"A single numbered step inside <os-steps>. Renders an auto-numbered chip and an optional bold title above the slotted body.",status:"stable",props:[{name:"title",type:"string",description:"Optional bold title rendered above the body."},{name:"done",type:"boolean",description:"When present, the chip shows a ✓ in a muted colour instead of the number."},{name:"current",type:"boolean",description:'Marks the step the reader is on. Mirrors aria-current="step" onto the host.'},{name:"interactive",type:"boolean",description:"Makes the step a jump target: focusable, activated by click or Enter/Space, and emits os-step-click. Lifts the title to full contrast on hover."}],events:[{name:"os-step-click",detail:"none",description:"Fired when an interactive step is activated by pointer or keyboard."}],slots:[{name:"(default)",description:"Step body content."}],cssProps:[{name:"--os-ui-step-gap",default:"12px"},{name:"--os-ui-step-chip-size",default:"28px"},{name:"--os-ui-step-chip-bg",default:"var(--wp-admin-theme-color)"},{name:"--os-ui-step-chip-fg",default:"#fff"},{name:"--os-ui-step-chip-done-bg",default:"var(--os-ui-fg-muted)"},{name:"--os-ui-step-chip-font-size",default:"13px"},{name:"--os-ui-step-title-hover-color",default:"var(--os-ui-fg)",description:"Ink an interactive step takes on hover, on its title and on an outlined chip."}],example:g`
185 186 <os-steps>
186 187 <os-step title="Configure">Open OpenStation Preferences → AI.</os-step>
187 188 <os-step title="Connect" done>Key confirmed.</os-step>
188 189 </os-steps>
189 - `};let Me=ae;H("os-step",Me);const Qt=z` ${q} ${$e}:host(:not( [ interactive ] ) ) .os-holo-glint,:host( [ disabled ] ) .os-holo-glint{display:none}:host{display:flex;flex-direction:column;position:relative;gap:var( --os-ui-card-gap,12px );padding:var( --os-ui-card-padding,16px );border:1px solid var( --os-ui-card-border,var( --os-ui-border,rgba( 0,0,0,0.08 ) ) );border-radius:var( --os-ui-card-radius,12px );background:var( --os-ui-card-bg,var( --os-ui-surface,#fff ) );background-image:var( --os-ui-panel-bg-image,none );background-repeat:var( --os-ui-panel-bg-image-repeat,repeat );background-size:var( --os-ui-panel-bg-image-size,auto );background-position:var( --os-ui-panel-bg-image-position,center );color:var( --os-ui-card-fg,inherit );box-sizing:border-box;min-width:0;transition:transform 180ms ease,box-shadow 180ms ease,border-color 180ms ease}:host( [ hidden ] ){display:none}:host( [ compact ] ){padding:var( --os-ui-card-padding-compact,10px );gap:var( --os-ui-card-gap-compact,6px );border-radius:var( --os-ui-card-radius-compact,8px )}:host( [ interactive ] ){cursor:pointer;outline-offset:2px}:host( [ interactive ]:hover ),:host( [ interactive ]:focus-visible ){transform:translateY( -2px );box-shadow:var( --os-ui-card-shadow-hover,0 4px 16px rgba( 0,0,0,0.08 ) );border-color:var( --os-ui-card-border-hover,var( --os-ui-border-strong,rgba( 0,0,0,0.16 ) ) )}:host( [ interactive ]:focus-visible ){outline:none;box-shadow:var( --_holo-focus )}:host( [ selected ] ){border-color:var( --os-ui-card-border-selected,var( --wp-admin-theme-color,#2271b1 ) );box-shadow:var( --os-ui-card-shadow-selected,0 0 0 1px var( --wp-admin-theme-color,#2271b1 ) inset )}:host( [ selected ] )::after{content:'';position:absolute;inset:-1px;border-radius:inherit;padding:1px;background-image:var( --_holo-edge );pointer-events:none;-webkit-mask:linear-gradient( #000 0 0 ) content-box,linear-gradient( #000 0 0 );-webkit-mask-composite:xor;mask:linear-gradient( #000 0 0 ) content-box,linear-gradient( #000 0 0 );mask-composite:exclude}:host( [ disabled ] ){opacity:0.55;pointer-events:none;cursor:not-allowed}@media ( prefers-reduced-motion:reduce ){:host{transition:none}:host( [ interactive ]:hover ),:host( [ interactive ]:focus-visible ){transform:none}}::slotted( header ){display:flex;align-items:center;gap:12px;min-width:0}::slotted( footer ){display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto}`,rt="[data-noclick]",le=class le extends R{constructor(){super(...arguments),this._onClick=e=>{!this.hasAttribute("interactive")||this.hasAttribute("disabled")||e.target?.closest(rt)||this._emitCardClick(e)},this._onKeyDown=e=>{if(!this.hasAttribute("interactive")||this.hasAttribute("disabled")||e.key!=="Enter"&&e.key!==" "&&e.key!=="Spacebar")return;const t=e.target;t&&t!==this&&t.closest(rt)||t instanceof HTMLElement&&t!==this&&(t.tagName==="BUTTON"||t.tagName==="A"||t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.tagName==="SELECT")||(e.preventDefault(),this._emitCardClick(e))}}connectedCallback(){super.connectedCallback(),this._syncRoles(),this.addEventListener("click",this._onClick),this.addEventListener("keydown",this._onKeyDown)}disconnectedCallback(){this.removeEventListener("click",this._onClick),this.removeEventListener("keydown",this._onKeyDown)}render(){return this._syncRoles(),v`<span class="os-holo-glint" aria-hidden="true"></span
190 - ><slot name="header"></slot><slot></slot><slot name="footer"></slot>`}_syncRoles(){const e=this.hasAttribute("interactive"),t=this.hasAttribute("disabled");e?(this.hasAttribute("role")||this.setAttribute("role","button"),this.setAttribute("tabindex",t?"-1":"0"),this.setAttribute("aria-disabled",t?"true":"false")):(this.removeAttribute("role"),this.removeAttribute("tabindex"),this.removeAttribute("aria-disabled"))}_emitCardClick(e){this.dispatchEvent(new CustomEvent("os-card-click",{detail:{originalEvent:e},bubbles:!0,composed:!0}))}};le.props=["interactive","selected","compact","disabled"],le.styles=[Qt],le.help=void 0;let Pe=le;H("os-card",Pe);const Gt=z`:host{display:grid;min-inline-size:0;min-block-size:0;grid-template-columns:var( --os-ui-grid-columns,1fr );grid-template-rows:var( --os-ui-grid-rows,auto );gap:var( --os-ui-grid-gap,8px );column-gap:var( --os-ui-grid-column-gap,var( --os-ui-grid-gap,8px ) );row-gap:var( --os-ui-grid-row-gap,var( --os-ui-grid-gap,8px ) )}:host( [ hidden ] ){display:none}::slotted( * ){min-inline-size:0}::slotted( [ col-span='1' ] ){grid-column:span min( 1,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='1' ] ){grid-row:span 1}::slotted( [ col-span='2' ] ){grid-column:span min( 2,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='2' ] ){grid-row:span 2}::slotted( [ col-span='3' ] ){grid-column:span min( 3,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='3' ] ){grid-row:span 3}::slotted( [ col-span='4' ] ){grid-column:span min( 4,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='4' ] ){grid-row:span 4}::slotted( [ col-span='5' ] ){grid-column:span min( 5,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='5' ] ){grid-row:span 5}::slotted( [ col-span='6' ] ){grid-column:span min( 6,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='6' ] ){grid-row:span 6}::slotted( [ col-span='7' ] ){grid-column:span min( 7,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='7' ] ){grid-row:span 7}::slotted( [ col-span='8' ] ){grid-column:span min( 8,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='8' ] ){grid-row:span 8}::slotted( [ col-span='9' ] ){grid-column:span min( 9,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='9' ] ){grid-row:span 9}::slotted( [ col-span='10' ] ){grid-column:span min( 10,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='10' ] ){grid-row:span 10}::slotted( [ col-span='11' ] ){grid-column:span min( 11,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='11' ] ){grid-row:span 11}::slotted( [ col-span='12' ] ){grid-column:span min( 12,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='12' ] ){grid-row:span 12}:host( [ data-single-column ] ){grid-template-rows:none}:host( [ data-single-column ] )::slotted( [ row-span ] ){grid-row:auto}`,ce=class ce extends R{constructor(){super(...arguments),this.observer=null,this.availableWidth=0,this.overrides=new Map}overrideToken(e,t){if(t!==null)this.overrides.has(e)||this.overrides.set(e,{value:this.style.getPropertyValue(e),priority:this.style.getPropertyPriority(e)}),this.style.setProperty(e,t);else{const o=this.overrides.get(e);o&&(o.value?this.style.setProperty(e,o.value,o.priority):this.style.removeProperty(e),this.overrides.delete(e))}}connectedCallback(){super.connectedCallback(),!(typeof ResizeObserver>"u")&&(this.observer=new ResizeObserver(e=>{this.availableWidth=e[0].contentRect.width,this.updateTracks()}),this.observer.observe(this))}disconnectedCallback(){this.observer?.disconnect(),this.observer=null}updateTracks(){const e=Number(this.getAttribute("min-item-width")),t=Number.isFinite(e)&&e>0,o=parseFloat(getComputedStyle(this).columnGap)||0,i=Number(this.getAttribute("columns")),n=Number.isSafeInteger(i)&&i>0?i:1,r=t?Math.max(1,Math.floor((this.availableWidth+o)/(e+o))):n;this.style.setProperty("--_os-grid-tracks",String(r)),this.toggleAttribute("data-single-column",t&&r===1),t||Number.isSafeInteger(i)&&i>0?this.overrideToken("--os-ui-grid-columns",`repeat(${r}, minmax(0, 1fr))`):this.overrideToken("--os-ui-grid-columns",null)}render(){const e=this.getAttribute("rows");e&&/^[1-9]\d*$/.test(e)?this.overrideToken("--os-ui-grid-rows",`repeat(${e}, minmax(0, 1fr))`):this.overrideToken("--os-ui-grid-rows",null);for(const t of["gap","column-gap","row-gap"]){const o=this.getAttribute(t);o!==null&&/^\d+$/.test(o)?this.overrideToken(`--os-ui-grid-${t}`,`${o}px`):this.overrideToken(`--os-ui-grid-${t}`,null)}return this.updateTracks(),v`<slot></slot>`}};ce.props=["columns","rows","gap","column-gap","row-gap","min-item-width"],ce.styles=[Gt],ce.help=void 0;let Ne=ce;H("os-grid",Ne);const Jt=z` ${q}:host{display:block;width:100%;aspect-ratio:4 / 3}:host( [ size='small' ] ){display:inline-block;width:32px;height:32px;aspect-ratio:1 / 1;flex:0 0 auto}:host( [ variant='accent' ] ){display:inline-block;width:28px;height:28px;aspect-ratio:1 / 1;flex:0 0 auto}:host( [ size='small' ][ variant='accent' ] ) button{border-radius:8px}:host( [ size='small' ][ variant='accent' ] ) button[ aria-pressed='true' ]{box-shadow:0 0 0 2px var( --os-ui-surface-sunken,#f0f0f1 ),0 0 0 4px var( --os-ui-accent,#2271b1 )}:host( [ size='small' ][ variant='accent' ] ) button[ aria-pressed='true' ]:focus-visible{box-shadow:var( --_holo-focus )}:host( [ variant='wallpaper' ] ){aspect-ratio:16 / 10}:host( [ variant='wallpaper' ] ) button{display:flex;align-items:flex-end;justify-content:flex-start;padding:8px;overflow:hidden}button{appearance:none;position:relative;width:100%;height:100%;padding:0;border-radius:10px;border:2px solid transparent;cursor:pointer;background-color:var( --os-ui-surface-sunken,#eee );background-size:cover;background-position:center;transition:transform 0.15s ease,border-color 0.15s ease,box-shadow 0.15s ease}:host( [ size='small' ] ) button{border-radius:50%}button:hover{transform:scale( 1.04 )}button:focus-visible{outline:none;box-shadow:var( --_holo-focus )}button[ aria-pressed='true' ]{border-color:transparent;box-shadow:0 0 0 var( --os-ui-swatch-ring-width,2px ) var( --os-ui-accent,#2271b1 ),var( --os-ui-swatch-lift,0 0 0 0 transparent )}:host(:not( [ variant='accent' ] ) ) button[ aria-pressed='true' ]::after{content:'';position:absolute;top:6px;inset-inline-end:6px;width:18px;height:18px;border-radius:50%;background:var( --os-ui-swatch-badge-bg,transparent );pointer-events:none;-webkit-mask:url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E" ) center / 12px no-repeat,linear-gradient( #000 0 0 );-webkit-mask-composite:xor;mask:url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E" ) center / 12px no-repeat,linear-gradient( #000 0 0 );mask-composite:exclude}button[ aria-pressed='true' ]:focus-visible{box-shadow:var( --_holo-focus )}:host( [ variant='wallpaper' ] ) button:hover{transform:translateY( -2px )}`,de=class de extends R{render(){const e=this.selected!==null,t=this.label||"",o=this.preview||"";return v`
190 + `};let Se=ae;D("os-step",Se);const Qt=z` ${q} ${$e}:host(:not( [ interactive ] ) ) .os-holo-glint,:host( [ disabled ] ) .os-holo-glint{display:none}:host{display:flex;flex-direction:column;position:relative;gap:var( --os-ui-card-gap,12px );padding:var( --os-ui-card-padding,16px );border:1px solid var( --os-ui-card-border,var( --os-ui-border,rgba( 0,0,0,0.08 ) ) );border-radius:var( --os-ui-card-radius,12px );background:var( --os-ui-card-bg,var( --os-ui-surface,#fff ) );background-image:var( --os-ui-panel-bg-image,none );background-repeat:var( --os-ui-panel-bg-image-repeat,repeat );background-size:var( --os-ui-panel-bg-image-size,auto );background-position:var( --os-ui-panel-bg-image-position,center );color:var( --os-ui-card-fg,inherit );box-sizing:border-box;min-width:0;transition:transform 180ms ease,box-shadow 180ms ease,border-color 180ms ease}:host( [ hidden ] ){display:none}:host( [ compact ] ){padding:var( --os-ui-card-padding-compact,10px );gap:var( --os-ui-card-gap-compact,6px );border-radius:var( --os-ui-card-radius-compact,8px )}:host( [ interactive ] ){cursor:pointer;outline-offset:2px}:host( [ interactive ]:hover ),:host( [ interactive ]:focus-visible ){transform:translateY( -2px );box-shadow:var( --os-ui-card-shadow-hover,0 4px 16px rgba( 0,0,0,0.08 ) );border-color:var( --os-ui-card-border-hover,var( --os-ui-border-strong,rgba( 0,0,0,0.16 ) ) )}:host( [ interactive ]:focus-visible ){outline:none;box-shadow:var( --_holo-focus )}:host( [ selected ] ){border-color:var( --os-ui-card-border-selected,var( --wp-admin-theme-color,#2271b1 ) );box-shadow:var( --os-ui-card-shadow-selected,0 0 0 1px var( --wp-admin-theme-color,#2271b1 ) inset )}:host( [ selected ] )::after{content:'';position:absolute;inset:-1px;border-radius:inherit;padding:1px;background-image:var( --_holo-edge );pointer-events:none;-webkit-mask:linear-gradient( #000 0 0 ) content-box,linear-gradient( #000 0 0 );-webkit-mask-composite:xor;mask:linear-gradient( #000 0 0 ) content-box,linear-gradient( #000 0 0 );mask-composite:exclude}:host( [ disabled ] ){opacity:0.55;pointer-events:none;cursor:not-allowed}@media ( prefers-reduced-motion:reduce ){:host{transition:none}:host( [ interactive ]:hover ),:host( [ interactive ]:focus-visible ){transform:none}}::slotted( header ){display:flex;align-items:center;gap:12px;min-width:0}::slotted( footer ){display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto}`,rt="[data-noclick]",le=class le extends R{constructor(){super(...arguments),this._onClick=e=>{!this.hasAttribute("interactive")||this.hasAttribute("disabled")||e.target?.closest(rt)||this._emitCardClick(e)},this._onKeyDown=e=>{if(!this.hasAttribute("interactive")||this.hasAttribute("disabled")||e.key!=="Enter"&&e.key!==" "&&e.key!=="Spacebar")return;const t=e.target;t&&t!==this&&t.closest(rt)||t instanceof HTMLElement&&t!==this&&(t.tagName==="BUTTON"||t.tagName==="A"||t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.tagName==="SELECT")||(e.preventDefault(),this._emitCardClick(e))}}connectedCallback(){super.connectedCallback(),this._syncRoles(),this.addEventListener("click",this._onClick),this.addEventListener("keydown",this._onKeyDown)}disconnectedCallback(){this.removeEventListener("click",this._onClick),this.removeEventListener("keydown",this._onKeyDown)}render(){return this._syncRoles(),g`<span class="os-holo-glint" aria-hidden="true"></span
191 + ><slot name="header"></slot><slot></slot><slot name="footer"></slot>`}_syncRoles(){const e=this.hasAttribute("interactive"),t=this.hasAttribute("disabled");e?(this.hasAttribute("role")||this.setAttribute("role","button"),this.setAttribute("tabindex",t?"-1":"0"),this.setAttribute("aria-disabled",t?"true":"false")):(this.removeAttribute("role"),this.removeAttribute("tabindex"),this.removeAttribute("aria-disabled"))}_emitCardClick(e){this.dispatchEvent(new CustomEvent("os-card-click",{detail:{originalEvent:e},bubbles:!0,composed:!0}))}};le.props=["interactive","selected","compact","disabled"],le.styles=[Qt],le.help=void 0;let Pe=le;D("os-card",Pe);const Gt=z`:host{display:grid;min-inline-size:0;min-block-size:0;grid-template-columns:var( --os-ui-grid-columns,1fr );grid-template-rows:var( --os-ui-grid-rows,auto );gap:var( --os-ui-grid-gap,8px );column-gap:var( --os-ui-grid-column-gap,var( --os-ui-grid-gap,8px ) );row-gap:var( --os-ui-grid-row-gap,var( --os-ui-grid-gap,8px ) )}:host( [ hidden ] ){display:none}::slotted( * ){min-inline-size:0}::slotted( [ col-span='1' ] ){grid-column:span min( 1,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='1' ] ){grid-row:span 1}::slotted( [ col-span='2' ] ){grid-column:span min( 2,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='2' ] ){grid-row:span 2}::slotted( [ col-span='3' ] ){grid-column:span min( 3,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='3' ] ){grid-row:span 3}::slotted( [ col-span='4' ] ){grid-column:span min( 4,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='4' ] ){grid-row:span 4}::slotted( [ col-span='5' ] ){grid-column:span min( 5,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='5' ] ){grid-row:span 5}::slotted( [ col-span='6' ] ){grid-column:span min( 6,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='6' ] ){grid-row:span 6}::slotted( [ col-span='7' ] ){grid-column:span min( 7,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='7' ] ){grid-row:span 7}::slotted( [ col-span='8' ] ){grid-column:span min( 8,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='8' ] ){grid-row:span 8}::slotted( [ col-span='9' ] ){grid-column:span min( 9,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='9' ] ){grid-row:span 9}::slotted( [ col-span='10' ] ){grid-column:span min( 10,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='10' ] ){grid-row:span 10}::slotted( [ col-span='11' ] ){grid-column:span min( 11,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='11' ] ){grid-row:span 11}::slotted( [ col-span='12' ] ){grid-column:span min( 12,var( --_os-grid-tracks,1 ) )}::slotted( [ row-span='12' ] ){grid-row:span 12}:host( [ data-single-column ] ){grid-template-rows:none}:host( [ data-single-column ] )::slotted( [ row-span ] ){grid-row:auto}`,ce=class ce extends R{constructor(){super(...arguments),this.observer=null,this.availableWidth=0,this.overrides=new Map}overrideToken(e,t){if(t!==null)this.overrides.has(e)||this.overrides.set(e,{value:this.style.getPropertyValue(e),priority:this.style.getPropertyPriority(e)}),this.style.setProperty(e,t);else{const o=this.overrides.get(e);o&&(o.value?this.style.setProperty(e,o.value,o.priority):this.style.removeProperty(e),this.overrides.delete(e))}}connectedCallback(){super.connectedCallback(),!(typeof ResizeObserver>"u")&&(this.observer=new ResizeObserver(e=>{this.availableWidth=e[0].contentRect.width,this.updateTracks()}),this.observer.observe(this))}disconnectedCallback(){this.observer?.disconnect(),this.observer=null}updateTracks(){const e=Number(this.getAttribute("min-item-width")),t=Number.isFinite(e)&&e>0,o=parseFloat(getComputedStyle(this).columnGap)||0,i=Number(this.getAttribute("columns")),n=Number.isSafeInteger(i)&&i>0?i:1,r=t?Math.max(1,Math.floor((this.availableWidth+o)/(e+o))):n;this.style.setProperty("--_os-grid-tracks",String(r)),this.toggleAttribute("data-single-column",t&&r===1),t||Number.isSafeInteger(i)&&i>0?this.overrideToken("--os-ui-grid-columns",`repeat(${r}, minmax(0, 1fr))`):this.overrideToken("--os-ui-grid-columns",null)}render(){const e=this.getAttribute("rows");e&&/^[1-9]\d*$/.test(e)?this.overrideToken("--os-ui-grid-rows",`repeat(${e}, minmax(0, 1fr))`):this.overrideToken("--os-ui-grid-rows",null);for(const t of["gap","column-gap","row-gap"]){const o=this.getAttribute(t);o!==null&&/^\d+$/.test(o)?this.overrideToken(`--os-ui-grid-${t}`,`${o}px`):this.overrideToken(`--os-ui-grid-${t}`,null)}return this.updateTracks(),g`<slot></slot>`}};ce.props=["columns","rows","gap","column-gap","row-gap","min-item-width"],ce.styles=[Gt],ce.help=void 0;let Ne=ce;D("os-grid",Ne);const Jt=z` ${q}:host{display:block;width:100%;aspect-ratio:4 / 3}:host( [ size='small' ] ){display:inline-block;width:32px;height:32px;aspect-ratio:1 / 1;flex:0 0 auto}:host( [ variant='accent' ] ){display:inline-block;width:28px;height:28px;aspect-ratio:1 / 1;flex:0 0 auto}:host( [ size='small' ][ variant='accent' ] ) button{border-radius:8px}:host( [ size='small' ][ variant='accent' ] ) button[ aria-pressed='true' ]{box-shadow:0 0 0 2px var( --os-ui-surface-sunken,#f0f0f1 ),0 0 0 4px var( --os-ui-accent,#2271b1 )}:host( [ size='small' ][ variant='accent' ] ) button[ aria-pressed='true' ]:focus-visible{box-shadow:var( --_holo-focus )}:host( [ variant='wallpaper' ] ){aspect-ratio:16 / 10}:host( [ variant='wallpaper' ] ) button{display:flex;align-items:flex-end;justify-content:flex-start;padding:8px;overflow:hidden}button{appearance:none;position:relative;width:100%;height:100%;padding:0;border-radius:10px;border:2px solid transparent;cursor:pointer;background-color:var( --os-ui-surface-sunken,#eee );background-size:cover;background-position:center;transition:transform 0.15s ease,border-color 0.15s ease,box-shadow 0.15s ease}:host( [ size='small' ] ) button{border-radius:50%}button:hover{transform:scale( 1.04 )}button:focus-visible{outline:none;box-shadow:var( --_holo-focus )}button[ aria-pressed='true' ]{border-color:transparent;box-shadow:0 0 0 var( --os-ui-swatch-ring-width,2px ) var( --os-ui-accent,#2271b1 ),var( --os-ui-swatch-lift,0 0 0 0 transparent )}:host(:not( [ variant='accent' ] ) ) button[ aria-pressed='true' ]::after{content:'';position:absolute;top:6px;inset-inline-end:6px;width:18px;height:18px;border-radius:50%;background:var( --os-ui-swatch-badge-bg,transparent );pointer-events:none;-webkit-mask:url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E" ) center / 12px no-repeat,linear-gradient( #000 0 0 );-webkit-mask-composite:xor;mask:url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E" ) center / 12px no-repeat,linear-gradient( #000 0 0 );mask-composite:exclude}button[ aria-pressed='true' ]:focus-visible{box-shadow:var( --_holo-focus )}:host( [ variant='wallpaper' ] ) button:hover{transform:translateY( -2px )}`,de=class de extends R{render(){const e=this.selected!==null,t=this.label||"",o=this.preview||"";return g`
191 192 <button
192 193 type="button"
193 194 aria-pressed=${e?"true":"false"}
194 195 aria-label=${t}
@@ -197,9 +198,9 @@
197 198 @click=${()=>this._onPick()}
198 199 >
199 200 <slot></slot>
200 201 </button>
201 - `}_onPick(){this.emit("os-pick",{value:this.value})}};de.props=["value","label","selected","preview","size","variant"],de.styles=[Jt],de.help=void 0;let Re=de;H("os-swatch",Re);const eo=z`:host{display:grid;grid-template-columns:repeat( var( --os-ui-swatch-grid-cols,4 ),1fr );gap:12px}:host( [ mode='row' ] ){display:flex;flex-wrap:wrap;align-items:center;gap:10px}`,ue=class ue extends R{render(){const e=this.label||"",t=this.columns||"";return t&&this.style.setProperty("--os-ui-swatch-grid-cols",t),this.setAttribute("role","radiogroup"),e&&this.setAttribute("aria-label",e),v`<slot></slot>`}};ue.props=["label","columns","mode"],ue.styles=[eo],ue.help=void 0;let We=ue;H("os-swatch-grid",We);const to=z` ${q}:host{display:inline-flex;position:relative;padding:3px;background:var( --os-ui-segmented-bg,var( --os-ui-hover,rgba( 0,0,0,0.05 ) ) );border-radius:8px;gap:2px;box-shadow:var( --os-ui-segmented-edge,none )}.os-segmented__thumb{position:absolute;top:3px;bottom:3px;left:0;width:var( --_thumb-w,0px );border-radius:6px;background-color:var( --os-ui-segmented-selected-bg,color-mix( in srgb,var( --os-ui-accent,#2271b1 ) var( --os-ui-segmented-selected-accent,100% ),var( --os-ui-segmented-selected-base,var( --os-ui-surface,#fff ) ) ) );background-image:var( --os-ui-segmented-selected-image,none );box-shadow:var( --os-ui-segmented-selected-shadow,none );background-size:220% 220%;background-position:22% 28%;background-repeat:no-repeat;transform:translateX( var( --_thumb-x,0px ) );pointer-events:none;opacity:0}:host( [ data-thumb ] ) .os-segmented__thumb{opacity:1}:host( [ data-thumb-ready ] ) .os-segmented__thumb{transition:transform var( --_holo-t-slow ) var( --_holo-spring ),width var( --_holo-t-slow ) var( --_holo-ease ),opacity var( --_holo-t-fast ) linear}@media ( prefers-reduced-motion:reduce ){:host( [ data-thumb-ready ] ) .os-segmented__thumb{transition-duration:1ms}}`,oo=z` ${q} ${Ce}:host{flex:1 1 auto;min-width:0;--_holo-sheen:var( --os-ui-segmented-hover-sheen,var( --os-ui-holo-sheen,linear-gradient( 124deg,rgba( 159,214,255,0.1 ) 0%,rgba( 236,155,255,0.12 ) 34%,rgba( 242,82,252,0.1 ) 58%,rgba( 147,240,198,0.09 ) 100% ) ) )}button{appearance:none;display:block;width:100%;padding:6px 13px;background:transparent;border:0;font:inherit;font-size:13px;color:var( --os-ui-fg-muted,#646970 );cursor:pointer;border-radius:6px;transition:background-color var( --_holo-t ) ease,color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease,background-position var( --_holo-t ) ease;white-space:nowrap}button:hover{color:var( --os-ui-fg,#1d2327 )}:host(:not( [ aria-checked='true' ] ) ) button:hover{background-color:var( --os-ui-segmented-hover-bg,transparent )}button:focus-visible{outline:none;box-shadow:var( --_holo-focus )}:host( [ aria-checked='true' ] ) button{color:var( --os-ui-segmented-selected-fg,color-mix( in srgb,var( --os-ui-accent-ink,var( --os-ui-fg-on-accent,#fff ) ) var( --os-ui-segmented-selected-accent,100% ),var( --os-ui-fg,#1d2327 ) ) );transition-duration:var( --_holo-t-fast )}:host( [ aria-checked='true' ] ) button::before{display:none}`,he=class he extends R{render(){return this.setAttribute("role","radio"),v`
202 + `}_onPick(){this.emit("os-pick",{value:this.value})}};de.props=["value","label","selected","preview","size","variant"],de.styles=[Jt],de.help=void 0;let Re=de;D("os-swatch",Re);const eo=z`:host{display:grid;grid-template-columns:repeat( var( --os-ui-swatch-grid-cols,4 ),1fr );gap:12px}:host( [ mode='row' ] ){display:flex;flex-wrap:wrap;align-items:center;gap:10px}`,ue=class ue extends R{render(){const e=this.label||"",t=this.columns||"";return t&&this.style.setProperty("--os-ui-swatch-grid-cols",t),this.setAttribute("role","radiogroup"),e&&this.setAttribute("aria-label",e),g`<slot></slot>`}};ue.props=["label","columns","mode"],ue.styles=[eo],ue.help=void 0;let We=ue;D("os-swatch-grid",We);const to=z` ${q}:host{display:inline-flex;position:relative;padding:3px;background:var( --os-ui-segmented-bg,var( --os-ui-hover,rgba( 0,0,0,0.05 ) ) );border-radius:8px;gap:2px;box-shadow:var( --os-ui-segmented-edge,none )}.os-segmented__thumb{position:absolute;top:3px;bottom:3px;left:0;width:var( --_thumb-w,0px );border-radius:6px;background-color:var( --os-ui-segmented-selected-bg,color-mix( in srgb,var( --os-ui-accent,#2271b1 ) var( --os-ui-segmented-selected-accent,100% ),var( --os-ui-segmented-selected-base,var( --os-ui-surface,#fff ) ) ) );background-image:var( --os-ui-segmented-selected-image,none );box-shadow:var( --os-ui-segmented-selected-shadow,none );background-size:220% 220%;background-position:22% 28%;background-repeat:no-repeat;transform:translateX( var( --_thumb-x,0px ) );pointer-events:none;opacity:0}:host( [ data-thumb ] ) .os-segmented__thumb{opacity:1}:host( [ data-thumb-ready ] ) .os-segmented__thumb{transition:transform var( --_holo-t-slow ) var( --_holo-spring ),width var( --_holo-t-slow ) var( --_holo-ease ),opacity var( --_holo-t-fast ) linear}@media ( prefers-reduced-motion:reduce ){:host( [ data-thumb-ready ] ) .os-segmented__thumb{transition-duration:1ms}}`,oo=z` ${q} ${Ce}:host{flex:1 1 auto;min-width:0;--_holo-sheen:var( --os-ui-segmented-hover-sheen,var( --os-ui-holo-sheen,linear-gradient( 124deg,rgba( 159,214,255,0.1 ) 0%,rgba( 236,155,255,0.12 ) 34%,rgba( 242,82,252,0.1 ) 58%,rgba( 147,240,198,0.09 ) 100% ) ) )}button{appearance:none;display:block;width:100%;padding:6px 13px;background:transparent;border:0;font:inherit;font-size:13px;color:var( --os-ui-fg-muted,#646970 );cursor:pointer;border-radius:6px;transition:background-color var( --_holo-t ) ease,color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease,background-position var( --_holo-t ) ease;white-space:nowrap}button:hover{color:var( --os-ui-fg,#1d2327 )}:host(:not( [ aria-checked='true' ] ) ) button:hover{background-color:var( --os-ui-segmented-hover-bg,transparent )}button:focus-visible{outline:none;box-shadow:var( --_holo-focus )}:host( [ aria-checked='true' ] ) button{color:var( --os-ui-segmented-selected-fg,color-mix( in srgb,var( --os-ui-accent-ink,var( --os-ui-fg-on-accent,#fff ) ) var( --os-ui-segmented-selected-accent,100% ),var( --os-ui-fg,#1d2327 ) ) );transition-duration:var( --_holo-t-fast )}:host( [ aria-checked='true' ] ) button::before{display:none}`,he=class he extends R{render(){return this.setAttribute("role","radio"),g`
202 203 <button
203 204 type="button"
204 205 class="os-holo-sheen"
205 206 @click=${()=>this._onPick()}
@@ -205,24 +206,24 @@
205 206 @click=${()=>this._onPick()}
206 207 >
207 208 <slot></slot>
208 209 </button>
209 - `}_onPick(){this.emit("os-segment-pick",{value:this.value})}};he.props=["value"],he.styles=[oo],he.help=void 0;let De=he;H("os-segment",De);const pe=class pe extends R{constructor(){super(...arguments),this._resizeObserver=null}connectedCallback(){super.connectedCallback(),this.addEventListener("os-segment-pick",e=>{const t=e.detail;e.stopPropagation(),this.value=t.value,this.emit("os-pick",{value:t.value})}),typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(()=>this._placeThumb()),this._resizeObserver.observe(this))}disconnectedCallback(){this._resizeObserver?.disconnect(),this._resizeObserver=null}_placeThumb(){if(!this.shadowRoot?.querySelector(".os-segmented__thumb"))return;const t=this.value,o=Array.from(this.querySelectorAll(":scope > os-segment")).find(x=>x.getAttribute("value")===t);if(!o||this.offsetWidth===0){this.removeAttribute("data-thumb");return}const i=this.getBoundingClientRect(),n=i.width/this.offsetWidth,r=Math.abs(n-1)<.02?1:n;if(!(r>0))return;const d=o.getBoundingClientRect(),h=x=>`${Math.round(x*100)/100}px`;this.style.setProperty("--_thumb-x",h((d.left-i.left)/r)),this.style.setProperty("--_thumb-w",h(d.width/r)),this.setAttribute("data-thumb",""),this.hasAttribute("data-thumb-ready")||requestAnimationFrame(()=>this.setAttribute("data-thumb-ready",""))}set items(e){const t=this.querySelectorAll(":scope > os-segment");for(const n of Array.from(t))n.remove();for(const n of e){const r=document.createElement("os-segment");r.setAttribute("value",n.value),r.textContent=n.label,this.appendChild(r)}const o=this.value;!(o!==null&&e.some(n=>n.value===o))&&e.length>0?this.value=e[0].value:this.requestUpdate()}render(){const e=this.label||"";e&&this.setAttribute("aria-label",e),this.setAttribute("role","radiogroup");const t=this.value;return queueMicrotask(()=>{const o=this.querySelectorAll("os-segment");for(const i of Array.from(o)){const n=i.getAttribute("value");i.setAttribute("aria-checked",n===t?"true":"false")}this._placeThumb()}),v`<span class="os-segmented__thumb" aria-hidden="true"></span
210 - ><slot></slot>`}};pe.props=["value","label"],pe.styles=[to],pe.help={title:"Segmented",summary:"iOS-style segmented radio group. Pill-shaped bar of equal-width <os-segment> children where exactly one is active.",status:"stable",props:[{name:"value",type:"string",description:"Currently selected segment value. Mirrored onto child aria-checked."},{name:"label",type:"string",description:"aria-label for the radiogroup."}],slots:[{name:"(default)",description:'<os-segment value="…"> children.'}],events:[{name:"os-pick",description:"Fires when the selected segment changes.",detail:"{ value: string }"}],cssProps:[{name:"--os-window-bg",description:"Pill background."},{name:"--os-ui-fg",description:"Active label colour."},{name:"--os-ui-fg-muted",description:"Inactive label colour."}],example:v`
210 + `}_onPick(){this.emit("os-segment-pick",{value:this.value})}};he.props=["value"],he.styles=[oo],he.help=void 0;let He=he;D("os-segment",He);const pe=class pe extends R{constructor(){super(...arguments),this._resizeObserver=null}connectedCallback(){super.connectedCallback(),this.addEventListener("os-segment-pick",e=>{const t=e.detail;e.stopPropagation(),this.value=t.value,this.emit("os-pick",{value:t.value})}),typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(()=>this._placeThumb()),this._resizeObserver.observe(this))}disconnectedCallback(){this._resizeObserver?.disconnect(),this._resizeObserver=null}_placeThumb(){if(!this.shadowRoot?.querySelector(".os-segmented__thumb"))return;const t=this.value,o=Array.from(this.querySelectorAll(":scope > os-segment")).find(x=>x.getAttribute("value")===t);if(!o||this.offsetWidth===0){this.removeAttribute("data-thumb");return}const i=this.getBoundingClientRect(),n=i.width/this.offsetWidth,r=Math.abs(n-1)<.02?1:n;if(!(r>0))return;const d=o.getBoundingClientRect(),h=x=>`${Math.round(x*100)/100}px`;this.style.setProperty("--_thumb-x",h((d.left-i.left)/r)),this.style.setProperty("--_thumb-w",h(d.width/r)),this.setAttribute("data-thumb",""),this.hasAttribute("data-thumb-ready")||requestAnimationFrame(()=>this.setAttribute("data-thumb-ready",""))}set items(e){const t=this.querySelectorAll(":scope > os-segment");for(const n of Array.from(t))n.remove();for(const n of e){const r=document.createElement("os-segment");r.setAttribute("value",n.value),r.textContent=n.label,this.appendChild(r)}const o=this.value;!(o!==null&&e.some(n=>n.value===o))&&e.length>0?this.value=e[0].value:this.requestUpdate()}render(){const e=this.label||"";e&&this.setAttribute("aria-label",e),this.setAttribute("role","radiogroup");const t=this.value;return queueMicrotask(()=>{const o=this.querySelectorAll("os-segment");for(const i of Array.from(o)){const n=i.getAttribute("value");i.setAttribute("aria-checked",n===t?"true":"false")}this._placeThumb()}),g`<span class="os-segmented__thumb" aria-hidden="true"></span
211 + ><slot></slot>`}};pe.props=["value","label"],pe.styles=[to],pe.help={title:"Segmented",summary:"iOS-style segmented radio group. Pill-shaped bar of equal-width <os-segment> children where exactly one is active.",status:"stable",props:[{name:"value",type:"string",description:"Currently selected segment value. Mirrored onto child aria-checked."},{name:"label",type:"string",description:"aria-label for the radiogroup."}],slots:[{name:"(default)",description:'<os-segment value="…"> children.'}],events:[{name:"os-pick",description:"Fires when the selected segment changes.",detail:"{ value: string }"}],cssProps:[{name:"--os-window-bg",description:"Pill background."},{name:"--os-ui-fg",description:"Active label colour."},{name:"--os-ui-fg-muted",description:"Inactive label colour."}],example:g`
211 212 <os-segmented value="md" label="Dock size">
212 213 <os-segment value="sm">Small</os-segment>
213 214 <os-segment value="md">Medium</os-segment>
214 215 <os-segment value="lg">Large</os-segment>
215 216 </os-segmented>
216 - `};let He=pe;H("os-segmented",He);const at={close:{a:'fill="currentColor"',b:'<path d="m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z" />'},check:{a:'fill="currentColor"',b:'<path d="M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z" />'},"chevron-right":{a:'fill="currentColor"',b:'<path d="M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" />'},"arrow-up-right":{a:'fill="currentColor"',b:'<path d="M10 6H18V14H16.5V8.5L7 18L6 17L15.5 7.5H10V6Z" />'},plus:{a:'fill="currentColor"',b:'<path d="M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z" />'},search:{a:'fill="currentColor"',b:'<path d="M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z" />'},pin:{a:'fill="currentColor"',b:'<path d="m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z" />'},trash:{a:'fill="currentColor"',b:'<path fill-rule="evenodd" clip-rule="evenodd" d="M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z" />'},download:{a:'fill="currentColor"',b:'<path d="M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z" />'},settings:{a:'fill="currentColor"',b:'<path d="m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z" /><path d="m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z" />'},info:{a:'fill="currentColor"',b:'<path fill-rule="evenodd" clip-rule="evenodd" d="M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z" />'},bell:{a:'fill="currentColor"',b:'<path fill-rule="evenodd" clip-rule="evenodd" d="M17 11.5c0 1.353.17 2.368.976 3 .266.209.602.376 1.024.5v1H5v-1c.422-.124.757-.291 1.024-.5.806-.632.976-1.647.976-3V9c0-2.8 2.2-5 5-5s5 2.2 5 5v2.5ZM15.5 9v2.5c0 .93.066 1.98.515 2.897l.053.103H7.932a4.018 4.018 0 0 0 .053-.103c.449-.917.515-1.967.515-2.897V9c0-1.972 1.528-3.5 3.5-3.5s3.5 1.528 3.5 3.5Zm-5.492 9.008c0-.176.023-.346.065-.508h3.854A1.996 1.996 0 0 1 12 20c-1.1 0-1.992-.892-1.992-1.992Z" />'},more:{a:'fill="currentColor"',b:'<path d="M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z" />'},maximize:{a:'fill="currentColor"',b:'<path d="M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z" />'},edit:{a:'fill="currentColor"',b:'<path d="m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z" />'},color:{a:'fill="currentColor"',b:'<path d="M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z" />'},wallpaper:{a:'fill="currentColor"',b:'<path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z" />'},warning:{a:'fill="currentColor"',b:'<path fill-rule="evenodd" clip-rule="evenodd" d="M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 12v-1.5h1.5V16h-1.5Zm0-8v5h1.5V8h-1.5Z" />'},minimize:{a:'fill="currentColor"',b:'<path d="M5 11.25h14v1.5H5z" />'},window:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<rect x="4.125" y="5.4375" width="15.75" height="13.125" rx="1.75"/><path d="M4.125 9.8125h15.75"/><circle cx="7.275" cy="7.625" r="0.7438" fill="currentColor" stroke="none"/>'},windows:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<rect x="3.6875" y="8.5" width="11.375" height="10.0625" rx="1.75"/><path d="M3.6875 12h11.375"/><path d="M8.5 8.5V7.1875a1.75 1.75 0 0 1 1.75-1.75h7.875A1.75 1.75 0 0 1 19.875 7.1875v7a1.75 1.75 0 0 1-1.75 1.75h-3.0625"/>'},dock:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<rect x="3.25" y="8.5" width="17.5" height="7" rx="3.5"/><circle cx="7.625" cy="12" r="1.0062" fill="currentColor" stroke="none"/><circle cx="12" cy="12" r="1.0062" fill="currentColor" stroke="none"/><circle cx="16.375" cy="12" r="1.0062" fill="currentColor" stroke="none"/>'},spaces:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<rect x="3.6875" y="5.4375" width="7.4375" height="7.875" rx="1.75"/><rect x="12.875" y="5.4375" width="7.4375" height="7.875" rx="1.75"/><circle cx="9.375" cy="17.6875" r="0.7875" fill="currentColor" stroke="none"/><circle cx="12" cy="17.6875" r="0.7875" fill="currentColor" stroke="none"/><circle cx="14.625" cy="17.6875" r="0.7875" fill="currentColor" stroke="none"/>'},copilot:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<path d="M10 2.5Q10.9 8.5 17.5 10Q10.9 11.5 10 17.5Q9.1 11.5 2.5 10Q9.1 8.5 10 2.5Z" fill="currentColor" stroke="none"/><path d="M17.9 14Q18.35 17.1 21.5 17.6Q18.35 18.1 17.9 21.2Q17.45 18.1 14.3 17.6Q17.45 17.1 17.9 14Z" fill="currentColor" stroke="none"/>'},snap:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<rect x="3.6875" y="5.4375" width="16.625" height="13.125" rx="1.75"/><path d="M12 5.4375v13.125"/><path d="M12 12h8.3125"/>'},command:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<path d="M14.625 6.75v10.5a2.625 2.625 0 1 0 2.625-2.625H6.75a2.625 2.625 0 1 0 2.625 2.625V6.75a2.625 2.625 0 1 0-2.625 2.625h10.5a2.625 2.625 0 1 0-2.625-2.625"/>'},apps:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<rect x="4.125" y="4.125" width="6.5625" height="6.5625" rx="1.75"/><rect x="13.3125" y="4.125" width="6.5625" height="6.5625" rx="1.75"/><rect x="4.125" y="13.3125" width="6.5625" height="6.5625" rx="1.75"/><rect x="13.3125" y="13.3125" width="6.5625" height="6.5625" rx="1.75"/>'},widgets:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<rect x="3.6875" y="3.6875" width="9.625" height="9.625" rx="1.75"/><rect x="15.0625" y="3.6875" width="5.25" height="5.25" rx="1.75"/><rect x="15.0625" y="10.6875" width="5.25" height="9.625" rx="1.75"/><rect x="3.6875" y="15.0625" width="9.625" height="5.25" rx="1.75"/>'},user:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<circle cx="12" cy="8.9375" r="3.5"/><path d="M5.4375 19.4375a6.5625 6.5625 0 0 1 13.125 0"/>'},lock:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<rect x="5.4375" y="10.6875" width="13.125" height="8.75" rx="1.75"/><path d="M8.5 10.6875V8.0625a3.5 3.5 0 0 1 7 0v2.625"/>'}};function lt(s){return s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function so(s){return Object.prototype.hasOwnProperty.call(at,s)?at[s]:null}function io(s,e={}){const t=so(s);if(!t)return"";const{size:o=24,className:i,title:n,rotate:r}=e,d=['xmlns="http://www.w3.org/2000/svg"','viewBox="0 0 24 24"'];o!=null&&d.push(`width="${o}"`,`height="${o}"`),d.push(t.a),i&&d.push(`class="${lt(i)}"`),n?d.push('role="img"',`aria-label="${lt(n)}"`):d.push('aria-hidden="true"','focusable="false"');const h=r?`<g transform="rotate(${r} 12 12)">${t.b}</g>`:t.b;return`<svg ${d.join(" ")}>${h}</svg>`}function Ve(s,e={}){const t=io(s,e),o=document.createElement("div");o.innerHTML=t;const i=o.firstElementChild;return i instanceof SVGSVGElement?i:document.createElementNS("http://www.w3.org/2000/svg","svg")}const no=z` ${q}:host{display:inline-flex;max-width:100%;vertical-align:middle}:host( [ hidden ] ){display:none}.os-chip{display:inline-flex;align-items:center;gap:var( --os-ui-chip-gap,4px );padding:var( --os-ui-chip-padding,2px 8px );border-radius:var( --os-ui-chip-radius,999px );font-size:var( --os-ui-chip-font-size,12px );line-height:var( --os-ui-chip-line-height,1.6 );font-weight:var( --os-ui-chip-font-weight,500 );background:var( --os-ui-chip-bg,var( --os-ui-surface,#f0f0f1 ) );color:var( --os-ui-chip-fg,var( --os-ui-fg,#1d2327 ) );border:var( --os-ui-chip-border,1px solid transparent );max-width:100%;box-sizing:border-box;transition:background-color 0.12s ease,color 0.12s ease,border-color 0.12s ease,transform 0.12s ease,opacity 0.12s ease}:host( [ tone='accent' ] ) .os-chip{background:var( --os-ui-chip-bg,color-mix( in srgb,var( --wp-admin-theme-color,#2271b1 ) 14%,transparent ) );color:var( --os-ui-chip-fg,var( --wp-admin-theme-color,#2271b1 ) )}:host( [ tone='positive' ] ) .os-chip{background:var( --os-ui-chip-bg,rgba( 30,132,73,0.14 ) );color:var( --os-ui-chip-fg,var( --os-ui-success-fg,#1d6f42 ) )}:host( [ tone='warning' ] ) .os-chip{background:var( --os-ui-chip-bg,rgba( 217,119,6,0.18 ) );color:var( --os-ui-chip-fg,var( --os-ui-warning-fg,#8a4a06 ) )}:host( [ tone='danger' ] ) .os-chip{background:var( --os-ui-chip-bg,rgba( 214,54,56,0.14 ) );color:var( --os-ui-chip-fg,var( --os-ui-danger-hover,#a02622 ) )}:host( [ pending ] ) .os-chip{opacity:0.65;animation:os-chip-pulse 1.2s ease-in-out infinite}@keyframes os-chip-pulse{0%,100%{opacity:0.55}50%{opacity:0.95}}.os-chip__label{max-width:var( --os-ui-chip-label-max,220px );overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.os-chip__icon{display:inline-flex;align-items:center;flex-shrink:0}.os-chip__icon::slotted( * ){display:inline-flex}.os-chip__dismiss{appearance:none;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:16px;height:16px;margin-inline-start:2px;padding:0;border:0;border-radius:50%;background:transparent;color:inherit;cursor:pointer;opacity:0.55;transition:opacity 0.12s ease,background-color 0.12s ease}.os-chip__dismiss:hover,.os-chip__dismiss:focus-visible{opacity:1;background:var( --os-ui-hover,rgba( 0,0,0,0.12 ) );outline:none}.os-chip__dismiss:focus-visible{box-shadow:var( --_holo-focus )}.os-chip__dismiss[ disabled ]{opacity:0.35;cursor:not-allowed}.os-chip__dismiss svg{display:block;width:14px;height:14px}:host( [ disabled ] ) .os-chip{opacity:0.55;cursor:not-allowed}:host( [ size='compact' ] ) .os-chip{padding:var( --os-ui-chip-padding,1px 6px );font-size:var( --os-ui-chip-font-size,11px )}:host( [ selected ] ) .os-chip{position:relative;background:var( --os-ui-chip-bg,var( --os-ui-accent-soft,rgba( 34,113,177,0.14 ) ) );color:var( --os-ui-chip-fg,var( --os-ui-fg,#1d2327 ) )}:host( [ selected ] ) .os-chip::after{content:'';position:absolute;inset:0;border-radius:inherit;padding:1px;background-image:var( --_holo-edge );pointer-events:none;-webkit-mask:linear-gradient( #000 0 0 ) content-box,linear-gradient( #000 0 0 );-webkit-mask-composite:xor;mask:linear-gradient( #000 0 0 ) content-box,linear-gradient( #000 0 0 );mask-composite:exclude}`,be=class be extends R{constructor(){super(...arguments),this._onHostKeyDown=e=>{if(this.dismissible!==null&&(e.key==="Backspace"||e.key==="Delete")){if(e.preventDefault(),this.disabled!==null)return;const i=this.label??"";this.emit("os-chip-dismiss",{label:i})}}}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._onHostKeyDown)}disconnectedCallback(){this.removeEventListener("keydown",this._onHostKeyDown)}render(){const e=this.label??"",t=this.dismissible!==null,o=this.disabled!==null;return v`
217 + `};let De=pe;D("os-segmented",De);const at={close:{a:'fill="currentColor"',b:'<path d="m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z" />'},check:{a:'fill="currentColor"',b:'<path d="M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z" />'},"chevron-right":{a:'fill="currentColor"',b:'<path d="M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" />'},"arrow-up-right":{a:'fill="currentColor"',b:'<path d="M10 6H18V14H16.5V8.5L7 18L6 17L15.5 7.5H10V6Z" />'},plus:{a:'fill="currentColor"',b:'<path d="M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z" />'},search:{a:'fill="currentColor"',b:'<path d="M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z" />'},pin:{a:'fill="currentColor"',b:'<path d="m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z" />'},trash:{a:'fill="currentColor"',b:'<path fill-rule="evenodd" clip-rule="evenodd" d="M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z" />'},download:{a:'fill="currentColor"',b:'<path d="M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z" />'},settings:{a:'fill="currentColor"',b:'<path d="m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z" /><path d="m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z" />'},info:{a:'fill="currentColor"',b:'<path fill-rule="evenodd" clip-rule="evenodd" d="M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z" />'},bell:{a:'fill="currentColor"',b:'<path fill-rule="evenodd" clip-rule="evenodd" d="M17 11.5c0 1.353.17 2.368.976 3 .266.209.602.376 1.024.5v1H5v-1c.422-.124.757-.291 1.024-.5.806-.632.976-1.647.976-3V9c0-2.8 2.2-5 5-5s5 2.2 5 5v2.5ZM15.5 9v2.5c0 .93.066 1.98.515 2.897l.053.103H7.932a4.018 4.018 0 0 0 .053-.103c.449-.917.515-1.967.515-2.897V9c0-1.972 1.528-3.5 3.5-3.5s3.5 1.528 3.5 3.5Zm-5.492 9.008c0-.176.023-.346.065-.508h3.854A1.996 1.996 0 0 1 12 20c-1.1 0-1.992-.892-1.992-1.992Z" />'},more:{a:'fill="currentColor"',b:'<path d="M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z" />'},maximize:{a:'fill="currentColor"',b:'<path d="M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z" />'},edit:{a:'fill="currentColor"',b:'<path d="m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z" />'},color:{a:'fill="currentColor"',b:'<path d="M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z" />'},wallpaper:{a:'fill="currentColor"',b:'<path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z" />'},warning:{a:'fill="currentColor"',b:'<path fill-rule="evenodd" clip-rule="evenodd" d="M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 12v-1.5h1.5V16h-1.5Zm0-8v5h1.5V8h-1.5Z" />'},minimize:{a:'fill="currentColor"',b:'<path d="M5 11.25h14v1.5H5z" />'},window:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<rect x="4.125" y="5.4375" width="15.75" height="13.125" rx="1.75"/><path d="M4.125 9.8125h15.75"/><circle cx="7.275" cy="7.625" r="0.7438" fill="currentColor" stroke="none"/>'},windows:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<rect x="3.6875" y="8.5" width="11.375" height="10.0625" rx="1.75"/><path d="M3.6875 12h11.375"/><path d="M8.5 8.5V7.1875a1.75 1.75 0 0 1 1.75-1.75h7.875A1.75 1.75 0 0 1 19.875 7.1875v7a1.75 1.75 0 0 1-1.75 1.75h-3.0625"/>'},dock:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<rect x="3.25" y="8.5" width="17.5" height="7" rx="3.5"/><circle cx="7.625" cy="12" r="1.0062" fill="currentColor" stroke="none"/><circle cx="12" cy="12" r="1.0062" fill="currentColor" stroke="none"/><circle cx="16.375" cy="12" r="1.0062" fill="currentColor" stroke="none"/>'},spaces:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<rect x="3.6875" y="5.4375" width="7.4375" height="7.875" rx="1.75"/><rect x="12.875" y="5.4375" width="7.4375" height="7.875" rx="1.75"/><circle cx="9.375" cy="17.6875" r="0.7875" fill="currentColor" stroke="none"/><circle cx="12" cy="17.6875" r="0.7875" fill="currentColor" stroke="none"/><circle cx="14.625" cy="17.6875" r="0.7875" fill="currentColor" stroke="none"/>'},copilot:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<path d="M10 2.5Q10.9 8.5 17.5 10Q10.9 11.5 10 17.5Q9.1 11.5 2.5 10Q9.1 8.5 10 2.5Z" fill="currentColor" stroke="none"/><path d="M17.9 14Q18.35 17.1 21.5 17.6Q18.35 18.1 17.9 21.2Q17.45 18.1 14.3 17.6Q17.45 17.1 17.9 14Z" fill="currentColor" stroke="none"/>'},snap:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<rect x="3.6875" y="5.4375" width="16.625" height="13.125" rx="1.75"/><path d="M12 5.4375v13.125"/><path d="M12 12h8.3125"/>'},command:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<path d="M14.625 6.75v10.5a2.625 2.625 0 1 0 2.625-2.625H6.75a2.625 2.625 0 1 0 2.625 2.625V6.75a2.625 2.625 0 1 0-2.625 2.625h10.5a2.625 2.625 0 1 0-2.625-2.625"/>'},apps:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<rect x="4.125" y="4.125" width="6.5625" height="6.5625" rx="1.75"/><rect x="13.3125" y="4.125" width="6.5625" height="6.5625" rx="1.75"/><rect x="4.125" y="13.3125" width="6.5625" height="6.5625" rx="1.75"/><rect x="13.3125" y="13.3125" width="6.5625" height="6.5625" rx="1.75"/>'},widgets:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<rect x="3.6875" y="3.6875" width="9.625" height="9.625" rx="1.75"/><rect x="15.0625" y="3.6875" width="5.25" height="5.25" rx="1.75"/><rect x="15.0625" y="10.6875" width="5.25" height="9.625" rx="1.75"/><rect x="3.6875" y="15.0625" width="9.625" height="5.25" rx="1.75"/>'},user:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<circle cx="12" cy="8.9375" r="3.5"/><path d="M5.4375 19.4375a6.5625 6.5625 0 0 1 13.125 0"/>'},lock:{a:'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"',b:'<rect x="5.4375" y="10.6875" width="13.125" height="8.75" rx="1.75"/><path d="M8.5 10.6875V8.0625a3.5 3.5 0 0 1 7 0v2.625"/>'}};function lt(s){return s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function so(s){return Object.prototype.hasOwnProperty.call(at,s)?at[s]:null}function io(s,e={}){const t=so(s);if(!t)return"";const{size:o=24,className:i,title:n,rotate:r}=e,d=['xmlns="http://www.w3.org/2000/svg"','viewBox="0 0 24 24"'];o!=null&&d.push(`width="${o}"`,`height="${o}"`),d.push(t.a),i&&d.push(`class="${lt(i)}"`),n?d.push('role="img"',`aria-label="${lt(n)}"`):d.push('aria-hidden="true"','focusable="false"');const h=r?`<g transform="rotate(${r} 12 12)">${t.b}</g>`:t.b;return`<svg ${d.join(" ")}>${h}</svg>`}function Ve(s,e={}){const t=io(s,e),o=document.createElement("div");o.innerHTML=t;const i=o.firstElementChild;return i instanceof SVGSVGElement?i:document.createElementNS("http://www.w3.org/2000/svg","svg")}const no=z` ${q}:host{display:inline-flex;max-width:100%;vertical-align:middle}:host( [ hidden ] ){display:none}.os-chip{display:inline-flex;align-items:center;gap:var( --os-ui-chip-gap,4px );padding:var( --os-ui-chip-padding,2px 8px );border-radius:var( --os-ui-chip-radius,999px );font-size:var( --os-ui-chip-font-size,12px );line-height:var( --os-ui-chip-line-height,1.6 );font-weight:var( --os-ui-chip-font-weight,500 );background:var( --os-ui-chip-bg,var( --os-ui-surface,#f0f0f1 ) );color:var( --os-ui-chip-fg,var( --os-ui-fg,#1d2327 ) );border:var( --os-ui-chip-border,1px solid transparent );max-width:100%;box-sizing:border-box;transition:background-color 0.12s ease,color 0.12s ease,border-color 0.12s ease,transform 0.12s ease,opacity 0.12s ease}:host( [ tone='accent' ] ) .os-chip{background:var( --os-ui-chip-bg,color-mix( in srgb,var( --wp-admin-theme-color,#2271b1 ) 14%,transparent ) );color:var( --os-ui-chip-fg,var( --wp-admin-theme-color,#2271b1 ) )}:host( [ tone='positive' ] ) .os-chip{background:var( --os-ui-chip-bg,rgba( 30,132,73,0.14 ) );color:var( --os-ui-chip-fg,var( --os-ui-success-fg,#1d6f42 ) )}:host( [ tone='warning' ] ) .os-chip{background:var( --os-ui-chip-bg,rgba( 217,119,6,0.18 ) );color:var( --os-ui-chip-fg,var( --os-ui-warning-fg,#8a4a06 ) )}:host( [ tone='danger' ] ) .os-chip{background:var( --os-ui-chip-bg,rgba( 214,54,56,0.14 ) );color:var( --os-ui-chip-fg,var( --os-ui-danger-hover,#a02622 ) )}:host( [ pending ] ) .os-chip{opacity:0.65;animation:os-chip-pulse 1.2s ease-in-out infinite}@keyframes os-chip-pulse{0%,100%{opacity:0.55}50%{opacity:0.95}}.os-chip__label{max-width:var( --os-ui-chip-label-max,220px );overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.os-chip__icon{display:inline-flex;align-items:center;flex-shrink:0}.os-chip__icon::slotted( * ){display:inline-flex}.os-chip__dismiss{appearance:none;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:16px;height:16px;margin-inline-start:2px;padding:0;border:0;border-radius:50%;background:transparent;color:inherit;cursor:pointer;opacity:0.55;transition:opacity 0.12s ease,background-color 0.12s ease}.os-chip__dismiss:hover,.os-chip__dismiss:focus-visible{opacity:1;background:var( --os-ui-hover,rgba( 0,0,0,0.12 ) );outline:none}.os-chip__dismiss:focus-visible{box-shadow:var( --_holo-focus )}.os-chip__dismiss[ disabled ]{opacity:0.35;cursor:not-allowed}.os-chip__dismiss svg{display:block;width:14px;height:14px}:host( [ disabled ] ) .os-chip{opacity:0.55;cursor:not-allowed}:host( [ size='compact' ] ) .os-chip{padding:var( --os-ui-chip-padding,1px 6px );font-size:var( --os-ui-chip-font-size,11px )}:host( [ selected ] ) .os-chip{position:relative;background:var( --os-ui-chip-bg,var( --os-ui-accent-soft,rgba( 34,113,177,0.14 ) ) );color:var( --os-ui-chip-fg,var( --os-ui-fg,#1d2327 ) )}:host( [ selected ] ) .os-chip::after{content:'';position:absolute;inset:0;border-radius:inherit;padding:1px;background-image:var( --_holo-edge );pointer-events:none;-webkit-mask:linear-gradient( #000 0 0 ) content-box,linear-gradient( #000 0 0 );-webkit-mask-composite:xor;mask:linear-gradient( #000 0 0 ) content-box,linear-gradient( #000 0 0 );mask-composite:exclude}`,be=class be extends R{constructor(){super(...arguments),this._onHostKeyDown=e=>{if(this.dismissible!==null&&(e.key==="Backspace"||e.key==="Delete")){if(e.preventDefault(),this.disabled!==null)return;const i=this.label??"";this.emit("os-chip-dismiss",{label:i})}}}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._onHostKeyDown)}disconnectedCallback(){this.removeEventListener("keydown",this._onHostKeyDown)}render(){const e=this.label??"",t=this.dismissible!==null,o=this.disabled!==null;return g`
217 218 <span part="chip" class="os-chip">
218 219 <span class="os-chip__icon">
219 220 <slot name="icon"></slot>
220 221 </span>
221 222 <span class="os-chip__label">
222 - ${e===""?v`<slot></slot>`:e}
223 + ${e===""?g`<slot></slot>`:e}
223 224 </span>
224 - ${t?v`
225 + ${t?g`
225 226 <button
226 227 part="dismiss"
227 228 class="os-chip__dismiss"
228 229 type="button"
@@ -231,17 +232,17 @@
231 232 @click=${i=>this._onDismiss(i)}
232 233 >
233 234 ${Ve("close",{size:null})}
234 235 </button>
235 - `:v``}
236 + `:g``}
236 237 </span>
237 - `}_onDismiss(e){if(e.stopPropagation(),this.disabled!==null)return;const o=this.label??"";this.emit("os-chip-dismiss",{label:o})}};be.props=["label","tone","size","dismissible","disabled","pending","selected"],be.styles=[no],be.help=void 0;let je=be;H("os-chip",je);const ro=z`:host{display:inline-flex;align-items:center;justify-content:center;width:var( --os-ui-icon-size,16px );height:var( --os-ui-icon-size,16px );color:inherit;line-height:1}:host( [ hidden ] ){display:none}.os-icon__glyph{font-size:var( --os-ui-icon-size,16px );width:var( --os-ui-icon-size,16px );height:var( --os-ui-icon-size,16px );line-height:1;color:inherit;display:inline-flex;align-items:center;justify-content:center}.os-icon__glyph--char{font-family:dashicons;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;speak:none}.os-icon__glyph.dashicons{font-family:dashicons}`;let xe=null;function ao(s){let e=s.trim();if(e==="")return null;(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))&&(e=e.slice(1,-1));const t=e.match(/^\\([0-9a-f]{1,6})\s?$/i);return t?String.fromCodePoint(parseInt(t[1],16)):e||null}function ct(){const s=new Map;if(typeof document>"u")return s;const e=Array.from(document.styleSheets??[]);for(const t of e){let o=null;try{o=t.cssRules}catch{continue}if(o)for(const i of Array.from(o)){const n=i;if(!n||!n.selectorText)continue;const r=n.selectorText.match(/\.dashicons-([a-z0-9-]+)::?before/i);if(!r)continue;const d=n.style?.content;if(!d)continue;const h=ao(d);h&&s.set(r[1],h)}}return s}function lo(s){xe||(xe=ct());const e=s.startsWith("dashicons-")?s.slice(10):s;return xe.get(e)??null}function co(){xe=ct()}let dt=!1;function uo(){if(dt||typeof window>"u")return;dt=!0;const s=()=>{co()};document.readyState==="loading"&&document.addEventListener("DOMContentLoaded",s,{once:!0}),window.addEventListener("load",s,{once:!0})}uo();const fe=class fe extends R{render(){const e=this.name||"",t=e.startsWith("dashicons-")?e.slice(10):e,o=this.size;o&&/^\d+$/.test(o)&&this.style.setProperty("--os-ui-icon-size",`${o}px`);const i=lo(t);return i?v`<span
238 + `}_onDismiss(e){if(e.stopPropagation(),this.disabled!==null)return;const o=this.label??"";this.emit("os-chip-dismiss",{label:o})}};be.props=["label","tone","size","dismissible","disabled","pending","selected"],be.styles=[no],be.help=void 0;let je=be;D("os-chip",je);const ro=z`:host{display:inline-flex;align-items:center;justify-content:center;width:var( --os-ui-icon-size,16px );height:var( --os-ui-icon-size,16px );color:inherit;line-height:1}:host( [ hidden ] ){display:none}.os-icon__glyph{font-size:var( --os-ui-icon-size,16px );width:var( --os-ui-icon-size,16px );height:var( --os-ui-icon-size,16px );line-height:1;color:inherit;display:inline-flex;align-items:center;justify-content:center}.os-icon__glyph--char{font-family:dashicons;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;speak:none}.os-icon__glyph.dashicons{font-family:dashicons}`;let xe=null;function ao(s){let e=s.trim();if(e==="")return null;(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))&&(e=e.slice(1,-1));const t=e.match(/^\\([0-9a-f]{1,6})\s?$/i);return t?String.fromCodePoint(parseInt(t[1],16)):e||null}function ct(){const s=new Map;if(typeof document>"u")return s;const e=Array.from(document.styleSheets??[]);for(const t of e){let o=null;try{o=t.cssRules}catch{continue}if(o)for(const i of Array.from(o)){const n=i;if(!n||!n.selectorText)continue;const r=n.selectorText.match(/\.dashicons-([a-z0-9-]+)::?before/i);if(!r)continue;const d=n.style?.content;if(!d)continue;const h=ao(d);h&&s.set(r[1],h)}}return s}function lo(s){xe||(xe=ct());const e=s.startsWith("dashicons-")?s.slice(10):s;return xe.get(e)??null}function co(){xe=ct()}let dt=!1;function uo(){if(dt||typeof window>"u")return;dt=!0;const s=()=>{co()};document.readyState==="loading"&&document.addEventListener("DOMContentLoaded",s,{once:!0}),window.addEventListener("load",s,{once:!0})}uo();const fe=class fe extends R{render(){const e=this.name||"",t=e.startsWith("dashicons-")?e.slice(10):e,o=this.size;o&&/^\d+$/.test(o)&&this.style.setProperty("--os-ui-icon-size",`${o}px`);const i=lo(t);return i?g`<span
238 239 class="os-icon__glyph os-icon__glyph--char dashicons dashicons-${t}"
239 240 aria-hidden="true"
240 - >${i}</span>`:v`<span
241 + >${i}</span>`:g`<span
241 242 class="os-icon__glyph dashicons dashicons-${t}"
242 243 aria-hidden="true"
243 - ></span>`}};fe.props=["name","size"],fe.styles=[ro],fe.help=void 0;let qe=fe;H("os-icon",qe);const ho=z` ${q}:host{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var( --os-ui-fg-muted,#646970 )}label{display:inline-flex;align-items:center;gap:8px}input[ type='color' ]{width:28px;height:28px;padding:0;border:1px solid var( --os-ui-border,#c3c4c7 );border-radius:6px;background:transparent;cursor:pointer;transition:border-color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease}input[ type='color' ]:hover{border-color:var( --os-ui-border-strong,#8c8f94 )}input[ type='color' ]:focus-visible{outline:none;box-shadow:var( --_holo-focus )}:host( [ variant='block' ] ){display:flex;width:100%}:host( [ variant='block' ] ) label{display:flex;flex:1;align-items:center}:host( [ variant='block' ] ) input[ type='color' ]{flex:1;width:auto;height:32px}input[ type='color' ]::-webkit-color-swatch-wrapper{padding:2px}input[ type='color' ]::-webkit-color-swatch{border:none;border-radius:2px}`,ge=class ge extends R{open(){const e=()=>{const t=this.shadowRoot?.querySelector("input");if(!t)return!1;try{t.showPicker()}catch{t.click()}return!0};e()||queueMicrotask(()=>void e())}render(){const e=this.label||"",t=this.value||"#000000";return v`
244 + ></span>`}};fe.props=["name","size"],fe.styles=[ro],fe.help=void 0;let qe=fe;D("os-icon",qe);const ho=z` ${q}:host{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var( --os-ui-fg-muted,#646970 )}label{display:inline-flex;align-items:center;gap:8px}input[ type='color' ]{width:28px;height:28px;padding:0;border:1px solid var( --os-ui-border,#c3c4c7 );border-radius:6px;background:transparent;cursor:pointer;transition:border-color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease}input[ type='color' ]:hover{border-color:var( --os-ui-border-strong,#8c8f94 )}input[ type='color' ]:focus-visible{outline:none;box-shadow:var( --_holo-focus )}:host( [ variant='block' ] ){display:flex;width:100%}:host( [ variant='block' ] ) label{display:flex;flex:1;align-items:center}:host( [ variant='block' ] ) input[ type='color' ]{flex:1;width:auto;height:32px}input[ type='color' ]::-webkit-color-swatch-wrapper{padding:2px}input[ type='color' ]::-webkit-color-swatch{border:none;border-radius:2px}`,ge=class ge extends R{open(){const e=()=>{const t=this.shadowRoot?.querySelector("input");if(!t)return!1;try{t.showPicker()}catch{t.click()}return!0};e()||queueMicrotask(()=>void e())}render(){const e=this.label||"",t=this.value||"#000000";return g`
244 245 <label>
245 246 <span class="os-color-field__label">${e}</span>
246 247 <input
247 248 type="color"
@@ -248,13 +249,13 @@
248 249 .value=${t}
249 250 @input=${o=>this._onInput(o)}
250 251 />
251 252 </label>
252 - `}_onInput(e){const t=e.target;this.value=t.value,this.emit("os-color-change",{value:t.value})}};ge.props=["label","value","variant"],ge.styles=[ho],ge.help=void 0;let Ue=ge;H("os-color-field",Ue);const po=z` ${q}:host{display:flex;flex-direction:column;gap:8px;font-size:13px;color:var( --os-ui-fg,#1d2327 );min-width:0}:host( [ hidden ] ){display:none}.os-select__label{font-size:13px;line-height:1.5;color:var( --os-ui-fg-muted,#646970 )}.os-select__trigger{appearance:none;display:flex;align-items:center;gap:8px;width:100%;min-width:0;padding:8px 12px;background:var( --os-ui-hover,rgba( 0,0,0,0.05 ) );border:1px solid transparent;border-radius:8px;font:inherit;font-size:13px;line-height:1.5;color:var( --os-ui-fg,#1d2327 );text-align:start;cursor:pointer;transition:background-color var( --_holo-t ) ease,border-color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease}.os-select__trigger:hover:not(:disabled ){background:var( --os-ui-hover,rgba( 0,0,0,0.08 ) );border-color:var( --os-ui-border-strong,#8c8f94 )}.os-select__trigger:focus,.os-select__trigger:focus-visible{outline:none;border-color:var( --os-ui-accent,#2271b1 );box-shadow:var( --_holo-focus-field )}.os-select__trigger:disabled{opacity:0.5;cursor:not-allowed}:host( [ plain ] ){display:inline-flex;flex-direction:row;align-items:center}:host( [ plain ] ) .os-select__label{display:none}:host( [ plain ] ) .os-select__trigger{width:auto;padding:4px 6px;background:transparent;border-color:transparent;border-radius:6px}:host( [ plain ] ) .os-select__trigger:hover:not(:disabled ){background:var( --os-ui-hover,rgba( 0,0,0,0.05 ) );border-color:transparent}:host( [ plain ] ) .os-select__trigger:focus,:host( [ plain ] ) .os-select__trigger:focus-visible{border-color:var( --os-ui-accent,#2271b1 )}:host( [ plain ] ) .os-select__value{flex:0 1 auto}.os-select__value{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.os-select__value--placeholder{color:var( --os-ui-fg-muted,#646970 )}.os-select__chevron{flex:0 0 auto;pointer-events:none;color:var( --os-ui-fg-muted,#646970 )}.os-select__trigger:hover .os-select__chevron{color:var( --os-ui-fg,#1d2327 )}.os-select__trigger:focus .os-select__chevron,.os-select__trigger:focus-visible .os-select__chevron{color:var( --os-ui-accent,#2271b1 )}.os-select__popup{position:fixed;inset:auto;margin:0;max-height:min( 320px,60vh );overflow-y:auto;padding:4px;background:var( --os-ui-surface,#fff );border:1px solid var( --os-ui-border,#dcdcde );border-radius:8px;box-shadow:0 12px 32px rgba( 0,0,0,0.45 );color:var( --os-ui-fg,#1d2327 )}.os-select__popup:not( [ data-open ] ){display:none}.os-select__popup:popover-open{display:block}.os-select__popup[ data-open ]{position:absolute;top:calc( 100% + 4px );left:0;min-width:100%;z-index:1000}:host{position:relative}.os-select__option{display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:6px;font-size:13px;line-height:1.5;cursor:pointer;white-space:nowrap}.os-select__check{flex:0 0 auto;visibility:hidden}.os-select__option[ aria-selected='true' ] .os-select__check{visibility:visible}.os-select__option[ data-active ],.os-select__option:hover{background:var( --os-ui-accent,#2271b1 );color:var( --os-ui-accent-ink,var( --os-ui-fg-on-accent,#fff ) )}.os-select__option[ aria-disabled='true' ]{opacity:0.5;cursor:not-allowed}.os-select__option[ aria-disabled='true' ]:hover{background:transparent;color:inherit}@media ( prefers-reduced-motion:reduce ){.os-select__trigger{transition-duration:1ms}}`,bo=z`:host{display:none}`,ve=class ve extends R{render(){return v``}};ve.props=["value","disabled"],ve.styles=[bo],ve.help=void 0;let Ke=ve;H("os-option",Ke);const me=class me extends R{constructor(){super(...arguments),this._optionObserver=null,this._open=!1,this._activeIndex=-1,this._typed="",this._dismissedAt=0,this._typedTimer=null,this._onWindowScroll=e=>{const t=e.target,o=this._popup();o&&t instanceof Node&&(t===o||o.contains(t))||this._hide()},this._onWindowResize=()=>this._hide()}set items(e){const t=this.querySelectorAll(":scope > os-option");for(const n of Array.from(t))n.remove();for(const n of e){const r=document.createElement("os-option");r.setAttribute("value",n.value),r.textContent=n.label,this.appendChild(r)}const o=this.value;!(o!==null&&e.some(n=>n.value===o))&&e.length>0&&(this.value=e[0].value),this.requestUpdate()}connectedCallback(){super.connectedCallback(),Je(this),this._optionObserver=new MutationObserver(()=>this.requestUpdate()),this._optionObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value","disabled"],characterData:!0})}disconnectedCallback(){this._optionObserver?.disconnect(),this._optionObserver=null,this._teardownDismiss(),this._open=!1,this._typedTimer&&(clearTimeout(this._typedTimer),this._typedTimer=null)}render(){const e=this.label||"",t=this.value,o=this.placeholder||"",i=this.disabled!==null;e&&this.setAttribute("aria-label",e);const n=this.getAttribute("aria-label")||"",r=e||n||o,d=this._readOptions(),h=d.find(_=>_.value===t),x=h?h.label:o,w=this.id||"os-unnamed",C=`${w}__listbox`,I=`${w}__trigger`,b=this._open&&this._activeIndex>=0?`${w}__opt-${this._activeIndex}`:"";return v`
253 - ${e?v`<label
253 + `}_onInput(e){const t=e.target;this.value=t.value,this.emit("os-color-change",{value:t.value})}};ge.props=["name","label","value","variant"],ge.styles=[ho],ge.help=void 0;let Ue=ge;D("os-color-field",Ue);const po=z` ${q}:host{display:flex;flex-direction:column;gap:8px;font-size:13px;color:var( --os-ui-fg,#1d2327 );min-width:0}:host( [ hidden ] ){display:none}.os-select__label{font-size:13px;line-height:1.5;color:var( --os-ui-fg-muted,#646970 )}.os-select__trigger{appearance:none;display:flex;align-items:center;gap:8px;width:100%;min-width:0;padding:8px 12px;background:var( --os-ui-hover,rgba( 0,0,0,0.05 ) );border:1px solid transparent;border-radius:8px;font:inherit;font-size:13px;line-height:1.5;color:var( --os-ui-fg,#1d2327 );text-align:start;cursor:pointer;transition:background-color var( --_holo-t ) ease,border-color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease}.os-select__trigger:hover:not(:disabled ){background:var( --os-ui-hover,rgba( 0,0,0,0.08 ) );border-color:var( --os-ui-border-strong,#8c8f94 )}.os-select__trigger:focus,.os-select__trigger:focus-visible{outline:none;border-color:var( --os-ui-accent,#2271b1 );box-shadow:var( --_holo-focus-field )}.os-select__trigger:disabled{opacity:0.5;cursor:not-allowed}:host( [ plain ] ){display:inline-flex;flex-direction:row;align-items:center}:host( [ plain ] ) .os-select__label{display:none}:host( [ plain ] ) .os-select__trigger{width:auto;padding:4px 6px;background:transparent;border-color:transparent;border-radius:6px}:host( [ plain ] ) .os-select__trigger:hover:not(:disabled ){background:var( --os-ui-hover,rgba( 0,0,0,0.05 ) );border-color:transparent}:host( [ plain ] ) .os-select__trigger:focus,:host( [ plain ] ) .os-select__trigger:focus-visible{border-color:var( --os-ui-accent,#2271b1 )}:host( [ plain ] ) .os-select__value{flex:0 1 auto}.os-select__value{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.os-select__value--placeholder{color:var( --os-ui-fg-muted,#646970 )}.os-select__chevron{flex:0 0 auto;pointer-events:none;color:var( --os-ui-fg-muted,#646970 )}.os-select__trigger:hover .os-select__chevron{color:var( --os-ui-fg,#1d2327 )}.os-select__trigger:focus .os-select__chevron,.os-select__trigger:focus-visible .os-select__chevron{color:var( --os-ui-accent,#2271b1 )}.os-select__popup{position:fixed;inset:auto;margin:0;max-height:min( 320px,60vh );overflow-y:auto;padding:4px;background:var( --os-ui-surface,#fff );border:1px solid var( --os-ui-border,#dcdcde );border-radius:8px;box-shadow:0 12px 32px rgba( 0,0,0,0.45 );color:var( --os-ui-fg,#1d2327 )}.os-select__popup:not( [ data-open ] ){display:none}.os-select__popup:popover-open{display:block}.os-select__popup[ data-open ]{position:absolute;top:calc( 100% + 4px );left:0;min-width:100%;z-index:1000}:host{position:relative}.os-select__option{display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:6px;font-size:13px;line-height:1.5;cursor:pointer;white-space:nowrap}.os-select__check{flex:0 0 auto;visibility:hidden}.os-select__option[ aria-selected='true' ] .os-select__check{visibility:visible}.os-select__option[ data-active ],.os-select__option:hover{background:var( --os-ui-accent,#2271b1 );color:var( --os-ui-accent-ink,var( --os-ui-fg-on-accent,#fff ) )}.os-select__option[ aria-disabled='true' ]{opacity:0.5;cursor:not-allowed}.os-select__option[ aria-disabled='true' ]:hover{background:transparent;color:inherit}@media ( prefers-reduced-motion:reduce ){.os-select__trigger{transition-duration:1ms}}`,bo=z`:host{display:none}`,ve=class ve extends R{render(){return g``}};ve.props=["value","disabled"],ve.styles=[bo],ve.help=void 0;let Ke=ve;D("os-option",Ke);const me=class me extends R{constructor(){super(...arguments),this._optionObserver=null,this._open=!1,this._activeIndex=-1,this._typed="",this._dismissedAt=0,this._typedTimer=null,this._onWindowScroll=e=>{const t=e.target,o=this._popup();o&&t instanceof Node&&(t===o||o.contains(t))||this._hide()},this._onWindowResize=()=>this._hide()}set items(e){const t=this.querySelectorAll(":scope > os-option");for(const n of Array.from(t))n.remove();for(const n of e){const r=document.createElement("os-option");r.setAttribute("value",n.value),r.textContent=n.label,this.appendChild(r)}const o=this.value;!(o!==null&&e.some(n=>n.value===o))&&e.length>0&&(this.value=e[0].value),this.requestUpdate()}connectedCallback(){super.connectedCallback(),Je(this),this._optionObserver=new MutationObserver(()=>this.requestUpdate()),this._optionObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value","disabled"],characterData:!0})}disconnectedCallback(){this._optionObserver?.disconnect(),this._optionObserver=null,this._teardownDismiss(),this._open=!1,this._typedTimer&&(clearTimeout(this._typedTimer),this._typedTimer=null)}render(){const e=this.label||"",t=this.value,o=this.placeholder||"",i=this.disabled!==null;e&&this.setAttribute("aria-label",e);const n=this.getAttribute("aria-label")||"",r=e||n||o,d=this._readOptions(),h=d.find(_=>_.value===t),x=h?h.label:o,w=this.id||"os-unnamed",C=`${w}__listbox`,I=`${w}__trigger`,b=this._open&&this._activeIndex>=0?`${w}__opt-${this._activeIndex}`:"";return g`
254 + ${e?g`<label
254 255 class="os-select__label"
255 256 for=${I}
256 - >${e}</label>`:v``}
257 + >${e}</label>`:g``}
257 258 <button
258 259 type="button"
259 260 class="os-select__trigger"
260 261 id=${I}
@@ -281,9 +282,9 @@
281 282 popover="auto"
282 283 aria-label=${r}
283 284 @toggle=${_=>this._onPopoverToggle(_)}
284 285 >
285 - ${d.map((_,N)=>v`
286 + ${d.map((_,N)=>g`
286 287 <div
287 288 class="os-select__option"
288 289 id=${`${w}__opt-${N}`}
289 290 role="option"
@@ -300,11 +301,11 @@
300 301 >
301 302 </div>
302 303 `)}
303 304 </div>
304 - `}_readOptions(){const e=[],t=this.querySelectorAll(":scope > os-option");for(const o of Array.from(t)){const i=o.getAttribute("value");i!==null&&e.push({value:i,label:(o.textContent||i).trim(),disabled:o.hasAttribute("disabled")})}return e}_popup(){return this.shadowRoot?.querySelector(".os-select__popup")??null}_trigger(){return this.shadowRoot?.querySelector(".os-select__trigger")??null}_toggle(){if(this._open){this._hide();return}performance.now()-this._dismissedAt<250||this._show()}_show(){const e=this._popup(),t=this._trigger();if(!e||!t||this._open)return;this._open=!0;const o=this._readOptions(),i=this.value,n=o.findIndex(d=>d.value===i&&!d.disabled);this._activeIndex=n>=0?n:o.findIndex(d=>!d.disabled);const r=t.getBoundingClientRect();e.style.minWidth=`${r.width}px`,typeof e.showPopover=="function"?(e.style.left=`${r.left}px`,e.style.top=`${r.bottom+4}px`,e.showPopover(),r.bottom+4+e.offsetHeight>window.innerHeight-8&&(e.style.top=`${Math.max(8,r.top-4-e.offsetHeight)}px`)):e.setAttribute("data-open",""),window.addEventListener("scroll",this._onWindowScroll,{capture:!0,passive:!0}),window.addEventListener("resize",this._onWindowResize),this.requestUpdate(),this._scrollActiveIntoView()}_hide(){if(!this._open)return;this._open=!1;const e=this._popup();if(e){if(typeof e.hidePopover=="function")try{e.hidePopover()}catch{}e.removeAttribute("data-open")}this._teardownDismiss(),this.requestUpdate()}_teardownDismiss(){window.removeEventListener("scroll",this._onWindowScroll,{capture:!0}),window.removeEventListener("resize",this._onWindowResize)}_onPopoverToggle(e){e.newState==="closed"&&this._open&&(this._dismissedAt=performance.now(),this._open=!1,this._teardownDismiss(),this.requestUpdate())}_onOptionClick(e){e.disabled||this._commit(e.value)}_commit(e){this._hide(),this.value=e,this.emit("os-pick",{value:e})}_setActive(e){if(e===this._activeIndex)return;const t=this._readOptions();!t[e]||t[e].disabled||(this._activeIndex=e,this.requestUpdate())}_moveActive(e){const t=this._readOptions();let o=this._activeIndex;for(let i=0;i<t.length&&(o=Math.min(Math.max(o+e,0),t.length-1),!(!t[o]?.disabled||o===0||o===t.length-1));i++);o!==this._activeIndex&&t[o]&&!t[o].disabled&&(this._activeIndex=o,this.requestUpdate(),this._scrollActiveIntoView())}_scrollActiveIntoView(){queueMicrotask(()=>{this.shadowRoot?.querySelector(".os-select__option[data-active]")?.scrollIntoView?.({block:"nearest"})})}_typeAhead(e){this._typedTimer&&clearTimeout(this._typedTimer),this._typed+=e.toLowerCase(),this._typedTimer=setTimeout(()=>{this._typed=""},500);const o=this._readOptions().findIndex(i=>!i.disabled&&i.label.toLowerCase().startsWith(this._typed));o>=0&&(this._activeIndex=o,this.requestUpdate(),this._scrollActiveIntoView())}_onTriggerKeydown(e){const t=this._readOptions();if(t.length!==0){if(!this._open){if(["ArrowDown","ArrowUp","Enter"," ","Home","End"].includes(e.key)){if(e.preventDefault(),this._show(),e.key==="Home"&&(this._activeIndex=t.findIndex(o=>!o.disabled)),e.key==="End"){for(let o=t.length-1;o>=0;o--)if(!t[o].disabled){this._activeIndex=o;break}}this.requestUpdate()}else e.key.length===1&&e.key.trim()!==""&&(this._show(),this._typeAhead(e.key));return}switch(e.key){case"ArrowDown":e.preventDefault(),this._moveActive(1);break;case"ArrowUp":e.preventDefault(),this._moveActive(-1);break;case"Home":e.preventDefault(),this._activeIndex=t.findIndex(o=>!o.disabled),this.requestUpdate(),this._scrollActiveIntoView();break;case"End":e.preventDefault();for(let o=t.length-1;o>=0;o--)if(!t[o].disabled){this._activeIndex=o,this.requestUpdate(),this._scrollActiveIntoView();break}break;case"Enter":case" ":{e.preventDefault();const o=t[this._activeIndex];o&&!o.disabled&&this._commit(o.value);break}case"Tab":{const o=t[this._activeIndex];o&&!o.disabled?this._commit(o.value):this._hide();break}case"Escape":e.preventDefault(),this._hide();break;default:e.key.length===1&&e.key.trim()!==""&&this._typeAhead(e.key)}}}};me.props=["value","label","placeholder","disabled","name"],me.styles=[po],me.help={title:"Select",summary:"Dropdown picker: a combobox trigger plus a custom top-layer listbox, so the popup wears the station instead of the operating system. Mirrors the <os-segmented> contract (set value, listen for os-pick).",status:"stable",props:[{name:"value",type:"string",description:"Currently selected option value."},{name:"label",type:"string",description:"Visible label rendered above the trigger and used as the accessible name."},{name:"placeholder",type:"string",description:"Trigger text shown when no value is set."},{name:"disabled",type:"boolean attribute",description:"Disables the trigger and dims the chrome."},{name:"plain",type:"boolean attribute",description:"Drops the field chrome and shrinks to the value, for a picker that is a list row’s trailing control rather than a field of its own. The container already draws the box; use with no `label`."},{name:"name",type:"string",description:"Accepted for compatibility. Shadow-DOM controls never participated in light-DOM form submission, so nothing is lost by the native select being gone; read `value` off the host instead."}],slots:[{name:"(default)",description:'<os-option value="…"> children.'}],events:[{name:"os-pick",description:"Fires when the user picks a new option.",detail:"{ value: string }"}],cssProps:[{name:"--os-ui-fg",description:"Label + value colour."},{name:"--os-ui-fg-muted",description:"Placeholder + chevron colour."},{name:"--os-ui-accent",description:"Active option row + selected check."}],example:v`
305 + `}_readOptions(){const e=[],t=this.querySelectorAll(":scope > os-option");for(const o of Array.from(t)){const i=o.getAttribute("value");i!==null&&e.push({value:i,label:(o.textContent||i).trim(),disabled:o.hasAttribute("disabled")})}return e}_popup(){return this.shadowRoot?.querySelector(".os-select__popup")??null}_trigger(){return this.shadowRoot?.querySelector(".os-select__trigger")??null}_toggle(){if(this._open){this._hide();return}performance.now()-this._dismissedAt<250||this._show()}_show(){const e=this._popup(),t=this._trigger();if(!e||!t||this._open)return;this._open=!0;const o=this._readOptions(),i=this.value,n=o.findIndex(d=>d.value===i&&!d.disabled);this._activeIndex=n>=0?n:o.findIndex(d=>!d.disabled);const r=t.getBoundingClientRect();e.style.minWidth=`${r.width}px`,typeof e.showPopover=="function"?(e.style.left=`${r.left}px`,e.style.top=`${r.bottom+4}px`,e.showPopover(),r.bottom+4+e.offsetHeight>window.innerHeight-8&&(e.style.top=`${Math.max(8,r.top-4-e.offsetHeight)}px`)):e.setAttribute("data-open",""),window.addEventListener("scroll",this._onWindowScroll,{capture:!0,passive:!0}),window.addEventListener("resize",this._onWindowResize),this.requestUpdate(),this._scrollActiveIntoView()}_hide(){if(!this._open)return;this._open=!1;const e=this._popup();if(e){if(typeof e.hidePopover=="function")try{e.hidePopover()}catch{}e.removeAttribute("data-open")}this._teardownDismiss(),this.requestUpdate()}_teardownDismiss(){window.removeEventListener("scroll",this._onWindowScroll,{capture:!0}),window.removeEventListener("resize",this._onWindowResize)}_onPopoverToggle(e){e.newState==="closed"&&this._open&&(this._dismissedAt=performance.now(),this._open=!1,this._teardownDismiss(),this.requestUpdate())}_onOptionClick(e){e.disabled||this._commit(e.value)}_commit(e){this._hide(),this.value=e,this.emit("os-pick",{value:e})}_setActive(e){if(e===this._activeIndex)return;const t=this._readOptions();!t[e]||t[e].disabled||(this._activeIndex=e,this.requestUpdate())}_moveActive(e){const t=this._readOptions();let o=this._activeIndex;for(let i=0;i<t.length&&(o=Math.min(Math.max(o+e,0),t.length-1),!(!t[o]?.disabled||o===0||o===t.length-1));i++);o!==this._activeIndex&&t[o]&&!t[o].disabled&&(this._activeIndex=o,this.requestUpdate(),this._scrollActiveIntoView())}_scrollActiveIntoView(){queueMicrotask(()=>{this.shadowRoot?.querySelector(".os-select__option[data-active]")?.scrollIntoView?.({block:"nearest"})})}_typeAhead(e){this._typedTimer&&clearTimeout(this._typedTimer),this._typed+=e.toLowerCase(),this._typedTimer=setTimeout(()=>{this._typed=""},500);const o=this._readOptions().findIndex(i=>!i.disabled&&i.label.toLowerCase().startsWith(this._typed));o>=0&&(this._activeIndex=o,this.requestUpdate(),this._scrollActiveIntoView())}_onTriggerKeydown(e){const t=this._readOptions();if(t.length!==0){if(!this._open){if(["ArrowDown","ArrowUp","Enter"," ","Home","End"].includes(e.key)){if(e.preventDefault(),this._show(),e.key==="Home"&&(this._activeIndex=t.findIndex(o=>!o.disabled)),e.key==="End"){for(let o=t.length-1;o>=0;o--)if(!t[o].disabled){this._activeIndex=o;break}}this.requestUpdate()}else e.key.length===1&&e.key.trim()!==""&&(this._show(),this._typeAhead(e.key));return}switch(e.key){case"ArrowDown":e.preventDefault(),this._moveActive(1);break;case"ArrowUp":e.preventDefault(),this._moveActive(-1);break;case"Home":e.preventDefault(),this._activeIndex=t.findIndex(o=>!o.disabled),this.requestUpdate(),this._scrollActiveIntoView();break;case"End":e.preventDefault();for(let o=t.length-1;o>=0;o--)if(!t[o].disabled){this._activeIndex=o,this.requestUpdate(),this._scrollActiveIntoView();break}break;case"Enter":case" ":{e.preventDefault();const o=t[this._activeIndex];o&&!o.disabled&&this._commit(o.value);break}case"Tab":{const o=t[this._activeIndex];o&&!o.disabled?this._commit(o.value):this._hide();break}case"Escape":e.preventDefault(),this._hide();break;default:e.key.length===1&&e.key.trim()!==""&&this._typeAhead(e.key)}}}};me.props=["value","label","placeholder","disabled","name"],me.styles=[po],me.help={title:"Select",summary:"Dropdown picker: a combobox trigger plus a custom top-layer listbox, so the popup wears the station instead of the operating system. Mirrors the <os-segmented> contract (set value, listen for os-pick).",status:"stable",props:[{name:"value",type:"string",description:"Currently selected option value."},{name:"label",type:"string",description:"Visible label rendered above the trigger and used as the accessible name."},{name:"placeholder",type:"string",description:"Trigger text shown when no value is set."},{name:"disabled",type:"boolean attribute",description:"Disables the trigger and dims the chrome."},{name:"plain",type:"boolean attribute",description:"Drops the field chrome and shrinks to the value, for a picker that is a list row’s trailing control rather than a field of its own. The container already draws the box; use with no `label`."},{name:"name",type:"string",description:"Accepted for compatibility. Shadow-DOM controls never participated in light-DOM form submission, so nothing is lost by the native select being gone; read `value` off the host instead."}],slots:[{name:"(default)",description:'<os-option value="…"> children.'}],events:[{name:"os-pick",description:"Fires when the user picks a new option.",detail:"{ value: string }"}],cssProps:[{name:"--os-ui-fg",description:"Label + value colour."},{name:"--os-ui-fg-muted",description:"Placeholder + chevron colour."},{name:"--os-ui-accent",description:"Active option row + selected check."}],example:g`
305 306 <os-select value="eur" label="Currency">
306 307 <os-option value="eur">Euro</os-option>
307 308 <os-option value="usd">US Dollar</os-option>
308 309 <os-option value="jpy">Japanese Yen</os-option>
309 310 </os-select>
310 - `};let Be=me;H("os-select",Be);const fo="desktop-mode";function go(){return window.wp?.i18n}function l(s,e=fo){return go()?.__(s,e)??s}function vo(){const s=window.wp?.hooks;if(!s)throw new Error("[openstation] `window.wp.hooks` is not available. The plugin declares `wp-hooks` as a script dependency; if you are seeing this error, verify the enqueue order.");return s}function ut(s,e,...t){return vo().applyFilters(s,e,...t)}const ht={WALLPAPERS:"os.wallpapers",WALLPAPER_PREVIEW_PARAMS:"os.wallpaper.preview-params"};function mo(s,e){if(!s||typeof s!="object")return["def (not an object)"];const t=s,o=[];for(const i of e)i.valid(t)||o.push(`${i.field} (${i.message})`);return o}const pt="__openStationSharedStores";function wo(){const s=window;let e=s[pt];return e||(e=new Map,s[pt]=e),e}function bt(s,e){const t=wo();let o=t.get(s);o||(o={state:e(),listeners:new Set,rebuild:e},t.set(s,o));const i={get state(){return o.state},set state(n){o.state=n},getState(){return o.state},notify(){for(const n of Array.from(o.listeners))try{n(o.state)}catch(r){console.error(`[desktop-mode/shared-store:${s}] subscriber threw:`,r)}},subscribe(n){return o.listeners.add(n),()=>{o.listeners.delete(n)}},setState(n){const r=o.state;if(typeof r!="object"||r===null){console.warn(`[desktop-mode/shared-store:${s}] setState called on a primitive store; use the state setter instead.`);return}Object.assign(r,n),i.notify()},reset(){const n=o.rebuild(),r=o.state;if(typeof r=="object"&&r!==null&&typeof n=="object"&&n!==null){const d=r;for(const h of Object.keys(d))delete d[h];Object.assign(d,n)}else o.state=n;o.listeners.clear()}};return i}const ft=bt("desktop-mode/wallpaper-registry",()=>({seed:[],listeners:new Set})),_o=ft.state.seed;ft.state.listeners;function xo(){const s=_o.slice(),e=ut(ht.WALLPAPERS,s);return Array.isArray(e)?e.filter(yo):(typeof console<"u"&&console.warn("[openstation] `os.wallpapers` filter returned a non-array; falling back to seed list."),s)}function gt(s){return xo().find(e=>e.id===s)}const ko=[{field:"id",message:"missing or not a non-empty string",valid:s=>typeof s.id=="string"&&s.id!==""},{field:"label",message:"missing or not a non-empty string",valid:s=>typeof s.label=="string"&&s.label!==""},{field:"preview",message:"missing or not a non-empty string",valid:s=>typeof s.preview=="string"&&s.preview!==""},{field:"type",message:'must be "css" or "canvas"',valid:s=>s.type==="css"||s.type==="canvas"},{field:"value/resolveValue/mount",message:"css types need `value` or `resolveValue`; canvas types need `mount`",valid:s=>s.type==="css"?typeof s.value=="string"||typeof s.resolveValue=="function":s.type==="canvas"?typeof s.mount=="function":!0}];function yo(s){return mo(s,ko).length===0}const Ao=bt("desktop-mode/wallpaper-settings",()=>({values:{}}));function Co(s){return{...Ao.state.values[s]??{}}}function $o(s){return!!s&&typeof s=="object"&&typeof s.then=="function"}const Eo=4,vt=24,mt=4,zo=250,Lo="os-settings__wallpaper-live-preview";function To(s){const e=s.type==="canvas"?s.needs:void 0;if(!e||e.length===0)return Promise.resolve();const t=window.wp?.os;return t?.loadModules?t.loadModules(e):Promise.reject(new Error(`[openstation] Wallpaper "${s.id}" declares needs but wp.os.loadModules is unavailable.`))}function Io(){return window.openStationConfig?.pluginUrl??""}function So(){return typeof window.matchMedia=="function"&&window.matchMedia("( prefers-reduced-motion: reduce )").matches}function Mo(s){const e={...s.previewParams??{}},t=ut(ht.WALLPAPER_PREVIEW_PARAMS,e,s.id);return!t||typeof t!="object"?e:t}function Po(s){const e=new Map;let t=!1;const o=()=>{let a=0;return e.forEach($=>{($.teardown||$.mounting)&&a++}),a},i=a=>{a.remountTimer!==null&&(clearTimeout(a.remountTimer),a.remountTimer=null)},n=a=>{if(a.generation++,a.mounting=!1,i(a),a.teardown){const $=a.teardown;a.teardown=null;try{$()}catch(A){typeof console<"u"&&console.error(`[openstation] Wallpaper "${a.defId}" preview teardown threw:`,A)}}a.overlay.innerHTML=""},r=a=>{t||!a.visible||a.teardown||a.mounting||b&&(a.tile.clientWidth<vt||a.tile.clientHeight<vt)||d(a)},d=a=>{const $=gt(a.defId);if(!$?.renderPreview||o()>=Eo)return;const A=++a.generation;a.mounting=!0,a.mountWidth=a.tile.clientWidth,a.mountHeight=a.tile.clientHeight;const U={id:$.id,pluginUrl:Io(),prefersReducedMotion:So(),visible:!document.hidden,settings:Co($.id),params:Mo($),width:a.mountWidth,height:a.mountHeight},G=V=>{if(A!==a.generation||t){try{V()}catch{}return}a.mounting=!1,a.teardown=V,h(a)&&x(a)},B=V=>{A===a.generation&&(a.mounting=!1,a.overlay.innerHTML="",typeof console<"u"&&console.error(`[openstation] Wallpaper "${$.id}" renderPreview failed:`,V))};To($).then(()=>{if(A!==a.generation||t)return;let V;try{V=$.renderPreview(a.overlay,U)}catch(W){B(W);return}if($o(V)){V.then(G,B);return}G(V)},B)},h=a=>Math.abs(a.tile.clientWidth-a.mountWidth)>mt||Math.abs(a.tile.clientHeight-a.mountHeight)>mt,x=a=>{i(a),a.remountTimer=setTimeout(()=>{a.remountTimer=null,!(t||!a.teardown||!h(a))&&(n(a),r(a))},zo)},w=a=>{for(const $ of a){const A=e.get($.target);A&&(A.visible=$.isIntersecting,$.isIntersecting?r(A):n(A))}},C=typeof IntersectionObserver=="function"?new IntersectionObserver(w,{threshold:.1}):null,I=a=>{for(const $ of a){const A=e.get($.target);!A||t||(!A.teardown&&!A.mounting?r(A):A.teardown&&h(A)&&x(A))}},b=typeof ResizeObserver=="function"?new ResizeObserver(I):null,_=a=>{n(a),C?.unobserve(a.tile),b?.unobserve(a.tile),a.overlay.remove(),e.delete(a.tile)},N=()=>{if(t)return;const a=s.querySelectorAll("os-swatch[data-wallpaper-id]"),$=new Set;a.forEach(A=>{$.add(A);const U=A.dataset.wallpaperId??"",B=!!gt(U)?.renderPreview&&!!C,V=e.get(A);if(V&&(V.defId!==U||!B)&&_(V),!B||e.has(A))return;const W=document.createElement("div");W.className=Lo,W.setAttribute("aria-hidden","true"),A.appendChild(W),e.set(A,{tile:A,overlay:W,defId:U,generation:0,teardown:null,mounting:!1,visible:!1,mountWidth:0,mountHeight:0,remountTimer:null}),C.observe(A),b?.observe(A)}),e.forEach((A,U)=>{$.has(U)||_(A)})},P=()=>{t||(t=!0,e.forEach(a=>n(a)),e.clear(),C?.disconnect(),b?.disconnect(),document.removeEventListener("os-window-closed",D))},D=()=>{s.isConnected||P()};return document.addEventListener("os-window-closed",D),{sync:N,dispose:P}}const No=["free","cascade","tile","columns","focus"];function Ro(){return{preset:"",icon:"dashicons-desktop",color:"",apps:{mode:"all",ids:[]},widgets:{mode:"all",ids:[]},appearance:{},windows:[],layout:"free",provisioned:!0}}const M="os-workspace-wizard",ee="blank",Wo=[{id:"dashicons-desktop",label:"Desktop"},{id:"dashicons-cart",label:"Cart"},{id:"dashicons-welcome-learn-more",label:"Learning"},{id:"dashicons-edit-page",label:"Writing"},{id:"dashicons-admin-users",label:"People"},{id:"dashicons-chart-bar",label:"Analytics"},{id:"dashicons-admin-comments",label:"Conversations"},{id:"dashicons-megaphone",label:"Marketing"},{id:"dashicons-format-image",label:"Media"},{id:"dashicons-admin-tools",label:"Tools"},{id:"dashicons-portfolio",label:"Projects"},{id:"dashicons-groups",label:"Community"}],Do={start:()=>l("Start"),name:()=>l("Name"),apps:()=>l("Apps"),widgets:()=>l("Widgets"),look:()=>l("Look"),windows:()=>l("Windows")};function Ho(s){switch(s){case"cascade":return l("Cascade");case"tile":return l("Tile");case"columns":return l("Columns");case"focus":return l("Focus");case"free":default:return l("Free")}}function wt(s){switch(s){case"cascade":return l("Staggered, every window the same size.");case"tile":return l("A uniform grid covering the desk.");case"columns":return l("Full-height columns, side by side — for things you compare.");case"focus":return l("One window leading, the rest stacked in the margin — for the thing you are working on.");case"free":default:return l("Nothing is moved. Windows land where they land.")}}function Vo(s){return s.apps.mode==="all"&&(!s.widgets||s.widgets.mode==="all")&&Object.keys(s.appearance??{}).length===0&&s.windows.length===0&&s.layout==="free"&&s.icon==="dashicons-desktop"&&s.color===""}function _t(s){return{...s,apps:{...s.apps,ids:[...s.apps.ids]},widgets:{mode:s.widgets?.mode??"all",ids:[...s.widgets?.ids??[]]},appearance:{...s.appearance??{}},windows:s.windows.map(e=>({...e}))}}function u(s,e){const t=document.createElement(s);return e&&(t.className=e),t}function ke(s){const e=u("p",`${M}__hint`);return e.textContent=s,e}function X(s,e){const t=u("div",`${M}__field`),o=u("span",`${M}__label`);return o.textContent=s,t.appendChild(o),t.appendChild(e),t}function Q(s,e){const t=u("div",`${M}__heading`),o=u("h3",`${M}__title`);return o.textContent=s,t.appendChild(o),e&&t.appendChild(ke(e)),t}let Ze=null,Oe=null;function Y(){Oe?.(),Oe=null,Ze?.remove(),Ze=null}function jo(s){Y();const e=s.mode==="edit",t=e?["name","apps","widgets","look","windows"]:["start","name","apps","widgets","look","windows"];let o=s.label??"",i=_t(s.profile??Ro()),n=ee,r=e,d=0,h=null;const x=()=>{h?.dispose(),h=null},w=u("os-modal",M);w.setAttribute("size","lg"),w.setAttribute("title",l(e?"Edit workspace":"New desktop")),w.setAttribute("open","");const C=u("div",`${M}__body`);w.appendChild(C);const I=u("os-steps",`${M}__trail`);I.setAttribute("horizontal",""),C.appendChild(I);const b=u("div",`${M}__pane`);C.appendChild(b);const _=u("div",`${M}__footer`);_.slot="footer",w.appendChild(_);const N=()=>{const c=o.trim();if(!e&&!r&&n!==ee){s.onCreate?.({label:c,profile:null,preset:n}),Y();return}const g={label:c,profile:Vo(i)?null:i};e?s.onSave?.(g):s.onCreate?.(g),Y()},P=()=>{I.replaceChildren(),t.forEach((c,g)=>{const f=u("os-step");f.setAttribute("title",Do[c]()),g<d&&f.setAttribute("done",""),g===d&&f.setAttribute("current",""),g<d&&(f.setAttribute("interactive",""),f.addEventListener("os-step-click",()=>ye(g))),I.appendChild(f)})},D=()=>{b.appendChild(Q(l("What is this desktop for?")));const c=u("os-grid",`${M}__cards`);c.setAttribute("columns","2"),c.setAttribute("gap","10");const g=[],f=()=>{for(const m of g)m.node.toggleAttribute("selected",m.id===n)},L=(m,y,p,k)=>{const S=u("os-card",`${M}__card`);S.setAttribute("interactive",""),S.setAttribute("compact","");const E=u("div",`${M}__card-header`);E.slot="header";const T=u("os-icon",`${M}__card-icon`);T.setAttribute("name",y),T.setAttribute("size","22"),E.appendChild(T);const K=u("strong");K.textContent=p,E.appendChild(K),S.appendChild(E);const xt=u("div",`${M}__card-desc`);xt.textContent=k,S.appendChild(xt),S.addEventListener("os-card-click",()=>{if(n===m){N();return}n=m,f(),F()}),g.push({id:m,node:S}),c.appendChild(S)};L(ee,"dashicons-desktop",l("Blank desktop"),l("Just a new, empty desk. Turn it into a workspace later if you like."));for(const m of s.presets)L(m.id,m.icon,m.label,m.description);f(),b.appendChild(c)},a=()=>{b.appendChild(Q(l("Name it"),l("The name goes on its overview tile. The glyph and colour are how you tell it apart from the others at a glance.")));const c=u("os-text-field");c.setAttribute("label",l("Name")),c.setAttribute("value",o),c.setAttribute("placeholder",e?"":l("Leave empty to number it")),c.addEventListener("os-input-change",p=>{o=p.detail.value}),c.addEventListener("os-submit",()=>N()),b.appendChild(c);const g=u("os-swatch-grid",`${M}__icons`);g.setAttribute("label",l("Glyph")),g.setAttribute("mode","row");for(const p of Wo){const k=u("os-swatch",`${M}__icon-swatch`);k.setAttribute("value",p.id),k.setAttribute("label",p.label),k.setAttribute("size","small"),k.setAttribute("variant","accent"),k.setAttribute("preview","transparent"),i.icon===p.id&&k.setAttribute("selected","");const S=u("os-icon");S.setAttribute("name",p.id),S.setAttribute("size","16"),k.appendChild(S),k.addEventListener("os-pick",()=>{i.icon=p.id;for(const E of Array.from(g.children))E.toggleAttribute("selected",E.getAttribute("value")===p.id)}),g.appendChild(k)}b.appendChild(X(l("Glyph"),g));const f=u("os-swatch-grid",`${M}__colors`);f.setAttribute("label",l("Colour")),f.setAttribute("mode","row");const L=()=>{for(const p of Array.from(f.children))p.toggleAttribute("selected",p.getAttribute("value")===(i.color||"none"))},m=u("os-swatch");m.setAttribute("value","none"),m.setAttribute("label",l("No colour")),m.setAttribute("size","small"),m.setAttribute("variant","accent"),m.setAttribute("preview","transparent"),m.addEventListener("os-pick",()=>{i.color="",L()}),f.appendChild(m);for(const p of s.accents){const k=u("os-swatch");k.setAttribute("value",p.value),k.setAttribute("label",p.label),k.setAttribute("size","small"),k.setAttribute("variant","accent"),k.setAttribute("preview",p.value),k.addEventListener("os-pick",()=>{i.color=p.value,L()}),f.appendChild(k)}L(),b.appendChild(X(l("Colour"),f));const y=u("os-color-field");y.setAttribute("label",l("Or any colour")),y.setAttribute("value",i.color||"#f252fc"),y.addEventListener("os-color-change",p=>{i.color=p.detail.value,L()}),b.appendChild(y)},$=c=>{b.appendChild(Q(c.title,c.sub));const g=u("os-switch");g.setAttribute("label",c.switchLabel),c.isOn()&&g.setAttribute("checked",""),b.appendChild(g),b.appendChild(ke(c.note));const f=u("div",`${M}__list`),L=()=>{if(f.replaceChildren(),f.hidden=!c.isOn(),!!c.isOn())for(const m of c.rows){const y=u("os-checkbox");y.setAttribute("block",""),y.setAttribute("value",m.id),y.setAttribute("label",m.label),(m.forced||c.has(m.id))&&y.setAttribute("checked",""),m.forced?y.setAttribute("disabled",""):y.addEventListener("os-checkbox-change",p=>{c.toggle(m.id,p.detail.checked)}),f.appendChild(y)}};g.addEventListener("os-switch-change",m=>{c.setOn(m.detail.checked),L()}),L(),b.appendChild(f)},V={start:D,name:a,apps:()=>{$({title:l("Which apps show here?"),sub:l("Narrow the dock to the apps this desk is about. Everything else is still there — on your other desks, and the moment you leave this one."),switchLabel:l("Show only the apps I pick"),note:l("OpenStation’s own controls — Overview, System, Trash, Exit — always stay, so a desk can never be one you cannot leave."),isOn:()=>i.apps.mode==="only",setOn:c=>{i.apps.mode=c?"only":"all",c&&i.apps.ids.length===0&&(i.apps.ids=s.apps.filter(g=>g.kind!=="control"&&!g.locked).map(g=>g.id))},rows:s.apps.map(c=>({id:c.id,label:c.title,forced:c.kind==="control"||!!c.locked})),has:c=>i.apps.ids.includes(c),toggle:(c,g)=>{const f=i.apps.ids.filter(L=>L!==c);i.apps.ids=g?[...f,c]:f}})},widgets:()=>{if(s.widgets.length===0){b.appendChild(Q(l("Widgets"),l("No widgets are registered on this site yet.")));return}$({title:l("Which widgets sit on it?"),sub:l("A desk can carry its own widget column — drafts and a timer where you write, traffic where you sell."),switchLabel:l("Give this desk its own widgets"),note:l("Off, it shows the column you built. On, it shows exactly these — and yours comes back when you leave."),isOn:()=>i.widgets?.mode==="only",setOn:c=>{const g=c&&(i.widgets?.ids.length??0)===0?s.enabledWidgetIds.slice():i.widgets?.ids??[];i.widgets={mode:c?"only":"all",ids:g}},rows:s.widgets.map(c=>({id:c.id,label:c.label})),has:c=>!!i.widgets?.ids.includes(c),toggle:(c,g)=>{const f=(i.widgets?.ids??[]).filter(L=>L!==c);i.widgets={mode:"only",ids:g?[...f,c]:f}}})},look:()=>{b.appendChild(Q(l("How does it look?"),l("A desk can wear its own wallpaper, accent and dock. Your own settings come back the moment you leave it.")));const c=()=>Object.keys(i.appearance??{}).length>0,g=u("os-switch");g.setAttribute("label",l("Give this desk its own look")),c()&&g.setAttribute("checked",""),b.appendChild(g);const f=u("div",`${M}__pickers`),L=()=>{if(f.replaceChildren(),f.hidden=!c(),!c())return;const m=i.appearance??{},y=u("os-button");y.setAttribute("variant","ghost"),y.textContent=l("Use the look I have now"),y.addEventListener("click",()=>{i.appearance=s.captureAppearance(),L()}),f.appendChild(y);const p=u("os-swatch-grid",`${M}__wallpapers`);p.setAttribute("label",l("Wallpaper")),p.setAttribute("columns","6");for(const E of s.wallpapers){const T=u("os-swatch");T.setAttribute("value",E.id),T.setAttribute("label",E.label),T.setAttribute("variant","wallpaper"),T.setAttribute("preview",E.preview),T.dataset.wallpaperId=E.id,m.wallpaper===E.id&&T.setAttribute("selected","");const K=u("span",`${M}__swatch-label`);K.textContent=E.label,T.appendChild(K),T.addEventListener("os-pick",()=>{i.appearance={...i.appearance,wallpaper:E.id},L()}),p.appendChild(T)}f.appendChild(X(l("Wallpaper"),p)),h??(h=Po(f)),h.sync();const k=u("os-swatch-grid",`${M}__accents`);k.setAttribute("label",l("Accent")),k.setAttribute("mode","row");for(const E of s.accents){const T=u("os-swatch");T.setAttribute("value",E.id),T.setAttribute("label",E.label),T.setAttribute("size","small"),T.setAttribute("variant","accent"),T.setAttribute("preview",E.value),m.accent===E.id&&T.setAttribute("selected",""),T.addEventListener("os-pick",()=>{i.appearance={...i.appearance,accent:E.id},L()}),k.appendChild(T)}f.appendChild(X(l("Accent"),k));const S=u("os-segmented");S.setAttribute("label",l("Dock"));for(const[E,T]of[["static",l("Always visible")],["dynamic",l("Folds away until reached for")]]){const K=u("os-segment");K.setAttribute("value",E),K.textContent=T,S.appendChild(K)}S.setAttribute("value",String(m.dockBehavior??"static")),S.addEventListener("os-pick",E=>{i.appearance={...i.appearance,dockBehavior:E.detail.value}}),f.appendChild(X(l("Dock"),S))};g.addEventListener("os-switch-change",m=>{m.detail.checked?c()||(i.appearance=s.captureAppearance()):i.appearance={},L()}),L(),b.appendChild(f)},windows:()=>{b.appendChild(Q(l("What does it open with?"),l("The windows this desk opens the first time you enter it, and how they are arranged.")));const c=u("os-segmented");c.setAttribute("label",l("Arrangement"));for(const p of No){const k=u("os-segment");k.setAttribute("value",p),k.textContent=Ho(p),c.appendChild(k)}c.setAttribute("value",i.layout);const g=ke(wt(i.layout));c.addEventListener("os-pick",p=>{i.layout=p.detail.value,g.textContent=wt(i.layout)});const f=X(l("Arrangement"),c);f.appendChild(g),b.appendChild(f);const L=u("div",`${M}__chips`),m=()=>{if(L.replaceChildren(),i.windows.length===0){L.appendChild(ke(s.captureWindows?l("Nothing yet — add an app below, or capture the windows you have open."):l("Nothing yet — add an app below.")));return}i.windows.forEach((p,k)=>{const S=u("os-chip");S.setAttribute("label",p.title||p.match),S.setAttribute("dismissible",""),S.addEventListener("os-chip-dismiss",()=>{i.windows=i.windows.filter((E,T)=>T!==k),m()}),L.appendChild(S)})};m(),b.appendChild(X(l("Opens with"),L));const y=s.apps.filter(p=>p.url||p.windowId);if(y.length>0){const p=u("os-select");p.setAttribute("label",l("Add a window")),p.setAttribute("placeholder",l("Choose an app…"));for(const k of y){const S=u("os-option");S.setAttribute("value",k.id),S.textContent=k.title,p.appendChild(S)}p.addEventListener("os-pick",k=>{const S=k.detail.value,E=y.find(K=>K.id===S);if(!E)return;const T={match:E.id,title:E.title};E.url&&(T.url=E.url),i.windows=[...i.windows,T],i.provisioned=!1,m(),p.removeAttribute("value")}),b.appendChild(p)}if(s.captureWindows){const p=u("div",`${M}__actions`),k=u("os-button");k.setAttribute("variant","ghost"),k.textContent=l("Use the windows I have open now"),k.addEventListener("click",()=>{i.windows=s.captureWindows?.()??[],i.provisioned=!0,m()}),p.appendChild(k),b.appendChild(p)}}};let W=null;const F=()=>{_.replaceChildren();const g=t[d]==="start",f=d===t.length-1;if(e&&s.onDelete){const y=u("os-button");y.setAttribute("variant","danger"),y.textContent=l("Delete workspace"),y.addEventListener("click",()=>{s.onDelete?.(),Y()}),_.appendChild(y)}const L=u("span",`${M}__spacer`);_.appendChild(L);const m=u("os-button");if(m.setAttribute("variant","secondary"),m.textContent=l("Cancel"),m.addEventListener("click",Y),_.appendChild(m),d>0){const y=u("os-button");y.setAttribute("variant","secondary"),y.textContent=l("Back"),y.addEventListener("click",()=>ye(d-1)),_.appendChild(y)}if(!f){const y=u("os-button");y.setAttribute("variant","secondary"),y.textContent=l(g?"Customize":"Next"),y.addEventListener("click",()=>ye(d+1)),_.appendChild(y)}W=u("os-button"),W.setAttribute("variant","primary"),e?W.textContent=l("Save"):g&&n===ee?W.textContent=l("Create desktop"):g?W.textContent=l("Create from template"):W.textContent=l("Create workspace"),W.addEventListener("click",N),_.appendChild(W)},ye=c=>{if(t[d]==="start"&&c>0&&!r&&(r=!0,n!==ee)){const f=s.presets.find(L=>L.id===n);f&&(i=_t(s.resolvePreset(f)),o||(o=f.defaultLabel??f.label))}d=Math.max(0,Math.min(t.length-1,c)),x(),b.replaceChildren(),V[t[d]](),P(),F()};w.addEventListener("os-modal-cancel",Y),document.body.appendChild(w),Ze=w,Oe=x,ye(0),e||requestAnimationFrame(()=>(W?.shadowRoot?.querySelector("button")??W)?.focus())}window.openStationWorkspaceWizard={openWorkspaceWizard:jo,closeWorkspaceWizard:Y}})();
311 + `};let Be=me;D("os-select",Be);const fo="desktop-mode";function go(){return window.wp?.i18n}function l(s,e=fo){return go()?.__(s,e)??s}function vo(){const s=window.wp?.hooks;if(!s)throw new Error("[openstation] `window.wp.hooks` is not available. The plugin declares `wp-hooks` as a script dependency; if you are seeing this error, verify the enqueue order.");return s}function ut(s,e,...t){return vo().applyFilters(s,e,...t)}const ht={WALLPAPERS:"os.wallpapers",WALLPAPER_PREVIEW_PARAMS:"os.wallpaper.preview-params"};function mo(s,e){if(!s||typeof s!="object")return["def (not an object)"];const t=s,o=[];for(const i of e)i.valid(t)||o.push(`${i.field} (${i.message})`);return o}const pt="__openStationSharedStores";function wo(){const s=window;let e=s[pt];return e||(e=new Map,s[pt]=e),e}function bt(s,e){const t=wo();let o=t.get(s);o||(o={state:e(),listeners:new Set,rebuild:e},t.set(s,o));const i={get state(){return o.state},set state(n){o.state=n},getState(){return o.state},notify(){for(const n of Array.from(o.listeners))try{n(o.state)}catch(r){console.error(`[desktop-mode/shared-store:${s}] subscriber threw:`,r)}},subscribe(n){return o.listeners.add(n),()=>{o.listeners.delete(n)}},setState(n){const r=o.state;if(typeof r!="object"||r===null){console.warn(`[desktop-mode/shared-store:${s}] setState called on a primitive store; use the state setter instead.`);return}Object.assign(r,n),i.notify()},reset(){const n=o.rebuild(),r=o.state;if(typeof r=="object"&&r!==null&&typeof n=="object"&&n!==null){const d=r;for(const h of Object.keys(d))delete d[h];Object.assign(d,n)}else o.state=n;o.listeners.clear()}};return i}const ft=bt("desktop-mode/wallpaper-registry",()=>({seed:[],listeners:new Set})),_o=ft.state.seed;ft.state.listeners;function xo(){const s=_o.slice(),e=ut(ht.WALLPAPERS,s);return Array.isArray(e)?e.filter(yo):(typeof console<"u"&&console.warn("[openstation] `os.wallpapers` filter returned a non-array; falling back to seed list."),s)}function gt(s){return xo().find(e=>e.id===s)}const ko=[{field:"id",message:"missing or not a non-empty string",valid:s=>typeof s.id=="string"&&s.id!==""},{field:"label",message:"missing or not a non-empty string",valid:s=>typeof s.label=="string"&&s.label!==""},{field:"preview",message:"missing or not a non-empty string",valid:s=>typeof s.preview=="string"&&s.preview!==""},{field:"type",message:'must be "css" or "canvas"',valid:s=>s.type==="css"||s.type==="canvas"},{field:"value/resolveValue/mount",message:"css types need `value` or `resolveValue`; canvas types need `mount`",valid:s=>s.type==="css"?typeof s.value=="string"||typeof s.resolveValue=="function":s.type==="canvas"?typeof s.mount=="function":!0}];function yo(s){return mo(s,ko).length===0}const Ao=bt("desktop-mode/wallpaper-settings",()=>({values:{}}));function Co(s){return{...Ao.state.values[s]??{}}}function $o(s){return!!s&&typeof s=="object"&&typeof s.then=="function"}const Eo=4,vt=24,mt=4,zo=250,Lo="os-settings__wallpaper-live-preview";function To(s){const e=s.type==="canvas"?s.needs:void 0;if(!e||e.length===0)return Promise.resolve();const t=window.wp?.os;return t?.loadModules?t.loadModules(e):Promise.reject(new Error(`[openstation] Wallpaper "${s.id}" declares needs but wp.os.loadModules is unavailable.`))}function Io(){return window.openStationConfig?.pluginUrl??""}function Mo(){return typeof window.matchMedia=="function"&&window.matchMedia("( prefers-reduced-motion: reduce )").matches}function So(s){const e={...s.previewParams??{}},t=ut(ht.WALLPAPER_PREVIEW_PARAMS,e,s.id);return!t||typeof t!="object"?e:t}function Po(s){const e=new Map;let t=!1;const o=()=>{let a=0;return e.forEach($=>{($.teardown||$.mounting)&&a++}),a},i=a=>{a.remountTimer!==null&&(clearTimeout(a.remountTimer),a.remountTimer=null)},n=a=>{if(a.generation++,a.mounting=!1,i(a),a.teardown){const $=a.teardown;a.teardown=null;try{$()}catch(A){typeof console<"u"&&console.error(`[openstation] Wallpaper "${a.defId}" preview teardown threw:`,A)}}a.overlay.innerHTML=""},r=a=>{t||!a.visible||a.teardown||a.mounting||b&&(a.tile.clientWidth<vt||a.tile.clientHeight<vt)||d(a)},d=a=>{const $=gt(a.defId);if(!$?.renderPreview||o()>=Eo)return;const A=++a.generation;a.mounting=!0,a.mountWidth=a.tile.clientWidth,a.mountHeight=a.tile.clientHeight;const U={id:$.id,pluginUrl:Io(),prefersReducedMotion:Mo(),visible:!document.hidden,settings:Co($.id),params:So($),width:a.mountWidth,height:a.mountHeight},G=V=>{if(A!==a.generation||t){try{V()}catch{}return}a.mounting=!1,a.teardown=V,h(a)&&x(a)},B=V=>{A===a.generation&&(a.mounting=!1,a.overlay.innerHTML="",typeof console<"u"&&console.error(`[openstation] Wallpaper "${$.id}" renderPreview failed:`,V))};To($).then(()=>{if(A!==a.generation||t)return;let V;try{V=$.renderPreview(a.overlay,U)}catch(H){B(H);return}if($o(V)){V.then(G,B);return}G(V)},B)},h=a=>Math.abs(a.tile.clientWidth-a.mountWidth)>mt||Math.abs(a.tile.clientHeight-a.mountHeight)>mt,x=a=>{i(a),a.remountTimer=setTimeout(()=>{a.remountTimer=null,!(t||!a.teardown||!h(a))&&(n(a),r(a))},zo)},w=a=>{for(const $ of a){const A=e.get($.target);A&&(A.visible=$.isIntersecting,$.isIntersecting?r(A):n(A))}},C=typeof IntersectionObserver=="function"?new IntersectionObserver(w,{threshold:.1}):null,I=a=>{for(const $ of a){const A=e.get($.target);!A||t||(!A.teardown&&!A.mounting?r(A):A.teardown&&h(A)&&x(A))}},b=typeof ResizeObserver=="function"?new ResizeObserver(I):null,_=a=>{n(a),C?.unobserve(a.tile),b?.unobserve(a.tile),a.overlay.remove(),e.delete(a.tile)},N=()=>{if(t)return;const a=s.querySelectorAll("os-swatch[data-wallpaper-id]"),$=new Set;a.forEach(A=>{$.add(A);const U=A.dataset.wallpaperId??"",B=!!gt(U)?.renderPreview&&!!C,V=e.get(A);if(V&&(V.defId!==U||!B)&&_(V),!B||e.has(A))return;const H=document.createElement("div");H.className=Lo,H.setAttribute("aria-hidden","true"),A.appendChild(H),e.set(A,{tile:A,overlay:H,defId:U,generation:0,teardown:null,mounting:!1,visible:!1,mountWidth:0,mountHeight:0,remountTimer:null}),C.observe(A),b?.observe(A)}),e.forEach((A,U)=>{$.has(U)||_(A)})},P=()=>{t||(t=!0,e.forEach(a=>n(a)),e.clear(),C?.disconnect(),b?.disconnect(),document.removeEventListener("os-window-closed",W))},W=()=>{s.isConnected||P()};return document.addEventListener("os-window-closed",W),{sync:N,dispose:P}}const No=["free","cascade","tile","columns","focus"];function Ro(){return{preset:"",icon:"dashicons-desktop",color:"",apps:{mode:"all",ids:[]},widgets:{mode:"all",ids:[]},appearance:{},windows:[],layout:"free",provisioned:!0}}const S="os-workspace-wizard",ee="blank",Wo=[{id:"dashicons-desktop",label:"Desktop"},{id:"dashicons-cart",label:"Cart"},{id:"dashicons-welcome-learn-more",label:"Learning"},{id:"dashicons-edit-page",label:"Writing"},{id:"dashicons-admin-users",label:"People"},{id:"dashicons-chart-bar",label:"Analytics"},{id:"dashicons-admin-comments",label:"Conversations"},{id:"dashicons-megaphone",label:"Marketing"},{id:"dashicons-format-image",label:"Media"},{id:"dashicons-admin-tools",label:"Tools"},{id:"dashicons-portfolio",label:"Projects"},{id:"dashicons-groups",label:"Community"}],Ho={start:()=>l("Start"),name:()=>l("Name"),apps:()=>l("Apps"),widgets:()=>l("Widgets"),look:()=>l("Look"),windows:()=>l("Windows")};function Do(s){switch(s){case"cascade":return l("Cascade");case"tile":return l("Tile");case"columns":return l("Columns");case"focus":return l("Focus");case"free":default:return l("Free")}}function wt(s){switch(s){case"cascade":return l("Staggered, every window the same size.");case"tile":return l("A uniform grid covering the desk.");case"columns":return l("Full-height columns, side by side — for things you compare.");case"focus":return l("One window leading, the rest stacked in the margin — for the thing you are working on.");case"free":default:return l("Nothing is moved. Windows land where they land.")}}function Vo(s){return s.apps.mode==="all"&&(!s.widgets||s.widgets.mode==="all")&&Object.keys(s.appearance??{}).length===0&&s.windows.length===0&&s.layout==="free"&&s.icon==="dashicons-desktop"&&s.color===""}function _t(s){return{...s,apps:{...s.apps,ids:[...s.apps.ids]},widgets:{mode:s.widgets?.mode??"all",ids:[...s.widgets?.ids??[]]},appearance:{...s.appearance??{}},windows:s.windows.map(e=>({...e}))}}function u(s,e){const t=document.createElement(s);return e&&(t.className=e),t}function ke(s){const e=u("p",`${S}__hint`);return e.textContent=s,e}function X(s,e){const t=u("div",`${S}__field`),o=u("span",`${S}__label`);return o.textContent=s,t.appendChild(o),t.appendChild(e),t}function Q(s,e){const t=u("div",`${S}__heading`),o=u("h3",`${S}__title`);return o.textContent=s,t.appendChild(o),e&&t.appendChild(ke(e)),t}let Ze=null,Oe=null;function Y(){Oe?.(),Oe=null,Ze?.remove(),Ze=null}function jo(s){Y();const e=s.mode==="edit",t=e?["name","apps","widgets","look","windows"]:["start","name","apps","widgets","look","windows"];let o=s.label??"",i=_t(s.profile??Ro()),n=ee,r=e,d=0,h=null;const x=()=>{h?.dispose(),h=null},w=u("os-modal",S);w.setAttribute("size","lg"),w.setAttribute("title",l(e?"Edit workspace":"New workspace")),w.setAttribute("open","");const C=u("div",`${S}__body`);w.appendChild(C);const I=u("os-steps",`${S}__trail`);I.setAttribute("horizontal",""),C.appendChild(I);const b=u("div",`${S}__pane`);C.appendChild(b);const _=u("div",`${S}__footer`);_.slot="footer",w.appendChild(_);const N=()=>{const c=o.trim();if(!e&&!r&&n!==ee){s.onCreate?.({label:c,profile:null,preset:n}),Y();return}const v={label:c,profile:Vo(i)?null:i};e?s.onSave?.(v):s.onCreate?.(v),Y()},P=()=>{I.replaceChildren(),t.forEach((c,v)=>{const f=u("os-step");f.setAttribute("title",Ho[c]()),v<d&&f.setAttribute("done",""),v===d&&f.setAttribute("current",""),v!==d&&(f.setAttribute("interactive",""),f.addEventListener("os-step-click",()=>ye(v))),I.appendChild(f)})},W=()=>{b.appendChild(Q(l("What is this workspace for?")));const c=u("os-grid",`${S}__cards`);c.setAttribute("columns","2"),c.setAttribute("gap","10");const v=[],f=()=>{for(const m of v)m.node.toggleAttribute("selected",m.id===n)},L=(m,y,p,k)=>{const M=u("os-card",`${S}__card`);M.setAttribute("interactive",""),M.setAttribute("compact","");const E=u("div",`${S}__card-header`);E.slot="header";const T=u("os-icon",`${S}__card-icon`);T.setAttribute("name",y),T.setAttribute("size","22"),E.appendChild(T);const K=u("strong");K.textContent=p,E.appendChild(K),M.appendChild(E);const xt=u("div",`${S}__card-desc`);xt.textContent=k,M.appendChild(xt),M.addEventListener("os-card-click",()=>{if(n===m){N();return}n=m,f(),F()}),v.push({id:m,node:M}),c.appendChild(M)};L(ee,"dashicons-desktop",l("Blank workspace"),l("Just a new, empty desk. You can customize it later if you want."));for(const m of s.presets)L(m.id,m.icon,m.label,m.description);f(),b.appendChild(c)},a=()=>{b.appendChild(Q(l("Name it"),l("The name goes on its tile in Workspaces. The glyph and colour are how you tell it apart from the others at a glance.")));const c=u("os-text-field");c.setAttribute("label",l("Name")),c.setAttribute("value",o),c.setAttribute("placeholder",e?"":l("Leave empty to number it")),c.addEventListener("os-input-change",p=>{o=p.detail.value}),c.addEventListener("os-submit",()=>N()),b.appendChild(c);const v=u("os-swatch-grid",`${S}__icons`);v.setAttribute("label",l("Glyph")),v.setAttribute("mode","row");for(const p of Wo){const k=u("os-swatch",`${S}__icon-swatch`);k.setAttribute("value",p.id),k.setAttribute("label",p.label),k.setAttribute("size","small"),k.setAttribute("variant","accent"),k.setAttribute("preview","transparent"),i.icon===p.id&&k.setAttribute("selected","");const M=u("os-icon");M.setAttribute("name",p.id),M.setAttribute("size","16"),k.appendChild(M),k.addEventListener("os-pick",()=>{i.icon=p.id;for(const E of Array.from(v.children))E.toggleAttribute("selected",E.getAttribute("value")===p.id)}),v.appendChild(k)}b.appendChild(X(l("Glyph"),v));const f=u("os-swatch-grid",`${S}__colors`);f.setAttribute("label",l("Colour")),f.setAttribute("mode","row");const L=()=>{for(const p of Array.from(f.children))p.toggleAttribute("selected",p.getAttribute("value")===(i.color||"none"))},m=u("os-swatch");m.setAttribute("value","none"),m.setAttribute("label",l("No colour")),m.setAttribute("size","small"),m.setAttribute("variant","accent"),m.setAttribute("preview","transparent"),m.addEventListener("os-pick",()=>{i.color="",L()}),f.appendChild(m);for(const p of s.accents){const k=u("os-swatch");k.setAttribute("value",p.value),k.setAttribute("label",p.label),k.setAttribute("size","small"),k.setAttribute("variant","accent"),k.setAttribute("preview",p.value),k.addEventListener("os-pick",()=>{i.color=p.value,L()}),f.appendChild(k)}L(),b.appendChild(X(l("Colour"),f));const y=u("os-color-field");y.setAttribute("label",l("Or any colour")),y.setAttribute("value",i.color||"#f252fc"),y.addEventListener("os-color-change",p=>{i.color=p.detail.value,L()}),b.appendChild(y)},$=c=>{b.appendChild(Q(c.title,c.sub));const v=u("os-switch");v.setAttribute("label",c.switchLabel),c.isOn()&&v.setAttribute("checked",""),b.appendChild(v),b.appendChild(ke(c.note));const f=u("div",`${S}__list`),L=()=>{if(f.replaceChildren(),f.hidden=!c.isOn(),!!c.isOn())for(const m of c.rows){const y=u("os-checkbox");y.setAttribute("block",""),y.setAttribute("value",m.id),y.setAttribute("label",m.label),(m.forced||c.has(m.id))&&y.setAttribute("checked",""),m.forced?y.setAttribute("disabled",""):y.addEventListener("os-checkbox-change",p=>{c.toggle(m.id,p.detail.checked)}),f.appendChild(y)}};v.addEventListener("os-switch-change",m=>{c.setOn(m.detail.checked),L()}),L(),b.appendChild(f)},V={start:W,name:a,apps:()=>{$({title:l("Which apps show here?"),sub:l("Narrow the dock to the apps this desk is about. Everything else is still there — on your other desks, and the moment you leave this one."),switchLabel:l("Show only the apps I pick"),note:l("OpenStation’s own controls — Workspaces, System, Trash, Exit — always stay, so a desk can never be one you cannot leave."),isOn:()=>i.apps.mode==="only",setOn:c=>{i.apps.mode=c?"only":"all",c&&i.apps.ids.length===0&&(i.apps.ids=s.apps.filter(v=>v.kind!=="control"&&!v.locked).map(v=>v.id))},rows:s.apps.map(c=>({id:c.id,label:c.title,forced:c.kind==="control"||!!c.locked})),has:c=>i.apps.ids.includes(c),toggle:(c,v)=>{const f=i.apps.ids.filter(L=>L!==c);i.apps.ids=v?[...f,c]:f}})},widgets:()=>{if(s.widgets.length===0){b.appendChild(Q(l("Widgets"),l("No widgets are registered on this site yet.")));return}$({title:l("Which widgets sit on it?"),sub:l("A desk can carry its own widget column — drafts and a timer where you write, traffic where you sell."),switchLabel:l("Give this desk its own widgets"),note:l("Off, it shows the column you built. On, it shows exactly these — and yours comes back when you leave."),isOn:()=>i.widgets?.mode==="only",setOn:c=>{const v=c&&(i.widgets?.ids.length??0)===0?s.enabledWidgetIds.slice():i.widgets?.ids??[];i.widgets={mode:c?"only":"all",ids:v}},rows:s.widgets.map(c=>({id:c.id,label:c.label})),has:c=>!!i.widgets?.ids.includes(c),toggle:(c,v)=>{const f=(i.widgets?.ids??[]).filter(L=>L!==c);i.widgets={mode:"only",ids:v?[...f,c]:f}}})},look:()=>{b.appendChild(Q(l("How does it look?"),l("A desk can wear its own wallpaper, accent and dock. Your own settings come back the moment you leave it.")));const c=()=>Object.keys(i.appearance??{}).length>0,v=u("os-switch");v.setAttribute("label",l("Give this desk its own look")),c()&&v.setAttribute("checked",""),b.appendChild(v);const f=u("div",`${S}__pickers`),L=()=>{if(f.replaceChildren(),f.hidden=!c(),!c())return;const m=i.appearance??{},y=u("os-button");y.setAttribute("variant","ghost"),y.textContent=l("Use the look I have now"),y.addEventListener("click",()=>{i.appearance=s.captureAppearance(),L()}),f.appendChild(y);const p=u("os-swatch-grid",`${S}__wallpapers`);p.setAttribute("label",l("Wallpaper")),p.setAttribute("columns","6");for(const E of s.wallpapers){const T=u("os-swatch");T.setAttribute("value",E.id),T.setAttribute("label",E.label),T.setAttribute("variant","wallpaper"),T.setAttribute("preview",E.preview),T.dataset.wallpaperId=E.id,m.wallpaper===E.id&&T.setAttribute("selected","");const K=u("span",`${S}__swatch-label`);K.textContent=E.label,T.appendChild(K),T.addEventListener("os-pick",()=>{i.appearance={...i.appearance,wallpaper:E.id},L()}),p.appendChild(T)}f.appendChild(X(l("Wallpaper"),p)),h??(h=Po(f)),h.sync();const k=u("os-swatch-grid",`${S}__accents`);k.setAttribute("label",l("Accent")),k.setAttribute("mode","row");for(const E of s.accents){const T=u("os-swatch");T.setAttribute("value",E.id),T.setAttribute("label",E.label),T.setAttribute("size","small"),T.setAttribute("variant","accent"),T.setAttribute("preview",E.value),m.accent===E.id&&T.setAttribute("selected",""),T.addEventListener("os-pick",()=>{i.appearance={...i.appearance,accent:E.id},L()}),k.appendChild(T)}f.appendChild(X(l("Accent"),k));const M=u("os-segmented");M.setAttribute("label",l("Dock"));for(const[E,T]of[["static",l("Always visible")],["dynamic",l("Folds away until reached for")]]){const K=u("os-segment");K.setAttribute("value",E),K.textContent=T,M.appendChild(K)}M.setAttribute("value",String(m.dockBehavior??"static")),M.addEventListener("os-pick",E=>{i.appearance={...i.appearance,dockBehavior:E.detail.value}}),f.appendChild(X(l("Dock"),M))};v.addEventListener("os-switch-change",m=>{m.detail.checked?c()||(i.appearance=s.captureAppearance()):i.appearance={},L()}),L(),b.appendChild(f)},windows:()=>{b.appendChild(Q(l("What does it open with?"),l("The windows this desk opens the first time you enter it, and how they are arranged.")));const c=u("os-segmented");c.setAttribute("label",l("Arrangement"));for(const p of No){const k=u("os-segment");k.setAttribute("value",p),k.textContent=Do(p),c.appendChild(k)}c.setAttribute("value",i.layout);const v=ke(wt(i.layout));c.addEventListener("os-pick",p=>{i.layout=p.detail.value,v.textContent=wt(i.layout)});const f=X(l("Arrangement"),c);f.appendChild(v),b.appendChild(f);const L=u("div",`${S}__chips`),m=()=>{if(L.replaceChildren(),i.windows.length===0){L.appendChild(ke(s.captureWindows?l("Nothing yet — add an app below, or capture the windows you have open."):l("Nothing yet — add an app below.")));return}i.windows.forEach((p,k)=>{const M=u("os-chip");M.setAttribute("label",p.title||p.match),M.setAttribute("dismissible",""),M.addEventListener("os-chip-dismiss",()=>{i.windows=i.windows.filter((E,T)=>T!==k),m()}),L.appendChild(M)})};m(),b.appendChild(X(l("Opens with"),L));const y=s.apps.filter(p=>p.url||p.windowId);if(y.length>0){const p=u("os-select");p.setAttribute("label",l("Add a window")),p.setAttribute("placeholder",l("Choose an app…"));for(const k of y){const M=u("os-option");M.setAttribute("value",k.id),M.textContent=k.title,p.appendChild(M)}p.addEventListener("os-pick",k=>{const M=k.detail.value,E=y.find(K=>K.id===M);if(!E)return;const T={match:E.id,title:E.title};E.url&&(T.url=E.url),i.windows=[...i.windows,T],i.provisioned=!1,m(),p.removeAttribute("value")}),b.appendChild(p)}if(s.captureWindows){const p=u("div",`${S}__actions`),k=u("os-button");k.setAttribute("variant","ghost"),k.textContent=l("Use the windows I have open now"),k.addEventListener("click",()=>{i.windows=s.captureWindows?.()??[],i.provisioned=!0,m()}),p.appendChild(k),b.appendChild(p)}}};let H=null;const F=()=>{_.replaceChildren();const v=t[d]==="start",f=d===t.length-1;if(e&&s.onDelete){const y=u("os-button");y.setAttribute("variant","danger"),y.textContent=l("Delete workspace"),y.addEventListener("click",()=>{s.onDelete?.(),Y()}),_.appendChild(y)}const L=u("span",`${S}__spacer`);_.appendChild(L);const m=u("os-button");if(m.setAttribute("variant","secondary"),m.textContent=l("Cancel"),m.addEventListener("click",Y),_.appendChild(m),d>0){const y=u("os-button");y.setAttribute("variant","secondary"),y.textContent=l("Back"),y.addEventListener("click",()=>ye(d-1)),_.appendChild(y)}if(!f){const y=u("os-button");y.setAttribute("variant","secondary"),y.textContent=l(v?"Customize":"Next"),y.addEventListener("click",()=>ye(d+1)),_.appendChild(y)}H=u("os-button"),H.setAttribute("variant","primary"),e?H.textContent=l("Save"):v&&n!==ee?H.textContent=l("Create from template"):H.textContent=l("Create workspace"),H.addEventListener("click",N),_.appendChild(H)},ye=c=>{if(t[d]==="start"&&c>0&&!r&&(r=!0,n!==ee)){const f=s.presets.find(L=>L.id===n);f&&(i=_t(s.resolvePreset(f)),o||(o=f.defaultLabel??f.label))}d=Math.max(0,Math.min(t.length-1,c)),x(),b.replaceChildren(),V[t[d]](),P(),F()};w.addEventListener("os-modal-cancel",Y),document.body.appendChild(w),Ze=w,Oe=x,ye(0),e||requestAnimationFrame(()=>(H?.shadowRoot?.querySelector("button")??H)?.focus())}window.openStationWorkspaceWizard={openWorkspaceWizard:jo,closeWorkspaceWizard:Y}})();