| @@ -1,5 +1,5 @@ | ||
| 1 | -(function(){"use strict";function S(i,...e){return{__wpdHtml:!0,strings:i,values:e}}function ge(i){return!!i&&i.__wpdHtml===!0}const be="$$wpd$$",k=/\$\$wpd\$\$(\d+)\$\$/g,ve="$$wpd-node$$",_e=/^\$\$wpd-node\$\$(\d+)\$\$$/,ke=new Set(["style","script","textarea","title"]);function we(i){let e="",t=!1,o=null,s=!1,n=null,r="",a=!1;for(let u=0;u<i.length;u++){const c=i[u];e+=c;for(let p=0;p<c.length;p++){const f=c[p];if(s){c.startsWith("-->",p)&&(s=!1,p+=2);continue}if(n!==null){f==="<"&&c[p+1]==="/"&&c.slice(p+2,p+2+n.length).toLowerCase()===n&&(p+=1+n.length,n=null,t=!0,a=!1,r="");continue}if(o!==null){f===o&&(o=null);continue}if(t){f==='"'||f==="'"?(o=f,a=!1):f===">"?(t=!1,a=!1,ke.has(r)&&(n=r),r=""):a&&(/[a-zA-Z0-9-]/.test(f)?r+=f.toLowerCase():a=!1);continue}if(c.startsWith("<!--",p)){s=!0,p+=3;continue}const g=c[p+1]??"";f==="<"&&/[a-zA-Z/!]/.test(g)&&(t=!0,r="",a=/[a-zA-Z]/.test(g))}u<i.length-1&&(e+=t||s||n!==null?`${be}${u}$$`:`<!--${ve}${u}$$-->`)}return e}const Y=new WeakMap;function J(i){const e=Y.get(i);if(e)return e;const t=document.createElement("template");t.innerHTML=we(i);const o=[],s=(a,u)=>{if(a.nodeType===Node.ELEMENT_NODE){const f=a;for(const g of Array.from(f.attributes)){const _=g.name,h=g.value,x=_[0];if(k.test(h))if(k.lastIndex=0,x==="@"){const m=k.exec(h);k.lastIndex=0,o.push({path:u,kind:"event",name:_.slice(1),valueIndex:m?Number(m[1]):0}),f.removeAttribute(_)}else if(x==="."){const m=k.exec(h);k.lastIndex=0,o.push({path:u,kind:"prop",name:_.slice(1),valueIndex:m?Number(m[1]):0}),f.removeAttribute(_)}else if(x==="?"){const m=k.exec(h);k.lastIndex=0,o.push({path:u,kind:"bool",name:_.slice(1),valueIndex:m?Number(m[1]):0}),f.removeAttribute(_)}else{const m=[],l=[];let d=0,b;for(k.lastIndex=0;(b=k.exec(h))!==null;)m.push(h.slice(d,b.index)),l.push(Number(b[1])),d=b.index+b[0].length;m.push(h.slice(d)),o.push({path:u,kind:"attr",name:_,template:m,valueIndices:l}),f.setAttribute(_,"")}}}const c=Array.from(a.childNodes);let p=0;for(let f=0;f<c.length;f++){const g=c[f],_=f+p;if(g.nodeType===Node.COMMENT_NODE){const h=_e.exec(g.data);if(h){const x=document.createTextNode("");g.parentNode.replaceChild(x,g),o.push({path:[...u,_],kind:"node",valueIndex:Number(h[1])})}continue}if(g.nodeType===Node.TEXT_NODE){const h=g.textContent||"";if(!k.test(h)){k.lastIndex=0;continue}k.lastIndex=0;const x=g.parentNode;let m=0,l;const d=[],b=[];for(k.lastIndex=0;(l=k.exec(h))!==null;){l.index>m&&d.push(document.createTextNode(h.slice(m,l.index)));const T=document.createTextNode("");d.push(T),b.push({path:[...u,_+d.length-1],kind:"node",valueIndex:Number(l[1])}),m=l.index+l[0].length}m<h.length&&d.push(document.createTextNode(h.slice(m)));for(const T of d)x.insertBefore(T,g);x.removeChild(g),p+=d.length-1,o.push(...b)}else s(g,[...u,_])}};s(t.content,[]);const r={template:t,buildParts:a=>{const u=[];for(const c of o){let p=a;for(const f of c.path)p=p.childNodes[f];c.kind==="node"?u.push({kind:"node",valueIndex:c.valueIndex,child:{anchor:p,state:null}}):c.kind==="attr"?u.push({kind:"attr",element:p,name:c.name,template:c.template,valueIndices:c.valueIndices}):c.kind==="event"?u.push({kind:"event",valueIndex:c.valueIndex,element:p,name:c.name}):c.kind==="prop"?u.push({kind:"prop",valueIndex:c.valueIndex,element:p,name:c.name}):c.kind==="bool"&&u.push({kind:"bool",valueIndex:c.valueIndex,element:p,name:c.name})}return u}};return Y.set(i,r),r}const ee=new WeakMap;function xe(i,e){for(const t of i.nodes)if(t.parentNode!==e)return!1;return!0}function ye(i,e){const t=ee.get(e);if(t&&t.strings===i.strings&&xe(t,e)){W(t.parts,i.values);return}const o=J(i.strings),s=o.template.content.cloneNode(!0),n=o.buildParts(s),r=Array.from(s.childNodes);for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(s),W(n,i.values),ee.set(e,{strings:i.strings,parts:n,nodes:r})}function W(i,e){for(const t of i)if(t.kind==="node")D(t.child,e[t.valueIndex]);else if(t.kind==="attr"){let o=t.template[0];for(let s=0;s<t.valueIndices.length;s++)o+=te(e[t.valueIndices[s]]),o+=t.template[s+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 D(i,e){if(e==null||e===!1){i.state&&(I(i.state),i.state=null);return}if(Array.isArray(e)){Me(i,e);return}if(ge(e)){Ie(i,e);return}if(e instanceof Node){Ae(i,e);return}Ce(i,te(e))}function Ae(i,e){const t=i.state;t?.shape==="node"&&t.node===e||(t&&I(t),E(i,[e]),i.state={shape:"node",node:e})}function Ce(i,e){const t=i.state;if(t?.shape==="text"){t.text!==e&&(t.node.textContent=e,t.text=e);return}t&&I(t);const o=document.createTextNode(e);E(i,[o]),i.state={shape:"text",node:o,text:e}}function Ie(i,e){const t=i.state;if(t?.shape==="template"&&t.strings===e.strings){W(t.parts,e.values);return}t&&I(t);const o=J(e.strings),s=o.template.content.cloneNode(!0),n=o.buildParts(s),r=Array.from(s.childNodes);E(i,[s]),W(n,e.values),i.state={shape:"template",strings:e.strings,parts:n,nodes:r}}function Me(i,e){const t=i.state;if(t?.shape==="array"){const s=Math.min(t.entries.length,e.length);for(let n=0;n<s;n++)D(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&&I(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("");E(i,[r]);const a={anchor:r,state:null};D(a,e[n]),t.entries.push(a)}return}t&&I(t);const o=[];for(const s of e){const n=document.createTextNode("");E(i,[n]);const r={anchor:n,state:null};D(r,s),o.push(r)}i.state={shape:"array",entries:o}}function E(i,e){const t=i.anchor.parentNode;if(t)for(const o of e)t.insertBefore(o,i.anchor)}function I(i){if(i.shape==="text"){i.node.remove();return}if(i.shape==="template"){for(const e of i.parts)e.kind==="node"&&e.child.state&&(I(e.child.state),e.child.state=null);for(const e of i.nodes)e.parentNode&&e.parentNode.removeChild(e);return}if(i.shape==="node"){i.node.parentNode&&i.node.parentNode.removeChild(i.node);return}for(const e of i.entries)e.state&&I(e.state),e.anchor.remove()}function te(i){return i==null||i===!1?"":String(i)}const M=class M 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(oe)}connectedCallback(){this._adoptStyles(),this.requestUpdate()}attributeChangedCallback(e,t,o){if(t===o)return;const s=$e(e);this._propValues[s]=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(s=>String(s).trim()).filter(s=>s!=="");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=oe(t);Object.defineProperty(this,t,{get:()=>t in this._propValues?this._propValues[t]:this.getAttribute(o),set:s=>{let n;s==null||s===!1?n=null:s===!0?n="":n=String(s),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&&ye(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 s=document.createElement("style");s.textContent=o.cssText,this.shadowRoot.appendChild(s)}}}else this._adoptLightStyles(e)}_adoptLightStyles(e){if(!M._lightStylesAdopted.has(e)){M._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)}}}};M.props=[],M.styles=[],M.shadow=!0,M._lightStylesAdopted=new WeakSet;let L=M;function O(i,e){customElements.get(i)||customElements.define(i,e)}function oe(i){return i.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function $e(i){return i.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}const Se=(()=>{try{return typeof new CSSStyleSheet().replaceSync=="function"}catch{return!1}})();function w(i,...e){let t=i[0];for(let o=1;o<i.length;o++){const s=e[o-1];if(typeof s=="string"||typeof s=="number")t+=String(s);else if(s&&s.__wpdCss)t+=s.cssText;else throw new TypeError("[os-ui] css`` interpolations must be strings, numbers, or other css`` results. Got: "+typeof s);t+=i[o]}if(Se){const o=new CSSStyleSheet;return o.replaceSync(t),{__wpdCss:!0,sheet:o,cssText:t}}return{__wpdCss:!0,sheet:null,cssText:t}}function Te(i){const e=[],t=[];let o=null,s=i.parentElement;for(;s&&!(s===document.body||s===document.documentElement);){const r=s.id||"";if(r.startsWith("wp-window-")){o=r.slice(10);break}if(s.tagName.toLowerCase()==="os-tabpanel"){const a=s.getAttribute("for");a&&t.unshift(a)}s=s.parentElement}o&&e.push(U(o));for(const r of t)e.push("tab-"+U(r));const n=i.getAttribute("label");return n&&e.push(U(n)),e.length===0?"os-unnamed":"os-"+e.filter(r=>r!=="").join("-")}function U(i){return i.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function Ee(i){if(i.id)return i.id;const e=Te(i);return i.id=e,e}const ie={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 se(i){return i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function Le(i){return Object.prototype.hasOwnProperty.call(ie,i)?ie[i]:null}function Ne(i,e={}){const t=Le(i);if(!t)return"";const{size:o=24,className:s,title:n,rotate:r}=e,a=['xmlns="http://www.w3.org/2000/svg"','viewBox="0 0 24 24"'];o!=null&&a.push(`width="${o}"`,`height="${o}"`),a.push(t.a),s&&a.push(`class="${se(s)}"`),n?a.push('role="img"',`aria-label="${se(n)}"`):a.push('aria-hidden="true"','focusable="false"');const u=r?`<g transform="rotate(${r} 12 12)">${t.b}</g>`:t.b;return`<svg ${a.join(" ")}>${u}</svg>`}function ne(i,e={}){const t=Ne(i,e),o=document.createElement("div");o.innerHTML=t;const s=o.firstElementChild;return s instanceof SVGSVGElement?s:document.createElementNS("http://www.w3.org/2000/svg","svg")}const Z=w`: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 ) )}`,Re=w` .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%}}`,ze=w` .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%}}`,Ve=w` .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}}`,We=w` .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}}`,De=w` .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}}`,He=w` .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%}}`,Oe=w` .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}}`,Ue=w` 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}}`,re=w` 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-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-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-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}}`,Ze=w` @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}}`;w` ${Z} ${Re} ${ze} ${Ve} ${We} ${De} ${He} ${Oe} ${Ue} ${re} ${Ze} `;const qe=w` ${Z}: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-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}}`,Pe=w`:host{display:none}`,N=class N extends L{render(){return S``}};N.props=["value","disabled"],N.styles=[Pe],N.help=void 0;let q=N;O("os-option",q);const R=class R extends L{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(),Ee(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||"",s=this.disabled!==null;e&&this.setAttribute("aria-label",e);const n=this.getAttribute("aria-label")||"",r=e||n||o,a=this._readOptions(),u=a.find(h=>h.value===t),c=u?u.label:o,p=this.id||"os-unnamed",f=`${p}__listbox`,g=`${p}__trigger`,_=this._open&&this._activeIndex>=0?`${p}__opt-${this._activeIndex}`:"";return S` | |
| 1 | +(function(){"use strict";function S(i,...e){return{__wpdHtml:!0,strings:i,values:e}}function ge(i){return!!i&&i.__wpdHtml===!0}const be="$$wpd$$",k=/\$\$wpd\$\$(\d+)\$\$/g,ve="$$wpd-node$$",_e=/^\$\$wpd-node\$\$(\d+)\$\$$/,ke=new Set(["style","script","textarea","title"]);function we(i){let e="",t=!1,o=null,s=!1,n=null,r="",a=!1;for(let u=0;u<i.length;u++){const d=i[u];e+=d;for(let p=0;p<d.length;p++){const f=d[p];if(s){d.startsWith("-->",p)&&(s=!1,p+=2);continue}if(n!==null){f==="<"&&d[p+1]==="/"&&d.slice(p+2,p+2+n.length).toLowerCase()===n&&(p+=1+n.length,n=null,t=!0,a=!1,r="");continue}if(o!==null){f===o&&(o=null);continue}if(t){f==='"'||f==="'"?(o=f,a=!1):f===">"?(t=!1,a=!1,ke.has(r)&&(n=r),r=""):a&&(/[a-zA-Z0-9-]/.test(f)?r+=f.toLowerCase():a=!1);continue}if(d.startsWith("<!--",p)){s=!0,p+=3;continue}const g=d[p+1]??"";f==="<"&&/[a-zA-Z/!]/.test(g)&&(t=!0,r="",a=/[a-zA-Z]/.test(g))}u<i.length-1&&(e+=t||s||n!==null?`${be}${u}$$`:`<!--${ve}${u}$$-->`)}return e}const G=new WeakMap;function Y(i){const e=G.get(i);if(e)return e;const t=document.createElement("template");t.innerHTML=we(i);const o=[],s=(a,u)=>{if(a.nodeType===Node.ELEMENT_NODE){const f=a;for(const g of Array.from(f.attributes)){const _=g.name,h=g.value,x=_[0];if(k.test(h))if(k.lastIndex=0,x==="@"){const m=k.exec(h);k.lastIndex=0,o.push({path:u,kind:"event",name:_.slice(1),valueIndex:m?Number(m[1]):0}),f.removeAttribute(_)}else if(x==="."){const m=k.exec(h);k.lastIndex=0,o.push({path:u,kind:"prop",name:_.slice(1),valueIndex:m?Number(m[1]):0}),f.removeAttribute(_)}else if(x==="?"){const m=k.exec(h);k.lastIndex=0,o.push({path:u,kind:"bool",name:_.slice(1),valueIndex:m?Number(m[1]):0}),f.removeAttribute(_)}else{const m=[],l=[];let c=0,b;for(k.lastIndex=0;(b=k.exec(h))!==null;)m.push(h.slice(c,b.index)),l.push(Number(b[1])),c=b.index+b[0].length;m.push(h.slice(c)),o.push({path:u,kind:"attr",name:_,template:m,valueIndices:l}),f.setAttribute(_,"")}}}const d=Array.from(a.childNodes);let p=0;for(let f=0;f<d.length;f++){const g=d[f],_=f+p;if(g.nodeType===Node.COMMENT_NODE){const h=_e.exec(g.data);if(h){const x=document.createTextNode("");g.parentNode.replaceChild(x,g),o.push({path:[...u,_],kind:"node",valueIndex:Number(h[1])})}continue}if(g.nodeType===Node.TEXT_NODE){const h=g.textContent||"";if(!k.test(h)){k.lastIndex=0;continue}k.lastIndex=0;const x=g.parentNode;let m=0,l;const c=[],b=[];for(k.lastIndex=0;(l=k.exec(h))!==null;){l.index>m&&c.push(document.createTextNode(h.slice(m,l.index)));const T=document.createTextNode("");c.push(T),b.push({path:[...u,_+c.length-1],kind:"node",valueIndex:Number(l[1])}),m=l.index+l[0].length}m<h.length&&c.push(document.createTextNode(h.slice(m)));for(const T of c)x.insertBefore(T,g);x.removeChild(g),p+=c.length-1,o.push(...b)}else s(g,[...u,_])}};s(t.content,[]);const r={template:t,buildParts:a=>{const u=[];for(const d of o){let p=a;for(const f of d.path)p=p.childNodes[f];d.kind==="node"?u.push({kind:"node",valueIndex:d.valueIndex,child:{anchor:p,state:null}}):d.kind==="attr"?u.push({kind:"attr",element:p,name:d.name,template:d.template,valueIndices:d.valueIndices}):d.kind==="event"?u.push({kind:"event",valueIndex:d.valueIndex,element:p,name:d.name}):d.kind==="prop"?u.push({kind:"prop",valueIndex:d.valueIndex,element:p,name:d.name}):d.kind==="bool"&&u.push({kind:"bool",valueIndex:d.valueIndex,element:p,name:d.name})}return u}};return G.set(i,r),r}const J=new WeakMap;function xe(i,e){for(const t of i.nodes)if(t.parentNode!==e)return!1;return!0}function ye(i,e){const t=J.get(e);if(t&&t.strings===i.strings&&xe(t,e)){W(t.parts,i.values);return}const o=Y(i.strings),s=o.template.content.cloneNode(!0),n=o.buildParts(s),r=Array.from(s.childNodes);for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(s),W(n,i.values),J.set(e,{strings:i.strings,parts:n,nodes:r})}function W(i,e){for(const t of i)if(t.kind==="node")D(t.child,e[t.valueIndex]);else if(t.kind==="attr"){let o=t.template[0];for(let s=0;s<t.valueIndices.length;s++)o+=ee(e[t.valueIndices[s]]),o+=t.template[s+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 D(i,e){if(e==null||e===!1){i.state&&(I(i.state),i.state=null);return}if(Array.isArray(e)){Me(i,e);return}if(ge(e)){Ie(i,e);return}if(e instanceof Node){Ae(i,e);return}Ce(i,ee(e))}function Ae(i,e){const t=i.state;t?.shape==="node"&&t.node===e||(t&&I(t),E(i,[e]),i.state={shape:"node",node:e})}function Ce(i,e){const t=i.state;if(t?.shape==="text"){t.text!==e&&(t.node.textContent=e,t.text=e);return}t&&I(t);const o=document.createTextNode(e);E(i,[o]),i.state={shape:"text",node:o,text:e}}function Ie(i,e){const t=i.state;if(t?.shape==="template"&&t.strings===e.strings){W(t.parts,e.values);return}t&&I(t);const o=Y(e.strings),s=o.template.content.cloneNode(!0),n=o.buildParts(s),r=Array.from(s.childNodes);E(i,[s]),W(n,e.values),i.state={shape:"template",strings:e.strings,parts:n,nodes:r}}function Me(i,e){const t=i.state;if(t?.shape==="array"){const s=Math.min(t.entries.length,e.length);for(let n=0;n<s;n++)D(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&&I(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("");E(i,[r]);const a={anchor:r,state:null};D(a,e[n]),t.entries.push(a)}return}t&&I(t);const o=[];for(const s of e){const n=document.createTextNode("");E(i,[n]);const r={anchor:n,state:null};D(r,s),o.push(r)}i.state={shape:"array",entries:o}}function E(i,e){const t=i.anchor.parentNode;if(t)for(const o of e)t.insertBefore(o,i.anchor)}function I(i){if(i.shape==="text"){i.node.remove();return}if(i.shape==="template"){for(const e of i.parts)e.kind==="node"&&e.child.state&&(I(e.child.state),e.child.state=null);for(const e of i.nodes)e.parentNode&&e.parentNode.removeChild(e);return}if(i.shape==="node"){i.node.parentNode&&i.node.parentNode.removeChild(i.node);return}for(const e of i.entries)e.state&&I(e.state),e.anchor.remove()}function ee(i){return i==null||i===!1?"":String(i)}const M=class M 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(te)}connectedCallback(){this._adoptStyles(),this.requestUpdate()}attributeChangedCallback(e,t,o){if(t===o)return;const s=$e(e);this._propValues[s]=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(s=>String(s).trim()).filter(s=>s!=="");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=te(t);Object.defineProperty(this,t,{get:()=>t in this._propValues?this._propValues[t]:this.getAttribute(o),set:s=>{let n;s==null||s===!1?n=null:s===!0?n="":n=String(s),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&&ye(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 s=document.createElement("style");s.textContent=o.cssText,this.shadowRoot.appendChild(s)}}}else this._adoptLightStyles(e)}_adoptLightStyles(e){if(!M._lightStylesAdopted.has(e)){M._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)}}}};M.props=[],M.styles=[],M.shadow=!0,M._lightStylesAdopted=new WeakSet;let L=M;function O(i,e){customElements.get(i)||customElements.define(i,e)}function te(i){return i.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function $e(i){return i.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}const Se=(()=>{try{return typeof new CSSStyleSheet().replaceSync=="function"}catch{return!1}})();function w(i,...e){let t=i[0];for(let o=1;o<i.length;o++){const s=e[o-1];if(typeof s=="string"||typeof s=="number")t+=String(s);else if(s&&s.__wpdCss)t+=s.cssText;else throw new TypeError("[os-ui] css`` interpolations must be strings, numbers, or other css`` results. Got: "+typeof s);t+=i[o]}if(Se){const o=new CSSStyleSheet;return o.replaceSync(t),{__wpdCss:!0,sheet:o,cssText:t}}return{__wpdCss:!0,sheet:null,cssText:t}}function Te(i){const e=[],t=[];let o=null,s=i.parentElement;for(;s&&!(s===document.body||s===document.documentElement);){const r=s.id||"";if(r.startsWith("wp-window-")){o=r.slice(10);break}if(s.tagName.toLowerCase()==="os-tabpanel"){const a=s.getAttribute("for");a&&t.unshift(a)}s=s.parentElement}o&&e.push(U(o));for(const r of t)e.push("tab-"+U(r));const n=i.getAttribute("label");return n&&e.push(U(n)),e.length===0?"os-unnamed":"os-"+e.filter(r=>r!=="").join("-")}function U(i){return i.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function Ee(i){if(i.id)return i.id;const e=Te(i);return i.id=e,e}const oe={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 ie(i){return i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function Le(i){return Object.prototype.hasOwnProperty.call(oe,i)?oe[i]:null}function Ne(i,e={}){const t=Le(i);if(!t)return"";const{size:o=24,className:s,title:n,rotate:r}=e,a=['xmlns="http://www.w3.org/2000/svg"','viewBox="0 0 24 24"'];o!=null&&a.push(`width="${o}"`,`height="${o}"`),a.push(t.a),s&&a.push(`class="${ie(s)}"`),n?a.push('role="img"',`aria-label="${ie(n)}"`):a.push('aria-hidden="true"','focusable="false"');const u=r?`<g transform="rotate(${r} 12 12)">${t.b}</g>`:t.b;return`<svg ${a.join(" ")}>${u}</svg>`}function se(i,e={}){const t=Ne(i,e),o=document.createElement("div");o.innerHTML=t;const s=o.firstElementChild;return s instanceof SVGSVGElement?s:document.createElementNS("http://www.w3.org/2000/svg","svg")}const Z=w`: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 ) )}`,Re=w` .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%}}`,ze=w` .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%}}`,Ve=w` .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}}`,We=w` .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}}`,De=w` .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}}`,He=w` .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%}}`,Oe=w` .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}}`,Ue=w` 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}}`,ne=w` 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}}`,Ze=w` @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}}`;w` ${Z} ${Re} ${ze} ${Ve} ${We} ${De} ${He} ${Oe} ${Ue} ${ne} ${Ze} `;const qe=w` ${Z}: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}}`,Pe=w`:host{display:none}`,N=class N extends L{render(){return S``}};N.props=["value","disabled"],N.styles=[Pe],N.help=void 0;let q=N;O("os-option",q);const R=class R extends L{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(),Ee(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||"",s=this.disabled!==null;e&&this.setAttribute("aria-label",e);const n=this.getAttribute("aria-label")||"",r=e||n||o,a=this._readOptions(),u=a.find(h=>h.value===t),d=u?u.label:o,p=this.id||"os-unnamed",f=`${p}__listbox`,g=`${p}__trigger`,_=this._open&&this._activeIndex>=0?`${p}__opt-${this._activeIndex}`:"";return S` | |
| 2 | 2 | ${e?S`<label |
| 3 | 3 | class="os-select__label" |
| 4 | 4 | for=${g} |
| 5 | 5 | >${e}</label>`:S``} |
| @@ -18,11 +18,11 @@ | ||
| 18 | 18 | @keydown=${h=>this._onTriggerKeydown(h)} |
| 19 | 19 | > |
| 20 | 20 | <span |
| 21 | 21 | class="os-select__value${u?"":" os-select__value--placeholder"}" |
| 22 | - >${c}</span | |
| 22 | + >${d}</span | |
| 23 | 23 | > |
| 24 | - ${ne("chevron-right",{size:16,rotate:90,className:"os-select__chevron"})} | |
| 24 | + ${se("chevron-right",{size:16,rotate:90,className:"os-select__chevron"})} | |
| 25 | 25 | </button> |
| 26 | 26 | <div |
| 27 | 27 | class="os-select__popup" |
| 28 | 28 | id=${f} |
| @@ -42,9 +42,9 @@ | ||
| 42 | 42 | ?data-active=${this._open&&x===this._activeIndex} |
| 43 | 43 | @click=${()=>this._onOptionClick(h)} |
| 44 | 44 | @pointermove=${()=>this._setActive(x)} |
| 45 | 45 | > |
| 46 | - ${ne("check",{size:16,className:"os-select__check"})} | |
| 46 | + ${se("check",{size:16,className:"os-select__check"})} | |
| 47 | 47 | <span class="os-select__option-label" |
| 48 | 48 | >${h.label}</span |
| 49 | 49 | > |
| 50 | 50 | </div> |
| @@ -55,9 +55,9 @@ | ||
| 55 | 55 | <os-option value="eur">Euro</os-option> |
| 56 | 56 | <os-option value="usd">US Dollar</os-option> |
| 57 | 57 | <os-option value="jpy">Japanese Yen</os-option> |
| 58 | 58 | </os-select> |
| 59 | - `};let P=R;O("os-select",P);const je=w` ${Z} ${re}:host{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var( --os-ui-fg,#1d2327 );cursor:pointer;-webkit-user-select:none;user-select:none}label{display:inline-flex;align-items:center;gap:8px;cursor:pointer}:host( [ disabled ] ){opacity:0.5;cursor:not-allowed}:host( [ disabled ] ) label,:host( [ disabled ] ) input[ type='checkbox' ]{cursor:not-allowed}`,z=class z extends L{render(){const e=this.label||"",t=this.checked!==null,o=this.disabled!==null;return S` | |
| 59 | + `};let P=R;O("os-select",P);const je=w` ${Z} ${ne}:host{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var( --os-ui-fg,#1d2327 );cursor:pointer;-webkit-user-select:none;user-select:none}label{display:inline-flex;align-items:center;gap:8px;cursor:pointer}:host( [ disabled ] ){opacity:0.5;cursor:not-allowed}:host( [ disabled ] ) label,:host( [ disabled ] ) input[ type='checkbox' ]{cursor:not-allowed}`,z=class z extends L{render(){const e=this.label||"",t=this.checked!==null,o=this.disabled!==null;return S` | |
| 60 | 60 | <label> |
| 61 | 61 | <input |
| 62 | 62 | type="checkbox" |
| 63 | 63 | ?checked=${t} |
| @@ -65,5 +65,5 @@ | ||
| 65 | 65 | @change=${s=>this._onChange(s)} |
| 66 | 66 | /> |
| 67 | 67 | <span class="os-checkbox-label__text">${e}</span> |
| 68 | 68 | </label> |
| 69 | - `}_onChange(e){if(this.disabled!==null)return;const t=e.target.checked;t?this.setAttribute("checked",""):this.removeAttribute("checked"),this.emit("os-checkbox-change",{checked:t})}};z.props=["label","checked","disabled"],z.styles=[je],z.help=void 0;let j=z;O("os-checkbox-label",j);const Fe="desktop-mode";function ae(){return window.wp?.i18n}function v(i,e=Fe){return ae()?.__(i,e)??i}function F(i,...e){const t=ae()?.sprintf;if(t)return t(i,...e);let o=0;return i.replace(/%(?:(\d+)\$)?[sd]/g,(s,n)=>{const r=n?Number.parseInt(n,10)-1:o++;return String(e[r]??"")})}function B(){return window.wp?.os}function Be(){try{return B()?.windowManager?.getAll()??[]}catch{return[]}}function le(i){try{return B()?.windowManager?.getById(i)}catch{return}}function Ke(i){const e=le(i);return!e||typeof e.shake!="function"?!1:(e.shake(),!0)}function Xe(i){B()?.showToast?.({message:i})}class Qe{constructor(){this.ctx=null,this.loop=null}prime(){if(!this.ctx){const e=window.AudioContext||window.webkitAudioContext;e&&(this.ctx=new e)}this.ctx?.resume?.()}chime(){const e=this.ctx;if(!e)return;const t=e.currentTime;[880,1108.73,1318.51].forEach((o,s)=>{const n=e.createOscillator(),r=e.createGain();n.type="sine",n.frequency.value=o;const a=t+s*.16;r.gain.setValueAtTime(1e-4,a),r.gain.exponentialRampToValueAtTime(.22,a+.02),r.gain.exponentialRampToValueAtTime(1e-4,a+.22),n.connect(r).connect(e.destination),n.start(a),n.stop(a+.24)})}start(){this.loop===null&&(this.prime(),this.chime(),this.loop=setInterval(()=>this.chime(),1600))}stop(){this.loop!==null&&(clearInterval(this.loop),this.loop=null)}isRinging(){return this.loop!==null}}const de="state",H=25*60*1e3,ce=60*1e3,Ge=180*60*1e3,Ye=250,Je=700;class et{constructor(){this.phase="idle",this.endAt=null,this.remainingMs=H,this.durationMs=H,this.linkedWindowId=null,this.showRemaining=!0,this.tick=null,this.shaker=null,this.alarm=new Qe,this.subs=new Set,this.storage=null,this.hydrated=!1,this.windowListenerInstalled=!1,this.installWindowListener()}installWindowListener(){this.windowListenerInstalled||(this.windowListenerInstalled=!0,window.addEventListener("os-window-closed",e=>{const t=e.detail?.windowId;!t||t!==this.linkedWindowId||this.onLinkedWindowClosed()}))}onLinkedWindowClosed(){const e=this.phase==="running"||this.phase==="paused";this.linkedWindowId=null,e?(this.reset(),Xe(v("Focus timer cancelled — the linked window was closed.","desktop-mode"))):(this.persist(),this.notify())}attachStorage(e){if(this.hydrated)return;this.hydrated=!0,this.storage=e;const t=e.get(de);t&&this.restore(t)}restore(e){this.durationMs=he(e.durationMs||H),this.linkedWindowId=e.linkedWindowId??null,this.showRemaining=e.showRemaining??!0,e.phase==="running"&&e.endAt?e.endAt-Date.now()>0?(this.endAt=e.endAt,this.phase="running",this.startTick()):(this.remainingMs=0,this.enterFinished()):e.phase==="paused"?(this.phase="paused",this.remainingMs=e.remainingMs||this.durationMs):(this.phase="idle",this.remainingMs=this.durationMs)}snapshot(){return{phase:this.phase,remainingMs:this.currentRemaining(),durationMs:this.durationMs,linkedWindowId:this.linkedWindowId,showRemaining:this.showRemaining}}currentRemaining(){return this.phase==="running"&&this.endAt!==null?Math.max(0,this.endAt-Date.now()):this.phase==="finished"?0:this.remainingMs}subscribe(e){return this.subs.add(e),()=>{this.subs.delete(e)}}notify(){this.subs.forEach(e=>e())}setDuration(e){this.phase==="running"||this.phase==="finished"||(this.durationMs=he(e),this.remainingMs=this.durationMs,this.phase="idle",this.endAt=null,this.persist(),this.notify())}setLinkedWindow(e){this.linkedWindowId=e,this.persist(),this.notify()}setShowRemaining(e){this.showRemaining=e,this.persist(),this.notify()}start(){if(this.phase==="running")return;const e=this.phase==="paused"?this.remainingMs:this.durationMs;this.endAt=Date.now()+Math.max(0,e),this.phase="running",this.alarm.prime(),this.startTick(),this.persist(),this.notify()}pause(){this.phase==="running"&&(this.remainingMs=this.currentRemaining(),this.endAt=null,this.phase="paused",this.stopTick(),this.persist(),this.notify())}reset(){this.stopTick(),this.stopRinging(),this.phase="idle",this.endAt=null,this.remainingMs=this.durationMs,this.persist(),this.notify()}dismiss(){this.stopRinging(),this.phase="idle",this.endAt=null,this.remainingMs=this.durationMs,this.persist(),this.notify()}isRinging(){return this.alarm.isRinging()}startTick(){this.stopTick(),this.tick=setInterval(()=>{this.currentRemaining()<=0?this.enterFinished():this.notify()},Ye)}stopTick(){this.tick!==null&&(clearInterval(this.tick),this.tick=null)}enterFinished(){this.stopTick(),this.phase="finished",this.endAt=null,this.remainingMs=0,this.persist(),this.alarm.start(),this.doShake(),this.shaker=setInterval(()=>this.doShake(),Je),this.notify()}doShake(){this.linkedWindowId&&Ke(this.linkedWindowId)}stopRinging(){this.alarm.stop(),this.shaker!==null&&(clearInterval(this.shaker),this.shaker=null)}persist(){this.storage?.set(de,{phase:this.phase,endAt:this.endAt,remainingMs:this.remainingMs,durationMs:this.durationMs,linkedWindowId:this.linkedWindowId,showRemaining:this.showRemaining})}}function he(i){return Number.isFinite(i)?Math.min(Ge,Math.max(ce,Math.round(i))):H}function tt(){const i=window;return i.__openStationFocusTimer||(i.__openStationFocusTimer=new et),i.__openStationFocusTimer}const ue={step:ce},pe="desktop-mode/focus-timer",ot=[5,15,25,45],K="__none__";function y(i,e,t){const o=document.createElement(i);return e&&(o.className=e),t!==void 0&&(o.textContent=t),o}function C(i,e){const t=document.createElement("button");return t.type="button",t.className=i,t.textContent=e,t}function fe(i){const e=Math.ceil(i/1e3),t=Math.floor(e/3600),o=Math.floor(e%3600/60),s=e%60,n=String(o).padStart(2,"0"),r=String(s).padStart(2,"0");return t>0?`${t}:${n}:${r}`:`${n}:${r}`}const it=(i,e)=>{const t=tt();t.attachStorage(e.storage),i.classList.add("dm-focus");let o=null,s=null,n=null,r=null;function a(){const l=[{value:K,label:v("No window — just alarm","desktop-mode")}];for(const d of Be())d.id!==pe&&l.push({value:d.id,label:d.config.title||v("Untitled window","desktop-mode")});return l}function u(){if(!r)return;const l=a();r.items=l;const d=t.snapshot().linkedWindowId;r.value=d&&l.some(b=>b.value===d)?d:K}function c(l){i.replaceChildren();const d=y("div","dm-focus__time-row"),b=C("dm-focus__step","−");b.setAttribute("aria-label",v("Subtract a minute","desktop-mode"));const T=C("dm-focus__step","+");T.setAttribute("aria-label",v("Add a minute","desktop-mode")),s=y("div","dm-focus__time"),b.addEventListener("click",()=>t.setDuration(t.snapshot().durationMs-ue.step)),T.addEventListener("click",()=>t.setDuration(t.snapshot().durationMs+ue.step)),d.append(b,s,T),i.appendChild(d);const me=y("div","dm-focus__presets");for(const A of ot){const $=C("dm-focus__chip",F(v("%d min","desktop-mode"),A));$.addEventListener("click",()=>t.setDuration(A*60*1e3)),me.appendChild($)}i.appendChild(me);const Q=y("div","dm-focus__field");Q.append(y("span","dm-focus__field-label",v("Shake this window when done","desktop-mode"))),r=document.createElement("os-select"),r.className="dm-focus__select",u(),r.addEventListener("os-pick",A=>{const $=A.detail.value;t.setLinkedWindow($===K?null:$)}),Q.appendChild(r),i.appendChild(Q);const V=document.createElement("os-checkbox-label");V.className="dm-focus__toggle",V.setAttribute("label",v("Show remaining time while running","desktop-mode")),l.showRemaining&&V.setAttribute("checked",""),V.addEventListener("os-checkbox-change",A=>{t.setShowRemaining(A.detail.checked)}),i.appendChild(V);const G=y("div","dm-focus__actions");if(l.phase==="paused"){const A=C("dm-focus__btn is-primary",v("Resume","desktop-mode"));A.addEventListener("click",()=>t.start());const $=C("dm-focus__btn",v("Reset","desktop-mode"));$.addEventListener("click",()=>t.reset()),G.append(A,$)}else{const A=C("dm-focus__btn is-primary",v("Start focus","desktop-mode"));A.addEventListener("click",()=>t.start()),G.appendChild(A)}i.appendChild(G),n=null}function p(){i.replaceChildren(),r=null,s=y("div","dm-focus__time dm-focus__time--running"),i.appendChild(s),n=y("div","dm-focus__sub"),i.appendChild(n);const l=y("div","dm-focus__actions"),d=C("dm-focus__btn",v("Pause","desktop-mode"));d.addEventListener("click",()=>t.pause());const b=C("dm-focus__btn",v("Reset","desktop-mode"));b.addEventListener("click",()=>t.reset()),l.append(d,b),i.appendChild(l)}function f(){i.replaceChildren(),r=null,s=null,i.appendChild(y("div","dm-focus__bell","⏰")),i.appendChild(y("div","dm-focus__done",v("Time’s up!","desktop-mode"))),n=y("div","dm-focus__sub"),i.appendChild(n);const l=C("dm-focus__btn is-primary dm-focus__btn--stop",v("Stop alarm","desktop-mode"));l.addEventListener("click",()=>t.dismiss());const d=y("div","dm-focus__actions");d.appendChild(l),i.appendChild(d)}function g(l){return l.linkedWindowId&&le(l.linkedWindowId)?.config.title||""}function _(){const l=t.snapshot();if(s&&l.phase==="running"?l.showRemaining?(s.textContent=fe(l.remainingMs),s.classList.remove("is-hidden")):(s.textContent=v("Focusing…","desktop-mode"),s.classList.add("is-hidden")):s&&(s.textContent=fe(l.remainingMs)),n){const d=g(l);if(l.phase==="running"){const b=v("Linked to “%s”","desktop-mode");n.textContent=d?F(b,d):v("No window linked","desktop-mode")}else if(l.phase==="finished"){const b=v("Shaking “%s”","desktop-mode");n.textContent=d?F(b,d):v("Press stop to silence.","desktop-mode")}}}function h(){const l=t.snapshot(),d=l.phase==="paused"?"idle":l.phase;d!==o&&(d==="running"?p():d==="finished"?f():c(l),o=d),i.classList.toggle("is-running",l.phase==="running"),i.classList.toggle("is-finished",l.phase==="finished"),_()}const x=t.subscribe(h),m=()=>{o==="idle"&&u()};return document.addEventListener("os-window-opened",m),document.addEventListener("os-window-closed",m),h(),()=>{x(),document.removeEventListener("os-window-opened",m),document.removeEventListener("os-window-closed",m)}},X=window;X.openStationWidgets=X.openStationWidgets??{},X.openStationWidgets[pe]=it})(); | |
| 69 | + `}_onChange(e){if(this.disabled!==null)return;const t=e.target.checked;t?this.setAttribute("checked",""):this.removeAttribute("checked"),this.emit("os-checkbox-change",{checked:t})}};z.props=["label","checked","disabled"],z.styles=[je],z.help=void 0;let j=z;O("os-checkbox-label",j);const Fe="desktop-mode";function re(){return window.wp?.i18n}function v(i,e=Fe){return re()?.__(i,e)??i}function F(i,...e){const t=re()?.sprintf;if(t)return t(i,...e);let o=0;return i.replace(/%(?:(\d+)\$)?[sd]/g,(s,n)=>{const r=n?Number.parseInt(n,10)-1:o++;return String(e[r]??"")})}function ae(){return window.wp?.os}function Be(){try{return ae()?.windowManager?.getAll()??[]}catch{return[]}}function le(i){try{return ae()?.windowManager?.getById(i)}catch{return}}function Ke(i){const e=le(i);return!e||typeof e.shake!="function"?!1:(e.shake(),!0)}class Xe{constructor(){this.ctx=null,this.loop=null}prime(){if(!this.ctx){const e=window.AudioContext||window.webkitAudioContext;e&&(this.ctx=new e)}this.ctx?.resume?.()}chime(){const e=this.ctx;if(!e)return;const t=e.currentTime;[880,1108.73,1318.51].forEach((o,s)=>{const n=e.createOscillator(),r=e.createGain();n.type="sine",n.frequency.value=o;const a=t+s*.16;r.gain.setValueAtTime(1e-4,a),r.gain.exponentialRampToValueAtTime(.22,a+.02),r.gain.exponentialRampToValueAtTime(1e-4,a+.22),n.connect(r).connect(e.destination),n.start(a),n.stop(a+.24)})}start(){this.loop===null&&(this.prime(),this.chime(),this.loop=setInterval(()=>this.chime(),1600))}stop(){this.loop!==null&&(clearInterval(this.loop),this.loop=null)}isRinging(){return this.loop!==null}}function Qe(i){const e=window.wp?.os;return typeof e?.showToast!="function"?()=>{}:e.showToast(i)??(()=>{})}const ce="state",H=25*60*1e3,de=60*1e3,Ge=180*60*1e3,Ye=250,Je=700;class et{constructor(){this.phase="idle",this.endAt=null,this.remainingMs=H,this.durationMs=H,this.linkedWindowId=null,this.showRemaining=!0,this.tick=null,this.shaker=null,this.alarm=new Xe,this.subs=new Set,this.storage=null,this.hydrated=!1,this.windowListenerInstalled=!1,this.installWindowListener()}installWindowListener(){this.windowListenerInstalled||(this.windowListenerInstalled=!0,window.addEventListener("os-window-closed",e=>{const t=e.detail?.windowId;!t||t!==this.linkedWindowId||this.onLinkedWindowClosed()}))}onLinkedWindowClosed(){const e=this.phase==="running"||this.phase==="paused";this.linkedWindowId=null,e?(this.reset(),Qe({message:v("Focus timer cancelled — the linked window was closed.","desktop-mode")})):(this.persist(),this.notify())}attachStorage(e){if(this.hydrated)return;this.hydrated=!0,this.storage=e;const t=e.get(ce);t&&this.restore(t)}restore(e){this.durationMs=he(e.durationMs||H),this.linkedWindowId=e.linkedWindowId??null,this.showRemaining=e.showRemaining??!0,e.phase==="running"&&e.endAt?e.endAt-Date.now()>0?(this.endAt=e.endAt,this.phase="running",this.startTick()):(this.remainingMs=0,this.enterFinished()):e.phase==="paused"?(this.phase="paused",this.remainingMs=e.remainingMs||this.durationMs):(this.phase="idle",this.remainingMs=this.durationMs)}snapshot(){return{phase:this.phase,remainingMs:this.currentRemaining(),durationMs:this.durationMs,linkedWindowId:this.linkedWindowId,showRemaining:this.showRemaining}}currentRemaining(){return this.phase==="running"&&this.endAt!==null?Math.max(0,this.endAt-Date.now()):this.phase==="finished"?0:this.remainingMs}subscribe(e){return this.subs.add(e),()=>{this.subs.delete(e)}}notify(){this.subs.forEach(e=>e())}setDuration(e){this.phase==="running"||this.phase==="finished"||(this.durationMs=he(e),this.remainingMs=this.durationMs,this.phase="idle",this.endAt=null,this.persist(),this.notify())}setLinkedWindow(e){this.linkedWindowId=e,this.persist(),this.notify()}setShowRemaining(e){this.showRemaining=e,this.persist(),this.notify()}start(){if(this.phase==="running")return;const e=this.phase==="paused"?this.remainingMs:this.durationMs;this.endAt=Date.now()+Math.max(0,e),this.phase="running",this.alarm.prime(),this.startTick(),this.persist(),this.notify()}pause(){this.phase==="running"&&(this.remainingMs=this.currentRemaining(),this.endAt=null,this.phase="paused",this.stopTick(),this.persist(),this.notify())}reset(){this.stopTick(),this.stopRinging(),this.phase="idle",this.endAt=null,this.remainingMs=this.durationMs,this.persist(),this.notify()}dismiss(){this.stopRinging(),this.phase="idle",this.endAt=null,this.remainingMs=this.durationMs,this.persist(),this.notify()}isRinging(){return this.alarm.isRinging()}startTick(){this.stopTick(),this.tick=setInterval(()=>{this.currentRemaining()<=0?this.enterFinished():this.notify()},Ye)}stopTick(){this.tick!==null&&(clearInterval(this.tick),this.tick=null)}enterFinished(){this.stopTick(),this.phase="finished",this.endAt=null,this.remainingMs=0,this.persist(),this.alarm.start(),this.doShake(),this.shaker=setInterval(()=>this.doShake(),Je),this.notify()}doShake(){this.linkedWindowId&&Ke(this.linkedWindowId)}stopRinging(){this.alarm.stop(),this.shaker!==null&&(clearInterval(this.shaker),this.shaker=null)}persist(){this.storage?.set(ce,{phase:this.phase,endAt:this.endAt,remainingMs:this.remainingMs,durationMs:this.durationMs,linkedWindowId:this.linkedWindowId,showRemaining:this.showRemaining})}}function he(i){return Number.isFinite(i)?Math.min(Ge,Math.max(de,Math.round(i))):H}function tt(){const i=window;return i.__openStationFocusTimer||(i.__openStationFocusTimer=new et),i.__openStationFocusTimer}const ue={step:de},pe="desktop-mode/focus-timer",ot=[5,15,25,45],B="__none__";function y(i,e,t){const o=document.createElement(i);return e&&(o.className=e),t!==void 0&&(o.textContent=t),o}function C(i,e){const t=document.createElement("button");return t.type="button",t.className=i,t.textContent=e,t}function fe(i){const e=Math.ceil(i/1e3),t=Math.floor(e/3600),o=Math.floor(e%3600/60),s=e%60,n=String(o).padStart(2,"0"),r=String(s).padStart(2,"0");return t>0?`${t}:${n}:${r}`:`${n}:${r}`}const it=(i,e)=>{const t=tt();t.attachStorage(e.storage),i.classList.add("dm-focus");let o=null,s=null,n=null,r=null;function a(){const l=[{value:B,label:v("No window — just alarm","desktop-mode")}];for(const c of Be())c.id!==pe&&l.push({value:c.id,label:c.config.title||v("Untitled window","desktop-mode")});return l}function u(){if(!r)return;const l=a();r.items=l;const c=t.snapshot().linkedWindowId;r.value=c&&l.some(b=>b.value===c)?c:B}function d(l){i.replaceChildren();const c=y("div","dm-focus__time-row"),b=C("dm-focus__step","−");b.setAttribute("aria-label",v("Subtract a minute","desktop-mode"));const T=C("dm-focus__step","+");T.setAttribute("aria-label",v("Add a minute","desktop-mode")),s=y("div","dm-focus__time"),b.addEventListener("click",()=>t.setDuration(t.snapshot().durationMs-ue.step)),T.addEventListener("click",()=>t.setDuration(t.snapshot().durationMs+ue.step)),c.append(b,s,T),i.appendChild(c);const me=y("div","dm-focus__presets");for(const A of ot){const $=C("dm-focus__chip",F(v("%d min","desktop-mode"),A));$.addEventListener("click",()=>t.setDuration(A*60*1e3)),me.appendChild($)}i.appendChild(me);const X=y("div","dm-focus__field");X.append(y("span","dm-focus__field-label",v("Shake this window when done","desktop-mode"))),r=document.createElement("os-select"),r.className="dm-focus__select",u(),r.addEventListener("os-pick",A=>{const $=A.detail.value;t.setLinkedWindow($===B?null:$)}),X.appendChild(r),i.appendChild(X);const V=document.createElement("os-checkbox-label");V.className="dm-focus__toggle",V.setAttribute("label",v("Show remaining time while running","desktop-mode")),l.showRemaining&&V.setAttribute("checked",""),V.addEventListener("os-checkbox-change",A=>{t.setShowRemaining(A.detail.checked)}),i.appendChild(V);const Q=y("div","dm-focus__actions");if(l.phase==="paused"){const A=C("dm-focus__btn is-primary",v("Resume","desktop-mode"));A.addEventListener("click",()=>t.start());const $=C("dm-focus__btn",v("Reset","desktop-mode"));$.addEventListener("click",()=>t.reset()),Q.append(A,$)}else{const A=C("dm-focus__btn is-primary",v("Start focus","desktop-mode"));A.addEventListener("click",()=>t.start()),Q.appendChild(A)}i.appendChild(Q),n=null}function p(){i.replaceChildren(),r=null,s=y("div","dm-focus__time dm-focus__time--running"),i.appendChild(s),n=y("div","dm-focus__sub"),i.appendChild(n);const l=y("div","dm-focus__actions"),c=C("dm-focus__btn",v("Pause","desktop-mode"));c.addEventListener("click",()=>t.pause());const b=C("dm-focus__btn",v("Reset","desktop-mode"));b.addEventListener("click",()=>t.reset()),l.append(c,b),i.appendChild(l)}function f(){i.replaceChildren(),r=null,s=null,i.appendChild(y("div","dm-focus__bell","⏰")),i.appendChild(y("div","dm-focus__done",v("Time’s up!","desktop-mode"))),n=y("div","dm-focus__sub"),i.appendChild(n);const l=C("dm-focus__btn is-primary dm-focus__btn--stop",v("Stop alarm","desktop-mode"));l.addEventListener("click",()=>t.dismiss());const c=y("div","dm-focus__actions");c.appendChild(l),i.appendChild(c)}function g(l){return l.linkedWindowId&&le(l.linkedWindowId)?.config.title||""}function _(){const l=t.snapshot();if(s&&l.phase==="running"?l.showRemaining?(s.textContent=fe(l.remainingMs),s.classList.remove("is-hidden")):(s.textContent=v("Focusing…","desktop-mode"),s.classList.add("is-hidden")):s&&(s.textContent=fe(l.remainingMs)),n){const c=g(l);if(l.phase==="running"){const b=v("Linked to “%s”","desktop-mode");n.textContent=c?F(b,c):v("No window linked","desktop-mode")}else if(l.phase==="finished"){const b=v("Shaking “%s”","desktop-mode");n.textContent=c?F(b,c):v("Press stop to silence.","desktop-mode")}}}function h(){const l=t.snapshot(),c=l.phase==="paused"?"idle":l.phase;c!==o&&(c==="running"?p():c==="finished"?f():d(l),o=c),i.classList.toggle("is-running",l.phase==="running"),i.classList.toggle("is-finished",l.phase==="finished"),_()}const x=t.subscribe(h),m=()=>{o==="idle"&&u()};return document.addEventListener("os-window-opened",m),document.addEventListener("os-window-closed",m),h(),()=>{x(),document.removeEventListener("os-window-opened",m),document.removeEventListener("os-window-closed",m)}},K=window;K.openStationWidgets=K.openStationWidgets??{},K.openStationWidgets[pe]=it})(); | |